Can I swap USB1 and USB2 on Teensy40?

fezboy

New member
Would it be possible to configure the second USB device to be used for flashing and USBSerial? I would like to break the USB port out to a sturdier USB C port, but after preliminary research it looks like the USB pads on the bottom of the Teensy 4.0 are only usable for USB Host by default. Is this something that I could change with a (presumably large) patch to the bootloader and USB Serial libraries, or is there a hardware limitation?
 
Is this something that I could change with a (presumably large) patch to the bootloader and USB Serial libraries, or is there a hardware limitation?

No, and yes but it would take a lot of work.

The bootloader is fixed. Your code can't change it, because it's located in another chip.

But you could in theory craft a program which communicates as USB (device) Serial on the 2nd USB port. The hardware is basically the same as the 1st USB port, so in theory it's just a matter of software. In practice, that software has lots of hard coded register names for the 1st USB port, so you'll have quite a lot of work to do to make this happen.
 
Back
Top