nRF5340 IPC communication

Hello,

I am using Nordic nRF Connect SDK v3.1.1 and nRF5340DK board.

My project is based on the project: GitHub - nordic-auko/nRF5-ble-timesync-demo: nRF52 clock synchronization demo code.

I added communication via BLE to timesync app and I built two separate applications based on timesync-demo sample. 
I have 2 applications:
- Receiever is receiving BLE data and sending synchronization data - I will have this application on one device
- Transmitter is sending BLE data and receiving synchronization - I will have this application on two or three devices

I want to use ADC and send data from transmitter to receiver (with time synchronization).
I found out that netcore (cpunet) does not have access to ADC, so what I did was that cpuapp collects data from the ADC and then sends it to cpunet using IPC.
My IPC communication is based on ipc_service from this path in SDK files: "\ncs\v3.1.1\nrf\samples\ipc\ipc_service".
I am using the same functions (ep_recv with small modification) to send and receive IPC messages on cpuapp and cpunet.
This functions are: ep_boundep_recv
ipc_service_open_instanceipc_service_register_endpoint ipc_service_send.

Part of the application on cpuapp is ipc_service sample that is extended to collecting data from ADC, and sending this data to cpunet via IPC.
Part of the application on cpunet is timesync-demo that is extended to sending and receiving data via BLE, and receiving data from cpuapp via IPC.

I want to send ADC data from receiver to tramsmitter via BLE every 10 ms.

QUESTIONS: 

Will the IPC implementation slow down my application or is it fast enough that I can read data from the ADC on cpuapp every 10 ms (or even every 8 ms), then send it via IPC to cpunet, and then send it from cpunet to the receiver via BLE ?     [ each of these steps should occur every 10ms ]
How much data (how many Bytes) can be sent via IPC so that the transmission does not slow down the rest of the application ?

 

Can cpuapp and cpunet communication via IPC work both ways equally well (cpuapp -> cpunet or cpunet -> cpuapp) ?

If I want to establish two-way IPC communication, do I need to add additional mechanisms to avoid errors or data loss ?

Is the method of sending data via IPC presented in the "ipc_service" sample (extended to send data array from ADC) suitable for my purposes ?
Are there other better methods or perhaps different functions that should be used in the final application ?

 

Best Regards

 

Related