I am using an MKL24Z64VLH4 with KDS 3.1.0.
I have a simple routine which I am trying to debug:
1) Go to sleep.
2) Use LPTMR0 to wake me up.
while (1) {
AS1_BlockSent = 0; | |
LDD_TError sendError = AS1_SendBlock(AS1_DeviceData,"Sleeping\r\n",10); | |
while (AS1_BlockSent == 0) { } | |
// Now go to sleep. | |
Cpu_SetClockConfiguration(1); | |
Cpu_SetOperationMode(DOM_STOP,NULL,NULL); |
// | |
// TU2 is programmed... so why don't I wake up? | |
// | |
Cpu_SetClockConfiguration(0); |
}
I have TU2 programmed as LPTMR0 with the interrupt enabled.
And it's set to Auto-init. I also have the LLWU interrupt enabled in the CPU configuration
I've also tried ensuring I use the BLPI Clock (I have two clock configs- one is for low power mode, the other for normal operation).
I also considered the possibility that I was waking up but just not seeing my message because of the change in clock configurations messing with the baud rate, but if I remove the DOM_STOP instruction the Serial port is fine.
Thoughts on what I may be doing wrong? I can supply a sample project if necessary.
Thanks,
Roger
Roger
The LPTMR only operates when clocked by a source that also runs in the low power mode - check that it is not configured to run from one that is stopped in the mode that you use.
Regards
Mark
Hi Roger,
Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.
I was wondering if you can sharing the demo, then I can debug with the FRDM-KL26 on my site.
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------