How to open the clock stretching for master I2C of RT1176?

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

How to open the clock stretching for master I2C of RT1176?

225 Views
vwsncr
Contributor II
 
0 Kudos
Reply
1 Reply

195 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @vwsncr ,

Thanks for your interest in NXP MIMXRT series!

I am glad to provide service for you. 

Here is a detailed documentation that you can refer to.It helps you to understand this feature. Also, please refer to the code in the SDK that enables Tx and Rx SCL clock stretching in the official SDK.

 

We don't need to send ACK/NACK manually, so enable clock stretching except ACKSTALL.
When ACKSTALL is enabled, there is no need to set either RX SCL Stall
(SCFGR1[RXSTALL]) or Address SCL Stall (SCFGR1[ADRSTALL]).
 
Code:
Gavin_Jia_0-1721036002171.png

void LPI2C_SlaveInit(:

Gavin_Jia_1-1721036066202.png

 

Best regards,
Gavin
 
0 Kudos
Reply