雷竞技电竞平台对话半导体客户支持- ke_timer_set https://support.dialog-semiconductor.com/resource-keywords/ketimerset 如何保证ke_timer_set设置的定时器永不停止 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software-dialog-%E2%80%9Csmartbond%E2%80%9D%E7%B3%BB%E5%88%97%E4%BD%8E%E5%8A%9F%E8%80%97%E8%93%9D%E7%89%99bt42%E2%80%94%E8%BD%AF%E4%BB%B6-12
论坛: href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件-对话框- 9 csmartbond % E2 % % E2 % 80% 80% 9 d % E7%B3%BB % E5 % 88% 97% e4%bd % 8 8 e % E5 % % E8 % 9 f % E8 % 80% 97% 93% 9 E2 % d % E7 % 89% 99% 80% 94% e8%bd % AF % E4%BB % B6”“=“sioc:容器sioc:论坛”属性=“rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件/ /对话框“Smartbond”系列低功耗蓝牙——软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >使用ke_timer_set (APP_TIME_TIMER TASK_APP 100)定时,然后在响应函数中再次ke_timer_set (APP_TIME_TIMER TASK_APP 100);这样能不能保证这个定时器用不停止吗?< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / ketimerset”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > ke_timer_set < / > < / div > < / div > < / div > < div class =”字段field-name-field-device field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >设备:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / forum-post-device / da14580”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > DA14580 < / > < / div > < / div > < / div > Tue, 01 Nov 2016 01:47:49 +0000 wang_wu 4858年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software-dialog-%E2%80%9Csmartbond%E2%80%9D%E7%B3%BB%E5%88%97%E4%BD%8E%E5%8A%9F%E8%80%97%E8%93%9D%E7%89%99bt42%E2%80%94%E8%BD%AF%E4%BB%B6-12#comments ke_timer_set不执行,为什么? https://support.dialog-semiconductor.com/ketimerset-not-executewhy < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >我有一个问题,执行每次ke_time并不成功。

in detail:
在SDK 3.0.6中,我使用了一个按钮P23来启动系统。

void app_button_enable(void)
{
wkupct_register_callback(app_button_press_cb);

//if (!(GPIO_GetPinStatus(GPIO_BUTTON_PORT, GPIO_BUTTON_PIN))) //按钮是p23
wkupct_enable_irq(0x80000, 0, 1, 10);// P2_3,极性低,1 0 x40000 < br / >} < / p > < p > app_button_press_cb (void)我添加这个< br / >: < / p > < p > havekey_flag = 1; < / p > < p >如果(keytimescn> = 1) < br / > {< br / > keytimescn = 0; < br / > ke_timer_clear (SCAN_KEY_TIMER TASK_APP); < br / >} < / p > < p > keytimescn + +; < / p > < p >如果(PW_ON_OFF ! = 0) / /关机雕像权力在< br / > {< br / > / / ke_timer_init (); < / p > < p >GPIO_SetInactive (GPIO_TI_LED_PORT GPIO_TI_LED_PIN);//fot tip enter here the led is on

ke_timer_set(SOTF_PW_TIMER,TASK_APP,200);
}
else
{//搜索400MS_key
GPIO_SetInactive (GPIO_ALERT_LED_PORT, GPIO_ALERT_LED_PIN);/ / fot提示进入这里的领导是< br / > button_type = BUTTONTYPE_400MS; < br / > ke_timer_set (SCAN_KEY_TIMER TASK_APP 40); < br / > / / app_force_active_mode (); < br / >} < / p > < p >这里我以前添加味精< br / > enum APP_MSG < br / > {< br / > APP_MODULE_INIT_CMP_EVT = KE_FIRST_MSG (TASK_APP) < / p > < p > SOTF_PW_TIMER, < br /> ............< br /> ............
}

/* Default State handlers definition. */
EXTERN const struct ke_msg_handler app_default_state[] =
{
{SOTF_PW_TIMER, (ke_msg_func_t)poweron_soft_handler},
{GAPM_DEVICE_READY_IND, (ke_msg_func_t)gapm_device_ready_ind_handler},
.............
...........
}

In handler function:

int poweron_soft_handler(ke_msg_id_t const msgid,
void const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
GPIO_SetInactive( GPIO_ALERT_LED_PORT, GPIO_ALERT_LED_PIN); //fot tip enter here. the led is on

{//soft poweron is the first prio
PW_ON_OFF =0;
been_tip_flag =0;

app_adv_start();

led_been_loop =TIP_LOOP_LEDON;
ke_timer_set(LEN_BEEN_TIP_TIMER,TASK_APP,1);
}

ke_timer_clear(SOTF_PW_TIMER,TASK_APP);

return (KE_MSG_CONSUMED);
}

I press key P23 to high one time last 6s { greater than in set here (ke_timer_set(SOTF_PW_TIMER,TASK_APP,200) 2s};
have enter the step:
GPIO_SetInactive(GPIO_TI_LED_PORT,GPIO_TI_LED_PIN); //fot tip enter here the led is on

but sometimes the step is not in:
GPIO_SetInactive( GPIO_ALERT_LED_PORT, GPIO_ALERT_LED_PIN); //fot tip enter here. the led is on

so the system is not poweron everytime.

my question is :
ke_timer_set(SOTF_PW_TIMER,TASK_APP,200); //only here call SOTF_PW_TIMER's function

but sometimes this function
poweron_soft_handler

is not call succeed.

why?

additional:
I have view this
http://support.dialog-semiconductor.com/faq/how-use-ketimer-during-wakeu...

but in 3.0.6 have no this MSG

struct create_new_timer_struct *req = KE_MSG_ALLOC(APP_CREATE_NEW_TIMER, TASK_APP, TASK_APP,

create_new_timer_struct);

create_new_timer_struct
and
APP_CREATE_NEW_TIMER
not included in my used SDK(3.0.6).

Keywords: 
Device: 
2015年7月11日星期六03:08:49 +0000 YuanhangWu 1799年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/ketimerset-not-executewhy#comments