Teensy 4.1 no serial port when connected to Raspberry Pi 4

I'm having trouble understanding the logic of why Teensy 3.6 always enumerates, and why Teensy 4.1 -using the same USB cables as Teensy 3.6 - has reliability issues but only on rpi4.

They're quite different, even though the boards look similar.

Teensy 3.6 USB is 12 Mbit/sec.

Teensy 4.1 USB is 480 Mbit/sec.
 
You can make Teensy 4.1 run at 12 Mbit/sec if you edit usb.c. Find that file on your PC and look for this line:

Code:
        //USB1_PORTSC1 |= USB_PORTSC1_PFSC; // force 12 Mbit/sec

If you uncomment this line and then upload your program, it will then limit the USB speed to only 12 Mbit/sec. Then if you plug it into your Raspberry Pi, you can test whether the speed is a factor.
 
You can make Teensy 4.1 run at 12 Mbit/sec if you edit usb.c. Find that file on your PC and look for this line:

Code:
        //USB1_PORTSC1 |= USB_PORTSC1_PFSC; // force 12 Mbit/sec

If you uncomment this line and then upload your program, it will then limit the USB speed to only 12 Mbit/sec. Then if you plug it into your Raspberry Pi, you can test whether the speed is a factor.

That sounds like a useful test. Where do I find the usb.c file? All my searches are coming up with usb-c instead of the .c file

Ah, C:\Users\myName\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.57.2\cores\teensy4
 
Last edited:
After forcing teensy 4.1 to use full speed USB (12 Mbit/s), it's working, using the same 6ft USB cable that was causing trouble before.

Now - what are the implications of running teensy 4.1 at full speed instead of high speed? Pardon the dumb question, but how common is it to use most of that USB bandwidth? I suppose if I am asking, I am probably nowhere near the limit.

And next steps (research for me) is cable impedance and if there is a low pass filter on the USB hub. It has _got_ to be something to do with high speed USB devices + cable length on the rpi's USB hub (custom cm4 carrier board with USB2514B) since all of this is a nonissue on win x64. I don't think they make higher quality USB cables than the one I am currently using and I don't particularly want to solder my own USB cables - although I might, as a test - so I'm guessing it's something to do with the 2514B hub design.
 
Can you get access to the RPi's USB port, for testing whether the problem happens always with RPi versus only when connected through the hub chip?
 
Can you get access to the RPi's USB port, for testing whether the problem happens always with RPi versus only when connected through the hub chip?

Not really. The 2514 is a QFN chip and the pads are 0.2mm. It's not easy to cut traces that big and patch wires in.

After forcing teensy 4.1 to use full speed USB (12 Mbit/s), it's working, using the same 6ft USB cable that was causing trouble before.

My programmer has confirmed we're nowhere near needing even 12 Mbit/s, so I'm going to consider this issue solved for now.
 
Back
Top