cancel
Showing results for 
Search instead for 
Did you mean: 

USBx CDC ACM Dual Composite not working on STM32H723

NRedd.2
Associate III

Hello all,

 

Following up on https://community.st.com/t5/stm32cubeide-mcus/usbx-dual-composite-cdc-acm-not-working/td-p/708277, I tried to implement the same Dual CDC-ACM on STM32H723 Nucleo. I have run into the same issues.

With just one CDC_ACM class registration, the example works well. But when two classes are registered, it is gibberish on the COM port (UART). 

uint8_t UserClassInstance[USBD_MAX_CLASS_INTERFACES] = {
    CLASS_TYPE_CDC_ACM,
    CLASS_TYPE_CDC_ACM
};

 

Similar to the previous post, I have modified ux_device_descriptors.c to correctly add the endpoints to the device framework string. With this change, I am able to see two ACM devices on Linux. 

[  +5.485446] usb 1-4.3.2: new full-speed USB device number 48 using xhci_hcd
[  +0.191080] usb 1-4.3.2: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[  +0.000006] usb 1-4.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000002] usb 1-4.3.2: Product: STM32 Virtual ComPort
[  +0.000002] usb 1-4.3.2: Manufacturer: STMicroelectronics
[  +0.000001] usb 1-4.3.2: SerialNumber: CDC_ACM001
[  +0.015570] cdc_acm 1-4.3.2:1.0: ttyACM1: USB ACM device
[  +0.000352] cdc_acm 1-4.3.2:1.2: ttyACM2: USB ACM device

NRedd2_0-1723621915432.png

 

I have also increased FIFO sizes.

VOID USBX_APP_Device_Init(VOID)
{
  /* USER CODE BEGIN USB_Device_Init_PreTreatment_0 */

  /* USER CODE END USB_Device_Init_PreTreatment_0 */

  /* USB_OTG_HS init function */
  MX_USB_OTG_HS_PCD_Init();

  /* USER CODE BEGIN USB_Device_Init_PreTreatment_1 */

  /* Set Rx FIFO */
  HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_HS, 0x200);

  /* Set Tx FIFO 0 */
  HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 0, 0x40);

  /* Set Tx FIFO 2 */
  HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 1, 0x40);

  /* Set Tx FIFO 3 */
  HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 2, 0x40);
  /* USER CODE END USB_Device_Init_PreTreatment_1 */

  /* Initialize and link controller HAL driver */
  ux_dcd_stm32_initialize((ULONG)USB_OTG_HS, (ULONG)&hpcd_USB_OTG_HS);

  /* Start the USB device */
  HAL_PCD_Start(&hpcd_USB_OTG_HS);

  /* USER CODE BEGIN USB_Device_Init_PostTreatment */

  /* USER CODE END USB_Device_Init_PostTreatment */
}

 

Please find the GitHub repo here

Can someone from STM assist me please?

 

Best regards,

Navin

0 REPLIES 0