Skip to main content
Visitor II
April 6, 2020
Question

Hi Guys, I'm looking at STM32L475VET6 to use as OTG Host for USB Flash drive and usb barcode reader.

  • April 6, 2020
  • 2 replies
  • 644 views

Hi Guys, I'm looking at STM32L475VET6 to use as OTG Host for USB Flash drive and usb barcode reader. Since USB hub is not supported by STM32L4 what is the best way to multiplex the D+/- pins of the MCU? I will always have the barcode reader connected and usb flash drive will be connected occasionally. I will have 2 separate USB connectors on the PCB, one for the reader and another for the flash drive.

thanks and regards

Tom

    This topic has been closed for replies.

    2 replies

    Super User
    April 8, 2020

    Are you sure that L4 does not support hubs? The ST USB "middleware" does not, but have you checked other software vendors such as Segger?

    I have hub working (kind of, as experiment) on STM32F446, by heavily hacking the ST drivers and some example found on github.

    If L4 is similar to, or better than F4, it should work too.

    -- pa

    TomAuthor
    Visitor II
    April 9, 2020

    Hi Pavel,

    Thanks for the tip, you are right Segger has a lib for this but for 4000Euro I would be glad to hack it myself :)

    I found TC7USB40FT USB multiplexer, it's cheap but I'm not sure how the enumeration will work while switching between slaves.

    I also found STMPS2242MTR double power supply for usb slaves which I will use to turn off the slaves while switchin D+/- lines.

    I hope this works!

    Best regards

    Tom