Simultaneous usage of both EQADC modules in MPC5777C using DMA

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

Simultaneous usage of both EQADC modules in MPC5777C using DMA

597 Views
matthiaslenz
Contributor I

Hi,

I'm trying to get both EQADC modules in the MPC5777C to work simultaneously.

I need to perform ADC conversion of 30 inputs to EQADC 0 and 24 inputs to EQADC 1. I first tried with the adc_pal driver but got fifo overflows. So I switched to the eqadc driver, using DMA mode, assuming that would be more efficient. I am able to use both modules individually, but not simultaneously, using the stock driver. I am using SDK 3.0.0.

The reason seems to be that the static arrays "dmaResultVirtualChans" and "dmaCmdVirtualChans" are shared between EQADC 0 and 1, which means that when initializing module 1 after module 0, the dma channels for module 0 are stopped.

I've attached a patch-file for eqadc_driver.c with which I got it to work.

If somebody has any suggestions how it may work without patching the driver, I would highly appreciate it.

Regards, Matthias

Labels (1)
0 Kudos
0 Replies