mtb_pac_psoc6_01 0.1.1

Peripheral Access Crate for Infineon CY8C6xx6 and CY8C6xx7 PSOCâ„¢ 6 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
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
/*
(c) (2016-2024), Cypress Semiconductor Corporation (an Infineon company)

    or an affiliate of Cypress Semiconductor Corporation.



    SPDX-License-Identifier: Apache-2.0



    Licensed under the Apache License, Version 2.0 (the "License");

    you may not use this file except in compliance with the License.

    You may obtain a copy of the License at



      http://www.apache.org/licenses/LICENSE-2.0



    Unless required by applicable law or agreed to in writing, software

    distributed under the License is distributed on an "AS IS" BASIS,

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

    See the License for the specific language governing permissions and

    limitations under the License.
*/
// Generated from SVD 1.0, with svd2pac 0.6.0 on Tue, 27 May 2025 19:21:54 +0000

#![allow(clippy::identity_op)]
#![allow(clippy::module_inception)]
#![allow(clippy::derivable_impls)]
#[allow(unused_imports)]
use crate::common::sealed;
#[allow(unused_imports)]
use crate::common::*;
#[doc = r"SRSS Core Registers"]
unsafe impl ::core::marker::Send for super::Srss {}
unsafe impl ::core::marker::Sync for super::Srss {}
impl super::Srss {
    #[allow(unused)]
    #[inline(always)]
    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
        self.ptr
    }

    #[doc = "Power Mode Control"]
    #[inline(always)]
    pub const fn pwr_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(0usize),
            )
        }
    }

    #[doc = "HIBERNATE Mode Register"]
    #[inline(always)]
    pub const fn pwr_hibernate(
        &self,
    ) -> &'static crate::common::Reg<self::PwrHibernate_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrHibernate_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(4usize),
            )
        }
    }

    #[doc = "Low Voltage Detector (LVD) Configuration Register"]
    #[inline(always)]
    pub const fn pwr_lvd_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrLvdCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrLvdCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(8usize),
            )
        }
    }

    #[doc = "Buck Control Register"]
    #[inline(always)]
    pub const fn pwr_buck_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrBuckCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrBuckCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(20usize),
            )
        }
    }

    #[doc = "Buck Control Register 2"]
    #[inline(always)]
    pub const fn pwr_buck_ctl2(
        &self,
    ) -> &'static crate::common::Reg<self::PwrBuckCtl2_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrBuckCtl2_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(24usize),
            )
        }
    }

    #[doc = "Low Voltage Detector (LVD) Status Register"]
    #[inline(always)]
    pub const fn pwr_lvd_status(
        &self,
    ) -> &'static crate::common::Reg<self::PwrLvdStatus_SPEC, crate::common::R> {
        unsafe {
            crate::common::Reg::<self::PwrLvdStatus_SPEC, crate::common::R>::from_ptr(
                self._svd2pac_as_ptr().add(28usize),
            )
        }
    }

    #[doc = "HIBERNATE Data Register"]
    #[inline(always)]
    pub const fn pwr_hib_data(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::PwrHibData_SPEC, crate::common::RW>,
        16,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x80usize))
        }
    }

    #[doc = "Watchdog Counter Control Register"]
    #[inline(always)]
    pub const fn wdt_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::WdtCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::WdtCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(384usize),
            )
        }
    }

    #[doc = "Watchdog Counter Count Register"]
    #[inline(always)]
    pub const fn wdt_cnt(
        &self,
    ) -> &'static crate::common::Reg<self::WdtCnt_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::WdtCnt_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(388usize),
            )
        }
    }

    #[doc = "Watchdog Counter Match Register"]
    #[inline(always)]
    pub const fn wdt_match(
        &self,
    ) -> &'static crate::common::Reg<self::WdtMatch_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::WdtMatch_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(392usize),
            )
        }
    }

    #[doc = "Clock DSI Select Register"]
    #[inline(always)]
    pub const fn clk_dsi_select(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::ClkDsiSelect_SPEC, crate::common::RW>,
        16,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x300usize))
        }
    }

    #[doc = "Clock Path Select Register"]
    #[inline(always)]
    pub const fn clk_path_select(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::ClkPathSelect_SPEC, crate::common::RW>,
        16,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x340usize))
        }
    }

    #[doc = "Clock Root Select Register"]
    #[inline(always)]
    pub const fn clk_root_select(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::ClkRootSelect_SPEC, crate::common::RW>,
        16,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x380usize))
        }
    }

    #[doc = "Clock selection register"]
    #[inline(always)]
    pub const fn clk_select(
        &self,
    ) -> &'static crate::common::Reg<self::ClkSelect_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkSelect_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1280usize),
            )
        }
    }

    #[doc = "Timer Clock Control Register"]
    #[inline(always)]
    pub const fn clk_timer_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTimerCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTimerCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1284usize),
            )
        }
    }

    #[doc = "ILO Configuration"]
    #[inline(always)]
    pub const fn clk_ilo_config(
        &self,
    ) -> &'static crate::common::Reg<self::ClkIloConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkIloConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1292usize),
            )
        }
    }

    #[doc = "IMO Configuration"]
    #[inline(always)]
    pub const fn clk_imo_config(
        &self,
    ) -> &'static crate::common::Reg<self::ClkImoConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkImoConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1296usize),
            )
        }
    }

    #[doc = "Fast Clock Output Select Register"]
    #[inline(always)]
    pub const fn clk_output_fast(
        &self,
    ) -> &'static crate::common::Reg<self::ClkOutputFast_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkOutputFast_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1300usize),
            )
        }
    }

    #[doc = "Slow Clock Output Select Register"]
    #[inline(always)]
    pub const fn clk_output_slow(
        &self,
    ) -> &'static crate::common::Reg<self::ClkOutputSlow_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkOutputSlow_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1304usize),
            )
        }
    }

    #[doc = "Clock Calibration Counter 1"]
    #[inline(always)]
    pub const fn clk_cal_cnt1(
        &self,
    ) -> &'static crate::common::Reg<self::ClkCalCnt1_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkCalCnt1_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1308usize),
            )
        }
    }

    #[doc = "Clock Calibration Counter 2"]
    #[inline(always)]
    pub const fn clk_cal_cnt2(
        &self,
    ) -> &'static crate::common::Reg<self::ClkCalCnt2_SPEC, crate::common::R> {
        unsafe {
            crate::common::Reg::<self::ClkCalCnt2_SPEC, crate::common::R>::from_ptr(
                self._svd2pac_as_ptr().add(1312usize),
            )
        }
    }

    #[doc = "ECO Configuration Register"]
    #[inline(always)]
    pub const fn clk_eco_config(
        &self,
    ) -> &'static crate::common::Reg<self::ClkEcoConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkEcoConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1324usize),
            )
        }
    }

    #[doc = "ECO Status Register"]
    #[inline(always)]
    pub const fn clk_eco_status(
        &self,
    ) -> &'static crate::common::Reg<self::ClkEcoStatus_SPEC, crate::common::R> {
        unsafe {
            crate::common::Reg::<self::ClkEcoStatus_SPEC, crate::common::R>::from_ptr(
                self._svd2pac_as_ptr().add(1328usize),
            )
        }
    }

    #[doc = "Precision ILO Configuration Register"]
    #[inline(always)]
    pub const fn clk_pilo_config(
        &self,
    ) -> &'static crate::common::Reg<self::ClkPiloConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkPiloConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1340usize),
            )
        }
    }

    #[doc = "FLL Configuration Register"]
    #[inline(always)]
    pub const fn clk_fll_config(
        &self,
    ) -> &'static crate::common::Reg<self::ClkFllConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkFllConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1408usize),
            )
        }
    }

    #[doc = "FLL Configuration Register 2"]
    #[inline(always)]
    pub const fn clk_fll_config2(
        &self,
    ) -> &'static crate::common::Reg<self::ClkFllConfig2_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkFllConfig2_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1412usize),
            )
        }
    }

    #[doc = "FLL Configuration Register 3"]
    #[inline(always)]
    pub const fn clk_fll_config3(
        &self,
    ) -> &'static crate::common::Reg<self::ClkFllConfig3_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkFllConfig3_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1416usize),
            )
        }
    }

    #[doc = "FLL Configuration Register 4"]
    #[inline(always)]
    pub const fn clk_fll_config4(
        &self,
    ) -> &'static crate::common::Reg<self::ClkFllConfig4_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkFllConfig4_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1420usize),
            )
        }
    }

    #[doc = "FLL Status Register"]
    #[inline(always)]
    pub const fn clk_fll_status(
        &self,
    ) -> &'static crate::common::Reg<self::ClkFllStatus_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkFllStatus_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1424usize),
            )
        }
    }

    #[doc = "PLL Configuration Register"]
    #[inline(always)]
    pub const fn clk_pll_config(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::ClkPllConfig_SPEC, crate::common::RW>,
        15,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x600usize))
        }
    }

    #[doc = "PLL Status Register"]
    #[inline(always)]
    pub const fn clk_pll_status(
        &self,
    ) -> &'static crate::common::ClusterRegisterArray<
        crate::common::Reg<self::ClkPllStatus_SPEC, crate::common::RW>,
        15,
        0x4,
    > {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x640usize))
        }
    }

    #[doc = "SRSS Interrupt Register"]
    #[inline(always)]
    pub const fn srss_intr(
        &self,
    ) -> &'static crate::common::Reg<self::SrssIntr_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::SrssIntr_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1792usize),
            )
        }
    }

    #[doc = "SRSS Interrupt Set Register"]
    #[inline(always)]
    pub const fn srss_intr_set(
        &self,
    ) -> &'static crate::common::Reg<self::SrssIntrSet_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::SrssIntrSet_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1796usize),
            )
        }
    }

    #[doc = "SRSS Interrupt Mask Register"]
    #[inline(always)]
    pub const fn srss_intr_mask(
        &self,
    ) -> &'static crate::common::Reg<self::SrssIntrMask_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::SrssIntrMask_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1800usize),
            )
        }
    }

    #[doc = "SRSS Interrupt Masked Register"]
    #[inline(always)]
    pub const fn srss_intr_masked(
        &self,
    ) -> &'static crate::common::Reg<self::SrssIntrMasked_SPEC, crate::common::R> {
        unsafe {
            crate::common::Reg::<self::SrssIntrMasked_SPEC, crate::common::R>::from_ptr(
                self._svd2pac_as_ptr().add(1804usize),
            )
        }
    }

    #[doc = "SRSS Interrupt Configuration Register"]
    #[inline(always)]
    pub const fn srss_intr_cfg(
        &self,
    ) -> &'static crate::common::Reg<self::SrssIntrCfg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::SrssIntrCfg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1808usize),
            )
        }
    }

    #[doc = "Reset Cause Observation Register"]
    #[inline(always)]
    pub const fn res_cause(
        &self,
    ) -> &'static crate::common::Reg<self::ResCause_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ResCause_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(2048usize),
            )
        }
    }

    #[doc = "Reset Cause Observation Register 2"]
    #[inline(always)]
    pub const fn res_cause2(
        &self,
    ) -> &'static crate::common::Reg<self::ResCause2_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ResCause2_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(2052usize),
            )
        }
    }

    #[doc = "Reference Trim Register"]
    #[inline(always)]
    pub const fn pwr_trim_ref_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrTrimRefCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrTrimRefCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32512usize),
            )
        }
    }

    #[doc = "BOD/OVP Trim Register"]
    #[inline(always)]
    pub const fn pwr_trim_bodovp_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrTrimBodovpCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrTrimBodovpCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32516usize),
            )
        }
    }

    #[doc = "CCO Trim Register"]
    #[inline(always)]
    pub const fn clk_trim_cco_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimCcoCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimCcoCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32520usize),
            )
        }
    }

    #[doc = "CCO Trim Register 2"]
    #[inline(always)]
    pub const fn clk_trim_cco_ctl2(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimCcoCtl2_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimCcoCtl2_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32524usize),
            )
        }
    }

    #[doc = "Wakeup Trim Register"]
    #[inline(always)]
    pub const fn pwr_trim_wake_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrTrimWakeCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrTrimWakeCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32560usize),
            )
        }
    }

    #[doc = "LVD Trim Register"]
    #[inline(always)]
    pub const fn pwr_trim_lvd_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrTrimLvdCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrTrimLvdCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65296usize),
            )
        }
    }

    #[doc = "ILO Trim Register"]
    #[inline(always)]
    pub const fn clk_trim_ilo_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimIloCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimIloCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65304usize),
            )
        }
    }

    #[doc = "Power System Trim Register"]
    #[inline(always)]
    pub const fn pwr_trim_pwrsys_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::PwrTrimPwrsysCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::PwrTrimPwrsysCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65308usize),
            )
        }
    }

    #[doc = "ECO Trim Register"]
    #[inline(always)]
    pub const fn clk_trim_eco_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimEcoCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimEcoCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65312usize),
            )
        }
    }

    #[doc = "PILO Trim Register"]
    #[inline(always)]
    pub const fn clk_trim_pilo_ctl(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimPiloCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimPiloCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65316usize),
            )
        }
    }

    #[doc = "PILO Trim Register 2"]
    #[inline(always)]
    pub const fn clk_trim_pilo_ctl2(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimPiloCtl2_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimPiloCtl2_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65320usize),
            )
        }
    }

    #[doc = "PILO Trim Register 3"]
    #[inline(always)]
    pub const fn clk_trim_pilo_ctl3(
        &self,
    ) -> &'static crate::common::Reg<self::ClkTrimPiloCtl3_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::ClkTrimPiloCtl3_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(65324usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Timer"]
    #[inline(always)]
    pub fn mcwdt_struct(
        self,
    ) -> &'static crate::common::ClusterRegisterArray<crate::srss::_McwdtStruct, 2, 0x40> {
        unsafe {
            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x200usize))
        }
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrCtl_SPEC;
impl crate::sealed::RegSpec for PwrCtl_SPEC {
    type DataType = u32;
}

#[doc = "Power Mode Control"]
pub type PwrCtl = crate::RegValueT<PwrCtl_SPEC>;

impl PwrCtl {
    #[doc = "Current power mode of the device.  Note that this field cannot be read in all power modes on actual silicon."]
    #[inline(always)]
    pub fn power_mode(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3,
        1,
        0,
        pwr_ctl::PowerMode,
        pwr_ctl::PowerMode,
        PwrCtl_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3,
            1,
            0,
            pwr_ctl::PowerMode,
            pwr_ctl::PowerMode,
            PwrCtl_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Indicates whether a debug session is active (CDBGPWRUPREQ signal is 1)"]
    #[inline(always)]
    pub fn debug_session(
        self,
    ) -> crate::common::RegisterField<
        4,
        0x1,
        1,
        0,
        pwr_ctl::DebugSession,
        pwr_ctl::DebugSession,
        PwrCtl_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            4,
            0x1,
            1,
            0,
            pwr_ctl::DebugSession,
            pwr_ctl::DebugSession,
            PwrCtl_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Indicates whether certain low power functions are ready.  The low current circuits take longer to startup after XRES/POR/BOD/HIBERNATE wakeup than the normal mode circuits.  HIBERNATE mode may be entered regardless of this bit.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: If a low power circuit operation is requested, it will stay in its normal operating mode until it is ready.  If DEEPSLEEP is requested by all processors WFI/WFE, the device will instead enter SLEEP.  When low power circuits are ready, device will automatically enter the originally requested mode.\n1: Normal operation.  DEEPSLEEP and low power circuits operate as requested in other registers."]
    #[inline(always)]
    pub fn lpm_ready(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, PwrCtl_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5, 1, 0, PwrCtl_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }

    #[doc = "Control the power mode of the reference current generator.  The value in this register is ignored and normal mode is used until LPM_READY==1.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Current reference generator operates in normal mode.  It works for vddd ramp rates of 100mV/us or less.\n1: Current reference generator operates in low power mode.  Response time is reduced to save current, and it works for vddd ramp rates of 10mV/us or less."]
    #[inline(always)]
    pub fn iref_lpmode(
        self,
    ) -> crate::common::RegisterFieldBool<18, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<18, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Indicates that the voltage reference buffer is ready.  Due to synchronization delays, it may take two IMO clock cycles for hardware to clear this bit after asserting VREFBUF_DIS=1."]
    #[inline(always)]
    pub fn vrefbuf_ok(
        self,
    ) -> crate::common::RegisterFieldBool<19, 1, 0, PwrCtl_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<19, 1, 0, PwrCtl_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }

    #[doc = "Disable the DeepSleep regulator.  This is only legal when the on-chip buck regulator supplies vccd, but there is no hardware protection for this case.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: DeepSleep Regulator is on.\n1: DeepSleep Regulator is off."]
    #[inline(always)]
    pub fn dpslp_reg_dis(
        self,
    ) -> crate::common::RegisterFieldBool<20, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<20, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Disable the Retention regulator.  This is only legal when the on-chip buck regulator supplies vccd, but there is no hardware protection for this case.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Retention Regulator is on.\n1: Retention Regulator is off."]
    #[inline(always)]
    pub fn ret_reg_dis(
        self,
    ) -> crate::common::RegisterFieldBool<21, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<21, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Disable the Nwell regulator.  This is only legal when the on-chip buck regulator supplies vccd, but there is no hardware protection for this case.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Nwell Regulator is on.\n1: Nwell Regulator is off."]
    #[inline(always)]
    pub fn nwell_reg_dis(
        self,
    ) -> crate::common::RegisterFieldBool<22, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<22, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Disable the linear Core Regulator.  This is only legal when the on-chip buck regulator supplies vccd, but there is no hardware protection for this case.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Linear regulator is on.\n1: Linear regulator is off."]
    #[inline(always)]
    pub fn linreg_dis(
        self,
    ) -> crate::common::RegisterFieldBool<23, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<23, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Control the power mode of the Linear Regulator.  The value in this register is ignored and normal mode is used until LPM_READY==1.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Linear Regulator operates in normal mode.  Internal current consumption is 50uA and load current capability is 50mA to 300mA, depending on the number of regulator modules present in the product.\n1: Linear Regulator operates in low power mode.  Internal current consumption is 5uA and load current capability is 25mA.  Firmware must ensure the current is kept within the limit."]
    #[inline(always)]
    pub fn linreg_lpmode(
        self,
    ) -> crate::common::RegisterFieldBool<24, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<24, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Control the power mode of the POR/BOD circuits.  The value in this register is ignored and normal mode is used until LPM_READY==1.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: POR/BOD circuits operate in normal mode.  They work for vddd ramp rates of 100mV/us or less.\n1: POR/BOD circuits operate in low power mode.  Response time is reduced to save current, and they work for vddd ramp rates of 10mV/us or less."]
    #[inline(always)]
    pub fn porbod_lpmode(
        self,
    ) -> crate::common::RegisterFieldBool<25, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<25, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Control the power mode of the Bandgap Voltage and Current References.  This applies to voltage and current generation and is different than the reference voltage buffer.  The value in this register is ignored and normal mode is used until LPM_READY==1.  When lower power mode is used, the Active Reference circuit can be disabled to reduce current.  Firmware is responsible to ensure ACT_REF_OK==1 before changing back to normal mode.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Active Bandgap Voltage and Current Reference operates in normal mode.  They work for vddd ramp rates of 100mV/us or less.\n1: Active Bandgap Voltage and Current Reference operates in low power mode.  Power supply rejection is reduced to save current, and they work for vddd ramp rates of 10mV/us or less.  The Active Reference may be disabled using ACT_REF_DIS=0."]
    #[inline(always)]
    pub fn bgref_lpmode(
        self,
    ) -> crate::common::RegisterFieldBool<26, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<26, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Bypass level shifter inside the PLL.  \n0: Do not bypass the level shifter.  This setting is ok for all operational modes and vccd target voltage.\n1: Bypass the level shifter.  This may reduce jitter on the PLL output clock, but can only be used when vccd is targeted to 1.1V nominal.  Otherwise, it can result in clock degradation and static current."]
    #[inline(always)]
    pub fn pll_ls_bypass(
        self,
    ) -> crate::common::RegisterFieldBool<27, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<27, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Control the power mode of the 800mV voltage reference buffer.  The value in this register is ignored and normal mode is used until LPM_READY==1.\n0: Voltage Reference Buffer operates in normal mode.  They work for vddd ramp rates of 100mV/us or less.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n1: Voltage Reference Buffer operates in low power mode.  Power supply rejection is reduced to save current, and they work for vddd ramp rates of 10mV/us or less."]
    #[inline(always)]
    pub fn vrefbuf_lpmode(
        self,
    ) -> crate::common::RegisterFieldBool<28, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<28, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Disable the 800mV voltage reference buffer.  Firmware should only disable the buffer when there is no connected circuit that is using it.  SRSS circuits that require it are the PLL and ECO.  A particular product may have circuits outside the SRSS that use the buffer.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn vrefbuf_dis(
        self,
    ) -> crate::common::RegisterFieldBool<29, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<29, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Disables the Active Reference.  Firmware must ensure that LPM_READY==1 and BGREF_LPMODE==1 for at least 1us before disabling the Active Reference.  When enabling the Active Reference, use ACT_REF_OK indicator to know when it is ready.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: Active Reference is enabled\n1: Active Reference is disabled"]
    #[inline(always)]
    pub fn act_ref_dis(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, PwrCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30, 1, 0, PwrCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Indicates that the normal mode of the Active Reference is ready."]
    #[inline(always)]
    pub fn act_ref_ok(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, PwrCtl_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<31, 1, 0, PwrCtl_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }
}
impl ::core::default::Default for PwrCtl {
    #[inline(always)]
    fn default() -> PwrCtl {
        <crate::RegValueT<PwrCtl_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod pwr_ctl {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct PowerMode_SPEC;
    pub type PowerMode = crate::EnumBitfieldStruct<u8, PowerMode_SPEC>;
    impl PowerMode {
        #[doc = "System is resetting."]
        pub const RESET: Self = Self::new(0);

        #[doc = "At least one CPU is running."]
        pub const ACTIVE: Self = Self::new(1);

        #[doc = "No CPUs are running.  Peripherals may be running."]
        pub const SLEEP: Self = Self::new(2);

        #[doc = "Main high-frequency clock is off; low speed clocks are available.  Communication interface clocks may be present."]
        pub const DEEPSLEEP: Self = Self::new(3);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct DebugSession_SPEC;
    pub type DebugSession = crate::EnumBitfieldStruct<u8, DebugSession_SPEC>;
    impl DebugSession {
        #[doc = "No debug session active"]
        pub const NO_SESSION: Self = Self::new(0);

        #[doc = "Debug session is active.  Power modes behave differently to keep the debug session active."]
        pub const SESSION_ACTIVE: Self = Self::new(1);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrHibernate_SPEC;
impl crate::sealed::RegSpec for PwrHibernate_SPEC {
    type DataType = u32;
}

#[doc = "HIBERNATE Mode Register"]
pub type PwrHibernate = crate::RegValueT<PwrHibernate_SPEC>;

impl PwrHibernate {
    #[doc = "Contains a 8-bit token that is retained through a HIBERNATE/WAKEUP sequence that can be used by firmware to differentiate WAKEUP from a general RESET event.  Note that waking up from HIBERNATE using XRES will reset this register."]
    #[inline(always)]
    pub fn token(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, PwrHibernate_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "This byte must be set to 0x3A for FREEZE or HIBERNATE fields to operate.  Any other value in this register will cause FREEZE/HIBERNATE to have no effect, except as noted in the FREEZE description."]
    #[inline(always)]
    pub fn unlock(
        self,
    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, PwrHibernate_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0xff,1,0,u8,u8,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Firmware sets this bit to freeze the configuration, mode and state of all GPIOs and SIOs in the system.  When entering HIBERNATE mode, the first write instructs DEEPSLEEP peripherals that they cannot ignore the upcoming freeze command.  This occurs even in the illegal condition where UNLOCK is not set.  If UNLOCK and HIBERNATE are properly set, the IOs actually freeze on the second write."]
    #[inline(always)]
    pub fn freeze(
        self,
    ) -> crate::common::RegisterFieldBool<17, 1, 0, PwrHibernate_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<17,1,0,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "When set, HIBERNATE will wakeup for a RTC interrupt"]
    #[inline(always)]
    pub fn mask_hibalarm(
        self,
    ) -> crate::common::RegisterFieldBool<18, 1, 0, PwrHibernate_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<18,1,0,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "When set, HIBERNATE will wakeup if WDT matches"]
    #[inline(always)]
    pub fn mask_hibwdt(
        self,
    ) -> crate::common::RegisterFieldBool<19, 1, 0, PwrHibernate_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<19,1,0,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Each bit sets the active polarity of the corresponding wakeup pin.\n0: Pin input of 0 will wakeup the part from HIBERNATE\n1: Pin input of 1 will wakeup the part from HIBERNATE"]
    #[inline(always)]
    pub fn polarity_hibpin(
        self,
    ) -> crate::common::RegisterField<20, 0xf, 1, 0, u8, u8, PwrHibernate_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<20,0xf,1,0,u8,u8,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "When set, HIBERNATE will wakeup if the corresponding pin input matches the POLARITY_HIBPIN setting.  Each bit corresponds to one of the wakeup pins."]
    #[inline(always)]
    pub fn mask_hibpin(
        self,
    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, PwrHibernate_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<24,0xf,1,0,u8,u8,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Hibernate disable bit.\n0: Normal operation, HIBERNATE works as described\n1: Further writes to this register are ignored\nNote: This bit is a write-once bit until the next reset.  Avoid changing any other bits in this register while disabling HIBERNATE mode.  Also, it is recommended to clear the UNLOCK code, if it was previously written.."]
    #[inline(always)]
    pub fn hibernate_disable(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, PwrHibernate_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30,1,0,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Firmware sets this bit to enter HIBERNATE mode.  The system will enter HIBERNATE mode immediately after writing to this bit and will wakeup only in response to XRES or WAKEUP event.  Both UNLOCK and FREEZE must have been set correctly in a previous write operations.  Otherwise, it will not enter HIBERNATE.  External supplies must have been stable for 250us before entering HIBERNATE mode."]
    #[inline(always)]
    pub fn hibernate(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, PwrHibernate_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,PwrHibernate_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrHibernate {
    #[inline(always)]
    fn default() -> PwrHibernate {
        <crate::RegValueT<PwrHibernate_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrLvdCtl_SPEC;
impl crate::sealed::RegSpec for PwrLvdCtl_SPEC {
    type DataType = u32;
}

#[doc = "Low Voltage Detector (LVD) Configuration Register"]
pub type PwrLvdCtl = crate::RegValueT<PwrLvdCtl_SPEC>;

impl PwrLvdCtl {
    #[doc = "Threshold selection for HVLVD1.  Disable the LVD (HVLVD1_EN=0) before changing the threshold.\n0: rise=1.225V (nom), fall=1.2V (nom)\n1: rise=1.425V (nom), fall=1.4V (nom)\n2: rise=1.625V (nom), fall=1.6V (nom)\n3: rise=1.825V (nom), fall=1.8V (nom)\n4: rise=2.025V (nom), fall=2V (nom)\n5: rise=2.125V (nom), fall=2.1V (nom)\n6: rise=2.225V (nom), fall=2.2V (nom)\n7: rise=2.325V (nom), fall=2.3V (nom)\n8: rise=2.425V (nom), fall=2.4V (nom)\n9: rise=2.525V (nom), fall=2.5V (nom)\n10: rise=2.625V (nom), fall=2.6V (nom)\n11: rise=2.725V (nom), fall=2.7V (nom)\n12: rise=2.825V (nom), fall=2.8V (nom)\n13: rise=2.925V (nom), fall=2.9V (nom)\n14: rise=3.025V (nom), fall=3.0V (nom)\n15: rise=3.125V (nom), fall=3.1V (nom)"]
    #[inline(always)]
    pub fn hvlvd1_tripsel(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, PwrLvdCtl_SPEC, crate::common::RW> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,PwrLvdCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Source selection for HVLVD1"]
    #[inline(always)]
    pub fn hvlvd1_srcsel(
        self,
    ) -> crate::common::RegisterField<
        4,
        0x7,
        1,
        0,
        pwr_lvd_ctl::Hvlvd1Srcsel,
        pwr_lvd_ctl::Hvlvd1Srcsel,
        PwrLvdCtl_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            4,
            0x7,
            1,
            0,
            pwr_lvd_ctl::Hvlvd1Srcsel,
            pwr_lvd_ctl::Hvlvd1Srcsel,
            PwrLvdCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Enable HVLVD1 voltage monitor.  When the LVD is enabled, it takes 20us for it to settle.  There is no hardware stabilization counter, and it may falsely trigger during settling.  It is recommended that firmware keep the interrupt masked for at least 8us, write a 1\'b1 to the corresponding SRSS_INTR field to any falsely pended interrupt, and then optionally unmask the interrupt.  After enabling, it is further recommended to read the related PWR_LVD_STATUS field, since the interrupt only triggers on edges.  This bit is cleared (LVD is disabled) when entering DEEPSLEEP to prevent false interrupts during wakeup."]
    #[inline(always)]
    pub fn hvlvd1_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, PwrLvdCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,PwrLvdCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrLvdCtl {
    #[inline(always)]
    fn default() -> PwrLvdCtl {
        <crate::RegValueT<PwrLvdCtl_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod pwr_lvd_ctl {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct Hvlvd1Srcsel_SPEC;
    pub type Hvlvd1Srcsel = crate::EnumBitfieldStruct<u8, Hvlvd1Srcsel_SPEC>;
    impl Hvlvd1Srcsel {
        #[doc = "Select VDDD"]
        pub const VDDD: Self = Self::new(0);

        #[doc = "Select AMUXBUSA (VDDD branch)"]
        pub const AMUXBUSA: Self = Self::new(1);

        #[doc = "N/A"]
        pub const RSVD: Self = Self::new(2);

        #[doc = "N/A"]
        pub const VDDIO: Self = Self::new(3);

        #[doc = "Select AMUXBUSB (VDDD branch)"]
        pub const AMUXBUSB: Self = Self::new(4);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrBuckCtl_SPEC;
impl crate::sealed::RegSpec for PwrBuckCtl_SPEC {
    type DataType = u32;
}

#[doc = "Buck Control Register"]
pub type PwrBuckCtl = crate::RegValueT<PwrBuckCtl_SPEC>;

impl PwrBuckCtl {
    #[doc = "N/A"]
    #[inline(always)]
    pub fn buck_out1_sel(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, PwrBuckCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,PwrBuckCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn buck_en(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, PwrBuckCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30,1,0,PwrBuckCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable for vccbuck1 output.  The value in this register is ignored unless PWR_BUCK_CTL.BUCK_EN==1.    This register is only reset by XRES/POR/BOD/HIBERNATE.  The regulator takes up to 600us to charge the external capacitor.  If there is additional load current while charging, this will increase the startup time.  The TRM specifies the required sequence when transitioning vccd from the LDO to SIMO Buck output #1."]
    #[inline(always)]
    pub fn buck_out1_en(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, PwrBuckCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,PwrBuckCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrBuckCtl {
    #[inline(always)]
    fn default() -> PwrBuckCtl {
        <crate::RegValueT<PwrBuckCtl_SPEC> as RegisterValue<_>>::new(5)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrBuckCtl2_SPEC;
impl crate::sealed::RegSpec for PwrBuckCtl2_SPEC {
    type DataType = u32;
}

#[doc = "Buck Control Register 2"]
pub type PwrBuckCtl2 = crate::RegValueT<PwrBuckCtl2_SPEC>;

impl PwrBuckCtl2 {
    #[doc = "Voltage output selection for vccbuck2 output.  When increasing the voltage, it can take up to 200us for the output voltage to settle.  When decreasing the voltage, the settling time depends on the load current.\n0: 1.15V\n1: 1.20V\n2: 1.25V\n3: 1.30V\n4: 1.35V\n5: 1.40V\n6: 1.45V\n7: 1.50V"]
    #[inline(always)]
    pub fn buck_out2_sel(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, PwrBuckCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,PwrBuckCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Hardware control for vccbuck2 output.  When this bit is set, the value in BUCK_OUT2_EN is ignored and a hardware signal is used instead.  If the product has supporting hardware, it can directly control the enable signal for vccbuck2.  The same charging time in BUCK_OUT2_EN applies."]
    #[inline(always)]
    pub fn buck_out2_hw_sel(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, PwrBuckCtl2_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30,1,0,PwrBuckCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable for vccbuck2 output.  The value in this register is ignored unless PWR_BUCK_CTL.BUCK_EN==1.  The regulator takes up to 600us to charge the external capacitor.  If there is additional load current while charging, this will increase the startup time."]
    #[inline(always)]
    pub fn buck_out2_en(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, PwrBuckCtl2_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,PwrBuckCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrBuckCtl2 {
    #[inline(always)]
    fn default() -> PwrBuckCtl2 {
        <crate::RegValueT<PwrBuckCtl2_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrLvdStatus_SPEC;
impl crate::sealed::RegSpec for PwrLvdStatus_SPEC {
    type DataType = u32;
}

#[doc = "Low Voltage Detector (LVD) Status Register"]
pub type PwrLvdStatus = crate::RegValueT<PwrLvdStatus_SPEC>;

impl PwrLvdStatus {
    #[doc = "HVLVD1 output.\n0: below voltage threshold\n1: above voltage threshold"]
    #[inline(always)]
    pub fn hvlvd1_ok(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, PwrLvdStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,PwrLvdStatus_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrLvdStatus {
    #[inline(always)]
    fn default() -> PwrLvdStatus {
        <crate::RegValueT<PwrLvdStatus_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrHibData_SPEC;
impl crate::sealed::RegSpec for PwrHibData_SPEC {
    type DataType = u32;
}

#[doc = "HIBERNATE Data Register"]
pub type PwrHibData = crate::RegValueT<PwrHibData_SPEC>;

impl PwrHibData {
    #[doc = "Additional data that is retained through a HIBERNATE/WAKEUP sequence that can be used by firmware for any application-specific purpose.  Note that waking up from HIBERNATE using XRES will reset this register."]
    #[inline(always)]
    pub fn hib_data(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        PwrHibData_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            PwrHibData_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for PwrHibData {
    #[inline(always)]
    fn default() -> PwrHibData {
        <crate::RegValueT<PwrHibData_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct WdtCtl_SPEC;
impl crate::sealed::RegSpec for WdtCtl_SPEC {
    type DataType = u32;
}

#[doc = "Watchdog Counter Control Register"]
pub type WdtCtl = crate::RegValueT<WdtCtl_SPEC>;

impl WdtCtl {
    #[doc = "Enable this watchdog timer.  This field is retained during Deep Sleep and Hibernate modes. Even though the default value is 1, in most cases the Cortex-M0+ executing the SROM code will change the value of this bit to 0. So effectively the user code starts with the WDT disabled."]
    #[inline(always)]
    pub fn wdt_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, WdtCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0, 1, 0, WdtCtl_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Prohibits writing to WDT_*, CLK_ILO_CONFIG, CLK_SELECT.LFCLK_SEL, and CLK_TRIM_ILO_CTL registers when not equal 0.  Requires at least two different writes to unlock.  A change in WDT_LOCK takes effect beginning with the next write cycle.\nNote that this field is 2 bits to force multiple writes only.  It represents only a single write protect signal protecting all those registers at the same time.  WDT will lock on any reset.  This field is not retained during Deep Sleep or Hibernate mode, so the WDT will be locked after wakeup from these modes."]
    #[inline(always)]
    pub fn wdt_lock(
        self,
    ) -> crate::common::RegisterField<
        30,
        0x3,
        1,
        0,
        wdt_ctl::WdtLock,
        wdt_ctl::WdtLock,
        WdtCtl_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            30,
            0x3,
            1,
            0,
            wdt_ctl::WdtLock,
            wdt_ctl::WdtLock,
            WdtCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for WdtCtl {
    #[inline(always)]
    fn default() -> WdtCtl {
        <crate::RegValueT<WdtCtl_SPEC> as RegisterValue<_>>::new(3221225473)
    }
}
pub mod wdt_ctl {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct WdtLock_SPEC;
    pub type WdtLock = crate::EnumBitfieldStruct<u8, WdtLock_SPEC>;
    impl WdtLock {
        #[doc = "No effect"]
        pub const NO_CHG: Self = Self::new(0);

        #[doc = "Clears bit 0"]
        pub const CLR_0: Self = Self::new(1);

        #[doc = "Clears bit 1"]
        pub const CLR_1: Self = Self::new(2);

        #[doc = "Sets both bits 0 and 1"]
        pub const SET_01: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct WdtCnt_SPEC;
impl crate::sealed::RegSpec for WdtCnt_SPEC {
    type DataType = u32;
}

#[doc = "Watchdog Counter Count Register"]
pub type WdtCnt = crate::RegValueT<WdtCnt_SPEC>;

impl WdtCnt {
    #[doc = "Current value of WDT Counter.  The write feature of this register is for verification purposes, has no synchronization, and can only be applied when the WDT is off.  When writing, the value is updated immediately in the WDT counter, but it will read back as the old value until this register resynchronizes just after the negative edge of ILO.  Writes will be ignored if they occur when the WDT is enabled."]
    #[inline(always)]
    pub fn counter(
        self,
    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, WdtCnt_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,WdtCnt_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for WdtCnt {
    #[inline(always)]
    fn default() -> WdtCnt {
        <crate::RegValueT<WdtCnt_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct WdtMatch_SPEC;
impl crate::sealed::RegSpec for WdtMatch_SPEC {
    type DataType = u32;
}

#[doc = "Watchdog Counter Match Register"]
pub type WdtMatch = crate::RegValueT<WdtMatch_SPEC>;

impl WdtMatch {
    #[doc = "Match value for Watchdog counter.  Every time WDT_COUNTER reaches MATCH an interrupt is generated.  Two unserviced interrupts will lead to a system reset (i.e. at the third match)."]
    #[inline(always)]
    pub fn r#match(
        self,
    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, WdtMatch_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,WdtMatch_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The number of MSB bits of the watchdog timer that are NOT checked against MATCH.  This value provides control over the time-to-reset of the watchdog (which happens after 3 successive matches).  Up to 12 MSB can be ignored.  Settings >12 behave like a setting of 12."]
    #[inline(always)]
    pub fn ignore_bits(
        self,
    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, WdtMatch_SPEC, crate::common::RW> {
        crate::common::RegisterField::<16,0xf,1,0,u8,u8,WdtMatch_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for WdtMatch {
    #[inline(always)]
    fn default() -> WdtMatch {
        <crate::RegValueT<WdtMatch_SPEC> as RegisterValue<_>>::new(4096)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkDsiSelect_SPEC;
impl crate::sealed::RegSpec for ClkDsiSelect_SPEC {
    type DataType = u32;
}

#[doc = "Clock DSI Select Register"]
pub type ClkDsiSelect = crate::RegValueT<ClkDsiSelect_SPEC>;

impl ClkDsiSelect {
    #[doc = "Selects a DSI source or low frequency clock for use in a clock path.  The output of this mux can be selected for clock PATH<i> using CLK_PATH_SELECT register.  Using the output of this mux as HFCLK source will result in undefined behavior.  It can be used to clocks to DSI or to the reference inputs of FLL/PLL, subject to the frequency limits of those circuits.  This mux is not glitch free, so do not change the selection while it is an actively selected clock."]
    #[inline(always)]
    pub fn dsi_mux(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x1f,
        1,
        0,
        clk_dsi_select::DsiMux,
        clk_dsi_select::DsiMux,
        ClkDsiSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x1f,
            1,
            0,
            clk_dsi_select::DsiMux,
            clk_dsi_select::DsiMux,
            ClkDsiSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkDsiSelect {
    #[inline(always)]
    fn default() -> ClkDsiSelect {
        <crate::RegValueT<ClkDsiSelect_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_dsi_select {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct DsiMux_SPEC;
    pub type DsiMux = crate::EnumBitfieldStruct<u8, DsiMux_SPEC>;
    impl DsiMux {
        #[doc = "DSI0 - dsi_out\\[0\\]"]
        pub const DSI_OUT_0: Self = Self::new(0);

        #[doc = "DSI1 - dsi_out\\[1\\]"]
        pub const DSI_OUT_1: Self = Self::new(1);

        #[doc = "DSI2 - dsi_out\\[2\\]"]
        pub const DSI_OUT_2: Self = Self::new(2);

        #[doc = "DSI3 - dsi_out\\[3\\]"]
        pub const DSI_OUT_3: Self = Self::new(3);

        #[doc = "DSI4 - dsi_out\\[4\\]"]
        pub const DSI_OUT_4: Self = Self::new(4);

        #[doc = "DSI5 - dsi_out\\[5\\]"]
        pub const DSI_OUT_5: Self = Self::new(5);

        #[doc = "DSI6 - dsi_out\\[6\\]"]
        pub const DSI_OUT_6: Self = Self::new(6);

        #[doc = "DSI7 - dsi_out\\[7\\]"]
        pub const DSI_OUT_7: Self = Self::new(7);

        #[doc = "DSI8 - dsi_out\\[8\\]"]
        pub const DSI_OUT_8: Self = Self::new(8);

        #[doc = "DSI9 - dsi_out\\[9\\]"]
        pub const DSI_OUT_9: Self = Self::new(9);

        #[doc = "DSI10 - dsi_out\\[10\\]"]
        pub const DSI_OUT_10: Self = Self::new(10);

        #[doc = "DSI11 - dsi_out\\[11\\]"]
        pub const DSI_OUT_11: Self = Self::new(11);

        #[doc = "DSI12 - dsi_out\\[12\\]"]
        pub const DSI_OUT_12: Self = Self::new(12);

        #[doc = "DSI13 - dsi_out\\[13\\]"]
        pub const DSI_OUT_13: Self = Self::new(13);

        #[doc = "DSI14 - dsi_out\\[14\\]"]
        pub const DSI_OUT_14: Self = Self::new(14);

        #[doc = "DSI15 - dsi_out\\[15\\]"]
        pub const DSI_OUT_15: Self = Self::new(15);

        #[doc = "ILO - Internal Low-speed Oscillator"]
        pub const ILO: Self = Self::new(16);

        #[doc = "WCO - Watch-Crystal Oscillator"]
        pub const WCO: Self = Self::new(17);

        #[doc = "ALTLF - Alternate Low-Frequency Clock"]
        pub const ALTLF: Self = Self::new(18);

        #[doc = "PILO - Precision Internal Low-speed Oscillator"]
        pub const PILO: Self = Self::new(19);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkPathSelect_SPEC;
impl crate::sealed::RegSpec for ClkPathSelect_SPEC {
    type DataType = u32;
}

#[doc = "Clock Path Select Register"]
pub type ClkPathSelect = crate::RegValueT<ClkPathSelect_SPEC>;

impl ClkPathSelect {
    #[doc = "Selects a source for clock PATH<i>.  Note that not all products support all clock sources.  Selecting a clock source that is not supported will result in undefined behavior."]
    #[inline(always)]
    pub fn path_mux(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x7,
        1,
        0,
        clk_path_select::PathMux,
        clk_path_select::PathMux,
        ClkPathSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x7,
            1,
            0,
            clk_path_select::PathMux,
            clk_path_select::PathMux,
            ClkPathSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkPathSelect {
    #[inline(always)]
    fn default() -> ClkPathSelect {
        <crate::RegValueT<ClkPathSelect_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_path_select {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct PathMux_SPEC;
    pub type PathMux = crate::EnumBitfieldStruct<u8, PathMux_SPEC>;
    impl PathMux {
        #[doc = "IMO - Internal R/C Oscillator"]
        pub const IMO: Self = Self::new(0);

        #[doc = "EXTCLK - External Clock Pin"]
        pub const EXTCLK: Self = Self::new(1);

        #[doc = "ECO - External-Crystal Oscillator"]
        pub const ECO: Self = Self::new(2);

        #[doc = "ALTHF - Alternate High-Frequency clock input (product-specific clock)"]
        pub const ALTHF: Self = Self::new(3);

        #[doc = "DSI_MUX - Output of DSI mux for this path.  Using a DSI source directly as root of HFCLK will result in undefined behavior."]
        pub const DSI_MUX: Self = Self::new(4);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkRootSelect_SPEC;
impl crate::sealed::RegSpec for ClkRootSelect_SPEC {
    type DataType = u32;
}

#[doc = "Clock Root Select Register"]
pub type ClkRootSelect = crate::RegValueT<ClkRootSelect_SPEC>;

impl ClkRootSelect {
    #[doc = "Selects a clock path as the root of HFCLK<k> and for SRSS DSI input <k>.  Use CLK_PATH_SELECT\\[i\\] to configure the desired path.  Some paths may have FLL or PLL available (product-specific), and the control and bypass mux selections of these are in other registers.  Configure the FLL using CLK_FLL_CONFIG register.  Configure a PLL using the related CLK_PLL_CONFIG\\[k\\] register.  Note that not all products support all clock sources.  Selecting a clock source that is not supported will result in undefined behavior."]
    #[inline(always)]
    pub fn root_mux(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xf,
        1,
        0,
        clk_root_select::RootMux,
        clk_root_select::RootMux,
        ClkRootSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xf,
            1,
            0,
            clk_root_select::RootMux,
            clk_root_select::RootMux,
            ClkRootSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Selects predivider value for this clock root and DSI input."]
    #[inline(always)]
    pub fn root_div(
        self,
    ) -> crate::common::RegisterField<
        4,
        0x3,
        1,
        0,
        clk_root_select::RootDiv,
        clk_root_select::RootDiv,
        ClkRootSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            4,
            0x3,
            1,
            0,
            clk_root_select::RootDiv,
            clk_root_select::RootDiv,
            ClkRootSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Enable for this clock root.  All clock roots default to disabled (ENABLE==0) except HFCLK0, which cannot be disabled."]
    #[inline(always)]
    pub fn enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkRootSelect_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkRootSelect_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkRootSelect {
    #[inline(always)]
    fn default() -> ClkRootSelect {
        <crate::RegValueT<ClkRootSelect_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_root_select {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct RootMux_SPEC;
    pub type RootMux = crate::EnumBitfieldStruct<u8, RootMux_SPEC>;
    impl RootMux {
        #[doc = "Select PATH0 (can be configured for FLL)"]
        pub const PATH_0: Self = Self::new(0);

        #[doc = "Select PATH1 (can be configured for PLL0, if available in the product)"]
        pub const PATH_1: Self = Self::new(1);

        #[doc = "Select PATH2 (can be configured for PLL1, if available in the product)"]
        pub const PATH_2: Self = Self::new(2);

        #[doc = "Select PATH3 (can be configured for PLL2, if available in the product)"]
        pub const PATH_3: Self = Self::new(3);

        #[doc = "Select PATH4 (can be configured for PLL3, if available in the product)"]
        pub const PATH_4: Self = Self::new(4);

        #[doc = "Select PATH5 (can be configured for PLL4, if available in the product)"]
        pub const PATH_5: Self = Self::new(5);

        #[doc = "Select PATH6 (can be configured for PLL5, if available in the product)"]
        pub const PATH_6: Self = Self::new(6);

        #[doc = "Select PATH7 (can be configured for PLL6, if available in the product)"]
        pub const PATH_7: Self = Self::new(7);

        #[doc = "Select PATH8 (can be configured for PLL7, if available in the product)"]
        pub const PATH_8: Self = Self::new(8);

        #[doc = "Select PATH9 (can be configured for PLL8, if available in the product)"]
        pub const PATH_9: Self = Self::new(9);

        #[doc = "Select PATH10 (can be configured for PLL9, if available in the product)"]
        pub const PATH_10: Self = Self::new(10);

        #[doc = "Select PATH11 (can be configured for PLL10, if available in the product)"]
        pub const PATH_11: Self = Self::new(11);

        #[doc = "Select PATH12 (can be configured for PLL11, if available in the product)"]
        pub const PATH_12: Self = Self::new(12);

        #[doc = "Select PATH13 (can be configured for PLL12, if available in the product)"]
        pub const PATH_13: Self = Self::new(13);

        #[doc = "Select PATH14 (can be configured for PLL13, if available in the product)"]
        pub const PATH_14: Self = Self::new(14);

        #[doc = "Select PATH15 (can be configured for PLL14, if available in the product)"]
        pub const PATH_15: Self = Self::new(15);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct RootDiv_SPEC;
    pub type RootDiv = crate::EnumBitfieldStruct<u8, RootDiv_SPEC>;
    impl RootDiv {
        #[doc = "Transparent mode, feed through selected clock source w/o dividing."]
        pub const NO_DIV: Self = Self::new(0);

        #[doc = "Divide selected clock source by 2"]
        pub const DIV_BY_2: Self = Self::new(1);

        #[doc = "Divide selected clock source by 4"]
        pub const DIV_BY_4: Self = Self::new(2);

        #[doc = "Divide selected clock source by 8"]
        pub const DIV_BY_8: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkSelect_SPEC;
impl crate::sealed::RegSpec for ClkSelect_SPEC {
    type DataType = u32;
}

#[doc = "Clock selection register"]
pub type ClkSelect = crate::RegValueT<ClkSelect_SPEC>;

impl ClkSelect {
    #[doc = "Select source for LFCLK.  Note that not all products support all clock sources.  Selecting a clock source that is not supported will result in undefined behavior.  Writes to this field are ignored unless the WDT is unlocked using WDT_LOCK register."]
    #[inline(always)]
    pub fn lfclk_sel(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3,
        1,
        0,
        clk_select::LfclkSel,
        clk_select::LfclkSel,
        ClkSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x3,
            1,
            0,
            clk_select::LfclkSel,
            clk_select::LfclkSel,
            ClkSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Selects clock PATH<k>, where k=PUMP_SEL.  The output of this mux goes to the PUMP_DIV to make PUMPCLK  Each product has a specific number of available clock paths.  Selecting a path that is not implemented on a product will result in undefined behavior.  Note that this is not a glitch free mux."]
    #[inline(always)]
    pub fn pump_sel(
        self,
    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, ClkSelect_SPEC, crate::common::RW> {
        crate::common::RegisterField::<8,0xf,1,0,u8,u8,ClkSelect_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Division ratio for PUMPCLK.  Uses selected PUMP_SEL clock as the source."]
    #[inline(always)]
    pub fn pump_div(
        self,
    ) -> crate::common::RegisterField<
        12,
        0x7,
        1,
        0,
        clk_select::PumpDiv,
        clk_select::PumpDiv,
        ClkSelect_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            12,
            0x7,
            1,
            0,
            clk_select::PumpDiv,
            clk_select::PumpDiv,
            ClkSelect_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Enable the pump clock.  PUMP_ENABLE and the PUMP_SEL mux are not glitch-free to minimize side-effects, avoid changing the PUMP_SEL and PUMP_DIV while changing PUMP_ENABLE.  To change the settings, do the following: \n1) If the pump clock is enabled, write PUMP_ENABLE=0 without changing PUMP_SEL and PUMP_DIV.  \n2) Change PUMP_SEL and PUMP_DIV to desired settings with PUMP_ENABLE=0.  \n3) Write PUMP_ENABLE=1 without changing PUMP_SEL and PUMP_DIV."]
    #[inline(always)]
    pub fn pump_enable(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, ClkSelect_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<15,1,0,ClkSelect_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkSelect {
    #[inline(always)]
    fn default() -> ClkSelect {
        <crate::RegValueT<ClkSelect_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_select {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct LfclkSel_SPEC;
    pub type LfclkSel = crate::EnumBitfieldStruct<u8, LfclkSel_SPEC>;
    impl LfclkSel {
        #[doc = "ILO - Internal Low-speed Oscillator"]
        pub const ILO: Self = Self::new(0);

        #[doc = "WCO - Watch-Crystal Oscillator.  Requires Backup domain to be present and properly configured (including external watch crystal, if used)."]
        pub const WCO: Self = Self::new(1);

        #[doc = "ALTLF - Alternate Low-Frequency Clock.  Capability is product-specific"]
        pub const ALTLF: Self = Self::new(2);

        #[doc = "PILO - Precision ILO. If present, it works in DEEPSLEEP and higher modes.  Does not work in HIBERNATE mode."]
        pub const PILO: Self = Self::new(3);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct PumpDiv_SPEC;
    pub type PumpDiv = crate::EnumBitfieldStruct<u8, PumpDiv_SPEC>;
    impl PumpDiv {
        #[doc = "Transparent mode, feed through selected clock source w/o dividing."]
        pub const NO_DIV: Self = Self::new(0);

        #[doc = "Divide selected clock source by 2"]
        pub const DIV_BY_2: Self = Self::new(1);

        #[doc = "Divide selected clock source by 4"]
        pub const DIV_BY_4: Self = Self::new(2);

        #[doc = "Divide selected clock source by 8"]
        pub const DIV_BY_8: Self = Self::new(3);

        #[doc = "Divide selected clock source by 16"]
        pub const DIV_BY_16: Self = Self::new(4);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTimerCtl_SPEC;
impl crate::sealed::RegSpec for ClkTimerCtl_SPEC {
    type DataType = u32;
}

#[doc = "Timer Clock Control Register"]
pub type ClkTimerCtl = crate::RegValueT<ClkTimerCtl_SPEC>;

impl ClkTimerCtl {
    #[doc = "Select source for TIMERCLK.  The output of this mux can be further divided using TIMER_DIV."]
    #[inline(always)]
    pub fn timer_sel(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x1,
        1,
        0,
        clk_timer_ctl::TimerSel,
        clk_timer_ctl::TimerSel,
        ClkTimerCtl_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x1,
            1,
            0,
            clk_timer_ctl::TimerSel,
            clk_timer_ctl::TimerSel,
            ClkTimerCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Predivider used when HF0_DIV is selected in TIMER_SEL.  If HFCLK0 frequency is less than 100MHz and has approximately 50 percent duty cycle, then no division is required (NO_DIV).  Otherwise, select a divide ratio of 2, 4, or 8 before selected HF0_DIV as the timer clock."]
    #[inline(always)]
    pub fn timer_hf0_div(
        self,
    ) -> crate::common::RegisterField<
        8,
        0x3,
        1,
        0,
        clk_timer_ctl::TimerHf0Div,
        clk_timer_ctl::TimerHf0Div,
        ClkTimerCtl_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            8,
            0x3,
            1,
            0,
            clk_timer_ctl::TimerHf0Div,
            clk_timer_ctl::TimerHf0Div,
            ClkTimerCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Divide selected timer clock source by (1+TIMER_DIV).  The output of this divider is TIMERCLK  Allows for integer divisions in the range \\[1, 256\\].  Do not change this setting while the timer is enabled."]
    #[inline(always)]
    pub fn timer_div(
        self,
    ) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, ClkTimerCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0xff,1,0,u8,u8,ClkTimerCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable for TIMERCLK.\n0: TIMERCLK is off\n1: TIMERCLK is enabled"]
    #[inline(always)]
    pub fn enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkTimerCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkTimerCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTimerCtl {
    #[inline(always)]
    fn default() -> ClkTimerCtl {
        <crate::RegValueT<ClkTimerCtl_SPEC> as RegisterValue<_>>::new(458752)
    }
}
pub mod clk_timer_ctl {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct TimerSel_SPEC;
    pub type TimerSel = crate::EnumBitfieldStruct<u8, TimerSel_SPEC>;
    impl TimerSel {
        #[doc = "IMO - Internal Main Oscillator"]
        pub const IMO: Self = Self::new(0);

        #[doc = "Select the output of the predivider configured by TIMER_HF0_DIV."]
        pub const HF_0_DIV: Self = Self::new(1);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct TimerHf0Div_SPEC;
    pub type TimerHf0Div = crate::EnumBitfieldStruct<u8, TimerHf0Div_SPEC>;
    impl TimerHf0Div {
        #[doc = "Transparent mode, feed through selected clock source w/o dividing or correcting duty cycle."]
        pub const NO_DIV: Self = Self::new(0);

        #[doc = "Divide HFCLK0 by 2."]
        pub const DIV_BY_2: Self = Self::new(1);

        #[doc = "Divide HFCLK0 by 4."]
        pub const DIV_BY_4: Self = Self::new(2);

        #[doc = "Divide HFCLK0 by 8."]
        pub const DIV_BY_8: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkIloConfig_SPEC;
impl crate::sealed::RegSpec for ClkIloConfig_SPEC {
    type DataType = u32;
}

#[doc = "ILO Configuration"]
pub type ClkIloConfig = crate::RegValueT<ClkIloConfig_SPEC>;

impl ClkIloConfig {
    #[doc = "If backup domain is present on this product, this register indicates that ILO should stay enabled for use by backup domain during XRES, HIBERNATE mode, and through power-related resets like BOD on VDDD/VCCD.  Writes to this field are ignored unless the WDT is unlocked using WDT_LOCK register.\n0: ILO turns off at XRES/BOD event or HIBERNATE entry.\n1: ILO remains on if backup domain is present and powered even for XRES/BOD or HIBERNATE entry."]
    #[inline(always)]
    pub fn ilo_backup(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, ClkIloConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,ClkIloConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Master enable for ILO.  Writes to this field are ignored unless the WDT is unlocked using WDT_LOCK register.  After enabling, it takes at most two cycles to reach the accuracy spec."]
    #[inline(always)]
    pub fn enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkIloConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkIloConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkIloConfig {
    #[inline(always)]
    fn default() -> ClkIloConfig {
        <crate::RegValueT<ClkIloConfig_SPEC> as RegisterValue<_>>::new(2147483648)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkImoConfig_SPEC;
impl crate::sealed::RegSpec for ClkImoConfig_SPEC {
    type DataType = u32;
}

#[doc = "IMO Configuration"]
pub type ClkImoConfig = crate::RegValueT<ClkImoConfig_SPEC>;

impl ClkImoConfig {
    #[doc = "Master enable for IMO oscillator.  This bit must be high at all times for all functions to work properly.  Hardware will automatically disable the IMO during HIBERNATE and XRES.  It will automatically disable during DEEPSLEEP if DPSLP_ENABLE==0."]
    #[inline(always)]
    pub fn enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkImoConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkImoConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkImoConfig {
    #[inline(always)]
    fn default() -> ClkImoConfig {
        <crate::RegValueT<ClkImoConfig_SPEC> as RegisterValue<_>>::new(2147483648)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkOutputFast_SPEC;
impl crate::sealed::RegSpec for ClkOutputFast_SPEC {
    type DataType = u32;
}

#[doc = "Fast Clock Output Select Register"]
pub type ClkOutputFast = crate::RegValueT<ClkOutputFast_SPEC>;

impl ClkOutputFast {
    #[doc = "Select signal for fast clock output #0"]
    #[inline(always)]
    pub fn fast_sel0(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xf,
        1,
        0,
        clk_output_fast::FastSel0,
        clk_output_fast::FastSel0,
        ClkOutputFast_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xf,
            1,
            0,
            clk_output_fast::FastSel0,
            clk_output_fast::FastSel0,
            ClkOutputFast_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Selects a clock path to use in fast clock output #0 logic.  0: FLL output\n1-15: PLL output on path1-path15 (if available)"]
    #[inline(always)]
    pub fn path_sel0(
        self,
    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, ClkOutputFast_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0xf,1,0,u8,u8,ClkOutputFast_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Selects a HFCLK tree for use in fast clock output #0"]
    #[inline(always)]
    pub fn hfclk_sel0(
        self,
    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, ClkOutputFast_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0xf,1,0,u8,u8,ClkOutputFast_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Select signal for fast clock output #1"]
    #[inline(always)]
    pub fn fast_sel1(
        self,
    ) -> crate::common::RegisterField<
        16,
        0xf,
        1,
        0,
        clk_output_fast::FastSel1,
        clk_output_fast::FastSel1,
        ClkOutputFast_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            16,
            0xf,
            1,
            0,
            clk_output_fast::FastSel1,
            clk_output_fast::FastSel1,
            ClkOutputFast_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Selects a clock path to use in fast clock output #1 logic.  0: FLL output\n1-15: PLL output on path1-path15 (if available)"]
    #[inline(always)]
    pub fn path_sel1(
        self,
    ) -> crate::common::RegisterField<20, 0xf, 1, 0, u8, u8, ClkOutputFast_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<20,0xf,1,0,u8,u8,ClkOutputFast_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Selects a HFCLK tree for use in fast clock output #1 logic"]
    #[inline(always)]
    pub fn hfclk_sel1(
        self,
    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, ClkOutputFast_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<24,0xf,1,0,u8,u8,ClkOutputFast_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkOutputFast {
    #[inline(always)]
    fn default() -> ClkOutputFast {
        <crate::RegValueT<ClkOutputFast_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_output_fast {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct FastSel0_SPEC;
    pub type FastSel0 = crate::EnumBitfieldStruct<u8, FastSel0_SPEC>;
    impl FastSel0 {
        #[doc = "Disabled - output is 0.  For power savings, clocks are blocked before entering any muxes, including PATH_SEL0 and HFCLK_SEL0."]
        pub const NC: Self = Self::new(0);

        #[doc = "External Crystal Oscillator (ECO)"]
        pub const ECO: Self = Self::new(1);

        #[doc = "External clock input (EXTCLK)"]
        pub const EXTCLK: Self = Self::new(2);

        #[doc = "Alternate High-Frequency (ALTHF) clock input to SRSS"]
        pub const ALTHF: Self = Self::new(3);

        #[doc = "Timer clock.  It is grouped with the fast clocks because it may be a gated version of a fast clock, and therefore may have a short high pulse."]
        pub const TIMERCLK: Self = Self::new(4);

        #[doc = "Selects the clock path chosen by PATH_SEL0 field"]
        pub const PATH_SEL_0: Self = Self::new(5);

        #[doc = "Selects the output of the HFCLK_SEL0 mux"]
        pub const HFCLK_SEL_0: Self = Self::new(6);

        #[doc = "Selects the output of CLK_OUTPUT_SLOW.SLOW_SEL0"]
        pub const SLOW_SEL_0: Self = Self::new(7);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct FastSel1_SPEC;
    pub type FastSel1 = crate::EnumBitfieldStruct<u8, FastSel1_SPEC>;
    impl FastSel1 {
        #[doc = "Disabled - output is 0.  For power savings, clocks are blocked before entering any muxes, including PATH_SEL1 and HFCLK_SEL1."]
        pub const NC: Self = Self::new(0);

        #[doc = "External Crystal Oscillator (ECO)"]
        pub const ECO: Self = Self::new(1);

        #[doc = "External clock input (EXTCLK)"]
        pub const EXTCLK: Self = Self::new(2);

        #[doc = "Alternate High-Frequency (ALTHF) clock input to SRSS"]
        pub const ALTHF: Self = Self::new(3);

        #[doc = "Timer clock.  It is grouped with the fast clocks because it may be a gated version of a fast clock, and therefore may have a short high pulse."]
        pub const TIMERCLK: Self = Self::new(4);

        #[doc = "Selects the clock path chosen by PATH_SEL1 field"]
        pub const PATH_SEL_1: Self = Self::new(5);

        #[doc = "Selects the output of the HFCLK_SEL1 mux"]
        pub const HFCLK_SEL_1: Self = Self::new(6);

        #[doc = "Selects the output of CLK_OUTPUT_SLOW.SLOW_SEL1"]
        pub const SLOW_SEL_1: Self = Self::new(7);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkOutputSlow_SPEC;
impl crate::sealed::RegSpec for ClkOutputSlow_SPEC {
    type DataType = u32;
}

#[doc = "Slow Clock Output Select Register"]
pub type ClkOutputSlow = crate::RegValueT<ClkOutputSlow_SPEC>;

impl ClkOutputSlow {
    #[doc = "Select signal for slow clock output #0"]
    #[inline(always)]
    pub fn slow_sel0(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xf,
        1,
        0,
        clk_output_slow::SlowSel0,
        clk_output_slow::SlowSel0,
        ClkOutputSlow_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xf,
            1,
            0,
            clk_output_slow::SlowSel0,
            clk_output_slow::SlowSel0,
            ClkOutputSlow_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Select signal for slow clock output #1"]
    #[inline(always)]
    pub fn slow_sel1(
        self,
    ) -> crate::common::RegisterField<
        4,
        0xf,
        1,
        0,
        clk_output_slow::SlowSel1,
        clk_output_slow::SlowSel1,
        ClkOutputSlow_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            4,
            0xf,
            1,
            0,
            clk_output_slow::SlowSel1,
            clk_output_slow::SlowSel1,
            ClkOutputSlow_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkOutputSlow {
    #[inline(always)]
    fn default() -> ClkOutputSlow {
        <crate::RegValueT<ClkOutputSlow_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod clk_output_slow {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct SlowSel0_SPEC;
    pub type SlowSel0 = crate::EnumBitfieldStruct<u8, SlowSel0_SPEC>;
    impl SlowSel0 {
        #[doc = "Disabled - output is 0.  For power savings, clocks are blocked before entering any muxes."]
        pub const NC: Self = Self::new(0);

        #[doc = "Internal Low Speed Oscillator (ILO)"]
        pub const ILO: Self = Self::new(1);

        #[doc = "Watch-Crystal Oscillator (WCO)"]
        pub const WCO: Self = Self::new(2);

        #[doc = "Root of the Backup domain clock tree (BAK)"]
        pub const BAK: Self = Self::new(3);

        #[doc = "Alternate low-frequency clock input to SRSS (ALTLF)"]
        pub const ALTLF: Self = Self::new(4);

        #[doc = "Root of the low-speed clock tree (LFCLK)"]
        pub const LFCLK: Self = Self::new(5);

        #[doc = "Internal Main Oscillator (IMO).  This is grouped with the slow clocks so it can be observed during DEEPSLEEP entry/exit."]
        pub const IMO: Self = Self::new(6);

        #[doc = "Sleep Controller clock (SLPCTRL).  This is grouped with the slow clocks so it can be observed during DEEPSLEEP entry/exit."]
        pub const SLPCTRL: Self = Self::new(7);

        #[doc = "Precision Internal Low Speed Oscillator (PILO)"]
        pub const PILO: Self = Self::new(8);
    }
    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct SlowSel1_SPEC;
    pub type SlowSel1 = crate::EnumBitfieldStruct<u8, SlowSel1_SPEC>;
    impl SlowSel1 {
        #[doc = "Disabled - output is 0.  For power savings, clocks are blocked before entering any muxes."]
        pub const NC: Self = Self::new(0);

        #[doc = "Internal Low Speed Oscillator (ILO)"]
        pub const ILO: Self = Self::new(1);

        #[doc = "Watch-Crystal Oscillator (WCO)"]
        pub const WCO: Self = Self::new(2);

        #[doc = "Root of the Backup domain clock tree (BAK)"]
        pub const BAK: Self = Self::new(3);

        #[doc = "Alternate low-frequency clock input to SRSS (ALTLF)"]
        pub const ALTLF: Self = Self::new(4);

        #[doc = "Root of the low-speed clock tree (LFCLK)"]
        pub const LFCLK: Self = Self::new(5);

        #[doc = "Internal Main Oscillator (IMO).  This is grouped with the slow clocks so it can be observed during DEEPSLEEP entry/exit."]
        pub const IMO: Self = Self::new(6);

        #[doc = "Sleep Controller clock (SLPCTRL).  This is grouped with the slow clocks so it can be observed during DEEPSLEEP entry/exit."]
        pub const SLPCTRL: Self = Self::new(7);

        #[doc = "Precision Internal Low Speed Oscillator (PILO)"]
        pub const PILO: Self = Self::new(8);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkCalCnt1_SPEC;
impl crate::sealed::RegSpec for ClkCalCnt1_SPEC {
    type DataType = u32;
}

#[doc = "Clock Calibration Counter 1"]
pub type ClkCalCnt1 = crate::RegValueT<ClkCalCnt1_SPEC>;

impl ClkCalCnt1 {
    #[doc = "Down-counter clocked on fast clock output #0 (see CLK_OUTPUT_FAST). This register always reads as zero.  Counting starts internally when this register is written with a nonzero value.  CAL_COUNTER_DONE goes immediately low to indicate that the counter has started and will be asserted when the counters are done.  Do not write this field unless CAL_COUNTER_DONE==1.  Both clocks must be running or the measurement will not complete.  A stalled counter can be recovered by selecting valid clocks, waiting until the measurement completes, and discarding the first result."]
    #[inline(always)]
    pub fn cal_counter1(
        self,
    ) -> crate::common::RegisterField<0, 0xffffff, 1, 0, u32, u32, ClkCalCnt1_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            0,
            0xffffff,
            1,
            0,
            u32,
            u32,
            ClkCalCnt1_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Status bit indicating that the internal counter #1 is finished counting and CLK_CAL_CNT2.COUNTER stopped counting up"]
    #[inline(always)]
    pub fn cal_counter_done(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkCalCnt1_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<31,1,0,ClkCalCnt1_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkCalCnt1 {
    #[inline(always)]
    fn default() -> ClkCalCnt1 {
        <crate::RegValueT<ClkCalCnt1_SPEC> as RegisterValue<_>>::new(2147483648)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkCalCnt2_SPEC;
impl crate::sealed::RegSpec for ClkCalCnt2_SPEC {
    type DataType = u32;
}

#[doc = "Clock Calibration Counter 2"]
pub type ClkCalCnt2 = crate::RegValueT<ClkCalCnt2_SPEC>;

impl ClkCalCnt2 {
    #[doc = "Up-counter clocked on fast clock output  #1 (see CLK_OUTPUT_FAST). When CLK_CAL_CNT1.CAL_COUNTER_DONE==1, the counter is stopped and can be read by SW.  Do not read this value unless CAL_COUNTER_DONE==1.  The expected final value is related to the ratio of clock frequencies used for the two counters and the value loaded into counter 1: CLK_CAL_CNT2.COUNTER=(F_cnt2/F_cnt1)*(CLK_CAL_CNT1.COUNTER)"]
    #[inline(always)]
    pub fn cal_counter2(
        self,
    ) -> crate::common::RegisterField<0, 0xffffff, 1, 0, u32, u32, ClkCalCnt2_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0xffffff,1,0,u32,u32,ClkCalCnt2_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkCalCnt2 {
    #[inline(always)]
    fn default() -> ClkCalCnt2 {
        <crate::RegValueT<ClkCalCnt2_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkEcoConfig_SPEC;
impl crate::sealed::RegSpec for ClkEcoConfig_SPEC {
    type DataType = u32;
}

#[doc = "ECO Configuration Register"]
pub type ClkEcoConfig = crate::RegValueT<ClkEcoConfig_SPEC>;

impl ClkEcoConfig {
    #[doc = "Automatic Gain Control (AGC) enable.  When set, the oscillation amplitude is controlled to the level selected by ECO_TRIM0.ATRIM.  When low, the amplitude is not explicitly controlled and can be as high as the vddd supply.  WARNING: use care when disabling AGC because driving a crystal beyond its rated limit can permanently damage the crystal."]
    #[inline(always)]
    pub fn agc_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, ClkEcoConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,ClkEcoConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Master enable for ECO oscillator."]
    #[inline(always)]
    pub fn eco_en(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkEcoConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkEcoConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkEcoConfig {
    #[inline(always)]
    fn default() -> ClkEcoConfig {
        <crate::RegValueT<ClkEcoConfig_SPEC> as RegisterValue<_>>::new(2)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkEcoStatus_SPEC;
impl crate::sealed::RegSpec for ClkEcoStatus_SPEC {
    type DataType = u32;
}

#[doc = "ECO Status Register"]
pub type ClkEcoStatus = crate::RegValueT<ClkEcoStatus_SPEC>;

impl ClkEcoStatus {
    #[doc = "Indicates the ECO internal oscillator circuit has sufficient amplitude.  It may not meet the PPM accuracy or duty cycle spec."]
    #[inline(always)]
    pub fn eco_ok(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, ClkEcoStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,ClkEcoStatus_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Indicates the ECO internal oscillator circuit has had enough time to fully stabilize.  This is the output of a counter since ECO was enabled, and it does not check the ECO output.  It is recommended to also confirm ECO_OK==1."]
    #[inline(always)]
    pub fn eco_ready(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, ClkEcoStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,ClkEcoStatus_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkEcoStatus {
    #[inline(always)]
    fn default() -> ClkEcoStatus {
        <crate::RegValueT<ClkEcoStatus_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkPiloConfig_SPEC;
impl crate::sealed::RegSpec for ClkPiloConfig_SPEC {
    type DataType = u32;
}

#[doc = "Precision ILO Configuration Register"]
pub type ClkPiloConfig = crate::RegValueT<ClkPiloConfig_SPEC>;

impl ClkPiloConfig {
    #[doc = "Fine frequency trim allowing +/-250ppm accuracy with periodic calibration.  The nominal step size of the LSB is 8Hz."]
    #[inline(always)]
    pub fn pilo_ffreq(
        self,
    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, ClkPiloConfig_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            ClkPiloConfig_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Enable the PILO clock output.  See PILO_EN field for required sequencing."]
    #[inline(always)]
    pub fn pilo_clk_en(
        self,
    ) -> crate::common::RegisterFieldBool<29, 1, 0, ClkPiloConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<29,1,0,ClkPiloConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Reset the PILO.  See PILO_EN field for required sequencing."]
    #[inline(always)]
    pub fn pilo_reset_n(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, ClkPiloConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30,1,0,ClkPiloConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable PILO.  When enabling PILO, set PILO_EN=1, wait 1ms, then PILO_RESET_N=1 and PILO_CLK_EN=1.  When disabling PILO, clear PILO_EN=0, PILO_RESET_N=0, and PLO_CLK_EN=0 in the same write cycle."]
    #[inline(always)]
    pub fn pilo_en(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkPiloConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkPiloConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkPiloConfig {
    #[inline(always)]
    fn default() -> ClkPiloConfig {
        <crate::RegValueT<ClkPiloConfig_SPEC> as RegisterValue<_>>::new(128)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkFllConfig_SPEC;
impl crate::sealed::RegSpec for ClkFllConfig_SPEC {
    type DataType = u32;
}

#[doc = "FLL Configuration Register"]
pub type ClkFllConfig = crate::RegValueT<ClkFllConfig_SPEC>;

impl ClkFllConfig {
    #[doc = "Multiplier to determine CCO frequency in multiples of the frequency of the selected reference clock (Fref).\n\nFfll = (FLL_MULT)  * (Fref / REFERENCE_DIV) / (OUTPUT_DIV+1)"]
    #[inline(always)]
    pub fn fll_mult(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ffff,
        1,
        0,
        u32,
        u32,
        ClkFllConfig_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x3ffff,
            1,
            0,
            u32,
            u32,
            ClkFllConfig_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Control bits for Output divider.  Set the divide value before enabling the FLL, and do not change it while FLL is enabled.\n0: no division\n1: divide by 2"]
    #[inline(always)]
    pub fn fll_output_div(
        self,
    ) -> crate::common::RegisterFieldBool<24, 1, 0, ClkFllConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<24,1,0,ClkFllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Master enable for FLL.  The FLL requires firmware sequencing when enabling, disabling, and entering/exiting DEEPSLEEP.\n\nTo enable the FLL, first enable the CCO by writing CLK_FLL_CONFIG4.CCO_ENABLE=1 and wait until CLK_FLL_STATUS.CCO_READY==1.  Next, ensure the reference clock has stabilized and CLK_FLL_CONFIG3.BYPASS_SEL=FLL_REF.  Next, write FLL_ENABLE=1 and wait until CLK_FLL_STATUS.LOCKED==1.  Finally, write CLK_FLL_CONFIG3.BYPASS_SEL=FLL_OUT to switch to the FLL output.  It takes seven reference clock cycles plus four FLL output cycles to switch to the FLL output.  Do not disable the FLL before this time completes.\n\nTo disable the FLL, write CLK_FLL_CONFIG3.BYPASS_SEL=FLL_REF and (optionally) read the same register to ensure the write completes.  Then, wait at least seven FLL reference clock cycles before disabling it with FLL_ENABLE=0.  Lastly, disable the CCO by writing CLK_FLL_CONFIG4.CCO_ENABLE=0.\n\nBefore entering DEEPSLEEP, either disable the FLL using above sequence or use the following procedure to deselect/select it before/after DEEPSLEEP.  Before entering DEEPSLEEP, write CLK_FLL_CONFIG3.BYPASS_SEL=FLL_REF to change the FLL to use its reference clock.  After DEEPSLEEP wakeup, wait until CLK_FLL_STATUS.LOCKED==1 and then write CLK_FLL_CONFIG3.BYPASS_SEL=FLL_OUT to switch to the FLL output.\n\n0: Block is powered off\n1: Block is powered on"]
    #[inline(always)]
    pub fn fll_enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkFllConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkFllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkFllConfig {
    #[inline(always)]
    fn default() -> ClkFllConfig {
        <crate::RegValueT<ClkFllConfig_SPEC> as RegisterValue<_>>::new(16777216)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkFllConfig2_SPEC;
impl crate::sealed::RegSpec for ClkFllConfig2_SPEC {
    type DataType = u32;
}

#[doc = "FLL Configuration Register 2"]
pub type ClkFllConfig2 = crate::RegValueT<ClkFllConfig2_SPEC>;

impl ClkFllConfig2 {
    #[doc = "Control bits for reference divider.  Set the divide value before enabling the FLL, and do not change it while FLL is enabled.\n0: illegal (undefined behavior)\n1: divide by 1\n...\n8191: divide by 8191"]
    #[inline(always)]
    pub fn fll_ref_div(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x1fff,
        1,
        0,
        u16,
        u16,
        ClkFllConfig2_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x1fff,
            1,
            0,
            u16,
            u16,
            ClkFllConfig2_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Lock tolerance sets the error threshold for when the FLL output is considered locked to the reference input.  A high tolerance can be used to lock more quickly or to track a less accurate source.  The tolerance should be set so that the FLL does not unlock under normal conditions.  The tolerance is the allowed difference between the count value for the ideal formula and the measured value. \n0: tolerate error of 1 count value\n1: tolerate error of 2 count values\n...\n511: tolerate error of 512 count values"]
    #[inline(always)]
    pub fn lock_tol(
        self,
    ) -> crate::common::RegisterField<
        16,
        0x1ff,
        1,
        0,
        u16,
        u16,
        ClkFllConfig2_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            16,
            0x1ff,
            1,
            0,
            u16,
            u16,
            ClkFllConfig2_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkFllConfig2 {
    #[inline(always)]
    fn default() -> ClkFllConfig2 {
        <crate::RegValueT<ClkFllConfig2_SPEC> as RegisterValue<_>>::new(131073)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkFllConfig3_SPEC;
impl crate::sealed::RegSpec for ClkFllConfig3_SPEC {
    type DataType = u32;
}

#[doc = "FLL Configuration Register 3"]
pub type ClkFllConfig3 = crate::RegValueT<ClkFllConfig3_SPEC>;

impl ClkFllConfig3 {
    #[doc = "FLL Loop Filter Gain Setting #1.  The proportional gain is the sum of FLL_LF_IGAIN and FLL_LF_PGAIN.\n0: 1/256\n1: 1/128\n2: 1/64\n3: 1/32\n4: 1/16\n5: 1/8\n6: 1/4\n7: 1/2\n8: 1.0\n9: 2.0\n10: 4.0\n11: 8.0\n>=12: illegal"]
    #[inline(always)]
    pub fn fll_lf_igain(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, ClkFllConfig3_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,ClkFllConfig3_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "FLL Loop Filter Gain Setting #2.  The proportional gain is the sum of FLL_LF_IGAIN and FLL_LF_PGAIN.\n0: 1/256\n1: 1/128\n2: 1/64\n3: 1/32\n4: 1/16\n5: 1/8\n6: 1/4\n7: 1/2\n8: 1.0\n9: 2.0\n10: 4.0\n11: 8.0\n>=12: illegal"]
    #[inline(always)]
    pub fn fll_lf_pgain(
        self,
    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, ClkFllConfig3_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0xf,1,0,u8,u8,ClkFllConfig3_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Number of undivided reference clock cycles to wait after changing the CCO trim until the loop measurement restarts.  A delay allows the CCO output to settle and gives a more accurate measurement.  The default is tuned to an 8MHz reference clock since the IMO is expected to be the most common use case.\n0: no settling time\n1: wait one reference clock cycle\n...\n8191: wait 8191 reference clock cycles"]
    #[inline(always)]
    pub fn settling_count(
        self,
    ) -> crate::common::RegisterField<
        8,
        0x1fff,
        1,
        0,
        u16,
        u16,
        ClkFllConfig3_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            8,
            0x1fff,
            1,
            0,
            u16,
            u16,
            ClkFllConfig3_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Bypass mux located just after FLL output.  See FLL_ENABLE description for instructions on how to use this field when enabling/disabling the FLL."]
    #[inline(always)]
    pub fn bypass_sel(
        self,
    ) -> crate::common::RegisterField<
        28,
        0x3,
        1,
        0,
        clk_fll_config3::BypassSel,
        clk_fll_config3::BypassSel,
        ClkFllConfig3_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            28,
            0x3,
            1,
            0,
            clk_fll_config3::BypassSel,
            clk_fll_config3::BypassSel,
            ClkFllConfig3_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkFllConfig3 {
    #[inline(always)]
    fn default() -> ClkFllConfig3 {
        <crate::RegValueT<ClkFllConfig3_SPEC> as RegisterValue<_>>::new(10240)
    }
}
pub mod clk_fll_config3 {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct BypassSel_SPEC;
    pub type BypassSel = crate::EnumBitfieldStruct<u8, BypassSel_SPEC>;
    impl BypassSel {
        #[doc = "N/A"]
        pub const AUTO: Self = Self::new(0);

        #[doc = "N/A"]
        pub const AUTO_1: Self = Self::new(1);

        #[doc = "Select FLL reference input (bypass mode).  Ignores lock indicator"]
        pub const FLL_REF: Self = Self::new(2);

        #[doc = "Select FLL output.  Ignores lock indicator."]
        pub const FLL_OUT: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkFllConfig4_SPEC;
impl crate::sealed::RegSpec for ClkFllConfig4_SPEC {
    type DataType = u32;
}

#[doc = "FLL Configuration Register 4"]
pub type ClkFllConfig4 = crate::RegValueT<ClkFllConfig4_SPEC>;

impl ClkFllConfig4 {
    #[doc = "Maximum CCO offset allowed (used to prevent FLL dynamics from selecting an CCO frequency that the logic cannot support)"]
    #[inline(always)]
    pub fn cco_limit(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, ClkFllConfig4_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,ClkFllConfig4_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Frequency range of CCO"]
    #[inline(always)]
    pub fn cco_range(
        self,
    ) -> crate::common::RegisterField<
        8,
        0x7,
        1,
        0,
        clk_fll_config4::CcoRange,
        clk_fll_config4::CcoRange,
        ClkFllConfig4_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            8,
            0x7,
            1,
            0,
            clk_fll_config4::CcoRange,
            clk_fll_config4::CcoRange,
            ClkFllConfig4_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "CCO frequency code.  This is updated by HW when the FLL is enabled.  It can be manually updated to use the CCO in an open loop configuration.  The meaning of each frequency code depends on the range."]
    #[inline(always)]
    pub fn cco_freq(
        self,
    ) -> crate::common::RegisterField<
        16,
        0x1ff,
        1,
        0,
        u16,
        u16,
        ClkFllConfig4_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            16,
            0x1ff,
            1,
            0,
            u16,
            u16,
            ClkFllConfig4_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Disable CCO frequency update by FLL hardware\n0: Hardware update of CCO settings is allowed.  Use this setting for normal FLL operation.\n1: Hardware update of CCO settings is disabled.  Use this setting for open-loop FLL operation."]
    #[inline(always)]
    pub fn cco_hw_update_dis(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, ClkFllConfig4_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<30,1,0,ClkFllConfig4_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable the CCO.  It is required to enable the CCO before using the FLL.  \n0: Block is powered off\n1: Block is powered on"]
    #[inline(always)]
    pub fn cco_enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkFllConfig4_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkFllConfig4_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkFllConfig4 {
    #[inline(always)]
    fn default() -> ClkFllConfig4 {
        <crate::RegValueT<ClkFllConfig4_SPEC> as RegisterValue<_>>::new(255)
    }
}
pub mod clk_fll_config4 {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct CcoRange_SPEC;
    pub type CcoRange = crate::EnumBitfieldStruct<u8, CcoRange_SPEC>;
    impl CcoRange {
        #[doc = "Target frequency is in range \\[48, 64) MHz"]
        pub const RANGE_0: Self = Self::new(0);

        #[doc = "Target frequency is in range \\[64, 85) MHz"]
        pub const RANGE_1: Self = Self::new(1);

        #[doc = "Target frequency is in range \\[85, 113) MHz"]
        pub const RANGE_2: Self = Self::new(2);

        #[doc = "Target frequency is in range \\[113, 150) MHz"]
        pub const RANGE_3: Self = Self::new(3);

        #[doc = "Target frequency is in range \\[150, 200\\] MHz"]
        pub const RANGE_4: Self = Self::new(4);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkFllStatus_SPEC;
impl crate::sealed::RegSpec for ClkFllStatus_SPEC {
    type DataType = u32;
}

#[doc = "FLL Status Register"]
pub type ClkFllStatus = crate::RegValueT<ClkFllStatus_SPEC>;

impl ClkFllStatus {
    #[doc = "FLL Lock Indicator.  LOCKED is high when FLL is within CLK_FLL_CONFIG2.LOCK_TOL.  If FLL is outside LOCK_TOL, LOCKED goes low.  Note that this can happen during normal operation, if FLL needs to recalculate due to a change in the reference clock, change in voltage, or change in temperature."]
    #[inline(always)]
    pub fn locked(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, ClkFllStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,ClkFllStatus_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn unlock_occurred(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, ClkFllStatus_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,ClkFllStatus_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "This indicates that the CCO is internally settled and ready to use."]
    #[inline(always)]
    pub fn cco_ready(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, ClkFllStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<2,1,0,ClkFllStatus_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkFllStatus {
    #[inline(always)]
    fn default() -> ClkFllStatus {
        <crate::RegValueT<ClkFllStatus_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkPllConfig_SPEC;
impl crate::sealed::RegSpec for ClkPllConfig_SPEC {
    type DataType = u32;
}

#[doc = "PLL Configuration Register"]
pub type ClkPllConfig = crate::RegValueT<ClkPllConfig_SPEC>;

impl ClkPllConfig {
    #[doc = "Control bits for feedback divider.  Set the divide value before enabling the PLL, and do not change it while PLL is enabled.\n0-21: illegal (undefined behavior)\n22: divide by 22\n...\n112: divide by 112\n>112: illegal (undefined behavior)"]
    #[inline(always)]
    pub fn feedback_div(
        self,
    ) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, ClkPllConfig_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7f,1,0,u8,u8,ClkPllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Control bits for reference divider.  Set the divide value before enabling the PLL, and do not change it while PLL is enabled.\n0: illegal (undefined behavior)\n1: divide by 1\n...\n20: divide by 20\nothers: illegal (undefined behavior)"]
    #[inline(always)]
    pub fn reference_div(
        self,
    ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, ClkPllConfig_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0x1f,1,0,u8,u8,ClkPllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Control bits for Output divider.  Set the divide value before enabling the PLL, and do not change it while PLL is enabled.\n0: illegal (undefined behavior)\n1: illegal (undefined behavior) \n2: divide by 2.  Suitable for direct usage as HFCLK source.\n...\n16: divide by 16.  Suitable for direct usage as HFCLK source.\n>16: illegal (undefined behavior)"]
    #[inline(always)]
    pub fn output_div(
        self,
    ) -> crate::common::RegisterField<16, 0x1f, 1, 0, u8, u8, ClkPllConfig_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0x1f,1,0,u8,u8,ClkPllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "VCO frequency range selection.  Configure this bit according to the targeted VCO frequency.  Do not change this setting while the PLL is enabled.\n0: VCO frequency is \\[200MHz, 400MHz\\]\n1: VCO frequency is \\[170MHz, 200MHz)"]
    #[inline(always)]
    pub fn pll_lf_mode(
        self,
    ) -> crate::common::RegisterFieldBool<27, 1, 0, ClkPllConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<27,1,0,ClkPllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Bypass mux located just after PLL output.  This selection is glitch-free and can be changed while the PLL is running."]
    #[inline(always)]
    pub fn bypass_sel(
        self,
    ) -> crate::common::RegisterField<
        28,
        0x3,
        1,
        0,
        clk_pll_config::BypassSel,
        clk_pll_config::BypassSel,
        ClkPllConfig_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            28,
            0x3,
            1,
            0,
            clk_pll_config::BypassSel,
            clk_pll_config::BypassSel,
            ClkPllConfig_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Master enable for PLL.  Setup FEEDBACK_DIV, REFERENCE_DIV, and OUTPUT_DIV at least one cycle before setting ENABLE=1.  To disable the PLL, first deselect it using .BYPASS_SEL=PLL_REF, wait at least six PLL clock cycles, and then disable it with .ENABLE=0.\n\nFpll = (FEEDBACK_DIV)  * (Fref / REFERENCE_DIV) / (OUTPUT_DIV)\n\n0: Block is disabled\n1: Block is enabled"]
    #[inline(always)]
    pub fn enable(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkPllConfig_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkPllConfig_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkPllConfig {
    #[inline(always)]
    fn default() -> ClkPllConfig {
        <crate::RegValueT<ClkPllConfig_SPEC> as RegisterValue<_>>::new(131350)
    }
}
pub mod clk_pll_config {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct BypassSel_SPEC;
    pub type BypassSel = crate::EnumBitfieldStruct<u8, BypassSel_SPEC>;
    impl BypassSel {
        #[doc = "Automatic using lock indicator.  When unlocked, automatically selects PLL reference input (bypass mode).  When locked, automatically selects PLL output."]
        pub const AUTO: Self = Self::new(0);

        #[doc = "Same as AUTO"]
        pub const AUTO_1: Self = Self::new(1);

        #[doc = "Select PLL reference input (bypass mode).  Ignores lock indicator"]
        pub const PLL_REF: Self = Self::new(2);

        #[doc = "Select PLL output.  Ignores lock indicator."]
        pub const PLL_OUT: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkPllStatus_SPEC;
impl crate::sealed::RegSpec for ClkPllStatus_SPEC {
    type DataType = u32;
}

#[doc = "PLL Status Register"]
pub type ClkPllStatus = crate::RegValueT<ClkPllStatus_SPEC>;

impl ClkPllStatus {
    #[doc = "PLL Lock Indicator"]
    #[inline(always)]
    pub fn locked(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, ClkPllStatus_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,ClkPllStatus_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "This bit sets whenever the PLL Lock bit goes low, and stays set until cleared by firmware."]
    #[inline(always)]
    pub fn unlock_occurred(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, ClkPllStatus_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,ClkPllStatus_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkPllStatus {
    #[inline(always)]
    fn default() -> ClkPllStatus {
        <crate::RegValueT<ClkPllStatus_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct SrssIntr_SPEC;
impl crate::sealed::RegSpec for SrssIntr_SPEC {
    type DataType = u32;
}

#[doc = "SRSS Interrupt Register"]
pub type SrssIntr = crate::RegValueT<SrssIntr_SPEC>;

impl SrssIntr {
    #[doc = "WDT Interrupt Request.  This bit is set each time WDT_COUNTR==WDT_MATCH.  W1C also feeds the watch dog.  Missing 2 interrupts in a row will generate a reset.  Due to internal synchronization, it takes 2 SYSCLK cycles to update after a W1C."]
    #[inline(always)]
    pub fn wdt_match(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, SrssIntr_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0, 1, 0, SrssIntr_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Interrupt for low voltage detector HVLVD1"]
    #[inline(always)]
    pub fn hvlvd1(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, SrssIntr_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1, 1, 0, SrssIntr_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Clock calibration counter is done.  This field is reset during DEEPSLEEP mode."]
    #[inline(always)]
    pub fn clk_cal(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, SrssIntr_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5, 1, 0, SrssIntr_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }
}
impl ::core::default::Default for SrssIntr {
    #[inline(always)]
    fn default() -> SrssIntr {
        <crate::RegValueT<SrssIntr_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct SrssIntrSet_SPEC;
impl crate::sealed::RegSpec for SrssIntrSet_SPEC {
    type DataType = u32;
}

#[doc = "SRSS Interrupt Set Register"]
pub type SrssIntrSet = crate::RegValueT<SrssIntrSet_SPEC>;

impl SrssIntrSet {
    #[doc = "Set interrupt for low voltage detector WDT_MATCH"]
    #[inline(always)]
    pub fn wdt_match(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, SrssIntrSet_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,SrssIntrSet_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Set interrupt for low voltage detector HVLVD1"]
    #[inline(always)]
    pub fn hvlvd1(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, SrssIntrSet_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,SrssIntrSet_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Set interrupt for clock calibration counter done.  This field is reset during DEEPSLEEP mode."]
    #[inline(always)]
    pub fn clk_cal(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, SrssIntrSet_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,SrssIntrSet_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for SrssIntrSet {
    #[inline(always)]
    fn default() -> SrssIntrSet {
        <crate::RegValueT<SrssIntrSet_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct SrssIntrMask_SPEC;
impl crate::sealed::RegSpec for SrssIntrMask_SPEC {
    type DataType = u32;
}

#[doc = "SRSS Interrupt Mask Register"]
pub type SrssIntrMask = crate::RegValueT<SrssIntrMask_SPEC>;

impl SrssIntrMask {
    #[doc = "Mask for watchdog timer.  Clearing this bit will not forward the interrupt to the CPU.  It will not, however, disable the WDT reset generation on 2 missed interrupts.  When WDT resets the chip, it also internally pends an interrupt that survives the reset.  To prevent unintended ISR execution, clear SRSS_INTR.WDT_MATCH before setting this bit."]
    #[inline(always)]
    pub fn wdt_match(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, SrssIntrMask_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,SrssIntrMask_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Mask for low voltage detector HVLVD1"]
    #[inline(always)]
    pub fn hvlvd1(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, SrssIntrMask_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,SrssIntrMask_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Mask for clock calibration done"]
    #[inline(always)]
    pub fn clk_cal(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, SrssIntrMask_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,SrssIntrMask_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for SrssIntrMask {
    #[inline(always)]
    fn default() -> SrssIntrMask {
        <crate::RegValueT<SrssIntrMask_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct SrssIntrMasked_SPEC;
impl crate::sealed::RegSpec for SrssIntrMasked_SPEC {
    type DataType = u32;
}

#[doc = "SRSS Interrupt Masked Register"]
pub type SrssIntrMasked = crate::RegValueT<SrssIntrMasked_SPEC>;

impl SrssIntrMasked {
    #[doc = "Logical and of corresponding request and mask bits."]
    #[inline(always)]
    pub fn wdt_match(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, SrssIntrMasked_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,SrssIntrMasked_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Logical and of corresponding request and mask bits."]
    #[inline(always)]
    pub fn hvlvd1(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, SrssIntrMasked_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,SrssIntrMasked_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Logical and of corresponding request and mask bits."]
    #[inline(always)]
    pub fn clk_cal(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, SrssIntrMasked_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,SrssIntrMasked_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for SrssIntrMasked {
    #[inline(always)]
    fn default() -> SrssIntrMasked {
        <crate::RegValueT<SrssIntrMasked_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct SrssIntrCfg_SPEC;
impl crate::sealed::RegSpec for SrssIntrCfg_SPEC {
    type DataType = u32;
}

#[doc = "SRSS Interrupt Configuration Register"]
pub type SrssIntrCfg = crate::RegValueT<SrssIntrCfg_SPEC>;

impl SrssIntrCfg {
    #[doc = "Sets which edge(s) will trigger an IRQ for HVLVD1"]
    #[inline(always)]
    pub fn hvlvd1_edge_sel(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3,
        1,
        0,
        srss_intr_cfg::Hvlvd1EdgeSel,
        srss_intr_cfg::Hvlvd1EdgeSel,
        SrssIntrCfg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0x3,
            1,
            0,
            srss_intr_cfg::Hvlvd1EdgeSel,
            srss_intr_cfg::Hvlvd1EdgeSel,
            SrssIntrCfg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for SrssIntrCfg {
    #[inline(always)]
    fn default() -> SrssIntrCfg {
        <crate::RegValueT<SrssIntrCfg_SPEC> as RegisterValue<_>>::new(0)
    }
}
pub mod srss_intr_cfg {

    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
    pub struct Hvlvd1EdgeSel_SPEC;
    pub type Hvlvd1EdgeSel = crate::EnumBitfieldStruct<u8, Hvlvd1EdgeSel_SPEC>;
    impl Hvlvd1EdgeSel {
        #[doc = "Disabled"]
        pub const DISABLE: Self = Self::new(0);

        #[doc = "Rising edge"]
        pub const RISING: Self = Self::new(1);

        #[doc = "Falling edge"]
        pub const FALLING: Self = Self::new(2);

        #[doc = "Both rising and falling edges"]
        pub const BOTH: Self = Self::new(3);
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ResCause_SPEC;
impl crate::sealed::RegSpec for ResCause_SPEC {
    type DataType = u32;
}

#[doc = "Reset Cause Observation Register"]
pub type ResCause = crate::RegValueT<ResCause_SPEC>;

impl ResCause {
    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_wdt(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_act_fault(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_dpslp_fault(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_csv_wco_loss(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_soft(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_mcwdt0(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "N/A"]
    #[inline(always)]
    pub fn reset_mcwdt1(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Multi-Counter Watchdog timer reset #2 has occurred since last power cycle.  This hardware is not present in PSoC6 devices."]
    #[inline(always)]
    pub fn reset_mcwdt2(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }

    #[doc = "Multi-Counter Watchdog timer reset #3 has occurred since last power cycle. This hardware is not present in PSoC6 devices."]
    #[inline(always)]
    pub fn reset_mcwdt3(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, ResCause_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8, 1, 0, ResCause_SPEC, crate::common::RW>::from_register(
            self, 0,
        )
    }
}
impl ::core::default::Default for ResCause {
    #[inline(always)]
    fn default() -> ResCause {
        <crate::RegValueT<ResCause_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ResCause2_SPEC;
impl crate::sealed::RegSpec for ResCause2_SPEC {
    type DataType = u32;
}

#[doc = "Reset Cause Observation Register 2"]
pub type ResCause2 = crate::RegValueT<ResCause2_SPEC>;

impl ResCause2 {
    #[doc = "Clock supervision logic requested a reset due to loss of a high-frequency clock.  Each bit index K corresponds to a HFCLK<K>.  Unimplemented clock bits return zero."]
    #[inline(always)]
    pub fn reset_csv_hf_loss(
        self,
    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, ResCause2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,ResCause2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Clock supervision logic requested a reset due to frequency error of high-frequency clock.  Each bit index K corresponds to a HFCLK<K>.  Unimplemented clock bits return zero."]
    #[inline(always)]
    pub fn reset_csv_hf_freq(
        self,
    ) -> crate::common::RegisterField<16, 0xffff, 1, 0, u16, u16, ResCause2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0xffff,1,0,u16,u16,ResCause2_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ResCause2 {
    #[inline(always)]
    fn default() -> ResCause2 {
        <crate::RegValueT<ResCause2_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrTrimRefCtl_SPEC;
impl crate::sealed::RegSpec for PwrTrimRefCtl_SPEC {
    type DataType = u32;
}

#[doc = "Reference Trim Register"]
pub type PwrTrimRefCtl = crate::RegValueT<PwrTrimRefCtl_SPEC>;

impl PwrTrimRefCtl {
    #[doc = "Active-Reference temperature trim.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0 -> default setting at POR; not for trimming use\nothers -> normal trim range"]
    #[inline(always)]
    pub fn act_ref_tctrim(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Active-Reference current trim.   This register is only reset by XRES/POR/BOD/HIBERNATE.\n0 -> default setting at POR; not for trimming use\nothers -> normal trim range"]
    #[inline(always)]
    pub fn act_ref_itrim(
        self,
    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0xf,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Active-Reference absolute voltage trim.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0 -> default setting at POR; not for trimming use\nothers -> normal trim range"]
    #[inline(always)]
    pub fn act_ref_abstrim(
        self,
    ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0x1f,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Active-Reference current boost.   This register is only reset by XRES/POR/BOD/HIBERNATE.\n0: normal operation\nothers: risk mitigation"]
    #[inline(always)]
    pub fn act_ref_iboost(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, PwrTrimRefCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<14,1,0,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DeepSleep-Reference temperature trim.  This register is only reset by XRES/POR/BOD/HIBERNATE.\n0 -> default setting at POR; not for trimming use\nothers -> normal trim range"]
    #[inline(always)]
    pub fn dpslp_ref_tctrim(
        self,
    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0xf,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DeepSleep-Reference absolute voltage trim.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn dpslp_ref_abstrim(
        self,
    ) -> crate::common::RegisterField<20, 0x1f, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<20,0x1f,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DeepSleep current reference trim.   This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn dpslp_ref_itrim(
        self,
    ) -> crate::common::RegisterField<28, 0xf, 1, 0, u8, u8, PwrTrimRefCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<28,0xf,1,0,u8,u8,PwrTrimRefCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrTrimRefCtl {
    #[inline(always)]
    fn default() -> PwrTrimRefCtl {
        <crate::RegValueT<PwrTrimRefCtl_SPEC> as RegisterValue<_>>::new(1894776832)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrTrimBodovpCtl_SPEC;
impl crate::sealed::RegSpec for PwrTrimBodovpCtl_SPEC {
    type DataType = u32;
}

#[doc = "BOD/OVP Trim Register"]
pub type PwrTrimBodovpCtl = crate::RegValueT<PwrTrimBodovpCtl_SPEC>;

impl PwrTrimBodovpCtl {
    #[doc = "HVPORBOD trip point selection.  Monitors vddd.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn hvporbod_tripsel(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,PwrTrimBodovpCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "HVPORBOD offset trim.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn hvporbod_ofstrim(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,PwrTrimBodovpCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "HVPORBOD current trim.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn hvporbod_itrim(
        self,
    ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<7,0x7,1,0,u8,u8,PwrTrimBodovpCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "LVPORBOD trip point selection.  Monitors vccd.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn lvporbod_tripsel(
        self,
    ) -> crate::common::RegisterField<10, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            10,
            0x7,
            1,
            0,
            u8,
            u8,
            PwrTrimBodovpCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "LVPORBOD offset trim.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn lvporbod_ofstrim(
        self,
    ) -> crate::common::RegisterField<14, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            14,
            0x7,
            1,
            0,
            u8,
            u8,
            PwrTrimBodovpCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "LVPORBOD current trim.  This register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn lvporbod_itrim(
        self,
    ) -> crate::common::RegisterField<17, 0x7, 1, 0, u8, u8, PwrTrimBodovpCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            17,
            0x7,
            1,
            0,
            u8,
            u8,
            PwrTrimBodovpCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for PwrTrimBodovpCtl {
    #[inline(always)]
    fn default() -> PwrTrimBodovpCtl {
        <crate::RegValueT<PwrTrimBodovpCtl_SPEC> as RegisterValue<_>>::new(265476)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimCcoCtl_SPEC;
impl crate::sealed::RegSpec for ClkTrimCcoCtl_SPEC {
    type DataType = u32;
}

#[doc = "CCO Trim Register"]
pub type ClkTrimCcoCtl = crate::RegValueT<ClkTrimCcoCtl_SPEC>;

impl ClkTrimCcoCtl {
    #[doc = "CCO reference current source trim."]
    #[inline(always)]
    pub fn cco_rcstrim(
        self,
    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, ClkTrimCcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,ClkTrimCcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Terminal count for the stabilization counter from CCO_ENABLE until stable."]
    #[inline(always)]
    pub fn cco_stable_cnt(
        self,
    ) -> crate::common::RegisterField<24, 0x3f, 1, 0, u8, u8, ClkTrimCcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<24,0x3f,1,0,u8,u8,ClkTrimCcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enables the automatic stabilization counter."]
    #[inline(always)]
    pub fn enable_cnt(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, ClkTrimCcoCtl_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<31,1,0,ClkTrimCcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTrimCcoCtl {
    #[inline(always)]
    fn default() -> ClkTrimCcoCtl {
        <crate::RegValueT<ClkTrimCcoCtl_SPEC> as RegisterValue<_>>::new(2801795104)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimCcoCtl2_SPEC;
impl crate::sealed::RegSpec for ClkTrimCcoCtl2_SPEC {
    type DataType = u32;
}

#[doc = "CCO Trim Register 2"]
pub type ClkTrimCcoCtl2 = crate::RegValueT<ClkTrimCcoCtl2_SPEC>;

impl ClkTrimCcoCtl2 {
    #[doc = "CCO frequency 1st range calibration"]
    #[inline(always)]
    pub fn cco_fctrim1(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, ClkTrimCcoCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,ClkTrimCcoCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "CCO frequency 2nd range calibration"]
    #[inline(always)]
    pub fn cco_fctrim2(
        self,
    ) -> crate::common::RegisterField<5, 0x1f, 1, 0, u8, u8, ClkTrimCcoCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x1f,1,0,u8,u8,ClkTrimCcoCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "CCO frequency 3rd range calibration"]
    #[inline(always)]
    pub fn cco_fctrim3(
        self,
    ) -> crate::common::RegisterField<10, 0x1f, 1, 0, u8, u8, ClkTrimCcoCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<10,0x1f,1,0,u8,u8,ClkTrimCcoCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "CCO frequency 4th range calibration"]
    #[inline(always)]
    pub fn cco_fctrim4(
        self,
    ) -> crate::common::RegisterField<15, 0x1f, 1, 0, u8, u8, ClkTrimCcoCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<15,0x1f,1,0,u8,u8,ClkTrimCcoCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "CCO frequency 5th range calibration"]
    #[inline(always)]
    pub fn cco_fctrim5(
        self,
    ) -> crate::common::RegisterField<20, 0x1f, 1, 0, u8, u8, ClkTrimCcoCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<20,0x1f,1,0,u8,u8,ClkTrimCcoCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTrimCcoCtl2 {
    #[inline(always)]
    fn default() -> ClkTrimCcoCtl2 {
        <crate::RegValueT<ClkTrimCcoCtl2_SPEC> as RegisterValue<_>>::new(8929552)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrTrimWakeCtl_SPEC;
impl crate::sealed::RegSpec for PwrTrimWakeCtl_SPEC {
    type DataType = u32;
}

#[doc = "Wakeup Trim Register"]
pub type PwrTrimWakeCtl = crate::RegValueT<PwrTrimWakeCtl_SPEC>;

impl PwrTrimWakeCtl {
    #[doc = "Wakeup holdoff.  Spec (fastest) wake time is achieved with a setting of 0.  Additional delay can be added for debugging or workaround.  The delay is counted by the IMO."]
    #[inline(always)]
    pub fn wake_delay(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, PwrTrimWakeCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,PwrTrimWakeCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrTrimWakeCtl {
    #[inline(always)]
    fn default() -> PwrTrimWakeCtl {
        <crate::RegValueT<PwrTrimWakeCtl_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrTrimLvdCtl_SPEC;
impl crate::sealed::RegSpec for PwrTrimLvdCtl_SPEC {
    type DataType = u32;
}

#[doc = "LVD Trim Register"]
pub type PwrTrimLvdCtl = crate::RegValueT<PwrTrimLvdCtl_SPEC>;

impl PwrTrimLvdCtl {
    #[doc = "HVLVD1 offset trim"]
    #[inline(always)]
    pub fn hvlvd1_ofstrim(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, PwrTrimLvdCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,PwrTrimLvdCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "HVLVD1 current trim"]
    #[inline(always)]
    pub fn hvlvd1_itrim(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, PwrTrimLvdCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,PwrTrimLvdCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for PwrTrimLvdCtl {
    #[inline(always)]
    fn default() -> PwrTrimLvdCtl {
        <crate::RegValueT<PwrTrimLvdCtl_SPEC> as RegisterValue<_>>::new(32)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimIloCtl_SPEC;
impl crate::sealed::RegSpec for ClkTrimIloCtl_SPEC {
    type DataType = u32;
}

#[doc = "ILO Trim Register"]
pub type ClkTrimIloCtl = crate::RegValueT<ClkTrimIloCtl_SPEC>;

impl ClkTrimIloCtl {
    #[doc = "ILO frequency trims.  LSB step size is 1.5 percent (typical) of the frequency."]
    #[inline(always)]
    pub fn ilo_ftrim(
        self,
    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, ClkTrimIloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,ClkTrimIloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTrimIloCtl {
    #[inline(always)]
    fn default() -> ClkTrimIloCtl {
        <crate::RegValueT<ClkTrimIloCtl_SPEC> as RegisterValue<_>>::new(44)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PwrTrimPwrsysCtl_SPEC;
impl crate::sealed::RegSpec for PwrTrimPwrsysCtl_SPEC {
    type DataType = u32;
}

#[doc = "Power System Trim Register"]
pub type PwrTrimPwrsysCtl = crate::RegValueT<PwrTrimPwrsysCtl_SPEC>;

impl PwrTrimPwrsysCtl {
    #[doc = "Trim for the Active-Regulator.  This sets the output voltage level.  This register is only reset by XRES/POR/BOD/HIBERNATE.  Two voltages are supported: 0.9V and 1.1V.  The codes for these are stored in SFLASH_LDO_0P9V_TRIM and SFLASH_LDO_1P1V_TRIM, respectively."]
    #[inline(always)]
    pub fn act_reg_trim(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, PwrTrimPwrsysCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            0,
            0x1f,
            1,
            0,
            u8,
            u8,
            PwrTrimPwrsysCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Controls the tradeoff between output current and internal operating current for the Active Regulator.  The maximum output current depends on the silicon implementation, but an application may limit its maximum current to less than that.  This may allow a reduction in the internal operating current of the regulator.  The regulator internal operating current depends on the boost setting:\n2\'b00: 50uA\n2\'b01: 100uA\n2\'b10: 150uA\n2\'b11: 200uA\n\nThe allowed setting is a lookup table based on the chip-specific maximum (set in factory) and an application-specific maximum (set by customer).  The defaults are set assuming the application consumes the maximum allowed by the chip.\n50mA chip: 2\'b00 (default);\n100mA chip: 2\'b00 (default);\n150mA chip: 50..100mA app => 2\'b00, 150mA app => 2\'b01 (default);\n200mA chip: 50mA app => 2\'b00, 100..150mA app => 2\'b01,  200mA app => 2\'b10 (default);\n250mA chip: 50mA app => 2\'b00, 100..150mA app => 2\'b01,  200..250mA app => 2\'b10 (default);\n300mA chip: 50mA app => 2\'b00, 100..150mA app => 2\'b01, 200..250mA app => 2\'b10, 300mA app => 2\'b11 (default);\n\nThis register is only reset by XRES/POR/BOD/HIBERNATE."]
    #[inline(always)]
    pub fn act_reg_boost(
        self,
    ) -> crate::common::RegisterField<30, 0x3, 1, 0, u8, u8, PwrTrimPwrsysCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            30,
            0x3,
            1,
            0,
            u8,
            u8,
            PwrTrimPwrsysCtl_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for PwrTrimPwrsysCtl {
    #[inline(always)]
    fn default() -> PwrTrimPwrsysCtl {
        <crate::RegValueT<PwrTrimPwrsysCtl_SPEC> as RegisterValue<_>>::new(23)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimEcoCtl_SPEC;
impl crate::sealed::RegSpec for ClkTrimEcoCtl_SPEC {
    type DataType = u32;
}

#[doc = "ECO Trim Register"]
pub type ClkTrimEcoCtl = crate::RegValueT<ClkTrimEcoCtl_SPEC>;

impl ClkTrimEcoCtl {
    #[doc = "Watch Dog Trim -  Delta voltage below steady state level\n0x0 - 50mV\n0x1 - 75mV\n0x2 - 100mV\n0x3 - 125mV\n0x4 - 150mV\n0x5 - 175mV\n0x6 - 200mV\n0x7 - 225mV"]
    #[inline(always)]
    pub fn wdtrim(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Amplitude trim to set the crystal drive level when ECO_CONFIG.AGC_EN=1.  WARNING: use care when setting this field because driving a crystal beyond its rated limit can permanently damage the crystal.\n0x0 - 150mV\n0x1 - 175mV\n0x2 - 200mV\n0x3 - 225mV\n0x4 - 250mV\n0x5 - 275mV\n0x6 - 300mV\n0x7 - 325mV\n0x8 - 350mV\n0x9 - 375mV\n0xA - 400mV\n0xB - 425mV\n0xC - 450mV\n0xD - 475mV\n0xE - 500mV\n0xF - 525mV"]
    #[inline(always)]
    pub fn atrim(
        self,
    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0xf,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Filter Trim - 3rd harmonic oscillation"]
    #[inline(always)]
    pub fn ftrim(
        self,
    ) -> crate::common::RegisterField<8, 0x3, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0x3,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Feedback resistor Trim"]
    #[inline(always)]
    pub fn rtrim(
        self,
    ) -> crate::common::RegisterField<10, 0x3, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<10,0x3,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Gain Trim - Startup time"]
    #[inline(always)]
    pub fn gtrim(
        self,
    ) -> crate::common::RegisterField<12, 0x3, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<12,0x3,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Current Trim"]
    #[inline(always)]
    pub fn itrim(
        self,
    ) -> crate::common::RegisterField<16, 0x3f, 1, 0, u8, u8, ClkTrimEcoCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0x3f,1,0,u8,u8,ClkTrimEcoCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTrimEcoCtl {
    #[inline(always)]
    fn default() -> ClkTrimEcoCtl {
        <crate::RegValueT<ClkTrimEcoCtl_SPEC> as RegisterValue<_>>::new(2031619)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimPiloCtl_SPEC;
impl crate::sealed::RegSpec for ClkTrimPiloCtl_SPEC {
    type DataType = u32;
}

#[doc = "PILO Trim Register"]
pub type ClkTrimPiloCtl = crate::RegValueT<ClkTrimPiloCtl_SPEC>;

impl ClkTrimPiloCtl {
    #[doc = "Coarse frequency trim to meet 32.768kHz +/-2 percent across PVT without calibration.  The nominal step size of the LSB is 1kHz."]
    #[inline(always)]
    pub fn pilo_cfreq(
        self,
    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for current in oscillator block."]
    #[inline(always)]
    pub fn pilo_osc_trim(
        self,
    ) -> crate::common::RegisterField<12, 0x7, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<12,0x7,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for comparator bias current."]
    #[inline(always)]
    pub fn pilo_comp_trim(
        self,
    ) -> crate::common::RegisterField<16, 0x3, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<16,0x3,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for biasn by trimming sub-Vth NMOS width in beta-multiplier"]
    #[inline(always)]
    pub fn pilo_nbias_trim(
        self,
    ) -> crate::common::RegisterField<18, 0x3, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<18,0x3,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for beta-multiplier branch current"]
    #[inline(always)]
    pub fn pilo_res_trim(
        self,
    ) -> crate::common::RegisterField<20, 0x1f, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<20,0x1f,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for beta-multiplier current slope"]
    #[inline(always)]
    pub fn pilo_islope_trim(
        self,
    ) -> crate::common::RegisterField<26, 0x3, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<26,0x3,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for VT-DIFF output (internal power supply)"]
    #[inline(always)]
    pub fn pilo_vtdiff_trim(
        self,
    ) -> crate::common::RegisterField<28, 0x7, 1, 0, u8, u8, ClkTrimPiloCtl_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<28,0x7,1,0,u8,u8,ClkTrimPiloCtl_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for ClkTrimPiloCtl {
    #[inline(always)]
    fn default() -> ClkTrimPiloCtl {
        <crate::RegValueT<ClkTrimPiloCtl_SPEC> as RegisterValue<_>>::new(17321999)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimPiloCtl2_SPEC;
impl crate::sealed::RegSpec for ClkTrimPiloCtl2_SPEC {
    type DataType = u32;
}

#[doc = "PILO Trim Register 2"]
pub type ClkTrimPiloCtl2 = crate::RegValueT<ClkTrimPiloCtl2_SPEC>;

impl ClkTrimPiloCtl2 {
    #[doc = "Trim for voltage reference"]
    #[inline(always)]
    pub fn pilo_vref_trim(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, ClkTrimPiloCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,ClkTrimPiloCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for beta-multiplier current reference"]
    #[inline(always)]
    pub fn pilo_irefbm_trim(
        self,
    ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, ClkTrimPiloCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0x1f,1,0,u8,u8,ClkTrimPiloCtl2_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Trim for current reference"]
    #[inline(always)]
    pub fn pilo_iref_trim(
        self,
    ) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, ClkTrimPiloCtl2_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            16,
            0xff,
            1,
            0,
            u8,
            u8,
            ClkTrimPiloCtl2_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkTrimPiloCtl2 {
    #[inline(always)]
    fn default() -> ClkTrimPiloCtl2 {
        <crate::RegValueT<ClkTrimPiloCtl2_SPEC> as RegisterValue<_>>::new(14291168)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ClkTrimPiloCtl3_SPEC;
impl crate::sealed::RegSpec for ClkTrimPiloCtl3_SPEC {
    type DataType = u32;
}

#[doc = "PILO Trim Register 3"]
pub type ClkTrimPiloCtl3 = crate::RegValueT<ClkTrimPiloCtl3_SPEC>;

impl ClkTrimPiloCtl3 {
    #[doc = "Engineering options for PILO circuits\n0: Short vdda to vpwr\n1: Beta:mult current change\n2: Iref generation Ptat current addition\n3: Disable current path in secondary Beta:mult startup circuit\n4: Double oscillator current\n5: Switch between deep:sub:threshold and sub:threshold stacks in Vref generation block\n6: Spare\n7: Ptat component increase in Iref\n8: vpwr_rc and vpwr_dig_rc shorting testmode\n9: Switch b/w psub connection for cascode nfet for vref generation\n10: Switch between sub:threshold and deep:sub:threshold stacks in comparator.\n15-11: Frequency fine trim.  See AKK-444 for an overview of the trim strategy."]
    #[inline(always)]
    pub fn pilo_engopt(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffff,
        1,
        0,
        u16,
        u16,
        ClkTrimPiloCtl3_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffff,
            1,
            0,
            u16,
            u16,
            ClkTrimPiloCtl3_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for ClkTrimPiloCtl3 {
    #[inline(always)]
    fn default() -> ClkTrimPiloCtl3 {
        <crate::RegValueT<ClkTrimPiloCtl3_SPEC> as RegisterValue<_>>::new(18432)
    }
}

#[doc = "Multi-Counter Watchdog Timer"]
#[non_exhaustive]
pub struct _McwdtStruct;

#[doc = "Multi-Counter Watchdog Timer"]
pub type McwdtStruct = &'static _McwdtStruct;

unsafe impl ::core::marker::Sync for _McwdtStruct {}
impl _McwdtStruct {
    #[allow(unused)]
    #[inline(always)]
    pub(crate) const unsafe fn _svd2pac_from_ptr(ptr: *mut u8) -> &'static Self {
        &*(ptr as *const _)
    }

    #[allow(unused)]
    #[inline(always)]
    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
        self as *const Self as *mut u8
    }

    #[doc = "Multi-Counter Watchdog Sub-counters 0/1"]
    #[inline(always)]
    pub const fn mcwdt_cntlow(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtCntlow_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtCntlow_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(4usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Sub-counter 2"]
    #[inline(always)]
    pub const fn mcwdt_cnthigh(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtCnthigh_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtCnthigh_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(8usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Match Register"]
    #[inline(always)]
    pub const fn mcwdt_match(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtMatch_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtMatch_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(12usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Configuration"]
    #[inline(always)]
    pub const fn mcwdt_config(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtConfig_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtConfig_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(16usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Control"]
    #[inline(always)]
    pub const fn mcwdt_ctl(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtCtl_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtCtl_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(20usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Register"]
    #[inline(always)]
    pub const fn mcwdt_intr(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtIntr_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtIntr_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(24usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Set Register"]
    #[inline(always)]
    pub const fn mcwdt_intr_set(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtIntrSet_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtIntrSet_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(28usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Mask Register"]
    #[inline(always)]
    pub const fn mcwdt_intr_mask(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtIntrMask_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtIntrMask_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Masked Register"]
    #[inline(always)]
    pub const fn mcwdt_intr_masked(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtIntrMasked_SPEC, crate::common::R> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtIntrMasked_SPEC, crate::common::R>::from_ptr(
                self._svd2pac_as_ptr().add(36usize),
            )
        }
    }

    #[doc = "Multi-Counter Watchdog Counter Lock Register"]
    #[inline(always)]
    pub const fn mcwdt_lock(
        &self,
    ) -> &'static crate::common::Reg<mcwdt_struct::McwdtLock_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<mcwdt_struct::McwdtLock_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(40usize),
            )
        }
    }
}
pub mod mcwdt_struct {
    #[allow(unused_imports)]
    use crate::common::*;
    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtCntlow_SPEC;
    impl crate::sealed::RegSpec for McwdtCntlow_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Sub-counters 0/1"]
    pub type McwdtCntlow = crate::RegValueT<McwdtCntlow_SPEC>;

    impl McwdtCntlow {
        #[doc = "Current value of sub-counter 0 for this MCWDT.  Software writes are ignored when the sub-counter is enabled."]
        #[inline(always)]
        pub fn wdt_ctr0(
            self,
        ) -> crate::common::RegisterField<
            0,
            0xffff,
            1,
            0,
            u16,
            u16,
            McwdtCntlow_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                0,
                0xffff,
                1,
                0,
                u16,
                u16,
                McwdtCntlow_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }

        #[doc = "Current value of sub-counter 1 for this MCWDT.  Software writes are ignored when the sub-counter is enabled"]
        #[inline(always)]
        pub fn wdt_ctr1(
            self,
        ) -> crate::common::RegisterField<
            16,
            0xffff,
            1,
            0,
            u16,
            u16,
            McwdtCntlow_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                16,
                0xffff,
                1,
                0,
                u16,
                u16,
                McwdtCntlow_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }
    }
    impl ::core::default::Default for McwdtCntlow {
        #[inline(always)]
        fn default() -> McwdtCntlow {
            <crate::RegValueT<McwdtCntlow_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtCnthigh_SPEC;
    impl crate::sealed::RegSpec for McwdtCnthigh_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Sub-counter 2"]
    pub type McwdtCnthigh = crate::RegValueT<McwdtCnthigh_SPEC>;

    impl McwdtCnthigh {
        #[doc = "Current value of sub-counter 2 for this MCWDT.  Software writes are ignored when the sub-counter is enabled"]
        #[inline(always)]
        pub fn wdt_ctr2(
            self,
        ) -> crate::common::RegisterField<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            McwdtCnthigh_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                0,
                0xffffffff,
                1,
                0,
                u32,
                u32,
                McwdtCnthigh_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }
    }
    impl ::core::default::Default for McwdtCnthigh {
        #[inline(always)]
        fn default() -> McwdtCnthigh {
            <crate::RegValueT<McwdtCnthigh_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtMatch_SPEC;
    impl crate::sealed::RegSpec for McwdtMatch_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Match Register"]
    pub type McwdtMatch = crate::RegValueT<McwdtMatch_SPEC>;

    impl McwdtMatch {
        #[doc = "Match value for sub-counter 0 of this MCWDT"]
        #[inline(always)]
        pub fn wdt_match0(
            self,
        ) -> crate::common::RegisterField<
            0,
            0xffff,
            1,
            0,
            u16,
            u16,
            McwdtMatch_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                0,
                0xffff,
                1,
                0,
                u16,
                u16,
                McwdtMatch_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }

        #[doc = "Match value for sub-counter 1 of this MCWDT"]
        #[inline(always)]
        pub fn wdt_match1(
            self,
        ) -> crate::common::RegisterField<
            16,
            0xffff,
            1,
            0,
            u16,
            u16,
            McwdtMatch_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                16,
                0xffff,
                1,
                0,
                u16,
                u16,
                McwdtMatch_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }
    }
    impl ::core::default::Default for McwdtMatch {
        #[inline(always)]
        fn default() -> McwdtMatch {
            <crate::RegValueT<McwdtMatch_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtConfig_SPEC;
    impl crate::sealed::RegSpec for McwdtConfig_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Configuration"]
    pub type McwdtConfig = crate::RegValueT<McwdtConfig_SPEC>;

    impl McwdtConfig {
        #[doc = "Watchdog Counter Action on Match.  Action is taken on the next increment after the values match (WDT_CTR0=WDT_MATCH0)."]
        #[inline(always)]
        pub fn wdt_mode0(
            self,
        ) -> crate::common::RegisterField<
            0,
            0x3,
            1,
            0,
            mcwdt_config::WdtMode0,
            mcwdt_config::WdtMode0,
            McwdtConfig_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                0,
                0x3,
                1,
                0,
                mcwdt_config::WdtMode0,
                mcwdt_config::WdtMode0,
                McwdtConfig_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }

        #[doc = "Clear Watchdog Counter when WDT_CTR0=WDT_MATCH0. In other words WDT_CTR0 divides LFCLK by (WDT_MATCH0+1).\n0: Free running counter\n1: Clear on match.  In this mode, the minimum legal setting of WDT_MATCH0 is 1."]
        #[inline(always)]
        pub fn wdt_clear0(
            self,
        ) -> crate::common::RegisterFieldBool<2, 1, 0, McwdtConfig_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<2,1,0,McwdtConfig_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Cascade Watchdog Counters 0,1.  Counter 1 increments the cycle after WDT_CTR0=WDT_MATCH0.\n0: Independent counters\n1: Cascaded counters"]
        #[inline(always)]
        pub fn wdt_cascade0_1(
            self,
        ) -> crate::common::RegisterFieldBool<3, 1, 0, McwdtConfig_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<3,1,0,McwdtConfig_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Watchdog Counter Action on Match.  Action is taken on the next increment after the values match (WDT_CTR1=WDT_MATCH1)."]
        #[inline(always)]
        pub fn wdt_mode1(
            self,
        ) -> crate::common::RegisterField<
            8,
            0x3,
            1,
            0,
            mcwdt_config::WdtMode1,
            mcwdt_config::WdtMode1,
            McwdtConfig_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                8,
                0x3,
                1,
                0,
                mcwdt_config::WdtMode1,
                mcwdt_config::WdtMode1,
                McwdtConfig_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }

        #[doc = "Clear Watchdog Counter when WDT_CTR1==WDT_MATCH1. In other words WDT_CTR1 divides LFCLK by (WDT_MATCH1+1).\n0: Free running counter\n1: Clear on match.  In this mode, the minimum legal setting of WDT_MATCH1 is 1."]
        #[inline(always)]
        pub fn wdt_clear1(
            self,
        ) -> crate::common::RegisterFieldBool<10, 1, 0, McwdtConfig_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<10,1,0,McwdtConfig_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Cascade Watchdog Counters 1,2.  Counter 2 increments the cycle after WDT_CTR1=WDT_MATCH1.  It is allowed to cascade all three WDT counters.\n0: Independent counters\n1: Cascaded counters.  When cascading all three counters, WDT_CLEAR1 must be 1."]
        #[inline(always)]
        pub fn wdt_cascade1_2(
            self,
        ) -> crate::common::RegisterFieldBool<11, 1, 0, McwdtConfig_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<11,1,0,McwdtConfig_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Watchdog Counter 2 Mode."]
        #[inline(always)]
        pub fn wdt_mode2(
            self,
        ) -> crate::common::RegisterField<
            16,
            0x1,
            1,
            0,
            mcwdt_config::WdtMode2,
            mcwdt_config::WdtMode2,
            McwdtConfig_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                16,
                0x1,
                1,
                0,
                mcwdt_config::WdtMode2,
                mcwdt_config::WdtMode2,
                McwdtConfig_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }

        #[doc = "Bit to observe for WDT_INT2:\n0: Assert after bit0 of WDT_CTR2 toggles (one int every tick)\n...\n31: Assert after bit31 of WDT_CTR2 toggles (one int every 2^31 ticks)"]
        #[inline(always)]
        pub fn wdt_bits2(
            self,
        ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, McwdtConfig_SPEC, crate::common::RW>
        {
            crate::common::RegisterField::<
                24,
                0x1f,
                1,
                0,
                u8,
                u8,
                McwdtConfig_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }
    }
    impl ::core::default::Default for McwdtConfig {
        #[inline(always)]
        fn default() -> McwdtConfig {
            <crate::RegValueT<McwdtConfig_SPEC> as RegisterValue<_>>::new(0)
        }
    }
    pub mod mcwdt_config {

        #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
        pub struct WdtMode0_SPEC;
        pub type WdtMode0 = crate::EnumBitfieldStruct<u8, WdtMode0_SPEC>;
        impl WdtMode0 {
            #[doc = "Do nothing"]
            pub const NOTHING: Self = Self::new(0);

            #[doc = "Assert WDT_INTx"]
            pub const INT: Self = Self::new(1);

            #[doc = "Assert WDT Reset"]
            pub const RESET: Self = Self::new(2);

            #[doc = "Assert WDT_INTx, assert WDT Reset after 3rd unhandled interrupt"]
            pub const INT_THEN_RESET: Self = Self::new(3);
        }
        #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
        pub struct WdtMode1_SPEC;
        pub type WdtMode1 = crate::EnumBitfieldStruct<u8, WdtMode1_SPEC>;
        impl WdtMode1 {
            #[doc = "Do nothing"]
            pub const NOTHING: Self = Self::new(0);

            #[doc = "Assert WDT_INTx"]
            pub const INT: Self = Self::new(1);

            #[doc = "Assert WDT Reset"]
            pub const RESET: Self = Self::new(2);

            #[doc = "Assert WDT_INTx, assert WDT Reset after 3rd unhandled interrupt"]
            pub const INT_THEN_RESET: Self = Self::new(3);
        }
        #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
        pub struct WdtMode2_SPEC;
        pub type WdtMode2 = crate::EnumBitfieldStruct<u8, WdtMode2_SPEC>;
        impl WdtMode2 {
            #[doc = "Free running counter with no interrupt requests"]
            pub const NOTHING: Self = Self::new(0);

            #[doc = "Free running counter with interrupt request that occurs one LFCLK cycle after the specified bit in CTR2 toggles (see WDT_BITS2)."]
            pub const INT: Self = Self::new(1);
        }
    }
    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtCtl_SPEC;
    impl crate::sealed::RegSpec for McwdtCtl_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Control"]
    pub type McwdtCtl = crate::RegValueT<McwdtCtl_SPEC>;

    impl McwdtCtl {
        #[doc = "Enable subcounter 0.  May take up to 2 LFCLK cycles to take effect.\n0: Counter is disabled (not clocked)\n1: Counter is enabled (counting up)"]
        #[inline(always)]
        pub fn wdt_enable0(
            self,
        ) -> crate::common::RegisterFieldBool<0, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<0,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Indicates actual state of counter.  May lag WDT_ENABLE0 by up to two LFCLK cycles."]
        #[inline(always)]
        pub fn wdt_enabled0(
            self,
        ) -> crate::common::RegisterFieldBool<1, 1, 0, McwdtCtl_SPEC, crate::common::R> {
            crate::common::RegisterFieldBool::<1,1,0,McwdtCtl_SPEC,crate::common::R>::from_register(self,0)
        }

        #[doc = "Resets counter 0 back to 0000.  Hardware will reset this bit after counter was reset.  This will take up to one LFCLK cycle to take effect."]
        #[inline(always)]
        pub fn wdt_reset0(
            self,
        ) -> crate::common::RegisterFieldBool<3, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<3,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Enable subcounter 1.  May take up to 2 LFCLK cycles to take effect.\n0: Counter is disabled (not clocked)\n1: Counter is enabled (counting up)"]
        #[inline(always)]
        pub fn wdt_enable1(
            self,
        ) -> crate::common::RegisterFieldBool<8, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<8,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Indicates actual state of counter.  May lag WDT_ENABLE1 by up to two LFCLK cycles."]
        #[inline(always)]
        pub fn wdt_enabled1(
            self,
        ) -> crate::common::RegisterFieldBool<9, 1, 0, McwdtCtl_SPEC, crate::common::R> {
            crate::common::RegisterFieldBool::<9,1,0,McwdtCtl_SPEC,crate::common::R>::from_register(self,0)
        }

        #[doc = "Resets counter 1 back to 0000.  Hardware will reset this bit after counter was reset.  This will take up to one LFCLK cycle to take effect."]
        #[inline(always)]
        pub fn wdt_reset1(
            self,
        ) -> crate::common::RegisterFieldBool<11, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<11,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Enable subcounter 2.  May take up to 2 LFCLK cycles to take effect.\n0: Counter is disabled (not clocked)\n1: Counter is enabled (counting up)"]
        #[inline(always)]
        pub fn wdt_enable2(
            self,
        ) -> crate::common::RegisterFieldBool<16, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<16,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Indicates actual state of counter.  May lag WDT_ENABLE2 by up to two LFCLK cycles."]
        #[inline(always)]
        pub fn wdt_enabled2(
            self,
        ) -> crate::common::RegisterFieldBool<17, 1, 0, McwdtCtl_SPEC, crate::common::R> {
            crate::common::RegisterFieldBool::<17,1,0,McwdtCtl_SPEC,crate::common::R>::from_register(self,0)
        }

        #[doc = "Resets counter 2 back to 0000.  Hardware will reset this bit after counter was reset.  This will take up to one LFCLK cycle to take effect."]
        #[inline(always)]
        pub fn wdt_reset2(
            self,
        ) -> crate::common::RegisterFieldBool<19, 1, 0, McwdtCtl_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<19,1,0,McwdtCtl_SPEC,crate::common::RW>::from_register(self,0)
        }
    }
    impl ::core::default::Default for McwdtCtl {
        #[inline(always)]
        fn default() -> McwdtCtl {
            <crate::RegValueT<McwdtCtl_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtIntr_SPEC;
    impl crate::sealed::RegSpec for McwdtIntr_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Register"]
    pub type McwdtIntr = crate::RegValueT<McwdtIntr_SPEC>;

    impl McwdtIntr {
        #[doc = "MCWDT Interrupt Request for sub-counter 0.  This bit is set by hardware as configured by this registers.  This bit must be cleared by firmware.  Clearing this bit also prevents Reset from happening when WDT_MODE0=3."]
        #[inline(always)]
        pub fn mcwdt_int0(
            self,
        ) -> crate::common::RegisterFieldBool<0, 1, 0, McwdtIntr_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<0,1,0,McwdtIntr_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "MCWDT Interrupt Request for sub-counter 1.  This bit is set by hardware as configured by this registers.  This bit must be cleared by firmware.  Clearing this bit also prevents Reset from happening when WDT_MODE1=3."]
        #[inline(always)]
        pub fn mcwdt_int1(
            self,
        ) -> crate::common::RegisterFieldBool<1, 1, 0, McwdtIntr_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<1,1,0,McwdtIntr_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "MCWDT Interrupt Request for sub-counter 2.  This bit is set by hardware as configured by this registers.  This bit must be cleared by firmware.  Clearing this bit also prevents Reset from happening when WDT_MODE2=3."]
        #[inline(always)]
        pub fn mcwdt_int2(
            self,
        ) -> crate::common::RegisterFieldBool<2, 1, 0, McwdtIntr_SPEC, crate::common::RW> {
            crate::common::RegisterFieldBool::<2,1,0,McwdtIntr_SPEC,crate::common::RW>::from_register(self,0)
        }
    }
    impl ::core::default::Default for McwdtIntr {
        #[inline(always)]
        fn default() -> McwdtIntr {
            <crate::RegValueT<McwdtIntr_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtIntrSet_SPEC;
    impl crate::sealed::RegSpec for McwdtIntrSet_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Set Register"]
    pub type McwdtIntrSet = crate::RegValueT<McwdtIntrSet_SPEC>;

    impl McwdtIntrSet {
        #[doc = "Set interrupt for MCWDT_INT0"]
        #[inline(always)]
        pub fn mcwdt_int0(
            self,
        ) -> crate::common::RegisterFieldBool<0, 1, 0, McwdtIntrSet_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<0,1,0,McwdtIntrSet_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Set interrupt for MCWDT_INT1"]
        #[inline(always)]
        pub fn mcwdt_int1(
            self,
        ) -> crate::common::RegisterFieldBool<1, 1, 0, McwdtIntrSet_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<1,1,0,McwdtIntrSet_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Set interrupt for MCWDT_INT2"]
        #[inline(always)]
        pub fn mcwdt_int2(
            self,
        ) -> crate::common::RegisterFieldBool<2, 1, 0, McwdtIntrSet_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<2,1,0,McwdtIntrSet_SPEC,crate::common::RW>::from_register(self,0)
        }
    }
    impl ::core::default::Default for McwdtIntrSet {
        #[inline(always)]
        fn default() -> McwdtIntrSet {
            <crate::RegValueT<McwdtIntrSet_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtIntrMask_SPEC;
    impl crate::sealed::RegSpec for McwdtIntrMask_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Mask Register"]
    pub type McwdtIntrMask = crate::RegValueT<McwdtIntrMask_SPEC>;

    impl McwdtIntrMask {
        #[doc = "Interrupt Mask for sub-counter 0. The bit controls if the interrupt is forwarded to the CPU. The interrupt is blocked when the value of the bit is 0. The interrupt is forwarded if the value of the bit is 1."]
        #[inline(always)]
        pub fn mcwdt_int0(
            self,
        ) -> crate::common::RegisterFieldBool<0, 1, 0, McwdtIntrMask_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<0,1,0,McwdtIntrMask_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Interrupt Mask for sub-counter 1.  The bit controls if the interrupt is forwarded to the CPU. The interrupt is blocked when the value of the bit is 0. The interrupt is forwarded if the value of the bit is 1."]
        #[inline(always)]
        pub fn mcwdt_int1(
            self,
        ) -> crate::common::RegisterFieldBool<1, 1, 0, McwdtIntrMask_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<1,1,0,McwdtIntrMask_SPEC,crate::common::RW>::from_register(self,0)
        }

        #[doc = "Interrupt Mask for sub-counter 2.  The bit controls if the interrupt is forwarded to the CPU. The interrupt is blocked when the value of the bit is 0. The interrupt is forwarded if the value of the bit is 1."]
        #[inline(always)]
        pub fn mcwdt_int2(
            self,
        ) -> crate::common::RegisterFieldBool<2, 1, 0, McwdtIntrMask_SPEC, crate::common::RW>
        {
            crate::common::RegisterFieldBool::<2,1,0,McwdtIntrMask_SPEC,crate::common::RW>::from_register(self,0)
        }
    }
    impl ::core::default::Default for McwdtIntrMask {
        #[inline(always)]
        fn default() -> McwdtIntrMask {
            <crate::RegValueT<McwdtIntrMask_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtIntrMasked_SPEC;
    impl crate::sealed::RegSpec for McwdtIntrMasked_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Interrupt Masked Register"]
    pub type McwdtIntrMasked = crate::RegValueT<McwdtIntrMasked_SPEC>;

    impl McwdtIntrMasked {
        #[doc = "Logical and of corresponding request and mask bits."]
        #[inline(always)]
        pub fn mcwdt_int0(
            self,
        ) -> crate::common::RegisterFieldBool<0, 1, 0, McwdtIntrMasked_SPEC, crate::common::R>
        {
            crate::common::RegisterFieldBool::<0,1,0,McwdtIntrMasked_SPEC,crate::common::R>::from_register(self,0)
        }

        #[doc = "Logical and of corresponding request and mask bits."]
        #[inline(always)]
        pub fn mcwdt_int1(
            self,
        ) -> crate::common::RegisterFieldBool<1, 1, 0, McwdtIntrMasked_SPEC, crate::common::R>
        {
            crate::common::RegisterFieldBool::<1,1,0,McwdtIntrMasked_SPEC,crate::common::R>::from_register(self,0)
        }

        #[doc = "Logical and of corresponding request and mask bits."]
        #[inline(always)]
        pub fn mcwdt_int2(
            self,
        ) -> crate::common::RegisterFieldBool<2, 1, 0, McwdtIntrMasked_SPEC, crate::common::R>
        {
            crate::common::RegisterFieldBool::<2,1,0,McwdtIntrMasked_SPEC,crate::common::R>::from_register(self,0)
        }
    }
    impl ::core::default::Default for McwdtIntrMasked {
        #[inline(always)]
        fn default() -> McwdtIntrMasked {
            <crate::RegValueT<McwdtIntrMasked_SPEC> as RegisterValue<_>>::new(0)
        }
    }

    #[doc(hidden)]
    #[derive(Copy, Clone, Eq, PartialEq)]
    pub struct McwdtLock_SPEC;
    impl crate::sealed::RegSpec for McwdtLock_SPEC {
        type DataType = u32;
    }

    #[doc = "Multi-Counter Watchdog Counter Lock Register"]
    pub type McwdtLock = crate::RegValueT<McwdtLock_SPEC>;

    impl McwdtLock {
        #[doc = "Prohibits writing control and configuration registers related to this MCWDT when not equal 0 (as specified in the other register descriptions).  Requires at least two different writes to unlock.\nNote that this field is 2 bits to force multiple writes only.  Each MCWDT has a separate local lock.  LFCLK settings are locked by the global WDT_LOCK register, and this register has no effect on that."]
        #[inline(always)]
        pub fn mcwdt_lock(
            self,
        ) -> crate::common::RegisterField<
            30,
            0x3,
            1,
            0,
            mcwdt_lock::McwdtLock,
            mcwdt_lock::McwdtLock,
            McwdtLock_SPEC,
            crate::common::RW,
        > {
            crate::common::RegisterField::<
                30,
                0x3,
                1,
                0,
                mcwdt_lock::McwdtLock,
                mcwdt_lock::McwdtLock,
                McwdtLock_SPEC,
                crate::common::RW,
            >::from_register(self, 0)
        }
    }
    impl ::core::default::Default for McwdtLock {
        #[inline(always)]
        fn default() -> McwdtLock {
            <crate::RegValueT<McwdtLock_SPEC> as RegisterValue<_>>::new(0)
        }
    }
    pub mod mcwdt_lock {

        #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
        pub struct McwdtLock_SPEC;
        pub type McwdtLock = crate::EnumBitfieldStruct<u8, McwdtLock_SPEC>;
        impl McwdtLock {
            #[doc = "No effect"]
            pub const NO_CHG: Self = Self::new(0);

            #[doc = "Clears bit 0"]
            pub const CLR_0: Self = Self::new(1);

            #[doc = "Clears bit 1"]
            pub const CLR_1: Self = Self::new(2);

            #[doc = "Sets both bits 0 and 1"]
            pub const SET_01: Self = Self::new(3);
        }
    }
}