ttyACM device dies when I connect to it for serial port or flashing

Post Reply
marmerlin
Posts: 2
Joined: Wed Jun 09, 2021 3:54 am

I tried to setup a quickfeather 1.2 following the instructions.
"Introduction to QuickFeather, EOS S3 Open Source Hardware Dev Kit"

After pushing the reset button, I see the blue LED and
[2738733.123105] usb 1-3: new full-speed USB device number 112 using xhci_hcd
[2738733.271897] usb 1-3: New USB device found, idVendor=1d50, idProduct=6140, bcdDevice= 0.00
[2738733.271903] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[2738733.274020] cdc_acm 1-3:1.0: ttyACM0: USB ACM device
(on linux)

As soon as I try to connect to it via minicom to send commands over serial, the port dies:
[2740207.285274] usb 1-3: reset full-speed USB device number 112 using xhci_hcd
[2740207.413136] usb 1-3: device descriptor read/64, error -71
[2740207.649359] usb 1-3: device descriptor read/64, error -71
[2740207.889143] usb 1-3: reset full-speed USB device number 112 using xhci_hcd
[2740208.017146] usb 1-3: device descriptor read/64, error -71
[2740208.253147] usb 1-3: device descriptor read/64, error -71
[2740208.493347] usb 1-3: reset full-speed USB device number 112 using xhci_hcd
[2740208.493841] usb 1-3: Device not responding to setup address.
[2740208.701501] usb 1-3: Device not responding to setup address.
[2740208.913179] usb 1-3: device not accepting address 112, error -71


I then tried to flash a new bootloader as per
https://github.com/QuickLogic-Corp/Tiny ... pplication
I push reset, get blue, then push user, get green and get the right usb device:
Bus 001 Device 119: ID 1d50:6140 OpenMoko, Inc.
[2740843.447804] usb 1-3: new full-speed USB device number 119 using xhci_hcd
[2740843.597858] usb 1-3: New USB device found, idVendor=1d50, idProduct=6140, bcdDevice= 0.00
[2740843.597862] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[2740843.599497] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

but the ttyACM dies as soon as I try to flash:
sauron:~/fpga/quickfeather$ alias qfprog="python3
`pwd`/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py"
sauron:~/fpga/quickfeather$ qfprog --port /dev/ttyACM0 --bootloader
./qorc-sdk/quick-feather-dev-board/binaries/qf_bootloader.bin --mode m4
CLI mode
ports = ['/dev/ttyACM0 (QuickFeather)'] 1
Using port /dev/ttyACM0 (QuickFeather)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 265, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
OSError: [Errno 5] Input/output error: '/dev/ttyACM0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/merlin/fpga/quickfeather/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py", line 642, in <module>
adapter.program(bootloadername, progress, "Programming bootloader with ", args.checkrev, args.update)
File "/home/merlin/fpga/quickfeather/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py", line 144, in program
with serial.Serial(self.port[0], 115200, timeout=60, writeTimeout=60) as ser:
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 5] could not open port /dev/ttyACM0: [Errno 5] Input/output error: '/dev/ttyACM0'

[2740891.828466] usb 1-3: reset full-speed USB device number 119 using xhci_hcd
[2740891.955709] usb 1-3: device descriptor read/64, error -71
[2740892.195806] usb 1-3: device descriptor read/64, error -71
[2740892.431592] usb 1-3: reset full-speed USB device number 119 using xhci_hcd
[2740892.563870] usb 1-3: device descriptor read/64, error -71
[2740892.799827] usb 1-3: device descriptor read/64, error -71
[2740893.039694] usb 1-3: reset full-speed USB device number 119 using xhci_hcd
[2740893.039833] usb 1-3: Device not responding to setup address.

I tried 3 USB cables, same issue.

Any idea?
phil_quik
Posts: 36
Joined: Mon May 18, 2020 12:33 am

I will suggest try a different USB port, better USB3.0, or Windows if possible.
marmerlin
Posts: 2
Joined: Wed Jun 09, 2021 3:54 am

I did a lot more testing. There were 2 problems
I had the jtag cable plugged into the device. It wasn't being used, but that was enough to get the emulated ttyACM USB not to work in 5 out of 7 linux computers I had.
Some computers had a somewhat different USB port electrically speaking and worked anyway, while the other ones did not work until i unplugged the jtag cable.

So I'd say the ttyACM emulation is borderline compliant and falls out of spec when a jtag cable happens to be plugged in the device.
Post Reply