ericbaril72 / SAMD21-SDBootloader

Code Publishing
6 stars 2 forks source link

Problem #4

Open gioreva opened 5 years ago

gioreva commented 5 years ago

I had serious problems. Nothing was working after the update from SD. Even the USB (Arduino COM) didn't work anymore.

I solved it by erasing 100% of the flash before booting.

Can it be that bootloader alter some parameters in EEPROM that arduino save for its boot? And or USB boot parameter.

ericbaril72 commented 5 years ago

SAMD21 doesn't have EEprom so I am guessing you might be refering to Fuses. -->No it doesn't alter the fuses

Erasing 100% of the flash ? I am guessing you are refering to the upper section only (except bootloader section )

I would look into debugger setup first... When I initially worked on the SDbootloader, it just didn't "start the app" even though the memory content at APPaddr was all good AND I was certain that the linker start address of that app matched the bootloader APPaddr.

UNTIL I CURSED THE F$%^$& and hit the table really hard ... I suddenly had a working app ! hitting the table disconnected the debugger ( J-Link ) in my case.

My debugger did affect the behavior of the "watchdog reset" which is what calls the APP after bootloading.

Let me know if this solves your issue...

After figuring out that one, I didn't need the debugger anyways because I could now program from SD. In my case, a Wifi module did download new code to the SDcard :-)