From 270ec15482b037f239e47011d0c3da4fb9ea8f43 Mon Sep 17 00:00:00 2001 From: Benoit Leforestier Date: Wed, 7 Nov 2018 14:53:03 +0100 Subject: [PATCH] board: Add support of STM32F143xG SOC The only difference between the F413xH and F413xG is flash memory size. STMF413xH: 1536 Kbytes STMF413xG: 1024 Kbytes Signed-off-by: Benoit Leforestier --- boards/arm/nucleo_f413zh/Kconfig.board | 2 +- .../arm/nucleo_f413zh/nucleo_f413zh_defconfig | 2 +- dts/arm/st/f4/stm32f413Xg.dtsi | 22 +++++++++++++++++++ samples/basic/blink_led/src/main.c | 2 +- .../stm32f4/Kconfig.defconfig.stm32f413xx | 6 ++--- soc/arm/st_stm32/stm32f4/Kconfig.soc | 4 ++-- 6 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 dts/arm/st/f4/stm32f413Xg.dtsi diff --git a/boards/arm/nucleo_f413zh/Kconfig.board b/boards/arm/nucleo_f413zh/Kconfig.board index c8456c81789..2c46055af0e 100644 --- a/boards/arm/nucleo_f413zh/Kconfig.board +++ b/boards/arm/nucleo_f413zh/Kconfig.board @@ -7,4 +7,4 @@ config BOARD_NUCLEO_F413ZH bool "NUCLEO-144 F413ZH Development Board" - depends on SOC_STM32F413XH + depends on SOC_STM32F413XX diff --git a/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig b/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig index afcf6d493d7..50e2cd878c6 100644 --- a/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig +++ b/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_BOARD_NUCLEO_F413ZH=y CONFIG_SOC_SERIES_STM32F4X=y -CONFIG_SOC_STM32F413XH=y +CONFIG_SOC_STM32F413XX=y # 96MHz system clock (highest value to get a precise USB clock) CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000 CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 diff --git a/dts/arm/st/f4/stm32f413Xg.dtsi b/dts/arm/st/f4/stm32f413Xg.dtsi new file mode 100644 index 00000000000..62a8029fc48 --- /dev/null +++ b/dts/arm/st/f4/stm32f413Xg.dtsi @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018 Linaro Limited + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(320)>; + }; + + soc { + flash-controller@40023c00 { + flash0: flash@8000000 { + reg = <0x08000000 DT_SIZE_K(1024)>; + }; + }; + }; +}; diff --git a/samples/basic/blink_led/src/main.c b/samples/basic/blink_led/src/main.c index ece4dcd7102..c6adf876048 100644 --- a/samples/basic/blink_led/src/main.c +++ b/samples/basic/blink_led/src/main.c @@ -16,7 +16,7 @@ #include #if defined(CONFIG_SOC_STM32F401XE) || defined(CONFIG_SOC_STM32F412ZG) || \ - defined(CONFIG_SOC_STM32F413XH) || defined(CONFIG_SOC_STM32L476XG) || \ + defined(CONFIG_SOC_STM32F413XX) || defined(CONFIG_SOC_STM32L476XG) || \ defined(CONFIG_SOC_STM32F407XG) || defined(CONFIG_SOC_STM32F302X8) #define PWM_DRIVER CONFIG_PWM_STM32_2_DEV_NAME #define PWM_CHANNEL 1 diff --git a/soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f413xx b/soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f413xx index 9e056ac866f..e6f10e1df78 100644 --- a/soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f413xx +++ b/soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f413xx @@ -1,11 +1,11 @@ -# Kconfig - ST STM32F413XH MCU configuration options +# Kconfig - ST STM32F413XX MCU configuration options # # Copyright (c) 2017 Florian Vaussard, HEIG-VD # # SPDX-License-Identifier: Apache-2.0 # -if SOC_STM32F413XH +if SOC_STM32F413XX config SOC string @@ -32,4 +32,4 @@ config ENTROPY_STM32_RNG endif # ENTROPY_GENERATOR -endif # SOC_STM32F413XH +endif # SOC_STM32F413XX diff --git a/soc/arm/st_stm32/stm32f4/Kconfig.soc b/soc/arm/st_stm32/stm32f4/Kconfig.soc index ff3f3b1aabc..463ccf5fbdf 100644 --- a/soc/arm/st_stm32/stm32f4/Kconfig.soc +++ b/soc/arm/st_stm32/stm32f4/Kconfig.soc @@ -27,8 +27,8 @@ config SOC_STM32F412CG config SOC_STM32F412ZG bool "STM32F412ZG" -config SOC_STM32F413XH - bool "STM32F413XH" +config SOC_STM32F413XX + bool "STM32F413XX" config SOC_STM32F417XE bool "STM32F417XE"