2014-01-06 02:24 PM
Hi Everyone,
I have written a DMA-based I2C driver that has been tested and is working reliably for normal healthy reads and writes. I get in to trouble if I try to write to a slave that does not ACK its address. In this case I want to log the error and continue on to the next transactions in my series.In my test case I write a byte to a mux successfully then I try the following:This last action is the surprise to me. I2C DMA is only for the data portion. I haven't yet cleared the ADDR condition and the DMA is complete? That byte shouldn't be transferred until I2C makes a request to the DMA controller during the data phase.
As far as I can tell the initial conditions for single byte writes is the same. At least the DMA and I2C peripherals are configured identically.Another bit of information is that DMA reads will work after the failing slave address NACK.Anyone have a theory?2014-01-07 03:20 AM
Hi
It appears to me that your code is doing exactly what you told it to do?!? ''In my test case I write a byte to a mux successfully then I try the following:Configure DMA to write the single byte and enable the stream.
Request START by writing the appropriate bit in CR
.