VPR HAL
- group nrf_vpr_hal
Hardware access layer for managing the VPR RISC-V CPU unit (VPR).
Defines
-
NRF_VPR_EVENTS_TRIGGERED_COUNT
Symbol specifying maximum number of available events triggered.
-
NRF_VPR_ALL_CHANNELS_INT_MASK
Macro for creating the interrupt bitmask for all event channels.
-
NRF_VPR_TASK_TRIGGER_ALL_MASK
Macro used as an mask to clear all triggered interrupts within CSR.
-
NRF_VPR_EVENTS_TRIGGERED_MIN
Symbol specifying minimal index of TRIGGERED events array that is implemented.
-
NRF_VPR_EVENTS_TRIGGERED_MAX
Symbol specifying maximal index of TRIGGERED events array that is implemented.
-
NRF_VPR_TASKS_TRIGGER_MIN
Symbol specifying minimal index of TRIGGER tasks array that is implemented.
-
NRF_VPR_TASKS_TRIGGER_MAX
Symbol specifying maximal index of TRIGGER tasks array that is implemented.
Enums
-
enum nrf_vpr_event_t
VPR events.
Values:
-
enumerator NRF_VPR_EVENT_TRIGGERED_0
Triggered 0 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_1
Triggered 1 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_2
Triggered 2 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_3
Triggered 3 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_4
Triggered 4 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_5
Triggered 5 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_6
Triggered 6 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_7
Triggered 7 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_8
Triggered 8 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_9
Triggered 9 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_10
Triggered 10 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_11
Triggered 11 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_12
Triggered 12 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_13
Triggered 13 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_14
Triggered 14 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_15
Triggered 15 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_16
Triggered 16 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_17
Triggered 17 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_18
Triggered 18 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_19
Triggered 19 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_20
Triggered 20 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_21
Triggered 21 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_22
Triggered 22 event.
-
enumerator NRF_VPR_EVENT_TRIGGERED_0
-
enum nrf_vpr_int_mask_t
VPR interrupts.
Values:
-
enumerator NRF_VPR_INT_TRIGGERED_0_MASK
Triggered 0 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_1_MASK
Triggered 1 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_2_MASK
Triggered 2 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_3_MASK
Triggered 3 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_4_MASK
Triggered 4 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_5_MASK
Triggered 5 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_6_MASK
Triggered 6 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_7_MASK
Triggered 7 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_8_MASK
Triggered 8 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_9_MASK
Triggered 9 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_10_MASK
Triggered 10 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_11_MASK
Triggered 11 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_12_MASK
Triggered 12 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_13_MASK
Triggered 13 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_14_MASK
Triggered 14 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_15_MASK
Triggered 15 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_16_MASK
Triggered 16 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_17_MASK
Triggered 17 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_18_MASK
Triggered 18 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_19_MASK
Triggered 19 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_20_MASK
Triggered 20 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_21_MASK
Triggered 21 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_22_MASK
Triggered 22 interrupt mask.
-
enumerator NRF_VPR_INT_TRIGGERED_0_MASK
-
enum nrf_vpr_task_t
VPR tasks.
Values:
-
enumerator NRF_VPR_TASK_TRIGGER_0
Trigger 0 task.
-
enumerator NRF_VPR_TASK_TRIGGER_1
Trigger 1 task.
-
enumerator NRF_VPR_TASK_TRIGGER_2
Trigger 2 task.
-
enumerator NRF_VPR_TASK_TRIGGER_3
Trigger 3 task.
-
enumerator NRF_VPR_TASK_TRIGGER_4
Trigger 4 task.
-
enumerator NRF_VPR_TASK_TRIGGER_5
Trigger 5 task.
-
enumerator NRF_VPR_TASK_TRIGGER_6
Trigger 6 task.
-
enumerator NRF_VPR_TASK_TRIGGER_7
Trigger 7 task.
-
enumerator NRF_VPR_TASK_TRIGGER_8
Trigger 8 task.
-
enumerator NRF_VPR_TASK_TRIGGER_9
Trigger 9 task.
-
enumerator NRF_VPR_TASK_TRIGGER_10
Trigger 10 task.
-
enumerator NRF_VPR_TASK_TRIGGER_11
Trigger 11 task.
-
enumerator NRF_VPR_TASK_TRIGGER_12
Trigger 12 task.
-
enumerator NRF_VPR_TASK_TRIGGER_13
Trigger 13 task.
-
enumerator NRF_VPR_TASK_TRIGGER_14
Trigger 14 task.
-
enumerator NRF_VPR_TASK_TRIGGER_15
Trigger 15 task.
-
enumerator NRF_VPR_TASK_TRIGGER_16
Trigger 16 task.
-
enumerator NRF_VPR_TASK_TRIGGER_17
Trigger 17 task.
-
enumerator NRF_VPR_TASK_TRIGGER_18
Trigger 18 task.
-
enumerator NRF_VPR_TASK_TRIGGER_19
Trigger 19 task.
-
enumerator NRF_VPR_TASK_TRIGGER_20
Trigger 20 task.
-
enumerator NRF_VPR_TASK_TRIGGER_21
Trigger 21 task.
-
enumerator NRF_VPR_TASK_TRIGGER_22
Trigger 22 task.
-
enumerator NRF_VPR_TASK_TRIGGER_0
Functions
-
NRF_STATIC_INLINE void nrf_vpr_task_trigger(NRF_VPR_Type *p_reg, nrf_vpr_task_t task)
Function for triggering the specified VPR 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_vpr_task_address_get(NRF_VPR_Type const *p_reg, nrf_vpr_task_t task)
Function for getting the address of the specified VPR 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 nrf_vpr_task_t nrf_vpr_trigger_task_get(uint8_t index)
Function for getting the specified VPR TRIGGER task.
- Parameters:
index – [in] Task index.
- Returns:
The specified VPR TRIGGER task.
-
NRF_STATIC_INLINE void nrf_vpr_event_clear(NRF_VPR_Type *p_reg, nrf_vpr_event_t event)
Function for clearing the specified VPR event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event to clear.
-
NRF_STATIC_INLINE bool nrf_vpr_event_check(NRF_VPR_Type const *p_reg, nrf_vpr_event_t event)
Function for retrieving the state of the VPR 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_vpr_event_address_get(NRF_VPR_Type const *p_reg, nrf_vpr_event_t event)
Function for getting the address of the specified VPR 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 nrf_vpr_event_t nrf_vpr_triggered_event_get(uint8_t index)
Function for getting the specified VPR TRIGGERED event.
- Parameters:
index – [in] Event index.
- Returns:
The specified VPR TRIGGERED event.
-
NRF_STATIC_INLINE void nrf_vpr_int_enable(NRF_VPR_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_vpr_int_mask_t values for bit masking.
-
NRF_STATIC_INLINE void nrf_vpr_int_disable(NRF_VPR_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_vpr_int_mask_t values for bit masking.
-
NRF_STATIC_INLINE uint32_t nrf_vpr_int_enable_check(NRF_VPR_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_vpr_int_mask_t values for bit masking.
- Returns:
Mask of enabled interrupts.
-
NRF_STATIC_INLINE void nrf_vpr_cpurun_set(NRF_VPR_Type *p_reg, bool enable)
Function for setting the state of the CPU after core reset.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
enable – [in] True if CPU is to be running, false if stopped.
-
NRF_STATIC_INLINE bool nrf_vpr_cpurun_get(NRF_VPR_Type const *p_reg)
Function for getting the state of the CPU after core reset.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values:
true – CPU is to be running after core reset.
false – CPU is to be stopped after core reset.
-
NRF_STATIC_INLINE void nrf_vpr_initpc_set(NRF_VPR_Type *p_reg, uint32_t pc)
Function for setting the initial value of the program counter after CPU reset.
Note
This address value must be 64-bit aligned.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
pc – [in] Initial value of the program counter to be set.
-
NRF_STATIC_INLINE uint32_t nrf_vpr_initpc_get(NRF_VPR_Type const *p_reg)
Function for getting the initial value of the program counter after CPU reset.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Initial value of the program counter.
-
NRF_STATIC_INLINE void nrf_vpr_debugif_dmcontrol_set(NRF_VPR_Type *p_reg, nrf_vpr_dmcontrol_t signal, bool enable)
Function for setting the specified debug mode control signal.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
signal – [in] Signal to be set.
enable – [in] True if signal is to be 1, false if 0.
-
NRF_STATIC_INLINE void nrf_vpr_debugif_dmcontrol_mask_set(NRF_VPR_Type *p_reg, uint32_t mask)
Function for setting the mask of debug mode control signals.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of signals to be set. Use nrf_vpr_dmcontrol_mask_t values for bit masking.
-
NRF_STATIC_INLINE bool nrf_vpr_debugif_dmcontrol_get(NRF_VPR_Type const *p_reg, nrf_vpr_dmcontrol_t signal)
Function for getting the debug mode control signals.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
signal – [in] Signal to be retrieved.
- Return values:
true – Signal is logical 1.
false – Signal is logical 0.
-
NRF_VPR_EVENTS_TRIGGERED_COUNT