扩展程序中的GPIO配置

2个帖子/ 0新
最后一篇
威斯利
离线
最后一次露面:3年1周前
加入:2015-07-07 12:08
扩展程序中的GPIO配置

我将p3.2设置为hight。我使用ke_timer_set()函数来生成10ms计时器。在定时器中断功能中,我将p3.2设置为低。该动作每100毫秒生成一次。

Alert_State.Port = 3.
Alert_state.pin = 2

void a_function()
{
gpio_setactive(Alert_state.port,Alert_State.pin);
ke_timer_set(app_pxp_timer,task_app,1);
}
每100ms调用a_function

int proxr_create_db_cfm_handler(ke_msg_id_t const msgid,
struct proxr_create_db_cfm const * param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
gpio_setinactive(Alert_state.port,Alert_State.pin);
ke_timer_clear(app_pxp_timer,task_app);
}

如果没有define extend_sleep,它正常工作。

当Define extend_sleep时,p3.2是hik的时间小于10ms(约7ms)。howerver app_pxp_timer正常工作。这意味着p3.2被设置为低于其他地方
该项目。

你能给我一些建议吗?
谢谢你。

关键词:
设备:
mt_dialog.
离线
最后一次露面:2个月2天前
职员
加入:2015-06-08 11:34
威斯利,

威斯利,

当DA进入休眠模式时,执行PERIPH_INIT()函数,引脚返回到其初始配置状态(如在PERIPH函数中配置)。请检查一下,可能会导致您的问题。

谢谢mt_dialog.