i have quite specific SW / HW problem probably related with serial communication...
My project is based on Raspberry Pi 4 + 7" Touch screen + ESP32 microcontroller and i have problem with screen touch function.
Project detailed architecture:
- on Raspberry Pi is running my application writen in Python 3 (+Kivy Framework) and reading data with pySerial library (source bellow)
- touch screen is connected with HDMI(video) + USB(touch),
- to next USB is connected development board with ESP32 microcontroler and pushing data via UART to Raspberry Pi
Data reading from ESP32 UART:
import serial
uart = serial.Serial(port="/dev/ttyUSB0", bytesize=8, baudrate=9600,
stopbits=1, timeout=0.2, parity='N')
Okey, and here is my problem:
When is connected only USB <-> UART data cable (touch screen isn't connected), everything works great: I am sending data from ESP32 microcontroller (over UART) and then reading it on Raspberry Pi with pySerial library (and vice versa: When i have connected touch screen and i don't have connected USB <-> UART cable, touch works fine too).
But when both USB Touch Screen and USB <-> UART are connected together, i cann't see any data from ESP32 microcontroller and of course, touch function isn't works...
Based on information written above, problem is probably with serial communication, respectively conflict between USB <-> UART and USB touch interfaces but i don't have experience how to fix or rebuild it.
Please, do someone experience / knowledge how to solve it? (if i forgot write some important information, of course, i can it add it here)
Update 12/22/2022:
lsusb - plugged in 2x UART dev + 1x Touch USB
1 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
2 Bus 001 Device 006: ID 0bda:3036 Realtek Semiconductor Corp.
3 Bus 001 Device 005: ID 0bda:3036 Realtek Semiconductor Corp.
4 Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family] # UART 1
5 Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family] # UART 2
6 Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
7 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I can't see Display USB TOUCH
lsusb - plugged in 1x UART dev + 1x Touch USB
1 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
2 Bus 001 Device 006: ID 0bda:3036 Realtek Semiconductor Corp.
3 Bus 001 Device 005: ID 0bda:3036 Realtek Semiconductor Corp.
4 -> Bus 001 Device 004: ID 0eef:0005 D-WAV Scientific Co., Ltd # Display USB TOUCH
5 Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family] # UART 1
6 Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
7 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
What about the power supply i have external source (5V 4A) for Raspberry Pi 4 + ESP32 + 7" LCD with touch and i did't see problem with stability (but maybe this is a problem).