How to make the KL26 MCU BCP bit work?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to make the KL26 MCU BCP bit work?

1,172件の閲覧回数
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,059件の閲覧回数
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,059件の閲覧回数
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,059件の閲覧回数
2743294708
Contributor I

The TCR2 Value printed in log is:

TCR2 = 0x7000001.

 

0 件の賞賛
返信

1,059件の閲覧回数
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 件の賞賛
返信