Simultaneous usage of both EQADC modules in MPC5777C using DMA

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

Simultaneous usage of both EQADC modules in MPC5777C using DMA

594件の閲覧回数
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

ラベル(1)
0 件の賞賛
0 返答(返信)