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.

TMS320F28335: Can I generate a report of the Interrupts' and threads' execution time

Part Number: TMS320F28335

Tool/software:

Basically the graph Execution Analysis is fine, but as I have to run and stop and find the interrupt, then zoom in/out  record the time stamp. and repeat the whole process back and forth for all the tasks/interrupts, and the more I continue, it becomes harder to scroll horizontally..

Tool/software:

System info:

Code Composer Studio Version: 10.4.0.00006

  • Unfortunately UIA isn't really supported anymore, and we don't have a ton of expertise with it on the C2000 team but I can take some guesses. Are you using the Execution Graph view? I believe right-clicking on the graph and going to Data -> Export All allows you to export a csv that includes timestamps. Does that give you the data you need?

    Whitney

  • typedef struct {
        U32INT start;
        U32INT total;
        U32INT count;
    } IRQTiming;
    
    #define NUM_IRQS 10
    IRQTiming irqTimings[NUM_IRQS];
    
    void isr(){
        U32INT start = Timestamp_get32();
    
    // some work
    
     U32INT end = Timestamp_get32();
     irqTimings[0].total += (end - start);
     irqTimings[0].count++;
     
     }
     
    void reportTask(UArg arg0) {
        U32INT i;
        for (i = 0; i < NUM_IRQS; i++) {
            if (irqTimings[i].count > 0) {
               // Log_info1("Sys stack peak %d", stkInfo.hwiStackPeak);
                Log_info3("IRQ %d: Avg Time = %lu cycles, Count = %lu\n",
                              i,
                              irqTimings[i].total / irqTimings[i].count,
                              irqTimings[i].count);
                irqTimings[i].total = 0;
                irqTimings[i].count = 0;
            }
        }
    
    }
    
    
    var clock2Params = new Clock.Params();
    clock2Params.instance.name = "REPORT";
    clock2Params.period = 1000; // (1 sec )
    clock2Params.startFlag = true;
    Program.global.MAIN = Clock.create("&reportTask", 1000, clock2Params);
    
    

    Is this advisable or there is any better or recommended approach ? 

    ```

  • That seems fine to me. Is it working for you?

    Whitney