Hi,
I'm laying out the ESP32, and I'm getting a grip on laying out the serial connection using the ESPTool.py.
I understand you are using the RTS and DTR pins to toggle EN and GPIO0 on the ESP32 to flip it to the bootloader to flash an image.
I'm not super familiar with RS-232 protocol, and bit banging serial bits -- I understand TTL though.
I saw a sub-note about some additional hardware being added to ensure some kind of condition where the chip doesn't reset correctly if RTS and DTR occur at the same time ("hardware control flow"). I'm assuming that's kind of a standard handshake for RS-232 or something.
We are (of course...) building out the cheapest possible product using the ESP32. If we use the ESP loading tools, do we need to build out that little transistor network that can be found at ESP-WROVER-KIT_SCH-3.pdf?
(I saw an earlier version of that network in the Sparkfun ESP32 "The Thing" schematic, as a clue...).
I haven't worked out the exact logic flow, but I see you guys also added a transistor going to GPIO2 in a later revision... should we be putting in those transistors to ensure reliable loading even when using the ESPTool.py?
Thanks,
-Tim
ESP32 -- RTS & DTR with Transistor Network
Re: ESP32 -- RTS & DTR with Transistor Network
*BUMP*
I'm laying this out now in Altium.
I'd prefer not to put in the NPN transistors, if it is not neccesary.
Can anyone clarify for certain?
I'm laying this out now in Altium.
I'd prefer not to put in the NPN transistors, if it is not neccesary.
Can anyone clarify for certain?
Re: ESP32 -- RTS & DTR with Transistor Network
Here is what I have in mind without the transistor network.
Pull-up on GPIO02 with DTR, and EN / CHIP-PW with pull-ups and RTS.
Pull-up on GPIO02 with DTR, and EN / CHIP-PW with pull-ups and RTS.
Re: ESP32 -- RTS & DTR with Transistor Network
You don't need to use any transistors or RTS/DTR at all, but than you will need to put ESP32 into bootloader mode manually by holding GPIO0 low on reset (using switches or jumpers).tpayne03 wrote:I'd prefer not to put in the NPN transistors, if it is not neccesary.
See ESP32 Boot Mode Selection
If you want automatic bootloader, I would recommend to use the known to work circuit from some development board schematics.
If you want to experiment with different solutions (it is possible), try it on a breadboard first, before designing the PCB.
Re: ESP32 -- RTS & DTR with Transistor Network
If you wire DTR to GPIO0 not GPIO2, then the posted schematic will allow esptool.py to automatically put the chip into bootloader mode and flash it (I'm guessing wiring to GPIO2 is a mistake, unless there's something I'm missing?)tpayne03 wrote:Here is what I have in mind without the transistor network.
Pull-up on GPIO02 with DTR, and EN / CHIP-PW with pull-ups and RTS.
You can probably even remove (or DNP) the GPIO0 pullup and have it work, as GPIO0 has a weak internal pullup. Similarly, you may not need the capacitor on the EN pullup (this is recommended when using the two transistors for EN/GPIO0 management but it's probably not necessary when driving directly unless you anticipate noise on the RTS line.)
Otherwise, as loboris says, you will need to put a button or something else on GPIO0 to allow you to go to bootloader mode.
To interact with the ESP32 in this configuration via serial terminal, you'll need to configure your serial program of choice not to assert DTR or RTS. The built-in idf monitor tool ("make monitor") will work, but a lot of other serial programs will need configuration before they work - otherwise by default they assert DTR & RTS (normal RS-232 behaviour). These are both active-low signals so the RTS signal holds the chip in reset for as long as it stays asserted.
Re: ESP32 -- RTS & DTR with Transistor Network
I'm on my phone. Yes my mistake on GPIO2. I was laying it out all day, just wired it wrong as I was leaving work.
I meant to have GPIO2 floating, and that pull up plus signal going to GPIO0.
Thanks for the detailed reply!
I meant to have GPIO2 floating, and that pull up plus signal going to GPIO0.
Thanks for the detailed reply!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 87 guests