cc13x0_pac 0.10.3

Peripheral Access Crate for TI's cc13x0 microcontroller
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
#[doc = "Register `STAT1` reader"]
pub type R = crate::R<Stat1Spec>;
#[doc = "Register `STAT1` writer"]
pub type W = crate::W<Stat1Spec>;
#[doc = "Field `CLK_DCDC_GOOD` reader - 0:0\\]
CLK_DCDC_GOOD"]
pub type ClkDcdcGoodR = crate::BitReader;
#[doc = "Field `CLK_DCDC_GOOD` writer - 0:0\\]
CLK_DCDC_GOOD"]
pub type ClkDcdcGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CLK_CHP_GOOD` reader - 1:1\\]
CLK_CHP_GOOD"]
pub type ClkChpGoodR = crate::BitReader;
#[doc = "Field `CLK_CHP_GOOD` writer - 1:1\\]
CLK_CHP_GOOD"]
pub type ClkChpGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_REF_GOOD` reader - 2:2\\]
ACLK_REF_GOOD"]
pub type AclkRefGoodR = crate::BitReader;
#[doc = "Field `ACLK_REF_GOOD` writer - 2:2\\]
ACLK_REF_GOOD"]
pub type AclkRefGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_TDC_GOOD` reader - 3:3\\]
ACLK_TDC_GOOD"]
pub type AclkTdcGoodR = crate::BitReader;
#[doc = "Field `ACLK_TDC_GOOD` writer - 3:3\\]
ACLK_TDC_GOOD"]
pub type AclkTdcGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_ADC_GOOD` reader - 4:4\\]
ACLK_ADC_GOOD"]
pub type AclkAdcGoodR = crate::BitReader;
#[doc = "Field `ACLK_ADC_GOOD` writer - 4:4\\]
ACLK_ADC_GOOD"]
pub type AclkAdcGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SCLK_LF_GOOD` reader - 5:5\\]
SCLK_LF_GOOD"]
pub type SclkLfGoodR = crate::BitReader;
#[doc = "Field `SCLK_LF_GOOD` writer - 5:5\\]
SCLK_LF_GOOD"]
pub type SclkLfGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SCLK_MF_GOOD` reader - 6:6\\]
SCLK_MF_GOOD"]
pub type SclkMfGoodR = crate::BitReader;
#[doc = "Field `SCLK_MF_GOOD` writer - 6:6\\]
SCLK_MF_GOOD"]
pub type SclkMfGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SCLK_HF_GOOD` reader - 7:7\\]
SCLK_HF_GOOD"]
pub type SclkHfGoodR = crate::BitReader;
#[doc = "Field `SCLK_HF_GOOD` writer - 7:7\\]
SCLK_HF_GOOD"]
pub type SclkHfGoodW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CLK_DCDC_EN` reader - 8:8\\]
CLK_DCDC_EN"]
pub type ClkDcdcEnR = crate::BitReader;
#[doc = "Field `CLK_DCDC_EN` writer - 8:8\\]
CLK_DCDC_EN"]
pub type ClkDcdcEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CLK_CHP_EN` reader - 9:9\\]
CLK_CHP_EN"]
pub type ClkChpEnR = crate::BitReader;
#[doc = "Field `CLK_CHP_EN` writer - 9:9\\]
CLK_CHP_EN"]
pub type ClkChpEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_REF_EN` reader - 10:10\\]
ACLK_REF_EN"]
pub type AclkRefEnR = crate::BitReader;
#[doc = "Field `ACLK_REF_EN` writer - 10:10\\]
ACLK_REF_EN"]
pub type AclkRefEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_TDC_EN` reader - 11:11\\]
ACLK_TDC_EN"]
pub type AclkTdcEnR = crate::BitReader;
#[doc = "Field `ACLK_TDC_EN` writer - 11:11\\]
ACLK_TDC_EN"]
pub type AclkTdcEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `ACLK_ADC_EN` reader - 12:12\\]
ACLK_ADC_EN"]
pub type AclkAdcEnR = crate::BitReader;
#[doc = "Field `ACLK_ADC_EN` writer - 12:12\\]
ACLK_ADC_EN"]
pub type AclkAdcEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SCLK_MF_EN` reader - 13:13\\]
SCLK_MF_EN"]
pub type SclkMfEnR = crate::BitReader;
#[doc = "Field `SCLK_MF_EN` writer - 13:13\\]
SCLK_MF_EN"]
pub type SclkMfEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `SCLK_HF_EN` reader - 14:14\\]
SCLK_HF_EN"]
pub type SclkHfEnR = crate::BitReader;
#[doc = "Field `SCLK_HF_EN` writer - 14:14\\]
SCLK_HF_EN"]
pub type SclkHfEnW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `FORCE_RCOSC_HF` reader - 15:15\\]
force_rcosc_hf"]
pub type ForceRcoscHfR = crate::BitReader;
#[doc = "Field `FORCE_RCOSC_HF` writer - 15:15\\]
force_rcosc_hf"]
pub type ForceRcoscHfW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `LPM_UPDATE_AMP` reader - 21:16\\]
OSC amplitude during LPM_UPDATE state When amplitude compensation of XOSC_HF is enabled in low power mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
pub type LpmUpdateAmpR = crate::FieldReader;
#[doc = "Field `LPM_UPDATE_AMP` writer - 21:16\\]
OSC amplitude during LPM_UPDATE state When amplitude compensation of XOSC_HF is enabled in low power mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
pub type LpmUpdateAmpW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "Field `HPM_UPDATE_AMP` reader - 27:22\\]
OSC amplitude during HPM_UPDATE state. When amplitude compensation of XOSC_HF is enabled in high performance mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
pub type HpmUpdateAmpR = crate::FieldReader;
#[doc = "Field `HPM_UPDATE_AMP` writer - 27:22\\]
OSC amplitude during HPM_UPDATE state. When amplitude compensation of XOSC_HF is enabled in high performance mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
pub type HpmUpdateAmpW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
#[doc = "31:28\\]
AMPCOMP FSM State\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Rampstate {
    #[doc = "14: FAST_START_SETTLE"]
    FastStartSettle = 14,
    #[doc = "13: FAST_START"]
    FastStart = 13,
    #[doc = "12: DUMMY_TO_INIT_1"]
    DummyToInit1 = 12,
    #[doc = "11: IDAC_DECREMENT_WITH_MEASURE"]
    IdacDecWMeasure = 11,
    #[doc = "10: IBIAS_INCREMENT"]
    IbiasInc = 10,
    #[doc = "9: LPM_UPDATE"]
    LpmUpdate = 9,
    #[doc = "8: IBIAS_DECREMENT_WITH_MEASURE"]
    IbiasDecWMeasure = 8,
    #[doc = "7: IBIAS_CAP_UPDATE"]
    IbiasCapUpdate = 7,
    #[doc = "6: IDAC_INCREMENT"]
    IdacIncrement = 6,
    #[doc = "5: HPM_UPDATE"]
    HpmUpdate = 5,
    #[doc = "4: HPM_RAMP3"]
    HpmRamp3 = 4,
    #[doc = "3: HPM_RAMP2"]
    HpmRamp2 = 3,
    #[doc = "2: HPM_RAMP1"]
    HpmRamp1 = 2,
    #[doc = "1: INITIALIZATION"]
    Initialization = 1,
    #[doc = "0: RESET"]
    Reset = 0,
}
impl From<Rampstate> for u8 {
    #[inline(always)]
    fn from(variant: Rampstate) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Rampstate {
    type Ux = u8;
}
impl crate::IsEnum for Rampstate {}
#[doc = "Field `RAMPSTATE` reader - 31:28\\]
AMPCOMP FSM State"]
pub type RampstateR = crate::FieldReader<Rampstate>;
impl RampstateR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Rampstate> {
        match self.bits {
            14 => Some(Rampstate::FastStartSettle),
            13 => Some(Rampstate::FastStart),
            12 => Some(Rampstate::DummyToInit1),
            11 => Some(Rampstate::IdacDecWMeasure),
            10 => Some(Rampstate::IbiasInc),
            9 => Some(Rampstate::LpmUpdate),
            8 => Some(Rampstate::IbiasDecWMeasure),
            7 => Some(Rampstate::IbiasCapUpdate),
            6 => Some(Rampstate::IdacIncrement),
            5 => Some(Rampstate::HpmUpdate),
            4 => Some(Rampstate::HpmRamp3),
            3 => Some(Rampstate::HpmRamp2),
            2 => Some(Rampstate::HpmRamp1),
            1 => Some(Rampstate::Initialization),
            0 => Some(Rampstate::Reset),
            _ => None,
        }
    }
    #[doc = "FAST_START_SETTLE"]
    #[inline(always)]
    pub fn is_fast_start_settle(&self) -> bool {
        *self == Rampstate::FastStartSettle
    }
    #[doc = "FAST_START"]
    #[inline(always)]
    pub fn is_fast_start(&self) -> bool {
        *self == Rampstate::FastStart
    }
    #[doc = "DUMMY_TO_INIT_1"]
    #[inline(always)]
    pub fn is_dummy_to_init_1(&self) -> bool {
        *self == Rampstate::DummyToInit1
    }
    #[doc = "IDAC_DECREMENT_WITH_MEASURE"]
    #[inline(always)]
    pub fn is_idac_dec_w_measure(&self) -> bool {
        *self == Rampstate::IdacDecWMeasure
    }
    #[doc = "IBIAS_INCREMENT"]
    #[inline(always)]
    pub fn is_ibias_inc(&self) -> bool {
        *self == Rampstate::IbiasInc
    }
    #[doc = "LPM_UPDATE"]
    #[inline(always)]
    pub fn is_lpm_update(&self) -> bool {
        *self == Rampstate::LpmUpdate
    }
    #[doc = "IBIAS_DECREMENT_WITH_MEASURE"]
    #[inline(always)]
    pub fn is_ibias_dec_w_measure(&self) -> bool {
        *self == Rampstate::IbiasDecWMeasure
    }
    #[doc = "IBIAS_CAP_UPDATE"]
    #[inline(always)]
    pub fn is_ibias_cap_update(&self) -> bool {
        *self == Rampstate::IbiasCapUpdate
    }
    #[doc = "IDAC_INCREMENT"]
    #[inline(always)]
    pub fn is_idac_increment(&self) -> bool {
        *self == Rampstate::IdacIncrement
    }
    #[doc = "HPM_UPDATE"]
    #[inline(always)]
    pub fn is_hpm_update(&self) -> bool {
        *self == Rampstate::HpmUpdate
    }
    #[doc = "HPM_RAMP3"]
    #[inline(always)]
    pub fn is_hpm_ramp3(&self) -> bool {
        *self == Rampstate::HpmRamp3
    }
    #[doc = "HPM_RAMP2"]
    #[inline(always)]
    pub fn is_hpm_ramp2(&self) -> bool {
        *self == Rampstate::HpmRamp2
    }
    #[doc = "HPM_RAMP1"]
    #[inline(always)]
    pub fn is_hpm_ramp1(&self) -> bool {
        *self == Rampstate::HpmRamp1
    }
    #[doc = "INITIALIZATION"]
    #[inline(always)]
    pub fn is_initialization(&self) -> bool {
        *self == Rampstate::Initialization
    }
    #[doc = "RESET"]
    #[inline(always)]
    pub fn is_reset(&self) -> bool {
        *self == Rampstate::Reset
    }
}
#[doc = "Field `RAMPSTATE` writer - 31:28\\]
AMPCOMP FSM State"]
pub type RampstateW<'a, REG> = crate::FieldWriter<'a, REG, 4, Rampstate>;
impl<'a, REG> RampstateW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "FAST_START_SETTLE"]
    #[inline(always)]
    pub fn fast_start_settle(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::FastStartSettle)
    }
    #[doc = "FAST_START"]
    #[inline(always)]
    pub fn fast_start(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::FastStart)
    }
    #[doc = "DUMMY_TO_INIT_1"]
    #[inline(always)]
    pub fn dummy_to_init_1(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::DummyToInit1)
    }
    #[doc = "IDAC_DECREMENT_WITH_MEASURE"]
    #[inline(always)]
    pub fn idac_dec_w_measure(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::IdacDecWMeasure)
    }
    #[doc = "IBIAS_INCREMENT"]
    #[inline(always)]
    pub fn ibias_inc(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::IbiasInc)
    }
    #[doc = "LPM_UPDATE"]
    #[inline(always)]
    pub fn lpm_update(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::LpmUpdate)
    }
    #[doc = "IBIAS_DECREMENT_WITH_MEASURE"]
    #[inline(always)]
    pub fn ibias_dec_w_measure(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::IbiasDecWMeasure)
    }
    #[doc = "IBIAS_CAP_UPDATE"]
    #[inline(always)]
    pub fn ibias_cap_update(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::IbiasCapUpdate)
    }
    #[doc = "IDAC_INCREMENT"]
    #[inline(always)]
    pub fn idac_increment(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::IdacIncrement)
    }
    #[doc = "HPM_UPDATE"]
    #[inline(always)]
    pub fn hpm_update(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::HpmUpdate)
    }
    #[doc = "HPM_RAMP3"]
    #[inline(always)]
    pub fn hpm_ramp3(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::HpmRamp3)
    }
    #[doc = "HPM_RAMP2"]
    #[inline(always)]
    pub fn hpm_ramp2(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::HpmRamp2)
    }
    #[doc = "HPM_RAMP1"]
    #[inline(always)]
    pub fn hpm_ramp1(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::HpmRamp1)
    }
    #[doc = "INITIALIZATION"]
    #[inline(always)]
    pub fn initialization(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::Initialization)
    }
    #[doc = "RESET"]
    #[inline(always)]
    pub fn reset(self) -> &'a mut crate::W<REG> {
        self.variant(Rampstate::Reset)
    }
}
impl R {
    #[doc = "Bit 0 - 0:0\\]
CLK_DCDC_GOOD"]
    #[inline(always)]
    pub fn clk_dcdc_good(&self) -> ClkDcdcGoodR {
        ClkDcdcGoodR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - 1:1\\]
CLK_CHP_GOOD"]
    #[inline(always)]
    pub fn clk_chp_good(&self) -> ClkChpGoodR {
        ClkChpGoodR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - 2:2\\]
ACLK_REF_GOOD"]
    #[inline(always)]
    pub fn aclk_ref_good(&self) -> AclkRefGoodR {
        AclkRefGoodR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - 3:3\\]
ACLK_TDC_GOOD"]
    #[inline(always)]
    pub fn aclk_tdc_good(&self) -> AclkTdcGoodR {
        AclkTdcGoodR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - 4:4\\]
ACLK_ADC_GOOD"]
    #[inline(always)]
    pub fn aclk_adc_good(&self) -> AclkAdcGoodR {
        AclkAdcGoodR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - 5:5\\]
SCLK_LF_GOOD"]
    #[inline(always)]
    pub fn sclk_lf_good(&self) -> SclkLfGoodR {
        SclkLfGoodR::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - 6:6\\]
SCLK_MF_GOOD"]
    #[inline(always)]
    pub fn sclk_mf_good(&self) -> SclkMfGoodR {
        SclkMfGoodR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - 7:7\\]
SCLK_HF_GOOD"]
    #[inline(always)]
    pub fn sclk_hf_good(&self) -> SclkHfGoodR {
        SclkHfGoodR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - 8:8\\]
CLK_DCDC_EN"]
    #[inline(always)]
    pub fn clk_dcdc_en(&self) -> ClkDcdcEnR {
        ClkDcdcEnR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - 9:9\\]
CLK_CHP_EN"]
    #[inline(always)]
    pub fn clk_chp_en(&self) -> ClkChpEnR {
        ClkChpEnR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - 10:10\\]
ACLK_REF_EN"]
    #[inline(always)]
    pub fn aclk_ref_en(&self) -> AclkRefEnR {
        AclkRefEnR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - 11:11\\]
ACLK_TDC_EN"]
    #[inline(always)]
    pub fn aclk_tdc_en(&self) -> AclkTdcEnR {
        AclkTdcEnR::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12 - 12:12\\]
ACLK_ADC_EN"]
    #[inline(always)]
    pub fn aclk_adc_en(&self) -> AclkAdcEnR {
        AclkAdcEnR::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - 13:13\\]
SCLK_MF_EN"]
    #[inline(always)]
    pub fn sclk_mf_en(&self) -> SclkMfEnR {
        SclkMfEnR::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 14 - 14:14\\]
SCLK_HF_EN"]
    #[inline(always)]
    pub fn sclk_hf_en(&self) -> SclkHfEnR {
        SclkHfEnR::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - 15:15\\]
force_rcosc_hf"]
    #[inline(always)]
    pub fn force_rcosc_hf(&self) -> ForceRcoscHfR {
        ForceRcoscHfR::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bits 16:21 - 21:16\\]
OSC amplitude during LPM_UPDATE state When amplitude compensation of XOSC_HF is enabled in low power mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
    #[inline(always)]
    pub fn lpm_update_amp(&self) -> LpmUpdateAmpR {
        LpmUpdateAmpR::new(((self.bits >> 16) & 0x3f) as u8)
    }
    #[doc = "Bits 22:27 - 27:22\\]
OSC amplitude during HPM_UPDATE state. When amplitude compensation of XOSC_HF is enabled in high performance mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
    #[inline(always)]
    pub fn hpm_update_amp(&self) -> HpmUpdateAmpR {
        HpmUpdateAmpR::new(((self.bits >> 22) & 0x3f) as u8)
    }
    #[doc = "Bits 28:31 - 31:28\\]
AMPCOMP FSM State"]
    #[inline(always)]
    pub fn rampstate(&self) -> RampstateR {
        RampstateR::new(((self.bits >> 28) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - 0:0\\]
CLK_DCDC_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn clk_dcdc_good(&mut self) -> ClkDcdcGoodW<Stat1Spec> {
        ClkDcdcGoodW::new(self, 0)
    }
    #[doc = "Bit 1 - 1:1\\]
CLK_CHP_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn clk_chp_good(&mut self) -> ClkChpGoodW<Stat1Spec> {
        ClkChpGoodW::new(self, 1)
    }
    #[doc = "Bit 2 - 2:2\\]
ACLK_REF_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_ref_good(&mut self) -> AclkRefGoodW<Stat1Spec> {
        AclkRefGoodW::new(self, 2)
    }
    #[doc = "Bit 3 - 3:3\\]
ACLK_TDC_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_tdc_good(&mut self) -> AclkTdcGoodW<Stat1Spec> {
        AclkTdcGoodW::new(self, 3)
    }
    #[doc = "Bit 4 - 4:4\\]
ACLK_ADC_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_adc_good(&mut self) -> AclkAdcGoodW<Stat1Spec> {
        AclkAdcGoodW::new(self, 4)
    }
    #[doc = "Bit 5 - 5:5\\]
SCLK_LF_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn sclk_lf_good(&mut self) -> SclkLfGoodW<Stat1Spec> {
        SclkLfGoodW::new(self, 5)
    }
    #[doc = "Bit 6 - 6:6\\]
SCLK_MF_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn sclk_mf_good(&mut self) -> SclkMfGoodW<Stat1Spec> {
        SclkMfGoodW::new(self, 6)
    }
    #[doc = "Bit 7 - 7:7\\]
SCLK_HF_GOOD"]
    #[inline(always)]
    #[must_use]
    pub fn sclk_hf_good(&mut self) -> SclkHfGoodW<Stat1Spec> {
        SclkHfGoodW::new(self, 7)
    }
    #[doc = "Bit 8 - 8:8\\]
CLK_DCDC_EN"]
    #[inline(always)]
    #[must_use]
    pub fn clk_dcdc_en(&mut self) -> ClkDcdcEnW<Stat1Spec> {
        ClkDcdcEnW::new(self, 8)
    }
    #[doc = "Bit 9 - 9:9\\]
CLK_CHP_EN"]
    #[inline(always)]
    #[must_use]
    pub fn clk_chp_en(&mut self) -> ClkChpEnW<Stat1Spec> {
        ClkChpEnW::new(self, 9)
    }
    #[doc = "Bit 10 - 10:10\\]
ACLK_REF_EN"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_ref_en(&mut self) -> AclkRefEnW<Stat1Spec> {
        AclkRefEnW::new(self, 10)
    }
    #[doc = "Bit 11 - 11:11\\]
ACLK_TDC_EN"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_tdc_en(&mut self) -> AclkTdcEnW<Stat1Spec> {
        AclkTdcEnW::new(self, 11)
    }
    #[doc = "Bit 12 - 12:12\\]
ACLK_ADC_EN"]
    #[inline(always)]
    #[must_use]
    pub fn aclk_adc_en(&mut self) -> AclkAdcEnW<Stat1Spec> {
        AclkAdcEnW::new(self, 12)
    }
    #[doc = "Bit 13 - 13:13\\]
SCLK_MF_EN"]
    #[inline(always)]
    #[must_use]
    pub fn sclk_mf_en(&mut self) -> SclkMfEnW<Stat1Spec> {
        SclkMfEnW::new(self, 13)
    }
    #[doc = "Bit 14 - 14:14\\]
SCLK_HF_EN"]
    #[inline(always)]
    #[must_use]
    pub fn sclk_hf_en(&mut self) -> SclkHfEnW<Stat1Spec> {
        SclkHfEnW::new(self, 14)
    }
    #[doc = "Bit 15 - 15:15\\]
force_rcosc_hf"]
    #[inline(always)]
    #[must_use]
    pub fn force_rcosc_hf(&mut self) -> ForceRcoscHfW<Stat1Spec> {
        ForceRcoscHfW::new(self, 15)
    }
    #[doc = "Bits 16:21 - 21:16\\]
OSC amplitude during LPM_UPDATE state When amplitude compensation of XOSC_HF is enabled in low power mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
    #[inline(always)]
    #[must_use]
    pub fn lpm_update_amp(&mut self) -> LpmUpdateAmpW<Stat1Spec> {
        LpmUpdateAmpW::new(self, 16)
    }
    #[doc = "Bits 22:27 - 27:22\\]
OSC amplitude during HPM_UPDATE state. When amplitude compensation of XOSC_HF is enabled in high performance mode, this value is the amplitude of the crystal oscillations measured by the on-chip oscillator ADC, divided by 15 mV. For example, a value of 0x20 would indicate that the amplitude of the crystal is approximately 480 mV. To enable amplitude compensation, AON_WUC OSCCFG must be set to a non-zero value."]
    #[inline(always)]
    #[must_use]
    pub fn hpm_update_amp(&mut self) -> HpmUpdateAmpW<Stat1Spec> {
        HpmUpdateAmpW::new(self, 22)
    }
    #[doc = "Bits 28:31 - 31:28\\]
AMPCOMP FSM State"]
    #[inline(always)]
    #[must_use]
    pub fn rampstate(&mut self) -> RampstateW<Stat1Spec> {
        RampstateW::new(self, 28)
    }
}
#[doc = "Status 1 This register contains status signals from OSC_DIG\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`stat1::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`stat1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Stat1Spec;
impl crate::RegisterSpec for Stat1Spec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`stat1::R`](R) reader structure"]
impl crate::Readable for Stat1Spec {}
#[doc = "`write(|w| ..)` method takes [`stat1::W`](W) writer structure"]
impl crate::Writable for Stat1Spec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets STAT1 to value 0"]
impl crate::Resettable for Stat1Spec {
    const RESET_VALUE: u32 = 0;
}