Skip to content

Commit 2deb8cb

Browse files
richardeoinmattico
authored andcommitted
Reapply peripherals/rcc/rcc_h7.yaml to stm32h7b3.yaml with new SVDs
There's many case of renames like D3 -> SRD and D1/D2 -> CD, handle these with new match options Requires rust-embedded/svdtools#57 for _clear statements
1 parent 3260b8d commit 2deb8cb

12 files changed

+55
-9
lines changed

devices/common_patches/h7_common_highmemory.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ RCC:
473473
name: D3PPRE
474474

475475
CR:
476+
_clear:
477+
"*"
476478
_modify:
477479
RC48ON:
478480
name: HSI48ON
@@ -483,12 +485,16 @@ RCC:
483485
RC48CAL:
484486
name: HSI48CAL
485487
CFGR:
488+
_clear:
489+
"*"
486490
_modify:
487491
MCO1SEL:
488492
name: MCO1
489493
MCO2SEL:
490494
name: MCO2
491495
CIER:
496+
_clear:
497+
"*"
492498
_modify:
493499
RC48RDYIE:
494500
name: HSI48RDYIE
@@ -497,16 +503,25 @@ RCC:
497503
RC48RDYF:
498504
name: HSI48RDYF
499505
CICR:
506+
_clear:
507+
"*"
500508
_modify:
501509
RC48RDYC:
502510
name: HSI48RDYC
503511
BDCR:
512+
_clear:
513+
"*"
504514
_modify:
505515
VSWRST:
506516
name: BDRST
507517
RTCSRC:
508518
name: RTCSEL
519+
CSR:
520+
_clear:
521+
"*"
509522
PLL2DIVR:
523+
_clear:
524+
"*"
510525
_modify:
511526
DIVR1:
512527
name: DIVR2
@@ -516,6 +531,15 @@ RCC:
516531
name: DIVP2
517532
DIVN1:
518533
name: DIVN2
534+
"A?B?RSTR,A?B??RSTR":
535+
_clear:
536+
"*RST"
537+
"A?B?ENR,A?B??ENR,C1_A?B?ENR,C1_A?B??ENR":
538+
_clear:
539+
"*EN"
540+
"A?B?LPENR,A?B??LPENR,C1_A?B?LPENR,C1_A?B??LPENR":
541+
_clear:
542+
"*LPEN"
519543
APB1LRSTR:
520544
_modify:
521545
USART7RST:
@@ -587,6 +611,16 @@ RCC:
587611
FLITFLPEN:
588612
name: FLASHPREN
589613
description: "Flash interface clock enable during csleep mode"
614+
RSR:
615+
_clear:
616+
"*RSTF"
617+
PLLCKSELR,PLLCFGR,PLL1DIVR,CDCFGR?,CDCCIPR,CDCCIP?R:
618+
_clear:
619+
"*"
620+
SRDAMR,SRDCCIPR:
621+
_clear:
622+
"*"
623+
590624

591625
TIM1,TIM8:
592626
DMAR:

devices/stm32h735.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ _include:
8888
- ../peripherals/gpio/gpio_v2.yaml
8989
- ../peripherals/lptim/lptim_v1.yaml
9090
- ../peripherals/ltdc/ltdc.yaml
91+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
9192
- ../peripherals/rcc/rcc_h7_revision_v.yaml
9293
- ../peripherals/rng/rng_v1.yaml
9394
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h743.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ _include:
4949
- ../peripherals/lptim/lptim_v1.yaml
5050
- ../peripherals/ltdc/ltdc.yaml
5151
- ../peripherals/rcc/rcc_h7.yaml
52+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
5253
- ../peripherals/rcc/rcc_h7_revision_y.yaml
5354
- ../peripherals/rng/rng_v1.yaml
5455
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h743v.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ _include:
5151
- ../peripherals/lptim/lptim_v1.yaml
5252
- ../peripherals/ltdc/ltdc.yaml
5353
- ../peripherals/rcc/rcc_h7.yaml
54+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
5455
- ../peripherals/rcc/rcc_h7_revision_v.yaml
5556
- ../peripherals/rng/rng_v1.yaml
5657
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h747cm4.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ _include:
6464
- ../peripherals/lptim/lptim_v1.yaml
6565
- ../peripherals/ltdc/ltdc.yaml
6666
- ../peripherals/rcc/rcc_h7.yaml
67+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
6768
- ../peripherals/rcc/rcc_h7_revision_v.yaml
6869
- ../peripherals/rng/rng_v1.yaml
6970
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h747cm7.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ _include:
6565
- ../peripherals/lptim/lptim_v1.yaml
6666
- ../peripherals/ltdc/ltdc.yaml
6767
- ../peripherals/rcc/rcc_h7.yaml
68+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
6869
- ../peripherals/rcc/rcc_h7_revision_v.yaml
6970
- ../peripherals/rng/rng_v1.yaml
7071
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h753.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ _include:
5959
- ../peripherals/lptim/lptim_v1.yaml
6060
- ../peripherals/ltdc/ltdc.yaml
6161
- ../peripherals/rcc/rcc_h7.yaml
62+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
6263
- ../peripherals/rcc/rcc_h7_revision_y.yaml
6364
- ../peripherals/rng/rng_v1.yaml
6465
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h753v.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ _include:
6161
- ../peripherals/lptim/lptim_v1.yaml
6262
- ../peripherals/ltdc/ltdc.yaml
6363
- ../peripherals/rcc/rcc_h7.yaml
64+
- ../peripherals/rcc/rcc_v3_hrtim.yaml
6465
- ../peripherals/rcc/rcc_h7_revision_v.yaml
6566
- ../peripherals/rng/rng_v1.yaml
6667
- ../peripherals/rng/rng_v1_ced.yaml

devices/stm32h7b3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ _include:
116116
- ../peripherals/gpio/gpio_v2.yaml
117117
- ../peripherals/lptim/lptim_v1.yaml
118118
- ../peripherals/ltdc/ltdc.yaml
119+
- ../peripherals/rcc/rcc_h7.yaml
119120
- ../peripherals/rcc/rcc_h7_revision_v.yaml
120121
- ../peripherals/rng/rng_v1.yaml
121122
- ../peripherals/rng/rng_v1_ced.yaml

peripherals/rcc/rcc_v3.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ RCC:
4444
TIMPRE:
4545
DefaultX2: [0, "Timer kernel clock equal to 2x pclk by default"]
4646
DefaultX4: [1, "Timer kernel clock equal to 4x pclk by default"]
47-
HRTIMSEL:
48-
TIMY_KER: [0, "The HRTIM prescaler clock source is the same as other timers (rcc_timy_ker_ck)"]
49-
C_CK: [1, "The HRTIM prescaler clock source is the CPU clock (c_ck)"]
5047
RTCPRE: [0, 63]
5148
STOPWUCK,STOPKERWUCK:
5249
HSI: [0, "HSI selected as wake up clock from system Stop"]
@@ -117,7 +114,7 @@ RCC:
117114
WW1RSC:
118115
Clear: [0, "Clear WWDG1 scope control"]
119116
Set: [1, "Set WWDG1 scope control"]
120-
D3AMR:
117+
D3AMR,SRDAMR:
121118
"*AMEN":
122119
Disabled: [0, "Clock disabled in autonomous mode"]
123120
Enabled: [1, "Clock enabled in autonomous mode"]

peripherals/rcc/rcc_v3_h7_ccip.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# clock configuration registers (DxCFGR)
55

66
RCC:
7-
D1CFGR:
8-
"D?CPRE,HPRE":
7+
D1CFGR,CDCFGR1:
8+
"D?CPRE,HPRE,CDCPRE":
99
Div1: [0, "sys_ck not divided"]
1010
Div2: [8, "sys_ck divided by 2"]
1111
Div4: [9, "sys_ck divided by 4"]
@@ -15,8 +15,8 @@ RCC:
1515
Div128: [13, "sys_ck divided by 128"]
1616
Div256: [14, "sys_ck divided by 256"]
1717
Div512: [15, "sys_ck divided by 512"]
18-
D?CFGR:
19-
D?PPR*:
18+
D?CFGR,CDCFGR?:
19+
D?PPR*,CDPPRE*:
2020
Div1: [0, "rcc_hclk not divided"]
2121
Div2: [4, "rcc_hclk divided by 2"]
2222
Div4: [5, "rcc_hclk divided by 4"]
@@ -36,7 +36,7 @@ RCC:
3636
PLL2_R: [2, "pll2_r selected as peripheral clock"]
3737
PER: [3, "PER selected as peripheral clock"]
3838
D2CCIP1R,CDCCIP1R:
39-
SWPSEL:
39+
SWPSEL,SWPMISEL:
4040
PCLK: [0, "pclk selected as peripheral clock"]
4141
HSI_KER: [1, "hsi_ker selected as peripheral clock"]
4242
FDCANSEL:

peripherals/rcc/rcc_v3_hrtim.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Applicable at least to H7, except RM0455 parts with no HRTIM
2+
3+
RCC:
4+
CFGR:
5+
HRTIMSEL:
6+
TIMY_KER: [0, "The HRTIM prescaler clock source is the same as other timers (rcc_timy_ker_ck)"]
7+
C_CK: [1, "The HRTIM prescaler clock source is the CPU clock (c_ck)"]

0 commit comments

Comments
 (0)