Dear,
When the BCP bit of I2S register TCR2 of KL26 MCU is set, it is expected that "Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge". But I found that doesn't work. It menas the I2S SCLK doesn't change when the BCP bit is set or not.
Plear help to confirm how to make the BCP work.
Hi Max,
Do you debug your code and check the BCP bit, whether it is really changed to 1 or not?
Besides, could you also share some test result about your issue?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
Thanks for your reply.
I have tried several times, but all failed. Data is sent on rising edge.
The code is like this.
I2S0->TCR2 |= I2S_TCR2_MSEL(1) | I2S_TCR2_BCD(1) | I2S_TCR2_DIV(5);
//BCP = 1: output on falling edge, input on rising edge
I2S0->TCR2 |= I2S_TCR2_BCP(1);
The TCR2 Value printed in log is:
TCR2 = 0x7000001.
Dear Kerry,
I have another question about I2S. What is the meaning of the sentence highlighted in YELLOW color?
To avoid FIFO underrun, how to write the FIFO?