Skip to main content
Mvan .31
Associate II
Feb 28, 2020 7:39 PM UTC
Question

STM32H745 USB CDC not working on M4 core

Hi,

So with STM32CubeMX is it possible to generate a working CDC (VCP) for the M7 core.

I'm unfortunately unable to generate one for the M4 core.

What I did (for Nucleo-144):

Selected STM32H745ZITx

System Core->RCC: HSE to bypass mode.

Connectivity->USB_OTG_FS: Mode Device_Only + VBUS sensing.

Middleware->USB_DEVICE_M4: Class for FS IP to CDC.

Clock configuration so that HSE input is 8mhz, CPU1 480MHz CPU2 240MHz and USB 48MHz.

This works for M7 but not for M4 core.

M4 core results in either of the two errors in Windows Device Manager:

As "USB Serial Device":

This device cannot start. (Code 10)

{Device Timeout}

The specified I/O operation on %hs was not completed before the time-out period expired.

As "Unknown USB Device":

Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.

Attached is the generated projects for M7 core and M4 core. M7 working and M4 not working.

Any ideas? I played with a lot of settings already like enabling/disabling VBUS sensing, changing to HSI etc.

This topic has been closed for replies.

4 replies

Mvan .31
Mvan .31Author
Associate II
Mar 3, 2020 2:04 PM UTC

Anyone?

j.p.mateos
Associate
Apr 12, 2020 6:44 AM UTC

Just saw your question, got the same problem.

Just change this line at the "usbd_cdc.h" file.

#define CDC_DATA_HS_MAX_PACKET_SIZE        64 /* Endpoint IN & OUT Packet size */

And don't forget to add.

#include "usbd_cdc_if.h"

Hope this helps a month later

Mvan .31
Mvan .31Author
Associate II
Apr 20, 2020 5:29 PM UTC
Itamar Eliakim
Associate II
Apr 22, 2022 7:28 AM UTC

Hi @Mvan .3​ ,

Could you please tell us a bit more about your solution?

I am getting the same error.

Thx.