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

Thread: USB0 and USB1... Swapping functionality...

  1. #1
    Junior Member
    Join Date
    May 2019
    Posts
    3

    USB0 and USB1... Swapping functionality...

    Hi Teensy Community,

    I am new to this exciting world and I was wondering if someone could help.
    I am trying to basically port all USB0 (Micro-B USB connector) functionality to USB1 (Pins 5V, D-, D+ and G) on the board.

    I am using a Teensy 3.5 with a quick and easy jumper wire modification, I connected pin 3 and pin 4 together on TPD3S014.
    The board is powering up but I have not USB communication, and it makes sense since the USB data is going to K1 and J1 instead of H1 and H2.

    So, how do I redirect Teensy to operate using USB1 instead of the Micro-B connector (USB0)? Can this be done?
    I am trying to avoid using a USB cable to communicate with, I want to go with a normal 4 pin connector/cable instead.

    Thanks in advance,
    Normal.User.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    There is no 2nd USB port on Teensy 3.5. It's only on Teensy 3.6. On 3.5, those pins are analog inputs.

    The 2 USB ports on Teensy 3.6 use completely different USB controllers. Software support for the main port isn't usable for the 2nd port. The 2nd port uses a much more advanced (and complex) controller called EHCI, which is nothing like the main port's controller (which is far from simple, but not nearly as complicated as EHCI).

    On Teensy 3.6, the 2nd USB port is currently only supported in USB host mode, where you plug USB devices into it. There is currently no software for device mode. If you were to write that software, in theory the 2nd port could be used as a USB device.

    However, the bootloader only supports the main port. There isn't any way to tell the bootloader to use the 2nd port. So even if you get the 2nd port working for device mode, only on Teensy 3.6, you'd still need to use the main port for loading your program.

  3. #3
    Junior Member
    Join Date
    May 2019
    Posts
    3
    Hi Paul,

    Thanks so much for your quick reply.
    It makes totally sense.
    Do you think this may change in the future?

    Regards,
    Normal.User.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Quote Originally Posted by NormalUser View Post
    Do you think this may change in the future?
    That depends on what you mean by "this".

    Teensy 3.5 is never going to have a 2nd USB port. No amount of wishful hoping can change NXP's chip.

    The bootloader on Teensy 3.6 will never support uploading on the 2nd port. It's just not feasible to add lots more functionality into the bootloader.

    However, at some point a library providing device mode on the 2nd port of Teensy 3.6 is likely. The upcoming Teensy 4.0 board has 2 USB ports, both EHCI, and we're beta testing the USB stack now. It's highly likely that EHCI device mode code will get back-ported to Teensy 3.6.

    But the EHCI in Teensy 3.6 supports only a very limited number of USB endpoints in device mode (only 4 as I recall). Simple devices are possible, but composite devices with many interfaces won't be feasible with only 4 endpoints. Some of the more complex options you see in the Tools > USB Type menu just won't be possible with only 4 endpoints.

  5. #5
    Junior Member
    Join Date
    May 2019
    Posts
    3
    Hi Paul,
    Thanks again.
    Normal.User.

Posting Permissions

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