Hi at all,
First of all my facts:
I'm using CW V.1.5 (without PEX), to program a MK20DX128 (50MHz)
Now my Problem:
I develop a battery powered device which runs a lot of time but only works
a few minutes per day. So I would like to force the device into a wait or
sleep mode. The problem is that I need the UART receive interrupt
to wake up the device. I do all my calculations in interrupts, so my main loop
is empty.
At the moment I try to force the device into wait mode immediately
when I arrive the main loop.
{
| | SCB_SCR &= ~SCB_SCR_SLEEPDEEP_MASK; |
| | asm("WFI"); |
}
How can I check if the device is in wait mode? Is there a special register?
Is there another sleep register which fits to my problem?
Thanks a lot!
Pascal