Page 2 of 2

Re: STM32 USB Host?

Posted: Tue Apr 23, 2013 12:01 am
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

Re: STM32 USB Host?

Posted: Wed Jan 08, 2014 5:19 pm
by littlekoala
Hi, is there any progress about this USB Host? would be great to have it.

Cheers.

Re: STM32 USB Host?

Posted: Wed Jan 08, 2014 7:11 pm
by Giovanni
Hi,

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

Giovanni

Re: STM32 USB Host?

Posted: Thu Sep 04, 2014 7:06 pm
by a.mazzanti
Hi,

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

Thanks,

Antonio

Re: STM32 USB Host?

Posted: Thu Sep 04, 2014 7:31 pm
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

Re: STM32 USB Host?

Posted: Thu Sep 04, 2014 7:43 pm
by a.mazzanti
No problem. At least we know it's doable.

Thanks,

Antonio

Re: STM32 USB Host?

Posted: Thu Sep 04, 2014 8:02 pm
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

Re: STM32 USB Host?

Posted: Thu Sep 04, 2014 8:16 pm
by Giovanni
Thanks for sharing :)

Giovanni