Bug 227687

Summary: PPS echo pulse on ppbus too short
Product: Base System Reporter: Lukas Senger <lukas>
Component: kernAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me CC: emaste, phk
Priority: ---    
Version: 11.1-RELEASE   
Hardware: Any   
OS: Any   

Description Lukas Senger 2018-04-22 09:05:13 UTC
PPS echo signals are not detectable on the parallel port. The irq handler in ppbus/pps.c creates the echo pulse by setting AUTOFEED, handling the pulse and immediately unsetting AUTOFEED. The "handling the pulse" phase is not long enough to create a usable echo pulse. Adding a DELAY of 100ms before disabling the bit creates good pulses, however this is not a feasible solution in an interrupt handler.

Fix:
Add a delay (maybe 100ms) before disabling the AUTOFEED bit.

How-To-Repeat:
Connect a PPS source (e.g. GPS receiver, signal generator) via the parallel port (pin 10). Set PPS_ECHOASSERT (with pps-api utility in ntp). Try to read the echo on pin 14 (e.g. with oscilloscope, LED, GPS receiver...).