Differences include:
- use of the CP2102N instead of the CP2102, which is a drop-in replacement
- lack of connection of the CTS and RTS pins to the ESP32
- EXT_5V is connected to an internal 5V rail instead of the USB 5V. The board is powered from a source other than USB, and I read that there are issues if both are connected (the chip can heat up and destroy itself)
- nothing used from the SWITCH BUTTON section
- nothing used from Power Supply section, since we have our own power supply for the rest of the board
I thought the transistor network was the issue, so I bypassed them completely by directly connecting DTR to IO0 and RTS to EN. This seemed to put the ESP32 in bootloader mode, but make flash would not work:
Code: Select all
nick@ubuntu:~/esp/test$ make flash monitor
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.1
Connecting........
Traceback (most recent call last):
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2524, in <module>
_main()
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2517, in _main
main()
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2247, in main
esp.connect(args.before)
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 368, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=True)
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 329, in _connect_attempt
self._port.setDTR(True) # IO0=LOW
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 547, in setDTR
self.dtr = value
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 411, in dtr
self._update_dtr_state()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 605, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
IOError: [Errno 32] Broken pipe
/home/nick/esp/esp-idf/components/esptool_py/Makefile.projbuild:54: recipe for target 'flash' failed
make: *** [flash] Error 1
nick@ubuntu:~/esp/test$ make flash monitor
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.1
Connecting........_____....._____....._____....._____.....
Traceback (most recent call last):
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2524, in <module>
_main()
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2517, in _main
main()
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2247, in main
esp.connect(args.before)
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 368, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=True)
File "/home/nick/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 330, in _connect_attempt
self._port.setRTS(False) # EN=HIGH, chip out of reset
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 544, in setRTS
self.rts = value
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 401, in rts
self._update_rts_state()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 600, in _update_rts_state
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str)
IOError: [Errno 32] Broken pipe
/home/nick/esp/esp-idf/components/esptool_py/Makefile.projbuild:54: recipe for target 'flash' failed
make: *** [flash] Error 1
Any help is greatly appreciated! I've already spent 10-15 hours attempting to debug this, hooking up a logic analyzer to check the EN and IO0 states, reworking the board to bypass transistors, etc. I wouldn't be surprised if I'm just missing something simple (like if the EXT_5V pin must be hooked up to the USB socket or if it's fine connected to a separate 5V rail). Thanks ahead of time!