[Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c

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


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.

________________________________
מאת: Giulio Moro <g.moro at qmul.ac.uk>
‏‏נשלח: יום חמישי 22 יוני 2017 15:30:03
‏‏אל: Elad Yaakovi; xenomai at xenomai.org
‏‏נושא: 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 should 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 microsecond and how / whether your system would be capable of dealing with it.

Are you using some Xenomai wrappers or is `fprintf` actually calling the stdlib `fprintf` ? In the latter case, then I see this code as potentially hanging 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.


More information about the Xenomai mailing list