Page 1 of 1
Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 7:24 am
by AmirHadi
Hi ESpressif,
I am using the uBlox NINA-W101 Wi-Fi module in my design. It's datasheet outlines that the built in Wi-Fi chip is ESP32. I am wondering if it could be programmed using its JTAG interface?
I searched different forums and it appears that the JTAG programming of this Wi-Fi module is not possible. I also have a microprocessor on the board and I am wondering if it is possible to use the MCU as a USB-UART bridget to flash the firmware of the built in ESP32 through its UART interface. Because of space limitation on my PCB, I cannot add a FTDI USB-UART chip. I appreciate if you can send me any documentation/tutorial/sample code that I can use.
Thanks,
-Amir
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 7:59 am
by ESP_igrr
Hi Amir,
It is possible to upload an application over JTAG using OpenOCD, provided that the application running on the module has not reconfigured JTAG pins (GPIOs 12-15) for some other function.
See this documentation page:
https://docs.espressif.com/projects/esp ... -app-debug
OpenOCD with support for ESP32 can be downloaded here:
https://github.com/espressif/openocd-esp32/releases
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 8:12 am
by AmirHadi
Thanks for your quick response. How can I make sure that the module (uBlox NINA-W101) I am going to purchase does not have its JTAG pins reconfigured? Is it possible to change the configuration again using the UART interface? Sorry if my questions are dumb. I am quite new in working with the ESP products. I appreciate any help.
Thanks,
-Amir
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 9:14 am
by loboris
AmirHadi wrote:Hi ESpressif,
I am using the uBlox NINA-W101 Wi-Fi module in my design.
I'm just wondering why did you choose to use uBlox NINA-W101 in you design.
It is just repacked ESP32-D2WD with only 2MB Flash and offers less than ESP32-PICO-D4 in smaller package and 4 MB Flash.
It looks NINA-W101 was designed just to confuse the users about what it realy is...
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 11:12 am
by ESP_igrr
AmirHadi wrote:Is it possible to change the configuration again using the UART interface?
Of course, you can erase or upload new firmware over UART0. For this, pins GPIO0, GPIO1 and GPIO3 (also known as U0TXD and U0RXD) need to be accessible.
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 5:05 pm
by AmirHadi
Great. It was very helpful. As the last question, Do you know if I can use the MCU ( STM32F446RE) as a USB to UART bridge to flash the firmware of the ESP32 module? Due to space limitations on the board, I cannot afford putting a FTDI USB to UART chip on the board.
Thanks foe being super helpful on this issue.
-Amir
Re: Programming of ESP32 over JTAG
Posted: Wed Nov 07, 2018 7:16 pm
by AmirHadi
I got confused with the image below in the link on JTAG Documentation:
https://docs.espressif.com/projects/esp ... w-it-works
- JTAG Adapter.png (117.17 KiB) Viewed 18793 times
I do not have space on the board to add in the FTDI chip. I would like to use an external JTAG Adapter instead (and do not add in the UART interface) to
program and debug both the MCU (STM32F446RE) and the Wi-Fi module.
In particular, by only having the section highlighted in yellow, is it possible to have the
programming and debugging capability.
Regards,
-Amir