Page 1 of 1

ESP32: Brownout detector was triggered

Posted: Sun Mar 06, 2022 5:32 pm
by MJU20
Hey there,

After my watchdog timer problems ( https://flowcode.co.uk/forums/viewtopic.php?f=3&t=791 ), now the brownout detector gets triggered :-(

Here => https://iotespresso.com/how-to-disable- ... n-arduino/ the possible reason is revealed, but in my case I know that the power supply is sufficient. It must be something with the cables.

But I don't have time right now to search for other hardware to get the power supply like the ESP wants.

So I was thinking of disabling the Brown out detection during testing.
The code to do so is on the website mentioned above.

Code: Select all

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

Code: Select all

void setup() {
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable   detector
  //Your code
}
I really hoped that with Flowcode I didn't need to use code anymore.

How do I implement this code in FC?
Thanks!

Re: ESP32: Brownout detector was triggered

Posted: Wed Mar 09, 2022 1:43 pm
by BenR
Hello,

I made a suggestion here for fixing this regarding the sdkconfig file.
viewtopic.php?p=6050#p6050

Re: ESP32: Brownout detector was triggered

Posted: Wed Mar 09, 2022 5:29 pm
by MJU20
BenR wrote:
Wed Mar 09, 2022 1:43 pm
Hello,

I made a suggestion here for fixing this regarding the sdkconfig file.
viewtopic.php?p=6050#p6050
Hey BenR, I've been testing this workaround by editing the sdkconfig, but could it be possible that this file gets overwritten when compiling?
Changed the setting for the brownout by adding a # before it, save and compile.

After a while (compile a few times) the # seemed to be removed?
I've changed the

Code: Select all

CONFIG_ESP32_BROWNOUT_DET=y
Into

Code: Select all

CONFIG_ESP32_BROWNOUT_DET=n
And now the brownout doesn't seem to bother me anymore.
I don't know if this is the way this works or there are errors while compiling.
Either way the brownout's don't seem to appear.

Thank you!

Re: ESP32: Brownout detector was triggered

Posted: Wed Mar 09, 2022 6:16 pm
by LeighM
Hi,
Glad to hear you now have it working.

Just to explain the changes you experienced.
The build process is rather particular about the settings in the sdkconfig file and will overwrite settings it doesn't like (or not valid) with default values.

The best way to change settings in the sdkconfig file is to use the idf.py tool. That will ensure they are valid.

This post explains how to use it ...
viewtopic.php?p=5280#p5280

Hope that helps