Slave I2C No interrupt when Data Received

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

Slave I2C No interrupt when Data Received

跳至解决方案
2,112 次查看
kensu
Contributor V

Hi,

I am using LPC1830 slave i2c, there is an issue.

For slave i2c, it use interrupt to receive data. I check the i2c waveform, the LPC1830 HW is correct, all bytes from master are received because each byte have ACK from LPC1830.

But in SW, the interrupt only happen when all transaction is complete, it means the interrupt will only 1 times no matter how many bytes send.

The correct behavior should be each byte will trigger an interrupt and the i2c slave RX buffer receive these bytes.

I don't know why only all transaction is complete, and it will trigger one interrupt.

(I had evaluate the same source code on LPC1857, it's work. But for LPC1830, it's fail)

Please give me some comment.

Thanks

Ken

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,681 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Ken,

   Thank you very much for your updated information and the root problem.

   If your question is solved, please mark the correct answer to close this post, thank you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,681 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ken Su,

     The SI is the I2C interrupt Flag, this bit is set when the I2C state changes.

pastedImage_1.png

   So, you can check your I2C state, whether the state is changed?

Besides, I find in the errata, there has some descriptions about the I2C, you can do the work-around about it.

pastedImage_2.png

Wish it helps you!

If you still have question about it, please let me know!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,681 次查看
kensu
Contributor V

Hi

Thanks you for reply,

I had find my software bug for this issue.

Thank you

Ken

0 项奖励
回复
1,682 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Ken,

   Thank you very much for your updated information and the root problem.

   If your question is solved, please mark the correct answer to close this post, thank you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复