Skip to content

Commit cebce8a

Browse files
committed
Separate C0 RCC into two versions.
1 parent 3ce1351 commit cebce8a

File tree

3 files changed

+1095
-163
lines changed

3 files changed

+1095
-163
lines changed

data/registers/rcc_c0.yaml

Lines changed: 4 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,17 @@ block/RCC:
1313
description: RCC clock configuration register
1414
byte_offset: 8
1515
fieldset: CFGR
16-
- name: CRRCR
17-
description: RCC clock recovery RC register.
18-
byte_offset: 20
19-
access: Read
20-
fieldset: CRRCR
2116
- name: CIER
2217
description: RCC clock interrupt enable register
2318
byte_offset: 24
2419
fieldset: CIER
2520
- name: CIFR
2621
description: RCC clock interrupt flag register
2722
byte_offset: 28
28-
access: Read
2923
fieldset: CIFR
3024
- name: CICR
3125
description: RCC clock interrupt clear register
3226
byte_offset: 32
33-
access: Write
3427
fieldset: CICR
3528
- name: GPIORSTR
3629
description: RCC I/O port reset register
@@ -80,14 +73,10 @@ block/RCC:
8073
description: RCC APB peripheral clock enable in Sleep/Stop mode register 2
8174
byte_offset: 80
8275
fieldset: APBSMENR2
83-
- name: CCIPR1
84-
description: RCC peripherals independent clock configuration register 1
76+
- name: CCIPR
77+
description: RCC peripherals independent clock configuration register
8578
byte_offset: 84
86-
fieldset: CCIPR1
87-
- name: CCIPR2
88-
description: RCC peripherals independent clock configuration register 2.
89-
byte_offset: 88
90-
fieldset: CCIPR2
79+
fieldset: CCIPR
9180
- name: CSR1
9281
description: RCC control/status register 1
9382
byte_offset: 92
@@ -148,10 +137,6 @@ fieldset/AHBSMENR:
148137
fieldset/APBENR1:
149138
description: RCC APB peripheral clock enable register 1
150139
fields:
151-
- name: TIM2EN
152-
description: TIM2 timer clock enable Set and cleared by software.
153-
bit_offset: 0
154-
bit_size: 1
155140
- name: TIM3EN
156141
description: "TIM3 timer clock enable\r Set and cleared by software."
157142
bit_offset: 1
@@ -164,18 +149,6 @@ fieldset/APBENR1:
164149
description: "WWDG clock enable\r Set by software to enable the window watchdog clock. Cleared by hardware system reset\r This bit can also be set by hardware if the WWDG_SW option bit is 0."
165150
bit_offset: 11
166151
bit_size: 1
167-
- name: USBEN
168-
description: USB clock enable Set and cleared by software.
169-
bit_offset: 13
170-
bit_size: 1
171-
- name: SPI2EN
172-
description: SPI2 clock enable Set and cleared by software.
173-
bit_offset: 14
174-
bit_size: 1
175-
- name: CRSEN
176-
description: CRS clock enable Set and cleared by software.
177-
bit_offset: 16
178-
bit_size: 1
179152
- name: USART2EN
180153
description: "USART2 clock enable\r Set and cleared by software."
181154
bit_offset: 17
@@ -184,10 +157,6 @@ fieldset/APBENR1:
184157
description: "I2C1 clock enable\r Set and cleared by software."
185158
bit_offset: 21
186159
bit_size: 1
187-
- name: I2C2EN
188-
description: I2C2 clock enable Set and cleared by software.
189-
bit_offset: 22
190-
bit_size: 1
191160
- name: DBGEN
192161
description: "Debug support clock enable\r Set and cleared by software."
193162
bit_offset: 27
@@ -234,26 +203,10 @@ fieldset/APBENR2:
234203
fieldset/APBRSTR1:
235204
description: RCC APB peripheral reset register 1
236205
fields:
237-
- name: TIM2RST
238-
description: 'TIM2 timer reset Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
239-
bit_offset: 0
240-
bit_size: 1
241206
- name: TIM3RST
242207
description: "TIM3 timer reset\r Set and cleared by software."
243208
bit_offset: 1
244209
bit_size: 1
245-
- name: USBRST
246-
description: 'USB reset Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
247-
bit_offset: 13
248-
bit_size: 1
249-
- name: SPI2RST
250-
description: 'SPI2 reset Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
251-
bit_offset: 14
252-
bit_size: 1
253-
- name: CRSRST
254-
description: 'CRS reset Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
255-
bit_offset: 16
256-
bit_size: 1
257210
- name: USART2RST
258211
description: "USART2 reset\r Set and cleared by software."
259212
bit_offset: 17
@@ -262,10 +215,6 @@ fieldset/APBRSTR1:
262215
description: "I2C1 reset\r Set and cleared by software."
263216
bit_offset: 21
264217
bit_size: 1
265-
- name: I2C2RST
266-
description: 'I2C2 reset Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
267-
bit_offset: 22
268-
bit_size: 1
269218
- name: DBGRST
270219
description: "Debug support reset\r Set and cleared by software."
271220
bit_offset: 27
@@ -312,10 +261,6 @@ fieldset/APBRSTR2:
312261
fieldset/APBSMENR1:
313262
description: RCC APB peripheral clock enable in Sleep/Stop mode register 1
314263
fields:
315-
- name: TIM2SMEN
316-
description: 'TIM2 timer clock enable during Sleep mode Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
317-
bit_offset: 0
318-
bit_size: 1
319264
- name: TIM3SMEN
320265
description: "TIM3 timer clock enable during Sleep mode\r Set and cleared by software."
321266
bit_offset: 1
@@ -328,18 +273,6 @@ fieldset/APBSMENR1:
328273
description: "WWDG clock enable during Sleep and Stop modes\r Set and cleared by software."
329274
bit_offset: 11
330275
bit_size: 1
331-
- name: USBSMEN
332-
description: 'USB clock enable during Sleep and Stop modes Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
333-
bit_offset: 13
334-
bit_size: 1
335-
- name: SPI2SMEN
336-
description: 'SPI2 clock enable during Sleep and Stop modes Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
337-
bit_offset: 14
338-
bit_size: 1
339-
- name: CRSSMEN
340-
description: 'CRS clock enable during Sleep and Stop modes Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
341-
bit_offset: 16
342-
bit_size: 1
343276
- name: USART2SMEN
344277
description: "USART2 clock enable during Sleep and Stop modes\r Set and cleared by software."
345278
bit_offset: 17
@@ -348,10 +281,6 @@ fieldset/APBSMENR1:
348281
description: "I2C1 clock enable during Sleep and Stop modes\r Set and cleared by software."
349282
bit_offset: 21
350283
bit_size: 1
351-
- name: I2C2SMEN
352-
description: 'I2C2 clock enable during Sleep and Stop modes Set and cleared by software. Note: Only applicable on STM32C071xx, reserved on other devices.'
353-
bit_offset: 22
354-
bit_size: 1
355284
- name: DBGSMEN
356285
description: "Debug support clock enable during Sleep mode\r Set and cleared by software."
357286
bit_offset: 27
@@ -395,7 +324,7 @@ fieldset/APBSMENR2:
395324
description: "ADC clock enable during Sleep mode\r Set and cleared by software."
396325
bit_offset: 20
397326
bit_size: 1
398-
fieldset/CCIPR1:
327+
fieldset/CCIPR:
399328
description: RCC peripherals independent clock configuration register
400329
fields:
401330
- name: USART1SEL
@@ -418,14 +347,6 @@ fieldset/CCIPR1:
418347
bit_offset: 30
419348
bit_size: 2
420349
enum: ADCSEL
421-
fieldset/CCIPR2:
422-
description: RCC peripherals independent clock configuration register 2.
423-
fields:
424-
- name: USBSEL
425-
description: USB clock source selection Set and cleared by software.
426-
bit_offset: 12
427-
bit_size: 1
428-
enum: USBSEL
429350
fieldset/CFGR:
430351
description: RCC clock configuration register
431352
fields:
@@ -480,10 +401,6 @@ fieldset/CICR:
480401
description: "LSE ready interrupt clear\r This bit is set by software to clear the LSERDYF flag."
481402
bit_offset: 1
482403
bit_size: 1
483-
- name: HSI48RDYC
484-
description: 'HSI48 ready interrupt clear This bit is set software to clear the HSI48RDYF flag. Note: Only applicable on STM32C071xx, reserved on other devices.'
485-
bit_offset: 2
486-
bit_size: 1
487404
- name: HSIRDYC
488405
description: "HSI ready interrupt clear\r This bit is set software to clear the HSIRDYF flag."
489406
bit_offset: 3
@@ -511,10 +428,6 @@ fieldset/CIER:
511428
description: "LSE ready interrupt enable\r Set and cleared by software to enable/disable interrupt caused by the LSE oscillator stabilization:"
512429
bit_offset: 1
513430
bit_size: 1
514-
- name: HSI48RDYIE
515-
description: 'HSI48 ready interrupt enable Set and cleared by software to enable/disable interrupt caused by the HSI48 oscillator stabilization: Note: Only applicable on STM32C071xx, reserved on other devices.'
516-
bit_offset: 2
517-
bit_size: 1
518431
- name: HSIRDYIE
519432
description: "HSI ready interrupt enable\r Set and cleared by software to enable/disable interrupt caused by the HSI oscillator stabilization:"
520433
bit_offset: 3
@@ -534,10 +447,6 @@ fieldset/CIFR:
534447
description: "LSE ready interrupt flag\r This flag indicates a pending interrupt upon LSE clock getting ready.\r Set by hardware when the LSE clock becomes stable and LSERDYDIE is set.\r Cleared by software setting the LSERDYC bit."
535448
bit_offset: 1
536449
bit_size: 1
537-
- name: HSI48RDYF
538-
description: 'HSI48 ready interrupt flag Set by hardware when the HSI48 clock becomes stable and HSI48RDYIE is set as a response to setting HSI48ON (refer to RCC clock control register (CR)). When HSI48ON is not set but the HSI48 oscillator is enabled by the peripheral through a clock request, this bit is not set and no interrupt is generated. Cleared by software setting the HSI48RDYC bit. Note: Only applicable on STM32C071xx, reserved on other devices.'
539-
bit_offset: 2
540-
bit_size: 1
541450
- name: HSIRDYF
542451
description: "HSI ready interrupt flag\r This flag indicates a pending interrupt upon HSI clock getting ready.\r Set by hardware when the HSI clock becomes stable and HSIRDYIE is set in response to setting the HSION (refer to ). When HSION is not set but the HSI oscillator is enabled by the peripheral through a clock request, this bit is not set and no interrupt is generated.\r Cleared by software setting the HSIRDYC bit."
543452
bit_offset: 3
@@ -557,11 +466,6 @@ fieldset/CIFR:
557466
fieldset/CR:
558467
description: RCC clock control register
559468
fields:
560-
- name: SYSDIV
561-
description: 'Clock division factor for system clock Set and cleared by software. SYSCLK is result of the division by: Note: This bitfield is only available on STM32C071xx.'
562-
bit_offset: 2
563-
bit_size: 3
564-
enum: SYSDIV
565469
- name: HSIKERDIV
566470
description: "HSI kernel clock division factor\r This bitfield controlled by software sets the division factor of the kernel clock divider to produce HSIKER clock:"
567471
bit_offset: 5
@@ -600,21 +504,6 @@ fieldset/CR:
600504
description: "Clock security system enable\r Set by software to enable the clock security system. When the bit is set, the clock detector is enabled by hardware when the HSE oscillator is ready, and disabled by hardware if a HSE clock failure is detected. The bit is cleared by hardware upon reset."
601505
bit_offset: 19
602506
bit_size: 1
603-
- name: HSI48ON
604-
description: 'HSI48 clock enable Set and cleared by software and hardware, with hardware taking priority. Kept low by hardware as long as the device is in a low-power mode. Kept high by hardware as long as the system is clocked from HSI48. Note: Only applicable on STM32C071xx, reserved on other devices.'
605-
bit_offset: 22
606-
bit_size: 1
607-
- name: HSI48RDY
608-
description: 'HSI48 clock ready flag Set by hardware when the HSI48 oscillator is enabled through HSI48ON and ready to use (stable). Note: Only applicable on STM32C071xx, reserved on other devices.'
609-
bit_offset: 23
610-
bit_size: 1
611-
fieldset/CRRCR:
612-
description: RCC clock recovery RC register.
613-
fields:
614-
- name: HSI48CAL
615-
description: HSI48 clock calibration These bits are initialized at startup with the factory-programmed HSI48 calibration trim value.
616-
bit_offset: 0
617-
bit_size: 9
618507
fieldset/CSR1:
619508
description: RCC control/status register 1
620509
fields:
@@ -956,15 +845,6 @@ enum/MCOPRE:
956845
- name: Div128
957846
description: MCO clock is divided divided by 128
958847
value: 7
959-
- name: Div256
960-
description: MCO clock is divided divided by 256
961-
value: 8
962-
- name: Div512
963-
description: MCO clock is divided divided by 512
964-
value: 9
965-
- name: Div1024
966-
description: MCO clock is divided divided by 1024
967-
value: 10
968848
enum/MCOSEL:
969849
bit_size: 4
970850
variants:
@@ -986,9 +866,6 @@ enum/MCOSEL:
986866
- name: LSE
987867
description: LSE selected as MCO source
988868
value: 7
989-
- name: HSI48
990-
description: HSI48 selected as MCO source
991-
value: 8
992869
enum/PPRE:
993870
bit_size: 3
994871
variants:
@@ -1037,33 +914,6 @@ enum/SW:
1037914
- name: LSE
1038915
description: LSE selected as system clock
1039916
value: 4
1040-
enum/SYSDIV:
1041-
bit_size: 3
1042-
variants:
1043-
- name: Div1
1044-
description: 1 (no division, reset value).
1045-
value: 0
1046-
- name: Div2
1047-
description: '2.'
1048-
value: 1
1049-
- name: Div3
1050-
description: '3.'
1051-
value: 2
1052-
- name: Div4
1053-
description: '4.'
1054-
value: 3
1055-
- name: Div5
1056-
description: '5.'
1057-
value: 4
1058-
- name: Div6
1059-
description: '6.'
1060-
value: 5
1061-
- name: Div7
1062-
description: '7.'
1063-
value: 6
1064-
- name: Div8
1065-
description: '8.'
1066-
value: 7
1067917
enum/USART1SEL:
1068918
bit_size: 2
1069919
variants:
@@ -1079,12 +929,3 @@ enum/USART1SEL:
1079929
- name: LSE
1080930
description: LSE
1081931
value: 3
1082-
enum/USBSEL:
1083-
bit_size: 1
1084-
variants:
1085-
- name: HSI48
1086-
description: HSI48.
1087-
value: 0
1088-
- name: HSE
1089-
description: HSE.
1090-
value: 1

0 commit comments

Comments
 (0)