KL03 software reset issue

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

KL03 software reset issue

683 次查看
tigerlo
Contributor III

Hi,

    software call the core_cm0plus.h define NVIC_SystemReset(void) , why system didn't reset ?

or there is another function call to reset the system.

/** \brief System Reset

The function initiates a system reset request to reset the MCU.
*/
__STATIC_INLINE void NVIC_SystemReset(void)
{
__DSB(); /* Ensure all outstanding memory accesses included
buffered write are completed before reset */
SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
SCB_AIRCR_SYSRESETREQ_Msk);
__DSB(); /* Ensure completion of memory access */
while(1) { __NOP(); } /* wait until reset */
}

Thanks.

Tiger

2 回复数

500 次查看
tigerlo
Contributor III

Robin,

    Thanks, I test the NVIC_SystemReset() is ok.

    I test this code connect the ICE debug in last time & expect it run looply. The debugger will stop on reset.

Tiger

0 项奖励
回复

500 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Tiger,

I test the bubble demo in SDK_2.2_FRDM-KL03Z with IAR ide, the NVIC_SystemReset can reset the MCU.

NVIC_SystemReset.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------