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.

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

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.

955 Views
brijesh_varghes
Contributor I

I2C DMA #nack K22F frdmk22f #i2cma

Tags (5)
0 Kudos
Reply
1 Reply

873 Views
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 Kudos
Reply