nRF5 SDK v17.1.0
Modules | Data Structures | Functions
ARM(R) SysTick driver

ARM(R) SysTick driver. More...

Modules

 ARM(R) SysTick driver configuration
 

Data Structures

struct  nrfx_systick_state_t
 The value type that holds the SysTick state. More...
 

Functions

void nrfx_systick_init (void)
 Function for configuring and starting the timer. More...
 
void nrfx_systick_get (nrfx_systick_state_t *p_state)
 Function for getting the current SysTick state. More...
 
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. More...
 
void nrfx_systick_delay_ticks (uint32_t ticks)
 Function for delaying the execution for the specified amount of CPU ticks. More...
 
void nrfx_systick_delay_us (uint32_t us)
 Function for delaying the execution for the specified amount of microseconds. More...
 
void nrfx_systick_delay_ms (uint32_t ms)
 Function for delaying the execution for the specified amount of milliseconds. More...
 

Detailed Description

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.

Function Documentation

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
[in]msNumber of milliseconds when the execution is blocked.
void nrfx_systick_delay_ticks ( uint32_t  ticks)

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

Parameters
[in]ticksNumber 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
[in]usNumber of microseconds when the execution is blocked.
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
[out]p_stateThe pointer to the state variable to be filled.
void nrfx_systick_init ( void  )

Function for configuring and starting the timer.

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

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
[in]p_stateRemembered state set by nrfx_systick_get
[in]usRequired time-out.
Return values
trueThe current time is higher than the specified state plus the given time-out.
falseThe current time is lower than the specified state plus the given time-out.

Documentation feedback | Developer Zone | Subscribe | Updated