• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ESP32 / Arduino Code Error


Well-Known Member

Thought this might be of help / interest to other novice ESP32 C++ code writers.

Opened up an old project code, should have been ok, but when running it on its test board, it kept rebooting after a few seconds ?

The Arduino IDE showed no compile error, but when we opened the Serial Monitor it showed it was doing a SW CPU RESET - though that instruction, ESP.restart(); is not in our code ?
Seemed no obvious way to locate the error, other than a long time working though the 2,000 lines of code or looking at / trying to find an Assembly listing for those code numbers shown at the end of the Serial Monitor listing Entry 0x400806ac ?

Tried running it on Atmel Studio , again no compile errors but still Resetting.
However on Studios Serial Monitor there is this little ' ! ' icon which clicked, brought up a new Output window , this time with Error codes.

The fault was traced to this line of code being commented out in error, but still not sure why a compile error was not given ?

// pwm , channel, freq, resolution
// ledcSetup(1,1000,8);

// led pin , pwm channel

3 Pics below -

Adruino IDE

Atmel Studio Serial Monitor

Atmel Hardware Error Output


Latest threads

EE World Online Articles