Open chenlijun99 opened 3 months ago
@chenlijun99 perhaps you can use esp_pm_dump_locks to dump the pm lock runtime info. which will help you see the lock holder information.
I already did that and I didn't see any active pm lock that forbids entering into light sleep mode.
I already did that and I didn't see any active pm lock that forbids entering into light sleep mode.
can you provide your example code for me?
I found the same issue while trying to enter automatic light sleep with Wifi and BLE with an ESP32C6.. here are some more scenarios:
Enable WIFI Only
Disable WIFI
Automatic light sleep enters successfully
Enable BLE Only and start advertising
Disable BLE advertising
Automatic light sleep enters successfully
Enable BLE and Wifi. Start advertising on BLE
Disable BLE advertising
Disable Wifi
Automatic sleep mode is not entered. The timer referenced from above is still running..
I'm not getting great information using esp_pm_dump_locks - the fact that I'm shutting down the serial port to goto sleep is interfering with getting the info you need. Can someone point me in a direction to better debug this? Definitely an issue with the esp_coex
module..
I'm not sure if this helps, but I was able to call the esp_timer_dump with profiling enabled and can see this.. fairly certain this is the timer that is running:
Answers checklist.
IDF version.
v5.3
Espressif SoC revision.
ESP32-S3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.1
Power Supply used.
USB
What is the expected behavior?
After I call the appropriate functions to disable wifi and BLE (as described in https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/sleep_modes.html#wi-fi-bluetooth-and-sleep-modes) and block all my tasks, the MCU should enter in light sleep mode.
What is the actual behavior?
It doesn't enter in light sleep mode.
Steps to reproduce.
Debug Logs.
Actual relevant part of the logs. In short, when coexistence is enabled, even if I stop wifi and BLE, there is still a
esp_timer
from the coexistence module that is running, preventing automatic light sleep mode from working. The log has been printed using the functionesp_timer_dump
.I've used
gdb
to watch the address0x3fcc1c64
and confirmed that it is a timer managed by theesp_coex
module.More Information.
No response