AnsweredAssumed Answered

USB send and receive

Question asked by aniketmarkande on Feb 6, 2018

Hello,

I am working on a K22 series controller and using latest USB stack. I have connected 2 MSD & 1 speaker on USB and trying to read the .wav file from MSD and playing it on speaker.

 

For playing sound, reading data in buffer1(1152bytes) &sending 64 bytes every 1ms and while sending audio data trying to read in buffer2(1152bytes). 

I observed on analyzer that traffic on USB bus which is coming as follows,

https://community.nxp.com/servlet/JiveServlet/showImage/2-983111-210812/pastedImage_2.png

since data is not getting sent every 1ms, sound played is distorted. (Why data is not being read from MSD after sending audio data in 1ms time frame?)

and i want to achieve something like as follows

https://community.nxp.com/servlet/JiveServlet/showImage/2-983111-210805/pastedImage_1.png

i was not able to do this although i am using the usb stack APIs.

Please let me know how i can implement this.

 

Thanks & Regards,

Aniket

Outcomes