Page 1 of 1
Glitch on Several Pins
Posted: Tue Feb 22, 2022 2:20 am
by brent.yiu
I have a custom design using the ESP32-D0WD-V3 and am seeing a weird glitch on several I/O pins. It is causing me to not be able to flash the ESP32.
Here is a picture of the glitch that I am seeing.
- 9BE33D78-665C-46F8-A9CA-C7A2925F9920.JPG (6.5 MiB) Viewed 5577 times
Yellow Trace = VDD for Flash Chip (VDD_SDIO)
Green Trace = SPI Clock
Blue Trace = SPI MOSI
Red Trace = SPI MISO
The SPI MOSI trace shows a the glitch and then you can see the CLK and MISO lines immediately go high. This causes the SPI bus to not work and I am not able to flash the ESP32.
I have tried connecting the ESP32 directly to a 3.3V DC power supply with a current limit of 1A and I am still seeing this glitch so I don't think it's a problem with the power rails. I also think I have the correct decoupling capacitors for the power pins as shown in the picture below.
- Screen Shot 2022-02-21 at 18.16.48.png (120.65 KiB) Viewed 5577 times
For the SPI Flash I am using a Winbond W25Q80DVSNIG and have 10K pullup resistors for the CS, HD, and WP pins of the flash as shown in the picture below.
- Screen Shot 2022-02-21 at 18.16.57.png (65.14 KiB) Viewed 5577 times
Please help! I've been racking my brain for a week trying to figure out what is going on with this glitch.
Re: Glitch on Several Pins
Posted: Tue Feb 22, 2022 4:07 pm
by brent.yiu
I think I figured out that it is now due to the Watchdog reset occurring continuously. Here's a serial print of the resets happening.
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
It continues on like this forever. Is there any way to disable the RTCWDT_RTC_RESET?
Re: Glitch on Several Pins
Posted: Wed Feb 23, 2022 1:19 am
by ESP_Sprite
That's the ESP trying to boot from the flash and failing (presumably because it's empty?); getting rid of the WDT isn't going to help you there.
How specifically are you flashing your board, and in what way does it fail?
Re: Glitch on Several Pins
Posted: Thu May 12, 2022 9:36 am
by venon83
I am solving exactly the same problem on a board where I have SoC ESP32 d3. I assume that after delivery from the vendor, there is a pre-burned bootloader in the processor to load the oem_firmware. However, after turning on the terminal I see the same output as in the previous post.
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM10 instead...
--- idf_monitor on \\.\COM10 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
Re: Glitch on Several Pins
Posted: Thu May 12, 2022 1:23 pm
by ESP_Sprite
venon83 wrote: ↑Thu May 12, 2022 9:36 am
I assume that after delivery from the vendor, there is a pre-burned bootloader in the processor to load the oem_firmware.
Is there a reason your assumption could be wrong? This is what I'd expect given an entirely empty flash.
Re: Glitch on Several Pins
Posted: Fri May 13, 2022 8:07 am
by venon83
I used to think that the bootloader is in the non-erasable part of the memory and it is possible to load the oem program via UART. However, if I am wrong , would that mean that I am unable to do anything without JTAG?
Re: Glitch on Several Pins
Posted: Fri May 13, 2022 1:33 pm
by ESP_Sprite
Ah, okay, your 'pre-burned' wording put me on the wrong footing: there is indeed a bootloader in the ESP32, but it's not 'burned' in any way, it's included in the on-die ROM that is 'baked' into the chip; it's not flashable/burnable.
And you're actually looking at that bootloader, that is what's giving you the error, and it's complaining about empty flash. If you try to flash a program to it (and the serial port logic on your board has the correct conversion logic between DSR/DTR and IO0/EN), it should just work.