ESP32: Brownout detector was triggered

For general Flowcode discussion that does not belong in the other sections.
Post Reply
MJU20
Posts: 337
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

ESP32: Brownout detector was triggered

Post 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!

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: ESP32: Brownout detector was triggered

Post by BenR »

Hello,

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

MJU20
Posts: 337
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

Re: ESP32: Brownout detector was triggered

Post 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!

LeighM
Valued Contributor
Posts: 447
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 81 times
Been thanked: 243 times

Re: ESP32: Brownout detector was triggered

Post 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

Post Reply