I wish to develop a bare metal application (without Zephyr) on the nRF5340.
For this purpose I am unable to find the documentation how to perform Inter Processor Communication.
So far I am trying
#include "nrf.h"
#include "nrfx.h"
#include "nrfx_ipc.h"
#include "nrf_reset.h"
void app_ipc_handler(uint32_t event_mask, void * p_context){
}
int main(void) {
nrf_reset_network_force_off(NRF_RESET, false);
nrfx_ipc_init(6, app_ipc_handler, NULL);
NVIC_EnableIRQ(IPC_IRQn);
for (int i = 0 ; i < IPC_CH_NUM; i++) {
nrfx_ipc_receive_event_channel_assign(i,i);
nrfx_ipc_receive_event_enable(i);
}
int i = 0;
while(1) {
if (i) // I'll put a breakpoint here and set i to trigger sending a signal
nrfx_ipc_signal(i);
i=0;
}
}void net_ipc_handler(uint32_t event_mask, void * p_context){
}
int main(void) {
nrfx_ipc_init(6, net_ipc_handler, NULL);
NVIC_EnableIRQ(IPC_IRQn);
for (int i = 0 ; i < IPC_CH_NUM; i++) {
nrfx_ipc_receive_event_channel_assign(i,i);
nrfx_ipc_receive_event_enable(i);
}
while(1);
}
However, net_ipc_handler() gets never called.
What is the proper way do Inter Processor Communication?