low_power_demo in KL05-SC.zip - could not wake up from sleep.

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

low_power_demo in KL05-SC.zip - could not wake up from sleep.

Jump to solution
781 Views
mjoa
Contributor II

Hi,

I am using the application low_power_demo from official package KL05- SC.zip to test deep sleep/wakeup on FRDM_KL05z. Somehow, after selecting a particular low power mode other than VLPR, VLLS0-1, VLLS0-2, MCU goes to sleep/stop but could not wake up after lptmr expires. I would expect MCU will be waken up after 10s  and execute the next instruction.


I have done the following tests:

 

(1) use original outfile.s19 under KL05-SC\klxx-sc-baremetal\build\keil\low_power_demo by dragging and dropping image  into the FRDM-KL05Z drive. The above problem appears with this trace:

 

Enter the key number to choose one mode: 4

enter into stop mode--

 

MCU just stuck there until reset button is pressed.

 

(2) build outfile.s19 using keil and run the image by dragging and dropping image into the FRDM-KL05Z drive as well as using Keil debugger. The same problem appears. MCU could not wake up.

 

(3) use low_power_demo.srec from FRDM-KL05Z_QSP Quick Start Package. MCU COULD wake up properly.

 

 

I am really puzzled why the original image under KL05-SC\klxx-sc-baremetal\build\keil\low_power_demo could not run properly on my FRDM_KL05z board whereas the one from FRDM-KL05Z_QSP Quick Start Package could run properly.

 

Is there anything I am missing?

Thanks a lot

 

PS

The Hardware Information:

Board Name is: FRDM-KL05Z

MicroBoot Kernel Version is: 1.03

Bootloader Version is: 1.11

Installed Application: PEMicro FRDM-KL05Z Mass Storage/Debug App

Application Version is: 1.14

 

I am using MSD-DEBUG-FRDM-KL05Z_Pemicro_v114.SDA. Attached please find 3 traces:

1. low_power_mode_org_1.txt - trace using original outfile.s19 under KL05-SC\klxx-sc-baremetal\build\keil\low_power_demo

2. low_power_mode_org_build_1.txt - trace using outfile.s19 that is built under KL05-SC\klxx-sc-baremetal\build\keil\low_power_demo using keil

3. low_power_mode_1.txt - trace using low_power_demo.srec from FRDM-KL05Z_QSP Quick Start Package.

 

From trace 1 and 2, it seems MCU is reset and could NOT be waken up after LPTMR expires

Original Attachment has been moved to: low_power_mode_1.txt.zip

Original Attachment has been moved to: low_power_mode_org_build_1.txt.zip

Original Attachment has been moved to: low_power_mode_org_1.txt.zip

Labels (1)
0 Kudos
1 Solution
509 Views
mjoa
Contributor II

ISR of llwu and lptmr were NOT invoked. Instead, default one were invoked.

Problem is solved by adding the followings to low_power_demo.c

#ifdef CMSIS

  #define llwu_isr LLW_IRQHandler

  #define lptmr_isr LPTimer_IRQHandler

  #define porta_isr PORTA_IRQHandler

  #define portb_isr PORTB_IRQHandler

#endif


and modifying the following function headers

#ifdef CMSIS

void LLW_IRQHandler(void) {

#else

void llwu_isr(void){

#endif

#ifdef CMSIS

void LPTimer_IRQHandler(void) {

#else

void lptmr_isr(void){

#endif

#ifdef CMSIS

void PORTA_IRQHandler(void) {

#else

void PORTA_ISR(void){

#endif

#ifdef CMSIS

void PORTB_IRQHandler(void) {

#else

void PORTB_ISR(void){

#endif

Hope that could help...

View solution in original post

0 Kudos
1 Reply
510 Views
mjoa
Contributor II

ISR of llwu and lptmr were NOT invoked. Instead, default one were invoked.

Problem is solved by adding the followings to low_power_demo.c

#ifdef CMSIS

  #define llwu_isr LLW_IRQHandler

  #define lptmr_isr LPTimer_IRQHandler

  #define porta_isr PORTA_IRQHandler

  #define portb_isr PORTB_IRQHandler

#endif


and modifying the following function headers

#ifdef CMSIS

void LLW_IRQHandler(void) {

#else

void llwu_isr(void){

#endif

#ifdef CMSIS

void LPTimer_IRQHandler(void) {

#else

void lptmr_isr(void){

#endif

#ifdef CMSIS

void PORTA_IRQHandler(void) {

#else

void PORTA_ISR(void){

#endif

#ifdef CMSIS

void PORTB_IRQHandler(void) {

#else

void PORTB_ISR(void){

#endif

Hope that could help...

0 Kudos