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

Thread: USB programming via carrier board connector instead of micro-USB

  1. #1
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    271

    USB programming via carrier board connector instead of micro-USB

    Why would I want to do such a thing?

    I've recommended the Teensy 4.1 to a company looking to make a commercial product. They will require a USB port on the enclosure for user programming and updates, preferably a USB-B. They do not wish to use a micro-USB to panel mount cable (there simply isn't room in the enclosure). Mounting the Teensy such that it's micro-USB port is exposed through a panel cutout is also not desirable.

    The USB2 (host) connections are available on header pins. If I could switch the functionality normally provided by the USB from USB1 to USB2 the solutions becomes easy because the USB connector can be mounted on the main PCB with the rest of the product jacks.

    I don't mind having to customize files in the cores repo but I'm suspicious it would require changes to the code running on the Cortex M0+ which I believe Paul considers his secret sauce.

    Perhaps I'm going about this the wrong way? I simply need the normal USB behaviour you get through the micro-USB connector to be exposed in a way that it can be moved to a USB jack on the enclosure. I would expect others attempting to use a Teensy in a commercial product would run into the same issue. It also needs to be a viable method for large scale manufacturing. E.g. no fly-wires, etc.

    Thoughts?

  2. #2
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    585
    Why not do a custom board? Then you can design the placement and type of USB connector. Manufacturing costs might actually be cheaper than using the Teensy as well - the assembly shop we use charges higher prices for through-hole components rather than surface mount.

  3. #3
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    271
    Quote Originally Posted by brtaylor View Post
    Why not do a custom board? Then you can design the placement and type of USB connector. Manufacturing costs might actually be cheaper than using the Teensy as well - the assembly shop we use charges higher prices for through-hole components rather than surface mount.
    Thanks for the suggestion. This would in fact be the long term plan, but for initial few production runs they need to keep things simple and use Paul's board directly. If a software solution is possible that would be idea.

  4. #4
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    695
    If I remember correctly both USB hardwares are exactly the same, so would it be as simple as swapping all the usb1 and usb2 definitions in imxrt.h?

  5. #5
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    271
    Quote Originally Posted by vjmuzik View Post
    If I remember correctly both USB hardwares are exactly the same, so would it be as simple as swapping all the usb1 and usb2 definitions in imxrt.h?
    I suspect that will be sufficient for USB functionality once the board is up and running, but my understanding is the the actual programming of the board over USB is accomplished by the code from the Cortex M0+. Wouldn't the code there need to be modified to USB2 as well?

  6. #6
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    695
    Honestly I’m not sure, if it does then you would have to do programming through usb1 and usb2 would only work with the sketch.

  7. #7
    Junior Member
    Join Date
    Sep 2020
    Posts
    8
    For a few runs maybe just a micro-USB adapter cable?

    Perhaps something like this

    https://core-electronics.com.au/pane...ro-b-male.html

    EDIT: nvm. Didnt read properly! "They do not wish to use a micro-USB to panel mount cable"

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,931
    Another option would be to pick up the USB pads on the bottom of the T4.1.

    That is you have the small round pads on bottom of board:


    They are the two small pads on the right hand side of image right by the USB connector.

    Could use POGO pins or could do a quick and dirty castellated like board that solders to these two pads or ...

  9. #9
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    271
    Quote Originally Posted by Blackaddr View Post
    I suspect that will be sufficient for USB functionality once the board is up and running, but my understanding is the the actual programming of the board over USB is accomplished by the code from the Cortex M0+. Wouldn't the code there need to be modified to USB2 as well?
    Paul confirms in a similar thread that the loader will only work with USB1, it can't work with USB2.

    https://forum.pjrc.com/threads/63956...-USB-host-T3-6

  10. #10
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    271
    Quote Originally Posted by KurtE View Post
    Another option would be to pick up the USB pads on the bottom of the T4.1.

    That is you have the small round pads on bottom of board:


    They are the two small pads on the right hand side of image right by the USB connector.

    Could use POGO pins or could do a quick and dirty castellated like board that solders to these two pads or ...
    Not exactly ideal but if there are no other options available I will need them to weigh this option against a panel mount adapter cable.

Posting Permissions

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