cancel
Showing results for 
Search instead for 
Did you mean: 

USBx CDC-ACM (VCP) not enumerating on Nucleo-L452RE

I'm trying to get a L452 to bring up a VCP under ThreadX/USBx, so I followed the instructions in:

https://community.st.com/t5/stm32-mcus/how-to-implement-the-usb-device-cdc-vcom-in-stm32-using-the/tac-p/629402#M738

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

4 REPLIES 4

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>

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

 

KDJEM.1
ST Employee

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.

KDJEM.1
ST Employee

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.