-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32_svd-usb_otg_fs.ads
2107 lines (1950 loc) · 76.4 KB
/
stm32_svd-usb_otg_fs.ads
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
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L4R9.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.USB_OTG_FS is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype DCFG_DSPD_Field is HAL.UInt2;
subtype DCFG_DAD_Field is HAL.UInt7;
subtype DCFG_PFIVL_Field is HAL.UInt2;
-- OTG_FS device configuration register (OTG_FS_DCFG)
type DCFG_Register is record
DSPD : DCFG_DSPD_Field := 16#0#;
-- Device speed
NZLSOHSK : Boolean := False;
-- Non-zero-length status OUT handshake
Reserved_3_3 : HAL.Bit := 16#0#;
-- unspecified
DAD : DCFG_DAD_Field := 16#0#;
-- Device address
PFIVL : DCFG_PFIVL_Field := 16#0#;
-- Periodic frame interval
Reserved_13_31 : HAL.UInt19 := 16#1100#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DCFG_Register use record
DSPD at 0 range 0 .. 1;
NZLSOHSK at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
DAD at 0 range 4 .. 10;
PFIVL at 0 range 11 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype DCTL_TCTL_Field is HAL.UInt3;
-- OTG_FS device control register (OTG_FS_DCTL)
type DCTL_Register is record
RWUSIG : Boolean := False;
-- Remote wakeup signaling
SDIS : Boolean := False;
-- Soft disconnect
GINSTS : Boolean := False;
-- Read-only. Global IN NAK status
GONSTS : Boolean := False;
-- Read-only. Global OUT NAK status
TCTL : DCTL_TCTL_Field := 16#0#;
-- Test control
SGINAK : Boolean := False;
-- Set global IN NAK
CGINAK : Boolean := False;
-- Clear global IN NAK
SGONAK : Boolean := False;
-- Set global OUT NAK
CGONAK : Boolean := False;
-- Clear global OUT NAK
POPRGDNE : Boolean := False;
-- Power-on programming done
Reserved_12_31 : HAL.UInt20 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DCTL_Register use record
RWUSIG at 0 range 0 .. 0;
SDIS at 0 range 1 .. 1;
GINSTS at 0 range 2 .. 2;
GONSTS at 0 range 3 .. 3;
TCTL at 0 range 4 .. 6;
SGINAK at 0 range 7 .. 7;
CGINAK at 0 range 8 .. 8;
SGONAK at 0 range 9 .. 9;
CGONAK at 0 range 10 .. 10;
POPRGDNE at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype DSTS_ENUMSPD_Field is HAL.UInt2;
subtype DSTS_FNSOF_Field is HAL.UInt14;
-- OTG_FS device status register (OTG_FS_DSTS)
type DSTS_Register is record
SUSPSTS : Boolean;
-- Read-only. Suspend status
ENUMSPD : DSTS_ENUMSPD_Field;
-- Read-only. Enumerated speed
EERR : Boolean;
-- Read-only. Erratic error
Reserved_4_7 : HAL.UInt4;
-- unspecified
FNSOF : DSTS_FNSOF_Field;
-- Read-only. Frame number of the received SOF
Reserved_22_31 : HAL.UInt10;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DSTS_Register use record
SUSPSTS at 0 range 0 .. 0;
ENUMSPD at 0 range 1 .. 2;
EERR at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
FNSOF at 0 range 8 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
-- OTG_FS device IN endpoint common interrupt mask register
-- (OTG_FS_DIEPMSK)
type DIEPMSK_Register is record
XFRCM : Boolean := False;
-- Transfer completed interrupt mask
EPDM : Boolean := False;
-- Endpoint disabled interrupt mask
Reserved_2_2 : HAL.Bit := 16#0#;
-- unspecified
TOM : Boolean := False;
-- Timeout condition mask (Non-isochronous endpoints)
ITTXFEMSK : Boolean := False;
-- IN token received when TxFIFO empty mask
INEPNMM : Boolean := False;
-- IN token received with EP mismatch mask
INEPNEM : Boolean := False;
-- IN endpoint NAK effective mask
Reserved_7_31 : HAL.UInt25 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPMSK_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOM at 0 range 3 .. 3;
ITTXFEMSK at 0 range 4 .. 4;
INEPNMM at 0 range 5 .. 5;
INEPNEM at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- OTG_FS device OUT endpoint common interrupt mask register
-- (OTG_FS_DOEPMSK)
type DOEPMSK_Register is record
XFRCM : Boolean := False;
-- Transfer completed interrupt mask
EPDM : Boolean := False;
-- Endpoint disabled interrupt mask
Reserved_2_2 : HAL.Bit := 16#0#;
-- unspecified
STUPM : Boolean := False;
-- SETUP phase done mask
OTEPDM : Boolean := False;
-- OUT token received when endpoint disabled mask
Reserved_5_31 : HAL.UInt27 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPMSK_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
STUPM at 0 range 3 .. 3;
OTEPDM at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype DAINT_IEPINT_Field is HAL.UInt16;
subtype DAINT_OEPINT_Field is HAL.UInt16;
-- OTG_FS device all endpoints interrupt register (OTG_FS_DAINT)
type DAINT_Register is record
IEPINT : DAINT_IEPINT_Field;
-- Read-only. IN endpoint interrupt bits
OEPINT : DAINT_OEPINT_Field;
-- Read-only. OUT endpoint interrupt bits
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DAINT_Register use record
IEPINT at 0 range 0 .. 15;
OEPINT at 0 range 16 .. 31;
end record;
subtype DAINTMSK_IEPM_Field is HAL.UInt16;
subtype DAINTMSK_OEPINT_Field is HAL.UInt16;
-- OTG_FS all endpoints interrupt mask register (OTG_FS_DAINTMSK)
type DAINTMSK_Register is record
IEPM : DAINTMSK_IEPM_Field := 16#0#;
-- IN EP interrupt mask bits
OEPINT : DAINTMSK_OEPINT_Field := 16#0#;
-- OUT endpoint interrupt bits
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DAINTMSK_Register use record
IEPM at 0 range 0 .. 15;
OEPINT at 0 range 16 .. 31;
end record;
subtype DVBUSDIS_VBUSDT_Field is HAL.UInt16;
-- OTG_FS device VBUS discharge time register
type DVBUSDIS_Register is record
VBUSDT : DVBUSDIS_VBUSDT_Field := 16#17D7#;
-- Device VBUS discharge time
Reserved_16_31 : HAL.UInt16 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DVBUSDIS_Register use record
VBUSDT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DVBUSPULSE_DVBUSP_Field is HAL.UInt12;
-- OTG_FS device VBUS pulsing time register
type DVBUSPULSE_Register is record
DVBUSP : DVBUSPULSE_DVBUSP_Field := 16#5B8#;
-- Device VBUS pulsing time
Reserved_12_31 : HAL.UInt20 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DVBUSPULSE_Register use record
DVBUSP at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype DIEPEMPMSK_INEPTXFEM_Field is HAL.UInt16;
-- OTG_FS device IN endpoint FIFO empty interrupt mask register
type DIEPEMPMSK_Register is record
INEPTXFEM : DIEPEMPMSK_INEPTXFEM_Field := 16#0#;
-- IN EP Tx FIFO empty interrupt mask bits
Reserved_16_31 : HAL.UInt16 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPEMPMSK_Register use record
INEPTXFEM at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DIEPCTL0_MPSIZ_Field is HAL.UInt2;
subtype DIEPCTL0_EPTYP_Field is HAL.UInt2;
subtype DIEPCTL0_TXFNUM_Field is HAL.UInt4;
-- OTG_FS device control IN endpoint 0 control register (OTG_FS_DIEPCTL0)
type DIEPCTL0_Register is record
MPSIZ : DIEPCTL0_MPSIZ_Field := 16#0#;
-- Maximum packet size
Reserved_2_14 : HAL.UInt13 := 16#0#;
-- unspecified
USBAEP : Boolean := False;
-- Read-only. USB active endpoint
Reserved_16_16 : HAL.Bit := 16#0#;
-- unspecified
NAKSTS : Boolean := False;
-- Read-only. NAK status
EPTYP : DIEPCTL0_EPTYP_Field := 16#0#;
-- Read-only. Endpoint type
Reserved_20_20 : HAL.Bit := 16#0#;
-- unspecified
STALL : Boolean := False;
-- STALL handshake
TXFNUM : DIEPCTL0_TXFNUM_Field := 16#0#;
-- TxFIFO number
CNAK : Boolean := False;
-- Write-only. Clear NAK
SNAK : Boolean := False;
-- Write-only. Set NAK
Reserved_28_29 : HAL.UInt2 := 16#0#;
-- unspecified
EPDIS : Boolean := False;
-- Read-only. Endpoint disable
EPENA : Boolean := False;
-- Read-only. Endpoint enable
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPCTL0_Register use record
MPSIZ at 0 range 0 .. 1;
Reserved_2_14 at 0 range 2 .. 14;
USBAEP at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
Reserved_20_20 at 0 range 20 .. 20;
STALL at 0 range 21 .. 21;
TXFNUM at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
-- device endpoint-x interrupt register
type DIEPINT_Register is record
XFRC : Boolean := False;
-- XFRC
EPDISD : Boolean := False;
-- EPDISD
Reserved_2_2 : HAL.Bit := 16#0#;
-- unspecified
TOC : Boolean := False;
-- TOC
ITTXFE : Boolean := False;
-- ITTXFE
Reserved_5_5 : HAL.Bit := 16#0#;
-- unspecified
INEPNE : Boolean := False;
-- INEPNE
TXFE : Boolean := True;
-- Read-only. TXFE
Reserved_8_31 : HAL.UInt24 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPINT_Register use record
XFRC at 0 range 0 .. 0;
EPDISD at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOC at 0 range 3 .. 3;
ITTXFE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
INEPNE at 0 range 6 .. 6;
TXFE at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype DIEPTSIZ0_XFRSIZ_Field is HAL.UInt7;
subtype DIEPTSIZ0_PKTCNT_Field is HAL.UInt2;
-- device endpoint-0 transfer size register
type DIEPTSIZ0_Register is record
XFRSIZ : DIEPTSIZ0_XFRSIZ_Field := 16#0#;
-- Transfer size
Reserved_7_18 : HAL.UInt12 := 16#0#;
-- unspecified
PKTCNT : DIEPTSIZ0_PKTCNT_Field := 16#0#;
-- Packet count
Reserved_21_31 : HAL.UInt11 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPTSIZ0_Register use record
XFRSIZ at 0 range 0 .. 6;
Reserved_7_18 at 0 range 7 .. 18;
PKTCNT at 0 range 19 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype DTXFSTS_INEPTFSAV_Field is HAL.UInt16;
-- OTG_FS device IN endpoint transmit FIFO status register
type DTXFSTS_Register is record
INEPTFSAV : DTXFSTS_INEPTFSAV_Field;
-- Read-only. IN endpoint TxFIFO space available
Reserved_16_31 : HAL.UInt16;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTXFSTS_Register use record
INEPTFSAV at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DIEPCTL1_MPSIZ_Field is HAL.UInt11;
subtype DIEPCTL1_EPTYP_Field is HAL.UInt2;
subtype DIEPCTL1_TXFNUM_Field is HAL.UInt4;
-- OTG device endpoint-1 control register
type DIEPCTL1_Register is record
MPSIZ : DIEPCTL1_MPSIZ_Field := 16#0#;
-- MPSIZ
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- unspecified
USBAEP : Boolean := False;
-- USBAEP
EONUM_DPID : Boolean := False;
-- Read-only. EONUM/DPID
NAKSTS : Boolean := False;
-- Read-only. NAKSTS
EPTYP : DIEPCTL1_EPTYP_Field := 16#0#;
-- EPTYP
Reserved_20_20 : HAL.Bit := 16#0#;
-- unspecified
Stall : Boolean := False;
-- Stall
TXFNUM : DIEPCTL1_TXFNUM_Field := 16#0#;
-- TXFNUM
CNAK : Boolean := False;
-- Write-only. CNAK
SNAK : Boolean := False;
-- Write-only. SNAK
SD0PID_SEVNFRM : Boolean := False;
-- Write-only. SD0PID/SEVNFRM
SODDFRM_SD1PID : Boolean := False;
-- Write-only. SODDFRM/SD1PID
EPDIS : Boolean := False;
-- EPDIS
EPENA : Boolean := False;
-- EPENA
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPCTL1_Register use record
MPSIZ at 0 range 0 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
USBAEP at 0 range 15 .. 15;
EONUM_DPID at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
Reserved_20_20 at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
TXFNUM at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
SD0PID_SEVNFRM at 0 range 28 .. 28;
SODDFRM_SD1PID at 0 range 29 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
subtype DIEPTSIZ_XFRSIZ_Field is HAL.UInt19;
subtype DIEPTSIZ_PKTCNT_Field is HAL.UInt10;
subtype DIEPTSIZ_MCNT_Field is HAL.UInt2;
-- device endpoint-1 transfer size register
type DIEPTSIZ_Register is record
XFRSIZ : DIEPTSIZ_XFRSIZ_Field := 16#0#;
-- Transfer size
PKTCNT : DIEPTSIZ_PKTCNT_Field := 16#0#;
-- Packet count
MCNT : DIEPTSIZ_MCNT_Field := 16#0#;
-- Multi count
Reserved_31_31 : HAL.Bit := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPTSIZ_Register use record
XFRSIZ at 0 range 0 .. 18;
PKTCNT at 0 range 19 .. 28;
MCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype DIEPCTL_MPSIZ_Field is HAL.UInt11;
subtype DIEPCTL_EPTYP_Field is HAL.UInt2;
subtype DIEPCTL_TXFNUM_Field is HAL.UInt4;
-- OTG device endpoint-2 control register
type DIEPCTL_Register is record
MPSIZ : DIEPCTL_MPSIZ_Field := 16#0#;
-- MPSIZ
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- unspecified
USBAEP : Boolean := False;
-- USBAEP
EONUM_DPID : Boolean := False;
-- Read-only. EONUM/DPID
NAKSTS : Boolean := False;
-- Read-only. NAKSTS
EPTYP : DIEPCTL_EPTYP_Field := 16#0#;
-- EPTYP
Reserved_20_20 : HAL.Bit := 16#0#;
-- unspecified
Stall : Boolean := False;
-- Stall
TXFNUM : DIEPCTL_TXFNUM_Field := 16#0#;
-- TXFNUM
CNAK : Boolean := False;
-- Write-only. CNAK
SNAK : Boolean := False;
-- Write-only. SNAK
SD0PID_SEVNFRM : Boolean := False;
-- Write-only. SD0PID/SEVNFRM
SODDFRM : Boolean := False;
-- Write-only. SODDFRM
EPDIS : Boolean := False;
-- EPDIS
EPENA : Boolean := False;
-- EPENA
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DIEPCTL_Register use record
MPSIZ at 0 range 0 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
USBAEP at 0 range 15 .. 15;
EONUM_DPID at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
Reserved_20_20 at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
TXFNUM at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
SD0PID_SEVNFRM at 0 range 28 .. 28;
SODDFRM at 0 range 29 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
subtype DOEPCTL0_MPSIZ_Field is HAL.UInt2;
subtype DOEPCTL0_EPTYP_Field is HAL.UInt2;
-- device endpoint-0 control register
type DOEPCTL0_Register is record
MPSIZ : DOEPCTL0_MPSIZ_Field := 16#0#;
-- Read-only. MPSIZ
Reserved_2_14 : HAL.UInt13 := 16#0#;
-- unspecified
USBAEP : Boolean := True;
-- Read-only. USBAEP
Reserved_16_16 : HAL.Bit := 16#0#;
-- unspecified
NAKSTS : Boolean := False;
-- Read-only. NAKSTS
EPTYP : DOEPCTL0_EPTYP_Field := 16#0#;
-- Read-only. EPTYP
SNPM : Boolean := False;
-- SNPM
Stall : Boolean := False;
-- Stall
Reserved_22_25 : HAL.UInt4 := 16#0#;
-- unspecified
CNAK : Boolean := False;
-- Write-only. CNAK
SNAK : Boolean := False;
-- Write-only. SNAK
Reserved_28_29 : HAL.UInt2 := 16#0#;
-- unspecified
EPDIS : Boolean := False;
-- Read-only. EPDIS
EPENA : Boolean := False;
-- Write-only. EPENA
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPCTL0_Register use record
MPSIZ at 0 range 0 .. 1;
Reserved_2_14 at 0 range 2 .. 14;
USBAEP at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
SNPM at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
Reserved_22_25 at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
-- device endpoint-0 interrupt register
type DOEPINT_Register is record
XFRC : Boolean := False;
-- XFRC
EPDISD : Boolean := False;
-- EPDISD
Reserved_2_2 : HAL.Bit := 16#0#;
-- unspecified
STUP : Boolean := False;
-- STUP
OTEPDIS : Boolean := False;
-- OTEPDIS
Reserved_5_5 : HAL.Bit := 16#0#;
-- unspecified
B2BSTUP : Boolean := False;
-- B2BSTUP
Reserved_7_31 : HAL.UInt25 := 16#1#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPINT_Register use record
XFRC at 0 range 0 .. 0;
EPDISD at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
STUP at 0 range 3 .. 3;
OTEPDIS at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
B2BSTUP at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype DOEPTSIZ0_XFRSIZ_Field is HAL.UInt7;
subtype DOEPTSIZ0_STUPCNT_Field is HAL.UInt2;
-- device OUT endpoint-0 transfer size register
type DOEPTSIZ0_Register is record
XFRSIZ : DOEPTSIZ0_XFRSIZ_Field := 16#0#;
-- Transfer size
Reserved_7_18 : HAL.UInt12 := 16#0#;
-- unspecified
PKTCNT : Boolean := False;
-- Packet count
Reserved_20_28 : HAL.UInt9 := 16#0#;
-- unspecified
STUPCNT : DOEPTSIZ0_STUPCNT_Field := 16#0#;
-- SETUP packet count
Reserved_31_31 : HAL.Bit := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPTSIZ0_Register use record
XFRSIZ at 0 range 0 .. 6;
Reserved_7_18 at 0 range 7 .. 18;
PKTCNT at 0 range 19 .. 19;
Reserved_20_28 at 0 range 20 .. 28;
STUPCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype DOEPCTL_MPSIZ_Field is HAL.UInt11;
subtype DOEPCTL_EPTYP_Field is HAL.UInt2;
-- device endpoint-1 control register
type DOEPCTL_Register is record
MPSIZ : DOEPCTL_MPSIZ_Field := 16#0#;
-- MPSIZ
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- unspecified
USBAEP : Boolean := False;
-- USBAEP
EONUM_DPID : Boolean := False;
-- Read-only. EONUM/DPID
NAKSTS : Boolean := False;
-- Read-only. NAKSTS
EPTYP : DOEPCTL_EPTYP_Field := 16#0#;
-- EPTYP
SNPM : Boolean := False;
-- SNPM
Stall : Boolean := False;
-- Stall
Reserved_22_25 : HAL.UInt4 := 16#0#;
-- unspecified
CNAK : Boolean := False;
-- Write-only. CNAK
SNAK : Boolean := False;
-- Write-only. SNAK
SD0PID_SEVNFRM : Boolean := False;
-- Write-only. SD0PID/SEVNFRM
SODDFRM : Boolean := False;
-- Write-only. SODDFRM
EPDIS : Boolean := False;
-- EPDIS
EPENA : Boolean := False;
-- EPENA
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPCTL_Register use record
MPSIZ at 0 range 0 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
USBAEP at 0 range 15 .. 15;
EONUM_DPID at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
SNPM at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
Reserved_22_25 at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
SD0PID_SEVNFRM at 0 range 28 .. 28;
SODDFRM at 0 range 29 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
subtype DOEPTSIZ_XFRSIZ_Field is HAL.UInt19;
subtype DOEPTSIZ_PKTCNT_Field is HAL.UInt10;
subtype DOEPTSIZ_RXDPID_STUPCNT_Field is HAL.UInt2;
-- device OUT endpoint-1 transfer size register
type DOEPTSIZ_Register is record
XFRSIZ : DOEPTSIZ_XFRSIZ_Field := 16#0#;
-- Transfer size
PKTCNT : DOEPTSIZ_PKTCNT_Field := 16#0#;
-- Packet count
RXDPID_STUPCNT : DOEPTSIZ_RXDPID_STUPCNT_Field := 16#0#;
-- Received data PID/SETUP packet count
Reserved_31_31 : HAL.Bit := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DOEPTSIZ_Register use record
XFRSIZ at 0 range 0 .. 18;
PKTCNT at 0 range 19 .. 28;
RXDPID_STUPCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
-- OTG_FS control and status register (OTG_FS_GOTGCTL)
type GOTGCTL_Register is record
SRQSCS : Boolean := False;
-- Read-only. Session request success
SRQ : Boolean := False;
-- Session request
VBVALOEN : Boolean := False;
-- VBus valid override enable
VBVALOVAL : Boolean := False;
-- VBus valid override value
AVALOEN : Boolean := False;
-- A-peripheral session valid override enable
AVALOVAL : Boolean := False;
-- A-peripheral session valid override value
BVALOEN : Boolean := False;
-- B-peripheral session valid override enable
BVALOVAL : Boolean := False;
-- B-peripheral session valid override value
HNGSCS : Boolean := False;
-- Read-only. Host negotiation success
HNPRQ : Boolean := False;
-- HNP request
HSHNPEN : Boolean := False;
-- Host set HNP enable
DHNPEN : Boolean := True;
-- Device HNP enabled
EHEN : Boolean := False;
-- Embedded host enable
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- unspecified
CIDSTS : Boolean := False;
-- Read-only. Connector ID status
DBCT : Boolean := False;
-- Read-only. Long/short debounce time
ASVLD : Boolean := False;
-- Read-only. A-session valid
BSVLD : Boolean := False;
-- Read-only. B-session valid
CURMOD : Boolean := False;
-- Read-only. B-OTG version select
Reserved_21_31 : HAL.UInt11 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GOTGCTL_Register use record
SRQSCS at 0 range 0 .. 0;
SRQ at 0 range 1 .. 1;
VBVALOEN at 0 range 2 .. 2;
VBVALOVAL at 0 range 3 .. 3;
AVALOEN at 0 range 4 .. 4;
AVALOVAL at 0 range 5 .. 5;
BVALOEN at 0 range 6 .. 6;
BVALOVAL at 0 range 7 .. 7;
HNGSCS at 0 range 8 .. 8;
HNPRQ at 0 range 9 .. 9;
HSHNPEN at 0 range 10 .. 10;
DHNPEN at 0 range 11 .. 11;
EHEN at 0 range 12 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
CIDSTS at 0 range 16 .. 16;
DBCT at 0 range 17 .. 17;
ASVLD at 0 range 18 .. 18;
BSVLD at 0 range 19 .. 19;
CURMOD at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
-- OTG_FS interrupt register (OTG_FS_GOTGINT)
type GOTGINT_Register is record
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- unspecified
SEDET : Boolean := False;
-- Session end detected
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- unspecified
SRSSCHG : Boolean := False;
-- Session request success status change
HNSSCHG : Boolean := False;
-- Host negotiation success status change
Reserved_10_16 : HAL.UInt7 := 16#0#;
-- unspecified
HNGDET : Boolean := False;
-- Host negotiation detected
ADTOCHG : Boolean := False;
-- A-device timeout change
DBCDNE : Boolean := False;
-- Debounce done
Reserved_20_31 : HAL.UInt12 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GOTGINT_Register use record
Reserved_0_1 at 0 range 0 .. 1;
SEDET at 0 range 2 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
SRSSCHG at 0 range 8 .. 8;
HNSSCHG at 0 range 9 .. 9;
Reserved_10_16 at 0 range 10 .. 16;
HNGDET at 0 range 17 .. 17;
ADTOCHG at 0 range 18 .. 18;
DBCDNE at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- OTG_FS AHB configuration register (OTG_FS_GAHBCFG)
type GAHBCFG_Register is record
GINTMSK : Boolean := False;
-- Global interrupt mask
Reserved_1_6 : HAL.UInt6 := 16#0#;
-- unspecified
TXFELVL : Boolean := False;
-- TxFIFO empty level
PTXFELVL : Boolean := False;
-- Periodic TxFIFO empty level
Reserved_9_31 : HAL.UInt23 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GAHBCFG_Register use record
GINTMSK at 0 range 0 .. 0;
Reserved_1_6 at 0 range 1 .. 6;
TXFELVL at 0 range 7 .. 7;
PTXFELVL at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype GUSBCFG_TOCAL_Field is HAL.UInt3;
subtype GUSBCFG_TRDT_Field is HAL.UInt4;
-- OTG_FS USB configuration register (OTG_FS_GUSBCFG)
type GUSBCFG_Register is record
TOCAL : GUSBCFG_TOCAL_Field := 16#0#;
-- FS timeout calibration
Reserved_3_5 : HAL.UInt3 := 16#0#;
-- unspecified
PHYSEL : Boolean := False;
-- Read-only. Should be 1 (Full speed) as HS is not supported
Reserved_7_7 : HAL.Bit := 16#0#;
-- unspecified
SRPCAP : Boolean := False;
-- SRP-capable
HNPCAP : Boolean := True;
-- HNP-capable
TRDT : GUSBCFG_TRDT_Field := 16#2#;
-- USB turnaround time
Reserved_14_28 : HAL.UInt15 := 16#0#;
-- unspecified
FHMOD : Boolean := False;
-- Force host mode
FDMOD : Boolean := False;
-- Force device mode
CTXPKT : Boolean := False;
-- Corrupt Tx packet (debug purposes only)
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GUSBCFG_Register use record
TOCAL at 0 range 0 .. 2;
Reserved_3_5 at 0 range 3 .. 5;
PHYSEL at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
SRPCAP at 0 range 8 .. 8;
HNPCAP at 0 range 9 .. 9;
TRDT at 0 range 10 .. 13;
Reserved_14_28 at 0 range 14 .. 28;
FHMOD at 0 range 29 .. 29;
FDMOD at 0 range 30 .. 30;
CTXPKT at 0 range 31 .. 31;
end record;
subtype GRSTCTL_TXFNUM_Field is HAL.UInt5;
-- OTG_FS reset register (OTG_FS_GRSTCTL)
type GRSTCTL_Register is record
CSRST : Boolean := False;
-- Core soft reset
PSRST : Boolean := False;
-- Partial soft reset
FCRST : Boolean := False;
-- Host frame counter reset
Reserved_3_3 : HAL.Bit := 16#0#;
-- unspecified
RXFFLSH : Boolean := False;
-- Rx FIFO flush
TXFFLSH : Boolean := False;
-- Tx FIFO flush
TXFNUM : GRSTCTL_TXFNUM_Field := 16#0#;
-- Tx FIFO number
Reserved_11_30 : HAL.UInt20 := 16#40000#;
-- unspecified
AHBIDL : Boolean := False;
-- Read-only. AHB master idle
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for GRSTCTL_Register use record
CSRST at 0 range 0 .. 0;
PSRST at 0 range 1 .. 1;
FCRST at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
RXFFLSH at 0 range 4 .. 4;
TXFFLSH at 0 range 5 .. 5;
TXFNUM at 0 range 6 .. 10;
Reserved_11_30 at 0 range 11 .. 30;
AHBIDL at 0 range 31 .. 31;
end record;
-- OTG_FS core interrupt register (OTG_FS_GINTSTS)
type GINTSTS_Register is record
CMOD : Boolean := False;
-- Read-only. Current mode of operation
MMIS : Boolean := False;
-- Mode mismatch interrupt
OTGINT : Boolean := False;
-- Read-only. OTG interrupt
SOF : Boolean := False;
-- Start of frame
RXFLVL : Boolean := False;
-- Read-only. Rx FIFO non-empty
NPTXFE : Boolean := True;
-- Read-only. Non-periodic Tx FIFO empty
GINAKEFF : Boolean := False;
-- Read-only. Global IN non-periodic NAK effective
GOUTNAKEFF : Boolean := False;
-- Read-only. Global OUT NAK effective
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- unspecified
ESUSP : Boolean := False;
-- Early suspend
USBSUSP : Boolean := False;
-- USB suspend
USBRST : Boolean := False;
-- USB reset
ENUMDNE : Boolean := False;
-- Enumeration done
ISOODRP : Boolean := False;
-- Isochronous OUT packet dropped interrupt
EOPF : Boolean := False;
-- End of periodic frame interrupt
Reserved_16_17 : HAL.UInt2 := 16#0#;
-- unspecified
IEPINT : Boolean := False;
-- Read-only. IN endpoint interrupt
OEPINT : Boolean := False;
-- Read-only. OUT endpoint interrupt
IISOIXFR : Boolean := False;
-- Incomplete isochronous IN transfer
IPXFR_INCOMPISOOUT : Boolean := False;
-- Incomplete periodic transfer(Host mode)/Incomplete isochronous OUT
-- transfer(Device mode)