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.

关于CC1310跑Nortos架构下RTC定时器的用法问题

Other Parts Discussed in Thread: SYSBIOS

TI技术人员:你们好!

请教下 这个目录下的《simplelink_cc13x0_sdk_1_40_00_10\kernel\nortos\dplTimerPCC26XX_nortos.c》定时器怎么用,能提供下例程吗?

我根据自己对其中函数的理解,按下面这样写代码后,RTC回调函数不能执行,请问是什么原因?

void RTC_Fxn0(uintptr_t arg)   //本想让它1秒执行一次,结果永远执行不到这里
{

   GPIO_toggle(Board_GPIO_LED0);

}

void *mainThread(void *arg0)
{

TimerP_Params TimerParams;
TimerP_Handle hTimerP;


TimerP_Params_init(&TimerParams);
TimerParams.startMode = TimerP_StartMode_AUTO;
TimerParams.period = 1000000;                                               

hTimerP = TimerP_create(RTC_Fxn0, &TimerParams);

TimerP_start(hTimerP);


      while(1)

     {

     }
}

  • NonRTOS的Timer可以参考TIRTOS的kernel的说明文档

    file:///C:/ti/simplelink_cc13x0_sdk_1_50_00_08/docs/tirtos/sysbios/docs/cdoc/index.html

    Real Time Clock的代码可以参考driverlib的说明文档

    file:///C:/ti/simplelink_cc13x0_sdk_1_50_00_08/docs/driverlib_cc13xx_cc26xx/cc13x0/driverlib/group__aonrtc__api.html

    我这里找的是SDK1.50的路径,在SDK1.40目录下应该也可以找到相对应的路径。