A superhet receiver won't invent signal to the same degree but you still have the problem of power drawn by the receiver itself. Radio links that don't have one end mains powered typically need careful efforts to establish a schedule of check-in appointments and suffer a latency in that a message may not be able to be sent until the next scheduled ...
Regarding the latter, how can the CPU enter sleep mode and keep the OS running? I am open to any suggestions.
You use co-processors.
Phones are doing this for years now. They have one or more big ARM Cortex-A cores for the *unix based operating system. And one or more smaller ARM Cortex-M like processors for the background stuff.
Like counting your steps ...
The MQTT protocol sits on top of a long-lived TCP/IP connection. There is next to no chance that a cellular modem would maintain a TCP/IP connection while in sleep mode. So you won't wake up from a subscription firing.
It's not impossible that once you wake up for some other reason and reconnect, depending on the configuration of the MQTT broker, that you ...
The top image is when using an external clock source and does not include any current used by that external clock source
The bottom image is when using the internal RC clock source at 1MHz, using that circuitry draws some power,
If your using the internal clock source, you would be using the bottom graph.
Found the problem!
What was actually happening was that my stack is stored in SRAM3 (the highest address). Due to some terrible default setting choices by ST, SRAM3 by default is not preserved in STOP2 mode, but SRAM1 and SRAM2 are.
RM0432 Rev 6 , 5.3 Low-power modes:
• Stop 0, Stop 1 and Stop 2 modes: SRAM1, SRAM2, SRAM3 and all
registers content ...
This is a trivial software problem. You keep "time to next wake-up" per each sensor. On every wake-up you subtract elapsed time from every value, measure sensors that reached zero (and re-initialize their counters with corresponding sampling periods) and at the same time find the smallest value of the rest. Setup your timer to wake-up after this smallest ...
Have you enabled the Clock for the Power Module?
It is kind of confusing that you have to enable something to reduce the power consumption.
Deactivating all clocks of unused Peripherals will also lead to a major power reduction.
We also measure higher current consumption while the controller is still connected to a debugger.
It seems that the lib has evolved from @anrieff's answer at Mar.25.
I have implemented this function rather using the RTC APIs of ESP32.
Of course this functionality is still intended for low power usages, so I'm using a MOSFET & ESP32 to control another power source.
The official examples are quite useful: https://github.com/espressif/esp-iot-solution/...
Old thread but actual topic...Sleep mode 1 is made to enter and leave the sleep mode using the DTR pin.
You can use it in this way:
DTR is LOW
PREPARE the module with +CSCLK=1 ("AT+CSCLK=1\r")
DTR goes HIGH -> SLEEP
DTR goes LOW -> WAKE UP
To save more power +CFUN=0 before SLEEP and +CFUN=1 after WAKE UP.