[LinuxPPS] LinuxPPS with GPIO on the ARM

Gerhard Bertelsmann info at gerhard-bertelsmann.de
Wed Jan 26 10:24:46 CET 2011


Am Mi, 26.01.2011, 09:40, schrieb Igor Plyatov:
> Hello Ricardo!
>
>> Is that GPIO capable of generating interrupts ?
>
> Yes, of course this GPIO is able to generate interrupts. There is no
> problems from hardware point of view.
>
> Best regards!
> --
> Igor Plyatov
>

Hi Igor,

I have done this for a MIPS based platform:

http://lnxpps.de/pps-gpio2.c

It should be easy to adapt this for your hardware.

Some ARM processors can do more than this. Some could also do hardware
timestamping on some (cheap) kirkwood based hardware. Please have a
look at :

http://ml.enneenne.com/pipermail/linuxpps/2010-December/004220.html

I have started investigating and things are promising:

root at OpenRD1 ~src/andy # ./startPTP | grep "since last event"
1th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 113080187 ( 3599583051 -> 28.796664 seconds since last
event)
2th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 238070496 ( 124990309 -> 0.999922 seconds since last
event)
3th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 363060805 ( 124990309 -> 0.999922 seconds since last
event)
4th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 488051115 ( 124990310 -> 0.999922 seconds since last
event)
5th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 613041425 ( 124990310 -> 0.999922 seconds since last
event)
6th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 738031723 ( 124990298 -> 0.999922 seconds since last
event)
7th valid event. EventInt: ok  EventCapValid: valid event  EventCapErr:
good   Event time = 863022034 ( 124990311 -> 0.999922 seconds since last
event)

This could mean no trouble with interrupt jitter/delay anymore and
a 8ns resolution.

Regards

Gerd







More information about the LinuxPPS mailing list