Content-Length: 6483 | pFad | http://github.com/stm32-rs/stm32-rs/pull/640.patch
thub.com From 4b6813705cbcd72f9117f158e6cf123172de908c Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Sun, 3 Oct 2021 12:37:14 +0200 Subject: [PATCH 1/2] H7 RM0433: Rename SAI [AB] CR bit 19 to NOMCK and remove MCKEN Other H7 parts are unchanged. Improve description of NOMCK/NODIV bit See previous PR #347. Fixes #618 --- devices/common_patches/h7_sai.yaml | 14 -------------- devices/common_patches/h7_sai_mcken.yaml | 19 +++++++++++++++++++ devices/stm32h735.yaml | 1 + devices/stm32h747cm4.yaml | 1 + devices/stm32h747cm7.yaml | 1 + devices/stm32h7b3.yaml | 1 + peripherals/sai/sai.yaml | 6 +++--- 7 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 devices/common_patches/h7_sai_mcken.yaml diff --git a/devices/common_patches/h7_sai.yaml b/devices/common_patches/h7_sai.yaml index 1af651592..8d0c9b7ce 100644 --- a/devices/common_patches/h7_sai.yaml +++ b/devices/common_patches/h7_sai.yaml @@ -3,13 +3,6 @@ _modify: MCKDIV: bitWidth: 6 - NOMCK: - name: NODIV - _add: - MCKEN: - description: Master clock generation enable - bitOffset: 27 - bitWidth: 1 AFRCR: _modify: FSDEF: @@ -18,13 +11,6 @@ _modify: MCKDIV: bitWidth: 6 - NOMCK: - name: NODIV - _add: - MCKEN: - description: Master clock generation enable - bitOffset: 27 - bitWidth: 1 BFRCR: _modify: FSDEF: diff --git a/devices/common_patches/h7_sai_mcken.yaml b/devices/common_patches/h7_sai_mcken.yaml new file mode 100644 index 000000000..c38479056 --- /dev/null +++ b/devices/common_patches/h7_sai_mcken.yaml @@ -0,0 +1,19 @@ +"SAI*": + ACR1: + _modify: + NOMCK: + name: NODIV + _add: + MCKEN: + description: Master clock generation enable + bitOffset: 27 + bitWidth: 1 + BCR1: + _modify: + NOMCK: + name: NODIV + _add: + MCKEN: + description: Master clock generation enable + bitOffset: 27 + bitWidth: 1 diff --git a/devices/stm32h735.yaml b/devices/stm32h735.yaml index d9ed7a580..a5877f327 100644 --- a/devices/stm32h735.yaml +++ b/devices/stm32h735.yaml @@ -497,6 +497,7 @@ _include: - common_patches/h7_adc_boost_rev_v.yaml - common_patches/h7_octospi.yaml - common_patches/h7_sai.yaml + - common_patches/h7_sai_mcken.yaml - common_patches/h735_747_753_dfsdm.yaml - common_patches/h7_spdifrx.yaml - common_patches/h7_otg.yaml diff --git a/devices/stm32h747cm4.yaml b/devices/stm32h747cm4.yaml index 40846b14c..f696d65a8 100644 --- a/devices/stm32h747cm4.yaml +++ b/devices/stm32h747cm4.yaml @@ -38,6 +38,7 @@ _include: - common_patches/h7_dualcore_flash.yaml - common_patches/h7_hsicfgr_csicfgr_rev_v.yaml - common_patches/h7_sai.yaml + - common_patches/h7_sai_mcken.yaml - common_patches/h7_spdifrx.yaml - common_patches/h7_otg.yaml - common_patches/sai/sai_v1.yaml diff --git a/devices/stm32h747cm7.yaml b/devices/stm32h747cm7.yaml index 24f31cdee..d4073c0fb 100644 --- a/devices/stm32h747cm7.yaml +++ b/devices/stm32h747cm7.yaml @@ -38,6 +38,7 @@ _include: - common_patches/h7_dualcore_flash.yaml - common_patches/h7_hsicfgr_csicfgr_rev_v.yaml - common_patches/h7_sai.yaml + - common_patches/h7_sai_mcken.yaml - common_patches/h735_747_753_dfsdm.yaml - common_patches/h7_spdifrx.yaml - common_patches/h7_otg.yaml diff --git a/devices/stm32h7b3.yaml b/devices/stm32h7b3.yaml index deb5c7c4e..1aedc557f 100644 --- a/devices/stm32h7b3.yaml +++ b/devices/stm32h7b3.yaml @@ -92,6 +92,7 @@ _include: - common_patches/h7_adc_boost_rev_v.yaml - common_patches/h7_octospi.yaml - common_patches/h7_sai.yaml + - common_patches/h7_sai_mcken.yaml - common_patches/h7_spdifrx.yaml - common_patches/h7_otg.yaml - common_patches/flash/flash_dual_bank.yaml diff --git a/peripherals/sai/sai.yaml b/peripherals/sai/sai.yaml index 1c4afe2ca..464779056 100644 --- a/peripherals/sai/sai.yaml +++ b/peripherals/sai/sai.yaml @@ -1,9 +1,9 @@ "SAI,SAI?": "*CR1": #MCKDIV: - NODIV: - MasterClock: [0, "Master clock generator is enabled"] - NoDiv: [1, "No divider used in the clock generator (in this case Master Clock Divider bit has no effect)"] + NOMCK,NODIV: + MasterClock: [0, "MCLK output is enabled. Forces the ratio between FS and MCLK to 256 or 512 according to the OSR value"] + NoDiv: [1, "MCLK output enable set by the MCKEN bit (where present, else 0). Ratio between FS and MCLK depends on FRL."] DMAEN: Disabled: [0, "DMA disabled"] Enabled: [1, "DMA enabled"] From 29fc34e74f972c3989e9e1085835a3fbfa8a58d6 Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Sun, 3 Oct 2021 13:09:41 +0200 Subject: [PATCH 2/2] H7: Add NODIV for all parts --- devices/common_patches/h7_sai.yaml | 10 ++++++++++ devices/common_patches/h7_sai_mcken.yaml | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/devices/common_patches/h7_sai.yaml b/devices/common_patches/h7_sai.yaml index 8d0c9b7ce..db637bb04 100644 --- a/devices/common_patches/h7_sai.yaml +++ b/devices/common_patches/h7_sai.yaml @@ -3,6 +3,11 @@ _modify: MCKDIV: bitWidth: 6 + _add: + NODIV: + description: No fixed divider between MCLK and FS + bitOffset: 19 + bitWidth: 1 AFRCR: _modify: FSDEF: @@ -11,6 +16,11 @@ _modify: MCKDIV: bitWidth: 6 + _add: + NODIV: + description: No fixed divider between MCLK and FS + bitOffset: 19 + bitWidth: 1 BFRCR: _modify: FSDEF: diff --git a/devices/common_patches/h7_sai_mcken.yaml b/devices/common_patches/h7_sai_mcken.yaml index c38479056..824fdc629 100644 --- a/devices/common_patches/h7_sai_mcken.yaml +++ b/devices/common_patches/h7_sai_mcken.yaml @@ -1,17 +1,17 @@ +# Applies to H7 RM0399, RM0455, RM0468 + "SAI*": ACR1: - _modify: - NOMCK: - name: NODIV + _delete: + - NOMCK _add: MCKEN: description: Master clock generation enable bitOffset: 27 bitWidth: 1 BCR1: - _modify: - NOMCK: - name: NODIV + _delete: + - NOMCK _add: MCKEN: description: Master clock generation enableFetched URL: http://github.com/stm32-rs/stm32-rs/pull/640.patch
Alternative Proxies: