Low power switching K64

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

Low power switching K64

1,056 Views
pietrodicastri
Senior Contributor II

Good morning

I have the FRDM k64 board. I am playing with the power mode switching.

The CPU is running the BLPI at 1 MHz.

I have the interrupt of the PORTC installed.

I have also the interrupt of the LLW interrupt handler which toggles the red led.

When I toggle between the wait and stop, the interrupt is serviced repeadetly at every pressure of

the button. I see the blu led toggling as in the loop, the green lines.

When I enter the lls mode, the LLW isr is serviced, but the execution is lost.

The last red lines should produce two toggles of the blue and red led.

I see the LLW interrupt serviced but the execution dies.

According to the manual I should see the execution continuing. No reset flow with the lls mode.

Here is the code.

 

 

POWER_SYS_SetMode( epower_mode_wait, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_stop, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_wait, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_stop, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_wait, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_stop, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_lls, kPowerManagerPolicyAgreement );

leds_blue_toggle();

POWER_SYS_SetMode( epower_mode_lls, kPowerManagerPolicyAgreement );

leds_blue_toggle();


Thank You


Pietro


Labels (1)
Tags (3)
8 Replies

632 Views
pietrodicastri
Senior Contributor II

Hi Yasuhiko

I have solved the problem. Of course I find other issues always

but for other threads.

Thank for support

Pietro

0 Kudos

632 Views
pietrodicastri
Senior Contributor II

Hei

I have found the problem.

The thread

ARM Cortex-M4 K60N512 - Hard Fault

is illuminating.

In the interrupt of LLW I quest the RTC as in demos low power example.

But I don t enable the RTC. so Hard Fault..

Thank You.

Best Regards

0 Kudos

632 Views
yasuhikokoumoto
Senior Contributor I

Hi Pietro,

could you solve the hard fault problem?

SIM_SCGC6 = SIM_SCGC6_RTC_MASK;

RTC_CR |= RTC_CR_OSCE_MASK;

These sequences will enable RTC. Did you already try them?

I'm sorry they might not be the KSDK descriptions.

By enabling the RTC, was your issue solved?

Best regards,

Yasuhiko Koumoto.

632 Views
pietrodicastri
Senior Contributor II

Hei

I have now detected the HardFault_Handler().. The exit from lls is giving this continouous exception..

Suggestions????

0 Kudos

632 Views
pietrodicastri
Senior Contributor II

Ok now I found the way.

Here is the driver for the wake up

Thank You for the support.

Let me know.

Pietro

0 Kudos

632 Views
pietrodicastri
Senior Contributor II

Hei Yasuhiko

I would like to attach the source code, but I don't find a way.

Maybe I need a suggestion for using this chat.

I think there should be a way to change the perspective.


Thank You

Pietro

0 Kudos

632 Views
pietrodicastri
Senior Contributor II

Hei Yasuhiko

All of the action are in place.

I wander if an unhandled interrupt is killing the execution.

I have not debug while in lls so I cannot see.

Have You a suggestion which unhandled interrupt could be continuously fired ?

Thank You

Best Regards

0 Kudos

632 Views
yasuhikokoumoto
Senior Contributor I

Hi Pietro,

did you enable the CPU interrupt (i.e. cspie i)? Also did you the NVIC interrupt (i.e. enable_irq(LLWU_irq_no))?

Did you set LLWU_PEx registers properly?

Best regards,

Yasuhiko Koumoto.