Wifi lora32 v2 BLE/WIFI restarting on battery

My project is using the WiFi/BLE feature of WiFi lora 32 v2 interchangeable.

The user can select which they prefer to use, save this setting on EEPROM and start either the WiFi/BLE service. Starting the service after changing the setting is working fine. But when it is connected to battery and I turn on the device, it keeps on restarting. The device is working properly when I am connected via USB power supply or via 5V pin.

I think it is related to the below issue.


My battery is TAC battery er34615. It is working fine when both WiFi and BLE is off and when either service was just started. But on very first turn on of device. It keeps on restarting.

I think it has something to do with lack of power but anyways, I need your help.

BTW, it is not an EEPROM issue.

The instantaneous current at startup is relatively large. Try to add a high-capacity electrolytic capacitor between 3.3V and ground.

1 Like

I was able to make it work by disabling the brownout detector at startup and enabling it again after 500 ms. On startup I added a 10 seconds delay for starting the BLE while on WIFI I added 30 seconds.

Will observe it now for stability. I will try though adding a capacitor to check.

#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"

  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector   
  // let things power up
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 1); //enable brownout detector

I think lowering the CPU frequency also help reduce the load on the battery.