Hi Earl,
I use FRDM-K22F demo board.
On monday I successfuly programmed I2S using PE (transmitter is an asynchronous master, and the receiver asynchronous slave).
Use separate pins for bclk, fs and data signals in transmitter and receiver, and connected them by 3 wires.
I did this because transmitter simulates external audio codec (master).`
I test FRF (FIFO Ready Flag) in both: receiver and transmitter, but it seems me, that have data errors (multiple copies of the same data).
| int i,j,x; |
| int rdata[0x100]; |
for(;;){
j=0;
for(i=0;i<0x2000;i++){
while(I2S0_TCSR&I2S_TCSR_FRF_MASK == 0U) {};
I2S0_TCSR|=I2S_TCSR_FRF_MASK;
while(I2S0_RCSR&I2S_RCSR_FRF_MASK == 0U) {};
I2S0_RCSR|=I2S_RCSR_FRF_MASK;
// x=I2S0_RDR0;
if(j<0x100) rdata[j++]=I2S0_RDR0;
else {j=0; rdata[j++]=I2S0_RDR0;}
}
}
By the way, what is a data channel ?
In control register 3 (I2Sx_TCR3) there are 2 TCE "Transmit Channel Enable" bits [16:17], but checkbox in PE sets only one [16].
I want to have a pass-through application (receiver data -> transmitter data), so the receiver should be asynchronous slave (fs, bclk external from pins) but what about transmitter ?
Synchronous with the receiver ?
From audio codec have only one bclk, but separate fs (ADCLRCLK, and DACLRCLK).
Thank you :-)
Roman