How to cancel a scheduled by PWRM_eScheduleActivity() event

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to cancel a scheduled by PWRM_eScheduleActivity() event

1,400 次查看
Alkarax
Contributor II

Hi! I am developing a zigbee sleeping device using jn5169 MCU and JN-SW-4170 SDK. When the device loses its connection, it should go to sleep and wake up once a minute and try to reconnect, but if the button is pressed, it should also wake up and try to reconnect. I am using the PWRM_eScheduleActivity () function to sleep. How to cancel or restart an event scheduled by this function if the button was pressed and the reconnection was successful?

标签 (1)
标记 (2)
0 项奖励
回复
5 回复数

1,317 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alkarax,

Could you please confirm the AN that you are working on?

What is the value that you are getting in the variable u8WakeInt in the vISR_SystemController function?

What is the timer that you are working on?

Regards,

Mario

0 项奖励
回复

1,348 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alkarax,

I am sorry, I think that I am understanding your issue. 

Are you still getting the button event after the reconnection?

Regards,

Mario

0 项奖励
回复

1,328 次查看
Alkarax
Contributor II

Yes, I do.

Best regards

0 项奖励
回复

1,389 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Alkarax,

Just to confirm, do you want to avoid entering into sleep mode after the reconnection?

You could call PWRM_eStartActivity to avoid entering into sleep mode and after that, you could call PWRM_eFinishActivity to allow entry into sleep.

Regards,

Mario

0 项奖励
回复

1,382 次查看
Alkarax
Contributor II

Hi, Mario! No, not like this. Imagine the situation: my device lost connection and enter into sleep for a minute, after 10 seconds I press a button, and it wakes up and reconnects successfully. Now I need to enter into sleep and wake up every 5 seconds (because I am online and send pull requests), but a minute from the beginning of the first sleep has not passed and the past event is still active, even though I no longer need it.

Best regards

0 项奖励
回复