nRF5 SDK v15.3.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)
 Configure and start the timer. More...
 
void nrfx_systick_get (nrfx_systick_state_t *p_state)
 Get current SysTick state. More...
 
bool nrfx_systick_test (nrfx_systick_state_t const *p_state, uint32_t us)
 Test if specified time is up in relation to remembered state. More...
 
void nrfx_systick_delay_ticks (uint32_t ticks)
 Blocking delay in CPU ticks. More...
 
void nrfx_systick_delay_us (uint32_t us)
 Blocking delay in us. More...
 
void nrfx_systick_delay_ms (uint32_t ms)
 Blocking delay in ms. 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-bits wide. It means that it overflows around 4 times per second and around 250 ms would be the highest supported time in the library. But it would be really hard to detect if overflow was generated without using interrupts. For safety we would limit the maximum delay range by half.

Function Documentation

void nrfx_systick_delay_ms ( uint32_t  ms)

Blocking delay in ms.

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

Parameters
[in]msNumber of milliseconds to delay.
void nrfx_systick_delay_ticks ( uint32_t  ticks)

Blocking delay in CPU ticks.

Parameters
[in]ticksNumber of CPU ticks to delay.
void nrfx_systick_delay_us ( uint32_t  us)

Blocking delay in us.

Parameters
[in]usNumber of microseconds to delay.
void nrfx_systick_get ( nrfx_systick_state_t p_state)

Get current SysTick state.

Function gets 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  )

Configure and start 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 
)

Test if specified time is up in relation to remembered state.

Parameters
[in]p_stateRemembered state set by nrfx_systick_get
[in]usRequired time-out.
Return values
trueIf current time is higher than specified state plus given time-out.
falseIf current time is lower than specified state plus given time-out

Documentation feedback | Developer Zone | Subscribe | Updated