Is there an nrfx API call to allocate an unused IPC channel on the nrf5340?

I need to use an IPC channel between the Application and Network CPUs to notify one side when the other side has modified data in shared SRAM (region 0x20070000). My system also uses rpmsg_service to exchange data messages and that service uses a couple of IPC channels. I can empirically discover which IPC channels are being used by looking at the .config file after my application has been compiled and linked, but I was hoping there would be a call similar to:

nrfx_dppi_channel_alloc(uint8_t *p_channel);
I use this call to safely allocate DPPI channels quite frequently. If there's a similar call for allocating IPC channels I've not been able to find it.
Thanks much,
Kevin
Parents Reply
  • These calls are connecting IPC tasks/events to specific IPC channels. The IPC driver is configured and running on my system and those connections appear to be already configured in a default way (task N is connected to channel N in SEND_CNF[N] and channel N is connected to event N in RECEIVE_CNF[N], N=0-15).

    Since I'm using the rpmsg service in my system that service is making the call to nrfx_ipc_init() and connecting an interrupt handler. Because of this I can't directly use the IPC driver, it's already commandeered by the rpmsg service. Instead I'm publishing the IPC channel event that I'm using to a DPPI channel and subscribing an EGU peripheral event to the DPPI channel to get my interrupt.

    What I'm really looking for is a programmatic way to discover which IPC channels are being used by the rpmsg service so I don't attempt to use one of the same channels.

    Thanks,

    Kevin

Children
  • Hello again

    I've asked around internally about this, and it's currently not possible to do this with the IPC API.

    But if the information you need is available in the Zephyr devicetree (you can check in build/zephyr/zephyr.dts), then you could use the devicetree API to make this available at runtime for example by populating a struct with the DT_NODELABEL macro.

    Best regards,

    Einar

Related