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.

968件の閲覧回数
brijesh_varghes
Contributor I

I2C DMA #nack K22F frdmk22f #i2cma

タグ(5)
0 件の賞賛
返信
1 返信

886件の閲覧回数
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 件の賞賛
返信