Trouble connecting to and flashing custom board

Leo_Qu
Posts: 3
Joined: Thu Sep 07, 2017 6:48 am

Trouble connecting to and flashing custom board

Postby Leo_Qu » Thu Sep 07, 2017 10:11 am

Hi everyone,

I'm having trouble connecting to ESP32-D0WD on my custom board. After reading up on existing threads by lanegg, croisez, zhivko, Ritesh and others, I'm here to ask for help and guidance : D

USB-Serial adapter: CP2102 (w/ DTR and RTS transistors)
Chip: ESP32-D0WD (from official Espressif Taobao store)

Board in question:
IMG_0472.JPG
IMG_0472.JPG (805.7 KiB) Viewed 6851 times
Tried command line "make flash" and Arduino IDE. Both get stuck at:
Flashing binaries to serial port /dev/cu.SLAB_USBtoUART (app at offset 0x10000)...
esptool.py v2.1-beta1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Same command works with WROVER-KIT.

Tried holding GPIO0 and/or EN low, holding GPIO2 high, and various combinations but no good results. When I just leave the board be, signal on GPIO0 and EN at flash is:
IMG_0473.JPG
IMG_0473.JPG (702.31 KiB) Viewed 6851 times
Questions:
1. Is there a major step I'm missing? After sticking a new bare ESP32 on PCB, can one go straight to "make flash"? (if board and dev environment was all proper)
2. Is below plan a good direction?
  • Make new board A, keeping CP2102 section the same, replacing custom ESP32 implementation with WROOM32. See where issue is
  • Make new board B. If A works, transplant the chip to B to further isolate issue
  • Make new board C. Replace USB-Serial adapter, in case that's defective/counterfeit
3. Any way to know ESP32 is alive, w/o any feedback on Serial?
4. Any obvious mistakes with the board?

Appreciate any feedback. Thank you!

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

Re: Trouble connecting to and flashing custom board

Postby ESP_Sprite » Thu Sep 07, 2017 10:19 am

- Can you check if your crystal is actually oscillating? I think the ROM should initialize the crystal oscillator, so you should at least see bits of 40MHz waveforms there.
- With GPIO15 being high, the ROM should be pretty chatty on the serial port. With an empty flash, it should either boot into download mode or possibly the Basic interpreter (and/or a boot loop, depending on the fuse settings). Can you see if that's the case?

Leo_Qu
Posts: 3
Joined: Thu Sep 07, 2017 6:48 am

Re: Trouble connecting to and flashing custom board

Postby Leo_Qu » Thu Sep 07, 2017 2:51 pm

Hi ESP_Sprite,

Thanks to your pointers, I made some progress.

- the crystal is not oscillating
- ESP32 TX is constantly high

I did make a duplicate board, and that one looks more lively (gave up on it early because CP2102 didn't even show up with ls /dev/cu.*). Comparison of the two boards:
board situation.png
board situation.png (60.73 KiB) Viewed 6825 times
Measurement location and results for Board 2:
what was measured.png
what was measured.png (956.16 KiB) Viewed 6825 times
I stitched the two boards together and was able to get a connection and successfully upload a program via command line. Didn't need to hold GPIO0 low.
stitched board.JPG
stitched board.JPG (247.33 KiB) Viewed 6825 times
I'm curious why Board 1 didn't work. What do you think I should do to troubleshoot further?

Thanks for the help : ) Posting the pics in case it's relevant for the next person.

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

Re: Trouble connecting to and flashing custom board

Postby ESP_Sprite » Fri Sep 08, 2017 3:02 am

Could be a fair amount of things... bad solder joint somewhere, power supply issues. broken crystal... you name it.

Who is online

Users browsing this forum: No registered users and 55 guests