AM2612: ECAP inputs

Part Number: AM2612
Other Parts Discussed in Thread: SYSCONFIG

Hi,

On AM261x is it possible to use ethercat sync0 and ethercat sync1 signals as ECAP inputs as it's possible on C2000?
This difference may be due to PRU usage on AM261x instead of C2000 implementation.

Example on F28P65:

image.png

Still on AM261x, I need to timestamp SDFM interrupt. For now, I toggle a GPIO inside the SDFM ISR and use this GPIO as ECAP input.
is there a way to do this by hardware without ISR?

Regards

  • On the AM261x, since EtherCAT is implemented via the PRU-ICSS, the SYNC0 and SYNC1 pulses are generated within the PRU's IEP module. You can assign the PRU SYNCx output events to an internal Input X-BAR instance. From there, change the ECAP input source from standard GPIO over to the designated Input X-BAR signal. 

    As for hardware timestamping of SDFM events, you can configure your SDFM data-ready or comparator event to trigger an output on the CONTROLSS/Core X-BAR and then route that specific X-BAR output line back into an Input X-BAR instance configured for your ECAP module. The eCAP will latch the time-base counter (CTR) into the CAP1-CAP4 registers purely on the hardware edge event.

    Best Regards,

    Masoud

  • Hi,

    Regarding EtherCAT sync0 and sync1, in Ethercat configuration in sysconfig, I have

    so the idea is to connect those GPIO to an input xbar to link them to ECAP. Right?

    Regarding SDFM, I didn't find option in SDFM configuration and I have no CONTROLSS or Core X-BAR in sysconfig. Could you show me where to find them please.

    Thanks

  • Thanks for your patient here. We'll reply soon.

    Best Regards,

    Masoud

  • Yes, the standard path is to route those SYNC0 and SYNC1 events to their assigned physical GPIO pins. Once mapped to the external pins, you simply wire those pins back over into an Input X-BAR instance. From there, you set the eCAP input source selection multiplexer to listen to that specific Input X-BAR channel instead of a standard peripheral pin.

    To hardware-timestamp an SDFM, enable an SDFM event like data-ready (FLT_DRDY) or comparator hhigh/low threshold. Then configure the Input X-bar to your specific SDFM channel event (e.g., SDFM0_CH1_DRDY or SDFM0_CH1_COMPH). Finally, look for the input source / capture input select (ECAPxSEL) configuration parameter. Rather than choosing a physical GPIO input pin, set this parameter to bind directly to the Input X-BAR instance number you created.

    Best Regards,

    Masoud

  • Hi,

    What you explain on SDFM is what I want to do but for what I see only comph and compl events could be generated and link to xbar. My understand from sysconfig, sdfm source code, or TRM, is that data-ready seems to be only linked to interrupt or dma but not xbar.

    Could you show me the required configuration in sysconfig or in source code to link sdfm data-ready to xbar.

    Thanks

  • Hi Gildas,

    Yes, looking at the CONTROLSS output X-BAR register definitions (cslr_controlss_outputxbar.h, group G5), the only SDFM-related signals exposed to the X-BAR are the per-filter comparator events. Given that the option will be offloading the GPIO toggling entirely from the CPU to the DMA controller. You can configure the SDFM FLT_DRDY event to trigger an EDMA channel and set up the EDMA transfer to perform a single write directly to a designated GPIO toggle register ansd map that physical GPIO pin to your Input X-BAR instance connected to the eCAP module.

    Best Regards,

    Masoud

  • Hi,

    Thank you, it’s clear now and I understand the approach.

    Regards