Skip to content

Commit d68f2d8

Browse files
committed
H7B3: FDCAN CCU fixes
1 parent 22f51a3 commit d68f2d8

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Calibration Configuration Unit (CCU) registers for devices with FDCAN
2+
3+
# This was created to fix CCU registers on h7b3 (total mess in SVD) and is
4+
# based on the SVD for h735 with some minor corrections.
5+
6+
# TODO: Maybe use this on all CCUs now that it exists? It appears to match
7+
# all h7xx and mp1xx devices.
8+
9+
_modify:
10+
CAN_CCU:
11+
description: CAN clock calibration unit
12+
groupName: CAN_CCU
13+
14+
# Delete and re-add all registers for the CCU peripheral
15+
CAN_CCU:
16+
_delete:
17+
_registers:
18+
- ?*
19+
20+
_add:
21+
CREL:
22+
displayName: CREL
23+
description: Clock calibration unit core release register
24+
addressOffset: 0x0
25+
size: 0x20
26+
access: read-only
27+
resetValue: 0x11141218
28+
fields:
29+
DAY:
30+
description: Timestamp day
31+
bitOffset: 0
32+
bitWidth: 8
33+
MON:
34+
description: Timestamp month
35+
bitOffset: 8
36+
bitWidth: 8
37+
YEAR:
38+
description: Timestamp year
39+
bitOffset: 16
40+
bitWidth: 4
41+
SUBSTEP:
42+
description: Sub-step of core release
43+
bitOffset: 20
44+
bitWidth: 4
45+
STEP:
46+
description: Step of core release
47+
bitOffset: 24
48+
bitWidth: 4
49+
REL:
50+
description: Core release
51+
bitOffset: 28
52+
bitWidth: 4
53+
CCFG:
54+
displayName: CCFG
55+
description: Calibration configuration register
56+
addressOffset: 0x04
57+
size: 0x20
58+
access: read-write
59+
resetValue: 0x00000004
60+
fields:
61+
TQBT:
62+
description: Time quanta per bit time
63+
bitOffset: 0
64+
bitWidth: 5
65+
BCC:
66+
description: Bypass clock calibration
67+
bitOffset: 6
68+
bitWidth: 1
69+
CFL:
70+
description: Calibration field length
71+
bitOffset: 7
72+
bitWidth: 1
73+
OCPM:
74+
description: Oscillator clock periods minimum
75+
bitOffset: 8
76+
bitWidth: 8
77+
CDIV:
78+
description: Clock divider
79+
bitOffset: 16
80+
bitWidth: 4
81+
SWR:
82+
description: Software reset
83+
bitOffset: 31
84+
bitWidth: 1
85+
CSTAT:
86+
displayName: CSTAT
87+
description: Calibration status register
88+
addressOffset: 0x08
89+
size: 0x20
90+
access: read-only
91+
resetValue: 0x0203FFFF
92+
fields:
93+
OCPC:
94+
description: Oscillator clock period counter
95+
bitOffset: 0
96+
bitWidth: 18
97+
TQC:
98+
description: Time quanta counter
99+
bitOffset: 18
100+
bitWidth: 11
101+
CALS:
102+
description: Calibration state
103+
bitOffset: 30
104+
bitWidth: 2
105+
CWD:
106+
displayName: CWD
107+
description: Calibration watchdog register
108+
addressOffset: 0x0C
109+
size: 0x20
110+
resetValue: 0x00000000
111+
fields:
112+
WDC:
113+
description: Watchdog configuration
114+
bitOffset: 0
115+
bitWidth: 16
116+
access: read-write
117+
WDV:
118+
description: Watchdog value
119+
bitOffset: 16
120+
bitWidth: 16
121+
access: read-only
122+
IR:
123+
displayName: IR
124+
description: Clock calibration unit interrupt register
125+
addressOffset: 0x10
126+
size: 0x20
127+
access: read-write
128+
resetValue: 0x00000000
129+
fields:
130+
CWE:
131+
description: Calibration watchdog event
132+
bitOffset: 0
133+
bitWidth: 1
134+
CSC:
135+
description: Calibration state changed
136+
bitOffset: 1
137+
bitWidth: 1
138+
IE:
139+
displayName: IE
140+
description: Clock calibration unit interrupt enable register
141+
addressOffset: 0x14
142+
size: 0x20
143+
access: read-write
144+
resetValue: 0x00000000
145+
fields:
146+
CWEE:
147+
description: Calibration watchdog event enable
148+
bitOffset: 0
149+
bitWidth: 1
150+
CSCE:
151+
description: Calibration state changed enable
152+
bitOffset: 1
153+
bitWidth: 1

devices/stm32h7b3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ _include:
8888
- common_patches/h7_common_highmemory.yaml
8989
- ../peripherals/hdmi_cec.yaml
9090
- common_patches/fdcan/fdcan_h7_highmemory.yaml
91+
- common_patches/fdcan/fdcan_ccu.yaml
9192
- collect/fsmc/sdram.yaml
9293
- common_patches/exti/h7_singlecore.yaml
9394
- common_patches/dbgmcu/h7.yaml

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy