LPI2C sending TIMEOUT

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

LPI2C sending TIMEOUT

跳至解决方案
10,323 次查看
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 项奖励
回复
1 解答
10,242 次查看
shuo41
Contributor III

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

在原帖中查看解决方案

7 回复数
10,293 次查看
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 项奖励
回复
10,280 次查看
shuo41
Contributor III

But, Sending status still timeout

0 项奖励
回复
10,285 次查看
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 项奖励
回复
10,274 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @shuo41 

Could you share an oscilloscope image of SCL and SDA?

0 项奖励
回复
10,169 次查看
shuo41
Contributor III

All the problems have been solved,thinks。

0 项奖励
回复
10,232 次查看
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 项奖励
回复
10,243 次查看
shuo41
Contributor III

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