Avoiding ESP32 autoreset on Serial connection.
Avoiding ESP32 autoreset on Serial connection.
I'm trying to make a basic program, which establishes UART connection. My main problem is that every time I open Serial connection the board resets itself. I'm using custom board with ESP32-DOWDQ6. RTS AND DTR pins of USB-> Serial converter are connected to Chip_EN and GPIO0 & GPIO2 pins of ESP32. When I flash ESP32 with ESPTOOL the ESP32 hard restarts and runs the program. When I try to connect to ESP32 via python or picocom (On Linux) RTS goes low and DTR goes too, causing ESP32 to run in bootloader. I'd like to avoid fancy setup scripts, like setting DTR HIGH and restart ESP while oppening Serial port. The question is how can I do it?
Re: Avoiding ESP32 autoreset on Serial connection.
Unfortunately by now I can initiate serial communication with a python script, where I defined setup function:
The another interesting fact is that no matter my source code (even if I use the examples). After opening Serial PORT I have to send a message to ESP32 and then it starts sending data. Otherwise it doesn't send any data when I open serial port from my computer.
Code: Select all
def setup():
com = serial.Serial()
com.port = sys.argv[1]
com.baudrate = sys.argv[2]
com.timeout = 1
com.setDTR(False)
com.setRTS(True)
com.open()
com.setRTS(False)
time.sleep(1)
com.write("\n")
return com
The another interesting fact is that no matter my source code (even if I use the examples). After opening Serial PORT I have to send a message to ESP32 and then it starts sending data. Otherwise it doesn't send any data when I open serial port from my computer.
Who is online
Users browsing this forum: No registered users and 108 guests