Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy4.1 USB defect?

  1. #1
    Junior Member
    Join Date
    Apr 2021
    Posts
    2

    Teensy4.1 USB defect?

    I have been unable to get my Teensy4.1 to run anything I build (e.g. "Blink" or "Serial" examples using the Arduino 1.8.13 GUI) on RPi3/4 or x86. It appears to upload OK but then the MCU goes completely dead until the built-in "blink" is restored (this always works). I have never once seen a CDC-ACM device (e.g. /dev/ttyACM0) appear when the Teensy is plugged into a USB port.

    Having read about some potential problems, I suspect the USB initialisation may be at fault. Unfortunately the "Tools->USB Type:" menu entry in Arduino 1.8.13 does not have a none/disable option. Also, examining the verbose build output, it looks like USB driver code is always included whatever option is selected (e.g. "Raw HID"). My attempt to rebuild without USB support using a hacky script resulted in a morass of dependancy problems in unfamiliar code. (I do not yet have the knowledge to modify a toolchain/ tackle a clean build from first principles.)

    RPi4 <uname -a> output:-
    Linux RPi4 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

    The log output shown below (Teensy "blink" connected to USB, then reset button pressed) is the same for all systems I have tested:-

    <tail /var/log/syslog> output:-

    Apr 15 09:22:21 RPi4 kernel: [ 6538.870038] usb 1-1.4: new high-speed USB device number 5 using xhci_hcd
    Apr 15 09:22:22 RPi4 kernel: [ 6539.000951] usb 1-1.4: New USB device found, idVendor=16c0, idProduct=0486, bcdDevice= 2.80
    Apr 15 09:22:22 RPi4 kernel: [ 6539.000972] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Apr 15 09:22:22 RPi4 kernel: [ 6539.000991] usb 1-1.4: Product: Teensyduino RawHID
    Apr 15 09:22:22 RPi4 kernel: [ 6539.001009] usb 1-1.4: Manufacturer: Teensyduino
    Apr 15 09:22:22 RPi4 kernel: [ 6539.001025] usb 1-1.4: SerialNumber: 8282820
    Apr 15 09:22:22 RPi4 kernel: [ 6539.016141] hid-generic 0003:16C0:0486.0007: hiddev97,hidraw3: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:01:00.0-1.4/input0
    Apr 15 09:22:22 RPi4 kernel: [ 6539.018567] hid-generic 0003:16C0:0486.0008: hidraw4: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:01:00.0-1.4/input1
    Apr 15 09:23:26 RPi4 kernel: [ 6603.092790] usb 1-1.4: USB disconnect, device number 5
    Apr 15 09:23:26 RPi4 kernel: [ 6603.400985] usb 1-1.4: new high-speed USB device number 6 using xhci_hcd
    Apr 15 09:23:26 RPi4 kernel: [ 6603.531431] usb 1-1.4: New USB device found, idVendor=16c0, idProduct=0478, bcdDevice= 1.05
    Apr 15 09:23:26 RPi4 kernel: [ 6603.531442] usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=1
    Apr 15 09:23:26 RPi4 kernel: [ 6603.531450] usb 1-1.4: SerialNumber: 000CA37A
    Apr 15 09:23:26 RPi4 kernel: [ 6603.533986] hid-generic 0003:16C0:0478.0009: hidraw3: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:01:00.0-1.4/input0

    Loader verbose output:-
    09:22:24.440 (loader): Teensy Loader 1.53, begin program
    09:22:24.466 (loader): Listening for remote control on port 3149
    09:22:24.466 (loader): initialized, showing main window
    09:22:33.363 (loader): Verbose Info event
    09:23:26.752 (loader): Device came online, code_size = 8126464
    09:23:26.752 (loader): Board is: Teensy 4.1 (IMXRT1062), version 1.05
    09:23:26.753 (loader): set background IMG_ONLINE

    I am stuck, could the board (e.g. DFU programmer firmware) be defective?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078
    Quote Originally Posted by DrAl21 View Post
    could the board (e.g. DFU programmer firmware) be defective?
    Very unlikely your Teensy 4.1 is defective. The Linux kernel is detecting "New USB device found, idVendor=16c0, idProduct=0478, bcdDevice=1.05", which is a strong indication the bootloader is working properly, and also detecting "New USB device found, idVendor=16c0, idProduct=0486, bcdDevice= 2.80" which indicates the board is able to boot from code stored in the flash memory.

    I see you're using version 1.53, which is the last stable release. But since then, at least 2 separate problems have turned up with newer Linux systems. One is problems (or differences) in how udev rules are used. The other was problems with GTK2 libraries on some distros (notably, Ubuntu 20.04.2 ships with broken GTK2 if you do a clean install, but works fine if you upgrade from an earlier version). In the latest beta, we changed the udev files (the file name now starts with "00" rather than "49") and Teensy Loader now links with GTK3.

    So before you go down super-deep Linux rabbit holes, try the easy thing first, with Arduino 1.8.13 and Teensyduino 1.54-beta7 and the latest udev rules file.

    https://forum.pjrc.com/threads/66357...no-1-54-Beta-7

    I'm like to emphasize you really should try using Teensy with Arduino as intended. Over and over again we hear comments, usually from Linux fans prefering non-GUI builds, like "modify a toolchain/ tackle a clean build from first principles". The sample makefile and source code is indeed meant to let you fiddle with the code down to the deepest level. But when it comes to getting support here on this forum, the smart approach is to make sure you're using the exact same code we are. It's almost impossible to help if the code you're compiling or the toolchain you're using are different from the "known quantity" delivered by those installers. If you've changed anything, even anything "trivial" which shouldn't matter, for the sake of troubleshooting, please extract a fresh copy of Arduino 1.8.13 and run the installer on it, and do your testing with that copy until things are working. Then after problems are resolved, modify to your heart's content!

  3. #3
    Junior Member
    Join Date
    Apr 2021
    Posts
    2
    Thanks Paul, installing 1.54-beta7 resolved the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •