2024-01-17 04:18 PM
I'm trying to get a L452 to bring up a VCP under ThreadX/USBx, so I followed the instructions in:
It seemed pretty straight forward, it compiles, runs, creates the read and write threads, the main thread exits appropriately, but the USB device never enumerates on the bus.
Just to make sure that my board works (Nucleo with a USB-B connector wired into PA11/12, ground, and +5), I can put the processor into bootload, it comes up as a USB BOOTLOADER, and I can use CubeProg to push code. So the physical connection is okay.
I must be missing something. Is there something weird with the L4 that needs code tweaking? Can you please take a look?
I've attached the project below.
Solved! Go to Solution.
2024-01-22 01:35 PM
Apparently the issue is that the USB power never got turned on. Please see:
https://community.st.com/t5/stm32-mcus-embedded-software/stm32h573-usbx-cdc-acm-device/m-p/623032
Calling HAL_PWREx_EnableVddUSB() will fix this issue.
That is all
2024-01-22 01:08 PM
I was looking through the community threads about other instances of this issue on other processors and the typical fix is to adjust the PCD buffers. I tried a bunch of configurations including, my latest favourites:
/* USER CODE BEGIN app_ux_device_thread_entry */
MX_USB_PCD_Init();
HAL_PCDEx_PMAConfig(&hpcd_USB_FS , OUT , PCD_SNG_BUF, 0x18);
HAL_PCDEx_PMAConfig(&hpcd_USB_FS , IN , PCD_SNG_BUF, 0x58);
HAL_PCDEx_PMAConfig(&hpcd_USB_FS , USBD_CDCACM_EPIN_ADDR , PCD_SNG_BUF, 0xC0);
HAL_PCDEx_PMAConfig(&hpcd_USB_FS , USBD_CDCACM_EPOUT_ADDR , PCD_SNG_BUF, 0x110);
HAL_PCDEx_PMAConfig(&hpcd_USB_FS , USBD_CDCACM_EPINCMD_ADDR , PCD_SNG_BUF, 0x100);
ux_dcd_stm32_initialize((ULONG)USB, (ULONG)&hpcd_USB_FS);
HAL_PCD_Start(&hpcd_USB_FS);
/* USER CODE END app_ux_device_thread_entry */
It still doesn't work, nor can I figure out where these values come from. Any hints from the FAEs at ST?
<bump>
2024-01-22 01:35 PM
Apparently the issue is that the USB power never got turned on. Please see:
https://community.st.com/t5/stm32-mcus-embedded-software/stm32h573-usbx-cdc-acm-device/m-p/623032
Calling HAL_PWREx_EnableVddUSB() will fix this issue.
That is all
2024-01-23 12:18 AM
Hello @Andrei Chichak ,
Thank you for bringing this issue to our attention.
I reported this issue internally.
Internal ticket number: 171432 (This is an internal tracking number and is not accessible or usable by customers).
Thank you.
Kaouthar
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-03-22 01:07 AM
Hi @Andrei Chichak ,
The issue is fixed in STM32CubeMX 6.11.0.
Thank you for your contribution in STCommunity.
Kaouthar
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.