i want to make use of CPU PM_MODE_WAIT.
According library documentation:
PM_MODE_WAIT to set the CPU in wait mode (CPU is shutdown but the system clocks are running and the full regulation is maintained)
but in pm.c
/* Wait LP is not supported, so... just wait */
In fact, the CPU continues to run. 'wait()' translates as 'asm(wait;)'.
So, documentation is wrong or the function is not properly implemented.
What I am trying to archive is, that the CPU wakes up every 250ms in order to read an SPI sensor.
Only if a certain condition is met, the radio has to wake up and transmit a message.
I activated the RTC periodic task, which calls void rtc_periodic_task(void) every 252ms.
But, while in PM_MODE_STOP_2 or 3, it takes approx a second until rtc_periodic_task(void) is called.
Another attempt was using a timer, but here the ISR is not called when sleeping, since the clocks are down.
So, what's the strategy to wake up cyclic with intervals < 1s?
Any idea is appreciated.