cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with audio feedback STM32F429 SPL

nortowianski
Associate II
Posted on March 16, 2016 at 15:44

Hi, I have a big problem with isochronous in transfer on STM32F429 with Standard Peripherial Library. On HAL library everything works fine... I need to send audio feedback over USB. I know that I have to do something that in SOF and InComplete callbacks:

static uint8_t usbd_audio_IN_Incplt (void *pdev)
{
USB_OTG_DSTS_TypeDef FS_DSTS;
FS_DSTS.d32 = USB_OTG_READ_REG32(&(((USB_OTG_CORE_HANDLE*)pdev)->regs.DREGS->DSTS));
frame_number=(FS_DSTS.b.soffn)&0x1;
if (flag == 1)
{
flag=0;
DCD_EP_Flush(pdev,AUDIO_IN_EP);
}
return USBD_OK;
}
static uint8_t usbd_audio_SOF (void *pdev)
{
if (usbd_audio_AltSet ==1)
{
feedback_data = 0x454674; //random value
USB_OTG_DSTS_TypeDef FS_DSTS;
if (flag==0)
{
FS_DSTS.d32 = USB_OTG_READ_REG32(&(((USB_OTG_CORE_HANDLE*)pdev)->regs.DREGS->DSTS));
if (((FS_DSTS.b.soffn)&0x1) == frame_number)
{
DCD_EP_Tx (pdev, AUDIO_IN_EP, (uint8_t *) &feedback_data, 3);
flag=1;
}
}
}
}

I tried change USB library (I thought that I have old version SPL), but it still doesn't work. On STM32F4 Discovery on SPL everything works fine, so I think the bug is related to HS Core. Maybe do you know what doesn't work?
0 REPLIES 0