LPC824 I2C master not receiving two bytes in a row

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC824 I2C master not receiving two bytes in a row

934件の閲覧回数
tomato
Contributor III

Hi all,

I would like to use the LPC824 I2C in master mode to receive two bytes consecutively.

It all works correctly until the LPC824 (the master) receives the first byte (LPC send slave address and the slave acknowledges, the LPC send the register address to be read and the slave ack and then the slave sends the first byte). Then if the master had sent an ACK the slave would have sent the next byte but the LPC824 is not sending the ACK and everything stops.

What should I do to make the LPC824 to send an ACK after receiving the first byte? 

Looking at the waveforms I have seen that when the master is receiving the first byte, it only produces 8 clock pulses, so it is missing the clock pulse for the ACK bit.

Green: slave register address acknoledged

gray: first byte (with the missing ack from the master)

yellow: master sends NACK and a stop after a while

tomato_0-1685441407584.png

Do you know what I could do to solve this issue?

0 件の賞賛
返信
1 返信

881件の閲覧回数
CarlosGarabito
NXP TechSupport
NXP TechSupport

We have i2c examples in the SDK with the master and slave function, when you run these examples on the two boards, does the same thing happen?

0 件の賞賛
返信