Page 1 of 1

Trying to get OUT of ROM BOOT mode without power cycling..?

Posted: Tue Mar 31, 2015 12:25 pm
by IanMcCarthy
I'm creating a bespoke Windows utility to assist with re-programming our SAM4S based devices in the field.

I can automatically reset the device and have it enter ROM boot mode...OK

I can erase and re-program the application code in FLASH...OK

I can (wrote an applet) reset the device back to executing application code in FLASH...OK soon as I execute my reset applet...the Atmel CDC port dies (understandable as the device is reset...but this happens before I can close the CDC port on the PC...which leaves the port hung and unusable until I close my Windows utility and start it again...not so user friendly.

I tried looping in the delay before issuing a reset...but this kills the port CDC anyway.

I thought about using the watchdog to trigger the reset after a delay...but that's already been disabled.

I tried to activate the SysTick but can't seem to generate any associated interrupts.

I also considered triggering a reset after a delay using a timer but without debugging it's difficult knowing exactly what's happening.

Has anyone attempted something similar before..?

Has anyone got a suitable solution..?



Re: Trying to get OUT of ROM BOOT mode without power cycling

Posted: Mon Jun 22, 2015 12:24 pm
by LuisRodriguezNM
Hi what kind of applet do you use to reset device to boot the from Flash (coming from Boot mode)

I am having issues to reset the device, without a physical hardware reset, I have tried jumping to ROM first address after changing the GPNVM bit to boot from flash, but the code hangs inside the Reset_handler routine.

Any help would be highly appreciate it.

Thank you

Re: Trying to get OUT of ROM BOOT mode without power cycling

Posted: Thu Jun 25, 2015 5:18 pm
by IanMcCarthy

I cut and pasted one of the other applets to implement a "jump to reset", however you need to set the EGBI_1_BOOT_MODE bit in NVM first to get it to execute your code after the reset occurs.

My reset command was simply:

Code: Select all

*((uint32_t *)0x400E1400) = 0xA500000D;