1<?xml version="1.0" encoding="utf-8" standalone="no"?>
2<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="svd_schema.xsd">
3  <peripheral>
4    <name>RTC</name>
5    <description>Real Time Clock and Alarm.</description>
6    <baseAddress>0x40006000</baseAddress>
7    <addressBlock>
8      <offset>0x00</offset>
9      <size>0x400</size>
10      <usage>registers</usage>
11    </addressBlock>
12    <interrupt>
13      <name>RTC</name>
14      <description>RTC interrupt.</description>
15      <value>3</value>
16    </interrupt>
17    <registers>
18      <register>
19        <name>SEC</name>
20        <description>RTC Second Counter. This register contains the 32-bit second counter.</description>
21        <addressOffset>0x00</addressOffset>
22        <resetMask>0x00000000</resetMask>
23        <fields>
24          <field>
25            <name>SEC</name>
26            <description>Seconds Counter.</description>
27            <bitOffset>0</bitOffset>
28            <bitWidth>32</bitWidth>
29          </field>
30        </fields>
31      </register>
32      <register>
33        <name>SSEC</name>
34        <description>RTC Sub-second Counter. This counter increments at 256Hz. RTC_SEC is incremented when this register rolls over from 0xFF to 0x00.</description>
35        <addressOffset>0x04</addressOffset>
36        <resetMask>0x00000000</resetMask>
37        <fields>
38          <field>
39            <name>RTSS</name>
40            <description>RTC Sub-second Counter.</description>
41            <bitOffset>0</bitOffset>
42            <bitWidth>8</bitWidth>
43          </field>
44        </fields>
45      </register>
46      <register>
47        <name>RAS</name>
48        <description>Time-of-day Alarm.</description>
49        <addressOffset>0x08</addressOffset>
50        <resetMask>0x00000000</resetMask>
51        <fields>
52          <field>
53            <name>RAS</name>
54            <description>Time-of-day Alarm.</description>
55            <bitOffset>0</bitOffset>
56            <bitWidth>20</bitWidth>
57          </field>
58        </fields>
59      </register>
60      <register>
61        <name>RSSA</name>
62        <description>RTC sub-second alarm.  This register contains the reload value for the sub-second alarm.</description>
63        <addressOffset>0x0C</addressOffset>
64        <resetMask>0x00000000</resetMask>
65        <fields>
66          <field>
67            <name>RSSA</name>
68            <description>This register contains the reload value for the sub-second alarm.</description>
69            <bitOffset>0</bitOffset>
70            <bitWidth>32</bitWidth>
71          </field>
72        </fields>
73      </register>
74      <register>
75        <name>CTRL</name>
76        <description>RTC Control Register.</description>
77        <addressOffset>0x10</addressOffset>
78        <resetValue>0x00000008</resetValue>
79        <resetMask>0xFFFFFF38</resetMask>
80        <fields>
81          <field>
82            <name>RTCE</name>
83            <description>Real Time Clock Enable. This bit enables the Real Time Clock. This bit can only be written when WE=1 and BUSY =0. Change to this bit is effective only after BUSY is cleared from 1 to 0.</description>
84            <bitOffset>0</bitOffset>
85            <bitWidth>1</bitWidth>
86            <enumeratedValues>
87              <enumeratedValue>
88                <name>dis</name>
89                <description>Disable.</description>
90                <value>0</value>
91              </enumeratedValue>
92              <enumeratedValue>
93                <name>en</name>
94                <description>Enable.</description>
95                <value>1</value>
96              </enumeratedValue>
97            </enumeratedValues>
98          </field>
99          <field>
100            <name>ADE</name>
101            <description>Alarm Time-of-Day Interrupt Enable. Change to this bit is effective only after BUSY is cleared from 1 to 0.</description>
102            <bitOffset>1</bitOffset>
103            <bitWidth>1</bitWidth>
104            <enumeratedValues>
105              <enumeratedValue>
106                <name>dis</name>
107                <description>Disable.</description>
108                <value>0</value>
109              </enumeratedValue>
110              <enumeratedValue>
111                <name>en</name>
112                <description>Enable.</description>
113                <value>1</value>
114              </enumeratedValue>
115            </enumeratedValues>
116          </field>
117          <field>
118            <name>ASE</name>
119            <description>Alarm Sub-second Interrupt Enable.  Change to this bit is effective only after BUSY is cleared from 1 to 0.</description>
120            <bitOffset>2</bitOffset>
121            <bitWidth>1</bitWidth>
122            <enumeratedValues>
123              <enumeratedValue>
124                <name>dis</name>
125                <description>Disable.</description>
126                <value>0</value>
127              </enumeratedValue>
128              <enumeratedValue>
129                <name>en</name>
130                <description>Enable.</description>
131                <value>1</value>
132              </enumeratedValue>
133            </enumeratedValues>
134          </field>
135          <field>
136            <name>BUSY</name>
137            <description>RTC Busy. This bit is set to 1 by hardware when changes to RTC registers required a synchronized version of the register to be in place.  This bit is automatically cleared by hardware.</description>
138            <bitOffset>3</bitOffset>
139            <bitWidth>1</bitWidth>
140            <access>read-only</access>
141            <enumeratedValues>
142              <enumeratedValue>
143                <name>idle</name>
144                <description>Idle.</description>
145                <value>0</value>
146              </enumeratedValue>
147              <enumeratedValue>
148                <name>busy</name>
149                <description>Busy.</description>
150                <value>1</value>
151              </enumeratedValue>
152            </enumeratedValues>
153          </field>
154          <field>
155            <name>RDY</name>
156            <description>RTC Ready. This bit is set to 1 by hardware when the RTC count registers update.  It can be cleared to 0 by software at any time. It will also be cleared to 0 by hardware just prior to an update of the RTC count register.</description>
157            <bitOffset>4</bitOffset>
158            <bitWidth>1</bitWidth>
159            <enumeratedValues>
160              <enumeratedValue>
161                <name>busy</name>
162                <description>Register has not updated.</description>
163                <value>0</value>
164              </enumeratedValue>
165              <enumeratedValue>
166                <name>ready</name>
167                <description>Ready.</description>
168                <value>1</value>
169              </enumeratedValue>
170            </enumeratedValues>
171          </field>
172          <field>
173            <name>RDYE</name>
174            <description>RTC Ready Interrupt Enable.</description>
175            <bitOffset>5</bitOffset>
176            <bitWidth>1</bitWidth>
177            <enumeratedValues>
178              <enumeratedValue>
179                <name>dis</name>
180                <description>Disable.</description>
181                <value>0</value>
182              </enumeratedValue>
183              <enumeratedValue>
184                <name>en</name>
185                <description>Enable.</description>
186                <value>1</value>
187              </enumeratedValue>
188            </enumeratedValues>
189          </field>
190          <field>
191            <name>ALDF</name>
192            <description>Time-of-Day Alarm Interrupt Flag.  This alarm is qualified as wake-up source to the processor.</description>
193            <bitOffset>6</bitOffset>
194            <bitWidth>1</bitWidth>
195            <access>read-only</access>
196            <enumeratedValues>
197              <enumeratedValue>
198                <name>inactive</name>
199                <description>Not active</description>
200                <value>0</value>
201              </enumeratedValue>
202              <enumeratedValue>
203                <name>Pending</name>
204                <description>Active</description>
205                <value>1</value>
206              </enumeratedValue>
207            </enumeratedValues>
208          </field>
209          <field>
210            <name>ALSF</name>
211            <description>Sub-second Alarm Interrupt Flag. This alarm is qualified as wake-up source to the processor.</description>
212            <bitOffset>7</bitOffset>
213            <bitWidth>1</bitWidth>
214            <access>read-only</access>
215            <enumeratedValues>
216              <enumeratedValue>
217                <name>inactive</name>
218                <description>Not active</description>
219                <value>0</value>
220              </enumeratedValue>
221              <enumeratedValue>
222                <name>Pending</name>
223                <description>Active</description>
224                <value>1</value>
225              </enumeratedValue>
226            </enumeratedValues>
227          </field>
228          <field>
229            <name>SQE</name>
230            <description>Square Wave Output Enable.</description>
231            <bitOffset>8</bitOffset>
232            <bitWidth>1</bitWidth>
233            <enumeratedValues>
234              <enumeratedValue>
235                <name>inactive</name>
236                <description>Not active</description>
237                <value>0</value>
238              </enumeratedValue>
239              <enumeratedValue>
240                <name>Pending</name>
241                <description>Active</description>
242                <value>1</value>
243              </enumeratedValue>
244            </enumeratedValues>
245          </field>
246          <field>
247            <name>FT</name>
248            <description>Frequency Output Selection. When SQE=1, these bits specify the output frequency on the SQW pin.</description>
249            <bitOffset>9</bitOffset>
250            <bitWidth>2</bitWidth>
251            <enumeratedValues>
252              <enumeratedValue>
253                <name>freq1Hz</name>
254                <description>1 Hz (Compensated).</description>
255                <value>0</value>
256              </enumeratedValue>
257              <enumeratedValue>
258                <name>freq512Hz</name>
259                <description>512 Hz (Compensated).</description>
260                <value>1</value>
261              </enumeratedValue>
262              <enumeratedValue>
263                <name>freq4KHz</name>
264                <description>4 KHz.</description>
265                <value>2</value>
266              </enumeratedValue>
267              <enumeratedValue>
268                <name>clkDiv8</name>
269                <description>RTC Input Clock / 8.</description>
270                <value>3</value>
271              </enumeratedValue>
272            </enumeratedValues>
273          </field>
274          <field>
275            <name>X32KMD</name>
276            <description>32KHz Oscillator Mode.</description>
277            <bitOffset>11</bitOffset>
278            <bitWidth>2</bitWidth>
279            <enumeratedValues>
280              <enumeratedValue>
281                <name>noiseImmuneMode</name>
282                <description>Always operate in Noise Immune Mode.  Oscillator warm-up required.</description>
283                <value>0</value>
284              </enumeratedValue>
285              <enumeratedValue>
286                <name>quietMode</name>
287                <description>Always operate in Quiet Mode.  No oscillator warm-up required.</description>
288                <value>1</value>
289              </enumeratedValue>
290              <enumeratedValue>
291                <name>quietInStopWithWarmup</name>
292                <description>Operate in Noise Immune Mode normally, switch to Quiet Mode on Stop Mode entry.  Will wait for 32K oscillator warm-up before code execution on Stop Mode exit.</description>
293                <value>2</value>
294              </enumeratedValue>
295              <enumeratedValue>
296                <name>quietInStopNoWarmup</name>
297                <description>Operate in Noise Immune Mode normally, switch to Quiet Mode on Stop Mode entry.  Will not wait for 32K oscillator warm-up before code execution on Stop Mode exit.</description>
298                <value>3</value>
299              </enumeratedValue>
300            </enumeratedValues>
301          </field>
302          <field>
303            <name>WE</name>
304            <description>Write Enable. This register bit serves as a protection mechanism against unintentional writes to critical RTC bits.</description>
305            <bitOffset>15</bitOffset>
306            <bitWidth>1</bitWidth>
307            <enumeratedValues>
308              <enumeratedValue>
309                <name>inactive</name>
310                <description>Not active</description>
311                <value>0</value>
312              </enumeratedValue>
313              <enumeratedValue>
314                <name>Pending</name>
315                <description>Active</description>
316                <value>1</value>
317              </enumeratedValue>
318            </enumeratedValues>
319          </field>
320        </fields>
321      </register>
322      <register>
323        <name>TRIM</name>
324        <description>RTC Trim Register.</description>
325        <addressOffset>0x14</addressOffset>
326        <resetMask>0x00000000</resetMask>
327        <fields>
328          <field>
329            <name>TRIM</name>
330            <description>RTC Trim. This register contains the 2's complement value that specifies the trim resolution. Each increment or decrement of the bit adds or subtracts 1ppm at each 4KHz clock value, with a maximum correction of +/- 127ppm.</description>
331            <bitOffset>0</bitOffset>
332            <bitWidth>8</bitWidth>
333          </field>
334          <field>
335            <name>VBATTMR</name>
336            <description>VBAT Timer Value. When RTC is running off of VBAT, this field is incremented every 32 seconds.</description>
337            <bitOffset>8</bitOffset>
338            <bitWidth>24</bitWidth>
339          </field>
340        </fields>
341      </register>
342      <register>
343        <name>OSCCTRL</name>
344        <description>RTC Oscillator Control Register.</description>
345        <addressOffset>0x18</addressOffset>
346        <resetMask>0x00000000</resetMask>
347        <fields>
348          <field>
349            <name>FLITER_EN</name>
350            <description>RTC Oscillator Filter Enable</description>
351            <bitOffset>0</bitOffset>
352            <bitWidth>1</bitWidth>
353          </field>
354          <field>
355            <name>IBIAS_SEL</name>
356            <description>RTC Oscillator 4X Bias Current Select</description>
357            <bitOffset>1</bitOffset>
358            <bitWidth>1</bitWidth>
359            <enumeratedValues>
360              <enumeratedValue>
361                <name>2X</name>
362                <description>Selects 2X bias current for RTC oscillator</description>
363                <value>0</value>
364              </enumeratedValue>
365              <enumeratedValue>
366                <name>4X</name>
367                <description>Selects 4X bias current for RTC oscillator</description>
368                <value>1</value>
369              </enumeratedValue>
370            </enumeratedValues>
371          </field>
372          <field>
373            <name>HYST_EN</name>
374            <description>RTC Oscillator Hysteresis Buffer Enable</description>
375            <bitOffset>2</bitOffset>
376            <bitWidth>1</bitWidth>
377          </field>
378          <field>
379            <name>IBIAS_EN</name>
380            <description>RTC Oscillator Bias Current Enable</description>
381            <bitOffset>3</bitOffset>
382            <bitWidth>1</bitWidth>
383          </field>
384          <field>
385            <name>BYPASS</name>
386            <description>RTC Crystal Bypass</description>
387            <bitOffset>4</bitOffset>
388            <bitWidth>1</bitWidth>
389          </field>
390          <field>
391            <name>OUT32K</name>
392            <description>RTC 32kHz Square Wave Output</description>
393            <bitOffset>5</bitOffset>
394            <bitWidth>1</bitWidth>
395          </field>
396        </fields>
397      </register>
398    </registers>
399  </peripheral>
400  <!-- RTC :Real Time Clock & Alarm -->
401</device>