Browse Source

stmhal: L4: Make CCM/DTCM RAM start-up conditional on MCU type.

pull/1929/merge
Tobias Badertscher 9 years ago
committed by Damien George
parent
commit
7441ba7749
  1. 16
      stmhal/main.c

16
stmhal/main.c

@ -367,13 +367,15 @@ int main(void) {
__GPIOC_CLK_ENABLE();
__GPIOD_CLK_ENABLE();
#if defined(__HAL_RCC_DTCMRAMEN_CLK_ENABLE)
// The STM32F746 doesn't really have CCM memory, but it does have DTCM,
// which behaves more or less like normal SRAM.
__HAL_RCC_DTCMRAMEN_CLK_ENABLE();
#else
// enable the CCM RAM
__CCMDATARAMEN_CLK_ENABLE();
#if defined(MCU_SERIES_F4) || defined(MCU_SERIES_F7)
#if defined(__HAL_RCC_DTCMRAMEN_CLK_ENABLE)
// The STM32F746 doesn't really have CCM memory, but it does have DTCM,
// which behaves more or less like normal SRAM.
__HAL_RCC_DTCMRAMEN_CLK_ENABLE();
#else
// enable the CCM RAM
__CCMDATARAMEN_CLK_ENABLE();
#endif
#endif
#if defined(MICROPY_BOARD_EARLY_INIT)

Loading…
Cancel
Save