STM32H5E5: Classic USB CDC library problem
Hi, everyone,
I'm trying to implement USB CDC on an STM32H5E5 board using the classic USB device middleware.
I followed another community thread that provides the steps to do this:
How to Use STMicroelectronics’ Classic USB Device Middleware with the New STM32 Families:
When compiling the code, I encountered some errors at this point in the library:
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
{
pdev->pData = &hpcd_USB_DRD_FS;
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x40);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x80);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CDC_IN_EP , PCD_SNG_BUF, 0xC0);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CDC_OUT_EP , PCD_SNG_BUF, 0x100);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CDC_CMD_EP , PCD_SNG_BUF, 0x140);
return USBD_OK;
}The error messages are as follows
Description Resource Path Location Type
'PCD_SNG_BUF' undeclared (first use in this function) usbd_conf.c /USB_VirtualCOM/USB/Core/Src line 90 C/C++ issue
Implicit function declaration for ‘HAL_PCDEx_PMAConfig’; did you mean ‘HAL_PWREx_PVMConfig’? [-Wimplicit-function-declaration] usbd_conf.c /USB_VirtualCOM/USB/Core/Src line 90 C/C++ issue
Has anyone else encountered this exact problem? How can I fix this?
Thanks for your help!
