# SAMD21 and SPI

**URL:** https://forum.makecode.com/t/samd21-and-spi/19422
**Category:** PXT
**Created:** [April 25, 2023, 4:33pm UTC](https://forum.makecode.com/t/samd21-and-spi/19422 "2023-04-25T16:33:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dotnetmaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dotnetmaster/32/7406_2.png) [@dotnetmaster](https://forum.makecode.com/u/dotnetmaster)
#### Post date: [April 25, 2023, 4:33pm UTC](https://forum.makecode.com/t/samd21-and-spi/19422/1 "2023-04-25T16:33:45Z")

</div>

Hi everyone,  
I’m working on a custom board using SAMD21 as the microcontroller. Unfortunately, I have not found any sample library using SPI for a SAMD21-based board; many examples for micro: bit is incompatible with SAMD21-based boards. I’m now using a customized version of circuit playground express editor as this was the closest configuration to custom my board.  
Whenever I use SPI either in the CCP file or the Javascript editor, the U2F file gets downloaded locally instead of being downloaded to the board using WebUSb, and I don’t get any errors; it just does not work. Once I remove or comment out the SPI related code, everything goes back to normal.  
I would appreciate it if you could help or guide me in the right direction.  
Thanks.  
Alex
