Hello! Could you help me with uart_echo example? I need setup interaction between my pc (ubuntu) with esp32. I used example from esp-idf with these variables:
```
CONFIG_EXAMPLE_UART_PORT_NUM=0
CONFIG_EXAMPLE_UART_BAUD_RATE=115200
CONFIG_EXAMPLE_UART_RXD=3
CONFIG_EXAMPLE_UART_TXD=1
CONFIG_EXAMPLE_TASK_STACK_SIZE=2048
```
I tried it with this simple python app:
```
import serial;
ser = serial.Serial('/dev/ttyUSB0',115200, timeout=3, writeTimeout=3)
data = b"test\n"
error = ser.write(data)
data = ser.readline()
print(data)
ser.close()
```
It works but very unstable. First 1-3 it responses correctly, but then it freezes and it seems like esp32 reboots. How can I solve it? Thx!
uart_echo example
Re: uart_echo example
It seems like uart0 is reserved for logging and download according to https://docs.espressif.com/projects/esp ... ction.html
So, I need additional UART-to-USB converter to stable send/receive commands.
So, I need additional UART-to-USB converter to stable send/receive commands.
-
- Posts: 9039
- Joined: Thu Nov 26, 2015 4:08 am
Re: uart_echo example
You could also disable logging, or remap the UART0 port to different pins and map UART1 to the pins the USB-to-serial converter is mapped to. That would mean you would still see some startup chatter, but as soon as your app is properly running, it should have the serial channel to itself.
Who is online
Users browsing this forum: Baidu [Spider], StanInexeon and 138 guests