I set the P3.2 to hight. I use ke_timer_set( ) function to generate 10ms timer. In the timer interrupt function I set the P3.2 to low . The action generate once in every 100 ms .
alert_state。端口= 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);
}
a_function是调用ed every 100ms
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);
}
if no define extend_sleep, it works normal.
When define extend_sleep, the time that P3.2 is hight is less than 10ms(about 7ms). Howerver the APP_PXP_TIMER work normal . It means the P3.2 was set to low somewhere else in
the project.
Can you give me some advice.
Thank you.
Hi awesley,
When the da goes in sleep mode the periph_init() function is executed and the pins return to their initial configuration state (as configured in the periph function). Please check this, it might be causing you the issue.
Thanks MT_dialog