Skip to content

boards: weact: add weact stm32u585ci core board #93053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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: 5 additions & 0 deletions boards/weact/blackpill_u585ci/Kconfig.blackpill_u585ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Michal Piekos
# SPDX-License-Identifier: Apache-2.0

config BOARD_BLACKPILL_U585CI
select SOC_STM32U585XX
237 changes: 237 additions & 0 deletions boards/weact/blackpill_u585ci/blackpill_u585ci.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
/*
* Copyright (c) 2025 Michal Piekos
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <st/u5/stm32u585Xi.dtsi>
#include <st/u5/stm32u585ciux-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "WeAct Studio Black Pill STM32U585 Core Board";
compatible = "weact,blackpill-u585ci";

#address-cells = <1>;
#size-cells = <1>;

chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,canbus = &fdcan1;
};

aliases {
led0 = &led_0;
sw0 = &button_0;
watchdog0 = &iwdg;
volt-sensor0 = &vref1;
volt-sensor1 = &vbat4;
die-temp0 = &die_temp;
};

leds {
compatible = "gpio-leds";

led_0: led0 {
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
label = "User LED";
};
};

gpio_keys {
compatible = "gpio-keys";

button_0: button0 {
label = "User Button";
gpios = <&gpioa 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
zephyr,code = <INPUT_KEY_0>;
};
};

zephyr,user {
io-channels = <&adc1 5>, <&adc4 18>;
};
};

&clk_hsi48 {
status = "okay";
};

&clk_lse {
status = "okay";
};

&clk_hse {
clock-frequency = <DT_FREQ_M(25)>;
status = "okay";
};

&clk_msis {
status = "okay";
msi-range = <4>;
msi-pll-mode;
};

&pll1 {
div-m = <5>;
mul-n = <32>;
div-q = <2>;
div-r = <1>;
clocks = <&clk_hse>;
status = "okay";
};

&rcc {
clocks = <&pll1>;
clock-frequency = <DT_FREQ_M(160)>;
ahb-prescaler = <1>;
apb1-prescaler = <1>;
apb2-prescaler = <1>;
apb3-prescaler = <1>;
};

&lpuart1 {
pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};

&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};

&i2c1 {
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb3>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};

&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb14>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};

&spi1 {
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa1
&spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
status = "okay";
};

&fdcan1 {
clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000200>,
<&rcc STM32_SRC_PLL1_Q FDCAN1_SEL(1)>;
pinctrl-0 = <&fdcan1_rx_pb8 &fdcan1_tx_pb9>;
pinctrl-names = "default";
status = "okay";
};

&adc1 {
pinctrl-0 = <&adc1_in5_pa0>;
pinctrl-names = "default";
st,adc-clock-source = "ASYNC";
st,adc-prescaler = <4>;
status = "okay";
};

&adc4 {
pinctrl-0 = <&adc4_in18_pb0>;
pinctrl-names = "default";
st,adc-clock-source = "ASYNC";
st,adc-prescaler = <4>;
status = "okay";
};

&dac1 {
/* CAUTION: DAC on PA4 may conflict with SPI1 NSS on same pin */
pinctrl-0 = <&dac1_out1_pa4>;
pinctrl-names = "default";
status = "okay";
};

&timers3 {
st,prescaler = <10000>;
status = "okay";

pwm3: pwm {
pinctrl-0 = <&tim3_ch1_pb4>;
pinctrl-names = "default";
status = "okay";
};
};

&timers4 {
st,prescaler = <10000>;
status = "okay";

pwm4: pwm {
pinctrl-0 = <&tim4_ch2_pb7>;
pinctrl-names = "default";
status = "okay";
};
};

zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
pinctrl-names = "default";
status = "okay";

cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};

&iwdg {
status = "okay";
};

&rng {
status = "okay";
};

&gpdma1 {
status = "okay";
};

&die_temp {
status = "okay";
};

&rtc {
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>,
<&rcc STM32_SRC_LSE RTC_SEL(1)>;
status = "okay";
};

&vref1 {
status = "okay";
};

&vbat4 {
status = "okay";
};

&clk_lsi {
status = "okay";
};

stm32_lp_tick_source: &lptim1 {
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00000800>,
<&rcc STM32_SRC_LSI LPTIM1_SEL(1)>;
status = "okay";
};

&backup_sram {
status = "okay";
};
21 changes: 21 additions & 0 deletions boards/weact/blackpill_u585ci/blackpill_u585ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
identifier: blackpill_u585ci
name: WeAct Studio Black Pill STM32U585 Core Board
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
supported:
- can
- adc
- dac
- gpio
- i2c
- spi
- usart
- watchdog
- dma
- rtc
ram: 784
flash: 2048
vendor: weact
17 changes: 17 additions & 0 deletions boards/weact/blackpill_u585ci/blackpill_u585ci_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: Apache-2.0

# enable uart driver
CONFIG_SERIAL=y

# enable GPIO
CONFIG_GPIO=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y
7 changes: 7 additions & 0 deletions boards/weact/blackpill_u585ci/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# keep first
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
board_runner_args(blackmagicprobe "--gdb-serial=/dev/ttyACM0")

# keep first
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
6 changes: 6 additions & 0 deletions boards/weact/blackpill_u585ci/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: blackpill_u585ci
full_name: WeAct Studio Black Pill STM32U585 Core Board
vendor: weact
socs:
- name: stm32u585xx
Binary file not shown.
Loading