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.

Problem using SysBios C API to create 64-bit General purpose timer

Other Parts Discussed in Thread: SYSBIOS

I created a test app to use a 64 bit general purpose timer on EVM6678. 

XdcConf:

var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');

I created a timer in C as follows:

#include <ti/sysbios/timers/timer64/Timer.h>

void CreateTimer()
{
       // Create the timer
        Timer_Params prms;
        xdc_runtime_Types_FreqHz  freq;

        Timer_Params_init(&prms);
        prms.period     = 10000;
        prms.startMode  = Timer_StartMode_USER;
        prms.periodType = Timer_PeriodType_COUNTS;
        prms.arg        = (UArg) this;

        m_hdlTimer64 = Timer_create(9, TimerISR, &prms, NULL);
        Timer_getFreq(m_hdlTimer64, &freq);

        double factor = (double)freq.lo / 200.0e6;
        double period = 10240.0 * factor;
        unsigned int iPeriod   = (unsigned int) floor(period + 0.5);
        Timer_setPeriod(m_hdlTimer64, iPeriod);

        Timer_start(m_hdlTimer64);
}

volatile g_Ticks=0;

void TimerISR(UArg arg)
{
      g_Ticks++;
}

Everything gets created properly except the TGCR register.  Every time I run this code, the TGCR register is set to 0.  When I go into the debugger and set it to 3, everything works.  What is missing in my initialization to get the GPTR set correctly?

Thanks,

Dan