[Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c

Giulio Moro g.moro at qmul.ac.uk
Thu Jun 22 14:30:03 CEST 2017

> 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