LPI2C sending TIMEOUT

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

LPI2C sending TIMEOUT

Jump to solution
1,120 Views
shuo41
Contributor III

S32K344 write and read register of FXLS8967AF(3-Axis Low-g Accelerometer) by I2C, but it  keeps showing timeout. I can not send datas successful.

0 Kudos
1 Solution
1,039 Views
shuo41
Contributor III

I find the reason why i2c send timeout,the scl pin must in input/output mode,thinks for your help.

View solution in original post

0 Kudos
7 Replies
1,090 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @shuo41 

Section 72.3.1.2 (Controller operations) of the S32K3xx Reference Manual, Rev. 7 states that "Whenever LPI2C is enabled, it monitors the I2C bus to detect when the I2C is idle (MSR[BBF]). If either SCL or SDA are low, the I2C bus is no longer considered idle. The bus becomes idle if a STOP condition is detected or if a bus idle timeout is detected (as configured by MCFGR2[BUSIDLE])..."

Double-check whether the I2C signals are correctly muxed in the SIUL2_MSCR/IMCR.

Also, measure the bus with a voltmeter or scope it with an oscilloscope. Are the SDA, SCL signals pulled up at the time you read the MSR[BBF] flag?

Do you have pull-up resistors on the bus?

 

B.R.

VaneB

0 Kudos
1,077 Views
shuo41
Contributor III

But, Sending status still timeout

0 Kudos
1,082 Views
shuo41
Contributor III

I have pull-up resistors on the bus,I measured the pull-up resistance with a voltmeter and it is working properly.

0 Kudos
1,071 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @shuo41 

Could you share an oscilloscope image of SCL and SDA?

0 Kudos
966 Views
shuo41
Contributor III

All the problems have been solved,thinks。

0 Kudos
1,029 Views
shuo41
Contributor III

But,the slave do not send ACK to master,my slave address is 0x30h。

The attachment is picture of I2C waveform。

0 Kudos
1,040 Views
shuo41
Contributor III

I find the reason why i2c send timeout,the scl pin must in input/output mode,thinks for your help.

0 Kudos