How to synchronise two Kinetis SAI modules?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to synchronise two Kinetis SAI modules?

482 Views
chris_f
Contributor V

I'm trying to configure a KS22 to operate with two stereo ADCs and two stereo DACs with everything synchronised.

A single set of MCK, BCK and SYNC generated by I2S0_TX is used for both ADCs and both DACs.

I2S0 is working correctly:

I2S0_TCR2[SYNC]=0b00 // Asynchronous

I2S0_TCR2[MSEL]=0b01 // OSC -> MCK

I2S0_RCR2[SYNC]=0b01 // Synchronous

I2S0_RCR2[MSEL]=0b01 // OSC -> MCK 

I've read that I can use the I2S0 MCK for I2S1:

I2S1_TCR2[MSEL]=0b10

I2S1_RCR2[MSEL]=0b10

but the RM isn't clear how to sychronise the two modules?

How do I set both I2S1_TX and I2S1_RX to be sychronous with I2S0_TX?

Labels (1)
Tags (1)
0 Kudos
2 Replies

392 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Chris,

Regarding your question, I think it is dependent on your external ADC and DAC features, if the external ADC and DAC modules can only be master, no way to synchronize.

If both of the external ADC and DAC modules can be slave, it is okay for everything to be synchronized. You can have one module for example I2S0_Transmitter module to be master, in detail, the I2S0_TX_BCLK/ I2S0_TX_FS are output signals from KS22, all the other module are slave, in detail I2S0_receiver, I2S1_receiver, I2S1_transmitter are slave, you can connect the bit clock I2S0_TX_BCLK to I2S0_receiver_BCLK, I2S1_receiver_BCLK, I2S1_transmitter_BCLK of KS22 and corresponding external ADC and DAC. while you can  connect the I2S0_TX_FS to I2S0_receiver_FS, I2S1_receiver_FS, I2S1_transmitter_FS of KS22 and corresponding external ADC and DAC. The I2S0_TX_BCLK/ I2S0_TX_FS  can be from MCLK clock source or bus clock whatever. In this way, everything will be synchronized.

Hope it can help you

BR

Xiangjun Rong

0 Kudos

392 Views
chris_f
Contributor V

Hi Xiangjun Rong,

Working fine now with I2S1_RCR2[MSEL]=0b10, I2S1_TCR2[MSEL]=0b10.

Chris

0 Kudos