2022-05-24 6:12 AM
When I set up the USB_OTG_FS peripheral in CubeMX I get the following error:
Looking at CubeMX I can't see anything wrong.
The only thing I noticed is that I can't enable VBUS Sensing. The only option is "disabled". It has a pin assigned for it, the box is ticked, but the drop down (highlighted above) only has "disabled" as the single option.
Edit: I should add that I have the correct 48MHz clock. This is the NUCLEO board.
Is the lack of VBUS detection the issue? The device is self powered. How can I figure out what the error message is referring to?
Solved! Go to Solution.
2022-05-24 10:10 AM
Hi @qua ,
Thanks for your prompt reply.
Oddly I can't reproduce the issue from my side even starting the project based on your .ioc.
In fact, in the attached .ioc Activate_VBUS is unchecked and VBUS sensing is set t Disabled.
Setting Activate_VBUS will simultaneously enable VBUS sensing.
However, I can see that you're using an old STM32CubeMX/ STM32CubeIDE versions:
Can you please try with latest STM32CubeMX version ?
Khouloud.
2022-05-24 6:36 AM
Hello @qua ,
First let me welcome you to the STM32 Community and thank you for having reported :smiling_face_with_smiling_eyes:
Normally when checking Activate_VBUS checkbox in USB_OTG_FS Mode panel, VBUS sensing will be set automatically to enabled and couldn't be disabled (only Enabled option is available).
It is a bit odd that you're setting Activate_VBUS and that VBUS sensing is always disabled (as far as I can see from the attached screenshots).
Could you please share your .ioc file for further check from my side.
Thanks in advance.
Khouloud.
2022-05-24 7:01 AM
2022-05-24 10:10 AM
Hi @qua ,
Thanks for your prompt reply.
Oddly I can't reproduce the issue from my side even starting the project based on your .ioc.
In fact, in the attached .ioc Activate_VBUS is unchecked and VBUS sensing is set t Disabled.
Setting Activate_VBUS will simultaneously enable VBUS sensing.
However, I can see that you're using an old STM32CubeMX/ STM32CubeIDE versions:
Can you please try with latest STM32CubeMX version ?
Khouloud.
2022-05-24 2:17 PM
You probably meant "prompt reply". :)
2022-05-25 4:29 AM
Thanks Khouloud, that fixed it. Should have tried that first. I didn't realize that the version of CubeMX was tied to the version of the support files for that MCU, I'm used to other IDEs where they always download the latest one.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.