LPC1114如何在程序中软件复位
LPC1114软件复位,在程序中,需要复位的地方,加上NVIC_SystemReset();这条语句即可。
NVIC_SystemReset()函数位于core_m0.h文件中,只要在头文件中包含lpc11xx.h文件即可使用。
/** \brief System Reset The function initiates a system reset request to reset the MCU. */ __STATIC_INLINE void NVIC_SystemReset(void) { __DSB(); SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | SCB_AIRCR_SYSRESETREQ_Msk); __DSB(); /* Ensure completion of memory access */ while(1); /* wait until reset */ } /*@} end of CMSIS_Core_NVICFunctions */