How to make the KL26 MCU BCP bit work?

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

How to make the KL26 MCU BCP bit work?

1,178 次查看
2743294708
Contributor I

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.

pastedImage_1.png

标签 (1)
标记 (4)
0 项奖励
回复
4 回复数

1,065 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,065 次查看
2743294708
Contributor I

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);

pastedImage_1.png


 

0 项奖励
回复

1,065 次查看
2743294708
Contributor I

The TCR2 Value printed in log is:

TCR2 = 0x7000001.

 

0 项奖励
回复

1,065 次查看
2743294708
Contributor I

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?

pastedImage_1.png

0 项奖励
回复