Skip to content

Commit 0cb0f60

Browse files
committed
rework CC1M field in timers & other timer fixes
1 parent e664fe2 commit 0cb0f60

File tree

104 files changed

+895
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+895
-387
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"TIM*":
2+
CR1:
3+
_modify:
4+
OMP:
5+
name: OPM
6+
7+
"TIM[1-58-9],TIM??":
8+
CCMR1_Input:
9+
_modify:
10+
ICPCS:
11+
name: IC1PSC
12+
IC1PCS:
13+
name: IC1PSC
14+
IC2PCS:
15+
name: IC2PSC
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
"TIM[1234589],TIM10,TIM11,TIM12,TIM13,TIM14,TIM21,TIM22":
1+
"TIM[1-589],TIM??":
2+
_modify:
3+
"CCR?":
4+
description: "capture/compare register"
25
"CCR?":
36
_modify:
47
"CCR?":
58
name: CCR
9+
description: "Capture/Compare value"
610
_array:
711
"CCR[1234]": {}

devices/common_patches/tim/tim_o24ce.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"TIM[2345]":
1+
"TIM[2-5]":
22
CCMR2_Output:
33
_modify:
44
O24CE:

devices/common_patches/tim/v2/f7.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
_derive:
2+
TIM4: TIM3
3+
4+
TIM3:
5+
_delete:
6+
- OR1
7+
- OR2
8+
9+
_copy:
10+
TIM5:
11+
from: TIM2
12+
13+
TIM[25]:
14+
_modify:
15+
OR1:
16+
name: OR
17+
_delete:
18+
- OR2
19+
20+
TIM2:
21+
OR:
22+
_delete:
23+
- TI4_RMP
24+
- ETR1_RMP
25+
26+
TIM5:
27+
OR:
28+
_delete:
29+
- ETR1_RMP
30+
- ITR1_RMP
31+
32+
TIM1:
33+
CCMR1_Output:
34+
_add:
35+
OC1M_3:
36+
description: "Output Compare 1 mode, bit 3"
37+
bitOffset: 16
38+
bitWidth: 1
39+
OC2M_3:
40+
description: "Output Compare 2 mode, bit 3"
41+
bitOffset: 24
42+
bitWidth: 1
43+
CCMR2_Output:
44+
_add:
45+
OC3M_3:
46+
description: "Output Compare 3 mode, bit 3"
47+
bitOffset: 16
48+
bitWidth: 1
49+
OC4M_3:
50+
description: "Output Compare 4 mode, bit 3"
51+
bitOffset: 24
52+
bitWidth: 1
53+
CCMR3_Output:
54+
_modify:
55+
OC5M3:
56+
name: OC5M_3
57+
OC6M3:
58+
name: OC6M_3
59+
60+
TIM[235]:
61+
CCMR1_Output:
62+
_add:
63+
OC1M_3:
64+
description: "Output Compare 1 mode, bit 3"
65+
bitOffset: 16
66+
bitWidth: 1
67+
OC2M_3:
68+
description: "Output Compare 2 mode, bit 3"
69+
bitOffset: 24
70+
bitWidth: 1
71+
CCMR2_Output:
72+
_add:
73+
OC3M_3:
74+
description: "Output Compare 3 mode, bit 3"
75+
bitOffset: 16
76+
bitWidth: 1
77+
OC4M_3:
78+
description: "Output Compare 4 mode, bit 3"
79+
bitOffset: 24
80+
bitWidth: 1
81+
82+
TIM9:
83+
CCMR1_Output:
84+
_add:
85+
OC1M_3:
86+
description: "Output Compare 1 mode, bit 3"
87+
bitOffset: 16
88+
bitWidth: 1
89+
OC2M_3:
90+
description: "Output Compare 2 mode, bit 3"
91+
bitOffset: 24
92+
bitWidth: 1
93+
94+

devices/common_patches/tim/v2/g0_1.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ TIM1:
3030
_clear:
3131
- OC1M?
3232
_modify:
33+
OC1M1:
34+
name: OC1M
3335
OC1M2:
3436
name: OC1M_3

devices/common_patches/tim/v2/g4.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
_copy:
2+
TIM3:
3+
from: TIM2
4+
5+
_derive:
6+
TIM4: TIM3
7+
8+
"TIM[123]":
9+
CCMR3_Output:
10+
_modify:
11+
OC5M_bit3:
12+
name: OC5M_3
13+
bitWidth: 1
14+
OC6M_bit3:
15+
name: OC6M_3
16+
17+
TIM2:
18+
CNT:
19+
_modify:
20+
CNT:
21+
bitWidth: 32
22+
ARR:
23+
_modify:
24+
ARR:
25+
bitWidth: 32
26+
CCR?:
27+
_modify:
28+
CCR?:
29+
name: CCR
30+
bitWidth: 32
31+
32+
"TIM[13],TIM15,TIM16":
33+
CNT:
34+
_modify:
35+
CNT:
36+
bitWidth: 16
37+
ARR:
38+
_modify:
39+
ARR:
40+
bitWidth: 20
41+
CCR?:
42+
_modify:
43+
CCR?:
44+
bitWidth: 20
45+
46+
_include:
47+
- ../tim_ccr.yaml

devices/common_patches/tim/tim_h7.yaml renamed to devices/common_patches/tim/v2/h7.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,17 @@
3838
"CCR2,CCR2_L,CCR2L":
3939
name: CCR
4040
description: "Capture/Compare 2 value"
41+
42+
"TIM[18]":
43+
CCMR3_Output:
44+
_modify:
45+
OC5M3:
46+
name: OC5M_3
47+
OC6M3:
48+
name: OC6M_3
49+
50+
"TIM[2-5],TIM1[2-4]":
51+
CCMR2_Output:
52+
_modify:
53+
O24CE:
54+
name: OC4CE

devices/common_patches/tim/v2/l4.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"TIM[18]":
2+
CCMR3_Output:
3+
_modify:
4+
OC5M_bit3:
5+
name: OC5M_3
6+
bitWidth: 1
7+
OC6M_bit3:
8+
name: OC6M_3
9+
CCMR1_Output:
10+
_add:
11+
OC1M_3:
12+
description: "Output Compare 1 mode, bit 3"
13+
bitOffset: 16
14+
bitWidth: 1
15+
OC2M_3:
16+
description: "Output Compare 2 mode, bit 3"
17+
bitOffset: 24
18+
bitWidth: 1
19+
CCMR2_Output:
20+
_add:
21+
OC3M_3:
22+
description: "Output Compare 3 mode, bit 3"
23+
bitOffset: 16
24+
bitWidth: 1
25+
OC4M_3:
26+
description: "Output Compare 4 mode, bit 3"
27+
bitOffset: 24
28+
bitWidth: 1
29+
30+
"TIM[23]":
31+
CCMR1_Output:
32+
_add:
33+
OC1M_3:
34+
description: "Output Compare 1 mode, bit 3"
35+
bitOffset: 16
36+
bitWidth: 1
37+
OC2M_3:
38+
description: "Output Compare 2 mode, bit 3"
39+
bitOffset: 24
40+
bitWidth: 1
41+
CCMR2_Output:
42+
_add:
43+
OC3M_3:
44+
description: "Output Compare 3 mode, bit 3"
45+
bitOffset: 16
46+
bitWidth: 1
47+
OC4M_3:
48+
description: "Output Compare 4 mode, bit 3"
49+
bitOffset: 24
50+
bitWidth: 1
51+
52+
TIM15:
53+
CCMR1_Output:
54+
_modify:
55+
OC1M_2:
56+
name: OC1M_3

devices/common_patches/tim/v2/l5.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SVD has TIM3,TIM4,TIM5 interrupts under TIM2 as
2+
# TIM2_3, TIM2_4, TIM2_5. This somewhat matches
3+
# documentation RM0438 vector table, but is non-
4+
# intuitive and appears a documentation error also.
5+
#
6+
# Remove from TIM2 and add to TIM3/4/5, add to
7+
# respective timers.
8+
9+
TIM2:
10+
_delete:
11+
_interrupts:
12+
- TIM2_*
13+
14+
TIM3:
15+
_add:
16+
_interrupts:
17+
TIM3:
18+
description: TIM3 global interrupt
19+
value: 46
20+
21+
TIM4:
22+
_add:
23+
_interrupts:
24+
TIM4:
25+
description: TIM4 global interrupt
26+
value: 47
27+
28+
TIM5:
29+
_add:
30+
_interrupts:
31+
TIM5:
32+
description: TIM5 global interrupt
33+
value: 48
34+
35+
# TIM6 and TIM7 interrupts are missing from SVD
36+
TIM6:
37+
_add:
38+
_interrupts:
39+
TIM6:
40+
description: TIM6 global interrupt
41+
value: 49
42+
43+
TIM7:
44+
_add:
45+
_interrupts:
46+
TIM7:
47+
description: TIM7 global interrupt
48+
value: 50
49+
50+
TIM15:
51+
_modify:
52+
CCR2:
53+
addressOffset: 0x38
54+
55+
"TIM[18]":
56+
CCMR1_Output:
57+
_modify:
58+
OC1M_bit3:
59+
name: OC1M_3
60+
OC2M_bit3:
61+
name: OC2M_3
62+
CCMR2_Output:
63+
_modify:
64+
OC3M_bit3:
65+
name: OC3M_3
66+
OC4M_bit3:
67+
name: OC4M_3
68+
CCMR3_Output:
69+
_modify:
70+
OC5M_bit3:
71+
name: OC5M_3
72+
bitWidth: 1
73+
OC6M_bit3:
74+
name: OC6M_3
75+
bitWidth: 1
76+
"TIM[234]":
77+
CCMR1_Output:
78+
_modify:
79+
OC1M_bit3:
80+
name: OC1M_3
81+
OC2M_bit3:
82+
name: OC2M_3
83+
CCMR2_Output:
84+
_modify:
85+
OC3M_bit3:
86+
name: OC3M_3
87+
OC4M_bit3:
88+
name: OC4M_3
89+
90+
TIM15:
91+
CCMR1_Output:
92+
_modify:
93+
OC1M_bit3:
94+
name: OC1M_3

devices/stm32f0x0.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ _include:
5353
- common_patches/tim/tim14_16bit_l.yaml
5454
- common_patches/tim/tim15_16bit_l.yaml
5555
- common_patches/tim/tim16_16bit_l.yaml
56+
- common_patches/tim/common.yaml
57+
- ../peripherals/tim/tim16.yaml
58+
- ../peripherals/tim/tim6.yaml
59+
- common_patches/tim/tim_ccr.yaml
60+
- ../peripherals/tim/v1/ccm.yaml
5661
- ../peripherals/gpio/gpio_v2.yaml
5762
- ../peripherals/gpio/gpio_with_brr.yaml
5863
- ../peripherals/crc/crc_advanced.yaml
@@ -62,8 +67,6 @@ _include:
6267
- ../peripherals/pwr/pwr_v1.yaml
6368
- ../peripherals/iwdg/iwdg_with_WINR.yaml
6469
- ../peripherals/exti/exti.yaml
65-
- ../peripherals/tim/tim16.yaml
66-
- ../peripherals/tim/tim6.yaml
6770
- ../peripherals/rcc/rcc_f0x0.yaml
6871
- common_patches/dma/dma_v1.yaml
6972
- ../peripherals/dma/dma_v1.yaml
@@ -73,10 +76,8 @@ _include:
7376
- ../peripherals/syscfg/syscfg_f0.yaml
7477
- ../peripherals/adc/adc_aditf4_v1_1.yaml
7578
- ../peripherals/spi/spi_v2_without_UDR_CHSIDE.yaml
76-
- common_patches/tim/tim_ccr.yaml
7779
- ../peripherals/usb/usb_with_LPM.yaml
7880
- common_patches/f0_ram_parity_check.yaml
7981
- ../peripherals/flash/flash_f0.yaml
80-
- ../peripherals/tim/tim_ccm_v1.yaml
8182
- ./common_patches/2_nvic_prio_bits.yaml
8283
- ./common_patches/f0_crc_init_addr_fix.yaml

0 commit comments

Comments
 (0)