STM32F723 USB_CDC with DMA problems
Hello,
I'm currently working on a project using the STM32F723 Discovery kit and USB as a Virtual Com Port (VCP) in CDC mode. I'm encountering an issue related to DMA and USB_OTG_HS when using the CubeMX configuration with the "Enable internal IP DMA" flag enabled.
The problem I'm facing is that when the "Enable internal IP DMA" flag is enabled in CubeMX, the application can echo the received data from the USB CDC RX buffer for only about three times. After that, it fails to send any data out over the CDC_OUT endpoint. Upon debugging, I found that the CDC_Transmit_HS function always returns USBD_BUSY, indicating that the transmission is still ongoing.
I have verified that without enabling the "Enable internal IP DMA" flag, the application works fine and can echo the received data without any issues. However, I would like to take advantage of DMA for better performance and efficiency.
Here are some additional details about my setup:
STM32F723 Discovery kit CubeMX configuration:USB_OTG_HS peripheral enabled with "Enable internal IP DMA" flag enabled CDC class configured with appropriate endpoint sizes and buffer sizes Using the STM32CubeF7 HAL library
I suspect that there might be some additional configurations or considerations that need to be made when using DMA with USB_OTG_HS in VCP mode. I would greatly appreciate any insights or suggestions on how to resolve this issue and achieve proper DMA functionality with USB_OTG_HS.
Thank you in advance for your assistance.