Skip to content
Permalink
Browse files

board: stm32_min_dev: Add support for blue/black variant

Add support for blue pill and black pill variants of the STM32
minimum development board by splitting board configuration into
stm32_min_dev_blue and stm32_min_dev_black.

CODEOWNERS: Add myself (@cbsiddharth) as codeowner for stm32_min_dev

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
  • Loading branch information...
cbsiddharth authored and galak committed Apr 7, 2019
1 parent 33d32fb commit bb72df5bb29516d7c8d3dce412a62b338eaba26a
@@ -80,6 +80,7 @@
/boards/arm/stm32*_eval/ @erwango
/boards/nios2/ @wentongwu
/boards/nios2/altera_max10/ @wentongwu
/boards/arm/stm32_min_dev/ @cbsiddharth
/boards/posix/ @aescolar
/boards/riscv32/ @kgugala @pgielda @nategraff-sifive
/boards/shields/ @erwango
@@ -4,6 +4,11 @@
#
# SPDX-License-Identifier: Apache-2.0
#
config BOARD_STM32_MIN_DEV
bool "STM32 Minimum Development Board"

config BOARD_STM32_MIN_DEV_BLUE
bool "STM32 Minimum Development Board (Blue)"
depends on SOC_STM32F103X8

config BOARD_STM32_MIN_DEV_BLACK
bool "STM32 Minimum Development Board (Black)"
depends on SOC_STM32F103X8
@@ -5,10 +5,11 @@
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_STM32_MIN_DEV
if BOARD_STM32_MIN_DEV_BLUE || BOARD_STM32_MIN_DEV_BLACK

config BOARD
default "stm32_min_dev"
default "stm32_min_dev_blue" if BOARD_STM32_MIN_DEV_BLUE
default "stm32_min_dev_black" if BOARD_STM32_MIN_DEV_BLACK

if UART_CONSOLE

@@ -41,4 +42,4 @@ config SPI_2

endif # SPI

endif # BOARD_STM32_MIN_DEV
endif # BOARD_STM32_MIN_DEV_BLUE || BOARD_STM32_MIN_DEV_BLACK
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, embedjournal.com
* Copyright (c) 2019, embedjournal.com
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -9,7 +9,7 @@

/ {
model = "STM32 Minimum Development Board";
compatible = "st,stm32_min_dev", "st,stm32f103c8";
compatible = "st,stm32f103c8";

chosen {
zephyr,console = &usart1;
@@ -21,7 +21,7 @@
leds {
compatible = "gpio-leds";
led: led {
gpios = <&gpioc 13 GPIO_INT_ACTIVE_HIGH>;
gpios = <&gpiob 12 GPIO_INT_ACTIVE_HIGH>;
label = "LD";
};
};
@@ -70,7 +70,3 @@
status = "ok";
};
};

&usb {
status = "ok";
};
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2019, embedjournal.com
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include "stm32_min_dev.dtsi"

/ {
model = "STM32 Minimum Development Board (Black)";
compatible = "st,stm32_min_dev_black", "st,stm32f103c8";

leds {
led: led {
gpios = <&gpiob 12 GPIO_INT_ACTIVE_HIGH>;
};
};
};
@@ -0,0 +1,13 @@
identifier: stm32_min_dev_black
name: STM32 Minimum Development Board (Black)
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 20
supported:
- i2c
- pwm
- spi
@@ -0,0 +1,44 @@
# Kconfig - STM32 Minimum Development Board Configuration
#
# Copyright (c) 2019, embedjournal.com
#
# SPDX-License-Identifier: Apache-2.0
#

CONFIG_ARM=y
CONFIG_BOARD_STM32_MIN_DEV_BLACK=y
CONFIG_SOC_SERIES_STM32F1X=y
CONFIG_SOC_STM32F103X8=y
CONFIG_CORTEX_M_SYSTICK=y

# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

# enable uart driver
CONFIG_SERIAL=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable pinmux
CONFIG_PINMUX=y

# enable GPIO
CONFIG_GPIO=y

# clock configuration
CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y

# use HSE as PLL input
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
# produce 72MHz clock at PLL output
CONFIG_CLOCK_STM32_PLL_XTPRE=n
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
CONFIG_CLOCK_STM32_AHB_PRESCALER=1

# APB1 clock must not exceed 36MHz limit
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2017, embedjournal.com
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include "stm32_min_dev.dtsi"

/ {
model = "STM32 Minimum Development Board (Blue)";
compatible = "st,stm32_min_dev_blue", "st,stm32f103c8";

leds {
led: led {
gpios = <&gpioc 13 GPIO_INT_ACTIVE_HIGH>;
};
};
};
@@ -1,5 +1,5 @@
identifier: stm32_min_dev
name: STM32-MIN-DEV
identifier: stm32_min_dev_blue
name: STM32 Minimum Development Board (Blue)
type: mcu
arch: arm
toolchain:
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_ARM=y
CONFIG_BOARD_STM32_MIN_DEV=y
CONFIG_BOARD_STM32_MIN_DEV_BLUE=y
CONFIG_SOC_SERIES_STM32F1X=y
CONFIG_SOC_STM32F103X8=y
CONFIG_CORTEX_M_SYSTICK=y

0 comments on commit bb72df5

Please sign in to comment.
You can’t perform that action at this time.