Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
en:c2_gpio_pps [2016/06/08 10:01] mdrjr created |
en:c2_gpio_pps [2016/06/22 08:41] mdrjr |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== GPIO PPS Client ====== | ====== GPIO PPS Client ====== | ||
- | In this example I've choose pin #12 to be my PPS input. You can use any other GPIO [[en:c2_hardware#expansion_connectors|Here]]. | + | In this example I've choose pin #12 (GPIOX.BIT10) that's GPIO 238 to be my PPS input. You can use any other GPIO [[en:c2_hardware#expansion_connectors|Here]]. \\ |
+ | Check the pin number and export number to use on gpio_pin | ||
== Enabling GPIO PPS Client == | == Enabling GPIO PPS Client == | ||
Line 8: | Line 8: | ||
sudo -s | sudo -s | ||
apt-get install device-tree-compiler pps-tools | apt-get install device-tree-compiler pps-tools | ||
- | fdtput -c /media/boot/meson64_odroidc2.dtb /pps | + | echo pps-gpio > /etc/modules-load.d/pps-gpio.conf |
- | fdtput -t s /media/boot/meson64_odroidc2.dtb /pps compatible "pps-gpio" | + | echo options pps-gpio gpio_pin=238 > /etc/modprobe.d/pps-gpio.conf |
- | fdtput -t x /media/boot/meson64_odroidc2.dtb /pps gpios 0x1e, 0x66, 0x1 | + | modprobe pps-gpio |
</code> | </code> | ||
Line 17: | Line 17: | ||
== Testing GPIO PPS Client == | == Testing GPIO PPS Client == | ||
- | Start feeding the signal to the selected pin (#7 in this example). Remember that the logic voltage is 3.3V. | + | Start feeding the signal to the selected pin (#12 in this example). Remember that the logic voltage is 3.3V. |
<code> | <code> | ||
Line 31: | Line 31: | ||
</code> | </code> | ||
- | Note this example will only run on kernel 3.14.65-67 or greater. | + | Note this example will only run on kernel 3.14.65-69 or greater. |