Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
reset command (soft reset)
Hi, I want to know is there any way to reset the K64F micro controller through software command. I know there is one for the lpc1768, but i need to reset the mbed from my software application, for example if flag is greater than 100, then reset the mbed
3 Answers
10 years, 2 months ago.
Look at cmsis header file for your core, core_cm4.h, where function NVIC_SystemReset is defined.
Definition from core_cm4.h
__STATIC_INLINE void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | SCB_AIRCR_SYSRESETREQ_Msk); /* Keep priority group unchanged */ __DSB(); /* Ensure completion of memory access */ while(1); /* wait until reset */ }
8 years, 3 months ago.
Some problem have, NVIC_SystemReset(); not work on my F103RB! Program just freeze and that's all.
Connecting NRST pin to other DigitalOut-ed pin - not work too (Reset work's but freeze after 0,2-0,5 sec)
I'm do simple, adding a elec-cap 10uF betwen NRST and VCC and it works!
Solve found here: https://developer.mbed.org/questions/55279/How-can-I-soft-reset-F103RB-with-mbed-AP/
(I can't do any changes to system initialization proccess cause i'm using online compiler)