Why is the PPS API only detecting one Edge?

API detecting PPS
0
Posted

Why is the PPS API only detecting one Edge?

0

First, the PPS API is not required to provide an implementation that can detect both edges of a pulse. See function time_pps_getcap() in the description of the API. Then the hardware may not be responding fast enough. See also Q: 6.2.4.6.1. about timing on a serial port. Finally, even if the hardware can send an interrupt for the edge being detected first, the CPU may be still busy with handling the interrupt when the hardware detects the other edge. That may either cause the second interrupt to be missed, or the interrupt handler being called for the first interrupt actually sees a hardware state that corresponds to the second interrupt condition, thereby reporting the wrong event, ignoring the edge that originally triggered the interrupt.

Related Questions