S32K144

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

S32K144

3,548 次查看
LzdOo
Contributor III

I use FLEXIO as the Master for I2C, and I call the SDK library functions I2C_MasterSendData and I2C_MasterReceiveData to read the registers. I wonder why the SDA and SCL captured by the oscilloscope are not normal? What causes SCL to be not a square wave but a triangular wave?

LzdOo_0-1752452433723.png

LzdOo_1-1752452450104.png

LzdOo_2-1752452498551.png

 

 

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

3,527 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @LzdOo 

Does the flexio_i2c_s32k144 example work without modifications?

Also, for I2C communication, pull-up resistors are required on both the SDA (Serial Data) and SCL (Serial Clock) lines to ensure proper functionality. These resistors are typically in the range of 2kΩ to 10kΩ, depending on the bus speed and capacitance. Have you connected them?

 

BR, VaneB

0 项奖励
回复

3,458 次查看
LzdOo
Contributor III

Hi, VaneB

Slave address is 0x18, the address of the register to be read is 0x0F.

Based on the waveform, it seems that the code only executed the part for sending the SUB address, but did not execute I2C_MasterReceiveData. What could be the reason for this?

LzdOo_1-1752565261103.png

 

(The I2C timing sequence is as shown in the following figure.)

LzdOo_0-1752565050131.png

 

标记 (1)
0 项奖励
回复

3,389 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @LzdOo 

If possible, could you please share your project files or code? That way, I can take a closer look at the implementation and configurations to better understand and visualize the situation.

0 项奖励
回复

3,367 次查看
LzdOo
Contributor III

Hi, VaneB

Sorry, my code is encrypted. Please explain based on your experience the possible reasons for the aforementioned phenomenon.

标记 (1)
0 项奖励
回复

2,908 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @LzdOo 

You could try swapping out the 10kΩ resistors on the SCL line for ones with a lower value. Take a look at the waveform to see if there is any noticeable difference.

0 项奖励
回复

3,505 次查看
LzdOo
Contributor III

Hi, VaneB

Could you please tell me how I can modify my code?

(Both my SDA and SCL have 10KΩ pull-up resistors connected to them.)

 

标记 (1)
0 项奖励
回复