Skip to content
Permalink
Browse files

boards: stm32h747i_disco: Add m4 target

Add m4 target to stm32h747i_disco.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
  • Loading branch information...
erwango authored and nashif committed Jul 1, 2019
1 parent 0914f10 commit 0fbf0c397ad3200209457d1efa7e04612dddcb59
@@ -9,3 +9,8 @@ config BOARD_STM32H747I_DISCO_M7
bool "STM32H747I Discovery Development Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M7

config BOARD_STM32H747I_DISCO_M4
bool "STM32H747I Discovery Development Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M4
@@ -5,22 +5,38 @@
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_STM32H747I_DISCO_M7
if BOARD_STM32H747I_DISCO_M7 || BOARD_STM32H747I_DISCO_M4

config BOARD
default "stm32h747i_disco_m7" if BOARD_STM32H747I_DISCO_M7
default "stm32h747i_disco_m4" if BOARD_STM32H747I_DISCO_M4

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 400000000

config STM32H7_DUAL_CORE
def_bool y

if STM32H7_DUAL_CORE
# Boot method is selected in common file to avoid desync issues
choice STM32H7_DUAL_CORE_BOOT
# Use out of the box config by default
# default STM32H7_BOOT_CM4_CM7
default STM32H7_BOOT_CM7_CM4GATED
endchoice
endif # STM32H7_DUAL_CORE

if UART_CONSOLE

config UART_1
default y
default y if BOARD_STM32H747I_DISCO_M7

endif # UART_CONSOLE

if SERIAL

config UART_8
default y
default y if BOARD_STM32H747I_DISCO_M7

endif # SERIAL

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <st/h7/stm32h747Xi_m4.dtsi>
#include "stm32h747i_disco.dtsi"

/ {
model = "STMicroelectronics STM32H747I DISCOVERY board";
compatible = "st,stm32h747i-disco", "st,stm32h747";

/* HW resources are split between CM7 and CM4 */
chosen {
/* zephyr,console = &usart1; */
/* zephyr,shell-uart = &usart1; */
zephyr,sram = &sram1;
zephyr,flash = &flash1;
};

leds {
red_led_3:led_3 {
status = "okay";
};
blue_led_4:led_4 {
status = "okay";
};
};

gpio_keys {
joy_center: joystick_center {
status = "okay";
};
};

aliases {
led0 = &blue_led_4;
led1 = &red_led_3;
sw0 = &joy_center;
};
};
@@ -0,0 +1,16 @@
identifier: stm32h747i_disco_m4
name: STM32H747IDISCOVERY
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 288
flash: 1024
supported:
- gpio
testing:
ignore_tags:
- mpu
- nfc
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_ARM=y
CONFIG_BOARD_STM32H747I_DISCO_M4=y
CONFIG_SOC_SERIES_STM32H7X=y
CONFIG_SOC_STM32H747XX=y
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

# enable pinmux
CONFIG_PINMUX=y

# enable GPIO
CONFIG_GPIO=y

# clock configuration
CONFIG_CLOCK_CONTROL=y

CONFIG_CLOCK_STM32_D1CPRE=1
# HCLK: 200MHz
CONFIG_CLOCK_STM32_HPRE=2
# APBX: 100MHz
CONFIG_CLOCK_STM32_D2PPRE1=2
CONFIG_CLOCK_STM32_D2PPRE2=2
CONFIG_CLOCK_STM32_D1PPRE=2
CONFIG_CLOCK_STM32_D3PPRE=2

0 comments on commit 0fbf0c3

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