cancel
Showing results for 
Search instead for 
Did you mean: 

CDC Host for STM32F407

antony
Associate II
Posted on May 12, 2014 at 22:12

Hi, I'm going to implement CDC Host on STM32F407 using OTG_HS. I looked for some examples, but not found any source, only advices how to modify MSC Host on STM32_USB-Host-Device_Lib_V2.1.0... Also I noticed, that there is a source code in 

http://www.st.com/web/en/catalog/tools/PF259243

. I generated it, but this code uses new ''hal'' drivers and I have no ideas how it will be work, when i'll add it to my project. Please, help me, have I modify MSC Host or code from Cube will work? Maybe, someone has an example of CDC Host and may give it to me? I'll be appreciate for any help! My e-mail: antony@front.ru

Anthony

#stm32f407 #cdc #host #usb
3 REPLIES 3
tsuneo
Senior
Posted on May 13, 2014 at 07:44

> CDC Host for STM32F407

Do you really need a CDC host?

Pure CDC implementation is rare on commercial products, just for MODEMs.

If your target device would be a FTDI / Prolific / SiLabs USB-UART (FIFO) chip, you need fair amount of customization over CDC host implementation, anyway.

> but not found any source, only advices how to modify MSC Host on STM32_USB-Host-Device_Lib_V2.1.0

In this topic, I gave detailed advice to make a MSC host to CDC one.

The modification is just 30 - 40 lines of code

Isn’t it enough?

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20USB%20On-The-Go%20Host%20and%20Device%20Library%20structure

> there is a source code in STM32CubeF4. I generated it

You would be better to start with existing example, than ''generating'' one using CubeMX.

\STM32Cube_FW_F4_V1.1.0\Projects\STM324xG_EVAL\Applications\USB_Host\CDC_Standalone\

STM32Cube(MX) is still under initial debug phase.

Code generation does not always produce right source.

Tsuneo

antony
Associate II
Posted on May 13, 2014 at 08:12

Thanks, I'll try to modify MSC according to your advices. I need to connect Huawei USB-modem to my device, it looks like a com-modem in windows... but first i'm planning to connect my CDC host to VCP, based on ST example.

Anthony

jwormsley
Associate III
Posted on August 20, 2014 at 18:40

I too need to connect a USB modem.  If you have any pointers on how to proceed I would greatly appreciate it.  So far I've got the demo apps to enumerate the modem, but have no clue how to actually send commands to it or receive responses from it.  

Thanks,

  Jeff.