
SysTick Utils

This utility can be used to initiate a software timer for system delays or non-blocking code execution. An example howto use this library inside a project (with an avr0) can be found here.
The library works with unsigned int which is 16 bit wide on an avr(0) plattform. So a maximum tick sequence of ~16000 can be counted!
File Structure

utils/
└── systick/
├── systick.c
└── systick.h
The library is completely patform independent and can be usesd across a wide range of c-compilers.
Downloads
The library can be downloaded (zip or tar), cloned or used as submodule in a project.
| Type | File | Description |
| Library | zip / tar | SysTick library for counting ticks of a timer over an ISR |
Using with git clone
mkdir -p ./utils/
git clone https://github.com/0x007E/utils-systick.git ./utils
mv ./utils/utils-systick ./utils/systick
Using as git submodule
git submodule add https://github.com/0x007E/utils-systick.git ./utils/systick
Programming
#include "../lib/utils/systick/systick.h"
ISR(...)
{
}
{
}
{
}
int main(void)
{
while(1)
{
{
}
}
}
SYSTICK_Timer_Status systick_timer_elapsed(SYSTICK_Timer *timer)
Checks whether a SysTick software timer has expired.
Definition systick.c:118
unsigned int systick_timer_remaining(SYSTICK_Timer *timer)
Returns the remaining time before a SysTick timer expires.
Definition systick.c:142
void systick_timer_cancel(SYSTICK_Timer *timer)
Cancels a running SysTick software timer.
Definition systick.c:189
void systick_timer_set(SYSTICK_Timer *timer, unsigned int delay_ticks)
Sets and starts a SysTick software timer.
Definition systick.c:97
void systick_init(void)
Initializes the SysTick timer module.
Definition systick.c:35
void systick_tick(void)
Increments the SysTick timer tick counter.
Definition systick.c:61
void systick_timer_wait(unsigned int ticks)
Blocks execution for a specified number of SysTick ticks.
Definition systick.c:168
struct SYSTICK_Timer_t SYSTICK_Timer
Alias for struct SYSTICK_Timer_t representing a SysTick software timer.
Definition systick.h:61
void systick_timer_wait_ms(unsigned int ms)
void systick_timer_wait_us(unsigned int us)
R. GAECHTER