Skip to content

Commit

Permalink
boards: stm32h747i_disco: Enforce same clock configuration on both ...
Browse files Browse the repository at this point in the history
cores

In order to prevent potential misconfiguration set the clock setting,
which impacts both cores, under board.defconfig file which is used
by both core.

Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and carlescufi committed Aug 5, 2019
1 parent e9809d5 commit c12688e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
22 changes: 22 additions & 0 deletions boards/arm/stm32h747i_disco/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,34 @@ config BOARD
default "stm32h747i_disco_m7" if BOARD_STM32H747I_DISCO_M7
default "stm32h747i_disco_m4" if BOARD_STM32H747I_DISCO_M4

# clock configuration
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 400000000

config CLOCK_STM32_D1CPRE
default 1

config CLOCK_STM32_HPRE
# HCLK: 200MHz
default 2

config CLOCK_STM32_D2PPRE1
# APBX: 100MHz
default 2

config CLOCK_STM32_D2PPRE2
default 2

config CLOCK_STM32_D1PPRE
default 2

config CLOCK_STM32_D3PPRE
default 2

config STM32H7_DUAL_CORE
def_bool y

# Dual core boot configuration
if STM32H7_DUAL_CORE
# Boot method is selected in common file to avoid desync issues
choice STM32H7_DUAL_CORE_BOOT
Expand Down
9 changes: 0 additions & 9 deletions boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,3 @@ 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
9 changes: 0 additions & 9 deletions boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4
CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2

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

# enable uart driver
CONFIG_SERIAL=y

Expand Down

0 comments on commit c12688e

Please sign in to comment.