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.

LP-MSPM0G3507: I2C using DMA not triggering interrupt

Expert 1760 points
Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507, SYSCONFIG

Hi geeks,

I'm working on Launchpad MSPM0G3507.

I have implemented the I2C without DMA for write data interface with an 8 bit eeprom device. It works fine.

Now I tried to implement I2C with DMA, which is not writing data to i2c slave. May be the issue is with the configuration I think.

Since from the datasheet it is not clear after reading through the DMA engine.

I request to share some example project which uses DMA for I2C.

Thank you in advance.

  • Hi Ddnr,

    We do not currently have an example project using DMA for I2C.

    Have you used the Sysconfig tool in order to configure the DMA transfer? Could you post an image of the configuration, as well as the code you use to start the DMA?

  • Hi OBrien,

    Thanks for the immediate response.

    We are not using sysconfig. We use vscode for our development and create MACROS from the registers.

    Yes, I can share the configuration snippet.

  • My first recommendation would be to utilize the same steps that Sysconfig does take to initialize the DMA, even if you are choosing not to use Sysconfig in your final project. This will guarantee that the initialization code is complete and correct. 

    Once you have done this, it is much more likely that your code will work quickly, and it will be easier to debug. Please let me know if you are having issues doing this.

  • Hi,

    Below is the configuration for I2C with DMA (single transfer). Please let me know if this is as recommended.

  • Hi Ddnr,

    Without knowing what your macros map to, I could not tell you if this is correct. Based on the macro names, it does look like you are missing some initialization settings. 

    The general process should be:

    initialize transfer mode, destination and source address increment, destination and source data width, trigger, and trigger type.

    Then, set source address, destination address, transfer size, then enable the channel.

    These are the steps that the examples in our SDK take in order to properly initialize the DMA system.