Post Go back to editing

Simplest way for SHARC to trigger event in ARM Linux in SC573

I'm running Buildroot Linux in core 0 of an SC573. I would like a thread to wait for an event to be signaled by one of the SHARC cores. I've been using MCAPI, but it's staggeringly inefficient, not to mention buggy, so I'm looking for a simpler, faster alternative. One thing that might work would be to take an unused GPIO line, pulse it from the SHARC core, and have a Linux thread wait for an edge interrupt using the GPIO sysfs interface. But I'm wondering if there's a way to do it without actually involving a particular external hardware line. I'd like Linux to be able to open some pseudo-file, wait on it with read() or poll(), and then trigger it with some simple efficient operation in the SHARC. Is there a preferred way to do this, or am I stuck with MCAPI?

  • Hi Perocco,

    You can use the Trigger Routing Unit (TRU) to notify the ARM core from the SHARC.

    Please follow the below instructions for reference,

    On the SHARC you need to set up a trigger configuration such that an IRQ is raised on the ARM when a particular trigger is invoked.
    For example:

    adi_tru_ConfigureSlave( TRGS_TRU0_IRQ2, TRGM_SOFT0 );

    When you wish to send an interrupt to the ARM you call:


    On the ARM side you can use the UIO framework in Linux to receive the interrupt in user space.

    The interrupt number can be seen in section 7.2 of ADSP-SC57x/ADSP-2157x SHARC+ Processor Hardware Reference, Revision 1.1, January 2020 (
    You will need to subtract 32 due to how they are represented in Linux so for TRU0_IRQ2 as used above instead of using 205 listed in the Hardware Reference you should use 173.

    In order to use the UIO framework it is necessary to enable it in the kernel configuration and also to add the interrupt to the dts file. It will look something like:
    core1-uio {
    compatible = "generic-uio";
    interrupt-parent = <&gic>;
    interrupts = <0 173 1>;
    status = "okay";

    Additionally an additional boot argument is required to be passed from U-Boot, namely


    The interrupt will show up as a device “/dev/uio0” and you can use normal file actions on it.

    Vignesh R

  • Thanks for that detailed response. I don't think we currently have UIO included in our old Buildroot 4.0 build, but if I can get our Linux guru to rebuild Linux, I'll have him put that in.