From 737997830badaa117fbd252f7564d561ef1b63fe Mon Sep 17 00:00:00 2001 From: Dimitris Mantzouranis Date: Sun, 10 Oct 2021 18:01:20 +0300 Subject: [PATCH] [SN32 decouple SysTick from CT16 and board headers --- os/hal/ports/SN32/LLD/SN32F24xB/SysTick/hal_st_lld.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/os/hal/ports/SN32/LLD/SN32F24xB/SysTick/hal_st_lld.c b/os/hal/ports/SN32/LLD/SN32F24xB/SysTick/hal_st_lld.c index 50f2658a..7e815ed9 100644 --- a/os/hal/ports/SN32/LLD/SN32F24xB/SysTick/hal_st_lld.c +++ b/os/hal/ports/SN32/LLD/SN32F24xB/SysTick/hal_st_lld.c @@ -23,9 +23,6 @@ */ #include "hal.h" -#include "CT16.h" -#include "CT16B1.h" -#include "SN32F240B.h" #if (OSAL_ST_MODE != OSAL_ST_MODE_NONE) || defined(__DOXYGEN__) @@ -33,8 +30,6 @@ /* Driver local definitions. */ /*===========================================================================*/ -#define IHRC_CLOCK 48000000 - /*===========================================================================*/ /* Driver exported variables. */ /*===========================================================================*/ @@ -78,7 +73,7 @@ OSAL_IRQ_HANDLER(SysTick_Handler) { void st_lld_init(void) { /* Periodic systick mode, the Cortex-Mx internal systick timer is used in this mode.*/ - SysTick->LOAD = ((IHRC_CLOCK >> SN_SYS0->AHBCP) / OSAL_ST_FREQUENCY) - 1; + SysTick->LOAD = (SystemCoreClock / OSAL_ST_FREQUENCY) - 1; SysTick->VAL = 0; SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk |