This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/PROCESSOR-SDK-AM57X: PPS usage example from PRU-ICSS PTP driver in SDK 05.01.00.11

Part Number: PROCESSOR-SDK-AM57X

Tool/software: TI-RTOS

Hello. I'm using AM572x IDK board and want to use PPS synchronization with PTP on PRU-ICSS. As I found in SDK, timeSync API supports PPS and PTP sync together, but the timeSync example does not demonstrate PPS usage.

Tell me, please, answers on that questions:

1) How do I need to configure interrupts on A15 0 core to see working PPS interrupts & synchronization on A15 0 core?

2) What PRU-ICSS host interrupt is used to synchronize PPS & PTP? As I see, PPS interrupt handler is located in timeSync_example_osal.c file.

P.S. I'm using Ubuntu 16.04.5 LTS x64, TI-RTOS SDK v05.01.00.11, CCS v8.1.0

  • Alex,

    Sorry for the delay in getting to this post. We have reached out to the PTP driver experts with your questions and will get back to you when we receive a response to help you with this issue.

    Regards,
    Rahul
  • Hi Alex, some comments below

    1) Are you referring to TimeSync_latchSyncTask(), TimeSync_latchIsr()?
    2) Probably what you are looking for is:
    - timeSync_example_crossbarConfig() -> configures Rx ISR, Link ISR, PTP ISR, TX ISR
    - timeSync_example_configureInterrupts() -> configures RX, Link, TX int numbers

    Are you trying to synchronize with a GM? could you explain us better your use case and the test you are trying to achieve?.

    thank you,
    Paula
  • Hi Paula, sorry for the long time answer.

    I need this feature to a custom handle of captured PTP values (2-3 seconds period). I implement my feature, based on your PPS implementation. But also I need to reconfigure PRU registers (manual interrupt connection inside PRU) to get PRU captured value.

    I implemented that algorithm (tested on PRU2.0 only):
    * disable falling edge interrupts for latch0
    * set async mode for latch0
    * map PRU INTC Channel 9 to HOST7 interrupt
    * map PRU INTC Sys_event 12 interrupt to Channel 9
    * manual clear system interrupt 12 status flag
    * manual clear captured values
    * enable PRU INTC Sys_event 12 interrupt
    * enable PRU INTC HOST 7 interrupt
    That config was updated manually in registers.
    And I configure timer capture ISR (CSL_XBAR_INST_MPU_IRQ_136 - for example) to CSL_XBAR_PRUSS1_IRQ_HOST7 - that was Xbar (crossbar) configuration.
    Then in TimeSync_isrAndTaskInit (..._osal.c in Ti examples) I manually enable all PPS sections, call my PRU & interrupt configuration patches and implement required handling that ISR in TimeSync_latchSyncTask

    I hope my answer will be useful for others.

    Regards,
    Alex

    P.S. TI, please, add an example of using PPS from timeSync module
  • Hi Alex, thanks a lot for your detailed answer. I will raise internally your petition of a PPS + TimeSync module example.

    thank you,

    Paula