Skip to content

Commit e22fc10

Browse files
committed
PR comments, reduce description differences, change AlarmA to Alarm array[1]
1 parent ca288d6 commit e22fc10

File tree

1 file changed

+120
-44
lines changed

1 file changed

+120
-44
lines changed

data/registers/rtc_v3c0.yaml

Lines changed: 120 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,20 @@ block/RTC:
5555
byte_offset: 56
5656
access: Read
5757
fieldset: TSSSR
58-
- name: ALRMAR
59-
description: Alarm A register
58+
- name: ALRMR
59+
description: Alarm register
60+
array:
61+
len: 1
62+
stride: 8
6063
byte_offset: 64
61-
fieldset: ALRMAR
62-
- name: ALRMASSR
63-
description: Alarm A sub second register
64+
fieldset: ALRMR
65+
- name: ALRMSSR
66+
description: Alarm sub second register
67+
array:
68+
len: 1
69+
stride: 8
6470
byte_offset: 68
65-
fieldset: ALRMASSR
71+
fieldset: ALRMSSR
6672
- name: SR
6773
description: Status register
6874
byte_offset: 80
@@ -78,74 +84,80 @@ block/RTC:
7884
byte_offset: 92
7985
access: Write
8086
fieldset: SCR
81-
fieldset/ALRMAR:
82-
description: RTC alarm A register.
87+
fieldset/ALRMR:
88+
description: Alarm register
8389
fields:
8490
- name: SU
85-
description: Second units in BCD format.
91+
description: Second units in BCD format
8692
bit_offset: 0
8793
bit_size: 4
8894
- name: ST
89-
description: Second tens in BCD format.
95+
description: Second tens in BCD format
9096
bit_offset: 4
9197
bit_size: 3
9298
- name: MSK1
93-
description: Alarm A seconds mask.
99+
description: Alarm A seconds mask
94100
bit_offset: 7
95101
bit_size: 1
102+
enum: ALRMR_MSK
96103
- name: MNU
97-
description: Minute units in BCD format.
104+
description: Minute units in BCD format
98105
bit_offset: 8
99106
bit_size: 4
100107
- name: MNT
101-
description: Minute tens in BCD format.
108+
description: Minute tens in BCD format
102109
bit_offset: 12
103110
bit_size: 3
104111
- name: MSK2
105-
description: Alarm A minutes mask.
112+
description: Alarm A minutes mask
106113
bit_offset: 15
107114
bit_size: 1
115+
enum: ALRMR_MSK
108116
- name: HU
109-
description: Hour units in BCD format.
117+
description: Hour units in BCD format
110118
bit_offset: 16
111119
bit_size: 4
112120
- name: HT
113-
description: Hour tens in BCD format.
121+
description: Hour tens in BCD format
114122
bit_offset: 20
115123
bit_size: 2
116124
- name: PM
117-
description: AM/PM notation.
125+
description: AM/PM notation
118126
bit_offset: 22
119127
bit_size: 1
128+
enum: ALRMR_PM
120129
- name: MSK3
121-
description: Alarm A hours mask.
130+
description: Alarm A hours mask
122131
bit_offset: 23
123132
bit_size: 1
133+
enum: ALRMR_MSK
124134
- name: DU
125-
description: Date units or day in BCD format.
135+
description: Date units or day in BCD format
126136
bit_offset: 24
127137
bit_size: 4
128138
- name: DT
129-
description: Date tens in BCD format.
139+
description: Date tens in BCD format
130140
bit_offset: 28
131141
bit_size: 2
132142
- name: WDSEL
133-
description: Week day selection.
143+
description: Week day selection
134144
bit_offset: 30
135145
bit_size: 1
146+
enum: ALRMR_WDSEL
136147
- name: MSK4
137-
description: Alarm A date mask.
148+
description: Alarm A date mask
138149
bit_offset: 31
139150
bit_size: 1
140-
fieldset/ALRMASSR:
151+
enum: ALRMR_MSK
152+
fieldset/ALRMSSR:
141153
description: Alarm sub second register
142154
fields:
143155
- name: SS
144-
description: Sub seconds value This value is compared with the contents of the synchronous prescaler counter to determine if alarm A is to be activated. Only bits 0 up MASKSS-1 are compared.
156+
description: Sub seconds value
145157
bit_offset: 0
146158
bit_size: 15
147159
- name: MASKSS
148-
description: 'Mask the most-significant bits starting at this bit 2: SS[14:2] are don’t care in alarm A comparison. Only SS[1:0] are compared. 3: SS[14:3] are don’t care in alarm A comparison. Only SS[2:0] are compared. ... 12: SS[14:12] are don’t care in alarm A comparison. SS[11:0] are compared. 13: SS[14:13] are don’t care in alarm A comparison. SS[12:0] are compared. 14: SS[14] is don’t care in alarm A comparison. SS[13:0] are compared. 15: All 15 SS bits are compared and must match to activate alarm. The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation. Note: The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation.'
160+
description: Mask the most-significant bits starting at this bit
149161
bit_offset: 24
150162
bit_size: 4
151163
fieldset/CALR:
@@ -191,18 +203,21 @@ fieldset/CR:
191203
bit_offset: 6
192204
bit_size: 1
193205
enum: FMT
194-
- name: ALRAE
195-
description: Alarm A enable
206+
- name: ALRE
207+
description: Alarm enable
196208
bit_offset: 8
197209
bit_size: 1
198210
- name: TSE
199211
description: Timestamp enable
200212
bit_offset: 11
201213
bit_size: 1
202-
- name: ALRAIE
203-
description: Alarm A interrupt enable
214+
- name: ALRIE
215+
description: Alarm interrupt enable
204216
bit_offset: 12
205217
bit_size: 1
218+
array:
219+
len: 1
220+
stride: 1
206221
- name: TSIE
207222
description: Timestamp interrupt enable
208223
bit_offset: 15
@@ -285,10 +300,13 @@ fieldset/DR:
285300
fieldset/ICSR:
286301
description: Initialization control and status register
287302
fields:
288-
- name: ALRAWF
289-
description: Alarm A write flag
303+
- name: ALRWF
304+
description: Alarm write enabled
290305
bit_offset: 0
291306
bit_size: 1
307+
array:
308+
len: 1
309+
stride: 1
292310
- name: SHPF
293311
description: Shift operation pending
294312
bit_offset: 3
@@ -310,23 +328,27 @@ fieldset/ICSR:
310328
bit_offset: 7
311329
bit_size: 1
312330
- name: RECALPF
313-
description: Recalibration pending Flag The RECALPF status flag is automatically set to 1 when software writes to the RTC_CALR register, indicating that the RTC_CALR register is blocked. When the new calibration settings are taken into account, this bit returns to 0. Refer to.
331+
description: Recalibration pending Flag
314332
bit_offset: 16
315333
bit_size: 1
316334
fieldset/MISR:
317-
description: RTC masked interrupt status register.
335+
description: Masked interrupt status register
318336
fields:
319-
- name: ALRAMF
320-
description: Alarm A masked flag This flag is set by hardware when the alarm A interrupt occurs.
337+
- name: ALRMF
338+
description: Alarm masked flag
321339
bit_offset: 0
322340
bit_size: 1
341+
array:
342+
len: 1
343+
stride: 1
344+
enum: ALRMF
323345
- name: TSMF
324-
description: Timestamp masked flag This flag is set by hardware when a timestamp interrupt occurs.
346+
description: Timestamp masked flag
325347
bit_offset: 3
326348
bit_size: 1
327349
enum: TSMF
328350
- name: TSOVMF
329-
description: Timestamp overflow masked flag This flag is set by hardware when a timestamp interrupt occurs while TSMF is already set. It is recommended to check and then clear TSOVF only after clearing the TSF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TSF bit is cleared.
351+
description: Timestamp overflow masked flag
330352
bit_offset: 4
331353
bit_size: 1
332354
enum: TSOVMF
@@ -342,18 +364,23 @@ fieldset/PRER:
342364
bit_offset: 16
343365
bit_size: 7
344366
fieldset/SCR:
345-
description: RTC status clear register.
367+
description: Status clear register
346368
fields:
347-
- name: CALRAF
348-
description: Clear alarm A flag Writing 1 in this bit clears the ALRAF bit in the RTC_SR register.
369+
- name: CALRF
370+
description: Clear alarm A flag
349371
bit_offset: 0
350372
bit_size: 1
373+
array:
374+
len: 1
375+
stride: 1
376+
enum: CALRF
351377
- name: CTSF
352-
description: Clear timestamp flag Writing 1 in this bit clears the TSOVF bit in the RTC_SR register.
378+
description: Clear timestamp flag
353379
bit_offset: 3
354380
bit_size: 1
381+
enum: CALRF
355382
- name: CTSOVF
356-
description: Clear timestamp overflow flag Writing 1 in this bit clears the TSOVF bit in the RTC_SR register. It is recommended to check and then clear TSOVF only after clearing the TSF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TSF bit is cleared.
383+
description: Clear timestamp overflow flag
357384
bit_offset: 4
358385
bit_size: 1
359386
fieldset/SHIFTR:
@@ -370,10 +397,14 @@ fieldset/SHIFTR:
370397
fieldset/SR:
371398
description: Status register
372399
fields:
373-
- name: ALRAF
374-
description: Alarm A flag This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the alarm A register (RTC_ALRMAR).
400+
- name: ALRF
401+
description: Alarm flag
375402
bit_offset: 0
376403
bit_size: 1
404+
array:
405+
len: 1
406+
stride: 1
407+
enum: ALRF
377408
- name: TSF
378409
description: Timestamp flag
379410
bit_offset: 3
@@ -492,6 +523,45 @@ fieldset/WPR:
492523
bit_offset: 0
493524
bit_size: 8
494525
enum: KEY
526+
enum/ALRF:
527+
bit_size: 1
528+
variants:
529+
- name: Match
530+
description: This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm A register (RTC_ALRMAR)
531+
value: 1
532+
enum/ALRMF:
533+
bit_size: 1
534+
variants:
535+
- name: Match
536+
description: This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm A register (RTC_ALRMAR)
537+
value: 1
538+
enum/ALRMR_MSK:
539+
bit_size: 1
540+
variants:
541+
- name: ToMatch
542+
description: Alarm set if the date/day match
543+
value: 0
544+
- name: NotMatch
545+
description: Date/day don’t care in Alarm comparison
546+
value: 1
547+
enum/ALRMR_PM:
548+
bit_size: 1
549+
variants:
550+
- name: AM
551+
description: AM or 24-hour format
552+
value: 0
553+
- name: PM
554+
description: PM
555+
value: 1
556+
enum/ALRMR_WDSEL:
557+
bit_size: 1
558+
variants:
559+
- name: DateUnits
560+
description: DU[3:0] represents the date units
561+
value: 0
562+
- name: WeekDay
563+
description: DU[3:0] represents the week day. DT[1:0] is don’t care.
564+
value: 1
495565
enum/AMPM:
496566
bit_size: 1
497567
variants:
@@ -510,6 +580,12 @@ enum/CALP:
510580
- name: IncreaseFreq
511581
description: One RTCCLK pulse is effectively inserted every 2^11 pulses (frequency increased by 488.5 ppm)
512582
value: 1
583+
enum/CALRF:
584+
bit_size: 1
585+
variants:
586+
- name: Clear
587+
description: Clear interrupt flag by writing 1
588+
value: 1
513589
enum/CALW16:
514590
bit_size: 1
515591
variants:

0 commit comments

Comments
 (0)