Issue in Installing Micropython WROOM32D

Posts: 2
Joined: Fri Jan 10, 2020 12:17 pm

Issue in Installing Micropython WROOM32D

Postby photon123 » Sat Jan 11, 2020 7:34 am

Hi All,

I am new to this mcu and facing some issue with installing micropython on it. So here is the story:

I have a PCB on which WROOM is mounted (it's pins are connected to several other components). To install micropython on it. I have done the following:
1. connections: PC -> USB2Serial Converter -> UART0. I ground the GPIO0 and power on the MCU. I get this message on the terminal:

waiting for download

2. Now, I close the terminal (connected to UART0) and try this:
~ ❯❯❯ esptool --chip esp32 --port /dev/ttyUSB0 erase_flash v2.1
Chip is ESP32D0WDQ5 (revision (unknown 0xa))
Enabling default SPI flash mode...
Erasing flash (this may take a while)...

A fatal error occurred: ESP32 ROM does not support function erase_flash

I am not able to get around this error
3. I try to run next command to write the flash
❯ esptool --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 <path to bin file> v2.1
Chip is ESP32D0WDQ5 (revision (unknown 0xa))
Enabling default SPI flash mode...
Configuring flash size...
Auto-detected Flash size: 4MB
Erasing flash...
Compressed 1087456 bytes to 687409...
Took 3.57s to erase flash block
Wrote 1087456 bytes (687409 compressed) at 0x00001000 in 73.9 seconds (effective 117.6 kbit/s)...
Hash of data verified.

Hard resetting...

So, it completes successfully as I see.

4. Resetting the MCU (with GPIO0 unconnected) gives this on UART0

configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
entry 0x4008114c
I (401) cpu_start: Pro cpu up.
I (401) cpu_start: Single core mode
I (401) heap_init: Initializing. RAM available for dynamic allocation:
I (405) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (411) heap_init: At 3FFC0E38 len 0001F1C8 (124 KiB): DRAM
I (417) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (424) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (430) heap_init: At 400915EC len 0000EA14 (58 KiB): IRAM
I (436) cpu_start: Pro cpu start user code
I (7) cpu_start: Starting scheduler on PRO CPU.
FAT filesystem appears to be corrupted. If you had important data there, you
may want to make a flash snapshot to try to recover it. Otherwise, perform
factory reprogramming of MicroPython firmware (completely erase flash, followed
by firmware programming).

[Continuously repeating last 4 lines]

5. If I try to erase flash in this mode (booting with GPIO0 unconnected). v2.1

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

I read somewhere that I need to connect EN to GND when 'connecting....' appears. But when I do this response mentioned in (2) appears.

6. I have also tried to connect the RTS and DTR of USB2Serial Converter with EN and GPIO0 with a breadboard circuit (BC547 and 10K res) emulating this. ... BU.IN_.pdf
-> gave a gibberish response on terminal while booting, so I didn't proceed with this.
7. Tried holding GPIO0 to low and running the erase flash command, but same response. (mentioned in point (5)).

Please help me out in this situation. I'm not sure what I am missing in the procedure

Posts: 2
Joined: Fri Jan 10, 2020 12:17 pm

Re: Issue in Installing Micropython WROOM32D

Postby photon123 » Mon Jan 13, 2020 10:06 am

When trying to code with Arduino IDE, it works perfectly.

Who is online

Users browsing this forum: Bing [Bot] and 20 guests