How to configure I2C master with eDMA channel with S32K144?

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

How to configure I2C master with eDMA channel with S32K144?

860 Views
Tyson_Hu
Contributor II

I try to use S32KDS for ARM v2.2 to configure I2C of  MCU S32K144-64pin  with DMA channel.

I configured 2 DMA channel for I2C RX and I2C TX. But only one can be selected in I2C configuration component. 

Tyson_Hu_0-1669622925661.png

Tyson_Hu_1-1669623053856.png

I found callback function LPI2C_DRV_MasterCompleteDMATransfer was installed in function LPI2C_DRV_MasterStartDmaTransfer(). And it will be invoked during DMA handler. However it would always go to the first branch and LPI2C_DRV_MasterEndTransfer() never be called. This would lead to master->i2cIdle no chance to set true in LPI2C_DRV_MasterEndTransfer(). The I2C communication failed

Tyson_Hu_2-1669623978270.png

 

1. How to configure I2C with eDMA?

2. Should these callback functions configured?

3. Any demo/specificion/ application Note for I2C with eDMA?

 

 

Tags (4)
0 Kudos
5 Replies

847 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Tyson_Hu 

In order to better support you, could you please tell me the SDK version you are using so that I can replicate the problem.

 

B.R.

VaneB

 

0 Kudos

844 Views
Tyson_Hu
Contributor II

Hi @VaneB ,

The repository of lpi2c and dmaController components are SDK_32K1xx_15.

lpi2c component version:  S32K144_SDK01

dmaController component version: S32_SDK_DMA_16CH

 

Tyson_Hu_1-1669784870826.png

Tyson_Hu_2-1669785005178.png

Tyson_Hu_3-1669785101868.png

 

 

0 Kudos

828 Views
VaneB
NXP TechSupport
NXP TechSupport

an apology for the misunderstanding but I was referring to the general SDK, not the component one.

0 Kudos

802 Views
Tyson_Hu
Contributor II

@VaneB 

Is this SDK version? S32K1xx_RTM_3.0.0?

Tyson_Hu_0-1670316787784.png

 

Tags (1)
0 Kudos

792 Views
VaneB
NXP TechSupport
NXP TechSupport

I suggest you to use for I2C driver one DMA channel to receive and transmit data (you don't need one for transmitting data and another one to receive), the request for DMA channel is changed at runtime.

0 Kudos