Hi,
I have a question about the LMIC MCCI library.
Before i send the atmega4809 to sleep i call os_queryTimeCriticalJobs(ms2osticks(1000)) but i don’t know how many ms it needs.
A value of 1000 works but i don’t really understand whats going on under the hood
if(!os_queryTimeCriticalJobs(ms2osticks(1000))){
Serial.println("Can go to sleep");
// return true if there are any jobs scheduled within time ticks from now.
// return false if any jobs scheduled are at least time ticks in the future.
The number you should provide is how long you plan to sleep for.
That means, when the ticks are counting only 9 seconds(Sensor readings, TX RX1 RX2)then the Main Clock and CPU is stopped for 30 minutes, i enter anyway the whole 30 minutes time
I did it that way and for the last couple of hours it works
17:51:09.920 -> os time in seconds: 713
17:51:09.920 -> Waking up and schedule sensor readings
17:51:12.044 -> 44748952: EV_TXSTART
17:51:12.091 -> Packet queued
17:51:18.138 -> 45129099: EV_TXCOMPLETE (includes waiting for RXwindows)
17:56:38.998 -> os time in seconds: 722
17:56:39.045 -> Waking up and schedule sensor readings
17:56:41.166 -> 45266989: EV_TXSTART
17:56:41.166 -> Packet queued
17:56:47.253 -> 45647259: EV_TXCOMPLETE (includes waiting for RXwindows)