Python serial library and picocom cause ESP32 to automatically enter download mode

JollyTurbo
Posts: 1
Joined: Fri May 14, 2021 7:44 am

Python serial library and picocom cause ESP32 to automatically enter download mode

Postby JollyTurbo » Fri May 14, 2021 8:36 am

I'm working on a project using an ESP32-Cam module. I want to be able to connect to the device via serial which I am doing with the serial library in Python.

The code on the microcontroller consists of a few print statements which I can view when I use

Code: Select all

idf.py -p (port) -b 115200 monitor
. However, when I attempt to connect to it using a Python script I wrote, the board switches into download mode. The Python script is below:

Code: Select all

import serial
import sys

with serial.Serial('{}'.format(sys.argv[1]), baudrate=115200) as ser:
	print(ser.readline())
When this runs, I just see

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))

waiting for download
If I probe the download pin (IO0) on my board, I can see that the voltage on the pin is around 0.5-0.7 V (which I think normally means it's floating), however, it seems that the chip is recognising that as being pulled to ground and is putting the board in download mode.

As the title suggests, the same issue is present using picocom:

Code: Select all

picocom (port) -b 115200
.
I've been unable to find anything online about a cause or solution for this problem. I'm wondering if there's something else that needs to be set in picocom/Python to prevent this.

---

For quick reference, I'm using
  • ESP32-CAM (ESP-32S)
  • ESP32-CAM-MB (for programming/connecting to the board). The FTDI chip is CH340C.
  • picocom v2.2
  • Python 3.6.9
  • Windows 10

Who is online

Users browsing this forum: Google [Bot] and 113 guests