-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello,
i have problem with Raspberry Pi4.
On Raspberry Pi3 B+ is all ok. Only if I disconnect device, then get same error as Pi4B+.
Testing with cyusbserialtest is ok and device is finded:
---------------------------------------------------------------------------------
Device Number | VID | PID | INTERFACE NUMBER | FUNCTIONALITY
---------------------------------------------------------------------------------
0 |4b4 |a | 0 | VENDOR_I2C
0 |4b4 |a | 1 | VENDOR_SPI
0 |4b4 |a | 2 | NA
---------------------------------------------------------------------------------
I run simple test in Python:
from ucdev.cy7c65211 import CyUSBSerial, CyGPIO, CySPI, CyI2C
lib = CyUSBSerial(lib="cyusbserial")
dev = lib.find().__next__()
i2c = CyI2C(dev)
# access GPIO
gpio = CyGPIO(dev)
ret = gpio.get(1)
print(f"gpio1: {ret}")
and got an error:
<ucdev.cy7c65211.device.CyUSBSerialDevice object at 0xf7427718>
Traceback (most recent call last):
File "/home/pi/work/pi_ti_proj/python-ucdev/dlpc4710tst.py", line 7, in <module>
ret = gpio.get(1)
File "/home/pi/work/pi_ti_proj/python-ucdev/ucdev/cy7c65211/device.py", line 309, in get
ret = dev.CyGetGpioValue(pin, val)
File "/home/pi/work/pi_ti_proj/python-ucdev/ucdev/cy7c65211/device.py", line 102, in wrapper
raise Exception(msg)
Exception: ERROR: CyGetGpioValue=14, UNKNOWN
If I run script as user the CyGetGpioValue=6, if as root 14
I tested with both 32 and 64 bit raspbian 11 bullseye and raspbian 10 buster.
Also tested with libcyusbserial compiled from CyUSBSerial_SDK_Linux and from https://github.com/cyrozap/libcyusbserial
Python 3.9.2 (3.7.3 on buster)
libusb 1.0.24-3
USB device:
Aug 10 12:01:37 tocna-solo kernel: [ 5513.763700] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
Aug 10 12:01:37 tocna-solo kernel: [ 5513.899224] usb 1-1.3: New USB device found, idVendor=04b4, idProduct=000a, bcdDevice= 0.00
Aug 10 12:01:37 tocna-solo kernel: [ 5513.899245] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Aug 10 12:01:37 tocna-solo kernel: [ 5513.899261] usb 1-1.3: Product: DLP4710EVM-LC
Aug 10 12:01:37 tocna-solo kernel: [ 5513.899276] usb 1-1.3: Manufacturer: Cypress Semiconductor
Aug 10 12:01:37 tocna-solo mtp-probe: checking bus 1, device 5: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3"
Aug 10 12:01:37 tocna-solo mtp-probe: bus: 1, device: 5 was not an MTP device
Aug 10 12:01:37 tocna-solo mtp-probe: checking bus 1, device 5: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3"
Aug 10 12:01:37 tocna-solo mtp-probe: bus: 1, device: 5 was not an MTP device
On working raspberry 3B+ is 32bit raspbian 10 buster:
Python 3.7.3
libusb 1.0.22-2
USB device:
Aug 10 12:02:38 raspberrypi kernel: [ 5742.939135] usb 1-1.3: new full-speed USB device number 4 using xhci_hcd
Aug 10 12:02:38 raspberrypi kernel: [ 5743.050636] usb 1-1.3: New USB device found, idVendor=04b4, idProduct=000a, bcdDevice= 0.00
Aug 10 12:02:38 raspberrypi kernel: [ 5743.050675] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Aug 10 12:02:38 raspberrypi kernel: [ 5743.050692] usb 1-1.3: Product: DLP4710EVM-LC
Aug 10 12:02:38 raspberrypi kernel: [ 5743.050706] usb 1-1.3: Manufacturer: Cypress Semiconductor
Aug 10 12:02:38 raspberrypi mtp-probe: checking bus 1, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3"
Aug 10 12:02:38 raspberrypi mtp-probe: bus: 1, device: 4 was not an MTP device
Aug 10 12:02:38 raspberrypi mtp-probe: checking bus 1, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3"
Aug 10 12:02:38 raspberrypi mtp-probe: bus: 1, device: 4 was not an MTP device
Diferencies is only in USB HW on Pi. Pi4 have usb as xhci_hcd, pi3B+ have dwc_otg
Does it work for someone with a Pi4B+ please?
Thanks
HH