27 lines
392 B
C
27 lines
392 B
C
#include "Systick.h"
|
|
|
|
uint32_t g_tickcounter;
|
|
|
|
void SysTick_Handler(void);
|
|
|
|
void Bsp_Systick_Init(void)
|
|
{
|
|
uint32_t freq = 0U;
|
|
g_tickcounter = 0U;
|
|
|
|
freq = SCG_GetScgClockFreq(SCG_CORE_CLK);
|
|
Core_SysTick_Config(freq / 1000U);
|
|
|
|
Core_SysTick_Enable();
|
|
}
|
|
|
|
uint32_t Bsp_Systick_GetSystick(void)
|
|
{
|
|
return g_tickcounter;
|
|
}
|
|
|
|
void SysTick_Handler(void)
|
|
{
|
|
g_tickcounter++;
|
|
}
|