cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U535CET6 USBX

kumaichi
Associate III

Hello,

I'm trying to get USBX CDC Virtual COM Device configured on an STM32U535CET6.  I have downloaded and tried to play matchup with the projects out on GitHub for the U5 series but have had no success.  I'm currently stuck on:

 

/* Now check for invalid queue ID.  */
else if (queue_ptr -> tx_queue_id != TX_QUEUE_ID)
{
    /* Queue pointer is invalid, return appropriate error code.  */
    status =  TX_QUEUE_ERROR;
}

 

queue_ptr -> tx_queue_id is empty but I can't find where it's supposed to be initialized.  The project is barebones, I'm just trying to get CDC to work so I can write out to a terminal like Putty.  

I have also gone through the H7 tutorial with no luck.  It has to be something I missed but can't find it.

Going through the steps for the H7 that I found on YouTube, the U5 doesn't seem to have these methods:

 

 

HAL_PCDEx_SetRxFiFo(&hpcd_USB_DRD_FS, 0x80);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_DRD_FS, 0, USBD_MAX_EP0_SIZE / 4);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_DRD_FS, 1, USBD_CDCACM_EPIN_FS_MPS / 4);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_DRD_FS, 2, USBD_CDCACM_EPINCMD_FS_MPS / 4);

 

The only method available is:

 

HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, ....)

 

I have a legacy file, stm32_hal_legacy.h that contains:

 

#define HAL_PCD_SetTxFiFo                                  HAL_PCDEx_SetTxFiFo
#define HAL_PCD_SetRxFiFo                                  HAL_PCDEx_SetRxFiFo

 

Any help would be greatly appreciated.  I attached the entire project.

Kindest regards.

1 ACCEPTED SOLUTION

Accepted Solutions
kumaichi
Associate III

Followed this video and got it up and running in case anyone else is trying to get it to work.

STM32H5 workshop - 09 USB - USBX-CDC lab (experts) 

View solution in original post

1 REPLY 1
kumaichi
Associate III

Followed this video and got it up and running in case anyone else is trying to get it to work.

STM32H5 workshop - 09 USB - USBX-CDC lab (experts)