Electronic – Make the own microcontroller ARM M0 board: do I need bootloader

bootloadermicrocontroller

I did buy one of these cheap all in one microcontroller, but instead of using a standard Atmel, like the ones on the Arduino boards, it uses a more powerful ARM M0 chip.

Now, I would like to buy my own M0 (picking a SAMD21G18) and make my own board, exposing only the pin that I need, but I can't find info about a critical piece of info: How do you program the chip?

The board that I did purchase, has a USB to serial chip, I believe; and it has a rom with a bootloader, so when it is in a state, you can put code on it, while when in regular state, it execute the program.

I would like to do something similar, adding a USB to serial so I can upload firmware updates if needed; but I am not sure…could I program the chips in a different way, and save on the hassle to even put a serial to USB converter?

Also is there a standard bootloader that many arduino clones use? They all seems to work in the same way, with ARduino IDE; at least to my eyes.

Hope the question is clear enough; this is my first attempt at making a breakout board from scratch. Thanks.


Found this post which has some relevant info

https://web.archive.org/web/20150906201126/https://hackaday.io/project/7355-minimum-zero-compatible-sam-d21g18-d21e18-board

This person made a minimalist board with a SAM D21G18 chip; it show the finished product, some videos and schematics, so it is a good starting point.

From my findings, the chip has already the USB functionality, to upload on the ROM the code, but you need to use the Atmel own IDE. Still looking for details, but it is a good start.

Since nobody replied; I assume that nobody was aware of this link, so it may be useful to others.

Best Answer

Obviously all microcontroller chips which means a chip with some sort of processor, non-volatile memory (flash for example) and ram are at least one time programmable if not re-programmable. These days you find they are often in circuit programmable.

Atmel used to have a sam-ba bootloader on board, that was easy to use. Now that is gone, the SAMD21, has just the one flash space, and has ways to discourage the erasure, but it is trivial to erase. So you dont get that sam-ba nor the arduino experience. The arduino's using an avr, the avr is nice you have the isp programming, which varies across the product line, but is still good. and they have a bootloader area which is where you find the serial based bootloader that arduino's use.

ST and NXP still on m0/m0+ products include a serial bootloader that is easy to use. and both are easier to program than the atmel samd21.

a number of these have usb based bootloaders as well.

At the end of the day though it is a simple matter of reading the manual for the part you are interested in. Go to mouser or digikey or you favorite place, narrow down on microcontrollers from any company that meet your footprint (are hand solderable) or whatever and then look at the datasheets there. or dig deeper at the vendors website. they are ALL programmable. Some jtag is the only option (have a freescale I still cannot program, SWD only and cant get it going with openocd yet). the samd21 you can program with an st-link and probably a cmsis-dap. getting a nucleo board is a cheaper option than a standalone st-link, and hey you may find you like how easy it is to program an stm32. no I dont work for any of these companies.