Hardware access layer (HAL) for managing the SYSTICK peripheral. More...
Macros | |
#define | NRF_SYSTICK_VAL_MASK SysTick_VAL_CURRENT_Msk |
Mask of usable bits in the SysTick value. | |
Enumerations | |
enum | nrf_systick_csr_flags_t { NRF_SYSTICK_CSR_COUNTFLAG_MASK = SysTick_CTRL_COUNTFLAG_Msk , NRF_SYSTICK_CSR_CLKSOURCE_MASK = SysTick_CTRL_CLKSOURCE_Msk , NRF_SYSTICK_CSR_CLKSOURCE_REF = 0U << SysTick_CTRL_CLKSOURCE_Pos , NRF_SYSTICK_CSR_CLKSOURCE_CPU = 1U << SysTick_CTRL_CLKSOURCE_Pos , NRF_SYSTICK_CSR_TICKINT_MASK = SysTick_CTRL_TICKINT_Msk , NRF_SYSTICK_CSR_TICKINT_ENABLE = 1U << SysTick_CTRL_TICKINT_Pos , NRF_SYSTICK_CSR_TICKINT_DISABLE = 0U << SysTick_CTRL_TICKINT_Pos , NRF_SYSTICK_CSR_ENABLE_MASK = SysTick_CTRL_ENABLE_Msk , NRF_SYSTICK_CSR_ENABLE = 1U << SysTick_CTRL_ENABLE_Pos , NRF_SYSTICK_CSR_DISABLE = 0U << SysTick_CTRL_ENABLE_Pos } |
Flags used by SysTick configuration. More... | |
Functions | |
NRF_STATIC_INLINE uint32_t | nrf_systick_csr_get (void) |
Function for getting Configuration and Status Register. | |
NRF_STATIC_INLINE void | nrf_systick_csr_set (uint32_t val) |
Function for setting Configuration and Status Register. | |
NRF_STATIC_INLINE uint32_t | nrf_systick_load_get (void) |
Function for getting the current reload value. | |
NRF_STATIC_INLINE void | nrf_systick_load_set (uint32_t val) |
Function for configuring the reload value. | |
NRF_STATIC_INLINE uint32_t | nrf_systick_val_get (void) |
Function for reading the SysTick current value. | |
NRF_STATIC_INLINE void | nrf_systick_val_clear (void) |
Function for clearing the SysTick current value. | |
NRF_STATIC_INLINE uint32_t | nrf_systick_calib_get (void) |
Function for reading the calibration register. | |
Hardware access layer (HAL) for managing the SYSTICK peripheral.
SYSTICK is a peripheral designed by ARM. This means that it does not feature the typical Nordic interface with Tasks and Events.
Its usage is limited here to the implementation of simple delays. Moreover, keep in mind that this timer will be stopped when CPU is sleeping (WFE/WFI instruction is successfully executed).
Flags used by SysTick configuration.
NRF_STATIC_INLINE uint32_t nrf_systick_calib_get | ( | void | ) |
Function for reading the calibration register.
NRF_STATIC_INLINE uint32_t nrf_systick_csr_get | ( | void | ) |
Function for getting Configuration and Status Register.
NRF_STATIC_INLINE void nrf_systick_csr_set | ( | uint32_t | val | ) |
Function for setting Configuration and Status Register.
[in] | val | The value composed from nrf_systick_csr_flags_t. |
NRF_STATIC_INLINE uint32_t nrf_systick_load_get | ( | void | ) |
Function for getting the current reload value.
NRF_STATIC_INLINE void nrf_systick_load_set | ( | uint32_t | val | ) |
Function for configuring the reload value.
[in] | val | The value to be set in the reload register. |
NRF_STATIC_INLINE void nrf_systick_val_clear | ( | void | ) |
Function for clearing the SysTick current value.
NRF_STATIC_INLINE uint32_t nrf_systick_val_get | ( | void | ) |
Function for reading the SysTick current value.