discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accurate GPIO Clock


From: Martin Braun
Subject: Re: Accurate GPIO Clock
Date: Fri, 13 Mar 2020 09:09:56 -0700

Your hardware might have some hardware timers and programmable interrupts. Otherwise, what Jean-Michel said... Time to bring out the FPGAs!

M

On Sun, 1 Mar 2020, 05:10 address@hidden, <address@hidden> wrote:
welcome to the field of real time operating systems. There are a few thousand
pages about the latencies introduced by the scheduler in non-real time OS, the
first google hit being
https://www.veterobot.org/2012/04/precise-pwms-with-gpio-using-xenomai.html
A few microseconds is not too bad actually. Unless you shift the hard real time
task to hardware (FPGA), I am not sure you can get any better.

JM

--
JM Friedt, FEMTO-ST Time & Frequency/SENSeOR, 26 rue de l'Epitaphe,
25000 Besancon, France

March 1, 2020 12:57 PM, "Till Hülder" <address@hidden> wrote:

> Hello,
>
> i want to build a accurate GPIO Clock . I wrote a wait function :
>
> void sleepus(int n)
> {
> clock_t end=clock()+n*CLOCKS_PER_SEC/1000000;
> while(clock() < end) continue;
> }
>
> And wait until the value of the bits change .I recognized that the time of these wait time is not
> constant. It differs by a few microseconds.
>
> Is there are another way to get a more accurate clock ?
>
> Best regards ,
>
> Till


reply via email to

[Prev in Thread] Current Thread [Next in Thread]