Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions hw/mcu/stm/stm32h7xx/src/clock_stm32h7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ SystemClock_Config(void)
RCC_PeriphCLKInitTypeDef per_clk_init = {0};
HAL_StatusTypeDef status;

/* Enable the MCU instruction cache */
#if MYNEWT_VAL(STM32_ENABLE_ICACHE)
SCB_EnableICache();
#endif

/*
* Supply configuration update enable
*/
Expand Down
11 changes: 10 additions & 1 deletion hw/mcu/stm/stm32h7xx/src/hal_system_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ hal_system_init(void)
/* Update SystemCoreClock global variable */
SystemCoreClockUpdate();

/* Enable the instruction cache */
#if MYNEWT_VAL(STM32_ENABLE_ICACHE)
SCB_EnableICache();
#endif

/* Enable the data cache */
#if MYNEWT_VAL(STM32_ENABLE_DCACHE)
SCB_EnableDCache();
#endif

/* Relocate the vector table */
NVIC_Relocate();
}

4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32h7xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ syscfg.defs:
description: Enable instruction caching
value: 1

STM32_ENABLE_DCACHE:
description: Enable data caching
value: 1

STM32_CLOCK_VOLTAGESCALING_CONFIG:
description: Voltage scale
value: 0
Expand Down
Loading