From 7968e4c4681e6f71d44a9403bade4679ba6b5b6f Mon Sep 17 00:00:00 2001 From: x-yl Date: Thu, 17 Mar 2022 18:17:04 +0000 Subject: [PATCH] Add missing BDCR LSEMOD field for STM32F410/11/12 According to this design guide, https://www.st.com/resource/en/application_note/an2867-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf#page=25, as well the reference manuals for those MCUs (https://www.st.com/resource/en/reference_manual/rm0401-stm32f410-advanced-armbased-32bit-mcus-stmicroelectronics.pdf, https://www.st.com/resource/en/reference_manual/rm0383-stm32f411xce-advanced-armbased-32bit-mcus-stmicroelectronics.pdf, https://www.st.com/resource/en/reference_manual/rm0402-stm32f412-advanced-armbased-32bit-mcus-stmicroelectronics.pdf) the LSEMOD bit should be available. --- devices/common_patches/f41x_bdcr_lsemod.yaml | 7 +++++++ devices/stm32f410.yaml | 2 ++ devices/stm32f411.yaml | 2 ++ devices/stm32f412.yaml | 2 ++ 4 files changed, 13 insertions(+) create mode 100644 devices/common_patches/f41x_bdcr_lsemod.yaml diff --git a/devices/common_patches/f41x_bdcr_lsemod.yaml b/devices/common_patches/f41x_bdcr_lsemod.yaml new file mode 100644 index 000000000..6cb133c97 --- /dev/null +++ b/devices/common_patches/f41x_bdcr_lsemod.yaml @@ -0,0 +1,7 @@ +RCC: + BDCR: + _add: + LSEMOD: + description: External low speed oscillator + bitOffset: 3 + bitWidth: 1 diff --git a/devices/stm32f410.yaml b/devices/stm32f410.yaml index ffe464fa8..dc0e870fb 100644 --- a/devices/stm32f410.yaml +++ b/devices/stm32f410.yaml @@ -163,11 +163,13 @@ _include: - common_patches/f4_rcc_fmpi2c.yaml - common_patches/f4_adc_single_csr.yaml - common_patches/f4_adc_single_ccr.yaml + - common_patches/f41x_bdcr_lsemod.yaml - ../peripherals/dac/dac_wavegen.yaml - ../peripherals/dac/dac_common_2ch.yaml - ../peripherals/dac/dac_dmaudr.yaml - ../peripherals/rcc/rcc_merge_sw_sws.yaml - ../peripherals/rcc/rcc_v2.yaml + - ../peripherals/rcc/rcc_v2_bdcr_lsemod.yaml - ../peripherals/rcc/rcc_v2_pllcfgr_pllr.yaml - ../peripherals/rcc/rcc_v2_cfgr_mcoen.yaml - ../peripherals/rcc/rcc_v2_dckcfgr_timpre.yaml diff --git a/devices/stm32f411.yaml b/devices/stm32f411.yaml index 3ff906b9d..aac4427d5 100644 --- a/devices/stm32f411.yaml +++ b/devices/stm32f411.yaml @@ -139,8 +139,10 @@ _include: - common_patches/f4_rcc_dckcfgr.yaml - common_patches/f4_adc_no_csr.yaml - common_patches/f4_adc_single_ccr.yaml + - common_patches/f41x_bdcr_lsemod.yaml - ../peripherals/rcc/rcc_merge_sw_sws.yaml - ../peripherals/rcc/rcc_v2.yaml + - ../peripherals/rcc/rcc_v2_bdcr_lsemod.yaml - ../peripherals/rcc/rcc_v2_i2s.yaml - ../peripherals/rcc/rcc_v2_i2s_pll.yaml - ../peripherals/rcc/rcc_v2_i2s_pllm.yaml diff --git a/devices/stm32f412.yaml b/devices/stm32f412.yaml index 83246898c..d0b814bed 100644 --- a/devices/stm32f412.yaml +++ b/devices/stm32f412.yaml @@ -405,9 +405,11 @@ _include: - common_patches/f4_adc_single_ccr.yaml - common_patches/fsmc/fsmc_sram.yaml - common_patches/fsmc/fsmc_sramfix_common.yaml + - common_patches/f41x_bdcr_lsemod.yaml - ../peripherals/fsmc/fsmc_sram.yaml - ../peripherals/rcc/rcc_merge_sw_sws.yaml - ../peripherals/rcc/rcc_v2.yaml + - ../peripherals/rcc/rcc_v2_bdcr_lsemod.yaml - ../peripherals/rcc/rcc_v2_pllcfgr_pllr.yaml - ../peripherals/rcc/rcc_v2_i2s.yaml - ../peripherals/rcc/rcc_v2_i2s_pll.yaml