How to self-reset LPC12xx device after an IAP flash mass-erase ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to self-reset LPC12xx device after an IAP flash mass-erase ?

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sylvain on Tue Dec 16 21:36:32 MST 2014
Hi,

I'm wondering if anybody has a mechanism to trigger a self-reset after an IAP mass-erase (erase all user sectors) ?
I'm thinking of using the watchdog since code execution is not possible after mass-erase (? unless there is a trick not involving ram code execution). The spec is a little unclear regarding the mass-erase time so I'm not sure which timing I should set the watchdog to.
Spec notes max 20ms, but does not clearly state if the 20ms is for the whole operation, or 20ms max per sector.

If anybody has a suggestion it would be appreciated.

Thks in advance,
Sylvain
Labels (1)
0 Kudos
2 Replies

497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rama krishna deekshitulu on Fri Feb 12 05:35:26 MST 2016
Hi,
I'm using lpc1225 my application is run the second boot loader at address of 3000 everything working fine without using system tick timers if i'm using system tick timers(SysTick_Config(SystemCoreClock / 1000); ) for delay purpose. boot loading application is failed.. please anyone can help me..

second boot loader jumping like below code

/* Load main stack pointer with application stack pointer initial value,
   stored at first location of application area */ //initial sp values

asm volatile("ldr r0, =0X3000");
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");

/* Load program counter with application reset vector address, located at
   second word of application area. */ //reset
asm volatile("ldr r0, =0X3004");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
0 Kudos

497 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by embd02161991 on Thu Jan 29 00:06:17 MST 2015
Hi,

You can use the NVIC_SystemReset()  to do a software reset. This is similar to the hardware reset ( button press) .
The code should run from RAM along with the IAP calls.

Thanks,
NXP Technical Support
0 Kudos