![]() |
Contiki-NG
|
Files | |
| file | nrf-ipc-radio.c |
| IPC radio driver for the nRF5340 application core. | |
| file | nrf-ipc.c |
| IPC transport layer for nRF5340 inter-core communication. | |
| file | nrf-ipc.h |
| IPC protocol definitions for nRF5340 dual-core communication. | |
Data Structures | |
| struct | nrf_ipc_msg |
| IPC message structure used for both commands and responses. More... | |
| struct | nrf_ipc_shared_mem |
| Shared memory layout between the application core and the network core. More... | |
Macros | |
| #define | NRF_IPC_PROTOCOL_VERSION 1 |
| Protocol version. | |
| #define | NRF_IPC_SHARED_MEM_ADDR 0x20070000UL |
| Shared memory address. | |
| #define | NRF_IPC_MAX_FRAME_LEN 128 |
| Maximum 802.15.4 frame size carried over IPC. | |
| #define | NRF_IPC_MAX_DATA_LEN 140 |
| Maximum data size in a command or response message. | |
| #define | NRF_IPC_CMD_TIMEOUT_MS 100 |
| Timeout in milliseconds for IPC command responses. | |
| #define | NRF_IPC_HEARTBEAT_INTERVAL_SEC 10 |
| Interval in seconds between net core heartbeat checks on the app core. | |
| #define | NRF_IPC_LOG_BUF_SIZE 2048 |
| Size of the log ring buffer for forwarding net core output to the app core. | |
| #define | NRF_IPC_SHARED_MEM ((volatile struct nrf_ipc_shared_mem *)NRF_IPC_SHARED_MEM_ADDR) |
| Get a pointer to the shared memory structure. | |
Enumerations | |
| enum | nrf_ipc_cmd_type { NRF_IPC_CMD_INIT = 1 , NRF_IPC_CMD_ON , NRF_IPC_CMD_OFF , NRF_IPC_CMD_SEND , NRF_IPC_CMD_CCA , NRF_IPC_CMD_RECEIVING , NRF_IPC_CMD_PENDING , NRF_IPC_CMD_GET_VALUE , NRF_IPC_CMD_SET_VALUE , NRF_IPC_CMD_GET_OBJECT , NRF_IPC_CMD_SET_OBJECT , NRF_IPC_CMD_DIAG } |
| IPC command types (app core -> net core). More... | |
Functions | |
| void | nrf_ipc_init (struct process *callback_proc) |
| Initialize the IPC transport layer. | |
| void | nrf_ipc_signal (void) |
| Send an IPC signal to the other core. | |
| #define NRF_IPC_CMD_TIMEOUT_MS 100 |
| #define NRF_IPC_HEARTBEAT_INTERVAL_SEC 10 |
| #define NRF_IPC_MAX_FRAME_LEN 128 |
Maximum 802.15.4 frame size carried over IPC.
The 802.15.4 PHY payload is 127 bytes; the nRF radio driver strips the 2-byte FCS, yielding up to 125 data bytes. We use 128 to provide a small margin for alignment and future use.
Definition at line 75 of file nrf-ipc.h.
Referenced by packet_input().
| #define NRF_IPC_PROTOCOL_VERSION 1 |
| #define NRF_IPC_SHARED_MEM_ADDR 0x20070000UL |
Shared memory address.
Placed at the top of the application core's RAM1 region (0x20060000–0x2007FFFF, 128 KB), which is accessible from both cores. The nRF5340 application core has 512 KB total SRAM (0x20000000–0x2007FFFF). This address must not overlap with any linker-allocated region on either core.
See nRF5340 Product Specification, Section "Memory Map" for details.
| enum nrf_ipc_cmd_type |
IPC command types (app core -> net core).
Each command is sent via the shared memory mailbox. The response carries the result code in rsp.data[0]; additional response payload (if any) starts at rsp.data[1].
| void nrf_ipc_init | ( | struct process * | callback_proc | ) |
Initialize the IPC transport layer.
Configures IPC channels and enables interrupts. The callback process will be polled when an IPC signal is received.
| callback_proc | Process to poll on IPC signal, or NULL. |