From mboxrd@z Thu Jan 1 00:00:00 1970 From: "eladyaakovi@campus.technion.ac.il" Date: Thu, 22 Jun 2017 15:05:17 +0000 Message-ID: References: , , , In-Reply-To: Content-Language: he-IL MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable 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: Giulio Moro , "xenomai@xenomai.org" Is there any other sleep function for real time ? this sleep is not working well oscilloscope measured 30ms. and it is not changing when I change the values. ________________________________ =EE=E0=FA: Giulio Moro =FE=FE=F0=F9=EC=E7: =E9=E5=ED =E7=EE=E9=F9=E9 22 =E9=E5=F0=E9 2017 15:30:03 =FE=FE=E0=EC: Elad Yaakovi; xenomai@xenomai.org =FE=FE=F0=E5=F9=E0: Re: Toggling GPIO RT Xenomai on Dragonboard 41c > Can you explain please why this is not writing to a file: Is this related to "Re: Toggling GPIO RT Xenomai on Dragonboard 41c" or sho= uld it go under a separate heading? > (without the rt_task_sleep(1000) and the while it works fine). Many things could be wrong with this. If `time_to_run` is very small (or zero), then the condition is never met. = On the other hand , I have no idea what time(NULL) does. Why don't you add = a `printf()` inside the loop to see if it gets called once at least? Also, I have no idea why you would try to write one byte to disk every 1 mi= crosecond and how / whether your system would be capable of dealing with it= . Are you using some Xenomai wrappers or is `fprintf` actually calling the st= dlib `fprintf` ? In the latter case, then I see this code as potentially ha= nging your system if it actually were to run and `time_to_run` is not small= enough. Just guessing, because we do not see a larger portion of your code.