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
Hi Yasuhiko
I have solved the problem. Of course I find other issues always
but for other threads.
Thank for support
Pietro
Hei
I have found the problem.
The thread
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
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.
Hei
I have now detected the HardFault_Handler().. The exit from lls is giving this continouous exception..
Suggestions????
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
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
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.