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.

TMS320F280049: TIDA-010054 Three trivial questions about software codes

Part Number: TMS320F280049
Other Parts Discussed in Thread: TIDA-010054

Hi, 

      Three new questions regarding the DAB software codes.

      First, in <interrupt void ISR2(void)>, what’s the purpose of DAB_HAL_setProfilingGPIO2() and DAB_HAL_resetProfilingGPIO2(), please ? 

      Second, in src file <dab_main.c>, the action frequencies of background tasks are 10 Hz and 100 Hz respectively, but why the annotations are left as below (1 ms and 5ms)?

      Third, I am aware that the interrupt latency costs at least 14 system clocks, and to compensate such costs, the CMPC equals to 500-20 = 480. However, I would like to ask why it is 20 instead of 14? is the number 20 a tested result so that the excution of the first sentence of ISR1 just happens at the periodmax 500? I think the number 20 is kind of "coincidence".

      Thanks.

Regards, 

Zijian

  • 1. We use the GPIO profiling to profile the code, how much % execution it is taking

    2. the commens in the main.c file look as legacy from previous use of that template , i will request this to be filed for clean up

    3. the subtract by 20 is to offset for isrTicker++ and some additional code that is there before reading the ADC, so it is a little bit larger than 14. Though i do not think application will get impacted even if it was 14.

  • Thanks. 

    BTW, I have found another error in the codes, that is,

    The configuration should be 0808H to select the output of digital filter to the epwmtrip. Is the following right?

    Regards,

    Zijian

  • Zijian,

    In the case of TIDA-010054 this may not be an error because we do not need the asynchronous path of the trip, hence just configuring CTRIP is ok. 

    Though i do agree it is confusing to read. 

    -Mansih