gdb, openocd & light sleep

crashdox
Posts: 5
Joined: Wed Sep 05, 2018 3:58 pm

gdb, openocd & light sleep

Postby crashdox » Thu Sep 27, 2018 11:42 am

1) Are there any tricks to configuring & using gdb & openocd with code that uses light_sleep or deep_sleep ? My initial forays into this area seem to show the debugger pretty much 'kicked off' the processor
2) Are there any internal stats that can be dumped to show that light/deep sleep was entered successfully, and time spent there ?

thanks

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: gdb, openocd & light sleep

Postby ESP_igrr » Thu Sep 27, 2018 2:43 pm

Your observation is correct, when the CPU is clock gated (in light sleep) or powered down (in deep sleep), OpenOCD sees that as CPU being lost... We might be able to do something about light sleep, I think. Please open an issue in openocd-esp32 repository if this is important for you, so that we can track this request.

Regarding light sleep stats, I assume you are talking about automatic light sleep. Yes, there is an sdkconfig option to enable profiling of power management locks. If you enable it, you can call esp_pm_dump_locks function to see time spent in different power states.
https://docs.espressif.com/projects/esp ... ocksP4FILE

Who is online

Users browsing this forum: Majestic-12 [Bot] and 82 guests