How to configure the ELC, how does the Event links configuration in e2Studio work?

Hello,

I got inspired by these blog post :

The Event Link Controller – Automatically Manage Low Level System Tasks on RA MCUs | Renesas

Creating autonomous I/O systems without the need for CPU intervention | Renesas

I want to chain events together without CPU-Intervention. For example: I want to trigger a DMA transfer by a rising edge of an IO PORT.

I understand, that this is possible with the IOPORT EVENTs, which are handled by the ELC? But looking into it I get more and more confused on how to actually use the ELC or activation sources of the DMA and other modules in general. I am able to activate the DMA when receiving data on a SCI, but this is not an ELC Event, correct?

In the e2studio I have the possibilty to use the event link configuration, but it lacks any explanation on how to use it and any follow up steps on other configurations (like PIN config or the FSP-Modules). I could not find any documents about it either.

Looking at the FSP-Docs is of little help either:

The DMAC has triggering by ELC as a feature.

But looking at the FSP of the ELC I see this picture:

This indicates to me, that the only thing possible is a link DMAC to I/OPORT but not the other way around.

Can someone explain to me, how the event link configuration works, the relation between activation sources and ELC and what configuration steps are needed for linking two modules together? And where to look in the docs?

A pointer to documents or how-tos is also very welcome Slight smile.

Some follow up questions:

  • An Event is in this context always an Interrupt?
  • Can I trigger the DTC with the ELC on a RA6M5 without CPU-Intervention? 
  • Is it possible to trigger a DMA channel with a different DMA channel? For example DMA channel 0 "transfer end" starts DMA channel 1 transfer.

Thank you in advance for your time :)

Regards

Joe

  • Essentially the ELC uses signals to/from peripherals to link a series of events.  The peripherals must support the ELC, i.e. there are special provisions in the peripherals for the ELC so not every peripheral supports ELC.

    I am not finding much for docs on the RA ELC, but there is some potentially useful info for RL78 that is very similar in concept and implementation.

    Youtube video: New ELCL Function for RL78/G23 (not much for detail but good overview)

    In response to your questions:

    1)  Event signal can be interrupt request but can also be other signals depending on the peripheral

    2) The DTC can be triggered by the ELC without CPU intervention

    3)  Yes, one DMA channel transfer end can trigger a different DMA channel using the ELC6

    The example project bundle for the EK-RAM5 includes ECL demo:

    Sample Code
    [Software=RA FSP],[Board=EK-RA6M5]
    Log in to Download ZIP 49.*** MB IDE: e2 studio/GCC/AC6, IAR, Keil MDK
  • Hello,

    Yes, you can chain events together without CPU intervention using the Event Link Controller (ELC) on RA MCUs. The ELC allows peripherals such as GPIO, timers, and DMA to interact autonomously. You are correct that SCI-based DMA triggering does not use ELC, as it is directly handled by the peripheral. However, for your use case—triggering a DMA transfer with a rising edge on an I/O port—you can achieve this by configuring the IOPORT event as a trigger source in the ELC and linking it to the DMA.

    Regarding your follow-up questions Is an event always an interrupt? No, ELC events are not always interrupts; they can trigger actions without involving the CPU. Can the ELC trigger the DTC on an RA6M5 without CPU intervention? Yes, the ELC can be used to trigger the DTC based on configured events, allowing automated data transfers. Can one DMA channel trigger another? Yes, by configuring the "transfer end" event of one DMA channel as the activation source for another DMA channel, sequential transfers can be set up.

    I'll be sharing a lab document and sample code that demonstrates how to configure ELC and other modules to achieve your desired functionality. Let me know if you need further clarification.

    I-002A Introduction to FSP 5.0.0 Non TrustZone EKRA6M3.zip

    Kind Regards,

    GN_Renesas

  • Hello GN, Hello JimB

    thank you for your answers and clarification. 

    And I am sorry for not replying sooner. I was working on a testapplication, which uses the DTC for copying data from the RX-UART into a circular buffer without cpu intervention and telling the application when a certain amount of data or a specfific byte has arrived. Your replies helped me solving occuring problems on the way :).

    Now I have a new though nut to crack Smiley. If you like you can have a look

    (+) Is the DTC fast enough transfering data from FIFO UART-RX with high baudrates? - Forum - RA MCU - Renesas Engineering Community

    Regards

    Joe