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.

LAUNCHXL-F28027F: Confirm cpu usage for my system

Part Number: LAUNCHXL-F28027F
Other Parts Discussed in Thread: BOOSTXL-DRV8305EVM, MOTORWARE

Hi,

I have Launchpadxl-f28027F plus boostxl-drv8305evm


I am trying to measure cpu usage in Lab5a  example (from point a to point b)  using Timer 2 and the project
       C:\ti\motorware\motorware_1_01_00_17/sw/solutions/instaspin_foc/src/proj_lab05a.c

I want to confirm that the "timer_delta_now" value of 580, part of the cpu_time structure is the cpu usage in microseconds (usec).

My CPU Frequency is 60Mhz

Timer 2 is initialized as:
      // use timer 2 for CPU time diagnostics
      TIMER_setDecimationFactor(obj->timerHandle[2],0);
      TIMER_setEmulationMode(obj->timerHandle[2],TIMER_EmulationMode_RunFree);
      TIMER_reload(obj->timerHandle[2]);
      TIMER_setPeriod(obj->timerHandle[2],0xFFFFFFFF);
      TIMER_setPreScaler(obj->timerHandle[2],60);

The system is enabled and motor ID is enabled:
   gMotorVars.Flag_enableSys = 1;
   gMotorVars.Flag_Run_Identify = 1;

Point A = Inside  while(gMotorVars.Flag_enableSys) loop
        // read the timer 2 value and update the CPU usage module
        uint32_t timer2Cnt = HAL_readTimerCnt(halHandle,2);
        CPU_TIME_updateCnts(cpu_timeHandle,timer2Cnt);


Point B: Before "end of while(gFlag_enableSys) loop"
        // read the timer 2 value and update the CPU usage module
        timer2Cnt = HAL_readTimerCnt(halHandle,2);
        CPU_TIME_run(cpu_timeHandle,timer2Cnt);

I am monitoring cpu_time structure continuously and I see the below data:

Thanks,

Asha