![]() |
nrfx 4.5.0
|
Hardware access layer for managing the VPR RISC-V CPU unit (VPR). More...
Macros | |
| #define | NRF_VPR_EVENTS_TRIGGERED_COUNT VPR_EVENTS_TRIGGERED_MaxCount |
| Symbol specifying maximum number of available events triggered. | |
| #define | NRF_VPR_ALL_CHANNELS_INT_MASK |
| Macro for creating the interrupt bitmask for all event channels. | |
| #define | NRF_VPR_TASK_TRIGGER_ALL_MASK UINT32_MAX |
| Macro used as an mask to clear all triggered interrupts within CSR. | |
| #define | NRF_VPR_EVENTS_TRIGGERED_MIN VPR_EVENTS_TRIGGERED_MinIndex |
| Symbol specifying minimal index of TRIGGERED events array that is implemented. | |
| #define | NRF_VPR_EVENTS_TRIGGERED_MAX VPR_EVENTS_TRIGGERED_MaxIndex |
| Symbol specifying maximal index of TRIGGERED events array that is implemented. | |
| #define | NRF_VPR_TASKS_TRIGGER_MIN VPR_TASKS_TRIGGER_MinIndex |
| Symbol specifying minimal index of TRIGGER tasks array that is implemented. | |
| #define | NRF_VPR_TASKS_TRIGGER_MAX VPR_TASKS_TRIGGER_MaxIndex |
| Symbol specifying maximal index of TRIGGER tasks array that is implemented. | |
Enumerations | |
| enum | nrf_vpr_event_t { NRF_VPR_EVENT_TRIGGERED_0 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[0]) , NRF_VPR_EVENT_TRIGGERED_1 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[1]) , NRF_VPR_EVENT_TRIGGERED_2 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[2]) , NRF_VPR_EVENT_TRIGGERED_3 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[3]) , NRF_VPR_EVENT_TRIGGERED_4 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[4]) , NRF_VPR_EVENT_TRIGGERED_5 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[5]) , NRF_VPR_EVENT_TRIGGERED_6 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[6]) , NRF_VPR_EVENT_TRIGGERED_7 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[7]) , NRF_VPR_EVENT_TRIGGERED_8 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[8]) , NRF_VPR_EVENT_TRIGGERED_9 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[9]) , NRF_VPR_EVENT_TRIGGERED_10 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[10]) , NRF_VPR_EVENT_TRIGGERED_11 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[11]) , NRF_VPR_EVENT_TRIGGERED_12 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[12]) , NRF_VPR_EVENT_TRIGGERED_13 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[13]) , NRF_VPR_EVENT_TRIGGERED_14 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[14]) , NRF_VPR_EVENT_TRIGGERED_15 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[15]) , NRF_VPR_EVENT_TRIGGERED_16 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[16]) , NRF_VPR_EVENT_TRIGGERED_17 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[17]) , NRF_VPR_EVENT_TRIGGERED_18 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[18]) , NRF_VPR_EVENT_TRIGGERED_19 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[19]) , NRF_VPR_EVENT_TRIGGERED_20 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[20]) , NRF_VPR_EVENT_TRIGGERED_21 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[21]) , NRF_VPR_EVENT_TRIGGERED_22 = offsetof(NRF_VPR_Type, EVENTS_TRIGGERED[22]) } |
| VPR events. More... | |
| enum | nrf_vpr_int_mask_t { NRF_VPR_INT_TRIGGERED_0_MASK = VPR_INTENSET_TRIGGERED0_Msk , NRF_VPR_INT_TRIGGERED_1_MASK = VPR_INTENSET_TRIGGERED1_Msk , NRF_VPR_INT_TRIGGERED_2_MASK = VPR_INTENSET_TRIGGERED2_Msk , NRF_VPR_INT_TRIGGERED_3_MASK = VPR_INTENSET_TRIGGERED3_Msk , NRF_VPR_INT_TRIGGERED_4_MASK = VPR_INTENSET_TRIGGERED4_Msk , NRF_VPR_INT_TRIGGERED_5_MASK = VPR_INTENSET_TRIGGERED5_Msk , NRF_VPR_INT_TRIGGERED_6_MASK = VPR_INTENSET_TRIGGERED6_Msk , NRF_VPR_INT_TRIGGERED_7_MASK = VPR_INTENSET_TRIGGERED7_Msk , NRF_VPR_INT_TRIGGERED_8_MASK = VPR_INTENSET_TRIGGERED8_Msk , NRF_VPR_INT_TRIGGERED_9_MASK = VPR_INTENSET_TRIGGERED9_Msk , NRF_VPR_INT_TRIGGERED_10_MASK = VPR_INTENSET_TRIGGERED10_Msk , NRF_VPR_INT_TRIGGERED_11_MASK = VPR_INTENSET_TRIGGERED11_Msk , NRF_VPR_INT_TRIGGERED_12_MASK = VPR_INTENSET_TRIGGERED12_Msk , NRF_VPR_INT_TRIGGERED_13_MASK = VPR_INTENSET_TRIGGERED13_Msk , NRF_VPR_INT_TRIGGERED_14_MASK = VPR_INTENSET_TRIGGERED14_Msk , NRF_VPR_INT_TRIGGERED_15_MASK = VPR_INTENSET_TRIGGERED15_Msk , NRF_VPR_INT_TRIGGERED_16_MASK = VPR_INTENSET_TRIGGERED16_Msk , NRF_VPR_INT_TRIGGERED_17_MASK = VPR_INTENSET_TRIGGERED17_Msk , NRF_VPR_INT_TRIGGERED_18_MASK = VPR_INTENSET_TRIGGERED18_Msk , NRF_VPR_INT_TRIGGERED_19_MASK = VPR_INTENSET_TRIGGERED19_Msk , NRF_VPR_INT_TRIGGERED_20_MASK = VPR_INTENSET_TRIGGERED20_Msk , NRF_VPR_INT_TRIGGERED_21_MASK = VPR_INTENSET_TRIGGERED21_Msk , NRF_VPR_INT_TRIGGERED_22_MASK = VPR_INTENSET_TRIGGERED22_Msk } |
| VPR interrupts. More... | |
| enum | nrf_vpr_task_t { NRF_VPR_TASK_TRIGGER_0 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[0]) , NRF_VPR_TASK_TRIGGER_1 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[1]) , NRF_VPR_TASK_TRIGGER_2 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[2]) , NRF_VPR_TASK_TRIGGER_3 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[3]) , NRF_VPR_TASK_TRIGGER_4 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[4]) , NRF_VPR_TASK_TRIGGER_5 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[5]) , NRF_VPR_TASK_TRIGGER_6 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[6]) , NRF_VPR_TASK_TRIGGER_7 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[7]) , NRF_VPR_TASK_TRIGGER_8 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[8]) , NRF_VPR_TASK_TRIGGER_9 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[9]) , NRF_VPR_TASK_TRIGGER_10 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[10]) , NRF_VPR_TASK_TRIGGER_11 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[11]) , NRF_VPR_TASK_TRIGGER_12 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[12]) , NRF_VPR_TASK_TRIGGER_13 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[13]) , NRF_VPR_TASK_TRIGGER_14 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[14]) , NRF_VPR_TASK_TRIGGER_15 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[15]) , NRF_VPR_TASK_TRIGGER_16 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[16]) , NRF_VPR_TASK_TRIGGER_17 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[17]) , NRF_VPR_TASK_TRIGGER_18 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[18]) , NRF_VPR_TASK_TRIGGER_19 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[19]) , NRF_VPR_TASK_TRIGGER_20 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[20]) , NRF_VPR_TASK_TRIGGER_21 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[21]) , NRF_VPR_TASK_TRIGGER_22 = offsetof(NRF_VPR_Type, TASKS_TRIGGER[22]) } |
| VPR tasks. More... | |
| enum | nrf_vpr_dmcontrol_t { NRF_VPR_DMCONTROL_DMACTIVE , NRF_VPR_DMCONTROL_NDMRESET } |
| Debug Mode Control signals. More... | |
| enum | nrf_vpr_dmcontrol_mask_t { NRF_VPR_DMCONTROL_DMACTIVE_MASK = VPR_DEBUGIF_DMCONTROL_DMACTIVE_Msk , NRF_VPR_DMCONTROL_NDMRESET_MASK = VPR_DEBUGIF_DMCONTROL_NDMRESET_Msk } |
| Debug Mode Control signal masks. More... | |
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. | |
| 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. | |
| NRF_STATIC_INLINE nrf_vpr_task_t | nrf_vpr_trigger_task_get (uint8_t index) |
| Function for getting 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. | |
| 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. | |
| 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. | |
| NRF_STATIC_INLINE nrf_vpr_event_t | nrf_vpr_triggered_event_get (uint8_t index) |
| Function for getting 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. | |
| NRF_STATIC_INLINE void | nrf_vpr_int_disable (NRF_VPR_Type *p_reg, uint32_t mask) |
| Function for disabling specified interrupts. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
Hardware access layer for managing the VPR RISC-V CPU unit (VPR).
| #define NRF_VPR_ALL_CHANNELS_INT_MASK |
Macro for creating the interrupt bitmask for all event channels.
| enum nrf_vpr_dmcontrol_t |
| enum nrf_vpr_event_t |
VPR events.
| enum nrf_vpr_int_mask_t |
VPR interrupts.
| enum nrf_vpr_task_t |
VPR tasks.
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | CPU is to be running after core reset. |
| false | CPU is to be stopped after core reset. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if CPU is to be running, false if stopped. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | signal | Signal to be retrieved. |
| true | Signal is logical 1. |
| false | Signal is logical 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of signals to be set. Use nrf_vpr_dmcontrol_mask_t values for bit masking. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | signal | Signal to be set. |
| [in] | enable | True if signal is to be 1, false if 0. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Specified event. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to clear. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pc | Initial value of the program counter to be set. |
| NRF_STATIC_INLINE void nrf_vpr_int_disable | ( | NRF_VPR_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_vpr_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_vpr_int_enable | ( | NRF_VPR_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_vpr_int_mask_t values for bit masking. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Specified task. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task to be triggered. |
| NRF_STATIC_INLINE nrf_vpr_task_t nrf_vpr_trigger_task_get | ( | uint8_t | index | ) |
Function for getting the specified VPR TRIGGER task.
| [in] | index | Task index. |
| NRF_STATIC_INLINE nrf_vpr_event_t nrf_vpr_triggered_event_get | ( | uint8_t | index | ) |
Function for getting the specified VPR TRIGGERED event.
| [in] | index | Event index. |