KL03 software reset issue

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

KL03 software reset issue

490 Views
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 Replies

307 Views
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 Kudos

307 Views
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!
-----------------------------------------------------------------------------------------------------------------------