2024-11-28 06:41 AM
Hi,
I am creating a project using the STM32H523 microcontroller. One of the planned functionalities is USB CDC communication with a computer (as a virtual COM port device). Since I do not plan to use RTOS, I would like to use the classic USB library.
Initially development was done on the Nucleo board with STM32H503. Using this guide I managed to implement everything.
Problems appeared when switching to the target platform (STM32H523). The hardware was connected as on Nucleo (D+ to pin PA12, D- to PA11). CubeMX was configured analogously, the rest of the code was transferred. Unfortunately, after connecting to the computer there is no reaction, the USB device is not detected.
Does anyone have an idea what could be wrong? Is it also necessary to connect the VDET pin, and if so, where is the pin configuration in the code?
I tried to debug the problem on the HW side. There is no communication on the D+ and D- lines after connecting to the computer (the lines have GND level). I tried to manually add a 1.5k resistor between the D+ line and 3.3V. After that, the oscilloscope showed that some communication occurred, but the computer after a while displays the message "USB device not recognized". I tried different clock sources, different configurations in CubeMX, but the effect is still the same.
I will be grateful for any information and suggestions :)
Regards