Hi Team,
I am working on the S32K344 MCU with FreeRTOS and trying to implement DMA-based I2C reception because I am facing I2C read failures during heavy CPU load.
Current Scenario:
Continuously reading around 350 bytes from an IMU sensor FIFO over I2C
Using FreeRTOS with multiple tasks running at the same priority
During long I2C reads, task switching occurs because of FreeRTOS time slicing
Due to this, the MCU I2C FIFO seems to overflow, causing I2C reception failures
So, I planned to move the I2C to DMA mode.
My Question:
With the S32K344 Reference Manual, I am able to understand the basic working concept of DMA. However, while implementing DMA for I2C, the configuration is becoming very confusing, and I am not able to successfully implement I2C communication using DMA.
Could you please provide:
Any example project for LPI2C with DMA on S32K344
The required DMA/eDMA/DMAMUX configurations
The proper flow for implementing DMA-based I2C receive
Additional Information:
MCU: S32K344
SDK Version: 3.0.0
RTD Version: AUTOSAR RTD 4.7
IDE: S32 Design Studio 3.5
OS: FreeRTOS
IMU FIFO read size: ~350 bytes continuously
Thanks.