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

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

IanMcCarthy
Posts: 3
Joined: Tue Mar 31, 2015 10:22 am

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

Tue Mar 31, 2015 12:25 pm

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

HOWEVER...as 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 applet...to 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..?

Regards,

Ian
LuisRodriguezNM
Posts: 1
Joined: Wed Jun 10, 2015 3:21 pm

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

Mon Jun 22, 2015 12:24 pm

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
IanMcCarthy
Posts: 3
Joined: Tue Mar 31, 2015 10:22 am

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

Thu Jun 25, 2015 5:18 pm

Hi,

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;
Regards,

Ian

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 2 guests