cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX USB_FS_CDC for STM32F407IG

frank2399
Associate
Posted on June 04, 2016 at 05:32

Hi everybody,

I got a problem to implement USB CDC to STM32F407IG. Although looking into all the post here, still not solve my problem.

I am using self-made board with  STM32F407IGT6, The sch is simply connect as

MCU USB connector

PA11 D-

PA12 D+

without VBUS sensing.

This board working fine by load

tilz0R's

http://stm32f4-discovery.net/2014/08/library-24-virtual-com-port-vcp-stm32f4xx/

precompiled hex file. So I assume that the design/layout of hardware board is correct. Then I tried many kinds of setting under STM32CubeMx , with disable VBUS-sensing or even Connect PA9 to USB-VBUS on my hardware board. All fall to PC response ''unknown device'' when plug in to PC USB port. 

Do someone have experience on similar situation?

My developing environment is

- MCU: STM32F407IGT6

- STM32CubeMX V4.15.0. to generate USB_FS_CDC code

- MDK-ARM V5 

- WIN7

btw, by STM32CubeMx to generate code for my another board which used STM32F103 is working fine. I am still wondering what the difference between STM32F407. Although I tried to have same pull-up 1.5K resistor for 

STM32F407 board as 

STM32F103 board did, still fail (or get worse).

2 REPLIES 2
Walid FTITI_O
Senior II
Posted on June 08, 2016 at 15:20

Hi chen.frank.003,

You would check the clock setting and if the USB is getting correctlyh 48 MHz.

You can refer to the clock tree of the reference manual and USB/CDC example in STM32CubeF4.

-Hannibal

frank2399
Associate
Posted on June 24, 2016 at 05:35

Thanks, Hannibal.

After review that system clock setting. And sure that USB has 48MHz clock frequency. But found that I set system clock source from HSI and get only Max.16MHz for whole system, except USB is 48MHz (cause it's clock source is from PLLCLK).

Anyhow , my board is working fine with CDC now after change system clock to PLLCLK.

Thanks a lot.