2021-01-10 05:13 AM
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.
Solved! Go to Solution.
2021-01-10 09:42 AM
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
2021-01-10 09:42 AM
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
2021-01-10 10:02 AM
2021-01-10 10:04 AM
2021-01-10 11:23 AM
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:
2021-01-10 02:42 PM
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
2021-01-11 12:35 AM
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
2021-01-11 10:23 AM
Thanks for sharing your update and solution. It should be helpful for the Community :)
Imen