Page 1 of 1

[ESP32-C2][Help]Why WiFi PM sleep time count does not show actually time

Posted: Mon Oct 14, 2024 2:32 am
by Dennie
Env:esp32-c2
Idf version:5.2.1

Description:
my device was working with [auto light sleep mode] + [WiFi Maximum modem power saving mode]. The debug print is "wifi:pm start, type: 2" when device is connected to AP, and it shows like "wifi:pm stop, total sleep time: lu us / lu us" when device is disconnected from AP.

Problem:
I wanna "lu us / lu us" to display the real time such as 156445 us / 2178948 us(I see that some post uploaders print like this). How to deal with it? Is it because WiFi hasn't actually entered power saving mode?
:shock:

Re: [ESP32-C2][Help]Why WiFi PM sleep time count does not show actually time

Posted: Mon Oct 14, 2024 3:11 am
by ESP_Sprite
Might be that in menuconfig, you should disable Component config → Newlib → Enable 'nano' formatting options for printf/scanf family.

Re: [ESP32-C2][Help]Why WiFi PM sleep time count does not show actually time

Posted: Mon Oct 14, 2024 3:45 am
by Dennie
Thanks! Problem solved! :lol: