Teensy uploading works no more after Rpi Pico has been connected

ithinu

Active member
I would like to use Pico as a display driver for Teensy. But it turns out, while unplugging Teensy, then plugging Pico (the same USB port), then moving to the Pico sketch and uploading works flawlessly, it does not so in the other direction.

There are two ways of making Teensy work again:

1: Try to upload, then randomly press Reset on Teensy. Normally it gives nothing, apart from the small window printing "Reboot OK".
But sometimes, the small window prints error messages like "invalid hex file" or "turning off automatic mode". Only this triggers something and Teensy uploading works again. Maybe switching USB mode from serial to anything, then back to serial, helps in getting that error message, which makes Teensy upload again, faster. Maybe not. It seems quite random.

2: Restart Arduino - which makes the whole issue not a problem for me, but maybe you'll find this report useful.

Kernel log after plugging in Teensy:
Code:
Jul 13 16:53:53 kernel: [199151.586507] usb 5-1: USB disconnect, device number 12
Jul 13 16:53:55 kernel: [199153.486525] usb 5-1: new high-speed USB device number 13 using xhci_hcd
Jul 13 16:53:55 kernel: [199153.640937] usb 5-1: New USB device found, idVendor=16c0, idProduct=0483, bcdDevice= 2.80
Jul 13 16:53:55 kernel: [199153.640943] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 13 16:53:55 kernel: [199153.640946] usb 5-1: Product: USB Serial
Jul 13 16:53:55 kernel: [199153.640948] usb 5-1: Manufacturer: Teensyduino
Jul 13 16:53:55 kernel: [199153.640951] usb 5-1: SerialNumber: 15857950
Jul 13 16:53:55 kernel: [199153.644394] cdc_acm 5-1:1.0: ttyACM0: USB ACM device

Connected in Arduino via Port USB 5/5-1 -> teensy ports /dev/ttyACM0 Serial (Teensy 4.1)

Error message when uploading:
Code:
Unable to open /dev/ttyACM0 for reboot request
  Often this error is caused by ModemManager mistaking Teensy for a modem.
  Make sure you have the latest 00-teensy.rules, or uninstall ModemManager!
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
Failed uploading: uploading error: exit status 1

Arduino 2.3.2, Teensy 1.59.0.
 
Last edited:
Did you install the Teensy udev rules? On Linux, the most common problem is lack of the udev rules, so please check that first before we try to dive into technical details on this problem.
 
Yes. It is /etc/udev/rules.d/00-teensy.rules:
Code:
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789a]*", ENV{MTP_NO_PROBE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666", RUN:="/bin/stty -F /dev/%k raw -echo"
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666"
KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666"

If there is no Pico involved, Teensy works as expected plugged, unplugged, reset at any moment. As I said, those error messages (aside from "unable to open /dev/ttyACM0 for reboot request") were induced by me purposely, e.g. a reset in the middle of uploading. I do not think there was anything wrong there.

The Pico to Teensy issue, in turn, may be presumably due to Teensy or Arduino not re-initializing correctly after switching boards, but it may also be a problem with the Pico board library leaving the IDE in an incorrect state.
 
Back
Top