How to make the KL26 MCU BCP bit work?

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

How to make the KL26 MCU BCP bit work?

1,171 Views
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

Labels (1)
0 Kudos
Reply
4 Replies

1,058 Views
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 Kudos
Reply

1,058 Views
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 Kudos
Reply

1,058 Views
2743294708
Contributor I

The TCR2 Value printed in log is:

TCR2 = 0x7000001.

 

0 Kudos
Reply

1,058 Views
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 Kudos
Reply