arduino-lmic icon indicating copy to clipboard operation
arduino-lmic copied to clipboard

Sleeping with interrupts disabled?

Open Miceuz opened this issue 2 years ago • 5 comments

I am using LMIC on nRF52 platform. I have successfully ported hal.cpp and now I want to switch to using interrupts. Mainly I want to sleep while waiting for RX as that's the majority of time the library spends busy-waiting. I have started by looking around the code base and noticed this place:

https://github.com/mcci-catena/arduino-lmic/blob/8d378ea410887d3fb08ea2c9acce95cc4c047788/src/lmic/oslmic.c#L153

System is being put to sleep with interrupts disabled. If so, how will it wake-up from the sleep? Isn't this a bug?

Miceuz avatar Feb 05 '22 09:02 Miceuz