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.
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
1. How to configure I2C with eDMA?
2. Should these callback functions configured?
3. Any demo/specificion/ application Note for I2C with eDMA?
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
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
an apology for the misunderstanding but I was referring to the general SDK, not the component one.
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.