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.

TMS320C6657: Timer problem under SYS / BIOS

Part Number: TMS320C6657
Other Parts Discussed in Thread: SYSBIOS

I used DSP6657 to set up a timer with a period of 20 microseconds under SYS / BIOS and bare metal respectively. I performed GPIO output operation in the timer interrupt, and then observed the accuracy of the timer interrupt period with an oscilloscope. Under the timer interrupt, it will appear for a period of time, and suddenly a short period error at a certain moment, and then return to normal, but this will not happen under bare metal. The picture of the timer interrupt cycle oscilloscope under SYS / BIOS is shown in the figure below:

Due to engineering needs, SYS / BIOS must be used, so how should I solve this problem?
Thank you!

 

  • Hi,

    In SYSBIOS, there is a "heart beat" using a timer to generate interrupt every 1ms (I can't recall the exact interval). Maybe this conflict with your timer. Check your SYSBIOS project ROV view, for the timers, hwi to find out what is the SYSBIOS timer and your configured timer (timer instance Id, timer interval, and interrupt number, etc). The C6657 has INT4 to INT15, where the lower number has higher interrupt priority. Try to make your timer with higher priority than the SYSBIOS timer to see if this helps.

    Regards, Eric

     

  • Hi,

    In my impression, the interrupt number used by the SYS / BIOS system clock is 14, and the timer I defined uses an interrupt number of 12, which satisfies the priority criteria you said. Then maybe it is caused by other factors?

    Best wishes!

  • Hi,

    If you halt the CPU, and take a look of the CCS register view, you can find a register called IER (2.8.7 Interrupt Enable Register (IER)), explained in: 

    TMS320C66x DSP
    Literature Number: SPRUGH7
    November 2010
    CPU and Instruction Set
    Reference Guide

    You should see at least bits 12 and 14 are set. Do you have any other bits set? In the CCS ROV view, do you see any other interrupt other than the two timers?

    If you clear bit 14 and only let bit 12 set, then let the DSP runs again, do you see a clean GPIO toggle waveform? The code may stop working given SYSBIOS timer is disabled, just give a quick try if you can.

    Regards, Eric 

  • Any update?

    Regards, Eric