2025-10-20 5:13 AM - last edited on 2025-10-20 5:28 AM by Andrew Neil
Hello,
I'm trying to implement a usb cdc device on a stm32WBA65RI-DK1 board but seems like the only usb otg supported is the usb st-link port CN6 that supports USB_OTG_HS. Using cube mx, Im trying to configure that usb as device with the vbus enable, to force that usb port to be powered through the usb, but the MX is not letting me do such thing. Can someone explain why I'm not able to enable it?
I wanted to ask if the CN5 connector could be enabled as USB_OTG_FS, although I dont see anything about that in the board manual nor in the mx.
Thanks in advance.
Best regards,
Rares
2025-10-21 12:55 AM
Hello Rares,
The CN5 connector can be used as a USB_OTG_HS, you don't have to use the ST-Link one. You should be able to use it by enabling USB_OTG_HS on PD6 (USB_OTG_HS_DP) and PD7 (USB_OTG_HS_DM). If you need VBUS, it should be on PD9 so make sure you deactivate the led LD5 associated with PD9 in the GPIO section which is in conflict with it. You'll also need the USBX stack activated with CDC ACM device class in the Middleware section.
You can refer to the USBX examples available for NUCLEO-WBA65RI in the STM32WBA Cube Firmware package, they should work all the same on STM32WBA65I-DK1. You can also take a look at our USB Class audio github project on STM32WBA65I-DK1, which can give you a USBX standalone project on this discovery kit.
Best Regards,
Tom.