2024-06-26 03:18 AM
Hi all
I want to enumerate a Virtual COM Port on my NUCLEO-U5A5ZJ-Q board, using USBX peripheral in standalone mode. I have followed other articles, but they either use RTOS, or a different device class.
So my question is:
How can I setup the USBX peripheral for a CDC VCP device that can send and receive without Threadx?
Kind regards ☺
2024-06-26 07:04 AM
Hello @HH_42,
USBx supports the bare-metal mode, as a reference we have provided a CDC example available under the STM32CubeH7 repo in GitHub, this example can be easily ported to U5:
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-06-27 06:31 AM
Thank you for replying @Sarra.S
I did attempt to port the code to U5, but I have a different problem. In the section of the code where the USB core is reset, the reset register causes a HAL_TIMEOUT
In one of the board's RTOS + USBX examples, the same code runs and the USBx->GRSTCTL register contains 0x80000000 (see highlighted line in image - 1419). This causes the code to proceed. However, in MY application, the very same line of code returns 0x80000001, causing the HAL_TIMEOUT
This happens even when I have a blank project with only USB_OTG enabled in Device On;y Mode and nothing else
Can you please advise on how to proceed? Or what could possibly cause this behavior?
Thanks ☺