Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Trouble with callback about EDMA3

$
0
0

hi,dear supports:

hardware:DM648

Recently ,I used EDMA3 LLD to transfer processed data from L1DSRAM to DDR or SDRAM.

 My tese case used EDMA3 1D-copy to transfer image data.so Bcnt = 1,Ccnt =1 and

using AB-sync.Besides I used callback mode,every transfer was completed and callback

was called at the same time.

void callback (unsigned int tcc, EDMA3_RM_TccStatus status, void *appData)

 {  

EDMA3_DRV_Result result = EDMA3_DRV_SOK;    

int *cbData = (int *)appData;  unsigned short status2;      

switch (status)     {  

case EDMA3_RM_XFER_COMPLETE:   

*cbData = tcc;    

trFinished++;     

break;  

case EDMA3_RM_E_CC_DMA_EVT_MISS:   

evtMiss++;   

break;  

case EDMA3_RM_E_CC_QDMA_EVT_MISS:   

break;  

default:  

  break;    

}

 }

My app source code like this below:

 for(i=0;i<count;i++)  

{     

    DMA_CreateChannel(); //call EDMA3_DRV_requestChannel() and Set PaRAM set.     

   DMA_START();         //call EDMA3_DRV_enableTransfer();     

   DMA_WAIT();          //while(trFinished==0)  ; before DMA_START  trFinished = 0;                          

                                    //after DMA completed ,callback was called and trFinished++          

                                  //so trFinished = 1;

  }

But in my case,I meet a strange problem about callback.

when count = 8,there was nothing wrong with callback.everything was ok. Importantly,

when I debug register IPR and IPRH,I found corresponding bit was set As the tranfer was completed.

But,unfortunately when count = 352 (the number of count means the height of image data ,

every count DMA transfered one line),I meeet trouble.

Trouble 1:

when my code run at i = 14,the program was hung and entered into a endless

loop "while(trFinished==0);".Obviously,at i = 14,callback was not called so trFinished was

always 0.  

so why callback was not called when i = 14?why callback was called when i = 0 to 13?

Trouble 2:

To solve Trouble 1,I debug my app code and I set breakpoint into callback.Although

callback was called from i=0 to i=13,the corresponding bit in reigster IPR and IPRH

was not set.    

so,why not IPR and IPRH bit was set?

 

Best Regards!


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>