AnsweredAssumed Answered

Kinetis K20 won't do software reset

Question asked by Charles Lehman on Jun 20, 2014
Latest reply on Jun 26, 2014 by Charles Lehman

I have tried three methods of resetting this MK20DX256VLK7 chip, and none of them seem to produce the same effect as power cycling it.

 

Method 1: Set the System Reset Request bit of the Application Interrupt and Reset Control Register (VECTKEY is required according to the ARM documentation)

SCB_AIRCR = SCB_AIRCR_VECTKEY(0x05fa) | SCB_AIRCR_SYSRESETREQ_MASK;

 

Method 2: Writing an incorrect value to the Watchdog Unlock register should cause the watchdog module to reset the system

WDOG_UNLOCK = 0xffff;

 

Method 3: Unlocking the Watchdog module and failing to update anything should also cause the watchdog module to reset the system

WDOG_UNLOCK = 0xc520;

WDOG_UNLOCK = 0xd928;

 

I am trying to switch between an application and a firmware update bootloader. Calling the entry point for the application directly ends up in the application's main loop, but none of the peripherals seem to work correctly, and this problem only happens when going from the application to the bootloader and back to the application, so it should work if I can simulate power cycling the chip rather than calling the application directly. What am I missing here?

 

I am using CodeWarrior 10.4 with ProcessorExpert for most of the peripheral components (specifically, CAN_LDD, GPIO_LDD, and TimerUnit_LDD).

 

I know there are hardware solutions for this, but for the moment I'm stuck with the board and components as they are.

Outcomes