Open andrekir opened 9 months ago
If I understand it, this would mean converting our entire codebase away from using the Arduino threads concurrency library, to using full RTOS, which is very involved.
got it, thanks. so the FreeRTOS method is not viable.
right now we're only using low-level NRF_POWER->SYSTEMOFF = 1;
for deep sleep and it's not using the msecToWake
parameter (ie. to wake up after N seconds).
the other examples I found require an RTC to generate an interrupt and not sure our RTC lib supports that.
Would we do nearly as well, to just power everything down, like the lora chip, GPS, BLE, and LEDs, and then do a long delay() call?
that's a great idea. perhaps we can get into sub-mA power draw using these NRF power states:
sd_power_mode_set(NRF_POWER_MODE_LOWPWR) // low power
delay(secToWake)
sd_power_mode_set(NRF_POWER_MODE_CONSTLAT) // default
~also, this might need to go into NRF52 Light Sleep logic (for TRACKERs and SENSORs).~
for simplicity sake, going for RTC awake on this request, then open a separate one for low-power states for TRACKER/SENSOR roles.
current RTC libs: PCF8563 & Melopero_RV-3028.
PCF8563 example: https://github.com/Xinyuan-LilyGO/T-Echo/blob/main/examples/Sleep/Sleep.ino
Platform
NRF52
Description
right now we're only using low-level
sd_power_system_off()
for deep sleep and it's not using the msecToWake parameter (ie. to wake up after N seconds).RAK suggests ~using FreeRTOS~
if this is something that could be implemented it would allow, for example, SENSORS running for very long periods (months?) without a charge.