arm: Support for new STM32F4 socs (STM32F407 and STM32F429)
In order to support the discovery STM32F4 and STM32F429 boards, it is necessary to make these socs available. Change-Id: I351d294fb02c4385f291a6e258a3f7d81e85627e Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
This commit is contained in:
parent
bf2d34ba30
commit
3fdfcfc94f
4 changed files with 66 additions and 0 deletions
24
arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx
Normal file
24
arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Kconfig - ST STM32F407XX MCU configuration options
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Linaro Limited.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
if SOC_STM32F407XX
|
||||||
|
|
||||||
|
config SOC
|
||||||
|
string
|
||||||
|
default stm32f407xx
|
||||||
|
|
||||||
|
config SRAM_SIZE
|
||||||
|
default 192
|
||||||
|
|
||||||
|
config FLASH_SIZE
|
||||||
|
default 1024
|
||||||
|
|
||||||
|
config NUM_IRQS
|
||||||
|
int
|
||||||
|
default 85
|
||||||
|
|
||||||
|
endif # SOC_STM32F407XX
|
24
arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx
Normal file
24
arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Kconfig - ST STM32F429XX MCU configuration options
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Linaro Limited.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
if SOC_STM32F429XX
|
||||||
|
|
||||||
|
config SOC
|
||||||
|
string
|
||||||
|
default stm32f429xx
|
||||||
|
|
||||||
|
config SRAM_SIZE
|
||||||
|
default 256
|
||||||
|
|
||||||
|
config FLASH_SIZE
|
||||||
|
default 2048
|
||||||
|
|
||||||
|
config NUM_IRQS
|
||||||
|
int
|
||||||
|
default 85
|
||||||
|
|
||||||
|
endif # SOC_STM32F429XX
|
|
@ -15,4 +15,10 @@ config SOC_STM32F401XE
|
||||||
config SOC_STM32F411XE
|
config SOC_STM32F411XE
|
||||||
bool "STM32F411XE"
|
bool "STM32F411XE"
|
||||||
|
|
||||||
|
config SOC_STM32F407XX
|
||||||
|
bool "STM32F407XX"
|
||||||
|
|
||||||
|
config SOC_STM32F429XX
|
||||||
|
bool "STM32F429XX"
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
|
@ -77,6 +77,18 @@ static inline void __setup_flash(void)
|
||||||
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 100000000) {
|
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 100000000) {
|
||||||
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_3;
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_3;
|
||||||
}
|
}
|
||||||
|
#elif defined(CONFIG_SOC_STM32F407XX) || defined(CONFIG_SOC_STM32F429XX)
|
||||||
|
else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 60000000) {
|
||||||
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_1;
|
||||||
|
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 90000000) {
|
||||||
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_2;
|
||||||
|
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 120000000) {
|
||||||
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_3;
|
||||||
|
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 150000000) {
|
||||||
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_4;
|
||||||
|
} else if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 180000000) {
|
||||||
|
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_5;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
else {
|
else {
|
||||||
__ASSERT(0, "Flash latency not set");
|
__ASSERT(0, "Flash latency not set");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue