Skip to content

Commit 233cbaa

Browse files
MuChengerRbb666
authored andcommitted
[fix] 使能GD32H7 I/D Cache,移除Systick重复配置代码
1 parent fdb6acd commit 233cbaa

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

bsp/gd32/arm/gd32h759i-eval/board/board.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ void Error_Handler(void)
3232
void SystemClock_Config(void)
3333
{
3434
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
35-
NVIC_SetPriority(SysTick_IRQn, 0);
3635
}
3736

3837
/**
@@ -65,6 +64,12 @@ void rt_hw_board_init()
6564
SCB->VTOR = (0x08000000 & NVIC_VTOR_MASK);
6665
#endif
6766

67+
/* Enable IChace */
68+
rt_hw_cpu_icache_enable();
69+
70+
/* Enable DChace */
71+
rt_hw_cpu_dcache_enable();
72+
6873
SystemClock_Config();
6974

7075
#ifdef RT_USING_SERIAL

bsp/gd32/arm/gd32h759i-start/board/board.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ void Error_Handler(void)
3232
void SystemClock_Config(void)
3333
{
3434
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
35-
NVIC_SetPriority(SysTick_IRQn, 0);
3635
}
3736

3837
/**
@@ -65,6 +64,12 @@ void rt_hw_board_init()
6564
SCB->VTOR = (0x08000000 & NVIC_VTOR_MASK);
6665
#endif
6766

67+
/* Enable IChace */
68+
rt_hw_cpu_icache_enable();
69+
70+
/* Enable DChace */
71+
rt_hw_cpu_dcache_enable();
72+
6873
SystemClock_Config();
6974

7075
#ifdef RT_USING_SERIAL

0 commit comments

Comments
 (0)