nrfx 3.3
Enumerations | Functions
VPR CSR VTIM HAL

Hardware access layer for managing the VPR RISC-V CPU Control and Status Registers for VPR Timer (VPR CSR VTIM). More...

Enumerations

enum  nrf_vpr_csr_vtim_count_t {
  NRF_VPR_CSR_VTIM_COUNT_STOP = VPRCSR_NORDIC_CNTMODE0_CNTMODE0_STOP ,
  NRF_VPR_CSR_VTIM_COUNT_WRAP = VPRCSR_NORDIC_CNTMODE0_CNTMODE0_WRAP ,
  NRF_VPR_CSR_VTIM_COUNT_RELOAD = VPRCSR_NORDIC_CNTMODE0_CNTMODE0_RELOAD ,
  NRF_VPR_CSR_VTIM_COUNT_TRIGGER_COMBINED = VPRCSR_NORDIC_CNTMODE0_CNTMODE0_TRIGCOMB
}
 Counter modes. More...
 

Functions

NRF_STATIC_INLINE nrf_vpr_csr_vtim_count_t nrf_vpr_cst_vtim_count_mode_get (uint8_t counter)
 Function for getting the counter mode.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_count_mode_set (uint8_t counter, nrf_vpr_csr_vtim_count_t mode)
 Function for setting the counter mode.
 
NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vtim_simple_counter_get (uint8_t counter)
 Function for getting the counter value.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_set (uint8_t counter, uint16_t value)
 Function for setting the counter value.
 
NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vtim_simple_counter_top_get (uint8_t counter)
 Function for getting the counter top.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_top_set (uint8_t counter, uint16_t value)
 Function for setting the counter top.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_simple_counter_add_set (uint8_t counter, uint16_t value)
 Function for setting the counter add.
 
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.
 
NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vtim_combined_counter_get (void)
 Function for getting the combined counter value.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_set (uint32_t value)
 Function for setting the combined counter value.
 
NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vtim_combined_counter_top_get (void)
 Function for getting the combined counter top.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_top_set (uint32_t value)
 Function for setting the combined counter top.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_counter_add_set (uint32_t value)
 Function for setting the combined counter add.
 
NRF_STATIC_INLINE void nrf_vpr_csr_vtim_combined_wait_trigger (void)
 Function for triggering the wait.
 

Detailed Description

Hardware access layer for managing the VPR RISC-V CPU Control and Status Registers for VPR Timer (VPR CSR VTIM).

Enumeration Type Documentation

◆ 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.)

Function Documentation

◆ 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]valueAdd 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]valueValue 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]valueTop 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()

NRF_STATIC_INLINE void nrf_vpr_csr_vtim_count_mode_set ( uint8_t  counter,
nrf_vpr_csr_vtim_count_t  mode 
)

Function for setting the counter mode.

Parameters
[in]counterIndex of the counter.
[in]modeCounter 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]counterIndex of the counter.
[in]valueAdd 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]counterIndex 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]counterIndex of the counter.
[in]valueValue 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]counterIndex 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]counterIndex of the counter.
[in]valueTop 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]counterIndex of the counter.
[in]writeTrue if value is to be writtten to the counter value before starting the wait. False otherwise.
[in]valueValue to be written to the counter if write is true.

◆ nrf_vpr_cst_vtim_count_mode_get()

NRF_STATIC_INLINE nrf_vpr_csr_vtim_count_t nrf_vpr_cst_vtim_count_mode_get ( uint8_t  counter)

Function for getting the counter mode.

Parameters
[in]counterIndex of the counter.
Returns
Counter mode.

Documentation feedback | Developer Zone | Subscribe | Updated