IPC HAL

group nrf_ipc_hal

Hardware access layer for managing the Interprocessor Communication (IPC) peripheral.

Enums

enum nrf_ipc_task_t

IPC tasks.

Values:

enumerator NRF_IPC_TASK_SEND_0

Trigger events on channels enabled in SEND_CNF[0].

enumerator NRF_IPC_TASK_SEND_1

Trigger events on channels enabled in SEND_CNF[1].

enumerator NRF_IPC_TASK_SEND_2

Trigger events on channels enabled in SEND_CNF[2].

enumerator NRF_IPC_TASK_SEND_3

Trigger events on channels enabled in SEND_CNF[3].

enumerator NRF_IPC_TASK_SEND_4

Trigger events on channels enabled in SEND_CNF[4].

enumerator NRF_IPC_TASK_SEND_5

Trigger events on channels enabled in SEND_CNF[5].

enumerator NRF_IPC_TASK_SEND_6

Trigger events on channels enabled in SEND_CNF[6].

enumerator NRF_IPC_TASK_SEND_7

Trigger events on channels enabled in SEND_CNF[7].

enumerator NRF_IPC_TASK_SEND_8

Trigger events on channels enabled in SEND_CNF[8].

enumerator NRF_IPC_TASK_SEND_9

Trigger events on channels enabled in SEND_CNF[9].

enumerator NRF_IPC_TASK_SEND_10

Trigger events on channels enabled in SEND_CNF[10].

enumerator NRF_IPC_TASK_SEND_11

Trigger events on channels enabled in SEND_CNF[11].

enumerator NRF_IPC_TASK_SEND_12

Trigger events on channels enabled in SEND_CNF[12].

enumerator NRF_IPC_TASK_SEND_13

Trigger events on channels enabled in SEND_CNF[13].

enumerator NRF_IPC_TASK_SEND_14

Trigger events on channels enabled in SEND_CNF[14].

enumerator NRF_IPC_TASK_SEND_15

Trigger events on channels enabled in SEND_CNF[15].

enum nrf_ipc_event_t

IPC events.

Values:

enumerator NRF_IPC_EVENT_RECEIVE_0

Event received on the IPC channels enabled in RECEIVE_CNF[0] register.

enumerator NRF_IPC_EVENT_RECEIVE_1

Event received on the IPC channels enabled in RECEIVE_CNF[1] register.

enumerator NRF_IPC_EVENT_RECEIVE_2

Event received on the IPC channels enabled in RECEIVE_CNF[2] register.

enumerator NRF_IPC_EVENT_RECEIVE_3

Event received on the IPC channels enabled in RECEIVE_CNF[3] register.

enumerator NRF_IPC_EVENT_RECEIVE_4

Event received on the IPC channels enabled in RECEIVE_CNF[4] register.

enumerator NRF_IPC_EVENT_RECEIVE_5

Event received on the IPC channels enabled in RECEIVE_CNF[5] register.

enumerator NRF_IPC_EVENT_RECEIVE_6

Event received on the IPC channels enabled in RECEIVE_CNF[6] register.

enumerator NRF_IPC_EVENT_RECEIVE_7

Event received on the IPC channels enabled in RECEIVE_CNF[7] register.

enumerator NRF_IPC_EVENT_RECEIVE_8

Event received on the IPC channels enabled in RECEIVE_CNF[8] register.

enumerator NRF_IPC_EVENT_RECEIVE_9

Event received on the IPC channels enabled in RECEIVE_CNF[9] register.

enumerator NRF_IPC_EVENT_RECEIVE_10

Event received on the IPC channels enabled in RECEIVE_CNF[10] register.

enumerator NRF_IPC_EVENT_RECEIVE_11

Event received on the IPC channels enabled in RECEIVE_CNF[11] register.

enumerator NRF_IPC_EVENT_RECEIVE_12

Event received on the IPC channels enabled in RECEIVE_CNF[12] register.

enumerator NRF_IPC_EVENT_RECEIVE_13

Event received on the IPC channels enabled in RECEIVE_CNF[13] register.

enumerator NRF_IPC_EVENT_RECEIVE_14

Event received on the IPC channels enabled in RECEIVE_CNF[14] register.

enumerator NRF_IPC_EVENT_RECEIVE_15

Event received on the IPC channels enabled in RECEIVE_CNF[15] register.

enum nrf_ipc_channel_t

IPC channel positions.

Values:

enumerator NRF_IPC_CHANNEL_0

Bitmask position for IPC channel 0.

enumerator NRF_IPC_CHANNEL_1

Bitmask position for IPC channel 1.

enumerator NRF_IPC_CHANNEL_2

Bitmask position for IPC channel 2.

enumerator NRF_IPC_CHANNEL_3

Bitmask position for IPC channel 3.

enumerator NRF_IPC_CHANNEL_4

Bitmask position for IPC channel 4.

enumerator NRF_IPC_CHANNEL_5

Bitmask position for IPC channel 5.

enumerator NRF_IPC_CHANNEL_6

Bitmask position for IPC channel 6.

enumerator NRF_IPC_CHANNEL_7

Bitmask position for IPC channel 7.

enumerator NRF_IPC_CHANNEL_8

Bitmask position for IPC channel 8.

enumerator NRF_IPC_CHANNEL_9

Bitmask position for IPC channel 9.

enumerator NRF_IPC_CHANNEL_10

Bitmask position for IPC channel 10.

enumerator NRF_IPC_CHANNEL_11

Bitmask position for IPC channel 11.

enumerator NRF_IPC_CHANNEL_12

Bitmask position for IPC channel 12.

enumerator NRF_IPC_CHANNEL_13

Bitmask position for IPC channel 13.

enumerator NRF_IPC_CHANNEL_14

Bitmask position for IPC channel 14.

enumerator NRF_IPC_CHANNEL_15

Bitmask position for IPC channel 15.

enum nrf_ipc_int_mask_t

IPC interrupts.

Values:

enumerator NRF_IPC_INT_RECEIVE_0

Interrupt on receive event 0.

enumerator NRF_IPC_INT_RECEIVE_1

Interrupt on receive event 1.

enumerator NRF_IPC_INT_RECEIVE_2

Interrupt on receive event 2.

enumerator NRF_IPC_INT_RECEIVE_3

Interrupt on receive event 3.

enumerator NRF_IPC_INT_RECEIVE_4

Interrupt on receive event 4.

enumerator NRF_IPC_INT_RECEIVE_5

Interrupt on receive event 5.

enumerator NRF_IPC_INT_RECEIVE_6

Interrupt on receive event 6.

enumerator NRF_IPC_INT_RECEIVE_7

Interrupt on receive event 7.

enumerator NRF_IPC_INT_RECEIVE_8

Interrupt on receive event 8.

enumerator NRF_IPC_INT_RECEIVE_9

Interrupt on receive event 9.

enumerator NRF_IPC_INT_RECEIVE_10

Interrupt on receive event 10.

enumerator NRF_IPC_INT_RECEIVE_11

Interrupt on receive event 11.

enumerator NRF_IPC_INT_RECEIVE_12

Interrupt on receive event 12.

enumerator NRF_IPC_INT_RECEIVE_13

Interrupt on receive event 13.

enumerator NRF_IPC_INT_RECEIVE_14

Interrupt on receive event 14.

enumerator NRF_IPC_INT_RECEIVE_15

Interrupt on receive event 15.

Functions

NRF_STATIC_INLINE void nrf_ipc_task_trigger(NRF_IPC_Type *p_reg, nrf_ipc_task_t task)

Function for triggering the specified IPC task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Task to be triggered.

NRF_STATIC_INLINE uint32_t nrf_ipc_task_address_get(NRF_IPC_Type const *p_reg, nrf_ipc_task_t task)

Function for getting the address of the specified IPC task register.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Specified task.

Returns:

Address of the specified task register.

NRF_STATIC_INLINE void nrf_ipc_event_clear(NRF_IPC_Type *p_reg, nrf_ipc_event_t event)

Function for clearing the specified IPC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to clear.

NRF_STATIC_INLINE bool nrf_ipc_event_check(NRF_IPC_Type const *p_reg, nrf_ipc_event_t event)

Function for retrieving the state of the IPC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be checked.

Return values:
  • true – The event has been generated.

  • false – The event has not been generated.

NRF_STATIC_INLINE uint32_t nrf_ipc_event_address_get(NRF_IPC_Type const *p_reg, nrf_ipc_event_t event)

Function for getting the address of the specified IPC event register.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Specified event.

Returns:

Address of the specified event register.

NRF_STATIC_INLINE void nrf_ipc_int_enable(NRF_IPC_Type *p_reg, uint32_t mask)

Function for enabling specified interrupts.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be enabled. Use nrf_ipc_int_mask_t values for bit masking.

NRF_STATIC_INLINE void nrf_ipc_int_disable(NRF_IPC_Type *p_reg, uint32_t mask)

Function for disabling specified interrupts.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be disabled. Use nrf_ipc_int_mask_t values for bit masking.

NRF_STATIC_INLINE uint32_t nrf_ipc_int_enable_check(NRF_IPC_Type const *p_reg, uint32_t mask)

Function for checking if the specified interrupts are enabled.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • mask[in] Mask of interrupts to be checked. Use nrf_ipc_int_mask_t values for bit masking.

Returns:

Mask of enabled interrupts.

NRF_STATIC_INLINE uint32_t nrf_ipc_int_pending_get(NRF_IPC_Type const *p_reg)

Function for retrieving the state of pending interrupts of the receive event.

States of pending interrupt are saved as a bitmask. First position corresponds with EVENTS_RECEIVE[0] event, second one with EVENTS_RECEIVE[1] etc. One set at particular position means that interrupt for event is pending.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Returns:

Bitmask with information about pending interrupts of EVENTS_RECEIVE[n] events. Use nrf_ipc_int_mask_t values for bit masking.

NRF_STATIC_INLINE void nrf_ipc_subscribe_set(NRF_IPC_Type *p_reg, nrf_ipc_task_t task, uint8_t channel)

Function for setting the DPPI subscribe configuration for a given IPC task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Task for which to set the configuration.

  • channel[in] DPPI channel through which to subscribe events.

NRF_STATIC_INLINE void nrf_ipc_subscribe_clear(NRF_IPC_Type *p_reg, nrf_ipc_task_t task)

Function for clearing the DPPI subscribe configuration for a given IPC task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Task for which to clear the configuration.

NRF_STATIC_INLINE void nrf_ipc_publish_set(NRF_IPC_Type *p_reg, nrf_ipc_event_t event, uint8_t channel)

Function for setting the DPPI publish configuration for a given IPC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event for which to set the configuration.

  • channel[in] DPPI channel through which to publish the event.

NRF_STATIC_INLINE void nrf_ipc_publish_clear(NRF_IPC_Type *p_reg, nrf_ipc_event_t event)

Function for clearing the DPPI publish configuration for a given IPC event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event for which to clear the configuration.

NRF_STATIC_INLINE void nrf_ipc_send_config_set(NRF_IPC_Type *p_reg, uint8_t index, uint32_t channels_mask)

Function for setting the configuration of the specified send task.

channels_mask bitmask must be created with nrf_ipc_channel_t values: NRF_IPC_CHANNEL_0 | NRF_IPC_CHANNEL_1 | … | NRF_IPC_CHANNEL_n

Note

This function overrides current configuration.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the send task.

  • channels_mask[in] Bitmask specifying channels that are to be enabled for this task.

NRF_STATIC_INLINE uint32_t nrf_ipc_send_config_get(NRF_IPC_Type *const p_reg, uint8_t index)

Function for getting the configuration of the specified send task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the send event configuration.

Return values:

Bitmask – of channels enabled for this task.

NRF_STATIC_INLINE void nrf_ipc_receive_config_set(NRF_IPC_Type *p_reg, uint8_t index, uint32_t channels_mask)

Function for assigning receive event to the IPC channels.

channels_mask bitmask must be created with nrf_ipc_channel_t values: NRF_IPC_CHANNEL_0 | NRF_IPC_CHANNEL_1 | … | NRF_IPC_CHANNEL_n

Note

This function overrides current configuration.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the receive event configuration.

  • channels_mask[in] Bitmask with IPC channels from which the receive event will generate interrupts.

NRF_STATIC_INLINE uint32_t nrf_ipc_receive_config_get(NRF_IPC_Type *const p_reg, uint8_t index)

Function for getting receive event configuration.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the receive event configuration.

Returns:

Mask of channels connected with receive event.

NRF_STATIC_INLINE void nrf_ipc_gpmem_set(NRF_IPC_Type *p_reg, uint8_t index, uint32_t data)

Function for storing data in general purpose memory cell.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the general purpose memory cell.

  • data[in] Data to be stored.

NRF_STATIC_INLINE uint32_t nrf_ipc_gpmem_get(NRF_IPC_Type const *p_reg, uint8_t index)

Function for getting value of the general purpose memory cell.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • index[in] Index of the general purpose memory cell.

Returns:

Stored data.

NRF_STATIC_INLINE nrf_ipc_task_t nrf_ipc_send_task_get(uint8_t index)

Function for getting SEND task by its index.

Parameters:
  • index[in] Index of the SEND task.

Returns:

SEND task.

NRF_STATIC_INLINE nrf_ipc_event_t nrf_ipc_receive_event_get(uint8_t index)

Function for getting RECEIVE event by its index.

Parameters:
  • index[in] Index of the RECEIVE event.

Returns:

RECEIVE event.