Closed FrancescGiT closed 3 years ago
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.
Hardware:
Board: ESP32-WROOM-32U Core Installation version: 1.0.4 IDE name: VSCode + Platform.io Flash Frequency: 80Mhz PSRAM enabled: No Upload Speed: 921600 Computer OS: Windows 10
Description:
Hello community. I have been stuck in a problem for a long time and after an intensive search I have not come up with any solution.
I'm using the RadioHead RFM library and RH_RF69 library to enable communication between Atmega32u4 and ESP32. The situation is the following:
As node:
1- Atmega32u4 wakes up every 60 seconds and reads sensors data. 2- Atmega32u4 sends data over RFM69HCW and goes to sleep again.
As Gateway:
1- Esp32 is in deep sleep mode and the setup for RFM69HCW is done. 2- If data is received by RFM69, then ESP32 will wake up by DIO0 connected to GPIO27 pin from ESP32 and received data will be stored in ESP32.
In a simple RadioHead_RawDemo_RX and RadioHead_RawDemo_TX examples, without going to sleep, works properly.
When using energy saving mode, the frames are sent but not processed by ESP32 (server). Sometimes when I restart esp32 server i can see the first frame received (using a Logic Analyzer and Logi 2 - Saleae) but ESP32 never wake up again. But normally, if esp32 is not in an eternal sleep, the ESP32 wakes up caused from ext0 wakeup when I receive a message it wakes up but then the condition if(rf69.available ()) is always false and I am not able to read the message from the buffer.
Feather32u4 code:
ESP32 code:
The fact is that the wakeup_reason detects me that it has been produced by ESP_SLEEP_WAKEUP_EXT0, but rf69.available () (which in the loop did work) is now always false. It seems that while the ESP32 is waking up it is just when the module receives the frame and that is why it is lost. I have tried using low-level programming using the library functions to access the buffer directly using readFifo()... but without success.
Also trying to read and write RFM69HCW registers without being victorious.
I would appreciate if someone, who understands or something similar has happened, could give me a hand.
Thanks.