AnsweredAssumed Answered

I2S/SAI audio clock setting

Question asked by Eddie Chang on Jun 26, 2014
Latest reply on Jul 3, 2014 by likong

Hello All,

 

We build an platform by using TWR-K60F120M(Rev.C ) with my own CODEC board, connected with wire from TWR's female header A21~A25( I2S signal and clock), my system are CW10.5 and MQX4.0.0.

 

I test the "i2s_demo" under "mqx" subfolder, insert a microSD card including a 48kHz/24bit stereo wav file then download the project. when I type play command on shell, I can see the wav file is playing well on console( there are some error message stop on "initial_codec" and "setup_codec", so I commented them out to pass it), but the clock signal are not correct. so I change "CLK_MULT" from 384 to 256 then I could measure that MCLK = 12.288MHz and BCLK = 3.072MHz( system use EXTAL_MAIN 50MHZ by default, jumper J18 on and J6 off), that's what I need but LRCK is 64kHz, it's very weird because I had checked the wav file header and played by some audio player, the sample rate is 48kHz, but sample rate on shell message is 51200Hz, and 64000Hz on LRCK pin as I mentioned earlier.


So I surveyed AN4520 and AN4800 which document explain about I2S application on Kinetis, the chapter 3.1 have some key words like I2SSRC, but I can't found any clue on K60P144M150SF3RM.pdf, even SIM_SOPTx didn't have any register about I2S/SAI.

 

We would like to know how to control I2S signal including:

 

1. 3 clocks(MCLK' BCLK and LRCK).

2. 2 data(DIN' DOUT)'s from PTA to PTE.

3. Change clock source from 50MHz(Y1) to 12MHz(Y5) and use it.

 

Any help will be appreciated!

 

Kind regards,

 

Eddie

Outcomes