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.

Timer 0 in one-shot mode: Ti code comment: " * so timer0 does not support one-shot mode."

Other Parts Discussed in Thread: SYSBIOS

Hi,

In my system (F28335) and SYSBIOS, I am using:

* Timer 0: for application purpose and used in one shot mode

* Timer 1: for SYSBIOS (periodic clock)

* Timer 2: for SYSBIOS (Debug features)

I had an issue on my system and during debugging session with emulator I found in the TI SYSBIOS code:

bios_6_35_04_50\packages\ti\sysbios\family\c28\Timer.c

the following comment:  "so timer0 does not support one-shot mode"

See below:

/*
 *  ======== Timer_oneShotStub ========
 */
Void Timer_oneShotStub(UArg arg)
{
    Timer_Object *obj = (Timer_Object *) arg;

    /* Stop the timer */
    Timer_stop(obj);
    /*
     * Clear the IFR registers in case another interrupt occurred.
     * Clearing the PIEIFR is difficult and only timer0 is a PIE int,
     * so timer0 does not support one-shot mode.
     */
    Hwi_clearInterrupt(obj->intNum);

    /* Clear the Timer Interrupt flag by writing 1 to it. */
    TimerDevices[obj->id].TCR.TIF = 1;

    /* Call the user's isr. */
    obj->tickFxn(obj->arg);
}


Could you indicate to me if it is forbidden to use the Timer 0 in shot mode ?

Thanks and best regards,

Mathieu