Continue to Site

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.

  • 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

Status
Not open for further replies.

Wp100

Well-Known Member
Hi,

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
ledcAttachPin(15,1);


3 Pics below -

Adruino IDE
000139.jpg


Atmel Studio Serial Monitor
000142.jpg


Atmel Hardware Error Output

000141.jpg
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top