I am working on kinetics K22F controller. I am trying to control the I2C(master) with DMA. But the I2C communication is not stopping even if the slave is sending NACK. How can I solve it.

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

I am working on kinetics K22F controller. I am trying to control the I2C(master) with DMA. But the I2C communication is not stopping even if the slave is sending NACK. How can I solve it.

956 次查看
brijesh_varghes
Contributor I

I2C DMA #nack K22F frdmk22f #i2cma

标记 (5)
0 项奖励
回复
1 回复

874 次查看
myke_predko
Senior Contributor III

brijesh.varghese@quest-global.com‌,

Can you provide more information about your application?  I've implemented I2C with EDMA but not in the situation where the slave can return a NAK (I'm writing to an OLED).  

I'm not an expert on I2C DMA but DMA for the most part is not an intelligent operation - data is sent on the channel without regards to any conditions.  It's up to the developer to ensure that the receiver can take the data without error.  

If you have a case where the receiver can NAK arbitrarily for some reason (ie buffer full) then I think you're going to have to go to an interrupt service routine that intelligently determines whether to resend, wait to resend, restart, wait to continue the I2C data.  

Good luck,

myke

0 项奖励
回复