jsln / pps-gen-gpio Goto Github PK
View Code? Open in Web Editor NEWLinux kernel PPS generator using GPIO pins
License: GNU General Public License v2.0
Linux kernel PPS generator using GPIO pins
License: GNU General Public License v2.0
If system time is changed forwards, the PPS generator stars sending We are late this time...
continuously. This can be fixed by replacing ts_expire_req
by ts_expire_real
in this line.
Is the PPS signal generated when system time starts a new second, or is it generated at some arbitrary time?
Hi Juan,
This is more a question than an issue. Ive downloaded your code into kernel 4.4 and Ive compiled it and put it on the beaglebone black. Ive modprobed your driver and i see it coming up, which is good.
[ 134.924519] random: nonblocking pool is initialized
[ 204.818461] pps_gen_gpio: GPIO PPS signal generator
[ 204.824485] pps_gen_gpio: found 1 GPIOS defined in DT
[ 204.829789] pps_gen_gpio pps-generator: GPIO lookup for consumer pps-gen
[ 204.829802] pps_gen_gpio pps-generator: using device tree for GPIO lookup
[ 204.829834] of_get_named_gpiod_flags: parsed 'pps-gen-gpios' property of node '/pps-generator[0]' - status (0)
[ 204.829950] no flags found for pps-gen
[ 204.830096] pps_gen_gpio: port write takes 2381ns
[ 256.003929] pps_gen_gpio: we are late this time 255.999972447
[ 779.003925] pps_gen_gpio: we are late this time 778.999970551
[ 792.003931] pps_gen_gpio: we are late this time 791.999972719
[ 1614.003930] pps_gen_gpio: we are late this time 1613.999972984
Now, ive connected an oscilloscope between GND and pin 16 (im using the same dts config as you) but im not seeing anything on the output.
I would like to have this signal synced to linuxptp as well.
Am i missing something? Should I be seeing anything on the output on this case?
Thanks
David
Hi Jsolano,
I am trying to use your driver with the Linux Kernel version 4.4, but it gives the following error:
drivers/pps/generators/pps_gen_gpio.c: In function ‘pps_gen_gpio_probe’:
drivers/pps/generators/pps_gen_gpio.c:201:22: error: too few arguments to function ‘devm_gpiod_get’
devdata->pps_gpio = devm_gpiod_get(dev, "pps-gen");
^
In file included from include/asm-generic/gpio.h:13:0,
from ./arch/arm/include/asm/gpio.h:9,
from include/linux/gpio.h:48,
from drivers/pps/generators/pps_gen_gpio.c:32:
include/linux/gpio/consumer.h:73:32: note: declared here
struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
I am expecting that the new kernel calls devm_gpiod_get differently. Is it possible that that is the case?
Thanks in advance.
Hi) I've tested that module and I want to use it... But I would like to improve accuracy. The impulse jitter is about 2 - 7 us. The main reason I think is the jitter of gpiod_set_value() function... Also sometimes the pulse is not generated because of delay for entering interrupt... Can you give me some clue about how to get rid of these drawbacks? Maybe it is reasonable to use some Timer in pwm mode instead of gpio... I'm using AM335x SoC (Beagle Bone Black board).
I have previously setup NTP/PTP/etc on a Beagle bone black before; but I am struggling incorporating this at the moment.
Could you provide some more verbose steps for configuring a PPS from a blank BBB? Thank you kindly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.