This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LS3137: DMA interrupt & measure time

Part Number: TMS570LS3137

Tool/software: Code Composer Studio

I have two questions:

1. Using DMA mode   

I used DMA mode for receiving data from SCI and SCILIN port.   

SCI using channel DMA_CH0 and SCILIN using channel DMA_CH1.   

DMA interrupt mode using BTCA.   

The data processing in BTCA Notification();   

The fuction of Notification like this:   

void Notification(channel)  

{   

   if(channel == DMA_CH0)   

     {  Process(SCI);  }   

  if(channel == DMA_CH1)    

    {  Process(SCILIN);       }   

}     

   Either of SCI and SCILIN works well.

   But when they are running at the same time, the data will interfere with each other.    I don't know how to make two independently DMA channels and interrupt.

2.How to measure the runing time of a function?    

  I want to know the function of measuring time such as:

QueryPerformanceCounter() and QueryPerformanceFrequency(), 

GetTimestamp()

GetTickCount()

clock(), time()

Time Stamp Counter Registers (TSCL and TSCH)  

 

Which function is supported at the deceive of TMS570?

I would be very thankful if someone knows the solution for these questions.  

  • Hello,

    1. The DAM request line for SCI RX is #30, and for LIN RX is #28. And you can different DMA channels for SCI and LIN, they should be interfered each 3. 2. DMA Channel 0 has higher priority, so channel 1 may get temporary suspended.
    3. You can use PMU to measure cycles: sys_pmu.asm