Software Reset

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Software Reset

1,705 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 12345 on Mon Jun 20 00:54:11 MST 2011
How can i reset LPC1114 from within the firmware?
  The user manual did not elaborate on the sw reset?

"   
Reset has four sources on the LPC111x/LPC11C1x: the RESET pin, Watchdog Reset,
Power-On Reset (POR), and Brown Out Detect (BOD). In addition, there is a software reset."
标记 (1)
2 回复数

1,382 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Jun 20 01:43:52 MST 2011
Just use NVIC_SystemReset() :)

It's part of CMSIS and defined in core_cm0.h.

1,382 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Roman on Mon Jun 20 01:18:04 MST 2011
Hi,

there is something in the user manual for lpc11xx on the pages 378-379.

#define NVIC_SYSRESETREQ            2         /*!< System Reset Request         */
#define NVIC_AIRCR_VECTKEY    (0x5FA << 16)   /*!< AIRCR Key for write access   */

static __INLINE void NVIC_SystemReset(void)
{
  SCB->AIRCR  = (NVIC_AIRCR_VECTKEY | (1<<NVIC_SYSRESETREQ));                          /* Keep priority group unchanged */
  asm("DSB");
  while(1);                                                                            /* wait until reset */
}


Hope that help
标记 (1)