STM32 USB Host?

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
inca
Posts: 37
Joined: Mon Apr 22, 2013 12:08 am

Re: STM32 USB Host?

Post by inca »

While the FreeBSD USB stack is nice in that the Host/Device code is symmetric, it may be too much for embedded systems in general right now. A lightened up version of the FBSD USB architecture is likely a good end goal eventually, but perhaps not the easiest to start.

USB On-The-Go(OTG) appears to be the most applicable to ChibiOS right now.

WP excerpt:
USB On-The-Go introduces the concept that a device can perform both the master and slave roles, and so subtly changes the terminology. With OTG, a device can be either a host when acting as the link master, or a peripheral when acting as the link slave. The choice of whether to be host or peripheral is handled entirely by which end of the cable the device is plugged into. The device connected to the "A" end of the cable at start-up, known as the "A-device", acts as the default host, while the "B" end acts as the default peripheral, known as the "B-device".

After initial startup, setup for the bus operates as it does with the normal USB standard, with the A-device setting up the B-device and managing all communications. However, when that same A-device is plugged into another USB system, or a dedicated host becomes available, it may become a slave.

USB On-The-Go does not preclude using a USB hub, but it describes host/peripheral role swapping only for the case of a one-to-one connection where two OTG devices are directly connected. Role swapping does not work through a standard hub, as one device will act as the host and the other as the peripheral until they are disconnected.


OTG is a USB 2.0 supplement, consisting of the following protocols
  • Attach Detection Protocol (ADP)
  • Session Request Protocol (SRP)
  • Host Negotiation Protocol (HNP)

OTG Device Roles
  • OTG A-device
    • Power supplier
    • Default USB Host
  • OTG B-device
    • Default USB Peripheral (may be exchanged via HNP)

OTG Targeted Peripheral List (TPL)
TPL lists the output power, speeds, protocols and device classes for products supported by the targeted host.

===
So Giovanni's guidance remains:
  • API: What should we keep and what should we throw out?
  • Reference Implementations: Collect links to relevant ARM-compatible USB-OTG and USB-Host codes.
    • Potentially avoid the STM32 F4 USB-OTG lib, for clarity's sake
littlekoala
Posts: 8
Joined: Wed Jan 08, 2014 5:15 pm

Re: STM32 USB Host?

Post by littlekoala »

Hi, is there any progress about this USB Host? would be great to have it.

Cheers.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 USB Host?

Post by Giovanni »

Hi,

No news so far, I know for sure somebody integrated the ST library for USB host.

Giovanni
a.mazzanti
Posts: 2
Joined: Thu Sep 04, 2014 7:04 pm

Re: STM32 USB Host?

Post by a.mazzanti »

Hi,

Giovanni, do you have any further information about who implemented it?

Thanks,

Antonio
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 USB Host?

Post by Giovanni »

I can't disclose any detail in public, it has been a private development contract so I doubt the code could be shared.

Giovanni
a.mazzanti
Posts: 2
Joined: Thu Sep 04, 2014 7:04 pm

Re: STM32 USB Host?

Post by a.mazzanti »

No problem. At least we know it's doable.

Thanks,

Antonio
ErikZalm
Posts: 10
Joined: Fri May 11, 2012 9:10 pm

Re: STM32 USB Host?

Post by ErikZalm »

I have the STM32 host stack running under ChibiOS 3.

I used this project as a starting point:
https://github.com/ErikZalm/uubt
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 USB Host?

Post by Giovanni »

Thanks for sharing :)

Giovanni
Post Reply