Skip to main content
Eakyo.1
Associate III
December 26, 2023
Solved

STM32H573 USBX CDC ACM(DEVICE)

  • December 26, 2023
  • 7 replies
  • 6732 views

Hello,

I am working on device USBX cdc acm with stm32h573i-dk. I am progressing my work from the example in the attachment below.

After creating the project as in this example, I ran the software and no Com Port appeared on my computer. Also no error_handler is generated and scheduler is working correctly.

I am waiting for your help on where the error is.

Best Regards.

 

https://community.st.com/t5/stm32-mcus/how-to-implement-the-usb-device-cdc-vcom-in-stm32-using-the/ta-p/599170

This topic has been closed for replies.
Best answer by KDJEM.1

Hello @Eakyo.1 ,

Thank you for bringing this issue to our attention.

Yes you are right,  the appropriate function to set USB33SV bit "HAL_PWREx_EnableVddUSB()" is missing in generated code.

I reported this issue internally.

Internal ticket number: 169024 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

7 replies

Eakyo.1
Eakyo.1Author
Associate III
December 29, 2023

Hello,

I've been working on coding for the STM32H5 series. I attempted to configure CDC ACM (Communications Device Class, Abstract Control Model) on both the H573 and H563 models, but unfortunately, it did not work, and the USB device is not recognized. However, when I tried the H503 model with CDC ACM, it worked successfully. Do you have any information on this matter?

Best Regards,

KDJEM.1
ST Technical Moderator
January 3, 2024

Hello @Eakyo.1 ,

I recommend you to take a look to this FAQ: USB device not recognized, it may help you.

Also, I advise you to get inspired from an available example like: Ux_Device_HID_CDC_ACM.

I hope this help you!

Kaouthar

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
Eakyo.1
Eakyo.1Author
Associate III
January 5, 2024

Hello @KDJEM.1,

Thank you for your response. Last week, while exploring the reference manual, I came across the PWR_USBSCR register and realized that it was necessary to set the USB33SV bit. I noticed that if this operation is not performed in the H563 and H573 series, the USB does not work.

In your opinion, why is this operation not performed automatically during the CubeMX to Code Generation stage?

Best regards,

Eren Akyol

KDJEM.1
KDJEM.1Best answer
ST Technical Moderator
January 5, 2024

Hello @Eakyo.1 ,

Thank you for bringing this issue to our attention.

Yes you are right,  the appropriate function to set USB33SV bit "HAL_PWREx_EnableVddUSB()" is missing in generated code.

I reported this issue internally.

Internal ticket number: 169024 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
Andrei Chichak
Lead
January 22, 2024

Can you add the STM32L452 to this ticket as well?

I've been trying to track this issue down for a while now, apparently CubeXXX doesn't turn on the USB voltage for the L4 series too.

 

KDJEM.1
ST Technical Moderator
January 23, 2024

Hello @Andrei Chichak ,

Thanks for reporting this issue.

I reported internally the issue for STM32L4 series.

Internal ticket number: 171432 (This is an internal tracking number and is not accessible or usable by customers).

Thank you for your contribution in STCommunity.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
AScha.3
Super User
January 23, 2024

Hi @KDJEM.1  ,

Also in H563  ( NUCLEO-H563ZI ) no working USB , need  to add HAL_PWREx_EnableVddUSB(). 

While we're on the topic...

"If you feel a post has answered your question, please click ""Accept as Solution""."
KDJEM.1
ST Technical Moderator
January 23, 2024

Hi @AScha.3 ,

Yes, you are right, this issue exists when using STM32H5 MCU.

the issue has already been reported internally.

Thank you for your contribution.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
ST Technical Moderator
March 22, 2024

Hello @Eakyo.1 @Andrei Chichak @AScha.3 ,

The issue is fixed in STM32CubeMX 6.11.0.

Thank you for your contributions in STCommunity.

Kaouthar

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
Visitor II
October 18, 2024

Hello @KDJEM.1 ,

unfortunately, it looks as if it has only been partially fixed. If the Code Generator is set to "Generate peripheral initialization as a pair of '.c/'h' files per peripheral", calling "HAL_PWREx_EnableVddUSB()" during init is still missing when using the latest STM32CubeMX (6.12.1-RC4).

KDJEM.1
ST Technical Moderator
October 18, 2024

Hello @sebreit ,

 

This issue is already reported in this post Missing HAL_PWREx_EnableVddUSB when generating peripheral initialization as a pair of '.c/.h' files .

It will be fixed in the coming release.

I apologize for any inconvenience and thank you for your contribution in STCommunity.

 

Kaouthar

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.