This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Do MSP430 DMA channels support I2C interface - data transfer?

The MSP430 datasheet - DMA trigger assignment specs show only certain DMA channels can be configured to respond to trigger events from specific USCI modules. I would like to use a DMA channel to source/accept data to a USCI module configured for I2C operation, yet I don't see any example code on how to do this. I see example code for DMA control of UART and SPI interfaces, but not for I2C. Can a USCI module configured for I2C interface operation (using the correct DMA channel) be driven using the MSP430 DMA controller?

Regards, Jim Sanchez

  • Using DMA for I2C transfers is not different to useing DMA for SPI or UART transfers. In each case, TXIFG/RXIFG are the triggers and the transfer goes from memory to TXBUF or form RXBUF to memory.

    However, the protocol overhead around I2C transfers cannot be handled by DMA and makes the use of DMA not very helpful. Also, the relatively slow baudrate allows handling in interrupt without timing problems.
    Also, DMA requires MCLK, so you cannot go into LPM1..4 if you want a fast DMA response, or have to face the wakeup time. So it makes almost no difference whether you do DMA or interrupt.

    Personally, I use DMA only for fast SPI burst transfers (e.g. reading/writing a 512 byte sector on an SD card with 16MBd)

    p.s.: the DMA channel is unimportant. All DMA channels (if your MSP has more than one) can be used for all triggers, except when triggering one DMA by completion of another DMA.

**Attention** This is a public forum