ESP32-S3 freezing at some locations - PWM still working

andrepoa80
Posts: 3
Joined: Tue Aug 26, 2025 1:35 pm

ESP32-S3 freezing at some locations - PWM still working

Postby andrepoa80 » Tue Aug 26, 2025 2:16 pm

I produce an equipment with a PWM motor controller, an optical sensor, LCD and INA219. It uses WiFi for update and Bluetooth for two optional sensors.
At my lab all devices work fine, but in some places, they just freeze at a random time after motor is started. No logs, no panic, no restart. Just move to other place and all work fine.

It could be WiFi related, but in places the equipment freezes I tried turn off Wifi and Bluetooth and not solved. Checked voltages at chip input, use resistor at GPIO0, capacitor decoupling in next to ESP and devices, bigger cap in 3v3 line, etc. All current parameters are ok, nothing too hot. I put a CPU monitor running and nothing above 10% in both cores, free heap around 100k with no memory leak.

I'm going crazy with this because is not wifi signal related or code related, it just completes freeze BUT motor PWM still working!! LCD just stop and the button won't work to stop motor. Inside the code I have a task reading the sensor and stopping the motor PWM, it freezes too.

The same equipment, with same power adapter, working exactly equal in other location won't freeze.
Right now, I have near a hundred units made, same PCB, same components and just a few have this issue. Update different versions of code don't change the behavior.

It sounds like hardware defective, but the fact is location related is too strange.
The code has an NDA but I can share hardware config and setups if it helps, but I'm almost sure is hardware related and really appreciate any advice.

Sprite
Espressif staff
Espressif staff
Posts: 10596
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3 freezing at some locations - PWM still working

Postby Sprite » Wed Aug 27, 2025 1:49 am

That is very odd indeed. Do you have the watchdogs (interrupt and task) enabled? Are you doing anything with light/deep sleep modes?

andrepoa80
Posts: 3
Joined: Tue Aug 26, 2025 1:35 pm

Re: ESP32-S3 freezing at some locations - PWM still working

Postby andrepoa80 » Thu Aug 28, 2025 7:49 pm

That is very odd indeed. Do you have the watchdogs (interrupt and task) enabled? Are you doing anything with light/deep sleep modes?
Do not use deep any sleep mode. I turned watchdog in tasks and system restart, but I can't capture any logs because it never happens in my lab.
I have two tasks: 1- read INA219 for motor overload 2- read optic sensor and stop motor
I2C is set to 100khz, 10k pullup. SPI is set to 10MHz and display have a very restrict use of bus
IDF 5.3.4 / arduino-esp32 3.1.3

I have other hardware with same ESP32-S3, display, libs. The main difference is the PWM motor and the fact issue only happens in some places.

Using oscilloscope, I can't find EMI in SDA, SCK, 3v3... 100nF near INA219 and tb6612fng, 100nF in motor poles, 1nF and 10nF near ESP32 3v3...

Can't find a way to redirect all logs to OTG USB. I have this port accessible to user connect a device but didn't a way to route panic debug to it.

Who is online

Users browsing this forum: Baidu [Spider], PerplexityBot, PetalBot and 4 guests