LPC824 I2C master not receiving two bytes in a row

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

LPC824 I2C master not receiving two bytes in a row

285 Views
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 Kudos
1 Reply

232 Views
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 Kudos