[Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c
g.moro at qmul.ac.uk
Thu Jun 22 17:12:51 CEST 2017
> Is there any other sleep function for real time ?
That is the correct sleep function for real time, and the sleep time is expressed in nanoseconds, so you are trying to sleep for 1 microsecond, which is well beyond Xenomai's capabilities on many (all?) platforms. Minimum latency values are around 30 - 60 microseconds, if I am not mistaken.
>> Are you using some Xenomai wrappers or is `fprintf` actually calling the stdlib `fprintf` ?
if that is a stdlib `fprintf` then you have no timing guarantees there, because your thread switches to secondary mode (linux mode) and so you can expect ANY delay instead of the requested one. That delay would then be due to the `rt_task_sleep()` but to the `fprintf`.
Then, again, I have no idea what your file descriptor is, what `fprintf` is or how you are measuring this "30ms" delay, so I cannot help further.
More information about the Xenomai