Skip to main content
Visitor II
February 28, 2020
Question

STM32H745 USB CDC not working on M4 core

  • February 28, 2020
  • 4 replies
  • 1798 views

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 .31Author
    Visitor II
    March 3, 2020

    Anyone?

    Visitor II
    April 12, 2020

    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 .31Author
    Visitor II
    April 20, 2020
    Explorer
    April 22, 2022

    Hi @Mvan .3​ ,

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

    I am getting the same error.

    Thx.