Re: [beagleboard] Set GPIO in a precisely time using usleep()

2015-12-04 Thread andreas . bunte
Thanks all for the response.
It is right, I try to generate a PWM, because all hardware PWMs are 
occupied.

I will check the PREEMPT RT kernel.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Set GPIO in a precisely time using usleep()

2015-12-03 Thread andreas . bunte
Hi,

I am trying to control a servo with my BeagleBoneBlack using Angstrom. I 
must have a high-level on a GPIO for 1 millisecond. I use the following 
simple code:

while(1){
servo.setValue(BlackLib::low);
usleep(19000);
servo.setValue(BlackLib::high);
usleep(1000);
}

The GPIO is high for about 1.5 Milliseconds. The usleep()-function is not 
linear, so it did not work with any other value e.g. usleep(500). Sometimes 
I decrease the value by one (1 microsecond) but the time decrease by 100 
microseconds.
Has anybody an idea what could be wrong? 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.