Skip to content

Commit

Permalink
rcc: use same name for bus psc
Browse files Browse the repository at this point in the history
  • Loading branch information
xoviat committed Sep 16, 2023
1 parent 546aead commit a70aa2f
Show file tree
Hide file tree
Showing 9 changed files with 218 additions and 20 deletions.
2 changes: 1 addition & 1 deletion d.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Switch ($CMD)
rm -r -Force ./sources/ -ErrorAction SilentlyContinue
git clone https://github.com/embassy-rs/stm32-data-sources.git ./sources/
cd ./sources/
git checkout ca89656b
git checkout a2062c088cf299bd3dc5128eeaa96e07fff2087c
cd ..
}
"install-chiptool" {
Expand Down
6 changes: 3 additions & 3 deletions data/registers/rcc_f1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,12 @@ fieldset/CFGR:
description: APB Low speed prescaler (APB1)
bit_offset: 8
bit_size: 3
enum: PPRE1
enum: PPRE
- name: PPRE2
description: APB High speed prescaler (APB2)
bit_offset: 11
bit_size: 3
enum: PPRE1
enum: PPRE
- name: ADCPRE
description: ADC prescaler
bit_offset: 14
Expand Down Expand Up @@ -783,7 +783,7 @@ enum/PLLXTPRE:
- name: Div2
description: HSE clock divided by 2
value: 1
enum/PPRE1:
enum/PPRE:
bit_size: 3
variants:
- name: Div1
Expand Down
6 changes: 3 additions & 3 deletions data/registers/rcc_f100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,12 @@ fieldset/CFGR:
description: APB Low speed prescaler (APB1)
bit_offset: 8
bit_size: 3
enum: PPRE1
enum: PPRE
- name: PPRE2
description: APB High speed prescaler (APB2)
bit_offset: 11
bit_size: 3
enum: PPRE1
enum: PPRE
- name: ADCPRE
description: ADC prescaler
bit_offset: 14
Expand Down Expand Up @@ -754,7 +754,7 @@ enum/PLLXTPRE:
- name: Div2
description: HSE clock divided by 2
value: 1
enum/PPRE1:
enum/PPRE:
bit_size: 3
variants:
- name: Div1
Expand Down
6 changes: 3 additions & 3 deletions data/registers/rcc_f1cl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ fieldset/CFGR:
description: APB Low speed prescaler (APB1)
bit_offset: 8
bit_size: 3
enum: PPRE1
enum: PPRE
- name: PPRE2
description: APB High speed prescaler (APB2)
bit_offset: 11
bit_size: 3
enum: PPRE1
enum: PPRE
- name: ADCPRE
description: ADC prescaler
bit_offset: 14
Expand Down Expand Up @@ -832,7 +832,7 @@ enum/PLLXTPRE:
- name: Div2
description: HSE clock divided by 2
value: 1
enum/PPRE1:
enum/PPRE:
bit_size: 3
variants:
- name: Div1
Expand Down
10 changes: 5 additions & 5 deletions data/registers/rcc_h7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3075,7 +3075,7 @@ fieldset/D1CFGR:
description: D1 domain APB3 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
- name: D1CPRE
description: D1 domain Core prescaler
bit_offset: 8
Expand Down Expand Up @@ -3169,12 +3169,12 @@ fieldset/D2CFGR:
description: D2 domain APB1 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
- name: D2PPRE2
description: D2 domain APB2 prescaler
bit_offset: 8
bit_size: 3
enum: DPPRE
enum: PPRE
fieldset/D3AMR:
description: RCC D3 Autonomous mode Register
fields:
Expand Down Expand Up @@ -3304,7 +3304,7 @@ fieldset/D3CFGR:
description: D3 domain APB4 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
fieldset/GCR:
description: Global Control Register
fields:
Expand Down Expand Up @@ -3785,7 +3785,7 @@ enum/DIVP:
- name: Div128
description: pll_p_ck = vco_ck / 128
value: 127
enum/DPPRE:
enum/PPRE:
bit_size: 3
variants:
- name: Div1
Expand Down
10 changes: 5 additions & 5 deletions data/registers/rcc_h7ab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ fieldset/D1CFGR:
description: D1 domain APB3 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
- name: D1CPRE
description: D1 domain Core prescaler
bit_offset: 8
Expand Down Expand Up @@ -2141,12 +2141,12 @@ fieldset/D2CFGR:
description: D2 domain APB1 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
- name: D2PPRE2
description: D2 domain APB2 prescaler
bit_offset: 8
bit_size: 3
enum: DPPRE
enum: PPRE
fieldset/D3AMR:
description: RCC D3 Autonomous mode Register
fields:
Expand Down Expand Up @@ -2270,7 +2270,7 @@ fieldset/D3CFGR:
description: D3 domain APB4 prescaler
bit_offset: 4
bit_size: 3
enum: DPPRE
enum: PPRE
fieldset/GCR:
description: Global Control Register
fields:
Expand Down Expand Up @@ -2720,7 +2720,7 @@ enum/DIVP:
- name: Div128
description: pll_p_ck = vco_ck / 128
value: 127
enum/DPPRE:
enum/PPRE:
bit_size: 3
variants:
- name: Div1
Expand Down
66 changes: 66 additions & 0 deletions data/registers/rcc_wb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1160,14 +1160,17 @@ fieldset/CFGR:
description: AHB prescaler
bit_offset: 4
bit_size: 4
enum: HPRE
- name: PPRE1
description: PB low-speed prescaler (APB1)
bit_offset: 8
bit_size: 3
enum: PPRE
- name: PPRE2
description: APB high-speed prescaler (APB2)
bit_offset: 11
bit_size: 3
enum: PPRE
- name: STOPWUCK
description: Wakeup from Stop and CSS backup clock selection
bit_offset: 15
Expand Down Expand Up @@ -1651,3 +1654,66 @@ enum/RTCSEL:
- name: HSE
description: HSE oscillator clock divided by 32 selected
value: 3
enum/PPRE:
bit_size: 3
variants:
- name: Div1
description: HCLK not divided
value: 0
- name: Div2
description: HCLK divided by 2
value: 4
- name: Div4
description: HCLK divided by 4
value: 5
- name: Div8
description: HCLK divided by 8
value: 6
- name: Div16
description: HCLK divided by 16
value: 7
enum/HPRE:
bit_size: 4
variants:
- name: Div1
description: DCLK not divided
value: 0x0
- name: Div2
description: hclk = SYSCLK divided by 2
value: 0x08
- name: Div3
description: hclk = SYSCLK divided by 3
value: 0x01
- name: Div4
description: hclk = SYSCLK divided by 4
value: 0x09
- name: Div5
description: hclk = SYSCLK divided by 5
value: 0x02
- name: Div6
description: hclk = SYSCLK divided by 6
value: 0x05
- name: Div8
description: hclk = SYSCLK divided by 8
value: 0x0a
- name: Div10
description: hclk = SYSCLK divided by 8
value: 0x06
- name: Div16
description: hclk = SYSCLK divided by 16
value: 0x0b
- name: Div32
description: hclk = SYSCLK divided by 32
value: 0x07
- name: Div64
description: hclk = SYSCLK divided by 64
value: 0x0c
- name: Div128
description: hclk = SYSCLK divided by 128
value: 0x0d
- name: Div256
description: hclk = SYSCLK divided by 256
value: 0x0e
- name: Div512
description: hclk = SYSCLK divided by 256
value: 0x0f
66 changes: 66 additions & 0 deletions data/registers/rcc_wl5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1079,14 +1079,17 @@ fieldset/CFGR:
description: HCLK1 prescaler (CPU1, AHB1, AHB2, and SRAM1.)
bit_offset: 4
bit_size: 4
enum: HPRE
- name: PPRE1
description: PCLK1 low-speed prescaler (APB1)
bit_offset: 8
bit_size: 3
enum: PPRE
- name: PPRE2
description: PCLK2 high-speed prescaler (APB2)
bit_offset: 11
bit_size: 3
enum: PPRE
- name: STOPWUCK
description: Wakeup from Stop and CSS backup clock selection
bit_offset: 15
Expand Down Expand Up @@ -1450,3 +1453,66 @@ enum/RTCSEL:
- name: HSE
description: HSE oscillator clock divided by 32 selected
value: 3
enum/PPRE:
bit_size: 3
variants:
- name: Div1
description: HCLK not divided
value: 0
- name: Div2
description: HCLK divided by 2
value: 4
- name: Div4
description: HCLK divided by 4
value: 5
- name: Div8
description: HCLK divided by 8
value: 6
- name: Div16
description: HCLK divided by 16
value: 7
enum/HPRE:
bit_size: 4
variants:
- name: Div1
description: DCLK not divided
value: 0x0
- name: Div2
description: hclk = SYSCLK divided by 2
value: 0x08
- name: Div3
description: hclk = SYSCLK divided by 3
value: 0x01
- name: Div4
description: hclk = SYSCLK divided by 4
value: 0x09
- name: Div5
description: hclk = SYSCLK divided by 5
value: 0x02
- name: Div6
description: hclk = SYSCLK divided by 6
value: 0x05
- name: Div8
description: hclk = SYSCLK divided by 8
value: 0x0a
- name: Div10
description: hclk = SYSCLK divided by 8
value: 0x06
- name: Div16
description: hclk = SYSCLK divided by 16
value: 0x0b
- name: Div32
description: hclk = SYSCLK divided by 32
value: 0x07
- name: Div64
description: hclk = SYSCLK divided by 64
value: 0x0c
- name: Div128
description: hclk = SYSCLK divided by 128
value: 0x0d
- name: Div256
description: hclk = SYSCLK divided by 256
value: 0x0e
- name: Div512
description: hclk = SYSCLK divided by 256
value: 0x0f
Loading

0 comments on commit a70aa2f

Please sign in to comment.