IPC interrupt priority appears to be fixed at level 0 when using message services

When IPC message services are being used for message passing between application and network CPUs (for example):

CONFIG_IPC_SERVICE=y

CONFIG_IPC_SERVICE_BACKEND_RPMSG=y

CONFIG_IPC_SERVICE_RPMSG=y
CONFIG_IPC_SERVICE_STATIC_VRINGS=y

It appears that the IPC interrupt handler priority gets statically configured to level 0 in NCS source module /zephyr/drivers/ipm/ipm_nrfx_ipc.c, function gipm_init().

The system that I'm developing is using the radio and timer peripherals (among others) on the network CPU to implement a proprietary wireless protocol and the interrupt handlers for the RADIO and TIMER IRQs cannot tolerate being delayed or preempted by message handling.

Is there really no way to configure the IRQ priority of the IPC message service short of patching this NCS source module?

Parents
  • Hi, 

    Looking at the code in `gipm_init()` :

    IRQ_CONNECT(DT_INST_IRQN(0),
                DT_INST_IRQ(0, priority),
                nrfx_isr, nrfx_ipc_irq_handler, 0);

    It seems the priority is selected from a device tree entry. Inside zephyr/dts/arm/nordic/nrf5340_cpunet.dtsi I can find the following node:

    mbox: ipc: mbox@41012000 {
                            compatible = "nordic,mbox-nrf-ipc", "nordic,nrf-ipc";
                            reg = <0x41012000 0x1000>;
                            tx-mask = <0x0000ffff>;
                            rx-mask = <0x0000ffff>;
                            interrupts = <18 NRF_DEFAULT_IRQ_PRIORITY>;
                            #mbox-cells = <1>;
                            status = "okay";
                    };

    And it looks the IRQ priority can be modified by overriding the `interrupts` property of this node. 

    Regards,
    Amanda H.

Reply
  • Hi, 

    Looking at the code in `gipm_init()` :

    IRQ_CONNECT(DT_INST_IRQN(0),
                DT_INST_IRQ(0, priority),
                nrfx_isr, nrfx_ipc_irq_handler, 0);

    It seems the priority is selected from a device tree entry. Inside zephyr/dts/arm/nordic/nrf5340_cpunet.dtsi I can find the following node:

    mbox: ipc: mbox@41012000 {
                            compatible = "nordic,mbox-nrf-ipc", "nordic,nrf-ipc";
                            reg = <0x41012000 0x1000>;
                            tx-mask = <0x0000ffff>;
                            rx-mask = <0x0000ffff>;
                            interrupts = <18 NRF_DEFAULT_IRQ_PRIORITY>;
                            #mbox-cells = <1>;
                            status = "okay";
                    };

    And it looks the IRQ priority can be modified by overriding the `interrupts` property of this node. 

    Regards,
    Amanda H.

Children
Related