USB_Audio -> I2S DAC Corrupted packet on buffer roll back
I am using STMCubeIDE latest and an F411CE.
I used the MX wizard to enable USB_Audio class device set to 48000 s/s
I configured an I2S with master clock on IS2.
It plays whether I start the circular DMA in the AUDIO_Init function or in the AUDIO_CMD_START case within AUDIO_AudioCmd_FS().
However there is a corrupt packet at the end or start of the buffer.
I looked into the USB_AudioSync() method and seen it is expanding or contracting the buffer by 4 bytes. I have tried to use it, disabling circular mode and using the DMA complete call back to call USB_AUDIO_Sync() which then restarts the stream with the different size buffer.
STILL there is a corrupted packet in the buffer.
What am I missing?
I could consider it plausible that the audio sync is trying to shorten the buffer but for some reason my DMA goes straight on past it. But I am currently relaunching the non-circular I2s DMA transfer with the size that AudioSync sent me.
Also... those USB_DEVICE libraries are not easy to deal with, Eclipse disowns them and will not resolve references in them, it seems all structs as Anon type for example.
The documentation is where? The st.wiki.com has a list of function and nothing about how to use them. Older F0xx guides are out of date.
I can find exceedingly long technical papers teaching me ALL about how fancy the USB LL and stuff is and how USB works in extraordinary detail, but nowhere can I find a "User guide" to the librarys.
The example linked to here in other threads is for a very specific STM32 Discovery board which includes a codec and most of the actual code is specific and bespoke to that device. That is NOT a reference implementation for the library. It's full of BSP macros. You will only have that BSP if you bought that specific discover board.
