cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 USB CDC not working on M4 core

Mvan .31
Associate II

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.

4 REPLIES 4
Mvan .31
Associate II

Anyone?

j.p.mateos
Associate II

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
Associate II
Itamar Eliakim
Associate III

Hi @Mvan .3​ ,

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

I am getting the same error.

Thx.