Flashing ESP-Wroom-32 in production

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

Flashing ESP-Wroom-32 in production

Postby sorenhl » Sun Jun 03, 2018 9:52 pm

Hi,

I am currently working on a project that involves using the esp-wroom-32 in a project that will hit factory production later this year (small scale initially).

I have written all the code needed and got the esp working as intended with all the external sensors, but currently I am working with development boards, which makes the flashing over usb to UART easy.

Now I do not think the company that I work with for the industrial design have experience with this specific chip, so I would like to have an idea which pins and what tools they should have available once the layout is made and the production starts. I think they previously have used a programmer with JTAG but I have now read several places that this is not supported/recommended with ESP32.

The product will be CE certified so this combined project is quite a financial investment for me, so I would love to have the correct pins available in a connector from the start and knowing what I should provide the factory with.

/Soren

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Flashing ESP-Wroom-32 in production

Postby ESP_Sprite » Mon Jun 04, 2018 3:35 am

FWIW, for a device I built on a semi-small scale (several thousands) we use a test jig (bed-of-nails, essentially) with a Raspberry Pi with a specially developed shield on it. The software running on the Pi does a bunch of tests on the hardware (checking voltages, looking for shorts, the works) before essentially invoking the esptool.py that comes with esp-idf to flash the ESP32 over the serial port of the Raspberry Pi. I'm not entirely happy with the speed the flash is written with (10 seconds or something, for a fairly big (few megabytes) payload) but I'm not sure how much of that is due to the slowness of the flash in general.

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

Re: Flashing ESP-Wroom-32 in production

Postby sorenhl » Fri Jun 08, 2018 8:47 pm

Hi ESP_Sprite,

Thank you for your answer, i think that will be the way to go for now.

/Søren

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Flashing ESP-Wroom-32 in production

Postby mikemoy » Sat Jun 09, 2018 1:37 pm

but I have now read several places that this is not supported/recommended with ESP32.
Where did you see that ?

How about the ESP32 Programming Tool ?

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

Re: Flashing ESP-Wroom-32 in production

Postby sorenhl » Sat Jun 09, 2018 3:31 pm

Hi,

I was referring til JTag, which by "google" it seems to be possible, but not recommended.

So yes, I will be using the programming tool over UART, which also seems quite easy.
I talked with the hardware team and we will make the pins for this available to flash the finished product, so i have figured it out :)

/Søren

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Flashing ESP-Wroom-32 in production

Postby mikemoy » Sat Jun 09, 2018 3:49 pm

I was referring til JTag, which by "google" it seems to be possible, but not recommended.
Glad you have it figured out, but I wanted to clarify this for others that may see this post.
There is nothing wrong at all programming it with JTAG.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Flashing ESP-Wroom-32 in production

Postby ESP_igrr » Sun Jun 10, 2018 12:16 am

It is not recommended to use JTAG as the only means of factory programming, because typically JTAG will need to be disabled in the finished product. If the device needs to be reflashed after JTAG is disabled, that would require different interface (UART) to be used.

sorenhl
Posts: 22
Joined: Sun Jun 03, 2018 9:34 pm

Re: Flashing ESP-Wroom-32 in production

Postby sorenhl » Sun Jun 10, 2018 11:32 am

Fair enough, thank you :)
I think we went out of the wrong path, as my initial goal was to find out which pins I should expose to ensure that flashing in production (100+ devices at a time) would be as easy as possible. I never had any intent of shooting down JTag, i simply have not been in this type of scenario before.

My conclousion are the following pins from ESP-Wroom-32:
* TX (UART)
* RX (UART)
* EN (Reset)
* GPIO0 (Boot mode)
* Ground
Which i will ask the factory to flash with the ESP programming tool.

Furthermore I will proberly expose JTag pins as well, just in case I need debugging.

Feel free to give me feedback on my plan :)

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Flashing ESP-Wroom-32 in production

Postby ESP_Sprite » Sun Jun 10, 2018 2:06 pm

Slightly offtopic, but... Maybe think about doing what I did and make an ATE jig that initially flashes a test program that, combined with the bed-of-nails jig, tests all the other hardware bits and pieces as well. Thoroughly, if possible, in such a way that mis-soldered components but also wrong components can be caught. See e.g. https://www.reddit.com/r/PocketSprite/c ... ostmortem/ for something we got burned by.

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Flashing ESP-Wroom-32 in production

Postby mikemoy » Sun Jun 10, 2018 2:18 pm

You pin selection for serial programming is correct.
Should you need an off the shelf programmer you could use one of these.
http://www.electrodragon.com/product/es ... 266-esp32/

Or should you choose to program the modules before they are placed in your board, you can program them with this.
https://www.aliexpress.com/item/ESP32-T ... 47042.html

Who is online

Users browsing this forum: No registered users and 94 guests