2394522_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2394522_en-US

2394522_en-US

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

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.pngrkhw_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.pngrkhw_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.

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

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.

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎07-14-2026 02:32 AM
更新者: