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


Atmel Studio Serial Monitor


Atmel Hardware Error Output

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…