cancel
Showing results for 
Search instead for 
Did you mean: 

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

JBere.1
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @Community member​ ,

Welcome to th STM32 Community ��.

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

7 REPLIES 7
Imen.D
ST Employee

Hello @Community member​ ,

Welcome to th STM32 Community ��.

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JBere.1
Associate II

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
Associate II

Hi Imen,

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

JBere.1
Associate II

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��

JBere.1
Associate II

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
Associate II

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

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

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen