LoRa module wakeup after ESP32 deep sleep

Hi all,
I have Heltec WiFi LoRa V3, and once I am putting the ESP32-S3 into deep sleep, I canot send LoRa on wake up (even when the SX1262 is in warm boot sleep mode).
Does the power cut to the LoRa chip once the ESP32 is enterring into deep sleep? If so, I should initialize the SPI and the module itself before sending after wakeup.

Thanks

how do you enter deep sleep? e.g.
LoRaWAN.sleep(loraWanClass);

see https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/examples/LoRaWAN/LoRaWan/LoRaWan.ino

I am writing 0x01 to SetSleep register (0x84)

To get deep sleep on ESP32-S3 I am using esp_deep_sleep_start(); (esp-idf)

I see now it should be 0x04 , testing this. sorry if I am wrong :confused:

The ESP32 loses everything in deepsleep besides the contents of the RTC RAM. So, yes of course you must re-initialize SPI and all pins. The power to the radio is not cut (try keeping NSS low and you’ll see that the radio consumes 1.7mA during deepsleep), so you won’t need to re-init the radio.

1 Like

Oh, I got it, the LoRa is keeps the power, but the SPI on the ESP is cleared… make sense @bns
Thank you for the clarification!

I’d strongly recommend using higher level functions - this has potential for the unexpected.

Oh, wait, it already has! :wink:

There’s no real point using deep sleep if you don’t sleep the radio to get the maximum benefit - 1.7mA is a heck of a lot in battery terms - you have so much to initialise anyway as for most code bases it’s all in the setup().

Agree, it was also for learning purposes regarding low-level handling.
Thank you!