Hi,
i am using frdmk64f120 controller and K.D.S 2.0 and KSDK 1.1.0.
i want to reset my board using reset function. i cant find exact API function for RESET.
i am waiting for your reply.
thanks and regards,
sudhakar p
You could use something like:
SCB_AIRCR = 0x05FA0004;
while (1) {};
For details about this register, please look at ARM Cortex M4 Core documentation:
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi,
Thanks for your reply. its most helpful to me. using your idea i used following API function
NVIC_SystemReset();
my device was resetted. i want to know ,can i use this function..? is it make any problem..?
thanks and regards,
sudhakar p
You are right, I missed that API function.
According reference manual:
The SYSRESETREQ bit in the NVIC application interrupt and reset control register can be set to force a software reset on the device. (See ARM's NVIC documentation for the full description of the register fields, especially the VECTKEY field requirements.) Setting SYSRESETREQ generates a software reset request. This reset forces a system reset of all major components except for the debug module. A software reset causes the RCM's SRS1[SW] bit to set.
So, there shouldn’t be any problem with this function. Of course, you should know where you use this function and try avoiding using this function in dangerous situation (in middle of IO operations, when any delay or failure during reset/boot could cause any claims or injury,…).
Other option is using watchdog feature - when you write to watchdog something different than regular refresh phrases, watchdog resets MCU by system reset.
This is probably most often use way for software MCU reset.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------