KL27 USB-FS Audio Sampling Rate

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KL27 USB-FS Audio Sampling Rate

726件の閲覧回数
aglass0fmilk
Contributor I

Hello!

I've been working with the MCUXpresso SDK and USB middleware stack for a few days now.

My application requires the ability to stream 16-bit ADC readings from a microphone to a desktop program through USB audio.

The application's sample rate is 22.050kHz at 16-bits. I am using a KL27Z4 with 128kB Flash and 32kB RAM.

I have the "USB_Audio_Generator" example running on the KL27 right now, however the example application transfers only 8-bit audio at 8kHz. My understanding is that even at 22.050kHz and 16-bits, I would not be using anywhere near the theoretical maximum bandwidth of USB full-speed.

My question is this: what modifications would be necessary to the example in order to achieve 16-bit depth at 22.050kHz as opposed to the original 8-bit @ 8kHz?

I am somewhat familiar with the basics of USB (endpoints, transfer types, etc). I have tried modifying the device descriptor files and have successfully changed it to 22050Hz sampling rate and 16-bit depth, but no audio streams out of the device. I have also tried changing the maximum packet size for the isochronous transfer endpoint to 1023 (maximum allowed, as opposed to original 8)


The device enumerates correctly but I cannot record anything with it or hear anything when I pass through to my speakers.

Let me know your ideas!

Thanks.

ラベル(2)
タグ(2)
0 件の賞賛
返信
1 返信

546件の閲覧回数
mjbcswitzerland
Specialist V

Hi

the uTasker project (open source and free) contains USB audio operation of this fashion as a complete design which works on the KL27 (almost fully DMA driven, even on KL parts).
The design has been proven in >two years of intensive product use on the same KL27 that you use and so is not only an immediate solution but also without reliability issues/surprises and solves USB host synchronisation issues which will usually cause typical examples to be inadequate for real products.

Finally, it allows the complete process to be simulated (using Visual Studio) to test all operation (including USB, Interrupts, DMA etc.) which aids in further development, testing, debugging or code reviews to give faster development of higher quality solutions.

Documentation at http://www.utasker.com/docs/uTasker/uTaskerUSB_Audio.pdf
Video showing a typical use at https://www.youtube.com/watch?v=n-GABeILGV8&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&index=6 including display of the audio signal as oscilloscope and frequency spectrum [48k, 16 bit].

Regards

Mark

http://www.utasker.com/kinetis/FRDM-KL27Z.html
http://www.utasker.com/kinetis/Capuccino-KL27.html

0 件の賞賛
返信