Hardware access layer for managing the VPR RISC-V CPU Control and Status Registers for VPR Timer (VPR CSR VTIM).
More...
Hardware access layer for managing the VPR RISC-V CPU Control and Status Registers for VPR Timer (VPR CSR VTIM).
◆ nrf_vpr_csr_vtim_count_t
Counter modes.
Enumerator |
---|
NRF_VPR_CSR_VTIM_COUNT_STOP | Counter stops at 0.
|
NRF_VPR_CSR_VTIM_COUNT_WRAP | Counter will continue counting from 0xFFF.
|
NRF_VPR_CSR_VTIM_COUNT_RELOAD | Counter will continue counting from the value in counter top.
|
NRF_VPR_CSR_VTIM_COUNT_TRIGGER_COMBINED | Trigger (counter 0) or combined (counter 1) mode.
Trigger (applies to counter 0): Counter stops at 0. Counting will restart when a VIO event happens. Combined (applies to counter 1): Counter 1 acts as an extension of counter 0. (16 most significant bits of a 32-bit counter.)
|
◆ nrf_vpr_csr_vtim_combined_counter_add_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_add_set |
( |
uint32_t |
value | ) |
|
Function for setting the combined counter add.
- Note
- This function should be used in 32-bit counter mode.
- Parameters
-
[in] | value | Add value to be set. |
◆ nrf_vpr_csr_vtim_combined_counter_get()
NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vtim_combined_counter_get |
( |
void |
| ) |
|
Function for getting the combined counter value.
- Note
- Lower 16 bits represent counter 0, while higher 16 bits represent counter 1.
- Returns
- Counter value.
◆ nrf_vpr_csr_vtim_combined_counter_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_set |
( |
uint32_t |
value | ) |
|
Function for setting the combined counter value.
- Note
- Lower 16 bits represent counter 0, while higher 16 bits represent counter 1.
- Parameters
-
[in] | value | Value to be set. |
◆ nrf_vpr_csr_vtim_combined_counter_top_get()
NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vtim_combined_counter_top_get |
( |
void |
| ) |
|
Function for getting the combined counter top.
- Note
- Lower 16 bits represent counter 0, while higher 16 bits represent counter 1.
- Returns
- Counter top.
◆ nrf_vpr_csr_vtim_combined_counter_top_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_top_set |
( |
uint32_t |
value | ) |
|
Function for setting the combined counter top.
- Note
- Lower 16 bits represent counter 0, while higher 16 bits represent counter 1.
- Parameters
-
[in] | value | Top value to be set. |
◆ nrf_vpr_csr_vtim_combined_wait_trigger()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_wait_trigger |
( |
void |
| ) |
|
Function for triggering the wait.
Writing to this register will stall the CPU until 32-bit counter reaches 0.
- Note
- This function should be used in 32-bit counter mode.
◆ nrf_vpr_csr_vtim_count_mode_set()
Function for setting the counter mode.
- Parameters
-
[in] | counter | Index of the counter. |
[in] | mode | Counter mode to be set. |
◆ nrf_vpr_csr_vtim_simple_counter_add_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_add_set |
( |
uint8_t |
counter, |
|
|
uint16_t |
value |
|
) |
| |
Function for setting the counter add.
- Parameters
-
[in] | counter | Index of the counter. |
[in] | value | Add value to be set. |
◆ nrf_vpr_csr_vtim_simple_counter_get()
NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vtim_simple_counter_get |
( |
uint8_t |
counter | ) |
|
Function for getting the counter value.
- Parameters
-
[in] | counter | Index of the counter. |
- Returns
- Counter value.
◆ nrf_vpr_csr_vtim_simple_counter_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_set |
( |
uint8_t |
counter, |
|
|
uint16_t |
value |
|
) |
| |
Function for setting the counter value.
- Parameters
-
[in] | counter | Index of the counter. |
[in] | value | Value to be set. |
◆ nrf_vpr_csr_vtim_simple_counter_top_get()
NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vtim_simple_counter_top_get |
( |
uint8_t |
counter | ) |
|
Function for getting the counter top.
- Parameters
-
[in] | counter | Index of the counter. |
- Returns
- Counter top.
◆ nrf_vpr_csr_vtim_simple_counter_top_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_top_set |
( |
uint8_t |
counter, |
|
|
uint16_t |
value |
|
) |
| |
Function for setting the counter top.
- Parameters
-
[in] | counter | Index of the counter. |
[in] | value | Top value to be set. |
◆ nrf_vpr_csr_vtim_simple_wait_set()
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_wait_set |
( |
uint8_t |
counter, |
|
|
bool |
write, |
|
|
uint16_t |
value |
|
) |
| |
Function for setting the wait register.
Writing to this register will stall the CPU until counter reaches 0.
- Parameters
-
[in] | counter | Index of the counter. |
[in] | write | True if value is to be writtten to the counter value before starting the wait. False otherwise. |
[in] | value | Value to be written to the counter if write is true. |
◆ nrf_vpr_cst_vtim_count_mode_get()
Function for getting the counter mode.
- Parameters
-
[in] | counter | Index of the counter. |
- Returns
- Counter mode.