Page 1 of 2

What would I need to enable flashing to a ESP32-WROOM-32

Posted: Tue May 07, 2019 6:00 pm
by renegadeandy
Hi,

I am designing a PCB - and am looking to use this chip ESP32-WROOM-32https://www.mouser.co.uk/ProductDetail/ ... mn8CP2I%3D.

When writing my software (using Arduino core) I am using a breakout board(similar to this https://www.amazon.co.uk/JZK-ESP-32S-De ... MMA855CKNV), so that easily takes care of setting up the ESP in the right modes to allow me to reflash the chip using USB, or interact with it's onboard memory etc.

Is there a schematic somewhere I can follow, which will help me to facilitate that some process on my PoC PCB, so I can basically integrate the micro usb into my board design to allow me to reflash my ESP on my manufactured PCB board directly? How do others make the step from doing everything on a breakout board to then moving onto a PCB? Is there any instructions, best practices etc that can be shared?

Many thanks in advance.

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 1:00 am
by WiFive

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 7:20 am
by renegadeandy
Hi - thank you that's helpful.

So basically Serial bootloader -- is what I need to get to program the chip from my ide?

That means pulling both GPIO0 and GPIO2(fixed) low.

I presume at that point I would need to connect UART to Pins TXD / RXD (35 and 34 respectively) with something like an FTDI RS232 or just hook it up to a normal programmer board? Does that sound like it would work?

Many thanks

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 7:25 am
by WiFive
Gpio2 not 1
Usb to uart (3.3v ttl not rs232)
And the enable pin pullup circuit

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 7:53 am
by renegadeandy
Well spotted - GPIO2

I meant FT232R

When you say the enable pin pullup circuit, you mean:

Image

ie make sure Enable is pulled high.

Also I see in the schematic on the datasheet that it has:
Image

so do I need to make sure I have C1, C2, C3 and C4 on my PCB?

And, would J2 in this normally be a switch?

Image

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 11:30 am
by username
That means pulling both GPIO0 and GPIO2(fixed) low.
There is more to it than this, you also need to control the EN pin as well.
To put the device into programming mode you need to pull EN & GPIO0 low. Then release EN, and moments later release GPIO0.
You don't need to fiddle or control GPIO2 at all.
This sequence is explained in the manual.

Yes, you the caps

This is the circuit I use. Mind you what you dont see on there is that there are a 10k pullup on both the EN and GPIO0 lines, along with a 0.1 cap to gnd for each as well.
Annotation 2019-05-08 063509.jpg
Annotation 2019-05-08 063509.jpg (255.52 KiB) Viewed 23968 times

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 4:12 pm
by renegadeandy
Hi - thanks for the response.

The thing is, I already have external programmer boards I could use which are pretty much the circuit you show there. So i tend to favour having a way to enable the the board to be in programmer mode on its own, and then simply conect my UARTs on the ESP to my existing breadboard style programmer board.

In that case, how would you make this sequence of events happen on a PCB?
pull EN & GPIO0 low. Then release EN, and moments later release GPIO0.

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Wed May 08, 2019 6:49 pm
by username
In that case, how would you make this sequence of events happen on a PCB?
Quickly thinking about it I would do something like this. You might have to play with the cap value to get the timing right on GPIO0


Annotation 2019-05-08 134919.jpg
Annotation 2019-05-08 134919.jpg (165.49 KiB) Viewed 23933 times

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Thu May 09, 2019 9:56 am
by renegadeandy
I can see how that achieves:
To put the device into programming mode you need to pull EN & GPIO0 low.
-- That happens when I push the program button.
But how does it achieve:
Then release EN, and moments later release GPIO0.
-- is the 'moments later' part the 2.2uF capacitor C1?

Re: What would I need to enable flashing to a ESP32-WROOM-32

Posted: Thu May 09, 2019 11:43 am
by username
-- is the 'moments later' part the 2.2uF capacitor C1?
yes