Hi,
I have an application when we stream sampled audio through the USB port on our K66 board. We sample audio at 16Khz, 16bit, 2 channels.
The USB0 port of the K66 MCU has a limited USB buffer size of 64 bytes which just fits our needs. In fact each 1ms 64 bytes can be transferred, which in turns equals to 2 channels * 2 bytes * 16 samples.
The problem is that from time to time we lose some samples as the sampling frequency is not 100% the same as the USB polling interval frequency and thus some samples are accumulating.
How to solve this ? In other words I need to send more than 64bytes per 1ms ISO frame. Any ideas ?
Marko
Hello Marko
What you are facing is a synchronization problem when sampling on USB. There are different ways to solve this problem, that basically is, to use a synchronization method.
There are 3 different methods:
You can learn more about these synchronization methods on this post: USB audio sync.
So basically, you need to pay attention on implement a synchronization method.
I hope this can help you,
Best Regards,
Isaac
----------------------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------------------------
Hi
I have seen the recommendations for synchronisation in the linked thread: USB audio sync
but it doesn't look like any KSDK audio class references support synchronisation, in particular they look to be based on async mode but without any feedback endpoint, meaning that the drift is unacceptably high.
I was hoping tht IRC48M based clocking would adequately synchronise the USB host to the audio clock domain, thus removing the need for this, but measurements haven't proven it to be suitable: IRC48M Clock Synchronisation with USB
Are there KSDK references that achieve asyn feedback operation?
Regards
Mark