From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giulio Moro Date: Thu, 22 Jun 2017 15:12:51 +0000 Message-ID: References: , , , , In-Reply-To: Content-Language: en-GB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "eladyaakovi@campus.technion.ac.il" , "xenomai@xenomai.org" > Is there any other sleep function for real time ? That is the correct sleep function for real time, and the sleep time is exp= ressed in nanoseconds, so you are trying to sleep for 1 microsecond, which = is well beyond Xenomai's capabilities on many (all?) platforms. Minimum lat= ency 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, bec= ause your thread switches to secondary mode (linux mode) and so you can exp= ect 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.