[Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c

eladyaakovi at campus.technion.ac.il eladyaakovi at campus.technion.ac.il
Thu Jun 22 17:21:41 CEST 2017

Thanks for your answer,

the fprintf is not an issue (I have tried with rt_printf too)



oscilloscope measure 30 ms for both.

מאת: Giulio Moro <g.moro at qmul.ac.uk>
‏‏נשלח: יום חמישי 22 יוני 2017 18:12:51
‏‏אל: Elad Yaakovi; xenomai at xenomai.org
‏‏נושא: Re: Toggling GPIO RT Xenomai on Dragonboard 41c

> 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 mailing list