This library configures 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 safely we would limit the maximum delay range by half.
void nrf_drv_systick_delay_ms |
( |
uint32_t |
ms | ) |
|
Blocking delay in ms.
This delay function removes the limits of the highest possible delay value.
- Parameters
-
[in] | ms | Number of milliseconds to delay. |
void nrf_drv_systick_delay_ticks |
( |
uint32_t |
ticks | ) |
|
Blocking delay in CPU ticks.
- Parameters
-
[in] | ticks | Number of CPU ticks to delay. |
void nrf_drv_systick_delay_us |
( |
uint32_t |
us | ) |
|
Blocking delay in us.
- Parameters
-
[in] | us | Number of microseconds to delay. |
Get current SysTick state.
Function gets current state of the SysTick timer. It can be used to check time-out by nrf_drv_systick_test.
- Parameters
-
[out] | p_state | The pointer to the state variable to be filled |
void nrf_drv_systick_init |
( |
void |
| ) |
|
Configure and start the timer.
Function configures SysTick as a free-running timer without interrupt.
Test if specified time is up in relation to remembered state.
- Parameters
-
- Return values
-
true | If current time is higher than specified state plus given time-out. |
false | If current time is lower than specified state plus given time-out |