Skip to content

Commit

Permalink
hw/mcu/stm32: Add option to set HSE_VALUE from syscfg
Browse files Browse the repository at this point in the history
This adds STM32_CLOCK_HSE_VALUE that can be used to
specify HSE frequency in mynewt style.
It could be always set w macro HSE_VALUE but this makes
it easier to manipulate this value in similar way
as most other parameters.

Signed-off-by: Jerzy Kasenberg <[email protected]>
  • Loading branch information
kasjer committed Jul 30, 2024
1 parent 1f3f7c5 commit 77540fb
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32f0xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32f1xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32f3xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32f4xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32f7xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32g0xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32g4xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32h7xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32l0xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source (16MHz)
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32l1xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32l4xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32u5xx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ syscfg.defs:
description: 0 for xtal; 1 for input clock
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/stm/stm32wbxx/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ syscfg.defs:
description: Enable HSE prescaler divider
value: 0

STM32_CLOCK_HSE_VALUE:
description: High-speed external clock speed in Hz
value:

STM32_CLOCK_HSI:
description: Enable high-speed internal clock source
value: 1
Expand Down

0 comments on commit 77540fb

Please sign in to comment.