ESP-32 unstable booting

taronghlijyan
Posts: 3
Joined: Thu Jul 07, 2022 8:48 pm

ESP-32 unstable booting

Postby taronghlijyan » Thu Jul 07, 2022 9:04 pm

Hello,

I have a problem with my custom ESP32 PCB. It's a keyboard PCB and I'm trying to set it up (schematics is attached). It has 5 main parts - li-ion charging circuit, 3.7V to 5V circuit (for LEDs), 3.3V stabilizer with ESP32 (+LEDs and switch matrix)
.
The problem is that whenever I turn on the board (by connecting type-c cable) ESP32 does not start (I used blink sketch to verify). But as soon as I use both on-board type-c and USB-TTL adapter it starts. After it does so, it works fine even if I am disconnecting the USB-TTL device. ESP runs until I reset it through EN pin, after which it stops booting again.

I suppose that my power circuitry is not very good and creates initial voltage spikes, thus causing such a behavior, however I might be wrong.

Can anybody help to figure out what's the issue?

Regards,
Taron
Attachments
Schematic_shortcut-master_2022-07-06.pdf
(530.8 KiB) Downloaded 231 times

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

Re: ESP-32 unstable booting

Postby ESP_Sprite » Fri Jul 08, 2022 12:51 am

You need an RC network on your EN pin; you only have a R there. Add an 1uF capacitor from EN to ground and it should work a lot more stable. Additionally, your IO0 is connected to a fair bit of wiring; could be that that pulls it low on startup, making the chip go into download mode. Add a resistor (4.7K or so will do) from IO0 to 3.3V to fix that.

taronghlijyan
Posts: 3
Joined: Thu Jul 07, 2022 8:48 pm

Re: ESP-32 unstable booting

Postby taronghlijyan » Fri Jul 08, 2022 7:25 am

Thanks for the fast reply. Unfortunately it didn't help. However, I noticed another interesting thing. Whenever it "doesn't" start my program, it starts outputting this message through COM port:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13516
load:0x40080400,len:3604
csum err:0x67!=0xc2
ets_main.c 371
ets Jun 8 2016 00:22:57

I read that this is about DIO flash mode trough SPI, but why is it doing this?

Every time I connect it to USB-TTL before connecting on-board power, it runs my program instead. (my program logs at 57600, while the message is outputted with 115200).

Does this give any additional clue?

Regards,
Taron

P.S. - I'm using Arduino IDE
Last edited by taronghlijyan on Fri Jul 08, 2022 9:38 am, edited 1 time in total.

taronghlijyan
Posts: 3
Joined: Thu Jul 07, 2022 8:48 pm

Re: ESP-32 unstable booting

Postby taronghlijyan » Fri Jul 08, 2022 7:51 am

Thanks for fast reply. Unfortunately it didn't work. However, I found another clue. Every time it doesn't start my program, it starts outputting this kind of message to COM port:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13516
load:0x00004000,len:17039360
ets Jun 8 2016 00:22:57

I know that it is about DIO SPI flash mode, but how do I get it to start my program automatically.

This happens when I connect to USB-TTL after I connect on-board power. If I am connecting the USB-TTL adapter first and only then powering the board it works fine until the next reset (even if I take out USB-TTL out)

I know that my code isn't starting because it logs at 57600, while this message appears at 115200.

Is there anything else that I'm missing?

Regards,
Taron

P.S. - I am using Arduino IDE with ESP32 core and this USB-TTL (see picture attached)
Attachments
ft232rl-usb-to-ttl-en-modules-samm-1507-60-B.png
ft232rl-usb-to-ttl-en-modules-samm-1507-60-B.png (332.44 KiB) Viewed 2649 times

Who is online

Users browsing this forum: No registered users and 101 guests