Ntpd/gpsd GPS PPS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ntpd/gpsd GPS PPS

2,709 Views
spoonik
Contributor I

Hi!
I am using imx6q-sabresd board with linux4.9-imx.1.0 kernel from official github repository.

I have problem with PPS signal from GPS receiver.

I connected RX->TX, TX->RX, PPS->gpio and compile kernel with PPS config (PPS, PPS_CLIENT_GPIO). 
dmesg log :

[root@alarm ~]# dmesg | grep pps
[ 0.483934] pps_core: LinuxPPS API ver. 1 registered
[ 0.483942] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 1.589363] pps pps0: new PPS source ptp0
[ 1.852936] pps pps1: new PPS source pps.-1
[ 1.856888] pps pps1: Registered IRQ 170 as PPS source

In kernel space I see:

[root@alarm ~]# cat /sys/class/pps/pps1/name
pps.-1
[root@alarm ~]# cat /sys/class/pps/pps1/assert
1526895228.003022676#90

PPS is work after GPS is 3D fix.

I can listen NMEA messages from GPS module:

[root@alarm ~]# cat /dev/ttymxc4
$GPGGA,112601.00,,,,,0,00,,,,,,,*4D
$GNZDA,112601.00,21,05,2018,00,00*70
$GNRMC,112601.00,V,,,,,,,210518,,,N*69
$GPGGA,112602.00,,,,,0,00,,,,,,,*4E
$GNZDA,112602.00,21,05,2018,00,00*73
$GNRMC,112602.00,V,,,,,,,210518,,,N*6A

But when I shall config gpsd server, pps is not working: 

gpsd:WARN: KPPS:/dev/pps1 kernel PPS unavailable, PPS accuracy will suffer
gpsd:PROG: PPS:/dev/pps1 thread launched
gpsd:INFO: KPPS:/dev/pps1 gps_fd:-2 not a tty
gpsd:WARN: PPS:/dev/pps1 die: no TIOMCIWAIT, nor RFC2783 CANWAIT
gpsd:PROG: PPS:/dev/pps1 gpsd_ppsmonitor exited.
gpsd:INFO: PPS:/dev/pps1 ntpshm_link_activate: 0
gpsd:INFO: device /dev/pps1 activated

Or in Ntpd

# PPS source /dev/pps1 using the clear edge
server 127.127.22.1 minpoll 4 maxpoll 4

alarming: normal
21 May 09:33:21 ntpd[323]: select(): nfound=-1, error: Interrupted system call

In kernel I found NTP_PPS config, but it's off. 

Symbol: NTP_PPS [=n] │
│ Type : boolean │
│ Prompt: PPS kernel consumer support │
│ Location: │
│ -> Device Drivers │
│ -> PPS support │
│ (1) -> PPS support (PPS [=y]) │
│ Defined at drivers/pps/Kconfig:32 │
│ Depends on: PPS [=y] && !NO_HZ_COMMON [=y]  

NO_HZ_COMMON is on by default. 

Is it trouble in kernel? Or I use wrong config? 

Labels (2)
Tags (2)
0 Kudos
1 Reply

1,569 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I do not know if you are still having a problem.

If yes, can you please share with us the GPS that you are using?

Best Regards,

Diego

0 Kudos