Skip to main content
JBere.1
Associate
Jan 10, 2021 1:13 PM UTC
Solved

H7 USB FS default conf. using STM32Cube FW_H7 V1.8.0, not working unable to enumerate USB device

H7 Default configuration using MXCube, for USB Device FS, CDC gives error unable to enumerate USB, device not accepting address 44, error -71 and Device not responding to setup address. Board is Nucleo-H743.

Using default configuration same as above, but with Nucleo-F767, works fine.

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Jan 10, 2021 5:42 PM UTC

Hello @Community member​ ,

Welcome to th STM32 Community :smiling_face_with_smiling_eyes:.

Check the peripheral clock speed, it maybe needed to increase.

Also, check the USB_OTG_FS configuration, and tried disabling VBUS sensing.

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

7 replies

Imen.DBest answer
ST Technical Moderator
Jan 10, 2021 5:42 PM UTC

Hello @Community member​ ,

Welcome to th STM32 Community :smiling_face_with_smiling_eyes:.

Check the peripheral clock speed, it maybe needed to increase.

Also, check the USB_OTG_FS configuration, and tried disabling VBUS sensing.

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
JBere.1
JBere.1Author
Associate
Jan 10, 2021 6:02 PM UTC

Hi Imen,

Thanks for contacting.

Checked Speed Peripheral (see attached, in case I missed), and Disabled VBUS Sensing(see attached).

This extrange as previous versions of H7 Hal, worked.

Anything you think I could check?

Regards

Joaquin

JBere.1
JBere.1Author
Associate
Jan 10, 2021 6:04 PM UTC

Hi Imen,

USB Peripheral Speed set to 48Mhz using RC48 and PLL3Q.

JBere.1
JBere.1Author
Associate
Jan 10, 2021 7:23 PM UTC

Hi Imen,

Tried with a new clean project (using STMCubeIde), using default without any other peripheral started, only USB, and worked. Many Thanks.

[44275.185597] usb 1-4.1: new full-speed USB device number 77 using xhci_hcd

[44275.311234] usb 1-4.1: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00

[44275.311240] usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[44275.311243] usb 1-4.1: Product: STM32 Virtual ComPort

[44275.311247] usb 1-4.1: Manufacturer: STMicroelectronics

[44275.311250] usb 1-4.1: SerialNumber: 3081356F3039

[44275.320835] cdc_acm 1-4.1:1.0: ttyACM0: USB ACM device

REgards

Joaquin:smiling_face_with_smiling_eyes:

JBere.1
JBere.1Author
Associate
Jan 10, 2021 10:42 PM UTC

Hi Imen,

Just to let you know where the error was, it have been using the function : HAL_PWR_EnterSLEEPMode, this function in F7, same program, causes no problem, but with H7, makes USB not working, the function is used with the arguments : HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);

Have you any idea, what to use in this case.

Regards

Joaquin

JBere.1
JBere.1Author
Associate
Jan 11, 2021 8:35 AM UTC

Hi Imen,

I am now writing to let know others with same issue that for H7, USB is disconnected when __WFI is executed, because USB Clock is disconnected, to avoid this we need to execute :

  __HAL_RCC_USB2_OTG_FS_CLK_SLEEP_ENABLE();

  __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE();

Regards

Joaquin

ST Technical Moderator
Jan 11, 2021 6:23 PM UTC

Thanks for sharing your update and solution. It should be helpful for the Community :)

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks