USART bootloader

A project log for MiniSam-Zero

Tiny sameD09 dev board. (Zero has nothing to do with arduino, the name allows other boards in this line. namely -One, & -Two coming later.)

Jeremy g. 06/30/2016 at 19:060 Comments

I don't know why I wanted a bootloader since I have the required jag tools to program the device without needing a bootloader. But this does work well as a learning experience, also if someone else wanted to mess about with the board then they wouldnt need a jtag programmer to do so.

I found a Serial boot loader for the samd10 Micro and gutted it. The usart write and read functions did not work all that well at least on my samd09. I fixed that with my own functions. The bootloader talks at 115200bps to a python script. That also came with with D10 boot loader. But it has been modified to toggle the boot pin so the micro enters bootloader mode on reset.

I ran into an issue when writing to user flash I'm pretty sure it was an overflow issue although the registers on the micro indicated that was not the case. The function would get to the end of the usable user flash and fall to a dummy handler function for interrupts that did nothing. This has been fixed, or so it seems.

My next issue is verifying the userr flash. This function always seems to spit out the incorrect data, so says the python script anyway. I need to look into this and see what's different about the memory space on the 09 va the 10 it seems that the page size is wrong.

Other than that the bootloader is staying around 1Kb in size. So that's nice it still leaves around 14~15Kb for programs. But that's what the EEPROM is for :) a little added space.

I'll have to do another board spin as now the boot loader has two new pin definitions. So hopefully R1.3 will be the final spin.

Stay happy, stay health, and keep hackin.