SAMD21 Development Board Questions

Hello,

I have been using the SparkFun RedBoard Turbo for the last few months and love it. The power of the SAMD21 and the Arduino form factor is great.

I would now like to create my own SAMD21 Development Board for learning purposes. However, from the datasheet, I can tell that this is a very complex microcontroller. So, I figured that maybe Sparkfun could help me because from my past buying products from them, they have been very helpful and inspirational.

I would really appreciate some help.

First of all, could you explain to me how these boards are boot loaded? The SAMD21 chip from the factory does not come with a boot loader on it, so what files or tools do you need? I have read that many people use the Atmel Ice and Atmel Studio and that you use the pins SWDIO, SWCLK, and RESET, do you guys use this? Is there any tutorial you can direct me to? What boot loader allows the board to work with the Arduino IDE?

Secondly, where do I set the SERCOM Ports? I saw a well explained tutorial that Sparkfun made about setting SERCOMs, however, this took place in the Arduino IDE I believe. Can I set the SERCOMs in the boot loader? If so, how?

Finally, for the project that I am doing, my board needs to connect to many different sensors using up all 6 available SERCOM ports. If I want to use an existing library designed for a different board with the SAMD21, where do you modify what pins are used in a library?

For example, in my project, I am using different sensors to upload data to the cloud. I am using the NINA-W102, similar to what is used on the Arduino MKR WiFi 1010 and Nano 33 IOT. However, I am not using the same SERCOM ports that they are using. So, if I wanted to use their WiFiNINA library to help upload my sensor data, where would I change the SERCOM pins used?

Thank you so much. I feel that this is a very long question, but I would really like some help.

Thanks again

Could anybody please help me? Sparkfun?

Thanks

First of all, could you explain to me how these boards are boot loaded? what files or tools do you need? I have read that many people use the Atmel Ice and Atmel Studio and that you use the pins SWDIO, SWCLK, and RESET, do you guys use this? Is there any tutorial you can direct me to? What boot loader allows the board to work with the Arduino IDE?

SparkFun uses an Atmel ICE programmer to flash the bootloader onto the RedBoard Turbo and it does it through the SWDCLK and SWDIO pins on the 10 pin header near the analog in pins on the board. Unfortunately we don’t have a tutorial on that process but we do use Atmel Studio to do the flashing. You can find the bootloader in the boards package for the RedBoard Turbo.

Secondly, where do I set the SERCOM Ports? I saw a well explained tutorial that Sparkfun made about setting SERCOMs, however, this took place in the Arduino IDE I believe. Can I set the SERCOMs in the boot loader? If so, how?

SERCOMs need to be setup in your code. The bootloader doesn’t have anything do anything with those.

Finally, for the project that I am doing, my board needs to connect to many different sensors using up all 6 available SERCOM ports. If I want to use an existing library designed for a different board with the SAMD21, where do you modify what pins are used in a library?

That’s really going to depend on how the library is written. You may have to do some re-writing but there’s no rule on what part or area of the library would need editing. Some libraries will allow you to declare what pins you’re wanting to use in your sketch, but you’d need to check your library to see if it has that functionality.

nathanchen355:
Could anybody please help me? Sparkfun?

Thanks

Hi Nathan, I’m not Sparkfun, but perhaps this book could help you:

[Atmel ARM Programming for Embedded Systems by Mazidi, Chen (related?) and Ghaemi.

I judst bought it, and it looks ideal for low level programming of the SAMD series microcontrollers. It’s well written at an intermediate level (the authors claim it makes a good sophomore level textbook). Based on my initial skim, I also bought the volume 1 of the series, ARM assembly language programming.

Good luck with your project!](Amazon.com)