Help needed! WIFI Power is MAX on first WIFI STA following Power On Reset
Posted: Thu Apr 29, 2021 6:31 pm
Thank you for looking, have unusual behavior for Power Up Reset (POR) Wifi Power.
I have set the WiFi power to 5 Db in MenuConfig.
I have Brownout Detector enabled.
After flashing the device, (POR), the first Wifi Start seems to be at max power and regularly trips the Brownout Detector.
If the Brownout (BO) detector does not trip, the first Wifi Start connects and disconnects normally. Once this first Wifi Start has executed, then the next Wifi Start draws much less power and there is never a BO event.
If the BO detector does trip on the first Wifi Start following powerup, then it is a cycle which never ends.
I have a BO reset, and on the next Wifi Start, it trips again. This repeats until a successful Wifi Start, then all subsequent Wifi Starts have low power.
In measurements:
Device Current (Wifi STA (1) following POR) is 250mA
Device Current (Wifi STA 2 - n) is 120mA
Is there a register which I can program before a Wifi Start that will set the initial Wifi STA to use the lower power setting?
I added to the code: esp_wifi_set_max_tx_power (); however it does not allow a call until after Wifi Start, which is too late.
Using esp_wifi_get_max_tx_power, following the successful Wifi Start, the return value is 5Db as expected.
Can someone recommend a method to force the first Wifi Start to use the lower power setting configured in Menuconfig?
Thank you for your review!
I have set the WiFi power to 5 Db in MenuConfig.
I have Brownout Detector enabled.
After flashing the device, (POR), the first Wifi Start seems to be at max power and regularly trips the Brownout Detector.
If the Brownout (BO) detector does not trip, the first Wifi Start connects and disconnects normally. Once this first Wifi Start has executed, then the next Wifi Start draws much less power and there is never a BO event.
If the BO detector does trip on the first Wifi Start following powerup, then it is a cycle which never ends.
I have a BO reset, and on the next Wifi Start, it trips again. This repeats until a successful Wifi Start, then all subsequent Wifi Starts have low power.
In measurements:
Device Current (Wifi STA (1) following POR) is 250mA
Device Current (Wifi STA 2 - n) is 120mA
Is there a register which I can program before a Wifi Start that will set the initial Wifi STA to use the lower power setting?
I added to the code: esp_wifi_set_max_tx_power (); however it does not allow a call until after Wifi Start, which is too late.
Using esp_wifi_get_max_tx_power, following the successful Wifi Start, the return value is 5Db as expected.
Can someone recommend a method to force the first Wifi Start to use the lower power setting configured in Menuconfig?
Thank you for your review!