Guru Meditation Error in an empty ESP32-S3 Code

PepitoGrillo
Posts: 4
Joined: Thu Jul 25, 2024 8:03 pm

Guru Meditation Error in an empty ESP32-S3 Code

Postby PepitoGrillo » Mon Jan 27, 2025 9:58 am

Hello,

I am trying to upload a code to an ESP32-S3, placed in a custom board. Problem is that I can't upload ANY code (even if it is only a BareMinimum example). If I try uploading the code, I get the following errors (they keep changing from one to another):

Code: Select all

A fatal error occurred: Guru Meditation Error detected (IllegalInstruction)

A fatal error occurred: Guru Meditation Error detected (LoadProhibited)

A fatal error occurred: Guru Meditation Error detected (StoreProhibited)

A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
Here the schematics:
image.png
image.png (70.51 KiB) Viewed 3228 times
As can be seen, the uC is a ESP32-S3FH4R2. I am planning to use its internal flash to upload the code. All the GPIOs labeled as OUTPUT go to a MOSFET with a pull-up.

And these are the params I use to upload any code:
image (1).png
image (1).png (13.49 KiB) Viewed 3228 times
When I first plugged the board to my PC, the serial monitor looked something like this (Always happens with the ESP32 I get on my boards):

Code: Select all

invalid header: 0xffffffff
invalid header: 0xffffffff
...
invalid header: 0xffffffff
invalid header: 0xffffffff
But now, after trying to upload the code, I get this:

Code: Select all

00:35:06.566 -> ESP-ROM:esp32s3-20210327
00:35:06.566 -> Build:Mar 27 2021
00:35:06.566 -> rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
00:35:06.566 -> Saved PC:0x403cdad1
00:35:06.566 -> SPIWP:0xee
00:35:06.566 -> mode:DIO, clock div:1
00:35:06.566 -> load:0x3fce3818,len:0x508
00:35:06.566 -> load:0x403c9700,len:0x4
00:35:06.566 -> load:0x403c9704,len:0xad0
00:35:06.566 -> load:0x403cc700,len:0x29e4
00:35:06.566 -> entry 0x403c9880
It gets printing this over and over.

Any thoughts on where the problem could be?

Thank you very very much!

ESP_Sprite
Posts: 9985
Joined: Thu Nov 26, 2015 4:08 am

Re: Guru Meditation Error in an empty ESP32-S3 Code

Postby ESP_Sprite » Mon Jan 27, 2025 1:45 pm

What's your power supply status? If any you're playing very hard and fast with the decoupling as given by the datasheet, depending on the impedance and the rest of your PSU, sprinkling a few 100nFs around may not be enough.

lbernstone
Posts: 916
Joined: Mon Jul 22, 2019 3:20 pm

Re: Guru Meditation Error in an empty ESP32-S3 Code

Postby lbernstone » Mon Jan 27, 2025 5:06 pm

Second on SpriteTM's comment.
If you aren't 100% certain of what all the capacitors and inductors are for, you should follow the reference design

PepitoGrillo
Posts: 4
Joined: Thu Jul 25, 2024 8:03 pm

Re: Guru Meditation Error in an empty ESP32-S3 Code

Postby PepitoGrillo » Tue Jan 28, 2025 4:41 pm

Thanks for your reply!

As far as I could check, power supply seems Ok. Don't have an oscilloscope to check, but multimeter is not detecting any voltage drop when I try to upload the script. Voltage remains the same at 3,35V.

Also tried to power the PCB with an external power supply. Using a big power supply doesn't change its behaviour, nor changing the voltage around to 3,4V.

I will try to get an oscilloscope anyways so I can double check.

Meanwhile, you guys have any other idea of what the problem could be?

Thanks

ESP_Sprite
Posts: 9985
Joined: Thu Nov 26, 2015 4:08 am

Re: Guru Meditation Error in an empty ESP32-S3 Code

Postby ESP_Sprite » Wed Jan 29, 2025 5:47 am

PepitoGrillo wrote:
Tue Jan 28, 2025 4:41 pm
As far as I could check, power supply seems Ok. Don't have an oscilloscope to check, but multimeter is not detecting any voltage drop when I try to upload the script. Voltage remains the same at 3,35V.
That is to be expected; those glitches are likely very close to a few CPU cycles and as such a few microseconds wide. Your multimeter isn't gonna catch that.
Also tried to power the PCB with an external power supply. Using a big power supply doesn't change its behaviour, nor changing the voltage around to 3,4V.
Also to be expected. That external power supply is likely pretty far away (as in: at least more than a few centimeter) away; the inductance of the leads stops it from acting quickly when a fast power glitch occurs.
I will try to get an oscilloscope anyways so I can double check.
Don't bother. Chances are you are going to find the glitches, chances are that they're too small for whatever scope you obtain. Whip out the soldering iron instead, grab some 'big' capacitors (1uF, 10uF, whatever you have) and put them right next to the 100nF caps you have right now. Sprinkle a few more in close to the +3v3/GND of the ESP32 chip if you can; scrape some of the solder mask off the power/gnd traces if you have to. If the issue is decoupling, your problems will go away.

(Also, wow, you're taking quite the risk, deviating from the hardware reference guide and datasheet without even the correct tools to find any issues that may lead to... As someone who made dozens of PCBs with ESP32 chips on them, I'd suggest taking a lot more care on your next PCB design, otherwise you may be looking at hours of fruitless debugging.)

Who is online

Users browsing this forum: No registered users and 73 guests