cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f746 disco USB CDC

gd_jagi
Associate
Posted on June 12, 2018 at 10:07

Hello,

I try run a USB CDC on my eval board using USB FS. I generate from cubeMX a code with CDC, set a clocks (HCLK sets on 216MHz and 120MHz but USB clk on 48MHz) A clear code from cubeMx should cause that windows find a virtual com port in device manager but it isn't like that. On oscilloscope i don't see any signal on D+ and D-... I checked a RCC register but I saw that clock for USB FS is enable. I connected a usb fs on my PC and laptop where I have windows 10 and PC where is linux ubuntu. 

Did anyone have a problem either with USB CDC on stm32f7 disco using USB FS?

In attachment is a my configurtion from cubeMx.

Best Regards,

Martin 

4 REPLIES 4
Thomas Fischer
Associate II
Posted on June 13, 2018 at 09:02

seems to be problem with vbus sensing

in USB_OTG_FS_Configuration try to disable VBUS sensing

on STM32F7discovery signal OTG_FS_VBUS is not connected to CPU (R63 not assembled),

CPU Pin is used by VCP_TX (R64)
Posted on June 14, 2018 at 22:06

Do you see any error  in the Device Manager, in the Port section?

I am looking for errors like this: 'Device Could not start. Code 10'

I am not experienced in STM32 and Windows 10.

I managed to setup many STM32 (F1, F4) VCOM on Windows 7, Windows 8.1 on 64 bit machine (usually 64 bitters cause many issues)..

What I usually do (CubeMX & Keil)

1. Install current VCOM drivers (now it's version 1.5.0) - I tested it with STM32F4 today on W8.1 64bits (Device Manager shows 1.4.0 version). But the repository shows separate exe file for W10.

2.  CubeMX settings for F4

USB_OTG_FS=Device Only

USB_DEVICE=CDC device

3. CubeMX: Set stack per your needs (not related to the USB issues)

4. CubeMx: Set Heap=0x800 (at least)  - this one is IMPORTANT

5. Keil: usbd_cdc.h - this one is IMPORTANT

#define CDC_DATA_HS_MAX_PACKET_SIZE                 64

3. Keil: usdb_cdc_if.c (not sure if these settings below are required, many USB trainings show this as requirement)

#define APP_RX_DATA_SIZE  64

#define APP_TX_DATA_SIZE  64
Posted on June 15, 2018 at 08:29

from

https://community.st.com/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fdevelopment-tools%2Fstsw-stm32102.html

...

'Starting from Windows® 10, the STSW-STM32102 driver is no more adequate and the usage of the native inbox driver is recommended.'

...

on  my PC Windows 10 Pro x64

in device manager -> USB Serial Port (COMxx) -> right click -> properties

tab general

USB Serial Device (COM xx)

manufacturer: Microsoft

tab driver

driver provider : Microsoft

driver date:  21.06.2006

driver version:  10.0.16299.334

signiture:  Microsoft Windows

driver details

C:\WINDOWS\system32\DRIVERS\usbser.sys

I use compiler GCC, cubeMX generated code for STM32F7discovery (changed VBUS sensing to disable)
Posted on June 15, 2018 at 08:40

I have VBUS sensing disabled.

Yes, you right if it comes to W10. My fault.