31.5.4.2 Host DMA

When using the I2C host with DMA, the ADDR register must be written with the desired address (ADDR.ADDR), transaction length (ADDR.LEN) and transaction length enable (ADDR.LENEN). When ADDR.LENEN is set to ‘1’ along with ADDR.ADDR, ADDR.LEN determines the number of data bytes in the transaction, from 0 to 255. DMA is then used to transfer ADDR.LEN bytes, followed by an automatically generated NACK (for host reads) and a Stop condition.

If a NACK is received from the client during a host write transaction before ADDR.LEN bytes have been transferred, a Stop condition is automatically generated, and the length error (STATUS.LENERR) is raised along with the INTFLAG.ERROR interrupt.

The I2C host generates the following requests:

  • Read data received (RX): The request is set when host read data are received. The request is cleared when the DATA register is read.
  • Write data needed for transmit (TX): The request is set when data are needed for a host write operation. The request is cleared when the DATA register is written.