How to use LPI2C peripheral with DMA without enabling any interrupts?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use LPI2C peripheral with DMA without enabling any interrupts?

91 Views
rkhw
Contributor I

Hello,

I am working with an NXP S32K396 MCU and would like to perform an LPI2C master transaction using eDMA without enabling any interrupts. In my project, I am using the LPI2C1 peripheral.

I can successfully perform LPI2C read and write transactions using DMA when the following interrupts are enabled:

  • LPI2C1_IRQn
  • eDMA0_DMATTCD_CH16_CH17_IRQn

rkhw_0-1783969062532.png

However, it appears that the RTD LPI2C DMA implementation depends on these interrupts.

In Lpi2c_Ip_MasterSendData(), the LPI2C master interrupts are always enabled by the driver:

rkhw_1-1783969133234.png

In addition, the DMA TCDs configured for TX and RX by Lpi2c_Ip_MasterTxDmaConfig() and Lpi2c_Ip_MasterRxDmaConfig() always enable the DMA major-loop completion interrupt:

Lpi2c_DmaTransferList[9u].Param = DMA_IP_CH_SET_CONTROL_EN_MAJOR_INTERRUPT;

Lpi2c_DmaTransferList[9u].Value = 1U;

 

I also noticed that in other function - Lpi2c_Ip_MasterSendDataBlocking() does not appear to configure a DMA TCD for the LPI2C transfer.

I would like to perform the complete LPI2C transmit and receive transaction using DMA while keeping LPI2C1_IRQn disabled and the eDMA channel interrupt disabled.
 
If possible, could NXP provide an example for LPI2C master TX/RX using DMA with both LPI2C and DMA interrupts disabled?
 

MCU: NXPS32K396

RTD: 6.0.0

NXP Studio: 3.6.1

 

Any help would be greatly appreciated. Thanks a lot in advance!

If needed, I can attach my project.

0 Kudos
Reply
1 Reply

54 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@rkhw

From the current driver implementation, the “Lpi2c_Ip_MasterSendData()” depend on both LPI2C master interrupts and DMA major-loop completion interrupts for transfer completion and state handling.

Therefore, you cannot enable DMA without enabling interrupts. The RTD driver does not support this usage.

0 Kudos
Reply