cancel
Showing results for 
Search instead for 
Did you mean: 

odd/even bit in assynchronous

g_gulbinas
Associate II
Posted on September 03, 2016 at 15:32

Help me someone pls a little bit. I don't understand why in most isochronous assynchronous transfer with feedback examples they call feedback transfer function in SOF callback with frame odd/even setting being for the next frame. In't SOF being executed first in the frame and then host sends IN request for feedback data? Shouldn't frame odd/even bits be set for current frame or be done at the end of the frame after GINTSTS.EOPF / OTG_FS_GINTSTS.IISOIXFR interrupt?

#usb #asynchronous #audio #!stm32-!usb
11 REPLIES 11
jmf1
Senior
Posted on October 27, 2016 at 21:04

Hello SantaGG,

Did you tried to implement the solution proposed by ColdWeather? If you experimented, did it worked?

Would you accept to share the related part of your code?

My solution is not working anymore. I modified some (I believe) unrelated part of the code and I seem to have problem of conflicts between USB and DMA (to I2S) interrupt. Something gets wrong when I try to toggle bits in the IsoInIncomplete callback:

 USBx_INEP(AUDIO_IN_EP&0x7f)->DIEPCTL = (USB_OTG_DIEPCTL_EPDIS | USB_OTG_DIEPCTL_SNAK);

USBx_INEP(AUDIO_IN_EP&0x7f)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);

JMF

g_gulbinas
Associate II
Posted on October 31, 2016 at 21:30

Hi jean,

sry for not replying for so long, i will definitely share the code when i'll manage to make it work (i'm still struggling). That feedback endpoint is driving me crazy. Your proposed solution was based on stm32cube, which i didn't have experience with yet, so i analyzed it somewhat and still working on my own code.

edit.

I also have problem with toggling SNAK/EPDIS bits btw, get stuck in the cycle while waiting for OTG_FS_DIEPINTx interrupt to happen, while following routine from reference manual RM0090, p.1354.