8

Atmel プロセッサの USB ホスト ポートを使用して単一の USB デバイスに接続しようとしています。メモリが限られており、OS がない組み込みシステムがあります。単一の USB スレーブ デバイスに接続するためのシンプルな専用ホストを実装したいと考えています。

簡単な USB ホストの実装を教えてくれる人はいますか?

プロセッサは Atmel AT91SAM9261S です。

4

3 に答える 3

1

I've used the RTUSB-32 stack from On-Time. It is a small foot print stack and was easy to integrate into our environment and the documentation is good. They abstract out nicely the needed support so that it is completely platform and OS neutral and has a relatively small number of hooks you need to provide to it - ie: It is well encapsulated.

Since you get all the source, you'll see that the code is not the most well constructed code in the world, certainly, but it can be deciphered without a whole lot of work if needed. In any case, it basically "just works" without issue. We have had it running in some products for a few years now and have only run into one compatibility problem with the stack where it wasn't quite doing auto-discovery quite right with a certain type of USB 2.0 hub. We sent them a sample of the hub and they had a patch for it within a few days. Hard to beat that. Overall, I consider it a good value and certainly beats sitting down to write the thing from scratch.

于 2009-02-22T16:27:34.877 に答える
1

まず、私の記憶が正しければ、AT91SAM9261S にはOHCI USB コントローラーが搭載されており、少なくとも単純なホスト コントローラー ドライバーを実装する必要があります (Linux の実装を参照してください)。お使いのデバイスが使用する転送タイプによっては、それほど難しくないかもしれません - 非常に難しい場合もあります:) USB スタックを実装する簡単な方法はありません。コントローラ ドライバを実装した後、USB デバイスの列挙部分に注意する必要があります。USB 仕様の第 9 章を参照してください。その後、デバイス ロジックの実装を開始できます。

単純化されたユースケースでは、省略できるコードがたくさんありますが、適切な USB バックグラウンドがないと、何が関連して何が関連しないかを判断するのが難しくなります。

商用ソリューションを探している場合は、私の会社が提供できます。

于 2009-02-18T11:29:53.640 に答える
0

Atmel が USB デバイスのソース コードの例を提供しているため、デバイスがホストである必要がなければ、これは非常に簡単です:-P。もし私があなたなら、Atmel の AT91SAM サード パーティページで USB を愛する RTOS の 1 つを使用することを検討します。

独自の OHCI ドライバーを作成する場合、USB スタックの上位層の実装としてlibusbが役立つ可能性があります。

于 2009-02-18T15:36:35.700 に答える