STM32F302 use USB double buffer, the transmit data will over buffer setting
Hi All
Hardware: STM32F302
Software: STM32Cube_FW_F3_V1.10.0
As below is USB descriptor
/* USB Speaker Audio Streaming Descriptor */
0x07, /*bLength: Endpoint Descriptor size*/
USB_DESC_TYPE_ENDPOINT, /*bDescriptorType:*/
AUDIO_OUT_EP1, /*bEndpointAddress: Endpoint Address (IN)*/
USBD_EP_TYPE_ISOC, /*bmAttributes: */
0xe0, /*wMaxPacketSize: 2 Byte max */
0x00,
0x01, /*bInterval: */
/* 07 byte*/
/* USB Mic Audio Streaming Descriptor */
0x07, /*bLength: Endpoint Descriptor size*/
USB_DESC_TYPE_ENDPOINT, /*bDescriptorType:*/
AUDIO_IN_EP1,
USBD_EP_TYPE_ISOC, /*bmAttributes: */
0x80, /*wMaxPacketSiz */
0x00,
0x01, /*bInterval:)*/
/* 07 byte*/
and double buffer setting
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , AUDIO_OUT_EP1 , PCD_DBL_BUF, 0x01F80118);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , AUDIO_IN_EP1 , PCD_DBL_BUF, 0x031802D8);
When use API USBD_LL_Transmit (pdev,AUDIO_IN_EP1,(uint8_t*)(mic_buffer),0x36);
to transmit data, the data will over my buffer setting, the transmit data around 400 bytes.
How to fixed this problem?
Thanks.