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

Thread: Teensy 4.0 USB Host Mode

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    7

    Teensy 4.0 USB Host Mode

    Hi everyone,

    I recently asked about the Teensy 3.2 Host Mode and as it turned out to be infeasible, general suggestion was to use the Teensy 3.6 or Teensy 4.0 (https://forum.pjrc.com/threads/58005...library-status). After finding a way to actually get a Teensy 4.0 within a reasonable time and trying to research a bit more about the Teensy 4.0, I did not find anything about the usage of the host mode and no library support or documentation. So I'm asking the same question as with the Teensy 3.2 for the Teensy 4.0. Are there any successful projects for USB host mode or any reasonably stable library for the Teensy 4.0? I would really like to use a Teensy for my project for many different reasons, but the USB implementation is not my main focus and I cannot spend too much time on this. I just need something that works without too many hiccups and within around 10-20 hours with a medium skill level from my part.

    If the answer is not a rather clear yes, I will probably have to skip USB functionality entirely which would suck.

    Also would I need the USB Host Cable and what is so special about this cable? What does it do?

    Thanks in advance,
    SkryptX

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    403
    Teensy 4.0 uses the same library as Teensy 3.6, any project that works with that will work for the T4.0, it is installed as part of Teensyduino and is called USBHost_t36. Github page is here: https://github.com/PaulStoffregen/USBHost_t36

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,970
    Quote Originally Posted by SkryptX View Post
    Hi everyone,

    I recently asked about the Teensy 3.2 Host Mode and as it turned out to be infeasible, general suggestion was to use the Teensy 3.6 or Teensy 4.0 (https://forum.pjrc.com/threads/58005...library-status). After finding a way to actually get a Teensy 4.0 within a reasonable time and trying to research a bit more about the Teensy 4.0, I did not find anything about the usage of the host mode and no library support or documentation. So I'm asking the same question as with the Teensy 3.2 for the Teensy 4.0. Are there any successful projects for USB host mode or any reasonably stable library for the Teensy 4.0? I would really like to use a Teensy for my project for many different reasons, but the USB implementation is not my main focus and I cannot spend too much time on this. I just need something that works without too many hiccups and within around 10-20 hours with a medium skill level from my part.

    If the answer is not a rather clear yes, I will probably have to skip USB functionality entirely which would suck.

    Also would I need the USB Host Cable and what is so special about this cable? What does it do?

    Thanks in advance,
    SkryptX
    In the IDE under File / Examples scroll down to USBHost_t36. The USB Host hasrdware on T_3.6 and T_4 are the same and all testing to date indicated it works on both.

    There are a couple of USBHost related threads that likewise apply to both as they were developed during T4 beta using both.

    Please search for MSC, and Bluetooth, and Ethernet. The first and last have been active recently - Bluetooth was done some months back and not added to recently.

    The T_3.6 has inside pins that connect the USB lines to a USB Host cable - one of which PJRC sells to see it - and that can easily connect to low power devices or to a powered hub as needed. The T4 under pads for USBHost require some sort of breakout to make usable - unless direct soldering and connecting to a powered hub might work. For USBHost to be properly supported takes some ESD protection and power switching as done on the PJRC Beta breakout - or current loglow Beta breakout undergoing revision - or some other OSH Park published board or a Tindie board - which are in a recently active thread for T4 breakouts I'm on my way to post in.

    Here is the MSC thread: pjrc.com/threads/55821-USBHost_t36-USB-Mass-Storage-Driver-Experiments

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    7
    Quote Originally Posted by defragster View Post
    In the IDE under File / Examples scroll down to USBHost_t36. The USB Host hasrdware on T_3.6 and T_4 are the same and all testing to date indicated it works on both.

    There are a couple of USBHost related threads that likewise apply to both as they were developed during T4 beta using both.
    That's good news. It also seems to have quite good examples in this repo.

    Quote Originally Posted by defragster View Post
    The T_3.6 has inside pins that connect the USB lines to a USB Host cable - one of which PJRC sells to see it - and that can easily connect to low power devices or to a powered hub as needed. The T4 under pads for USBHost require some sort of breakout to make usable - unless direct soldering and connecting to a powered hub might work. For USBHost to be properly supported takes some ESD protection and power switching as done on the PJRC Beta breakout - or current loglow Beta breakout undergoing revision - or some other OSH Park published board or a Tindie board - which are in a recently active thread for T4 breakouts I'm on my way to post in.
    I will almost certainly just solder a USB cable to the bottom. This board will only be used with one attached peripheral that does not change at all and will most likely also not have any mechanical stress applied to it. And the power will come from a standard battery bank and I think I'll get away with just supplying the power to the USB lines directly. I will not experience any of the nastiness from pulling in and out or too high current on the power since the peripheral also has safety and will never consume more than 500mA from the USB, because of its own charging restrictions.

Posting Permissions

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