C++ – Simple USB host stack

c++embeddedusb

I am trying to connect to a single USB device using the USB host port on an Atmel processor. I have an embedded system with limited memory and no OS. I want to implement a simple dedicated host to interface to a single USB slave device.

Can anyone guide me to a simple USB host implementation?

The processor is the Atmel AT91SAM9261S.

Best Solution

First of all if i remember correctly AT91SAM9261S have OHCI usb controller on board and you need to implement at least simple host controller driver (you can take a look on Linux implementation) . Depending on the transfer types your device will be using it might be not very hard - to very hard :) There is no trivial way to implement usb stack. After implementing a controller driver you will need to take care usb device enumeration part take a look at Chapter 9 of USB spec. And only after this you can start implementing your device logic.

For simplified use case there is a lot of code that could be omitted, but without good usb background is hard to decide what is relevant and what is not.

Any way if you are looking for commercial solution my company can provide one.

Related Question