Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public
Document Table of Contents

5.1.7.17.2. Generating a Pulse Train on PPS

To generate a pulse train on PPS:

  1. Program 11 or 10 (for interrupt) in bits[6:5], TRGTMODSEL, of MAC_PPS_Control register. This instructs the MAC to use the Target Time registers for start time of the PPS signal output.
  2. Program the start time value in the Target Time registers.
  3. Program the interval value between the train of pulses on the PPS signal output in MAC_PPS0_Interval register.
  4. Program the width of the PPS signal output in MAC_PPS0_Width register.
  5. Program bits[3:0], PPSCMD, of MAC_PPS_Control register to 0010. This instructs the MAC to generate train of pulses on the PPS signal output with start time programmed in Target Time registers. By default, the PPS pulse train is free-running unless stopped by 'STOP Pulse train at time' or 'STOP Pulse Train immediately' commands.
  6. Program the stop value in the Target Time registers. Ensure that bit 31 (TRGTBUSY0) of MAC_PPS0_Target_Time_Nanoseconds register is reset before programming the Target Time registers again.
  7. Program the PPSCMD field (bit 3:0) of MAC_PPS_Control register to 0100. This stops the train of pulses on PPS signal output after the programmed stop time specified in step 6 elapses.

You can stop the pulse train at any time by programming 0101 in the PPSCMD field. Similarly, you can cancel the Stop Pulse train command (given in step 7) by programming 0110 in the PPSCMD field before the time (programmed in step 6) elapses. You can cancel the pulse train generation by programming 0011 in the PSCMD field before the programmed start time (in step 2) elapses.