>> retval = rtdm_task_init(&pwm_task[i], // there is currently only one >> element in this array >> "pwm-task", >> pwm_task_proc, >> 0, >> RTDM_TASK_HIGHEST_PRIORITY, >> 20000000); // 20ms period > > Do not use a thread, use a timer.
So you mean instead of starting periodic task with rtdm_task_init() it is better use timer functions to trigger pin toggling piece of code? Could you please elaborate on it a little? I thought that rtdm_task_sleep() and rtdm_task_wait_period() are using timers internally to wake up the thread at the right moment. Is not they? Is not it a kind of work-around you suggesting? If there are some problems which led to the imprecise timing of the sleep/wait functions mentioned above, then, if technically possible, it would be better to fix them instead of working around this behavior. Anyway, I am really appreciate your help and will try to rewrite this functionality using timer functions. Thank you very much, Andrey. _______________________________________________ Xenomai-help mailing list Xenomaiemail@example.com https://mail.gna.org/listinfo/xenomai-help