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.

TMS320F28027: Timer0-1-2 interrupt time is shifting

Part Number: TMS320F28027
Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE

Dear all,

I am studing on F28027 and am am trying to fire an timer0 interrupt at 2.5 u sec.

The ınterrupt is working but, I have a problem about interrupt period. Timer ınterrupt is not being fired stable.

Sometimes, its periode is shifting forward or backward.

A photo to illustrate it in your mind.

DSP clock freq: 100MHz

Timer0 priod value: 250

I am toggling a GPIO pin to see how timer interupt works. 

And I have obseved that it is shifting about 150 n sec.

And it is equal to about 15 clock cycle for DSP.

By he way, The problem is observed for timer0-1-2.

I have been struggling for a long time on this problem, but I cannot overcome it and I have no idea why timer interrupt is working like that.

I will be waiting for your advices.

Regards

Fahri

  • Some questions:

    • Are you using the example from C2000Ware? (C:\ti\c2000\C2000Ware_1_00_00_00\device_support\f2802x\examples\structs\cpu_timer). If not, please try that. Please compare your code to this code to determine where the problem might lie. 
    • Are you saying the edge of the GPIO toggle is not happening at the expected instant in time?
    • Are there any other interrupts preempting the timer interrupt?
    • Is the trigger-level configured correctly for the scope?
    • Could this be an aliasing artifact of the scope? Why do we see 3 overlapping pulses on the scope?

  • Hi Hareesh

    Yes I checked related directory there is no problem. 

    Yes I am trying to say that GPIO toggle is not working as it is expected. Dere is delay sometimes interrupt is coming early sometimes late. Because of that there is three different pulse. Actually they are not overlaped, interrupt is shifting when I decrease time div. it is easy to show that timer interrupt is not working correctly. Each pulse of them is a different interrupt created in different time. There is no problem about trigger level and I changed the scopebut I got same result. Therefor, it is curtain that timer inerrupt of time is shifting. Only timer interrupt is working, there is not any other interrupt.

    Regards

    Fahri

  • Please use the Controlsuite example "as is" (without any modification) and verify it is working. It is a tested example. Once you have verified it, you could modify the timer period etc.