AnsweredAssumed Answered

FRDM-KL05z: after exit from VLLS3, execution starts with Reset_Handler as expected but execution fails when reaching main()

Question asked by M Joa on Dec 19, 2014
Latest reply on Dec 22, 2014 by M Joa

Hi,

When running low_power_demo from official package KL05-SC.zip as well as FRDM-KL05Z Quick Start Package to test deep sleep/wakeup on FRDM_KL05z, I found this scenario.


From the following trace, after exit from VLLS3, execution starts with Reset_Handler (the instruction pointed to by the RESET vector address) as expected but execution fails when reaching main():

-------------------------------------------------------------------------------------------------

Enter the key number to choose one mode: 9LLWU PE1   = 0x00,    LLWU PE2   = 0x00

LLWU ME    = 0x01,    LLWU F1    = 0x00

LLWU F3    = 0x00

LLWU FILT1 = 0x00,    LLWU FILT2 = 0x00

 

 

enter into VLLS3 mode--.

[outSRS]Wakeup bit set from low power mode exit

[outSRS]SMC_PMPROT   = 0x02

[outSRS]SMC_PMCTRL   = 0x04

[outSRS]SMC_STOPCTRL   = 0x03

[outSRS]SMC_PMSTAT   = 0x01

[outSRS] VLLS3 exit

 

 

K05

Unrecognized Kinetis package code.      SRAM Size:  4 KB

Silicon rev 15

Flash size:  32 KB program flash, 1 KB protection region

 

 

[LLWU ISR]

 

 

[LLWU ISR] ****WUF3_MWUF0 IF  LPT0  *****

-------------------------------------------------------------------------------------------------

MCU just stuck there until Reset button is explicitly pressed. I would expect main() to be re-executed when running the Reset_Handler:

Reset_Handler   PROC

                EXPORT  Reset_Handler             [WEAK]

                IMPORT  SystemInit

                IMPORT  __main

                LDR     R0, =SystemInit

                BLX     R0

                LDR     R0, =__main

                BX      R0

                ENDP

 

Is there anything that is needed in order to have reset flow run properly and have main() reexecute?

Thanks for your help.

Outcomes