From 6e2b7317b0280953f32a2cc64a69e334254e5767 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 6 Apr 2021 11:30:44 +0200 Subject: [PATCH] Fix periodic tick timer --- os/hal/ports/GD/GD32VF103/TIM/hal_st_lld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/hal/ports/GD/GD32VF103/TIM/hal_st_lld.c b/os/hal/ports/GD/GD32VF103/TIM/hal_st_lld.c index 139dcb82..4d7c63b8 100644 --- a/os/hal/ports/GD/GD32VF103/TIM/hal_st_lld.c +++ b/os/hal/ports/GD/GD32VF103/TIM/hal_st_lld.c @@ -119,6 +119,7 @@ #if OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC #define ST_HANDLER vector7 +#define ST_NUMBER 7 #if defined(GD32_CORE_CK) #define SYSTICK_CK GD32_CORE_CK @@ -223,7 +224,7 @@ void st_lld_init(void) { SysTimer_SetCompareValue((SYSTICK_CK / OSAL_ST_FREQUENCY) - 1); SysTimer_SetLoadValue(0); /* IRQ enabled.*/ - eclicEnableVector(HANDLER_SYSTICK, GD32_ST_IRQ_PRIORITY, GD32_ST_IRQ_TRIGGER); + eclicEnableVector(ST_NUMBER, GD32_ST_IRQ_PRIORITY, GD32_ST_IRQ_TRIGGER); #endif /* OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC */ }