0
\$\begingroup\$

Hello smarter than me people,

Cannot seem to enter Boot mode using the esptool!
PlatformIO IDE

I have built a custom board with an ES32-S2 chip, I am trying to upload a test sketch to it using the UART and an FTD2204 adapter. It does seem to toggle the IO0 and EN correctly, but it seems it is timing out as follows:

A fatal error occurred: Failed to connect to ESP32-S2: Timed out waiting for packet header

Are ESP32-S2 bare chips missing the bootloader?

I also attached my schematics, can anyone please help? I am frustrated, I have tried everything.

enter image description here

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ "Are ESP32-S2 bare chips missing the bootloader?" I would assume yes. Not everyone wants to use a bootloader. \$\endgroup\$
    – winny
    Commented Aug 30, 2023 at 10:58
  • \$\begingroup\$ Does that mean programming them with UART FTDI like the dev boards do is not possible? \$\endgroup\$ Commented Aug 30, 2023 at 13:54
  • \$\begingroup\$ Depends. It should say in the documentation. Bootloaders are popular for development but may be unwanted for some mass production cases. \$\endgroup\$
    – winny
    Commented Aug 30, 2023 at 13:58
  • \$\begingroup\$ I have built my PCB after reading the doc. several times. It says download mode IO0 pulled down while triggering a reset. \$\endgroup\$ Commented Aug 30, 2023 at 14:30
  • \$\begingroup\$ Ok, so it’s working? \$\endgroup\$
    – winny
    Commented Aug 30, 2023 at 14:52

1 Answer 1

0
\$\begingroup\$

Rami, welcome to EE-SE. The ESP32 bare chips do include the bootloader function; I've built several circuits that way. Instead, I believe the problem can be found in the schematic.

Your schematic shows RX/TX lines connected to U0RXD/U0TXD on the chip (a standard UART pair), as well as D+/D- lines connected to GPIO20/GPIO19 on the chip (a USB data pair). These different interfaces are then connected together, via resistors, to pins on the programming connector, creating a potential for interference between the two signaling protocols.

It sounds like you want to program via the ESP's standard UART0 port and your FTD2204 adapter. In that case, try removing resistors R16 and R17 so the USB port won't interfere. Also, be sure you are selecting the COM port that your FTD2204 is connected to in the Arduino IDE.

The timing of the reset and IO0 lines at bootup is critical. Most circuits I've seen and used have a 2-transistor setup like this (taken from https://forum.micropython.org/viewtopic.php?t=4966):

boot circuit from https://forum.micropython.org/viewtopic.php?t=4966

Finally, if you're prepared to redo your PCB, you could choose to drop the FTD2204 adapter, and just connect to the ESP32's USB lines (D+/D-) via a USB cable. You'd have to modify your circuit to support a USB receptacle connected to the D+/D- lines.

Here is hoping this helps. Let us know if removing the resistors fixes it.

\$\endgroup\$
7
  • \$\begingroup\$ Many thanks Mark, However, here is the thing.... I have built a version of this prototype before and had the same issue, I made some modifications thinking it will fix the problem, adding the cap that i forgot to the EN pin to the ground, in order to achieve the rc required for delay... During making the second iteration, i expected the problem to rehappen, thats why i have routed D+ and D- to the same connector, and added resistor pads as jumpers, currently they are not mounted, sorry for the lack on NC on the schematics. \$\endgroup\$ Commented Aug 30, 2023 at 16:33
  • \$\begingroup\$ So yes, if this problem presists, i might remove the jumpers for UART and connect the D+ and D- to the USB directly, BUT! What other modifications do i need? How would using the USB work if i cannot enter the download mode? \$\endgroup\$ Commented Aug 30, 2023 at 16:36
  • \$\begingroup\$ As for the timing, i trust it is taken care of by the ESP-prog that i attached a picture for, it has the npn circuit. \$\endgroup\$ Commented Aug 30, 2023 at 16:38
  • \$\begingroup\$ I am using platformio \$\endgroup\$ Commented Aug 30, 2023 at 16:43
  • \$\begingroup\$ If you decide to switch to the native USB interface for programming, this video should be helpful: youtube.com/watch?v=hJSBTFsOnoA \$\endgroup\$ Commented Aug 30, 2023 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.