Skip to content

Commit 5b17134

Browse files
committed
dts: arm: st: add stm32h523Xe support
Provide support for STM32H523XE. Signed-off-by: Filip Stojanovic <[email protected]>
1 parent 5e63a5a commit 5b17134

File tree

10 files changed

+96
-35
lines changed

10 files changed

+96
-35
lines changed

boards/weact/blackpill_h523ce/Kconfig.blackpill_h523ce

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_BLACKPILL_H523CE
5-
select SOC_STM32H533XX
5+
select SOC_STM32H523XX

boards/weact/blackpill_h523ce/blackpill_h523ce.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
&timers3 {
5151
status = "okay";
52-
st, prescaler = <1000>;
52+
st,prescaler = <24>;
5353

5454
pwm3: pwm {
5555
status = "okay";
@@ -93,7 +93,7 @@ zephyr_udc0: &usb {
9393
clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000400>, <&rcc STM32_SRC_HCLK ADCDAC_SEL(0)>;
9494
pinctrl-0 = <&adc1_inp1_pa1>;
9595
pinctrl-names = "default";
96-
st,adc-clock - source = "ASYNC";
96+
st,adc-clock-source = "ASYNC";
9797
st,adc-prescaler = <8>;
9898
status = "okay";
9999
};

boards/weact/blackpill_h523ce/board.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ board:
33
full_name: Black Pill STM32H523
44
vendor: weact
55
socs:
6-
- name: stm32h533xx
6+
- name: stm32h523xx

boards/weact/blackpill_h523ce/doc/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Overview
44
********
55
The WeAct STM32H523CE Core Board is a low cost and bare-bone development
6-
board made in famous "blackpill" package. It features STM32H523CE, high
7-
performance microcontroller based on a Arm Cortex M33 processor.
6+
board made in famous "blackpill" package. It features STM32H523CE, a high
7+
performance microcontroller based on an Arm Cortex M33 processor.
88

99
Hardware
1010
********
@@ -13,7 +13,7 @@ The STM32H523CE based Black Pill board provides the following hardware
1313
components:
1414

1515
- STM32H523CE in 48 pin package
16-
- ARM 32-bit Cortex -M33 CPU with FPU
16+
- ARM 32-bit Cortex-M33 CPU with FPU
1717
- 250 MHz max CPU frequency
1818
- VDD from 1.7 V to 3.6 V
1919
- 512 kB Flash
@@ -63,11 +63,11 @@ Flashing
6363
Installing dfu-util
6464
-------------------
6565

66-
It is recommended to use at least v0.8 of `dfu-util`_. The package available in
67-
debian/ubuntu can be quite old, so you might have to build dfu-util from source.
66+
It is recommended to use at least v0.8 of `dfu-util <https://dfu-util.sourceforge.net/>`_. The package available in
67+
Debian/Ubuntu can be quite old, so you might have to build dfu-util from source.
6868

6969
There is also a Windows version which works, but you may have to install the
70-
right USB drivers with a tool like `Zadig`_.
70+
right USB drivers with a tool like `Zadig <https://zadig.akeo.ie/>`_.
7171

7272
Flashing an Application
7373
-----------------------
@@ -79,11 +79,11 @@ The dfu-util runner is supported on this board and so a sample can be built and
7979
tested easily.
8080

8181
.. zephyr-app-commands::
82+
8283
:zephyr-app: samples/basic/blinky
8384
:board: blackpill_h523ce
8485
:goals: build flash
8586

86-
8787
Debugging
8888
=========
8989

@@ -97,10 +97,10 @@ References
9797
.. target-notes::
9898

9999
.. _WeAct Github:
100-
https://github.com/WeActStudio/WeActStudio.STM32H523CoreBoard/tree/master
100+
https://github.com/WeActStudio/WeActStudio.STM32H523CoreBoard/tree/master
101101

102102
.. _STM32H523CE website:
103-
https://www.st.com/en/microcontrollers-microprocessors/stm32h523ce.html
103+
https://www.st.com/en/microcontrollers-microprocessors/stm32h523ce.html
104104

105105
.. _STM32H523CE reference manual:
106-
https://www.st.com/en/microcontrollers-microprocessors/stm32h523ce.html#
106+
https://www.st.com/en/microcontrollers-microprocessors/stm32h523ce.html#

dts/arm/st/h5/stm32h523.dtsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 Filip Stojanovic
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
#include <st/h5/stm32h5.dtsi>
8+
9+
/ {
10+
soc {
11+
compatible = "st,stm32h533", "st,stm32h5", "simple-bus";
12+
13+
gpiof: gpio@42021400 {
14+
compatible = "st,stm32-gpio";
15+
gpio-controller;
16+
#gpio-cells = <2>;
17+
reg = <0x42021400 0x400>;
18+
clocks = <&rcc STM32_CLOCK(AHB2, 7U)>;
19+
};
20+
21+
fmc: memory-controller@47000400 {
22+
compatible = "st,stm32-fmc";
23+
reg = <0x47000400 0x400>;
24+
clocks = <&rcc STM32_CLOCK(AHB4, 16U)>;
25+
status = "disabled";
26+
};
27+
};
28+
};

dts/arm/st/h5/stm32h523Xe.dtsi

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 Filip Stojanovic
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
#include <mem.h>
8+
#include <st/h5/stm32h523.dtsi>
9+
10+
/ {
11+
sram1: memory@20000000 {
12+
compatible = "zephyr,memory-region", "mmio-sram";
13+
reg = <0x20000000 DT_SIZE_K(128)>;
14+
zephyr,memory-region = "SRAM1";
15+
};
16+
17+
sram2: memory@20040000 {
18+
compatible = "zephyr,memory-region", "mmio-sram";
19+
reg = <0x20040000 DT_SIZE_K(80)>;
20+
zephyr,memory-region = "SRAM2";
21+
};
22+
23+
sram3: memory@20050000 {
24+
compatible = "zephyr,memory-region", "mmio-sram";
25+
reg = <0x20050000 DT_SIZE_K(64)>;
26+
zephyr,memory-region = "SRAM3";
27+
};
28+
29+
soc {
30+
flash-controller@40022000 {
31+
flash0: flash@8000000 {
32+
reg = <0x08000000 DT_SIZE_K(512)>;
33+
};
34+
};
35+
};
36+
};

dts/arm/st/h5/stm32h533.dtsi

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,5 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
#include <st/h5/stm32h5.dtsi>
76

8-
/ {
9-
soc {
10-
compatible = "st,stm32h533", "st,stm32h5", "simple-bus";
11-
12-
gpiof: gpio@42021400 {
13-
compatible = "st,stm32-gpio";
14-
gpio-controller;
15-
#gpio-cells = <2>;
16-
reg = <0x42021400 0x400>;
17-
clocks = <&rcc STM32_CLOCK(AHB2, 7U)>;
18-
};
19-
20-
fmc: memory-controller@47000400 {
21-
compatible = "st,stm32-fmc";
22-
reg = <0x47000400 0x400>;
23-
clocks = <&rcc STM32_CLOCK(AHB4, 16U)>;
24-
status = "disabled";
25-
};
26-
};
27-
};
7+
#include <st/h5/stm32h523.dtsi>

soc/st/stm32/soc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ family:
102102
- name: stm32h5x
103103
socs:
104104
- name: stm32h503xx
105+
- name: stm32h523xx
105106
- name: stm32h533xx
106107
- name: stm32h562xx
107108
- name: stm32h563xx
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# STMicroelectronics STM32H523XX MCU
2+
3+
# Copyright (c) 2024 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_STM32H523XX
7+
8+
config NUM_IRQS
9+
default 133
10+
11+
endif # SOC_STM32H523XX

soc/st/stm32/stm32h5x/Kconfig.soc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ config SOC_STM32H503XX
1414
bool
1515
select SOC_SERIES_STM32H5X
1616

17+
config SOC_STM32H523XX
18+
bool
19+
select SOC_SERIES_STM32H5X
20+
1721
config SOC_STM32H533XX
1822
bool
1923
select SOC_SERIES_STM32H5X
@@ -32,6 +36,7 @@ config SOC_STM32H573XX
3236

3337
config SOC
3438
default "stm32h503xx" if SOC_STM32H503XX
39+
default "stm32h523xx" if SOC_STM32H523XX
3540
default "stm32h533xx" if SOC_STM32H533XX
3641
default "stm32h562xx" if SOC_STM32H562XX
3742
default "stm32h563xx" if SOC_STM32H563XX

0 commit comments

Comments
 (0)