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