S32K144

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

S32K144

2,866 Views
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

 

 

Tags (1)
0 Kudos
Reply
6 Replies

2,845 Views
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 Kudos
Reply

2,776 Views
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

 

Tags (1)
0 Kudos
Reply

2,707 Views
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 Kudos
Reply

2,685 Views
LzdOo
Contributor III

Hi, VaneB

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

Tags (1)
0 Kudos
Reply

2,226 Views
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 Kudos
Reply

2,823 Views
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.)

 

Tags (1)
0 Kudos
Reply