Lopy 4 with Expansion board v2.1a

I am trying to upload my code to the lopy4. After sometime trying to connect it gives an error back that there was no serial communication?

Please post the exact error message and your platformio.ini.

Since the expansion board 2, which has the actual USB-to-UART converter on it that’s used for flashing, is an FTDI chip, it’s also mandatory that you install the FTDI drivers (https://ftdichip.com/drivers/vcp-drivers/). Some people have difficulty with the “Windows (Universal)” driver, in which case you should try the “Windows (Desktop)” driver, or vice versa.

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
*** [upload] Error 2

This is my error and below is my platform.ini


platform = espressif32

framework = arduino

board = lopy4

;board_build.mcu = esp32

;board_build.f_cpu = 240000000L

;monitor_speed = 115200

;upload_speed = 115200

;upload_resetmethod = nodemcu

;upload_protocol = esptool

i have downloaded the FTDI drivers i have tried both universal and desktop drivers

Are you sure the ESP32 is getting power? E.g., setting monitor_speed = 115200 and then starting project tasks → Monitor, and pressing the reset button on the LoPy (or shorting RST to GND momentarily), does it produce any output at all? If not, the bootloader is not even responding, because the ESP32 is broken, it has no power, or the something in the FTDI ↔ computer chain is broken.

It produces an output when i hit the reset button on the LoPy.

configsip: 0, SPIWP:0xee
mode:DIO, clock div:1
entry 0x400a05bc
Smart Provisioning started in the background
See Pybytes App for details
Pycom MicroPython 1.20.2.r2 [v1.11-3a7776d] on 2020-11-23; LoPy4 with ESP32
Pybytes Version: 1.6.1
Type “help()” for more information.

Aha. You’re running Micropython on it. That probably uses deepsleep mode and prevents stuff.

Can you force it into the bootloader as such:

  1. plug out the Lopy from power
  2. Connect IO0 to GND
  3. Plug it back in
  4. Try flashing it
  5. Remove IO0 ↔ GND connection, reset

Thanks, it works now but when i try to load new code i get the old error again but then when i connect IO0 to GND again i can upload the new code. So now i have to connect the IO0 to GND each time when i want to upload some new code.

Does it work in the Arduino IDE every time without IO0 ↔ GND connection?

No in arduino IDE I get the same error that there is no serial data recieved

Then the auto reset circuit on the expansion board is not working at all, or there is still a problem with the drivers so that RTS + DTR doesn’t correctly pull EN and IO0 in the right position for a reset into bootloader mode. Sadly that company doesn’t release any schematics for the board to double check their work. You should ask them for any further help. https://forum.pycom.io/category/6/lopy

1 Like