If I setup a interval wait timer for 100 clock ticks ,os_itv_set(100), and the execution from the os_itv_set(100) to the os_itv_wait() takes longer than 100 clock ticks, the os_itv_wait() waits for 65535 clock ticks. Is there a way that I can check the clock ticks remaining prior to calling os_itv_wait()?
#include <ARTX.h> void task1 (void) __task { . . os_itv_set (100); for (;;) { . . /* execution may take longer than 100 clock ticks */ os_itv_wait (); /* if 100 clock ticks have passed */ /* this will wait for 65535 clock */ /* ticks. */ } }