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

renegadeandy
Posts: 19
Joined: Tue Mar 06, 2018 2:08 pm

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

Postby renegadeandy » Tue May 07, 2019 6:00 pm

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.


renegadeandy
Posts: 19
Joined: Tue Mar 06, 2018 2:08 pm

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

Postby renegadeandy » Wed May 08, 2019 7:20 am

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
Last edited by renegadeandy on Wed May 08, 2019 7:55 am, edited 1 time in total.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

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

Postby WiFive » Wed May 08, 2019 7:25 am

Gpio2 not 1
Usb to uart (3.3v ttl not rs232)
And the enable pin pullup circuit

renegadeandy
Posts: 19
Joined: Tue Mar 06, 2018 2:08 pm

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

Postby renegadeandy » Wed May 08, 2019 7:53 am

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

username
Posts: 523
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Wed May 08, 2019 11:30 am

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 23680 times

renegadeandy
Posts: 19
Joined: Tue Mar 06, 2018 2:08 pm

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

Postby renegadeandy » Wed May 08, 2019 4:12 pm

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.

username
Posts: 523
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Wed May 08, 2019 6:49 pm

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 23645 times

renegadeandy
Posts: 19
Joined: Tue Mar 06, 2018 2:08 pm

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

Postby renegadeandy » Thu May 09, 2019 9:56 am

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?

username
Posts: 523
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Thu May 09, 2019 11:43 am

-- is the 'moments later' part the 2.2uF capacitor C1?
yes

Who is online

Users browsing this forum: No registered users and 61 guests