AnsweredAssumed Answered

I2C DMA Slave Transmitter

Question asked by Martin Leclerc on Nov 16, 2015
Latest reply on Dec 1, 2015 by Martin Leclerc

I am trying to improve the performance of my I2C slave driver by using the DMA mode.

The board is design with a KL17 MCU.


When the I2C Slave is transmitting data, the DMA option 'Cycle-Steal' is activated.

And when the DMA channel counter reach zero, an interrupt is generated.

So far it's working as expected.


But the Slave doesn’t know in advance how many data bytes are to be transmitted to the master device.

And all the regular I2C interrupt seems to be disabled when the DMA is activated with the mode 'Cycle-Steal'.


Is it possible to have an interrupt to detect the end of transfer (NAK) when the 'Cycle Steal' mode is activated ?


The only solution I found so far is by polling the I2C status register for RXAK with a While loop.

I want to free my CPU as much as possible, this is why the polling mechanism is not a good solution.