Power management, sleep and wifi issue

sempek34
Posts: 6
Joined: Wed May 29, 2024 8:32 am

Power management, sleep and wifi issue

Postby sempek34 » Thu Jun 20, 2024 12:30 pm

To start with here is the log I have received from task wifi:

  1. I (87124243) wifi:state: run -> init (ea0)
  2. I (87124273) wifi:pm stop, total sleep time: 0 us / 87122327391 us
  3.  
  4. I (87124363) wifi:<ba-del>idx:0, tid:0
  5. I (87124373) wifi:new:<2,0>, old:<2,1>, ap:<255,255>, sta:<2,1>, prof:1

This is the latest recorded log my esp32 printed. There has been an event that triggered this logs by task wifi. To this event might be a disconnect in wifi or something else and at this point, that is not my question. As the log states at line2, "pm stop", when I looked it up, I found it translates as "Power Management Stop". With a quick look to my sdkconfig, the configuration CONFIG_PM_ENABLE is not set. My question is, without using power management how so it is possible it puts my esp to sleep mode?

My goal is to keep this esp running non-stop, without any sleeps or power saving features since my board is connected to a direct power supply and has no issues as power shortage.

I have even tried to include esp_sleep.h to my project and used esp_sleep_enable_timer_wakeup(1000) in order to use RTC to wake up but it did not work. My device goes to sleep and never comes back.

The other lines of the log does not offer much to me neither.

===============

About my system:

Using esp32 based custom board

idf version 5.2.1

Using WiFi with esp_wifi_set_mode(WIFI_MODE_STA)and esp_wifi_set_ps(WIFI_PS_NONE)

===============

About my project:

My project connects to an ip port with tcp socket and uses send/recv functions continuously. If there is an errno occurance during the send/recv procedure, I have a routine to close the socket and open another one and so on.

===============

sempek34
Posts: 6
Joined: Wed May 29, 2024 8:32 am

Re: Power management, sleep and wifi issue

Postby sempek34 » Thu Jun 20, 2024 12:33 pm

I have same project working with Ethernet this time and after some amount of time my device ceases to work.

It seems like it is going to sleep but I have no logs printed this time.

I am still working on my goal stated on my first post above.

Who is online

Users browsing this forum: No registered users and 10 guests