Skip to content

Commit 3f33db0

Browse files
authored
Merge pull request #1170 from z-av/rtc-c0
RTC refactor + C0
2 parents ddea8ae + 401386a commit 3f33db0

File tree

140 files changed

+236
-241
lines changed

Some content is hidden

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

140 files changed

+236
-241
lines changed

devices/collect/rtc/alarm.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
CR:
22
_array:
3-
ALR[AB]E: {}
4-
ALR[AB]IE: {}
3+
ALR[AB]E:
4+
description: Alarm %s enable
5+
ALR[AB]IE:
6+
description: Alarm %s interrupt enable
57

68
"?~ISR":
79
_array:

devices/fields/rtc/rtc_f1.yaml renamed to devices/fields/rtc/v1/f1.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,21 @@ CRL:
1919
_read:
2020
NotSynchronized: [0, Registers not yet synchronized]
2121
Synchronized: [1, Registers synchronized]
22-
_W0C:
23-
Clear: [0, Clear flag]
2422
OWF:
2523
_read:
2624
NoOverflow: [0, Overflow not detected]
2725
Overflow: [1, 32-bit programmable counter overflow occurred]
28-
_W0C:
29-
Clear: [0, Clear flag]
3026
ALRF:
3127
_read:
3228
NoAlarm: [0, Alarm not detected]
3329
Alarm: [1, Alarm detected]
34-
_W0C:
35-
Clear: [0, Clear flag]
3630
SECF:
3731
_read:
3832
NoPrescalerOverflow: [0, Second flag condition not met]
3933
PrescalerOverflow: [1, Second flag condition met]
34+
"RSF,OWF,ALRF,SECF":
4035
_W0C:
36+
_name: Clear
4137
Clear: [0, Clear flag]
4238
PRLH:
4339
PRLH: [0, 0xF]
@@ -47,11 +43,7 @@ DIVH:
4743
DIVH: [0, 0xF]
4844
DIVL:
4945
DIVL: [0, 0xFFFF]
50-
CNTH:
51-
CNTH: [0, 0xFFFF]
52-
CNTL:
53-
CNTL: [0, 0xFFFF]
54-
ALRH:
55-
ALRH: [0, 0xFFFF]
56-
ALRL:
57-
ALRL: [0, 0xFFFF]
46+
CNT[HL]:
47+
CNT[HL]: [0, 0xFFFF]
48+
ALR[HL]:
49+
ALR[HL]: [0, 0xFFFF]
File renamed without changes.

devices/fields/rtc/rtc_common.yaml renamed to devices/fields/rtc/v2/common.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Real Time Clock
22

3-
_include: v2_basic_wakeup.yaml
3+
_include:
4+
- basic.yaml
5+
- wakeup.yaml
46

57
CR:
68
COSEL:
File renamed without changes.
File renamed without changes.
File renamed without changes.

devices/fields/rtc/v2_basic_wakeup.yaml renamed to devices/fields/rtc/v2/wakeup.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Real Time Clock
22

3-
_include: v2_basic.yaml
4-
53
CR:
64
WUTIE:
75
Disabled: [0, Wakeup timer interrupt disabled]

devices/fields/rtc/v3.yaml renamed to devices/fields/rtc/v3/basic.yaml

Lines changed: 12 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,11 @@ ICSR:
5353
_read:
5454
NoShiftPending: [0, No shift operation is pending]
5555
ShiftPending: [1, A shift operation is pending]
56-
WUTWF:
57-
_read:
58-
UpdateNotAllowed: [0, Wakeup timer configuration update not allowed]
59-
UpdateAllowed: [1, Wakeup timer configuration update allowed]
6056

6157
PRER:
6258
PREDIV_A: [0, 0x7F]
6359
PREDIV_S: [0, 0x7FFF]
6460

65-
WUTR:
66-
WUT: [0, 0xFFFF]
67-
6861
CR:
6962
OUT2EN:
7063
Disabled: [0, RTC output 2 disable]
@@ -75,19 +68,6 @@ CR:
7568
TAMPALRM_PU:
7669
NoPullUp: [0, No pull-up is applied on TAMPALRM output]
7770
PullUp: [1, A pull-up is applied on TAMPALRM output]
78-
TAMPOE:
79-
Disabled: [0, The tamper flag is not routed on TAMPALRM]
80-
Enabled:
81-
[
82-
1,
83-
"The tamper flag is routed on TAMPALRM, combined with the signal provided by OSEL and with the polarity provided by POL",
84-
]
85-
TAMPTS:
86-
Disabled: [0, Tamper detection event does not cause a RTC timestamp to be saved]
87-
Enabled: [1, Save RTC timestamp on tamper detection event]
88-
ITSE:
89-
Disabled: [0, Internal event timestamp disabled]
90-
Enabled: [1, Internal event timestamp enabled]
9171
COE:
9272
Disabled: [0, Calibration output disabled]
9373
Enabled: [1, Calibration output enabled]
@@ -115,27 +95,15 @@ CR:
11595
TSIE:
11696
Disabled: [0, Time-stamp Interrupt disabled]
11797
Enabled: [1, Time-stamp Interrupt enabled]
118-
WUTIE:
119-
Disabled: [0, Wakeup timer interrupt disabled]
120-
Enabled: [1, Wakeup timer interrupt enabled]
121-
ALRBIE:
122-
Disabled: [0, Alarm B Interrupt disabled]
123-
Enabled: [1, Alarm B Interrupt enabled]
124-
ALRAIE:
125-
Disabled: [0, Alarm A interrupt disabled]
126-
Enabled: [1, Alarm A interrupt enabled]
98+
ALR[AB]IE:
99+
Disabled: [0, Alarm Interrupt disabled]
100+
Enabled: [1, Alarm Interrupt enabled]
127101
TSE:
128102
Disabled: [0, Timestamp disabled]
129103
Enabled: [1, Timestamp enabled]
130-
WUTE:
131-
Disabled: [0, Wakeup timer disabled]
132-
Enabled: [1, Wakeup timer enabled]
133-
ALRBE:
134-
Disabled: [0, Alarm B disabled]
135-
Enabled: [1, Alarm B enabled]
136-
ALRAE:
137-
Disabled: [0, Alarm A disabled]
138-
Enabled: [1, Alarm A enabled]
104+
ALR[AB]E:
105+
Disabled: [0, Alarm disabled]
106+
Enabled: [1, Alarm enabled]
139107
FMT:
140108
TwentyFourHour: [0, 24 hour/day format]
141109
AmPm: [1, AM/PM hour format]
@@ -156,13 +124,6 @@ CR:
156124
TSEDGE:
157125
RisingEdge: [0, RTC_TS input rising edge generates a time-stamp event]
158126
FallingEdge: [1, RTC_TS input falling edge generates a time-stamp event]
159-
WUCKSEL:
160-
Div16: [0, RTC/16 clock is selected]
161-
Div8: [1, RTC/8 clock is selected]
162-
Div4: [2, RTC/4 clock is selected]
163-
Div2: [3, RTC/2 clock is selected]
164-
ClockSpare: [4, ck_spre (usually 1 Hz) clock is selected]
165-
ClockSpareWithOffset: [6, "ck_spre (usually 1 Hz) clock is selected and 2^16 is added to the WUT counter value"]
166127

167128
WPR:
168129
KEY:
@@ -196,7 +157,7 @@ TSTR:
196157
AM: [0, AM or 24-hour format]
197158
PM: [1, PM]
198159

199-
ALRM?R:
160+
ALRM[AB]R:
200161
MSK*:
201162
Mask: [0, Alarm set if the date/day match]
202163
NotMask: [1, "Date/day don’t care in Alarm comparison"]
@@ -219,49 +180,29 @@ ALRM?SSR:
219180
SS: [0, 0x7FFF]
220181

221182
SR:
222-
ITSF:
223-
TimestampEvent: [1, This flag is set by hardware when a timestamp on the internal event occurs]
224183
TSOVF:
225184
Overflow: [1, This flag is set by hardware when a time-stamp event occurs while TSF is already set]
226185
TSF:
227186
TimestampEvent: [1, This flag is set by hardware when a time-stamp event occurs]
228-
WUTF:
229-
Zero: [1, This flag is set by hardware when the wakeup auto-reload counter reaches 0]
230-
ALRBF:
187+
ALR[AB]F:
231188
Match:
232189
[
233190
1,
234-
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm B register (RTC_ALRMBR),
235-
]
236-
ALRAF:
237-
Match:
238-
[
239-
1,
240-
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm A register (RTC_ALRMAR),
191+
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm register (RTC_ALRxBR),
241192
]
242193

243194
MISR:
244-
ITSMF:
245-
TimestampEvent: [1, This flag is set by hardware when a timestamp on the internal event occurs]
246195
TSOVMF:
247196
Overflow: [1, This flag is set by hardware when a time-stamp event occurs while TSF is already set]
248197
TSMF:
249198
TimestampEvent: [1, This flag is set by hardware when a time-stamp event occurs]
250-
WUTMF:
251-
Zero: [1, This flag is set by hardware when the wakeup auto-reload counter reaches 0]
252-
ALRBMF:
253-
Match:
254-
[
255-
1,
256-
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm B register (RTC_ALRMBR),
257-
]
258-
ALRAMF:
199+
ALR[AB]MF:
259200
Match:
260201
[
261202
1,
262-
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm A register (RTC_ALRMAR),
203+
This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm register (RTC_ALRMxR),
263204
]
264205

265206
SCR:
266207
"*":
267-
Clear: [1, Clear interrupt flag by writing 1]
208+
Clear: [1, Clear interrupt flag]

devices/fields/rtc/v3/common.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_include:
2+
- basic.yaml
3+
- tamper.yaml
4+
- wakeup.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