VSF Documented
Data Structures
systick_internal.h File Reference
#include "hal/vsf_hal_cfg.h"
#include "./i_io_systick.h"

Go to the source code of this file.

Data Structures

struct  systick_cfg_t
 

Enumerations

SysTick initialization arguments definition
Note
you can access systick register directly through ARM_SYSTICK ! e.g. ARM_SYSTICK.SYST_CSR.ENABLE = true; ! ! NOTE: the register name defined by Armv7-M Architecture Reference Manual
enum  em_systick_cfg_mode_t {
  DISABLE_SYSTICK = 0x00 ,
  ENABLE_SYSTICK = 0x01 ,
  DISABLE_SYSTICK_INTERRUPT = 0x00 ,
  ENABLE_SYSTICK_INTERRUPT = 0x02 ,
  SYSTICK_SOURCE_REFERCLK = 0x00 ,
  SYSTICK_SOURCE_SYSCLK = 0x04
}
 

Functions

Level 0 interface for systick
bool vsf_systick_init (systick_cfg_t *pCfg)
 init SysTick Timer !
 
uint32_t vsf_systick_get_count (void)
 get count value !
 
bool vsf_systick_set_reload (uint32_t value)
 set reload value !
 
void vsf_systick_clear_count (void)
 clear count value !
 
void vsf_systick_enable (void)
 enable !
 
bool vsf_systick_disable (void)
 enable !
 
void vsf_systick_int_enable (void)
 enable !
 
void vsf_systick_int_disable (void)
 enable !
 
bool vsf_systick_is_match (void)
 enable !
 

Enumeration Type Documentation

◆ em_systick_cfg_mode_t

Enumerator
DISABLE_SYSTICK 

Enable the SysTick.

ENABLE_SYSTICK 

Enable the SysTick.

DISABLE_SYSTICK_INTERRUPT 

Enable the SysTick interrupt.

ENABLE_SYSTICK_INTERRUPT 

Enable the SysTick interrupt.

SYSTICK_SOURCE_REFERCLK 

Select the reference clock as SysTick source.

SYSTICK_SOURCE_SYSCLK 

Select the system clock as SysTick source.

Function Documentation

◆ vsf_systick_init()

bool vsf_systick_init ( systick_cfg_t pCfg)
extern

init SysTick Timer !

Parameters
void!
Return values
true: succeed !
falsefailed

check the input

◆ vsf_systick_get_count()

uint32_t vsf_systick_get_count ( void  )
extern

get count value !

Parameters
void!
Return values
returngeh time count value

◆ vsf_systick_set_reload()

bool vsf_systick_set_reload ( uint32_t  value)
extern

set reload value !

Parameters
timecount value !
Return values
whetheraccess successful or not
Parameters
timecount value !
Return values
whetheraccess successful or not
Parameters
timecount value !
Return values
none

◆ vsf_systick_clear_count()

void vsf_systick_clear_count ( void  )
extern

clear count value !

Parameters
none!
Return values
none

◆ vsf_systick_enable()

void vsf_systick_enable ( void  )
extern

enable !

Parameters
void!
Return values
none
Parameters
void!
Return values
bool
Parameters
void!
Return values
none

◆ vsf_systick_disable()

bool vsf_systick_disable ( void  )
extern

enable !

Parameters
void!
Return values
bool

read to clear COUNTFLAG

◆ vsf_systick_int_enable()

void vsf_systick_int_enable ( void  )
extern

enable !

Parameters
void!
Return values
none

◆ vsf_systick_int_disable()

void vsf_systick_int_disable ( void  )
extern

enable !

Parameters
void!
Return values
bool

◆ vsf_systick_is_match()

bool vsf_systick_is_match ( void  )
extern

enable !

Parameters
void!
Return values
bool

check compare match event !

Parameters
void!
Return values
bool
Parameters
none!
Return values
truecompare matched, the flag has been cleared automatically !
falseno compare match event