LPC1225 AIRCR & Sysreset

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

LPC1225 AIRCR & Sysreset

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gusika on Fri Jan 06 22:50:28 MST 2012
Hi,
why does not work the code? :
----------------------------------------------
void Reset(void)
{
    asm("  LDR.N    R0, res1         ");
    asm("  LDR.N    R1, res2         ");
    asm("  CPSID  i                  ");
    asm("  STR      R1, [R0]         ");
    asm("res3:  B  res3              ");
    asm("  NOP                       ");
    asm("res1:  DCD  0xE000ED0C      ");
    asm("res2:  DCD  0x05FA0004      ");
}
----------------------------------------------
Hw reset or debug reset ok. Sw reset why is not good?
Precise what will happen in the processor?
hw/sw reset is sure not the same! but user manual...

Thx!
0 Kudos
2 Replies

290 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Mon Jan 16 17:14:16 MST 2012
Did you have a chance to try the NVIC_SystemReset()? This should work on the LPC12xx family.

Thanks,
-NXP
0 Kudos

290 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Jan 10 10:52:48 MST 2012
At first glance, your code looks okay. By the way, there is a function in the CMSIS header file core_cm0.h that does this in C, it is called NVIC_SystemReset().
I will check into why this isn't working and get back to you.
0 Kudos