Hi everybody!
I am using the frdmkl25z_usb_examples_usb_device_audio_generator_bm as a starting point to develop a full duplex USB audio interface on the FRDM-KL25Z evaluation board.
It wasn't a big deal to change the original example to a 48 kHz sampling rate and 16 bit samples in stereo. But then I got completely stuck setting up the audio-out endpoint and interface.
Attached is my descriptor file. While I am pretty confident that the USB descriptor is correct, I have no clue about the descriptor replica that has to be setup for the USB library to work - unluckily I couldn't find any documentation.
Could please someone with more knowledge about this USB implementation give me some hint!?
Here is also a printout of the USB BDT.
It shows that Interrupt In-Endpoint 0x81 (BD starting at 0x1ffff620) is never used (Volume is updated via EP 0) and that Isochronous In-Endpoint 0x82 is setup and used correctly (BD at 0x1ffff650).
Isochronous Out-Endpoint 0x02 (BD at 0x1ffff640) has been set, but for unknown reasons never starts to work. More, the out-ep does not cause any USB Interrupts, while the working in-ep does nicely every 1 ms.
Any help is welcome!
Thanks,
Michael
Original Attachment has been moved to: usb_device_descriptor.c.zip
解決済! 解決策の投稿を見る。
Since no one could give me an answer, I will answer myself how I solved the problem - just in case someone else has it too.
Here's the answer: Forget about the above example, through the lack of documentation you will just loose time - and who knows if it works anyway, I have my doubts. Instead download the mbed USB device stack (search in mbed.com) and implement it manually. The rest is a piece of cake.
Have fun!
Micheal
I missed your first post but would have suggested using the uTasker USB audio device which has been used successfully in products (eg. KL27 but operates on all parts with USB) and also solves synchronisation issues. Doc: http://www.utasker.com/docs/uTasker/uTaskerUSB_Audio.pdf
It is easy to use because it can be completely simulated with Visual Studio (including USB operation, interrupt and DMA).
There is a video here showing it as a USB speaker (this is with K22F), whereby the audio stream is tapped into to display the signal and its FFT in a screen: https://www.youtube.com/watch?v=n-GABeILGV8&feature=youtu.be
Regards
Mark
Since no one could give me an answer, I will answer myself how I solved the problem - just in case someone else has it too.
Here's the answer: Forget about the above example, through the lack of documentation you will just loose time - and who knows if it works anyway, I have my doubts. Instead download the mbed USB device stack (search in mbed.com) and implement it manually. The rest is a piece of cake.
Have fun!