I haven't tested all cases but if I use only one unmanaged channel to communicate between A53 Linux and M7 firmware apps, interrupt on the Linux doesn't get triggered more than once.
- IPCF User Space 4.3 on A53 Linux
- IPCF 4.3 on M7 firmware
- Interrupt-based
Below is my initialization function for IPCF
static int setup_ipc_instance(void) {
// IPC channel configuration
const int number_of_channels = 2;
struct ipc_shm_channel_cfg channel = {
.type = IPC_SHM_UNMANAGED,
.ch =
{
.unmanaged =
{
.size = CHANNEL_SIZE,
.rx_cb = rx_irq_callback,
.cb_arg = &app,
},
},
};
// This is due to a bug in the driver which requires more than one channel.
// Without this, rx_irq_callback wouldn't get triggered after the first interrupt
struct ipc_shm_channel_cfg dummy = {
.type = IPC_SHM_UNMANAGED,
.ch =
{
.unmanaged =
{
.size = 1,
.rx_cb = rx_irq_callback,
},
},
};
struct ipc_shm_channel_cfg channels[] = {channel, dummy};
// IPC shared memory configuration
struct ipc_shm_cfg shm_cfg[] = {
{
.local_shm_addr = LOCAL_SHARED_ADDR,
.remote_shm_addr = REMOTE_SHARED_ADDR,
.shm_size = IPC_SHARED_SIZE,
.inter_core_tx_irq = INTER_CORE_TX_IRQ,
.inter_core_rx_irq = INTER_CORE_RX_IRQ,
.local_core =
{
.type = IPC_CORE_DEFAULT,
.index = IPC_CORE_INDEX_0,
.trusted =
IPC_CORE_INDEX_0 | IPC_CORE_INDEX_1 | IPC_CORE_INDEX_2 | IPC_CORE_INDEX_3,
},
.remote_core =
{
.type = IPC_CORE_DEFAULT,
.index = IPC_CORE_INDEX_0,
},
.num_channels = number_of_channels,
.channels = channels,
},
};
struct ipc_shm_instances_cfg instance_cfg = {.num_instances = 1u, .shm_cfg = shm_cfg};
return ipc_shm_init(&instance_cfg);
}