summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-01-09 11:22:55 +0700
committerhathach <[email protected]>2026-01-09 11:22:55 +0700
commit6ab368f655f8aff3bf684066af85ccd4287aadad (patch)
tree4f665c1983d271a3c0c1d16c6c17214e4bd57929
parent9465ce985bcf5732795d2aea5df4fd6315896cf9 (diff)
fix missing SystemCoreClock
-rw-r--r--hw/bsp/at32f45x/FreeRTOSConfig/FreeRTOSConfig.h3
-rw-r--r--hw/bsp/at32f45x/family.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/hw/bsp/at32f45x/FreeRTOSConfig/FreeRTOSConfig.h b/hw/bsp/at32f45x/FreeRTOSConfig/FreeRTOSConfig.h
index 7a4393ad7..c5b89452e 100644
--- a/hw/bsp/at32f45x/FreeRTOSConfig/FreeRTOSConfig.h
+++ b/hw/bsp/at32f45x/FreeRTOSConfig/FreeRTOSConfig.h
@@ -46,7 +46,6 @@
#ifndef __IASMARM__
// Include MCU header
#include "at32f45x.h"
-
#endif
/* Cortex-M4 port configuration. */
@@ -57,7 +56,7 @@
#define configUSE_PREEMPTION 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configCPU_CLOCK_HZ SystemCoreClock
+#define configCPU_CLOCK_HZ system_core_clock
#define configTICK_RATE_HZ ( 1000 )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( 128 )
diff --git a/hw/bsp/at32f45x/family.c b/hw/bsp/at32f45x/family.c
index 79da6aec2..0593e5115 100644
--- a/hw/bsp/at32f45x/family.c
+++ b/hw/bsp/at32f45x/family.c
@@ -64,7 +64,7 @@ void board_init(void) {
/* configure systick */
systick_clock_source_config(SYSTICK_CLOCK_SOURCE_AHBCLK_NODIV);
- SysTick_Config(SystemCoreClock / 1000);
+ SysTick_Config(system_core_clock / 1000);
#if CFG_TUSB_OS == OPT_OS_FREERTOS
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(OTG_IRQ, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);