audio i2s external mclk adjust bitclock

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

audio i2s external mclk adjust bitclock

1,551 次查看
devond76180
Contributor I

I have an imx rt1062 (teensy 4.1) setup as master i2s and have mclk set as input.

IOMUXC_GPR_GPR1 = (IOMUXC_GPR_GPR1
& ~(IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL_MASK))
| (IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(3))
| (IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(3));

IOMUXC_SAI1_MCLK2_SELECT_INPUT = 1; // 1=GPIO_AD_B1_09_ALT3, page 868 pin 23

I can see that the bit clock is synced to the incoming mclk.  The input freq is 12.5Mhz.  How do I adjust the clock to get it to 48Khz.

I have tried registers CCM_CSCMR1 and CCM_CS1CDR but they do not seem to change the bitclock.

.Thank You

0 项奖励
回复
2 回复数

1,537 次查看
gh78731
Contributor III

You have to decide what the common master clock source is for the I2S system.

The SAME clock source must be used for both the CODEC and the SAI peripheral.

If it is an external clock, then the external source must be set to 12.288 MHz (48 kHz x 256), or whatever your CODEC can use.

If it is an internal iMX clock source, then set it to 12.288 or whatever your CODEC can use, and then export the MCLK to the CODEC.

--- Graham

 

0 项奖励
回复

1,543 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi,

I highly recommend you to use our MCUXpresso Config Tools so you can see in an easier way how to modify the clocks to get the desired frequency.

As you can see in the snippet below if you select MCLK1 from SAI1_MCLK then there is no way to modify the 12.5 MHz clock that you are receiving.

image.png

An option to have 48 KHz in SAI1_MCLK1 is to modify the incoming MCLK as below.

image.png

image.png

Hope it helps!

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

------------------------------------------------------------------------------ 

0 项奖励
回复