Why enter the ISO in/out incomplete interrupt? STM32CubeExpansion_USBAudioStreaming_V1.0.0 UAC MCU STM32L476
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-03 10:45 PM
Hi all:
If I plug in USB 2.0 mode high speed port(PC recognition Windows7), frequently enter the ISO in/out incomplete interrupt. but if I plug in USB1.0 mode full speed port,is OK. Once enter the incomplete interrupt.record or playback, audio will be interrupted.
Has anyone encountered the same problem?
Many thanks�?
/**
* @brief USBD_AUDIO_IsoINIncomplete
* handle data ISO IN Incomplete event
* @param pdev: device instance
* @param epnum: endpoint index
* @retval status
*/
static uint8_t USBD_AUDIO_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum)
{
USBD_AUDIO_EPTypeDef *ep;
USBD_AUDIO_HandleTypeDef *haudio;
uint16_t current_sof;
haudio = (USBD_AUDIO_HandleTypeDef*) pdev->pClassData;
/* @TODO check if the feedback is responsible of event */
for(int i = 1; i<USBD_AUDIO_MAX_IN_EP; i++)
{
ep = &haudio->ep_in[i];
current_sof = USB_SOF_NUMBER();
if((ep->open) && IS_ISO_IN_INCOMPLETE_EP(i,current_sof, ep->tx_rx_soffn))
{
epnum = i|0x80;
USB_CLEAR_INCOMPLETE_IN_EP(epnum);
USBD_LL_FlushEP(pdev, epnum);
ep->tx_rx_soffn = USB_SOF_NUMBER();
#if USBD_SUPPORT_AUDIO_OUT_FEEDBACK
if(ep->ep_type==USBD_AUDIO_FEEDBACK_EP)
{
USBD_LL_Transmit(pdev,
epnum,
ep->ep_description.sync_ep->feedback_data,
ep->max_packet_length);
INFO("'");
continue;
}
else
#endif /*USBD_SUPPORT_AUDIO_OUT_FEEDBACK */
if(ep->ep_type==USBD_AUDIO_DATA_EP)
{
USBD_LL_Transmit(pdev,
epnum,
ep->ep_description.data_ep->buf,
ep->ep_description.data_ep->length);
INFO(":");
}
else
{
USBD_error_handler();
}
}
}
return 0;
}
/**
* @brief USBD_AUDIO_IsoOutIncomplete
* handle data ISO OUT Incomplete event
* @param pdev: device instance
* @param epnum: endpoint index
* @retval status
*/
static uint8_t USBD_AUDIO_IsoOutIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum)
{
return USBD_OK;
}
- Labels:
-
STM32L4 Series
-
USB