Teensy 4.1 USB Host: No power?

blakeAlbion

Well-known member
Hi, I am trying out my USB Host cable.
Am I right to expect to see +5V on pin that says 5V?

I am not getting anything. Did I damage it by plugging in USB device? Is there anything I need to do to "turn on" the 5V power?

I have no experience with USB hosts. I'm assuming a host provides 5V (and enough current) for a USB device (or really just a hub), uses the same USB protocols that a regular USB client port uses, plus it handles discovery and connection of client devices.
But I have never done it myself so I have no confidence in what I am doing.

If I can figure this out, I would like to try using a Teensy 4 for USB Host. But I'll need to understand my responsibility for providing power.

host 1.jpg
host 2.jpg

Thanks,
Ben
 
IIRC, you have to initialize the USB host facility in software before it will enable power to the 5v pin. I.e. you have to do something like:

Code:
USBHost myusb;

void setup () {
  myusb.begin ();
}

void loop () {
  delay (10000);
  Serial.println ("testing");
}
[/code]
 
One more question, do the USB host pins overlap with other pins/timers on the board? (meaning I can't use them for something else at the same time?)
I have not see a map showing this, but I will take another look.
 
They don't. One GPIO is used to enable the USB protection switch (which also provides the 5V power) but it isn't shared with any other pin.
 
Back
Top