YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
MSP432P401R_regs.h
1
2// This file was generated with svd2cpp, source file was MSP432P401R.svd
3// DO NOT EDIT - CHANGES MIGHT BE OVERWRITTEN !!
5//
6#include "bitfield_defs.h"
7
8// vendor: Texas Instruments
9// vendorID: ti.com
10// name: MSP432P401R
11// version: 3.220
12// description: ARM Cortex-M4 MSP432P4xx Device
13//
14// Copyright (C) 2012-2017 Texas Instruments Incorporated - http://www.ti.com/
15//
16// Redistribution and use in source and binary forms, with or without
17// modification, are permitted provided that the following conditions
18// are met:
19// Redistributions of source code must retain the above copyright
20// notice, this list of conditions and the following disclaimer.
21//
22// Redistributions in binary form must reproduce the above copyright
23// notice, this list of conditions and the following disclaimer in the
24// documentation and/or other materials provided with the
25// distribution.
26//
27// Neither the name of Texas Instruments Incorporated nor the names of
28// its contributors may be used to endorse or promote products derived
29// from this software without specific prior written permission.
30//
31// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42//
43//
44// addressUnitBits: 8
45// width: 32
46// size: 32
47// resetValue: 0x00000000
48// resetMask: 0xffffffff
49
50// TLV
51namespace _TLV_ {
52
53 // TLV Checksum
54 // Reset value: 0x00000000
55 typedef uint32_t TLV_CHECKSUM_t;
56
57 // Device Info Tag
58 // Reset value: 0x0000000b
59 typedef uint32_t DEVICE_INFO_TAG_t;
60
61 // Device Info Length
62 // Reset value: 0x00000000
63 typedef uint32_t DEVICE_INFO_LEN_t;
64
65 // Device ID
66 // Reset value: 0x00000000
67 typedef uint32_t DEVICE_ID_t;
68
69 // HW Revision
70 // Reset value: 0x00000000
71 typedef uint32_t HWREV_t;
72
73 // Boot Code Revision
74 // Reset value: 0x00000000
75 typedef uint32_t BCREV_t;
76
77 // ROM Driver Library Revision
78 // Reset value: 0x00000000
79 typedef uint32_t ROM_DRVLIB_REV_t;
80
81 // Die Record Tag
82 // Reset value: 0x0000000c
83 typedef uint32_t DIE_REC_TAG_t;
84
85 // Die Record Length
86 // Reset value: 0x00000000
87 typedef uint32_t DIE_REC_LEN_t;
88
89 // Die X-Position
90 // Reset value: 0x00000000
91 typedef uint32_t DIE_XPOS_t;
92
93 // Die Y-Position
94 // Reset value: 0x00000000
95 typedef uint32_t DIE_YPOS_t;
96
97 // Wafer ID
98 // Reset value: 0x00000000
99 typedef uint32_t WAFER_ID_t;
100
101 // Lot ID
102 // Reset value: 0x00000000
103 typedef uint32_t LOT_ID_t;
104
105 // Reserved
106 // Reset value: 0x00000000
107 typedef uint32_t RESERVED0_t;
108
109 // Reserved
110 // Reset value: 0x00000000
111 typedef uint32_t RESERVED1_t;
112
113 // Reserved
114 // Reset value: 0x00000000
115 typedef uint32_t RESERVED2_t;
116
117 // Test Results
118 // Reset value: 0x00000000
119 typedef uint32_t TEST_RESULTS_t;
120
121 // Clock System Calibration Tag
122 // Reset value: 0x00000003
123 typedef uint32_t CS_CAL_TAG_t;
124
125 // Clock System Calibration Length
126 // Reset value: 0x00000000
127 typedef uint32_t CS_CAL_LEN_t;
128
129 // DCO IR mode: Frequency calibration for DCORSEL 0 to 4
130 // Reset value: 0x00000000
131 typedef uint32_t DCOIR_FCAL_RSEL04_t;
132
133 // DCO IR mode: Frequency calibration for DCORSEL 5
134 // Reset value: 0x00000000
135 typedef uint32_t DCOIR_FCAL_RSEL5_t;
136
137 // Reserved
138 // Reset value: 0x00000000
139 typedef uint32_t RESERVED3_t;
140
141 // Reserved
142 // Reset value: 0x00000000
143 typedef uint32_t RESERVED4_t;
144
145 // Reserved
146 // Reset value: 0x00000000
147 typedef uint32_t RESERVED5_t;
148
149 // Reserved
150 // Reset value: 0x00000000
151 typedef uint32_t RESERVED6_t;
152
153 // DCO IR mode: DCO Constant (K) for DCORSEL 0 to 4
154 // Reset value: 0x00000000
155 typedef uint32_t DCOIR_CONSTK_RSEL04_t;
156
157 // DCO IR mode: DCO Constant (K) for DCORSEL 5
158 // Reset value: 0x00000000
159 typedef uint32_t DCOIR_CONSTK_RSEL5_t;
160
161 // DCO ER mode: Frequency calibration for DCORSEL 0 to 4
162 // Reset value: 0x00000000
163 typedef uint32_t DCOER_FCAL_RSEL04_t;
164
165 // DCO ER mode: Frequency calibration for DCORSEL 5
166 // Reset value: 0x00000000
167 typedef uint32_t DCOER_FCAL_RSEL5_t;
168
169 // Reserved
170 // Reset value: 0x00000000
171 typedef uint32_t RESERVED7_t;
172
173 // Reserved
174 // Reset value: 0x00000000
175 typedef uint32_t RESERVED8_t;
176
177 // Reserved
178 // Reset value: 0x00000000
179 typedef uint32_t RESERVED9_t;
180
181 // Reserved
182 // Reset value: 0x00000000
183 typedef uint32_t RESERVED10_t;
184
185 // DCO ER mode: DCO Constant (K) for DCORSEL 0 to 4
186 // Reset value: 0x00000000
187 typedef uint32_t DCOER_CONSTK_RSEL04_t;
188
189 // DCO ER mode: DCO Constant (K) for DCORSEL 5
190 // Reset value: 0x00000000
191 typedef uint32_t DCOER_CONSTK_RSEL5_t;
192
193 // ADC14 Calibration Tag
194 // Reset value: 0x00000005
195 typedef uint32_t ADC14_CAL_TAG_t;
196
197 // ADC14 Calibration Length
198 // Reset value: 0x00000000
199 typedef uint32_t ADC14_CAL_LEN_t;
200
201 // ADC Gain Factor
202 // Reset value: 0x00000000
203 typedef uint32_t ADC_GAIN_FACTOR_t;
204
205 // ADC Offset
206 // Reset value: 0x00000000
207 typedef uint32_t ADC_OFFSET_t;
208
209 // Reserved
210 // Reset value: 0x00000000
211 typedef uint32_t RESERVED11_t;
212
213 // Reserved
214 // Reset value: 0x00000000
215 typedef uint32_t RESERVED12_t;
216
217 // Reserved
218 // Reset value: 0x00000000
219 typedef uint32_t RESERVED13_t;
220
221 // Reserved
222 // Reset value: 0x00000000
223 typedef uint32_t RESERVED14_t;
224
225 // Reserved
226 // Reset value: 0x00000000
227 typedef uint32_t RESERVED15_t;
228
229 // Reserved
230 // Reset value: 0x00000000
231 typedef uint32_t RESERVED16_t;
232
233 // Reserved
234 // Reset value: 0x00000000
235 typedef uint32_t RESERVED17_t;
236
237 // Reserved
238 // Reset value: 0x00000000
239 typedef uint32_t RESERVED18_t;
240
241 // Reserved
242 // Reset value: 0x00000000
243 typedef uint32_t RESERVED19_t;
244
245 // Reserved
246 // Reset value: 0x00000000
247 typedef uint32_t RESERVED20_t;
248
249 // Reserved
250 // Reset value: 0x00000000
251 typedef uint32_t RESERVED21_t;
252
253 // Reserved
254 // Reset value: 0x00000000
255 typedef uint32_t RESERVED22_t;
256
257 // Reserved
258 // Reset value: 0x00000000
259 typedef uint32_t RESERVED23_t;
260
261 // Reserved
262 // Reset value: 0x00000000
263 typedef uint32_t RESERVED24_t;
264
265 // Reserved
266 // Reset value: 0x00000000
267 typedef uint32_t RESERVED25_t;
268
269 // Reserved
270 // Reset value: 0x00000000
271 typedef uint32_t RESERVED26_t;
272
273 // ADC14 1.2V Reference Temp. Sensor 30C
274 // Reset value: 0x00000000
275 typedef uint32_t ADC14_REF1P2V_TS30C_t;
276
277 // ADC14 1.2V Reference Temp. Sensor 85C
278 // Reset value: 0x00000000
279 typedef uint32_t ADC14_REF1P2V_TS85C_t;
280
281 // ADC14 1.45V Reference Temp. Sensor 30C
282 // Reset value: 0x00000000
283 typedef uint32_t ADC14_REF1P45V_TS30C_t;
284
285 // ADC14 1.45V Reference Temp. Sensor 85C
286 // Reset value: 0x00000000
287 typedef uint32_t ADC14_REF1P45V_TS85C_t;
288
289 // ADC14 2.5V Reference Temp. Sensor 30C
290 // Reset value: 0x00000000
291 typedef uint32_t ADC14_REF2P5V_TS30C_t;
292
293 // ADC14 2.5V Reference Temp. Sensor 85C
294 // Reset value: 0x00000000
295 typedef uint32_t ADC14_REF2P5V_TS85C_t;
296
297 // REF Calibration Tag
298 // Reset value: 0x00000008
299 typedef uint32_t REF_CAL_TAG_t;
300
301 // REF Calibration Length
302 // Reset value: 0x00000000
303 typedef uint32_t REF_CAL_LEN_t;
304
305 // REF 1.2V Reference
306 // Reset value: 0x00000000
307 typedef uint32_t REF_1P2V_t;
308
309 // REF 1.45V Reference
310 // Reset value: 0x00000000
311 typedef uint32_t REF_1P45V_t;
312
313 // REF 2.5V Reference
314 // Reset value: 0x00000000
315 typedef uint32_t REF_2P5V_t;
316
317 // Flash Info Tag
318 // Reset value: 0x00000004
319 typedef uint32_t FLASH_INFO_TAG_t;
320
321 // Flash Info Length
322 // Reset value: 0x00000000
323 typedef uint32_t FLASH_INFO_LEN_t;
324
325 // Flash Maximum Programming Pulses
326 // Reset value: 0x00000000
327 typedef uint32_t FLASH_MAX_PROG_PULSES_t;
328
329 // Flash Maximum Erase Pulses
330 // Reset value: 0x00000000
331 typedef uint32_t FLASH_MAX_ERASE_PULSES_t;
332
333 // 128-bit Random Number Tag
334 // Reset value: 0x0000000d
335 typedef uint32_t RANDOM_NUM_TAG_t;
336
337 // 128-bit Random Number Length
338 // Reset value: 0x00000000
339 typedef uint32_t RANDOM_NUM_LEN_t;
340
341 // 32-bit Random Number 1
342 // Reset value: 0x00000000
343 typedef uint32_t RANDOM_NUM_1_t;
344
345 // 32-bit Random Number 2
346 // Reset value: 0x00000000
347 typedef uint32_t RANDOM_NUM_2_t;
348
349 // 32-bit Random Number 3
350 // Reset value: 0x00000000
351 typedef uint32_t RANDOM_NUM_3_t;
352
353 // 32-bit Random Number 4
354 // Reset value: 0x00000000
355 typedef uint32_t RANDOM_NUM_4_t;
356
357 // BSL Configuration Tag
358 // Reset value: 0x0000000f
359 typedef uint32_t BSL_CFG_TAG_t;
360
361 // BSL Configuration Length
362 // Reset value: 0x00000000
363 typedef uint32_t BSL_CFG_LEN_t;
364
365 // BSL Peripheral Interface Selection
366 // Reset value: 0x00000000
367 typedef uint32_t BSL_PERIPHIF_SEL_t;
368
369 // BSL Port Interface Configuration for UART
370 // Reset value: 0x00000000
371 typedef uint32_t BSL_PORTIF_CFG_UART_t;
372
373 // BSL Port Interface Configuration for SPI
374 // Reset value: 0x00000000
375 typedef uint32_t BSL_PORTIF_CFG_SPI_t;
376
377 // BSL Port Interface Configuration for I2C
378 // Reset value: 0x00000000
379 typedef uint32_t BSL_PORTIF_CFG_I2C_t;
380
381 // TLV End Word
382 // Reset value: 0x0bd0e11d
383 typedef uint32_t TLV_END_t;
384
385 struct TLV_t {
386 TLV_CHECKSUM_t TLV_CHECKSUM;
387 DEVICE_INFO_TAG_t DEVICE_INFO_TAG;
388 DEVICE_INFO_LEN_t DEVICE_INFO_LEN;
389 DEVICE_ID_t DEVICE_ID;
390 HWREV_t HWREV;
391 BCREV_t BCREV;
392 ROM_DRVLIB_REV_t ROM_DRVLIB_REV;
393 DIE_REC_TAG_t DIE_REC_TAG;
394 DIE_REC_LEN_t DIE_REC_LEN;
395 DIE_XPOS_t DIE_XPOS;
396 DIE_YPOS_t DIE_YPOS;
397 WAFER_ID_t WAFER_ID;
398 LOT_ID_t LOT_ID;
399 RESERVED0_t RESERVED0;
400 RESERVED1_t RESERVED1;
401 RESERVED2_t RESERVED2;
402 TEST_RESULTS_t TEST_RESULTS;
403 CS_CAL_TAG_t CS_CAL_TAG;
404 CS_CAL_LEN_t CS_CAL_LEN;
405 DCOIR_FCAL_RSEL04_t DCOIR_FCAL_RSEL04;
406 DCOIR_FCAL_RSEL5_t DCOIR_FCAL_RSEL5;
407 RESERVED3_t RESERVED3;
408 RESERVED4_t RESERVED4;
409 RESERVED5_t RESERVED5;
410 RESERVED6_t RESERVED6;
411 DCOIR_CONSTK_RSEL04_t DCOIR_CONSTK_RSEL04;
412 DCOIR_CONSTK_RSEL5_t DCOIR_CONSTK_RSEL5;
413 DCOER_FCAL_RSEL04_t DCOER_FCAL_RSEL04;
414 DCOER_FCAL_RSEL5_t DCOER_FCAL_RSEL5;
415 RESERVED7_t RESERVED7;
416 RESERVED8_t RESERVED8;
417 RESERVED9_t RESERVED9;
418 RESERVED10_t RESERVED10;
419 DCOER_CONSTK_RSEL04_t DCOER_CONSTK_RSEL04;
420 DCOER_CONSTK_RSEL5_t DCOER_CONSTK_RSEL5;
421 ADC14_CAL_TAG_t ADC14_CAL_TAG;
422 ADC14_CAL_LEN_t ADC14_CAL_LEN;
423 ADC_GAIN_FACTOR_t ADC_GAIN_FACTOR;
424 ADC_OFFSET_t ADC_OFFSET;
425 RESERVED11_t RESERVED11;
426 RESERVED12_t RESERVED12;
427 RESERVED13_t RESERVED13;
428 RESERVED14_t RESERVED14;
429 RESERVED15_t RESERVED15;
430 RESERVED16_t RESERVED16;
431 RESERVED17_t RESERVED17;
432 RESERVED18_t RESERVED18;
433 RESERVED19_t RESERVED19;
434 RESERVED20_t RESERVED20;
435 RESERVED21_t RESERVED21;
436 RESERVED22_t RESERVED22;
437 RESERVED23_t RESERVED23;
438 RESERVED24_t RESERVED24;
439 RESERVED25_t RESERVED25;
440 RESERVED26_t RESERVED26;
441 ADC14_REF1P2V_TS30C_t ADC14_REF1P2V_TS30C;
442 ADC14_REF1P2V_TS85C_t ADC14_REF1P2V_TS85C;
443 ADC14_REF1P45V_TS30C_t ADC14_REF1P45V_TS30C;
444 ADC14_REF1P45V_TS85C_t ADC14_REF1P45V_TS85C;
445 ADC14_REF2P5V_TS30C_t ADC14_REF2P5V_TS30C;
446 ADC14_REF2P5V_TS85C_t ADC14_REF2P5V_TS85C;
447 REF_CAL_TAG_t REF_CAL_TAG;
448 REF_CAL_LEN_t REF_CAL_LEN;
449 REF_1P2V_t REF_1P2V;
450 REF_1P45V_t REF_1P45V;
451 REF_2P5V_t REF_2P5V;
452 FLASH_INFO_TAG_t FLASH_INFO_TAG;
453 FLASH_INFO_LEN_t FLASH_INFO_LEN;
454 FLASH_MAX_PROG_PULSES_t FLASH_MAX_PROG_PULSES;
455 FLASH_MAX_ERASE_PULSES_t FLASH_MAX_ERASE_PULSES;
456 RANDOM_NUM_TAG_t RANDOM_NUM_TAG;
457 RANDOM_NUM_LEN_t RANDOM_NUM_LEN;
458 RANDOM_NUM_1_t RANDOM_NUM_1;
459 RANDOM_NUM_2_t RANDOM_NUM_2;
460 RANDOM_NUM_3_t RANDOM_NUM_3;
461 RANDOM_NUM_4_t RANDOM_NUM_4;
462 BSL_CFG_TAG_t BSL_CFG_TAG;
463 BSL_CFG_LEN_t BSL_CFG_LEN;
464 BSL_PERIPHIF_SEL_t BSL_PERIPHIF_SEL;
465 BSL_PORTIF_CFG_UART_t BSL_PORTIF_CFG_UART;
466 BSL_PORTIF_CFG_SPI_t BSL_PORTIF_CFG_SPI;
467 BSL_PORTIF_CFG_I2C_t BSL_PORTIF_CFG_I2C;
468 TLV_END_t TLV_END;
469 };
470
471 static TLV_t & TLV = (*(TLV_t *)0x201000);
472
473} // _TLV_
474
475// TIMER_A0
476namespace _TIMER_A0_ {
477
478 // TimerAx Control Register
479 // Reset value: 0x00000000
480 BEGIN_TYPE(TAxCTL_t, uint16_t)
481 // TimerA interrupt flag
482 ADD_BITFIELD_RW(TAIFG, 0, 1)
483 // TimerA interrupt enable
484 ADD_BITFIELD_RW(TAIE, 1, 1)
485 // TimerA clear
486 ADD_BITFIELD_RW(TACLR, 2, 1)
487 // Mode control
488 ADD_BITFIELD_RW(MC, 4, 2)
489 // Input divider
490 ADD_BITFIELD_RW(ID, 6, 2)
491 // TimerA clock source select
492 ADD_BITFIELD_RW(TASSEL, 8, 2)
493 END_TYPE()
494
495 // No interrupt pending
496 static const uint32_t TAxCTL_TAIFG__TAIFG_0 = 0;
497 // Interrupt pending
498 static const uint32_t TAxCTL_TAIFG__TAIFG_1 = 1;
499 // Interrupt disabled
500 static const uint32_t TAxCTL_TAIE__TAIE_0 = 0;
501 // Interrupt enabled
502 static const uint32_t TAxCTL_TAIE__TAIE_1 = 1;
503 // Stop mode: Timer is halted
504 static const uint32_t TAxCTL_MC__MC_0 = 0;
505 // Up mode: Timer counts up to TAxCCR0
506 static const uint32_t TAxCTL_MC__MC_1 = 1;
507 // Continuous mode: Timer counts up to 0FFFFh
508 static const uint32_t TAxCTL_MC__MC_2 = 2;
509 // Up/down mode: Timer counts up to TAxCCR0 then down to 0000h
510 static const uint32_t TAxCTL_MC__MC_3 = 3;
511 // /1
512 static const uint32_t TAxCTL_ID__ID_0 = 0;
513 // /2
514 static const uint32_t TAxCTL_ID__ID_1 = 1;
515 // /4
516 static const uint32_t TAxCTL_ID__ID_2 = 2;
517 // /8
518 static const uint32_t TAxCTL_ID__ID_3 = 3;
519 // TAxCLK
520 static const uint32_t TAxCTL_TASSEL__TASSEL_0 = 0;
521 // ACLK
522 static const uint32_t TAxCTL_TASSEL__TASSEL_1 = 1;
523 // SMCLK
524 static const uint32_t TAxCTL_TASSEL__TASSEL_2 = 2;
525 // INCLK
526 static const uint32_t TAxCTL_TASSEL__TASSEL_3 = 3;
527
528 // Timer_A Capture/Compare Control Register
529 // Reset value: 0x00000000
530 BEGIN_TYPE(TAxCCTL_t, uint16_t)
531 // Capture/compare interrupt flag
532 ADD_BITFIELD_RW(CCIFG, 0, 1)
533 // Capture overflow
534 ADD_BITFIELD_RW(COV, 1, 1)
535 // Output
536 ADD_BITFIELD_RW(OUT, 2, 1)
537 // Capture/compare input
538 ADD_BITFIELD_RO(CCI, 3, 1)
539 // Capture/compare interrupt enable
540 ADD_BITFIELD_RW(CCIE, 4, 1)
541 // Output mode
542 ADD_BITFIELD_RW(OUTMOD, 5, 3)
543 // Capture mode
544 ADD_BITFIELD_RW(CAP, 8, 1)
545 // Synchronized capture/compare input
546 ADD_BITFIELD_RW(SCCI, 10, 1)
547 // Synchronize capture source
548 ADD_BITFIELD_RW(SCS, 11, 1)
549 // Capture/compare input select
550 ADD_BITFIELD_RW(CCIS, 12, 2)
551 // Capture mode
552 ADD_BITFIELD_RW(CM, 14, 2)
553 END_TYPE()
554
555 // No interrupt pending
556 static const uint32_t TAxCCTL_CCIFG__CCIFG_0 = 0;
557 // Interrupt pending
558 static const uint32_t TAxCCTL_CCIFG__CCIFG_1 = 1;
559 // No capture overflow occurred
560 static const uint32_t TAxCCTL_COV__COV_0 = 0;
561 // Capture overflow occurred
562 static const uint32_t TAxCCTL_COV__COV_1 = 1;
563 // Output low
564 static const uint32_t TAxCCTL_OUT__OUT_0 = 0;
565 // Output high
566 static const uint32_t TAxCCTL_OUT__OUT_1 = 1;
567 // Interrupt disabled
568 static const uint32_t TAxCCTL_CCIE__CCIE_0 = 0;
569 // Interrupt enabled
570 static const uint32_t TAxCCTL_CCIE__CCIE_1 = 1;
571 // OUT bit value
572 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_0 = 0;
573 // Set
574 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_1 = 1;
575 // Toggle/reset
576 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_2 = 2;
577 // Set/reset
578 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_3 = 3;
579 // Toggle
580 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_4 = 4;
581 // Reset
582 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_5 = 5;
583 // Toggle/set
584 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_6 = 6;
585 // Reset/set
586 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_7 = 7;
587 // Compare mode
588 static const uint32_t TAxCCTL_CAP__CAP_0 = 0;
589 // Capture mode
590 static const uint32_t TAxCCTL_CAP__CAP_1 = 1;
591 // Asynchronous capture
592 static const uint32_t TAxCCTL_SCS__SCS_0 = 0;
593 // Synchronous capture
594 static const uint32_t TAxCCTL_SCS__SCS_1 = 1;
595 // CCIxA
596 static const uint32_t TAxCCTL_CCIS__CCIS_0 = 0;
597 // CCIxB
598 static const uint32_t TAxCCTL_CCIS__CCIS_1 = 1;
599 // GND
600 static const uint32_t TAxCCTL_CCIS__CCIS_2 = 2;
601 // VCC
602 static const uint32_t TAxCCTL_CCIS__CCIS_3 = 3;
603 // No capture
604 static const uint32_t TAxCCTL_CM__CM_0 = 0;
605 // Capture on rising edge
606 static const uint32_t TAxCCTL_CM__CM_1 = 1;
607 // Capture on falling edge
608 static const uint32_t TAxCCTL_CM__CM_2 = 2;
609 // Capture on both rising and falling edges
610 static const uint32_t TAxCCTL_CM__CM_3 = 3;
611
612 // TimerA register
613 // Reset value: 0x00000000
614 typedef uint16_t TAxR_t;
615
616 // Timer_A Capture/Compare Register
617 // Reset value: 0x00000000
618 BEGIN_TYPE(TAxCCR_t, uint16_t)
619 // TimerA register
620 ADD_BITFIELD_RW(TAxR, 0, 16)
621 END_TYPE()
622
623 // TimerAx Expansion 0 Register
624 // Reset value: 0x00000000
625 BEGIN_TYPE(TAxEX0_t, uint16_t)
626 // Input divider expansion
627 ADD_BITFIELD_RW(TAIDEX, 0, 3)
628 END_TYPE()
629
630 // Divide by 1
631 static const uint32_t TAxEX0_TAIDEX__TAIDEX_0 = 0;
632 // Divide by 2
633 static const uint32_t TAxEX0_TAIDEX__TAIDEX_1 = 1;
634 // Divide by 3
635 static const uint32_t TAxEX0_TAIDEX__TAIDEX_2 = 2;
636 // Divide by 4
637 static const uint32_t TAxEX0_TAIDEX__TAIDEX_3 = 3;
638 // Divide by 5
639 static const uint32_t TAxEX0_TAIDEX__TAIDEX_4 = 4;
640 // Divide by 6
641 static const uint32_t TAxEX0_TAIDEX__TAIDEX_5 = 5;
642 // Divide by 7
643 static const uint32_t TAxEX0_TAIDEX__TAIDEX_6 = 6;
644 // Divide by 8
645 static const uint32_t TAxEX0_TAIDEX__TAIDEX_7 = 7;
646
647 // TimerAx Interrupt Vector Register
648 // Reset value: 0x00000000
649 BEGIN_TYPE(TAxIV_t, uint16_t)
650 // TimerA interrupt vector value
651 ADD_BITFIELD_RO(TAIV, 0, 16)
652 END_TYPE()
653
654 // No interrupt pending
655 static const uint32_t TAxIV_TAIV__TAIV_0 = 0;
656 // Interrupt Source: Capture/compare 1; Interrupt Flag: TAxCCR1 CCIFG; Interrupt Priority: Highest
657 static const uint32_t TAxIV_TAIV__TAIV_2 = 2;
658 // Interrupt Source: Capture/compare 2; Interrupt Flag: TAxCCR2 CCIFG
659 static const uint32_t TAxIV_TAIV__TAIV_4 = 4;
660 // Interrupt Source: Capture/compare 3; Interrupt Flag: TAxCCR3 CCIFG
661 static const uint32_t TAxIV_TAIV__TAIV_6 = 6;
662 // Interrupt Source: Capture/compare 4; Interrupt Flag: TAxCCR4 CCIFG
663 static const uint32_t TAxIV_TAIV__TAIV_8 = 8;
664 // Interrupt Source: Capture/compare 5; Interrupt Flag: TAxCCR5 CCIFG
665 static const uint32_t TAxIV_TAIV__TAIV_10 = 10;
666 // Interrupt Source: Capture/compare 6; Interrupt Flag: TAxCCR6 CCIFG
667 static const uint32_t TAxIV_TAIV__TAIV_12 = 12;
668 // Interrupt Source: Timer overflow; Interrupt Flag: TAxCTL TAIFG; Interrupt Priority: Lowest
669 static const uint32_t TAxIV_TAIV__TAIV_14 = 14;
670
671 struct TIMER_A0_t {
672 TAxCTL_t TAxCTL;
673 TAxCCTL_t TAxCCTL0;
674 TAxCCTL_t TAxCCTL1;
675 TAxCCTL_t TAxCCTL2;
676 TAxCCTL_t TAxCCTL3;
677 TAxCCTL_t TAxCCTL4;
678 uint16_t reserved0[2];
679 TAxR_t TAxR;
680 TAxCCR_t TAxCCR0;
681 TAxCCR_t TAxCCR1;
682 TAxCCR_t TAxCCR2;
683 TAxCCR_t TAxCCR3;
684 TAxCCR_t TAxCCR4;
685 uint16_t reserved1[2];
686 TAxEX0_t TAxEX0;
687 uint16_t reserved2[6];
688 TAxIV_t TAxIV;
689 };
690
691 static TIMER_A0_t & TIMER_A0 = (*(TIMER_A0_t *)0x40000000);
692
693} // _TIMER_A0_
694
695// TIMER_A1
696namespace _TIMER_A1_ {
697
698 // TimerAx Control Register
699 // Reset value: 0x00000000
700 BEGIN_TYPE(TAxCTL_t, uint16_t)
701 // TimerA interrupt flag
702 ADD_BITFIELD_RW(TAIFG, 0, 1)
703 // TimerA interrupt enable
704 ADD_BITFIELD_RW(TAIE, 1, 1)
705 // TimerA clear
706 ADD_BITFIELD_RW(TACLR, 2, 1)
707 // Mode control
708 ADD_BITFIELD_RW(MC, 4, 2)
709 // Input divider
710 ADD_BITFIELD_RW(ID, 6, 2)
711 // TimerA clock source select
712 ADD_BITFIELD_RW(TASSEL, 8, 2)
713 END_TYPE()
714
715 // No interrupt pending
716 static const uint32_t TAxCTL_TAIFG__TAIFG_0 = 0;
717 // Interrupt pending
718 static const uint32_t TAxCTL_TAIFG__TAIFG_1 = 1;
719 // Interrupt disabled
720 static const uint32_t TAxCTL_TAIE__TAIE_0 = 0;
721 // Interrupt enabled
722 static const uint32_t TAxCTL_TAIE__TAIE_1 = 1;
723 // Stop mode: Timer is halted
724 static const uint32_t TAxCTL_MC__MC_0 = 0;
725 // Up mode: Timer counts up to TAxCCR0
726 static const uint32_t TAxCTL_MC__MC_1 = 1;
727 // Continuous mode: Timer counts up to 0FFFFh
728 static const uint32_t TAxCTL_MC__MC_2 = 2;
729 // Up/down mode: Timer counts up to TAxCCR0 then down to 0000h
730 static const uint32_t TAxCTL_MC__MC_3 = 3;
731 // /1
732 static const uint32_t TAxCTL_ID__ID_0 = 0;
733 // /2
734 static const uint32_t TAxCTL_ID__ID_1 = 1;
735 // /4
736 static const uint32_t TAxCTL_ID__ID_2 = 2;
737 // /8
738 static const uint32_t TAxCTL_ID__ID_3 = 3;
739 // TAxCLK
740 static const uint32_t TAxCTL_TASSEL__TASSEL_0 = 0;
741 // ACLK
742 static const uint32_t TAxCTL_TASSEL__TASSEL_1 = 1;
743 // SMCLK
744 static const uint32_t TAxCTL_TASSEL__TASSEL_2 = 2;
745 // INCLK
746 static const uint32_t TAxCTL_TASSEL__TASSEL_3 = 3;
747
748 // Timer_A Capture/Compare Control Register
749 // Reset value: 0x00000000
750 BEGIN_TYPE(TAxCCTL_t, uint16_t)
751 // Capture/compare interrupt flag
752 ADD_BITFIELD_RW(CCIFG, 0, 1)
753 // Capture overflow
754 ADD_BITFIELD_RW(COV, 1, 1)
755 // Output
756 ADD_BITFIELD_RW(OUT, 2, 1)
757 // Capture/compare input
758 ADD_BITFIELD_RO(CCI, 3, 1)
759 // Capture/compare interrupt enable
760 ADD_BITFIELD_RW(CCIE, 4, 1)
761 // Output mode
762 ADD_BITFIELD_RW(OUTMOD, 5, 3)
763 // Capture mode
764 ADD_BITFIELD_RW(CAP, 8, 1)
765 // Synchronized capture/compare input
766 ADD_BITFIELD_RW(SCCI, 10, 1)
767 // Synchronize capture source
768 ADD_BITFIELD_RW(SCS, 11, 1)
769 // Capture/compare input select
770 ADD_BITFIELD_RW(CCIS, 12, 2)
771 // Capture mode
772 ADD_BITFIELD_RW(CM, 14, 2)
773 END_TYPE()
774
775 // No interrupt pending
776 static const uint32_t TAxCCTL_CCIFG__CCIFG_0 = 0;
777 // Interrupt pending
778 static const uint32_t TAxCCTL_CCIFG__CCIFG_1 = 1;
779 // No capture overflow occurred
780 static const uint32_t TAxCCTL_COV__COV_0 = 0;
781 // Capture overflow occurred
782 static const uint32_t TAxCCTL_COV__COV_1 = 1;
783 // Output low
784 static const uint32_t TAxCCTL_OUT__OUT_0 = 0;
785 // Output high
786 static const uint32_t TAxCCTL_OUT__OUT_1 = 1;
787 // Interrupt disabled
788 static const uint32_t TAxCCTL_CCIE__CCIE_0 = 0;
789 // Interrupt enabled
790 static const uint32_t TAxCCTL_CCIE__CCIE_1 = 1;
791 // OUT bit value
792 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_0 = 0;
793 // Set
794 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_1 = 1;
795 // Toggle/reset
796 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_2 = 2;
797 // Set/reset
798 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_3 = 3;
799 // Toggle
800 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_4 = 4;
801 // Reset
802 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_5 = 5;
803 // Toggle/set
804 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_6 = 6;
805 // Reset/set
806 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_7 = 7;
807 // Compare mode
808 static const uint32_t TAxCCTL_CAP__CAP_0 = 0;
809 // Capture mode
810 static const uint32_t TAxCCTL_CAP__CAP_1 = 1;
811 // Asynchronous capture
812 static const uint32_t TAxCCTL_SCS__SCS_0 = 0;
813 // Synchronous capture
814 static const uint32_t TAxCCTL_SCS__SCS_1 = 1;
815 // CCIxA
816 static const uint32_t TAxCCTL_CCIS__CCIS_0 = 0;
817 // CCIxB
818 static const uint32_t TAxCCTL_CCIS__CCIS_1 = 1;
819 // GND
820 static const uint32_t TAxCCTL_CCIS__CCIS_2 = 2;
821 // VCC
822 static const uint32_t TAxCCTL_CCIS__CCIS_3 = 3;
823 // No capture
824 static const uint32_t TAxCCTL_CM__CM_0 = 0;
825 // Capture on rising edge
826 static const uint32_t TAxCCTL_CM__CM_1 = 1;
827 // Capture on falling edge
828 static const uint32_t TAxCCTL_CM__CM_2 = 2;
829 // Capture on both rising and falling edges
830 static const uint32_t TAxCCTL_CM__CM_3 = 3;
831
832 // TimerA register
833 // Reset value: 0x00000000
834 typedef uint16_t TAxR_t;
835
836 // Timer_A Capture/Compare Register
837 // Reset value: 0x00000000
838 BEGIN_TYPE(TAxCCR_t, uint16_t)
839 // TimerA register
840 ADD_BITFIELD_RW(TAxR, 0, 16)
841 END_TYPE()
842
843 // TimerAx Expansion 0 Register
844 // Reset value: 0x00000000
845 BEGIN_TYPE(TAxEX0_t, uint16_t)
846 // Input divider expansion
847 ADD_BITFIELD_RW(TAIDEX, 0, 3)
848 END_TYPE()
849
850 // Divide by 1
851 static const uint32_t TAxEX0_TAIDEX__TAIDEX_0 = 0;
852 // Divide by 2
853 static const uint32_t TAxEX0_TAIDEX__TAIDEX_1 = 1;
854 // Divide by 3
855 static const uint32_t TAxEX0_TAIDEX__TAIDEX_2 = 2;
856 // Divide by 4
857 static const uint32_t TAxEX0_TAIDEX__TAIDEX_3 = 3;
858 // Divide by 5
859 static const uint32_t TAxEX0_TAIDEX__TAIDEX_4 = 4;
860 // Divide by 6
861 static const uint32_t TAxEX0_TAIDEX__TAIDEX_5 = 5;
862 // Divide by 7
863 static const uint32_t TAxEX0_TAIDEX__TAIDEX_6 = 6;
864 // Divide by 8
865 static const uint32_t TAxEX0_TAIDEX__TAIDEX_7 = 7;
866
867 // TimerAx Interrupt Vector Register
868 // Reset value: 0x00000000
869 BEGIN_TYPE(TAxIV_t, uint16_t)
870 // TimerA interrupt vector value
871 ADD_BITFIELD_RO(TAIV, 0, 16)
872 END_TYPE()
873
874 // No interrupt pending
875 static const uint32_t TAxIV_TAIV__TAIV_0 = 0;
876 // Interrupt Source: Capture/compare 1; Interrupt Flag: TAxCCR1 CCIFG; Interrupt Priority: Highest
877 static const uint32_t TAxIV_TAIV__TAIV_2 = 2;
878 // Interrupt Source: Capture/compare 2; Interrupt Flag: TAxCCR2 CCIFG
879 static const uint32_t TAxIV_TAIV__TAIV_4 = 4;
880 // Interrupt Source: Capture/compare 3; Interrupt Flag: TAxCCR3 CCIFG
881 static const uint32_t TAxIV_TAIV__TAIV_6 = 6;
882 // Interrupt Source: Capture/compare 4; Interrupt Flag: TAxCCR4 CCIFG
883 static const uint32_t TAxIV_TAIV__TAIV_8 = 8;
884 // Interrupt Source: Capture/compare 5; Interrupt Flag: TAxCCR5 CCIFG
885 static const uint32_t TAxIV_TAIV__TAIV_10 = 10;
886 // Interrupt Source: Capture/compare 6; Interrupt Flag: TAxCCR6 CCIFG
887 static const uint32_t TAxIV_TAIV__TAIV_12 = 12;
888 // Interrupt Source: Timer overflow; Interrupt Flag: TAxCTL TAIFG; Interrupt Priority: Lowest
889 static const uint32_t TAxIV_TAIV__TAIV_14 = 14;
890
891 struct TIMER_A1_t {
892 TAxCTL_t TAxCTL;
893 TAxCCTL_t TAxCCTL0;
894 TAxCCTL_t TAxCCTL1;
895 TAxCCTL_t TAxCCTL2;
896 TAxCCTL_t TAxCCTL3;
897 TAxCCTL_t TAxCCTL4;
898 uint16_t reserved0[2];
899 TAxR_t TAxR;
900 TAxCCR_t TAxCCR0;
901 TAxCCR_t TAxCCR1;
902 TAxCCR_t TAxCCR2;
903 TAxCCR_t TAxCCR3;
904 TAxCCR_t TAxCCR4;
905 uint16_t reserved1[2];
906 TAxEX0_t TAxEX0;
907 uint16_t reserved2[6];
908 TAxIV_t TAxIV;
909 };
910
911 static TIMER_A1_t & TIMER_A1 = (*(TIMER_A1_t *)0x40000400);
912
913} // _TIMER_A1_
914
915// TIMER_A2
916namespace _TIMER_A2_ {
917
918 // TimerAx Control Register
919 // Reset value: 0x00000000
920 BEGIN_TYPE(TAxCTL_t, uint16_t)
921 // TimerA interrupt flag
922 ADD_BITFIELD_RW(TAIFG, 0, 1)
923 // TimerA interrupt enable
924 ADD_BITFIELD_RW(TAIE, 1, 1)
925 // TimerA clear
926 ADD_BITFIELD_RW(TACLR, 2, 1)
927 // Mode control
928 ADD_BITFIELD_RW(MC, 4, 2)
929 // Input divider
930 ADD_BITFIELD_RW(ID, 6, 2)
931 // TimerA clock source select
932 ADD_BITFIELD_RW(TASSEL, 8, 2)
933 END_TYPE()
934
935 // No interrupt pending
936 static const uint32_t TAxCTL_TAIFG__TAIFG_0 = 0;
937 // Interrupt pending
938 static const uint32_t TAxCTL_TAIFG__TAIFG_1 = 1;
939 // Interrupt disabled
940 static const uint32_t TAxCTL_TAIE__TAIE_0 = 0;
941 // Interrupt enabled
942 static const uint32_t TAxCTL_TAIE__TAIE_1 = 1;
943 // Stop mode: Timer is halted
944 static const uint32_t TAxCTL_MC__MC_0 = 0;
945 // Up mode: Timer counts up to TAxCCR0
946 static const uint32_t TAxCTL_MC__MC_1 = 1;
947 // Continuous mode: Timer counts up to 0FFFFh
948 static const uint32_t TAxCTL_MC__MC_2 = 2;
949 // Up/down mode: Timer counts up to TAxCCR0 then down to 0000h
950 static const uint32_t TAxCTL_MC__MC_3 = 3;
951 // /1
952 static const uint32_t TAxCTL_ID__ID_0 = 0;
953 // /2
954 static const uint32_t TAxCTL_ID__ID_1 = 1;
955 // /4
956 static const uint32_t TAxCTL_ID__ID_2 = 2;
957 // /8
958 static const uint32_t TAxCTL_ID__ID_3 = 3;
959 // TAxCLK
960 static const uint32_t TAxCTL_TASSEL__TASSEL_0 = 0;
961 // ACLK
962 static const uint32_t TAxCTL_TASSEL__TASSEL_1 = 1;
963 // SMCLK
964 static const uint32_t TAxCTL_TASSEL__TASSEL_2 = 2;
965 // INCLK
966 static const uint32_t TAxCTL_TASSEL__TASSEL_3 = 3;
967
968 // Timer_A Capture/Compare Control Register
969 // Reset value: 0x00000000
970 BEGIN_TYPE(TAxCCTL_t, uint16_t)
971 // Capture/compare interrupt flag
972 ADD_BITFIELD_RW(CCIFG, 0, 1)
973 // Capture overflow
974 ADD_BITFIELD_RW(COV, 1, 1)
975 // Output
976 ADD_BITFIELD_RW(OUT, 2, 1)
977 // Capture/compare input
978 ADD_BITFIELD_RO(CCI, 3, 1)
979 // Capture/compare interrupt enable
980 ADD_BITFIELD_RW(CCIE, 4, 1)
981 // Output mode
982 ADD_BITFIELD_RW(OUTMOD, 5, 3)
983 // Capture mode
984 ADD_BITFIELD_RW(CAP, 8, 1)
985 // Synchronized capture/compare input
986 ADD_BITFIELD_RW(SCCI, 10, 1)
987 // Synchronize capture source
988 ADD_BITFIELD_RW(SCS, 11, 1)
989 // Capture/compare input select
990 ADD_BITFIELD_RW(CCIS, 12, 2)
991 // Capture mode
992 ADD_BITFIELD_RW(CM, 14, 2)
993 END_TYPE()
994
995 // No interrupt pending
996 static const uint32_t TAxCCTL_CCIFG__CCIFG_0 = 0;
997 // Interrupt pending
998 static const uint32_t TAxCCTL_CCIFG__CCIFG_1 = 1;
999 // No capture overflow occurred
1000 static const uint32_t TAxCCTL_COV__COV_0 = 0;
1001 // Capture overflow occurred
1002 static const uint32_t TAxCCTL_COV__COV_1 = 1;
1003 // Output low
1004 static const uint32_t TAxCCTL_OUT__OUT_0 = 0;
1005 // Output high
1006 static const uint32_t TAxCCTL_OUT__OUT_1 = 1;
1007 // Interrupt disabled
1008 static const uint32_t TAxCCTL_CCIE__CCIE_0 = 0;
1009 // Interrupt enabled
1010 static const uint32_t TAxCCTL_CCIE__CCIE_1 = 1;
1011 // OUT bit value
1012 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_0 = 0;
1013 // Set
1014 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_1 = 1;
1015 // Toggle/reset
1016 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_2 = 2;
1017 // Set/reset
1018 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_3 = 3;
1019 // Toggle
1020 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_4 = 4;
1021 // Reset
1022 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_5 = 5;
1023 // Toggle/set
1024 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_6 = 6;
1025 // Reset/set
1026 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_7 = 7;
1027 // Compare mode
1028 static const uint32_t TAxCCTL_CAP__CAP_0 = 0;
1029 // Capture mode
1030 static const uint32_t TAxCCTL_CAP__CAP_1 = 1;
1031 // Asynchronous capture
1032 static const uint32_t TAxCCTL_SCS__SCS_0 = 0;
1033 // Synchronous capture
1034 static const uint32_t TAxCCTL_SCS__SCS_1 = 1;
1035 // CCIxA
1036 static const uint32_t TAxCCTL_CCIS__CCIS_0 = 0;
1037 // CCIxB
1038 static const uint32_t TAxCCTL_CCIS__CCIS_1 = 1;
1039 // GND
1040 static const uint32_t TAxCCTL_CCIS__CCIS_2 = 2;
1041 // VCC
1042 static const uint32_t TAxCCTL_CCIS__CCIS_3 = 3;
1043 // No capture
1044 static const uint32_t TAxCCTL_CM__CM_0 = 0;
1045 // Capture on rising edge
1046 static const uint32_t TAxCCTL_CM__CM_1 = 1;
1047 // Capture on falling edge
1048 static const uint32_t TAxCCTL_CM__CM_2 = 2;
1049 // Capture on both rising and falling edges
1050 static const uint32_t TAxCCTL_CM__CM_3 = 3;
1051
1052 // TimerA register
1053 // Reset value: 0x00000000
1054 typedef uint16_t TAxR_t;
1055
1056 // Timer_A Capture/Compare Register
1057 // Reset value: 0x00000000
1058 BEGIN_TYPE(TAxCCR_t, uint16_t)
1059 // TimerA register
1060 ADD_BITFIELD_RW(TAxR, 0, 16)
1061 END_TYPE()
1062
1063 // TimerAx Expansion 0 Register
1064 // Reset value: 0x00000000
1065 BEGIN_TYPE(TAxEX0_t, uint16_t)
1066 // Input divider expansion
1067 ADD_BITFIELD_RW(TAIDEX, 0, 3)
1068 END_TYPE()
1069
1070 // Divide by 1
1071 static const uint32_t TAxEX0_TAIDEX__TAIDEX_0 = 0;
1072 // Divide by 2
1073 static const uint32_t TAxEX0_TAIDEX__TAIDEX_1 = 1;
1074 // Divide by 3
1075 static const uint32_t TAxEX0_TAIDEX__TAIDEX_2 = 2;
1076 // Divide by 4
1077 static const uint32_t TAxEX0_TAIDEX__TAIDEX_3 = 3;
1078 // Divide by 5
1079 static const uint32_t TAxEX0_TAIDEX__TAIDEX_4 = 4;
1080 // Divide by 6
1081 static const uint32_t TAxEX0_TAIDEX__TAIDEX_5 = 5;
1082 // Divide by 7
1083 static const uint32_t TAxEX0_TAIDEX__TAIDEX_6 = 6;
1084 // Divide by 8
1085 static const uint32_t TAxEX0_TAIDEX__TAIDEX_7 = 7;
1086
1087 // TimerAx Interrupt Vector Register
1088 // Reset value: 0x00000000
1089 BEGIN_TYPE(TAxIV_t, uint16_t)
1090 // TimerA interrupt vector value
1091 ADD_BITFIELD_RO(TAIV, 0, 16)
1092 END_TYPE()
1093
1094 // No interrupt pending
1095 static const uint32_t TAxIV_TAIV__TAIV_0 = 0;
1096 // Interrupt Source: Capture/compare 1; Interrupt Flag: TAxCCR1 CCIFG; Interrupt Priority: Highest
1097 static const uint32_t TAxIV_TAIV__TAIV_2 = 2;
1098 // Interrupt Source: Capture/compare 2; Interrupt Flag: TAxCCR2 CCIFG
1099 static const uint32_t TAxIV_TAIV__TAIV_4 = 4;
1100 // Interrupt Source: Capture/compare 3; Interrupt Flag: TAxCCR3 CCIFG
1101 static const uint32_t TAxIV_TAIV__TAIV_6 = 6;
1102 // Interrupt Source: Capture/compare 4; Interrupt Flag: TAxCCR4 CCIFG
1103 static const uint32_t TAxIV_TAIV__TAIV_8 = 8;
1104 // Interrupt Source: Capture/compare 5; Interrupt Flag: TAxCCR5 CCIFG
1105 static const uint32_t TAxIV_TAIV__TAIV_10 = 10;
1106 // Interrupt Source: Capture/compare 6; Interrupt Flag: TAxCCR6 CCIFG
1107 static const uint32_t TAxIV_TAIV__TAIV_12 = 12;
1108 // Interrupt Source: Timer overflow; Interrupt Flag: TAxCTL TAIFG; Interrupt Priority: Lowest
1109 static const uint32_t TAxIV_TAIV__TAIV_14 = 14;
1110
1111 struct TIMER_A2_t {
1112 TAxCTL_t TAxCTL;
1113 TAxCCTL_t TAxCCTL0;
1114 TAxCCTL_t TAxCCTL1;
1115 TAxCCTL_t TAxCCTL2;
1116 TAxCCTL_t TAxCCTL3;
1117 TAxCCTL_t TAxCCTL4;
1118 uint16_t reserved0[2];
1119 TAxR_t TAxR;
1120 TAxCCR_t TAxCCR0;
1121 TAxCCR_t TAxCCR1;
1122 TAxCCR_t TAxCCR2;
1123 TAxCCR_t TAxCCR3;
1124 TAxCCR_t TAxCCR4;
1125 uint16_t reserved1[2];
1126 TAxEX0_t TAxEX0;
1127 uint16_t reserved2[6];
1128 TAxIV_t TAxIV;
1129 };
1130
1131 static TIMER_A2_t & TIMER_A2 = (*(TIMER_A2_t *)0x40000800);
1132
1133} // _TIMER_A2_
1134
1135// TIMER_A3
1136namespace _TIMER_A3_ {
1137
1138 // TimerAx Control Register
1139 // Reset value: 0x00000000
1140 BEGIN_TYPE(TAxCTL_t, uint16_t)
1141 // TimerA interrupt flag
1142 ADD_BITFIELD_RW(TAIFG, 0, 1)
1143 // TimerA interrupt enable
1144 ADD_BITFIELD_RW(TAIE, 1, 1)
1145 // TimerA clear
1146 ADD_BITFIELD_RW(TACLR, 2, 1)
1147 // Mode control
1148 ADD_BITFIELD_RW(MC, 4, 2)
1149 // Input divider
1150 ADD_BITFIELD_RW(ID, 6, 2)
1151 // TimerA clock source select
1152 ADD_BITFIELD_RW(TASSEL, 8, 2)
1153 END_TYPE()
1154
1155 // No interrupt pending
1156 static const uint32_t TAxCTL_TAIFG__TAIFG_0 = 0;
1157 // Interrupt pending
1158 static const uint32_t TAxCTL_TAIFG__TAIFG_1 = 1;
1159 // Interrupt disabled
1160 static const uint32_t TAxCTL_TAIE__TAIE_0 = 0;
1161 // Interrupt enabled
1162 static const uint32_t TAxCTL_TAIE__TAIE_1 = 1;
1163 // Stop mode: Timer is halted
1164 static const uint32_t TAxCTL_MC__MC_0 = 0;
1165 // Up mode: Timer counts up to TAxCCR0
1166 static const uint32_t TAxCTL_MC__MC_1 = 1;
1167 // Continuous mode: Timer counts up to 0FFFFh
1168 static const uint32_t TAxCTL_MC__MC_2 = 2;
1169 // Up/down mode: Timer counts up to TAxCCR0 then down to 0000h
1170 static const uint32_t TAxCTL_MC__MC_3 = 3;
1171 // /1
1172 static const uint32_t TAxCTL_ID__ID_0 = 0;
1173 // /2
1174 static const uint32_t TAxCTL_ID__ID_1 = 1;
1175 // /4
1176 static const uint32_t TAxCTL_ID__ID_2 = 2;
1177 // /8
1178 static const uint32_t TAxCTL_ID__ID_3 = 3;
1179 // TAxCLK
1180 static const uint32_t TAxCTL_TASSEL__TASSEL_0 = 0;
1181 // ACLK
1182 static const uint32_t TAxCTL_TASSEL__TASSEL_1 = 1;
1183 // SMCLK
1184 static const uint32_t TAxCTL_TASSEL__TASSEL_2 = 2;
1185 // INCLK
1186 static const uint32_t TAxCTL_TASSEL__TASSEL_3 = 3;
1187
1188 // Timer_A Capture/Compare Control Register
1189 // Reset value: 0x00000000
1190 BEGIN_TYPE(TAxCCTL_t, uint16_t)
1191 // Capture/compare interrupt flag
1192 ADD_BITFIELD_RW(CCIFG, 0, 1)
1193 // Capture overflow
1194 ADD_BITFIELD_RW(COV, 1, 1)
1195 // Output
1196 ADD_BITFIELD_RW(OUT, 2, 1)
1197 // Capture/compare input
1198 ADD_BITFIELD_RO(CCI, 3, 1)
1199 // Capture/compare interrupt enable
1200 ADD_BITFIELD_RW(CCIE, 4, 1)
1201 // Output mode
1202 ADD_BITFIELD_RW(OUTMOD, 5, 3)
1203 // Capture mode
1204 ADD_BITFIELD_RW(CAP, 8, 1)
1205 // Synchronized capture/compare input
1206 ADD_BITFIELD_RW(SCCI, 10, 1)
1207 // Synchronize capture source
1208 ADD_BITFIELD_RW(SCS, 11, 1)
1209 // Capture/compare input select
1210 ADD_BITFIELD_RW(CCIS, 12, 2)
1211 // Capture mode
1212 ADD_BITFIELD_RW(CM, 14, 2)
1213 END_TYPE()
1214
1215 // No interrupt pending
1216 static const uint32_t TAxCCTL_CCIFG__CCIFG_0 = 0;
1217 // Interrupt pending
1218 static const uint32_t TAxCCTL_CCIFG__CCIFG_1 = 1;
1219 // No capture overflow occurred
1220 static const uint32_t TAxCCTL_COV__COV_0 = 0;
1221 // Capture overflow occurred
1222 static const uint32_t TAxCCTL_COV__COV_1 = 1;
1223 // Output low
1224 static const uint32_t TAxCCTL_OUT__OUT_0 = 0;
1225 // Output high
1226 static const uint32_t TAxCCTL_OUT__OUT_1 = 1;
1227 // Interrupt disabled
1228 static const uint32_t TAxCCTL_CCIE__CCIE_0 = 0;
1229 // Interrupt enabled
1230 static const uint32_t TAxCCTL_CCIE__CCIE_1 = 1;
1231 // OUT bit value
1232 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_0 = 0;
1233 // Set
1234 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_1 = 1;
1235 // Toggle/reset
1236 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_2 = 2;
1237 // Set/reset
1238 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_3 = 3;
1239 // Toggle
1240 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_4 = 4;
1241 // Reset
1242 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_5 = 5;
1243 // Toggle/set
1244 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_6 = 6;
1245 // Reset/set
1246 static const uint32_t TAxCCTL_OUTMOD__OUTMOD_7 = 7;
1247 // Compare mode
1248 static const uint32_t TAxCCTL_CAP__CAP_0 = 0;
1249 // Capture mode
1250 static const uint32_t TAxCCTL_CAP__CAP_1 = 1;
1251 // Asynchronous capture
1252 static const uint32_t TAxCCTL_SCS__SCS_0 = 0;
1253 // Synchronous capture
1254 static const uint32_t TAxCCTL_SCS__SCS_1 = 1;
1255 // CCIxA
1256 static const uint32_t TAxCCTL_CCIS__CCIS_0 = 0;
1257 // CCIxB
1258 static const uint32_t TAxCCTL_CCIS__CCIS_1 = 1;
1259 // GND
1260 static const uint32_t TAxCCTL_CCIS__CCIS_2 = 2;
1261 // VCC
1262 static const uint32_t TAxCCTL_CCIS__CCIS_3 = 3;
1263 // No capture
1264 static const uint32_t TAxCCTL_CM__CM_0 = 0;
1265 // Capture on rising edge
1266 static const uint32_t TAxCCTL_CM__CM_1 = 1;
1267 // Capture on falling edge
1268 static const uint32_t TAxCCTL_CM__CM_2 = 2;
1269 // Capture on both rising and falling edges
1270 static const uint32_t TAxCCTL_CM__CM_3 = 3;
1271
1272 // TimerA register
1273 // Reset value: 0x00000000
1274 typedef uint16_t TAxR_t;
1275
1276 // Timer_A Capture/Compare Register
1277 // Reset value: 0x00000000
1278 BEGIN_TYPE(TAxCCR_t, uint16_t)
1279 // TimerA register
1280 ADD_BITFIELD_RW(TAxR, 0, 16)
1281 END_TYPE()
1282
1283 // TimerAx Expansion 0 Register
1284 // Reset value: 0x00000000
1285 BEGIN_TYPE(TAxEX0_t, uint16_t)
1286 // Input divider expansion
1287 ADD_BITFIELD_RW(TAIDEX, 0, 3)
1288 END_TYPE()
1289
1290 // Divide by 1
1291 static const uint32_t TAxEX0_TAIDEX__TAIDEX_0 = 0;
1292 // Divide by 2
1293 static const uint32_t TAxEX0_TAIDEX__TAIDEX_1 = 1;
1294 // Divide by 3
1295 static const uint32_t TAxEX0_TAIDEX__TAIDEX_2 = 2;
1296 // Divide by 4
1297 static const uint32_t TAxEX0_TAIDEX__TAIDEX_3 = 3;
1298 // Divide by 5
1299 static const uint32_t TAxEX0_TAIDEX__TAIDEX_4 = 4;
1300 // Divide by 6
1301 static const uint32_t TAxEX0_TAIDEX__TAIDEX_5 = 5;
1302 // Divide by 7
1303 static const uint32_t TAxEX0_TAIDEX__TAIDEX_6 = 6;
1304 // Divide by 8
1305 static const uint32_t TAxEX0_TAIDEX__TAIDEX_7 = 7;
1306
1307 // TimerAx Interrupt Vector Register
1308 // Reset value: 0x00000000
1309 BEGIN_TYPE(TAxIV_t, uint16_t)
1310 // TimerA interrupt vector value
1311 ADD_BITFIELD_RO(TAIV, 0, 16)
1312 END_TYPE()
1313
1314 // No interrupt pending
1315 static const uint32_t TAxIV_TAIV__TAIV_0 = 0;
1316 // Interrupt Source: Capture/compare 1; Interrupt Flag: TAxCCR1 CCIFG; Interrupt Priority: Highest
1317 static const uint32_t TAxIV_TAIV__TAIV_2 = 2;
1318 // Interrupt Source: Capture/compare 2; Interrupt Flag: TAxCCR2 CCIFG
1319 static const uint32_t TAxIV_TAIV__TAIV_4 = 4;
1320 // Interrupt Source: Capture/compare 3; Interrupt Flag: TAxCCR3 CCIFG
1321 static const uint32_t TAxIV_TAIV__TAIV_6 = 6;
1322 // Interrupt Source: Capture/compare 4; Interrupt Flag: TAxCCR4 CCIFG
1323 static const uint32_t TAxIV_TAIV__TAIV_8 = 8;
1324 // Interrupt Source: Capture/compare 5; Interrupt Flag: TAxCCR5 CCIFG
1325 static const uint32_t TAxIV_TAIV__TAIV_10 = 10;
1326 // Interrupt Source: Capture/compare 6; Interrupt Flag: TAxCCR6 CCIFG
1327 static const uint32_t TAxIV_TAIV__TAIV_12 = 12;
1328 // Interrupt Source: Timer overflow; Interrupt Flag: TAxCTL TAIFG; Interrupt Priority: Lowest
1329 static const uint32_t TAxIV_TAIV__TAIV_14 = 14;
1330
1331 struct TIMER_A3_t {
1332 TAxCTL_t TAxCTL;
1333 TAxCCTL_t TAxCCTL0;
1334 TAxCCTL_t TAxCCTL1;
1335 TAxCCTL_t TAxCCTL2;
1336 TAxCCTL_t TAxCCTL3;
1337 TAxCCTL_t TAxCCTL4;
1338 uint16_t reserved0[2];
1339 TAxR_t TAxR;
1340 TAxCCR_t TAxCCR0;
1341 TAxCCR_t TAxCCR1;
1342 TAxCCR_t TAxCCR2;
1343 TAxCCR_t TAxCCR3;
1344 TAxCCR_t TAxCCR4;
1345 uint16_t reserved1[2];
1346 TAxEX0_t TAxEX0;
1347 uint16_t reserved2[6];
1348 TAxIV_t TAxIV;
1349 };
1350
1351 static TIMER_A3_t & TIMER_A3 = (*(TIMER_A3_t *)0x40000c00);
1352
1353} // _TIMER_A3_
1354
1355// EUSCI_A0
1356namespace _EUSCI_A0_ {
1357
1358 // eUSCI_Ax Control Word Register 0
1359 // Reset value: 0x00000001
1360 BEGIN_TYPE(UCAxCTLW0_t, uint16_t)
1361 // Software reset enable
1362 ADD_BITFIELD_RW(UCSWRST, 0, 1)
1363 // Transmit break
1364 ADD_BITFIELD_RW(UCTXBRK, 1, 1)
1365 // Transmit address
1366 ADD_BITFIELD_RW(UCTXADDR, 2, 1)
1367 // Dormant
1368 ADD_BITFIELD_RW(UCDORM, 3, 1)
1369 // Receive break character interrupt enable
1370 ADD_BITFIELD_RW(UCBRKIE, 4, 1)
1371 // Receive erroneous-character interrupt enable
1372 ADD_BITFIELD_RW(UCRXEIE, 5, 1)
1373 // eUSCI_A clock source select
1374 ADD_BITFIELD_RW(UCSSEL, 6, 2)
1375 // Synchronous mode enable
1376 ADD_BITFIELD_RW(UCSYNC, 8, 1)
1377 // eUSCI_A mode
1378 ADD_BITFIELD_RW(UCMODE, 9, 2)
1379 // Stop bit select
1380 ADD_BITFIELD_RW(UCSPB, 11, 1)
1381 // Character length
1382 ADD_BITFIELD_RW(UC7BIT, 12, 1)
1383 // MSB first select
1384 ADD_BITFIELD_RW(UCMSB, 13, 1)
1385 // Parity select
1386 ADD_BITFIELD_RW(UCPAR, 14, 1)
1387 // Parity enable
1388 ADD_BITFIELD_RW(UCPEN, 15, 1)
1389 END_TYPE()
1390
1391 // Disabled. eUSCI_A reset released for operation
1392 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_0 = 0;
1393 // Enabled. eUSCI_A logic held in reset state
1394 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_1 = 1;
1395 // Next frame transmitted is not a break
1396 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_0 = 0;
1397 // Next frame transmitted is a break or a break/synch
1398 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_1 = 1;
1399 // Next frame transmitted is data
1400 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_0 = 0;
1401 // Next frame transmitted is an address
1402 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_1 = 1;
1403 // Not dormant. All received characters set UCRXIFG.
1404 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_0 = 0;
1405 // Dormant. Only characters that are preceded by an idle-line or with address bit set UCRXIFG. In UART mode with automatic baud-rate detection, only the combination of a break and synch field sets UCRXIFG.
1406 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_1 = 1;
1407 // Received break characters do not set UCRXIFG
1408 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_0 = 0;
1409 // Received break characters set UCRXIFG
1410 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_1 = 1;
1411 // Erroneous characters rejected and UCRXIFG is not set
1412 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_0 = 0;
1413 // Erroneous characters received set UCRXIFG
1414 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_1 = 1;
1415 // UCLK
1416 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_0 = 0;
1417 // ACLK
1418 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_1 = 1;
1419 // SMCLK
1420 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_2 = 2;
1421 // Asynchronous mode
1422 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_0 = 0;
1423 // Synchronous mode
1424 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_1 = 1;
1425 // UART mode
1426 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_0 = 0;
1427 // Idle-line multiprocessor mode
1428 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_1 = 1;
1429 // Address-bit multiprocessor mode
1430 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_2 = 2;
1431 // UART mode with automatic baud-rate detection
1432 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_3 = 3;
1433 // One stop bit
1434 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_0 = 0;
1435 // Two stop bits
1436 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_1 = 1;
1437 // 8-bit data
1438 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_0 = 0;
1439 // 7-bit data
1440 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_1 = 1;
1441 // LSB first
1442 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_0 = 0;
1443 // MSB first
1444 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_1 = 1;
1445 // Odd parity
1446 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_0 = 0;
1447 // Even parity
1448 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_1 = 1;
1449 // Parity disabled
1450 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_0 = 0;
1451 // Parity enabled. Parity bit is generated (UCAxTXD) and expected (UCAxRXD). In address-bit multiprocessor mode, the address bit is included in the parity calculation.
1452 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_1 = 1;
1453
1454 // eUSCI_Ax Control Word Register 1
1455 // Reset value: 0x00000003
1456 BEGIN_TYPE(UCAxCTLW1_t, uint16_t)
1457 // Deglitch time
1458 ADD_BITFIELD_RW(UCGLIT, 0, 2)
1459 END_TYPE()
1460
1461 // Approximately 2 ns (equivalent of 1 delay element)
1462 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_0 = 0;
1463 // Approximately 50 ns
1464 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_1 = 1;
1465 // Approximately 100 ns
1466 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_2 = 2;
1467 // Approximately 200 ns
1468 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_3 = 3;
1469
1470 // eUSCI_Ax Baud Rate Control Word Register
1471 // Reset value: 0x00000000
1472 BEGIN_TYPE(UCAxBRW_t, uint16_t)
1473 // Clock prescaler setting of the Baud rate generator
1474 ADD_BITFIELD_RW(UCBR, 0, 16)
1475 END_TYPE()
1476
1477 // eUSCI_Ax Modulation Control Word Register
1478 // Reset value: 0x00000000
1479 BEGIN_TYPE(UCAxMCTLW_t, uint16_t)
1480 // Oversampling mode enabled
1481 ADD_BITFIELD_RW(UCOS16, 0, 1)
1482 // First modulation stage select
1483 ADD_BITFIELD_RW(UCBRF, 4, 4)
1484 // Second modulation stage select
1485 ADD_BITFIELD_RW(UCBRS, 8, 8)
1486 END_TYPE()
1487
1488 // Disabled
1489 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_0 = 0;
1490 // Enabled
1491 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_1 = 1;
1492
1493 // eUSCI_Ax Status Register
1494 // Reset value: 0x00000000
1495 BEGIN_TYPE(UCAxSTATW_t, uint16_t)
1496 // eUSCI_A busy
1497 ADD_BITFIELD_RO(UCBUSY, 0, 1)
1498 // Address received / Idle line detected
1499 ADD_BITFIELD_RW(UCADDR_UCIDLE, 1, 1)
1500 // Receive error flag
1501 ADD_BITFIELD_RW(UCRXERR, 2, 1)
1502 // Break detect flag
1503 ADD_BITFIELD_RW(UCBRK, 3, 1)
1504 // Parity error flag. When UCPEN = 0, UCPE is read as 0. UCPE is cleared when UCAxRXBUF is read.
1505 ADD_BITFIELD_RW(UCPE, 4, 1)
1506 // Overrun error flag
1507 ADD_BITFIELD_RW(UCOE, 5, 1)
1508 // Framing error flag
1509 ADD_BITFIELD_RW(UCFE, 6, 1)
1510 // Listen enable
1511 ADD_BITFIELD_RW(UCLISTEN, 7, 1)
1512 END_TYPE()
1513
1514 // eUSCI_A inactive
1515 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_0 = 0;
1516 // eUSCI_A transmitting or receiving
1517 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_1 = 1;
1518 // No receive errors detected
1519 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_0 = 0;
1520 // Receive error detected
1521 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_1 = 1;
1522 // No break condition
1523 static const uint32_t UCAxSTATW_UCBRK__UCBRK_0 = 0;
1524 // Break condition occurred
1525 static const uint32_t UCAxSTATW_UCBRK__UCBRK_1 = 1;
1526 // No error
1527 static const uint32_t UCAxSTATW_UCPE__UCPE_0 = 0;
1528 // Character received with parity error
1529 static const uint32_t UCAxSTATW_UCPE__UCPE_1 = 1;
1530 // No error
1531 static const uint32_t UCAxSTATW_UCOE__UCOE_0 = 0;
1532 // Overrun error occurred
1533 static const uint32_t UCAxSTATW_UCOE__UCOE_1 = 1;
1534 // No error
1535 static const uint32_t UCAxSTATW_UCFE__UCFE_0 = 0;
1536 // Character received with low stop bit
1537 static const uint32_t UCAxSTATW_UCFE__UCFE_1 = 1;
1538 // Disabled
1539 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_0 = 0;
1540 // Enabled. UCAxTXD is internally fed back to the receiver
1541 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_1 = 1;
1542
1543 // eUSCI_Ax Receive Buffer Register
1544 // Reset value: 0x00000000
1545 BEGIN_TYPE(UCAxRXBUF_t, uint16_t)
1546 // Receive data buffer
1547 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
1548 END_TYPE()
1549
1550 // eUSCI_Ax Transmit Buffer Register
1551 // Reset value: 0x00000000
1552 BEGIN_TYPE(UCAxTXBUF_t, uint16_t)
1553 // Transmit data buffer
1554 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
1555 END_TYPE()
1556
1557 // eUSCI_Ax Auto Baud Rate Control Register
1558 // Reset value: 0x00000000
1559 BEGIN_TYPE(UCAxABCTL_t, uint16_t)
1560 // Automatic baud-rate detect enable
1561 ADD_BITFIELD_RW(UCABDEN, 0, 1)
1562 // Break time out error
1563 ADD_BITFIELD_RW(UCBTOE, 2, 1)
1564 // Synch field time out error
1565 ADD_BITFIELD_RW(UCSTOE, 3, 1)
1566 // Break/synch delimiter length
1567 ADD_BITFIELD_RW(UCDELIM, 4, 2)
1568 END_TYPE()
1569
1570 // Baud-rate detection disabled. Length of break and synch field is not measured.
1571 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_0 = 0;
1572 // Baud-rate detection enabled. Length of break and synch field is measured and baud-rate settings are changed accordingly.
1573 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_1 = 1;
1574 // No error
1575 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_0 = 0;
1576 // Length of break field exceeded 22 bit times
1577 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_1 = 1;
1578 // No error
1579 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_0 = 0;
1580 // Length of synch field exceeded measurable time
1581 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_1 = 1;
1582 // 1 bit time
1583 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_0 = 0;
1584 // 2 bit times
1585 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_1 = 1;
1586 // 3 bit times
1587 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_2 = 2;
1588 // 4 bit times
1589 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_3 = 3;
1590
1591 // eUSCI_Ax IrDA Control Word Register
1592 // Reset value: 0x00000000
1593 BEGIN_TYPE(UCAxIRCTL_t, uint16_t)
1594 // IrDA encoder/decoder enable
1595 ADD_BITFIELD_RW(UCIREN, 0, 1)
1596 // IrDA transmit pulse clock select
1597 ADD_BITFIELD_RW(UCIRTXCLK, 1, 1)
1598 // Transmit pulse length
1599 ADD_BITFIELD_RW(UCIRTXPL, 2, 6)
1600 // IrDA receive filter enabled
1601 ADD_BITFIELD_RW(UCIRRXFE, 8, 1)
1602 // IrDA receive input UCAxRXD polarity
1603 ADD_BITFIELD_RW(UCIRRXPL, 9, 1)
1604 // Receive filter length
1605 ADD_BITFIELD_RW(UCIRRXFL, 10, 4)
1606 END_TYPE()
1607
1608 // IrDA encoder/decoder disabled
1609 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_0 = 0;
1610 // IrDA encoder/decoder enabled
1611 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_1 = 1;
1612 // BRCLK
1613 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_0 = 0;
1614 // BITCLK16 when UCOS16 = 1. Otherwise, BRCLK.
1615 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_1 = 1;
1616 // Receive filter disabled
1617 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_0 = 0;
1618 // Receive filter enabled
1619 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_1 = 1;
1620 // IrDA transceiver delivers a high pulse when a light pulse is seen
1621 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_0 = 0;
1622 // IrDA transceiver delivers a low pulse when a light pulse is seen
1623 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_1 = 1;
1624
1625 // eUSCI_Ax Interrupt Enable Register
1626 // Reset value: 0x00000000
1627 BEGIN_TYPE(UCAxIE_t, uint16_t)
1628 // Receive interrupt enable
1629 ADD_BITFIELD_RW(UCRXIE, 0, 1)
1630 // Transmit interrupt enable
1631 ADD_BITFIELD_RW(UCTXIE, 1, 1)
1632 // Start bit interrupt enable
1633 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
1634 // Transmit complete interrupt enable
1635 ADD_BITFIELD_RW(UCTXCPTIE, 3, 1)
1636 END_TYPE()
1637
1638 // Interrupt disabled
1639 static const uint32_t UCAxIE_UCRXIE__UCRXIE_0 = 0;
1640 // Interrupt enabled
1641 static const uint32_t UCAxIE_UCRXIE__UCRXIE_1 = 1;
1642 // Interrupt disabled
1643 static const uint32_t UCAxIE_UCTXIE__UCTXIE_0 = 0;
1644 // Interrupt enabled
1645 static const uint32_t UCAxIE_UCTXIE__UCTXIE_1 = 1;
1646 // Interrupt disabled
1647 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_0 = 0;
1648 // Interrupt enabled
1649 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_1 = 1;
1650 // Interrupt disabled
1651 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_0 = 0;
1652 // Interrupt enabled
1653 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_1 = 1;
1654
1655 // eUSCI_Ax Interrupt Flag Register
1656 // Reset value: 0x00000002
1657 BEGIN_TYPE(UCAxIFG_t, uint16_t)
1658 // Receive interrupt flag
1659 ADD_BITFIELD_RW(UCRXIFG, 0, 1)
1660 // Transmit interrupt flag
1661 ADD_BITFIELD_RW(UCTXIFG, 1, 1)
1662 // Start bit interrupt flag
1663 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
1664 // Transmit ready interrupt enable
1665 ADD_BITFIELD_RW(UCTXCPTIFG, 3, 1)
1666 END_TYPE()
1667
1668 // No interrupt pending
1669 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_0 = 0;
1670 // Interrupt pending
1671 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_1 = 1;
1672 // No interrupt pending
1673 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_0 = 0;
1674 // Interrupt pending
1675 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_1 = 1;
1676 // No interrupt pending
1677 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
1678 // Interrupt pending
1679 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
1680 // No interrupt pending
1681 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_0 = 0;
1682 // Interrupt pending
1683 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_1 = 1;
1684
1685 // eUSCI_Ax Interrupt Vector Register
1686 // Reset value: 0x00000000
1687 BEGIN_TYPE(UCAxIV_t, uint16_t)
1688 // eUSCI_A interrupt vector value
1689 ADD_BITFIELD_RO(UCIV, 0, 16)
1690 END_TYPE()
1691
1692 // No interrupt pending
1693 static const uint32_t UCAxIV_UCIV__UCIV_0 = 0;
1694 // Interrupt Source: Receive buffer full; Interrupt Flag: UCRXIFG; Interrupt Priority: Highest
1695 static const uint32_t UCAxIV_UCIV__UCIV_2 = 2;
1696 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG
1697 static const uint32_t UCAxIV_UCIV__UCIV_4 = 4;
1698 // Interrupt Source: Start bit received; Interrupt Flag: UCSTTIFG
1699 static const uint32_t UCAxIV_UCIV__UCIV_6 = 6;
1700 // Interrupt Source: Transmit complete; Interrupt Flag: UCTXCPTIFG; Interrupt Priority: Lowest
1701 static const uint32_t UCAxIV_UCIV__UCIV_8 = 8;
1702
1703 struct EUSCI_A0_t {
1704 UCAxCTLW0_t UCAxCTLW0;
1705 UCAxCTLW1_t UCAxCTLW1;
1706 uint16_t reserved0;
1707 UCAxBRW_t UCAxBRW;
1708 UCAxMCTLW_t UCAxMCTLW;
1709 UCAxSTATW_t UCAxSTATW;
1710 UCAxRXBUF_t UCAxRXBUF;
1711 UCAxTXBUF_t UCAxTXBUF;
1712 UCAxABCTL_t UCAxABCTL;
1713 UCAxIRCTL_t UCAxIRCTL;
1714 uint16_t reserved1[3];
1715 UCAxIE_t UCAxIE;
1716 UCAxIFG_t UCAxIFG;
1717 UCAxIV_t UCAxIV;
1718 };
1719
1720 static EUSCI_A0_t & EUSCI_A0 = (*(EUSCI_A0_t *)0x40001000);
1721
1722} // _EUSCI_A0_
1723
1724// EUSCI_A1
1725namespace _EUSCI_A1_ {
1726
1727 // eUSCI_Ax Control Word Register 0
1728 // Reset value: 0x00000001
1729 BEGIN_TYPE(UCAxCTLW0_t, uint16_t)
1730 // Software reset enable
1731 ADD_BITFIELD_RW(UCSWRST, 0, 1)
1732 // Transmit break
1733 ADD_BITFIELD_RW(UCTXBRK, 1, 1)
1734 // Transmit address
1735 ADD_BITFIELD_RW(UCTXADDR, 2, 1)
1736 // Dormant
1737 ADD_BITFIELD_RW(UCDORM, 3, 1)
1738 // Receive break character interrupt enable
1739 ADD_BITFIELD_RW(UCBRKIE, 4, 1)
1740 // Receive erroneous-character interrupt enable
1741 ADD_BITFIELD_RW(UCRXEIE, 5, 1)
1742 // eUSCI_A clock source select
1743 ADD_BITFIELD_RW(UCSSEL, 6, 2)
1744 // Synchronous mode enable
1745 ADD_BITFIELD_RW(UCSYNC, 8, 1)
1746 // eUSCI_A mode
1747 ADD_BITFIELD_RW(UCMODE, 9, 2)
1748 // Stop bit select
1749 ADD_BITFIELD_RW(UCSPB, 11, 1)
1750 // Character length
1751 ADD_BITFIELD_RW(UC7BIT, 12, 1)
1752 // MSB first select
1753 ADD_BITFIELD_RW(UCMSB, 13, 1)
1754 // Parity select
1755 ADD_BITFIELD_RW(UCPAR, 14, 1)
1756 // Parity enable
1757 ADD_BITFIELD_RW(UCPEN, 15, 1)
1758 END_TYPE()
1759
1760 // Disabled. eUSCI_A reset released for operation
1761 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_0 = 0;
1762 // Enabled. eUSCI_A logic held in reset state
1763 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_1 = 1;
1764 // Next frame transmitted is not a break
1765 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_0 = 0;
1766 // Next frame transmitted is a break or a break/synch
1767 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_1 = 1;
1768 // Next frame transmitted is data
1769 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_0 = 0;
1770 // Next frame transmitted is an address
1771 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_1 = 1;
1772 // Not dormant. All received characters set UCRXIFG.
1773 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_0 = 0;
1774 // Dormant. Only characters that are preceded by an idle-line or with address bit set UCRXIFG. In UART mode with automatic baud-rate detection, only the combination of a break and synch field sets UCRXIFG.
1775 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_1 = 1;
1776 // Received break characters do not set UCRXIFG
1777 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_0 = 0;
1778 // Received break characters set UCRXIFG
1779 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_1 = 1;
1780 // Erroneous characters rejected and UCRXIFG is not set
1781 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_0 = 0;
1782 // Erroneous characters received set UCRXIFG
1783 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_1 = 1;
1784 // UCLK
1785 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_0 = 0;
1786 // ACLK
1787 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_1 = 1;
1788 // SMCLK
1789 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_2 = 2;
1790 // Asynchronous mode
1791 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_0 = 0;
1792 // Synchronous mode
1793 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_1 = 1;
1794 // UART mode
1795 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_0 = 0;
1796 // Idle-line multiprocessor mode
1797 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_1 = 1;
1798 // Address-bit multiprocessor mode
1799 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_2 = 2;
1800 // UART mode with automatic baud-rate detection
1801 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_3 = 3;
1802 // One stop bit
1803 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_0 = 0;
1804 // Two stop bits
1805 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_1 = 1;
1806 // 8-bit data
1807 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_0 = 0;
1808 // 7-bit data
1809 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_1 = 1;
1810 // LSB first
1811 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_0 = 0;
1812 // MSB first
1813 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_1 = 1;
1814 // Odd parity
1815 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_0 = 0;
1816 // Even parity
1817 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_1 = 1;
1818 // Parity disabled
1819 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_0 = 0;
1820 // Parity enabled. Parity bit is generated (UCAxTXD) and expected (UCAxRXD). In address-bit multiprocessor mode, the address bit is included in the parity calculation.
1821 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_1 = 1;
1822
1823 // eUSCI_Ax Control Word Register 1
1824 // Reset value: 0x00000003
1825 BEGIN_TYPE(UCAxCTLW1_t, uint16_t)
1826 // Deglitch time
1827 ADD_BITFIELD_RW(UCGLIT, 0, 2)
1828 END_TYPE()
1829
1830 // Approximately 2 ns (equivalent of 1 delay element)
1831 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_0 = 0;
1832 // Approximately 50 ns
1833 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_1 = 1;
1834 // Approximately 100 ns
1835 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_2 = 2;
1836 // Approximately 200 ns
1837 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_3 = 3;
1838
1839 // eUSCI_Ax Baud Rate Control Word Register
1840 // Reset value: 0x00000000
1841 BEGIN_TYPE(UCAxBRW_t, uint16_t)
1842 // Clock prescaler setting of the Baud rate generator
1843 ADD_BITFIELD_RW(UCBR, 0, 16)
1844 END_TYPE()
1845
1846 // eUSCI_Ax Modulation Control Word Register
1847 // Reset value: 0x00000000
1848 BEGIN_TYPE(UCAxMCTLW_t, uint16_t)
1849 // Oversampling mode enabled
1850 ADD_BITFIELD_RW(UCOS16, 0, 1)
1851 // First modulation stage select
1852 ADD_BITFIELD_RW(UCBRF, 4, 4)
1853 // Second modulation stage select
1854 ADD_BITFIELD_RW(UCBRS, 8, 8)
1855 END_TYPE()
1856
1857 // Disabled
1858 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_0 = 0;
1859 // Enabled
1860 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_1 = 1;
1861
1862 // eUSCI_Ax Status Register
1863 // Reset value: 0x00000000
1864 BEGIN_TYPE(UCAxSTATW_t, uint16_t)
1865 // eUSCI_A busy
1866 ADD_BITFIELD_RO(UCBUSY, 0, 1)
1867 // Address received / Idle line detected
1868 ADD_BITFIELD_RW(UCADDR_UCIDLE, 1, 1)
1869 // Receive error flag
1870 ADD_BITFIELD_RW(UCRXERR, 2, 1)
1871 // Break detect flag
1872 ADD_BITFIELD_RW(UCBRK, 3, 1)
1873 // Parity error flag. When UCPEN = 0, UCPE is read as 0. UCPE is cleared when UCAxRXBUF is read.
1874 ADD_BITFIELD_RW(UCPE, 4, 1)
1875 // Overrun error flag
1876 ADD_BITFIELD_RW(UCOE, 5, 1)
1877 // Framing error flag
1878 ADD_BITFIELD_RW(UCFE, 6, 1)
1879 // Listen enable
1880 ADD_BITFIELD_RW(UCLISTEN, 7, 1)
1881 END_TYPE()
1882
1883 // eUSCI_A inactive
1884 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_0 = 0;
1885 // eUSCI_A transmitting or receiving
1886 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_1 = 1;
1887 // No receive errors detected
1888 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_0 = 0;
1889 // Receive error detected
1890 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_1 = 1;
1891 // No break condition
1892 static const uint32_t UCAxSTATW_UCBRK__UCBRK_0 = 0;
1893 // Break condition occurred
1894 static const uint32_t UCAxSTATW_UCBRK__UCBRK_1 = 1;
1895 // No error
1896 static const uint32_t UCAxSTATW_UCPE__UCPE_0 = 0;
1897 // Character received with parity error
1898 static const uint32_t UCAxSTATW_UCPE__UCPE_1 = 1;
1899 // No error
1900 static const uint32_t UCAxSTATW_UCOE__UCOE_0 = 0;
1901 // Overrun error occurred
1902 static const uint32_t UCAxSTATW_UCOE__UCOE_1 = 1;
1903 // No error
1904 static const uint32_t UCAxSTATW_UCFE__UCFE_0 = 0;
1905 // Character received with low stop bit
1906 static const uint32_t UCAxSTATW_UCFE__UCFE_1 = 1;
1907 // Disabled
1908 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_0 = 0;
1909 // Enabled. UCAxTXD is internally fed back to the receiver
1910 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_1 = 1;
1911
1912 // eUSCI_Ax Receive Buffer Register
1913 // Reset value: 0x00000000
1914 BEGIN_TYPE(UCAxRXBUF_t, uint16_t)
1915 // Receive data buffer
1916 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
1917 END_TYPE()
1918
1919 // eUSCI_Ax Transmit Buffer Register
1920 // Reset value: 0x00000000
1921 BEGIN_TYPE(UCAxTXBUF_t, uint16_t)
1922 // Transmit data buffer
1923 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
1924 END_TYPE()
1925
1926 // eUSCI_Ax Auto Baud Rate Control Register
1927 // Reset value: 0x00000000
1928 BEGIN_TYPE(UCAxABCTL_t, uint16_t)
1929 // Automatic baud-rate detect enable
1930 ADD_BITFIELD_RW(UCABDEN, 0, 1)
1931 // Break time out error
1932 ADD_BITFIELD_RW(UCBTOE, 2, 1)
1933 // Synch field time out error
1934 ADD_BITFIELD_RW(UCSTOE, 3, 1)
1935 // Break/synch delimiter length
1936 ADD_BITFIELD_RW(UCDELIM, 4, 2)
1937 END_TYPE()
1938
1939 // Baud-rate detection disabled. Length of break and synch field is not measured.
1940 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_0 = 0;
1941 // Baud-rate detection enabled. Length of break and synch field is measured and baud-rate settings are changed accordingly.
1942 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_1 = 1;
1943 // No error
1944 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_0 = 0;
1945 // Length of break field exceeded 22 bit times
1946 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_1 = 1;
1947 // No error
1948 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_0 = 0;
1949 // Length of synch field exceeded measurable time
1950 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_1 = 1;
1951 // 1 bit time
1952 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_0 = 0;
1953 // 2 bit times
1954 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_1 = 1;
1955 // 3 bit times
1956 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_2 = 2;
1957 // 4 bit times
1958 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_3 = 3;
1959
1960 // eUSCI_Ax IrDA Control Word Register
1961 // Reset value: 0x00000000
1962 BEGIN_TYPE(UCAxIRCTL_t, uint16_t)
1963 // IrDA encoder/decoder enable
1964 ADD_BITFIELD_RW(UCIREN, 0, 1)
1965 // IrDA transmit pulse clock select
1966 ADD_BITFIELD_RW(UCIRTXCLK, 1, 1)
1967 // Transmit pulse length
1968 ADD_BITFIELD_RW(UCIRTXPL, 2, 6)
1969 // IrDA receive filter enabled
1970 ADD_BITFIELD_RW(UCIRRXFE, 8, 1)
1971 // IrDA receive input UCAxRXD polarity
1972 ADD_BITFIELD_RW(UCIRRXPL, 9, 1)
1973 // Receive filter length
1974 ADD_BITFIELD_RW(UCIRRXFL, 10, 4)
1975 END_TYPE()
1976
1977 // IrDA encoder/decoder disabled
1978 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_0 = 0;
1979 // IrDA encoder/decoder enabled
1980 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_1 = 1;
1981 // BRCLK
1982 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_0 = 0;
1983 // BITCLK16 when UCOS16 = 1. Otherwise, BRCLK.
1984 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_1 = 1;
1985 // Receive filter disabled
1986 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_0 = 0;
1987 // Receive filter enabled
1988 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_1 = 1;
1989 // IrDA transceiver delivers a high pulse when a light pulse is seen
1990 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_0 = 0;
1991 // IrDA transceiver delivers a low pulse when a light pulse is seen
1992 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_1 = 1;
1993
1994 // eUSCI_Ax Interrupt Enable Register
1995 // Reset value: 0x00000000
1996 BEGIN_TYPE(UCAxIE_t, uint16_t)
1997 // Receive interrupt enable
1998 ADD_BITFIELD_RW(UCRXIE, 0, 1)
1999 // Transmit interrupt enable
2000 ADD_BITFIELD_RW(UCTXIE, 1, 1)
2001 // Start bit interrupt enable
2002 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
2003 // Transmit complete interrupt enable
2004 ADD_BITFIELD_RW(UCTXCPTIE, 3, 1)
2005 END_TYPE()
2006
2007 // Interrupt disabled
2008 static const uint32_t UCAxIE_UCRXIE__UCRXIE_0 = 0;
2009 // Interrupt enabled
2010 static const uint32_t UCAxIE_UCRXIE__UCRXIE_1 = 1;
2011 // Interrupt disabled
2012 static const uint32_t UCAxIE_UCTXIE__UCTXIE_0 = 0;
2013 // Interrupt enabled
2014 static const uint32_t UCAxIE_UCTXIE__UCTXIE_1 = 1;
2015 // Interrupt disabled
2016 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_0 = 0;
2017 // Interrupt enabled
2018 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_1 = 1;
2019 // Interrupt disabled
2020 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_0 = 0;
2021 // Interrupt enabled
2022 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_1 = 1;
2023
2024 // eUSCI_Ax Interrupt Flag Register
2025 // Reset value: 0x00000002
2026 BEGIN_TYPE(UCAxIFG_t, uint16_t)
2027 // Receive interrupt flag
2028 ADD_BITFIELD_RW(UCRXIFG, 0, 1)
2029 // Transmit interrupt flag
2030 ADD_BITFIELD_RW(UCTXIFG, 1, 1)
2031 // Start bit interrupt flag
2032 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
2033 // Transmit ready interrupt enable
2034 ADD_BITFIELD_RW(UCTXCPTIFG, 3, 1)
2035 END_TYPE()
2036
2037 // No interrupt pending
2038 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_0 = 0;
2039 // Interrupt pending
2040 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_1 = 1;
2041 // No interrupt pending
2042 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_0 = 0;
2043 // Interrupt pending
2044 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_1 = 1;
2045 // No interrupt pending
2046 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
2047 // Interrupt pending
2048 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
2049 // No interrupt pending
2050 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_0 = 0;
2051 // Interrupt pending
2052 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_1 = 1;
2053
2054 // eUSCI_Ax Interrupt Vector Register
2055 // Reset value: 0x00000000
2056 BEGIN_TYPE(UCAxIV_t, uint16_t)
2057 // eUSCI_A interrupt vector value
2058 ADD_BITFIELD_RO(UCIV, 0, 16)
2059 END_TYPE()
2060
2061 // No interrupt pending
2062 static const uint32_t UCAxIV_UCIV__UCIV_0 = 0;
2063 // Interrupt Source: Receive buffer full; Interrupt Flag: UCRXIFG; Interrupt Priority: Highest
2064 static const uint32_t UCAxIV_UCIV__UCIV_2 = 2;
2065 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG
2066 static const uint32_t UCAxIV_UCIV__UCIV_4 = 4;
2067 // Interrupt Source: Start bit received; Interrupt Flag: UCSTTIFG
2068 static const uint32_t UCAxIV_UCIV__UCIV_6 = 6;
2069 // Interrupt Source: Transmit complete; Interrupt Flag: UCTXCPTIFG; Interrupt Priority: Lowest
2070 static const uint32_t UCAxIV_UCIV__UCIV_8 = 8;
2071
2072 struct EUSCI_A1_t {
2073 UCAxCTLW0_t UCAxCTLW0;
2074 UCAxCTLW1_t UCAxCTLW1;
2075 uint16_t reserved0;
2076 UCAxBRW_t UCAxBRW;
2077 UCAxMCTLW_t UCAxMCTLW;
2078 UCAxSTATW_t UCAxSTATW;
2079 UCAxRXBUF_t UCAxRXBUF;
2080 UCAxTXBUF_t UCAxTXBUF;
2081 UCAxABCTL_t UCAxABCTL;
2082 UCAxIRCTL_t UCAxIRCTL;
2083 uint16_t reserved1[3];
2084 UCAxIE_t UCAxIE;
2085 UCAxIFG_t UCAxIFG;
2086 UCAxIV_t UCAxIV;
2087 };
2088
2089 static EUSCI_A1_t & EUSCI_A1 = (*(EUSCI_A1_t *)0x40001400);
2090
2091} // _EUSCI_A1_
2092
2093// EUSCI_A2
2094namespace _EUSCI_A2_ {
2095
2096 // eUSCI_Ax Control Word Register 0
2097 // Reset value: 0x00000001
2098 BEGIN_TYPE(UCAxCTLW0_t, uint16_t)
2099 // Software reset enable
2100 ADD_BITFIELD_RW(UCSWRST, 0, 1)
2101 // Transmit break
2102 ADD_BITFIELD_RW(UCTXBRK, 1, 1)
2103 // Transmit address
2104 ADD_BITFIELD_RW(UCTXADDR, 2, 1)
2105 // Dormant
2106 ADD_BITFIELD_RW(UCDORM, 3, 1)
2107 // Receive break character interrupt enable
2108 ADD_BITFIELD_RW(UCBRKIE, 4, 1)
2109 // Receive erroneous-character interrupt enable
2110 ADD_BITFIELD_RW(UCRXEIE, 5, 1)
2111 // eUSCI_A clock source select
2112 ADD_BITFIELD_RW(UCSSEL, 6, 2)
2113 // Synchronous mode enable
2114 ADD_BITFIELD_RW(UCSYNC, 8, 1)
2115 // eUSCI_A mode
2116 ADD_BITFIELD_RW(UCMODE, 9, 2)
2117 // Stop bit select
2118 ADD_BITFIELD_RW(UCSPB, 11, 1)
2119 // Character length
2120 ADD_BITFIELD_RW(UC7BIT, 12, 1)
2121 // MSB first select
2122 ADD_BITFIELD_RW(UCMSB, 13, 1)
2123 // Parity select
2124 ADD_BITFIELD_RW(UCPAR, 14, 1)
2125 // Parity enable
2126 ADD_BITFIELD_RW(UCPEN, 15, 1)
2127 END_TYPE()
2128
2129 // Disabled. eUSCI_A reset released for operation
2130 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_0 = 0;
2131 // Enabled. eUSCI_A logic held in reset state
2132 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_1 = 1;
2133 // Next frame transmitted is not a break
2134 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_0 = 0;
2135 // Next frame transmitted is a break or a break/synch
2136 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_1 = 1;
2137 // Next frame transmitted is data
2138 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_0 = 0;
2139 // Next frame transmitted is an address
2140 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_1 = 1;
2141 // Not dormant. All received characters set UCRXIFG.
2142 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_0 = 0;
2143 // Dormant. Only characters that are preceded by an idle-line or with address bit set UCRXIFG. In UART mode with automatic baud-rate detection, only the combination of a break and synch field sets UCRXIFG.
2144 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_1 = 1;
2145 // Received break characters do not set UCRXIFG
2146 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_0 = 0;
2147 // Received break characters set UCRXIFG
2148 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_1 = 1;
2149 // Erroneous characters rejected and UCRXIFG is not set
2150 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_0 = 0;
2151 // Erroneous characters received set UCRXIFG
2152 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_1 = 1;
2153 // UCLK
2154 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_0 = 0;
2155 // ACLK
2156 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_1 = 1;
2157 // SMCLK
2158 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_2 = 2;
2159 // Asynchronous mode
2160 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_0 = 0;
2161 // Synchronous mode
2162 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_1 = 1;
2163 // UART mode
2164 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_0 = 0;
2165 // Idle-line multiprocessor mode
2166 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_1 = 1;
2167 // Address-bit multiprocessor mode
2168 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_2 = 2;
2169 // UART mode with automatic baud-rate detection
2170 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_3 = 3;
2171 // One stop bit
2172 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_0 = 0;
2173 // Two stop bits
2174 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_1 = 1;
2175 // 8-bit data
2176 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_0 = 0;
2177 // 7-bit data
2178 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_1 = 1;
2179 // LSB first
2180 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_0 = 0;
2181 // MSB first
2182 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_1 = 1;
2183 // Odd parity
2184 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_0 = 0;
2185 // Even parity
2186 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_1 = 1;
2187 // Parity disabled
2188 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_0 = 0;
2189 // Parity enabled. Parity bit is generated (UCAxTXD) and expected (UCAxRXD). In address-bit multiprocessor mode, the address bit is included in the parity calculation.
2190 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_1 = 1;
2191
2192 // eUSCI_Ax Control Word Register 1
2193 // Reset value: 0x00000003
2194 BEGIN_TYPE(UCAxCTLW1_t, uint16_t)
2195 // Deglitch time
2196 ADD_BITFIELD_RW(UCGLIT, 0, 2)
2197 END_TYPE()
2198
2199 // Approximately 2 ns (equivalent of 1 delay element)
2200 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_0 = 0;
2201 // Approximately 50 ns
2202 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_1 = 1;
2203 // Approximately 100 ns
2204 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_2 = 2;
2205 // Approximately 200 ns
2206 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_3 = 3;
2207
2208 // eUSCI_Ax Baud Rate Control Word Register
2209 // Reset value: 0x00000000
2210 BEGIN_TYPE(UCAxBRW_t, uint16_t)
2211 // Clock prescaler setting of the Baud rate generator
2212 ADD_BITFIELD_RW(UCBR, 0, 16)
2213 END_TYPE()
2214
2215 // eUSCI_Ax Modulation Control Word Register
2216 // Reset value: 0x00000000
2217 BEGIN_TYPE(UCAxMCTLW_t, uint16_t)
2218 // Oversampling mode enabled
2219 ADD_BITFIELD_RW(UCOS16, 0, 1)
2220 // First modulation stage select
2221 ADD_BITFIELD_RW(UCBRF, 4, 4)
2222 // Second modulation stage select
2223 ADD_BITFIELD_RW(UCBRS, 8, 8)
2224 END_TYPE()
2225
2226 // Disabled
2227 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_0 = 0;
2228 // Enabled
2229 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_1 = 1;
2230
2231 // eUSCI_Ax Status Register
2232 // Reset value: 0x00000000
2233 BEGIN_TYPE(UCAxSTATW_t, uint16_t)
2234 // eUSCI_A busy
2235 ADD_BITFIELD_RO(UCBUSY, 0, 1)
2236 // Address received / Idle line detected
2237 ADD_BITFIELD_RW(UCADDR_UCIDLE, 1, 1)
2238 // Receive error flag
2239 ADD_BITFIELD_RW(UCRXERR, 2, 1)
2240 // Break detect flag
2241 ADD_BITFIELD_RW(UCBRK, 3, 1)
2242 // Parity error flag. When UCPEN = 0, UCPE is read as 0. UCPE is cleared when UCAxRXBUF is read.
2243 ADD_BITFIELD_RW(UCPE, 4, 1)
2244 // Overrun error flag
2245 ADD_BITFIELD_RW(UCOE, 5, 1)
2246 // Framing error flag
2247 ADD_BITFIELD_RW(UCFE, 6, 1)
2248 // Listen enable
2249 ADD_BITFIELD_RW(UCLISTEN, 7, 1)
2250 END_TYPE()
2251
2252 // eUSCI_A inactive
2253 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_0 = 0;
2254 // eUSCI_A transmitting or receiving
2255 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_1 = 1;
2256 // No receive errors detected
2257 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_0 = 0;
2258 // Receive error detected
2259 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_1 = 1;
2260 // No break condition
2261 static const uint32_t UCAxSTATW_UCBRK__UCBRK_0 = 0;
2262 // Break condition occurred
2263 static const uint32_t UCAxSTATW_UCBRK__UCBRK_1 = 1;
2264 // No error
2265 static const uint32_t UCAxSTATW_UCPE__UCPE_0 = 0;
2266 // Character received with parity error
2267 static const uint32_t UCAxSTATW_UCPE__UCPE_1 = 1;
2268 // No error
2269 static const uint32_t UCAxSTATW_UCOE__UCOE_0 = 0;
2270 // Overrun error occurred
2271 static const uint32_t UCAxSTATW_UCOE__UCOE_1 = 1;
2272 // No error
2273 static const uint32_t UCAxSTATW_UCFE__UCFE_0 = 0;
2274 // Character received with low stop bit
2275 static const uint32_t UCAxSTATW_UCFE__UCFE_1 = 1;
2276 // Disabled
2277 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_0 = 0;
2278 // Enabled. UCAxTXD is internally fed back to the receiver
2279 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_1 = 1;
2280
2281 // eUSCI_Ax Receive Buffer Register
2282 // Reset value: 0x00000000
2283 BEGIN_TYPE(UCAxRXBUF_t, uint16_t)
2284 // Receive data buffer
2285 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
2286 END_TYPE()
2287
2288 // eUSCI_Ax Transmit Buffer Register
2289 // Reset value: 0x00000000
2290 BEGIN_TYPE(UCAxTXBUF_t, uint16_t)
2291 // Transmit data buffer
2292 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
2293 END_TYPE()
2294
2295 // eUSCI_Ax Auto Baud Rate Control Register
2296 // Reset value: 0x00000000
2297 BEGIN_TYPE(UCAxABCTL_t, uint16_t)
2298 // Automatic baud-rate detect enable
2299 ADD_BITFIELD_RW(UCABDEN, 0, 1)
2300 // Break time out error
2301 ADD_BITFIELD_RW(UCBTOE, 2, 1)
2302 // Synch field time out error
2303 ADD_BITFIELD_RW(UCSTOE, 3, 1)
2304 // Break/synch delimiter length
2305 ADD_BITFIELD_RW(UCDELIM, 4, 2)
2306 END_TYPE()
2307
2308 // Baud-rate detection disabled. Length of break and synch field is not measured.
2309 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_0 = 0;
2310 // Baud-rate detection enabled. Length of break and synch field is measured and baud-rate settings are changed accordingly.
2311 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_1 = 1;
2312 // No error
2313 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_0 = 0;
2314 // Length of break field exceeded 22 bit times
2315 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_1 = 1;
2316 // No error
2317 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_0 = 0;
2318 // Length of synch field exceeded measurable time
2319 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_1 = 1;
2320 // 1 bit time
2321 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_0 = 0;
2322 // 2 bit times
2323 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_1 = 1;
2324 // 3 bit times
2325 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_2 = 2;
2326 // 4 bit times
2327 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_3 = 3;
2328
2329 // eUSCI_Ax IrDA Control Word Register
2330 // Reset value: 0x00000000
2331 BEGIN_TYPE(UCAxIRCTL_t, uint16_t)
2332 // IrDA encoder/decoder enable
2333 ADD_BITFIELD_RW(UCIREN, 0, 1)
2334 // IrDA transmit pulse clock select
2335 ADD_BITFIELD_RW(UCIRTXCLK, 1, 1)
2336 // Transmit pulse length
2337 ADD_BITFIELD_RW(UCIRTXPL, 2, 6)
2338 // IrDA receive filter enabled
2339 ADD_BITFIELD_RW(UCIRRXFE, 8, 1)
2340 // IrDA receive input UCAxRXD polarity
2341 ADD_BITFIELD_RW(UCIRRXPL, 9, 1)
2342 // Receive filter length
2343 ADD_BITFIELD_RW(UCIRRXFL, 10, 4)
2344 END_TYPE()
2345
2346 // IrDA encoder/decoder disabled
2347 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_0 = 0;
2348 // IrDA encoder/decoder enabled
2349 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_1 = 1;
2350 // BRCLK
2351 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_0 = 0;
2352 // BITCLK16 when UCOS16 = 1. Otherwise, BRCLK.
2353 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_1 = 1;
2354 // Receive filter disabled
2355 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_0 = 0;
2356 // Receive filter enabled
2357 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_1 = 1;
2358 // IrDA transceiver delivers a high pulse when a light pulse is seen
2359 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_0 = 0;
2360 // IrDA transceiver delivers a low pulse when a light pulse is seen
2361 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_1 = 1;
2362
2363 // eUSCI_Ax Interrupt Enable Register
2364 // Reset value: 0x00000000
2365 BEGIN_TYPE(UCAxIE_t, uint16_t)
2366 // Receive interrupt enable
2367 ADD_BITFIELD_RW(UCRXIE, 0, 1)
2368 // Transmit interrupt enable
2369 ADD_BITFIELD_RW(UCTXIE, 1, 1)
2370 // Start bit interrupt enable
2371 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
2372 // Transmit complete interrupt enable
2373 ADD_BITFIELD_RW(UCTXCPTIE, 3, 1)
2374 END_TYPE()
2375
2376 // Interrupt disabled
2377 static const uint32_t UCAxIE_UCRXIE__UCRXIE_0 = 0;
2378 // Interrupt enabled
2379 static const uint32_t UCAxIE_UCRXIE__UCRXIE_1 = 1;
2380 // Interrupt disabled
2381 static const uint32_t UCAxIE_UCTXIE__UCTXIE_0 = 0;
2382 // Interrupt enabled
2383 static const uint32_t UCAxIE_UCTXIE__UCTXIE_1 = 1;
2384 // Interrupt disabled
2385 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_0 = 0;
2386 // Interrupt enabled
2387 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_1 = 1;
2388 // Interrupt disabled
2389 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_0 = 0;
2390 // Interrupt enabled
2391 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_1 = 1;
2392
2393 // eUSCI_Ax Interrupt Flag Register
2394 // Reset value: 0x00000002
2395 BEGIN_TYPE(UCAxIFG_t, uint16_t)
2396 // Receive interrupt flag
2397 ADD_BITFIELD_RW(UCRXIFG, 0, 1)
2398 // Transmit interrupt flag
2399 ADD_BITFIELD_RW(UCTXIFG, 1, 1)
2400 // Start bit interrupt flag
2401 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
2402 // Transmit ready interrupt enable
2403 ADD_BITFIELD_RW(UCTXCPTIFG, 3, 1)
2404 END_TYPE()
2405
2406 // No interrupt pending
2407 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_0 = 0;
2408 // Interrupt pending
2409 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_1 = 1;
2410 // No interrupt pending
2411 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_0 = 0;
2412 // Interrupt pending
2413 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_1 = 1;
2414 // No interrupt pending
2415 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
2416 // Interrupt pending
2417 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
2418 // No interrupt pending
2419 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_0 = 0;
2420 // Interrupt pending
2421 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_1 = 1;
2422
2423 // eUSCI_Ax Interrupt Vector Register
2424 // Reset value: 0x00000000
2425 BEGIN_TYPE(UCAxIV_t, uint16_t)
2426 // eUSCI_A interrupt vector value
2427 ADD_BITFIELD_RO(UCIV, 0, 16)
2428 END_TYPE()
2429
2430 // No interrupt pending
2431 static const uint32_t UCAxIV_UCIV__UCIV_0 = 0;
2432 // Interrupt Source: Receive buffer full; Interrupt Flag: UCRXIFG; Interrupt Priority: Highest
2433 static const uint32_t UCAxIV_UCIV__UCIV_2 = 2;
2434 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG
2435 static const uint32_t UCAxIV_UCIV__UCIV_4 = 4;
2436 // Interrupt Source: Start bit received; Interrupt Flag: UCSTTIFG
2437 static const uint32_t UCAxIV_UCIV__UCIV_6 = 6;
2438 // Interrupt Source: Transmit complete; Interrupt Flag: UCTXCPTIFG; Interrupt Priority: Lowest
2439 static const uint32_t UCAxIV_UCIV__UCIV_8 = 8;
2440
2441 struct EUSCI_A2_t {
2442 UCAxCTLW0_t UCAxCTLW0;
2443 UCAxCTLW1_t UCAxCTLW1;
2444 uint16_t reserved0;
2445 UCAxBRW_t UCAxBRW;
2446 UCAxMCTLW_t UCAxMCTLW;
2447 UCAxSTATW_t UCAxSTATW;
2448 UCAxRXBUF_t UCAxRXBUF;
2449 UCAxTXBUF_t UCAxTXBUF;
2450 UCAxABCTL_t UCAxABCTL;
2451 UCAxIRCTL_t UCAxIRCTL;
2452 uint16_t reserved1[3];
2453 UCAxIE_t UCAxIE;
2454 UCAxIFG_t UCAxIFG;
2455 UCAxIV_t UCAxIV;
2456 };
2457
2458 static EUSCI_A2_t & EUSCI_A2 = (*(EUSCI_A2_t *)0x40001800);
2459
2460} // _EUSCI_A2_
2461
2462// EUSCI_A3
2463namespace _EUSCI_A3_ {
2464
2465 // eUSCI_Ax Control Word Register 0
2466 // Reset value: 0x00000001
2467 BEGIN_TYPE(UCAxCTLW0_t, uint16_t)
2468 // Software reset enable
2469 ADD_BITFIELD_RW(UCSWRST, 0, 1)
2470 // Transmit break
2471 ADD_BITFIELD_RW(UCTXBRK, 1, 1)
2472 // Transmit address
2473 ADD_BITFIELD_RW(UCTXADDR, 2, 1)
2474 // Dormant
2475 ADD_BITFIELD_RW(UCDORM, 3, 1)
2476 // Receive break character interrupt enable
2477 ADD_BITFIELD_RW(UCBRKIE, 4, 1)
2478 // Receive erroneous-character interrupt enable
2479 ADD_BITFIELD_RW(UCRXEIE, 5, 1)
2480 // eUSCI_A clock source select
2481 ADD_BITFIELD_RW(UCSSEL, 6, 2)
2482 // Synchronous mode enable
2483 ADD_BITFIELD_RW(UCSYNC, 8, 1)
2484 // eUSCI_A mode
2485 ADD_BITFIELD_RW(UCMODE, 9, 2)
2486 // Stop bit select
2487 ADD_BITFIELD_RW(UCSPB, 11, 1)
2488 // Character length
2489 ADD_BITFIELD_RW(UC7BIT, 12, 1)
2490 // MSB first select
2491 ADD_BITFIELD_RW(UCMSB, 13, 1)
2492 // Parity select
2493 ADD_BITFIELD_RW(UCPAR, 14, 1)
2494 // Parity enable
2495 ADD_BITFIELD_RW(UCPEN, 15, 1)
2496 END_TYPE()
2497
2498 // Disabled. eUSCI_A reset released for operation
2499 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_0 = 0;
2500 // Enabled. eUSCI_A logic held in reset state
2501 static const uint32_t UCAxCTLW0_UCSWRST__UCSWRST_1 = 1;
2502 // Next frame transmitted is not a break
2503 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_0 = 0;
2504 // Next frame transmitted is a break or a break/synch
2505 static const uint32_t UCAxCTLW0_UCTXBRK__UCTXBRK_1 = 1;
2506 // Next frame transmitted is data
2507 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_0 = 0;
2508 // Next frame transmitted is an address
2509 static const uint32_t UCAxCTLW0_UCTXADDR__UCTXADDR_1 = 1;
2510 // Not dormant. All received characters set UCRXIFG.
2511 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_0 = 0;
2512 // Dormant. Only characters that are preceded by an idle-line or with address bit set UCRXIFG. In UART mode with automatic baud-rate detection, only the combination of a break and synch field sets UCRXIFG.
2513 static const uint32_t UCAxCTLW0_UCDORM__UCDORM_1 = 1;
2514 // Received break characters do not set UCRXIFG
2515 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_0 = 0;
2516 // Received break characters set UCRXIFG
2517 static const uint32_t UCAxCTLW0_UCBRKIE__UCBRKIE_1 = 1;
2518 // Erroneous characters rejected and UCRXIFG is not set
2519 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_0 = 0;
2520 // Erroneous characters received set UCRXIFG
2521 static const uint32_t UCAxCTLW0_UCRXEIE__UCRXEIE_1 = 1;
2522 // UCLK
2523 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_0 = 0;
2524 // ACLK
2525 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_1 = 1;
2526 // SMCLK
2527 static const uint32_t UCAxCTLW0_UCSSEL__UCSSEL_2 = 2;
2528 // Asynchronous mode
2529 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_0 = 0;
2530 // Synchronous mode
2531 static const uint32_t UCAxCTLW0_UCSYNC__UCSYNC_1 = 1;
2532 // UART mode
2533 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_0 = 0;
2534 // Idle-line multiprocessor mode
2535 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_1 = 1;
2536 // Address-bit multiprocessor mode
2537 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_2 = 2;
2538 // UART mode with automatic baud-rate detection
2539 static const uint32_t UCAxCTLW0_UCMODE__UCMODE_3 = 3;
2540 // One stop bit
2541 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_0 = 0;
2542 // Two stop bits
2543 static const uint32_t UCAxCTLW0_UCSPB__UCSPB_1 = 1;
2544 // 8-bit data
2545 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_0 = 0;
2546 // 7-bit data
2547 static const uint32_t UCAxCTLW0_UC7BIT__UC7BIT_1 = 1;
2548 // LSB first
2549 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_0 = 0;
2550 // MSB first
2551 static const uint32_t UCAxCTLW0_UCMSB__UCMSB_1 = 1;
2552 // Odd parity
2553 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_0 = 0;
2554 // Even parity
2555 static const uint32_t UCAxCTLW0_UCPAR__UCPAR_1 = 1;
2556 // Parity disabled
2557 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_0 = 0;
2558 // Parity enabled. Parity bit is generated (UCAxTXD) and expected (UCAxRXD). In address-bit multiprocessor mode, the address bit is included in the parity calculation.
2559 static const uint32_t UCAxCTLW0_UCPEN__UCPEN_1 = 1;
2560
2561 // eUSCI_Ax Control Word Register 1
2562 // Reset value: 0x00000003
2563 BEGIN_TYPE(UCAxCTLW1_t, uint16_t)
2564 // Deglitch time
2565 ADD_BITFIELD_RW(UCGLIT, 0, 2)
2566 END_TYPE()
2567
2568 // Approximately 2 ns (equivalent of 1 delay element)
2569 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_0 = 0;
2570 // Approximately 50 ns
2571 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_1 = 1;
2572 // Approximately 100 ns
2573 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_2 = 2;
2574 // Approximately 200 ns
2575 static const uint32_t UCAxCTLW1_UCGLIT__UCGLIT_3 = 3;
2576
2577 // eUSCI_Ax Baud Rate Control Word Register
2578 // Reset value: 0x00000000
2579 BEGIN_TYPE(UCAxBRW_t, uint16_t)
2580 // Clock prescaler setting of the Baud rate generator
2581 ADD_BITFIELD_RW(UCBR, 0, 16)
2582 END_TYPE()
2583
2584 // eUSCI_Ax Modulation Control Word Register
2585 // Reset value: 0x00000000
2586 BEGIN_TYPE(UCAxMCTLW_t, uint16_t)
2587 // Oversampling mode enabled
2588 ADD_BITFIELD_RW(UCOS16, 0, 1)
2589 // First modulation stage select
2590 ADD_BITFIELD_RW(UCBRF, 4, 4)
2591 // Second modulation stage select
2592 ADD_BITFIELD_RW(UCBRS, 8, 8)
2593 END_TYPE()
2594
2595 // Disabled
2596 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_0 = 0;
2597 // Enabled
2598 static const uint32_t UCAxMCTLW_UCOS16__UCOS16_1 = 1;
2599
2600 // eUSCI_Ax Status Register
2601 // Reset value: 0x00000000
2602 BEGIN_TYPE(UCAxSTATW_t, uint16_t)
2603 // eUSCI_A busy
2604 ADD_BITFIELD_RO(UCBUSY, 0, 1)
2605 // Address received / Idle line detected
2606 ADD_BITFIELD_RW(UCADDR_UCIDLE, 1, 1)
2607 // Receive error flag
2608 ADD_BITFIELD_RW(UCRXERR, 2, 1)
2609 // Break detect flag
2610 ADD_BITFIELD_RW(UCBRK, 3, 1)
2611 // Parity error flag. When UCPEN = 0, UCPE is read as 0. UCPE is cleared when UCAxRXBUF is read.
2612 ADD_BITFIELD_RW(UCPE, 4, 1)
2613 // Overrun error flag
2614 ADD_BITFIELD_RW(UCOE, 5, 1)
2615 // Framing error flag
2616 ADD_BITFIELD_RW(UCFE, 6, 1)
2617 // Listen enable
2618 ADD_BITFIELD_RW(UCLISTEN, 7, 1)
2619 END_TYPE()
2620
2621 // eUSCI_A inactive
2622 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_0 = 0;
2623 // eUSCI_A transmitting or receiving
2624 static const uint32_t UCAxSTATW_UCBUSY__UCBUSY_1 = 1;
2625 // No receive errors detected
2626 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_0 = 0;
2627 // Receive error detected
2628 static const uint32_t UCAxSTATW_UCRXERR__UCRXERR_1 = 1;
2629 // No break condition
2630 static const uint32_t UCAxSTATW_UCBRK__UCBRK_0 = 0;
2631 // Break condition occurred
2632 static const uint32_t UCAxSTATW_UCBRK__UCBRK_1 = 1;
2633 // No error
2634 static const uint32_t UCAxSTATW_UCPE__UCPE_0 = 0;
2635 // Character received with parity error
2636 static const uint32_t UCAxSTATW_UCPE__UCPE_1 = 1;
2637 // No error
2638 static const uint32_t UCAxSTATW_UCOE__UCOE_0 = 0;
2639 // Overrun error occurred
2640 static const uint32_t UCAxSTATW_UCOE__UCOE_1 = 1;
2641 // No error
2642 static const uint32_t UCAxSTATW_UCFE__UCFE_0 = 0;
2643 // Character received with low stop bit
2644 static const uint32_t UCAxSTATW_UCFE__UCFE_1 = 1;
2645 // Disabled
2646 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_0 = 0;
2647 // Enabled. UCAxTXD is internally fed back to the receiver
2648 static const uint32_t UCAxSTATW_UCLISTEN__UCLISTEN_1 = 1;
2649
2650 // eUSCI_Ax Receive Buffer Register
2651 // Reset value: 0x00000000
2652 BEGIN_TYPE(UCAxRXBUF_t, uint16_t)
2653 // Receive data buffer
2654 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
2655 END_TYPE()
2656
2657 // eUSCI_Ax Transmit Buffer Register
2658 // Reset value: 0x00000000
2659 BEGIN_TYPE(UCAxTXBUF_t, uint16_t)
2660 // Transmit data buffer
2661 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
2662 END_TYPE()
2663
2664 // eUSCI_Ax Auto Baud Rate Control Register
2665 // Reset value: 0x00000000
2666 BEGIN_TYPE(UCAxABCTL_t, uint16_t)
2667 // Automatic baud-rate detect enable
2668 ADD_BITFIELD_RW(UCABDEN, 0, 1)
2669 // Break time out error
2670 ADD_BITFIELD_RW(UCBTOE, 2, 1)
2671 // Synch field time out error
2672 ADD_BITFIELD_RW(UCSTOE, 3, 1)
2673 // Break/synch delimiter length
2674 ADD_BITFIELD_RW(UCDELIM, 4, 2)
2675 END_TYPE()
2676
2677 // Baud-rate detection disabled. Length of break and synch field is not measured.
2678 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_0 = 0;
2679 // Baud-rate detection enabled. Length of break and synch field is measured and baud-rate settings are changed accordingly.
2680 static const uint32_t UCAxABCTL_UCABDEN__UCABDEN_1 = 1;
2681 // No error
2682 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_0 = 0;
2683 // Length of break field exceeded 22 bit times
2684 static const uint32_t UCAxABCTL_UCBTOE__UCBTOE_1 = 1;
2685 // No error
2686 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_0 = 0;
2687 // Length of synch field exceeded measurable time
2688 static const uint32_t UCAxABCTL_UCSTOE__UCSTOE_1 = 1;
2689 // 1 bit time
2690 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_0 = 0;
2691 // 2 bit times
2692 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_1 = 1;
2693 // 3 bit times
2694 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_2 = 2;
2695 // 4 bit times
2696 static const uint32_t UCAxABCTL_UCDELIM__UCDELIM_3 = 3;
2697
2698 // eUSCI_Ax IrDA Control Word Register
2699 // Reset value: 0x00000000
2700 BEGIN_TYPE(UCAxIRCTL_t, uint16_t)
2701 // IrDA encoder/decoder enable
2702 ADD_BITFIELD_RW(UCIREN, 0, 1)
2703 // IrDA transmit pulse clock select
2704 ADD_BITFIELD_RW(UCIRTXCLK, 1, 1)
2705 // Transmit pulse length
2706 ADD_BITFIELD_RW(UCIRTXPL, 2, 6)
2707 // IrDA receive filter enabled
2708 ADD_BITFIELD_RW(UCIRRXFE, 8, 1)
2709 // IrDA receive input UCAxRXD polarity
2710 ADD_BITFIELD_RW(UCIRRXPL, 9, 1)
2711 // Receive filter length
2712 ADD_BITFIELD_RW(UCIRRXFL, 10, 4)
2713 END_TYPE()
2714
2715 // IrDA encoder/decoder disabled
2716 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_0 = 0;
2717 // IrDA encoder/decoder enabled
2718 static const uint32_t UCAxIRCTL_UCIREN__UCIREN_1 = 1;
2719 // BRCLK
2720 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_0 = 0;
2721 // BITCLK16 when UCOS16 = 1. Otherwise, BRCLK.
2722 static const uint32_t UCAxIRCTL_UCIRTXCLK__UCIRTXCLK_1 = 1;
2723 // Receive filter disabled
2724 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_0 = 0;
2725 // Receive filter enabled
2726 static const uint32_t UCAxIRCTL_UCIRRXFE__UCIRRXFE_1 = 1;
2727 // IrDA transceiver delivers a high pulse when a light pulse is seen
2728 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_0 = 0;
2729 // IrDA transceiver delivers a low pulse when a light pulse is seen
2730 static const uint32_t UCAxIRCTL_UCIRRXPL__UCIRRXPL_1 = 1;
2731
2732 // eUSCI_Ax Interrupt Enable Register
2733 // Reset value: 0x00000000
2734 BEGIN_TYPE(UCAxIE_t, uint16_t)
2735 // Receive interrupt enable
2736 ADD_BITFIELD_RW(UCRXIE, 0, 1)
2737 // Transmit interrupt enable
2738 ADD_BITFIELD_RW(UCTXIE, 1, 1)
2739 // Start bit interrupt enable
2740 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
2741 // Transmit complete interrupt enable
2742 ADD_BITFIELD_RW(UCTXCPTIE, 3, 1)
2743 END_TYPE()
2744
2745 // Interrupt disabled
2746 static const uint32_t UCAxIE_UCRXIE__UCRXIE_0 = 0;
2747 // Interrupt enabled
2748 static const uint32_t UCAxIE_UCRXIE__UCRXIE_1 = 1;
2749 // Interrupt disabled
2750 static const uint32_t UCAxIE_UCTXIE__UCTXIE_0 = 0;
2751 // Interrupt enabled
2752 static const uint32_t UCAxIE_UCTXIE__UCTXIE_1 = 1;
2753 // Interrupt disabled
2754 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_0 = 0;
2755 // Interrupt enabled
2756 static const uint32_t UCAxIE_UCSTTIE__UCSTTIE_1 = 1;
2757 // Interrupt disabled
2758 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_0 = 0;
2759 // Interrupt enabled
2760 static const uint32_t UCAxIE_UCTXCPTIE__UCTXCPTIE_1 = 1;
2761
2762 // eUSCI_Ax Interrupt Flag Register
2763 // Reset value: 0x00000002
2764 BEGIN_TYPE(UCAxIFG_t, uint16_t)
2765 // Receive interrupt flag
2766 ADD_BITFIELD_RW(UCRXIFG, 0, 1)
2767 // Transmit interrupt flag
2768 ADD_BITFIELD_RW(UCTXIFG, 1, 1)
2769 // Start bit interrupt flag
2770 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
2771 // Transmit ready interrupt enable
2772 ADD_BITFIELD_RW(UCTXCPTIFG, 3, 1)
2773 END_TYPE()
2774
2775 // No interrupt pending
2776 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_0 = 0;
2777 // Interrupt pending
2778 static const uint32_t UCAxIFG_UCRXIFG__UCRXIFG_1 = 1;
2779 // No interrupt pending
2780 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_0 = 0;
2781 // Interrupt pending
2782 static const uint32_t UCAxIFG_UCTXIFG__UCTXIFG_1 = 1;
2783 // No interrupt pending
2784 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
2785 // Interrupt pending
2786 static const uint32_t UCAxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
2787 // No interrupt pending
2788 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_0 = 0;
2789 // Interrupt pending
2790 static const uint32_t UCAxIFG_UCTXCPTIFG__UCTXCPTIFG_1 = 1;
2791
2792 // eUSCI_Ax Interrupt Vector Register
2793 // Reset value: 0x00000000
2794 BEGIN_TYPE(UCAxIV_t, uint16_t)
2795 // eUSCI_A interrupt vector value
2796 ADD_BITFIELD_RO(UCIV, 0, 16)
2797 END_TYPE()
2798
2799 // No interrupt pending
2800 static const uint32_t UCAxIV_UCIV__UCIV_0 = 0;
2801 // Interrupt Source: Receive buffer full; Interrupt Flag: UCRXIFG; Interrupt Priority: Highest
2802 static const uint32_t UCAxIV_UCIV__UCIV_2 = 2;
2803 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG
2804 static const uint32_t UCAxIV_UCIV__UCIV_4 = 4;
2805 // Interrupt Source: Start bit received; Interrupt Flag: UCSTTIFG
2806 static const uint32_t UCAxIV_UCIV__UCIV_6 = 6;
2807 // Interrupt Source: Transmit complete; Interrupt Flag: UCTXCPTIFG; Interrupt Priority: Lowest
2808 static const uint32_t UCAxIV_UCIV__UCIV_8 = 8;
2809
2810 struct EUSCI_A3_t {
2811 UCAxCTLW0_t UCAxCTLW0;
2812 UCAxCTLW1_t UCAxCTLW1;
2813 uint16_t reserved0;
2814 UCAxBRW_t UCAxBRW;
2815 UCAxMCTLW_t UCAxMCTLW;
2816 UCAxSTATW_t UCAxSTATW;
2817 UCAxRXBUF_t UCAxRXBUF;
2818 UCAxTXBUF_t UCAxTXBUF;
2819 UCAxABCTL_t UCAxABCTL;
2820 UCAxIRCTL_t UCAxIRCTL;
2821 uint16_t reserved1[3];
2822 UCAxIE_t UCAxIE;
2823 UCAxIFG_t UCAxIFG;
2824 UCAxIV_t UCAxIV;
2825 };
2826
2827 static EUSCI_A3_t & EUSCI_A3 = (*(EUSCI_A3_t *)0x40001c00);
2828
2829} // _EUSCI_A3_
2830
2831// EUSCI_B0
2832namespace _EUSCI_B0_ {
2833
2834 // eUSCI_Bx Control Word Register 0
2835 // Reset value: 0x000001c1
2836 BEGIN_TYPE(UCBxCTLW0_t, uint16_t)
2837 // Software reset enable
2838 ADD_BITFIELD_RW(UCSWRST, 0, 1)
2839 // Transmit START condition in master mode
2840 ADD_BITFIELD_RW(UCTXSTT, 1, 1)
2841 // Transmit STOP condition in master mode
2842 ADD_BITFIELD_RW(UCTXSTP, 2, 1)
2843 // Transmit a NACK
2844 ADD_BITFIELD_RW(UCTXNACK, 3, 1)
2845 // Transmitter/receiver
2846 ADD_BITFIELD_RW(UCTR, 4, 1)
2847 // Transmit ACK condition in slave mode
2848 ADD_BITFIELD_RW(UCTXACK, 5, 1)
2849 // eUSCI_B clock source select
2850 ADD_BITFIELD_RW(UCSSEL, 6, 2)
2851 // Synchronous mode enable
2852 ADD_BITFIELD_RW(UCSYNC, 8, 1)
2853 // eUSCI_B mode
2854 ADD_BITFIELD_RW(UCMODE, 9, 2)
2855 // Master mode select
2856 ADD_BITFIELD_RW(UCMST, 11, 1)
2857 // Multi-master environment select
2858 ADD_BITFIELD_RW(UCMM, 13, 1)
2859 // Slave addressing mode select
2860 ADD_BITFIELD_RW(UCSLA10, 14, 1)
2861 // Own addressing mode select
2862 ADD_BITFIELD_RW(UCA10, 15, 1)
2863 END_TYPE()
2864
2865 // Disabled. eUSCI_B reset released for operation
2866 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_0 = 0;
2867 // Enabled. eUSCI_B logic held in reset state
2868 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_1 = 1;
2869 // Do not generate START condition
2870 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_0 = 0;
2871 // Generate START condition
2872 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_1 = 1;
2873 // No STOP generated
2874 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_0 = 0;
2875 // Generate STOP
2876 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_1 = 1;
2877 // Acknowledge normally
2878 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_0 = 0;
2879 // Generate NACK
2880 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_1 = 1;
2881 // Receiver
2882 static const uint32_t UCBxCTLW0_UCTR__UCTR_0 = 0;
2883 // Transmitter
2884 static const uint32_t UCBxCTLW0_UCTR__UCTR_1 = 1;
2885 // Do not acknowledge the slave address
2886 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_0 = 0;
2887 // Acknowledge the slave address
2888 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_1 = 1;
2889 // UCLKI
2890 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_0 = 0;
2891 // ACLK
2892 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_1 = 1;
2893 // SMCLK
2894 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_2 = 2;
2895 // SMCLK
2896 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_3 = 3;
2897 // Asynchronous mode
2898 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_0 = 0;
2899 // Synchronous mode
2900 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_1 = 1;
2901 // 3-pin SPI
2902 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_0 = 0;
2903 // 4-pin SPI (master or slave enabled if STE = 1)
2904 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_1 = 1;
2905 // 4-pin SPI (master or slave enabled if STE = 0)
2906 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_2 = 2;
2907 // I2C mode
2908 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_3 = 3;
2909 // Slave mode
2910 static const uint32_t UCBxCTLW0_UCMST__UCMST_0 = 0;
2911 // Master mode
2912 static const uint32_t UCBxCTLW0_UCMST__UCMST_1 = 1;
2913 // Single master environment. There is no other master in the system. The address compare unit is disabled.
2914 static const uint32_t UCBxCTLW0_UCMM__UCMM_0 = 0;
2915 // Multi-master environment
2916 static const uint32_t UCBxCTLW0_UCMM__UCMM_1 = 1;
2917 // Address slave with 7-bit address
2918 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_0 = 0;
2919 // Address slave with 10-bit address
2920 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_1 = 1;
2921 // Own address is a 7-bit address
2922 static const uint32_t UCBxCTLW0_UCA10__UCA10_0 = 0;
2923 // Own address is a 10-bit address
2924 static const uint32_t UCBxCTLW0_UCA10__UCA10_1 = 1;
2925
2926 // eUSCI_Bx Control Word Register 1
2927 // Reset value: 0x00000003
2928 BEGIN_TYPE(UCBxCTLW1_t, uint16_t)
2929 // Deglitch time
2930 ADD_BITFIELD_RW(UCGLIT, 0, 2)
2931 // Automatic STOP condition generation
2932 ADD_BITFIELD_RW(UCASTP, 2, 2)
2933 // SW or HW ACK control
2934 ADD_BITFIELD_RW(UCSWACK, 4, 1)
2935 // ACK all master bytes
2936 ADD_BITFIELD_RW(UCSTPNACK, 5, 1)
2937 // Clock low timeout select
2938 ADD_BITFIELD_RW(UCCLTO, 6, 2)
2939 // Early UCTXIFG0
2940 ADD_BITFIELD_RW(UCETXINT, 8, 1)
2941 END_TYPE()
2942
2943 // 50 ns
2944 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_0 = 0;
2945 // 25 ns
2946 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_1 = 1;
2947 // 12.5 ns
2948 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_2 = 2;
2949 // 6.25 ns
2950 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_3 = 3;
2951 // No automatic STOP generation. The STOP condition is generated after the user sets the UCTXSTP bit. The value in UCBxTBCNT is a don't care.
2952 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_0 = 0;
2953 // UCBCNTIFG is set with the byte counter reaches the threshold defined in UCBxTBCNT
2954 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_1 = 1;
2955 // A STOP condition is generated automatically after the byte counter value reached UCBxTBCNT. UCBCNTIFG is set with the byte counter reaching the threshold
2956 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_2 = 2;
2957 // The address acknowledge of the slave is controlled by the eUSCI_B module
2958 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_0 = 0;
2959 // The user needs to trigger the sending of the address ACK by issuing UCTXACK
2960 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_1 = 1;
2961 // Send a non-acknowledge before the STOP condition as a master receiver (conform to I2C standard)
2962 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_0 = 0;
2963 // All bytes are acknowledged by the eUSCI_B when configured as master receiver
2964 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_1 = 1;
2965 // Disable clock low timeout counter
2966 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_0 = 0;
2967 // 135 000 SYSCLK cycles (approximately 28 ms)
2968 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_1 = 1;
2969 // 150 000 SYSCLK cycles (approximately 31 ms)
2970 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_2 = 2;
2971 // 165 000 SYSCLK cycles (approximately 34 ms)
2972 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_3 = 3;
2973 // UCTXIFGx is set after an address match with UCxI2COAx and the direction bit indicating slave transmit
2974 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_0 = 0;
2975 // UCTXIFG0 is set for each START condition
2976 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_1 = 1;
2977
2978 // eUSCI_Bx Baud Rate Control Word Register
2979 // Reset value: 0x00000000
2980 BEGIN_TYPE(UCBxBRW_t, uint16_t)
2981 // Bit clock prescaler
2982 ADD_BITFIELD_RW(UCBR, 0, 16)
2983 END_TYPE()
2984
2985 // eUSCI_Bx Status Register
2986 // Reset value: 0x00000000
2987 BEGIN_TYPE(UCBxSTATW_t, uint16_t)
2988 // Bus busy
2989 ADD_BITFIELD_RO(UCBBUSY, 4, 1)
2990 // General call address received
2991 ADD_BITFIELD_RO(UCGC, 5, 1)
2992 // SCL low
2993 ADD_BITFIELD_RO(UCSCLLOW, 6, 1)
2994 // Hardware byte counter value
2995 ADD_BITFIELD_RO(UCBCNT, 8, 8)
2996 END_TYPE()
2997
2998 // Bus inactive
2999 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_0 = 0;
3000 // Bus busy
3001 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_1 = 1;
3002 // No general call address received
3003 static const uint32_t UCBxSTATW_UCGC__UCGC_0 = 0;
3004 // General call address received
3005 static const uint32_t UCBxSTATW_UCGC__UCGC_1 = 1;
3006 // SCL is not held low
3007 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_0 = 0;
3008 // SCL is held low
3009 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_1 = 1;
3010
3011 // eUSCI_Bx Byte Counter Threshold Register
3012 // Reset value: 0x00000000
3013 BEGIN_TYPE(UCBxTBCNT_t, uint16_t)
3014 // Byte counter threshold value
3015 ADD_BITFIELD_RW(UCTBCNT, 0, 8)
3016 END_TYPE()
3017
3018 // eUSCI_Bx Receive Buffer Register
3019 // Reset value: 0x00000000
3020 BEGIN_TYPE(UCBxRXBUF_t, uint16_t)
3021 // Receive data buffer
3022 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
3023 END_TYPE()
3024
3025 // eUSCI_Bx Transmit Buffer Register
3026 // Reset value: 0x00000000
3027 BEGIN_TYPE(UCBxTXBUF_t, uint16_t)
3028 // Transmit data buffer
3029 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
3030 END_TYPE()
3031
3032 // eUSCI_Bx I2C Own Address 0 Register
3033 // Reset value: 0x00000000
3034 BEGIN_TYPE(UCBxI2COA0_t, uint16_t)
3035 // I2C own address
3036 ADD_BITFIELD_RW(I2COA0, 0, 10)
3037 // Own Address enable register
3038 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3039 // General call response enable
3040 ADD_BITFIELD_RW(UCGCEN, 15, 1)
3041 END_TYPE()
3042
3043 // The slave address defined in I2COA0 is disabled
3044 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_0 = 0;
3045 // The slave address defined in I2COA0 is enabled
3046 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_1 = 1;
3047 // Do not respond to a general call
3048 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_0 = 0;
3049 // Respond to a general call
3050 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_1 = 1;
3051
3052 // eUSCI_Bx I2C Own Address 1 Register
3053 // Reset value: 0x00000000
3054 BEGIN_TYPE(UCBxI2COA1_t, uint16_t)
3055 // I2C own address
3056 ADD_BITFIELD_RW(I2COA1, 0, 10)
3057 // Own Address enable register
3058 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3059 END_TYPE()
3060
3061 // The slave address defined in I2COA1 is disabled
3062 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_0 = 0;
3063 // The slave address defined in I2COA1 is enabled
3064 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_1 = 1;
3065
3066 // eUSCI_Bx I2C Own Address 2 Register
3067 // Reset value: 0x00000000
3068 BEGIN_TYPE(UCBxI2COA2_t, uint16_t)
3069 // I2C own address
3070 ADD_BITFIELD_RW(I2COA2, 0, 10)
3071 // Own Address enable register
3072 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3073 END_TYPE()
3074
3075 // The slave address defined in I2COA2 is disabled
3076 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_0 = 0;
3077 // The slave address defined in I2COA2 is enabled
3078 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_1 = 1;
3079
3080 // eUSCI_Bx I2C Own Address 3 Register
3081 // Reset value: 0x00000000
3082 BEGIN_TYPE(UCBxI2COA3_t, uint16_t)
3083 // I2C own address
3084 ADD_BITFIELD_RW(I2COA3, 0, 10)
3085 // Own Address enable register
3086 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3087 END_TYPE()
3088
3089 // The slave address defined in I2COA3 is disabled
3090 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_0 = 0;
3091 // The slave address defined in I2COA3 is enabled
3092 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_1 = 1;
3093
3094 // eUSCI_Bx I2C Received Address Register
3095 // Reset value: 0x00000000
3096 BEGIN_TYPE(UCBxADDRX_t, uint16_t)
3097 // Received Address Register
3098 ADD_BITFIELD_RO(ADDRX, 0, 10)
3099 END_TYPE()
3100
3101 // eUSCI_Bx I2C Address Mask Register
3102 // Reset value: 0x000003ff
3103 BEGIN_TYPE(UCBxADDMASK_t, uint16_t)
3104 // Address Mask Register. By clearing the corresponding bit of the own address, this bit is a don't care when comparing the address on the bus to the own address. Using this method, it is possible to react on more than one slave address. When all bits of ADDMASKx are set, the address mask feature is deactivated. Modify only when UCSWRST = 1.
3105 ADD_BITFIELD_RW(ADDMASK, 0, 10)
3106 END_TYPE()
3107
3108 // eUSCI_Bx I2C Slave Address Register
3109 // Reset value: 0x00000000
3110 BEGIN_TYPE(UCBxI2CSA_t, uint16_t)
3111 // I2C slave address
3112 ADD_BITFIELD_RW(I2CSA, 0, 10)
3113 END_TYPE()
3114
3115 // eUSCI_Bx Interrupt Enable Register
3116 // Reset value: 0x00000000
3117 BEGIN_TYPE(UCBxIE_t, uint16_t)
3118 // Receive interrupt enable 0
3119 ADD_BITFIELD_RW(UCRXIE0, 0, 1)
3120 // Transmit interrupt enable 0
3121 ADD_BITFIELD_RW(UCTXIE0, 1, 1)
3122 // START condition interrupt enable
3123 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
3124 // STOP condition interrupt enable
3125 ADD_BITFIELD_RW(UCSTPIE, 3, 1)
3126 // Arbitration lost interrupt enable
3127 ADD_BITFIELD_RW(UCALIE, 4, 1)
3128 // Not-acknowledge interrupt enable
3129 ADD_BITFIELD_RW(UCNACKIE, 5, 1)
3130 // Byte counter interrupt enable
3131 ADD_BITFIELD_RW(UCBCNTIE, 6, 1)
3132 // Clock low timeout interrupt enable
3133 ADD_BITFIELD_RW(UCCLTOIE, 7, 1)
3134 // Receive interrupt enable 1
3135 ADD_BITFIELD_RW(UCRXIE1, 8, 1)
3136 // Transmit interrupt enable 1
3137 ADD_BITFIELD_RW(UCTXIE1, 9, 1)
3138 // Receive interrupt enable 2
3139 ADD_BITFIELD_RW(UCRXIE2, 10, 1)
3140 // Transmit interrupt enable 2
3141 ADD_BITFIELD_RW(UCTXIE2, 11, 1)
3142 // Receive interrupt enable 3
3143 ADD_BITFIELD_RW(UCRXIE3, 12, 1)
3144 // Transmit interrupt enable 3
3145 ADD_BITFIELD_RW(UCTXIE3, 13, 1)
3146 // Bit position 9 interrupt enable
3147 ADD_BITFIELD_RW(UCBIT9IE, 14, 1)
3148 END_TYPE()
3149
3150 // Interrupt disabled
3151 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_0 = 0;
3152 // Interrupt enabled
3153 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_1 = 1;
3154 // Interrupt disabled
3155 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_0 = 0;
3156 // Interrupt enabled
3157 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_1 = 1;
3158 // Interrupt disabled
3159 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_0 = 0;
3160 // Interrupt enabled
3161 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_1 = 1;
3162 // Interrupt disabled
3163 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_0 = 0;
3164 // Interrupt enabled
3165 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_1 = 1;
3166 // Interrupt disabled
3167 static const uint32_t UCBxIE_UCALIE__UCALIE_0 = 0;
3168 // Interrupt enabled
3169 static const uint32_t UCBxIE_UCALIE__UCALIE_1 = 1;
3170 // Interrupt disabled
3171 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_0 = 0;
3172 // Interrupt enabled
3173 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_1 = 1;
3174 // Interrupt disabled
3175 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_0 = 0;
3176 // Interrupt enabled
3177 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_1 = 1;
3178 // Interrupt disabled
3179 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_0 = 0;
3180 // Interrupt enabled
3181 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_1 = 1;
3182 // Interrupt disabled
3183 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_0 = 0;
3184 // Interrupt enabled
3185 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_1 = 1;
3186 // Interrupt disabled
3187 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_0 = 0;
3188 // Interrupt enabled
3189 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_1 = 1;
3190 // Interrupt disabled
3191 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_0 = 0;
3192 // Interrupt enabled
3193 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_1 = 1;
3194 // Interrupt disabled
3195 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_0 = 0;
3196 // Interrupt enabled
3197 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_1 = 1;
3198 // Interrupt disabled
3199 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_0 = 0;
3200 // Interrupt enabled
3201 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_1 = 1;
3202 // Interrupt disabled
3203 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_0 = 0;
3204 // Interrupt enabled
3205 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_1 = 1;
3206 // Interrupt disabled
3207 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_0 = 0;
3208 // Interrupt enabled
3209 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_1 = 1;
3210
3211 // eUSCI_Bx Interrupt Flag Register
3212 // Reset value: 0x00000002
3213 BEGIN_TYPE(UCBxIFG_t, uint16_t)
3214 // eUSCI_B receive interrupt flag 0
3215 ADD_BITFIELD_RW(UCRXIFG0, 0, 1)
3216 // eUSCI_B transmit interrupt flag 0
3217 ADD_BITFIELD_RW(UCTXIFG0, 1, 1)
3218 // START condition interrupt flag
3219 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
3220 // STOP condition interrupt flag
3221 ADD_BITFIELD_RW(UCSTPIFG, 3, 1)
3222 // Arbitration lost interrupt flag
3223 ADD_BITFIELD_RW(UCALIFG, 4, 1)
3224 // Not-acknowledge received interrupt flag
3225 ADD_BITFIELD_RW(UCNACKIFG, 5, 1)
3226 // Byte counter interrupt flag
3227 ADD_BITFIELD_RW(UCBCNTIFG, 6, 1)
3228 // Clock low timeout interrupt flag
3229 ADD_BITFIELD_RW(UCCLTOIFG, 7, 1)
3230 // eUSCI_B receive interrupt flag 1
3231 ADD_BITFIELD_RW(UCRXIFG1, 8, 1)
3232 // eUSCI_B transmit interrupt flag 1
3233 ADD_BITFIELD_RW(UCTXIFG1, 9, 1)
3234 // eUSCI_B receive interrupt flag 2
3235 ADD_BITFIELD_RW(UCRXIFG2, 10, 1)
3236 // eUSCI_B transmit interrupt flag 2
3237 ADD_BITFIELD_RW(UCTXIFG2, 11, 1)
3238 // eUSCI_B receive interrupt flag 3
3239 ADD_BITFIELD_RW(UCRXIFG3, 12, 1)
3240 // eUSCI_B transmit interrupt flag 3
3241 ADD_BITFIELD_RW(UCTXIFG3, 13, 1)
3242 // Bit position 9 interrupt flag
3243 ADD_BITFIELD_RW(UCBIT9IFG, 14, 1)
3244 END_TYPE()
3245
3246 // No interrupt pending
3247 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_0 = 0;
3248 // Interrupt pending
3249 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_1 = 1;
3250 // No interrupt pending
3251 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_0 = 0;
3252 // Interrupt pending
3253 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_1 = 1;
3254 // No interrupt pending
3255 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
3256 // Interrupt pending
3257 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
3258 // No interrupt pending
3259 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_0 = 0;
3260 // Interrupt pending
3261 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_1 = 1;
3262 // No interrupt pending
3263 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_0 = 0;
3264 // Interrupt pending
3265 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_1 = 1;
3266 // No interrupt pending
3267 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_0 = 0;
3268 // Interrupt pending
3269 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_1 = 1;
3270 // No interrupt pending
3271 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_0 = 0;
3272 // Interrupt pending
3273 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_1 = 1;
3274 // No interrupt pending
3275 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_0 = 0;
3276 // Interrupt pending
3277 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_1 = 1;
3278 // No interrupt pending
3279 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_0 = 0;
3280 // Interrupt pending
3281 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_1 = 1;
3282 // No interrupt pending
3283 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_0 = 0;
3284 // Interrupt pending
3285 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_1 = 1;
3286 // No interrupt pending
3287 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_0 = 0;
3288 // Interrupt pending
3289 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_1 = 1;
3290 // No interrupt pending
3291 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_0 = 0;
3292 // Interrupt pending
3293 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_1 = 1;
3294 // No interrupt pending
3295 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_0 = 0;
3296 // Interrupt pending
3297 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_1 = 1;
3298 // No interrupt pending
3299 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_0 = 0;
3300 // Interrupt pending
3301 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_1 = 1;
3302 // No interrupt pending
3303 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_0 = 0;
3304 // Interrupt pending
3305 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_1 = 1;
3306
3307 // eUSCI_Bx Interrupt Vector Register
3308 // Reset value: 0x00000000
3309 BEGIN_TYPE(UCBxIV_t, uint16_t)
3310 // eUSCI_B interrupt vector value
3311 ADD_BITFIELD_RO(UCIV, 0, 16)
3312 END_TYPE()
3313
3314 // No interrupt pending
3315 static const uint32_t UCBxIV_UCIV__UCIV_0 = 0;
3316 // Interrupt Source: Arbitration lost; Interrupt Flag: UCALIFG; Interrupt Priority: Highest
3317 static const uint32_t UCBxIV_UCIV__UCIV_2 = 2;
3318 // Interrupt Source: Not acknowledgment; Interrupt Flag: UCNACKIFG
3319 static const uint32_t UCBxIV_UCIV__UCIV_4 = 4;
3320 // Interrupt Source: Start condition received; Interrupt Flag: UCSTTIFG
3321 static const uint32_t UCBxIV_UCIV__UCIV_6 = 6;
3322 // Interrupt Source: Stop condition received; Interrupt Flag: UCSTPIFG
3323 static const uint32_t UCBxIV_UCIV__UCIV_8 = 8;
3324 // Interrupt Source: Slave 3 Data received; Interrupt Flag: UCRXIFG3
3325 static const uint32_t UCBxIV_UCIV__UCIV_10 = 10;
3326 // Interrupt Source: Slave 3 Transmit buffer empty; Interrupt Flag: UCTXIFG3
3327 static const uint32_t UCBxIV_UCIV__UCIV_12 = 12;
3328 // Interrupt Source: Slave 2 Data received; Interrupt Flag: UCRXIFG2
3329 static const uint32_t UCBxIV_UCIV__UCIV_14 = 14;
3330 // Interrupt Source: Slave 2 Transmit buffer empty; Interrupt Flag: UCTXIFG2
3331 static const uint32_t UCBxIV_UCIV__UCIV_16 = 16;
3332 // Interrupt Source: Slave 1 Data received; Interrupt Flag: UCRXIFG1
3333 static const uint32_t UCBxIV_UCIV__UCIV_18 = 18;
3334 // Interrupt Source: Slave 1 Transmit buffer empty; Interrupt Flag: UCTXIFG1
3335 static const uint32_t UCBxIV_UCIV__UCIV_20 = 20;
3336 // Interrupt Source: Data received; Interrupt Flag: UCRXIFG0
3337 static const uint32_t UCBxIV_UCIV__UCIV_22 = 22;
3338 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG0
3339 static const uint32_t UCBxIV_UCIV__UCIV_24 = 24;
3340 // Interrupt Source: Byte counter zero; Interrupt Flag: UCBCNTIFG
3341 static const uint32_t UCBxIV_UCIV__UCIV_26 = 26;
3342 // Interrupt Source: Clock low timeout; Interrupt Flag: UCCLTOIFG
3343 static const uint32_t UCBxIV_UCIV__UCIV_28 = 28;
3344 // Interrupt Source: Nineth bit position; Interrupt Flag: UCBIT9IFG; Priority: Lowest
3345 static const uint32_t UCBxIV_UCIV__UCIV_30 = 30;
3346
3347 struct EUSCI_B0_t {
3348 UCBxCTLW0_t UCBxCTLW0;
3349 UCBxCTLW1_t UCBxCTLW1;
3350 uint16_t reserved0;
3351 UCBxBRW_t UCBxBRW;
3352 UCBxSTATW_t UCBxSTATW;
3353 UCBxTBCNT_t UCBxTBCNT;
3354 UCBxRXBUF_t UCBxRXBUF;
3355 UCBxTXBUF_t UCBxTXBUF;
3356 uint16_t reserved1[2];
3357 UCBxI2COA0_t UCBxI2COA0;
3358 UCBxI2COA1_t UCBxI2COA1;
3359 UCBxI2COA2_t UCBxI2COA2;
3360 UCBxI2COA3_t UCBxI2COA3;
3361 UCBxADDRX_t UCBxADDRX;
3362 UCBxADDMASK_t UCBxADDMASK;
3363 UCBxI2CSA_t UCBxI2CSA;
3364 uint16_t reserved2[4];
3365 UCBxIE_t UCBxIE;
3366 UCBxIFG_t UCBxIFG;
3367 UCBxIV_t UCBxIV;
3368 };
3369
3370 static EUSCI_B0_t & EUSCI_B0 = (*(EUSCI_B0_t *)0x40002000);
3371
3372} // _EUSCI_B0_
3373
3374// EUSCI_B1
3375namespace _EUSCI_B1_ {
3376
3377 // eUSCI_Bx Control Word Register 0
3378 // Reset value: 0x000001c1
3379 BEGIN_TYPE(UCBxCTLW0_t, uint16_t)
3380 // Software reset enable
3381 ADD_BITFIELD_RW(UCSWRST, 0, 1)
3382 // Transmit START condition in master mode
3383 ADD_BITFIELD_RW(UCTXSTT, 1, 1)
3384 // Transmit STOP condition in master mode
3385 ADD_BITFIELD_RW(UCTXSTP, 2, 1)
3386 // Transmit a NACK
3387 ADD_BITFIELD_RW(UCTXNACK, 3, 1)
3388 // Transmitter/receiver
3389 ADD_BITFIELD_RW(UCTR, 4, 1)
3390 // Transmit ACK condition in slave mode
3391 ADD_BITFIELD_RW(UCTXACK, 5, 1)
3392 // eUSCI_B clock source select
3393 ADD_BITFIELD_RW(UCSSEL, 6, 2)
3394 // Synchronous mode enable
3395 ADD_BITFIELD_RW(UCSYNC, 8, 1)
3396 // eUSCI_B mode
3397 ADD_BITFIELD_RW(UCMODE, 9, 2)
3398 // Master mode select
3399 ADD_BITFIELD_RW(UCMST, 11, 1)
3400 // Multi-master environment select
3401 ADD_BITFIELD_RW(UCMM, 13, 1)
3402 // Slave addressing mode select
3403 ADD_BITFIELD_RW(UCSLA10, 14, 1)
3404 // Own addressing mode select
3405 ADD_BITFIELD_RW(UCA10, 15, 1)
3406 END_TYPE()
3407
3408 // Disabled. eUSCI_B reset released for operation
3409 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_0 = 0;
3410 // Enabled. eUSCI_B logic held in reset state
3411 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_1 = 1;
3412 // Do not generate START condition
3413 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_0 = 0;
3414 // Generate START condition
3415 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_1 = 1;
3416 // No STOP generated
3417 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_0 = 0;
3418 // Generate STOP
3419 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_1 = 1;
3420 // Acknowledge normally
3421 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_0 = 0;
3422 // Generate NACK
3423 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_1 = 1;
3424 // Receiver
3425 static const uint32_t UCBxCTLW0_UCTR__UCTR_0 = 0;
3426 // Transmitter
3427 static const uint32_t UCBxCTLW0_UCTR__UCTR_1 = 1;
3428 // Do not acknowledge the slave address
3429 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_0 = 0;
3430 // Acknowledge the slave address
3431 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_1 = 1;
3432 // UCLKI
3433 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_0 = 0;
3434 // ACLK
3435 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_1 = 1;
3436 // SMCLK
3437 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_2 = 2;
3438 // SMCLK
3439 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_3 = 3;
3440 // Asynchronous mode
3441 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_0 = 0;
3442 // Synchronous mode
3443 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_1 = 1;
3444 // 3-pin SPI
3445 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_0 = 0;
3446 // 4-pin SPI (master or slave enabled if STE = 1)
3447 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_1 = 1;
3448 // 4-pin SPI (master or slave enabled if STE = 0)
3449 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_2 = 2;
3450 // I2C mode
3451 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_3 = 3;
3452 // Slave mode
3453 static const uint32_t UCBxCTLW0_UCMST__UCMST_0 = 0;
3454 // Master mode
3455 static const uint32_t UCBxCTLW0_UCMST__UCMST_1 = 1;
3456 // Single master environment. There is no other master in the system. The address compare unit is disabled.
3457 static const uint32_t UCBxCTLW0_UCMM__UCMM_0 = 0;
3458 // Multi-master environment
3459 static const uint32_t UCBxCTLW0_UCMM__UCMM_1 = 1;
3460 // Address slave with 7-bit address
3461 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_0 = 0;
3462 // Address slave with 10-bit address
3463 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_1 = 1;
3464 // Own address is a 7-bit address
3465 static const uint32_t UCBxCTLW0_UCA10__UCA10_0 = 0;
3466 // Own address is a 10-bit address
3467 static const uint32_t UCBxCTLW0_UCA10__UCA10_1 = 1;
3468
3469 // eUSCI_Bx Control Word Register 1
3470 // Reset value: 0x00000003
3471 BEGIN_TYPE(UCBxCTLW1_t, uint16_t)
3472 // Deglitch time
3473 ADD_BITFIELD_RW(UCGLIT, 0, 2)
3474 // Automatic STOP condition generation
3475 ADD_BITFIELD_RW(UCASTP, 2, 2)
3476 // SW or HW ACK control
3477 ADD_BITFIELD_RW(UCSWACK, 4, 1)
3478 // ACK all master bytes
3479 ADD_BITFIELD_RW(UCSTPNACK, 5, 1)
3480 // Clock low timeout select
3481 ADD_BITFIELD_RW(UCCLTO, 6, 2)
3482 // Early UCTXIFG0
3483 ADD_BITFIELD_RW(UCETXINT, 8, 1)
3484 END_TYPE()
3485
3486 // 50 ns
3487 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_0 = 0;
3488 // 25 ns
3489 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_1 = 1;
3490 // 12.5 ns
3491 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_2 = 2;
3492 // 6.25 ns
3493 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_3 = 3;
3494 // No automatic STOP generation. The STOP condition is generated after the user sets the UCTXSTP bit. The value in UCBxTBCNT is a don't care.
3495 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_0 = 0;
3496 // UCBCNTIFG is set with the byte counter reaches the threshold defined in UCBxTBCNT
3497 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_1 = 1;
3498 // A STOP condition is generated automatically after the byte counter value reached UCBxTBCNT. UCBCNTIFG is set with the byte counter reaching the threshold
3499 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_2 = 2;
3500 // The address acknowledge of the slave is controlled by the eUSCI_B module
3501 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_0 = 0;
3502 // The user needs to trigger the sending of the address ACK by issuing UCTXACK
3503 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_1 = 1;
3504 // Send a non-acknowledge before the STOP condition as a master receiver (conform to I2C standard)
3505 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_0 = 0;
3506 // All bytes are acknowledged by the eUSCI_B when configured as master receiver
3507 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_1 = 1;
3508 // Disable clock low timeout counter
3509 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_0 = 0;
3510 // 135 000 SYSCLK cycles (approximately 28 ms)
3511 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_1 = 1;
3512 // 150 000 SYSCLK cycles (approximately 31 ms)
3513 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_2 = 2;
3514 // 165 000 SYSCLK cycles (approximately 34 ms)
3515 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_3 = 3;
3516 // UCTXIFGx is set after an address match with UCxI2COAx and the direction bit indicating slave transmit
3517 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_0 = 0;
3518 // UCTXIFG0 is set for each START condition
3519 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_1 = 1;
3520
3521 // eUSCI_Bx Baud Rate Control Word Register
3522 // Reset value: 0x00000000
3523 BEGIN_TYPE(UCBxBRW_t, uint16_t)
3524 // Bit clock prescaler
3525 ADD_BITFIELD_RW(UCBR, 0, 16)
3526 END_TYPE()
3527
3528 // eUSCI_Bx Status Register
3529 // Reset value: 0x00000000
3530 BEGIN_TYPE(UCBxSTATW_t, uint16_t)
3531 // Bus busy
3532 ADD_BITFIELD_RO(UCBBUSY, 4, 1)
3533 // General call address received
3534 ADD_BITFIELD_RO(UCGC, 5, 1)
3535 // SCL low
3536 ADD_BITFIELD_RO(UCSCLLOW, 6, 1)
3537 // Hardware byte counter value
3538 ADD_BITFIELD_RO(UCBCNT, 8, 8)
3539 END_TYPE()
3540
3541 // Bus inactive
3542 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_0 = 0;
3543 // Bus busy
3544 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_1 = 1;
3545 // No general call address received
3546 static const uint32_t UCBxSTATW_UCGC__UCGC_0 = 0;
3547 // General call address received
3548 static const uint32_t UCBxSTATW_UCGC__UCGC_1 = 1;
3549 // SCL is not held low
3550 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_0 = 0;
3551 // SCL is held low
3552 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_1 = 1;
3553
3554 // eUSCI_Bx Byte Counter Threshold Register
3555 // Reset value: 0x00000000
3556 BEGIN_TYPE(UCBxTBCNT_t, uint16_t)
3557 // Byte counter threshold value
3558 ADD_BITFIELD_RW(UCTBCNT, 0, 8)
3559 END_TYPE()
3560
3561 // eUSCI_Bx Receive Buffer Register
3562 // Reset value: 0x00000000
3563 BEGIN_TYPE(UCBxRXBUF_t, uint16_t)
3564 // Receive data buffer
3565 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
3566 END_TYPE()
3567
3568 // eUSCI_Bx Transmit Buffer Register
3569 // Reset value: 0x00000000
3570 BEGIN_TYPE(UCBxTXBUF_t, uint16_t)
3571 // Transmit data buffer
3572 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
3573 END_TYPE()
3574
3575 // eUSCI_Bx I2C Own Address 0 Register
3576 // Reset value: 0x00000000
3577 BEGIN_TYPE(UCBxI2COA0_t, uint16_t)
3578 // I2C own address
3579 ADD_BITFIELD_RW(I2COA0, 0, 10)
3580 // Own Address enable register
3581 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3582 // General call response enable
3583 ADD_BITFIELD_RW(UCGCEN, 15, 1)
3584 END_TYPE()
3585
3586 // The slave address defined in I2COA0 is disabled
3587 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_0 = 0;
3588 // The slave address defined in I2COA0 is enabled
3589 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_1 = 1;
3590 // Do not respond to a general call
3591 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_0 = 0;
3592 // Respond to a general call
3593 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_1 = 1;
3594
3595 // eUSCI_Bx I2C Own Address 1 Register
3596 // Reset value: 0x00000000
3597 BEGIN_TYPE(UCBxI2COA1_t, uint16_t)
3598 // I2C own address
3599 ADD_BITFIELD_RW(I2COA1, 0, 10)
3600 // Own Address enable register
3601 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3602 END_TYPE()
3603
3604 // The slave address defined in I2COA1 is disabled
3605 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_0 = 0;
3606 // The slave address defined in I2COA1 is enabled
3607 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_1 = 1;
3608
3609 // eUSCI_Bx I2C Own Address 2 Register
3610 // Reset value: 0x00000000
3611 BEGIN_TYPE(UCBxI2COA2_t, uint16_t)
3612 // I2C own address
3613 ADD_BITFIELD_RW(I2COA2, 0, 10)
3614 // Own Address enable register
3615 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3616 END_TYPE()
3617
3618 // The slave address defined in I2COA2 is disabled
3619 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_0 = 0;
3620 // The slave address defined in I2COA2 is enabled
3621 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_1 = 1;
3622
3623 // eUSCI_Bx I2C Own Address 3 Register
3624 // Reset value: 0x00000000
3625 BEGIN_TYPE(UCBxI2COA3_t, uint16_t)
3626 // I2C own address
3627 ADD_BITFIELD_RW(I2COA3, 0, 10)
3628 // Own Address enable register
3629 ADD_BITFIELD_RW(UCOAEN, 10, 1)
3630 END_TYPE()
3631
3632 // The slave address defined in I2COA3 is disabled
3633 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_0 = 0;
3634 // The slave address defined in I2COA3 is enabled
3635 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_1 = 1;
3636
3637 // eUSCI_Bx I2C Received Address Register
3638 // Reset value: 0x00000000
3639 BEGIN_TYPE(UCBxADDRX_t, uint16_t)
3640 // Received Address Register
3641 ADD_BITFIELD_RO(ADDRX, 0, 10)
3642 END_TYPE()
3643
3644 // eUSCI_Bx I2C Address Mask Register
3645 // Reset value: 0x000003ff
3646 BEGIN_TYPE(UCBxADDMASK_t, uint16_t)
3647 // Address Mask Register. By clearing the corresponding bit of the own address, this bit is a don't care when comparing the address on the bus to the own address. Using this method, it is possible to react on more than one slave address. When all bits of ADDMASKx are set, the address mask feature is deactivated. Modify only when UCSWRST = 1.
3648 ADD_BITFIELD_RW(ADDMASK, 0, 10)
3649 END_TYPE()
3650
3651 // eUSCI_Bx I2C Slave Address Register
3652 // Reset value: 0x00000000
3653 BEGIN_TYPE(UCBxI2CSA_t, uint16_t)
3654 // I2C slave address
3655 ADD_BITFIELD_RW(I2CSA, 0, 10)
3656 END_TYPE()
3657
3658 // eUSCI_Bx Interrupt Enable Register
3659 // Reset value: 0x00000000
3660 BEGIN_TYPE(UCBxIE_t, uint16_t)
3661 // Receive interrupt enable 0
3662 ADD_BITFIELD_RW(UCRXIE0, 0, 1)
3663 // Transmit interrupt enable 0
3664 ADD_BITFIELD_RW(UCTXIE0, 1, 1)
3665 // START condition interrupt enable
3666 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
3667 // STOP condition interrupt enable
3668 ADD_BITFIELD_RW(UCSTPIE, 3, 1)
3669 // Arbitration lost interrupt enable
3670 ADD_BITFIELD_RW(UCALIE, 4, 1)
3671 // Not-acknowledge interrupt enable
3672 ADD_BITFIELD_RW(UCNACKIE, 5, 1)
3673 // Byte counter interrupt enable
3674 ADD_BITFIELD_RW(UCBCNTIE, 6, 1)
3675 // Clock low timeout interrupt enable
3676 ADD_BITFIELD_RW(UCCLTOIE, 7, 1)
3677 // Receive interrupt enable 1
3678 ADD_BITFIELD_RW(UCRXIE1, 8, 1)
3679 // Transmit interrupt enable 1
3680 ADD_BITFIELD_RW(UCTXIE1, 9, 1)
3681 // Receive interrupt enable 2
3682 ADD_BITFIELD_RW(UCRXIE2, 10, 1)
3683 // Transmit interrupt enable 2
3684 ADD_BITFIELD_RW(UCTXIE2, 11, 1)
3685 // Receive interrupt enable 3
3686 ADD_BITFIELD_RW(UCRXIE3, 12, 1)
3687 // Transmit interrupt enable 3
3688 ADD_BITFIELD_RW(UCTXIE3, 13, 1)
3689 // Bit position 9 interrupt enable
3690 ADD_BITFIELD_RW(UCBIT9IE, 14, 1)
3691 END_TYPE()
3692
3693 // Interrupt disabled
3694 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_0 = 0;
3695 // Interrupt enabled
3696 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_1 = 1;
3697 // Interrupt disabled
3698 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_0 = 0;
3699 // Interrupt enabled
3700 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_1 = 1;
3701 // Interrupt disabled
3702 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_0 = 0;
3703 // Interrupt enabled
3704 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_1 = 1;
3705 // Interrupt disabled
3706 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_0 = 0;
3707 // Interrupt enabled
3708 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_1 = 1;
3709 // Interrupt disabled
3710 static const uint32_t UCBxIE_UCALIE__UCALIE_0 = 0;
3711 // Interrupt enabled
3712 static const uint32_t UCBxIE_UCALIE__UCALIE_1 = 1;
3713 // Interrupt disabled
3714 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_0 = 0;
3715 // Interrupt enabled
3716 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_1 = 1;
3717 // Interrupt disabled
3718 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_0 = 0;
3719 // Interrupt enabled
3720 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_1 = 1;
3721 // Interrupt disabled
3722 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_0 = 0;
3723 // Interrupt enabled
3724 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_1 = 1;
3725 // Interrupt disabled
3726 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_0 = 0;
3727 // Interrupt enabled
3728 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_1 = 1;
3729 // Interrupt disabled
3730 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_0 = 0;
3731 // Interrupt enabled
3732 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_1 = 1;
3733 // Interrupt disabled
3734 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_0 = 0;
3735 // Interrupt enabled
3736 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_1 = 1;
3737 // Interrupt disabled
3738 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_0 = 0;
3739 // Interrupt enabled
3740 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_1 = 1;
3741 // Interrupt disabled
3742 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_0 = 0;
3743 // Interrupt enabled
3744 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_1 = 1;
3745 // Interrupt disabled
3746 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_0 = 0;
3747 // Interrupt enabled
3748 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_1 = 1;
3749 // Interrupt disabled
3750 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_0 = 0;
3751 // Interrupt enabled
3752 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_1 = 1;
3753
3754 // eUSCI_Bx Interrupt Flag Register
3755 // Reset value: 0x00000002
3756 BEGIN_TYPE(UCBxIFG_t, uint16_t)
3757 // eUSCI_B receive interrupt flag 0
3758 ADD_BITFIELD_RW(UCRXIFG0, 0, 1)
3759 // eUSCI_B transmit interrupt flag 0
3760 ADD_BITFIELD_RW(UCTXIFG0, 1, 1)
3761 // START condition interrupt flag
3762 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
3763 // STOP condition interrupt flag
3764 ADD_BITFIELD_RW(UCSTPIFG, 3, 1)
3765 // Arbitration lost interrupt flag
3766 ADD_BITFIELD_RW(UCALIFG, 4, 1)
3767 // Not-acknowledge received interrupt flag
3768 ADD_BITFIELD_RW(UCNACKIFG, 5, 1)
3769 // Byte counter interrupt flag
3770 ADD_BITFIELD_RW(UCBCNTIFG, 6, 1)
3771 // Clock low timeout interrupt flag
3772 ADD_BITFIELD_RW(UCCLTOIFG, 7, 1)
3773 // eUSCI_B receive interrupt flag 1
3774 ADD_BITFIELD_RW(UCRXIFG1, 8, 1)
3775 // eUSCI_B transmit interrupt flag 1
3776 ADD_BITFIELD_RW(UCTXIFG1, 9, 1)
3777 // eUSCI_B receive interrupt flag 2
3778 ADD_BITFIELD_RW(UCRXIFG2, 10, 1)
3779 // eUSCI_B transmit interrupt flag 2
3780 ADD_BITFIELD_RW(UCTXIFG2, 11, 1)
3781 // eUSCI_B receive interrupt flag 3
3782 ADD_BITFIELD_RW(UCRXIFG3, 12, 1)
3783 // eUSCI_B transmit interrupt flag 3
3784 ADD_BITFIELD_RW(UCTXIFG3, 13, 1)
3785 // Bit position 9 interrupt flag
3786 ADD_BITFIELD_RW(UCBIT9IFG, 14, 1)
3787 END_TYPE()
3788
3789 // No interrupt pending
3790 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_0 = 0;
3791 // Interrupt pending
3792 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_1 = 1;
3793 // No interrupt pending
3794 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_0 = 0;
3795 // Interrupt pending
3796 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_1 = 1;
3797 // No interrupt pending
3798 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
3799 // Interrupt pending
3800 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
3801 // No interrupt pending
3802 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_0 = 0;
3803 // Interrupt pending
3804 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_1 = 1;
3805 // No interrupt pending
3806 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_0 = 0;
3807 // Interrupt pending
3808 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_1 = 1;
3809 // No interrupt pending
3810 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_0 = 0;
3811 // Interrupt pending
3812 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_1 = 1;
3813 // No interrupt pending
3814 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_0 = 0;
3815 // Interrupt pending
3816 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_1 = 1;
3817 // No interrupt pending
3818 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_0 = 0;
3819 // Interrupt pending
3820 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_1 = 1;
3821 // No interrupt pending
3822 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_0 = 0;
3823 // Interrupt pending
3824 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_1 = 1;
3825 // No interrupt pending
3826 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_0 = 0;
3827 // Interrupt pending
3828 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_1 = 1;
3829 // No interrupt pending
3830 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_0 = 0;
3831 // Interrupt pending
3832 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_1 = 1;
3833 // No interrupt pending
3834 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_0 = 0;
3835 // Interrupt pending
3836 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_1 = 1;
3837 // No interrupt pending
3838 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_0 = 0;
3839 // Interrupt pending
3840 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_1 = 1;
3841 // No interrupt pending
3842 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_0 = 0;
3843 // Interrupt pending
3844 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_1 = 1;
3845 // No interrupt pending
3846 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_0 = 0;
3847 // Interrupt pending
3848 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_1 = 1;
3849
3850 // eUSCI_Bx Interrupt Vector Register
3851 // Reset value: 0x00000000
3852 BEGIN_TYPE(UCBxIV_t, uint16_t)
3853 // eUSCI_B interrupt vector value
3854 ADD_BITFIELD_RO(UCIV, 0, 16)
3855 END_TYPE()
3856
3857 // No interrupt pending
3858 static const uint32_t UCBxIV_UCIV__UCIV_0 = 0;
3859 // Interrupt Source: Arbitration lost; Interrupt Flag: UCALIFG; Interrupt Priority: Highest
3860 static const uint32_t UCBxIV_UCIV__UCIV_2 = 2;
3861 // Interrupt Source: Not acknowledgment; Interrupt Flag: UCNACKIFG
3862 static const uint32_t UCBxIV_UCIV__UCIV_4 = 4;
3863 // Interrupt Source: Start condition received; Interrupt Flag: UCSTTIFG
3864 static const uint32_t UCBxIV_UCIV__UCIV_6 = 6;
3865 // Interrupt Source: Stop condition received; Interrupt Flag: UCSTPIFG
3866 static const uint32_t UCBxIV_UCIV__UCIV_8 = 8;
3867 // Interrupt Source: Slave 3 Data received; Interrupt Flag: UCRXIFG3
3868 static const uint32_t UCBxIV_UCIV__UCIV_10 = 10;
3869 // Interrupt Source: Slave 3 Transmit buffer empty; Interrupt Flag: UCTXIFG3
3870 static const uint32_t UCBxIV_UCIV__UCIV_12 = 12;
3871 // Interrupt Source: Slave 2 Data received; Interrupt Flag: UCRXIFG2
3872 static const uint32_t UCBxIV_UCIV__UCIV_14 = 14;
3873 // Interrupt Source: Slave 2 Transmit buffer empty; Interrupt Flag: UCTXIFG2
3874 static const uint32_t UCBxIV_UCIV__UCIV_16 = 16;
3875 // Interrupt Source: Slave 1 Data received; Interrupt Flag: UCRXIFG1
3876 static const uint32_t UCBxIV_UCIV__UCIV_18 = 18;
3877 // Interrupt Source: Slave 1 Transmit buffer empty; Interrupt Flag: UCTXIFG1
3878 static const uint32_t UCBxIV_UCIV__UCIV_20 = 20;
3879 // Interrupt Source: Data received; Interrupt Flag: UCRXIFG0
3880 static const uint32_t UCBxIV_UCIV__UCIV_22 = 22;
3881 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG0
3882 static const uint32_t UCBxIV_UCIV__UCIV_24 = 24;
3883 // Interrupt Source: Byte counter zero; Interrupt Flag: UCBCNTIFG
3884 static const uint32_t UCBxIV_UCIV__UCIV_26 = 26;
3885 // Interrupt Source: Clock low timeout; Interrupt Flag: UCCLTOIFG
3886 static const uint32_t UCBxIV_UCIV__UCIV_28 = 28;
3887 // Interrupt Source: Nineth bit position; Interrupt Flag: UCBIT9IFG; Priority: Lowest
3888 static const uint32_t UCBxIV_UCIV__UCIV_30 = 30;
3889
3890 struct EUSCI_B1_t {
3891 UCBxCTLW0_t UCBxCTLW0;
3892 UCBxCTLW1_t UCBxCTLW1;
3893 uint16_t reserved0;
3894 UCBxBRW_t UCBxBRW;
3895 UCBxSTATW_t UCBxSTATW;
3896 UCBxTBCNT_t UCBxTBCNT;
3897 UCBxRXBUF_t UCBxRXBUF;
3898 UCBxTXBUF_t UCBxTXBUF;
3899 uint16_t reserved1[2];
3900 UCBxI2COA0_t UCBxI2COA0;
3901 UCBxI2COA1_t UCBxI2COA1;
3902 UCBxI2COA2_t UCBxI2COA2;
3903 UCBxI2COA3_t UCBxI2COA3;
3904 UCBxADDRX_t UCBxADDRX;
3905 UCBxADDMASK_t UCBxADDMASK;
3906 UCBxI2CSA_t UCBxI2CSA;
3907 uint16_t reserved2[4];
3908 UCBxIE_t UCBxIE;
3909 UCBxIFG_t UCBxIFG;
3910 UCBxIV_t UCBxIV;
3911 };
3912
3913 static EUSCI_B1_t & EUSCI_B1 = (*(EUSCI_B1_t *)0x40002400);
3914
3915} // _EUSCI_B1_
3916
3917// EUSCI_B2
3918namespace _EUSCI_B2_ {
3919
3920 // eUSCI_Bx Control Word Register 0
3921 // Reset value: 0x000001c1
3922 BEGIN_TYPE(UCBxCTLW0_t, uint16_t)
3923 // Software reset enable
3924 ADD_BITFIELD_RW(UCSWRST, 0, 1)
3925 // Transmit START condition in master mode
3926 ADD_BITFIELD_RW(UCTXSTT, 1, 1)
3927 // Transmit STOP condition in master mode
3928 ADD_BITFIELD_RW(UCTXSTP, 2, 1)
3929 // Transmit a NACK
3930 ADD_BITFIELD_RW(UCTXNACK, 3, 1)
3931 // Transmitter/receiver
3932 ADD_BITFIELD_RW(UCTR, 4, 1)
3933 // Transmit ACK condition in slave mode
3934 ADD_BITFIELD_RW(UCTXACK, 5, 1)
3935 // eUSCI_B clock source select
3936 ADD_BITFIELD_RW(UCSSEL, 6, 2)
3937 // Synchronous mode enable
3938 ADD_BITFIELD_RW(UCSYNC, 8, 1)
3939 // eUSCI_B mode
3940 ADD_BITFIELD_RW(UCMODE, 9, 2)
3941 // Master mode select
3942 ADD_BITFIELD_RW(UCMST, 11, 1)
3943 // Multi-master environment select
3944 ADD_BITFIELD_RW(UCMM, 13, 1)
3945 // Slave addressing mode select
3946 ADD_BITFIELD_RW(UCSLA10, 14, 1)
3947 // Own addressing mode select
3948 ADD_BITFIELD_RW(UCA10, 15, 1)
3949 END_TYPE()
3950
3951 // Disabled. eUSCI_B reset released for operation
3952 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_0 = 0;
3953 // Enabled. eUSCI_B logic held in reset state
3954 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_1 = 1;
3955 // Do not generate START condition
3956 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_0 = 0;
3957 // Generate START condition
3958 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_1 = 1;
3959 // No STOP generated
3960 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_0 = 0;
3961 // Generate STOP
3962 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_1 = 1;
3963 // Acknowledge normally
3964 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_0 = 0;
3965 // Generate NACK
3966 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_1 = 1;
3967 // Receiver
3968 static const uint32_t UCBxCTLW0_UCTR__UCTR_0 = 0;
3969 // Transmitter
3970 static const uint32_t UCBxCTLW0_UCTR__UCTR_1 = 1;
3971 // Do not acknowledge the slave address
3972 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_0 = 0;
3973 // Acknowledge the slave address
3974 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_1 = 1;
3975 // UCLKI
3976 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_0 = 0;
3977 // ACLK
3978 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_1 = 1;
3979 // SMCLK
3980 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_2 = 2;
3981 // SMCLK
3982 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_3 = 3;
3983 // Asynchronous mode
3984 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_0 = 0;
3985 // Synchronous mode
3986 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_1 = 1;
3987 // 3-pin SPI
3988 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_0 = 0;
3989 // 4-pin SPI (master or slave enabled if STE = 1)
3990 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_1 = 1;
3991 // 4-pin SPI (master or slave enabled if STE = 0)
3992 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_2 = 2;
3993 // I2C mode
3994 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_3 = 3;
3995 // Slave mode
3996 static const uint32_t UCBxCTLW0_UCMST__UCMST_0 = 0;
3997 // Master mode
3998 static const uint32_t UCBxCTLW0_UCMST__UCMST_1 = 1;
3999 // Single master environment. There is no other master in the system. The address compare unit is disabled.
4000 static const uint32_t UCBxCTLW0_UCMM__UCMM_0 = 0;
4001 // Multi-master environment
4002 static const uint32_t UCBxCTLW0_UCMM__UCMM_1 = 1;
4003 // Address slave with 7-bit address
4004 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_0 = 0;
4005 // Address slave with 10-bit address
4006 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_1 = 1;
4007 // Own address is a 7-bit address
4008 static const uint32_t UCBxCTLW0_UCA10__UCA10_0 = 0;
4009 // Own address is a 10-bit address
4010 static const uint32_t UCBxCTLW0_UCA10__UCA10_1 = 1;
4011
4012 // eUSCI_Bx Control Word Register 1
4013 // Reset value: 0x00000003
4014 BEGIN_TYPE(UCBxCTLW1_t, uint16_t)
4015 // Deglitch time
4016 ADD_BITFIELD_RW(UCGLIT, 0, 2)
4017 // Automatic STOP condition generation
4018 ADD_BITFIELD_RW(UCASTP, 2, 2)
4019 // SW or HW ACK control
4020 ADD_BITFIELD_RW(UCSWACK, 4, 1)
4021 // ACK all master bytes
4022 ADD_BITFIELD_RW(UCSTPNACK, 5, 1)
4023 // Clock low timeout select
4024 ADD_BITFIELD_RW(UCCLTO, 6, 2)
4025 // Early UCTXIFG0
4026 ADD_BITFIELD_RW(UCETXINT, 8, 1)
4027 END_TYPE()
4028
4029 // 50 ns
4030 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_0 = 0;
4031 // 25 ns
4032 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_1 = 1;
4033 // 12.5 ns
4034 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_2 = 2;
4035 // 6.25 ns
4036 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_3 = 3;
4037 // No automatic STOP generation. The STOP condition is generated after the user sets the UCTXSTP bit. The value in UCBxTBCNT is a don't care.
4038 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_0 = 0;
4039 // UCBCNTIFG is set with the byte counter reaches the threshold defined in UCBxTBCNT
4040 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_1 = 1;
4041 // A STOP condition is generated automatically after the byte counter value reached UCBxTBCNT. UCBCNTIFG is set with the byte counter reaching the threshold
4042 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_2 = 2;
4043 // The address acknowledge of the slave is controlled by the eUSCI_B module
4044 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_0 = 0;
4045 // The user needs to trigger the sending of the address ACK by issuing UCTXACK
4046 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_1 = 1;
4047 // Send a non-acknowledge before the STOP condition as a master receiver (conform to I2C standard)
4048 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_0 = 0;
4049 // All bytes are acknowledged by the eUSCI_B when configured as master receiver
4050 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_1 = 1;
4051 // Disable clock low timeout counter
4052 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_0 = 0;
4053 // 135 000 SYSCLK cycles (approximately 28 ms)
4054 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_1 = 1;
4055 // 150 000 SYSCLK cycles (approximately 31 ms)
4056 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_2 = 2;
4057 // 165 000 SYSCLK cycles (approximately 34 ms)
4058 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_3 = 3;
4059 // UCTXIFGx is set after an address match with UCxI2COAx and the direction bit indicating slave transmit
4060 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_0 = 0;
4061 // UCTXIFG0 is set for each START condition
4062 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_1 = 1;
4063
4064 // eUSCI_Bx Baud Rate Control Word Register
4065 // Reset value: 0x00000000
4066 BEGIN_TYPE(UCBxBRW_t, uint16_t)
4067 // Bit clock prescaler
4068 ADD_BITFIELD_RW(UCBR, 0, 16)
4069 END_TYPE()
4070
4071 // eUSCI_Bx Status Register
4072 // Reset value: 0x00000000
4073 BEGIN_TYPE(UCBxSTATW_t, uint16_t)
4074 // Bus busy
4075 ADD_BITFIELD_RO(UCBBUSY, 4, 1)
4076 // General call address received
4077 ADD_BITFIELD_RO(UCGC, 5, 1)
4078 // SCL low
4079 ADD_BITFIELD_RO(UCSCLLOW, 6, 1)
4080 // Hardware byte counter value
4081 ADD_BITFIELD_RO(UCBCNT, 8, 8)
4082 END_TYPE()
4083
4084 // Bus inactive
4085 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_0 = 0;
4086 // Bus busy
4087 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_1 = 1;
4088 // No general call address received
4089 static const uint32_t UCBxSTATW_UCGC__UCGC_0 = 0;
4090 // General call address received
4091 static const uint32_t UCBxSTATW_UCGC__UCGC_1 = 1;
4092 // SCL is not held low
4093 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_0 = 0;
4094 // SCL is held low
4095 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_1 = 1;
4096
4097 // eUSCI_Bx Byte Counter Threshold Register
4098 // Reset value: 0x00000000
4099 BEGIN_TYPE(UCBxTBCNT_t, uint16_t)
4100 // Byte counter threshold value
4101 ADD_BITFIELD_RW(UCTBCNT, 0, 8)
4102 END_TYPE()
4103
4104 // eUSCI_Bx Receive Buffer Register
4105 // Reset value: 0x00000000
4106 BEGIN_TYPE(UCBxRXBUF_t, uint16_t)
4107 // Receive data buffer
4108 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
4109 END_TYPE()
4110
4111 // eUSCI_Bx Transmit Buffer Register
4112 // Reset value: 0x00000000
4113 BEGIN_TYPE(UCBxTXBUF_t, uint16_t)
4114 // Transmit data buffer
4115 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
4116 END_TYPE()
4117
4118 // eUSCI_Bx I2C Own Address 0 Register
4119 // Reset value: 0x00000000
4120 BEGIN_TYPE(UCBxI2COA0_t, uint16_t)
4121 // I2C own address
4122 ADD_BITFIELD_RW(I2COA0, 0, 10)
4123 // Own Address enable register
4124 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4125 // General call response enable
4126 ADD_BITFIELD_RW(UCGCEN, 15, 1)
4127 END_TYPE()
4128
4129 // The slave address defined in I2COA0 is disabled
4130 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_0 = 0;
4131 // The slave address defined in I2COA0 is enabled
4132 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_1 = 1;
4133 // Do not respond to a general call
4134 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_0 = 0;
4135 // Respond to a general call
4136 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_1 = 1;
4137
4138 // eUSCI_Bx I2C Own Address 1 Register
4139 // Reset value: 0x00000000
4140 BEGIN_TYPE(UCBxI2COA1_t, uint16_t)
4141 // I2C own address
4142 ADD_BITFIELD_RW(I2COA1, 0, 10)
4143 // Own Address enable register
4144 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4145 END_TYPE()
4146
4147 // The slave address defined in I2COA1 is disabled
4148 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_0 = 0;
4149 // The slave address defined in I2COA1 is enabled
4150 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_1 = 1;
4151
4152 // eUSCI_Bx I2C Own Address 2 Register
4153 // Reset value: 0x00000000
4154 BEGIN_TYPE(UCBxI2COA2_t, uint16_t)
4155 // I2C own address
4156 ADD_BITFIELD_RW(I2COA2, 0, 10)
4157 // Own Address enable register
4158 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4159 END_TYPE()
4160
4161 // The slave address defined in I2COA2 is disabled
4162 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_0 = 0;
4163 // The slave address defined in I2COA2 is enabled
4164 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_1 = 1;
4165
4166 // eUSCI_Bx I2C Own Address 3 Register
4167 // Reset value: 0x00000000
4168 BEGIN_TYPE(UCBxI2COA3_t, uint16_t)
4169 // I2C own address
4170 ADD_BITFIELD_RW(I2COA3, 0, 10)
4171 // Own Address enable register
4172 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4173 END_TYPE()
4174
4175 // The slave address defined in I2COA3 is disabled
4176 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_0 = 0;
4177 // The slave address defined in I2COA3 is enabled
4178 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_1 = 1;
4179
4180 // eUSCI_Bx I2C Received Address Register
4181 // Reset value: 0x00000000
4182 BEGIN_TYPE(UCBxADDRX_t, uint16_t)
4183 // Received Address Register
4184 ADD_BITFIELD_RO(ADDRX, 0, 10)
4185 END_TYPE()
4186
4187 // eUSCI_Bx I2C Address Mask Register
4188 // Reset value: 0x000003ff
4189 BEGIN_TYPE(UCBxADDMASK_t, uint16_t)
4190 // Address Mask Register. By clearing the corresponding bit of the own address, this bit is a don't care when comparing the address on the bus to the own address. Using this method, it is possible to react on more than one slave address. When all bits of ADDMASKx are set, the address mask feature is deactivated. Modify only when UCSWRST = 1.
4191 ADD_BITFIELD_RW(ADDMASK, 0, 10)
4192 END_TYPE()
4193
4194 // eUSCI_Bx I2C Slave Address Register
4195 // Reset value: 0x00000000
4196 BEGIN_TYPE(UCBxI2CSA_t, uint16_t)
4197 // I2C slave address
4198 ADD_BITFIELD_RW(I2CSA, 0, 10)
4199 END_TYPE()
4200
4201 // eUSCI_Bx Interrupt Enable Register
4202 // Reset value: 0x00000000
4203 BEGIN_TYPE(UCBxIE_t, uint16_t)
4204 // Receive interrupt enable 0
4205 ADD_BITFIELD_RW(UCRXIE0, 0, 1)
4206 // Transmit interrupt enable 0
4207 ADD_BITFIELD_RW(UCTXIE0, 1, 1)
4208 // START condition interrupt enable
4209 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
4210 // STOP condition interrupt enable
4211 ADD_BITFIELD_RW(UCSTPIE, 3, 1)
4212 // Arbitration lost interrupt enable
4213 ADD_BITFIELD_RW(UCALIE, 4, 1)
4214 // Not-acknowledge interrupt enable
4215 ADD_BITFIELD_RW(UCNACKIE, 5, 1)
4216 // Byte counter interrupt enable
4217 ADD_BITFIELD_RW(UCBCNTIE, 6, 1)
4218 // Clock low timeout interrupt enable
4219 ADD_BITFIELD_RW(UCCLTOIE, 7, 1)
4220 // Receive interrupt enable 1
4221 ADD_BITFIELD_RW(UCRXIE1, 8, 1)
4222 // Transmit interrupt enable 1
4223 ADD_BITFIELD_RW(UCTXIE1, 9, 1)
4224 // Receive interrupt enable 2
4225 ADD_BITFIELD_RW(UCRXIE2, 10, 1)
4226 // Transmit interrupt enable 2
4227 ADD_BITFIELD_RW(UCTXIE2, 11, 1)
4228 // Receive interrupt enable 3
4229 ADD_BITFIELD_RW(UCRXIE3, 12, 1)
4230 // Transmit interrupt enable 3
4231 ADD_BITFIELD_RW(UCTXIE3, 13, 1)
4232 // Bit position 9 interrupt enable
4233 ADD_BITFIELD_RW(UCBIT9IE, 14, 1)
4234 END_TYPE()
4235
4236 // Interrupt disabled
4237 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_0 = 0;
4238 // Interrupt enabled
4239 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_1 = 1;
4240 // Interrupt disabled
4241 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_0 = 0;
4242 // Interrupt enabled
4243 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_1 = 1;
4244 // Interrupt disabled
4245 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_0 = 0;
4246 // Interrupt enabled
4247 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_1 = 1;
4248 // Interrupt disabled
4249 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_0 = 0;
4250 // Interrupt enabled
4251 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_1 = 1;
4252 // Interrupt disabled
4253 static const uint32_t UCBxIE_UCALIE__UCALIE_0 = 0;
4254 // Interrupt enabled
4255 static const uint32_t UCBxIE_UCALIE__UCALIE_1 = 1;
4256 // Interrupt disabled
4257 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_0 = 0;
4258 // Interrupt enabled
4259 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_1 = 1;
4260 // Interrupt disabled
4261 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_0 = 0;
4262 // Interrupt enabled
4263 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_1 = 1;
4264 // Interrupt disabled
4265 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_0 = 0;
4266 // Interrupt enabled
4267 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_1 = 1;
4268 // Interrupt disabled
4269 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_0 = 0;
4270 // Interrupt enabled
4271 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_1 = 1;
4272 // Interrupt disabled
4273 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_0 = 0;
4274 // Interrupt enabled
4275 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_1 = 1;
4276 // Interrupt disabled
4277 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_0 = 0;
4278 // Interrupt enabled
4279 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_1 = 1;
4280 // Interrupt disabled
4281 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_0 = 0;
4282 // Interrupt enabled
4283 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_1 = 1;
4284 // Interrupt disabled
4285 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_0 = 0;
4286 // Interrupt enabled
4287 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_1 = 1;
4288 // Interrupt disabled
4289 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_0 = 0;
4290 // Interrupt enabled
4291 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_1 = 1;
4292 // Interrupt disabled
4293 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_0 = 0;
4294 // Interrupt enabled
4295 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_1 = 1;
4296
4297 // eUSCI_Bx Interrupt Flag Register
4298 // Reset value: 0x00000002
4299 BEGIN_TYPE(UCBxIFG_t, uint16_t)
4300 // eUSCI_B receive interrupt flag 0
4301 ADD_BITFIELD_RW(UCRXIFG0, 0, 1)
4302 // eUSCI_B transmit interrupt flag 0
4303 ADD_BITFIELD_RW(UCTXIFG0, 1, 1)
4304 // START condition interrupt flag
4305 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
4306 // STOP condition interrupt flag
4307 ADD_BITFIELD_RW(UCSTPIFG, 3, 1)
4308 // Arbitration lost interrupt flag
4309 ADD_BITFIELD_RW(UCALIFG, 4, 1)
4310 // Not-acknowledge received interrupt flag
4311 ADD_BITFIELD_RW(UCNACKIFG, 5, 1)
4312 // Byte counter interrupt flag
4313 ADD_BITFIELD_RW(UCBCNTIFG, 6, 1)
4314 // Clock low timeout interrupt flag
4315 ADD_BITFIELD_RW(UCCLTOIFG, 7, 1)
4316 // eUSCI_B receive interrupt flag 1
4317 ADD_BITFIELD_RW(UCRXIFG1, 8, 1)
4318 // eUSCI_B transmit interrupt flag 1
4319 ADD_BITFIELD_RW(UCTXIFG1, 9, 1)
4320 // eUSCI_B receive interrupt flag 2
4321 ADD_BITFIELD_RW(UCRXIFG2, 10, 1)
4322 // eUSCI_B transmit interrupt flag 2
4323 ADD_BITFIELD_RW(UCTXIFG2, 11, 1)
4324 // eUSCI_B receive interrupt flag 3
4325 ADD_BITFIELD_RW(UCRXIFG3, 12, 1)
4326 // eUSCI_B transmit interrupt flag 3
4327 ADD_BITFIELD_RW(UCTXIFG3, 13, 1)
4328 // Bit position 9 interrupt flag
4329 ADD_BITFIELD_RW(UCBIT9IFG, 14, 1)
4330 END_TYPE()
4331
4332 // No interrupt pending
4333 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_0 = 0;
4334 // Interrupt pending
4335 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_1 = 1;
4336 // No interrupt pending
4337 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_0 = 0;
4338 // Interrupt pending
4339 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_1 = 1;
4340 // No interrupt pending
4341 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
4342 // Interrupt pending
4343 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
4344 // No interrupt pending
4345 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_0 = 0;
4346 // Interrupt pending
4347 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_1 = 1;
4348 // No interrupt pending
4349 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_0 = 0;
4350 // Interrupt pending
4351 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_1 = 1;
4352 // No interrupt pending
4353 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_0 = 0;
4354 // Interrupt pending
4355 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_1 = 1;
4356 // No interrupt pending
4357 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_0 = 0;
4358 // Interrupt pending
4359 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_1 = 1;
4360 // No interrupt pending
4361 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_0 = 0;
4362 // Interrupt pending
4363 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_1 = 1;
4364 // No interrupt pending
4365 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_0 = 0;
4366 // Interrupt pending
4367 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_1 = 1;
4368 // No interrupt pending
4369 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_0 = 0;
4370 // Interrupt pending
4371 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_1 = 1;
4372 // No interrupt pending
4373 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_0 = 0;
4374 // Interrupt pending
4375 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_1 = 1;
4376 // No interrupt pending
4377 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_0 = 0;
4378 // Interrupt pending
4379 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_1 = 1;
4380 // No interrupt pending
4381 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_0 = 0;
4382 // Interrupt pending
4383 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_1 = 1;
4384 // No interrupt pending
4385 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_0 = 0;
4386 // Interrupt pending
4387 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_1 = 1;
4388 // No interrupt pending
4389 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_0 = 0;
4390 // Interrupt pending
4391 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_1 = 1;
4392
4393 // eUSCI_Bx Interrupt Vector Register
4394 // Reset value: 0x00000000
4395 BEGIN_TYPE(UCBxIV_t, uint16_t)
4396 // eUSCI_B interrupt vector value
4397 ADD_BITFIELD_RO(UCIV, 0, 16)
4398 END_TYPE()
4399
4400 // No interrupt pending
4401 static const uint32_t UCBxIV_UCIV__UCIV_0 = 0;
4402 // Interrupt Source: Arbitration lost; Interrupt Flag: UCALIFG; Interrupt Priority: Highest
4403 static const uint32_t UCBxIV_UCIV__UCIV_2 = 2;
4404 // Interrupt Source: Not acknowledgment; Interrupt Flag: UCNACKIFG
4405 static const uint32_t UCBxIV_UCIV__UCIV_4 = 4;
4406 // Interrupt Source: Start condition received; Interrupt Flag: UCSTTIFG
4407 static const uint32_t UCBxIV_UCIV__UCIV_6 = 6;
4408 // Interrupt Source: Stop condition received; Interrupt Flag: UCSTPIFG
4409 static const uint32_t UCBxIV_UCIV__UCIV_8 = 8;
4410 // Interrupt Source: Slave 3 Data received; Interrupt Flag: UCRXIFG3
4411 static const uint32_t UCBxIV_UCIV__UCIV_10 = 10;
4412 // Interrupt Source: Slave 3 Transmit buffer empty; Interrupt Flag: UCTXIFG3
4413 static const uint32_t UCBxIV_UCIV__UCIV_12 = 12;
4414 // Interrupt Source: Slave 2 Data received; Interrupt Flag: UCRXIFG2
4415 static const uint32_t UCBxIV_UCIV__UCIV_14 = 14;
4416 // Interrupt Source: Slave 2 Transmit buffer empty; Interrupt Flag: UCTXIFG2
4417 static const uint32_t UCBxIV_UCIV__UCIV_16 = 16;
4418 // Interrupt Source: Slave 1 Data received; Interrupt Flag: UCRXIFG1
4419 static const uint32_t UCBxIV_UCIV__UCIV_18 = 18;
4420 // Interrupt Source: Slave 1 Transmit buffer empty; Interrupt Flag: UCTXIFG1
4421 static const uint32_t UCBxIV_UCIV__UCIV_20 = 20;
4422 // Interrupt Source: Data received; Interrupt Flag: UCRXIFG0
4423 static const uint32_t UCBxIV_UCIV__UCIV_22 = 22;
4424 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG0
4425 static const uint32_t UCBxIV_UCIV__UCIV_24 = 24;
4426 // Interrupt Source: Byte counter zero; Interrupt Flag: UCBCNTIFG
4427 static const uint32_t UCBxIV_UCIV__UCIV_26 = 26;
4428 // Interrupt Source: Clock low timeout; Interrupt Flag: UCCLTOIFG
4429 static const uint32_t UCBxIV_UCIV__UCIV_28 = 28;
4430 // Interrupt Source: Nineth bit position; Interrupt Flag: UCBIT9IFG; Priority: Lowest
4431 static const uint32_t UCBxIV_UCIV__UCIV_30 = 30;
4432
4433 struct EUSCI_B2_t {
4434 UCBxCTLW0_t UCBxCTLW0;
4435 UCBxCTLW1_t UCBxCTLW1;
4436 uint16_t reserved0;
4437 UCBxBRW_t UCBxBRW;
4438 UCBxSTATW_t UCBxSTATW;
4439 UCBxTBCNT_t UCBxTBCNT;
4440 UCBxRXBUF_t UCBxRXBUF;
4441 UCBxTXBUF_t UCBxTXBUF;
4442 uint16_t reserved1[2];
4443 UCBxI2COA0_t UCBxI2COA0;
4444 UCBxI2COA1_t UCBxI2COA1;
4445 UCBxI2COA2_t UCBxI2COA2;
4446 UCBxI2COA3_t UCBxI2COA3;
4447 UCBxADDRX_t UCBxADDRX;
4448 UCBxADDMASK_t UCBxADDMASK;
4449 UCBxI2CSA_t UCBxI2CSA;
4450 uint16_t reserved2[4];
4451 UCBxIE_t UCBxIE;
4452 UCBxIFG_t UCBxIFG;
4453 UCBxIV_t UCBxIV;
4454 };
4455
4456 static EUSCI_B2_t & EUSCI_B2 = (*(EUSCI_B2_t *)0x40002800);
4457
4458} // _EUSCI_B2_
4459
4460// EUSCI_B3
4461namespace _EUSCI_B3_ {
4462
4463 // eUSCI_Bx Control Word Register 0
4464 // Reset value: 0x000001c1
4465 BEGIN_TYPE(UCBxCTLW0_t, uint16_t)
4466 // Software reset enable
4467 ADD_BITFIELD_RW(UCSWRST, 0, 1)
4468 // Transmit START condition in master mode
4469 ADD_BITFIELD_RW(UCTXSTT, 1, 1)
4470 // Transmit STOP condition in master mode
4471 ADD_BITFIELD_RW(UCTXSTP, 2, 1)
4472 // Transmit a NACK
4473 ADD_BITFIELD_RW(UCTXNACK, 3, 1)
4474 // Transmitter/receiver
4475 ADD_BITFIELD_RW(UCTR, 4, 1)
4476 // Transmit ACK condition in slave mode
4477 ADD_BITFIELD_RW(UCTXACK, 5, 1)
4478 // eUSCI_B clock source select
4479 ADD_BITFIELD_RW(UCSSEL, 6, 2)
4480 // Synchronous mode enable
4481 ADD_BITFIELD_RW(UCSYNC, 8, 1)
4482 // eUSCI_B mode
4483 ADD_BITFIELD_RW(UCMODE, 9, 2)
4484 // Master mode select
4485 ADD_BITFIELD_RW(UCMST, 11, 1)
4486 // Multi-master environment select
4487 ADD_BITFIELD_RW(UCMM, 13, 1)
4488 // Slave addressing mode select
4489 ADD_BITFIELD_RW(UCSLA10, 14, 1)
4490 // Own addressing mode select
4491 ADD_BITFIELD_RW(UCA10, 15, 1)
4492 END_TYPE()
4493
4494 // Disabled. eUSCI_B reset released for operation
4495 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_0 = 0;
4496 // Enabled. eUSCI_B logic held in reset state
4497 static const uint32_t UCBxCTLW0_UCSWRST__UCSWRST_1 = 1;
4498 // Do not generate START condition
4499 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_0 = 0;
4500 // Generate START condition
4501 static const uint32_t UCBxCTLW0_UCTXSTT__UCTXSTT_1 = 1;
4502 // No STOP generated
4503 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_0 = 0;
4504 // Generate STOP
4505 static const uint32_t UCBxCTLW0_UCTXSTP__UCTXSTP_1 = 1;
4506 // Acknowledge normally
4507 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_0 = 0;
4508 // Generate NACK
4509 static const uint32_t UCBxCTLW0_UCTXNACK__UCTXNACK_1 = 1;
4510 // Receiver
4511 static const uint32_t UCBxCTLW0_UCTR__UCTR_0 = 0;
4512 // Transmitter
4513 static const uint32_t UCBxCTLW0_UCTR__UCTR_1 = 1;
4514 // Do not acknowledge the slave address
4515 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_0 = 0;
4516 // Acknowledge the slave address
4517 static const uint32_t UCBxCTLW0_UCTXACK__UCTXACK_1 = 1;
4518 // UCLKI
4519 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_0 = 0;
4520 // ACLK
4521 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_1 = 1;
4522 // SMCLK
4523 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_2 = 2;
4524 // SMCLK
4525 static const uint32_t UCBxCTLW0_UCSSEL__UCSSEL_3 = 3;
4526 // Asynchronous mode
4527 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_0 = 0;
4528 // Synchronous mode
4529 static const uint32_t UCBxCTLW0_UCSYNC__UCSYNC_1 = 1;
4530 // 3-pin SPI
4531 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_0 = 0;
4532 // 4-pin SPI (master or slave enabled if STE = 1)
4533 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_1 = 1;
4534 // 4-pin SPI (master or slave enabled if STE = 0)
4535 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_2 = 2;
4536 // I2C mode
4537 static const uint32_t UCBxCTLW0_UCMODE__UCMODE_3 = 3;
4538 // Slave mode
4539 static const uint32_t UCBxCTLW0_UCMST__UCMST_0 = 0;
4540 // Master mode
4541 static const uint32_t UCBxCTLW0_UCMST__UCMST_1 = 1;
4542 // Single master environment. There is no other master in the system. The address compare unit is disabled.
4543 static const uint32_t UCBxCTLW0_UCMM__UCMM_0 = 0;
4544 // Multi-master environment
4545 static const uint32_t UCBxCTLW0_UCMM__UCMM_1 = 1;
4546 // Address slave with 7-bit address
4547 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_0 = 0;
4548 // Address slave with 10-bit address
4549 static const uint32_t UCBxCTLW0_UCSLA10__UCSLA10_1 = 1;
4550 // Own address is a 7-bit address
4551 static const uint32_t UCBxCTLW0_UCA10__UCA10_0 = 0;
4552 // Own address is a 10-bit address
4553 static const uint32_t UCBxCTLW0_UCA10__UCA10_1 = 1;
4554
4555 // eUSCI_Bx Control Word Register 1
4556 // Reset value: 0x00000003
4557 BEGIN_TYPE(UCBxCTLW1_t, uint16_t)
4558 // Deglitch time
4559 ADD_BITFIELD_RW(UCGLIT, 0, 2)
4560 // Automatic STOP condition generation
4561 ADD_BITFIELD_RW(UCASTP, 2, 2)
4562 // SW or HW ACK control
4563 ADD_BITFIELD_RW(UCSWACK, 4, 1)
4564 // ACK all master bytes
4565 ADD_BITFIELD_RW(UCSTPNACK, 5, 1)
4566 // Clock low timeout select
4567 ADD_BITFIELD_RW(UCCLTO, 6, 2)
4568 // Early UCTXIFG0
4569 ADD_BITFIELD_RW(UCETXINT, 8, 1)
4570 END_TYPE()
4571
4572 // 50 ns
4573 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_0 = 0;
4574 // 25 ns
4575 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_1 = 1;
4576 // 12.5 ns
4577 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_2 = 2;
4578 // 6.25 ns
4579 static const uint32_t UCBxCTLW1_UCGLIT__UCGLIT_3 = 3;
4580 // No automatic STOP generation. The STOP condition is generated after the user sets the UCTXSTP bit. The value in UCBxTBCNT is a don't care.
4581 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_0 = 0;
4582 // UCBCNTIFG is set with the byte counter reaches the threshold defined in UCBxTBCNT
4583 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_1 = 1;
4584 // A STOP condition is generated automatically after the byte counter value reached UCBxTBCNT. UCBCNTIFG is set with the byte counter reaching the threshold
4585 static const uint32_t UCBxCTLW1_UCASTP__UCASTP_2 = 2;
4586 // The address acknowledge of the slave is controlled by the eUSCI_B module
4587 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_0 = 0;
4588 // The user needs to trigger the sending of the address ACK by issuing UCTXACK
4589 static const uint32_t UCBxCTLW1_UCSWACK__UCSWACK_1 = 1;
4590 // Send a non-acknowledge before the STOP condition as a master receiver (conform to I2C standard)
4591 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_0 = 0;
4592 // All bytes are acknowledged by the eUSCI_B when configured as master receiver
4593 static const uint32_t UCBxCTLW1_UCSTPNACK__UCSTPNACK_1 = 1;
4594 // Disable clock low timeout counter
4595 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_0 = 0;
4596 // 135 000 SYSCLK cycles (approximately 28 ms)
4597 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_1 = 1;
4598 // 150 000 SYSCLK cycles (approximately 31 ms)
4599 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_2 = 2;
4600 // 165 000 SYSCLK cycles (approximately 34 ms)
4601 static const uint32_t UCBxCTLW1_UCCLTO__UCCLTO_3 = 3;
4602 // UCTXIFGx is set after an address match with UCxI2COAx and the direction bit indicating slave transmit
4603 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_0 = 0;
4604 // UCTXIFG0 is set for each START condition
4605 static const uint32_t UCBxCTLW1_UCETXINT__UCETXINT_1 = 1;
4606
4607 // eUSCI_Bx Baud Rate Control Word Register
4608 // Reset value: 0x00000000
4609 BEGIN_TYPE(UCBxBRW_t, uint16_t)
4610 // Bit clock prescaler
4611 ADD_BITFIELD_RW(UCBR, 0, 16)
4612 END_TYPE()
4613
4614 // eUSCI_Bx Status Register
4615 // Reset value: 0x00000000
4616 BEGIN_TYPE(UCBxSTATW_t, uint16_t)
4617 // Bus busy
4618 ADD_BITFIELD_RO(UCBBUSY, 4, 1)
4619 // General call address received
4620 ADD_BITFIELD_RO(UCGC, 5, 1)
4621 // SCL low
4622 ADD_BITFIELD_RO(UCSCLLOW, 6, 1)
4623 // Hardware byte counter value
4624 ADD_BITFIELD_RO(UCBCNT, 8, 8)
4625 END_TYPE()
4626
4627 // Bus inactive
4628 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_0 = 0;
4629 // Bus busy
4630 static const uint32_t UCBxSTATW_UCBBUSY__UCBBUSY_1 = 1;
4631 // No general call address received
4632 static const uint32_t UCBxSTATW_UCGC__UCGC_0 = 0;
4633 // General call address received
4634 static const uint32_t UCBxSTATW_UCGC__UCGC_1 = 1;
4635 // SCL is not held low
4636 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_0 = 0;
4637 // SCL is held low
4638 static const uint32_t UCBxSTATW_UCSCLLOW__UCSCLLOW_1 = 1;
4639
4640 // eUSCI_Bx Byte Counter Threshold Register
4641 // Reset value: 0x00000000
4642 BEGIN_TYPE(UCBxTBCNT_t, uint16_t)
4643 // Byte counter threshold value
4644 ADD_BITFIELD_RW(UCTBCNT, 0, 8)
4645 END_TYPE()
4646
4647 // eUSCI_Bx Receive Buffer Register
4648 // Reset value: 0x00000000
4649 BEGIN_TYPE(UCBxRXBUF_t, uint16_t)
4650 // Receive data buffer
4651 ADD_BITFIELD_RO(UCRXBUF, 0, 8)
4652 END_TYPE()
4653
4654 // eUSCI_Bx Transmit Buffer Register
4655 // Reset value: 0x00000000
4656 BEGIN_TYPE(UCBxTXBUF_t, uint16_t)
4657 // Transmit data buffer
4658 ADD_BITFIELD_RW(UCTXBUF, 0, 8)
4659 END_TYPE()
4660
4661 // eUSCI_Bx I2C Own Address 0 Register
4662 // Reset value: 0x00000000
4663 BEGIN_TYPE(UCBxI2COA0_t, uint16_t)
4664 // I2C own address
4665 ADD_BITFIELD_RW(I2COA0, 0, 10)
4666 // Own Address enable register
4667 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4668 // General call response enable
4669 ADD_BITFIELD_RW(UCGCEN, 15, 1)
4670 END_TYPE()
4671
4672 // The slave address defined in I2COA0 is disabled
4673 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_0 = 0;
4674 // The slave address defined in I2COA0 is enabled
4675 static const uint32_t UCBxI2COA0_UCOAEN__UCOAEN_1 = 1;
4676 // Do not respond to a general call
4677 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_0 = 0;
4678 // Respond to a general call
4679 static const uint32_t UCBxI2COA0_UCGCEN__UCGCEN_1 = 1;
4680
4681 // eUSCI_Bx I2C Own Address 1 Register
4682 // Reset value: 0x00000000
4683 BEGIN_TYPE(UCBxI2COA1_t, uint16_t)
4684 // I2C own address
4685 ADD_BITFIELD_RW(I2COA1, 0, 10)
4686 // Own Address enable register
4687 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4688 END_TYPE()
4689
4690 // The slave address defined in I2COA1 is disabled
4691 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_0 = 0;
4692 // The slave address defined in I2COA1 is enabled
4693 static const uint32_t UCBxI2COA1_UCOAEN__UCOAEN_1 = 1;
4694
4695 // eUSCI_Bx I2C Own Address 2 Register
4696 // Reset value: 0x00000000
4697 BEGIN_TYPE(UCBxI2COA2_t, uint16_t)
4698 // I2C own address
4699 ADD_BITFIELD_RW(I2COA2, 0, 10)
4700 // Own Address enable register
4701 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4702 END_TYPE()
4703
4704 // The slave address defined in I2COA2 is disabled
4705 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_0 = 0;
4706 // The slave address defined in I2COA2 is enabled
4707 static const uint32_t UCBxI2COA2_UCOAEN__UCOAEN_1 = 1;
4708
4709 // eUSCI_Bx I2C Own Address 3 Register
4710 // Reset value: 0x00000000
4711 BEGIN_TYPE(UCBxI2COA3_t, uint16_t)
4712 // I2C own address
4713 ADD_BITFIELD_RW(I2COA3, 0, 10)
4714 // Own Address enable register
4715 ADD_BITFIELD_RW(UCOAEN, 10, 1)
4716 END_TYPE()
4717
4718 // The slave address defined in I2COA3 is disabled
4719 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_0 = 0;
4720 // The slave address defined in I2COA3 is enabled
4721 static const uint32_t UCBxI2COA3_UCOAEN__UCOAEN_1 = 1;
4722
4723 // eUSCI_Bx I2C Received Address Register
4724 // Reset value: 0x00000000
4725 BEGIN_TYPE(UCBxADDRX_t, uint16_t)
4726 // Received Address Register
4727 ADD_BITFIELD_RO(ADDRX, 0, 10)
4728 END_TYPE()
4729
4730 // eUSCI_Bx I2C Address Mask Register
4731 // Reset value: 0x000003ff
4732 BEGIN_TYPE(UCBxADDMASK_t, uint16_t)
4733 // Address Mask Register. By clearing the corresponding bit of the own address, this bit is a don't care when comparing the address on the bus to the own address. Using this method, it is possible to react on more than one slave address. When all bits of ADDMASKx are set, the address mask feature is deactivated. Modify only when UCSWRST = 1.
4734 ADD_BITFIELD_RW(ADDMASK, 0, 10)
4735 END_TYPE()
4736
4737 // eUSCI_Bx I2C Slave Address Register
4738 // Reset value: 0x00000000
4739 BEGIN_TYPE(UCBxI2CSA_t, uint16_t)
4740 // I2C slave address
4741 ADD_BITFIELD_RW(I2CSA, 0, 10)
4742 END_TYPE()
4743
4744 // eUSCI_Bx Interrupt Enable Register
4745 // Reset value: 0x00000000
4746 BEGIN_TYPE(UCBxIE_t, uint16_t)
4747 // Receive interrupt enable 0
4748 ADD_BITFIELD_RW(UCRXIE0, 0, 1)
4749 // Transmit interrupt enable 0
4750 ADD_BITFIELD_RW(UCTXIE0, 1, 1)
4751 // START condition interrupt enable
4752 ADD_BITFIELD_RW(UCSTTIE, 2, 1)
4753 // STOP condition interrupt enable
4754 ADD_BITFIELD_RW(UCSTPIE, 3, 1)
4755 // Arbitration lost interrupt enable
4756 ADD_BITFIELD_RW(UCALIE, 4, 1)
4757 // Not-acknowledge interrupt enable
4758 ADD_BITFIELD_RW(UCNACKIE, 5, 1)
4759 // Byte counter interrupt enable
4760 ADD_BITFIELD_RW(UCBCNTIE, 6, 1)
4761 // Clock low timeout interrupt enable
4762 ADD_BITFIELD_RW(UCCLTOIE, 7, 1)
4763 // Receive interrupt enable 1
4764 ADD_BITFIELD_RW(UCRXIE1, 8, 1)
4765 // Transmit interrupt enable 1
4766 ADD_BITFIELD_RW(UCTXIE1, 9, 1)
4767 // Receive interrupt enable 2
4768 ADD_BITFIELD_RW(UCRXIE2, 10, 1)
4769 // Transmit interrupt enable 2
4770 ADD_BITFIELD_RW(UCTXIE2, 11, 1)
4771 // Receive interrupt enable 3
4772 ADD_BITFIELD_RW(UCRXIE3, 12, 1)
4773 // Transmit interrupt enable 3
4774 ADD_BITFIELD_RW(UCTXIE3, 13, 1)
4775 // Bit position 9 interrupt enable
4776 ADD_BITFIELD_RW(UCBIT9IE, 14, 1)
4777 END_TYPE()
4778
4779 // Interrupt disabled
4780 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_0 = 0;
4781 // Interrupt enabled
4782 static const uint32_t UCBxIE_UCRXIE0__UCRXIE0_1 = 1;
4783 // Interrupt disabled
4784 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_0 = 0;
4785 // Interrupt enabled
4786 static const uint32_t UCBxIE_UCTXIE0__UCTXIE0_1 = 1;
4787 // Interrupt disabled
4788 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_0 = 0;
4789 // Interrupt enabled
4790 static const uint32_t UCBxIE_UCSTTIE__UCSTTIE_1 = 1;
4791 // Interrupt disabled
4792 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_0 = 0;
4793 // Interrupt enabled
4794 static const uint32_t UCBxIE_UCSTPIE__UCSTPIE_1 = 1;
4795 // Interrupt disabled
4796 static const uint32_t UCBxIE_UCALIE__UCALIE_0 = 0;
4797 // Interrupt enabled
4798 static const uint32_t UCBxIE_UCALIE__UCALIE_1 = 1;
4799 // Interrupt disabled
4800 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_0 = 0;
4801 // Interrupt enabled
4802 static const uint32_t UCBxIE_UCNACKIE__UCNACKIE_1 = 1;
4803 // Interrupt disabled
4804 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_0 = 0;
4805 // Interrupt enabled
4806 static const uint32_t UCBxIE_UCBCNTIE__UCBCNTIE_1 = 1;
4807 // Interrupt disabled
4808 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_0 = 0;
4809 // Interrupt enabled
4810 static const uint32_t UCBxIE_UCCLTOIE__UCCLTOIE_1 = 1;
4811 // Interrupt disabled
4812 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_0 = 0;
4813 // Interrupt enabled
4814 static const uint32_t UCBxIE_UCRXIE1__UCRXIE1_1 = 1;
4815 // Interrupt disabled
4816 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_0 = 0;
4817 // Interrupt enabled
4818 static const uint32_t UCBxIE_UCTXIE1__UCTXIE1_1 = 1;
4819 // Interrupt disabled
4820 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_0 = 0;
4821 // Interrupt enabled
4822 static const uint32_t UCBxIE_UCRXIE2__UCRXIE2_1 = 1;
4823 // Interrupt disabled
4824 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_0 = 0;
4825 // Interrupt enabled
4826 static const uint32_t UCBxIE_UCTXIE2__UCTXIE2_1 = 1;
4827 // Interrupt disabled
4828 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_0 = 0;
4829 // Interrupt enabled
4830 static const uint32_t UCBxIE_UCRXIE3__UCRXIE3_1 = 1;
4831 // Interrupt disabled
4832 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_0 = 0;
4833 // Interrupt enabled
4834 static const uint32_t UCBxIE_UCTXIE3__UCTXIE3_1 = 1;
4835 // Interrupt disabled
4836 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_0 = 0;
4837 // Interrupt enabled
4838 static const uint32_t UCBxIE_UCBIT9IE__UCBIT9IE_1 = 1;
4839
4840 // eUSCI_Bx Interrupt Flag Register
4841 // Reset value: 0x00000002
4842 BEGIN_TYPE(UCBxIFG_t, uint16_t)
4843 // eUSCI_B receive interrupt flag 0
4844 ADD_BITFIELD_RW(UCRXIFG0, 0, 1)
4845 // eUSCI_B transmit interrupt flag 0
4846 ADD_BITFIELD_RW(UCTXIFG0, 1, 1)
4847 // START condition interrupt flag
4848 ADD_BITFIELD_RW(UCSTTIFG, 2, 1)
4849 // STOP condition interrupt flag
4850 ADD_BITFIELD_RW(UCSTPIFG, 3, 1)
4851 // Arbitration lost interrupt flag
4852 ADD_BITFIELD_RW(UCALIFG, 4, 1)
4853 // Not-acknowledge received interrupt flag
4854 ADD_BITFIELD_RW(UCNACKIFG, 5, 1)
4855 // Byte counter interrupt flag
4856 ADD_BITFIELD_RW(UCBCNTIFG, 6, 1)
4857 // Clock low timeout interrupt flag
4858 ADD_BITFIELD_RW(UCCLTOIFG, 7, 1)
4859 // eUSCI_B receive interrupt flag 1
4860 ADD_BITFIELD_RW(UCRXIFG1, 8, 1)
4861 // eUSCI_B transmit interrupt flag 1
4862 ADD_BITFIELD_RW(UCTXIFG1, 9, 1)
4863 // eUSCI_B receive interrupt flag 2
4864 ADD_BITFIELD_RW(UCRXIFG2, 10, 1)
4865 // eUSCI_B transmit interrupt flag 2
4866 ADD_BITFIELD_RW(UCTXIFG2, 11, 1)
4867 // eUSCI_B receive interrupt flag 3
4868 ADD_BITFIELD_RW(UCRXIFG3, 12, 1)
4869 // eUSCI_B transmit interrupt flag 3
4870 ADD_BITFIELD_RW(UCTXIFG3, 13, 1)
4871 // Bit position 9 interrupt flag
4872 ADD_BITFIELD_RW(UCBIT9IFG, 14, 1)
4873 END_TYPE()
4874
4875 // No interrupt pending
4876 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_0 = 0;
4877 // Interrupt pending
4878 static const uint32_t UCBxIFG_UCRXIFG0__UCRXIFG0_1 = 1;
4879 // No interrupt pending
4880 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_0 = 0;
4881 // Interrupt pending
4882 static const uint32_t UCBxIFG_UCTXIFG0__UCTXIFG0_1 = 1;
4883 // No interrupt pending
4884 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_0 = 0;
4885 // Interrupt pending
4886 static const uint32_t UCBxIFG_UCSTTIFG__UCSTTIFG_1 = 1;
4887 // No interrupt pending
4888 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_0 = 0;
4889 // Interrupt pending
4890 static const uint32_t UCBxIFG_UCSTPIFG__UCSTPIFG_1 = 1;
4891 // No interrupt pending
4892 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_0 = 0;
4893 // Interrupt pending
4894 static const uint32_t UCBxIFG_UCALIFG__UCALIFG_1 = 1;
4895 // No interrupt pending
4896 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_0 = 0;
4897 // Interrupt pending
4898 static const uint32_t UCBxIFG_UCNACKIFG__UCNACKIFG_1 = 1;
4899 // No interrupt pending
4900 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_0 = 0;
4901 // Interrupt pending
4902 static const uint32_t UCBxIFG_UCBCNTIFG__UCBCNTIFG_1 = 1;
4903 // No interrupt pending
4904 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_0 = 0;
4905 // Interrupt pending
4906 static const uint32_t UCBxIFG_UCCLTOIFG__UCCLTOIFG_1 = 1;
4907 // No interrupt pending
4908 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_0 = 0;
4909 // Interrupt pending
4910 static const uint32_t UCBxIFG_UCRXIFG1__UCRXIFG1_1 = 1;
4911 // No interrupt pending
4912 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_0 = 0;
4913 // Interrupt pending
4914 static const uint32_t UCBxIFG_UCTXIFG1__UCTXIFG1_1 = 1;
4915 // No interrupt pending
4916 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_0 = 0;
4917 // Interrupt pending
4918 static const uint32_t UCBxIFG_UCRXIFG2__UCRXIFG2_1 = 1;
4919 // No interrupt pending
4920 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_0 = 0;
4921 // Interrupt pending
4922 static const uint32_t UCBxIFG_UCTXIFG2__UCTXIFG2_1 = 1;
4923 // No interrupt pending
4924 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_0 = 0;
4925 // Interrupt pending
4926 static const uint32_t UCBxIFG_UCRXIFG3__UCRXIFG3_1 = 1;
4927 // No interrupt pending
4928 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_0 = 0;
4929 // Interrupt pending
4930 static const uint32_t UCBxIFG_UCTXIFG3__UCTXIFG3_1 = 1;
4931 // No interrupt pending
4932 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_0 = 0;
4933 // Interrupt pending
4934 static const uint32_t UCBxIFG_UCBIT9IFG__UCBIT9IFG_1 = 1;
4935
4936 // eUSCI_Bx Interrupt Vector Register
4937 // Reset value: 0x00000000
4938 BEGIN_TYPE(UCBxIV_t, uint16_t)
4939 // eUSCI_B interrupt vector value
4940 ADD_BITFIELD_RO(UCIV, 0, 16)
4941 END_TYPE()
4942
4943 // No interrupt pending
4944 static const uint32_t UCBxIV_UCIV__UCIV_0 = 0;
4945 // Interrupt Source: Arbitration lost; Interrupt Flag: UCALIFG; Interrupt Priority: Highest
4946 static const uint32_t UCBxIV_UCIV__UCIV_2 = 2;
4947 // Interrupt Source: Not acknowledgment; Interrupt Flag: UCNACKIFG
4948 static const uint32_t UCBxIV_UCIV__UCIV_4 = 4;
4949 // Interrupt Source: Start condition received; Interrupt Flag: UCSTTIFG
4950 static const uint32_t UCBxIV_UCIV__UCIV_6 = 6;
4951 // Interrupt Source: Stop condition received; Interrupt Flag: UCSTPIFG
4952 static const uint32_t UCBxIV_UCIV__UCIV_8 = 8;
4953 // Interrupt Source: Slave 3 Data received; Interrupt Flag: UCRXIFG3
4954 static const uint32_t UCBxIV_UCIV__UCIV_10 = 10;
4955 // Interrupt Source: Slave 3 Transmit buffer empty; Interrupt Flag: UCTXIFG3
4956 static const uint32_t UCBxIV_UCIV__UCIV_12 = 12;
4957 // Interrupt Source: Slave 2 Data received; Interrupt Flag: UCRXIFG2
4958 static const uint32_t UCBxIV_UCIV__UCIV_14 = 14;
4959 // Interrupt Source: Slave 2 Transmit buffer empty; Interrupt Flag: UCTXIFG2
4960 static const uint32_t UCBxIV_UCIV__UCIV_16 = 16;
4961 // Interrupt Source: Slave 1 Data received; Interrupt Flag: UCRXIFG1
4962 static const uint32_t UCBxIV_UCIV__UCIV_18 = 18;
4963 // Interrupt Source: Slave 1 Transmit buffer empty; Interrupt Flag: UCTXIFG1
4964 static const uint32_t UCBxIV_UCIV__UCIV_20 = 20;
4965 // Interrupt Source: Data received; Interrupt Flag: UCRXIFG0
4966 static const uint32_t UCBxIV_UCIV__UCIV_22 = 22;
4967 // Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG0
4968 static const uint32_t UCBxIV_UCIV__UCIV_24 = 24;
4969 // Interrupt Source: Byte counter zero; Interrupt Flag: UCBCNTIFG
4970 static const uint32_t UCBxIV_UCIV__UCIV_26 = 26;
4971 // Interrupt Source: Clock low timeout; Interrupt Flag: UCCLTOIFG
4972 static const uint32_t UCBxIV_UCIV__UCIV_28 = 28;
4973 // Interrupt Source: Nineth bit position; Interrupt Flag: UCBIT9IFG; Priority: Lowest
4974 static const uint32_t UCBxIV_UCIV__UCIV_30 = 30;
4975
4976 struct EUSCI_B3_t {
4977 UCBxCTLW0_t UCBxCTLW0;
4978 UCBxCTLW1_t UCBxCTLW1;
4979 uint16_t reserved0;
4980 UCBxBRW_t UCBxBRW;
4981 UCBxSTATW_t UCBxSTATW;
4982 UCBxTBCNT_t UCBxTBCNT;
4983 UCBxRXBUF_t UCBxRXBUF;
4984 UCBxTXBUF_t UCBxTXBUF;
4985 uint16_t reserved1[2];
4986 UCBxI2COA0_t UCBxI2COA0;
4987 UCBxI2COA1_t UCBxI2COA1;
4988 UCBxI2COA2_t UCBxI2COA2;
4989 UCBxI2COA3_t UCBxI2COA3;
4990 UCBxADDRX_t UCBxADDRX;
4991 UCBxADDMASK_t UCBxADDMASK;
4992 UCBxI2CSA_t UCBxI2CSA;
4993 uint16_t reserved2[4];
4994 UCBxIE_t UCBxIE;
4995 UCBxIFG_t UCBxIFG;
4996 UCBxIV_t UCBxIV;
4997 };
4998
4999 static EUSCI_B3_t & EUSCI_B3 = (*(EUSCI_B3_t *)0x40002c00);
5000
5001} // _EUSCI_B3_
5002
5003// REF_A
5004namespace _REF_A_ {
5005
5006 // REF Control Register 0
5007 BEGIN_TYPE(REFCTL0_t, uint16_t)
5008 // Reference enable
5009 ADD_BITFIELD_RW(REFON, 0, 1)
5010 // Reference output buffer
5011 ADD_BITFIELD_RW(REFOUT, 1, 1)
5012 // Temperature sensor disabled
5013 ADD_BITFIELD_RW(REFTCOFF, 3, 1)
5014 // Reference voltage level select
5015 ADD_BITFIELD_RW(REFVSEL, 4, 2)
5016 // Reference generator one-time trigger
5017 ADD_BITFIELD_RW(REFGENOT, 6, 1)
5018 // Bandgap and bandgap buffer one-time trigger
5019 ADD_BITFIELD_RW(REFBGOT, 7, 1)
5020 // Reference generator active
5021 ADD_BITFIELD_RO(REFGENACT, 8, 1)
5022 // Reference bandgap active
5023 ADD_BITFIELD_RO(REFBGACT, 9, 1)
5024 // Reference generator busy
5025 ADD_BITFIELD_RO(REFGENBUSY, 10, 1)
5026 // Bandgap mode
5027 ADD_BITFIELD_RO(BGMODE, 11, 1)
5028 // Variable reference voltage ready status
5029 ADD_BITFIELD_RO(REFGENRDY, 12, 1)
5030 // Buffered bandgap voltage ready status
5031 ADD_BITFIELD_RO(REFBGRDY, 13, 1)
5032 END_TYPE()
5033
5034 // Disables reference if no other reference requests are pending
5035 static const uint32_t REFCTL0_REFON__REFON_0 = 0;
5036 // Enables reference in static mode
5037 static const uint32_t REFCTL0_REFON__REFON_1 = 1;
5038 // Reference output not available externally
5039 static const uint32_t REFCTL0_REFOUT__REFOUT_0 = 0;
5040 // Reference output available externally. If ADC14REFBURST = 0, output is available continuously. If ADC14REFBURST = 1, output is available only during an ADC14 conversion.
5041 static const uint32_t REFCTL0_REFOUT__REFOUT_1 = 1;
5042 // Temperature sensor enabled
5043 static const uint32_t REFCTL0_REFTCOFF__REFTCOFF_0 = 0;
5044 // Temperature sensor disabled to save power
5045 static const uint32_t REFCTL0_REFTCOFF__REFTCOFF_1 = 1;
5046 // 1.2 V available when reference requested or REFON = 1
5047 static const uint32_t REFCTL0_REFVSEL__REFVSEL_0 = 0;
5048 // 1.45 V available when reference requested or REFON = 1
5049 static const uint32_t REFCTL0_REFVSEL__REFVSEL_1 = 1;
5050 // 2.5 V available when reference requested or REFON = 1
5051 static const uint32_t REFCTL0_REFVSEL__REFVSEL_3 = 3;
5052 // No trigger
5053 static const uint32_t REFCTL0_REFGENOT__REFGENOT_0 = 0;
5054 // Generation of the reference voltage is started by writing 1 or by a hardware trigger
5055 static const uint32_t REFCTL0_REFGENOT__REFGENOT_1 = 1;
5056 // No trigger
5057 static const uint32_t REFCTL0_REFBGOT__REFBGOT_0 = 0;
5058 // Generation of the bandgap voltage is started by writing 1 or by a hardware trigger
5059 static const uint32_t REFCTL0_REFBGOT__REFBGOT_1 = 1;
5060 // Reference generator not active
5061 static const uint32_t REFCTL0_REFGENACT__REFGENACT_0 = 0;
5062 // Reference generator active
5063 static const uint32_t REFCTL0_REFGENACT__REFGENACT_1 = 1;
5064 // Reference bandgap buffer not active
5065 static const uint32_t REFCTL0_REFBGACT__REFBGACT_0 = 0;
5066 // Reference bandgap buffer active
5067 static const uint32_t REFCTL0_REFBGACT__REFBGACT_1 = 1;
5068 // Reference generator not busy
5069 static const uint32_t REFCTL0_REFGENBUSY__REFGENBUSY_0 = 0;
5070 // Reference generator busy
5071 static const uint32_t REFCTL0_REFGENBUSY__REFGENBUSY_1 = 1;
5072 // Static mode
5073 static const uint32_t REFCTL0_BGMODE__BGMODE_0 = 0;
5074 // Sampled mode
5075 static const uint32_t REFCTL0_BGMODE__BGMODE_1 = 1;
5076 // Reference voltage output is not ready to be used
5077 static const uint32_t REFCTL0_REFGENRDY__REFGENRDY_0 = 0;
5078 // Reference voltage output is ready to be used
5079 static const uint32_t REFCTL0_REFGENRDY__REFGENRDY_1 = 1;
5080 // Buffered bandgap voltage is not ready to be used
5081 static const uint32_t REFCTL0_REFBGRDY__REFBGRDY_0 = 0;
5082 // Buffered bandgap voltage is ready to be used
5083 static const uint32_t REFCTL0_REFBGRDY__REFBGRDY_1 = 1;
5084
5085 struct REF_A_t {
5086 REFCTL0_t REFCTL0;
5087 };
5088
5089 static REF_A_t & REF_A = (*(REF_A_t *)0x40003000);
5090
5091} // _REF_A_
5092
5093// COMP_E0
5094namespace _COMP_E0_ {
5095
5096 // Comparator Control Register 0
5097 // Reset value: 0x00000000
5098 BEGIN_TYPE(CExCTL0_t, uint16_t)
5099 // Channel input selected for the V+ terminal
5100 ADD_BITFIELD_RW(CEIPSEL, 0, 4)
5101 // Channel input enable for the V+ terminal
5102 ADD_BITFIELD_RW(CEIPEN, 7, 1)
5103 // Channel input selected for the - terminal
5104 ADD_BITFIELD_RW(CEIMSEL, 8, 4)
5105 // Channel input enable for the - terminal
5106 ADD_BITFIELD_RW(CEIMEN, 15, 1)
5107 END_TYPE()
5108
5109 // Channel 0 selected
5110 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_0 = 0;
5111 // Channel 1 selected
5112 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_1 = 1;
5113 // Channel 2 selected
5114 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_2 = 2;
5115 // Channel 3 selected
5116 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_3 = 3;
5117 // Channel 4 selected
5118 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_4 = 4;
5119 // Channel 5 selected
5120 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_5 = 5;
5121 // Channel 6 selected
5122 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_6 = 6;
5123 // Channel 7 selected
5124 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_7 = 7;
5125 // Channel 8 selected
5126 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_8 = 8;
5127 // Channel 9 selected
5128 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_9 = 9;
5129 // Channel 10 selected
5130 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_10 = 10;
5131 // Channel 11 selected
5132 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_11 = 11;
5133 // Channel 12 selected
5134 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_12 = 12;
5135 // Channel 13 selected
5136 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_13 = 13;
5137 // Channel 14 selected
5138 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_14 = 14;
5139 // Channel 15 selected
5140 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_15 = 15;
5141 // Selected analog input channel for V+ terminal is disabled
5142 static const uint32_t CExCTL0_CEIPEN__CEIPEN_0 = 0;
5143 // Selected analog input channel for V+ terminal is enabled
5144 static const uint32_t CExCTL0_CEIPEN__CEIPEN_1 = 1;
5145 // Channel 0 selected
5146 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_0 = 0;
5147 // Channel 1 selected
5148 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_1 = 1;
5149 // Channel 2 selected
5150 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_2 = 2;
5151 // Channel 3 selected
5152 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_3 = 3;
5153 // Channel 4 selected
5154 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_4 = 4;
5155 // Channel 5 selected
5156 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_5 = 5;
5157 // Channel 6 selected
5158 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_6 = 6;
5159 // Channel 7 selected
5160 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_7 = 7;
5161 // Channel 8 selected
5162 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_8 = 8;
5163 // Channel 9 selected
5164 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_9 = 9;
5165 // Channel 10 selected
5166 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_10 = 10;
5167 // Channel 11 selected
5168 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_11 = 11;
5169 // Channel 12 selected
5170 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_12 = 12;
5171 // Channel 13 selected
5172 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_13 = 13;
5173 // Channel 14 selected
5174 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_14 = 14;
5175 // Channel 15 selected
5176 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_15 = 15;
5177 // Selected analog input channel for V- terminal is disabled
5178 static const uint32_t CExCTL0_CEIMEN__CEIMEN_0 = 0;
5179 // Selected analog input channel for V- terminal is enabled
5180 static const uint32_t CExCTL0_CEIMEN__CEIMEN_1 = 1;
5181
5182 // Comparator Control Register 1
5183 // Reset value: 0x00000000
5184 BEGIN_TYPE(CExCTL1_t, uint16_t)
5185 // Comparator output value
5186 ADD_BITFIELD_RW(CEOUT, 0, 1)
5187 // Comparator output polarity
5188 ADD_BITFIELD_RW(CEOUTPOL, 1, 1)
5189 // Comparator output filter
5190 ADD_BITFIELD_RW(CEF, 2, 1)
5191 // Interrupt edge select for CEIIFG and CEIFG
5192 ADD_BITFIELD_RW(CEIES, 3, 1)
5193 // Input short
5194 ADD_BITFIELD_RW(CESHORT, 4, 1)
5195 // Exchange
5196 ADD_BITFIELD_RW(CEEX, 5, 1)
5197 // Filter delay
5198 ADD_BITFIELD_RW(CEFDLY, 6, 2)
5199 // Power Mode
5200 ADD_BITFIELD_RW(CEPWRMD, 8, 2)
5201 // Comparator On
5202 ADD_BITFIELD_RW(CEON, 10, 1)
5203 // This bit is valid of CEMRVS is set to 1
5204 ADD_BITFIELD_RW(CEMRVL, 11, 1)
5205 // This bit defines if the comparator output selects between VREF0 or VREF1 if CERS = 00, 01, or 10.
5206 ADD_BITFIELD_RW(CEMRVS, 12, 1)
5207 END_TYPE()
5208
5209 // Noninverted
5210 static const uint32_t CExCTL1_CEOUTPOL__CEOUTPOL_0 = 0;
5211 // Inverted
5212 static const uint32_t CExCTL1_CEOUTPOL__CEOUTPOL_1 = 1;
5213 // Comparator output is not filtered
5214 static const uint32_t CExCTL1_CEF__CEF_0 = 0;
5215 // Comparator output is filtered
5216 static const uint32_t CExCTL1_CEF__CEF_1 = 1;
5217 // Rising edge for CEIFG, falling edge for CEIIFG
5218 static const uint32_t CExCTL1_CEIES__CEIES_0 = 0;
5219 // Falling edge for CEIFG, rising edge for CEIIFG
5220 static const uint32_t CExCTL1_CEIES__CEIES_1 = 1;
5221 // Inputs not shorted
5222 static const uint32_t CExCTL1_CESHORT__CESHORT_0 = 0;
5223 // Inputs shorted
5224 static const uint32_t CExCTL1_CESHORT__CESHORT_1 = 1;
5225 // Typical filter delay of TBD (450) ns
5226 static const uint32_t CExCTL1_CEFDLY__CEFDLY_0 = 0;
5227 // Typical filter delay of TBD (900) ns
5228 static const uint32_t CExCTL1_CEFDLY__CEFDLY_1 = 1;
5229 // Typical filter delay of TBD (1800) ns
5230 static const uint32_t CExCTL1_CEFDLY__CEFDLY_2 = 2;
5231 // Typical filter delay of TBD (3600) ns
5232 static const uint32_t CExCTL1_CEFDLY__CEFDLY_3 = 3;
5233 // High-speed mode
5234 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_0 = 0;
5235 // Normal mode
5236 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_1 = 1;
5237 // Ultra-low power mode
5238 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_2 = 2;
5239 // Off
5240 static const uint32_t CExCTL1_CEON__CEON_0 = 0;
5241 // On
5242 static const uint32_t CExCTL1_CEON__CEON_1 = 1;
5243 // VREF0 is selected if CERS = 00, 01, or 10
5244 static const uint32_t CExCTL1_CEMRVL__CEMRVL_0 = 0;
5245 // VREF1 is selected if CERS = 00, 01, or 10
5246 static const uint32_t CExCTL1_CEMRVL__CEMRVL_1 = 1;
5247 // Comparator output state selects between VREF0 or VREF1
5248 static const uint32_t CExCTL1_CEMRVS__CEMRVS_0 = 0;
5249 // CEMRVL selects between VREF0 or VREF1
5250 static const uint32_t CExCTL1_CEMRVS__CEMRVS_1 = 1;
5251
5252 // Comparator Control Register 2
5253 // Reset value: 0x00000000
5254 BEGIN_TYPE(CExCTL2_t, uint16_t)
5255 // Reference resistor tap 0
5256 ADD_BITFIELD_RW(CEREF0, 0, 5)
5257 // Reference select
5258 ADD_BITFIELD_RW(CERSEL, 5, 1)
5259 // Reference source
5260 ADD_BITFIELD_RW(CERS, 6, 2)
5261 // Reference resistor tap 1
5262 ADD_BITFIELD_RW(CEREF1, 8, 5)
5263 // Reference voltage level
5264 ADD_BITFIELD_RW(CEREFL, 13, 2)
5265 // Reference accuracy
5266 ADD_BITFIELD_RW(CEREFACC, 15, 1)
5267 END_TYPE()
5268
5269 // Reference resistor tap for setting 0.
5270 static const uint32_t CExCTL2_CEREF0__CEREF0_0 = 0;
5271 // Reference resistor tap for setting 1.
5272 static const uint32_t CExCTL2_CEREF0__CEREF0_1 = 1;
5273 // Reference resistor tap for setting 2.
5274 static const uint32_t CExCTL2_CEREF0__CEREF0_2 = 2;
5275 // Reference resistor tap for setting 3.
5276 static const uint32_t CExCTL2_CEREF0__CEREF0_3 = 3;
5277 // Reference resistor tap for setting 4.
5278 static const uint32_t CExCTL2_CEREF0__CEREF0_4 = 4;
5279 // Reference resistor tap for setting 5.
5280 static const uint32_t CExCTL2_CEREF0__CEREF0_5 = 5;
5281 // Reference resistor tap for setting 6.
5282 static const uint32_t CExCTL2_CEREF0__CEREF0_6 = 6;
5283 // Reference resistor tap for setting 7.
5284 static const uint32_t CExCTL2_CEREF0__CEREF0_7 = 7;
5285 // Reference resistor tap for setting 8.
5286 static const uint32_t CExCTL2_CEREF0__CEREF0_8 = 8;
5287 // Reference resistor tap for setting 9.
5288 static const uint32_t CExCTL2_CEREF0__CEREF0_9 = 9;
5289 // Reference resistor tap for setting 10.
5290 static const uint32_t CExCTL2_CEREF0__CEREF0_10 = 10;
5291 // Reference resistor tap for setting 11.
5292 static const uint32_t CExCTL2_CEREF0__CEREF0_11 = 11;
5293 // Reference resistor tap for setting 12.
5294 static const uint32_t CExCTL2_CEREF0__CEREF0_12 = 12;
5295 // Reference resistor tap for setting 13.
5296 static const uint32_t CExCTL2_CEREF0__CEREF0_13 = 13;
5297 // Reference resistor tap for setting 14.
5298 static const uint32_t CExCTL2_CEREF0__CEREF0_14 = 14;
5299 // Reference resistor tap for setting 15.
5300 static const uint32_t CExCTL2_CEREF0__CEREF0_15 = 15;
5301 // Reference resistor tap for setting 16.
5302 static const uint32_t CExCTL2_CEREF0__CEREF0_16 = 16;
5303 // Reference resistor tap for setting 17.
5304 static const uint32_t CExCTL2_CEREF0__CEREF0_17 = 17;
5305 // Reference resistor tap for setting 18.
5306 static const uint32_t CExCTL2_CEREF0__CEREF0_18 = 18;
5307 // Reference resistor tap for setting 19.
5308 static const uint32_t CExCTL2_CEREF0__CEREF0_19 = 19;
5309 // Reference resistor tap for setting 20.
5310 static const uint32_t CExCTL2_CEREF0__CEREF0_20 = 20;
5311 // Reference resistor tap for setting 21.
5312 static const uint32_t CExCTL2_CEREF0__CEREF0_21 = 21;
5313 // Reference resistor tap for setting 22.
5314 static const uint32_t CExCTL2_CEREF0__CEREF0_22 = 22;
5315 // Reference resistor tap for setting 23.
5316 static const uint32_t CExCTL2_CEREF0__CEREF0_23 = 23;
5317 // Reference resistor tap for setting 24.
5318 static const uint32_t CExCTL2_CEREF0__CEREF0_24 = 24;
5319 // Reference resistor tap for setting 25.
5320 static const uint32_t CExCTL2_CEREF0__CEREF0_25 = 25;
5321 // Reference resistor tap for setting 26.
5322 static const uint32_t CExCTL2_CEREF0__CEREF0_26 = 26;
5323 // Reference resistor tap for setting 27.
5324 static const uint32_t CExCTL2_CEREF0__CEREF0_27 = 27;
5325 // Reference resistor tap for setting 28.
5326 static const uint32_t CExCTL2_CEREF0__CEREF0_28 = 28;
5327 // Reference resistor tap for setting 29.
5328 static const uint32_t CExCTL2_CEREF0__CEREF0_29 = 29;
5329 // Reference resistor tap for setting 30.
5330 static const uint32_t CExCTL2_CEREF0__CEREF0_30 = 30;
5331 // Reference resistor tap for setting 31.
5332 static const uint32_t CExCTL2_CEREF0__CEREF0_31 = 31;
5333 // When CEEX = 0, VREF is applied to the V+ terminal; When CEEX = 1, VREF is applied to the V- terminal
5334 static const uint32_t CExCTL2_CERSEL__CERSEL_0 = 0;
5335 // When CEEX = 0, VREF is applied to the V- terminal; When CEEX = 1, VREF is applied to the V+ terminal
5336 static const uint32_t CExCTL2_CERSEL__CERSEL_1 = 1;
5337 // No current is drawn by the reference circuitry
5338 static const uint32_t CExCTL2_CERS__CERS_0 = 0;
5339 // VCC applied to the resistor ladder
5340 static const uint32_t CExCTL2_CERS__CERS_1 = 1;
5341 // Shared reference voltage applied to the resistor ladder
5342 static const uint32_t CExCTL2_CERS__CERS_2 = 2;
5343 // Shared reference voltage supplied to V(CREF). Resistor ladder is off
5344 static const uint32_t CExCTL2_CERS__CERS_3 = 3;
5345 // Reference resistor tap for setting 0.
5346 static const uint32_t CExCTL2_CEREF1__CEREF1_0 = 0;
5347 // Reference resistor tap for setting 1.
5348 static const uint32_t CExCTL2_CEREF1__CEREF1_1 = 1;
5349 // Reference resistor tap for setting 2.
5350 static const uint32_t CExCTL2_CEREF1__CEREF1_2 = 2;
5351 // Reference resistor tap for setting 3.
5352 static const uint32_t CExCTL2_CEREF1__CEREF1_3 = 3;
5353 // Reference resistor tap for setting 4.
5354 static const uint32_t CExCTL2_CEREF1__CEREF1_4 = 4;
5355 // Reference resistor tap for setting 5.
5356 static const uint32_t CExCTL2_CEREF1__CEREF1_5 = 5;
5357 // Reference resistor tap for setting 6.
5358 static const uint32_t CExCTL2_CEREF1__CEREF1_6 = 6;
5359 // Reference resistor tap for setting 7.
5360 static const uint32_t CExCTL2_CEREF1__CEREF1_7 = 7;
5361 // Reference resistor tap for setting 8.
5362 static const uint32_t CExCTL2_CEREF1__CEREF1_8 = 8;
5363 // Reference resistor tap for setting 9.
5364 static const uint32_t CExCTL2_CEREF1__CEREF1_9 = 9;
5365 // Reference resistor tap for setting 10.
5366 static const uint32_t CExCTL2_CEREF1__CEREF1_10 = 10;
5367 // Reference resistor tap for setting 11.
5368 static const uint32_t CExCTL2_CEREF1__CEREF1_11 = 11;
5369 // Reference resistor tap for setting 12.
5370 static const uint32_t CExCTL2_CEREF1__CEREF1_12 = 12;
5371 // Reference resistor tap for setting 13.
5372 static const uint32_t CExCTL2_CEREF1__CEREF1_13 = 13;
5373 // Reference resistor tap for setting 14.
5374 static const uint32_t CExCTL2_CEREF1__CEREF1_14 = 14;
5375 // Reference resistor tap for setting 15.
5376 static const uint32_t CExCTL2_CEREF1__CEREF1_15 = 15;
5377 // Reference resistor tap for setting 16.
5378 static const uint32_t CExCTL2_CEREF1__CEREF1_16 = 16;
5379 // Reference resistor tap for setting 17.
5380 static const uint32_t CExCTL2_CEREF1__CEREF1_17 = 17;
5381 // Reference resistor tap for setting 18.
5382 static const uint32_t CExCTL2_CEREF1__CEREF1_18 = 18;
5383 // Reference resistor tap for setting 19.
5384 static const uint32_t CExCTL2_CEREF1__CEREF1_19 = 19;
5385 // Reference resistor tap for setting 20.
5386 static const uint32_t CExCTL2_CEREF1__CEREF1_20 = 20;
5387 // Reference resistor tap for setting 21.
5388 static const uint32_t CExCTL2_CEREF1__CEREF1_21 = 21;
5389 // Reference resistor tap for setting 22.
5390 static const uint32_t CExCTL2_CEREF1__CEREF1_22 = 22;
5391 // Reference resistor tap for setting 23.
5392 static const uint32_t CExCTL2_CEREF1__CEREF1_23 = 23;
5393 // Reference resistor tap for setting 24.
5394 static const uint32_t CExCTL2_CEREF1__CEREF1_24 = 24;
5395 // Reference resistor tap for setting 25.
5396 static const uint32_t CExCTL2_CEREF1__CEREF1_25 = 25;
5397 // Reference resistor tap for setting 26.
5398 static const uint32_t CExCTL2_CEREF1__CEREF1_26 = 26;
5399 // Reference resistor tap for setting 27.
5400 static const uint32_t CExCTL2_CEREF1__CEREF1_27 = 27;
5401 // Reference resistor tap for setting 28.
5402 static const uint32_t CExCTL2_CEREF1__CEREF1_28 = 28;
5403 // Reference resistor tap for setting 29.
5404 static const uint32_t CExCTL2_CEREF1__CEREF1_29 = 29;
5405 // Reference resistor tap for setting 30.
5406 static const uint32_t CExCTL2_CEREF1__CEREF1_30 = 30;
5407 // Reference resistor tap for setting 31.
5408 static const uint32_t CExCTL2_CEREF1__CEREF1_31 = 31;
5409 // Reference amplifier is disabled. No reference voltage is requested
5410 static const uint32_t CExCTL2_CEREFL__CEREFL_0 = 0;
5411 // 1.2 V is selected as shared reference voltage input
5412 static const uint32_t CExCTL2_CEREFL__CEREFL_1 = 1;
5413 // 2.0 V is selected as shared reference voltage input
5414 static const uint32_t CExCTL2_CEREFL__CEREFL_2 = 2;
5415 // 2.5 V is selected as shared reference voltage input
5416 static const uint32_t CExCTL2_CEREFL__CEREFL_3 = 3;
5417 // Static mode
5418 static const uint32_t CExCTL2_CEREFACC__CEREFACC_0 = 0;
5419 // Clocked (low power, low accuracy) mode
5420 static const uint32_t CExCTL2_CEREFACC__CEREFACC_1 = 1;
5421
5422 // Comparator Control Register 3
5423 // Reset value: 0x00000000
5424 BEGIN_TYPE(CExCTL3_t, uint16_t)
5425 // Port disable
5426 ADD_BITFIELD_RW(CEPD0, 0, 1)
5427 // Port disable
5428 ADD_BITFIELD_RW(CEPD1, 1, 1)
5429 // Port disable
5430 ADD_BITFIELD_RW(CEPD2, 2, 1)
5431 // Port disable
5432 ADD_BITFIELD_RW(CEPD3, 3, 1)
5433 // Port disable
5434 ADD_BITFIELD_RW(CEPD4, 4, 1)
5435 // Port disable
5436 ADD_BITFIELD_RW(CEPD5, 5, 1)
5437 // Port disable
5438 ADD_BITFIELD_RW(CEPD6, 6, 1)
5439 // Port disable
5440 ADD_BITFIELD_RW(CEPD7, 7, 1)
5441 // Port disable
5442 ADD_BITFIELD_RW(CEPD8, 8, 1)
5443 // Port disable
5444 ADD_BITFIELD_RW(CEPD9, 9, 1)
5445 // Port disable
5446 ADD_BITFIELD_RW(CEPD10, 10, 1)
5447 // Port disable
5448 ADD_BITFIELD_RW(CEPD11, 11, 1)
5449 // Port disable
5450 ADD_BITFIELD_RW(CEPD12, 12, 1)
5451 // Port disable
5452 ADD_BITFIELD_RW(CEPD13, 13, 1)
5453 // Port disable
5454 ADD_BITFIELD_RW(CEPD14, 14, 1)
5455 // Port disable
5456 ADD_BITFIELD_RW(CEPD15, 15, 1)
5457 END_TYPE()
5458
5459 // The input buffer is enabled
5460 static const uint32_t CExCTL3_CEPD0__CEPD0_0 = 0;
5461 // The input buffer is disabled
5462 static const uint32_t CExCTL3_CEPD0__CEPD0_1 = 1;
5463 // The input buffer is enabled
5464 static const uint32_t CExCTL3_CEPD1__CEPD1_0 = 0;
5465 // The input buffer is disabled
5466 static const uint32_t CExCTL3_CEPD1__CEPD1_1 = 1;
5467 // The input buffer is enabled
5468 static const uint32_t CExCTL3_CEPD2__CEPD2_0 = 0;
5469 // The input buffer is disabled
5470 static const uint32_t CExCTL3_CEPD2__CEPD2_1 = 1;
5471 // The input buffer is enabled
5472 static const uint32_t CExCTL3_CEPD3__CEPD3_0 = 0;
5473 // The input buffer is disabled
5474 static const uint32_t CExCTL3_CEPD3__CEPD3_1 = 1;
5475 // The input buffer is enabled
5476 static const uint32_t CExCTL3_CEPD4__CEPD4_0 = 0;
5477 // The input buffer is disabled
5478 static const uint32_t CExCTL3_CEPD4__CEPD4_1 = 1;
5479 // The input buffer is enabled
5480 static const uint32_t CExCTL3_CEPD5__CEPD5_0 = 0;
5481 // The input buffer is disabled
5482 static const uint32_t CExCTL3_CEPD5__CEPD5_1 = 1;
5483 // The input buffer is enabled
5484 static const uint32_t CExCTL3_CEPD6__CEPD6_0 = 0;
5485 // The input buffer is disabled
5486 static const uint32_t CExCTL3_CEPD6__CEPD6_1 = 1;
5487 // The input buffer is enabled
5488 static const uint32_t CExCTL3_CEPD7__CEPD7_0 = 0;
5489 // The input buffer is disabled
5490 static const uint32_t CExCTL3_CEPD7__CEPD7_1 = 1;
5491 // The input buffer is enabled
5492 static const uint32_t CExCTL3_CEPD8__CEPD8_0 = 0;
5493 // The input buffer is disabled
5494 static const uint32_t CExCTL3_CEPD8__CEPD8_1 = 1;
5495 // The input buffer is enabled
5496 static const uint32_t CExCTL3_CEPD9__CEPD9_0 = 0;
5497 // The input buffer is disabled
5498 static const uint32_t CExCTL3_CEPD9__CEPD9_1 = 1;
5499 // The input buffer is enabled
5500 static const uint32_t CExCTL3_CEPD10__CEPD10_0 = 0;
5501 // The input buffer is disabled
5502 static const uint32_t CExCTL3_CEPD10__CEPD10_1 = 1;
5503 // The input buffer is enabled
5504 static const uint32_t CExCTL3_CEPD11__CEPD11_0 = 0;
5505 // The input buffer is disabled
5506 static const uint32_t CExCTL3_CEPD11__CEPD11_1 = 1;
5507 // The input buffer is enabled
5508 static const uint32_t CExCTL3_CEPD12__CEPD12_0 = 0;
5509 // The input buffer is disabled
5510 static const uint32_t CExCTL3_CEPD12__CEPD12_1 = 1;
5511 // The input buffer is enabled
5512 static const uint32_t CExCTL3_CEPD13__CEPD13_0 = 0;
5513 // The input buffer is disabled
5514 static const uint32_t CExCTL3_CEPD13__CEPD13_1 = 1;
5515 // The input buffer is enabled
5516 static const uint32_t CExCTL3_CEPD14__CEPD14_0 = 0;
5517 // The input buffer is disabled
5518 static const uint32_t CExCTL3_CEPD14__CEPD14_1 = 1;
5519 // The input buffer is enabled
5520 static const uint32_t CExCTL3_CEPD15__CEPD15_0 = 0;
5521 // The input buffer is disabled
5522 static const uint32_t CExCTL3_CEPD15__CEPD15_1 = 1;
5523
5524 // Comparator Interrupt Control Register
5525 // Reset value: 0x00000000
5526 BEGIN_TYPE(CExINT_t, uint16_t)
5527 // Comparator output interrupt flag
5528 ADD_BITFIELD_RW(CEIFG, 0, 1)
5529 // Comparator output inverted interrupt flag
5530 ADD_BITFIELD_RW(CEIIFG, 1, 1)
5531 // Comparator ready interrupt flag
5532 ADD_BITFIELD_RW(CERDYIFG, 4, 1)
5533 // Comparator output interrupt enable
5534 ADD_BITFIELD_RW(CEIE, 8, 1)
5535 // Comparator output interrupt enable inverted polarity
5536 ADD_BITFIELD_RW(CEIIE, 9, 1)
5537 // Comparator ready interrupt enable
5538 ADD_BITFIELD_RW(CERDYIE, 12, 1)
5539 END_TYPE()
5540
5541 // No interrupt pending
5542 static const uint32_t CExINT_CEIFG__CEIFG_0 = 0;
5543 // Interrupt pending
5544 static const uint32_t CExINT_CEIFG__CEIFG_1 = 1;
5545 // No interrupt pending
5546 static const uint32_t CExINT_CEIIFG__CEIIFG_0 = 0;
5547 // Interrupt pending
5548 static const uint32_t CExINT_CEIIFG__CEIIFG_1 = 1;
5549 // No interrupt pending
5550 static const uint32_t CExINT_CERDYIFG__CERDYIFG_0 = 0;
5551 // Interrupt pending
5552 static const uint32_t CExINT_CERDYIFG__CERDYIFG_1 = 1;
5553 // Interrupt disabled
5554 static const uint32_t CExINT_CEIE__CEIE_0 = 0;
5555 // Interrupt enabled
5556 static const uint32_t CExINT_CEIE__CEIE_1 = 1;
5557 // Interrupt disabled
5558 static const uint32_t CExINT_CEIIE__CEIIE_0 = 0;
5559 // Interrupt enabled
5560 static const uint32_t CExINT_CEIIE__CEIIE_1 = 1;
5561 // Interrupt disabled
5562 static const uint32_t CExINT_CERDYIE__CERDYIE_0 = 0;
5563 // Interrupt enabled
5564 static const uint32_t CExINT_CERDYIE__CERDYIE_1 = 1;
5565
5566 // Comparator Interrupt Vector Word Register
5567 // Reset value: 0x00000000
5568 BEGIN_TYPE(CExIV_t, uint16_t)
5569 // Comparator interrupt vector word register
5570 ADD_BITFIELD_RO(CEIV, 0, 16)
5571 END_TYPE()
5572
5573 // No interrupt pending
5574 static const uint32_t CExIV_CEIV__CEIV_0 = 0;
5575 // Interrupt Source: CEOUT interrupt; Interrupt Flag: CEIFG; Interrupt Priority: Highest
5576 static const uint32_t CExIV_CEIV__CEIV_2 = 2;
5577 // Interrupt Source: CEOUT interrupt inverted polarity; Interrupt Flag: CEIIFG
5578 static const uint32_t CExIV_CEIV__CEIV_4 = 4;
5579 // Interrupt Source: Comparator ready interrupt; Interrupt Flag: CERDYIFG; Interrupt Priority: Lowest
5580 static const uint32_t CExIV_CEIV__CEIV_10 = 10;
5581
5582 struct COMP_E0_t {
5583 CExCTL0_t CExCTL0;
5584 CExCTL1_t CExCTL1;
5585 CExCTL2_t CExCTL2;
5586 CExCTL3_t CExCTL3;
5587 uint16_t reserved0[2];
5588 CExINT_t CExINT;
5589 CExIV_t CExIV;
5590 };
5591
5592 static COMP_E0_t & COMP_E0 = (*(COMP_E0_t *)0x40003400);
5593
5594} // _COMP_E0_
5595
5596// COMP_E1
5597namespace _COMP_E1_ {
5598
5599 // Comparator Control Register 0
5600 // Reset value: 0x00000000
5601 BEGIN_TYPE(CExCTL0_t, uint16_t)
5602 // Channel input selected for the V+ terminal
5603 ADD_BITFIELD_RW(CEIPSEL, 0, 4)
5604 // Channel input enable for the V+ terminal
5605 ADD_BITFIELD_RW(CEIPEN, 7, 1)
5606 // Channel input selected for the - terminal
5607 ADD_BITFIELD_RW(CEIMSEL, 8, 4)
5608 // Channel input enable for the - terminal
5609 ADD_BITFIELD_RW(CEIMEN, 15, 1)
5610 END_TYPE()
5611
5612 // Channel 0 selected
5613 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_0 = 0;
5614 // Channel 1 selected
5615 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_1 = 1;
5616 // Channel 2 selected
5617 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_2 = 2;
5618 // Channel 3 selected
5619 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_3 = 3;
5620 // Channel 4 selected
5621 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_4 = 4;
5622 // Channel 5 selected
5623 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_5 = 5;
5624 // Channel 6 selected
5625 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_6 = 6;
5626 // Channel 7 selected
5627 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_7 = 7;
5628 // Channel 8 selected
5629 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_8 = 8;
5630 // Channel 9 selected
5631 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_9 = 9;
5632 // Channel 10 selected
5633 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_10 = 10;
5634 // Channel 11 selected
5635 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_11 = 11;
5636 // Channel 12 selected
5637 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_12 = 12;
5638 // Channel 13 selected
5639 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_13 = 13;
5640 // Channel 14 selected
5641 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_14 = 14;
5642 // Channel 15 selected
5643 static const uint32_t CExCTL0_CEIPSEL__CEIPSEL_15 = 15;
5644 // Selected analog input channel for V+ terminal is disabled
5645 static const uint32_t CExCTL0_CEIPEN__CEIPEN_0 = 0;
5646 // Selected analog input channel for V+ terminal is enabled
5647 static const uint32_t CExCTL0_CEIPEN__CEIPEN_1 = 1;
5648 // Channel 0 selected
5649 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_0 = 0;
5650 // Channel 1 selected
5651 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_1 = 1;
5652 // Channel 2 selected
5653 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_2 = 2;
5654 // Channel 3 selected
5655 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_3 = 3;
5656 // Channel 4 selected
5657 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_4 = 4;
5658 // Channel 5 selected
5659 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_5 = 5;
5660 // Channel 6 selected
5661 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_6 = 6;
5662 // Channel 7 selected
5663 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_7 = 7;
5664 // Channel 8 selected
5665 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_8 = 8;
5666 // Channel 9 selected
5667 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_9 = 9;
5668 // Channel 10 selected
5669 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_10 = 10;
5670 // Channel 11 selected
5671 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_11 = 11;
5672 // Channel 12 selected
5673 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_12 = 12;
5674 // Channel 13 selected
5675 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_13 = 13;
5676 // Channel 14 selected
5677 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_14 = 14;
5678 // Channel 15 selected
5679 static const uint32_t CExCTL0_CEIMSEL__CEIMSEL_15 = 15;
5680 // Selected analog input channel for V- terminal is disabled
5681 static const uint32_t CExCTL0_CEIMEN__CEIMEN_0 = 0;
5682 // Selected analog input channel for V- terminal is enabled
5683 static const uint32_t CExCTL0_CEIMEN__CEIMEN_1 = 1;
5684
5685 // Comparator Control Register 1
5686 // Reset value: 0x00000000
5687 BEGIN_TYPE(CExCTL1_t, uint16_t)
5688 // Comparator output value
5689 ADD_BITFIELD_RW(CEOUT, 0, 1)
5690 // Comparator output polarity
5691 ADD_BITFIELD_RW(CEOUTPOL, 1, 1)
5692 // Comparator output filter
5693 ADD_BITFIELD_RW(CEF, 2, 1)
5694 // Interrupt edge select for CEIIFG and CEIFG
5695 ADD_BITFIELD_RW(CEIES, 3, 1)
5696 // Input short
5697 ADD_BITFIELD_RW(CESHORT, 4, 1)
5698 // Exchange
5699 ADD_BITFIELD_RW(CEEX, 5, 1)
5700 // Filter delay
5701 ADD_BITFIELD_RW(CEFDLY, 6, 2)
5702 // Power Mode
5703 ADD_BITFIELD_RW(CEPWRMD, 8, 2)
5704 // Comparator On
5705 ADD_BITFIELD_RW(CEON, 10, 1)
5706 // This bit is valid of CEMRVS is set to 1
5707 ADD_BITFIELD_RW(CEMRVL, 11, 1)
5708 // This bit defines if the comparator output selects between VREF0 or VREF1 if CERS = 00, 01, or 10.
5709 ADD_BITFIELD_RW(CEMRVS, 12, 1)
5710 END_TYPE()
5711
5712 // Noninverted
5713 static const uint32_t CExCTL1_CEOUTPOL__CEOUTPOL_0 = 0;
5714 // Inverted
5715 static const uint32_t CExCTL1_CEOUTPOL__CEOUTPOL_1 = 1;
5716 // Comparator output is not filtered
5717 static const uint32_t CExCTL1_CEF__CEF_0 = 0;
5718 // Comparator output is filtered
5719 static const uint32_t CExCTL1_CEF__CEF_1 = 1;
5720 // Rising edge for CEIFG, falling edge for CEIIFG
5721 static const uint32_t CExCTL1_CEIES__CEIES_0 = 0;
5722 // Falling edge for CEIFG, rising edge for CEIIFG
5723 static const uint32_t CExCTL1_CEIES__CEIES_1 = 1;
5724 // Inputs not shorted
5725 static const uint32_t CExCTL1_CESHORT__CESHORT_0 = 0;
5726 // Inputs shorted
5727 static const uint32_t CExCTL1_CESHORT__CESHORT_1 = 1;
5728 // Typical filter delay of TBD (450) ns
5729 static const uint32_t CExCTL1_CEFDLY__CEFDLY_0 = 0;
5730 // Typical filter delay of TBD (900) ns
5731 static const uint32_t CExCTL1_CEFDLY__CEFDLY_1 = 1;
5732 // Typical filter delay of TBD (1800) ns
5733 static const uint32_t CExCTL1_CEFDLY__CEFDLY_2 = 2;
5734 // Typical filter delay of TBD (3600) ns
5735 static const uint32_t CExCTL1_CEFDLY__CEFDLY_3 = 3;
5736 // High-speed mode
5737 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_0 = 0;
5738 // Normal mode
5739 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_1 = 1;
5740 // Ultra-low power mode
5741 static const uint32_t CExCTL1_CEPWRMD__CEPWRMD_2 = 2;
5742 // Off
5743 static const uint32_t CExCTL1_CEON__CEON_0 = 0;
5744 // On
5745 static const uint32_t CExCTL1_CEON__CEON_1 = 1;
5746 // VREF0 is selected if CERS = 00, 01, or 10
5747 static const uint32_t CExCTL1_CEMRVL__CEMRVL_0 = 0;
5748 // VREF1 is selected if CERS = 00, 01, or 10
5749 static const uint32_t CExCTL1_CEMRVL__CEMRVL_1 = 1;
5750 // Comparator output state selects between VREF0 or VREF1
5751 static const uint32_t CExCTL1_CEMRVS__CEMRVS_0 = 0;
5752 // CEMRVL selects between VREF0 or VREF1
5753 static const uint32_t CExCTL1_CEMRVS__CEMRVS_1 = 1;
5754
5755 // Comparator Control Register 2
5756 // Reset value: 0x00000000
5757 BEGIN_TYPE(CExCTL2_t, uint16_t)
5758 // Reference resistor tap 0
5759 ADD_BITFIELD_RW(CEREF0, 0, 5)
5760 // Reference select
5761 ADD_BITFIELD_RW(CERSEL, 5, 1)
5762 // Reference source
5763 ADD_BITFIELD_RW(CERS, 6, 2)
5764 // Reference resistor tap 1
5765 ADD_BITFIELD_RW(CEREF1, 8, 5)
5766 // Reference voltage level
5767 ADD_BITFIELD_RW(CEREFL, 13, 2)
5768 // Reference accuracy
5769 ADD_BITFIELD_RW(CEREFACC, 15, 1)
5770 END_TYPE()
5771
5772 // Reference resistor tap for setting 0.
5773 static const uint32_t CExCTL2_CEREF0__CEREF0_0 = 0;
5774 // Reference resistor tap for setting 1.
5775 static const uint32_t CExCTL2_CEREF0__CEREF0_1 = 1;
5776 // Reference resistor tap for setting 2.
5777 static const uint32_t CExCTL2_CEREF0__CEREF0_2 = 2;
5778 // Reference resistor tap for setting 3.
5779 static const uint32_t CExCTL2_CEREF0__CEREF0_3 = 3;
5780 // Reference resistor tap for setting 4.
5781 static const uint32_t CExCTL2_CEREF0__CEREF0_4 = 4;
5782 // Reference resistor tap for setting 5.
5783 static const uint32_t CExCTL2_CEREF0__CEREF0_5 = 5;
5784 // Reference resistor tap for setting 6.
5785 static const uint32_t CExCTL2_CEREF0__CEREF0_6 = 6;
5786 // Reference resistor tap for setting 7.
5787 static const uint32_t CExCTL2_CEREF0__CEREF0_7 = 7;
5788 // Reference resistor tap for setting 8.
5789 static const uint32_t CExCTL2_CEREF0__CEREF0_8 = 8;
5790 // Reference resistor tap for setting 9.
5791 static const uint32_t CExCTL2_CEREF0__CEREF0_9 = 9;
5792 // Reference resistor tap for setting 10.
5793 static const uint32_t CExCTL2_CEREF0__CEREF0_10 = 10;
5794 // Reference resistor tap for setting 11.
5795 static const uint32_t CExCTL2_CEREF0__CEREF0_11 = 11;
5796 // Reference resistor tap for setting 12.
5797 static const uint32_t CExCTL2_CEREF0__CEREF0_12 = 12;
5798 // Reference resistor tap for setting 13.
5799 static const uint32_t CExCTL2_CEREF0__CEREF0_13 = 13;
5800 // Reference resistor tap for setting 14.
5801 static const uint32_t CExCTL2_CEREF0__CEREF0_14 = 14;
5802 // Reference resistor tap for setting 15.
5803 static const uint32_t CExCTL2_CEREF0__CEREF0_15 = 15;
5804 // Reference resistor tap for setting 16.
5805 static const uint32_t CExCTL2_CEREF0__CEREF0_16 = 16;
5806 // Reference resistor tap for setting 17.
5807 static const uint32_t CExCTL2_CEREF0__CEREF0_17 = 17;
5808 // Reference resistor tap for setting 18.
5809 static const uint32_t CExCTL2_CEREF0__CEREF0_18 = 18;
5810 // Reference resistor tap for setting 19.
5811 static const uint32_t CExCTL2_CEREF0__CEREF0_19 = 19;
5812 // Reference resistor tap for setting 20.
5813 static const uint32_t CExCTL2_CEREF0__CEREF0_20 = 20;
5814 // Reference resistor tap for setting 21.
5815 static const uint32_t CExCTL2_CEREF0__CEREF0_21 = 21;
5816 // Reference resistor tap for setting 22.
5817 static const uint32_t CExCTL2_CEREF0__CEREF0_22 = 22;
5818 // Reference resistor tap for setting 23.
5819 static const uint32_t CExCTL2_CEREF0__CEREF0_23 = 23;
5820 // Reference resistor tap for setting 24.
5821 static const uint32_t CExCTL2_CEREF0__CEREF0_24 = 24;
5822 // Reference resistor tap for setting 25.
5823 static const uint32_t CExCTL2_CEREF0__CEREF0_25 = 25;
5824 // Reference resistor tap for setting 26.
5825 static const uint32_t CExCTL2_CEREF0__CEREF0_26 = 26;
5826 // Reference resistor tap for setting 27.
5827 static const uint32_t CExCTL2_CEREF0__CEREF0_27 = 27;
5828 // Reference resistor tap for setting 28.
5829 static const uint32_t CExCTL2_CEREF0__CEREF0_28 = 28;
5830 // Reference resistor tap for setting 29.
5831 static const uint32_t CExCTL2_CEREF0__CEREF0_29 = 29;
5832 // Reference resistor tap for setting 30.
5833 static const uint32_t CExCTL2_CEREF0__CEREF0_30 = 30;
5834 // Reference resistor tap for setting 31.
5835 static const uint32_t CExCTL2_CEREF0__CEREF0_31 = 31;
5836 // When CEEX = 0, VREF is applied to the V+ terminal; When CEEX = 1, VREF is applied to the V- terminal
5837 static const uint32_t CExCTL2_CERSEL__CERSEL_0 = 0;
5838 // When CEEX = 0, VREF is applied to the V- terminal; When CEEX = 1, VREF is applied to the V+ terminal
5839 static const uint32_t CExCTL2_CERSEL__CERSEL_1 = 1;
5840 // No current is drawn by the reference circuitry
5841 static const uint32_t CExCTL2_CERS__CERS_0 = 0;
5842 // VCC applied to the resistor ladder
5843 static const uint32_t CExCTL2_CERS__CERS_1 = 1;
5844 // Shared reference voltage applied to the resistor ladder
5845 static const uint32_t CExCTL2_CERS__CERS_2 = 2;
5846 // Shared reference voltage supplied to V(CREF). Resistor ladder is off
5847 static const uint32_t CExCTL2_CERS__CERS_3 = 3;
5848 // Reference resistor tap for setting 0.
5849 static const uint32_t CExCTL2_CEREF1__CEREF1_0 = 0;
5850 // Reference resistor tap for setting 1.
5851 static const uint32_t CExCTL2_CEREF1__CEREF1_1 = 1;
5852 // Reference resistor tap for setting 2.
5853 static const uint32_t CExCTL2_CEREF1__CEREF1_2 = 2;
5854 // Reference resistor tap for setting 3.
5855 static const uint32_t CExCTL2_CEREF1__CEREF1_3 = 3;
5856 // Reference resistor tap for setting 4.
5857 static const uint32_t CExCTL2_CEREF1__CEREF1_4 = 4;
5858 // Reference resistor tap for setting 5.
5859 static const uint32_t CExCTL2_CEREF1__CEREF1_5 = 5;
5860 // Reference resistor tap for setting 6.
5861 static const uint32_t CExCTL2_CEREF1__CEREF1_6 = 6;
5862 // Reference resistor tap for setting 7.
5863 static const uint32_t CExCTL2_CEREF1__CEREF1_7 = 7;
5864 // Reference resistor tap for setting 8.
5865 static const uint32_t CExCTL2_CEREF1__CEREF1_8 = 8;
5866 // Reference resistor tap for setting 9.
5867 static const uint32_t CExCTL2_CEREF1__CEREF1_9 = 9;
5868 // Reference resistor tap for setting 10.
5869 static const uint32_t CExCTL2_CEREF1__CEREF1_10 = 10;
5870 // Reference resistor tap for setting 11.
5871 static const uint32_t CExCTL2_CEREF1__CEREF1_11 = 11;
5872 // Reference resistor tap for setting 12.
5873 static const uint32_t CExCTL2_CEREF1__CEREF1_12 = 12;
5874 // Reference resistor tap for setting 13.
5875 static const uint32_t CExCTL2_CEREF1__CEREF1_13 = 13;
5876 // Reference resistor tap for setting 14.
5877 static const uint32_t CExCTL2_CEREF1__CEREF1_14 = 14;
5878 // Reference resistor tap for setting 15.
5879 static const uint32_t CExCTL2_CEREF1__CEREF1_15 = 15;
5880 // Reference resistor tap for setting 16.
5881 static const uint32_t CExCTL2_CEREF1__CEREF1_16 = 16;
5882 // Reference resistor tap for setting 17.
5883 static const uint32_t CExCTL2_CEREF1__CEREF1_17 = 17;
5884 // Reference resistor tap for setting 18.
5885 static const uint32_t CExCTL2_CEREF1__CEREF1_18 = 18;
5886 // Reference resistor tap for setting 19.
5887 static const uint32_t CExCTL2_CEREF1__CEREF1_19 = 19;
5888 // Reference resistor tap for setting 20.
5889 static const uint32_t CExCTL2_CEREF1__CEREF1_20 = 20;
5890 // Reference resistor tap for setting 21.
5891 static const uint32_t CExCTL2_CEREF1__CEREF1_21 = 21;
5892 // Reference resistor tap for setting 22.
5893 static const uint32_t CExCTL2_CEREF1__CEREF1_22 = 22;
5894 // Reference resistor tap for setting 23.
5895 static const uint32_t CExCTL2_CEREF1__CEREF1_23 = 23;
5896 // Reference resistor tap for setting 24.
5897 static const uint32_t CExCTL2_CEREF1__CEREF1_24 = 24;
5898 // Reference resistor tap for setting 25.
5899 static const uint32_t CExCTL2_CEREF1__CEREF1_25 = 25;
5900 // Reference resistor tap for setting 26.
5901 static const uint32_t CExCTL2_CEREF1__CEREF1_26 = 26;
5902 // Reference resistor tap for setting 27.
5903 static const uint32_t CExCTL2_CEREF1__CEREF1_27 = 27;
5904 // Reference resistor tap for setting 28.
5905 static const uint32_t CExCTL2_CEREF1__CEREF1_28 = 28;
5906 // Reference resistor tap for setting 29.
5907 static const uint32_t CExCTL2_CEREF1__CEREF1_29 = 29;
5908 // Reference resistor tap for setting 30.
5909 static const uint32_t CExCTL2_CEREF1__CEREF1_30 = 30;
5910 // Reference resistor tap for setting 31.
5911 static const uint32_t CExCTL2_CEREF1__CEREF1_31 = 31;
5912 // Reference amplifier is disabled. No reference voltage is requested
5913 static const uint32_t CExCTL2_CEREFL__CEREFL_0 = 0;
5914 // 1.2 V is selected as shared reference voltage input
5915 static const uint32_t CExCTL2_CEREFL__CEREFL_1 = 1;
5916 // 2.0 V is selected as shared reference voltage input
5917 static const uint32_t CExCTL2_CEREFL__CEREFL_2 = 2;
5918 // 2.5 V is selected as shared reference voltage input
5919 static const uint32_t CExCTL2_CEREFL__CEREFL_3 = 3;
5920 // Static mode
5921 static const uint32_t CExCTL2_CEREFACC__CEREFACC_0 = 0;
5922 // Clocked (low power, low accuracy) mode
5923 static const uint32_t CExCTL2_CEREFACC__CEREFACC_1 = 1;
5924
5925 // Comparator Control Register 3
5926 // Reset value: 0x00000000
5927 BEGIN_TYPE(CExCTL3_t, uint16_t)
5928 // Port disable
5929 ADD_BITFIELD_RW(CEPD0, 0, 1)
5930 // Port disable
5931 ADD_BITFIELD_RW(CEPD1, 1, 1)
5932 // Port disable
5933 ADD_BITFIELD_RW(CEPD2, 2, 1)
5934 // Port disable
5935 ADD_BITFIELD_RW(CEPD3, 3, 1)
5936 // Port disable
5937 ADD_BITFIELD_RW(CEPD4, 4, 1)
5938 // Port disable
5939 ADD_BITFIELD_RW(CEPD5, 5, 1)
5940 // Port disable
5941 ADD_BITFIELD_RW(CEPD6, 6, 1)
5942 // Port disable
5943 ADD_BITFIELD_RW(CEPD7, 7, 1)
5944 // Port disable
5945 ADD_BITFIELD_RW(CEPD8, 8, 1)
5946 // Port disable
5947 ADD_BITFIELD_RW(CEPD9, 9, 1)
5948 // Port disable
5949 ADD_BITFIELD_RW(CEPD10, 10, 1)
5950 // Port disable
5951 ADD_BITFIELD_RW(CEPD11, 11, 1)
5952 // Port disable
5953 ADD_BITFIELD_RW(CEPD12, 12, 1)
5954 // Port disable
5955 ADD_BITFIELD_RW(CEPD13, 13, 1)
5956 // Port disable
5957 ADD_BITFIELD_RW(CEPD14, 14, 1)
5958 // Port disable
5959 ADD_BITFIELD_RW(CEPD15, 15, 1)
5960 END_TYPE()
5961
5962 // The input buffer is enabled
5963 static const uint32_t CExCTL3_CEPD0__CEPD0_0 = 0;
5964 // The input buffer is disabled
5965 static const uint32_t CExCTL3_CEPD0__CEPD0_1 = 1;
5966 // The input buffer is enabled
5967 static const uint32_t CExCTL3_CEPD1__CEPD1_0 = 0;
5968 // The input buffer is disabled
5969 static const uint32_t CExCTL3_CEPD1__CEPD1_1 = 1;
5970 // The input buffer is enabled
5971 static const uint32_t CExCTL3_CEPD2__CEPD2_0 = 0;
5972 // The input buffer is disabled
5973 static const uint32_t CExCTL3_CEPD2__CEPD2_1 = 1;
5974 // The input buffer is enabled
5975 static const uint32_t CExCTL3_CEPD3__CEPD3_0 = 0;
5976 // The input buffer is disabled
5977 static const uint32_t CExCTL3_CEPD3__CEPD3_1 = 1;
5978 // The input buffer is enabled
5979 static const uint32_t CExCTL3_CEPD4__CEPD4_0 = 0;
5980 // The input buffer is disabled
5981 static const uint32_t CExCTL3_CEPD4__CEPD4_1 = 1;
5982 // The input buffer is enabled
5983 static const uint32_t CExCTL3_CEPD5__CEPD5_0 = 0;
5984 // The input buffer is disabled
5985 static const uint32_t CExCTL3_CEPD5__CEPD5_1 = 1;
5986 // The input buffer is enabled
5987 static const uint32_t CExCTL3_CEPD6__CEPD6_0 = 0;
5988 // The input buffer is disabled
5989 static const uint32_t CExCTL3_CEPD6__CEPD6_1 = 1;
5990 // The input buffer is enabled
5991 static const uint32_t CExCTL3_CEPD7__CEPD7_0 = 0;
5992 // The input buffer is disabled
5993 static const uint32_t CExCTL3_CEPD7__CEPD7_1 = 1;
5994 // The input buffer is enabled
5995 static const uint32_t CExCTL3_CEPD8__CEPD8_0 = 0;
5996 // The input buffer is disabled
5997 static const uint32_t CExCTL3_CEPD8__CEPD8_1 = 1;
5998 // The input buffer is enabled
5999 static const uint32_t CExCTL3_CEPD9__CEPD9_0 = 0;
6000 // The input buffer is disabled
6001 static const uint32_t CExCTL3_CEPD9__CEPD9_1 = 1;
6002 // The input buffer is enabled
6003 static const uint32_t CExCTL3_CEPD10__CEPD10_0 = 0;
6004 // The input buffer is disabled
6005 static const uint32_t CExCTL3_CEPD10__CEPD10_1 = 1;
6006 // The input buffer is enabled
6007 static const uint32_t CExCTL3_CEPD11__CEPD11_0 = 0;
6008 // The input buffer is disabled
6009 static const uint32_t CExCTL3_CEPD11__CEPD11_1 = 1;
6010 // The input buffer is enabled
6011 static const uint32_t CExCTL3_CEPD12__CEPD12_0 = 0;
6012 // The input buffer is disabled
6013 static const uint32_t CExCTL3_CEPD12__CEPD12_1 = 1;
6014 // The input buffer is enabled
6015 static const uint32_t CExCTL3_CEPD13__CEPD13_0 = 0;
6016 // The input buffer is disabled
6017 static const uint32_t CExCTL3_CEPD13__CEPD13_1 = 1;
6018 // The input buffer is enabled
6019 static const uint32_t CExCTL3_CEPD14__CEPD14_0 = 0;
6020 // The input buffer is disabled
6021 static const uint32_t CExCTL3_CEPD14__CEPD14_1 = 1;
6022 // The input buffer is enabled
6023 static const uint32_t CExCTL3_CEPD15__CEPD15_0 = 0;
6024 // The input buffer is disabled
6025 static const uint32_t CExCTL3_CEPD15__CEPD15_1 = 1;
6026
6027 // Comparator Interrupt Control Register
6028 // Reset value: 0x00000000
6029 BEGIN_TYPE(CExINT_t, uint16_t)
6030 // Comparator output interrupt flag
6031 ADD_BITFIELD_RW(CEIFG, 0, 1)
6032 // Comparator output inverted interrupt flag
6033 ADD_BITFIELD_RW(CEIIFG, 1, 1)
6034 // Comparator ready interrupt flag
6035 ADD_BITFIELD_RW(CERDYIFG, 4, 1)
6036 // Comparator output interrupt enable
6037 ADD_BITFIELD_RW(CEIE, 8, 1)
6038 // Comparator output interrupt enable inverted polarity
6039 ADD_BITFIELD_RW(CEIIE, 9, 1)
6040 // Comparator ready interrupt enable
6041 ADD_BITFIELD_RW(CERDYIE, 12, 1)
6042 END_TYPE()
6043
6044 // No interrupt pending
6045 static const uint32_t CExINT_CEIFG__CEIFG_0 = 0;
6046 // Interrupt pending
6047 static const uint32_t CExINT_CEIFG__CEIFG_1 = 1;
6048 // No interrupt pending
6049 static const uint32_t CExINT_CEIIFG__CEIIFG_0 = 0;
6050 // Interrupt pending
6051 static const uint32_t CExINT_CEIIFG__CEIIFG_1 = 1;
6052 // No interrupt pending
6053 static const uint32_t CExINT_CERDYIFG__CERDYIFG_0 = 0;
6054 // Interrupt pending
6055 static const uint32_t CExINT_CERDYIFG__CERDYIFG_1 = 1;
6056 // Interrupt disabled
6057 static const uint32_t CExINT_CEIE__CEIE_0 = 0;
6058 // Interrupt enabled
6059 static const uint32_t CExINT_CEIE__CEIE_1 = 1;
6060 // Interrupt disabled
6061 static const uint32_t CExINT_CEIIE__CEIIE_0 = 0;
6062 // Interrupt enabled
6063 static const uint32_t CExINT_CEIIE__CEIIE_1 = 1;
6064 // Interrupt disabled
6065 static const uint32_t CExINT_CERDYIE__CERDYIE_0 = 0;
6066 // Interrupt enabled
6067 static const uint32_t CExINT_CERDYIE__CERDYIE_1 = 1;
6068
6069 // Comparator Interrupt Vector Word Register
6070 // Reset value: 0x00000000
6071 BEGIN_TYPE(CExIV_t, uint16_t)
6072 // Comparator interrupt vector word register
6073 ADD_BITFIELD_RO(CEIV, 0, 16)
6074 END_TYPE()
6075
6076 // No interrupt pending
6077 static const uint32_t CExIV_CEIV__CEIV_0 = 0;
6078 // Interrupt Source: CEOUT interrupt; Interrupt Flag: CEIFG; Interrupt Priority: Highest
6079 static const uint32_t CExIV_CEIV__CEIV_2 = 2;
6080 // Interrupt Source: CEOUT interrupt inverted polarity; Interrupt Flag: CEIIFG
6081 static const uint32_t CExIV_CEIV__CEIV_4 = 4;
6082 // Interrupt Source: Comparator ready interrupt; Interrupt Flag: CERDYIFG; Interrupt Priority: Lowest
6083 static const uint32_t CExIV_CEIV__CEIV_10 = 10;
6084
6085 struct COMP_E1_t {
6086 CExCTL0_t CExCTL0;
6087 CExCTL1_t CExCTL1;
6088 CExCTL2_t CExCTL2;
6089 CExCTL3_t CExCTL3;
6090 uint16_t reserved0[2];
6091 CExINT_t CExINT;
6092 CExIV_t CExIV;
6093 };
6094
6095 static COMP_E1_t & COMP_E1 = (*(COMP_E1_t *)0x40003800);
6096
6097} // _COMP_E1_
6098
6099// AES256
6100namespace _AES256_ {
6101
6102 // AES Accelerator Control Register 0
6103 // Reset value: 0x00000000
6104 BEGIN_TYPE(AESACTL0_t, uint16_t)
6105 // AES operation
6106 ADD_BITFIELD_RW(AESOPx, 0, 2)
6107 // AES key length
6108 ADD_BITFIELD_RW(AESKLx, 2, 2)
6109 // AES cipher mode select
6110 ADD_BITFIELD_RW(AESCMx, 5, 2)
6111 // AES software reset
6112 ADD_BITFIELD_RW(AESSWRST, 7, 1)
6113 // AES ready interrupt flag
6114 ADD_BITFIELD_RW(AESRDYIFG, 8, 1)
6115 // AES error flag
6116 ADD_BITFIELD_RW(AESERRFG, 11, 1)
6117 // AES ready interrupt enable
6118 ADD_BITFIELD_RW(AESRDYIE, 12, 1)
6119 // AES cipher mode enable
6120 ADD_BITFIELD_RW(AESCMEN, 15, 1)
6121 END_TYPE()
6122
6123 // Encryption
6124 static const uint32_t AESACTL0_AESOPx__AESOPx_0 = 0;
6125 // Decryption. The provided key is the same key used for encryption
6126 static const uint32_t AESACTL0_AESOPx__AESOPx_1 = 1;
6127 // Generate first round key required for decryption
6128 static const uint32_t AESACTL0_AESOPx__AESOPx_2 = 2;
6129 // Decryption. The provided key is the first round key required for decryption
6130 static const uint32_t AESACTL0_AESOPx__AESOPx_3 = 3;
6131 // AES128. The key size is 128 bit
6132 static const uint32_t AESACTL0_AESKLx__AESKLx_0 = 0;
6133 // AES192. The key size is 192 bit.
6134 static const uint32_t AESACTL0_AESKLx__AESKLx_1 = 1;
6135 // AES256. The key size is 256 bit
6136 static const uint32_t AESACTL0_AESKLx__AESKLx_2 = 2;
6137 // ECB
6138 static const uint32_t AESACTL0_AESCMx__AESCMx_0 = 0;
6139 // CBC
6140 static const uint32_t AESACTL0_AESCMx__AESCMx_1 = 1;
6141 // OFB
6142 static const uint32_t AESACTL0_AESCMx__AESCMx_2 = 2;
6143 // CFB
6144 static const uint32_t AESACTL0_AESCMx__AESCMx_3 = 3;
6145 // No reset
6146 static const uint32_t AESACTL0_AESSWRST__AESSWRST_0 = 0;
6147 // Reset AES accelerator module
6148 static const uint32_t AESACTL0_AESSWRST__AESSWRST_1 = 1;
6149 // No interrupt pending
6150 static const uint32_t AESACTL0_AESRDYIFG__AESRDYIFG_0 = 0;
6151 // Interrupt pending
6152 static const uint32_t AESACTL0_AESRDYIFG__AESRDYIFG_1 = 1;
6153 // No error
6154 static const uint32_t AESACTL0_AESERRFG__AESERRFG_0 = 0;
6155 // Error occurred
6156 static const uint32_t AESACTL0_AESERRFG__AESERRFG_1 = 1;
6157 // Interrupt disabled
6158 static const uint32_t AESACTL0_AESRDYIE__AESRDYIE_0 = 0;
6159 // Interrupt enabled
6160 static const uint32_t AESACTL0_AESRDYIE__AESRDYIE_1 = 1;
6161 // No DMA triggers are generated
6162 static const uint32_t AESACTL0_AESCMEN__AESCMEN_0 = 0;
6163 // DMA ciphermode support operation is enabled and the corresponding DMA triggers are generated
6164 static const uint32_t AESACTL0_AESCMEN__AESCMEN_1 = 1;
6165
6166 // AES Accelerator Control Register 1
6167 // Reset value: 0x00000000
6168 BEGIN_TYPE(AESACTL1_t, uint16_t)
6169 // Cipher Block Counter
6170 ADD_BITFIELD_RW(AESBLKCNTx, 0, 8)
6171 END_TYPE()
6172
6173 // AES Accelerator Status Register
6174 // Reset value: 0x00000000
6175 BEGIN_TYPE(AESASTAT_t, uint16_t)
6176 // AES accelerator module busy
6177 ADD_BITFIELD_RW(AESBUSY, 0, 1)
6178 // All 16 bytes written to AESAKEY
6179 ADD_BITFIELD_RW(AESKEYWR, 1, 1)
6180 // All 16 bytes written to AESADIN, AESAXDIN or AESAXIN
6181 ADD_BITFIELD_RW(AESDINWR, 2, 1)
6182 // All 16 bytes read from AESADOUT
6183 ADD_BITFIELD_RO(AESDOUTRD, 3, 1)
6184 // Bytes written via AESAKEY for AESKLx=00, half-words written via AESAKEY
6185 ADD_BITFIELD_RO(AESKEYCNTx, 4, 4)
6186 // Bytes written via AESADIN, AESAXDIN or AESAXIN
6187 ADD_BITFIELD_RO(AESDINCNTx, 8, 4)
6188 // Bytes read via AESADOUT
6189 ADD_BITFIELD_RO(AESDOUTCNTx, 12, 4)
6190 END_TYPE()
6191
6192 // Not busy
6193 static const uint32_t AESASTAT_AESBUSY__AESBUSY_0 = 0;
6194 // Busy
6195 static const uint32_t AESASTAT_AESBUSY__AESBUSY_1 = 1;
6196 // Not all bytes written
6197 static const uint32_t AESASTAT_AESKEYWR__AESKEYWR_0 = 0;
6198 // All bytes written
6199 static const uint32_t AESASTAT_AESKEYWR__AESKEYWR_1 = 1;
6200 // Not all bytes written
6201 static const uint32_t AESASTAT_AESDINWR__AESDINWR_0 = 0;
6202 // All bytes written
6203 static const uint32_t AESASTAT_AESDINWR__AESDINWR_1 = 1;
6204 // Not all bytes read
6205 static const uint32_t AESASTAT_AESDOUTRD__AESDOUTRD_0 = 0;
6206 // All bytes read
6207 static const uint32_t AESASTAT_AESDOUTRD__AESDOUTRD_1 = 1;
6208
6209 // AES Accelerator Key Register
6210 // Reset value: 0x00000000
6211 BEGIN_TYPE(AESAKEY_t, uint16_t)
6212 // AES key byte n when AESAKEY is written as half-word
6213 ADD_BITFIELD_WO(AESKEY0x, 0, 8)
6214 // AES key byte n+1 when AESAKEY is written as half-word
6215 ADD_BITFIELD_WO(AESKEY1x, 8, 8)
6216 END_TYPE()
6217
6218 // AES Accelerator Data In Register
6219 // Reset value: 0x00000000
6220 BEGIN_TYPE(AESADIN_t, uint16_t)
6221 // AES data in byte n when AESADIN is written as half-word
6222 ADD_BITFIELD_WO(AESDIN0x, 0, 8)
6223 // AES data in byte n+1 when AESADIN is written as half-word
6224 ADD_BITFIELD_WO(AESDIN1x, 8, 8)
6225 END_TYPE()
6226
6227 // AES Accelerator Data Out Register
6228 // Reset value: 0x00000000
6229 BEGIN_TYPE(AESADOUT_t, uint16_t)
6230 // AES data out byte n when AESADOUT is read as half-word
6231 ADD_BITFIELD_WO(AESDOUT0x, 0, 8)
6232 // AES data out byte n+1 when AESADOUT is read as half-word
6233 ADD_BITFIELD_WO(AESDOUT1x, 8, 8)
6234 END_TYPE()
6235
6236 // AES Accelerator XORed Data In Register
6237 // Reset value: 0x00000000
6238 BEGIN_TYPE(AESAXDIN_t, uint16_t)
6239 // AES data in byte n when AESAXDIN is written as half-word
6240 ADD_BITFIELD_WO(AESXDIN0x, 0, 8)
6241 // AES data in byte n+1 when AESAXDIN is written as half-word
6242 ADD_BITFIELD_WO(AESXDIN1x, 8, 8)
6243 END_TYPE()
6244
6245 // AES Accelerator XORed Data In Register
6246 // Reset value: 0x00000000
6247 BEGIN_TYPE(AESAXIN_t, uint16_t)
6248 // AES data in byte n when AESAXIN is written as half-word
6249 ADD_BITFIELD_WO(AESXIN0x, 0, 8)
6250 // AES data in byte n+1 when AESAXIN is written as half-word
6251 ADD_BITFIELD_WO(AESXIN1x, 8, 8)
6252 END_TYPE()
6253
6254 struct AES256_t {
6255 AESACTL0_t AESACTL0;
6256 AESACTL1_t AESACTL1;
6257 AESASTAT_t AESASTAT;
6258 AESAKEY_t AESAKEY;
6259 AESADIN_t AESADIN;
6260 AESADOUT_t AESADOUT;
6261 AESAXDIN_t AESAXDIN;
6262 AESAXIN_t AESAXIN;
6263 };
6264
6265 static AES256_t & AES256 = (*(AES256_t *)0x40003c00);
6266
6267} // _AES256_
6268
6269// CRC32
6270namespace _CRC32_ {
6271
6272 // Data Input for CRC32 Signature Computation
6273 // Reset value: 0x00000000
6274 BEGIN_TYPE(CRC32DI_t, uint16_t)
6275 // Data input register
6276 ADD_BITFIELD_RW(CRC32DI, 0, 16)
6277 END_TYPE()
6278
6279 // Data In Reverse for CRC32 Computation
6280 // Reset value: 0x00000000
6281 BEGIN_TYPE(CRC32DIRB_t, uint16_t)
6282 // Data input register reversed
6283 ADD_BITFIELD_RW(CRC32DIRB, 0, 16)
6284 END_TYPE()
6285
6286 // CRC32 Initialization and Result, lower 16 bits
6287 // Reset value: 0x00000000
6288 BEGIN_TYPE(CRC32INIRES_LO_t, uint16_t)
6289 // CRC32 initialization and result, lower 16 bits
6290 ADD_BITFIELD_RW(CRC32INIRES_LO, 0, 16)
6291 END_TYPE()
6292
6293 // CRC32 Initialization and Result, upper 16 bits
6294 // Reset value: 0x00000000
6295 BEGIN_TYPE(CRC32INIRES_HI_t, uint16_t)
6296 // CRC32 initialization and result, upper 16 bits
6297 ADD_BITFIELD_RW(CRC32INIRES_HI, 0, 16)
6298 END_TYPE()
6299
6300 // CRC32 Result Reverse, lower 16 bits
6301 // Reset value: 0x0000ffff
6302 BEGIN_TYPE(CRC32RESR_LO_t, uint16_t)
6303 // CRC32 reverse result, lower 16 bits
6304 ADD_BITFIELD_RW(CRC32RESR_LO, 0, 16)
6305 END_TYPE()
6306
6307 // CRC32 Result Reverse, Upper 16 bits
6308 // Reset value: 0x0000ffff
6309 BEGIN_TYPE(CRC32RESR_HI_t, uint16_t)
6310 // CRC32 reverse result, upper 16 bits
6311 ADD_BITFIELD_RW(CRC32RESR_HI, 0, 16)
6312 END_TYPE()
6313
6314 // Data Input for CRC16 computation
6315 // Reset value: 0x00000000
6316 BEGIN_TYPE(CRC16DI_t, uint16_t)
6317 // CRC16 data in
6318 ADD_BITFIELD_RW(CRC16DI, 0, 16)
6319 END_TYPE()
6320
6321 // CRC16 Data In Reverse
6322 // Reset value: 0x00000000
6323 BEGIN_TYPE(CRC16DIRB_t, uint16_t)
6324 // CRC16 data in reverse byte
6325 ADD_BITFIELD_RW(CRC16DIRB, 0, 16)
6326 END_TYPE()
6327
6328 // CRC16 Initialization and Result register
6329 // Reset value: 0x0000ffff
6330 BEGIN_TYPE(CRC16INIRES_t, uint16_t)
6331 // CRC16 initialization and result
6332 ADD_BITFIELD_RW(CRC16INIRES, 0, 16)
6333 END_TYPE()
6334
6335 // CRC16 Result Reverse
6336 // Reset value: 0x0000ffff
6337 BEGIN_TYPE(CRC16RESR_t, uint16_t)
6338 // CRC16 reverse result
6339 ADD_BITFIELD_RW(CRC16RESR, 0, 16)
6340 END_TYPE()
6341
6342 struct CRC32_t {
6343 CRC32DI_t CRC32DI;
6344 uint16_t reserved0;
6345 CRC32DIRB_t CRC32DIRB;
6346 uint16_t reserved1;
6347 CRC32INIRES_LO_t CRC32INIRES_LO;
6348 CRC32INIRES_HI_t CRC32INIRES_HI;
6349 CRC32RESR_LO_t CRC32RESR_LO;
6350 CRC32RESR_HI_t CRC32RESR_HI;
6351 CRC16DI_t CRC16DI;
6352 uint16_t reserved2;
6353 CRC16DIRB_t CRC16DIRB;
6354 uint16_t reserved3;
6355 CRC16INIRES_t CRC16INIRES;
6356 uint16_t reserved4[2];
6357 CRC16RESR_t CRC16RESR;
6358 };
6359
6360 static CRC32_t & CRC32 = (*(CRC32_t *)0x40004000);
6361
6362} // _CRC32_
6363
6364// RTC_C
6365namespace _RTC_C_ {
6366
6367 // RTCCTL0 Register
6368 // Reset value: 0x00009608
6369 BEGIN_TYPE(RTCCTL0_t, uint16_t)
6370 // Real-time clock ready interrupt flag
6371 ADD_BITFIELD_RW(RTCRDYIFG, 0, 1)
6372 // Real-time clock alarm interrupt flag
6373 ADD_BITFIELD_RW(RTCAIFG, 1, 1)
6374 // Real-time clock time event interrupt flag
6375 ADD_BITFIELD_RW(RTCTEVIFG, 2, 1)
6376 // 32-kHz crystal oscillator fault interrupt flag
6377 ADD_BITFIELD_RW(RTCOFIFG, 3, 1)
6378 // Real-time clock ready interrupt enable
6379 ADD_BITFIELD_RW(RTCRDYIE, 4, 1)
6380 // Real-time clock alarm interrupt enable
6381 ADD_BITFIELD_RW(RTCAIE, 5, 1)
6382 // Real-time clock time event interrupt enable
6383 ADD_BITFIELD_RW(RTCTEVIE, 6, 1)
6384 // 32-kHz crystal oscillator fault interrupt enable
6385 ADD_BITFIELD_RW(RTCOFIE, 7, 1)
6386 // Real-time clock key
6387 ADD_BITFIELD_RW(RTCKEY, 8, 8)
6388 END_TYPE()
6389
6390 // RTC cannot be read safely
6391 static const uint32_t RTCCTL0_RTCRDYIFG__RTCRDYIFG_0 = 0;
6392 // RTC can be read safely
6393 static const uint32_t RTCCTL0_RTCRDYIFG__RTCRDYIFG_1 = 1;
6394 // No time event occurred
6395 static const uint32_t RTCCTL0_RTCAIFG__RTCAIFG_0 = 0;
6396 // Time event occurred
6397 static const uint32_t RTCCTL0_RTCAIFG__RTCAIFG_1 = 1;
6398 // No time event occurred
6399 static const uint32_t RTCCTL0_RTCTEVIFG__RTCTEVIFG_0 = 0;
6400 // Time event occurred
6401 static const uint32_t RTCCTL0_RTCTEVIFG__RTCTEVIFG_1 = 1;
6402 // No interrupt pending
6403 static const uint32_t RTCCTL0_RTCOFIFG__RTCOFIFG_0 = 0;
6404 // Interrupt pending. A 32-kHz crystal oscillator fault occurred after last reset.
6405 static const uint32_t RTCCTL0_RTCOFIFG__RTCOFIFG_1 = 1;
6406 // Interrupt not enabled
6407 static const uint32_t RTCCTL0_RTCRDYIE__RTCRDYIE_0 = 0;
6408 // Interrupt enabled
6409 static const uint32_t RTCCTL0_RTCRDYIE__RTCRDYIE_1 = 1;
6410 // Interrupt not enabled
6411 static const uint32_t RTCCTL0_RTCAIE__RTCAIE_0 = 0;
6412 // Interrupt enabled (LPM3/LPM3.5 wake-up enabled)
6413 static const uint32_t RTCCTL0_RTCAIE__RTCAIE_1 = 1;
6414 // Interrupt not enabled
6415 static const uint32_t RTCCTL0_RTCTEVIE__RTCTEVIE_0 = 0;
6416 // Interrupt enabled (LPM3/LPM3.5 wake-up enabled)
6417 static const uint32_t RTCCTL0_RTCTEVIE__RTCTEVIE_1 = 1;
6418 // Interrupt not enabled
6419 static const uint32_t RTCCTL0_RTCOFIE__RTCOFIE_0 = 0;
6420 // Interrupt enabled (LPM3/LPM3.5 wake-up enabled)
6421 static const uint32_t RTCCTL0_RTCOFIE__RTCOFIE_1 = 1;
6422
6423 // RTCCTL13 Register
6424 // Reset value: 0x00000070
6425 BEGIN_TYPE(RTCCTL13_t, uint16_t)
6426 // Real-time clock time event
6427 ADD_BITFIELD_RW(RTCTEV, 0, 2)
6428 // Real-time clock source select
6429 ADD_BITFIELD_RW(RTCSSEL, 2, 2)
6430 // Real-time clock ready
6431 ADD_BITFIELD_RO(RTCRDY, 4, 1)
6432 ADD_BITFIELD_RO(RTCMODE, 5, 1)
6433 // Real-time clock hold
6434 ADD_BITFIELD_RW(RTCHOLD, 6, 1)
6435 // Real-time clock BCD select
6436 ADD_BITFIELD_RW(RTCBCD, 7, 1)
6437 // Real-time clock calibration frequency
6438 ADD_BITFIELD_RW(RTCCALF, 8, 2)
6439 END_TYPE()
6440
6441 // Minute changed
6442 static const uint32_t RTCCTL13_RTCTEV__RTCTEV_0 = 0;
6443 // Hour changed
6444 static const uint32_t RTCCTL13_RTCTEV__RTCTEV_1 = 1;
6445 // Every day at midnight (00:00)
6446 static const uint32_t RTCCTL13_RTCTEV__RTCTEV_2 = 2;
6447 // Every day at noon (12:00)
6448 static const uint32_t RTCCTL13_RTCTEV__RTCTEV_3 = 3;
6449 // BCLK
6450 static const uint32_t RTCCTL13_RTCSSEL__RTCSSEL_0 = 0;
6451 // RTC time values in transition
6452 static const uint32_t RTCCTL13_RTCRDY__RTCRDY_0 = 0;
6453 // RTC time values safe for reading. This bit indicates when the real-time clock time values are safe for reading.
6454 static const uint32_t RTCCTL13_RTCRDY__RTCRDY_1 = 1;
6455 // Calendar mode. Always reads a value of 1.
6456 static const uint32_t RTCCTL13_RTCMODE__RTCMODE_1 = 1;
6457 // Real-time clock is operational
6458 static const uint32_t RTCCTL13_RTCHOLD__RTCHOLD_0 = 0;
6459 // When set, the calendar is stopped as well as the prescale counters, RT0PS and RT1PS are don't care
6460 static const uint32_t RTCCTL13_RTCHOLD__RTCHOLD_1 = 1;
6461 // Binary (hexadecimal) code selected
6462 static const uint32_t RTCCTL13_RTCBCD__RTCBCD_0 = 0;
6463 // Binary coded decimal (BCD) code selected
6464 static const uint32_t RTCCTL13_RTCBCD__RTCBCD_1 = 1;
6465 // No frequency output to RTCCLK pin
6466 static const uint32_t RTCCTL13_RTCCALF__RTCCALF_0 = 0;
6467 // 512 Hz
6468 static const uint32_t RTCCTL13_RTCCALF__RTCCALF_1 = 1;
6469 // 256 Hz
6470 static const uint32_t RTCCTL13_RTCCALF__RTCCALF_2 = 2;
6471 // 1 Hz
6472 static const uint32_t RTCCTL13_RTCCALF__RTCCALF_3 = 3;
6473
6474 // RTCOCAL Register
6475 // Reset value: 0x00000000
6476 BEGIN_TYPE(RTCOCAL_t, uint16_t)
6477 // Real-time clock offset error calibration
6478 ADD_BITFIELD_RW(RTCOCAL, 0, 8)
6479 // Real-time clock offset error calibration sign
6480 ADD_BITFIELD_RW(RTCOCALS, 15, 1)
6481 END_TYPE()
6482
6483 // Down calibration. Frequency adjusted down.
6484 static const uint32_t RTCOCAL_RTCOCALS__RTCOCALS_0 = 0;
6485 // Up calibration. Frequency adjusted up.
6486 static const uint32_t RTCOCAL_RTCOCALS__RTCOCALS_1 = 1;
6487
6488 // RTCTCMP Register
6489 // Reset value: 0x00004000
6490 BEGIN_TYPE(RTCTCMP_t, uint16_t)
6491 // Real-time clock temperature compensation
6492 ADD_BITFIELD_RW(RTCTCMP, 0, 8)
6493 // Real-time clock temperature compensation write OK
6494 ADD_BITFIELD_RO(RTCTCOK, 13, 1)
6495 // Real-time clock temperature compensation ready
6496 ADD_BITFIELD_RO(RTCTCRDY, 14, 1)
6497 // Real-time clock temperature compensation sign
6498 ADD_BITFIELD_RW(RTCTCMPS, 15, 1)
6499 END_TYPE()
6500
6501 // Write to RTCTCMPx is unsuccessful
6502 static const uint32_t RTCTCMP_RTCTCOK__RTCTCOK_0 = 0;
6503 // Write to RTCTCMPx is successful
6504 static const uint32_t RTCTCMP_RTCTCOK__RTCTCOK_1 = 1;
6505 // Down calibration. Frequency adjusted down
6506 static const uint32_t RTCTCMP_RTCTCMPS__RTCTCMPS_0 = 0;
6507 // Up calibration. Frequency adjusted up
6508 static const uint32_t RTCTCMP_RTCTCMPS__RTCTCMPS_1 = 1;
6509
6510 // Real-Time Clock Prescale Timer 0 Control Register
6511 // Reset value: 0x00000000
6512 BEGIN_TYPE(RTCPS0CTL_t, uint16_t)
6513 // Prescale timer 0 interrupt flag
6514 ADD_BITFIELD_RW(RT0PSIFG, 0, 1)
6515 // Prescale timer 0 interrupt enable
6516 ADD_BITFIELD_RW(RT0PSIE, 1, 1)
6517 // Prescale timer 0 interrupt interval
6518 ADD_BITFIELD_RW(RT0IP, 2, 3)
6519 END_TYPE()
6520
6521 // No time event occurred
6522 static const uint32_t RTCPS0CTL_RT0PSIFG__RT0PSIFG_0 = 0;
6523 // Time event occurred
6524 static const uint32_t RTCPS0CTL_RT0PSIFG__RT0PSIFG_1 = 1;
6525 // Interrupt not enabled
6526 static const uint32_t RTCPS0CTL_RT0PSIE__RT0PSIE_0 = 0;
6527 // Interrupt enabled (LPM3/LPM3.5 wake-up enabled)
6528 static const uint32_t RTCPS0CTL_RT0PSIE__RT0PSIE_1 = 1;
6529 // Divide by 2
6530 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_0 = 0;
6531 // Divide by 4
6532 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_1 = 1;
6533 // Divide by 8
6534 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_2 = 2;
6535 // Divide by 16
6536 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_3 = 3;
6537 // Divide by 32
6538 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_4 = 4;
6539 // Divide by 64
6540 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_5 = 5;
6541 // Divide by 128
6542 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_6 = 6;
6543 // Divide by 256
6544 static const uint32_t RTCPS0CTL_RT0IP__RT0IP_7 = 7;
6545
6546 // Real-Time Clock Prescale Timer 1 Control Register
6547 // Reset value: 0x00000000
6548 BEGIN_TYPE(RTCPS1CTL_t, uint16_t)
6549 // Prescale timer 1 interrupt flag
6550 ADD_BITFIELD_RW(RT1PSIFG, 0, 1)
6551 // Prescale timer 1 interrupt enable
6552 ADD_BITFIELD_RW(RT1PSIE, 1, 1)
6553 // Prescale timer 1 interrupt interval
6554 ADD_BITFIELD_RW(RT1IP, 2, 3)
6555 END_TYPE()
6556
6557 // No time event occurred
6558 static const uint32_t RTCPS1CTL_RT1PSIFG__RT1PSIFG_0 = 0;
6559 // Time event occurred
6560 static const uint32_t RTCPS1CTL_RT1PSIFG__RT1PSIFG_1 = 1;
6561 // Interrupt not enabled
6562 static const uint32_t RTCPS1CTL_RT1PSIE__RT1PSIE_0 = 0;
6563 // Interrupt enabled (LPM3/LPM3.5 wake-up enabled)
6564 static const uint32_t RTCPS1CTL_RT1PSIE__RT1PSIE_1 = 1;
6565 // Divide by 2
6566 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_0 = 0;
6567 // Divide by 4
6568 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_1 = 1;
6569 // Divide by 8
6570 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_2 = 2;
6571 // Divide by 16
6572 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_3 = 3;
6573 // Divide by 32
6574 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_4 = 4;
6575 // Divide by 64
6576 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_5 = 5;
6577 // Divide by 128
6578 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_6 = 6;
6579 // Divide by 256
6580 static const uint32_t RTCPS1CTL_RT1IP__RT1IP_7 = 7;
6581
6582 // Real-Time Clock Prescale Timer Counter Register
6583 // Reset value: 0x00000000
6584 BEGIN_TYPE(RTCPS_t, uint16_t)
6585 // Prescale timer 0 counter value
6586 ADD_BITFIELD_RW(RT0PS, 0, 8)
6587 // Prescale timer 1 counter value
6588 ADD_BITFIELD_RW(RT1PS, 8, 8)
6589 END_TYPE()
6590
6591 // Real-Time Clock Interrupt Vector Register
6592 // Reset value: 0x00000000
6593 BEGIN_TYPE(RTCIV_t, uint16_t)
6594 // Real-time clock interrupt vector value
6595 ADD_BITFIELD_RO(RTCIV, 0, 16)
6596 END_TYPE()
6597
6598 // No interrupt pending
6599 static const uint32_t RTCIV_RTCIV__RTCIV_0 = 0;
6600 // Interrupt Source: RTC oscillator failure; Interrupt Flag: RTCOFIFG; Interrupt Priority: Highest
6601 static const uint32_t RTCIV_RTCIV__RTCIV_2 = 2;
6602 // Interrupt Source: RTC ready; Interrupt Flag: RTCRDYIFG
6603 static const uint32_t RTCIV_RTCIV__RTCIV_4 = 4;
6604 // Interrupt Source: RTC interval timer; Interrupt Flag: RTCTEVIFG
6605 static const uint32_t RTCIV_RTCIV__RTCIV_6 = 6;
6606 // Interrupt Source: RTC user alarm; Interrupt Flag: RTCAIFG
6607 static const uint32_t RTCIV_RTCIV__RTCIV_8 = 8;
6608 // Interrupt Source: RTC prescaler 0; Interrupt Flag: RT0PSIFG
6609 static const uint32_t RTCIV_RTCIV__RTCIV_10 = 10;
6610 // Interrupt Source: RTC prescaler 1; Interrupt Flag: RT1PSIFG
6611 static const uint32_t RTCIV_RTCIV__RTCIV_12 = 12;
6612
6613 // RTCTIM0 Register Hexadecimal Format
6614 // Reset value: 0x00000000
6615 BEGIN_TYPE(RTCTIM0_t, uint16_t)
6616 // Seconds (0 to 59)
6617 ADD_BITFIELD_RW(Seconds, 0, 6)
6618 // Minutes (0 to 59)
6619 ADD_BITFIELD_RW(Minutes, 8, 6)
6620 END_TYPE()
6621
6622 // Real-Time Clock Hour, Day of Week
6623 // Reset value: 0x00000000
6624 BEGIN_TYPE(RTCTIM1_t, uint16_t)
6625 // Hours (0 to 23)
6626 ADD_BITFIELD_RW(Hours, 0, 5)
6627 // Day of week (0 to 6)
6628 ADD_BITFIELD_RW(DayofWeek, 8, 3)
6629 END_TYPE()
6630
6631 // RTCDATE - Hexadecimal Format
6632 // Reset value: 0x00000000
6633 BEGIN_TYPE(RTCDATE_t, uint16_t)
6634 // Day of month (1 to 28, 29, 30, 31)
6635 ADD_BITFIELD_RW(Day, 0, 5)
6636 // Month (1 to 12)
6637 ADD_BITFIELD_RW(Month, 8, 4)
6638 END_TYPE()
6639
6640 // RTCYEAR Register Hexadecimal Format
6641 // Reset value: 0x00000000
6642 BEGIN_TYPE(RTCYEAR_t, uint16_t)
6643 // Year low byte. Valid values for Year are 0 to 4095.
6644 ADD_BITFIELD_RW(YearLowByte, 0, 8)
6645 // Year high byte. Valid values for Year are 0 to 4095.
6646 ADD_BITFIELD_RW(YearHighByte, 8, 4)
6647 END_TYPE()
6648
6649 // RTCMINHR - Hexadecimal Format
6650 // Reset value: 0x00000000
6651 BEGIN_TYPE(RTCAMINHR_t, uint16_t)
6652 // Minutes (0 to 59)
6653 ADD_BITFIELD_RW(Minutes, 0, 6)
6654 // Alarm enable
6655 ADD_BITFIELD_RW(MINAE, 7, 1)
6656 // Hours (0 to 23)
6657 ADD_BITFIELD_RW(Hours, 8, 5)
6658 // Alarm enable
6659 ADD_BITFIELD_RW(HOURAE, 15, 1)
6660 END_TYPE()
6661
6662 // RTCADOWDAY - Hexadecimal Format
6663 // Reset value: 0x00000000
6664 BEGIN_TYPE(RTCADOWDAY_t, uint16_t)
6665 // Day of week (0 to 6)
6666 ADD_BITFIELD_RW(DayofWeek, 0, 3)
6667 // Alarm enable
6668 ADD_BITFIELD_RW(DOWAE, 7, 1)
6669 // Day of month (1 to 28, 29, 30, 31)
6670 ADD_BITFIELD_RW(DayofMonth, 8, 5)
6671 // Alarm enable
6672 ADD_BITFIELD_RW(DAYAE, 15, 1)
6673 END_TYPE()
6674
6675 // Binary-to-BCD Conversion Register
6676 // Reset value: 0x00000000
6677 BEGIN_TYPE(RTCBIN2BCD_t, uint16_t)
6678 // bin to bcd conversion
6679 ADD_BITFIELD_RW(BIN2BCD, 0, 16)
6680 END_TYPE()
6681
6682 // BCD-to-Binary Conversion Register
6683 // Reset value: 0x00000000
6684 BEGIN_TYPE(RTCBCD2BIN_t, uint16_t)
6685 // bcd to bin conversion
6686 ADD_BITFIELD_RW(BCD2BIN, 0, 16)
6687 END_TYPE()
6688
6689 struct RTC_C_t {
6690 RTCCTL0_t RTCCTL0;
6691 RTCCTL13_t RTCCTL13;
6692 RTCOCAL_t RTCOCAL;
6693 RTCTCMP_t RTCTCMP;
6694 RTCPS0CTL_t RTCPS0CTL;
6695 RTCPS1CTL_t RTCPS1CTL;
6696 RTCPS_t RTCPS;
6697 RTCIV_t RTCIV;
6698 RTCTIM0_t RTCTIM0;
6699 RTCTIM1_t RTCTIM1;
6700 RTCDATE_t RTCDATE;
6701 RTCYEAR_t RTCYEAR;
6702 RTCAMINHR_t RTCAMINHR;
6703 RTCADOWDAY_t RTCADOWDAY;
6704 RTCBIN2BCD_t RTCBIN2BCD;
6705 RTCBCD2BIN_t RTCBCD2BIN;
6706 };
6707
6708 static RTC_C_t & RTC_C = (*(RTC_C_t *)0x40004400);
6709
6710} // _RTC_C_
6711
6712// WDT_A
6713namespace _WDT_A_ {
6714
6715 // Watchdog Timer Control Register
6716 // Reset value: 0x00006904
6717 BEGIN_TYPE(WDTCTL_t, uint16_t)
6718 // Watchdog timer interval select
6719 ADD_BITFIELD_RW(WDTIS, 0, 3)
6720 // Watchdog timer counter clear
6721 ADD_BITFIELD_WO(WDTCNTCL, 3, 1)
6722 // Watchdog timer mode select
6723 ADD_BITFIELD_RW(WDTTMSEL, 4, 1)
6724 // Watchdog timer clock source select
6725 ADD_BITFIELD_RW(WDTSSEL, 5, 2)
6726 // Watchdog timer hold
6727 ADD_BITFIELD_RW(WDTHOLD, 7, 1)
6728 // Watchdog timer password
6729 ADD_BITFIELD_RW(WDTPW, 8, 8)
6730 END_TYPE()
6731
6732 // Watchdog clock source / (2^(31)) (18:12:16 at 32.768 kHz)
6733 static const uint32_t WDTCTL_WDTIS__WDTIS_0 = 0;
6734 // Watchdog clock source /(2^(27)) (01:08:16 at 32.768 kHz)
6735 static const uint32_t WDTCTL_WDTIS__WDTIS_1 = 1;
6736 // Watchdog clock source /(2^(23)) (00:04:16 at 32.768 kHz)
6737 static const uint32_t WDTCTL_WDTIS__WDTIS_2 = 2;
6738 // Watchdog clock source /(2^(19)) (00:00:16 at 32.768 kHz)
6739 static const uint32_t WDTCTL_WDTIS__WDTIS_3 = 3;
6740 // Watchdog clock source /(2^(15)) (1 s at 32.768 kHz)
6741 static const uint32_t WDTCTL_WDTIS__WDTIS_4 = 4;
6742 // Watchdog clock source / (2^(13)) (250 ms at 32.768 kHz)
6743 static const uint32_t WDTCTL_WDTIS__WDTIS_5 = 5;
6744 // Watchdog clock source / (2^(9)) (15.625 ms at 32.768 kHz)
6745 static const uint32_t WDTCTL_WDTIS__WDTIS_6 = 6;
6746 // Watchdog clock source / (2^(6)) (1.95 ms at 32.768 kHz)
6747 static const uint32_t WDTCTL_WDTIS__WDTIS_7 = 7;
6748 // No action
6749 static const uint32_t WDTCTL_WDTCNTCL__WDTCNTCL_0 = 0;
6750 // WDTCNT = 0000h
6751 static const uint32_t WDTCTL_WDTCNTCL__WDTCNTCL_1 = 1;
6752 // Watchdog mode
6753 static const uint32_t WDTCTL_WDTTMSEL__WDTTMSEL_0 = 0;
6754 // Interval timer mode
6755 static const uint32_t WDTCTL_WDTTMSEL__WDTTMSEL_1 = 1;
6756 // SMCLK
6757 static const uint32_t WDTCTL_WDTSSEL__WDTSSEL_0 = 0;
6758 // ACLK
6759 static const uint32_t WDTCTL_WDTSSEL__WDTSSEL_1 = 1;
6760 // VLOCLK
6761 static const uint32_t WDTCTL_WDTSSEL__WDTSSEL_2 = 2;
6762 // BCLK
6763 static const uint32_t WDTCTL_WDTSSEL__WDTSSEL_3 = 3;
6764 // Watchdog timer is not stopped
6765 static const uint32_t WDTCTL_WDTHOLD__WDTHOLD_0 = 0;
6766 // Watchdog timer is stopped
6767 static const uint32_t WDTCTL_WDTHOLD__WDTHOLD_1 = 1;
6768
6769 struct WDT_A_t {
6770 uint16_t reserved0[6];
6771 WDTCTL_t WDTCTL;
6772 };
6773
6774 static WDT_A_t & WDT_A = (*(WDT_A_t *)0x40004800);
6775
6776} // _WDT_A_
6777
6778// DIO
6779namespace _DIO_ {
6780
6781 // Port A Input
6782 // Reset value: 0x00000000
6783 BEGIN_TYPE(PAIN_t, uint16_t)
6784 // Port 1 Input
6785 ADD_BITFIELD_RO(P1IN, 0, 8)
6786 // Port 2 Input
6787 ADD_BITFIELD_RO(P2IN, 8, 8)
6788 END_TYPE()
6789
6790 // Port A Output
6791 // Reset value: 0x00000000
6792 BEGIN_TYPE(PAOUT_t, uint16_t)
6793 // Port 2 Output
6794 ADD_BITFIELD_RW(P2OUT, 8, 8)
6795 // Port 1 Output
6796 ADD_BITFIELD_RW(P1OUT, 0, 8)
6797 END_TYPE()
6798
6799 // Port A Direction
6800 // Reset value: 0x00000000
6801 BEGIN_TYPE(PADIR_t, uint16_t)
6802 // Port 1 Direction
6803 ADD_BITFIELD_RW(P1DIR, 0, 8)
6804 // Port 2 Direction
6805 ADD_BITFIELD_RW(P2DIR, 8, 8)
6806 END_TYPE()
6807
6808 // Port A Resistor Enable
6809 // Reset value: 0x00000000
6810 BEGIN_TYPE(PAREN_t, uint16_t)
6811 // Port 1 Resistor Enable
6812 ADD_BITFIELD_RW(P1REN, 0, 8)
6813 // Port 2 Resistor Enable
6814 ADD_BITFIELD_RW(P2REN, 8, 8)
6815 END_TYPE()
6816
6817 // Port A Drive Strength
6818 BEGIN_TYPE(PADS_t, uint16_t)
6819 // Port 1 Drive Strength
6820 ADD_BITFIELD_RW(P1DS, 0, 8)
6821 // Port 2 Drive Strength
6822 ADD_BITFIELD_RW(P2DS, 8, 8)
6823 END_TYPE()
6824
6825 // Port A Select 0
6826 // Reset value: 0x00000000
6827 BEGIN_TYPE(PASEL0_t, uint16_t)
6828 // Port 1 Select 0
6829 ADD_BITFIELD_RW(P1SEL0, 0, 8)
6830 // Port 2 Select 0
6831 ADD_BITFIELD_RW(P2SEL0, 8, 8)
6832 END_TYPE()
6833
6834 // Port A Select 1
6835 // Reset value: 0x00000000
6836 BEGIN_TYPE(PASEL1_t, uint16_t)
6837 // Port 1 Select 1
6838 ADD_BITFIELD_RW(P1SEL1, 0, 8)
6839 // Port 2 Select 1
6840 ADD_BITFIELD_RW(P2SEL1, 8, 8)
6841 END_TYPE()
6842
6843 // Port 1 Interrupt Vector Register
6844 // Reset value: 0x00000000
6845 BEGIN_TYPE(P1IV_t, uint16_t)
6846 // Port 1 interrupt vector value
6847 ADD_BITFIELD_RO(P1IV, 0, 5)
6848 END_TYPE()
6849
6850 // No interrupt pending
6851 static const uint32_t P1IV_P1IV__P1IV_0 = 0;
6852 // Interrupt Source: Port 1.0 interrupt; Interrupt Flag: P1IFG0; Interrupt Priority: Highest
6853 static const uint32_t P1IV_P1IV__P1IV_2 = 2;
6854 // Interrupt Source: Port 1.1 interrupt; Interrupt Flag: P1IFG1
6855 static const uint32_t P1IV_P1IV__P1IV_4 = 4;
6856 // Interrupt Source: Port 1.2 interrupt; Interrupt Flag: P1IFG2
6857 static const uint32_t P1IV_P1IV__P1IV_6 = 6;
6858 // Interrupt Source: Port 1.3 interrupt; Interrupt Flag: P1IFG3
6859 static const uint32_t P1IV_P1IV__P1IV_8 = 8;
6860 // Interrupt Source: Port 1.4 interrupt; Interrupt Flag: P1IFG4
6861 static const uint32_t P1IV_P1IV__P1IV_10 = 10;
6862 // Interrupt Source: Port 1.5 interrupt; Interrupt Flag: P1IFG5
6863 static const uint32_t P1IV_P1IV__P1IV_12 = 12;
6864 // Interrupt Source: Port 1.6 interrupt; Interrupt Flag: P1IFG6
6865 static const uint32_t P1IV_P1IV__P1IV_14 = 14;
6866 // Interrupt Source: Port 1.7 interrupt; Interrupt Flag: P1IFG7; Interrupt Priority: Lowest
6867 static const uint32_t P1IV_P1IV__P1IV_16 = 16;
6868
6869 // Port A Complement Select
6870 // Reset value: 0x00000000
6871 BEGIN_TYPE(PASELC_t, uint16_t)
6872 // Port 1 Complement Select
6873 ADD_BITFIELD_RW(P1SELC, 0, 8)
6874 // Port 2 Complement Select
6875 ADD_BITFIELD_RW(P2SELC, 8, 8)
6876 END_TYPE()
6877
6878 // Port A Interrupt Edge Select
6879 // Reset value: 0x00000000
6880 BEGIN_TYPE(PAIES_t, uint16_t)
6881 // Port 1 Interrupt Edge Select
6882 ADD_BITFIELD_RW(P1IES, 0, 8)
6883 // Port 2 Interrupt Edge Select
6884 ADD_BITFIELD_RW(P2IES, 8, 8)
6885 END_TYPE()
6886
6887 // Port A Interrupt Enable
6888 // Reset value: 0x00000000
6889 BEGIN_TYPE(PAIE_t, uint16_t)
6890 // Port 1 Interrupt Enable
6891 ADD_BITFIELD_RW(P1IE, 0, 8)
6892 // Port 2 Interrupt Enable
6893 ADD_BITFIELD_RW(P2IE, 8, 8)
6894 END_TYPE()
6895
6896 // Port A Interrupt Flag
6897 // Reset value: 0x00000000
6898 BEGIN_TYPE(PAIFG_t, uint16_t)
6899 // Port 1 Interrupt Flag
6900 ADD_BITFIELD_RW(P1IFG, 0, 8)
6901 // Port 2 Interrupt Flag
6902 ADD_BITFIELD_RW(P2IFG, 8, 8)
6903 END_TYPE()
6904
6905 // Port 2 Interrupt Vector Register
6906 BEGIN_TYPE(P2IV_t, uint16_t)
6907 // Port 2 interrupt vector value
6908 ADD_BITFIELD_RO(P2IV, 0, 5)
6909 END_TYPE()
6910
6911 // No interrupt pending
6912 static const uint32_t P2IV_P2IV__P2IV_0 = 0;
6913 // Interrupt Source: Port 2.0 interrupt; Interrupt Flag: P2IFG0; Interrupt Priority: Highest
6914 static const uint32_t P2IV_P2IV__P2IV_2 = 2;
6915 // Interrupt Source: Port 2.1 interrupt; Interrupt Flag: P2IFG1
6916 static const uint32_t P2IV_P2IV__P2IV_4 = 4;
6917 // Interrupt Source: Port 2.2 interrupt; Interrupt Flag: P2IFG2
6918 static const uint32_t P2IV_P2IV__P2IV_6 = 6;
6919 // Interrupt Source: Port 2.3 interrupt; Interrupt Flag: P2IFG3
6920 static const uint32_t P2IV_P2IV__P2IV_8 = 8;
6921 // Interrupt Source: Port 2.4 interrupt; Interrupt Flag: P2IFG4
6922 static const uint32_t P2IV_P2IV__P2IV_10 = 10;
6923 // Interrupt Source: Port 2.5 interrupt; Interrupt Flag: P2IFG5
6924 static const uint32_t P2IV_P2IV__P2IV_12 = 12;
6925 // Interrupt Source: Port 2.6 interrupt; Interrupt Flag: P2IFG6
6926 static const uint32_t P2IV_P2IV__P2IV_14 = 14;
6927 // Interrupt Source: Port 2.7 interrupt; Interrupt Flag: P2IFG7; Interrupt Priority: Lowest
6928 static const uint32_t P2IV_P2IV__P2IV_16 = 16;
6929
6930 // Port B Input
6931 // Reset value: 0x00000000
6932 BEGIN_TYPE(PBIN_t, uint16_t)
6933 // Port 3 Input
6934 ADD_BITFIELD_RO(P3IN, 0, 8)
6935 // Port 4 Input
6936 ADD_BITFIELD_RO(P4IN, 8, 8)
6937 END_TYPE()
6938
6939 // Port B Output
6940 // Reset value: 0x00000000
6941 BEGIN_TYPE(PBOUT_t, uint16_t)
6942 // Port 3 Output
6943 ADD_BITFIELD_RW(P3OUT, 0, 8)
6944 // Port 4 Output
6945 ADD_BITFIELD_RW(P4OUT, 8, 8)
6946 END_TYPE()
6947
6948 // Port B Direction
6949 // Reset value: 0x00000000
6950 BEGIN_TYPE(PBDIR_t, uint16_t)
6951 // Port 3 Direction
6952 ADD_BITFIELD_RW(P3DIR, 0, 8)
6953 // Port 4 Direction
6954 ADD_BITFIELD_RW(P4DIR, 8, 8)
6955 END_TYPE()
6956
6957 // Port B Resistor Enable
6958 // Reset value: 0x00000000
6959 BEGIN_TYPE(PBREN_t, uint16_t)
6960 // Port 3 Resistor Enable
6961 ADD_BITFIELD_RW(P3REN, 0, 8)
6962 // Port 4 Resistor Enable
6963 ADD_BITFIELD_RW(P4REN, 8, 8)
6964 END_TYPE()
6965
6966 // Port B Drive Strength
6967 BEGIN_TYPE(PBDS_t, uint16_t)
6968 // Port 3 Drive Strength
6969 ADD_BITFIELD_RW(P3DS, 0, 8)
6970 // Port 4 Drive Strength
6971 ADD_BITFIELD_RW(P4DS, 8, 8)
6972 END_TYPE()
6973
6974 // Port B Select 0
6975 // Reset value: 0x00000000
6976 BEGIN_TYPE(PBSEL0_t, uint16_t)
6977 // Port 4 Select 0
6978 ADD_BITFIELD_RW(P4SEL0, 8, 8)
6979 // Port 3 Select 0
6980 ADD_BITFIELD_RW(P3SEL0, 0, 8)
6981 END_TYPE()
6982
6983 // Port B Select 1
6984 // Reset value: 0x00000000
6985 BEGIN_TYPE(PBSEL1_t, uint16_t)
6986 // Port 3 Select 1
6987 ADD_BITFIELD_RW(P3SEL1, 0, 8)
6988 // Port 4 Select 1
6989 ADD_BITFIELD_RW(P4SEL1, 8, 8)
6990 END_TYPE()
6991
6992 // Port 3 Interrupt Vector Register
6993 // Reset value: 0x00000000
6994 BEGIN_TYPE(P3IV_t, uint16_t)
6995 // Port 3 interrupt vector value
6996 ADD_BITFIELD_RO(P3IV, 0, 5)
6997 END_TYPE()
6998
6999 // No interrupt pending
7000 static const uint32_t P3IV_P3IV__P3IV_0 = 0;
7001 // Interrupt Source: Port 3.0 interrupt; Interrupt Flag: P3IFG0; Interrupt Priority: Highest
7002 static const uint32_t P3IV_P3IV__P3IV_2 = 2;
7003 // Interrupt Source: Port 3.1 interrupt; Interrupt Flag: P3IFG1
7004 static const uint32_t P3IV_P3IV__P3IV_4 = 4;
7005 // Interrupt Source: Port 3.2 interrupt; Interrupt Flag: P3IFG2
7006 static const uint32_t P3IV_P3IV__P3IV_6 = 6;
7007 // Interrupt Source: Port 3.3 interrupt; Interrupt Flag: P3IFG3
7008 static const uint32_t P3IV_P3IV__P3IV_8 = 8;
7009 // Interrupt Source: Port 3.4 interrupt; Interrupt Flag: P3IFG4
7010 static const uint32_t P3IV_P3IV__P3IV_10 = 10;
7011 // Interrupt Source: Port 3.5 interrupt; Interrupt Flag: P3IFG5
7012 static const uint32_t P3IV_P3IV__P3IV_12 = 12;
7013 // Interrupt Source: Port 3.6 interrupt; Interrupt Flag: P3IFG6
7014 static const uint32_t P3IV_P3IV__P3IV_14 = 14;
7015 // Interrupt Source: Port 3.7 interrupt; Interrupt Flag: P3IFG7; Interrupt Priority: Lowest
7016 static const uint32_t P3IV_P3IV__P3IV_16 = 16;
7017
7018 // Port B Complement Select
7019 // Reset value: 0x00000000
7020 BEGIN_TYPE(PBSELC_t, uint16_t)
7021 // Port 3 Complement Select
7022 ADD_BITFIELD_RW(P3SELC, 0, 8)
7023 // Port 4 Complement Select
7024 ADD_BITFIELD_RW(P4SELC, 8, 8)
7025 END_TYPE()
7026
7027 // Port B Interrupt Edge Select
7028 // Reset value: 0x00000000
7029 BEGIN_TYPE(PBIES_t, uint16_t)
7030 // Port 3 Interrupt Edge Select
7031 ADD_BITFIELD_RW(P3IES, 0, 8)
7032 // Port 4 Interrupt Edge Select
7033 ADD_BITFIELD_RW(P4IES, 8, 8)
7034 END_TYPE()
7035
7036 // Port B Interrupt Enable
7037 // Reset value: 0x00000000
7038 BEGIN_TYPE(PBIE_t, uint16_t)
7039 // Port 3 Interrupt Enable
7040 ADD_BITFIELD_RW(P3IE, 0, 8)
7041 // Port 4 Interrupt Enable
7042 ADD_BITFIELD_RW(P4IE, 8, 8)
7043 END_TYPE()
7044
7045 // Port B Interrupt Flag
7046 // Reset value: 0x00000000
7047 BEGIN_TYPE(PBIFG_t, uint16_t)
7048 // Port 3 Interrupt Flag
7049 ADD_BITFIELD_RW(P3IFG, 0, 8)
7050 // Port 4 Interrupt Flag
7051 ADD_BITFIELD_RW(P4IFG, 8, 8)
7052 END_TYPE()
7053
7054 // Port 4 Interrupt Vector Register
7055 BEGIN_TYPE(P4IV_t, uint16_t)
7056 // Port 4 interrupt vector value
7057 ADD_BITFIELD_RO(P4IV, 0, 5)
7058 END_TYPE()
7059
7060 // No interrupt pending
7061 static const uint32_t P4IV_P4IV__P4IV_0 = 0;
7062 // Interrupt Source: Port 4.0 interrupt; Interrupt Flag: P4IFG0; Interrupt Priority: Highest
7063 static const uint32_t P4IV_P4IV__P4IV_2 = 2;
7064 // Interrupt Source: Port 4.1 interrupt; Interrupt Flag: P4IFG1
7065 static const uint32_t P4IV_P4IV__P4IV_4 = 4;
7066 // Interrupt Source: Port 4.2 interrupt; Interrupt Flag: P4IFG2
7067 static const uint32_t P4IV_P4IV__P4IV_6 = 6;
7068 // Interrupt Source: Port 4.3 interrupt; Interrupt Flag: P4IFG3
7069 static const uint32_t P4IV_P4IV__P4IV_8 = 8;
7070 // Interrupt Source: Port 4.4 interrupt; Interrupt Flag: P4IFG4
7071 static const uint32_t P4IV_P4IV__P4IV_10 = 10;
7072 // Interrupt Source: Port 4.5 interrupt; Interrupt Flag: P4IFG5
7073 static const uint32_t P4IV_P4IV__P4IV_12 = 12;
7074 // Interrupt Source: Port 4.6 interrupt; Interrupt Flag: P4IFG6
7075 static const uint32_t P4IV_P4IV__P4IV_14 = 14;
7076 // Interrupt Source: Port 4.7 interrupt; Interrupt Flag: P4IFG7; Interrupt Priority: Lowest
7077 static const uint32_t P4IV_P4IV__P4IV_16 = 16;
7078
7079 // Port C Input
7080 // Reset value: 0x00000000
7081 BEGIN_TYPE(PCIN_t, uint16_t)
7082 // Port 5 Input
7083 ADD_BITFIELD_RO(P5IN, 0, 8)
7084 // Port 6 Input
7085 ADD_BITFIELD_RO(P6IN, 8, 8)
7086 END_TYPE()
7087
7088 // Port C Output
7089 // Reset value: 0x00000000
7090 BEGIN_TYPE(PCOUT_t, uint16_t)
7091 // Port 5 Output
7092 ADD_BITFIELD_RW(P5OUT, 0, 8)
7093 // Port 6 Output
7094 ADD_BITFIELD_RW(P6OUT, 8, 8)
7095 END_TYPE()
7096
7097 // Port C Direction
7098 // Reset value: 0x00000000
7099 BEGIN_TYPE(PCDIR_t, uint16_t)
7100 // Port 5 Direction
7101 ADD_BITFIELD_RW(P5DIR, 0, 8)
7102 // Port 6 Direction
7103 ADD_BITFIELD_RW(P6DIR, 8, 8)
7104 END_TYPE()
7105
7106 // Port C Resistor Enable
7107 // Reset value: 0x00000000
7108 BEGIN_TYPE(PCREN_t, uint16_t)
7109 // Port 5 Resistor Enable
7110 ADD_BITFIELD_RW(P5REN, 0, 8)
7111 // Port 6 Resistor Enable
7112 ADD_BITFIELD_RW(P6REN, 8, 8)
7113 END_TYPE()
7114
7115 // Port C Drive Strength
7116 BEGIN_TYPE(PCDS_t, uint16_t)
7117 // Port 5 Drive Strength
7118 ADD_BITFIELD_RW(P5DS, 0, 8)
7119 // Port 6 Drive Strength
7120 ADD_BITFIELD_RW(P6DS, 8, 8)
7121 END_TYPE()
7122
7123 // Port C Select 0
7124 // Reset value: 0x00000000
7125 BEGIN_TYPE(PCSEL0_t, uint16_t)
7126 // Port 5 Select 0
7127 ADD_BITFIELD_RW(P5SEL0, 0, 8)
7128 // Port 6 Select 0
7129 ADD_BITFIELD_RW(P6SEL0, 8, 8)
7130 END_TYPE()
7131
7132 // Port C Select 1
7133 // Reset value: 0x00000000
7134 BEGIN_TYPE(PCSEL1_t, uint16_t)
7135 // Port 5 Select 1
7136 ADD_BITFIELD_RW(P5SEL1, 0, 8)
7137 // Port 6 Select 1
7138 ADD_BITFIELD_RW(P6SEL1, 8, 8)
7139 END_TYPE()
7140
7141 // Port 5 Interrupt Vector Register
7142 // Reset value: 0x00000000
7143 BEGIN_TYPE(P5IV_t, uint16_t)
7144 // Port 5 interrupt vector value
7145 ADD_BITFIELD_RO(P5IV, 0, 5)
7146 END_TYPE()
7147
7148 // No interrupt pending
7149 static const uint32_t P5IV_P5IV__P5IV_0 = 0;
7150 // Interrupt Source: Port 5.0 interrupt; Interrupt Flag: P5IFG0; Interrupt Priority: Highest
7151 static const uint32_t P5IV_P5IV__P5IV_2 = 2;
7152 // Interrupt Source: Port 5.1 interrupt; Interrupt Flag: P5IFG1
7153 static const uint32_t P5IV_P5IV__P5IV_4 = 4;
7154 // Interrupt Source: Port 5.2 interrupt; Interrupt Flag: P5IFG2
7155 static const uint32_t P5IV_P5IV__P5IV_6 = 6;
7156 // Interrupt Source: Port 5.3 interrupt; Interrupt Flag: P5IFG3
7157 static const uint32_t P5IV_P5IV__P5IV_8 = 8;
7158 // Interrupt Source: Port 5.4 interrupt; Interrupt Flag: P5IFG4
7159 static const uint32_t P5IV_P5IV__P5IV_10 = 10;
7160 // Interrupt Source: Port 5.5 interrupt; Interrupt Flag: P5IFG5
7161 static const uint32_t P5IV_P5IV__P5IV_12 = 12;
7162 // Interrupt Source: Port 5.6 interrupt; Interrupt Flag: P5IFG6
7163 static const uint32_t P5IV_P5IV__P5IV_14 = 14;
7164 // Interrupt Source: Port 5.7 interrupt; Interrupt Flag: P5IFG7; Interrupt Priority: Lowest
7165 static const uint32_t P5IV_P5IV__P5IV_16 = 16;
7166
7167 // Port C Complement Select
7168 // Reset value: 0x00000000
7169 BEGIN_TYPE(PCSELC_t, uint16_t)
7170 // Port 5 Complement Select
7171 ADD_BITFIELD_RW(P5SELC, 0, 8)
7172 // Port 6 Complement Select
7173 ADD_BITFIELD_RW(P6SELC, 8, 8)
7174 END_TYPE()
7175
7176 // Port C Interrupt Edge Select
7177 // Reset value: 0x00000000
7178 BEGIN_TYPE(PCIES_t, uint16_t)
7179 // Port 5 Interrupt Edge Select
7180 ADD_BITFIELD_RW(P5IES, 0, 8)
7181 // Port 6 Interrupt Edge Select
7182 ADD_BITFIELD_RW(P6IES, 8, 8)
7183 END_TYPE()
7184
7185 // Port C Interrupt Enable
7186 // Reset value: 0x00000000
7187 BEGIN_TYPE(PCIE_t, uint16_t)
7188 // Port 5 Interrupt Enable
7189 ADD_BITFIELD_RW(P5IE, 0, 8)
7190 // Port 6 Interrupt Enable
7191 ADD_BITFIELD_RW(P6IE, 8, 8)
7192 END_TYPE()
7193
7194 // Port C Interrupt Flag
7195 // Reset value: 0x00000000
7196 BEGIN_TYPE(PCIFG_t, uint16_t)
7197 // Port 5 Interrupt Flag
7198 ADD_BITFIELD_RW(P5IFG, 0, 8)
7199 // Port 6 Interrupt Flag
7200 ADD_BITFIELD_RW(P6IFG, 8, 8)
7201 END_TYPE()
7202
7203 // Port 6 Interrupt Vector Register
7204 BEGIN_TYPE(P6IV_t, uint16_t)
7205 // Port 6 interrupt vector value
7206 ADD_BITFIELD_RO(P6IV, 0, 5)
7207 END_TYPE()
7208
7209 // No interrupt pending
7210 static const uint32_t P6IV_P6IV__P6IV_0 = 0;
7211 // Interrupt Source: Port 6.0 interrupt; Interrupt Flag: P6IFG0; Interrupt Priority: Highest
7212 static const uint32_t P6IV_P6IV__P6IV_2 = 2;
7213 // Interrupt Source: Port 6.1 interrupt; Interrupt Flag: P6IFG1
7214 static const uint32_t P6IV_P6IV__P6IV_4 = 4;
7215 // Interrupt Source: Port 6.2 interrupt; Interrupt Flag: P6IFG2
7216 static const uint32_t P6IV_P6IV__P6IV_6 = 6;
7217 // Interrupt Source: Port 6.3 interrupt; Interrupt Flag: P6IFG3
7218 static const uint32_t P6IV_P6IV__P6IV_8 = 8;
7219 // Interrupt Source: Port 6.4 interrupt; Interrupt Flag: P6IFG4
7220 static const uint32_t P6IV_P6IV__P6IV_10 = 10;
7221 // Interrupt Source: Port 6.5 interrupt; Interrupt Flag: P6IFG5
7222 static const uint32_t P6IV_P6IV__P6IV_12 = 12;
7223 // Interrupt Source: Port 6.6 interrupt; Interrupt Flag: P6IFG6
7224 static const uint32_t P6IV_P6IV__P6IV_14 = 14;
7225 // Interrupt Source: Port 6.7 interrupt; Interrupt Flag: P6IFG7; Interrupt Priority: Lowest
7226 static const uint32_t P6IV_P6IV__P6IV_16 = 16;
7227
7228 // Port D Input
7229 // Reset value: 0x00000000
7230 BEGIN_TYPE(PDIN_t, uint16_t)
7231 // Port 7 Input
7232 ADD_BITFIELD_RO(P7IN, 0, 8)
7233 // Port 8 Input
7234 ADD_BITFIELD_RO(P8IN, 8, 8)
7235 END_TYPE()
7236
7237 // Port D Output
7238 // Reset value: 0x00000000
7239 BEGIN_TYPE(PDOUT_t, uint16_t)
7240 // Port 7 Output
7241 ADD_BITFIELD_RW(P7OUT, 0, 8)
7242 // Port 8 Output
7243 ADD_BITFIELD_RW(P8OUT, 8, 8)
7244 END_TYPE()
7245
7246 // Port D Direction
7247 // Reset value: 0x00000000
7248 BEGIN_TYPE(PDDIR_t, uint16_t)
7249 // Port 7 Direction
7250 ADD_BITFIELD_RW(P7DIR, 0, 8)
7251 // Port 8 Direction
7252 ADD_BITFIELD_RW(P8DIR, 8, 8)
7253 END_TYPE()
7254
7255 // Port D Resistor Enable
7256 // Reset value: 0x00000000
7257 BEGIN_TYPE(PDREN_t, uint16_t)
7258 // Port 7 Resistor Enable
7259 ADD_BITFIELD_RW(P7REN, 0, 8)
7260 // Port 8 Resistor Enable
7261 ADD_BITFIELD_RW(P8REN, 8, 8)
7262 END_TYPE()
7263
7264 // Port D Drive Strength
7265 BEGIN_TYPE(PDDS_t, uint16_t)
7266 // Port 7 Drive Strength
7267 ADD_BITFIELD_RW(P7DS, 0, 8)
7268 // Port 8 Drive Strength
7269 ADD_BITFIELD_RW(P8DS, 8, 8)
7270 END_TYPE()
7271
7272 // Port D Select 0
7273 // Reset value: 0x00000000
7274 BEGIN_TYPE(PDSEL0_t, uint16_t)
7275 // Port 7 Select 0
7276 ADD_BITFIELD_RW(P7SEL0, 0, 8)
7277 // Port 8 Select 0
7278 ADD_BITFIELD_RW(P8SEL0, 8, 8)
7279 END_TYPE()
7280
7281 // Port D Select 1
7282 // Reset value: 0x00000000
7283 BEGIN_TYPE(PDSEL1_t, uint16_t)
7284 // Port 7 Select 1
7285 ADD_BITFIELD_RW(P7SEL1, 0, 8)
7286 // Port 8 Select 1
7287 ADD_BITFIELD_RW(P8SEL1, 8, 8)
7288 END_TYPE()
7289
7290 // Port 7 Interrupt Vector Register
7291 // Reset value: 0x00000000
7292 BEGIN_TYPE(P7IV_t, uint16_t)
7293 // Port 7 interrupt vector value
7294 ADD_BITFIELD_RO(P7IV, 0, 5)
7295 END_TYPE()
7296
7297 // No interrupt pending
7298 static const uint32_t P7IV_P7IV__P7IV_0 = 0;
7299 // Interrupt Source: Port 7.0 interrupt; Interrupt Flag: P7IFG0; Interrupt Priority: Highest
7300 static const uint32_t P7IV_P7IV__P7IV_2 = 2;
7301 // Interrupt Source: Port 7.1 interrupt; Interrupt Flag: P7IFG1
7302 static const uint32_t P7IV_P7IV__P7IV_4 = 4;
7303 // Interrupt Source: Port 7.2 interrupt; Interrupt Flag: P7IFG2
7304 static const uint32_t P7IV_P7IV__P7IV_6 = 6;
7305 // Interrupt Source: Port 7.3 interrupt; Interrupt Flag: P7IFG3
7306 static const uint32_t P7IV_P7IV__P7IV_8 = 8;
7307 // Interrupt Source: Port 7.4 interrupt; Interrupt Flag: P7IFG4
7308 static const uint32_t P7IV_P7IV__P7IV_10 = 10;
7309 // Interrupt Source: Port 7.5 interrupt; Interrupt Flag: P7IFG5
7310 static const uint32_t P7IV_P7IV__P7IV_12 = 12;
7311 // Interrupt Source: Port 7.6 interrupt; Interrupt Flag: P7IFG6
7312 static const uint32_t P7IV_P7IV__P7IV_14 = 14;
7313 // Interrupt Source: Port 7.7 interrupt; Interrupt Flag: P7IFG7; Interrupt Priority: Lowest
7314 static const uint32_t P7IV_P7IV__P7IV_16 = 16;
7315
7316 // Port D Complement Select
7317 // Reset value: 0x00000000
7318 BEGIN_TYPE(PDSELC_t, uint16_t)
7319 // Port 7 Complement Select
7320 ADD_BITFIELD_RW(P7SELC, 0, 8)
7321 // Port 8 Complement Select
7322 ADD_BITFIELD_RW(P8SELC, 8, 8)
7323 END_TYPE()
7324
7325 // Port D Interrupt Edge Select
7326 // Reset value: 0x00000000
7327 BEGIN_TYPE(PDIES_t, uint16_t)
7328 // Port 7 Interrupt Edge Select
7329 ADD_BITFIELD_RW(P7IES, 0, 8)
7330 // Port 8 Interrupt Edge Select
7331 ADD_BITFIELD_RW(P8IES, 8, 8)
7332 END_TYPE()
7333
7334 // Port D Interrupt Enable
7335 // Reset value: 0x00000000
7336 BEGIN_TYPE(PDIE_t, uint16_t)
7337 // Port 7 Interrupt Enable
7338 ADD_BITFIELD_RW(P7IE, 0, 8)
7339 // Port 8 Interrupt Enable
7340 ADD_BITFIELD_RW(P8IE, 8, 8)
7341 END_TYPE()
7342
7343 // Port D Interrupt Flag
7344 // Reset value: 0x00000000
7345 BEGIN_TYPE(PDIFG_t, uint16_t)
7346 // Port 7 Interrupt Flag
7347 ADD_BITFIELD_RW(P7IFG, 0, 8)
7348 // Port 8 Interrupt Flag
7349 ADD_BITFIELD_RW(P8IFG, 8, 8)
7350 END_TYPE()
7351
7352 // Port 8 Interrupt Vector Register
7353 BEGIN_TYPE(P8IV_t, uint16_t)
7354 // Port 8 interrupt vector value
7355 ADD_BITFIELD_RO(P8IV, 0, 5)
7356 END_TYPE()
7357
7358 // No interrupt pending
7359 static const uint32_t P8IV_P8IV__P8IV_0 = 0;
7360 // Interrupt Source: Port 8.0 interrupt; Interrupt Flag: P8IFG0; Interrupt Priority: Highest
7361 static const uint32_t P8IV_P8IV__P8IV_2 = 2;
7362 // Interrupt Source: Port 8.1 interrupt; Interrupt Flag: P8IFG1
7363 static const uint32_t P8IV_P8IV__P8IV_4 = 4;
7364 // Interrupt Source: Port 8.2 interrupt; Interrupt Flag: P8IFG2
7365 static const uint32_t P8IV_P8IV__P8IV_6 = 6;
7366 // Interrupt Source: Port 8.3 interrupt; Interrupt Flag: P8IFG3
7367 static const uint32_t P8IV_P8IV__P8IV_8 = 8;
7368 // Interrupt Source: Port 8.4 interrupt; Interrupt Flag: P8IFG4
7369 static const uint32_t P8IV_P8IV__P8IV_10 = 10;
7370 // Interrupt Source: Port 8.5 interrupt; Interrupt Flag: P8IFG5
7371 static const uint32_t P8IV_P8IV__P8IV_12 = 12;
7372 // Interrupt Source: Port 8.6 interrupt; Interrupt Flag: P8IFG6
7373 static const uint32_t P8IV_P8IV__P8IV_14 = 14;
7374 // Interrupt Source: Port 8.7 interrupt; Interrupt Flag: P8IFG7; Interrupt Priority: Lowest
7375 static const uint32_t P8IV_P8IV__P8IV_16 = 16;
7376
7377 // Port E Input
7378 // Reset value: 0x00000000
7379 BEGIN_TYPE(PEIN_t, uint16_t)
7380 // Port 9 Input
7381 ADD_BITFIELD_RO(P9IN, 0, 8)
7382 // Port 10 Input
7383 ADD_BITFIELD_RO(P10IN, 8, 8)
7384 END_TYPE()
7385
7386 // Port E Output
7387 // Reset value: 0x00000000
7388 BEGIN_TYPE(PEOUT_t, uint16_t)
7389 // Port 9 Output
7390 ADD_BITFIELD_RW(P9OUT, 0, 8)
7391 // Port 10 Output
7392 ADD_BITFIELD_RW(P10OUT, 8, 8)
7393 END_TYPE()
7394
7395 // Port E Direction
7396 // Reset value: 0x00000000
7397 BEGIN_TYPE(PEDIR_t, uint16_t)
7398 // Port 9 Direction
7399 ADD_BITFIELD_RW(P9DIR, 0, 8)
7400 // Port 10 Direction
7401 ADD_BITFIELD_RW(P10DIR, 8, 8)
7402 END_TYPE()
7403
7404 // Port E Resistor Enable
7405 // Reset value: 0x00000000
7406 BEGIN_TYPE(PEREN_t, uint16_t)
7407 // Port 9 Resistor Enable
7408 ADD_BITFIELD_RW(P9REN, 0, 8)
7409 // Port 10 Resistor Enable
7410 ADD_BITFIELD_RW(P10REN, 8, 8)
7411 END_TYPE()
7412
7413 // Port E Drive Strength
7414 BEGIN_TYPE(PEDS_t, uint16_t)
7415 // Port 9 Drive Strength
7416 ADD_BITFIELD_RW(P9DS, 0, 8)
7417 // Port 10 Drive Strength
7418 ADD_BITFIELD_RW(P10DS, 8, 8)
7419 END_TYPE()
7420
7421 // Port E Select 0
7422 // Reset value: 0x00000000
7423 BEGIN_TYPE(PESEL0_t, uint16_t)
7424 // Port 9 Select 0
7425 ADD_BITFIELD_RW(P9SEL0, 0, 8)
7426 // Port 10 Select 0
7427 ADD_BITFIELD_RW(P10SEL0, 8, 8)
7428 END_TYPE()
7429
7430 // Port E Select 1
7431 // Reset value: 0x00000000
7432 BEGIN_TYPE(PESEL1_t, uint16_t)
7433 // Port 9 Select 1
7434 ADD_BITFIELD_RW(P9SEL1, 0, 8)
7435 // Port 10 Select 1
7436 ADD_BITFIELD_RW(P10SEL1, 8, 8)
7437 END_TYPE()
7438
7439 // Port 9 Interrupt Vector Register
7440 // Reset value: 0x00000000
7441 BEGIN_TYPE(P9IV_t, uint16_t)
7442 // Port 9 interrupt vector value
7443 ADD_BITFIELD_RO(P9IV, 0, 5)
7444 END_TYPE()
7445
7446 // No interrupt pending
7447 static const uint32_t P9IV_P9IV__P9IV_0 = 0;
7448 // Interrupt Source: Port 9.0 interrupt; Interrupt Flag: P9IFG0; Interrupt Priority: Highest
7449 static const uint32_t P9IV_P9IV__P9IV_2 = 2;
7450 // Interrupt Source: Port 9.1 interrupt; Interrupt Flag: P9IFG1
7451 static const uint32_t P9IV_P9IV__P9IV_4 = 4;
7452 // Interrupt Source: Port 9.2 interrupt; Interrupt Flag: P9IFG2
7453 static const uint32_t P9IV_P9IV__P9IV_6 = 6;
7454 // Interrupt Source: Port 9.3 interrupt; Interrupt Flag: P9IFG3
7455 static const uint32_t P9IV_P9IV__P9IV_8 = 8;
7456 // Interrupt Source: Port 9.4 interrupt; Interrupt Flag: P9IFG4
7457 static const uint32_t P9IV_P9IV__P9IV_10 = 10;
7458 // Interrupt Source: Port 9.5 interrupt; Interrupt Flag: P9IFG5
7459 static const uint32_t P9IV_P9IV__P9IV_12 = 12;
7460 // Interrupt Source: Port 9.6 interrupt; Interrupt Flag: P9IFG6
7461 static const uint32_t P9IV_P9IV__P9IV_14 = 14;
7462 // Interrupt Source: Port 9.7 interrupt; Interrupt Flag: P9IFG7; Interrupt Priority: Lowest
7463 static const uint32_t P9IV_P9IV__P9IV_16 = 16;
7464
7465 // Port E Complement Select
7466 // Reset value: 0x00000000
7467 BEGIN_TYPE(PESELC_t, uint16_t)
7468 // Port 9 Complement Select
7469 ADD_BITFIELD_RW(P9SELC, 0, 8)
7470 // Port 10 Complement Select
7471 ADD_BITFIELD_RW(P10SELC, 8, 8)
7472 END_TYPE()
7473
7474 // Port E Interrupt Edge Select
7475 // Reset value: 0x00000000
7476 BEGIN_TYPE(PEIES_t, uint16_t)
7477 // Port 9 Interrupt Edge Select
7478 ADD_BITFIELD_RW(P9IES, 0, 8)
7479 // Port 10 Interrupt Edge Select
7480 ADD_BITFIELD_RW(P10IES, 8, 8)
7481 END_TYPE()
7482
7483 // Port E Interrupt Enable
7484 // Reset value: 0x00000000
7485 BEGIN_TYPE(PEIE_t, uint16_t)
7486 // Port 9 Interrupt Enable
7487 ADD_BITFIELD_RW(P9IE, 0, 8)
7488 // Port 10 Interrupt Enable
7489 ADD_BITFIELD_RW(P10IE, 8, 8)
7490 END_TYPE()
7491
7492 // Port E Interrupt Flag
7493 // Reset value: 0x00000000
7494 BEGIN_TYPE(PEIFG_t, uint16_t)
7495 // Port 9 Interrupt Flag
7496 ADD_BITFIELD_RW(P9IFG, 0, 8)
7497 // Port 10 Interrupt Flag
7498 ADD_BITFIELD_RW(P10IFG, 8, 8)
7499 END_TYPE()
7500
7501 // Port 10 Interrupt Vector Register
7502 BEGIN_TYPE(P10IV_t, uint16_t)
7503 // Port 10 interrupt vector value
7504 ADD_BITFIELD_RO(P10IV, 0, 5)
7505 END_TYPE()
7506
7507 // No interrupt pending
7508 static const uint32_t P10IV_P10IV__P10IV_0 = 0;
7509 // Interrupt Source: Port 10.0 interrupt; Interrupt Flag: P10IFG0; Interrupt Priority: Highest
7510 static const uint32_t P10IV_P10IV__P10IV_2 = 2;
7511 // Interrupt Source: Port 10.1 interrupt; Interrupt Flag: P10IFG1
7512 static const uint32_t P10IV_P10IV__P10IV_4 = 4;
7513 // Interrupt Source: Port 10.2 interrupt; Interrupt Flag: P10IFG2
7514 static const uint32_t P10IV_P10IV__P10IV_6 = 6;
7515 // Interrupt Source: Port 10.3 interrupt; Interrupt Flag: P10IFG3
7516 static const uint32_t P10IV_P10IV__P10IV_8 = 8;
7517 // Interrupt Source: Port 10.4 interrupt; Interrupt Flag: P10IFG4
7518 static const uint32_t P10IV_P10IV__P10IV_10 = 10;
7519 // Interrupt Source: Port 10.5 interrupt; Interrupt Flag: P10IFG5
7520 static const uint32_t P10IV_P10IV__P10IV_12 = 12;
7521 // Interrupt Source: Port 10.6 interrupt; Interrupt Flag: P10IFG6
7522 static const uint32_t P10IV_P10IV__P10IV_14 = 14;
7523 // Interrupt Source: Port 10.7 interrupt; Interrupt Flag: P10IFG7; Interrupt Priority: Lowest
7524 static const uint32_t P10IV_P10IV__P10IV_16 = 16;
7525
7526 // Port J Input
7527 // Reset value: 0x00000000
7528 BEGIN_TYPE(PJIN_t, uint16_t)
7529 // Port J Input
7530 ADD_BITFIELD_RO(PJIN, 0, 16)
7531 END_TYPE()
7532
7533 // Port J Output
7534 // Reset value: 0x00000000
7535 BEGIN_TYPE(PJOUT_t, uint16_t)
7536 // Port J Output
7537 ADD_BITFIELD_RW(PJOUT, 0, 16)
7538 END_TYPE()
7539
7540 // Port J Direction
7541 // Reset value: 0x00000000
7542 BEGIN_TYPE(PJDIR_t, uint16_t)
7543 // Port J Direction
7544 ADD_BITFIELD_RW(PJDIR, 0, 16)
7545 END_TYPE()
7546
7547 // Port J Resistor Enable
7548 // Reset value: 0x00000000
7549 BEGIN_TYPE(PJREN_t, uint16_t)
7550 // Port J Resistor Enable
7551 ADD_BITFIELD_RW(PJREN, 0, 16)
7552 END_TYPE()
7553
7554 // Port J Drive Strength
7555 BEGIN_TYPE(PJDS_t, uint16_t)
7556 // Port J Drive Strength
7557 ADD_BITFIELD_RW(PJDS, 0, 16)
7558 END_TYPE()
7559
7560 // Port J Select 0
7561 // Reset value: 0x00000000
7562 BEGIN_TYPE(PJSEL0_t, uint16_t)
7563 // Port J Select 0
7564 ADD_BITFIELD_RW(PJSEL0, 0, 16)
7565 END_TYPE()
7566
7567 // Port J Select 1
7568 // Reset value: 0x00000000
7569 BEGIN_TYPE(PJSEL1_t, uint16_t)
7570 // Port J Select 1
7571 ADD_BITFIELD_RW(PJSEL1, 0, 16)
7572 END_TYPE()
7573
7574 // Port J Complement Select
7575 // Reset value: 0x00000000
7576 BEGIN_TYPE(PJSELC_t, uint16_t)
7577 // Port J Complement Select
7578 ADD_BITFIELD_RW(PJSELC, 0, 16)
7579 END_TYPE()
7580
7581 struct DIO_t {
7582 PAIN_t PAIN;
7583 PAOUT_t PAOUT;
7584 PADIR_t PADIR;
7585 PAREN_t PAREN;
7586 PADS_t PADS;
7587 PASEL0_t PASEL0;
7588 PASEL1_t PASEL1;
7589 P1IV_t P1IV;
7590 uint16_t reserved0[3];
7591 PASELC_t PASELC;
7592 PAIES_t PAIES;
7593 PAIE_t PAIE;
7594 PAIFG_t PAIFG;
7595 P2IV_t P2IV;
7596 PBIN_t PBIN;
7597 PBOUT_t PBOUT;
7598 PBDIR_t PBDIR;
7599 PBREN_t PBREN;
7600 PBDS_t PBDS;
7601 PBSEL0_t PBSEL0;
7602 PBSEL1_t PBSEL1;
7603 P3IV_t P3IV;
7604 uint16_t reserved1[3];
7605 PBSELC_t PBSELC;
7606 PBIES_t PBIES;
7607 PBIE_t PBIE;
7608 PBIFG_t PBIFG;
7609 P4IV_t P4IV;
7610 PCIN_t PCIN;
7611 PCOUT_t PCOUT;
7612 PCDIR_t PCDIR;
7613 PCREN_t PCREN;
7614 PCDS_t PCDS;
7615 PCSEL0_t PCSEL0;
7616 PCSEL1_t PCSEL1;
7617 P5IV_t P5IV;
7618 uint16_t reserved2[3];
7619 PCSELC_t PCSELC;
7620 PCIES_t PCIES;
7621 PCIE_t PCIE;
7622 PCIFG_t PCIFG;
7623 P6IV_t P6IV;
7624 PDIN_t PDIN;
7625 PDOUT_t PDOUT;
7626 PDDIR_t PDDIR;
7627 PDREN_t PDREN;
7628 PDDS_t PDDS;
7629 PDSEL0_t PDSEL0;
7630 PDSEL1_t PDSEL1;
7631 P7IV_t P7IV;
7632 uint16_t reserved3[3];
7633 PDSELC_t PDSELC;
7634 PDIES_t PDIES;
7635 PDIE_t PDIE;
7636 PDIFG_t PDIFG;
7637 P8IV_t P8IV;
7638 PEIN_t PEIN;
7639 PEOUT_t PEOUT;
7640 PEDIR_t PEDIR;
7641 PEREN_t PEREN;
7642 PEDS_t PEDS;
7643 PESEL0_t PESEL0;
7644 PESEL1_t PESEL1;
7645 P9IV_t P9IV;
7646 uint16_t reserved4[3];
7647 PESELC_t PESELC;
7648 PEIES_t PEIES;
7649 PEIE_t PEIE;
7650 PEIFG_t PEIFG;
7651 P10IV_t P10IV;
7652 uint16_t reserved5[64];
7653 PJIN_t PJIN;
7654 PJOUT_t PJOUT;
7655 PJDIR_t PJDIR;
7656 PJREN_t PJREN;
7657 PJDS_t PJDS;
7658 PJSEL0_t PJSEL0;
7659 PJSEL1_t PJSEL1;
7660 uint16_t reserved6[4];
7661 PJSELC_t PJSELC;
7662 };
7663
7664 static DIO_t & DIO = (*(DIO_t *)0x40004c00);
7665
7666} // _DIO_
7667
7668// PMAP
7669namespace _PMAP_ {
7670
7671 // Port Mapping Key Register
7672 // Reset value: 0x000096a5
7673 BEGIN_TYPE(PMAPKEYID_t, uint16_t)
7674 // Port mapping controller write access key
7675 ADD_BITFIELD_RW(PMAPKEY, 0, 16)
7676 END_TYPE()
7677
7678 // Port Mapping Control Register
7679 // Reset value: 0x00000001
7680 BEGIN_TYPE(PMAPCTL_t, uint16_t)
7681 // Port mapping lock bit
7682 ADD_BITFIELD_RO(PMAPLOCKED, 0, 1)
7683 // Port mapping reconfiguration control bit
7684 ADD_BITFIELD_RW(PMAPRECFG, 1, 1)
7685 END_TYPE()
7686
7687 // Access to mapping registers is granted
7688 static const uint32_t PMAPCTL_PMAPLOCKED__PMAPLOCKED_0 = 0;
7689 // Access to mapping registers is locked
7690 static const uint32_t PMAPCTL_PMAPLOCKED__PMAPLOCKED_1 = 1;
7691 // Configuration allowed only once
7692 static const uint32_t PMAPCTL_PMAPRECFG__PMAPRECFG_0 = 0;
7693 // Allow reconfiguration of port mapping
7694 static const uint32_t PMAPCTL_PMAPRECFG__PMAPRECFG_1 = 1;
7695
7696 // Port mapping register, P1.0 and P1.1
7697 BEGIN_TYPE(P1MAP01_t, uint16_t)
7698 // Selects secondary port function
7699 ADD_BITFIELD_RW(PMAPx, 0, 16)
7700 END_TYPE()
7701
7702 // Port mapping register, P1.2 and P1.3
7703 BEGIN_TYPE(P1MAP23_t, uint16_t)
7704 // Selects secondary port function
7705 ADD_BITFIELD_RW(PMAPx, 0, 16)
7706 END_TYPE()
7707
7708 // Port mapping register, P1.4 and P1.5
7709 BEGIN_TYPE(P1MAP45_t, uint16_t)
7710 // Selects secondary port function
7711 ADD_BITFIELD_RW(PMAPx, 0, 16)
7712 END_TYPE()
7713
7714 // Port mapping register, P1.6 and P1.7
7715 BEGIN_TYPE(P1MAP67_t, uint16_t)
7716 // Selects secondary port function
7717 ADD_BITFIELD_RW(PMAPx, 0, 16)
7718 END_TYPE()
7719
7720 // Port mapping register, P2.0 and P2.1
7721 BEGIN_TYPE(P2MAP01_t, uint16_t)
7722 // Selects secondary port function
7723 ADD_BITFIELD_RW(PMAPx, 0, 16)
7724 END_TYPE()
7725
7726 // Port mapping register, P2.2 and P2.3
7727 BEGIN_TYPE(P2MAP23_t, uint16_t)
7728 // Selects secondary port function
7729 ADD_BITFIELD_RW(PMAPx, 0, 16)
7730 END_TYPE()
7731
7732 // Port mapping register, P2.4 and P2.5
7733 BEGIN_TYPE(P2MAP45_t, uint16_t)
7734 // Selects secondary port function
7735 ADD_BITFIELD_RW(PMAPx, 0, 16)
7736 END_TYPE()
7737
7738 // Port mapping register, P2.6 and P2.7
7739 BEGIN_TYPE(P2MAP67_t, uint16_t)
7740 // Selects secondary port function
7741 ADD_BITFIELD_RW(PMAPx, 0, 16)
7742 END_TYPE()
7743
7744 // Port mapping register, P3.0 and P3.1
7745 BEGIN_TYPE(P3MAP01_t, uint16_t)
7746 // Selects secondary port function
7747 ADD_BITFIELD_RW(PMAPx, 0, 16)
7748 END_TYPE()
7749
7750 // Port mapping register, P3.2 and P3.3
7751 BEGIN_TYPE(P3MAP23_t, uint16_t)
7752 // Selects secondary port function
7753 ADD_BITFIELD_RW(PMAPx, 0, 16)
7754 END_TYPE()
7755
7756 // Port mapping register, P3.4 and P3.5
7757 BEGIN_TYPE(P3MAP45_t, uint16_t)
7758 // Selects secondary port function
7759 ADD_BITFIELD_RW(PMAPx, 0, 16)
7760 END_TYPE()
7761
7762 // Port mapping register, P3.6 and P3.7
7763 BEGIN_TYPE(P3MAP67_t, uint16_t)
7764 // Selects secondary port function
7765 ADD_BITFIELD_RW(PMAPx, 0, 16)
7766 END_TYPE()
7767
7768 // Port mapping register, P4.0 and P4.1
7769 BEGIN_TYPE(P4MAP01_t, uint16_t)
7770 // Selects secondary port function
7771 ADD_BITFIELD_RW(PMAPx, 0, 16)
7772 END_TYPE()
7773
7774 // Port mapping register, P4.2 and P4.3
7775 BEGIN_TYPE(P4MAP23_t, uint16_t)
7776 // Selects secondary port function
7777 ADD_BITFIELD_RW(PMAPx, 0, 16)
7778 END_TYPE()
7779
7780 // Port mapping register, P4.4 and P4.5
7781 BEGIN_TYPE(P4MAP45_t, uint16_t)
7782 // Selects secondary port function
7783 ADD_BITFIELD_RW(PMAPx, 0, 16)
7784 END_TYPE()
7785
7786 // Port mapping register, P4.6 and P4.7
7787 BEGIN_TYPE(P4MAP67_t, uint16_t)
7788 // Selects secondary port function
7789 ADD_BITFIELD_RW(PMAPx, 0, 16)
7790 END_TYPE()
7791
7792 // Port mapping register, P5.0 and P5.1
7793 BEGIN_TYPE(P5MAP01_t, uint16_t)
7794 // Selects secondary port function
7795 ADD_BITFIELD_RW(PMAPx, 0, 16)
7796 END_TYPE()
7797
7798 // Port mapping register, P5.2 and P5.3
7799 BEGIN_TYPE(P5MAP23_t, uint16_t)
7800 // Selects secondary port function
7801 ADD_BITFIELD_RW(PMAPx, 0, 16)
7802 END_TYPE()
7803
7804 // Port mapping register, P5.4 and P5.5
7805 BEGIN_TYPE(P5MAP45_t, uint16_t)
7806 // Selects secondary port function
7807 ADD_BITFIELD_RW(PMAPx, 0, 16)
7808 END_TYPE()
7809
7810 // Port mapping register, P5.6 and P5.7
7811 BEGIN_TYPE(P5MAP67_t, uint16_t)
7812 // Selects secondary port function
7813 ADD_BITFIELD_RW(PMAPx, 0, 16)
7814 END_TYPE()
7815
7816 // Port mapping register, P6.0 and P6.1
7817 BEGIN_TYPE(P6MAP01_t, uint16_t)
7818 // Selects secondary port function
7819 ADD_BITFIELD_RW(PMAPx, 0, 16)
7820 END_TYPE()
7821
7822 // Port mapping register, P6.2 and P6.3
7823 BEGIN_TYPE(P6MAP23_t, uint16_t)
7824 // Selects secondary port function
7825 ADD_BITFIELD_RW(PMAPx, 0, 16)
7826 END_TYPE()
7827
7828 // Port mapping register, P6.4 and P6.5
7829 BEGIN_TYPE(P6MAP45_t, uint16_t)
7830 // Selects secondary port function
7831 ADD_BITFIELD_RW(PMAPx, 0, 16)
7832 END_TYPE()
7833
7834 // Port mapping register, P6.6 and P6.7
7835 BEGIN_TYPE(P6MAP67_t, uint16_t)
7836 // Selects secondary port function
7837 ADD_BITFIELD_RW(PMAPx, 0, 16)
7838 END_TYPE()
7839
7840 // Port mapping register, P7.0 and P7.1
7841 BEGIN_TYPE(P7MAP01_t, uint16_t)
7842 // Selects secondary port function
7843 ADD_BITFIELD_RW(PMAPx, 0, 16)
7844 END_TYPE()
7845
7846 // Port mapping register, P7.2 and P7.3
7847 BEGIN_TYPE(P7MAP23_t, uint16_t)
7848 // Selects secondary port function
7849 ADD_BITFIELD_RW(PMAPx, 0, 16)
7850 END_TYPE()
7851
7852 // Port mapping register, P7.4 and P7.5
7853 BEGIN_TYPE(P7MAP45_t, uint16_t)
7854 // Selects secondary port function
7855 ADD_BITFIELD_RW(PMAPx, 0, 16)
7856 END_TYPE()
7857
7858 // Port mapping register, P7.6 and P7.7
7859 BEGIN_TYPE(P7MAP67_t, uint16_t)
7860 // Selects secondary port function
7861 ADD_BITFIELD_RW(PMAPx, 0, 16)
7862 END_TYPE()
7863
7864 struct PMAP_t {
7865 PMAPKEYID_t PMAPKEYID;
7866 PMAPCTL_t PMAPCTL;
7867 uint16_t reserved0[2];
7868 P1MAP01_t P1MAP01;
7869 P1MAP23_t P1MAP23;
7870 P1MAP45_t P1MAP45;
7871 P1MAP67_t P1MAP67;
7872 P2MAP01_t P2MAP01;
7873 P2MAP23_t P2MAP23;
7874 P2MAP45_t P2MAP45;
7875 P2MAP67_t P2MAP67;
7876 P3MAP01_t P3MAP01;
7877 P3MAP23_t P3MAP23;
7878 P3MAP45_t P3MAP45;
7879 P3MAP67_t P3MAP67;
7880 P4MAP01_t P4MAP01;
7881 P4MAP23_t P4MAP23;
7882 P4MAP45_t P4MAP45;
7883 P4MAP67_t P4MAP67;
7884 P5MAP01_t P5MAP01;
7885 P5MAP23_t P5MAP23;
7886 P5MAP45_t P5MAP45;
7887 P5MAP67_t P5MAP67;
7888 P6MAP01_t P6MAP01;
7889 P6MAP23_t P6MAP23;
7890 P6MAP45_t P6MAP45;
7891 P6MAP67_t P6MAP67;
7892 P7MAP01_t P7MAP01;
7893 P7MAP23_t P7MAP23;
7894 P7MAP45_t P7MAP45;
7895 P7MAP67_t P7MAP67;
7896 };
7897
7898 static PMAP_t & PMAP = (*(PMAP_t *)0x40005000);
7899
7900} // _PMAP_
7901
7902// CAPTIO0
7903namespace _CAPTIO0_ {
7904
7905 // Capacitive Touch IO x Control Register
7906 // Reset value: 0x00000000
7907 BEGIN_TYPE(CAPTIOxCTL_t, uint16_t)
7908 // Capacitive Touch IO pin select
7909 ADD_BITFIELD_RW(CAPTIOPISELx, 1, 3)
7910 // Capacitive Touch IO port select
7911 ADD_BITFIELD_RW(CAPTIOPOSELx, 4, 4)
7912 // Capacitive Touch IO enable
7913 ADD_BITFIELD_RW(CAPTIOEN, 8, 1)
7914 // Capacitive Touch IO state
7915 ADD_BITFIELD_RO(CAPTIOSTATE, 9, 1)
7916 END_TYPE()
7917
7918 // Px.0
7919 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_0 = 0;
7920 // Px.1
7921 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_1 = 1;
7922 // Px.2
7923 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_2 = 2;
7924 // Px.3
7925 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_3 = 3;
7926 // Px.4
7927 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_4 = 4;
7928 // Px.5
7929 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_5 = 5;
7930 // Px.6
7931 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_6 = 6;
7932 // Px.7
7933 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_7 = 7;
7934 // Px = PJ
7935 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_0 = 0;
7936 // Px = P1
7937 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_1 = 1;
7938 // Px = P2
7939 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_2 = 2;
7940 // Px = P3
7941 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_3 = 3;
7942 // Px = P4
7943 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_4 = 4;
7944 // Px = P5
7945 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_5 = 5;
7946 // Px = P6
7947 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_6 = 6;
7948 // Px = P7
7949 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_7 = 7;
7950 // Px = P8
7951 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_8 = 8;
7952 // Px = P9
7953 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_9 = 9;
7954 // Px = P10
7955 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_10 = 10;
7956 // Px = P11
7957 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_11 = 11;
7958 // Px = P12
7959 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_12 = 12;
7960 // Px = P13
7961 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_13 = 13;
7962 // Px = P14
7963 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_14 = 14;
7964 // Px = P15
7965 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_15 = 15;
7966 // All Capacitive Touch IOs are disabled. Signal towards timers is 0.
7967 static const uint32_t CAPTIOxCTL_CAPTIOEN__CAPTIOEN_0 = 0;
7968 // Selected Capacitive Touch IO is enabled
7969 static const uint32_t CAPTIOxCTL_CAPTIOEN__CAPTIOEN_1 = 1;
7970 // Curent state 0 or Capacitive Touch IO is disabled
7971 static const uint32_t CAPTIOxCTL_CAPTIOSTATE__CAPTIOSTATE_0 = 0;
7972 // Current state 1
7973 static const uint32_t CAPTIOxCTL_CAPTIOSTATE__CAPTIOSTATE_1 = 1;
7974
7975 struct CAPTIO0_t {
7976 uint16_t reserved0[7];
7977 CAPTIOxCTL_t CAPTIOxCTL;
7978 };
7979
7980 static CAPTIO0_t & CAPTIO0 = (*(CAPTIO0_t *)0x40005400);
7981
7982} // _CAPTIO0_
7983
7984// CAPTIO1
7985namespace _CAPTIO1_ {
7986
7987 // Capacitive Touch IO x Control Register
7988 // Reset value: 0x00000000
7989 BEGIN_TYPE(CAPTIOxCTL_t, uint16_t)
7990 // Capacitive Touch IO pin select
7991 ADD_BITFIELD_RW(CAPTIOPISELx, 1, 3)
7992 // Capacitive Touch IO port select
7993 ADD_BITFIELD_RW(CAPTIOPOSELx, 4, 4)
7994 // Capacitive Touch IO enable
7995 ADD_BITFIELD_RW(CAPTIOEN, 8, 1)
7996 // Capacitive Touch IO state
7997 ADD_BITFIELD_RO(CAPTIOSTATE, 9, 1)
7998 END_TYPE()
7999
8000 // Px.0
8001 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_0 = 0;
8002 // Px.1
8003 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_1 = 1;
8004 // Px.2
8005 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_2 = 2;
8006 // Px.3
8007 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_3 = 3;
8008 // Px.4
8009 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_4 = 4;
8010 // Px.5
8011 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_5 = 5;
8012 // Px.6
8013 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_6 = 6;
8014 // Px.7
8015 static const uint32_t CAPTIOxCTL_CAPTIOPISELx__CAPTIOPISELx_7 = 7;
8016 // Px = PJ
8017 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_0 = 0;
8018 // Px = P1
8019 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_1 = 1;
8020 // Px = P2
8021 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_2 = 2;
8022 // Px = P3
8023 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_3 = 3;
8024 // Px = P4
8025 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_4 = 4;
8026 // Px = P5
8027 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_5 = 5;
8028 // Px = P6
8029 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_6 = 6;
8030 // Px = P7
8031 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_7 = 7;
8032 // Px = P8
8033 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_8 = 8;
8034 // Px = P9
8035 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_9 = 9;
8036 // Px = P10
8037 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_10 = 10;
8038 // Px = P11
8039 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_11 = 11;
8040 // Px = P12
8041 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_12 = 12;
8042 // Px = P13
8043 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_13 = 13;
8044 // Px = P14
8045 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_14 = 14;
8046 // Px = P15
8047 static const uint32_t CAPTIOxCTL_CAPTIOPOSELx__CAPTIOPOSELx_15 = 15;
8048 // All Capacitive Touch IOs are disabled. Signal towards timers is 0.
8049 static const uint32_t CAPTIOxCTL_CAPTIOEN__CAPTIOEN_0 = 0;
8050 // Selected Capacitive Touch IO is enabled
8051 static const uint32_t CAPTIOxCTL_CAPTIOEN__CAPTIOEN_1 = 1;
8052 // Curent state 0 or Capacitive Touch IO is disabled
8053 static const uint32_t CAPTIOxCTL_CAPTIOSTATE__CAPTIOSTATE_0 = 0;
8054 // Current state 1
8055 static const uint32_t CAPTIOxCTL_CAPTIOSTATE__CAPTIOSTATE_1 = 1;
8056
8057 struct CAPTIO1_t {
8058 uint16_t reserved0[7];
8059 CAPTIOxCTL_t CAPTIOxCTL;
8060 };
8061
8062 static CAPTIO1_t & CAPTIO1 = (*(CAPTIO1_t *)0x40005800);
8063
8064} // _CAPTIO1_
8065
8066// TIMER32
8067namespace _TIMER32_ {
8068
8069 // Timer 1 Load Register
8070 // Reset value: 0x00000000
8071 BEGIN_TYPE(T32LOAD1_t, uint32_t)
8072 // The value from which the Timer 1 counter decrements
8073 ADD_BITFIELD_RW(LOAD, 0, 32)
8074 END_TYPE()
8075
8076 // Timer 1 Current Value Register
8077 // Reset value: 0xffffffff
8078 BEGIN_TYPE(T32VALUE1_t, uint32_t)
8079 // Current value
8080 ADD_BITFIELD_RO(VALUE, 0, 32)
8081 END_TYPE()
8082
8083 // Timer 1 Timer Control Register
8084 // Reset value: 0x00000020
8085 BEGIN_TYPE(T32CONTROL1_t, uint32_t)
8086 // Selects one-shot or wrapping counter mode
8087 ADD_BITFIELD_RW(ONESHOT, 0, 1)
8088 // Selects 16 or 32 bit counter operation
8089 ADD_BITFIELD_RW(SIZE, 1, 1)
8090 // Prescale bits
8091 ADD_BITFIELD_RW(PRESCALE, 2, 2)
8092 // Interrupt enable bit
8093 ADD_BITFIELD_RW(IE, 5, 1)
8094 // Mode bit
8095 ADD_BITFIELD_RW(MODE, 6, 1)
8096 // Enable bit
8097 ADD_BITFIELD_RW(ENABLE, 7, 1)
8098 END_TYPE()
8099
8100 // wrapping mode
8101 static const uint32_t T32CONTROL1_ONESHOT__ONESHOT_0 = 0;
8102 // one-shot mode
8103 static const uint32_t T32CONTROL1_ONESHOT__ONESHOT_1 = 1;
8104 // 16-bit counter
8105 static const uint32_t T32CONTROL1_SIZE__SIZE_0 = 0;
8106 // 32-bit counter
8107 static const uint32_t T32CONTROL1_SIZE__SIZE_1 = 1;
8108 // 0 stages of prescale, clock is divided by 1
8109 static const uint32_t T32CONTROL1_PRESCALE__PRESCALE_0 = 0;
8110 // 4 stages of prescale, clock is divided by 16
8111 static const uint32_t T32CONTROL1_PRESCALE__PRESCALE_1 = 1;
8112 // 8 stages of prescale, clock is divided by 256
8113 static const uint32_t T32CONTROL1_PRESCALE__PRESCALE_2 = 2;
8114 // Timer interrupt disabled
8115 static const uint32_t T32CONTROL1_IE__IE_0 = 0;
8116 // Timer interrupt enabled
8117 static const uint32_t T32CONTROL1_IE__IE_1 = 1;
8118 // Timer is in free-running mode
8119 static const uint32_t T32CONTROL1_MODE__MODE_0 = 0;
8120 // Timer is in periodic mode
8121 static const uint32_t T32CONTROL1_MODE__MODE_1 = 1;
8122 // Timer disabled
8123 static const uint32_t T32CONTROL1_ENABLE__ENABLE_0 = 0;
8124 // Timer enabled
8125 static const uint32_t T32CONTROL1_ENABLE__ENABLE_1 = 1;
8126
8127 // Timer 1 Interrupt Clear Register
8128 // Reset value: 0x00000000
8129 BEGIN_TYPE(T32INTCLR1_t, uint32_t)
8130 // Write clears interrupt output
8131 ADD_BITFIELD_WO(INTCLR, 0, 32)
8132 END_TYPE()
8133
8134 // Timer 1 Raw Interrupt Status Register
8135 // Reset value: 0x00000000
8136 BEGIN_TYPE(T32RIS1_t, uint32_t)
8137 // Raw interrupt status
8138 ADD_BITFIELD_RO(RAW_IFG, 0, 1)
8139 END_TYPE()
8140
8141 // Timer 1 Interrupt Status Register
8142 // Reset value: 0x00000000
8143 BEGIN_TYPE(T32MIS1_t, uint32_t)
8144 // Enabled interrupt status
8145 ADD_BITFIELD_RO(IFG, 0, 1)
8146 END_TYPE()
8147
8148 // Timer 1 Background Load Register
8149 // Reset value: 0x00000000
8150 BEGIN_TYPE(T32BGLOAD1_t, uint32_t)
8151 // Value from which the counter decrements
8152 ADD_BITFIELD_RW(BGLOAD, 0, 32)
8153 END_TYPE()
8154
8155 // Timer 2 Load Register
8156 // Reset value: 0x00000000
8157 BEGIN_TYPE(T32LOAD2_t, uint32_t)
8158 // The value from which the Timer 2 counter decrements
8159 ADD_BITFIELD_RW(LOAD, 0, 32)
8160 END_TYPE()
8161
8162 // Timer 2 Current Value Register
8163 // Reset value: 0xffffffff
8164 BEGIN_TYPE(T32VALUE2_t, uint32_t)
8165 // Current value of the decrementing counter
8166 ADD_BITFIELD_RO(VALUE, 0, 32)
8167 END_TYPE()
8168
8169 // Timer 2 Timer Control Register
8170 // Reset value: 0x00000020
8171 BEGIN_TYPE(T32CONTROL2_t, uint32_t)
8172 // Selects one-shot or wrapping counter mode
8173 ADD_BITFIELD_RW(ONESHOT, 0, 1)
8174 // Selects 16 or 32 bit counter operation
8175 ADD_BITFIELD_RW(SIZE, 1, 1)
8176 // Prescale bits
8177 ADD_BITFIELD_RW(PRESCALE, 2, 2)
8178 // Interrupt enable bit
8179 ADD_BITFIELD_RW(IE, 5, 1)
8180 // Mode bit
8181 ADD_BITFIELD_RW(MODE, 6, 1)
8182 // Enable bit
8183 ADD_BITFIELD_RW(ENABLE, 7, 1)
8184 END_TYPE()
8185
8186 // wrapping mode
8187 static const uint32_t T32CONTROL2_ONESHOT__ONESHOT_0 = 0;
8188 // one-shot mode
8189 static const uint32_t T32CONTROL2_ONESHOT__ONESHOT_1 = 1;
8190 // 16-bit counter
8191 static const uint32_t T32CONTROL2_SIZE__SIZE_0 = 0;
8192 // 32-bit counter
8193 static const uint32_t T32CONTROL2_SIZE__SIZE_1 = 1;
8194 // 0 stages of prescale, clock is divided by 1
8195 static const uint32_t T32CONTROL2_PRESCALE__PRESCALE_0 = 0;
8196 // 4 stages of prescale, clock is divided by 16
8197 static const uint32_t T32CONTROL2_PRESCALE__PRESCALE_1 = 1;
8198 // 8 stages of prescale, clock is divided by 256
8199 static const uint32_t T32CONTROL2_PRESCALE__PRESCALE_2 = 2;
8200 // Timer interrupt disabled
8201 static const uint32_t T32CONTROL2_IE__IE_0 = 0;
8202 // Timer interrupt enabled
8203 static const uint32_t T32CONTROL2_IE__IE_1 = 1;
8204 // Timer is in free-running mode
8205 static const uint32_t T32CONTROL2_MODE__MODE_0 = 0;
8206 // Timer is in periodic mode
8207 static const uint32_t T32CONTROL2_MODE__MODE_1 = 1;
8208 // Timer disabled
8209 static const uint32_t T32CONTROL2_ENABLE__ENABLE_0 = 0;
8210 // Timer enabled
8211 static const uint32_t T32CONTROL2_ENABLE__ENABLE_1 = 1;
8212
8213 // Timer 2 Interrupt Clear Register
8214 // Reset value: 0x00000000
8215 BEGIN_TYPE(T32INTCLR2_t, uint32_t)
8216 // Write clears the interrupt output
8217 ADD_BITFIELD_WO(INTCLR, 0, 32)
8218 END_TYPE()
8219
8220 // Timer 2 Raw Interrupt Status Register
8221 // Reset value: 0x00000000
8222 BEGIN_TYPE(T32RIS2_t, uint32_t)
8223 // Raw interrupt status
8224 ADD_BITFIELD_RO(RAW_IFG, 0, 1)
8225 END_TYPE()
8226
8227 // Timer 2 Interrupt Status Register
8228 // Reset value: 0x00000000
8229 BEGIN_TYPE(T32MIS2_t, uint32_t)
8230 // Enabled interrupt status
8231 ADD_BITFIELD_RO(IFG, 0, 1)
8232 END_TYPE()
8233
8234 // Timer 2 Background Load Register
8235 // Reset value: 0x00000000
8236 BEGIN_TYPE(T32BGLOAD2_t, uint32_t)
8237 // Value from which the counter decrements
8238 ADD_BITFIELD_RW(BGLOAD, 0, 32)
8239 END_TYPE()
8240
8241 struct TIMER32_t {
8242 T32LOAD1_t T32LOAD1;
8243 T32VALUE1_t T32VALUE1;
8244 T32CONTROL1_t T32CONTROL1;
8245 T32INTCLR1_t T32INTCLR1;
8246 T32RIS1_t T32RIS1;
8247 T32MIS1_t T32MIS1;
8248 T32BGLOAD1_t T32BGLOAD1;
8249 uint32_t reserved0;
8250 T32LOAD2_t T32LOAD2;
8251 T32VALUE2_t T32VALUE2;
8252 T32CONTROL2_t T32CONTROL2;
8253 T32INTCLR2_t T32INTCLR2;
8254 T32RIS2_t T32RIS2;
8255 T32MIS2_t T32MIS2;
8256 T32BGLOAD2_t T32BGLOAD2;
8257 };
8258
8259 static TIMER32_t & TIMER32 = (*(TIMER32_t *)0x4000c000);
8260
8261} // _TIMER32_
8262
8263// DMA
8264namespace _DMA_ {
8265
8266 // Device Configuration Status
8267 // Reset value: 0x00000000
8268 BEGIN_TYPE(DMA_DEVICE_CFG_t, uint32_t)
8269 // Number of DMA channels available
8270 ADD_BITFIELD_RO(NUM_DMA_CHANNELS, 0, 8)
8271 // Number of DMA sources per channel
8272 ADD_BITFIELD_RO(NUM_SRC_PER_CHANNEL, 8, 8)
8273 END_TYPE()
8274
8275 // Software Channel Trigger Register
8276 // Reset value: 0x00000000
8277 BEGIN_TYPE(DMA_SW_CHTRIG_t, uint32_t)
8278 // Write 1, triggers DMA_CHANNEL0
8279 ADD_BITFIELD_RW(CH0, 0, 1)
8280 // Write 1, triggers DMA_CHANNEL1
8281 ADD_BITFIELD_RW(CH1, 1, 1)
8282 // Write 1, triggers DMA_CHANNEL2
8283 ADD_BITFIELD_RW(CH2, 2, 1)
8284 // Write 1, triggers DMA_CHANNEL3
8285 ADD_BITFIELD_RW(CH3, 3, 1)
8286 // Write 1, triggers DMA_CHANNEL4
8287 ADD_BITFIELD_RW(CH4, 4, 1)
8288 // Write 1, triggers DMA_CHANNEL5
8289 ADD_BITFIELD_RW(CH5, 5, 1)
8290 // Write 1, triggers DMA_CHANNEL6
8291 ADD_BITFIELD_RW(CH6, 6, 1)
8292 // Write 1, triggers DMA_CHANNEL7
8293 ADD_BITFIELD_RW(CH7, 7, 1)
8294 // Write 1, triggers DMA_CHANNEL8
8295 ADD_BITFIELD_RW(CH8, 8, 1)
8296 // Write 1, triggers DMA_CHANNEL9
8297 ADD_BITFIELD_RW(CH9, 9, 1)
8298 // Write 1, triggers DMA_CHANNEL10
8299 ADD_BITFIELD_RW(CH10, 10, 1)
8300 // Write 1, triggers DMA_CHANNEL11
8301 ADD_BITFIELD_RW(CH11, 11, 1)
8302 // Write 1, triggers DMA_CHANNEL12
8303 ADD_BITFIELD_RW(CH12, 12, 1)
8304 // Write 1, triggers DMA_CHANNEL13
8305 ADD_BITFIELD_RW(CH13, 13, 1)
8306 // Write 1, triggers DMA_CHANNEL14
8307 ADD_BITFIELD_RW(CH14, 14, 1)
8308 // Write 1, triggers DMA_CHANNEL15
8309 ADD_BITFIELD_RW(CH15, 15, 1)
8310 // Write 1, triggers DMA_CHANNEL16
8311 ADD_BITFIELD_RW(CH16, 16, 1)
8312 // Write 1, triggers DMA_CHANNEL17
8313 ADD_BITFIELD_RW(CH17, 17, 1)
8314 // Write 1, triggers DMA_CHANNEL18
8315 ADD_BITFIELD_RW(CH18, 18, 1)
8316 // Write 1, triggers DMA_CHANNEL19
8317 ADD_BITFIELD_RW(CH19, 19, 1)
8318 // Write 1, triggers DMA_CHANNEL20
8319 ADD_BITFIELD_RW(CH20, 20, 1)
8320 // Write 1, triggers DMA_CHANNEL21
8321 ADD_BITFIELD_RW(CH21, 21, 1)
8322 // Write 1, triggers DMA_CHANNEL22
8323 ADD_BITFIELD_RW(CH22, 22, 1)
8324 // Write 1, triggers DMA_CHANNEL23
8325 ADD_BITFIELD_RW(CH23, 23, 1)
8326 // Write 1, triggers DMA_CHANNEL24
8327 ADD_BITFIELD_RW(CH24, 24, 1)
8328 // Write 1, triggers DMA_CHANNEL25
8329 ADD_BITFIELD_RW(CH25, 25, 1)
8330 // Write 1, triggers DMA_CHANNEL26
8331 ADD_BITFIELD_RW(CH26, 26, 1)
8332 // Write 1, triggers DMA_CHANNEL27
8333 ADD_BITFIELD_RW(CH27, 27, 1)
8334 // Write 1, triggers DMA_CHANNEL28
8335 ADD_BITFIELD_RW(CH28, 28, 1)
8336 // Write 1, triggers DMA_CHANNEL29
8337 ADD_BITFIELD_RW(CH29, 29, 1)
8338 // Write 1, triggers DMA_CHANNEL30
8339 ADD_BITFIELD_RW(CH30, 30, 1)
8340 // Write 1, triggers DMA_CHANNEL31
8341 ADD_BITFIELD_RW(CH31, 31, 1)
8342 END_TYPE()
8343
8344 // Channel n Source Configuration Register
8345 // Reset value: 0x00000000
8346 BEGIN_TYPE(DMA_CH_SRCCFG_t, uint32_t)
8347 // Device level DMA source mapping to channel input
8348 ADD_BITFIELD_RW(DMA_SRC, 0, 8)
8349 END_TYPE()
8350
8351 // Interrupt 1 Source Channel Configuration
8352 // Reset value: 0x00000000
8353 BEGIN_TYPE(DMA_INT1_SRCCFG_t, uint32_t)
8354 // Controls which channel's completion event is mapped as a source of this Interrupt
8355 ADD_BITFIELD_RW(INT_SRC, 0, 5)
8356 // Enables DMA_INT1 mapping
8357 ADD_BITFIELD_RW(EN, 5, 1)
8358 END_TYPE()
8359
8360 // Interrupt 2 Source Channel Configuration Register
8361 // Reset value: 0x00000000
8362 BEGIN_TYPE(DMA_INT2_SRCCFG_t, uint32_t)
8363 // Controls which channel's completion event is mapped as a source of this Interrupt
8364 ADD_BITFIELD_RW(INT_SRC, 0, 5)
8365 // Enables DMA_INT2 mapping
8366 ADD_BITFIELD_RW(EN, 5, 1)
8367 END_TYPE()
8368
8369 // Interrupt 3 Source Channel Configuration Register
8370 // Reset value: 0x00000000
8371 BEGIN_TYPE(DMA_INT3_SRCCFG_t, uint32_t)
8372 // Controls which channel's completion event is mapped as a source of this Interrupt
8373 ADD_BITFIELD_RW(INT_SRC, 0, 5)
8374 // Enables DMA_INT3 mapping
8375 ADD_BITFIELD_RW(EN, 5, 1)
8376 END_TYPE()
8377
8378 // Interrupt 0 Source Channel Flag Register
8379 // Reset value: 0x00000000
8380 BEGIN_TYPE(DMA_INT0_SRCFLG_t, uint32_t)
8381 // Channel 0 was the source of DMA_INT0
8382 ADD_BITFIELD_RO(CH0, 0, 1)
8383 // Channel 1 was the source of DMA_INT0
8384 ADD_BITFIELD_RO(CH1, 1, 1)
8385 // Channel 2 was the source of DMA_INT0
8386 ADD_BITFIELD_RO(CH2, 2, 1)
8387 // Channel 3 was the source of DMA_INT0
8388 ADD_BITFIELD_RO(CH3, 3, 1)
8389 // Channel 4 was the source of DMA_INT0
8390 ADD_BITFIELD_RO(CH4, 4, 1)
8391 // Channel 5 was the source of DMA_INT0
8392 ADD_BITFIELD_RO(CH5, 5, 1)
8393 // Channel 6 was the source of DMA_INT0
8394 ADD_BITFIELD_RO(CH6, 6, 1)
8395 // Channel 7 was the source of DMA_INT0
8396 ADD_BITFIELD_RO(CH7, 7, 1)
8397 // Channel 8 was the source of DMA_INT0
8398 ADD_BITFIELD_RO(CH8, 8, 1)
8399 // Channel 9 was the source of DMA_INT0
8400 ADD_BITFIELD_RO(CH9, 9, 1)
8401 // Channel 10 was the source of DMA_INT0
8402 ADD_BITFIELD_RO(CH10, 10, 1)
8403 // Channel 11 was the source of DMA_INT0
8404 ADD_BITFIELD_RO(CH11, 11, 1)
8405 // Channel 12 was the source of DMA_INT0
8406 ADD_BITFIELD_RO(CH12, 12, 1)
8407 // Channel 13 was the source of DMA_INT0
8408 ADD_BITFIELD_RO(CH13, 13, 1)
8409 // Channel 14 was the source of DMA_INT0
8410 ADD_BITFIELD_RO(CH14, 14, 1)
8411 // Channel 15 was the source of DMA_INT0
8412 ADD_BITFIELD_RO(CH15, 15, 1)
8413 // Channel 16 was the source of DMA_INT0
8414 ADD_BITFIELD_RO(CH16, 16, 1)
8415 // Channel 17 was the source of DMA_INT0
8416 ADD_BITFIELD_RO(CH17, 17, 1)
8417 // Channel 18 was the source of DMA_INT0
8418 ADD_BITFIELD_RO(CH18, 18, 1)
8419 // Channel 19 was the source of DMA_INT0
8420 ADD_BITFIELD_RO(CH19, 19, 1)
8421 // Channel 20 was the source of DMA_INT0
8422 ADD_BITFIELD_RO(CH20, 20, 1)
8423 // Channel 21 was the source of DMA_INT0
8424 ADD_BITFIELD_RO(CH21, 21, 1)
8425 // Channel 22 was the source of DMA_INT0
8426 ADD_BITFIELD_RO(CH22, 22, 1)
8427 // Channel 23 was the source of DMA_INT0
8428 ADD_BITFIELD_RO(CH23, 23, 1)
8429 // Channel 24 was the source of DMA_INT0
8430 ADD_BITFIELD_RO(CH24, 24, 1)
8431 // Channel 25 was the source of DMA_INT0
8432 ADD_BITFIELD_RO(CH25, 25, 1)
8433 // Channel 26 was the source of DMA_INT0
8434 ADD_BITFIELD_RO(CH26, 26, 1)
8435 // Channel 27 was the source of DMA_INT0
8436 ADD_BITFIELD_RO(CH27, 27, 1)
8437 // Channel 28 was the source of DMA_INT0
8438 ADD_BITFIELD_RO(CH28, 28, 1)
8439 // Channel 29 was the source of DMA_INT0
8440 ADD_BITFIELD_RO(CH29, 29, 1)
8441 // Channel 30 was the source of DMA_INT0
8442 ADD_BITFIELD_RO(CH30, 30, 1)
8443 // Channel 31 was the source of DMA_INT0
8444 ADD_BITFIELD_RO(CH31, 31, 1)
8445 END_TYPE()
8446
8447 // Interrupt 0 Source Channel Clear Flag Register
8448 // Reset value: 0x00000000
8449 BEGIN_TYPE(DMA_INT0_CLRFLG_t, uint32_t)
8450 // Clear corresponding DMA_INT0_SRCFLG_REG
8451 ADD_BITFIELD_WO(CH0, 0, 1)
8452 // Clear corresponding DMA_INT0_SRCFLG_REG
8453 ADD_BITFIELD_WO(CH1, 1, 1)
8454 // Clear corresponding DMA_INT0_SRCFLG_REG
8455 ADD_BITFIELD_WO(CH2, 2, 1)
8456 // Clear corresponding DMA_INT0_SRCFLG_REG
8457 ADD_BITFIELD_WO(CH3, 3, 1)
8458 // Clear corresponding DMA_INT0_SRCFLG_REG
8459 ADD_BITFIELD_WO(CH4, 4, 1)
8460 // Clear corresponding DMA_INT0_SRCFLG_REG
8461 ADD_BITFIELD_WO(CH5, 5, 1)
8462 // Clear corresponding DMA_INT0_SRCFLG_REG
8463 ADD_BITFIELD_WO(CH6, 6, 1)
8464 // Clear corresponding DMA_INT0_SRCFLG_REG
8465 ADD_BITFIELD_WO(CH7, 7, 1)
8466 // Clear corresponding DMA_INT0_SRCFLG_REG
8467 ADD_BITFIELD_WO(CH8, 8, 1)
8468 // Clear corresponding DMA_INT0_SRCFLG_REG
8469 ADD_BITFIELD_WO(CH9, 9, 1)
8470 // Clear corresponding DMA_INT0_SRCFLG_REG
8471 ADD_BITFIELD_WO(CH10, 10, 1)
8472 // Clear corresponding DMA_INT0_SRCFLG_REG
8473 ADD_BITFIELD_WO(CH11, 11, 1)
8474 // Clear corresponding DMA_INT0_SRCFLG_REG
8475 ADD_BITFIELD_WO(CH12, 12, 1)
8476 // Clear corresponding DMA_INT0_SRCFLG_REG
8477 ADD_BITFIELD_WO(CH13, 13, 1)
8478 // Clear corresponding DMA_INT0_SRCFLG_REG
8479 ADD_BITFIELD_WO(CH14, 14, 1)
8480 // Clear corresponding DMA_INT0_SRCFLG_REG
8481 ADD_BITFIELD_WO(CH15, 15, 1)
8482 // Clear corresponding DMA_INT0_SRCFLG_REG
8483 ADD_BITFIELD_WO(CH16, 16, 1)
8484 // Clear corresponding DMA_INT0_SRCFLG_REG
8485 ADD_BITFIELD_WO(CH17, 17, 1)
8486 // Clear corresponding DMA_INT0_SRCFLG_REG
8487 ADD_BITFIELD_WO(CH18, 18, 1)
8488 // Clear corresponding DMA_INT0_SRCFLG_REG
8489 ADD_BITFIELD_WO(CH19, 19, 1)
8490 // Clear corresponding DMA_INT0_SRCFLG_REG
8491 ADD_BITFIELD_WO(CH20, 20, 1)
8492 // Clear corresponding DMA_INT0_SRCFLG_REG
8493 ADD_BITFIELD_WO(CH21, 21, 1)
8494 // Clear corresponding DMA_INT0_SRCFLG_REG
8495 ADD_BITFIELD_WO(CH22, 22, 1)
8496 // Clear corresponding DMA_INT0_SRCFLG_REG
8497 ADD_BITFIELD_WO(CH23, 23, 1)
8498 // Clear corresponding DMA_INT0_SRCFLG_REG
8499 ADD_BITFIELD_WO(CH24, 24, 1)
8500 // Clear corresponding DMA_INT0_SRCFLG_REG
8501 ADD_BITFIELD_WO(CH25, 25, 1)
8502 // Clear corresponding DMA_INT0_SRCFLG_REG
8503 ADD_BITFIELD_WO(CH26, 26, 1)
8504 // Clear corresponding DMA_INT0_SRCFLG_REG
8505 ADD_BITFIELD_WO(CH27, 27, 1)
8506 // Clear corresponding DMA_INT0_SRCFLG_REG
8507 ADD_BITFIELD_WO(CH28, 28, 1)
8508 // Clear corresponding DMA_INT0_SRCFLG_REG
8509 ADD_BITFIELD_WO(CH29, 29, 1)
8510 // Clear corresponding DMA_INT0_SRCFLG_REG
8511 ADD_BITFIELD_WO(CH30, 30, 1)
8512 // Clear corresponding DMA_INT0_SRCFLG_REG
8513 ADD_BITFIELD_WO(CH31, 31, 1)
8514 END_TYPE()
8515
8516 // Status Register
8517 // Reset value: 0x00000000
8518 BEGIN_TYPE(DMA_STAT_t, uint32_t)
8519 // Enable status of the controller
8520 ADD_BITFIELD_RO(MASTEN, 0, 1)
8521 // Current state of the control state machine. State can be one of the following:
8522 ADD_BITFIELD_RO(STATE, 4, 4)
8523 // Number of available DMA channels minus one.
8524 ADD_BITFIELD_RO(DMACHANS, 16, 5)
8525 // To reduce the gate count the controller can be configured to exclude the integration test logic. The values 2h to Fh are Reserved.
8526 ADD_BITFIELD_RO(TESTSTAT, 28, 4)
8527 END_TYPE()
8528
8529 // Controller disabled
8530 static const uint32_t DMA_STAT_MASTEN__MASTEN_0 = 0;
8531 // Controller enabled
8532 static const uint32_t DMA_STAT_MASTEN__MASTEN_1 = 1;
8533 // idle
8534 static const uint32_t DMA_STAT_STATE__STATE_0 = 0;
8535 // reading channel controller data
8536 static const uint32_t DMA_STAT_STATE__STATE_1 = 1;
8537 // reading source data end pointer
8538 static const uint32_t DMA_STAT_STATE__STATE_2 = 2;
8539 // reading destination data end pointer
8540 static const uint32_t DMA_STAT_STATE__STATE_3 = 3;
8541 // reading source data
8542 static const uint32_t DMA_STAT_STATE__STATE_4 = 4;
8543 // writing destination data
8544 static const uint32_t DMA_STAT_STATE__STATE_5 = 5;
8545 // waiting for DMA request to clear
8546 static const uint32_t DMA_STAT_STATE__STATE_6 = 6;
8547 // writing channel controller data
8548 static const uint32_t DMA_STAT_STATE__STATE_7 = 7;
8549 // stalled
8550 static const uint32_t DMA_STAT_STATE__STATE_8 = 8;
8551 // done
8552 static const uint32_t DMA_STAT_STATE__STATE_9 = 9;
8553 // peripheral scatter-gather transition
8554 static const uint32_t DMA_STAT_STATE__STATE_10 = 10;
8555 // Controller configured to use 1 DMA channel
8556 static const uint32_t DMA_STAT_DMACHANS__DMACHANS_0 = 0;
8557 // Controller configured to use 2 DMA channels
8558 static const uint32_t DMA_STAT_DMACHANS__DMACHANS_1 = 1;
8559 // Controller configured to use 31 DMA channels
8560 static const uint32_t DMA_STAT_DMACHANS__DMACHANS_30 = 30;
8561 // Controller configured to use 32 DMA channels
8562 static const uint32_t DMA_STAT_DMACHANS__DMACHANS_31 = 31;
8563 // Controller does not include the integration test logic
8564 static const uint32_t DMA_STAT_TESTSTAT__TESTSTAT_0 = 0;
8565 // Controller includes the integration test logic
8566 static const uint32_t DMA_STAT_TESTSTAT__TESTSTAT_1 = 1;
8567
8568 // Configuration Register
8569 // Reset value: 0x00000000
8570 BEGIN_TYPE(DMA_CFG_t, uint32_t)
8571 // Enable status of the controller
8572 ADD_BITFIELD_WO(MASTEN, 0, 1)
8573 // Sets the AHB-Lite protection by controlling the HPROT[3:1] signal levels as follows: Bit [7] Controls HPROT[3] to indicate if a cacheable access is occurring. Bit [6] Controls HPROT[2] to indicate if a bufferable access is occurring. Bit [5] Controls HPROT[1] to indicate if a privileged access is occurring. Note: When bit [n] = 1 then the corresponding HPROT is HIGH. When bit [n] = 0 then the corresponding HPROT is LOW.
8574 ADD_BITFIELD_WO(CHPROTCTRL, 5, 3)
8575 END_TYPE()
8576
8577 // Controller disabled
8578 static const uint32_t DMA_CFG_MASTEN__MASTEN_0 = 0;
8579 // Controller enabled
8580 static const uint32_t DMA_CFG_MASTEN__MASTEN_1 = 1;
8581
8582 // Channel Control Data Base Pointer Register
8583 // Reset value: 0x00000000
8584 BEGIN_TYPE(DMA_CTLBASE_t, uint32_t)
8585 // Pointer to the base address of the primary data structure.
8586 ADD_BITFIELD_RW(ADDR, 5, 27)
8587 END_TYPE()
8588
8589 // Channel Alternate Control Data Base Pointer Register
8590 // Reset value: 0x00000000
8591 BEGIN_TYPE(DMA_ALTBASE_t, uint32_t)
8592 // Base address of the alternate data structure
8593 ADD_BITFIELD_RO(ADDR, 0, 32)
8594 END_TYPE()
8595
8596 // Channel Wait on Request Status Register
8597 // Reset value: 0x00000000
8598 BEGIN_TYPE(DMA_WAITSTAT_t, uint32_t)
8599 // Channel wait on request status.
8600 ADD_BITFIELD_RO(WAITREQ, 0, 32)
8601 END_TYPE()
8602
8603 // dma_waitonreq[C] is LOW.
8604 static const uint32_t DMA_WAITSTAT_WAITREQ__WAITREQ_0 = 0;
8605 // dma_waitonreq[C] is HIGH.
8606 static const uint32_t DMA_WAITSTAT_WAITREQ__WAITREQ_1 = 1;
8607
8608 // Channel Software Request Register
8609 // Reset value: 0x00000000
8610 BEGIN_TYPE(DMA_SWREQ_t, uint32_t)
8611 // Set the appropriate bit to generate a software DMA request on the corresponding DMA channel. Writing to a bit where a DMA channel is not implemented does not create a DMA request for that channel.
8612 ADD_BITFIELD_WO(CHNL_SW_REQ, 0, 32)
8613 END_TYPE()
8614
8615 // Does not create a DMA request for the channel
8616 static const uint32_t DMA_SWREQ_CHNL_SW_REQ__CHNL_SW_REQ_0 = 0;
8617 // Creates a DMA request for the channel
8618 static const uint32_t DMA_SWREQ_CHNL_SW_REQ__CHNL_SW_REQ_1 = 1;
8619
8620 // Channel Useburst Set Register
8621 // Reset value: 0x00000000
8622 BEGIN_TYPE(DMA_USEBURSTSET_t, uint32_t)
8623 // Returns the useburst status, or disables dma_sreq from generating DMA requests.
8624 ADD_BITFIELD_RW(SET, 0, 32)
8625 END_TYPE()
8626
8627 // DMA channel C responds to requests that it receives on dma_req[C] or dma_sreq[C]. The controller performs 2R, or single, bus transfers.
8628 static const uint32_t DMA_USEBURSTSET_SET__SET_0_READ = 0;
8629 // DMA channel C does not respond to requests that it receives on dma_sreq[C]. The controller only responds to dma_req[C] requests and performs 2R transfers.
8630 static const uint32_t DMA_USEBURSTSET_SET__SET_1_READ = 1;
8631
8632 // Channel Useburst Clear Register
8633 // Reset value: 0x00000000
8634 BEGIN_TYPE(DMA_USEBURSTCLR_t, uint32_t)
8635 // Set the appropriate bit to enable dma_sreq to generate requests.
8636 ADD_BITFIELD_WO(CLR, 0, 32)
8637 END_TYPE()
8638
8639 // No effect. Use the DMA_USEBURST_SET Register to disable dma_sreq from generating requests.
8640 static const uint32_t DMA_USEBURSTCLR_CLR__CLR_0 = 0;
8641 // Enables dma_sreq[C] to generate DMA requests. Writing to a bit where a DMA channel is not implemented has no effect.
8642 static const uint32_t DMA_USEBURSTCLR_CLR__CLR_1 = 1;
8643
8644 // Channel Request Mask Set Register
8645 // Reset value: 0x00000000
8646 BEGIN_TYPE(DMA_REQMASKSET_t, uint32_t)
8647 // Returns the request mask status of dma_req and dma_sreq, or disables the corresponding channel from generating DMA requests.
8648 ADD_BITFIELD_RW(SET, 0, 32)
8649 END_TYPE()
8650
8651 // External requests are enabled for channel C.
8652 static const uint32_t DMA_REQMASKSET_SET__SET_0_READ = 0;
8653 // External requests are disabled for channel C.
8654 static const uint32_t DMA_REQMASKSET_SET__SET_1_READ = 1;
8655
8656 // Channel Request Mask Clear Register
8657 // Reset value: 0x00000000
8658 BEGIN_TYPE(DMA_REQMASKCLR_t, uint32_t)
8659 // Set the appropriate bit to enable DMA requests for the channel corresponding to dma_req and dma_sreq.
8660 ADD_BITFIELD_WO(CLR, 0, 32)
8661 END_TYPE()
8662
8663 // No effect. Use the DMA_REQMASKSET Register to disable dma_req and dma_sreq from generating requests.
8664 static const uint32_t DMA_REQMASKCLR_CLR__CLR_0 = 0;
8665 // Enables dma_req[C] or dma_sreq[C] to generate DMA requests. Writing to a bit where a DMA channel is not implemented has no effect.
8666 static const uint32_t DMA_REQMASKCLR_CLR__CLR_1 = 1;
8667
8668 // Channel Enable Set Register
8669 // Reset value: 0x00000000
8670 BEGIN_TYPE(DMA_ENASET_t, uint32_t)
8671 // Returns the enable status of the channels, or enables the corresponding channels.
8672 ADD_BITFIELD_RW(SET, 0, 32)
8673 END_TYPE()
8674
8675 // Channel C is disabled.
8676 static const uint32_t DMA_ENASET_SET__SET_0_READ = 0;
8677 // Channel C is enabled.
8678 static const uint32_t DMA_ENASET_SET__SET_1_READ = 1;
8679
8680 // Channel Enable Clear Register
8681 // Reset value: 0x00000000
8682 BEGIN_TYPE(DMA_ENACLR_t, uint32_t)
8683 // Set the appropriate bit to disable the corresponding DMA channel. Note: The controller disables a channel, by setting the appropriate bit, when: a) it completes the DMA cycle b) it reads a channel_cfg memory location which has cycle_ctrl = b000 c) an ERROR occurs on the AHB-Lite bus.
8684 ADD_BITFIELD_WO(CLR, 0, 32)
8685 END_TYPE()
8686
8687 // No effect. Use the DMA_ENASET Register to enable DMA channels.
8688 static const uint32_t DMA_ENACLR_CLR__CLR_0 = 0;
8689 // Disables channel C. Writing to a bit where a DMA channel is not implemented has no effect.
8690 static const uint32_t DMA_ENACLR_CLR__CLR_1 = 1;
8691
8692 // Channel Primary-Alternate Set Register
8693 // Reset value: 0x00000000
8694 BEGIN_TYPE(DMA_ALTSET_t, uint32_t)
8695 // Channel Primary-Alternate Set Register
8696 ADD_BITFIELD_RW(SET, 0, 32)
8697 END_TYPE()
8698
8699 // DMA channel C is using the primary data structure.
8700 static const uint32_t DMA_ALTSET_SET__SET_0_READ = 0;
8701 // DMA channel C is using the alternate data structure.
8702 static const uint32_t DMA_ALTSET_SET__SET_1_READ = 1;
8703
8704 // Channel Primary-Alternate Clear Register
8705 // Reset value: 0x00000000
8706 BEGIN_TYPE(DMA_ALTCLR_t, uint32_t)
8707 // Channel Primary-Alternate Clear Register
8708 ADD_BITFIELD_WO(CLR, 0, 32)
8709 END_TYPE()
8710
8711 // No effect. Use the DMA_ALTSET Register to select the alternate data structure.
8712 static const uint32_t DMA_ALTCLR_CLR__CLR_0 = 0;
8713 // Selects the primary data structure for channel C. Writing to a bit where a DMA channel is not implemented has no effect.
8714 static const uint32_t DMA_ALTCLR_CLR__CLR_1 = 1;
8715
8716 // Channel Priority Set Register
8717 // Reset value: 0x00000000
8718 BEGIN_TYPE(DMA_PRIOSET_t, uint32_t)
8719 // Returns the channel priority mask status, or sets the channel priority to high.
8720 ADD_BITFIELD_RW(SET, 0, 32)
8721 END_TYPE()
8722
8723 // DMA channel C is using the default priority level.
8724 static const uint32_t DMA_PRIOSET_SET__SET_0_READ = 0;
8725 // DMA channel C is using a high priority level.
8726 static const uint32_t DMA_PRIOSET_SET__SET_1_READ = 1;
8727
8728 // Channel Priority Clear Register
8729 // Reset value: 0x00000000
8730 BEGIN_TYPE(DMA_PRIOCLR_t, uint32_t)
8731 // Set the appropriate bit to select the default priority level for the specified DMA channel.
8732 ADD_BITFIELD_WO(CLR, 0, 32)
8733 END_TYPE()
8734
8735 // No effect. Use the DMA_PRIOSET Register to set channel C to the high priority level.
8736 static const uint32_t DMA_PRIOCLR_CLR__CLR_0 = 0;
8737 // Channel C uses the default priority level. Writing to a bit where a DMA channel is not implemented has no effect.
8738 static const uint32_t DMA_PRIOCLR_CLR__CLR_1 = 1;
8739
8740 // Bus Error Clear Register
8741 // Reset value: 0x00000000
8742 BEGIN_TYPE(DMA_ERRCLR_t, uint32_t)
8743 // Returns the status of dma_err, or sets the signal LOW. For test purposes, use the ERRSET register to set dma_err HIGH. Note: If you deassert dma_err at the same time as an ERROR occurs on the AHB-Lite bus, then the ERROR condition takes precedence and dma_err remains asserted.
8744 ADD_BITFIELD_RW(ERRCLR, 0, 1)
8745 END_TYPE()
8746
8747 // dma_err is LOW
8748 static const uint32_t DMA_ERRCLR_ERRCLR__ERRCLR_0_READ = 0;
8749 // dma_err is HIGH.
8750 static const uint32_t DMA_ERRCLR_ERRCLR__ERRCLR_1_READ = 1;
8751
8752 struct DMA_t {
8753 DMA_DEVICE_CFG_t DMA_DEVICE_CFG;
8754 DMA_SW_CHTRIG_t DMA_SW_CHTRIG;
8755 uint32_t reserved0[2];
8756 DMA_CH_SRCCFG_t DMA_CH_SRCCFG0;
8757 DMA_CH_SRCCFG_t DMA_CH_SRCCFG1;
8758 DMA_CH_SRCCFG_t DMA_CH_SRCCFG2;
8759 DMA_CH_SRCCFG_t DMA_CH_SRCCFG3;
8760 DMA_CH_SRCCFG_t DMA_CH_SRCCFG4;
8761 DMA_CH_SRCCFG_t DMA_CH_SRCCFG5;
8762 DMA_CH_SRCCFG_t DMA_CH_SRCCFG6;
8763 DMA_CH_SRCCFG_t DMA_CH_SRCCFG7;
8764 DMA_CH_SRCCFG_t DMA_CH_SRCCFG8;
8765 DMA_CH_SRCCFG_t DMA_CH_SRCCFG9;
8766 DMA_CH_SRCCFG_t DMA_CH_SRCCFG10;
8767 DMA_CH_SRCCFG_t DMA_CH_SRCCFG11;
8768 DMA_CH_SRCCFG_t DMA_CH_SRCCFG12;
8769 DMA_CH_SRCCFG_t DMA_CH_SRCCFG13;
8770 DMA_CH_SRCCFG_t DMA_CH_SRCCFG14;
8771 DMA_CH_SRCCFG_t DMA_CH_SRCCFG15;
8772 DMA_CH_SRCCFG_t DMA_CH_SRCCFG16;
8773 DMA_CH_SRCCFG_t DMA_CH_SRCCFG17;
8774 DMA_CH_SRCCFG_t DMA_CH_SRCCFG18;
8775 DMA_CH_SRCCFG_t DMA_CH_SRCCFG19;
8776 DMA_CH_SRCCFG_t DMA_CH_SRCCFG20;
8777 DMA_CH_SRCCFG_t DMA_CH_SRCCFG21;
8778 DMA_CH_SRCCFG_t DMA_CH_SRCCFG22;
8779 DMA_CH_SRCCFG_t DMA_CH_SRCCFG23;
8780 DMA_CH_SRCCFG_t DMA_CH_SRCCFG24;
8781 DMA_CH_SRCCFG_t DMA_CH_SRCCFG25;
8782 DMA_CH_SRCCFG_t DMA_CH_SRCCFG26;
8783 DMA_CH_SRCCFG_t DMA_CH_SRCCFG27;
8784 DMA_CH_SRCCFG_t DMA_CH_SRCCFG28;
8785 DMA_CH_SRCCFG_t DMA_CH_SRCCFG29;
8786 DMA_CH_SRCCFG_t DMA_CH_SRCCFG30;
8787 DMA_CH_SRCCFG_t DMA_CH_SRCCFG31;
8788 uint32_t reserved1[28];
8789 DMA_INT1_SRCCFG_t DMA_INT1_SRCCFG;
8790 DMA_INT2_SRCCFG_t DMA_INT2_SRCCFG;
8791 DMA_INT3_SRCCFG_t DMA_INT3_SRCCFG;
8792 uint32_t reserved2;
8793 DMA_INT0_SRCFLG_t DMA_INT0_SRCFLG;
8794 DMA_INT0_CLRFLG_t DMA_INT0_CLRFLG;
8795 uint32_t reserved3[954];
8796 DMA_STAT_t DMA_STAT;
8797 DMA_CFG_t DMA_CFG;
8798 DMA_CTLBASE_t DMA_CTLBASE;
8799 DMA_ALTBASE_t DMA_ALTBASE;
8800 DMA_WAITSTAT_t DMA_WAITSTAT;
8801 DMA_SWREQ_t DMA_SWREQ;
8802 DMA_USEBURSTSET_t DMA_USEBURSTSET;
8803 DMA_USEBURSTCLR_t DMA_USEBURSTCLR;
8804 DMA_REQMASKSET_t DMA_REQMASKSET;
8805 DMA_REQMASKCLR_t DMA_REQMASKCLR;
8806 DMA_ENASET_t DMA_ENASET;
8807 DMA_ENACLR_t DMA_ENACLR;
8808 DMA_ALTSET_t DMA_ALTSET;
8809 DMA_ALTCLR_t DMA_ALTCLR;
8810 DMA_PRIOSET_t DMA_PRIOSET;
8811 DMA_PRIOCLR_t DMA_PRIOCLR;
8812 uint32_t reserved4[3];
8813 DMA_ERRCLR_t DMA_ERRCLR;
8814 };
8815
8816 static DMA_t & DMA = (*(DMA_t *)0x4000e000);
8817
8818} // _DMA_
8819
8820// PCM
8821namespace _PCM_ {
8822
8823 // Control 0 Register
8824 // Reset value: 0xa5960000
8825 BEGIN_TYPE(PCMCTL0_t, uint32_t)
8826 // Active Mode Request
8827 ADD_BITFIELD_RW(AMR, 0, 4)
8828 // Low Power Mode Request
8829 ADD_BITFIELD_RW(LPMR, 4, 4)
8830 // Current Power Mode
8831 ADD_BITFIELD_RO(CPM, 8, 6)
8832 // PCM key
8833 ADD_BITFIELD_RW(PCMKEY, 16, 16)
8834 END_TYPE()
8835
8836 // LDO based Active Mode at Core voltage setting 0.
8837 static const uint32_t PCMCTL0_AMR__AMR_0 = 0;
8838 // LDO based Active Mode at Core voltage setting 1.
8839 static const uint32_t PCMCTL0_AMR__AMR_1 = 1;
8840 // DC-DC based Active Mode at Core voltage setting 0.
8841 static const uint32_t PCMCTL0_AMR__AMR_4 = 4;
8842 // DC-DC based Active Mode at Core voltage setting 1.
8843 static const uint32_t PCMCTL0_AMR__AMR_5 = 5;
8844 // Low-Frequency Active Mode at Core voltage setting 0.
8845 static const uint32_t PCMCTL0_AMR__AMR_8 = 8;
8846 // Low-Frequency Active Mode at Core voltage setting 1.
8847 static const uint32_t PCMCTL0_AMR__AMR_9 = 9;
8848 // LPM3. Core voltage setting is similar to the mode from which LPM3 is entered.
8849 static const uint32_t PCMCTL0_LPMR__LPMR_0 = 0;
8850 // LPM3.5. Core voltage setting 0.
8851 static const uint32_t PCMCTL0_LPMR__LPMR_10 = 10;
8852 // LPM4.5
8853 static const uint32_t PCMCTL0_LPMR__LPMR_12 = 12;
8854 // LDO based Active Mode at Core voltage setting 0.
8855 static const uint32_t PCMCTL0_CPM__CPM_0 = 0;
8856 // LDO based Active Mode at Core voltage setting 1.
8857 static const uint32_t PCMCTL0_CPM__CPM_1 = 1;
8858 // DC-DC based Active Mode at Core voltage setting 0.
8859 static const uint32_t PCMCTL0_CPM__CPM_4 = 4;
8860 // DC-DC based Active Mode at Core voltage setting 1.
8861 static const uint32_t PCMCTL0_CPM__CPM_5 = 5;
8862 // Low-Frequency Active Mode at Core voltage setting 0.
8863 static const uint32_t PCMCTL0_CPM__CPM_8 = 8;
8864 // Low-Frequency Active Mode at Core voltage setting 1.
8865 static const uint32_t PCMCTL0_CPM__CPM_9 = 9;
8866 // LDO based LPM0 at Core voltage setting 0.
8867 static const uint32_t PCMCTL0_CPM__CPM_16 = 16;
8868 // LDO based LPM0 at Core voltage setting 1.
8869 static const uint32_t PCMCTL0_CPM__CPM_17 = 17;
8870 // DC-DC based LPM0 at Core voltage setting 0.
8871 static const uint32_t PCMCTL0_CPM__CPM_20 = 20;
8872 // DC-DC based LPM0 at Core voltage setting 1.
8873 static const uint32_t PCMCTL0_CPM__CPM_21 = 21;
8874 // Low-Frequency LPM0 at Core voltage setting 0.
8875 static const uint32_t PCMCTL0_CPM__CPM_24 = 24;
8876 // Low-Frequency LPM0 at Core voltage setting 1.
8877 static const uint32_t PCMCTL0_CPM__CPM_25 = 25;
8878 // LPM3
8879 static const uint32_t PCMCTL0_CPM__CPM_32 = 32;
8880
8881 // Control 1 Register
8882 // Reset value: 0xa5960000
8883 BEGIN_TYPE(PCMCTL1_t, uint32_t)
8884 // Lock LPM5
8885 ADD_BITFIELD_RW(LOCKLPM5, 0, 1)
8886 // Lock Backup
8887 ADD_BITFIELD_RW(LOCKBKUP, 1, 1)
8888 // Force LPM entry
8889 ADD_BITFIELD_RW(FORCE_LPM_ENTRY, 2, 1)
8890 // Power mode request busy flag
8891 ADD_BITFIELD_RW(PMR_BUSY, 8, 1)
8892 // PCM key
8893 ADD_BITFIELD_RW(PCMKEY, 16, 16)
8894 END_TYPE()
8895
8896 // LPMx.5 configuration defaults to reset condition
8897 static const uint32_t PCMCTL1_LOCKLPM5__LOCKLPM5_0 = 0;
8898 // LPMx.5 configuration remains locked during LPMx.5 entry and exit
8899 static const uint32_t PCMCTL1_LOCKLPM5__LOCKLPM5_1 = 1;
8900 // Backup domain configuration defaults to reset condition
8901 static const uint32_t PCMCTL1_LOCKBKUP__LOCKBKUP_0 = 0;
8902 // Backup domain configuration remains locked during LPM3.5 entry and exit
8903 static const uint32_t PCMCTL1_LOCKBKUP__LOCKBKUP_1 = 1;
8904 // PCM aborts LPM3/LPMx.5 transition if the active clock configuration does not meet the LPM3/LPMx.5 entry criteria. PCM generates the LPM_INVALID_CLK flag on abort to LPM3/LPMx.5 entry.
8905 static const uint32_t PCMCTL1_FORCE_LPM_ENTRY__FORCE_LPM_ENTRY_0 = 0;
8906 // PCM enters LPM3/LPMx.5 after shuting off the clocks forcefully. Application needs to ensure RTC and WDT are clocked using BCLK tree to keep these modules alive in LPM3/LPM3.5. In LPM4.5 all clocks are forcefully shutoff and the core voltage is turned off.
8907 static const uint32_t PCMCTL1_FORCE_LPM_ENTRY__FORCE_LPM_ENTRY_1 = 1;
8908
8909 // Interrupt Enable Register
8910 // Reset value: 0x00000000
8911 BEGIN_TYPE(PCMIE_t, uint32_t)
8912 // LPM invalid transition interrupt enable
8913 ADD_BITFIELD_RW(LPM_INVALID_TR_IE, 0, 1)
8914 // LPM invalid clock interrupt enable
8915 ADD_BITFIELD_RW(LPM_INVALID_CLK_IE, 1, 1)
8916 // Active mode invalid transition interrupt enable
8917 ADD_BITFIELD_RW(AM_INVALID_TR_IE, 2, 1)
8918 // DC-DC error interrupt enable
8919 ADD_BITFIELD_RW(DCDC_ERROR_IE, 6, 1)
8920 END_TYPE()
8921
8922 // Disabled
8923 static const uint32_t PCMIE_LPM_INVALID_TR_IE__LPM_INVALID_TR_IE_0 = 0;
8924 // Enabled
8925 static const uint32_t PCMIE_LPM_INVALID_TR_IE__LPM_INVALID_TR_IE_1 = 1;
8926 // Disabled
8927 static const uint32_t PCMIE_LPM_INVALID_CLK_IE__LPM_INVALID_CLK_IE_0 = 0;
8928 // Enabled
8929 static const uint32_t PCMIE_LPM_INVALID_CLK_IE__LPM_INVALID_CLK_IE_1 = 1;
8930 // Disabled
8931 static const uint32_t PCMIE_AM_INVALID_TR_IE__AM_INVALID_TR_IE_0 = 0;
8932 // Enabled
8933 static const uint32_t PCMIE_AM_INVALID_TR_IE__AM_INVALID_TR_IE_1 = 1;
8934 // Disabled
8935 static const uint32_t PCMIE_DCDC_ERROR_IE__DCDC_ERROR_IE_0 = 0;
8936 // Enabled
8937 static const uint32_t PCMIE_DCDC_ERROR_IE__DCDC_ERROR_IE_1 = 1;
8938
8939 // Interrupt Flag Register
8940 // Reset value: 0x00000000
8941 BEGIN_TYPE(PCMIFG_t, uint32_t)
8942 // LPM invalid transition flag
8943 ADD_BITFIELD_RO(LPM_INVALID_TR_IFG, 0, 1)
8944 // LPM invalid clock flag
8945 ADD_BITFIELD_RO(LPM_INVALID_CLK_IFG, 1, 1)
8946 // Active mode invalid transition flag
8947 ADD_BITFIELD_RO(AM_INVALID_TR_IFG, 2, 1)
8948 // DC-DC error flag
8949 ADD_BITFIELD_RO(DCDC_ERROR_IFG, 6, 1)
8950 END_TYPE()
8951
8952 // Clear Interrupt Flag Register
8953 // Reset value: 0x00000000
8954 BEGIN_TYPE(PCMCLRIFG_t, uint32_t)
8955 // Clear LPM invalid transition flag
8956 ADD_BITFIELD_WO(CLR_LPM_INVALID_TR_IFG, 0, 1)
8957 // Clear LPM invalid clock flag
8958 ADD_BITFIELD_WO(CLR_LPM_INVALID_CLK_IFG, 1, 1)
8959 // Clear active mode invalid transition flag
8960 ADD_BITFIELD_WO(CLR_AM_INVALID_TR_IFG, 2, 1)
8961 // Clear DC-DC error flag
8962 ADD_BITFIELD_WO(CLR_DCDC_ERROR_IFG, 6, 1)
8963 END_TYPE()
8964
8965 struct PCM_t {
8966 PCMCTL0_t PCMCTL0;
8967 PCMCTL1_t PCMCTL1;
8968 PCMIE_t PCMIE;
8969 PCMIFG_t PCMIFG;
8970 PCMCLRIFG_t PCMCLRIFG;
8971 };
8972
8973 static PCM_t & PCM = (*(PCM_t *)0x40010000);
8974
8975} // _PCM_
8976
8977// CS
8978namespace _CS_ {
8979
8980 // Key Register
8981 // Reset value: 0x0000a596
8982 BEGIN_TYPE(CSKEY_t, uint32_t)
8983 // Write xxxx_695Ah to unlock
8984 ADD_BITFIELD_RW(CSKEY, 0, 16)
8985 END_TYPE()
8986
8987 // Control 0 Register
8988 // Reset value: 0x00010000
8989 BEGIN_TYPE(CSCTL0_t, uint32_t)
8990 // DCO frequency tuning select
8991 ADD_BITFIELD_RW(DCOTUNE, 0, 10)
8992 // DCO frequency range select
8993 ADD_BITFIELD_RW(DCORSEL, 16, 3)
8994 // Enables the DCO external resistor mode
8995 ADD_BITFIELD_RW(DCORES, 22, 1)
8996 // Enables the DCO oscillator
8997 ADD_BITFIELD_RW(DCOEN, 23, 1)
8998 END_TYPE()
8999
9000 // Nominal DCO Frequency Range (MHz): 1 to 2
9001 static const uint32_t CSCTL0_DCORSEL__DCORSEL_0 = 0;
9002 // Nominal DCO Frequency Range (MHz): 2 to 4
9003 static const uint32_t CSCTL0_DCORSEL__DCORSEL_1 = 1;
9004 // Nominal DCO Frequency Range (MHz): 4 to 8
9005 static const uint32_t CSCTL0_DCORSEL__DCORSEL_2 = 2;
9006 // Nominal DCO Frequency Range (MHz): 8 to 16
9007 static const uint32_t CSCTL0_DCORSEL__DCORSEL_3 = 3;
9008 // Nominal DCO Frequency Range (MHz): 16 to 32
9009 static const uint32_t CSCTL0_DCORSEL__DCORSEL_4 = 4;
9010 // Nominal DCO Frequency Range (MHz): 32 to 64
9011 static const uint32_t CSCTL0_DCORSEL__DCORSEL_5 = 5;
9012 // Internal resistor mode
9013 static const uint32_t CSCTL0_DCORES__DCORES_0 = 0;
9014 // External resistor mode
9015 static const uint32_t CSCTL0_DCORES__DCORES_1 = 1;
9016 // DCO is on if it is used as a source for MCLK, HSMCLK , or SMCLK and clock is requested, otherwise it is disabled.
9017 static const uint32_t CSCTL0_DCOEN__DCOEN_0 = 0;
9018 // DCO is on
9019 static const uint32_t CSCTL0_DCOEN__DCOEN_1 = 1;
9020
9021 // Control 1 Register
9022 // Reset value: 0x00000033
9023 BEGIN_TYPE(CSCTL1_t, uint32_t)
9024 // Selects the MCLK source
9025 ADD_BITFIELD_RW(SELM, 0, 3)
9026 // Selects the SMCLK and HSMCLK source
9027 ADD_BITFIELD_RW(SELS, 4, 3)
9028 // Selects the ACLK source
9029 ADD_BITFIELD_RW(SELA, 8, 3)
9030 // Selects the BCLK source
9031 ADD_BITFIELD_RW(SELB, 12, 1)
9032 // MCLK source divider
9033 ADD_BITFIELD_RW(DIVM, 16, 3)
9034 // HSMCLK source divider
9035 ADD_BITFIELD_RW(DIVHS, 20, 3)
9036 // ACLK source divider
9037 ADD_BITFIELD_RW(DIVA, 24, 3)
9038 // SMCLK source divider
9039 ADD_BITFIELD_RW(DIVS, 28, 3)
9040 END_TYPE()
9041
9042 // when LFXT available, otherwise REFOCLK
9043 static const uint32_t CSCTL1_SELM__SELM_0 = 0;
9044 static const uint32_t CSCTL1_SELM__SELM_1 = 1;
9045 static const uint32_t CSCTL1_SELM__SELM_2 = 2;
9046 static const uint32_t CSCTL1_SELM__SELM_3 = 3;
9047 static const uint32_t CSCTL1_SELM__SELM_4 = 4;
9048 // when HFXT available, otherwise DCOCLK
9049 static const uint32_t CSCTL1_SELM__SELM_5 = 5;
9050 // when HFXT2 available, otherwise DCOCLK
9051 static const uint32_t CSCTL1_SELM__SELM_6 = 6;
9052 // for future use. Defaults to DCOCLK. Not recommended for use to ensure future compatibilities.
9053 static const uint32_t CSCTL1_SELM__SELM_7 = 7;
9054 // when LFXT available, otherwise REFOCLK
9055 static const uint32_t CSCTL1_SELS__SELS_0 = 0;
9056 static const uint32_t CSCTL1_SELS__SELS_1 = 1;
9057 static const uint32_t CSCTL1_SELS__SELS_2 = 2;
9058 static const uint32_t CSCTL1_SELS__SELS_3 = 3;
9059 static const uint32_t CSCTL1_SELS__SELS_4 = 4;
9060 // when HFXT available, otherwise DCOCLK
9061 static const uint32_t CSCTL1_SELS__SELS_5 = 5;
9062 // when HFXT2 available, otherwise DCOCLK
9063 static const uint32_t CSCTL1_SELS__SELS_6 = 6;
9064 // for furture use. Defaults to DCOCLK. Do not use to ensure future compatibilities.
9065 static const uint32_t CSCTL1_SELS__SELS_7 = 7;
9066 // when LFXT available, otherwise REFOCLK
9067 static const uint32_t CSCTL1_SELA__SELA_0 = 0;
9068 static const uint32_t CSCTL1_SELA__SELA_1 = 1;
9069 static const uint32_t CSCTL1_SELA__SELA_2 = 2;
9070 // for future use. Defaults to REFOCLK. Not recommended for use to ensure future compatibilities.
9071 static const uint32_t CSCTL1_SELA__SELA_3 = 3;
9072 // for future use. Defaults to REFOCLK. Not recommended for use to ensure future compatibilities.
9073 static const uint32_t CSCTL1_SELA__SELA_4 = 4;
9074 // for future use. Defaults to REFOCLK. Not recommended for use to ensure future compatibilities.
9075 static const uint32_t CSCTL1_SELA__SELA_5 = 5;
9076 // for future use. Defaults to REFOCLK. Not recommended for use to ensure future compatibilities.
9077 static const uint32_t CSCTL1_SELA__SELA_6 = 6;
9078 // for future use. Defaults to REFOCLK. Not recommended for use to ensure future compatibilities.
9079 static const uint32_t CSCTL1_SELA__SELA_7 = 7;
9080 // LFXTCLK
9081 static const uint32_t CSCTL1_SELB__SELB_0 = 0;
9082 // REFOCLK
9083 static const uint32_t CSCTL1_SELB__SELB_1 = 1;
9084 // f(MCLK)/1
9085 static const uint32_t CSCTL1_DIVM__DIVM_0 = 0;
9086 // f(MCLK)/2
9087 static const uint32_t CSCTL1_DIVM__DIVM_1 = 1;
9088 // f(MCLK)/4
9089 static const uint32_t CSCTL1_DIVM__DIVM_2 = 2;
9090 // f(MCLK)/8
9091 static const uint32_t CSCTL1_DIVM__DIVM_3 = 3;
9092 // f(MCLK)/16
9093 static const uint32_t CSCTL1_DIVM__DIVM_4 = 4;
9094 // f(MCLK)/32
9095 static const uint32_t CSCTL1_DIVM__DIVM_5 = 5;
9096 // f(MCLK)/64
9097 static const uint32_t CSCTL1_DIVM__DIVM_6 = 6;
9098 // f(MCLK)/128
9099 static const uint32_t CSCTL1_DIVM__DIVM_7 = 7;
9100 // f(HSMCLK)/1
9101 static const uint32_t CSCTL1_DIVHS__DIVHS_0 = 0;
9102 // f(HSMCLK)/2
9103 static const uint32_t CSCTL1_DIVHS__DIVHS_1 = 1;
9104 // f(HSMCLK)/4
9105 static const uint32_t CSCTL1_DIVHS__DIVHS_2 = 2;
9106 // f(HSMCLK)/8
9107 static const uint32_t CSCTL1_DIVHS__DIVHS_3 = 3;
9108 // f(HSMCLK)/16
9109 static const uint32_t CSCTL1_DIVHS__DIVHS_4 = 4;
9110 // f(HSMCLK)/32
9111 static const uint32_t CSCTL1_DIVHS__DIVHS_5 = 5;
9112 // f(HSMCLK)/64
9113 static const uint32_t CSCTL1_DIVHS__DIVHS_6 = 6;
9114 // f(HSMCLK)/128
9115 static const uint32_t CSCTL1_DIVHS__DIVHS_7 = 7;
9116 // f(ACLK)/1
9117 static const uint32_t CSCTL1_DIVA__DIVA_0 = 0;
9118 // f(ACLK)/2
9119 static const uint32_t CSCTL1_DIVA__DIVA_1 = 1;
9120 // f(ACLK)/4
9121 static const uint32_t CSCTL1_DIVA__DIVA_2 = 2;
9122 // f(ACLK)/8
9123 static const uint32_t CSCTL1_DIVA__DIVA_3 = 3;
9124 // f(ACLK)/16
9125 static const uint32_t CSCTL1_DIVA__DIVA_4 = 4;
9126 // f(ACLK)/32
9127 static const uint32_t CSCTL1_DIVA__DIVA_5 = 5;
9128 // f(ACLK)/64
9129 static const uint32_t CSCTL1_DIVA__DIVA_6 = 6;
9130 // f(ACLK)/128
9131 static const uint32_t CSCTL1_DIVA__DIVA_7 = 7;
9132 // f(SMCLK)/1
9133 static const uint32_t CSCTL1_DIVS__DIVS_0 = 0;
9134 // f(SMCLK)/2
9135 static const uint32_t CSCTL1_DIVS__DIVS_1 = 1;
9136 // f(SMCLK)/4
9137 static const uint32_t CSCTL1_DIVS__DIVS_2 = 2;
9138 // f(SMCLK)/8
9139 static const uint32_t CSCTL1_DIVS__DIVS_3 = 3;
9140 // f(SMCLK)/16
9141 static const uint32_t CSCTL1_DIVS__DIVS_4 = 4;
9142 // f(SMCLK)/32
9143 static const uint32_t CSCTL1_DIVS__DIVS_5 = 5;
9144 // f(SMCLK)/64
9145 static const uint32_t CSCTL1_DIVS__DIVS_6 = 6;
9146 // f(SMCLK)/128
9147 static const uint32_t CSCTL1_DIVS__DIVS_7 = 7;
9148
9149 // Control 2 Register
9150 // Reset value: 0x00010003
9151 BEGIN_TYPE(CSCTL2_t, uint32_t)
9152 // LFXT oscillator current can be adjusted to its drive needs
9153 ADD_BITFIELD_RW(LFXTDRIVE, 0, 2)
9154 // Disables the automatic gain control of the LFXT crystal
9155 ADD_BITFIELD_RW(LFXTAGCOFF, 7, 1)
9156 // Turns on the LFXT oscillator regardless if used as a clock resource
9157 ADD_BITFIELD_RW(LFXT_EN, 8, 1)
9158 // LFXT bypass select
9159 ADD_BITFIELD_RW(LFXTBYPASS, 9, 1)
9160 // HFXT oscillator drive selection
9161 ADD_BITFIELD_RW(HFXTDRIVE, 16, 1)
9162 // HFXT frequency selection
9163 ADD_BITFIELD_RW(HFXTFREQ, 20, 3)
9164 // Turns on the HFXT oscillator regardless if used as a clock resource
9165 ADD_BITFIELD_RW(HFXT_EN, 24, 1)
9166 // HFXT bypass select
9167 ADD_BITFIELD_RW(HFXTBYPASS, 25, 1)
9168 END_TYPE()
9169
9170 // Lowest drive strength and current consumption LFXT oscillator.
9171 static const uint32_t CSCTL2_LFXTDRIVE__LFXTDRIVE_0 = 0;
9172 // Increased drive strength LFXT oscillator.
9173 static const uint32_t CSCTL2_LFXTDRIVE__LFXTDRIVE_1 = 1;
9174 // Increased drive strength LFXT oscillator.
9175 static const uint32_t CSCTL2_LFXTDRIVE__LFXTDRIVE_2 = 2;
9176 // Maximum drive strength and maximum current consumption LFXT oscillator.
9177 static const uint32_t CSCTL2_LFXTDRIVE__LFXTDRIVE_3 = 3;
9178 // AGC enabled.
9179 static const uint32_t CSCTL2_LFXTAGCOFF__LFXTAGCOFF_0 = 0;
9180 // AGC disabled.
9181 static const uint32_t CSCTL2_LFXTAGCOFF__LFXTAGCOFF_1 = 1;
9182 // LFXT is on if it is used as a source for ACLK, MCLK, HSMCLK , or SMCLK and is selected via the port selection and not in bypass mode of operation.
9183 static const uint32_t CSCTL2_LFXT_EN__LFXT_EN_0 = 0;
9184 // LFXT is on if LFXT is selected via the port selection and LFXT is not in bypass mode of operation.
9185 static const uint32_t CSCTL2_LFXT_EN__LFXT_EN_1 = 1;
9186 // LFXT sourced by external crystal.
9187 static const uint32_t CSCTL2_LFXTBYPASS__LFXTBYPASS_0 = 0;
9188 // LFXT sourced by external square wave.
9189 static const uint32_t CSCTL2_LFXTBYPASS__LFXTBYPASS_1 = 1;
9190 // To be used for HFXTFREQ setting 000b
9191 static const uint32_t CSCTL2_HFXTDRIVE__HFXTDRIVE_0 = 0;
9192 // To be used for HFXTFREQ settings 001b to 110b
9193 static const uint32_t CSCTL2_HFXTDRIVE__HFXTDRIVE_1 = 1;
9194 // 1 MHz to 4 MHz
9195 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_0 = 0;
9196 // >4 MHz to 8 MHz
9197 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_1 = 1;
9198 // >8 MHz to 16 MHz
9199 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_2 = 2;
9200 // >16 MHz to 24 MHz
9201 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_3 = 3;
9202 // >24 MHz to 32 MHz
9203 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_4 = 4;
9204 // >32 MHz to 40 MHz
9205 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_5 = 5;
9206 // >40 MHz to 48 MHz
9207 static const uint32_t CSCTL2_HFXTFREQ__HFXTFREQ_6 = 6;
9208 // HFXT is on if it is used as a source for MCLK, HSMCLK , or SMCLK and is selected via the port selection and not in bypass mode of operation.
9209 static const uint32_t CSCTL2_HFXT_EN__HFXT_EN_0 = 0;
9210 // HFXT is on if HFXT is selected via the port selection and HFXT is not in bypass mode of operation.
9211 static const uint32_t CSCTL2_HFXT_EN__HFXT_EN_1 = 1;
9212 // HFXT sourced by external crystal.
9213 static const uint32_t CSCTL2_HFXTBYPASS__HFXTBYPASS_0 = 0;
9214 // HFXT sourced by external square wave.
9215 static const uint32_t CSCTL2_HFXTBYPASS__HFXTBYPASS_1 = 1;
9216
9217 // Control 3 Register
9218 // Reset value: 0x00000bbb
9219 BEGIN_TYPE(CSCTL3_t, uint32_t)
9220 // Start flag counter for LFXT
9221 ADD_BITFIELD_RW(FCNTLF, 0, 2)
9222 // Reset start fault counter for LFXT
9223 ADD_BITFIELD_WO(RFCNTLF, 2, 1)
9224 // Enable start fault counter for LFXT
9225 ADD_BITFIELD_RW(FCNTLF_EN, 3, 1)
9226 // Start flag counter for HFXT
9227 ADD_BITFIELD_RW(FCNTHF, 4, 2)
9228 // Reset start fault counter for HFXT
9229 ADD_BITFIELD_WO(RFCNTHF, 6, 1)
9230 // Enable start fault counter for HFXT
9231 ADD_BITFIELD_RW(FCNTHF_EN, 7, 1)
9232 // Start flag counter for HFXT2
9233 ADD_BITFIELD_RW(FCNTHF2, 8, 2)
9234 // Reset start fault counter for HFXT2
9235 ADD_BITFIELD_WO(RFCNTHF2, 10, 1)
9236 // Enable start fault counter for HFXT2
9237 ADD_BITFIELD_RW(FCNTHF2_EN, 11, 1)
9238 END_TYPE()
9239
9240 // 4096 cycles
9241 static const uint32_t CSCTL3_FCNTLF__FCNTLF_0 = 0;
9242 // 8192 cycles
9243 static const uint32_t CSCTL3_FCNTLF__FCNTLF_1 = 1;
9244 // 16384 cycles
9245 static const uint32_t CSCTL3_FCNTLF__FCNTLF_2 = 2;
9246 // 32768 cycles
9247 static const uint32_t CSCTL3_FCNTLF__FCNTLF_3 = 3;
9248 // Not applicable. Always reads as zero due to self clearing.
9249 static const uint32_t CSCTL3_RFCNTLF__RFCNTLF_0 = 0;
9250 // Restarts the counter immediately.
9251 static const uint32_t CSCTL3_RFCNTLF__RFCNTLF_1 = 1;
9252 // Startup fault counter disabled. Counter is cleared.
9253 static const uint32_t CSCTL3_FCNTLF_EN__FCNTLF_EN_0 = 0;
9254 // Startup fault counter enabled.
9255 static const uint32_t CSCTL3_FCNTLF_EN__FCNTLF_EN_1 = 1;
9256 // 2048 cycles
9257 static const uint32_t CSCTL3_FCNTHF__FCNTHF_0 = 0;
9258 // 4096 cycles
9259 static const uint32_t CSCTL3_FCNTHF__FCNTHF_1 = 1;
9260 // 8192 cycles
9261 static const uint32_t CSCTL3_FCNTHF__FCNTHF_2 = 2;
9262 // 16384 cycles
9263 static const uint32_t CSCTL3_FCNTHF__FCNTHF_3 = 3;
9264 // Not applicable. Always reads as zero due to self clearing.
9265 static const uint32_t CSCTL3_RFCNTHF__RFCNTHF_0 = 0;
9266 // Restarts the counter immediately.
9267 static const uint32_t CSCTL3_RFCNTHF__RFCNTHF_1 = 1;
9268 // Startup fault counter disabled. Counter is cleared.
9269 static const uint32_t CSCTL3_FCNTHF_EN__FCNTHF_EN_0 = 0;
9270 // Startup fault counter enabled.
9271 static const uint32_t CSCTL3_FCNTHF_EN__FCNTHF_EN_1 = 1;
9272 // 2048 cycles
9273 static const uint32_t CSCTL3_FCNTHF2__FCNTHF2_0 = 0;
9274 // 4096 cycles
9275 static const uint32_t CSCTL3_FCNTHF2__FCNTHF2_1 = 1;
9276 // 8192 cycles
9277 static const uint32_t CSCTL3_FCNTHF2__FCNTHF2_2 = 2;
9278 // 16384 cycles
9279 static const uint32_t CSCTL3_FCNTHF2__FCNTHF2_3 = 3;
9280 // Not applicable. Always reads as zero due to self clearing.
9281 static const uint32_t CSCTL3_RFCNTHF2__RFCNTHF2_0 = 0;
9282 // Restarts the counter immediately.
9283 static const uint32_t CSCTL3_RFCNTHF2__RFCNTHF2_1 = 1;
9284 // Startup fault counter disabled. Counter is cleared.
9285 static const uint32_t CSCTL3_FCNTHF2_EN__FCNTHF2_EN_0 = 0;
9286 // Startup fault counter enabled.
9287 static const uint32_t CSCTL3_FCNTHF2_EN__FCNTHF2_EN_1 = 1;
9288
9289 // Clock Enable Register
9290 // Reset value: 0x0000000f
9291 BEGIN_TYPE(CSCLKEN_t, uint32_t)
9292 // ACLK system clock conditional request enable
9293 ADD_BITFIELD_RW(ACLK_EN, 0, 1)
9294 // MCLK system clock conditional request enable
9295 ADD_BITFIELD_RW(MCLK_EN, 1, 1)
9296 // HSMCLK system clock conditional request enable
9297 ADD_BITFIELD_RW(HSMCLK_EN, 2, 1)
9298 // SMCLK system clock conditional request enable
9299 ADD_BITFIELD_RW(SMCLK_EN, 3, 1)
9300 // Turns on the VLO oscillator
9301 ADD_BITFIELD_RW(VLO_EN, 8, 1)
9302 // Turns on the REFO oscillator
9303 ADD_BITFIELD_RW(REFO_EN, 9, 1)
9304 // Turns on the MODOSC oscillator
9305 ADD_BITFIELD_RW(MODOSC_EN, 10, 1)
9306 // Selects REFO nominal frequency
9307 ADD_BITFIELD_RW(REFOFSEL, 15, 1)
9308 END_TYPE()
9309
9310 // ACLK disabled regardless of conditional clock requests
9311 static const uint32_t CSCLKEN_ACLK_EN__ACLK_EN_0 = 0;
9312 // ACLK enabled based on any conditional clock requests
9313 static const uint32_t CSCLKEN_ACLK_EN__ACLK_EN_1 = 1;
9314 // MCLK disabled regardless of conditional clock requests
9315 static const uint32_t CSCLKEN_MCLK_EN__MCLK_EN_0 = 0;
9316 // MCLK enabled based on any conditional clock requests
9317 static const uint32_t CSCLKEN_MCLK_EN__MCLK_EN_1 = 1;
9318 // HSMCLK disabled regardless of conditional clock requests
9319 static const uint32_t CSCLKEN_HSMCLK_EN__HSMCLK_EN_0 = 0;
9320 // HSMCLK enabled based on any conditional clock requests
9321 static const uint32_t CSCLKEN_HSMCLK_EN__HSMCLK_EN_1 = 1;
9322 // SMCLK disabled regardless of conditional clock requests.
9323 static const uint32_t CSCLKEN_SMCLK_EN__SMCLK_EN_0 = 0;
9324 // SMCLK enabled based on any conditional clock requests
9325 static const uint32_t CSCLKEN_SMCLK_EN__SMCLK_EN_1 = 1;
9326 // VLO is on only if it is used as a source for ACLK, MCLK, HSMCLK or SMCLK.
9327 static const uint32_t CSCLKEN_VLO_EN__VLO_EN_0 = 0;
9328 // VLO is on
9329 static const uint32_t CSCLKEN_VLO_EN__VLO_EN_1 = 1;
9330 // REFO is on only if it is used as a source for ACLK, MCLK, HSMCLK or SMCLK
9331 static const uint32_t CSCLKEN_REFO_EN__REFO_EN_0 = 0;
9332 // REFO is on
9333 static const uint32_t CSCLKEN_REFO_EN__REFO_EN_1 = 1;
9334 // MODOSC is on only if it is used as a source for ACLK, MCLK, HSMCLK or SMCLK
9335 static const uint32_t CSCLKEN_MODOSC_EN__MODOSC_EN_0 = 0;
9336 // MODOSC is on
9337 static const uint32_t CSCLKEN_MODOSC_EN__MODOSC_EN_1 = 1;
9338 // 32 kHz
9339 static const uint32_t CSCLKEN_REFOFSEL__REFOFSEL_0 = 0;
9340 // 128 kHz
9341 static const uint32_t CSCLKEN_REFOFSEL__REFOFSEL_1 = 1;
9342
9343 // Status Register
9344 // Reset value: 0x00000003
9345 BEGIN_TYPE(CSSTAT_t, uint32_t)
9346 // DCO status
9347 ADD_BITFIELD_RO(DCO_ON, 0, 1)
9348 // DCO bias status
9349 ADD_BITFIELD_RO(DCOBIAS_ON, 1, 1)
9350 // HFXT status
9351 ADD_BITFIELD_RO(HFXT_ON, 2, 1)
9352 // HFXT2 status
9353 ADD_BITFIELD_RO(HFXT2_ON, 3, 1)
9354 // MODOSC status
9355 ADD_BITFIELD_RO(MODOSC_ON, 4, 1)
9356 // VLO status
9357 ADD_BITFIELD_RO(VLO_ON, 5, 1)
9358 // LFXT status
9359 ADD_BITFIELD_RO(LFXT_ON, 6, 1)
9360 // REFO status
9361 ADD_BITFIELD_RO(REFO_ON, 7, 1)
9362 // ACLK system clock status
9363 ADD_BITFIELD_RO(ACLK_ON, 16, 1)
9364 // MCLK system clock status
9365 ADD_BITFIELD_RO(MCLK_ON, 17, 1)
9366 // HSMCLK system clock status
9367 ADD_BITFIELD_RO(HSMCLK_ON, 18, 1)
9368 // SMCLK system clock status
9369 ADD_BITFIELD_RO(SMCLK_ON, 19, 1)
9370 // MODCLK system clock status
9371 ADD_BITFIELD_RO(MODCLK_ON, 20, 1)
9372 // VLOCLK system clock status
9373 ADD_BITFIELD_RO(VLOCLK_ON, 21, 1)
9374 // LFXTCLK system clock status
9375 ADD_BITFIELD_RO(LFXTCLK_ON, 22, 1)
9376 // REFOCLK system clock status
9377 ADD_BITFIELD_RO(REFOCLK_ON, 23, 1)
9378 // ACLK Ready status
9379 ADD_BITFIELD_RO(ACLK_READY, 24, 1)
9380 // MCLK Ready status
9381 ADD_BITFIELD_RO(MCLK_READY, 25, 1)
9382 // HSMCLK Ready status
9383 ADD_BITFIELD_RO(HSMCLK_READY, 26, 1)
9384 // SMCLK Ready status
9385 ADD_BITFIELD_RO(SMCLK_READY, 27, 1)
9386 // BCLK Ready status
9387 ADD_BITFIELD_RO(BCLK_READY, 28, 1)
9388 END_TYPE()
9389
9390 // Inactive
9391 static const uint32_t CSSTAT_DCO_ON__DCO_ON_0 = 0;
9392 // Active
9393 static const uint32_t CSSTAT_DCO_ON__DCO_ON_1 = 1;
9394 // Inactive
9395 static const uint32_t CSSTAT_DCOBIAS_ON__DCOBIAS_ON_0 = 0;
9396 // Active
9397 static const uint32_t CSSTAT_DCOBIAS_ON__DCOBIAS_ON_1 = 1;
9398 // Inactive
9399 static const uint32_t CSSTAT_HFXT_ON__HFXT_ON_0 = 0;
9400 // Active
9401 static const uint32_t CSSTAT_HFXT_ON__HFXT_ON_1 = 1;
9402 // Inactive
9403 static const uint32_t CSSTAT_HFXT2_ON__HFXT2_ON_0 = 0;
9404 // Active
9405 static const uint32_t CSSTAT_HFXT2_ON__HFXT2_ON_1 = 1;
9406 // Inactive
9407 static const uint32_t CSSTAT_MODOSC_ON__MODOSC_ON_0 = 0;
9408 // Active
9409 static const uint32_t CSSTAT_MODOSC_ON__MODOSC_ON_1 = 1;
9410 // Inactive
9411 static const uint32_t CSSTAT_VLO_ON__VLO_ON_0 = 0;
9412 // Active
9413 static const uint32_t CSSTAT_VLO_ON__VLO_ON_1 = 1;
9414 // Inactive
9415 static const uint32_t CSSTAT_LFXT_ON__LFXT_ON_0 = 0;
9416 // Active
9417 static const uint32_t CSSTAT_LFXT_ON__LFXT_ON_1 = 1;
9418 // Inactive
9419 static const uint32_t CSSTAT_REFO_ON__REFO_ON_0 = 0;
9420 // Active
9421 static const uint32_t CSSTAT_REFO_ON__REFO_ON_1 = 1;
9422 // Inactive
9423 static const uint32_t CSSTAT_ACLK_ON__ACLK_ON_0 = 0;
9424 // Active
9425 static const uint32_t CSSTAT_ACLK_ON__ACLK_ON_1 = 1;
9426 // Inactive
9427 static const uint32_t CSSTAT_MCLK_ON__MCLK_ON_0 = 0;
9428 // Active
9429 static const uint32_t CSSTAT_MCLK_ON__MCLK_ON_1 = 1;
9430 // Inactive
9431 static const uint32_t CSSTAT_HSMCLK_ON__HSMCLK_ON_0 = 0;
9432 // Active
9433 static const uint32_t CSSTAT_HSMCLK_ON__HSMCLK_ON_1 = 1;
9434 // Inactive
9435 static const uint32_t CSSTAT_SMCLK_ON__SMCLK_ON_0 = 0;
9436 // Active
9437 static const uint32_t CSSTAT_SMCLK_ON__SMCLK_ON_1 = 1;
9438 // Inactive
9439 static const uint32_t CSSTAT_MODCLK_ON__MODCLK_ON_0 = 0;
9440 // Active
9441 static const uint32_t CSSTAT_MODCLK_ON__MODCLK_ON_1 = 1;
9442 // Inactive
9443 static const uint32_t CSSTAT_VLOCLK_ON__VLOCLK_ON_0 = 0;
9444 // Active
9445 static const uint32_t CSSTAT_VLOCLK_ON__VLOCLK_ON_1 = 1;
9446 // Inactive
9447 static const uint32_t CSSTAT_LFXTCLK_ON__LFXTCLK_ON_0 = 0;
9448 // Active
9449 static const uint32_t CSSTAT_LFXTCLK_ON__LFXTCLK_ON_1 = 1;
9450 // Inactive
9451 static const uint32_t CSSTAT_REFOCLK_ON__REFOCLK_ON_0 = 0;
9452 // Active
9453 static const uint32_t CSSTAT_REFOCLK_ON__REFOCLK_ON_1 = 1;
9454 // Not ready
9455 static const uint32_t CSSTAT_ACLK_READY__ACLK_READY_0 = 0;
9456 // Ready
9457 static const uint32_t CSSTAT_ACLK_READY__ACLK_READY_1 = 1;
9458 // Not ready
9459 static const uint32_t CSSTAT_MCLK_READY__MCLK_READY_0 = 0;
9460 // Ready
9461 static const uint32_t CSSTAT_MCLK_READY__MCLK_READY_1 = 1;
9462 // Not ready
9463 static const uint32_t CSSTAT_HSMCLK_READY__HSMCLK_READY_0 = 0;
9464 // Ready
9465 static const uint32_t CSSTAT_HSMCLK_READY__HSMCLK_READY_1 = 1;
9466 // Not ready
9467 static const uint32_t CSSTAT_SMCLK_READY__SMCLK_READY_0 = 0;
9468 // Ready
9469 static const uint32_t CSSTAT_SMCLK_READY__SMCLK_READY_1 = 1;
9470 // Not ready
9471 static const uint32_t CSSTAT_BCLK_READY__BCLK_READY_0 = 0;
9472 // Ready
9473 static const uint32_t CSSTAT_BCLK_READY__BCLK_READY_1 = 1;
9474
9475 // Interrupt Enable Register
9476 // Reset value: 0x00000000
9477 BEGIN_TYPE(CSIE_t, uint32_t)
9478 // LFXT oscillator fault flag interrupt enable
9479 ADD_BITFIELD_RW(LFXTIE, 0, 1)
9480 // HFXT oscillator fault flag interrupt enable
9481 ADD_BITFIELD_RW(HFXTIE, 1, 1)
9482 // HFXT2 oscillator fault flag interrupt enable
9483 ADD_BITFIELD_RW(HFXT2IE, 2, 1)
9484 // DCO external resistor open circuit fault flag interrupt enable.
9485 ADD_BITFIELD_RW(DCOR_OPNIE, 6, 1)
9486 // Start fault counter interrupt enable LFXT
9487 ADD_BITFIELD_RW(FCNTLFIE, 8, 1)
9488 // Start fault counter interrupt enable HFXT
9489 ADD_BITFIELD_RW(FCNTHFIE, 9, 1)
9490 // Start fault counter interrupt enable HFXT2
9491 ADD_BITFIELD_RW(FCNTHF2IE, 10, 1)
9492 // PLL out-of-lock interrupt enable
9493 ADD_BITFIELD_RW(PLLOOLIE, 12, 1)
9494 // PLL loss-of-signal interrupt enable
9495 ADD_BITFIELD_RW(PLLLOSIE, 13, 1)
9496 // PLL out-of-range interrupt enable
9497 ADD_BITFIELD_RW(PLLOORIE, 14, 1)
9498 // REFCNT period counter interrupt enable
9499 ADD_BITFIELD_RW(CALIE, 15, 1)
9500 END_TYPE()
9501
9502 // Interrupt disabled
9503 static const uint32_t CSIE_LFXTIE__LFXTIE_0 = 0;
9504 // Interrupt enabled
9505 static const uint32_t CSIE_LFXTIE__LFXTIE_1 = 1;
9506 // Interrupt disabled
9507 static const uint32_t CSIE_HFXTIE__HFXTIE_0 = 0;
9508 // Interrupt enabled
9509 static const uint32_t CSIE_HFXTIE__HFXTIE_1 = 1;
9510 // Interrupt disabled
9511 static const uint32_t CSIE_HFXT2IE__HFXT2IE_0 = 0;
9512 // Interrupt enabled
9513 static const uint32_t CSIE_HFXT2IE__HFXT2IE_1 = 1;
9514 // Interrupt disabled
9515 static const uint32_t CSIE_DCOR_OPNIE__DCOR_OPNIE_0 = 0;
9516 // Interrupt enabled
9517 static const uint32_t CSIE_DCOR_OPNIE__DCOR_OPNIE_1 = 1;
9518 // Interrupt disabled
9519 static const uint32_t CSIE_FCNTLFIE__FCNTLFIE_0 = 0;
9520 // Interrupt enabled
9521 static const uint32_t CSIE_FCNTLFIE__FCNTLFIE_1 = 1;
9522 // Interrupt disabled
9523 static const uint32_t CSIE_FCNTHFIE__FCNTHFIE_0 = 0;
9524 // Interrupt enabled
9525 static const uint32_t CSIE_FCNTHFIE__FCNTHFIE_1 = 1;
9526 // Interrupt disabled
9527 static const uint32_t CSIE_FCNTHF2IE__FCNTHF2IE_0 = 0;
9528 // Interrupt enabled
9529 static const uint32_t CSIE_FCNTHF2IE__FCNTHF2IE_1 = 1;
9530 // Interrupt disabled
9531 static const uint32_t CSIE_PLLOOLIE__PLLOOLIE_0 = 0;
9532 // Interrupt enabled
9533 static const uint32_t CSIE_PLLOOLIE__PLLOOLIE_1 = 1;
9534 // Interrupt disabled
9535 static const uint32_t CSIE_PLLLOSIE__PLLLOSIE_0 = 0;
9536 // Interrupt enabled
9537 static const uint32_t CSIE_PLLLOSIE__PLLLOSIE_1 = 1;
9538 // Interrupt disabled
9539 static const uint32_t CSIE_PLLOORIE__PLLOORIE_0 = 0;
9540 // Interrupt enabled
9541 static const uint32_t CSIE_PLLOORIE__PLLOORIE_1 = 1;
9542 // Interrupt disabled
9543 static const uint32_t CSIE_CALIE__CALIE_0 = 0;
9544 // Interrupt enabled
9545 static const uint32_t CSIE_CALIE__CALIE_1 = 1;
9546
9547 // Interrupt Flag Register
9548 // Reset value: 0x00000001
9549 BEGIN_TYPE(CSIFG_t, uint32_t)
9550 // LFXT oscillator fault flag
9551 ADD_BITFIELD_RO(LFXTIFG, 0, 1)
9552 // HFXT oscillator fault flag
9553 ADD_BITFIELD_RO(HFXTIFG, 1, 1)
9554 // HFXT2 oscillator fault flag
9555 ADD_BITFIELD_RO(HFXT2IFG, 2, 1)
9556 // DCO external resistor short circuit fault flag.
9557 ADD_BITFIELD_RO(DCOR_SHTIFG, 5, 1)
9558 // DCO external resistor open circuit fault flag.
9559 ADD_BITFIELD_RO(DCOR_OPNIFG, 6, 1)
9560 // Start fault counter interrupt flag LFXT
9561 ADD_BITFIELD_RO(FCNTLFIFG, 8, 1)
9562 // Start fault counter interrupt flag HFXT
9563 ADD_BITFIELD_RO(FCNTHFIFG, 9, 1)
9564 // Start fault counter interrupt flag HFXT2
9565 ADD_BITFIELD_RO(FCNTHF2IFG, 11, 1)
9566 // PLL out-of-lock interrupt flag
9567 ADD_BITFIELD_RO(PLLOOLIFG, 12, 1)
9568 // PLL loss-of-signal interrupt flag
9569 ADD_BITFIELD_RO(PLLLOSIFG, 13, 1)
9570 // PLL out-of-range interrupt flag
9571 ADD_BITFIELD_RO(PLLOORIFG, 14, 1)
9572 // REFCNT period counter expired
9573 ADD_BITFIELD_RO(CALIFG, 15, 1)
9574 END_TYPE()
9575
9576 // No fault condition occurred after the last reset
9577 static const uint32_t CSIFG_LFXTIFG__LFXTIFG_0 = 0;
9578 // LFXT fault. A LFXT fault occurred after the last reset
9579 static const uint32_t CSIFG_LFXTIFG__LFXTIFG_1 = 1;
9580 // No fault condition occurred after the last reset
9581 static const uint32_t CSIFG_HFXTIFG__HFXTIFG_0 = 0;
9582 // HFXT fault. A HFXT fault occurred after the last reset
9583 static const uint32_t CSIFG_HFXTIFG__HFXTIFG_1 = 1;
9584 // No fault condition occurred after the last reset
9585 static const uint32_t CSIFG_HFXT2IFG__HFXT2IFG_0 = 0;
9586 // HFXT2 fault. A HFXT2 fault occurred after the last reset
9587 static const uint32_t CSIFG_HFXT2IFG__HFXT2IFG_1 = 1;
9588 // DCO external resistor present
9589 static const uint32_t CSIFG_DCOR_SHTIFG__DCOR_SHTIFG_0 = 0;
9590 // DCO external resistor short circuit fault
9591 static const uint32_t CSIFG_DCOR_SHTIFG__DCOR_SHTIFG_1 = 1;
9592 // DCO external resistor present
9593 static const uint32_t CSIFG_DCOR_OPNIFG__DCOR_OPNIFG_0 = 0;
9594 // DCO external resistor open circuit fault
9595 static const uint32_t CSIFG_DCOR_OPNIFG__DCOR_OPNIFG_1 = 1;
9596 // Start counter not expired
9597 static const uint32_t CSIFG_FCNTLFIFG__FCNTLFIFG_0 = 0;
9598 // Start counter expired
9599 static const uint32_t CSIFG_FCNTLFIFG__FCNTLFIFG_1 = 1;
9600 // Start counter not expired
9601 static const uint32_t CSIFG_FCNTHFIFG__FCNTHFIFG_0 = 0;
9602 // Start counter expired
9603 static const uint32_t CSIFG_FCNTHFIFG__FCNTHFIFG_1 = 1;
9604 // Start counter not expired
9605 static const uint32_t CSIFG_FCNTHF2IFG__FCNTHF2IFG_0 = 0;
9606 // Start counter expired
9607 static const uint32_t CSIFG_FCNTHF2IFG__FCNTHF2IFG_1 = 1;
9608 // No interrupt pending
9609 static const uint32_t CSIFG_PLLOOLIFG__PLLOOLIFG_0 = 0;
9610 // Interrupt pending
9611 static const uint32_t CSIFG_PLLOOLIFG__PLLOOLIFG_1 = 1;
9612 // No interrupt pending
9613 static const uint32_t CSIFG_PLLLOSIFG__PLLLOSIFG_0 = 0;
9614 // Interrupt pending
9615 static const uint32_t CSIFG_PLLLOSIFG__PLLLOSIFG_1 = 1;
9616 // No interrupt pending
9617 static const uint32_t CSIFG_PLLOORIFG__PLLOORIFG_0 = 0;
9618 // Interrupt pending
9619 static const uint32_t CSIFG_PLLOORIFG__PLLOORIFG_1 = 1;
9620 // REFCNT period counter not expired
9621 static const uint32_t CSIFG_CALIFG__CALIFG_0 = 0;
9622 // REFCNT period counter expired
9623 static const uint32_t CSIFG_CALIFG__CALIFG_1 = 1;
9624
9625 // Clear Interrupt Flag Register
9626 // Reset value: 0x00000000
9627 BEGIN_TYPE(CSCLRIFG_t, uint32_t)
9628 // Clear LFXT oscillator fault interrupt flag
9629 ADD_BITFIELD_WO(CLR_LFXTIFG, 0, 1)
9630 // Clear HFXT oscillator fault interrupt flag
9631 ADD_BITFIELD_WO(CLR_HFXTIFG, 1, 1)
9632 // Clear HFXT2 oscillator fault interrupt flag
9633 ADD_BITFIELD_WO(CLR_HFXT2IFG, 2, 1)
9634 // Clear DCO external resistor open circuit fault interrupt flag.
9635 ADD_BITFIELD_WO(CLR_DCOR_OPNIFG, 6, 1)
9636 // REFCNT period counter clear interrupt flag
9637 ADD_BITFIELD_WO(CLR_CALIFG, 15, 1)
9638 // Start fault counter clear interrupt flag LFXT
9639 ADD_BITFIELD_WO(CLR_FCNTLFIFG, 8, 1)
9640 // Start fault counter clear interrupt flag HFXT
9641 ADD_BITFIELD_WO(CLR_FCNTHFIFG, 9, 1)
9642 // Start fault counter clear interrupt flag HFXT2
9643 ADD_BITFIELD_WO(CLR_FCNTHF2IFG, 10, 1)
9644 // PLL out-of-lock clear interrupt flag
9645 ADD_BITFIELD_WO(CLR_PLLOOLIFG, 12, 1)
9646 // PLL loss-of-signal clear interrupt flag
9647 ADD_BITFIELD_WO(CLR_PLLLOSIFG, 13, 1)
9648 // PLL out-of-range clear interrupt flag
9649 ADD_BITFIELD_WO(CLR_PLLOORIFG, 14, 1)
9650 END_TYPE()
9651
9652 // No effect
9653 static const uint32_t CSCLRIFG_CLR_LFXTIFG__CLR_LFXTIFG_0 = 0;
9654 // Clear pending interrupt flag
9655 static const uint32_t CSCLRIFG_CLR_LFXTIFG__CLR_LFXTIFG_1 = 1;
9656 // No effect
9657 static const uint32_t CSCLRIFG_CLR_HFXTIFG__CLR_HFXTIFG_0 = 0;
9658 // Clear pending interrupt flag
9659 static const uint32_t CSCLRIFG_CLR_HFXTIFG__CLR_HFXTIFG_1 = 1;
9660 // No effect
9661 static const uint32_t CSCLRIFG_CLR_HFXT2IFG__CLR_HFXT2IFG_0 = 0;
9662 // Clear pending interrupt flag
9663 static const uint32_t CSCLRIFG_CLR_HFXT2IFG__CLR_HFXT2IFG_1 = 1;
9664 // No effect
9665 static const uint32_t CSCLRIFG_CLR_DCOR_OPNIFG__CLR_DCOR_OPNIFG_0 = 0;
9666 // Clear pending interrupt flag
9667 static const uint32_t CSCLRIFG_CLR_DCOR_OPNIFG__CLR_DCOR_OPNIFG_1 = 1;
9668 // No effect
9669 static const uint32_t CSCLRIFG_CLR_CALIFG__CLR_CALIFG_0 = 0;
9670 // Clear pending interrupt flag
9671 static const uint32_t CSCLRIFG_CLR_CALIFG__CLR_CALIFG_1 = 1;
9672 // No effect
9673 static const uint32_t CSCLRIFG_CLR_FCNTLFIFG__CLR_FCNTLFIFG_0 = 0;
9674 // Clear pending interrupt flag
9675 static const uint32_t CSCLRIFG_CLR_FCNTLFIFG__CLR_FCNTLFIFG_1 = 1;
9676 // No effect
9677 static const uint32_t CSCLRIFG_CLR_FCNTHFIFG__CLR_FCNTHFIFG_0 = 0;
9678 // Clear pending interrupt flag
9679 static const uint32_t CSCLRIFG_CLR_FCNTHFIFG__CLR_FCNTHFIFG_1 = 1;
9680 // No effect
9681 static const uint32_t CSCLRIFG_CLR_FCNTHF2IFG__CLR_FCNTHF2IFG_0 = 0;
9682 // Clear pending interrupt flag
9683 static const uint32_t CSCLRIFG_CLR_FCNTHF2IFG__CLR_FCNTHF2IFG_1 = 1;
9684 // No effect
9685 static const uint32_t CSCLRIFG_CLR_PLLOOLIFG__CLR_PLLOOLIFG_0 = 0;
9686 // Clear pending interrupt flag
9687 static const uint32_t CSCLRIFG_CLR_PLLOOLIFG__CLR_PLLOOLIFG_1 = 1;
9688 // No effect
9689 static const uint32_t CSCLRIFG_CLR_PLLLOSIFG__CLR_PLLLOSIFG_0 = 0;
9690 // Clear pending interrupt flag
9691 static const uint32_t CSCLRIFG_CLR_PLLLOSIFG__CLR_PLLLOSIFG_1 = 1;
9692 // No effect
9693 static const uint32_t CSCLRIFG_CLR_PLLOORIFG__CLR_PLLOORIFG_0 = 0;
9694 // Clear pending interrupt flag
9695 static const uint32_t CSCLRIFG_CLR_PLLOORIFG__CLR_PLLOORIFG_1 = 1;
9696
9697 // Set Interrupt Flag Register
9698 // Reset value: 0x00000000
9699 BEGIN_TYPE(CSSETIFG_t, uint32_t)
9700 // Set LFXT oscillator fault interrupt flag
9701 ADD_BITFIELD_WO(SET_LFXTIFG, 0, 1)
9702 // Set HFXT oscillator fault interrupt flag
9703 ADD_BITFIELD_WO(SET_HFXTIFG, 1, 1)
9704 // Set HFXT2 oscillator fault interrupt flag
9705 ADD_BITFIELD_WO(SET_HFXT2IFG, 2, 1)
9706 // Set DCO external resistor open circuit fault interrupt flag.
9707 ADD_BITFIELD_WO(SET_DCOR_OPNIFG, 6, 1)
9708 // REFCNT period counter set interrupt flag
9709 ADD_BITFIELD_WO(SET_CALIFG, 15, 1)
9710 // Start fault counter set interrupt flag HFXT
9711 ADD_BITFIELD_WO(SET_FCNTHFIFG, 9, 1)
9712 // Start fault counter set interrupt flag HFXT2
9713 ADD_BITFIELD_WO(SET_FCNTHF2IFG, 10, 1)
9714 // Start fault counter set interrupt flag LFXT
9715 ADD_BITFIELD_WO(SET_FCNTLFIFG, 8, 1)
9716 // PLL out-of-lock set interrupt flag
9717 ADD_BITFIELD_WO(SET_PLLOOLIFG, 12, 1)
9718 // PLL loss-of-signal set interrupt flag
9719 ADD_BITFIELD_WO(SET_PLLLOSIFG, 13, 1)
9720 // PLL out-of-range set interrupt flag
9721 ADD_BITFIELD_WO(SET_PLLOORIFG, 14, 1)
9722 END_TYPE()
9723
9724 // No effect
9725 static const uint32_t CSSETIFG_SET_LFXTIFG__SET_LFXTIFG_0 = 0;
9726 // Set pending interrupt flag
9727 static const uint32_t CSSETIFG_SET_LFXTIFG__SET_LFXTIFG_1 = 1;
9728 // No effect
9729 static const uint32_t CSSETIFG_SET_HFXTIFG__SET_HFXTIFG_0 = 0;
9730 // Set pending interrupt flag
9731 static const uint32_t CSSETIFG_SET_HFXTIFG__SET_HFXTIFG_1 = 1;
9732 // No effect
9733 static const uint32_t CSSETIFG_SET_HFXT2IFG__SET_HFXT2IFG_0 = 0;
9734 // Set pending interrupt flag
9735 static const uint32_t CSSETIFG_SET_HFXT2IFG__SET_HFXT2IFG_1 = 1;
9736 // No effect
9737 static const uint32_t CSSETIFG_SET_DCOR_OPNIFG__SET_DCOR_OPNIFG_0 = 0;
9738 // Set pending interrupt flag
9739 static const uint32_t CSSETIFG_SET_DCOR_OPNIFG__SET_DCOR_OPNIFG_1 = 1;
9740 // No effect
9741 static const uint32_t CSSETIFG_SET_CALIFG__SET_CALIFG_0 = 0;
9742 // Set pending interrupt flag
9743 static const uint32_t CSSETIFG_SET_CALIFG__SET_CALIFG_1 = 1;
9744 // No effect
9745 static const uint32_t CSSETIFG_SET_FCNTHFIFG__SET_FCNTHFIFG_0 = 0;
9746 // Set pending interrupt flag
9747 static const uint32_t CSSETIFG_SET_FCNTHFIFG__SET_FCNTHFIFG_1 = 1;
9748 // No effect
9749 static const uint32_t CSSETIFG_SET_FCNTHF2IFG__SET_FCNTHF2IFG_0 = 0;
9750 // Set pending interrupt flag
9751 static const uint32_t CSSETIFG_SET_FCNTHF2IFG__SET_FCNTHF2IFG_1 = 1;
9752 // No effect
9753 static const uint32_t CSSETIFG_SET_FCNTLFIFG__SET_FCNTLFIFG_0 = 0;
9754 // Set pending interrupt flag
9755 static const uint32_t CSSETIFG_SET_FCNTLFIFG__SET_FCNTLFIFG_1 = 1;
9756 // No effect
9757 static const uint32_t CSSETIFG_SET_PLLOOLIFG__SET_PLLOOLIFG_0 = 0;
9758 // Set pending interrupt flag
9759 static const uint32_t CSSETIFG_SET_PLLOOLIFG__SET_PLLOOLIFG_1 = 1;
9760 // No effect
9761 static const uint32_t CSSETIFG_SET_PLLLOSIFG__SET_PLLLOSIFG_0 = 0;
9762 // Set pending interrupt flag
9763 static const uint32_t CSSETIFG_SET_PLLLOSIFG__SET_PLLLOSIFG_1 = 1;
9764 // No effect
9765 static const uint32_t CSSETIFG_SET_PLLOORIFG__SET_PLLOORIFG_0 = 0;
9766 // Set pending interrupt flag
9767 static const uint32_t CSSETIFG_SET_PLLOORIFG__SET_PLLOORIFG_1 = 1;
9768
9769 // DCO External Resistor Cailbration 0 Register
9770 // Reset value: 0x01000000
9771 BEGIN_TYPE(CSDCOERCAL0_t, uint32_t)
9772 // DCO Temperature compensation calibration
9773 ADD_BITFIELD_RW(DCO_TCCAL, 0, 2)
9774 // DCO frequency calibration for DCO frequency range (DCORSEL) 0 to 4.
9775 ADD_BITFIELD_RW(DCO_FCAL_RSEL04, 16, 10)
9776 END_TYPE()
9777
9778 // DCO External Resistor Calibration 1 Register
9779 // Reset value: 0x00000100
9780 BEGIN_TYPE(CSDCOERCAL1_t, uint32_t)
9781 // DCO frequency calibration for DCO frequency range (DCORSEL) 5.
9782 ADD_BITFIELD_RW(DCO_FCAL_RSEL5, 0, 10)
9783 END_TYPE()
9784
9785 struct CS_t {
9786 CSKEY_t CSKEY;
9787 CSCTL0_t CSCTL0;
9788 CSCTL1_t CSCTL1;
9789 CSCTL2_t CSCTL2;
9790 CSCTL3_t CSCTL3;
9791 uint32_t reserved0[7];
9792 CSCLKEN_t CSCLKEN;
9793 CSSTAT_t CSSTAT;
9794 uint32_t reserved1[2];
9795 CSIE_t CSIE;
9796 uint32_t reserved2;
9797 CSIFG_t CSIFG;
9798 uint32_t reserved3;
9799 CSCLRIFG_t CSCLRIFG;
9800 uint32_t reserved4;
9801 CSSETIFG_t CSSETIFG;
9802 uint32_t reserved5;
9803 CSDCOERCAL0_t CSDCOERCAL0;
9804 CSDCOERCAL1_t CSDCOERCAL1;
9805 };
9806
9807 static CS_t & CS = (*(CS_t *)0x40010400);
9808
9809} // _CS_
9810
9811// PSS
9812namespace _PSS_ {
9813
9814 // Key Register
9815 // Reset value: 0x0000a596
9816 BEGIN_TYPE(PSSKEY_t, uint32_t)
9817 // PSS control key
9818 ADD_BITFIELD_RW(PSSKEY, 0, 16)
9819 END_TYPE()
9820
9821 // Control 0 Register
9822 // Reset value: 0x00002000
9823 BEGIN_TYPE(PSSCTL0_t, uint32_t)
9824 // SVSM high-side off
9825 ADD_BITFIELD_RW(SVSMHOFF, 0, 1)
9826 // SVSM high-side low power normal performance mode
9827 ADD_BITFIELD_RW(SVSMHLP, 1, 1)
9828 // Supply supervisor or monitor selection for the high-side
9829 ADD_BITFIELD_RW(SVSMHS, 2, 1)
9830 // SVSM high-side reset voltage level
9831 ADD_BITFIELD_RW(SVSMHTH, 3, 3)
9832 // SVSM high-side output enable
9833 ADD_BITFIELD_RW(SVMHOE, 6, 1)
9834 // SVMHOUT pin polarity active low
9835 ADD_BITFIELD_RW(SVMHOUTPOLAL, 7, 1)
9836 // Force DC-DC regulator operation
9837 ADD_BITFIELD_RW(DCDC_FORCE, 10, 1)
9838 // Controls core voltage level transition time
9839 ADD_BITFIELD_RW(VCORETRAN, 12, 2)
9840 END_TYPE()
9841
9842 // The SVSMH is on
9843 static const uint32_t PSSCTL0_SVSMHOFF__SVSMHOFF_0 = 0;
9844 // The SVSMH is off
9845 static const uint32_t PSSCTL0_SVSMHOFF__SVSMHOFF_1 = 1;
9846 // Full performance mode. See the device-specific data sheet for response times.
9847 static const uint32_t PSSCTL0_SVSMHLP__SVSMHLP_0 = 0;
9848 // Low power normal performance mode in LPM3, LPM4, and LPMx.5, full performance in all other modes. See the device-specific data sheet for response times.
9849 static const uint32_t PSSCTL0_SVSMHLP__SVSMHLP_1 = 1;
9850 // Configure as SVSH
9851 static const uint32_t PSSCTL0_SVSMHS__SVSMHS_0 = 0;
9852 // Configure as SVMH
9853 static const uint32_t PSSCTL0_SVSMHS__SVSMHS_1 = 1;
9854 // SVSMHIFG bit is not output
9855 static const uint32_t PSSCTL0_SVMHOE__SVMHOE_0 = 0;
9856 // SVSMHIFG bit is output to the device SVMHOUT pin. The device-specific port logic must be configured accordingly
9857 static const uint32_t PSSCTL0_SVMHOE__SVMHOE_1 = 1;
9858 // SVMHOUT is active high. An error condition is signaled by a 1 at the SVMHOUT pin
9859 static const uint32_t PSSCTL0_SVMHOUTPOLAL__SVMHOUTPOLAL_0 = 0;
9860 // SVMHOUT is active low. An error condition is signaled by a 0 at the SVMHOUT pin
9861 static const uint32_t PSSCTL0_SVMHOUTPOLAL__SVMHOUTPOLAL_1 = 1;
9862 // DC-DC regulator operation not forced. Automatic fail-safe mechanism switches the core voltage regulator from DC-DC to LDO when the supply voltage falls below the minimum supply voltage necessary for DC-DC operation.
9863 static const uint32_t PSSCTL0_DCDC_FORCE__DCDC_FORCE_0 = 0;
9864 // DC-DC regulator operation forced. Automatic fail-safe mechanism is disabled and device continues to operate out of DC-DC regulator.
9865 static const uint32_t PSSCTL0_DCDC_FORCE__DCDC_FORCE_1 = 1;
9866 // 32 s / 100 mV
9867 static const uint32_t PSSCTL0_VCORETRAN__VCORETRAN_0 = 0;
9868 // 64 s / 100 mV
9869 static const uint32_t PSSCTL0_VCORETRAN__VCORETRAN_1 = 1;
9870 // 128 s / 100 mV (default)
9871 static const uint32_t PSSCTL0_VCORETRAN__VCORETRAN_2 = 2;
9872 // 256 s / 100 mV
9873 static const uint32_t PSSCTL0_VCORETRAN__VCORETRAN_3 = 3;
9874
9875 // Interrupt Enable Register
9876 // Reset value: 0x00000000
9877 BEGIN_TYPE(PSSIE_t, uint32_t)
9878 // High-side SVSM interrupt enable
9879 ADD_BITFIELD_RW(SVSMHIE, 1, 1)
9880 END_TYPE()
9881
9882 // Interrupt disabled
9883 static const uint32_t PSSIE_SVSMHIE__SVSMHIE_0 = 0;
9884 // Interrupt enabled
9885 static const uint32_t PSSIE_SVSMHIE__SVSMHIE_1 = 1;
9886
9887 // Interrupt Flag Register
9888 // Reset value: 0x00000000
9889 BEGIN_TYPE(PSSIFG_t, uint32_t)
9890 // High-side SVSM interrupt flag
9891 ADD_BITFIELD_RO(SVSMHIFG, 1, 1)
9892 END_TYPE()
9893
9894 // No interrupt pending
9895 static const uint32_t PSSIFG_SVSMHIFG__SVSMHIFG_0 = 0;
9896 // Interrupt due to SVSMH
9897 static const uint32_t PSSIFG_SVSMHIFG__SVSMHIFG_1 = 1;
9898
9899 // Clear Interrupt Flag Register
9900 // Reset value: 0x00000000
9901 BEGIN_TYPE(PSSCLRIFG_t, uint32_t)
9902 // SVSMH clear interrupt flag
9903 ADD_BITFIELD_WO(CLRSVSMHIFG, 1, 1)
9904 END_TYPE()
9905
9906 // No effect
9907 static const uint32_t PSSCLRIFG_CLRSVSMHIFG__CLRSVSMHIFG_0 = 0;
9908 // Clear pending interrupt flag
9909 static const uint32_t PSSCLRIFG_CLRSVSMHIFG__CLRSVSMHIFG_1 = 1;
9910
9911 struct PSS_t {
9912 PSSKEY_t PSSKEY;
9913 PSSCTL0_t PSSCTL0;
9914 uint32_t reserved0[11];
9915 PSSIE_t PSSIE;
9916 PSSIFG_t PSSIFG;
9917 PSSCLRIFG_t PSSCLRIFG;
9918 };
9919
9920 static PSS_t & PSS = (*(PSS_t *)0x40010800);
9921
9922} // _PSS_
9923
9924// FLCTL
9925namespace _FLCTL_ {
9926
9927 // Power Status Register
9928 // Reset value: 0x00000080
9929 BEGIN_TYPE(FLCTL_POWER_STAT_t, uint32_t)
9930 // Flash power status
9931 ADD_BITFIELD_RO(PSTAT, 0, 3)
9932 // PSS FLDO GOOD status
9933 ADD_BITFIELD_RO(LDOSTAT, 3, 1)
9934 // PSS VREF stable status
9935 ADD_BITFIELD_RO(VREFSTAT, 4, 1)
9936 // PSS IREF stable status
9937 ADD_BITFIELD_RO(IREFSTAT, 5, 1)
9938 // PSS trim done status
9939 ADD_BITFIELD_RO(TRIMSTAT, 6, 1)
9940 // Indicates if Flash is being accessed in 2T mode
9941 ADD_BITFIELD_RO(RD_2T, 7, 1)
9942 END_TYPE()
9943
9944 // Flash IP in power-down mode
9945 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_0 = 0;
9946 // Flash IP Vdd domain power-up in progress
9947 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_1 = 1;
9948 // PSS LDO_GOOD, IREF_OK and VREF_OK check in progress
9949 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_2 = 2;
9950 // Flash IP SAFE_LV check in progress
9951 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_3 = 3;
9952 // Flash IP Active
9953 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_4 = 4;
9954 // Flash IP Active in Low-Frequency Active and Low-Frequency LPM0 modes.
9955 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_5 = 5;
9956 // Flash IP in Standby mode
9957 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_6 = 6;
9958 // Flash IP in Current mirror boost state
9959 static const uint32_t FLCTL_POWER_STAT_PSTAT__PSTAT_7 = 7;
9960 // FLDO not GOOD
9961 static const uint32_t FLCTL_POWER_STAT_LDOSTAT__LDOSTAT_0 = 0;
9962 // FLDO GOOD
9963 static const uint32_t FLCTL_POWER_STAT_LDOSTAT__LDOSTAT_1 = 1;
9964 // Flash LDO not stable
9965 static const uint32_t FLCTL_POWER_STAT_VREFSTAT__VREFSTAT_0 = 0;
9966 // Flash LDO stable
9967 static const uint32_t FLCTL_POWER_STAT_VREFSTAT__VREFSTAT_1 = 1;
9968 // IREF not stable
9969 static const uint32_t FLCTL_POWER_STAT_IREFSTAT__IREFSTAT_0 = 0;
9970 // IREF stable
9971 static const uint32_t FLCTL_POWER_STAT_IREFSTAT__IREFSTAT_1 = 1;
9972 // PSS trim not complete
9973 static const uint32_t FLCTL_POWER_STAT_TRIMSTAT__TRIMSTAT_0 = 0;
9974 // PSS trim complete
9975 static const uint32_t FLCTL_POWER_STAT_TRIMSTAT__TRIMSTAT_1 = 1;
9976 // Flash reads are in 1T mode
9977 static const uint32_t FLCTL_POWER_STAT_RD_2T__RD_2T_0 = 0;
9978 // Flash reads are in 2T mode
9979 static const uint32_t FLCTL_POWER_STAT_RD_2T__RD_2T_1 = 1;
9980
9981 // Bank0 Read Control Register
9982 // Reset value: 0x00000000
9983 BEGIN_TYPE(FLCTL_BANK0_RDCTL_t, uint32_t)
9984 // Flash read mode control setting for Bank 0
9985 ADD_BITFIELD_RW(RD_MODE, 0, 4)
9986 // Enables read buffering feature for instruction fetches to this Bank
9987 ADD_BITFIELD_RW(BUFI, 4, 1)
9988 // Enables read buffering feature for data reads to this Bank
9989 ADD_BITFIELD_RW(BUFD, 5, 1)
9990 // Number of wait states for read
9991 ADD_BITFIELD_RW(WAIT, 12, 4)
9992 // Read mode
9993 ADD_BITFIELD_RO(RD_MODE_STATUS, 16, 4)
9994 END_TYPE()
9995
9996 // Normal read mode
9997 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_0 = 0;
9998 // Read Margin 0
9999 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_1 = 1;
10000 // Read Margin 1
10001 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_2 = 2;
10002 // Program Verify
10003 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_3 = 3;
10004 // Erase Verify
10005 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_4 = 4;
10006 // Leakage Verify
10007 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_5 = 5;
10008 // Read Margin 0B
10009 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_9 = 9;
10010 // Read Margin 1B
10011 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE__RD_MODE_10 = 10;
10012 // 0 wait states
10013 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_0 = 0;
10014 // 1 wait states
10015 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_1 = 1;
10016 // 2 wait states
10017 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_2 = 2;
10018 // 3 wait states
10019 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_3 = 3;
10020 // 4 wait states
10021 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_4 = 4;
10022 // 5 wait states
10023 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_5 = 5;
10024 // 6 wait states
10025 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_6 = 6;
10026 // 7 wait states
10027 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_7 = 7;
10028 // 8 wait states
10029 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_8 = 8;
10030 // 9 wait states
10031 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_9 = 9;
10032 // 10 wait states
10033 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_10 = 10;
10034 // 11 wait states
10035 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_11 = 11;
10036 // 12 wait states
10037 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_12 = 12;
10038 // 13 wait states
10039 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_13 = 13;
10040 // 14 wait states
10041 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_14 = 14;
10042 // 15 wait states
10043 static const uint32_t FLCTL_BANK0_RDCTL_WAIT__WAIT_15 = 15;
10044 // Normal read mode
10045 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_0 = 0;
10046 // Read Margin 0
10047 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_1 = 1;
10048 // Read Margin 1
10049 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_2 = 2;
10050 // Program Verify
10051 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_3 = 3;
10052 // Erase Verify
10053 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_4 = 4;
10054 // Leakage Verify
10055 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_5 = 5;
10056 // Read Margin 0B
10057 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_9 = 9;
10058 // Read Margin 1B
10059 static const uint32_t FLCTL_BANK0_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_10 = 10;
10060
10061 // Bank1 Read Control Register
10062 // Reset value: 0x00000000
10063 BEGIN_TYPE(FLCTL_BANK1_RDCTL_t, uint32_t)
10064 // Flash read mode control setting for Bank 0
10065 ADD_BITFIELD_RW(RD_MODE, 0, 4)
10066 // Enables read buffering feature for instruction fetches to this Bank
10067 ADD_BITFIELD_RW(BUFI, 4, 1)
10068 // Enables read buffering feature for data reads to this Bank
10069 ADD_BITFIELD_RW(BUFD, 5, 1)
10070 // Read mode
10071 ADD_BITFIELD_RO(RD_MODE_STATUS, 16, 4)
10072 // Number of wait states for read
10073 ADD_BITFIELD_RW(WAIT, 12, 4)
10074 END_TYPE()
10075
10076 // Normal read mode
10077 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_0 = 0;
10078 // Read Margin 0
10079 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_1 = 1;
10080 // Read Margin 1
10081 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_2 = 2;
10082 // Program Verify
10083 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_3 = 3;
10084 // Erase Verify
10085 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_4 = 4;
10086 // Leakage Verify
10087 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_5 = 5;
10088 // Read Margin 0B
10089 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_9 = 9;
10090 // Read Margin 1B
10091 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE__RD_MODE_10 = 10;
10092 // Normal read mode
10093 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_0 = 0;
10094 // Read Margin 0
10095 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_1 = 1;
10096 // Read Margin 1
10097 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_2 = 2;
10098 // Program Verify
10099 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_3 = 3;
10100 // Erase Verify
10101 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_4 = 4;
10102 // Leakage Verify
10103 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_5 = 5;
10104 // Read Margin 0B
10105 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_9 = 9;
10106 // Read Margin 1B
10107 static const uint32_t FLCTL_BANK1_RDCTL_RD_MODE_STATUS__RD_MODE_STATUS_10 = 10;
10108 // 0 wait states
10109 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_0 = 0;
10110 // 1 wait states
10111 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_1 = 1;
10112 // 2 wait states
10113 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_2 = 2;
10114 // 3 wait states
10115 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_3 = 3;
10116 // 4 wait states
10117 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_4 = 4;
10118 // 5 wait states
10119 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_5 = 5;
10120 // 6 wait states
10121 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_6 = 6;
10122 // 7 wait states
10123 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_7 = 7;
10124 // 8 wait states
10125 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_8 = 8;
10126 // 9 wait states
10127 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_9 = 9;
10128 // 10 wait states
10129 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_10 = 10;
10130 // 11 wait states
10131 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_11 = 11;
10132 // 12 wait states
10133 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_12 = 12;
10134 // 13 wait states
10135 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_13 = 13;
10136 // 14 wait states
10137 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_14 = 14;
10138 // 15 wait states
10139 static const uint32_t FLCTL_BANK1_RDCTL_WAIT__WAIT_15 = 15;
10140
10141 // Read Burst/Compare Control and Status Register
10142 // Reset value: 0x00000000
10143 BEGIN_TYPE(FLCTL_RDBRST_CTLSTAT_t, uint32_t)
10144 // Start of burst/compare operation
10145 ADD_BITFIELD_WO(START, 0, 1)
10146 // Type of memory that burst is carried out on
10147 ADD_BITFIELD_RW(MEM_TYPE, 1, 2)
10148 // Terminate burst/compare operation
10149 ADD_BITFIELD_RW(STOP_FAIL, 3, 1)
10150 // Data pattern used for comparison against memory read data
10151 ADD_BITFIELD_RW(DATA_CMP, 4, 1)
10152 // Enable comparison against test data compare registers
10153 ADD_BITFIELD_RW(TEST_EN, 6, 1)
10154 // Status of Burst/Compare operation
10155 ADD_BITFIELD_RO(BRST_STAT, 16, 2)
10156 // Burst/Compare Operation encountered atleast one data
10157 ADD_BITFIELD_RO(CMP_ERR, 18, 1)
10158 // Burst/Compare Operation was terminated due to access to
10159 ADD_BITFIELD_RO(ADDR_ERR, 19, 1)
10160 // Clear status bits 19-16 of this register
10161 ADD_BITFIELD_WO(CLR_STAT, 23, 1)
10162 END_TYPE()
10163
10164 // Main Memory
10165 static const uint32_t FLCTL_RDBRST_CTLSTAT_MEM_TYPE__MEM_TYPE_0 = 0;
10166 // Information Memory
10167 static const uint32_t FLCTL_RDBRST_CTLSTAT_MEM_TYPE__MEM_TYPE_1 = 1;
10168 // Engineering Memory
10169 static const uint32_t FLCTL_RDBRST_CTLSTAT_MEM_TYPE__MEM_TYPE_3 = 3;
10170 // 0000_0000_0000_0000_0000_0000_0000_0000
10171 static const uint32_t FLCTL_RDBRST_CTLSTAT_DATA_CMP__DATA_CMP_0 = 0;
10172 // FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF
10173 static const uint32_t FLCTL_RDBRST_CTLSTAT_DATA_CMP__DATA_CMP_1 = 1;
10174 // Idle
10175 static const uint32_t FLCTL_RDBRST_CTLSTAT_BRST_STAT__BRST_STAT_0 = 0;
10176 // Burst/Compare START bit written, but operation pending
10177 static const uint32_t FLCTL_RDBRST_CTLSTAT_BRST_STAT__BRST_STAT_1 = 1;
10178 // Burst/Compare in progress
10179 static const uint32_t FLCTL_RDBRST_CTLSTAT_BRST_STAT__BRST_STAT_2 = 2;
10180 // Burst complete (status of completed burst remains in this state unless explicitly cleared by SW)
10181 static const uint32_t FLCTL_RDBRST_CTLSTAT_BRST_STAT__BRST_STAT_3 = 3;
10182
10183 // Read Burst/Compare Start Address Register
10184 // Reset value: 0x00000000
10185 BEGIN_TYPE(FLCTL_RDBRST_STARTADDR_t, uint32_t)
10186 // Start Address of Burst Operation
10187 ADD_BITFIELD_RW(START_ADDRESS, 0, 21)
10188 END_TYPE()
10189
10190 // Read Burst/Compare Length Register
10191 // Reset value: 0x00000000
10192 BEGIN_TYPE(FLCTL_RDBRST_LEN_t, uint32_t)
10193 // Length of Burst Operation
10194 ADD_BITFIELD_RW(BURST_LENGTH, 0, 21)
10195 END_TYPE()
10196
10197 // Read Burst/Compare Fail Address Register
10198 // Reset value: 0x00000000
10199 BEGIN_TYPE(FLCTL_RDBRST_FAILADDR_t, uint32_t)
10200 // Reflects address of last failed compare
10201 ADD_BITFIELD_RW(FAIL_ADDRESS, 0, 21)
10202 END_TYPE()
10203
10204 // Read Burst/Compare Fail Count Register
10205 // Reset value: 0x00000000
10206 BEGIN_TYPE(FLCTL_RDBRST_FAILCNT_t, uint32_t)
10207 // Number of failures encountered in burst operation
10208 ADD_BITFIELD_RW(FAIL_COUNT, 0, 17)
10209 END_TYPE()
10210
10211 // Program Control and Status Register
10212 // Reset value: 0x0000000c
10213 BEGIN_TYPE(FLCTL_PRG_CTLSTAT_t, uint32_t)
10214 // Master control for all word program operations
10215 ADD_BITFIELD_RW(ENABLE, 0, 1)
10216 // Write mode
10217 ADD_BITFIELD_RW(MODE, 1, 1)
10218 // Controls automatic pre program verify operations
10219 ADD_BITFIELD_RW(VER_PRE, 2, 1)
10220 // Controls automatic post program verify operations
10221 ADD_BITFIELD_RW(VER_PST, 3, 1)
10222 // Status of program operations in the Flash memory
10223 ADD_BITFIELD_RO(STATUS, 16, 2)
10224 // Bank active
10225 ADD_BITFIELD_RO(BNK_ACT, 18, 1)
10226 END_TYPE()
10227
10228 // Word program operation disabled
10229 static const uint32_t FLCTL_PRG_CTLSTAT_ENABLE__ENABLE_0 = 0;
10230 // Word program operation enabled
10231 static const uint32_t FLCTL_PRG_CTLSTAT_ENABLE__ENABLE_1 = 1;
10232 // Write immediate mode. Starts program operation immediately on each write to the Flash
10233 static const uint32_t FLCTL_PRG_CTLSTAT_MODE__MODE_0 = 0;
10234 // Full word write mode. Flash controller collates data over multiple writes to compose the full 128bit word before initiating the program operation
10235 static const uint32_t FLCTL_PRG_CTLSTAT_MODE__MODE_1 = 1;
10236 // No pre program verification
10237 static const uint32_t FLCTL_PRG_CTLSTAT_VER_PRE__VER_PRE_0 = 0;
10238 // Pre verify feature automatically invoked for each write operation (irrespective of the mode)
10239 static const uint32_t FLCTL_PRG_CTLSTAT_VER_PRE__VER_PRE_1 = 1;
10240 // No post program verification
10241 static const uint32_t FLCTL_PRG_CTLSTAT_VER_PST__VER_PST_0 = 0;
10242 // Post verify feature automatically invoked for each write operation (irrespective of the mode)
10243 static const uint32_t FLCTL_PRG_CTLSTAT_VER_PST__VER_PST_1 = 1;
10244 // Idle (no program operation currently active)
10245 static const uint32_t FLCTL_PRG_CTLSTAT_STATUS__STATUS_0 = 0;
10246 // Single word program operation triggered, but pending
10247 static const uint32_t FLCTL_PRG_CTLSTAT_STATUS__STATUS_1 = 1;
10248 // Single word program in progress
10249 static const uint32_t FLCTL_PRG_CTLSTAT_STATUS__STATUS_2 = 2;
10250 // Word in Bank0 being programmed
10251 static const uint32_t FLCTL_PRG_CTLSTAT_BNK_ACT__BNK_ACT_0 = 0;
10252 // Word in Bank1 being programmed
10253 static const uint32_t FLCTL_PRG_CTLSTAT_BNK_ACT__BNK_ACT_1 = 1;
10254
10255 // Program Burst Control and Status Register
10256 // Reset value: 0x000000c0
10257 BEGIN_TYPE(FLCTL_PRGBRST_CTLSTAT_t, uint32_t)
10258 // Trigger start of burst program operation
10259 ADD_BITFIELD_WO(START, 0, 1)
10260 // Type of memory that burst program is carried out on
10261 ADD_BITFIELD_RW(TYPE, 1, 2)
10262 // Length of burst
10263 ADD_BITFIELD_RW(LEN, 3, 3)
10264 // Auto-Verify operation before the Burst Program
10265 ADD_BITFIELD_RW(AUTO_PRE, 6, 1)
10266 // Auto-Verify operation after the Burst Program
10267 ADD_BITFIELD_RW(AUTO_PST, 7, 1)
10268 // Status of a Burst Operation
10269 ADD_BITFIELD_RO(BURST_STATUS, 16, 3)
10270 // Burst Operation encountered preprogram auto-verify errors
10271 ADD_BITFIELD_RO(PRE_ERR, 19, 1)
10272 // Burst Operation encountered postprogram auto-verify errors
10273 ADD_BITFIELD_RO(PST_ERR, 20, 1)
10274 // Burst Operation was terminated due to attempted program of reserved memory
10275 ADD_BITFIELD_RO(ADDR_ERR, 21, 1)
10276 // Clear status bits 21-16 of this register
10277 ADD_BITFIELD_WO(CLR_STAT, 23, 1)
10278 END_TYPE()
10279
10280 // Main Memory
10281 static const uint32_t FLCTL_PRGBRST_CTLSTAT_TYPE__TYPE_0 = 0;
10282 // Information Memory
10283 static const uint32_t FLCTL_PRGBRST_CTLSTAT_TYPE__TYPE_1 = 1;
10284 // Engineering Memory
10285 static const uint32_t FLCTL_PRGBRST_CTLSTAT_TYPE__TYPE_3 = 3;
10286 // No burst operation
10287 static const uint32_t FLCTL_PRGBRST_CTLSTAT_LEN__LEN_0 = 0;
10288 // 1 word burst of 128 bits, starting with address in the FLCTL_PRGBRST_STARTADDR Register
10289 static const uint32_t FLCTL_PRGBRST_CTLSTAT_LEN__LEN_1 = 1;
10290 // 2*128 bits burst write, starting with address in the FLCTL_PRGBRST_STARTADDR Register
10291 static const uint32_t FLCTL_PRGBRST_CTLSTAT_LEN__LEN_2 = 2;
10292 // 3*128 bits burst write, starting with address in the FLCTL_PRGBRST_STARTADDR Register
10293 static const uint32_t FLCTL_PRGBRST_CTLSTAT_LEN__LEN_3 = 3;
10294 // 4*128 bits burst write, starting with address in the FLCTL_PRGBRST_STARTADDR Register
10295 static const uint32_t FLCTL_PRGBRST_CTLSTAT_LEN__LEN_4 = 4;
10296 // No program verify operations carried out
10297 static const uint32_t FLCTL_PRGBRST_CTLSTAT_AUTO_PRE__AUTO_PRE_0 = 0;
10298 // Causes an automatic Burst Program Verify after the Burst Program Operation
10299 static const uint32_t FLCTL_PRGBRST_CTLSTAT_AUTO_PRE__AUTO_PRE_1 = 1;
10300 // No program verify operations carried out
10301 static const uint32_t FLCTL_PRGBRST_CTLSTAT_AUTO_PST__AUTO_PST_0 = 0;
10302 // Causes an automatic Burst Program Verify before the Burst Program Operation
10303 static const uint32_t FLCTL_PRGBRST_CTLSTAT_AUTO_PST__AUTO_PST_1 = 1;
10304 // Idle (Burst not active)
10305 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_0 = 0;
10306 // Burst program started but pending
10307 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_1 = 1;
10308 // Burst active, with 1st 128 bit word being written into Flash
10309 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_2 = 2;
10310 // Burst active, with 2nd 128 bit word being written into Flash
10311 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_3 = 3;
10312 // Burst active, with 3rd 128 bit word being written into Flash
10313 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_4 = 4;
10314 // Burst active, with 4th 128 bit word being written into Flash
10315 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_5 = 5;
10316 // Burst Complete (status of completed burst remains in this state unless explicitly cleared by SW)
10317 static const uint32_t FLCTL_PRGBRST_CTLSTAT_BURST_STATUS__BURST_STATUS_7 = 7;
10318
10319 // Program Burst Start Address Register
10320 // Reset value: 0x00000000
10321 BEGIN_TYPE(FLCTL_PRGBRST_STARTADDR_t, uint32_t)
10322 // Start Address of Program Burst Operation
10323 ADD_BITFIELD_RW(START_ADDRESS, 0, 22)
10324 END_TYPE()
10325
10326 // Program Burst Data0 Register0
10327 // Reset value: 0xffffffff
10328 BEGIN_TYPE(FLCTL_PRGBRST_DATA0_0_t, uint32_t)
10329 // Program Burst 128 bit Data Word 0
10330 ADD_BITFIELD_RW(DATAIN, 0, 32)
10331 END_TYPE()
10332
10333 // Program Burst Data0 Register1
10334 // Reset value: 0xffffffff
10335 BEGIN_TYPE(FLCTL_PRGBRST_DATA0_1_t, uint32_t)
10336 // Program Burst 128 bit Data Word 0
10337 ADD_BITFIELD_RW(DATAIN, 0, 32)
10338 END_TYPE()
10339
10340 // Program Burst Data0 Register2
10341 // Reset value: 0xffffffff
10342 BEGIN_TYPE(FLCTL_PRGBRST_DATA0_2_t, uint32_t)
10343 // Program Burst 128 bit Data Word 0
10344 ADD_BITFIELD_RW(DATAIN, 0, 32)
10345 END_TYPE()
10346
10347 // Program Burst Data0 Register3
10348 // Reset value: 0xffffffff
10349 BEGIN_TYPE(FLCTL_PRGBRST_DATA0_3_t, uint32_t)
10350 // Program Burst 128 bit Data Word 0
10351 ADD_BITFIELD_RW(DATAIN, 0, 32)
10352 END_TYPE()
10353
10354 // Program Burst Data1 Register0
10355 // Reset value: 0xffffffff
10356 BEGIN_TYPE(FLCTL_PRGBRST_DATA1_0_t, uint32_t)
10357 // Program Burst 128 bit Data Word 1
10358 ADD_BITFIELD_RW(DATAIN, 0, 32)
10359 END_TYPE()
10360
10361 // Program Burst Data1 Register1
10362 // Reset value: 0xffffffff
10363 BEGIN_TYPE(FLCTL_PRGBRST_DATA1_1_t, uint32_t)
10364 // Program Burst 128 bit Data Word 1
10365 ADD_BITFIELD_RW(DATAIN, 0, 32)
10366 END_TYPE()
10367
10368 // Program Burst Data1 Register2
10369 // Reset value: 0xffffffff
10370 BEGIN_TYPE(FLCTL_PRGBRST_DATA1_2_t, uint32_t)
10371 // Program Burst 128 bit Data Word 1
10372 ADD_BITFIELD_RW(DATAIN, 0, 32)
10373 END_TYPE()
10374
10375 // Program Burst Data1 Register3
10376 // Reset value: 0xffffffff
10377 BEGIN_TYPE(FLCTL_PRGBRST_DATA1_3_t, uint32_t)
10378 // Program Burst 128 bit Data Word 1
10379 ADD_BITFIELD_RW(DATAIN, 0, 32)
10380 END_TYPE()
10381
10382 // Program Burst Data2 Register0
10383 // Reset value: 0xffffffff
10384 BEGIN_TYPE(FLCTL_PRGBRST_DATA2_0_t, uint32_t)
10385 // Program Burst 128 bit Data Word 2
10386 ADD_BITFIELD_RW(DATAIN, 0, 32)
10387 END_TYPE()
10388
10389 // Program Burst Data2 Register1
10390 // Reset value: 0xffffffff
10391 BEGIN_TYPE(FLCTL_PRGBRST_DATA2_1_t, uint32_t)
10392 // Program Burst 128 bit Data Word 2
10393 ADD_BITFIELD_RW(DATAIN, 0, 32)
10394 END_TYPE()
10395
10396 // Program Burst Data2 Register2
10397 // Reset value: 0xffffffff
10398 BEGIN_TYPE(FLCTL_PRGBRST_DATA2_2_t, uint32_t)
10399 // Program Burst 128 bit Data Word 2
10400 ADD_BITFIELD_RW(DATAIN, 0, 32)
10401 END_TYPE()
10402
10403 // Program Burst Data2 Register3
10404 // Reset value: 0xffffffff
10405 BEGIN_TYPE(FLCTL_PRGBRST_DATA2_3_t, uint32_t)
10406 // Program Burst 128 bit Data Word 2
10407 ADD_BITFIELD_RW(DATAIN, 0, 32)
10408 END_TYPE()
10409
10410 // Program Burst Data3 Register0
10411 // Reset value: 0xffffffff
10412 BEGIN_TYPE(FLCTL_PRGBRST_DATA3_0_t, uint32_t)
10413 // Program Burst 128 bit Data Word 3
10414 ADD_BITFIELD_RW(DATAIN, 0, 32)
10415 END_TYPE()
10416
10417 // Program Burst Data3 Register1
10418 // Reset value: 0xffffffff
10419 BEGIN_TYPE(FLCTL_PRGBRST_DATA3_1_t, uint32_t)
10420 // Program Burst 128 bit Data Word 3
10421 ADD_BITFIELD_RW(DATAIN, 0, 32)
10422 END_TYPE()
10423
10424 // Program Burst Data3 Register2
10425 // Reset value: 0xffffffff
10426 BEGIN_TYPE(FLCTL_PRGBRST_DATA3_2_t, uint32_t)
10427 // Program Burst 128 bit Data Word 3
10428 ADD_BITFIELD_RW(DATAIN, 0, 32)
10429 END_TYPE()
10430
10431 // Program Burst Data3 Register3
10432 // Reset value: 0xffffffff
10433 BEGIN_TYPE(FLCTL_PRGBRST_DATA3_3_t, uint32_t)
10434 // Program Burst 128 bit Data Word 3
10435 ADD_BITFIELD_RW(DATAIN, 0, 32)
10436 END_TYPE()
10437
10438 // Erase Control and Status Register
10439 // Reset value: 0x00000000
10440 BEGIN_TYPE(FLCTL_ERASE_CTLSTAT_t, uint32_t)
10441 // Start of Erase operation
10442 ADD_BITFIELD_WO(START, 0, 1)
10443 // Erase mode selected by application
10444 ADD_BITFIELD_RW(MODE, 1, 1)
10445 // Type of memory that erase operation is carried out on
10446 ADD_BITFIELD_RW(TYPE, 2, 2)
10447 // Status of erase operations in the Flash memory
10448 ADD_BITFIELD_RO(STATUS, 16, 2)
10449 // Erase Operation was terminated due to attempted erase of reserved memory address
10450 ADD_BITFIELD_RO(ADDR_ERR, 18, 1)
10451 // Clear status bits 18-16 of this register
10452 ADD_BITFIELD_WO(CLR_STAT, 19, 1)
10453 END_TYPE()
10454
10455 // Sector Erase (controlled by FLTCTL_ERASE_SECTADDR)
10456 static const uint32_t FLCTL_ERASE_CTLSTAT_MODE__MODE_0 = 0;
10457 // Mass Erase (includes all Main and Information memory sectors that don't have corresponding WE bits set)
10458 static const uint32_t FLCTL_ERASE_CTLSTAT_MODE__MODE_1 = 1;
10459 // Main Memory
10460 static const uint32_t FLCTL_ERASE_CTLSTAT_TYPE__TYPE_0 = 0;
10461 // Information Memory
10462 static const uint32_t FLCTL_ERASE_CTLSTAT_TYPE__TYPE_1 = 1;
10463 // Engineering Memory
10464 static const uint32_t FLCTL_ERASE_CTLSTAT_TYPE__TYPE_3 = 3;
10465 // Idle (no program operation currently active)
10466 static const uint32_t FLCTL_ERASE_CTLSTAT_STATUS__STATUS_0 = 0;
10467 // Erase operation triggered to START but pending
10468 static const uint32_t FLCTL_ERASE_CTLSTAT_STATUS__STATUS_1 = 1;
10469 // Erase operation in progress
10470 static const uint32_t FLCTL_ERASE_CTLSTAT_STATUS__STATUS_2 = 2;
10471 // Erase operation completed (status of completed erase remains in this state unless explicitly cleared by SW)
10472 static const uint32_t FLCTL_ERASE_CTLSTAT_STATUS__STATUS_3 = 3;
10473
10474 // Erase Sector Address Register
10475 // Reset value: 0x00000000
10476 BEGIN_TYPE(FLCTL_ERASE_SECTADDR_t, uint32_t)
10477 // Address of Sector being Erased
10478 ADD_BITFIELD_RW(SECT_ADDRESS, 0, 22)
10479 END_TYPE()
10480
10481 // Information Memory Bank0 Write/Erase Protection Register
10482 // Reset value: 0x00000003
10483 BEGIN_TYPE(FLCTL_BANK0_INFO_WEPROT_t, uint32_t)
10484 // Protects Sector 0 from program or erase
10485 ADD_BITFIELD_RW(PROT0, 0, 1)
10486 // Protects Sector 1 from program or erase
10487 ADD_BITFIELD_RW(PROT1, 1, 1)
10488 END_TYPE()
10489
10490 // Main Memory Bank0 Write/Erase Protection Register
10491 // Reset value: 0xffffffff
10492 BEGIN_TYPE(FLCTL_BANK0_MAIN_WEPROT_t, uint32_t)
10493 // Protects Sector 0 from program or erase
10494 ADD_BITFIELD_RW(PROT0, 0, 1)
10495 // Protects Sector 1 from program or erase
10496 ADD_BITFIELD_RW(PROT1, 1, 1)
10497 // Protects Sector 2 from program or erase
10498 ADD_BITFIELD_RW(PROT2, 2, 1)
10499 // Protects Sector 3 from program or erase
10500 ADD_BITFIELD_RW(PROT3, 3, 1)
10501 // Protects Sector 4 from program or erase
10502 ADD_BITFIELD_RW(PROT4, 4, 1)
10503 // Protects Sector 5 from program or erase
10504 ADD_BITFIELD_RW(PROT5, 5, 1)
10505 // Protects Sector 6 from program or erase
10506 ADD_BITFIELD_RW(PROT6, 6, 1)
10507 // Protects Sector 7 from program or erase
10508 ADD_BITFIELD_RW(PROT7, 7, 1)
10509 // Protects Sector 8 from program or erase
10510 ADD_BITFIELD_RW(PROT8, 8, 1)
10511 // Protects Sector 9 from program or erase
10512 ADD_BITFIELD_RW(PROT9, 9, 1)
10513 // Protects Sector 10 from program or erase
10514 ADD_BITFIELD_RW(PROT10, 10, 1)
10515 // Protects Sector 11 from program or erase
10516 ADD_BITFIELD_RW(PROT11, 11, 1)
10517 // Protects Sector 12 from program or erase
10518 ADD_BITFIELD_RW(PROT12, 12, 1)
10519 // Protects Sector 13 from program or erase
10520 ADD_BITFIELD_RW(PROT13, 13, 1)
10521 // Protects Sector 14 from program or erase
10522 ADD_BITFIELD_RW(PROT14, 14, 1)
10523 // Protects Sector 15 from program or erase
10524 ADD_BITFIELD_RW(PROT15, 15, 1)
10525 // Protects Sector 16 from program or erase
10526 ADD_BITFIELD_RW(PROT16, 16, 1)
10527 // Protects Sector 17 from program or erase
10528 ADD_BITFIELD_RW(PROT17, 17, 1)
10529 // Protects Sector 18 from program or erase
10530 ADD_BITFIELD_RW(PROT18, 18, 1)
10531 // Protects Sector 19 from program or erase
10532 ADD_BITFIELD_RW(PROT19, 19, 1)
10533 // Protects Sector 20 from program or erase
10534 ADD_BITFIELD_RW(PROT20, 20, 1)
10535 // Protects Sector 21 from program or erase
10536 ADD_BITFIELD_RW(PROT21, 21, 1)
10537 // Protects Sector 22 from program or erase
10538 ADD_BITFIELD_RW(PROT22, 22, 1)
10539 // Protects Sector 23 from program or erase
10540 ADD_BITFIELD_RW(PROT23, 23, 1)
10541 // Protects Sector 24 from program or erase
10542 ADD_BITFIELD_RW(PROT24, 24, 1)
10543 // Protects Sector 25 from program or erase
10544 ADD_BITFIELD_RW(PROT25, 25, 1)
10545 // Protects Sector 26 from program or erase
10546 ADD_BITFIELD_RW(PROT26, 26, 1)
10547 // Protects Sector 27 from program or erase
10548 ADD_BITFIELD_RW(PROT27, 27, 1)
10549 // Protects Sector 28 from program or erase
10550 ADD_BITFIELD_RW(PROT28, 28, 1)
10551 // Protects Sector 29 from program or erase
10552 ADD_BITFIELD_RW(PROT29, 29, 1)
10553 // Protects Sector 30 from program or erase
10554 ADD_BITFIELD_RW(PROT30, 30, 1)
10555 // Protects Sector 31 from program or erase
10556 ADD_BITFIELD_RW(PROT31, 31, 1)
10557 END_TYPE()
10558
10559 // Information Memory Bank1 Write/Erase Protection Register
10560 // Reset value: 0x00000003
10561 BEGIN_TYPE(FLCTL_BANK1_INFO_WEPROT_t, uint32_t)
10562 // Protects Sector 0 from program or erase operations
10563 ADD_BITFIELD_RW(PROT0, 0, 1)
10564 // Protects Sector 1 from program or erase operations
10565 ADD_BITFIELD_RW(PROT1, 1, 1)
10566 END_TYPE()
10567
10568 // Main Memory Bank1 Write/Erase Protection Register
10569 // Reset value: 0xffffffff
10570 BEGIN_TYPE(FLCTL_BANK1_MAIN_WEPROT_t, uint32_t)
10571 // Protects Sector 0 from program or erase operations
10572 ADD_BITFIELD_RW(PROT0, 0, 1)
10573 // Protects Sector 1 from program or erase operations
10574 ADD_BITFIELD_RW(PROT1, 1, 1)
10575 // Protects Sector 2 from program or erase operations
10576 ADD_BITFIELD_RW(PROT2, 2, 1)
10577 // Protects Sector 3 from program or erase operations
10578 ADD_BITFIELD_RW(PROT3, 3, 1)
10579 // Protects Sector 4 from program or erase operations
10580 ADD_BITFIELD_RW(PROT4, 4, 1)
10581 // Protects Sector 5 from program or erase operations
10582 ADD_BITFIELD_RW(PROT5, 5, 1)
10583 // Protects Sector 6 from program or erase operations
10584 ADD_BITFIELD_RW(PROT6, 6, 1)
10585 // Protects Sector 7 from program or erase operations
10586 ADD_BITFIELD_RW(PROT7, 7, 1)
10587 // Protects Sector 8 from program or erase operations
10588 ADD_BITFIELD_RW(PROT8, 8, 1)
10589 // Protects Sector 9 from program or erase operations
10590 ADD_BITFIELD_RW(PROT9, 9, 1)
10591 // Protects Sector 10 from program or erase operations
10592 ADD_BITFIELD_RW(PROT10, 10, 1)
10593 // Protects Sector 11 from program or erase operations
10594 ADD_BITFIELD_RW(PROT11, 11, 1)
10595 // Protects Sector 12 from program or erase operations
10596 ADD_BITFIELD_RW(PROT12, 12, 1)
10597 // Protects Sector 13 from program or erase operations
10598 ADD_BITFIELD_RW(PROT13, 13, 1)
10599 // Protects Sector 14 from program or erase operations
10600 ADD_BITFIELD_RW(PROT14, 14, 1)
10601 // Protects Sector 15 from program or erase operations
10602 ADD_BITFIELD_RW(PROT15, 15, 1)
10603 // Protects Sector 16 from program or erase operations
10604 ADD_BITFIELD_RW(PROT16, 16, 1)
10605 // Protects Sector 17 from program or erase operations
10606 ADD_BITFIELD_RW(PROT17, 17, 1)
10607 // Protects Sector 18 from program or erase operations
10608 ADD_BITFIELD_RW(PROT18, 18, 1)
10609 // Protects Sector 19 from program or erase operations
10610 ADD_BITFIELD_RW(PROT19, 19, 1)
10611 // Protects Sector 20 from program or erase operations
10612 ADD_BITFIELD_RW(PROT20, 20, 1)
10613 // Protects Sector 21 from program or erase operations
10614 ADD_BITFIELD_RW(PROT21, 21, 1)
10615 // Protects Sector 22 from program or erase operations
10616 ADD_BITFIELD_RW(PROT22, 22, 1)
10617 // Protects Sector 23 from program or erase operations
10618 ADD_BITFIELD_RW(PROT23, 23, 1)
10619 // Protects Sector 24 from program or erase operations
10620 ADD_BITFIELD_RW(PROT24, 24, 1)
10621 // Protects Sector 25 from program or erase operations
10622 ADD_BITFIELD_RW(PROT25, 25, 1)
10623 // Protects Sector 26 from program or erase operations
10624 ADD_BITFIELD_RW(PROT26, 26, 1)
10625 // Protects Sector 27 from program or erase operations
10626 ADD_BITFIELD_RW(PROT27, 27, 1)
10627 // Protects Sector 28 from program or erase operations
10628 ADD_BITFIELD_RW(PROT28, 28, 1)
10629 // Protects Sector 29 from program or erase operations
10630 ADD_BITFIELD_RW(PROT29, 29, 1)
10631 // Protects Sector 30 from program or erase operations
10632 ADD_BITFIELD_RW(PROT30, 30, 1)
10633 // Protects Sector 31 from program or erase operations
10634 ADD_BITFIELD_RW(PROT31, 31, 1)
10635 END_TYPE()
10636
10637 // Benchmark Control and Status Register
10638 // Reset value: 0x00000000
10639 BEGIN_TYPE(FLCTL_BMRK_CTLSTAT_t, uint32_t)
10640 // When 1, increments the Instruction Benchmark count register on each instruction fetch to the Flash
10641 ADD_BITFIELD_RW(I_BMRK, 0, 1)
10642 // When 1, increments the Data Benchmark count register on each data read access to the Flash
10643 ADD_BITFIELD_RW(D_BMRK, 1, 1)
10644 // When 1, enables comparison of the Instruction or Data Benchmark Registers against the threshold value
10645 ADD_BITFIELD_RW(CMP_EN, 2, 1)
10646 // Selects which benchmark register should be compared against the threshold
10647 ADD_BITFIELD_RW(CMP_SEL, 3, 1)
10648 END_TYPE()
10649
10650 // Compares the Instruction Benchmark Register against the threshold value
10651 static const uint32_t FLCTL_BMRK_CTLSTAT_CMP_SEL__en_1_0x0 = 0;
10652 // Compares the Data Benchmark Register against the threshold value
10653 static const uint32_t FLCTL_BMRK_CTLSTAT_CMP_SEL__en_2_0x1 = 1;
10654
10655 // Benchmark Instruction Fetch Count Register
10656 // Reset value: 0x00000000
10657 BEGIN_TYPE(FLCTL_BMRK_IFETCH_t, uint32_t)
10658 // Reflects the number of Instruction Fetches to the Flash (increments by one on each fetch)
10659 ADD_BITFIELD_RW(COUNT, 0, 32)
10660 END_TYPE()
10661
10662 // Benchmark Data Read Count Register
10663 // Reset value: 0x00000000
10664 BEGIN_TYPE(FLCTL_BMRK_DREAD_t, uint32_t)
10665 // Reflects the number of Data Read operations to the Flash (increments by one on each read)
10666 ADD_BITFIELD_RW(COUNT, 0, 32)
10667 END_TYPE()
10668
10669 // Benchmark Count Compare Register
10670 // Reset value: 0x00010000
10671 BEGIN_TYPE(FLCTL_BMRK_CMP_t, uint32_t)
10672 // Reflects the threshold value that is compared against either the IFETCH or DREAD Benchmark Counters
10673 ADD_BITFIELD_RW(COUNT, 0, 32)
10674 END_TYPE()
10675
10676 // Interrupt Flag Register
10677 // Reset value: 0x00000000
10678 BEGIN_TYPE(FLCTL_IFG_t, uint32_t)
10679 // If set to 1, indicates that the Read Burst/Compare operation is complete
10680 ADD_BITFIELD_RO(RDBRST, 0, 1)
10681 // If set to 1, indicates that the pre-program verify operation has detected an error
10682 ADD_BITFIELD_RO(AVPRE, 1, 1)
10683 // If set to 1, indicates that the post-program verify operation has failed comparison
10684 ADD_BITFIELD_RO(AVPST, 2, 1)
10685 // If set to 1, indicates that a word Program operation is complete
10686 ADD_BITFIELD_RO(PRG, 3, 1)
10687 // If set to 1, indicates that the configured Burst Program operation is complete
10688 ADD_BITFIELD_RO(PRGB, 4, 1)
10689 // If set to 1, indicates that the Erase operation is complete
10690 ADD_BITFIELD_RO(ERASE, 5, 1)
10691 // If set to 1, indicates that a Benchmark Compare match occurred
10692 ADD_BITFIELD_RO(BMRK, 8, 1)
10693 // If set to 1, indicates a word composition error in full word write mode (possible data loss due to writes crossing over to a new 128bit boundary before full word has been composed)
10694 ADD_BITFIELD_RO(PRG_ERR, 9, 1)
10695 END_TYPE()
10696
10697 // Interrupt Enable Register
10698 // Reset value: 0x00000000
10699 BEGIN_TYPE(FLCTL_IE_t, uint32_t)
10700 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10701 ADD_BITFIELD_RW(RDBRST, 0, 1)
10702 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10703 ADD_BITFIELD_RW(AVPRE, 1, 1)
10704 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10705 ADD_BITFIELD_RW(AVPST, 2, 1)
10706 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10707 ADD_BITFIELD_RW(PRG, 3, 1)
10708 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10709 ADD_BITFIELD_RW(PRGB, 4, 1)
10710 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10711 ADD_BITFIELD_RW(ERASE, 5, 1)
10712 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10713 ADD_BITFIELD_RW(BMRK, 8, 1)
10714 // If set to 1, enables the Controller to generate an interrupt based on the corresponding bit in the FLCTL_IFG
10715 ADD_BITFIELD_RW(PRG_ERR, 9, 1)
10716 END_TYPE()
10717
10718 // Clear Interrupt Flag Register
10719 // Reset value: 0x00000000
10720 BEGIN_TYPE(FLCTL_CLRIFG_t, uint32_t)
10721 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10722 ADD_BITFIELD_WO(RDBRST, 0, 1)
10723 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10724 ADD_BITFIELD_WO(AVPRE, 1, 1)
10725 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10726 ADD_BITFIELD_WO(AVPST, 2, 1)
10727 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10728 ADD_BITFIELD_WO(PRG, 3, 1)
10729 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10730 ADD_BITFIELD_WO(PRGB, 4, 1)
10731 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10732 ADD_BITFIELD_WO(ERASE, 5, 1)
10733 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10734 ADD_BITFIELD_WO(BMRK, 8, 1)
10735 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10736 ADD_BITFIELD_WO(PRG_ERR, 9, 1)
10737 END_TYPE()
10738
10739 // Set Interrupt Flag Register
10740 // Reset value: 0x00000000
10741 BEGIN_TYPE(FLCTL_SETIFG_t, uint32_t)
10742 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10743 ADD_BITFIELD_WO(RDBRST, 0, 1)
10744 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10745 ADD_BITFIELD_WO(AVPRE, 1, 1)
10746 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10747 ADD_BITFIELD_WO(AVPST, 2, 1)
10748 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10749 ADD_BITFIELD_WO(PRG, 3, 1)
10750 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10751 ADD_BITFIELD_WO(PRGB, 4, 1)
10752 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10753 ADD_BITFIELD_WO(ERASE, 5, 1)
10754 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10755 ADD_BITFIELD_WO(BMRK, 8, 1)
10756 // Write 1 clears the corresponding interrupt flag bit in the FLCTL_IFG
10757 ADD_BITFIELD_WO(PRG_ERR, 9, 1)
10758 END_TYPE()
10759
10760 // Read Timing Control Register
10761 BEGIN_TYPE(FLCTL_READ_TIMCTL_t, uint32_t)
10762 // Configures the length of the Setup phase for this operation
10763 ADD_BITFIELD_RO(SETUP, 0, 8)
10764 // Length of the IREF_BOOST1 signal of the IP
10765 ADD_BITFIELD_RO(IREF_BOOST1, 12, 4)
10766 // Length of the Setup time into read mode when the device is recovering from one of the following conditions: Moving from Power-down or Standby back to Active and device is not trimmed. Moving from standby to active state in low-frequency active mode. Recovering from the LDO Boost operation after a Mass Erase.
10767 ADD_BITFIELD_RO(SETUP_LONG, 16, 8)
10768 END_TYPE()
10769
10770 // Read Margin Timing Control Register
10771 BEGIN_TYPE(FLCTL_READMARGIN_TIMCTL_t, uint32_t)
10772 // Length of the Setup phase for this operation
10773 ADD_BITFIELD_RO(SETUP, 0, 8)
10774 END_TYPE()
10775
10776 // Program Verify Timing Control Register
10777 BEGIN_TYPE(FLCTL_PRGVER_TIMCTL_t, uint32_t)
10778 // Length of the Setup phase for this operation
10779 ADD_BITFIELD_RO(SETUP, 0, 8)
10780 // Length of the Active phase for this operation
10781 ADD_BITFIELD_RO(ACTIVE, 8, 4)
10782 // Length of the Hold phase for this operation
10783 ADD_BITFIELD_RO(HOLD, 12, 4)
10784 END_TYPE()
10785
10786 // Erase Verify Timing Control Register
10787 BEGIN_TYPE(FLCTL_ERSVER_TIMCTL_t, uint32_t)
10788 // Length of the Setup phase for this operation
10789 ADD_BITFIELD_RO(SETUP, 0, 8)
10790 END_TYPE()
10791
10792 // Leakage Verify Timing Control Register
10793 BEGIN_TYPE(FLCTL_LKGVER_TIMCTL_t, uint32_t)
10794 // Length of the Setup phase for this operation
10795 ADD_BITFIELD_RO(SETUP, 0, 8)
10796 END_TYPE()
10797
10798 // Program Timing Control Register
10799 BEGIN_TYPE(FLCTL_PROGRAM_TIMCTL_t, uint32_t)
10800 // Length of the Setup phase for this operation
10801 ADD_BITFIELD_RO(SETUP, 0, 8)
10802 // Length of the Active phase for this operation
10803 ADD_BITFIELD_RO(ACTIVE, 8, 20)
10804 // Length of the Hold phase for this operation
10805 ADD_BITFIELD_RO(HOLD, 28, 4)
10806 END_TYPE()
10807
10808 // Erase Timing Control Register
10809 BEGIN_TYPE(FLCTL_ERASE_TIMCTL_t, uint32_t)
10810 // Length of the Setup phase for this operation
10811 ADD_BITFIELD_RO(SETUP, 0, 8)
10812 // Length of the Active phase for this operation
10813 ADD_BITFIELD_RO(ACTIVE, 8, 20)
10814 // Length of the Hold phase for this operation
10815 ADD_BITFIELD_RO(HOLD, 28, 4)
10816 END_TYPE()
10817
10818 // Mass Erase Timing Control Register
10819 BEGIN_TYPE(FLCTL_MASSERASE_TIMCTL_t, uint32_t)
10820 // Length of the time for which LDO Boost Signal is kept active
10821 ADD_BITFIELD_RO(BOOST_ACTIVE, 0, 8)
10822 // Length for which Flash deactivates the LDO Boost signal before processing any new commands
10823 ADD_BITFIELD_RO(BOOST_HOLD, 8, 8)
10824 END_TYPE()
10825
10826 // Burst Program Timing Control Register
10827 BEGIN_TYPE(FLCTL_BURSTPRG_TIMCTL_t, uint32_t)
10828 // Length of the Active phase for this operation
10829 ADD_BITFIELD_RO(ACTIVE, 8, 20)
10830 END_TYPE()
10831
10832 struct FLCTL_t {
10833 FLCTL_POWER_STAT_t FLCTL_POWER_STAT;
10834 uint32_t reserved0[3];
10835 FLCTL_BANK0_RDCTL_t FLCTL_BANK0_RDCTL;
10836 FLCTL_BANK1_RDCTL_t FLCTL_BANK1_RDCTL;
10837 uint32_t reserved1[2];
10838 FLCTL_RDBRST_CTLSTAT_t FLCTL_RDBRST_CTLSTAT;
10839 FLCTL_RDBRST_STARTADDR_t FLCTL_RDBRST_STARTADDR;
10840 FLCTL_RDBRST_LEN_t FLCTL_RDBRST_LEN;
10841 uint32_t reserved2[4];
10842 FLCTL_RDBRST_FAILADDR_t FLCTL_RDBRST_FAILADDR;
10843 FLCTL_RDBRST_FAILCNT_t FLCTL_RDBRST_FAILCNT;
10844 uint32_t reserved3[3];
10845 FLCTL_PRG_CTLSTAT_t FLCTL_PRG_CTLSTAT;
10846 FLCTL_PRGBRST_CTLSTAT_t FLCTL_PRGBRST_CTLSTAT;
10847 FLCTL_PRGBRST_STARTADDR_t FLCTL_PRGBRST_STARTADDR;
10848 uint32_t reserved4;
10849 FLCTL_PRGBRST_DATA0_0_t FLCTL_PRGBRST_DATA0_0;
10850 FLCTL_PRGBRST_DATA0_1_t FLCTL_PRGBRST_DATA0_1;
10851 FLCTL_PRGBRST_DATA0_2_t FLCTL_PRGBRST_DATA0_2;
10852 FLCTL_PRGBRST_DATA0_3_t FLCTL_PRGBRST_DATA0_3;
10853 FLCTL_PRGBRST_DATA1_0_t FLCTL_PRGBRST_DATA1_0;
10854 FLCTL_PRGBRST_DATA1_1_t FLCTL_PRGBRST_DATA1_1;
10855 FLCTL_PRGBRST_DATA1_2_t FLCTL_PRGBRST_DATA1_2;
10856 FLCTL_PRGBRST_DATA1_3_t FLCTL_PRGBRST_DATA1_3;
10857 FLCTL_PRGBRST_DATA2_0_t FLCTL_PRGBRST_DATA2_0;
10858 FLCTL_PRGBRST_DATA2_1_t FLCTL_PRGBRST_DATA2_1;
10859 FLCTL_PRGBRST_DATA2_2_t FLCTL_PRGBRST_DATA2_2;
10860 FLCTL_PRGBRST_DATA2_3_t FLCTL_PRGBRST_DATA2_3;
10861 FLCTL_PRGBRST_DATA3_0_t FLCTL_PRGBRST_DATA3_0;
10862 FLCTL_PRGBRST_DATA3_1_t FLCTL_PRGBRST_DATA3_1;
10863 FLCTL_PRGBRST_DATA3_2_t FLCTL_PRGBRST_DATA3_2;
10864 FLCTL_PRGBRST_DATA3_3_t FLCTL_PRGBRST_DATA3_3;
10865 FLCTL_ERASE_CTLSTAT_t FLCTL_ERASE_CTLSTAT;
10866 FLCTL_ERASE_SECTADDR_t FLCTL_ERASE_SECTADDR;
10867 uint32_t reserved5[2];
10868 FLCTL_BANK0_INFO_WEPROT_t FLCTL_BANK0_INFO_WEPROT;
10869 FLCTL_BANK0_MAIN_WEPROT_t FLCTL_BANK0_MAIN_WEPROT;
10870 uint32_t reserved6[2];
10871 FLCTL_BANK1_INFO_WEPROT_t FLCTL_BANK1_INFO_WEPROT;
10872 FLCTL_BANK1_MAIN_WEPROT_t FLCTL_BANK1_MAIN_WEPROT;
10873 uint32_t reserved7[2];
10874 FLCTL_BMRK_CTLSTAT_t FLCTL_BMRK_CTLSTAT;
10875 FLCTL_BMRK_IFETCH_t FLCTL_BMRK_IFETCH;
10876 FLCTL_BMRK_DREAD_t FLCTL_BMRK_DREAD;
10877 FLCTL_BMRK_CMP_t FLCTL_BMRK_CMP;
10878 uint32_t reserved8[4];
10879 FLCTL_IFG_t FLCTL_IFG;
10880 FLCTL_IE_t FLCTL_IE;
10881 FLCTL_CLRIFG_t FLCTL_CLRIFG;
10882 FLCTL_SETIFG_t FLCTL_SETIFG;
10883 FLCTL_READ_TIMCTL_t FLCTL_READ_TIMCTL;
10884 FLCTL_READMARGIN_TIMCTL_t FLCTL_READMARGIN_TIMCTL;
10885 FLCTL_PRGVER_TIMCTL_t FLCTL_PRGVER_TIMCTL;
10886 FLCTL_ERSVER_TIMCTL_t FLCTL_ERSVER_TIMCTL;
10887 FLCTL_LKGVER_TIMCTL_t FLCTL_LKGVER_TIMCTL;
10888 FLCTL_PROGRAM_TIMCTL_t FLCTL_PROGRAM_TIMCTL;
10889 FLCTL_ERASE_TIMCTL_t FLCTL_ERASE_TIMCTL;
10890 FLCTL_MASSERASE_TIMCTL_t FLCTL_MASSERASE_TIMCTL;
10891 FLCTL_BURSTPRG_TIMCTL_t FLCTL_BURSTPRG_TIMCTL;
10892 };
10893
10894 static FLCTL_t & FLCTL = (*(FLCTL_t *)0x40011000);
10895
10896} // _FLCTL_
10897
10898// ADC14
10899namespace _ADC14_ {
10900
10901 // Control 0 Register
10902 // Reset value: 0x00000000
10903 BEGIN_TYPE(ADC14CTL0_t, uint32_t)
10904 // ADC14 start conversion
10905 ADD_BITFIELD_RW(ADC14SC, 0, 1)
10906 // ADC14 enable conversion
10907 ADD_BITFIELD_RW(ADC14ENC, 1, 1)
10908 // ADC14 on
10909 ADD_BITFIELD_RW(ADC14ON, 4, 1)
10910 // ADC14 multiple sample and conversion
10911 ADD_BITFIELD_RW(ADC14MSC, 7, 1)
10912 // ADC14 sample-and-hold time
10913 ADD_BITFIELD_RW(ADC14SHT0, 8, 4)
10914 // ADC14 sample-and-hold time
10915 ADD_BITFIELD_RW(ADC14SHT1, 12, 4)
10916 // ADC14 busy
10917 ADD_BITFIELD_RO(ADC14BUSY, 16, 1)
10918 // ADC14 conversion sequence mode select
10919 ADD_BITFIELD_RW(ADC14CONSEQ, 17, 2)
10920 // ADC14 clock source select
10921 ADD_BITFIELD_RW(ADC14SSEL, 19, 3)
10922 // ADC14 clock divider
10923 ADD_BITFIELD_RW(ADC14DIV, 22, 3)
10924 // ADC14 invert signal sample-and-hold
10925 ADD_BITFIELD_RW(ADC14ISSH, 25, 1)
10926 // ADC14 sample-and-hold pulse-mode select
10927 ADD_BITFIELD_RW(ADC14SHP, 26, 1)
10928 // ADC14 sample-and-hold source select
10929 ADD_BITFIELD_RW(ADC14SHS, 27, 3)
10930 // ADC14 predivider
10931 ADD_BITFIELD_RW(ADC14PDIV, 30, 2)
10932 END_TYPE()
10933
10934 // No sample-and-conversion-start
10935 static const uint32_t ADC14CTL0_ADC14SC__ADC14SC_0 = 0;
10936 // Start sample-and-conversion
10937 static const uint32_t ADC14CTL0_ADC14SC__ADC14SC_1 = 1;
10938 // ADC14 disabled
10939 static const uint32_t ADC14CTL0_ADC14ENC__ADC14ENC_0 = 0;
10940 // ADC14 enabled
10941 static const uint32_t ADC14CTL0_ADC14ENC__ADC14ENC_1 = 1;
10942 // ADC14 off
10943 static const uint32_t ADC14CTL0_ADC14ON__ADC14ON_0 = 0;
10944 // ADC14 on. ADC core is ready to power up when a valid conversion is triggered.
10945 static const uint32_t ADC14CTL0_ADC14ON__ADC14ON_1 = 1;
10946 // The sampling timer requires a rising edge of the SHI signal to trigger each sample-and-convert
10947 static const uint32_t ADC14CTL0_ADC14MSC__ADC14MSC_0 = 0;
10948 // The first rising edge of the SHI signal triggers the sampling timer, but further sample-and-conversions are performed automatically as soon as the prior conversion is completed
10949 static const uint32_t ADC14CTL0_ADC14MSC__ADC14MSC_1 = 1;
10950 // 4
10951 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_0 = 0;
10952 // 8
10953 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_1 = 1;
10954 // 16
10955 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_2 = 2;
10956 // 32
10957 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_3 = 3;
10958 // 64
10959 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_4 = 4;
10960 // 96
10961 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_5 = 5;
10962 // 128
10963 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_6 = 6;
10964 // 192
10965 static const uint32_t ADC14CTL0_ADC14SHT0__ADC14SHT0_7 = 7;
10966 // 4
10967 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_0 = 0;
10968 // 8
10969 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_1 = 1;
10970 // 16
10971 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_2 = 2;
10972 // 32
10973 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_3 = 3;
10974 // 64
10975 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_4 = 4;
10976 // 96
10977 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_5 = 5;
10978 // 128
10979 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_6 = 6;
10980 // 192
10981 static const uint32_t ADC14CTL0_ADC14SHT1__ADC14SHT1_7 = 7;
10982 // No operation is active
10983 static const uint32_t ADC14CTL0_ADC14BUSY__ADC14BUSY_0 = 0;
10984 // A sequence, sample, or conversion is active
10985 static const uint32_t ADC14CTL0_ADC14BUSY__ADC14BUSY_1 = 1;
10986 // Single-channel, single-conversion
10987 static const uint32_t ADC14CTL0_ADC14CONSEQ__ADC14CONSEQ_0 = 0;
10988 // Sequence-of-channels
10989 static const uint32_t ADC14CTL0_ADC14CONSEQ__ADC14CONSEQ_1 = 1;
10990 // Repeat-single-channel
10991 static const uint32_t ADC14CTL0_ADC14CONSEQ__ADC14CONSEQ_2 = 2;
10992 // Repeat-sequence-of-channels
10993 static const uint32_t ADC14CTL0_ADC14CONSEQ__ADC14CONSEQ_3 = 3;
10994 // MODCLK
10995 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_0 = 0;
10996 // SYSCLK
10997 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_1 = 1;
10998 // ACLK
10999 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_2 = 2;
11000 // MCLK
11001 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_3 = 3;
11002 // SMCLK
11003 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_4 = 4;
11004 // HSMCLK
11005 static const uint32_t ADC14CTL0_ADC14SSEL__ADC14SSEL_5 = 5;
11006 // /1
11007 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_0 = 0;
11008 // /2
11009 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_1 = 1;
11010 // /3
11011 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_2 = 2;
11012 // /4
11013 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_3 = 3;
11014 // /5
11015 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_4 = 4;
11016 // /6
11017 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_5 = 5;
11018 // /7
11019 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_6 = 6;
11020 // /8
11021 static const uint32_t ADC14CTL0_ADC14DIV__ADC14DIV_7 = 7;
11022 // The sample-input signal is not inverted
11023 static const uint32_t ADC14CTL0_ADC14ISSH__ADC14ISSH_0 = 0;
11024 // The sample-input signal is inverted
11025 static const uint32_t ADC14CTL0_ADC14ISSH__ADC14ISSH_1 = 1;
11026 // SAMPCON signal is sourced from the sample-input signal
11027 static const uint32_t ADC14CTL0_ADC14SHP__ADC14SHP_0 = 0;
11028 // SAMPCON signal is sourced from the sampling timer
11029 static const uint32_t ADC14CTL0_ADC14SHP__ADC14SHP_1 = 1;
11030 // ADC14SC bit
11031 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_0 = 0;
11032 // See device-specific data sheet for source
11033 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_1 = 1;
11034 // See device-specific data sheet for source
11035 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_2 = 2;
11036 // See device-specific data sheet for source
11037 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_3 = 3;
11038 // See device-specific data sheet for source
11039 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_4 = 4;
11040 // See device-specific data sheet for source
11041 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_5 = 5;
11042 // See device-specific data sheet for source
11043 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_6 = 6;
11044 // See device-specific data sheet for source
11045 static const uint32_t ADC14CTL0_ADC14SHS__ADC14SHS_7 = 7;
11046 // Predivide by 1
11047 static const uint32_t ADC14CTL0_ADC14PDIV__ADC14PDIV_0 = 0;
11048 // Predivide by 4
11049 static const uint32_t ADC14CTL0_ADC14PDIV__ADC14PDIV_1 = 1;
11050 // Predivide by 32
11051 static const uint32_t ADC14CTL0_ADC14PDIV__ADC14PDIV_2 = 2;
11052 // Predivide by 64
11053 static const uint32_t ADC14CTL0_ADC14PDIV__ADC14PDIV_3 = 3;
11054
11055 // Control 1 Register
11056 // Reset value: 0x00000030
11057 BEGIN_TYPE(ADC14CTL1_t, uint32_t)
11058 // ADC14 power modes
11059 ADD_BITFIELD_RW(ADC14PWRMD, 0, 2)
11060 // ADC14 reference buffer burst
11061 ADD_BITFIELD_RW(ADC14REFBURST, 2, 1)
11062 // ADC14 data read-back format
11063 ADD_BITFIELD_RW(ADC14DF, 3, 1)
11064 // ADC14 resolution
11065 ADD_BITFIELD_RW(ADC14RES, 4, 2)
11066 // ADC14 conversion start address
11067 ADD_BITFIELD_RW(ADC14CSTARTADD, 16, 5)
11068 // Controls 1/2 AVCC ADC input channel selection
11069 ADD_BITFIELD_RW(ADC14BATMAP, 22, 1)
11070 // Controls temperature sensor ADC input channel selection
11071 ADD_BITFIELD_RW(ADC14TCMAP, 23, 1)
11072 // Controls internal channel 0 selection to ADC input channel MAX-2
11073 ADD_BITFIELD_RW(ADC14CH0MAP, 24, 1)
11074 // Controls internal channel 1 selection to ADC input channel MAX-3
11075 ADD_BITFIELD_RW(ADC14CH1MAP, 25, 1)
11076 // Controls internal channel 2 selection to ADC input channel MAX-4
11077 ADD_BITFIELD_RW(ADC14CH2MAP, 26, 1)
11078 // Controls internal channel 3 selection to ADC input channel MAX-5
11079 ADD_BITFIELD_RW(ADC14CH3MAP, 27, 1)
11080 END_TYPE()
11081
11082 // Regular power mode for use with any resolution setting. Sample rate can be up to 1 Msps.
11083 static const uint32_t ADC14CTL1_ADC14PWRMD__ADC14PWRMD_0 = 0;
11084 // Low-power mode for 12-bit, 10-bit, and 8-bit resolution settings. Sample rate must not exceed 200 ksps.
11085 static const uint32_t ADC14CTL1_ADC14PWRMD__ADC14PWRMD_2 = 2;
11086 // ADC reference buffer on continuously
11087 static const uint32_t ADC14CTL1_ADC14REFBURST__ADC14REFBURST_0 = 0;
11088 // ADC reference buffer on only during sample-and-conversion
11089 static const uint32_t ADC14CTL1_ADC14REFBURST__ADC14REFBURST_1 = 1;
11090 // Binary unsigned. Theoretically, for ADC14DIF = 0 and 14-bit mode, the analog input voltage - V(REF) results in 0000h, and the analog input voltage + V(REF) results in 3FFFh
11091 static const uint32_t ADC14CTL1_ADC14DF__ADC14DF_0 = 0;
11092 // Signed binary (2s complement), left aligned. Theoretically, for ADC14DIF = 0 and 14-bit mode, the analog input voltage - V(REF) results in 8000h, and the analog input voltage + V(REF) results in 7FFCh
11093 static const uint32_t ADC14CTL1_ADC14DF__ADC14DF_1 = 1;
11094 // 8 bit (9 clock cycle conversion time)
11095 static const uint32_t ADC14CTL1_ADC14RES__ADC14RES_0 = 0;
11096 // 10 bit (11 clock cycle conversion time)
11097 static const uint32_t ADC14CTL1_ADC14RES__ADC14RES_1 = 1;
11098 // 12 bit (14 clock cycle conversion time)
11099 static const uint32_t ADC14CTL1_ADC14RES__ADC14RES_2 = 2;
11100 // 14 bit (16 clock cycle conversion time)
11101 static const uint32_t ADC14CTL1_ADC14RES__ADC14RES_3 = 3;
11102 // ADC internal 1/2 x AVCC channel is not selected for ADC
11103 static const uint32_t ADC14CTL1_ADC14BATMAP__ADC14BATMAP_0 = 0;
11104 // ADC internal 1/2 x AVCC channel is selected for ADC input channel MAX
11105 static const uint32_t ADC14CTL1_ADC14BATMAP__ADC14BATMAP_1 = 1;
11106 // ADC internal temperature sensor channel is not selected for ADC
11107 static const uint32_t ADC14CTL1_ADC14TCMAP__ADC14TCMAP_0 = 0;
11108 // ADC internal temperature sensor channel is selected for ADC input channel MAX-1
11109 static const uint32_t ADC14CTL1_ADC14TCMAP__ADC14TCMAP_1 = 1;
11110 // ADC input channel internal 0 is not selected
11111 static const uint32_t ADC14CTL1_ADC14CH0MAP__ADC14CH0MAP_0 = 0;
11112 // ADC input channel internal 0 is selected for ADC input channel MAX-2
11113 static const uint32_t ADC14CTL1_ADC14CH0MAP__ADC14CH0MAP_1 = 1;
11114 // ADC input channel internal 1 is not selected
11115 static const uint32_t ADC14CTL1_ADC14CH1MAP__ADC14CH1MAP_0 = 0;
11116 // ADC input channel internal 1 is selected for ADC input channel MAX-3
11117 static const uint32_t ADC14CTL1_ADC14CH1MAP__ADC14CH1MAP_1 = 1;
11118 // ADC input channel internal 2 is not selected
11119 static const uint32_t ADC14CTL1_ADC14CH2MAP__ADC14CH2MAP_0 = 0;
11120 // ADC input channel internal 2 is selected for ADC input channel MAX-4
11121 static const uint32_t ADC14CTL1_ADC14CH2MAP__ADC14CH2MAP_1 = 1;
11122 // ADC input channel internal 3 is not selected
11123 static const uint32_t ADC14CTL1_ADC14CH3MAP__ADC14CH3MAP_0 = 0;
11124 // ADC input channel internal 3 is selected for ADC input channel MAX-5
11125 static const uint32_t ADC14CTL1_ADC14CH3MAP__ADC14CH3MAP_1 = 1;
11126
11127 // Window Comparator Low Threshold 0 Register
11128 // Reset value: 0x00000000
11129 BEGIN_TYPE(ADC14LO0_t, uint32_t)
11130 // Low threshold 0
11131 ADD_BITFIELD_RW(ADC14LO0, 0, 16)
11132 END_TYPE()
11133
11134 // Window Comparator High Threshold 0 Register
11135 // Reset value: 0x00003fff
11136 BEGIN_TYPE(ADC14HI0_t, uint32_t)
11137 // High threshold 0
11138 ADD_BITFIELD_RW(ADC14HI0, 0, 16)
11139 END_TYPE()
11140
11141 // Window Comparator Low Threshold 1 Register
11142 // Reset value: 0x00000000
11143 BEGIN_TYPE(ADC14LO1_t, uint32_t)
11144 // Low threshold 1
11145 ADD_BITFIELD_RW(ADC14LO1, 0, 16)
11146 END_TYPE()
11147
11148 // Window Comparator High Threshold 1 Register
11149 // Reset value: 0x00003fff
11150 BEGIN_TYPE(ADC14HI1_t, uint32_t)
11151 // High threshold 1
11152 ADD_BITFIELD_RW(ADC14HI1, 0, 16)
11153 END_TYPE()
11154
11155 // Conversion Memory Control Register
11156 // Reset value: 0x00000000
11157 BEGIN_TYPE(ADC14MCTL_t, uint32_t)
11158 // Input channel select
11159 ADD_BITFIELD_RW(ADC14INCH, 0, 5)
11160 // End of sequence
11161 ADD_BITFIELD_RW(ADC14EOS, 7, 1)
11162 // Selects combinations of V(R+) and V(R-) sources
11163 ADD_BITFIELD_RW(ADC14VRSEL, 8, 4)
11164 // Differential mode
11165 ADD_BITFIELD_RW(ADC14DIF, 13, 1)
11166 // Comparator window enable
11167 ADD_BITFIELD_RW(ADC14WINC, 14, 1)
11168 // Window comparator threshold register selection
11169 ADD_BITFIELD_RW(ADC14WINCTH, 15, 1)
11170 END_TYPE()
11171
11172 // If ADC14DIF = 0: A0; If ADC14DIF = 1: Ain+ = A0, Ain- = A1
11173 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_0 = 0;
11174 // If ADC14DIF = 0: A1; If ADC14DIF = 1: Ain+ = A0, Ain- = A1
11175 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_1 = 1;
11176 // If ADC14DIF = 0: A2; If ADC14DIF = 1: Ain+ = A2, Ain- = A3
11177 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_2 = 2;
11178 // If ADC14DIF = 0: A3; If ADC14DIF = 1: Ain+ = A2, Ain- = A3
11179 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_3 = 3;
11180 // If ADC14DIF = 0: A4; If ADC14DIF = 1: Ain+ = A4, Ain- = A5
11181 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_4 = 4;
11182 // If ADC14DIF = 0: A5; If ADC14DIF = 1: Ain+ = A4, Ain- = A5
11183 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_5 = 5;
11184 // If ADC14DIF = 0: A6; If ADC14DIF = 1: Ain+ = A6, Ain- = A7
11185 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_6 = 6;
11186 // If ADC14DIF = 0: A7; If ADC14DIF = 1: Ain+ = A6, Ain- = A7
11187 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_7 = 7;
11188 // If ADC14DIF = 0: A8; If ADC14DIF = 1: Ain+ = A8, Ain- = A9
11189 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_8 = 8;
11190 // If ADC14DIF = 0: A9; If ADC14DIF = 1: Ain+ = A8, Ain- = A9
11191 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_9 = 9;
11192 // If ADC14DIF = 0: A10; If ADC14DIF = 1: Ain+ = A10, Ain- = A11
11193 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_10 = 10;
11194 // If ADC14DIF = 0: A11; If ADC14DIF = 1: Ain+ = A10, Ain- = A11
11195 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_11 = 11;
11196 // If ADC14DIF = 0: A12; If ADC14DIF = 1: Ain+ = A12, Ain- = A13
11197 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_12 = 12;
11198 // If ADC14DIF = 0: A13; If ADC14DIF = 1: Ain+ = A12, Ain- = A13
11199 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_13 = 13;
11200 // If ADC14DIF = 0: A14; If ADC14DIF = 1: Ain+ = A14, Ain- = A15
11201 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_14 = 14;
11202 // If ADC14DIF = 0: A15; If ADC14DIF = 1: Ain+ = A14, Ain- = A15
11203 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_15 = 15;
11204 // If ADC14DIF = 0: A16; If ADC14DIF = 1: Ain+ = A16, Ain- = A17
11205 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_16 = 16;
11206 // If ADC14DIF = 0: A17; If ADC14DIF = 1: Ain+ = A16, Ain- = A17
11207 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_17 = 17;
11208 // If ADC14DIF = 0: A18; If ADC14DIF = 1: Ain+ = A18, Ain- = A19
11209 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_18 = 18;
11210 // If ADC14DIF = 0: A19; If ADC14DIF = 1: Ain+ = A18, Ain- = A19
11211 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_19 = 19;
11212 // If ADC14DIF = 0: A20; If ADC14DIF = 1: Ain+ = A20, Ain- = A21
11213 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_20 = 20;
11214 // If ADC14DIF = 0: A21; If ADC14DIF = 1: Ain+ = A20, Ain- = A21
11215 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_21 = 21;
11216 // If ADC14DIF = 0: A22; If ADC14DIF = 1: Ain+ = A22, Ain- = A23
11217 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_22 = 22;
11218 // If ADC14DIF = 0: A23; If ADC14DIF = 1: Ain+ = A22, Ain- = A23
11219 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_23 = 23;
11220 // If ADC14DIF = 0: A24; If ADC14DIF = 1: Ain+ = A24, Ain- = A25
11221 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_24 = 24;
11222 // If ADC14DIF = 0: A25; If ADC14DIF = 1: Ain+ = A24, Ain- = A25
11223 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_25 = 25;
11224 // If ADC14DIF = 0: A26; If ADC14DIF = 1: Ain+ = A26, Ain- = A27
11225 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_26 = 26;
11226 // If ADC14DIF = 0: A27; If ADC14DIF = 1: Ain+ = A26, Ain- = A27
11227 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_27 = 27;
11228 // If ADC14DIF = 0: A28; If ADC14DIF = 1: Ain+ = A28, Ain- = A29
11229 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_28 = 28;
11230 // If ADC14DIF = 0: A29; If ADC14DIF = 1: Ain+ = A28, Ain- = A29
11231 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_29 = 29;
11232 // If ADC14DIF = 0: A30; If ADC14DIF = 1: Ain+ = A30, Ain- = A31
11233 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_30 = 30;
11234 // If ADC14DIF = 0: A31; If ADC14DIF = 1: Ain+ = A30, Ain- = A31
11235 static const uint32_t ADC14MCTL_ADC14INCH__ADC14INCH_31 = 31;
11236 // Not end of sequence
11237 static const uint32_t ADC14MCTL_ADC14EOS__ADC14EOS_0 = 0;
11238 // End of sequence
11239 static const uint32_t ADC14MCTL_ADC14EOS__ADC14EOS_1 = 1;
11240 // V(R+) = AVCC, V(R-) = AVSS
11241 static const uint32_t ADC14MCTL_ADC14VRSEL__ADC14VRSEL_0 = 0;
11242 // V(R+) = VREF buffered, V(R-) = AVSS
11243 static const uint32_t ADC14MCTL_ADC14VRSEL__ADC14VRSEL_1 = 1;
11244 // V(R+) = VeREF+, V(R-) = VeREF-
11245 static const uint32_t ADC14MCTL_ADC14VRSEL__ADC14VRSEL_14 = 14;
11246 // V(R+) = VeREF+ buffered, V(R-) = VeREF
11247 static const uint32_t ADC14MCTL_ADC14VRSEL__ADC14VRSEL_15 = 15;
11248 // Single-ended mode enabled
11249 static const uint32_t ADC14MCTL_ADC14DIF__ADC14DIF_0 = 0;
11250 // Differential mode enabled
11251 static const uint32_t ADC14MCTL_ADC14DIF__ADC14DIF_1 = 1;
11252 // Comparator window disabled
11253 static const uint32_t ADC14MCTL_ADC14WINC__ADC14WINC_0 = 0;
11254 // Comparator window enabled
11255 static const uint32_t ADC14MCTL_ADC14WINC__ADC14WINC_1 = 1;
11256 // Use window comparator thresholds 0, ADC14LO0 and ADC14HI0
11257 static const uint32_t ADC14MCTL_ADC14WINCTH__ADC14WINCTH_0 = 0;
11258 // Use window comparator thresholds 1, ADC14LO1 and ADC14HI1
11259 static const uint32_t ADC14MCTL_ADC14WINCTH__ADC14WINCTH_1 = 1;
11260
11261 // Conversion Memory Register
11262 // Reset value: 0x00000000
11263 BEGIN_TYPE(ADC14MEM_t, uint32_t)
11264 // Conversion Result
11265 ADD_BITFIELD_RW(Conversion_Results, 0, 16)
11266 END_TYPE()
11267
11268 // Interrupt Enable 0 Register
11269 // Reset value: 0x00000000
11270 BEGIN_TYPE(ADC14IER0_t, uint32_t)
11271 // Interrupt enable
11272 ADD_BITFIELD_RW(ADC14IE0, 0, 1)
11273 // Interrupt enable
11274 ADD_BITFIELD_RW(ADC14IE1, 1, 1)
11275 // Interrupt enable
11276 ADD_BITFIELD_RW(ADC14IE2, 2, 1)
11277 // Interrupt enable
11278 ADD_BITFIELD_RW(ADC14IE3, 3, 1)
11279 // Interrupt enable
11280 ADD_BITFIELD_RW(ADC14IE4, 4, 1)
11281 // Interrupt enable
11282 ADD_BITFIELD_RW(ADC14IE5, 5, 1)
11283 // Interrupt enable
11284 ADD_BITFIELD_RW(ADC14IE6, 6, 1)
11285 // Interrupt enable
11286 ADD_BITFIELD_RW(ADC14IE7, 7, 1)
11287 // Interrupt enable
11288 ADD_BITFIELD_RW(ADC14IE8, 8, 1)
11289 // Interrupt enable
11290 ADD_BITFIELD_RW(ADC14IE9, 9, 1)
11291 // Interrupt enable
11292 ADD_BITFIELD_RW(ADC14IE10, 10, 1)
11293 // Interrupt enable
11294 ADD_BITFIELD_RW(ADC14IE11, 11, 1)
11295 // Interrupt enable
11296 ADD_BITFIELD_RW(ADC14IE12, 12, 1)
11297 // Interrupt enable
11298 ADD_BITFIELD_RW(ADC14IE13, 13, 1)
11299 // Interrupt enable
11300 ADD_BITFIELD_RW(ADC14IE14, 14, 1)
11301 // Interrupt enable
11302 ADD_BITFIELD_RW(ADC14IE15, 15, 1)
11303 // Interrupt enable
11304 ADD_BITFIELD_RW(ADC14IE16, 16, 1)
11305 // Interrupt enable
11306 ADD_BITFIELD_RW(ADC14IE17, 17, 1)
11307 // Interrupt enable
11308 ADD_BITFIELD_RW(ADC14IE19, 19, 1)
11309 // Interrupt enable
11310 ADD_BITFIELD_RW(ADC14IE18, 18, 1)
11311 // Interrupt enable
11312 ADD_BITFIELD_RW(ADC14IE20, 20, 1)
11313 // Interrupt enable
11314 ADD_BITFIELD_RW(ADC14IE21, 21, 1)
11315 // Interrupt enable
11316 ADD_BITFIELD_RW(ADC14IE22, 22, 1)
11317 // Interrupt enable
11318 ADD_BITFIELD_RW(ADC14IE23, 23, 1)
11319 // Interrupt enable
11320 ADD_BITFIELD_RW(ADC14IE24, 24, 1)
11321 // Interrupt enable
11322 ADD_BITFIELD_RW(ADC14IE25, 25, 1)
11323 // Interrupt enable
11324 ADD_BITFIELD_RW(ADC14IE26, 26, 1)
11325 // Interrupt enable
11326 ADD_BITFIELD_RW(ADC14IE27, 27, 1)
11327 // Interrupt enable
11328 ADD_BITFIELD_RW(ADC14IE28, 28, 1)
11329 // Interrupt enable
11330 ADD_BITFIELD_RW(ADC14IE29, 29, 1)
11331 // Interrupt enable
11332 ADD_BITFIELD_RW(ADC14IE30, 30, 1)
11333 // Interrupt enable
11334 ADD_BITFIELD_RW(ADC14IE31, 31, 1)
11335 END_TYPE()
11336
11337 // Interrupt disabled
11338 static const uint32_t ADC14IER0_ADC14IE0__ADC14IE0_0 = 0;
11339 // Interrupt enabled
11340 static const uint32_t ADC14IER0_ADC14IE0__ADC14IE0_1 = 1;
11341 // Interrupt disabled
11342 static const uint32_t ADC14IER0_ADC14IE1__ADC14IE1_0 = 0;
11343 // Interrupt enabled
11344 static const uint32_t ADC14IER0_ADC14IE1__ADC14IE1_1 = 1;
11345 // Interrupt disabled
11346 static const uint32_t ADC14IER0_ADC14IE2__ADC14IE2_0 = 0;
11347 // Interrupt enabled
11348 static const uint32_t ADC14IER0_ADC14IE2__ADC14IE2_1 = 1;
11349 // Interrupt disabled
11350 static const uint32_t ADC14IER0_ADC14IE3__ADC14IE3_0 = 0;
11351 // Interrupt enabled
11352 static const uint32_t ADC14IER0_ADC14IE3__ADC14IE3_1 = 1;
11353 // Interrupt disabled
11354 static const uint32_t ADC14IER0_ADC14IE4__ADC14IE4_0 = 0;
11355 // Interrupt enabled
11356 static const uint32_t ADC14IER0_ADC14IE4__ADC14IE4_1 = 1;
11357 // Interrupt disabled
11358 static const uint32_t ADC14IER0_ADC14IE5__ADC14IE5_0 = 0;
11359 // Interrupt enabled
11360 static const uint32_t ADC14IER0_ADC14IE5__ADC14IE5_1 = 1;
11361 // Interrupt disabled
11362 static const uint32_t ADC14IER0_ADC14IE6__ADC14IE6_0 = 0;
11363 // Interrupt enabled
11364 static const uint32_t ADC14IER0_ADC14IE6__ADC14IE6_1 = 1;
11365 // Interrupt disabled
11366 static const uint32_t ADC14IER0_ADC14IE7__ADC14IE7_0 = 0;
11367 // Interrupt enabled
11368 static const uint32_t ADC14IER0_ADC14IE7__ADC14IE7_1 = 1;
11369 // Interrupt disabled
11370 static const uint32_t ADC14IER0_ADC14IE8__ADC14IE8_0 = 0;
11371 // Interrupt enabled
11372 static const uint32_t ADC14IER0_ADC14IE8__ADC14IE8_1 = 1;
11373 // Interrupt disabled
11374 static const uint32_t ADC14IER0_ADC14IE9__ADC14IE9_0 = 0;
11375 // Interrupt enabled
11376 static const uint32_t ADC14IER0_ADC14IE9__ADC14IE9_1 = 1;
11377 // Interrupt disabled
11378 static const uint32_t ADC14IER0_ADC14IE10__ADC14IE10_0 = 0;
11379 // Interrupt enabled
11380 static const uint32_t ADC14IER0_ADC14IE10__ADC14IE10_1 = 1;
11381 // Interrupt disabled
11382 static const uint32_t ADC14IER0_ADC14IE11__ADC14IE11_0 = 0;
11383 // Interrupt enabled
11384 static const uint32_t ADC14IER0_ADC14IE11__ADC14IE11_1 = 1;
11385 // Interrupt disabled
11386 static const uint32_t ADC14IER0_ADC14IE12__ADC14IE12_0 = 0;
11387 // Interrupt enabled
11388 static const uint32_t ADC14IER0_ADC14IE12__ADC14IE12_1 = 1;
11389 // Interrupt disabled
11390 static const uint32_t ADC14IER0_ADC14IE13__ADC14IE13_0 = 0;
11391 // Interrupt enabled
11392 static const uint32_t ADC14IER0_ADC14IE13__ADC14IE13_1 = 1;
11393 // Interrupt disabled
11394 static const uint32_t ADC14IER0_ADC14IE14__ADC14IE14_0 = 0;
11395 // Interrupt enabled
11396 static const uint32_t ADC14IER0_ADC14IE14__ADC14IE14_1 = 1;
11397 // Interrupt disabled
11398 static const uint32_t ADC14IER0_ADC14IE15__ADC14IE15_0 = 0;
11399 // Interrupt enabled
11400 static const uint32_t ADC14IER0_ADC14IE15__ADC14IE15_1 = 1;
11401 // Interrupt disabled
11402 static const uint32_t ADC14IER0_ADC14IE16__ADC14IE16_0 = 0;
11403 // Interrupt enabled
11404 static const uint32_t ADC14IER0_ADC14IE16__ADC14IE16_1 = 1;
11405 // Interrupt disabled
11406 static const uint32_t ADC14IER0_ADC14IE17__ADC14IE17_0 = 0;
11407 // Interrupt enabled
11408 static const uint32_t ADC14IER0_ADC14IE17__ADC14IE17_1 = 1;
11409 // Interrupt disabled
11410 static const uint32_t ADC14IER0_ADC14IE19__ADC14IE19_0 = 0;
11411 // Interrupt enabled
11412 static const uint32_t ADC14IER0_ADC14IE19__ADC14IE19_1 = 1;
11413 // Interrupt disabled
11414 static const uint32_t ADC14IER0_ADC14IE18__ADC14IE18_0 = 0;
11415 // Interrupt enabled
11416 static const uint32_t ADC14IER0_ADC14IE18__ADC14IE18_1 = 1;
11417 // Interrupt disabled
11418 static const uint32_t ADC14IER0_ADC14IE20__ADC14IE20_0 = 0;
11419 // Interrupt enabled
11420 static const uint32_t ADC14IER0_ADC14IE20__ADC14IE20_1 = 1;
11421 // Interrupt disabled
11422 static const uint32_t ADC14IER0_ADC14IE21__ADC14IE21_0 = 0;
11423 // Interrupt enabled
11424 static const uint32_t ADC14IER0_ADC14IE21__ADC14IE21_1 = 1;
11425 // Interrupt disabled
11426 static const uint32_t ADC14IER0_ADC14IE22__ADC14IE22_0 = 0;
11427 // Interrupt enabled
11428 static const uint32_t ADC14IER0_ADC14IE22__ADC14IE22_1 = 1;
11429 // Interrupt disabled
11430 static const uint32_t ADC14IER0_ADC14IE23__ADC14IE23_0 = 0;
11431 // Interrupt enabled
11432 static const uint32_t ADC14IER0_ADC14IE23__ADC14IE23_1 = 1;
11433 // Interrupt disabled
11434 static const uint32_t ADC14IER0_ADC14IE24__ADC14IE24_0 = 0;
11435 // Interrupt enabled
11436 static const uint32_t ADC14IER0_ADC14IE24__ADC14IE24_1 = 1;
11437 // Interrupt disabled
11438 static const uint32_t ADC14IER0_ADC14IE25__ADC14IE25_0 = 0;
11439 // Interrupt enabled
11440 static const uint32_t ADC14IER0_ADC14IE25__ADC14IE25_1 = 1;
11441 // Interrupt disabled
11442 static const uint32_t ADC14IER0_ADC14IE26__ADC14IE26_0 = 0;
11443 // Interrupt enabled
11444 static const uint32_t ADC14IER0_ADC14IE26__ADC14IE26_1 = 1;
11445 // Interrupt disabled
11446 static const uint32_t ADC14IER0_ADC14IE27__ADC14IE27_0 = 0;
11447 // Interrupt enabled
11448 static const uint32_t ADC14IER0_ADC14IE27__ADC14IE27_1 = 1;
11449 // Interrupt disabled
11450 static const uint32_t ADC14IER0_ADC14IE28__ADC14IE28_0 = 0;
11451 // Interrupt enabled
11452 static const uint32_t ADC14IER0_ADC14IE28__ADC14IE28_1 = 1;
11453 // Interrupt disabled
11454 static const uint32_t ADC14IER0_ADC14IE29__ADC14IE29_0 = 0;
11455 // Interrupt enabled
11456 static const uint32_t ADC14IER0_ADC14IE29__ADC14IE29_1 = 1;
11457 // Interrupt disabled
11458 static const uint32_t ADC14IER0_ADC14IE30__ADC14IE30_0 = 0;
11459 // Interrupt enabled
11460 static const uint32_t ADC14IER0_ADC14IE30__ADC14IE30_1 = 1;
11461 // Interrupt disabled
11462 static const uint32_t ADC14IER0_ADC14IE31__ADC14IE31_0 = 0;
11463 // Interrupt enabled
11464 static const uint32_t ADC14IER0_ADC14IE31__ADC14IE31_1 = 1;
11465
11466 // Interrupt Enable 1 Register
11467 // Reset value: 0x00000000
11468 BEGIN_TYPE(ADC14IER1_t, uint32_t)
11469 // Interrupt enable for ADC14MEMx within comparator window
11470 ADD_BITFIELD_RW(ADC14INIE, 1, 1)
11471 // Interrupt enable for ADC14MEMx below comparator window
11472 ADD_BITFIELD_RW(ADC14LOIE, 2, 1)
11473 // Interrupt enable for ADC14MEMx above comparator window
11474 ADD_BITFIELD_RW(ADC14HIIE, 3, 1)
11475 // ADC14MEMx overflow-interrupt enable
11476 ADD_BITFIELD_RW(ADC14OVIE, 4, 1)
11477 // ADC14 conversion-time-overflow interrupt enable
11478 ADD_BITFIELD_RW(ADC14TOVIE, 5, 1)
11479 // ADC14 local buffered reference ready interrupt enable
11480 ADD_BITFIELD_RW(ADC14RDYIE, 6, 1)
11481 END_TYPE()
11482
11483 // Interrupt disabled
11484 static const uint32_t ADC14IER1_ADC14INIE__ADC14INIE_0 = 0;
11485 // Interrupt enabled
11486 static const uint32_t ADC14IER1_ADC14INIE__ADC14INIE_1 = 1;
11487 // Interrupt disabled
11488 static const uint32_t ADC14IER1_ADC14LOIE__ADC14LOIE_0 = 0;
11489 // Interrupt enabled
11490 static const uint32_t ADC14IER1_ADC14LOIE__ADC14LOIE_1 = 1;
11491 // Interrupt disabled
11492 static const uint32_t ADC14IER1_ADC14HIIE__ADC14HIIE_0 = 0;
11493 // Interrupt enabled
11494 static const uint32_t ADC14IER1_ADC14HIIE__ADC14HIIE_1 = 1;
11495 // Interrupt disabled
11496 static const uint32_t ADC14IER1_ADC14OVIE__ADC14OVIE_0 = 0;
11497 // Interrupt enabled
11498 static const uint32_t ADC14IER1_ADC14OVIE__ADC14OVIE_1 = 1;
11499 // Interrupt disabled
11500 static const uint32_t ADC14IER1_ADC14TOVIE__ADC14TOVIE_0 = 0;
11501 // Interrupt enabled
11502 static const uint32_t ADC14IER1_ADC14TOVIE__ADC14TOVIE_1 = 1;
11503 // Interrupt disabled
11504 static const uint32_t ADC14IER1_ADC14RDYIE__ADC14RDYIE_0 = 0;
11505 // Interrupt enabled
11506 static const uint32_t ADC14IER1_ADC14RDYIE__ADC14RDYIE_1 = 1;
11507
11508 // Interrupt Flag 0 Register
11509 // Reset value: 0x00000000
11510 BEGIN_TYPE(ADC14IFGR0_t, uint32_t)
11511 // ADC14MEM0 interrupt flag
11512 ADD_BITFIELD_RO(ADC14IFG0, 0, 1)
11513 // ADC14MEM1 interrupt flag
11514 ADD_BITFIELD_RO(ADC14IFG1, 1, 1)
11515 // ADC14MEM2 interrupt flag
11516 ADD_BITFIELD_RO(ADC14IFG2, 2, 1)
11517 // ADC14MEM3 interrupt flag
11518 ADD_BITFIELD_RO(ADC14IFG3, 3, 1)
11519 // ADC14MEM4 interrupt flag
11520 ADD_BITFIELD_RO(ADC14IFG4, 4, 1)
11521 // ADC14MEM5 interrupt flag
11522 ADD_BITFIELD_RO(ADC14IFG5, 5, 1)
11523 // ADC14MEM6 interrupt flag
11524 ADD_BITFIELD_RO(ADC14IFG6, 6, 1)
11525 // ADC14MEM7 interrupt flag
11526 ADD_BITFIELD_RO(ADC14IFG7, 7, 1)
11527 // ADC14MEM8 interrupt flag
11528 ADD_BITFIELD_RO(ADC14IFG8, 8, 1)
11529 // ADC14MEM9 interrupt flag
11530 ADD_BITFIELD_RO(ADC14IFG9, 9, 1)
11531 // ADC14MEM10 interrupt flag
11532 ADD_BITFIELD_RO(ADC14IFG10, 10, 1)
11533 // ADC14MEM11 interrupt flag
11534 ADD_BITFIELD_RO(ADC14IFG11, 11, 1)
11535 // ADC14MEM12 interrupt flag
11536 ADD_BITFIELD_RO(ADC14IFG12, 12, 1)
11537 // ADC14MEM13 interrupt flag
11538 ADD_BITFIELD_RO(ADC14IFG13, 13, 1)
11539 // ADC14MEM14 interrupt flag
11540 ADD_BITFIELD_RO(ADC14IFG14, 14, 1)
11541 // ADC14MEM15 interrupt flag
11542 ADD_BITFIELD_RO(ADC14IFG15, 15, 1)
11543 // ADC14MEM16 interrupt flag
11544 ADD_BITFIELD_RO(ADC14IFG16, 16, 1)
11545 // ADC14MEM17 interrupt flag
11546 ADD_BITFIELD_RO(ADC14IFG17, 17, 1)
11547 // ADC14MEM18 interrupt flag
11548 ADD_BITFIELD_RO(ADC14IFG18, 18, 1)
11549 // ADC14MEM19 interrupt flag
11550 ADD_BITFIELD_RO(ADC14IFG19, 19, 1)
11551 // ADC14MEM20 interrupt flag
11552 ADD_BITFIELD_RO(ADC14IFG20, 20, 1)
11553 // ADC14MEM21 interrupt flag
11554 ADD_BITFIELD_RO(ADC14IFG21, 21, 1)
11555 // ADC14MEM22 interrupt flag
11556 ADD_BITFIELD_RO(ADC14IFG22, 22, 1)
11557 // ADC14MEM23 interrupt flag
11558 ADD_BITFIELD_RO(ADC14IFG23, 23, 1)
11559 // ADC14MEM24 interrupt flag
11560 ADD_BITFIELD_RO(ADC14IFG24, 24, 1)
11561 // ADC14MEM25 interrupt flag
11562 ADD_BITFIELD_RO(ADC14IFG25, 25, 1)
11563 // ADC14MEM26 interrupt flag
11564 ADD_BITFIELD_RO(ADC14IFG26, 26, 1)
11565 // ADC14MEM27 interrupt flag
11566 ADD_BITFIELD_RO(ADC14IFG27, 27, 1)
11567 // ADC14MEM28 interrupt flag
11568 ADD_BITFIELD_RO(ADC14IFG28, 28, 1)
11569 // ADC14MEM29 interrupt flag
11570 ADD_BITFIELD_RO(ADC14IFG29, 29, 1)
11571 // ADC14MEM30 interrupt flag
11572 ADD_BITFIELD_RO(ADC14IFG30, 30, 1)
11573 // ADC14MEM31 interrupt flag
11574 ADD_BITFIELD_RO(ADC14IFG31, 31, 1)
11575 END_TYPE()
11576
11577 // No interrupt pending
11578 static const uint32_t ADC14IFGR0_ADC14IFG0__ADC14IFG0_0 = 0;
11579 // Interrupt pending
11580 static const uint32_t ADC14IFGR0_ADC14IFG0__ADC14IFG0_1 = 1;
11581 // No interrupt pending
11582 static const uint32_t ADC14IFGR0_ADC14IFG1__ADC14IFG1_0 = 0;
11583 // Interrupt pending
11584 static const uint32_t ADC14IFGR0_ADC14IFG1__ADC14IFG1_1 = 1;
11585 // No interrupt pending
11586 static const uint32_t ADC14IFGR0_ADC14IFG2__ADC14IFG2_0 = 0;
11587 // Interrupt pending
11588 static const uint32_t ADC14IFGR0_ADC14IFG2__ADC14IFG2_1 = 1;
11589 // No interrupt pending
11590 static const uint32_t ADC14IFGR0_ADC14IFG3__ADC14IFG3_0 = 0;
11591 // Interrupt pending
11592 static const uint32_t ADC14IFGR0_ADC14IFG3__ADC14IFG3_1 = 1;
11593 // No interrupt pending
11594 static const uint32_t ADC14IFGR0_ADC14IFG4__ADC14IFG4_0 = 0;
11595 // Interrupt pending
11596 static const uint32_t ADC14IFGR0_ADC14IFG4__ADC14IFG4_1 = 1;
11597 // No interrupt pending
11598 static const uint32_t ADC14IFGR0_ADC14IFG5__ADC14IFG5_0 = 0;
11599 // Interrupt pending
11600 static const uint32_t ADC14IFGR0_ADC14IFG5__ADC14IFG5_1 = 1;
11601 // No interrupt pending
11602 static const uint32_t ADC14IFGR0_ADC14IFG6__ADC14IFG6_0 = 0;
11603 // Interrupt pending
11604 static const uint32_t ADC14IFGR0_ADC14IFG6__ADC14IFG6_1 = 1;
11605 // No interrupt pending
11606 static const uint32_t ADC14IFGR0_ADC14IFG7__ADC14IFG7_0 = 0;
11607 // Interrupt pending
11608 static const uint32_t ADC14IFGR0_ADC14IFG7__ADC14IFG7_1 = 1;
11609 // No interrupt pending
11610 static const uint32_t ADC14IFGR0_ADC14IFG8__ADC14IFG8_0 = 0;
11611 // Interrupt pending
11612 static const uint32_t ADC14IFGR0_ADC14IFG8__ADC14IFG8_1 = 1;
11613 // No interrupt pending
11614 static const uint32_t ADC14IFGR0_ADC14IFG9__ADC14IFG9_0 = 0;
11615 // Interrupt pending
11616 static const uint32_t ADC14IFGR0_ADC14IFG9__ADC14IFG9_1 = 1;
11617 // No interrupt pending
11618 static const uint32_t ADC14IFGR0_ADC14IFG10__ADC14IFG10_0 = 0;
11619 // Interrupt pending
11620 static const uint32_t ADC14IFGR0_ADC14IFG10__ADC14IFG10_1 = 1;
11621 // No interrupt pending
11622 static const uint32_t ADC14IFGR0_ADC14IFG11__ADC14IFG11_0 = 0;
11623 // Interrupt pending
11624 static const uint32_t ADC14IFGR0_ADC14IFG11__ADC14IFG11_1 = 1;
11625 // No interrupt pending
11626 static const uint32_t ADC14IFGR0_ADC14IFG12__ADC14IFG12_0 = 0;
11627 // Interrupt pending
11628 static const uint32_t ADC14IFGR0_ADC14IFG12__ADC14IFG12_1 = 1;
11629 // No interrupt pending
11630 static const uint32_t ADC14IFGR0_ADC14IFG13__ADC14IFG13_0 = 0;
11631 // Interrupt pending
11632 static const uint32_t ADC14IFGR0_ADC14IFG13__ADC14IFG13_1 = 1;
11633 // No interrupt pending
11634 static const uint32_t ADC14IFGR0_ADC14IFG14__ADC14IFG14_0 = 0;
11635 // Interrupt pending
11636 static const uint32_t ADC14IFGR0_ADC14IFG14__ADC14IFG14_1 = 1;
11637 // No interrupt pending
11638 static const uint32_t ADC14IFGR0_ADC14IFG15__ADC14IFG15_0 = 0;
11639 // Interrupt pending
11640 static const uint32_t ADC14IFGR0_ADC14IFG15__ADC14IFG15_1 = 1;
11641 // No interrupt pending
11642 static const uint32_t ADC14IFGR0_ADC14IFG16__ADC14IFG16_0 = 0;
11643 // Interrupt pending
11644 static const uint32_t ADC14IFGR0_ADC14IFG16__ADC14IFG16_1 = 1;
11645 // No interrupt pending
11646 static const uint32_t ADC14IFGR0_ADC14IFG17__ADC14IFG17_0 = 0;
11647 // Interrupt pending
11648 static const uint32_t ADC14IFGR0_ADC14IFG17__ADC14IFG17_1 = 1;
11649 // No interrupt pending
11650 static const uint32_t ADC14IFGR0_ADC14IFG18__ADC14IFG18_0 = 0;
11651 // Interrupt pending
11652 static const uint32_t ADC14IFGR0_ADC14IFG18__ADC14IFG18_1 = 1;
11653 // No interrupt pending
11654 static const uint32_t ADC14IFGR0_ADC14IFG19__ADC14IFG19_0 = 0;
11655 // Interrupt pending
11656 static const uint32_t ADC14IFGR0_ADC14IFG19__ADC14IFG19_1 = 1;
11657 // No interrupt pending
11658 static const uint32_t ADC14IFGR0_ADC14IFG20__ADC14IFG20_0 = 0;
11659 // Interrupt pending
11660 static const uint32_t ADC14IFGR0_ADC14IFG20__ADC14IFG20_1 = 1;
11661 // No interrupt pending
11662 static const uint32_t ADC14IFGR0_ADC14IFG21__ADC14IFG21_0 = 0;
11663 // Interrupt pending
11664 static const uint32_t ADC14IFGR0_ADC14IFG21__ADC14IFG21_1 = 1;
11665 // No interrupt pending
11666 static const uint32_t ADC14IFGR0_ADC14IFG22__ADC14IFG22_0 = 0;
11667 // Interrupt pending
11668 static const uint32_t ADC14IFGR0_ADC14IFG22__ADC14IFG22_1 = 1;
11669 // No interrupt pending
11670 static const uint32_t ADC14IFGR0_ADC14IFG23__ADC14IFG23_0 = 0;
11671 // Interrupt pending
11672 static const uint32_t ADC14IFGR0_ADC14IFG23__ADC14IFG23_1 = 1;
11673 // No interrupt pending
11674 static const uint32_t ADC14IFGR0_ADC14IFG24__ADC14IFG24_0 = 0;
11675 // Interrupt pending
11676 static const uint32_t ADC14IFGR0_ADC14IFG24__ADC14IFG24_1 = 1;
11677 // No interrupt pending
11678 static const uint32_t ADC14IFGR0_ADC14IFG25__ADC14IFG25_0 = 0;
11679 // Interrupt pending
11680 static const uint32_t ADC14IFGR0_ADC14IFG25__ADC14IFG25_1 = 1;
11681 // No interrupt pending
11682 static const uint32_t ADC14IFGR0_ADC14IFG26__ADC14IFG26_0 = 0;
11683 // Interrupt pending
11684 static const uint32_t ADC14IFGR0_ADC14IFG26__ADC14IFG26_1 = 1;
11685 // No interrupt pending
11686 static const uint32_t ADC14IFGR0_ADC14IFG27__ADC14IFG27_0 = 0;
11687 // Interrupt pending
11688 static const uint32_t ADC14IFGR0_ADC14IFG27__ADC14IFG27_1 = 1;
11689 // No interrupt pending
11690 static const uint32_t ADC14IFGR0_ADC14IFG28__ADC14IFG28_0 = 0;
11691 // Interrupt pending
11692 static const uint32_t ADC14IFGR0_ADC14IFG28__ADC14IFG28_1 = 1;
11693 // No interrupt pending
11694 static const uint32_t ADC14IFGR0_ADC14IFG29__ADC14IFG29_0 = 0;
11695 // Interrupt pending
11696 static const uint32_t ADC14IFGR0_ADC14IFG29__ADC14IFG29_1 = 1;
11697 // No interrupt pending
11698 static const uint32_t ADC14IFGR0_ADC14IFG30__ADC14IFG30_0 = 0;
11699 // Interrupt pending
11700 static const uint32_t ADC14IFGR0_ADC14IFG30__ADC14IFG30_1 = 1;
11701 // No interrupt pending
11702 static const uint32_t ADC14IFGR0_ADC14IFG31__ADC14IFG31_0 = 0;
11703 // Interrupt pending
11704 static const uint32_t ADC14IFGR0_ADC14IFG31__ADC14IFG31_1 = 1;
11705
11706 // Interrupt Flag 1 Register
11707 // Reset value: 0x00000000
11708 BEGIN_TYPE(ADC14IFGR1_t, uint32_t)
11709 // Interrupt flag for ADC14MEMx within comparator window
11710 ADD_BITFIELD_RO(ADC14INIFG, 1, 1)
11711 // Interrupt flag for ADC14MEMx below comparator window
11712 ADD_BITFIELD_RO(ADC14LOIFG, 2, 1)
11713 // Interrupt flag for ADC14MEMx above comparator window
11714 ADD_BITFIELD_RO(ADC14HIIFG, 3, 1)
11715 // ADC14MEMx overflow interrupt flag
11716 ADD_BITFIELD_RO(ADC14OVIFG, 4, 1)
11717 // ADC14 conversion time overflow interrupt flag
11718 ADD_BITFIELD_RO(ADC14TOVIFG, 5, 1)
11719 // ADC14 local buffered reference ready interrupt flag
11720 ADD_BITFIELD_RO(ADC14RDYIFG, 6, 1)
11721 END_TYPE()
11722
11723 // No interrupt pending
11724 static const uint32_t ADC14IFGR1_ADC14INIFG__ADC14INIFG_0 = 0;
11725 // Interrupt pending
11726 static const uint32_t ADC14IFGR1_ADC14INIFG__ADC14INIFG_1 = 1;
11727 // No interrupt pending
11728 static const uint32_t ADC14IFGR1_ADC14LOIFG__ADC14LOIFG_0 = 0;
11729 // Interrupt pending
11730 static const uint32_t ADC14IFGR1_ADC14LOIFG__ADC14LOIFG_1 = 1;
11731 // No interrupt pending
11732 static const uint32_t ADC14IFGR1_ADC14HIIFG__ADC14HIIFG_0 = 0;
11733 // Interrupt pending
11734 static const uint32_t ADC14IFGR1_ADC14HIIFG__ADC14HIIFG_1 = 1;
11735 // No interrupt pending
11736 static const uint32_t ADC14IFGR1_ADC14OVIFG__ADC14OVIFG_0 = 0;
11737 // Interrupt pending
11738 static const uint32_t ADC14IFGR1_ADC14OVIFG__ADC14OVIFG_1 = 1;
11739 // No interrupt pending
11740 static const uint32_t ADC14IFGR1_ADC14TOVIFG__ADC14TOVIFG_0 = 0;
11741 // Interrupt pending
11742 static const uint32_t ADC14IFGR1_ADC14TOVIFG__ADC14TOVIFG_1 = 1;
11743 // No interrupt pending
11744 static const uint32_t ADC14IFGR1_ADC14RDYIFG__ADC14RDYIFG_0 = 0;
11745 // Interrupt pending
11746 static const uint32_t ADC14IFGR1_ADC14RDYIFG__ADC14RDYIFG_1 = 1;
11747
11748 // Clear Interrupt Flag 0 Register
11749 // Reset value: 0x00000000
11750 BEGIN_TYPE(ADC14CLRIFGR0_t, uint32_t)
11751 // clear ADC14IFG0
11752 ADD_BITFIELD_WO(CLRADC14IFG0, 0, 1)
11753 // clear ADC14IFG1
11754 ADD_BITFIELD_WO(CLRADC14IFG1, 1, 1)
11755 // clear ADC14IFG2
11756 ADD_BITFIELD_WO(CLRADC14IFG2, 2, 1)
11757 // clear ADC14IFG3
11758 ADD_BITFIELD_WO(CLRADC14IFG3, 3, 1)
11759 // clear ADC14IFG4
11760 ADD_BITFIELD_WO(CLRADC14IFG4, 4, 1)
11761 // clear ADC14IFG5
11762 ADD_BITFIELD_WO(CLRADC14IFG5, 5, 1)
11763 // clear ADC14IFG6
11764 ADD_BITFIELD_WO(CLRADC14IFG6, 6, 1)
11765 // clear ADC14IFG7
11766 ADD_BITFIELD_WO(CLRADC14IFG7, 7, 1)
11767 // clear ADC14IFG8
11768 ADD_BITFIELD_WO(CLRADC14IFG8, 8, 1)
11769 // clear ADC14IFG9
11770 ADD_BITFIELD_WO(CLRADC14IFG9, 9, 1)
11771 // clear ADC14IFG10
11772 ADD_BITFIELD_WO(CLRADC14IFG10, 10, 1)
11773 // clear ADC14IFG11
11774 ADD_BITFIELD_WO(CLRADC14IFG11, 11, 1)
11775 // clear ADC14IFG12
11776 ADD_BITFIELD_WO(CLRADC14IFG12, 12, 1)
11777 // clear ADC14IFG13
11778 ADD_BITFIELD_WO(CLRADC14IFG13, 13, 1)
11779 // clear ADC14IFG14
11780 ADD_BITFIELD_WO(CLRADC14IFG14, 14, 1)
11781 // clear ADC14IFG15
11782 ADD_BITFIELD_WO(CLRADC14IFG15, 15, 1)
11783 // clear ADC14IFG16
11784 ADD_BITFIELD_WO(CLRADC14IFG16, 16, 1)
11785 // clear ADC14IFG17
11786 ADD_BITFIELD_WO(CLRADC14IFG17, 17, 1)
11787 // clear ADC14IFG18
11788 ADD_BITFIELD_WO(CLRADC14IFG18, 18, 1)
11789 // clear ADC14IFG19
11790 ADD_BITFIELD_WO(CLRADC14IFG19, 19, 1)
11791 // clear ADC14IFG20
11792 ADD_BITFIELD_WO(CLRADC14IFG20, 20, 1)
11793 // clear ADC14IFG21
11794 ADD_BITFIELD_WO(CLRADC14IFG21, 21, 1)
11795 // clear ADC14IFG22
11796 ADD_BITFIELD_WO(CLRADC14IFG22, 22, 1)
11797 // clear ADC14IFG23
11798 ADD_BITFIELD_WO(CLRADC14IFG23, 23, 1)
11799 // clear ADC14IFG24
11800 ADD_BITFIELD_WO(CLRADC14IFG24, 24, 1)
11801 // clear ADC14IFG25
11802 ADD_BITFIELD_WO(CLRADC14IFG25, 25, 1)
11803 // clear ADC14IFG26
11804 ADD_BITFIELD_WO(CLRADC14IFG26, 26, 1)
11805 // clear ADC14IFG27
11806 ADD_BITFIELD_WO(CLRADC14IFG27, 27, 1)
11807 // clear ADC14IFG28
11808 ADD_BITFIELD_WO(CLRADC14IFG28, 28, 1)
11809 // clear ADC14IFG29
11810 ADD_BITFIELD_WO(CLRADC14IFG29, 29, 1)
11811 // clear ADC14IFG30
11812 ADD_BITFIELD_WO(CLRADC14IFG30, 30, 1)
11813 // clear ADC14IFG31
11814 ADD_BITFIELD_WO(CLRADC14IFG31, 31, 1)
11815 END_TYPE()
11816
11817 // no effect
11818 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG0__CLRADC14IFG0_0 = 0;
11819 // clear pending interrupt flag
11820 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG0__CLRADC14IFG0_1 = 1;
11821 // no effect
11822 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG1__CLRADC14IFG1_0 = 0;
11823 // clear pending interrupt flag
11824 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG1__CLRADC14IFG1_1 = 1;
11825 // no effect
11826 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG2__CLRADC14IFG2_0 = 0;
11827 // clear pending interrupt flag
11828 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG2__CLRADC14IFG2_1 = 1;
11829 // no effect
11830 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG3__CLRADC14IFG3_0 = 0;
11831 // clear pending interrupt flag
11832 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG3__CLRADC14IFG3_1 = 1;
11833 // no effect
11834 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG4__CLRADC14IFG4_0 = 0;
11835 // clear pending interrupt flag
11836 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG4__CLRADC14IFG4_1 = 1;
11837 // no effect
11838 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG5__CLRADC14IFG5_0 = 0;
11839 // clear pending interrupt flag
11840 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG5__CLRADC14IFG5_1 = 1;
11841 // no effect
11842 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG6__CLRADC14IFG6_0 = 0;
11843 // clear pending interrupt flag
11844 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG6__CLRADC14IFG6_1 = 1;
11845 // no effect
11846 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG7__CLRADC14IFG7_0 = 0;
11847 // clear pending interrupt flag
11848 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG7__CLRADC14IFG7_1 = 1;
11849 // no effect
11850 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG8__CLRADC14IFG8_0 = 0;
11851 // clear pending interrupt flag
11852 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG8__CLRADC14IFG8_1 = 1;
11853 // no effect
11854 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG9__CLRADC14IFG9_0 = 0;
11855 // clear pending interrupt flag
11856 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG9__CLRADC14IFG9_1 = 1;
11857 // no effect
11858 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG10__CLRADC14IFG10_0 = 0;
11859 // clear pending interrupt flag
11860 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG10__CLRADC14IFG10_1 = 1;
11861 // no effect
11862 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG11__CLRADC14IFG11_0 = 0;
11863 // clear pending interrupt flag
11864 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG11__CLRADC14IFG11_1 = 1;
11865 // no effect
11866 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG12__CLRADC14IFG12_0 = 0;
11867 // clear pending interrupt flag
11868 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG12__CLRADC14IFG12_1 = 1;
11869 // no effect
11870 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG13__CLRADC14IFG13_0 = 0;
11871 // clear pending interrupt flag
11872 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG13__CLRADC14IFG13_1 = 1;
11873 // no effect
11874 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG14__CLRADC14IFG14_0 = 0;
11875 // clear pending interrupt flag
11876 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG14__CLRADC14IFG14_1 = 1;
11877 // no effect
11878 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG15__CLRADC14IFG15_0 = 0;
11879 // clear pending interrupt flag
11880 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG15__CLRADC14IFG15_1 = 1;
11881 // no effect
11882 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG16__CLRADC14IFG16_0 = 0;
11883 // clear pending interrupt flag
11884 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG16__CLRADC14IFG16_1 = 1;
11885 // no effect
11886 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG17__CLRADC14IFG17_0 = 0;
11887 // clear pending interrupt flag
11888 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG17__CLRADC14IFG17_1 = 1;
11889 // no effect
11890 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG18__CLRADC14IFG18_0 = 0;
11891 // clear pending interrupt flag
11892 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG18__CLRADC14IFG18_1 = 1;
11893 // no effect
11894 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG19__CLRADC14IFG19_0 = 0;
11895 // clear pending interrupt flag
11896 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG19__CLRADC14IFG19_1 = 1;
11897 // no effect
11898 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG20__CLRADC14IFG20_0 = 0;
11899 // clear pending interrupt flag
11900 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG20__CLRADC14IFG20_1 = 1;
11901 // no effect
11902 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG21__CLRADC14IFG21_0 = 0;
11903 // clear pending interrupt flag
11904 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG21__CLRADC14IFG21_1 = 1;
11905 // no effect
11906 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG22__CLRADC14IFG22_0 = 0;
11907 // clear pending interrupt flag
11908 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG22__CLRADC14IFG22_1 = 1;
11909 // no effect
11910 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG23__CLRADC14IFG23_0 = 0;
11911 // clear pending interrupt flag
11912 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG23__CLRADC14IFG23_1 = 1;
11913 // no effect
11914 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG24__CLRADC14IFG24_0 = 0;
11915 // clear pending interrupt flag
11916 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG24__CLRADC14IFG24_1 = 1;
11917 // no effect
11918 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG25__CLRADC14IFG25_0 = 0;
11919 // clear pending interrupt flag
11920 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG25__CLRADC14IFG25_1 = 1;
11921 // no effect
11922 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG26__CLRADC14IFG26_0 = 0;
11923 // clear pending interrupt flag
11924 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG26__CLRADC14IFG26_1 = 1;
11925 // no effect
11926 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG27__CLRADC14IFG27_0 = 0;
11927 // clear pending interrupt flag
11928 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG27__CLRADC14IFG27_1 = 1;
11929 // no effect
11930 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG28__CLRADC14IFG28_0 = 0;
11931 // clear pending interrupt flag
11932 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG28__CLRADC14IFG28_1 = 1;
11933 // no effect
11934 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG29__CLRADC14IFG29_0 = 0;
11935 // clear pending interrupt flag
11936 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG29__CLRADC14IFG29_1 = 1;
11937 // no effect
11938 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG30__CLRADC14IFG30_0 = 0;
11939 // clear pending interrupt flag
11940 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG30__CLRADC14IFG30_1 = 1;
11941 // no effect
11942 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG31__CLRADC14IFG31_0 = 0;
11943 // clear pending interrupt flag
11944 static const uint32_t ADC14CLRIFGR0_CLRADC14IFG31__CLRADC14IFG31_1 = 1;
11945
11946 // Clear Interrupt Flag 1 Register
11947 // Reset value: 0x00000000
11948 BEGIN_TYPE(ADC14CLRIFGR1_t, uint32_t)
11949 // clear ADC14INIFG
11950 ADD_BITFIELD_WO(CLRADC14INIFG, 1, 1)
11951 // clear ADC14LOIFG
11952 ADD_BITFIELD_WO(CLRADC14LOIFG, 2, 1)
11953 // clear ADC14HIIFG
11954 ADD_BITFIELD_WO(CLRADC14HIIFG, 3, 1)
11955 // clear ADC14OVIFG
11956 ADD_BITFIELD_WO(CLRADC14OVIFG, 4, 1)
11957 // clear ADC14TOVIFG
11958 ADD_BITFIELD_WO(CLRADC14TOVIFG, 5, 1)
11959 // clear ADC14RDYIFG
11960 ADD_BITFIELD_WO(CLRADC14RDYIFG, 6, 1)
11961 END_TYPE()
11962
11963 // no effect
11964 static const uint32_t ADC14CLRIFGR1_CLRADC14INIFG__CLRADC14INIFG_0 = 0;
11965 // clear pending interrupt flag
11966 static const uint32_t ADC14CLRIFGR1_CLRADC14INIFG__CLRADC14INIFG_1 = 1;
11967 // no effect
11968 static const uint32_t ADC14CLRIFGR1_CLRADC14LOIFG__CLRADC14LOIFG_0 = 0;
11969 // clear pending interrupt flag
11970 static const uint32_t ADC14CLRIFGR1_CLRADC14LOIFG__CLRADC14LOIFG_1 = 1;
11971 // no effect
11972 static const uint32_t ADC14CLRIFGR1_CLRADC14HIIFG__CLRADC14HIIFG_0 = 0;
11973 // clear pending interrupt flag
11974 static const uint32_t ADC14CLRIFGR1_CLRADC14HIIFG__CLRADC14HIIFG_1 = 1;
11975 // no effect
11976 static const uint32_t ADC14CLRIFGR1_CLRADC14OVIFG__CLRADC14OVIFG_0 = 0;
11977 // clear pending interrupt flag
11978 static const uint32_t ADC14CLRIFGR1_CLRADC14OVIFG__CLRADC14OVIFG_1 = 1;
11979 // no effect
11980 static const uint32_t ADC14CLRIFGR1_CLRADC14TOVIFG__CLRADC14TOVIFG_0 = 0;
11981 // clear pending interrupt flag
11982 static const uint32_t ADC14CLRIFGR1_CLRADC14TOVIFG__CLRADC14TOVIFG_1 = 1;
11983 // no effect
11984 static const uint32_t ADC14CLRIFGR1_CLRADC14RDYIFG__CLRADC14RDYIFG_0 = 0;
11985 // clear pending interrupt flag
11986 static const uint32_t ADC14CLRIFGR1_CLRADC14RDYIFG__CLRADC14RDYIFG_1 = 1;
11987
11988 // Interrupt Vector Register
11989 // Reset value: 0x00000000
11990 BEGIN_TYPE(ADC14IV_t, uint32_t)
11991 // ADC14 interrupt vector value
11992 ADD_BITFIELD_RW(ADC14IV, 0, 32)
11993 END_TYPE()
11994
11995 // No interrupt pending
11996 static const uint32_t ADC14IV_ADC14IV__ADC14IV_0 = 0;
11997 // Interrupt Source: ADC14MEMx overflow; Interrupt Flag: ADC14OVIFG; Interrupt Priority: Highest
11998 static const uint32_t ADC14IV_ADC14IV__ADC14IV_2 = 2;
11999 // Interrupt Source: Conversion time overflow; Interrupt Flag: ADC14TOVIFG
12000 static const uint32_t ADC14IV_ADC14IV__ADC14IV_4 = 4;
12001 // Interrupt Source: ADC14 window high interrupt flag; Interrupt Flag: ADC14HIIFG
12002 static const uint32_t ADC14IV_ADC14IV__ADC14IV_6 = 6;
12003 // Interrupt Source: ADC14 window low interrupt flag; Interrupt Flag: ADC14LOIFG
12004 static const uint32_t ADC14IV_ADC14IV__ADC14IV_8 = 8;
12005 // Interrupt Source: ADC14 in-window interrupt flag; Interrupt Flag: ADC14INIFG
12006 static const uint32_t ADC14IV_ADC14IV__ADC14IV_10 = 10;
12007 // Interrupt Source: ADC14MEM0 interrupt flag; Interrupt Flag: ADC14IFG0
12008 static const uint32_t ADC14IV_ADC14IV__ADC14IV_12 = 12;
12009 // Interrupt Source: ADC14MEM1 interrupt flag; Interrupt Flag: ADC14IFG1
12010 static const uint32_t ADC14IV_ADC14IV__ADC14IV_14 = 14;
12011 // Interrupt Source: ADC14MEM2 interrupt flag; Interrupt Flag: ADC14IFG2
12012 static const uint32_t ADC14IV_ADC14IV__ADC14IV_16 = 16;
12013 // Interrupt Source: ADC14MEM3 interrupt flag; Interrupt Flag: ADC14IFG3
12014 static const uint32_t ADC14IV_ADC14IV__ADC14IV_18 = 18;
12015 // Interrupt Source: ADC14MEM4 interrupt flag; Interrupt Flag: ADC14IFG4
12016 static const uint32_t ADC14IV_ADC14IV__ADC14IV_20 = 20;
12017 // Interrupt Source: ADC14MEM5 interrupt flag; Interrupt Flag: ADC14IFG5
12018 static const uint32_t ADC14IV_ADC14IV__ADC14IV_22 = 22;
12019 // Interrupt Source: ADC14MEM6 interrupt flag; Interrupt Flag: ADC14IFG6
12020 static const uint32_t ADC14IV_ADC14IV__ADC14IV_24 = 24;
12021 // Interrupt Source: ADC14MEM7 interrupt flag; Interrupt Flag: ADC14IFG7
12022 static const uint32_t ADC14IV_ADC14IV__ADC14IV_26 = 26;
12023 // Interrupt Source: ADC14MEM8 interrupt flag; Interrupt Flag: ADC14IFG8
12024 static const uint32_t ADC14IV_ADC14IV__ADC14IV_28 = 28;
12025 // Interrupt Source: ADC14MEM9 interrupt flag; Interrupt Flag: ADC14IFG9
12026 static const uint32_t ADC14IV_ADC14IV__ADC14IV_30 = 30;
12027 // Interrupt Source: ADC14MEM10 interrupt flag; Interrupt Flag: ADC14IFG10
12028 static const uint32_t ADC14IV_ADC14IV__ADC14IV_32 = 32;
12029 // Interrupt Source: ADC14MEM11 interrupt flag; Interrupt Flag: ADC14IFG11
12030 static const uint32_t ADC14IV_ADC14IV__ADC14IV_34 = 34;
12031 // Interrupt Source: ADC14MEM12 interrupt flag; Interrupt Flag: ADC14IFG12
12032 static const uint32_t ADC14IV_ADC14IV__ADC14IV_36 = 36;
12033 // Interrupt Source: ADC14MEM13 interrupt flag; Interrupt Flag: ADC14IFG13
12034 static const uint32_t ADC14IV_ADC14IV__ADC14IV_38 = 38;
12035 // Interrupt Source: ADC14MEM14 interrupt flag; Interrupt Flag: ADC14IFG14
12036 static const uint32_t ADC14IV_ADC14IV__ADC14IV_40 = 40;
12037 // Interrupt Source: ADC14MEM15 interrupt flag; Interrupt Flag: ADC14IFG15
12038 static const uint32_t ADC14IV_ADC14IV__ADC14IV_42 = 42;
12039 // Interrupt Source: ADC14MEM16 interrupt flag; Interrupt Flag: ADC14IFG16
12040 static const uint32_t ADC14IV_ADC14IV__ADC14IV_44 = 44;
12041 // Interrupt Source: ADC14MEM17 interrupt flag; Interrupt Flag: ADC14IFG17
12042 static const uint32_t ADC14IV_ADC14IV__ADC14IV_46 = 46;
12043 // Interrupt Source: ADC14MEM18 interrupt flag; Interrupt Flag: ADC14IFG18
12044 static const uint32_t ADC14IV_ADC14IV__ADC14IV_48 = 48;
12045 // Interrupt Source: ADC14MEM19 interrupt flag; Interrupt Flag: ADC14IFG19
12046 static const uint32_t ADC14IV_ADC14IV__ADC14IV_50 = 50;
12047 // Interrupt Source: ADC14MEM20 interrupt flag; Interrupt Flag: ADC14IFG20
12048 static const uint32_t ADC14IV_ADC14IV__ADC14IV_52 = 52;
12049 // Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22
12050 static const uint32_t ADC14IV_ADC14IV__ADC14IV_54 = 54;
12051 // Interrupt Source: ADC14MEM22 interrupt flag; Interrupt Flag: ADC14IFG22
12052 static const uint32_t ADC14IV_ADC14IV__ADC14IV_56 = 56;
12053 // Interrupt Source: ADC14MEM23 interrupt flag; Interrupt Flag: ADC14IFG23
12054 static const uint32_t ADC14IV_ADC14IV__ADC14IV_58 = 58;
12055 // Interrupt Source: ADC14MEM24 interrupt flag; Interrupt Flag: ADC14IFG24
12056 static const uint32_t ADC14IV_ADC14IV__ADC14IV_60 = 60;
12057 // Interrupt Source: ADC14MEM25 interrupt flag; Interrupt Flag: ADC14IFG25
12058 static const uint32_t ADC14IV_ADC14IV__ADC14IV_62 = 62;
12059 // Interrupt Source: ADC14MEM26 interrupt flag; Interrupt Flag: ADC14IFG26
12060 static const uint32_t ADC14IV_ADC14IV__ADC14IV_64 = 64;
12061 // Interrupt Source: ADC14MEM27 interrupt flag; Interrupt Flag: ADC14IFG27
12062 static const uint32_t ADC14IV_ADC14IV__ADC14IV_66 = 66;
12063 // Interrupt Source: ADC14MEM28 interrupt flag; Interrupt Flag: ADC14IFG28
12064 static const uint32_t ADC14IV_ADC14IV__ADC14IV_68 = 68;
12065 // Interrupt Source: ADC14MEM29 interrupt flag; Interrupt Flag: ADC14IFG29
12066 static const uint32_t ADC14IV_ADC14IV__ADC14IV_70 = 70;
12067 // Interrupt Source: ADC14MEM30 interrupt flag; Interrupt Flag: ADC14IFG30
12068 static const uint32_t ADC14IV_ADC14IV__ADC14IV_72 = 72;
12069 // Interrupt Source: ADC14MEM31 interrupt flag; Interrupt Flag: ADC14IFG31
12070 static const uint32_t ADC14IV_ADC14IV__ADC14IV_74 = 74;
12071 // Interrupt Source: ADC14RDYIFG interrupt flag; Interrupt Flag: ADC14RDYIFG; Interrupt Priority: Lowest
12072 static const uint32_t ADC14IV_ADC14IV__ADC14IV_76 = 76;
12073
12074 struct ADC14_t {
12075 ADC14CTL0_t ADC14CTL0;
12076 ADC14CTL1_t ADC14CTL1;
12077 ADC14LO0_t ADC14LO0;
12078 ADC14HI0_t ADC14HI0;
12079 ADC14LO1_t ADC14LO1;
12080 ADC14HI1_t ADC14HI1;
12081 ADC14MCTL_t ADC14MCTL0;
12082 ADC14MCTL_t ADC14MCTL1;
12083 ADC14MCTL_t ADC14MCTL2;
12084 ADC14MCTL_t ADC14MCTL3;
12085 ADC14MCTL_t ADC14MCTL4;
12086 ADC14MCTL_t ADC14MCTL5;
12087 ADC14MCTL_t ADC14MCTL6;
12088 ADC14MCTL_t ADC14MCTL7;
12089 ADC14MCTL_t ADC14MCTL8;
12090 ADC14MCTL_t ADC14MCTL9;
12091 ADC14MCTL_t ADC14MCTL10;
12092 ADC14MCTL_t ADC14MCTL11;
12093 ADC14MCTL_t ADC14MCTL12;
12094 ADC14MCTL_t ADC14MCTL13;
12095 ADC14MCTL_t ADC14MCTL14;
12096 ADC14MCTL_t ADC14MCTL15;
12097 ADC14MCTL_t ADC14MCTL16;
12098 ADC14MCTL_t ADC14MCTL17;
12099 ADC14MCTL_t ADC14MCTL18;
12100 ADC14MCTL_t ADC14MCTL19;
12101 ADC14MCTL_t ADC14MCTL20;
12102 ADC14MCTL_t ADC14MCTL21;
12103 ADC14MCTL_t ADC14MCTL22;
12104 ADC14MCTL_t ADC14MCTL23;
12105 ADC14MCTL_t ADC14MCTL24;
12106 ADC14MCTL_t ADC14MCTL25;
12107 ADC14MCTL_t ADC14MCTL26;
12108 ADC14MCTL_t ADC14MCTL27;
12109 ADC14MCTL_t ADC14MCTL28;
12110 ADC14MCTL_t ADC14MCTL29;
12111 ADC14MCTL_t ADC14MCTL30;
12112 ADC14MCTL_t ADC14MCTL31;
12113 ADC14MEM_t ADC14MEM0;
12114 ADC14MEM_t ADC14MEM1;
12115 ADC14MEM_t ADC14MEM2;
12116 ADC14MEM_t ADC14MEM3;
12117 ADC14MEM_t ADC14MEM4;
12118 ADC14MEM_t ADC14MEM5;
12119 ADC14MEM_t ADC14MEM6;
12120 ADC14MEM_t ADC14MEM7;
12121 ADC14MEM_t ADC14MEM8;
12122 ADC14MEM_t ADC14MEM9;
12123 ADC14MEM_t ADC14MEM10;
12124 ADC14MEM_t ADC14MEM11;
12125 ADC14MEM_t ADC14MEM12;
12126 ADC14MEM_t ADC14MEM13;
12127 ADC14MEM_t ADC14MEM14;
12128 ADC14MEM_t ADC14MEM15;
12129 ADC14MEM_t ADC14MEM16;
12130 ADC14MEM_t ADC14MEM17;
12131 ADC14MEM_t ADC14MEM18;
12132 ADC14MEM_t ADC14MEM19;
12133 ADC14MEM_t ADC14MEM20;
12134 ADC14MEM_t ADC14MEM21;
12135 ADC14MEM_t ADC14MEM22;
12136 ADC14MEM_t ADC14MEM23;
12137 ADC14MEM_t ADC14MEM24;
12138 ADC14MEM_t ADC14MEM25;
12139 ADC14MEM_t ADC14MEM26;
12140 ADC14MEM_t ADC14MEM27;
12141 ADC14MEM_t ADC14MEM28;
12142 ADC14MEM_t ADC14MEM29;
12143 ADC14MEM_t ADC14MEM30;
12144 ADC14MEM_t ADC14MEM31;
12145 uint32_t reserved0[9];
12146 ADC14IER0_t ADC14IER0;
12147 ADC14IER1_t ADC14IER1;
12148 ADC14IFGR0_t ADC14IFGR0;
12149 ADC14IFGR1_t ADC14IFGR1;
12150 ADC14CLRIFGR0_t ADC14CLRIFGR0;
12151 ADC14CLRIFGR1_t ADC14CLRIFGR1;
12152 ADC14IV_t ADC14IV;
12153 };
12154
12155 static ADC14_t & ADC14 = (*(ADC14_t *)0x40012000);
12156
12157} // _ADC14_
12158
12159// ITM
12160namespace _ITM_ {
12161
12162 // ITM Stimulus Port 0
12163 typedef uint32_t ITM_STIM0_t;
12164
12165 // ITM Stimulus Port 1
12166 typedef uint32_t ITM_STIM1_t;
12167
12168 // ITM Stimulus Port 2
12169 typedef uint32_t ITM_STIM2_t;
12170
12171 // ITM Stimulus Port 3
12172 typedef uint32_t ITM_STIM3_t;
12173
12174 // ITM Stimulus Port 4
12175 typedef uint32_t ITM_STIM4_t;
12176
12177 // ITM Stimulus Port 5
12178 typedef uint32_t ITM_STIM5_t;
12179
12180 // ITM Stimulus Port 6
12181 typedef uint32_t ITM_STIM6_t;
12182
12183 // ITM Stimulus Port 7
12184 typedef uint32_t ITM_STIM7_t;
12185
12186 // ITM Stimulus Port 8
12187 typedef uint32_t ITM_STIM8_t;
12188
12189 // ITM Stimulus Port 9
12190 typedef uint32_t ITM_STIM9_t;
12191
12192 // ITM Stimulus Port 10
12193 typedef uint32_t ITM_STIM10_t;
12194
12195 // ITM Stimulus Port 11
12196 typedef uint32_t ITM_STIM11_t;
12197
12198 // ITM Stimulus Port 12
12199 typedef uint32_t ITM_STIM12_t;
12200
12201 // ITM Stimulus Port 13
12202 typedef uint32_t ITM_STIM13_t;
12203
12204 // ITM Stimulus Port 14
12205 typedef uint32_t ITM_STIM14_t;
12206
12207 // ITM Stimulus Port 15
12208 typedef uint32_t ITM_STIM15_t;
12209
12210 // ITM Stimulus Port 16
12211 typedef uint32_t ITM_STIM16_t;
12212
12213 // ITM Stimulus Port 17
12214 typedef uint32_t ITM_STIM17_t;
12215
12216 // ITM Stimulus Port 18
12217 typedef uint32_t ITM_STIM18_t;
12218
12219 // ITM Stimulus Port 19
12220 typedef uint32_t ITM_STIM19_t;
12221
12222 // ITM Stimulus Port 20
12223 typedef uint32_t ITM_STIM20_t;
12224
12225 // ITM Stimulus Port 21
12226 typedef uint32_t ITM_STIM21_t;
12227
12228 // ITM Stimulus Port 22
12229 typedef uint32_t ITM_STIM22_t;
12230
12231 // ITM Stimulus Port 23
12232 typedef uint32_t ITM_STIM23_t;
12233
12234 // ITM Stimulus Port 24
12235 typedef uint32_t ITM_STIM24_t;
12236
12237 // ITM Stimulus Port 25
12238 typedef uint32_t ITM_STIM25_t;
12239
12240 // ITM Stimulus Port 26
12241 typedef uint32_t ITM_STIM26_t;
12242
12243 // ITM Stimulus Port 27
12244 typedef uint32_t ITM_STIM27_t;
12245
12246 // ITM Stimulus Port 28
12247 typedef uint32_t ITM_STIM28_t;
12248
12249 // ITM Stimulus Port 29
12250 typedef uint32_t ITM_STIM29_t;
12251
12252 // ITM Stimulus Port 30
12253 typedef uint32_t ITM_STIM30_t;
12254
12255 // ITM Stimulus Port 31
12256 typedef uint32_t ITM_STIM31_t;
12257
12258 // ITM Trace Enable Register
12259 // Reset value: 0x00000000
12260 BEGIN_TYPE(ITM_TER_t, uint32_t)
12261 // Bit mask to enable tracing on ITM stimulus ports. One bit per stimulus port.
12262 ADD_BITFIELD_RW(STIMENA, 0, 32)
12263 END_TYPE()
12264
12265 // ITM Trace Privilege Register
12266 // Reset value: 0x00000000
12267 BEGIN_TYPE(ITM_TPR_t, uint32_t)
12268 // Bit mask to enable tracing on ITM stimulus ports: bit [0] = stimulus ports [7:0], bit [1] = stimulus ports [15:8], bit [2] = stimulus ports [23:16], bit [3] = stimulus ports [31:24].
12269 ADD_BITFIELD_RW(PRIVMASK, 0, 4)
12270 END_TYPE()
12271
12272 // ITM Trace Control Register
12273 // Reset value: 0x00000000
12274 BEGIN_TYPE(ITM_TCR_t, uint32_t)
12275 // Enable ITM. This is the master enable, and must be set before ITM Stimulus and Trace Enable registers can be written.
12276 ADD_BITFIELD_RW(ITMENA, 0, 1)
12277 // Enables differential timestamps. Differential timestamps are emitted when a packet is written to the FIFO with a non-zero timestamp counter, and when the timestamp counter overflows. Timestamps are emitted during idle times after a fixed number of two million cycles. This provides a time reference for packets and inter-packet gaps. If SWOENA (bit [4]) is set, timestamps are triggered by activity on the internal trace bus only. In this case there is no regular timestamp output when the ITM is idle.
12278 ADD_BITFIELD_RW(TSENA, 1, 1)
12279 // Enables sync packets for TPIU.
12280 ADD_BITFIELD_RW(SYNCENA, 2, 1)
12281 // Enables the DWT stimulus.
12282 ADD_BITFIELD_RW(DWTENA, 3, 1)
12283 // Enables asynchronous clocking of the timestamp counter.
12284 ADD_BITFIELD_RW(SWOENA, 4, 1)
12285 // TSPrescale Timestamp prescaler.
12286 ADD_BITFIELD_RW(TSPRESCALE, 8, 2)
12287 // ATB ID for CoreSight system.
12288 ADD_BITFIELD_RW(ATBID, 16, 7)
12289 // Set when ITM events present and being drained.
12290 ADD_BITFIELD_RW(BUSY, 23, 1)
12291 END_TYPE()
12292
12293 // no prescaling
12294 static const uint32_t ITM_TCR_TSPRESCALE__en_0b00 = 0;
12295 // divide by 4
12296 static const uint32_t ITM_TCR_TSPRESCALE__en_0b01 = 1;
12297 // divide by 16
12298 static const uint32_t ITM_TCR_TSPRESCALE__en_0b10 = 2;
12299 // divide by 64
12300 static const uint32_t ITM_TCR_TSPRESCALE__en_0b11 = 3;
12301
12302 // ITM Integration Write Register
12303 // Reset value: 0x00000000
12304 BEGIN_TYPE(ITM_IWR_t, uint32_t)
12305 // When the integration mode is set: 0 = ATVALIDM clear. 1 = ATVALIDM set.
12306 ADD_BITFIELD_WO(ATVALIDM, 0, 1)
12307 END_TYPE()
12308
12309 // ATVALIDM clear
12310 static const uint32_t ITM_IWR_ATVALIDM__en_0b0 = 0;
12311 // ATVALIDM set
12312 static const uint32_t ITM_IWR_ATVALIDM__en_0b1 = 1;
12313
12314 // ITM Integration Mode Control Register
12315 // Reset value: 0x00000000
12316 BEGIN_TYPE(ITM_IMCR_t, uint32_t)
12317 ADD_BITFIELD_RW(INTEGRATION, 0, 1)
12318 END_TYPE()
12319
12320 // ATVALIDM normal
12321 static const uint32_t ITM_IMCR_INTEGRATION__en_0b0 = 0;
12322 // ATVALIDM driven from Integration Write Register
12323 static const uint32_t ITM_IMCR_INTEGRATION__en_0b1 = 1;
12324
12325 // ITM Lock Access Register
12326 // Reset value: 0x00000000
12327 BEGIN_TYPE(ITM_LAR_t, uint32_t)
12328 // A privileged write of 0xC5ACCE55 enables more write access to Control Register 0xE00::0xFFC. An invalid write removes write access.
12329 ADD_BITFIELD_WO(LOCK_ACCESS, 0, 32)
12330 END_TYPE()
12331
12332 // ITM Lock Status Register
12333 // Reset value: 0x00000003
12334 BEGIN_TYPE(ITM_LSR_t, uint32_t)
12335 // Indicates that a lock mechanism exists for this component.
12336 ADD_BITFIELD_RO(PRESENT, 0, 1)
12337 // Write access to component is blocked. All writes are ignored, reads are permitted.
12338 ADD_BITFIELD_RO(ACCESS, 1, 1)
12339 // You cannot implement 8-bit lock accesses.
12340 ADD_BITFIELD_RO(BYTEACC, 2, 1)
12341 END_TYPE()
12342
12343 struct ITM_t {
12344 ITM_STIM0_t ITM_STIM0;
12345 ITM_STIM1_t ITM_STIM1;
12346 ITM_STIM2_t ITM_STIM2;
12347 ITM_STIM3_t ITM_STIM3;
12348 ITM_STIM4_t ITM_STIM4;
12349 ITM_STIM5_t ITM_STIM5;
12350 ITM_STIM6_t ITM_STIM6;
12351 ITM_STIM7_t ITM_STIM7;
12352 ITM_STIM8_t ITM_STIM8;
12353 ITM_STIM9_t ITM_STIM9;
12354 ITM_STIM10_t ITM_STIM10;
12355 ITM_STIM11_t ITM_STIM11;
12356 ITM_STIM12_t ITM_STIM12;
12357 ITM_STIM13_t ITM_STIM13;
12358 ITM_STIM14_t ITM_STIM14;
12359 ITM_STIM15_t ITM_STIM15;
12360 ITM_STIM16_t ITM_STIM16;
12361 ITM_STIM17_t ITM_STIM17;
12362 ITM_STIM18_t ITM_STIM18;
12363 ITM_STIM19_t ITM_STIM19;
12364 ITM_STIM20_t ITM_STIM20;
12365 ITM_STIM21_t ITM_STIM21;
12366 ITM_STIM22_t ITM_STIM22;
12367 ITM_STIM23_t ITM_STIM23;
12368 ITM_STIM24_t ITM_STIM24;
12369 ITM_STIM25_t ITM_STIM25;
12370 ITM_STIM26_t ITM_STIM26;
12371 ITM_STIM27_t ITM_STIM27;
12372 ITM_STIM28_t ITM_STIM28;
12373 ITM_STIM29_t ITM_STIM29;
12374 ITM_STIM30_t ITM_STIM30;
12375 ITM_STIM31_t ITM_STIM31;
12376 uint32_t reserved0[864];
12377 ITM_TER_t ITM_TER;
12378 uint32_t reserved1[15];
12379 ITM_TPR_t ITM_TPR;
12380 uint32_t reserved2[15];
12381 ITM_TCR_t ITM_TCR;
12382 uint32_t reserved3[29];
12383 ITM_IWR_t ITM_IWR;
12384 uint32_t reserved4;
12385 ITM_IMCR_t ITM_IMCR;
12386 uint32_t reserved5[43];
12387 ITM_LAR_t ITM_LAR;
12388 ITM_LSR_t ITM_LSR;
12389 };
12390
12391 static ITM_t & ITM = (*(ITM_t *)0xe0000000);
12392
12393} // _ITM_
12394
12395// DWT
12396namespace _DWT_ {
12397
12398 // DWT Control Register
12399 // Reset value: 0x40000000
12400 BEGIN_TYPE(DWT_CTRL_t, uint32_t)
12401 // Enable the CYCCNT counter. If not enabled, the counter does not count and no event is generated for PS sampling or CYCCNTENA. In normal use, the debugger must initialize the CYCCNT counter to 0.
12402 ADD_BITFIELD_RW(CYCCNTENA, 0, 1)
12403 // Reload value for POSTCNT, bits [8:5], post-scalar counter. If this value is 0, events are triggered on each tap change (a power of 2). If this field has a non-0 value, this forms a count-down value, to be reloaded into POSTCNT each time it reaches 0. For example, a value 1 in this register means an event is formed every other tap change.
12404 ADD_BITFIELD_RW(POSTPRESET, 1, 4)
12405 // Post-scalar counter for CYCTAP. When the selected tapped bit changes from 0 to 1 or 1 to 0, the post scalar counter is down-counted when not 0. If 0, it triggers an event for PCSAMPLENA or CYCEVTENA use. It also reloads with the value from POSTPRESET (bits [4:1]).
12406 ADD_BITFIELD_RW(POSTCNT, 5, 4)
12407 // Selects a tap on the DWT_CYCCNT register. These are spaced at bits [6] and [10]. When the selected bit in the CYCCNT register changes from 0 to 1 or 1 to 0, it emits into the POSTCNT, bits [8:5], post-scalar counter. That counter then counts down. On a bit change when post-scalar is 0, it triggers an event for PC sampling or CYCEVTCNT.
12408 ADD_BITFIELD_RW(CYCTAP, 9, 1)
12409 // Feeds a synchronization pulse to the ITM SYNCENA control. The value selected here picks the rate (approximately 1/second or less) by selecting a tap on the DWT_CYCCNT register. To use synchronization (heartbeat and hot-connect synchronization), CYCCNTENA must be set to 1, SYNCTAP must be set to one of its values, and SYNCENA must be set to 1.
12410 ADD_BITFIELD_RW(SYNCTAP, 10, 2)
12411 // Enables PC Sampling event. A PC sample event is emitted when the POSTCNT counter triggers it. See CYCTAP, bit [9], and POSTPRESET, bits [4:1], for details. Enabling this bit overrides CYCEVTENA (bit [20]). Reset clears the PCSAMPLENA bit.
12412 ADD_BITFIELD_RW(PCSAMPLEENA, 12, 1)
12413 // Enables Interrupt event tracing. Reset clears the EXCEVTENA bit.
12414 ADD_BITFIELD_RW(EXCTRCENA, 16, 1)
12415 // Enables CPI count event. Emits an event when DWT_CPICNT overflows (every 256 cycles of multi-cycle instructions). Reset clears the CPIEVTENA bit.
12416 ADD_BITFIELD_RW(CPIEVTENA, 17, 1)
12417 // Enables Interrupt overhead event. Emits an event when DWT_EXCCNT overflows (every 256 cycles of interrupt overhead). Reset clears the EXCEVTENA bit.
12418 ADD_BITFIELD_RW(EXCEVTENA, 18, 1)
12419 // Enables Sleep count event. Emits an event when DWT_SLEEPCNT overflows (every 256 cycles that the processor is sleeping). Reset clears the SLEEPEVTENA bit.
12420 ADD_BITFIELD_RW(SLEEPEVTENA, 19, 1)
12421 // Enables LSU count event. Emits an event when DWT_LSUCNT overflows (every 256 cycles of LSU operation). LSU counts include all LSU costs after the initial cycle for the instruction. Reset clears the LSUEVTENA bit.
12422 ADD_BITFIELD_RW(LSUEVTENA, 20, 1)
12423 // Enables Folded instruction count event. Emits an event when DWT_FOLDCNT overflows (every 256 cycles of folded instructions). A folded instruction is one that does not incur even one cycle to execute. For example, an IT instruction is folded away and so does not use up one cycle. Reset clears the FOLDEVTENA bit.
12424 ADD_BITFIELD_RW(FOLDEVTENA, 21, 1)
12425 // Enables Cycle count event. Emits an event when the POSTCNT counter triggers it. See CYCTAP (bit [9]) and POSTPRESET, bits [4:1], for details. This event is only emitted if PCSAMPLENA, bit [12], is disabled. PCSAMPLENA overrides the setting of this bit. Reset clears the CYCEVTENA bit.
12426 ADD_BITFIELD_RW(CYCEVTENA, 22, 1)
12427 // When set, DWT_FOLDCNT, DWT_LSUCNT, DWT_SLEEPCNT, DWT_EXCCNT, and DWT_CPICNT are not supported.
12428 ADD_BITFIELD_RW(NOPRFCNT, 24, 1)
12429 // When set, DWT_CYCCNT is not supported.
12430 ADD_BITFIELD_RW(NOCYCCNT, 25, 1)
12431 END_TYPE()
12432
12433 // selects bit [6] to tap
12434 static const uint32_t DWT_CTRL_CYCTAP__en_0b0 = 0;
12435 // selects bit [10] to tap.
12436 static const uint32_t DWT_CTRL_CYCTAP__en_0b1 = 1;
12437 // Disabled. No synch counting.
12438 static const uint32_t DWT_CTRL_SYNCTAP__en_0b00 = 0;
12439 // Tap at CYCCNT bit 24.
12440 static const uint32_t DWT_CTRL_SYNCTAP__en_0b01 = 1;
12441 // Tap at CYCCNT bit 26.
12442 static const uint32_t DWT_CTRL_SYNCTAP__en_0b10 = 2;
12443 // Tap at CYCCNT bit 28.
12444 static const uint32_t DWT_CTRL_SYNCTAP__en_0b11 = 3;
12445 // PC Sampling event disabled.
12446 static const uint32_t DWT_CTRL_PCSAMPLEENA__en_0b0 = 0;
12447 // Sampling event enabled.
12448 static const uint32_t DWT_CTRL_PCSAMPLEENA__en_0b1 = 1;
12449 // interrupt event trace disabled.
12450 static const uint32_t DWT_CTRL_EXCTRCENA__en_0b0 = 0;
12451 // interrupt event trace enabled.
12452 static const uint32_t DWT_CTRL_EXCTRCENA__en_0b1 = 1;
12453 // CPI counter events disabled.
12454 static const uint32_t DWT_CTRL_CPIEVTENA__en_0b0 = 0;
12455 // CPI counter events enabled.
12456 static const uint32_t DWT_CTRL_CPIEVTENA__en_0b1 = 1;
12457 // Interrupt overhead event disabled.
12458 static const uint32_t DWT_CTRL_EXCEVTENA__en_0b0 = 0;
12459 // Interrupt overhead event enabled.
12460 static const uint32_t DWT_CTRL_EXCEVTENA__en_0b1 = 1;
12461 // Sleep count events disabled.
12462 static const uint32_t DWT_CTRL_SLEEPEVTENA__en_0b0 = 0;
12463 // Sleep count events enabled.
12464 static const uint32_t DWT_CTRL_SLEEPEVTENA__en_0b1 = 1;
12465 // LSU count events disabled.
12466 static const uint32_t DWT_CTRL_LSUEVTENA__en_0b0 = 0;
12467 // LSU count events enabled.
12468 static const uint32_t DWT_CTRL_LSUEVTENA__en_0b1 = 1;
12469 // Folded instruction count events disabled.
12470 static const uint32_t DWT_CTRL_FOLDEVTENA__en_0b0 = 0;
12471 // Folded instruction count events enabled.
12472 static const uint32_t DWT_CTRL_FOLDEVTENA__en_0b1 = 1;
12473 // Cycle count events disabled.
12474 static const uint32_t DWT_CTRL_CYCEVTENA__en_0b0 = 0;
12475 // Cycle count events enabled.
12476 static const uint32_t DWT_CTRL_CYCEVTENA__en_0b1 = 1;
12477
12478 // DWT Current PC Sampler Cycle Count Register
12479 // Reset value: 0x00000000
12480 BEGIN_TYPE(DWT_CYCCNT_t, uint32_t)
12481 // Current PC Sampler Cycle Counter count value. When enabled, this counter counts the number of core cycles, except when the core is halted. CYCCNT is a free running counter, counting upwards. It wraps around to 0 on overflow. The debugger must initialize this to 0 when first enabling.
12482 ADD_BITFIELD_RW(CYCCNT, 0, 32)
12483 END_TYPE()
12484
12485 // DWT CPI Count Register
12486 BEGIN_TYPE(DWT_CPICNT_t, uint32_t)
12487 // Current CPI counter value. Increments on the additional cycles (the first cycle is not counted) required to execute all instructions except those recorded by DWT_LSUCNT. This counter also increments on all instruction fetch stalls. If CPIEVTENA is set, an event is emitted when the counter overflows. Clears to 0 on enabling.
12488 ADD_BITFIELD_RW(CPICNT, 0, 8)
12489 END_TYPE()
12490
12491 // DWT Exception Overhead Count Register
12492 BEGIN_TYPE(DWT_EXCCNT_t, uint32_t)
12493 // Current interrupt overhead counter value. Counts the total cycles spent in interrupt processing (for example entry stacking, return unstacking, pre-emption). An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when enabled. Clears to 0 on enabling.
12494 ADD_BITFIELD_RW(EXCCNT, 0, 8)
12495 END_TYPE()
12496
12497 // DWT Sleep Count Register
12498 BEGIN_TYPE(DWT_SLEEPCNT_t, uint32_t)
12499 // Sleep counter. Counts the number of cycles during which the processor is sleeping. An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when enabled. Note that SLEEPCNT is clocked using FCLK. It is possible that the frequency of FCLK might be reduced while the processor is sleeping to minimize power consumption. This means that sleep duration must be calculated with the frequency of FCLK during sleep.
12500 ADD_BITFIELD_RW(SLEEPCNT, 0, 8)
12501 END_TYPE()
12502
12503 // DWT LSU Count Register
12504 BEGIN_TYPE(DWT_LSUCNT_t, uint32_t)
12505 // LSU counter. This counts the total number of cycles that the processor is processing an LSU operation. The initial execution cost of the instruction is not counted. For example, an LDR that takes two cycles to complete increments this counter one cycle. Equivalently, an LDR that stalls for two cycles (and so takes four cycles), increments this counter three times. An event is emitted on counter overflow (every 256 cycles). Clears to 0 on enabling.
12506 ADD_BITFIELD_RW(LSUCNT, 0, 8)
12507 END_TYPE()
12508
12509 // DWT Fold Count Register
12510 BEGIN_TYPE(DWT_FOLDCNT_t, uint32_t)
12511 // This counts the total number folded instructions. This counter initializes to 0 when enabled.
12512 ADD_BITFIELD_RW(FOLDCNT, 0, 8)
12513 END_TYPE()
12514
12515 // DWT Program Counter Sample Register
12516 BEGIN_TYPE(DWT_PCSR_t, uint32_t)
12517 // Execution instruction address sample, or 0xFFFFFFFF if the core is halted.
12518 ADD_BITFIELD_RO(EIASAMPLE, 0, 32)
12519 END_TYPE()
12520
12521 // DWT Comparator Register 0
12522 BEGIN_TYPE(DWT_COMP0_t, uint32_t)
12523 // Data value to compare against PC and the data address as given by DWT_FUNCTION0. DWT_COMP0 can also compare against the value of the PC Sampler Counter (DWT_CYCCNT).
12524 ADD_BITFIELD_RW(COMP, 0, 32)
12525 END_TYPE()
12526
12527 // DWT Mask Register 0
12528 BEGIN_TYPE(DWT_MASK0_t, uint32_t)
12529 // Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
12530 ADD_BITFIELD_RW(MASK, 0, 4)
12531 END_TYPE()
12532
12533 // DWT Function Register 0
12534 // Reset value: 0x00000000
12535 BEGIN_TYPE(DWT_FUNCTION0_t, uint32_t)
12536 // Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
12537 ADD_BITFIELD_RW(FUNCTION, 0, 4)
12538 // Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
12539 ADD_BITFIELD_RW(EMITRANGE, 5, 1)
12540 // This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
12541 ADD_BITFIELD_RW(DATAVMATCH, 8, 1)
12542 ADD_BITFIELD_RO(LNK1ENA, 9, 1)
12543 // Defines the size of the data in the COMP register that is to be matched:
12544 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
12545 // Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
12546 ADD_BITFIELD_RW(DATAVADDR0, 12, 4)
12547 // Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
12548 ADD_BITFIELD_RW(DATAVADDR1, 16, 4)
12549 // This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
12550 ADD_BITFIELD_RW(MATCHED, 24, 1)
12551 END_TYPE()
12552
12553 // Disabled
12554 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0000 = 0;
12555 // EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
12556 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0001 = 1;
12557 // EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
12558 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0010 = 2;
12559 // EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
12560 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0011 = 3;
12561 // Watchpoint on PC match.
12562 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0100 = 4;
12563 // Watchpoint on read.
12564 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0101 = 5;
12565 // Watchpoint on write.
12566 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0110 = 6;
12567 // Watchpoint on read or write.
12568 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b0111 = 7;
12569 // ETM trigger on PC match
12570 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1000 = 8;
12571 // ETM trigger on read
12572 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1001 = 9;
12573 // ETM trigger on write
12574 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1010 = 10;
12575 // ETM trigger on read or write
12576 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1011 = 11;
12577 // EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers
12578 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1100 = 12;
12579 // EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers
12580 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1101 = 13;
12581 // EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers
12582 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1110 = 14;
12583 // EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers
12584 static const uint32_t DWT_FUNCTION0_FUNCTION__en_0b1111 = 15;
12585 // DATAVADDR1 not supported
12586 static const uint32_t DWT_FUNCTION0_LNK1ENA__en_0b0 = 0;
12587 // DATAVADDR1 supported (enabled).
12588 static const uint32_t DWT_FUNCTION0_LNK1ENA__en_0b1 = 1;
12589 // byte
12590 static const uint32_t DWT_FUNCTION0_DATAVSIZE__en_0b00 = 0;
12591 // halfword
12592 static const uint32_t DWT_FUNCTION0_DATAVSIZE__en_0b01 = 1;
12593 // word
12594 static const uint32_t DWT_FUNCTION0_DATAVSIZE__en_0b10 = 2;
12595 // Unpredictable.
12596 static const uint32_t DWT_FUNCTION0_DATAVSIZE__en_0b11 = 3;
12597
12598 // DWT Comparator Register 1
12599 BEGIN_TYPE(DWT_COMP1_t, uint32_t)
12600 // Data value to compare against PC and the data address as given by DWT_FUNCTION1.
12601 ADD_BITFIELD_RW(COMP, 0, 32)
12602 END_TYPE()
12603
12604 // DWT Mask Register 1
12605 BEGIN_TYPE(DWT_MASK1_t, uint32_t)
12606 // Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
12607 ADD_BITFIELD_RW(MASK, 0, 4)
12608 END_TYPE()
12609
12610 // DWT Function Register 1
12611 // Reset value: 0x00000000
12612 BEGIN_TYPE(DWT_FUNCTION1_t, uint32_t)
12613 // Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: FUNCTION is overridden for comparators given by DATAVADDR0 and DATAVADDR1 in DWT_FUNCTION1if DATAVMATCH is also set in DWT_FUNCTION1. The comparators given by DATAVADDR0 and DATAVADDR1 can then only perform address comparator matches for comparator 1 data matches. Note 4: If the data matching functionality is not included during implementation it is not possible to set DATAVADDR0, DATAVADDR1, or DATAVMATCH in DWT_FUNCTION1. This means that the data matching functionality is not available in the implementation. Test the availability of data matching by writing and reading the DATAVMATCH bit in DWT_FUNCTION1. If it is not settable then data matching is unavailable. Note 5: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
12614 ADD_BITFIELD_RW(FUNCTION, 0, 4)
12615 // Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
12616 ADD_BITFIELD_RW(EMITRANGE, 5, 1)
12617 // Only available in comparator 0. When set, this comparator compares against the clock cycle counter.
12618 ADD_BITFIELD_RW(CYCMATCH, 7, 1)
12619 // This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
12620 ADD_BITFIELD_RW(DATAVMATCH, 8, 1)
12621 ADD_BITFIELD_RO(LNK1ENA, 9, 1)
12622 // Defines the size of the data in the COMP register that is to be matched:
12623 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
12624 // Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
12625 ADD_BITFIELD_RW(DATAVADDR0, 12, 4)
12626 // Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
12627 ADD_BITFIELD_RW(DATAVADDR1, 16, 4)
12628 // This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
12629 ADD_BITFIELD_RW(MATCHED, 24, 1)
12630 END_TYPE()
12631
12632 // Disabled
12633 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0000 = 0;
12634 // EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
12635 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0001 = 1;
12636 // EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
12637 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0010 = 2;
12638 // EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
12639 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0011 = 3;
12640 // Watchpoint on PC match.
12641 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0100 = 4;
12642 // Watchpoint on read.
12643 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0101 = 5;
12644 // Watchpoint on write.
12645 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0110 = 6;
12646 // Watchpoint on read or write.
12647 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b0111 = 7;
12648 // ETM trigger on PC match
12649 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1000 = 8;
12650 // ETM trigger on read
12651 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1001 = 9;
12652 // ETM trigger on write
12653 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1010 = 10;
12654 // ETM trigger on read or write
12655 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1011 = 11;
12656 // EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers
12657 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1100 = 12;
12658 // EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers
12659 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1101 = 13;
12660 // EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers
12661 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1110 = 14;
12662 // EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers
12663 static const uint32_t DWT_FUNCTION1_FUNCTION__en_0b1111 = 15;
12664 // DATAVADDR1 not supported
12665 static const uint32_t DWT_FUNCTION1_LNK1ENA__en_0b0 = 0;
12666 // DATAVADDR1 supported (enabled).
12667 static const uint32_t DWT_FUNCTION1_LNK1ENA__en_0b1 = 1;
12668 // byte
12669 static const uint32_t DWT_FUNCTION1_DATAVSIZE__en_0b00 = 0;
12670 // halfword
12671 static const uint32_t DWT_FUNCTION1_DATAVSIZE__en_0b01 = 1;
12672 // word
12673 static const uint32_t DWT_FUNCTION1_DATAVSIZE__en_0b10 = 2;
12674 // Unpredictable.
12675 static const uint32_t DWT_FUNCTION1_DATAVSIZE__en_0b11 = 3;
12676
12677 // DWT Comparator Register 2
12678 BEGIN_TYPE(DWT_COMP2_t, uint32_t)
12679 // Data value to compare against PC and the data address as given by DWT_FUNCTION2.
12680 ADD_BITFIELD_RW(COMP, 0, 32)
12681 END_TYPE()
12682
12683 // DWT Mask Register 2
12684 BEGIN_TYPE(DWT_MASK2_t, uint32_t)
12685 // Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
12686 ADD_BITFIELD_RW(MASK, 0, 4)
12687 END_TYPE()
12688
12689 // DWT Function Register 2
12690 // Reset value: 0x00000000
12691 BEGIN_TYPE(DWT_FUNCTION2_t, uint32_t)
12692 // Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
12693 ADD_BITFIELD_RW(FUNCTION, 0, 4)
12694 // Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
12695 ADD_BITFIELD_RW(EMITRANGE, 5, 1)
12696 // This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
12697 ADD_BITFIELD_RW(DATAVMATCH, 8, 1)
12698 ADD_BITFIELD_RO(LNK1ENA, 9, 1)
12699 // Defines the size of the data in the COMP register that is to be matched:
12700 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
12701 // Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
12702 ADD_BITFIELD_RW(DATAVADDR0, 12, 4)
12703 // Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
12704 ADD_BITFIELD_RW(DATAVADDR1, 16, 4)
12705 // This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
12706 ADD_BITFIELD_RW(MATCHED, 24, 1)
12707 END_TYPE()
12708
12709 // Disabled
12710 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0000 = 0;
12711 // EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
12712 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0001 = 1;
12713 // EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
12714 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0010 = 2;
12715 // EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
12716 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0011 = 3;
12717 // Watchpoint on PC match.
12718 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0100 = 4;
12719 // Watchpoint on read.
12720 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0101 = 5;
12721 // Watchpoint on write.
12722 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0110 = 6;
12723 // Watchpoint on read or write.
12724 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b0111 = 7;
12725 // ETM trigger on PC match
12726 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1000 = 8;
12727 // ETM trigger on read
12728 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1001 = 9;
12729 // ETM trigger on write
12730 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1010 = 10;
12731 // ETM trigger on read or write
12732 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1011 = 11;
12733 // EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers
12734 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1100 = 12;
12735 // EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers
12736 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1101 = 13;
12737 // EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers
12738 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1110 = 14;
12739 // EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers
12740 static const uint32_t DWT_FUNCTION2_FUNCTION__en_0b1111 = 15;
12741 // DATAVADDR1 not supported
12742 static const uint32_t DWT_FUNCTION2_LNK1ENA__en_0b0 = 0;
12743 // DATAVADDR1 supported (enabled).
12744 static const uint32_t DWT_FUNCTION2_LNK1ENA__en_0b1 = 1;
12745 // byte
12746 static const uint32_t DWT_FUNCTION2_DATAVSIZE__en_0b00 = 0;
12747 // halfword
12748 static const uint32_t DWT_FUNCTION2_DATAVSIZE__en_0b01 = 1;
12749 // word
12750 static const uint32_t DWT_FUNCTION2_DATAVSIZE__en_0b10 = 2;
12751 // Unpredictable.
12752 static const uint32_t DWT_FUNCTION2_DATAVSIZE__en_0b11 = 3;
12753
12754 // DWT Comparator Register 3
12755 BEGIN_TYPE(DWT_COMP3_t, uint32_t)
12756 // Data value to compare against PC and the data address as given by DWT_FUNCTION3.
12757 ADD_BITFIELD_RW(COMP, 0, 32)
12758 END_TYPE()
12759
12760 // DWT Mask Register 3
12761 BEGIN_TYPE(DWT_MASK3_t, uint32_t)
12762 // Mask on data address when matching against COMP. This is the size of the ignore mask. hat is, DWT matching is performed as:(ADDR ANDed with (~0 left bit-shifted by MASK)) == COMP. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP is 3, this matches a word access of 0, because 3 would be within the word.
12763 ADD_BITFIELD_RW(MASK, 0, 4)
12764 END_TYPE()
12765
12766 // DWT Function Register 3
12767 // Reset value: 0x00000000
12768 BEGIN_TYPE(DWT_FUNCTION3_t, uint32_t)
12769 // Function settings. Note 1: If the ETM is not fitted, then ETM trigger is not possible. Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst. Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.
12770 ADD_BITFIELD_RW(FUNCTION, 0, 4)
12771 // Emit range field. Reserved to permit emitting offset when range match occurs. Reset clears the EMITRANGE bit. PC sampling is not supported when EMITRANGE is enabled. EMITRANGE only applies for: FUNCTION = b0001, b0010, b0011, b1100, b1101, b1110, and b1111.
12772 ADD_BITFIELD_RW(EMITRANGE, 5, 1)
12773 // This bit is only available in comparator 1. When DATAVMATCH is set, this comparator performs data value compares. The comparators given by DATAVADDR0 and DATAVADDR1provide the address for the data comparison. If DATAVMATCH is set in DWT_FUNCTION1, the FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
12774 ADD_BITFIELD_RW(DATAVMATCH, 8, 1)
12775 ADD_BITFIELD_RO(LNK1ENA, 9, 1)
12776 // Defines the size of the data in the COMP register that is to be matched:
12777 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
12778 // Identity of a linked address comparator for data value matching when DATAVMATCH == 1.
12779 ADD_BITFIELD_RW(DATAVADDR0, 12, 4)
12780 // Identity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
12781 ADD_BITFIELD_RW(DATAVADDR1, 16, 4)
12782 // This bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
12783 ADD_BITFIELD_RW(MATCHED, 24, 1)
12784 END_TYPE()
12785
12786 // Disabled
12787 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0000 = 0;
12788 // EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
12789 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0001 = 1;
12790 // EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
12791 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0010 = 2;
12792 // EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
12793 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0011 = 3;
12794 // Watchpoint on PC match.
12795 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0100 = 4;
12796 // Watchpoint on read.
12797 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0101 = 5;
12798 // Watchpoint on write.
12799 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0110 = 6;
12800 // Watchpoint on read or write.
12801 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b0111 = 7;
12802 // ETM trigger on PC match
12803 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1000 = 8;
12804 // ETM trigger on read
12805 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1001 = 9;
12806 // ETM trigger on write
12807 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1010 = 10;
12808 // ETM trigger on read or write
12809 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1011 = 11;
12810 // EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr [15:0] for read transfers
12811 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1100 = 12;
12812 // EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr [15:0] for write transfers
12813 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1101 = 13;
12814 // EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr [15:0] + data for read transfers
12815 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1110 = 14;
12816 // EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr [15:0] + data for write transfers
12817 static const uint32_t DWT_FUNCTION3_FUNCTION__en_0b1111 = 15;
12818 // DATAVADDR1 not supported
12819 static const uint32_t DWT_FUNCTION3_LNK1ENA__en_0b0 = 0;
12820 // DATAVADDR1 supported (enabled).
12821 static const uint32_t DWT_FUNCTION3_LNK1ENA__en_0b1 = 1;
12822 // byte
12823 static const uint32_t DWT_FUNCTION3_DATAVSIZE__en_0b00 = 0;
12824 // halfword
12825 static const uint32_t DWT_FUNCTION3_DATAVSIZE__en_0b01 = 1;
12826 // word
12827 static const uint32_t DWT_FUNCTION3_DATAVSIZE__en_0b10 = 2;
12828 // Unpredictable.
12829 static const uint32_t DWT_FUNCTION3_DATAVSIZE__en_0b11 = 3;
12830
12831 struct DWT_t {
12832 DWT_CTRL_t DWT_CTRL;
12833 DWT_CYCCNT_t DWT_CYCCNT;
12834 DWT_CPICNT_t DWT_CPICNT;
12835 DWT_EXCCNT_t DWT_EXCCNT;
12836 DWT_SLEEPCNT_t DWT_SLEEPCNT;
12837 DWT_LSUCNT_t DWT_LSUCNT;
12838 DWT_FOLDCNT_t DWT_FOLDCNT;
12839 DWT_PCSR_t DWT_PCSR;
12840 DWT_COMP0_t DWT_COMP0;
12841 DWT_MASK0_t DWT_MASK0;
12842 DWT_FUNCTION0_t DWT_FUNCTION0;
12843 uint32_t reserved0;
12844 DWT_COMP1_t DWT_COMP1;
12845 DWT_MASK1_t DWT_MASK1;
12846 DWT_FUNCTION1_t DWT_FUNCTION1;
12847 uint32_t reserved1;
12848 DWT_COMP2_t DWT_COMP2;
12849 DWT_MASK2_t DWT_MASK2;
12850 DWT_FUNCTION2_t DWT_FUNCTION2;
12851 uint32_t reserved2;
12852 DWT_COMP3_t DWT_COMP3;
12853 DWT_MASK3_t DWT_MASK3;
12854 DWT_FUNCTION3_t DWT_FUNCTION3;
12855 };
12856
12857 static DWT_t & DWT = (*(DWT_t *)0xe0001000);
12858
12859} // _DWT_
12860
12861// FPB
12862namespace _FPB_ {
12863
12864 // Flash Patch Control Register
12865 // Reset value: 0x00000130
12866 BEGIN_TYPE(FP_CTRL_t, uint32_t)
12867 // Flash patch unit enable bit
12868 ADD_BITFIELD_RW(ENABLE, 0, 1)
12869 // Key field. To write to the Flash Patch Control Register, you must write a 1 to this write-only bit.
12870 ADD_BITFIELD_WO(KEY, 1, 1)
12871 // Number of code slots field.
12872 ADD_BITFIELD_RO(NUM_CODE1, 4, 4)
12873 // Number of literal slots field.
12874 ADD_BITFIELD_RO(NUM_LIT, 8, 4)
12875 // Number of full banks of code comparators, sixteen comparators per bank. Where less than sixteen code comparators are provided, the bank count is zero, and the number present indicated by NUM_CODE. This read only field contains 3'b000 to indicate 0 banks for Cortex-M4 processor.
12876 ADD_BITFIELD_RO(NUM_CODE2, 12, 2)
12877 END_TYPE()
12878
12879 // flash patch unit disabled
12880 static const uint32_t FP_CTRL_ENABLE__en_0b0 = 0;
12881 // flash patch unit enabled
12882 static const uint32_t FP_CTRL_ENABLE__en_0b1 = 1;
12883 // no code slots
12884 static const uint32_t FP_CTRL_NUM_CODE1__en_0b0000 = 0;
12885 // two code slots
12886 static const uint32_t FP_CTRL_NUM_CODE1__en_0b0010 = 2;
12887 // six code slots
12888 static const uint32_t FP_CTRL_NUM_CODE1__en_0b0110 = 6;
12889 // no literal slots
12890 static const uint32_t FP_CTRL_NUM_LIT__en_0b0000 = 0;
12891 // two literal slots
12892 static const uint32_t FP_CTRL_NUM_LIT__en_0b0010 = 2;
12893
12894 // Flash Patch Remap Register
12895 BEGIN_TYPE(FP_REMAP_t, uint32_t)
12896 // Remap base address field.
12897 ADD_BITFIELD_RW(REMAP, 5, 24)
12898 END_TYPE()
12899
12900 // Flash Patch Comparator Registers
12901 // Reset value: 0x00000000
12902 BEGIN_TYPE(FP_COMP0_t, uint32_t)
12903 // Compare and remap enable for Flash Patch Comparator Register 0. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
12904 ADD_BITFIELD_RW(ENABLE, 0, 1)
12905 // Comparison address.
12906 ADD_BITFIELD_RW(COMP, 2, 27)
12907 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
12908 ADD_BITFIELD_RW(REPLACE, 30, 2)
12909 END_TYPE()
12910
12911 // Flash Patch Comparator Register 0 compare and remap disabled
12912 static const uint32_t FP_COMP0_ENABLE__en_0b0 = 0;
12913 // Flash Patch Comparator Register 0 compare and remap enabled
12914 static const uint32_t FP_COMP0_ENABLE__en_0b1 = 1;
12915 // remap to remap address. See FP_REMAP
12916 static const uint32_t FP_COMP0_REPLACE__en_0b00 = 0;
12917 // set BKPT on lower halfword, upper is unaffected
12918 static const uint32_t FP_COMP0_REPLACE__en_0b01 = 1;
12919 // set BKPT on upper halfword, lower is unaffected
12920 static const uint32_t FP_COMP0_REPLACE__en_0b10 = 2;
12921 // set BKPT on both lower and upper halfwords.
12922 static const uint32_t FP_COMP0_REPLACE__en_0b11 = 3;
12923
12924 // Flash Patch Comparator Registers
12925 // Reset value: 0x00000000
12926 BEGIN_TYPE(FP_COMP1_t, uint32_t)
12927 // Compare and remap enable for Flash Patch Comparator Register 1. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
12928 ADD_BITFIELD_RW(ENABLE, 0, 1)
12929 // Comparison address.
12930 ADD_BITFIELD_RW(COMP, 2, 27)
12931 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
12932 ADD_BITFIELD_RW(REPLACE, 30, 2)
12933 END_TYPE()
12934
12935 // Flash Patch Comparator Register 1 compare and remap disabled
12936 static const uint32_t FP_COMP1_ENABLE__en_0b0 = 0;
12937 // Flash Patch Comparator Register 1 compare and remap enabled
12938 static const uint32_t FP_COMP1_ENABLE__en_0b1 = 1;
12939 // remap to remap address. See FP_REMAP
12940 static const uint32_t FP_COMP1_REPLACE__en_0b00 = 0;
12941 // set BKPT on lower halfword, upper is unaffected
12942 static const uint32_t FP_COMP1_REPLACE__en_0b01 = 1;
12943 // set BKPT on upper halfword, lower is unaffected
12944 static const uint32_t FP_COMP1_REPLACE__en_0b10 = 2;
12945 // set BKPT on both lower and upper halfwords.
12946 static const uint32_t FP_COMP1_REPLACE__en_0b11 = 3;
12947
12948 // Flash Patch Comparator Registers
12949 // Reset value: 0x00000000
12950 BEGIN_TYPE(FP_COMP2_t, uint32_t)
12951 // Compare and remap enable for Flash Patch Comparator Register 2. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
12952 ADD_BITFIELD_RW(ENABLE, 0, 1)
12953 // Comparison address.
12954 ADD_BITFIELD_RW(COMP, 2, 27)
12955 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
12956 ADD_BITFIELD_RW(REPLACE, 30, 2)
12957 END_TYPE()
12958
12959 // Flash Patch Comparator Register 2 compare and remap disabled
12960 static const uint32_t FP_COMP2_ENABLE__en_0b0 = 0;
12961 // Flash Patch Comparator Register 2 compare and remap enabled
12962 static const uint32_t FP_COMP2_ENABLE__en_0b1 = 1;
12963 // remap to remap address. See FP_REMAP
12964 static const uint32_t FP_COMP2_REPLACE__en_0b00 = 0;
12965 // set BKPT on lower halfword, upper is unaffected
12966 static const uint32_t FP_COMP2_REPLACE__en_0b01 = 1;
12967 // set BKPT on upper halfword, lower is unaffected
12968 static const uint32_t FP_COMP2_REPLACE__en_0b10 = 2;
12969 // set BKPT on both lower and upper halfwords.
12970 static const uint32_t FP_COMP2_REPLACE__en_0b11 = 3;
12971
12972 // Flash Patch Comparator Registers
12973 // Reset value: 0x00000000
12974 BEGIN_TYPE(FP_COMP3_t, uint32_t)
12975 // Compare and remap enable for Flash Patch Comparator Register 3. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
12976 ADD_BITFIELD_RW(ENABLE, 0, 1)
12977 // Comparison address.
12978 ADD_BITFIELD_RW(COMP, 2, 27)
12979 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
12980 ADD_BITFIELD_RW(REPLACE, 30, 2)
12981 END_TYPE()
12982
12983 // Flash Patch Comparator Register 3 compare and remap disabled
12984 static const uint32_t FP_COMP3_ENABLE__en_0b0 = 0;
12985 // Flash Patch Comparator Register 3 compare and remap enabled
12986 static const uint32_t FP_COMP3_ENABLE__en_0b1 = 1;
12987 // remap to remap address. See FP_REMAP
12988 static const uint32_t FP_COMP3_REPLACE__en_0b00 = 0;
12989 // set BKPT on lower halfword, upper is unaffected
12990 static const uint32_t FP_COMP3_REPLACE__en_0b01 = 1;
12991 // set BKPT on upper halfword, lower is unaffected
12992 static const uint32_t FP_COMP3_REPLACE__en_0b10 = 2;
12993 // set BKPT on both lower and upper halfwords.
12994 static const uint32_t FP_COMP3_REPLACE__en_0b11 = 3;
12995
12996 // Flash Patch Comparator Registers
12997 // Reset value: 0x00000000
12998 BEGIN_TYPE(FP_COMP4_t, uint32_t)
12999 // Compare and remap enable for Flash Patch Comparator Register 4. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
13000 ADD_BITFIELD_RW(ENABLE, 0, 1)
13001 // Comparison address.
13002 ADD_BITFIELD_RW(COMP, 2, 27)
13003 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
13004 ADD_BITFIELD_RW(REPLACE, 30, 2)
13005 END_TYPE()
13006
13007 // Flash Patch Comparator Register 4 compare and remap disabled
13008 static const uint32_t FP_COMP4_ENABLE__en_0b0 = 0;
13009 // Flash Patch Comparator Register 4 compare and remap enabled
13010 static const uint32_t FP_COMP4_ENABLE__en_0b1 = 1;
13011 // remap to remap address. See FP_REMAP
13012 static const uint32_t FP_COMP4_REPLACE__en_0b00 = 0;
13013 // set BKPT on lower halfword, upper is unaffected
13014 static const uint32_t FP_COMP4_REPLACE__en_0b01 = 1;
13015 // set BKPT on upper halfword, lower is unaffected
13016 static const uint32_t FP_COMP4_REPLACE__en_0b10 = 2;
13017 // set BKPT on both lower and upper halfwords.
13018 static const uint32_t FP_COMP4_REPLACE__en_0b11 = 3;
13019
13020 // Flash Patch Comparator Registers
13021 // Reset value: 0x00000000
13022 BEGIN_TYPE(FP_COMP5_t, uint32_t)
13023 // Compare and remap enable for Flash Patch Comparator Register 5. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
13024 ADD_BITFIELD_RW(ENABLE, 0, 1)
13025 // Comparison address.
13026 ADD_BITFIELD_RW(COMP, 2, 27)
13027 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
13028 ADD_BITFIELD_RW(REPLACE, 30, 2)
13029 END_TYPE()
13030
13031 // Flash Patch Comparator Register 5 compare and remap disabled
13032 static const uint32_t FP_COMP5_ENABLE__en_0b0 = 0;
13033 // Flash Patch Comparator Register 5 compare and remap enabled
13034 static const uint32_t FP_COMP5_ENABLE__en_0b1 = 1;
13035 // remap to remap address. See FP_REMAP
13036 static const uint32_t FP_COMP5_REPLACE__en_0b00 = 0;
13037 // set BKPT on lower halfword, upper is unaffected
13038 static const uint32_t FP_COMP5_REPLACE__en_0b01 = 1;
13039 // set BKPT on upper halfword, lower is unaffected
13040 static const uint32_t FP_COMP5_REPLACE__en_0b10 = 2;
13041 // set BKPT on both lower and upper halfwords.
13042 static const uint32_t FP_COMP5_REPLACE__en_0b11 = 3;
13043
13044 // Flash Patch Comparator Registers
13045 // Reset value: 0x00000000
13046 BEGIN_TYPE(FP_COMP6_t, uint32_t)
13047 // Compare and remap enable for Flash Patch Comparator Register 6. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
13048 ADD_BITFIELD_RW(ENABLE, 0, 1)
13049 // Comparison address.
13050 ADD_BITFIELD_RW(COMP, 2, 27)
13051 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
13052 ADD_BITFIELD_RW(REPLACE, 30, 2)
13053 END_TYPE()
13054
13055 // Flash Patch Comparator Register 6 compare and remap disabled
13056 static const uint32_t FP_COMP6_ENABLE__en_0b0 = 0;
13057 // Flash Patch Comparator Register 6 compare and remap enabled
13058 static const uint32_t FP_COMP6_ENABLE__en_0b1 = 1;
13059 // remap to remap address. See FP_REMAP
13060 static const uint32_t FP_COMP6_REPLACE__en_0b00 = 0;
13061 // set BKPT on lower halfword, upper is unaffected
13062 static const uint32_t FP_COMP6_REPLACE__en_0b01 = 1;
13063 // set BKPT on upper halfword, lower is unaffected
13064 static const uint32_t FP_COMP6_REPLACE__en_0b10 = 2;
13065 // set BKPT on both lower and upper halfwords.
13066 static const uint32_t FP_COMP6_REPLACE__en_0b11 = 3;
13067
13068 // Flash Patch Comparator Registers
13069 // Reset value: 0x00000000
13070 BEGIN_TYPE(FP_COMP7_t, uint32_t)
13071 // Compare and remap enable for Flash Patch Comparator Register 7. The ENABLE bit of FP_CTRL must also be set to enable comparisons. Reset clears the ENABLE bit.
13072 ADD_BITFIELD_RW(ENABLE, 0, 1)
13073 // Comparison address.
13074 ADD_BITFIELD_RW(COMP, 2, 27)
13075 // This selects what happens when the COMP address is matched. Settings other than b00 are only valid for instruction comparators. Literal comparators ignore non-b00 settings. Address remapping only takes place for the b00 setting.
13076 ADD_BITFIELD_RW(REPLACE, 30, 2)
13077 END_TYPE()
13078
13079 // Flash Patch Comparator Register 7 compare and remap disabled
13080 static const uint32_t FP_COMP7_ENABLE__en_0b0 = 0;
13081 // Flash Patch Comparator Register 7 compare and remap enabled
13082 static const uint32_t FP_COMP7_ENABLE__en_0b1 = 1;
13083 // remap to remap address. See FP_REMAP
13084 static const uint32_t FP_COMP7_REPLACE__en_0b00 = 0;
13085 // set BKPT on lower halfword, upper is unaffected
13086 static const uint32_t FP_COMP7_REPLACE__en_0b01 = 1;
13087 // set BKPT on upper halfword, lower is unaffected
13088 static const uint32_t FP_COMP7_REPLACE__en_0b10 = 2;
13089 // set BKPT on both lower and upper halfwords.
13090 static const uint32_t FP_COMP7_REPLACE__en_0b11 = 3;
13091
13092 struct FPB_t {
13093 FP_CTRL_t FP_CTRL;
13094 FP_REMAP_t FP_REMAP;
13095 FP_COMP0_t FP_COMP0;
13096 FP_COMP1_t FP_COMP1;
13097 FP_COMP2_t FP_COMP2;
13098 FP_COMP3_t FP_COMP3;
13099 FP_COMP4_t FP_COMP4;
13100 FP_COMP5_t FP_COMP5;
13101 FP_COMP6_t FP_COMP6;
13102 FP_COMP7_t FP_COMP7;
13103 };
13104
13105 static FPB_t & FPB = (*(FPB_t *)0xe0002000);
13106
13107} // _FPB_
13108
13109// System Control Space for ARM core: SCnSCB, SCB, SysTick, NVIC, CoreDebug, MPU, FPU
13110namespace _SystemControlSpace_ {
13111
13112 // Interrupt Control Type Register
13113 // Reset value: 0x00000000
13114 BEGIN_TYPE(ICTR_t, uint32_t)
13115 // Total number of interrupt lines in groups of 32.
13116 ADD_BITFIELD_RO(INTLINESNUM, 0, 5)
13117 END_TYPE()
13118
13119 // Auxiliary Control Register
13120 // Reset value: 0x00000000
13121 BEGIN_TYPE(ACTLR_t, uint32_t)
13122 // Disables interruption of multi-cycle instructions. This increases the interrupt latency of the processor becuase LDM/STM completes before interrupt stacking occurs.
13123 ADD_BITFIELD_RW(DISMCYCINT, 0, 1)
13124 // Disables write buffer us during default memorty map accesses. This causes all bus faults to be precise bus faults but decreases the performance of the processor because the stores to memory have to complete before the next instruction can be executed.
13125 ADD_BITFIELD_RW(DISDEFWBUF, 1, 1)
13126 // Disables IT folding.
13127 ADD_BITFIELD_RW(DISFOLD, 2, 1)
13128 // Disable automatic update of CONTROL.FPCA
13129 ADD_BITFIELD_RW(DISFPCA, 8, 1)
13130 // Disables floating point instructions completing out of order with respect to integer instructions.
13131 ADD_BITFIELD_RW(DISOOFP, 9, 1)
13132 END_TYPE()
13133
13135 uint32_t reserved0;
13136 ICTR_t ICTR;
13137 ACTLR_t ACTLR;
13138 };
13139
13140 static SystemControlSpace_t & SystemControlSpace = (*(SystemControlSpace_t *)0xe000e000);
13141
13142} // _SystemControlSpace_
13143
13144// RSTCTL
13145namespace _RSTCTL_ {
13146
13147 // Reset Request Register
13148 // Reset value: 0x00000000
13149 BEGIN_TYPE(RSTCTL_RESET_REQ_t, uint32_t)
13150 // Soft Reset request
13151 ADD_BITFIELD_WO(SOFT_REQ, 0, 1)
13152 // Hard Reset request
13153 ADD_BITFIELD_WO(HARD_REQ, 1, 1)
13154 // Write key to unlock reset request bits
13155 ADD_BITFIELD_WO(RSTKEY, 8, 8)
13156 END_TYPE()
13157
13158 // Hard Reset Status Register
13159 // Reset value: 0x00000000
13160 BEGIN_TYPE(RSTCTL_HARDRESET_STAT_t, uint32_t)
13161 // Indicates that SRC0 was the source of the Hard Reset
13162 ADD_BITFIELD_RO(SRC0, 0, 1)
13163 // Indicates that SRC1 was the source of the Hard Reset
13164 ADD_BITFIELD_RO(SRC1, 1, 1)
13165 // Indicates that SRC2 was the source of the Hard Reset
13166 ADD_BITFIELD_RO(SRC2, 2, 1)
13167 // Indicates that SRC3 was the source of the Hard Reset
13168 ADD_BITFIELD_RO(SRC3, 3, 1)
13169 // Indicates that SRC4 was the source of the Hard Reset
13170 ADD_BITFIELD_RO(SRC4, 4, 1)
13171 // Indicates that SRC5 was the source of the Hard Reset
13172 ADD_BITFIELD_RO(SRC5, 5, 1)
13173 // Indicates that SRC6 was the source of the Hard Reset
13174 ADD_BITFIELD_RO(SRC6, 6, 1)
13175 // Indicates that SRC7 was the source of the Hard Reset
13176 ADD_BITFIELD_RO(SRC7, 7, 1)
13177 // Indicates that SRC8 was the source of the Hard Reset
13178 ADD_BITFIELD_RO(SRC8, 8, 1)
13179 // Indicates that SRC9 was the source of the Hard Reset
13180 ADD_BITFIELD_RO(SRC9, 9, 1)
13181 // Indicates that SRC10 was the source of the Hard Reset
13182 ADD_BITFIELD_RO(SRC10, 10, 1)
13183 // Indicates that SRC11 was the source of the Hard Reset
13184 ADD_BITFIELD_RO(SRC11, 11, 1)
13185 // Indicates that SRC12 was the source of the Hard Reset
13186 ADD_BITFIELD_RO(SRC12, 12, 1)
13187 // Indicates that SRC13 was the source of the Hard Reset
13188 ADD_BITFIELD_RO(SRC13, 13, 1)
13189 // Indicates that SRC14 was the source of the Hard Reset
13190 ADD_BITFIELD_RO(SRC14, 14, 1)
13191 // Indicates that SRC15 was the source of the Hard Reset
13192 ADD_BITFIELD_RO(SRC15, 15, 1)
13193 END_TYPE()
13194
13195 // Hard Reset Status Clear Register
13196 // Reset value: 0x00000000
13197 BEGIN_TYPE(RSTCTL_HARDRESET_CLR_t, uint32_t)
13198 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13199 ADD_BITFIELD_WO(SRC0, 0, 1)
13200 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13201 ADD_BITFIELD_WO(SRC1, 1, 1)
13202 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13203 ADD_BITFIELD_WO(SRC2, 2, 1)
13204 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13205 ADD_BITFIELD_WO(SRC3, 3, 1)
13206 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13207 ADD_BITFIELD_WO(SRC4, 4, 1)
13208 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13209 ADD_BITFIELD_WO(SRC5, 5, 1)
13210 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13211 ADD_BITFIELD_WO(SRC6, 6, 1)
13212 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13213 ADD_BITFIELD_WO(SRC7, 7, 1)
13214 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13215 ADD_BITFIELD_WO(SRC8, 8, 1)
13216 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13217 ADD_BITFIELD_WO(SRC9, 9, 1)
13218 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13219 ADD_BITFIELD_WO(SRC10, 10, 1)
13220 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13221 ADD_BITFIELD_WO(SRC11, 11, 1)
13222 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13223 ADD_BITFIELD_WO(SRC12, 12, 1)
13224 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13225 ADD_BITFIELD_WO(SRC13, 13, 1)
13226 // Write 1 clears the corresponding bit in the RSTCTL_HARDRESET_STAT
13227 ADD_BITFIELD_WO(SRC14, 14, 1)
13228 // Write 1 clears the corresponding bit in the RSTCTL_HRDRESETSTAT_REG
13229 ADD_BITFIELD_WO(SRC15, 15, 1)
13230 END_TYPE()
13231
13232 // Hard Reset Status Set Register
13233 // Reset value: 0x00000000
13234 BEGIN_TYPE(RSTCTL_HARDRESET_SET_t, uint32_t)
13235 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13236 ADD_BITFIELD_WO(SRC0, 0, 1)
13237 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13238 ADD_BITFIELD_WO(SRC1, 1, 1)
13239 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13240 ADD_BITFIELD_WO(SRC2, 2, 1)
13241 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13242 ADD_BITFIELD_WO(SRC3, 3, 1)
13243 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13244 ADD_BITFIELD_WO(SRC4, 4, 1)
13245 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13246 ADD_BITFIELD_WO(SRC5, 5, 1)
13247 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13248 ADD_BITFIELD_WO(SRC6, 6, 1)
13249 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13250 ADD_BITFIELD_WO(SRC7, 7, 1)
13251 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13252 ADD_BITFIELD_WO(SRC8, 8, 1)
13253 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13254 ADD_BITFIELD_WO(SRC9, 9, 1)
13255 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13256 ADD_BITFIELD_WO(SRC10, 10, 1)
13257 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13258 ADD_BITFIELD_WO(SRC11, 11, 1)
13259 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13260 ADD_BITFIELD_WO(SRC12, 12, 1)
13261 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13262 ADD_BITFIELD_WO(SRC13, 13, 1)
13263 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13264 ADD_BITFIELD_WO(SRC14, 14, 1)
13265 // Write 1 sets the corresponding bit in the RSTCTL_HARDRESET_STAT (and initiates a Hard Reset)
13266 ADD_BITFIELD_WO(SRC15, 15, 1)
13267 END_TYPE()
13268
13269 // Soft Reset Status Register
13270 // Reset value: 0x00000000
13271 BEGIN_TYPE(RSTCTL_SOFTRESET_STAT_t, uint32_t)
13272 // If 1, indicates that SRC0 was the source of the Soft Reset
13273 ADD_BITFIELD_RO(SRC0, 0, 1)
13274 // If 1, indicates that SRC1 was the source of the Soft Reset
13275 ADD_BITFIELD_RO(SRC1, 1, 1)
13276 // If 1, indicates that SRC2 was the source of the Soft Reset
13277 ADD_BITFIELD_RO(SRC2, 2, 1)
13278 // If 1, indicates that SRC3 was the source of the Soft Reset
13279 ADD_BITFIELD_RO(SRC3, 3, 1)
13280 // If 1, indicates that SRC4 was the source of the Soft Reset
13281 ADD_BITFIELD_RO(SRC4, 4, 1)
13282 // If 1, indicates that SRC5 was the source of the Soft Reset
13283 ADD_BITFIELD_RO(SRC5, 5, 1)
13284 // If 1, indicates that SRC6 was the source of the Soft Reset
13285 ADD_BITFIELD_RO(SRC6, 6, 1)
13286 // If 1, indicates that SRC7 was the source of the Soft Reset
13287 ADD_BITFIELD_RO(SRC7, 7, 1)
13288 // If 1, indicates that SRC8 was the source of the Soft Reset
13289 ADD_BITFIELD_RO(SRC8, 8, 1)
13290 // If 1, indicates that SRC9 was the source of the Soft Reset
13291 ADD_BITFIELD_RO(SRC9, 9, 1)
13292 // If 1, indicates that SRC10 was the source of the Soft Reset
13293 ADD_BITFIELD_RO(SRC10, 10, 1)
13294 // If 1, indicates that SRC11 was the source of the Soft Reset
13295 ADD_BITFIELD_RO(SRC11, 11, 1)
13296 // If 1, indicates that SRC12 was the source of the Soft Reset
13297 ADD_BITFIELD_RO(SRC12, 12, 1)
13298 // If 1, indicates that SRC13 was the source of the Soft Reset
13299 ADD_BITFIELD_RO(SRC13, 13, 1)
13300 // If 1, indicates that SRC14 was the source of the Soft Reset
13301 ADD_BITFIELD_RO(SRC14, 14, 1)
13302 // If 1, indicates that SRC15 was the source of the Soft Reset
13303 ADD_BITFIELD_RO(SRC15, 15, 1)
13304 END_TYPE()
13305
13306 // Soft Reset Status Clear Register
13307 // Reset value: 0x00000000
13308 BEGIN_TYPE(RSTCTL_SOFTRESET_CLR_t, uint32_t)
13309 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13310 ADD_BITFIELD_WO(SRC0, 0, 1)
13311 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13312 ADD_BITFIELD_WO(SRC1, 1, 1)
13313 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13314 ADD_BITFIELD_WO(SRC2, 2, 1)
13315 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13316 ADD_BITFIELD_WO(SRC3, 3, 1)
13317 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13318 ADD_BITFIELD_WO(SRC4, 4, 1)
13319 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13320 ADD_BITFIELD_WO(SRC5, 5, 1)
13321 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13322 ADD_BITFIELD_WO(SRC6, 6, 1)
13323 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13324 ADD_BITFIELD_WO(SRC7, 7, 1)
13325 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13326 ADD_BITFIELD_WO(SRC8, 8, 1)
13327 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13328 ADD_BITFIELD_WO(SRC9, 9, 1)
13329 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13330 ADD_BITFIELD_WO(SRC10, 10, 1)
13331 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13332 ADD_BITFIELD_WO(SRC11, 11, 1)
13333 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13334 ADD_BITFIELD_WO(SRC12, 12, 1)
13335 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13336 ADD_BITFIELD_WO(SRC13, 13, 1)
13337 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13338 ADD_BITFIELD_WO(SRC14, 14, 1)
13339 // Write 1 clears the corresponding bit in the RSTCTL_SOFTRESET_STAT
13340 ADD_BITFIELD_WO(SRC15, 15, 1)
13341 END_TYPE()
13342
13343 // Soft Reset Status Set Register
13344 // Reset value: 0x00000000
13345 BEGIN_TYPE(RSTCTL_SOFTRESET_SET_t, uint32_t)
13346 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13347 ADD_BITFIELD_WO(SRC0, 0, 1)
13348 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13349 ADD_BITFIELD_WO(SRC1, 1, 1)
13350 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13351 ADD_BITFIELD_WO(SRC2, 2, 1)
13352 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13353 ADD_BITFIELD_WO(SRC3, 3, 1)
13354 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13355 ADD_BITFIELD_WO(SRC4, 4, 1)
13356 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13357 ADD_BITFIELD_WO(SRC5, 5, 1)
13358 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13359 ADD_BITFIELD_WO(SRC6, 6, 1)
13360 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13361 ADD_BITFIELD_WO(SRC7, 7, 1)
13362 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13363 ADD_BITFIELD_WO(SRC8, 8, 1)
13364 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13365 ADD_BITFIELD_WO(SRC9, 9, 1)
13366 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13367 ADD_BITFIELD_WO(SRC10, 10, 1)
13368 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13369 ADD_BITFIELD_WO(SRC11, 11, 1)
13370 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13371 ADD_BITFIELD_WO(SRC12, 12, 1)
13372 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13373 ADD_BITFIELD_WO(SRC13, 13, 1)
13374 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13375 ADD_BITFIELD_WO(SRC14, 14, 1)
13376 // Write 1 sets the corresponding bit in the RSTCTL_SOFTRESET_STAT (and initiates a Soft Reset)
13377 ADD_BITFIELD_WO(SRC15, 15, 1)
13378 END_TYPE()
13379
13380 // PSS Reset Status Register
13381 // Reset value: 0x0000000f
13382 BEGIN_TYPE(RSTCTL_PSSRESET_STAT_t, uint32_t)
13383 // Indicates if POR was caused by an SVSMH trip condition int the PSS
13384 ADD_BITFIELD_RO(SVSMH, 1, 1)
13385 // Indicates if POR was caused by a BGREF not okay condition in the PSS
13386 ADD_BITFIELD_RO(BGREF, 2, 1)
13387 // Indicates if POR was caused by a VCCDET trip condition in the PSS
13388 ADD_BITFIELD_RO(VCCDET, 3, 1)
13389 // Indicates if POR was caused by an SVSL trip condition in the PSS
13390 ADD_BITFIELD_RO(SVSL, 0, 1)
13391 END_TYPE()
13392
13393 // PSS Reset Status Clear Register
13394 // Reset value: 0x00000000
13395 BEGIN_TYPE(RSTCTL_PSSRESET_CLR_t, uint32_t)
13396 // Write 1 clears all PSS Reset Flags in the RSTCTL_PSSRESET_STAT
13397 ADD_BITFIELD_WO(CLR, 0, 1)
13398 END_TYPE()
13399
13400 // PCM Reset Status Register
13401 // Reset value: 0x00000000
13402 BEGIN_TYPE(RSTCTL_PCMRESET_STAT_t, uint32_t)
13403 // Indicates if POR was caused by PCM due to an exit from LPM3.5
13404 ADD_BITFIELD_RO(LPM35, 0, 1)
13405 // Indicates if POR was caused by PCM due to an exit from LPM4.5
13406 ADD_BITFIELD_RO(LPM45, 1, 1)
13407 END_TYPE()
13408
13409 // PCM Reset Status Clear Register
13410 // Reset value: 0x00000000
13411 BEGIN_TYPE(RSTCTL_PCMRESET_CLR_t, uint32_t)
13412 // Write 1 clears all PCM Reset Flags in the RSTCTL_PCMRESET_STAT
13413 ADD_BITFIELD_WO(CLR, 0, 1)
13414 END_TYPE()
13415
13416 // Pin Reset Status Register
13417 // Reset value: 0x00000000
13418 BEGIN_TYPE(RSTCTL_PINRESET_STAT_t, uint32_t)
13419 // POR was caused by RSTn/NMI pin based reset event
13420 ADD_BITFIELD_RO(RSTNMI, 0, 1)
13421 END_TYPE()
13422
13423 // Pin Reset Status Clear Register
13424 // Reset value: 0x00000000
13425 BEGIN_TYPE(RSTCTL_PINRESET_CLR_t, uint32_t)
13426 // Write 1 clears the RSTn/NMI Pin Reset Flag in RSTCTL_PINRESET_STAT
13427 ADD_BITFIELD_WO(CLR, 0, 1)
13428 END_TYPE()
13429
13430 // Reboot Reset Status Register
13431 // Reset value: 0x00000000
13432 BEGIN_TYPE(RSTCTL_REBOOTRESET_STAT_t, uint32_t)
13433 // Indicates if Reboot reset was caused by the SYSCTL module.
13434 ADD_BITFIELD_RO(REBOOT, 0, 1)
13435 END_TYPE()
13436
13437 // Reboot Reset Status Clear Register
13438 // Reset value: 0x00000000
13439 BEGIN_TYPE(RSTCTL_REBOOTRESET_CLR_t, uint32_t)
13440 // Write 1 clears the Reboot Reset Flag in RSTCTL_REBOOTRESET_STAT
13441 ADD_BITFIELD_WO(CLR, 0, 1)
13442 END_TYPE()
13443
13444 // CS Reset Status Register
13445 // Reset value: 0x00000000
13446 BEGIN_TYPE(RSTCTL_CSRESET_STAT_t, uint32_t)
13447 // Indicates if POR was caused by DCO short circuit fault in the external resistor mode
13448 ADD_BITFIELD_RO(DCOR_SHT, 0, 1)
13449 END_TYPE()
13450
13451 // CS Reset Status Clear Register
13452 // Reset value: 0x00000000
13453 BEGIN_TYPE(RSTCTL_CSRESET_CLR_t, uint32_t)
13454 // Write 1 clears the DCOR_SHT Flag in RSTCTL_CSRESET_STAT as well as DCOR_SHTIFG flag in CSIFG register of clock system
13455 ADD_BITFIELD_WO(CLR, 0, 1)
13456 END_TYPE()
13457
13458 struct RSTCTL_t {
13459 RSTCTL_RESET_REQ_t RSTCTL_RESET_REQ;
13460 RSTCTL_HARDRESET_STAT_t RSTCTL_HARDRESET_STAT;
13461 RSTCTL_HARDRESET_CLR_t RSTCTL_HARDRESET_CLR;
13462 RSTCTL_HARDRESET_SET_t RSTCTL_HARDRESET_SET;
13463 RSTCTL_SOFTRESET_STAT_t RSTCTL_SOFTRESET_STAT;
13464 RSTCTL_SOFTRESET_CLR_t RSTCTL_SOFTRESET_CLR;
13465 RSTCTL_SOFTRESET_SET_t RSTCTL_SOFTRESET_SET;
13466 uint32_t reserved0[57];
13467 RSTCTL_PSSRESET_STAT_t RSTCTL_PSSRESET_STAT;
13468 RSTCTL_PSSRESET_CLR_t RSTCTL_PSSRESET_CLR;
13469 RSTCTL_PCMRESET_STAT_t RSTCTL_PCMRESET_STAT;
13470 RSTCTL_PCMRESET_CLR_t RSTCTL_PCMRESET_CLR;
13471 RSTCTL_PINRESET_STAT_t RSTCTL_PINRESET_STAT;
13472 RSTCTL_PINRESET_CLR_t RSTCTL_PINRESET_CLR;
13473 RSTCTL_REBOOTRESET_STAT_t RSTCTL_REBOOTRESET_STAT;
13474 RSTCTL_REBOOTRESET_CLR_t RSTCTL_REBOOTRESET_CLR;
13475 RSTCTL_CSRESET_STAT_t RSTCTL_CSRESET_STAT;
13476 RSTCTL_CSRESET_CLR_t RSTCTL_CSRESET_CLR;
13477 };
13478
13479 static RSTCTL_t & RSTCTL = (*(RSTCTL_t *)0xe0042000);
13480
13481} // _RSTCTL_
13482
13483// SYSCTL
13484namespace _SYSCTL_ {
13485
13486 // Reboot Control Register
13487 // Reset value: 0x000000fe
13488 BEGIN_TYPE(SYS_REBOOT_CTL_t, uint32_t)
13489 // Write 1 initiates a Reboot of the device
13490 ADD_BITFIELD_RW(REBOOT, 0, 1)
13491 // Key to enable writes to bit 0
13492 ADD_BITFIELD_WO(WKEY, 8, 8)
13493 END_TYPE()
13494
13495 // NMI Control and Status Register
13496 // Reset value: 0x00000007
13497 BEGIN_TYPE(SYS_NMI_CTLSTAT_t, uint32_t)
13498 // CS interrupt as a source of NMI
13499 ADD_BITFIELD_RW(CS_SRC, 0, 1)
13500 // PSS interrupt as a source of NMI
13501 ADD_BITFIELD_RW(PSS_SRC, 1, 1)
13502 // PCM interrupt as a source of NMI
13503 ADD_BITFIELD_RW(PCM_SRC, 2, 1)
13504 // RSTn/NMI pin configuration Note: When the device enters LPM3/LPM4 modes of operation, the functionality selected by this bit is retained. If selected as an NMI, activity on this pin in LPM3/LPM4 wakes the device and processes the interrupt, without causing a POR. If selected as a Reset, activity on this pin in LPM3/LPM4 causes a device-level POR When the device enters LPM3.5/LPM4.5 modes of operation, this bit is always cleared to 0. In other words, the RSTn/NMI pin always assumes a reset functionality in LPM3.5/LPM4.5 modes.
13505 ADD_BITFIELD_RW(PIN_SRC, 3, 1)
13506 // CS interrupt was the source of NMI
13507 ADD_BITFIELD_RO(CS_FLG, 16, 1)
13508 // PSS interrupt was the source of NMI
13509 ADD_BITFIELD_RO(PSS_FLG, 17, 1)
13510 // PCM interrupt was the source of NMI
13511 ADD_BITFIELD_RO(PCM_FLG, 18, 1)
13512 // RSTn/NMI pin was the source of NMI
13513 ADD_BITFIELD_RW(PIN_FLG, 19, 1)
13514 END_TYPE()
13515
13516 // Disables CS interrupt as a source of NMI
13517 static const uint32_t SYS_NMI_CTLSTAT_CS_SRC__CS_SRC_0 = 0;
13518 // Enables CS interrupt as a source of NMI
13519 static const uint32_t SYS_NMI_CTLSTAT_CS_SRC__CS_SRC_1 = 1;
13520 // Disables the PSS interrupt as a source of NMI
13521 static const uint32_t SYS_NMI_CTLSTAT_PSS_SRC__PSS_SRC_0 = 0;
13522 // Enables the PSS interrupt as a source of NMI
13523 static const uint32_t SYS_NMI_CTLSTAT_PSS_SRC__PSS_SRC_1 = 1;
13524 // Disbles the PCM interrupt as a source of NMI
13525 static const uint32_t SYS_NMI_CTLSTAT_PCM_SRC__PCM_SRC_0 = 0;
13526 // Enables the PCM interrupt as a source of NMI
13527 static const uint32_t SYS_NMI_CTLSTAT_PCM_SRC__PCM_SRC_1 = 1;
13528 // Configures the RSTn_NMI pin as a source of POR Class Reset
13529 static const uint32_t SYS_NMI_CTLSTAT_PIN_SRC__PIN_SRC_0 = 0;
13530 // Configures the RSTn_NMI pin as a source of NMI
13531 static const uint32_t SYS_NMI_CTLSTAT_PIN_SRC__PIN_SRC_1 = 1;
13532 // indicates CS interrupt was not the source of NMI
13533 static const uint32_t SYS_NMI_CTLSTAT_CS_FLG__CS_FLG_0 = 0;
13534 // indicates CS interrupt was the source of NMI
13535 static const uint32_t SYS_NMI_CTLSTAT_CS_FLG__CS_FLG_1 = 1;
13536 // indicates the PSS interrupt was not the source of NMI
13537 static const uint32_t SYS_NMI_CTLSTAT_PSS_FLG__PSS_FLG_0 = 0;
13538 // indicates the PSS interrupt was the source of NMI
13539 static const uint32_t SYS_NMI_CTLSTAT_PSS_FLG__PSS_FLG_1 = 1;
13540 // indicates the PCM interrupt was not the source of NMI
13541 static const uint32_t SYS_NMI_CTLSTAT_PCM_FLG__PCM_FLG_0 = 0;
13542 // indicates the PCM interrupt was the source of NMI
13543 static const uint32_t SYS_NMI_CTLSTAT_PCM_FLG__PCM_FLG_1 = 1;
13544 // Indicates the RSTn_NMI pin was not the source of NMI
13545 static const uint32_t SYS_NMI_CTLSTAT_PIN_FLG__PIN_FLG_0 = 0;
13546 // Indicates the RSTn_NMI pin was the source of NMI
13547 static const uint32_t SYS_NMI_CTLSTAT_PIN_FLG__PIN_FLG_1 = 1;
13548
13549 // Watchdog Reset Control Register
13550 // Reset value: 0x00000003
13551 BEGIN_TYPE(SYS_WDTRESET_CTL_t, uint32_t)
13552 // WDT timeout reset type
13553 ADD_BITFIELD_RW(TIMEOUT, 0, 1)
13554 // WDT password violation reset type
13555 ADD_BITFIELD_RW(VIOLATION, 1, 1)
13556 END_TYPE()
13557
13558 // WDT timeout event generates Soft reset
13559 static const uint32_t SYS_WDTRESET_CTL_TIMEOUT__TIMEOUT_0 = 0;
13560 // WDT timeout event generates Hard reset
13561 static const uint32_t SYS_WDTRESET_CTL_TIMEOUT__TIMEOUT_1 = 1;
13562 // WDT password violation event generates Soft reset
13563 static const uint32_t SYS_WDTRESET_CTL_VIOLATION__VIOLATION_0 = 0;
13564 // WDT password violation event generates Hard reset
13565 static const uint32_t SYS_WDTRESET_CTL_VIOLATION__VIOLATION_1 = 1;
13566
13567 // Peripheral Halt Control Register
13568 // Reset value: 0x00004000
13569 BEGIN_TYPE(SYS_PERIHALT_CTL_t, uint32_t)
13570 // Freezes IP operation when CPU is halted
13571 ADD_BITFIELD_RW(HALT_T16_0, 0, 1)
13572 // Freezes IP operation when CPU is halted
13573 ADD_BITFIELD_RW(HALT_T16_1, 1, 1)
13574 // Freezes IP operation when CPU is halted
13575 ADD_BITFIELD_RW(HALT_T16_2, 2, 1)
13576 // Freezes IP operation when CPU is halted
13577 ADD_BITFIELD_RW(HALT_T16_3, 3, 1)
13578 // Freezes IP operation when CPU is halted
13579 ADD_BITFIELD_RW(HALT_T32_0, 4, 1)
13580 // Freezes IP operation when CPU is halted
13581 ADD_BITFIELD_RW(HALT_eUA0, 5, 1)
13582 // Freezes IP operation when CPU is halted
13583 ADD_BITFIELD_RW(HALT_eUA1, 6, 1)
13584 // Freezes IP operation when CPU is halted
13585 ADD_BITFIELD_RW(HALT_eUA2, 7, 1)
13586 // Freezes IP operation when CPU is halted
13587 ADD_BITFIELD_RW(HALT_eUA3, 8, 1)
13588 // Freezes IP operation when CPU is halted
13589 ADD_BITFIELD_RW(HALT_eUB0, 9, 1)
13590 // Freezes IP operation when CPU is halted
13591 ADD_BITFIELD_RW(HALT_eUB1, 10, 1)
13592 // Freezes IP operation when CPU is halted
13593 ADD_BITFIELD_RW(HALT_eUB2, 11, 1)
13594 // Freezes IP operation when CPU is halted
13595 ADD_BITFIELD_RW(HALT_eUB3, 12, 1)
13596 // Freezes IP operation when CPU is halted
13597 ADD_BITFIELD_RW(HALT_ADC, 13, 1)
13598 // Freezes IP operation when CPU is halted
13599 ADD_BITFIELD_RW(HALT_WDT, 14, 1)
13600 // Freezes IP operation when CPU is halted
13601 ADD_BITFIELD_RW(HALT_DMA, 15, 1)
13602 END_TYPE()
13603
13604 // IP operation unaffected when CPU is halted
13605 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_0__HALT_T16_0_0 = 0;
13606 // freezes IP operation when CPU is halted
13607 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_0__HALT_T16_0_1 = 1;
13608 // IP operation unaffected when CPU is halted
13609 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_1__HALT_T16_1_0 = 0;
13610 // freezes IP operation when CPU is halted
13611 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_1__HALT_T16_1_1 = 1;
13612 // IP operation unaffected when CPU is halted
13613 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_2__HALT_T16_2_0 = 0;
13614 // freezes IP operation when CPU is halted
13615 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_2__HALT_T16_2_1 = 1;
13616 // IP operation unaffected when CPU is halted
13617 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_3__HALT_T16_3_0 = 0;
13618 // freezes IP operation when CPU is halted
13619 static const uint32_t SYS_PERIHALT_CTL_HALT_T16_3__HALT_T16_3_1 = 1;
13620 // IP operation unaffected when CPU is halted
13621 static const uint32_t SYS_PERIHALT_CTL_HALT_T32_0__HALT_T32_0_0 = 0;
13622 // freezes IP operation when CPU is halted
13623 static const uint32_t SYS_PERIHALT_CTL_HALT_T32_0__HALT_T32_0_1 = 1;
13624 // IP operation unaffected when CPU is halted
13625 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA0__HALT_eUA0_0 = 0;
13626 // freezes IP operation when CPU is halted
13627 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA0__HALT_eUA0_1 = 1;
13628 // IP operation unaffected when CPU is halted
13629 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA1__HALT_eUA1_0 = 0;
13630 // freezes IP operation when CPU is halted
13631 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA1__HALT_eUA1_1 = 1;
13632 // IP operation unaffected when CPU is halted
13633 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA2__HALT_eUA2_0 = 0;
13634 // freezes IP operation when CPU is halted
13635 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA2__HALT_eUA2_1 = 1;
13636 // IP operation unaffected when CPU is halted
13637 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA3__HALT_eUA3_0 = 0;
13638 // freezes IP operation when CPU is halted
13639 static const uint32_t SYS_PERIHALT_CTL_HALT_eUA3__HALT_eUA3_1 = 1;
13640 // IP operation unaffected when CPU is halted
13641 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB0__HALT_eUB0_0 = 0;
13642 // freezes IP operation when CPU is halted
13643 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB0__HALT_eUB0_1 = 1;
13644 // IP operation unaffected when CPU is halted
13645 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB1__HALT_eUB1_0 = 0;
13646 // freezes IP operation when CPU is halted
13647 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB1__HALT_eUB1_1 = 1;
13648 // IP operation unaffected when CPU is halted
13649 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB2__HALT_eUB2_0 = 0;
13650 // freezes IP operation when CPU is halted
13651 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB2__HALT_eUB2_1 = 1;
13652 // IP operation unaffected when CPU is halted
13653 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB3__HALT_eUB3_0 = 0;
13654 // freezes IP operation when CPU is halted
13655 static const uint32_t SYS_PERIHALT_CTL_HALT_eUB3__HALT_eUB3_1 = 1;
13656 // IP operation unaffected when CPU is halted
13657 static const uint32_t SYS_PERIHALT_CTL_HALT_ADC__HALT_ADC_0 = 0;
13658 // freezes IP operation when CPU is halted
13659 static const uint32_t SYS_PERIHALT_CTL_HALT_ADC__HALT_ADC_1 = 1;
13660 // IP operation unaffected when CPU is halted
13661 static const uint32_t SYS_PERIHALT_CTL_HALT_WDT__HALT_WDT_0 = 0;
13662 // freezes IP operation when CPU is halted
13663 static const uint32_t SYS_PERIHALT_CTL_HALT_WDT__HALT_WDT_1 = 1;
13664 // IP operation unaffected when CPU is halted
13665 static const uint32_t SYS_PERIHALT_CTL_HALT_DMA__HALT_DMA_0 = 0;
13666 // freezes IP operation when CPU is halted
13667 static const uint32_t SYS_PERIHALT_CTL_HALT_DMA__HALT_DMA_1 = 1;
13668
13669 // SRAM Size Register
13670 BEGIN_TYPE(SYS_SRAM_SIZE_t, uint32_t)
13671 // Indicates the size of SRAM on the device
13672 ADD_BITFIELD_RO(SIZE, 0, 32)
13673 END_TYPE()
13674
13675 // SRAM Bank Enable Register
13676 // Reset value: 0x000000ff
13677 BEGIN_TYPE(SYS_SRAM_BANKEN_t, uint32_t)
13678 // SRAM Bank0 enable
13679 ADD_BITFIELD_RO(BNK0_EN, 0, 1)
13680 // SRAM Bank1 enable
13681 ADD_BITFIELD_RW(BNK1_EN, 1, 1)
13682 // SRAM Bank1 enable
13683 ADD_BITFIELD_RW(BNK2_EN, 2, 1)
13684 // SRAM Bank1 enable
13685 ADD_BITFIELD_RW(BNK3_EN, 3, 1)
13686 // SRAM Bank1 enable
13687 ADD_BITFIELD_RW(BNK4_EN, 4, 1)
13688 // SRAM Bank1 enable
13689 ADD_BITFIELD_RW(BNK5_EN, 5, 1)
13690 // SRAM Bank1 enable
13691 ADD_BITFIELD_RW(BNK6_EN, 6, 1)
13692 // SRAM Bank1 enable
13693 ADD_BITFIELD_RW(BNK7_EN, 7, 1)
13694 // SRAM ready
13695 ADD_BITFIELD_RO(SRAM_RDY, 16, 1)
13696 END_TYPE()
13697
13698 // Disables Bank1 of the SRAM
13699 static const uint32_t SYS_SRAM_BANKEN_BNK1_EN__BNK1_EN_0 = 0;
13700 // Enables Bank1 of the SRAM
13701 static const uint32_t SYS_SRAM_BANKEN_BNK1_EN__BNK1_EN_1 = 1;
13702 // Disables Bank2 of the SRAM
13703 static const uint32_t SYS_SRAM_BANKEN_BNK2_EN__BNK2_EN_0 = 0;
13704 // Enables Bank2 of the SRAM
13705 static const uint32_t SYS_SRAM_BANKEN_BNK2_EN__BNK2_EN_1 = 1;
13706 // Disables Bank3 of the SRAM
13707 static const uint32_t SYS_SRAM_BANKEN_BNK3_EN__BNK3_EN_0 = 0;
13708 // Enables Bank3 of the SRAM
13709 static const uint32_t SYS_SRAM_BANKEN_BNK3_EN__BNK3_EN_1 = 1;
13710 // Disables Bank4 of the SRAM
13711 static const uint32_t SYS_SRAM_BANKEN_BNK4_EN__BNK4_EN_0 = 0;
13712 // Enables Bank4 of the SRAM
13713 static const uint32_t SYS_SRAM_BANKEN_BNK4_EN__BNK4_EN_1 = 1;
13714 // Disables Bank5 of the SRAM
13715 static const uint32_t SYS_SRAM_BANKEN_BNK5_EN__BNK5_EN_0 = 0;
13716 // Enables Bank5 of the SRAM
13717 static const uint32_t SYS_SRAM_BANKEN_BNK5_EN__BNK5_EN_1 = 1;
13718 // Disables Bank6 of the SRAM
13719 static const uint32_t SYS_SRAM_BANKEN_BNK6_EN__BNK6_EN_0 = 0;
13720 // Enables Bank6 of the SRAM
13721 static const uint32_t SYS_SRAM_BANKEN_BNK6_EN__BNK6_EN_1 = 1;
13722 // Disables Bank7 of the SRAM
13723 static const uint32_t SYS_SRAM_BANKEN_BNK7_EN__BNK7_EN_0 = 0;
13724 // Enables Bank7 of the SRAM
13725 static const uint32_t SYS_SRAM_BANKEN_BNK7_EN__BNK7_EN_1 = 1;
13726 // SRAM is not ready for accesses. Banks are undergoing an enable or disable sequence, and reads or writes to SRAM are stalled until the banks are ready
13727 static const uint32_t SYS_SRAM_BANKEN_SRAM_RDY__SRAM_RDY_0 = 0;
13728 // SRAM is ready for accesses. All SRAM banks are enabled/disabled according to values of bits 7:0 of this register
13729 static const uint32_t SYS_SRAM_BANKEN_SRAM_RDY__SRAM_RDY_1 = 1;
13730
13731 // SRAM Bank Retention Control Register
13732 // Reset value: 0x000000ff
13733 BEGIN_TYPE(SYS_SRAM_BANKRET_t, uint32_t)
13734 // Bank0 retention
13735 ADD_BITFIELD_RO(BNK0_RET, 0, 1)
13736 // Bank1 retention
13737 ADD_BITFIELD_RW(BNK1_RET, 1, 1)
13738 // Bank2 retention
13739 ADD_BITFIELD_RW(BNK2_RET, 2, 1)
13740 // Bank3 retention
13741 ADD_BITFIELD_RW(BNK3_RET, 3, 1)
13742 // Bank4 retention
13743 ADD_BITFIELD_RW(BNK4_RET, 4, 1)
13744 // Bank5 retention
13745 ADD_BITFIELD_RW(BNK5_RET, 5, 1)
13746 // Bank6 retention
13747 ADD_BITFIELD_RW(BNK6_RET, 6, 1)
13748 // Bank7 retention
13749 ADD_BITFIELD_RW(BNK7_RET, 7, 1)
13750 // SRAM ready
13751 ADD_BITFIELD_RO(SRAM_RDY, 16, 1)
13752 END_TYPE()
13753
13754 // Bank1 of the SRAM is not retained in LPM3 or LPM4
13755 static const uint32_t SYS_SRAM_BANKRET_BNK1_RET__BNK1_RET_0 = 0;
13756 // Bank1 of the SRAM is retained in LPM3 and LPM4
13757 static const uint32_t SYS_SRAM_BANKRET_BNK1_RET__BNK1_RET_1 = 1;
13758 // Bank2 of the SRAM is not retained in LPM3 or LPM4
13759 static const uint32_t SYS_SRAM_BANKRET_BNK2_RET__BNK2_RET_0 = 0;
13760 // Bank2 of the SRAM is retained in LPM3 and LPM4
13761 static const uint32_t SYS_SRAM_BANKRET_BNK2_RET__BNK2_RET_1 = 1;
13762 // Bank3 of the SRAM is not retained in LPM3 or LPM4
13763 static const uint32_t SYS_SRAM_BANKRET_BNK3_RET__BNK3_RET_0 = 0;
13764 // Bank3 of the SRAM is retained in LPM3 and LPM4
13765 static const uint32_t SYS_SRAM_BANKRET_BNK3_RET__BNK3_RET_1 = 1;
13766 // Bank4 of the SRAM is not retained in LPM3 or LPM4
13767 static const uint32_t SYS_SRAM_BANKRET_BNK4_RET__BNK4_RET_0 = 0;
13768 // Bank4 of the SRAM is retained in LPM3 and LPM4
13769 static const uint32_t SYS_SRAM_BANKRET_BNK4_RET__BNK4_RET_1 = 1;
13770 // Bank5 of the SRAM is not retained in LPM3 or LPM4
13771 static const uint32_t SYS_SRAM_BANKRET_BNK5_RET__BNK5_RET_0 = 0;
13772 // Bank5 of the SRAM is retained in LPM3 and LPM4
13773 static const uint32_t SYS_SRAM_BANKRET_BNK5_RET__BNK5_RET_1 = 1;
13774 // Bank6 of the SRAM is not retained in LPM3 or LPM4
13775 static const uint32_t SYS_SRAM_BANKRET_BNK6_RET__BNK6_RET_0 = 0;
13776 // Bank6 of the SRAM is retained in LPM3 and LPM4
13777 static const uint32_t SYS_SRAM_BANKRET_BNK6_RET__BNK6_RET_1 = 1;
13778 // Bank7 of the SRAM is not retained in LPM3 or LPM4
13779 static const uint32_t SYS_SRAM_BANKRET_BNK7_RET__BNK7_RET_0 = 0;
13780 // Bank7 of the SRAM is retained in LPM3 and LPM4
13781 static const uint32_t SYS_SRAM_BANKRET_BNK7_RET__BNK7_RET_1 = 1;
13782 // SRAM banks are being set up for retention. Entry into LPM3, LPM4 should not be attempted until this bit is set to 1
13783 static const uint32_t SYS_SRAM_BANKRET_SRAM_RDY__SRAM_RDY_0 = 0;
13784 // SRAM is ready for accesses. All SRAM banks are enabled/disabled for retention according to values of bits 7:0 of this register
13785 static const uint32_t SYS_SRAM_BANKRET_SRAM_RDY__SRAM_RDY_1 = 1;
13786
13787 // Flash Size Register
13788 BEGIN_TYPE(SYS_FLASH_SIZE_t, uint32_t)
13789 // Flash User Region size
13790 ADD_BITFIELD_RO(SIZE, 0, 32)
13791 END_TYPE()
13792
13793 // Digital I/O Glitch Filter Control Register
13794 // Reset value: 0x00000001
13795 BEGIN_TYPE(SYS_DIO_GLTFLT_CTL_t, uint32_t)
13796 // Glitch filter enable
13797 ADD_BITFIELD_RW(GLTCH_EN, 0, 1)
13798 END_TYPE()
13799
13800 // Disables glitch filter on the digital I/Os
13801 static const uint32_t SYS_DIO_GLTFLT_CTL_GLTCH_EN__GLTCH_EN_0 = 0;
13802 // Enables glitch filter on the digital I/Os
13803 static const uint32_t SYS_DIO_GLTFLT_CTL_GLTCH_EN__GLTCH_EN_1 = 1;
13804
13805 // IP Protected Secure Zone Data Access Unlock Register
13806 // Reset value: 0x00000000
13807 BEGIN_TYPE(SYS_SECDATA_UNLOCK_t, uint32_t)
13808 // Unlock key
13809 ADD_BITFIELD_RW(UNLKEY, 0, 16)
13810 END_TYPE()
13811
13812 // Master Unlock Register
13813 // Reset value: 0x00000000
13814 BEGIN_TYPE(SYS_MASTER_UNLOCK_t, uint32_t)
13815 // Unlock Key
13816 ADD_BITFIELD_RW(UNLKEY, 0, 16)
13817 END_TYPE()
13818
13819 // Boot Override Request Register
13820 // Reset value: 0x00000000
13821 BEGIN_TYPE(SYS_BOOTOVER_REQ_t, uint32_t)
13822 // Value set by debugger, read and clear by the CPU
13823 ADD_BITFIELD_RW(REGVAL, 0, 32)
13824 END_TYPE()
13825
13826 // Boot Override Acknowledge Register
13827 // Reset value: 0x00000000
13828 BEGIN_TYPE(SYS_BOOTOVER_ACK_t, uint32_t)
13829 // Value set by CPU, read/clear by the debugger
13830 ADD_BITFIELD_RW(REGVAL, 0, 32)
13831 END_TYPE()
13832
13833 // Reset Request Register
13834 BEGIN_TYPE(SYS_RESET_REQ_t, uint32_t)
13835 // Generate POR
13836 ADD_BITFIELD_WO(POR, 0, 1)
13837 // Generate Reboot_Reset
13838 ADD_BITFIELD_WO(REBOOT, 1, 1)
13839 // Write key
13840 ADD_BITFIELD_WO(WKEY, 8, 8)
13841 END_TYPE()
13842
13843 // Reset Status and Override Register
13844 // Reset value: 0x00000000
13845 BEGIN_TYPE(SYS_RESET_STATOVER_t, uint32_t)
13846 // Indicates if SOFT Reset is active
13847 ADD_BITFIELD_RO(SOFT, 0, 1)
13848 // Indicates if HARD Reset is active
13849 ADD_BITFIELD_RO(HARD, 1, 1)
13850 // Indicates if Reboot Reset is active
13851 ADD_BITFIELD_RO(REBOOT, 2, 1)
13852 // SOFT_Reset overwrite request
13853 ADD_BITFIELD_RW(SOFT_OVER, 8, 1)
13854 // HARD_Reset overwrite request
13855 ADD_BITFIELD_RW(HARD_OVER, 9, 1)
13856 // Reboot Reset overwrite request
13857 ADD_BITFIELD_RW(RBT_OVER, 10, 1)
13858 END_TYPE()
13859
13860 // System Status Register
13861 BEGIN_TYPE(SYS_SYSTEM_STAT_t, uint32_t)
13862 // Debug Security active
13863 ADD_BITFIELD_RO(DBG_SEC_ACT, 3, 1)
13864 // Indicates if JTAG and SWD Lock is active
13865 ADD_BITFIELD_RO(JTAG_SWD_LOCK_ACT, 4, 1)
13866 // Indicates if IP protection is active
13867 ADD_BITFIELD_RO(IP_PROT_ACT, 5, 1)
13868 END_TYPE()
13869
13870 struct SYSCTL_t {
13871 SYS_REBOOT_CTL_t SYS_REBOOT_CTL;
13872 SYS_NMI_CTLSTAT_t SYS_NMI_CTLSTAT;
13873 SYS_WDTRESET_CTL_t SYS_WDTRESET_CTL;
13874 SYS_PERIHALT_CTL_t SYS_PERIHALT_CTL;
13875 SYS_SRAM_SIZE_t SYS_SRAM_SIZE;
13876 SYS_SRAM_BANKEN_t SYS_SRAM_BANKEN;
13877 SYS_SRAM_BANKRET_t SYS_SRAM_BANKRET;
13878 uint32_t reserved0;
13879 SYS_FLASH_SIZE_t SYS_FLASH_SIZE;
13880 uint32_t reserved1[3];
13881 SYS_DIO_GLTFLT_CTL_t SYS_DIO_GLTFLT_CTL;
13882 uint32_t reserved2[3];
13883 SYS_SECDATA_UNLOCK_t SYS_SECDATA_UNLOCK;
13884 uint32_t reserved3[1007];
13885 SYS_MASTER_UNLOCK_t SYS_MASTER_UNLOCK;
13886 SYS_BOOTOVER_REQ_t SYS_BOOTOVER_REQ0;
13887 SYS_BOOTOVER_REQ_t SYS_BOOTOVER_REQ1;
13888 SYS_BOOTOVER_ACK_t SYS_BOOTOVER_ACK;
13889 SYS_RESET_REQ_t SYS_RESET_REQ;
13890 SYS_RESET_STATOVER_t SYS_RESET_STATOVER;
13891 uint32_t reserved4[2];
13892 SYS_SYSTEM_STAT_t SYS_SYSTEM_STAT;
13893 };
13894
13895 static SYSCTL_t & SYSCTL = (*(SYSCTL_t *)0xe0043000);
13896
13897} // _SYSCTL_
13898
13899// Interrupt numbers
13900#define PSS_IRQ 0
13901#define CS_IRQ 1
13902#define PCM_IRQ 2
13903#define WDT_A_IRQ 3
13904#define FPU_IRQ 4
13905#define FLCTL_IRQ 5
13906#define COMP_E0_IRQ 6
13907#define COMP_E1_IRQ 7
13908#define TA0_0_IRQ 8
13909#define TA0_N_IRQ 9
13910#define TA1_0_IRQ 10
13911#define TA1_N_IRQ 11
13912#define TA2_0_IRQ 12
13913#define TA2_N_IRQ 13
13914#define TA3_0_IRQ 14
13915#define TA3_N_IRQ 15
13916#define EUSCIA0_IRQ 16
13917#define EUSCIA1_IRQ 17
13918#define EUSCIA2_IRQ 18
13919#define EUSCIA3_IRQ 19
13920#define EUSCIB0_IRQ 20
13921#define EUSCIB1_IRQ 21
13922#define EUSCIB2_IRQ 22
13923#define EUSCIB3_IRQ 23
13924#define ADC14_IRQ 24
13925#define T32_INT1_IRQ 25
13926#define T32_INT2_IRQ 26
13927#define T32_INTC_IRQ 27
13928#define AES256_IRQ 28
13929#define RTC_C_IRQ 29
13930#define DMA_ERR_IRQ 30
13931#define DMA_INT3_IRQ 31
13932#define DMA_INT2_IRQ 32
13933#define DMA_INT1_IRQ 33
13934#define DMA_INT0_IRQ 34
13935#define PORT1_IRQ 35
13936#define PORT2_IRQ 36
13937#define PORT3_IRQ 37
13938#define PORT4_IRQ 38
13939#define PORT5_IRQ 39
13940#define PORT6_IRQ 40
#define ITM
#define DWT