how to reset FRDMk64f120 controller using program instead of reset switch

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

how to reset FRDMk64f120 controller using program instead of reset switch

900 Views
sudhakarp
Contributor V

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

Labels (1)
0 Kudos
3 Replies

503 Views
RadekS
NXP Employee
NXP Employee

You could use something like:

SCB_AIRCR = 0x05FA0004;

while (1) {};

For details about this register, please look at ARM Cortex M4 Core documentation:

ARM Information Center

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

503 Views
sudhakarp
Contributor V

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

0 Kudos

503 Views
RadekS
NXP Employee
NXP Employee

You are right, I missed that API function.

According reference manual:

  1. 6.2.2.8 Software reset (SW)

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

0 Kudos