## How to wake from sys_sleep() after a period of time?

This is where developers can exchange ideas and ask questions relevant to the DM42 firmware.

Please note that Swiss Micros staff are unable to provide answers here as a general rule. This is intended as a community-driven forum.
gmac42
Posts: 48
Joined: Fri Jun 01, 2018 11:30 am

### How to wake from sys_sleep() after a period of time?

Hi,

I'd like to do some tasks regularly (let a cursor blink, for example), but still spend most of the time in a power saving state.
It seems like

Code: Select all

sys_timer_start(timer_ix, ms_value);
sys_sleep();
sys_timer_disable(timer_ix);

would fit the bill, but I don't know if I can just choose any timer or if some of them are used by the OS.
Any hints would be greatly appreciated!

Regards
Gert
DM42 #650, DM41L #801, HP 41CX, HP 41CV, HP 50G, TI 89