imxrt-ral 0.6.2

Register access layer for all NXP i.MX RT microcontrollers
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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
#[doc = "DCDC"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "DCDC Register 0"]
    pub REG0: crate::RWRegister<u32>,
    #[doc = "DCDC Register 1"]
    pub REG1: crate::RWRegister<u32>,
    #[doc = "DCDC Register 2"]
    pub REG2: crate::RWRegister<u32>,
    #[doc = "DCDC Register 3"]
    pub REG3: crate::RWRegister<u32>,
    #[doc = "DCDC Control Register 0"]
    pub CTRL0: crate::RWRegister<u32>,
    #[doc = "OK CNT"]
    pub OK_CNT: crate::RWRegister<u32>,
    #[doc = "CURRENT TARGET VALUE for DCDC ANALOG"]
    pub CURRENT_TRG: crate::RWRegister<u32>,
    #[doc = "FILTER CNT"]
    pub FILTER_CNT: crate::RWRegister<u32>,
    #[doc = "TRG_0 Authentication Control"]
    pub TRG_0_AUTHEN: crate::RWRegister<u32>,
    #[doc = "Target SW Control for CORE 0"]
    pub TRG_SW_0: crate::RWRegister<u32>,
    #[doc = "Target GPC Control for CORE 0"]
    pub TRG_GPC_0: crate::RWRegister<u32>,
    _reserved0: [u8; 0x04],
    #[doc = "TRG_1 Authentication Control"]
    pub TRG_1_AUTHEN: crate::RWRegister<u32>,
    #[doc = "Target SW Control for CORE 1"]
    pub TRG_SW_1: crate::RWRegister<u32>,
    #[doc = "Target GPC Control for CORE 1"]
    pub TRG_GPC_1: crate::RWRegister<u32>,
}
#[doc = "DCDC Register 0"]
pub mod REG0 {
    #[doc = "Power Down Zero Cross Detection"]
    pub mod PWD_ZCD {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Zero cross detetion function powered up"]
            pub const POWERED_UP: u32 = 0;
            #[doc = "Zero cross detetion function powered down"]
            pub const POWERED_DOWN: u32 = 0x01;
        }
    }
    #[doc = "Disable Auto Clock Switch"]
    pub mod DISABLE_AUTO_CLK_SWITCH {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "If DISABLE_AUTO_CLK_SWITCH is set to 0 and 24M xtal is OK, the clock source will switch from internal ring oscillator to 24M xtal automatically"]
            pub const XTAL_CLK: u32 = 0;
            #[doc = "If DISABLE_AUTO_CLK_SWITCH is set to 1, SEL_CLK will determine which clock source the DCDC uses"]
            pub const SEL_CLK: u32 = 0x01;
        }
    }
    #[doc = "Select Clock"]
    pub mod SEL_CLK {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DCDC uses internal ring oscillator"]
            pub const INT_RNG_OSC: u32 = 0;
            #[doc = "DCDC uses 24M xtal"]
            pub const XTAL_24M: u32 = 0x01;
        }
    }
    #[doc = "Power down internal osc"]
    pub mod PWD_OSC_INT {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Internal ring oscillator powered up"]
            pub const POWERED_UP: u32 = 0;
            #[doc = "Internal ring oscillator powered down"]
            pub const POWERED_DOWN: u32 = 0x01;
        }
    }
    #[doc = "Power down overcurrent detection comparator"]
    pub mod PWD_OVERCUR_DET {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Overcurrent detection comparator is enabled"]
            pub const ENABLED: u32 = 0;
            #[doc = "Overcurrent detection comparator is disabled"]
            pub const DISABLED: u32 = 0x01;
        }
    }
    #[doc = "Overcurrent Trigger Adjust"]
    pub mod OVERCUR_TRIG_ADJ {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "In Run Mode, 1.5 A. In LP Mode, 150 mA"]
            pub const SELECT_ZERO: u32 = 0;
            #[doc = "In Run Mode, 1.5 A. In LP Mode, 130 mA"]
            pub const SELECT_ONE: u32 = 0x01;
            #[doc = "In Run Mode, 2 A. In LP Mode, 150 mA"]
            pub const SELECT_TWO: u32 = 0x02;
            #[doc = "In Run Mode, 2 A. In LP Mode, 130 mA"]
            pub const SELECT_THREE: u32 = 0x03;
        }
    }
    #[doc = "Set to \"1\" to power down the low voltage detection comparator"]
    pub mod PWD_CMP_DCDC_IN_DET {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Low voltage detection comparator is enabled"]
            pub const ENABLED: u32 = 0;
            #[doc = "Low voltage detection comparator is disabled"]
            pub const DISABLED: u32 = 0x01;
        }
    }
    #[doc = "Power Down High Voltage Detection for VDD1P8"]
    pub mod PWD_HIGH_VDD1P8_DET {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Overvoltage detection comparator for the VDD1P8 output is enabled"]
            pub const ENABLED: u32 = 0;
            #[doc = "Overvoltage detection comparator for the VDD1P8 output is disabled"]
            pub const DISABLED: u32 = 0x01;
        }
    }
    #[doc = "Power Down High Voltage Detection for VDD1P0"]
    pub mod PWD_HIGH_VDD1P0_DET {
        pub const offset: u32 = 17;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Overvoltage detection comparator for the VDD1P0 output is enabled"]
            pub const ENABLED: u32 = 0;
            #[doc = "Overvoltage detection comparator for the VDD1P0 output is disabled"]
            pub const DISABLED: u32 = 0x01;
        }
    }
    #[doc = "power down the out-of-range detection comparator"]
    pub mod PWD_CMP_OFFSET {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Out-of-range comparator powered up"]
            pub const POWERED_UP: u32 = 0;
            #[doc = "Out-of-range comparator powered down"]
            pub const POWERED_DOWN: u32 = 0x01;
        }
    }
    #[doc = "Disable xtalok detection circuit"]
    pub mod XTALOK_DISABLE {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enable xtalok detection circuit"]
            pub const ENABLED: u32 = 0;
            #[doc = "Disable xtalok detection circuit and always outputs OK signal \"1\""]
            pub const DISABLED: u32 = 0x01;
        }
    }
    #[doc = "24M XTAL OK"]
    pub mod XTAL_24M_OK {
        pub const offset: u32 = 29;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DCDC uses internal ring oscillator"]
            pub const INT_RNG_OSC: u32 = 0;
            #[doc = "DCDC uses xtal 24M"]
            pub const XTAL_24M: u32 = 0x01;
        }
    }
    #[doc = "DCDC Output OK"]
    pub mod STS_DC_OK {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DCDC is settling"]
            pub const NOT_SETTLED: u32 = 0;
            #[doc = "DCDC already settled"]
            pub const SETTLED: u32 = 0x01;
        }
    }
}
#[doc = "DCDC Register 1"]
pub mod REG1 {
    #[doc = "Resistor Load of Regulator Enable"]
    pub mod RLOAD_REG_EN {
        pub const offset: u32 = 4;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Resistor load disconnected"]
            pub const RLOAD_DISCONNECT: u32 = 0;
            #[doc = "Resistor load connected"]
            pub const RLOAD_CONNECT: u32 = 0x01;
        }
    }
    #[doc = "Trim Bandgap Voltage Trim step is 3mV. 00000 - 0.452V 10000 - 0.5V 11111 - 0.545V"]
    pub mod VBG_TRIM {
        pub const offset: u32 = 6;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Negative duty cycle limit of DC-DC converter"]
    pub mod NEGLIMIT_IN {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x7f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Increase Threshold Detection"]
    pub mod LOOPCTRL_CM_HST_THRESH {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable increase the threshold detection for common mode analog comparators."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable increase the threshold detection for common mode analog comparators."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Increase Threshold Detection"]
    pub mod LOOPCTRL_DF_HST_THRESH {
        pub const offset: u32 = 28;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable increase the threshold detection for differential mode analog comparators."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable increase the threshold detection for differential mode analog comparators."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Enable hysteresis in switching converter common mode analog comparators"]
    pub mod LOOPCTRL_EN_CM_HYST {
        pub const offset: u32 = 29;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable hysteresis in switching converter common mode analog comparators"]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable hysteresis in switching converter common mode analog comparators"]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Enable hysteresis in switching converter differential mode analog comparators"]
    pub mod LOOPCTRL_EN_DF_HYST {
        pub const offset: u32 = 30;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable hysteresis in switching converter differential mode analog comparators"]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable hysteresis in switching converter differential mode analog comparators"]
            pub const ENABLE: u32 = 0x01;
        }
    }
}
#[doc = "DCDC Register 2"]
pub mod REG2 {
    #[doc = "Ratio of integral control parameter to proportional control parameter in the switching DC-DC converter, and can be used to optimize efficiency and loop response"]
    pub mod LOOPCTRL_DC_C {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Magnitude of proportional control parameter in the switching DC-DC converter control loop."]
    pub mod LOOPCTRL_DC_R {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Two's complement feed forward step in duty cycle in the switching DC-DC converter"]
    pub mod LOOPCTRL_DC_FF {
        pub const offset: u32 = 6;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Enable RC Scale"]
    pub mod LOOPCTRL_EN_RCSCALE {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Increase the threshold detection for RC scale circuit."]
    pub mod LOOPCTRL_RCSCALE_THRSH {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable increasing the threshold detection function."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable increasing the threshold detection function."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Invert the sign of the hysteresis in DC-DC analog comparators."]
    pub mod LOOPCTRL_HYST_SIGN {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the invert function."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable the invert function."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "This bit enables the DC-DC to improve efficiency and minimize ripple using the information from the BATTMONITOR_BATT_VAL field"]
    pub mod BATTMONITOR_EN_BATADJ {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the improvement function."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable the improvement function."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Software should be configured to place the battery voltage in this register measured with an 8-mV LSB resolution through the ADC"]
    pub mod BATTMONITOR_BATT_VAL {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x03ff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Set high to enable supply stepping to change only after the differential control loop has toggled as well"]
    pub mod LOOPCTRL_TOGGLE_DIF {
        pub const offset: u32 = 30;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable supply stepping to change."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable supply stepping to change."]
            pub const ENABLE: u32 = 0x01;
        }
    }
}
#[doc = "DCDC Register 3"]
pub mod REG3 {
    #[doc = "The voltage on DCDC_IN is lower than 2.8V"]
    pub mod IN_BROWNOUT_WARN {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "The voltage on DCDC_IN raises up to 2.8V."]
            pub const NOT_WARNING: u32 = 0;
            #[doc = "The voltage on DCDC_IN is lower than 2.8V. Once this bit sets, the bit must be cleared by software write one clear action while the voltage on DCDC_IN raises up to 2.8V. Writing \"0\" to this bit has no effect. Writing \"1\" to this bit has no effect while it's \"0\"."]
            pub const WARNING: u32 = 0x01;
        }
    }
    #[doc = "Enable feed-forward (FF) function that can speed up transient settling."]
    pub mod ENABLE_FF {
        pub const offset: u32 = 18;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enable the FF function."]
            pub const ENABLE_0: u32 = 0;
            #[doc = "Disable the FF function."]
            pub const DISABLE_1: u32 = 0x01;
        }
    }
    #[doc = "Disable Pulse Skip"]
    pub mod DISABLE_PULSE_SKIP {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "The DCDC will be idle when out-of-range comparator detects the output voltage is higher than the target by 25mV"]
    pub mod DISABLE_IDLE_SKIP {
        pub const offset: u32 = 20;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enable the idle skip function."]
            pub const ENABLE_0: u32 = 0;
            #[doc = "Disable the idle skip function."]
            pub const DISABLE_1: u32 = 0x01;
        }
    }
    #[doc = "Double the bias current of the comparator for low-voltage detector in LP (low-power) mode."]
    pub mod DOUBLE_IBIAS_CMP_LP {
        pub const offset: u32 = 21;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the function."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable the function."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Select the feedback point of the internal regulator. No need to change this field in user mode."]
    pub mod REG_FBK_SEL {
        pub const offset: u32 = 22;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Use half switch FET"]
    pub mod MINPWR_HALF_FETS {
        pub const offset: u32 = 26;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Donot use half switch FET."]
            pub const NO_HALF_S_FET: u32 = 0;
            #[doc = "Use half switch FET."]
            pub const USE_HALF_S_FET: u32 = 0x01;
        }
    }
    #[doc = "Miscellaneous Delay Timing"]
    pub mod MISC_DELAY_TIMING {
        pub const offset: u32 = 27;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable the function."]
            pub const DISABLE: u32 = 0;
            #[doc = "Enable the function."]
            pub const ENABLE: u32 = 0x01;
        }
    }
    #[doc = "Disable Step for VDD1P0"]
    pub mod VDD1P0CTRL_DISABLE_STEP {
        pub const offset: u32 = 29;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enable stepping for VDD1P0"]
            pub const ENABLE: u32 = 0;
            #[doc = "Disable stepping for VDD1P0"]
            pub const DISABLE: u32 = 0x01;
        }
    }
}
#[doc = "DCDC Control Register 0"]
pub mod CTRL0 {
    #[doc = "Enable internal count for DCDC_OK timeout"]
    pub mod ENABLE_OK_CNT {
        pub const offset: u32 = 5;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Wait DCDC_OK for ACK"]
            pub const WAIT: u32 = 0;
            #[doc = "Enable internal count for DCDC_OK timeout"]
            pub const ENABLE_COUNT: u32 = 0x01;
        }
    }
    #[doc = "Hold trim input"]
    pub mod TRIM_HOLD {
        pub const offset: u32 = 6;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Sample trim input"]
            pub const SAMPLE: u32 = 0;
            #[doc = "Hold trim input"]
            pub const HOLD: u32 = 0x01;
        }
    }
    #[doc = "IN_BROWNOUT_WARN_EN"]
    pub mod IN_BROWNOUT_WARN_EN {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable IN_BROWNOUT_WARN int flag bit output to CORE as an interrupt resource."]
            pub const NO_BROWNOUT_WARN: u32 = 0;
            #[doc = "Enable IN_BROWNOUT_WARN int flag bit output to CORE as an interrupt resource."]
            pub const BROWNOUT_WARN: u32 = 0x01;
        }
    }
    #[doc = "Set to 0x1: To improve loading ability under heavy load."]
    pub mod DEBUG_BITS {
        pub const offset: u32 = 19;
        pub const mask: u32 = 0x0fff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "TRG_GPC_EN: used to enable TRG_GPC_* value or not."]
    pub mod TRG_GPC_EN {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No matter there is GPC stby request or not, value in TRG_SW_* register will always be used as DCDC analog target value."]
            pub const NO_GPC_EN: u32 = 0;
            #[doc = "When there is a GPC stby request, value in TRG_GPC_* register will be used as DCDC analog target value instead of TRG_SW_*'s"]
            pub const GPC_EN: u32 = 0x01;
        }
    }
}
#[doc = "OK CNT"]
pub mod OK_CNT {
    #[doc = "OK_COUNT"]
    pub mod OK_COUNT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "CURRENT TARGET VALUE for DCDC ANALOG"]
pub mod CURRENT_TRG {
    #[doc = "This value is current value used by DCDC analog"]
    pub mod VDD1P0CTRL_TRG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value is current value used by DCDC analog"]
    pub mod VDD1P8CTRL_TRG {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Notice: Only if the time of the bit's 1 is too long(more than several seconds) and REG0\\[STS_DC_OK\\]=1, then you can write 1 to clear it"]
    pub mod DCDC_UPDATING {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Last DCDC change has been done. New value can be written to TRG register to trigger a new change of DCDC voltage."]
            pub const NO_UPDATING: u32 = 0;
            #[doc = "Last DCDC change is still not done. New value should not be written to TRG register to trigger a new change of DCDC voltage."]
            pub const UPDATING: u32 = 0x01;
        }
    }
    #[doc = "This value is only valid when LP_EN_1P0 =1"]
    pub mod VDD1P0CTRL_LP_TRG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value comes from the smaller one between TRG_SW_0 and TRG_SW_1. This bit only controls 1P0. 1P8 is always controlled by VDD1P8CTRL_TRG"]
    pub mod LP_EN_1P0 {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DCDC 1P0 works in run mode. Its output voltage is controlled by VDD1P0CTRL_TRG."]
            pub const VDD1P0_NORMAL_MODE: u32 = 0;
            #[doc = "DCDC 1P0 works in low power mode. Its output voltage is controlled by VDD1P0CTRL_LP_TRG and its output current is less than 50mA."]
            pub const VDD1P0_LP_MODE: u32 = 0x01;
        }
    }
}
#[doc = "FILTER CNT"]
pub mod FILTER_CNT {
    #[doc = "FILTER_CNT_CFG"]
    pub mod FILTER_CNT_CFG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff_ffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "TRG_0 Authentication Control"]
pub mod TRG_0_AUTHEN {
    #[doc = "Allow user mode write"]
    pub mod TZ_USER {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TRG_0 registers can only be written in privilege mode."]
            pub const PRIV_ONLY: u32 = 0;
            #[doc = "TRG_0 registers can be written either in privilege mode or user mode."]
            pub const PRIV_OR_USER: u32 = 0x01;
        }
    }
    #[doc = "Allow non-secure mode access"]
    pub mod TZ_NS {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TRG_0 registers can only be written in secure mode."]
            pub const SECURE_ONLY: u32 = 0;
            #[doc = "TRG_0 registers can be written either in secure mode or non-secure mode."]
            pub const SEC_OR_NON_SEC: u32 = 0x01;
        }
    }
    #[doc = "Lock TZ_NS and TZ_USER"]
    pub mod LOCK_TZ {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TZ_NS and TZ_USER value can be changed."]
            pub const CHANGE: u32 = 0;
            #[doc = "LOCK_TZ, TZ_NS and TZ_USER value cannot be changed."]
            pub const NO_CHANGE: u32 = 0x01;
        }
    }
    #[doc = "White list lock"]
    pub mod LOCK_LIST {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "WHITE_LIST value can be changed."]
            pub const CHANGE: u32 = 0;
            #[doc = "LOCK_LIST and WHITE_LIST value cannot be changed."]
            pub const NO_CHANGE: u32 = 0x01;
        }
    }
    #[doc = "Domain ID white list"]
    pub mod WHITE_LIST {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Core with domain ID=0 can write TRG_0 registers."]
            pub const DOMAIN0: u32 = 0x01;
            #[doc = "Core with domain ID=1 can write TRG_0 registers."]
            pub const DOMAIN1: u32 = 0x02;
            #[doc = "Core with domain ID=2 can write TRG_0 registers."]
            pub const DOMAIN2: u32 = 0x04;
            #[doc = "Core with domain ID=3 can write TRG_0 registers."]
            pub const DOMAIN3: u32 = 0x08;
            #[doc = "Core with domain ID=4 can write TRG_0 registers."]
            pub const DOMAIN4: u32 = 0x10;
            #[doc = "Core with domain ID=5 can write TRG_0 registers."]
            pub const DOMAIN5: u32 = 0x20;
            #[doc = "Core with domain ID=6 can write TRG_0 registers."]
            pub const DOMAIN6: u32 = 0x40;
            #[doc = "Core with domain ID=7 can write TRG_0 registers."]
            pub const DOMAIN7: u32 = 0x80;
            #[doc = "Core with domain ID=8 can write TRG_0 registers."]
            pub const DOMAIN8: u32 = 0x0100;
            #[doc = "Core with domain ID=9 can write TRG_0 registers."]
            pub const DOMAIN9: u32 = 0x0200;
            #[doc = "Core with domain ID=10 can write TRG_0 registers."]
            pub const DOMAIN10: u32 = 0x0400;
            #[doc = "Core with domain ID=11 can write TRG_0 registers."]
            pub const DOMAIN11: u32 = 0x0800;
            #[doc = "Core with domain ID=12 can write TRG_0 registers."]
            pub const DOMAIN12: u32 = 0x1000;
            #[doc = "Core with domain ID=13 can write TRG_0 registers."]
            pub const DOMAIN13: u32 = 0x2000;
            #[doc = "Core with domain ID=14 can write TRG_0 registers."]
            pub const DOMAIN14: u32 = 0x4000;
            #[doc = "Core with domain ID=15 can write TRG_0 registers."]
            pub const DOMAIN15: u32 = 0x8000;
        }
    }
}
#[doc = "Target SW Control for CORE 0"]
pub mod TRG_SW_0 {
    #[doc = "Target value of VDD1P0 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 1"]
    pub mod VDD1P0CTRL_TRG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Target value of VDD1P8 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 2"]
    pub mod VDD1P8CTRL_TRG {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value is only valid when LP_EN_1P0 =1"]
    pub mod VDD1P0CTRL_LP_TRG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "LP_EN_1P0 only controls 1P0. 1P8 is always controlled by VDD1P8CTRL_TRG"]
    pub mod LP_EN_1P0 {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Target GPC Control for CORE 0"]
pub mod TRG_GPC_0 {
    #[doc = "Target value of VDD1P0 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 1"]
    pub mod VDD1P0CTRL_TRG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Target value of VDD1P8 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 2"]
    pub mod VDD1P8CTRL_TRG {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value is only valid when LP_EN_1P0 =1"]
    pub mod VDD1P0CTRL_LP_TRG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "LP_EN_1P0 only controls 1P0. 1P8 is always controlled by VDD1P8CTRL_TRG"]
    pub mod LP_EN_1P0 {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "TRG_1 Authentication Control"]
pub mod TRG_1_AUTHEN {
    #[doc = "Allow user mode write"]
    pub mod TZ_USER {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TRG_1 registers can only be written in privilege mode."]
            pub const PRIV_ONLY: u32 = 0;
            #[doc = "TRG_1 registers can be written either in privilege mode or user mode."]
            pub const PRIV_OR_USER: u32 = 0x01;
        }
    }
    #[doc = "Allow non-secure mode access"]
    pub mod TZ_NS {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TRG_1 registers can only be written in secure mode."]
            pub const SECURE_ONLY: u32 = 0;
            #[doc = "TRG_1 registers can be written either in secure mode or non-secure mode."]
            pub const SEC_OR_NON_SEC: u32 = 0x01;
        }
    }
    #[doc = "Lock TZ_NS and TZ_USER"]
    pub mod LOCK_TZ {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "TZ_NS and TZ_USER value can be changed."]
            pub const CHANGE: u32 = 0;
            #[doc = "LOCK_TZ, TZ_NS and TZ_USER value cannot be changed."]
            pub const NO_CHANGE: u32 = 0x01;
        }
    }
    #[doc = "White list lock"]
    pub mod LOCK_LIST {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "WHITE_LIST value can be changed."]
            pub const CHANGE: u32 = 0;
            #[doc = "LOCK_LIST and WHITE_LIST value cannot be changed."]
            pub const NO_CHANGE: u32 = 0x01;
        }
    }
    #[doc = "Domain ID white list"]
    pub mod WHITE_LIST {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Core with domain ID=0 can write TRG_1 registers."]
            pub const DOMAIN0: u32 = 0x01;
            #[doc = "Core with domain ID=1 can write TRG_1 registers."]
            pub const DOMAIN1: u32 = 0x02;
            #[doc = "Core with domain ID=2 can write TRG_1 registers."]
            pub const DOMAIN2: u32 = 0x04;
            #[doc = "Core with domain ID=3 can write TRG_1 registers."]
            pub const DOMAIN3: u32 = 0x08;
            #[doc = "Core with domain ID=4 can write TRG_1 registers."]
            pub const DOMAIN4: u32 = 0x10;
            #[doc = "Core with domain ID=5 can write TRG_1 registers."]
            pub const DOMAIN5: u32 = 0x20;
            #[doc = "Core with domain ID=6 can write TRG_1 registers."]
            pub const DOMAIN6: u32 = 0x40;
            #[doc = "Core with domain ID=7 can write TRG_1 registers."]
            pub const DOMAIN7: u32 = 0x80;
            #[doc = "Core with domain ID=8 can write TRG_1 registers."]
            pub const DOMAIN8: u32 = 0x0100;
            #[doc = "Core with domain ID=9 can write TRG_1 registers."]
            pub const DOMAIN9: u32 = 0x0200;
            #[doc = "Core with domain ID=10 can write TRG_1 registers."]
            pub const DOMAIN10: u32 = 0x0400;
            #[doc = "Core with domain ID=11 can write TRG_1 registers."]
            pub const DOMAIN11: u32 = 0x0800;
            #[doc = "Core with domain ID=12 can write TRG_1 registers."]
            pub const DOMAIN12: u32 = 0x1000;
            #[doc = "Core with domain ID=13 can write TRG_1 registers."]
            pub const DOMAIN13: u32 = 0x2000;
            #[doc = "Core with domain ID=14 can write TRG_1 registers."]
            pub const DOMAIN14: u32 = 0x4000;
            #[doc = "Core with domain ID=15 can write TRG_1 registers."]
            pub const DOMAIN15: u32 = 0x8000;
        }
    }
}
#[doc = "Target SW Control for CORE 1"]
pub mod TRG_SW_1 {
    #[doc = "Target value of VDD1P0 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 1"]
    pub mod VDD1P0CTRL_TRG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Target value of VDD1P8 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 2"]
    pub mod VDD1P8CTRL_TRG {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value is only valid when LP_EN_1P0 =1"]
    pub mod VDD1P0CTRL_LP_TRG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "LP_EN_1P0 only controls 1P0. 1P8 is always controlled by VDD1P8CTRL_TRG"]
    pub mod LP_EN_1P0 {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Target GPC Control for CORE 1"]
pub mod TRG_GPC_1 {
    #[doc = "Target value of VDD1P0 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 1"]
    pub mod VDD1P0CTRL_TRG {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Target value of VDD1P8 in run mode, 25mV each step from 0x00 to 0x1F: 0x1F: 2"]
    pub mod VDD1P8CTRL_TRG {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "This value is only valid when LP_EN_1P0 =1"]
    pub mod VDD1P0CTRL_LP_TRG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x1f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "LP_EN_1P0 only controls 1P0. 1P8 is always controlled by VDD1P8CTRL_TRG"]
    pub mod LP_EN_1P0 {
        pub const offset: u32 = 31;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}