SYSTICK driver

group nrfx_systick

ARM(R) SysTick driver.

This driver configures ARM(R) SysTick as a free-running timer. This timer is used to generate delays and pool for timeouts. Only relatively short timeouts are supported. The SysTick works on 64MHz and is 24-bit wide. This means that it overflows around 4 times per second and around 250 microseconds will be the highest supported time in the library. As it is hard to detect if the overflow is generated without using interrupts, the maximum delay range is halved for safety reasons.

Functions

void nrfx_systick_init(void)

Function for configuring and starting the timer.

Function configures SysTick as a free-running timer without interrupt.

void nrfx_systick_get(nrfx_systick_state_t *p_state)

Function for getting the current SysTick state.

Function gets the current state of the SysTick timer. It can be used to check time-out by nrfx_systick_test.

Parameters
  • p_state[out] The pointer to the state variable to be filled.

bool nrfx_systick_test(nrfx_systick_state_t const *p_state, uint32_t us)

Function for testing if the current time is higher in relation to the remembered state.

Parameters
  • p_state[in] Remembered state set by nrfx_systick_get

  • us[in] Required time-out.

Return values
  • true – The current time is higher than the specified state plus the given time-out.

  • false – The current time is lower than the specified state plus the given time-out.

void nrfx_systick_delay_ticks(uint32_t ticks)

Function for delaying the execution for the specified amount of CPU ticks.

Parameters
  • ticks[in] Number of CPU ticks when the execution is blocked.

void nrfx_systick_delay_us(uint32_t us)

Function for delaying the execution for the specified amount of microseconds.

Parameters
  • us[in] Number of microseconds when the execution is blocked.

void nrfx_systick_delay_ms(uint32_t ms)

Function for delaying the execution for the specified amount of milliseconds.

This delay function removes the limits of the highest possible delay value.

Parameters
  • ms[in] Number of milliseconds when the execution is blocked.

struct nrfx_systick_state_t
#include <>

The value type that holds the SysTick state.

This variable is used to count the requested timeout.

See also

nrfx_systick_get

Public Members

uint32_t time

Registered time value.