AnsweredAssumed Answered

"USB On-The-Go Host" or "USB Host"?

Question asked by Pilot B on Apr 2, 2018
Latest reply on Apr 4, 2018 by waclawek.jan

Hi everyone,

 

I'm working on a board based on STM32F4XX. We plan to support USB Host on it for communication(CDC). I found there are "USB On-The-Go Host" and "USB Host" libraries. I'm not sure which one to use.

 

First, I downloaded examples from STM32CubeF4

http://www.st.com/en/embedded-software/stm32cubef4.html  

and found "STM32Cube_FW_F2_V1.7.0\Middlewares\ST\STM32_USB_Host_Library" V3.2.2. That is the "USB Host" library.

 

Later, I also found "USB on-the-go Host and device library (UM1021)"

http://www.st.com/en/embedded-software/stsw-stm32046.html

This is "USB On-The-Go Host" library V2.2.0. I found this is very different from the above "USB Host" Library such as architectures, files and folder structures. For example, this is from usb_conf.h of the sample project:

/****************** USB OTG MODE CONFIGURATION ********************************/
#define USE_HOST_MODE
//#define USE_DEVICE_MODE
//#define USE_OTG_MODE

 

Interestingly, there is another product in our company that supports "USB Device". That product used the "USB On-The-Go Device" library. So it has this in the usb_conf.h:

/****************** USB OTG MODE CONFIGURATION ********************************/
//#define USE_HOST_MODE
#define USE_DEVICE_MODE
//#define USE_OTG_MODE

As the engineer who worked on that product no longer works for the company any more, I don't know why he used "USB On-The-Go Device" library instead of the "USB Device" library. 

 

So my questions:

1. Should I use "USB On-The-Go Host" or "USB Host" library? Or either one will work?

2. If I'd like to have an eval board to try this USB Host, what is the cheapest board I should use? For example, will this "STMicroelectronics P-NUCLEO-USB002" work?

P-NUCLEO-USB002 STMicroelectronics | Development Boards, Kits, Programmers | DigiKey 

 

Thanks everyone!

Outcomes