AnsweredAssumed Answered

eQADC with eDMA don't work well... (@MPC5644A)

Question asked by NA JONGMIN on May 19, 2015
Latest reply on May 26, 2015 by NA JONGMIN

My System

1. OS : OSEK

2. Debugger : TRACE32

3. Compiler : Wind River 5.9.4

4. IDE : Eclipse Luna

 

 

Hi,

Today I fell in incomprehensible problem.

I using eDMA for getting eQADC value.

For example..

 

ISR(GFR_EMIOS_23)

{

      Interrupt flag clear

 

      eDMA ch01 Enable

 

      eDMA ch02 Enable

 

     cFIFO SW Tringger

}

Next...

 

ISR(INTL_EMDA_01??)

{

      Interrupt flag clear

 

      my value = rQueue0[0];

}      

 

eDMA set through the RAppID.

so It is work well... until yesterday.

but.. when I added some function at ISR(INTL_EMDA_01??)..

namely,

 

ISR(INTL_EMDA_01??)

{

      Interrupt flag clear

 

      my value = rQueue0[0]

 

      my_added_function( ) : purpose = local variables copy to global variables(use memcpy)

}

 

The problem is occuring.

as you know, cFIFO and rFIFO are 1:1 matching.

but It is not matching..

 

debugging result.

 

when normal status

ex)

cFIFO[0] -> eQADC -> rFIFO[0]

cFIFO[1] -> eQADC -> rFIFO[1]

cFIFO[2] -> eQADC -> rFIFO[2]

cFIFO[3] -> eQADC -> rFIFO[3]

 

TNXTPTR = 0, RFCTRx = 0,  POPNXTPTRx = 0

TNXTPTR = 1, RFCTRx = 0,  POPNXTPTRx = 1

TNXTPTR = 2, RFCTRx = 0,  POPNXTPTRx = 2

TNXTPTR = 3, RFCTRx = 0,  POPNXTPTRx = 3

 

but, abnormal status(when i added some function)

cFIFO[0] -> eQADC -> rFIFO[2]

cFIFO[1] -> eQADC -> rFIFO[3]

cFIFO[2] -> eQADC -> rFIFO[0]

cFIFO[3] -> eQADC -> rFIFO[1]

 

TNXTPTR = 0, RFCTRx = 3,  POPNXTPTRx = 2

TNXTPTR = 1, RFCTRx = 3,  POPNXTPTRx = 4

TNXTPTR = 3, RFCTRx = 4,  POPNXTPTRx = 0

                   :

TNXTPTR = 2, RFCTRx = 1,  POPNXTPTRx = 3

 

What is causing this problem?

Please give an answer.

Outcomes