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.

求助:ZStack-CC2530-2.3.0-1.4.0如何使用timer1定时处理?

Other Parts Discussed in Thread: Z-STACK

大家好,想在z-stack中添加timer1定时器的操作,相关函数在hal_timer.c中定义。

我在GenericApp_Init()中配置和开启:

(void)HalTimerConfig(HAL_TIMER_3,HAL_TIMER_MODE_CTC,HAL_TIMER_CHANNEL_SINGLE,HAL_TIMER_CH_MODE_OVERFLOW,TRUE,timer1int);

(void)HalTimerStart(HAL_TIMER_3,100000); 

并写回调函数:

static void timer1CB(uint8 timerId, uint8 channel, uint8 channelMode)
{
HalLedBlink(HAL_LED_2,0,50,500); 
}

进入不了timer1CB(),不知道哪里出了问题。请问如何在z-stack中操作timer1,求指导!!!

  • 1, Z-Sack 2.3.0 已经是很多年前的协议栈版本,建议采用最新的协议栈版本

    2, 你直接可以使用osal timer来产生定时的事件,不需要自己去做定时器的操作

x 出现错误。请重试或与管理员联系。