[SN32 decouple SysTick from CT16 and board headers

This commit is contained in:
Dimitris Mantzouranis 2021-10-10 18:01:20 +03:00
parent 73a79f9083
commit 737997830b
1 changed files with 1 additions and 6 deletions

View File

@ -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 |