ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externally

User avatar
amrbekhit
Posts: 3
Joined: Sun Jul 26, 2020 6:51 pm

ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externally

Postby amrbekhit » Mon Jul 27, 2020 3:42 am

Hello all,

I've designed a custom 2-layer PCB using an ESP32-D0WD V3. I'm using a MircroMatch connector as a programming interface, routing the EN, BOOT and UART pins there. I'm having an issue whereby the boards will fail to start up normally, unless the U0RXD pin is pulled up or down via a resistor or I connect my programmer (basically an FT232R) to the programming connector. Once connected, the board works perfectly fine, with WiFi output power even exceeding the output power of a commercial ESP32-WROOM module by 10-20dBm (as measured by my smartphone).

Without this resistor or without connecting the programming cable, the board can very often fail to startup, and even if it starts, touching the pins of the programming connector can cause it to stop working. With the resistor, touching the connector has no effect on the performance of the board and it continues to operate just fine. I'd like to point out that this only works with the U0RXD pin - applying this resistor to any of the EN, BOOT or U0TXD pins does not solve the issue.

I haven't found anything in the datasheets regarding U0RXD - from what I can tell, there should be an internal pull-up resistor anyway.

Any thoughts on this?
Last edited by amrbekhit on Thu Jul 30, 2020 9:56 pm, edited 1 time in total.

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

Re: ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externaly

Postby ESP_Sprite » Mon Jul 27, 2020 9:57 am

Could it be that there's too much parasitic capacitance on GPIO0 to make the built-in pullup pull the line up in time? How long are your lines, what else is connected to GPIO0?

User avatar
amrbekhit
Posts: 3
Joined: Sun Jul 26, 2020 6:51 pm

Re: ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externaly

Postby amrbekhit » Mon Jul 27, 2020 11:24 am

ESP_Sprite wrote:
Mon Jul 27, 2020 9:57 am
Could it be that there's too much parasitic capacitance on GPIO0 to make the built-in pullup pull the line up in time? How long are your lines, what else is connected to GPIO0?
Hmm - the trace length is 24mm. You can see a screenshot of the relevant layout below. However, I've tried directly shorting the BOOT pin to 3.3V and the problem is still there. As I mentioned in my first post, it's only by applying a pull-up/pull-down to the U0RXD pin is the problem resolved.
esp32.png
esp32.png (95.25 KiB) Viewed 4772 times

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

Re: ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externaly

Postby ESP_Sprite » Tue Jul 28, 2020 1:43 pm

That is strange for sure... any chance you can capture what the chip sends on U0TXD when this happens?

User avatar
amrbekhit
Posts: 3
Joined: Sun Jul 26, 2020 6:51 pm

Re: ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externaly

Postby amrbekhit » Wed Jul 29, 2020 10:47 am

ESP_Sprite wrote:
Tue Jul 28, 2020 1:43 pm
That is strange for sure... any chance you can capture what the chip sends on U0TXD when this happens?
Problem solved! Turns out it was a purely software issue - basically I have some code that monitors the serial port and parses the incoming data, but I wasn't adding in checks for unexpected data. Me touching the U0RXD pin was causing random characters to be detected by the ESP32 and causing the code to crash.

I'm using platformio and the ESP32 Arduino framework. Looking at the source code, it looks like the internal pull-up is not automatically enabled by the Serial.begin routine. By adding the necessary software checks and manually enabling the pull-up via pinMode, the problem is completely resolved.

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

Re: ESP32 Custom PCB not starting up except when U0RXD is pulled up or down externaly

Postby ESP_Sprite » Wed Jul 29, 2020 2:35 pm

Good to hear, and thanks for posting what the issue was. I almost started doubting my knowledge that U0RX is not a bootstrap pin...

Who is online

Users browsing this forum: No registered users and 110 guests