Skip to content

Conversation

duerrfk
Copy link

@duerrfk duerrfk commented Oct 10, 2025

The pulse width of the 1 PPS output signal on NXP boards (ENET driver) is only one cycle of the PTP clock. For instance, at 25 MHz clock rate, the pulse width is only 40 ns. Other devices typically have orders of mangitude longer pulses in the range of milliseconds (e.g., 100 ms for many GPS devices or even 500 ms for the Intel i210 NIC).

This PR extends the 1 PPS pulse to its maximum width of 32 clock cycles (1.28 us). This is still very short compared to other devices, but better than the 1 clock cycle (40 ns) default value.

The following figure shows the resulting 1 PPS pulse from an i.MX RT1062 width the PR applied:

1pps

… pulse

Extended the pulse width of the 1 PPS output from 1 clock cycle to the
maximum length (32 clock cycles).

Signed-off-by: Frank Duerr <[email protected]>
@duerrfk duerrfk force-pushed the feature/long1ppspulse branch from 0a2ff45 to d8700cb Compare October 10, 2025 13:35
@decsny decsny requested a review from hakehuang October 10, 2025 13:44
Copy link

* pulse width of many devices, which are often in the range of milliseconds.
* However, 32 clock cycles is the upper limit.
*/
ENET_Ptp1588SetChannelOutputPulseWidth(data->base, kENET_PtpTimerChannel3, false,
Copy link
Contributor

@hakehuang hakehuang Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function depends on
#if defined(FSL_FEATURE_ENET_HAS_TIMER_PWCONTROL) && FSL_FEATURE_ENET_HAS_TIMER_PWCONTROL
and not all enet controller supports this. I would suggest to add a dts attribute for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants