APM:Libraries
usb_regs.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USB_OTG_REGS_H__
30 #define __USB_OTG_REGS_H__
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "usb_conf.h"
34 
35 
50 #define USB_OTG_HS_BASE_ADDR 0x40040000
51 #define USB_OTG_FS_BASE_ADDR 0x50000000
52 
53 #define USB_OTG_CORE_GLOBAL_REGS_OFFSET 0x000
54 #define USB_OTG_DEV_GLOBAL_REG_OFFSET 0x800
55 #define USB_OTG_DEV_IN_EP_REG_OFFSET 0x900
56 #define USB_OTG_EP_REG_OFFSET 0x20
57 #define USB_OTG_DEV_OUT_EP_REG_OFFSET 0xB00
58 #define USB_OTG_HOST_GLOBAL_REG_OFFSET 0x400
59 #define USB_OTG_HOST_PORT_REGS_OFFSET 0x440
60 #define USB_OTG_HOST_CHAN_REGS_OFFSET 0x500
61 #define USB_OTG_CHAN_REGS_OFFSET 0x20
62 #define USB_OTG_PCGCCTL_OFFSET 0xE00
63 #define USB_OTG_DATA_FIFO_OFFSET 0x1000
64 #define USB_OTG_DATA_FIFO_SIZE 0x1000
65 
66 
67 #define USB_OTG_MAX_TX_FIFOS 15
68 
69 #define USB_OTG_HS_MAX_PACKET_SIZE 512
70 #define USB_OTG_FS_MAX_PACKET_SIZE 64
71 #define USB_OTG_MAX_EP0_SIZE 64
72 
83 typedef struct _USB_OTG_GREGS //000h
84 {
85  __IO uint32_t GOTGCTL; /* USB_OTG Control and Status Register 000h*/
86  __IO uint32_t GOTGINT; /* USB_OTG Interrupt Register 004h*/
87  __IO uint32_t GAHBCFG; /* Core AHB Configuration Register 008h*/
88  __IO uint32_t GUSBCFG; /* Core USB Configuration Register 00Ch*/
89  __IO uint32_t GRSTCTL; /* Core Reset Register 010h*/
90  __IO uint32_t GINTSTS; /* Core Interrupt Register 014h*/
91  __IO uint32_t GINTMSK; /* Core Interrupt Mask Register 018h*/
92  __IO uint32_t GRXSTSR; /* Receive Sts Q Read Register 01Ch*/
93  __IO uint32_t GRXSTSP; /* Receive Sts Q Read & POP Register 020h*/
94  __IO uint32_t GRXFSIZ; /* Receive FIFO Size Register 024h*/
95  __IO uint32_t DIEPTXF0_HNPTXFSIZ; /* EP0 / Non Periodic Tx FIFO Size Register 028h*/
96  __IO uint32_t HNPTXSTS; /* Non Periodic Tx FIFO/Queue Sts reg 02Ch*/
97  uint32_t Reserved30[2]; /* Reserved 030h*/
98  __IO uint32_t GCCFG; /* General Purpose IO Register 038h*/
99  __IO uint32_t CID; /* User ID Register 03Ch*/
100  uint32_t Reserved40[48]; /* Reserved 040h-0FFh*/
101  __IO uint32_t HPTXFSIZ; /* Host Periodic Tx FIFO Size Reg 100h*/
102  __IO uint32_t DIEPTXF[USB_OTG_MAX_TX_FIFOS];/* dev Periodic Transmit FIFO */
103 }
113 typedef struct _USB_OTG_DREGS // 800h
114 {
115  __IO uint32_t DCFG; /* dev Configuration Register 800h*/
116  __IO uint32_t DCTL; /* dev Control Register 804h*/
117  __IO uint32_t DSTS; /* dev Status Register (RO) 808h*/
118  uint32_t Reserved0C; /* Reserved 80Ch*/
119  __IO uint32_t DIEPMSK; /* dev IN Endpoint Mask 810h*/
120  __IO uint32_t DOEPMSK; /* dev OUT Endpoint Mask 814h*/
121  __IO uint32_t DAINT; /* dev All Endpoints Itr Reg 818h*/
122  __IO uint32_t DAINTMSK; /* dev All Endpoints Itr Mask 81Ch*/
123  uint32_t Reserved20; /* Reserved 820h*/
124  uint32_t Reserved9; /* Reserved 824h*/
125  __IO uint32_t DVBUSDIS; /* dev VBUS discharge Register 828h*/
126  __IO uint32_t DVBUSPULSE; /* dev VBUS Pulse Register 82Ch*/
127  __IO uint32_t DTHRCTL; /* dev thr 830h*/
128  __IO uint32_t DIEPEMPMSK; /* dev empty msk 834h*/
129  __IO uint32_t DEACHINT; /* dedicated EP interrupt 838h*/
130  __IO uint32_t DEACHMSK; /* dedicated EP msk 83Ch*/
131  uint32_t Reserved40; /* dedicated EP mask 840h*/
132  __IO uint32_t DINEP1MSK; /* dedicated EP mask 844h*/
133  uint32_t Reserved44[15]; /* Reserved 844-87Ch*/
134  __IO uint32_t DOUTEP1MSK; /* dedicated EP msk 884h*/
135 }
145 typedef struct _USB_OTG_INEPREGS
146 {
147  __IO uint32_t DIEPCTL; /* dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h*/
148  uint32_t Reserved04; /* Reserved 900h + (ep_num * 20h) + 04h*/
149  __IO uint32_t DIEPINT; /* dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h*/
150  uint32_t Reserved0C; /* Reserved 900h + (ep_num * 20h) + 0Ch*/
151  __IO uint32_t DIEPTSIZ; /* IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h*/
152  __IO uint32_t DIEPDMA; /* IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h*/
153  __IO uint32_t DTXFSTS;/*IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h*/
154  uint32_t Reserved18; /* Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch*/
155 }
165 typedef struct _USB_OTG_OUTEPREGS
166 {
167  __IO uint32_t DOEPCTL; /* dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h*/
168  uint32_t Reserved04; /* Reserved B00h + (ep_num * 20h) + 04h*/
169  __IO uint32_t DOEPINT; /* dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h*/
170  uint32_t Reserved0C; /* Reserved B00h + (ep_num * 20h) + 0Ch*/
171  __IO uint32_t DOEPTSIZ; /* dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h*/
172  __IO uint32_t DOEPDMA; /* dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h*/
173  uint32_t Reserved18[2]; /* Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch*/
174 }
184 typedef struct _USB_OTG_HREGS
185 {
186  __IO uint32_t HCFG; /* Host Configuration Register 400h*/
187  __IO uint32_t HFIR; /* Host Frame Interval Register 404h*/
188  __IO uint32_t HFNUM; /* Host Frame Nbr/Frame Remaining 408h*/
189  uint32_t Reserved40C; /* Reserved 40Ch*/
190  __IO uint32_t HPTXSTS; /* Host Periodic Tx FIFO/ Queue Status 410h*/
191  __IO uint32_t HAINT; /* Host All Channels Interrupt Register 414h*/
192  __IO uint32_t HAINTMSK; /* Host All Channels Interrupt Mask 418h*/
193 }
203 typedef struct _USB_OTG_HC_REGS
204 {
205  __IO uint32_t HCCHAR;
206  __IO uint32_t HCSPLT;
207  __IO uint32_t HCINT;
208  __IO uint32_t HCINTMSK;
209  __IO uint32_t HCTSIZ;
210  __IO uint32_t HCDMA;
211  uint32_t Reserved[2];
212 }
222 typedef struct USB_OTG_core_regs //000h
223 {
230  __IO uint32_t *HPRT0;
231  __IO uint32_t *DFIFO[USB_OTG_MAX_TX_FIFOS];
232  __IO uint32_t *PCGCCTL;
233 }
236 {
237  uint32_t d32;
238  struct
239  {
240 uint32_t sesreqscs :
241  1;
242 uint32_t sesreq :
243  1;
244 uint32_t Reserved2_7 :
245  6;
246 uint32_t hstnegscs :
247  1;
248 uint32_t hnpreq :
249  1;
250 uint32_t hstsethnpen :
251  1;
252 uint32_t devhnpen :
253  1;
254 uint32_t Reserved12_15 :
255  4;
256 uint32_t conidsts :
257  1;
258 uint32_t dbct :
259  1;
260 uint32_t asesvld :
261  1;
262 uint32_t bsesvld :
263  1;
264 uint32_t Reserved20_31 :
265  12;
266  }
267  b;
269 
271 {
272  uint32_t d32;
273  struct
274  {
275 uint32_t Reserved0_1 :
276  2;
277 uint32_t sesenddet :
278  1;
279 uint32_t Reserved3_7 :
280  5;
281 uint32_t sesreqsucstschng :
282  1;
283 uint32_t hstnegsucstschng :
284  1;
285 uint32_t reserver10_16 :
286  7;
287 uint32_t hstnegdet :
288  1;
289 uint32_t adevtoutchng :
290  1;
291 uint32_t debdone :
292  1;
293 uint32_t Reserved31_20 :
294  12;
295  }
296  b;
299 {
300  uint32_t d32;
301  struct
302  {
303 uint32_t glblintrmsk :
304  1;
305 uint32_t hburstlen :
306  4;
307 uint32_t dmaenable :
308  1;
309 uint32_t Reserved :
310  1;
311 uint32_t nptxfemplvl_txfemplvl :
312  1;
313 uint32_t ptxfemplvl :
314  1;
315 uint32_t Reserved9_31 :
316  23;
317  }
318  b;
321 {
322  uint32_t d32;
323  struct
324  {
325 uint32_t toutcal :
326  3;
327 uint32_t Reserved3_5 :
328  3;
329 uint32_t physel :
330  1;
331 uint32_t Reserved7 :
332  1;
333 uint32_t srpcap :
334  1;
335 uint32_t hnpcap :
336  1;
337 uint32_t usbtrdtim :
338  4;
339 uint32_t Reserved14 :
340  1;
341 uint32_t phylpwrclksel :
342  1;
343 uint32_t Reserved16 :
344  1;
345 uint32_t ulpi_fsls :
346  1;
347 uint32_t ulpi_auto_res :
348  1;
349 uint32_t ulpi_clk_sus_m :
350  1;
351 uint32_t ulpi_ext_vbus_drv :
352  1;
353 uint32_t ulpi_int_vbus_ind :
354  1;
355 uint32_t term_sel_dl_pulse :
356  1;
357 uint32_t ulpi_ind_cpl :
358  1;
359 uint32_t ulpi_passthrough :
360  1;
361 uint32_t ulpi_protect_disable :
362  1;
363 uint32_t Reserved26_28 :
364  3;
365 uint32_t force_host :
366  1;
367 uint32_t force_dev :
368  1;
369 uint32_t corrupt_tx :
370  1;
371  }
372  b;
375 {
376  uint32_t d32;
377  struct
378  {
379 uint32_t csftrst :
380  1;
381 uint32_t hsftrst :
382  1;
383 uint32_t hstfrm :
384  1;
385 uint32_t Reserved3 :
386  1;
387 uint32_t rxfflsh :
388  1;
389 uint32_t txfflsh :
390  1;
391 uint32_t txfnum :
392  5;
393 uint32_t Reserved11_29 :
394  19;
395 uint32_t dmareq :
396  1;
397 uint32_t ahbidle :
398  1;
399  }
400  b;
403 {
404  uint32_t d32;
405  struct
406  {
407 uint32_t Reserved0 :
408  1;
409 uint32_t modemismatch :
410  1;
411 uint32_t otgintr :
412  1;
413 uint32_t sofintr :
414  1;
415 uint32_t rxstsqlvl :
416  1;
417 uint32_t nptxfempty :
418  1;
419 uint32_t ginnakeff :
420  1;
421 uint32_t goutnakeff :
422  1;
423 uint32_t Reserved8_9 :
424  2;
425 uint32_t erlysuspend :
426  1;
427 uint32_t usbsuspend :
428  1;
429 uint32_t usbreset :
430  1;
431 uint32_t enumdone :
432  1;
433 uint32_t isooutdrop :
434  1;
435 uint32_t eopframe :
436  1;
437 uint32_t Reserved16 :
438  1;
439 uint32_t epmismatch :
440  1;
441 uint32_t inepintr :
442  1;
443 uint32_t outepintr :
444  1;
445 uint32_t incomplisoin :
446  1;
447 uint32_t incomplisoout :
448  1;
449 uint32_t Reserved22_23 :
450  2;
451 uint32_t portintr :
452  1;
453 uint32_t hcintr :
454  1;
455 uint32_t ptxfempty :
456  1;
457 uint32_t Reserved27 :
458  1;
459 uint32_t conidstschng :
460  1;
461 uint32_t disconnect :
462  1;
463 uint32_t sessreqintr :
464  1;
465 uint32_t wkupintr :
466  1;
467  }
468  b;
471 {
472  uint32_t d32;
473  struct
474  {
475 uint32_t curmode : //1
476  1;
477 uint32_t modemismatch : //2
478  1;
479 uint32_t otgintr : //4
480  1;
481 uint32_t sofintr : //8
482  1;
483 uint32_t rxstsqlvl : //10
484  1;
485 uint32_t nptxfempty : //20
486  1;
487 uint32_t ginnakeff : //40
488  1;
489 uint32_t goutnakeff : //80
490  1;
491 uint32_t Reserved8_9 : //100
492  2;
493 uint32_t erlysuspend : //200
494  1;
495 uint32_t usbsuspend : //400
496  1;
497 uint32_t usbreset : //800
498  1;
499 uint32_t enumdone : //1000
500  1;
501 uint32_t isooutdrop : //2000
502  1;
503 uint32_t eopframe : //4000
504  1;
505 uint32_t Reserved16_17 ://8000
506  2;
507 uint32_t inepint: //10000
508  1;
509 uint32_t outepintr : //20000
510  1;
511 uint32_t incomplisoin : //40000
512  1;
513 uint32_t incomplisoout ://80000
514  1;
515 uint32_t Reserved22_23 :
516  2;
517 uint32_t portintr :
518  1;
519 uint32_t hcintr :
520  1;
521 uint32_t ptxfempty :
522  1;
523 uint32_t Reserved27 :
524  1;
525 uint32_t conidstschng :
526  1;
527 uint32_t disconnect :
528  1;
529 uint32_t sessreqintr :
530  1;
531 uint32_t wkupintr :
532  1;
533  }
534  b;
537 {
538  uint32_t d32;
539  struct
540  {
541 uint32_t epnum :
542  4;
543 uint32_t bcnt :
544  11;
545 uint32_t dpid :
546  2;
547 uint32_t pktsts :
548  4;
549 uint32_t fn :
550  4;
551 uint32_t Reserved :
552  7;
553  }
554  b;
557 {
558  uint32_t d32;
559  struct
560  {
561 uint32_t chnum :
562  4;
563 uint32_t bcnt :
564  11;
565 uint32_t dpid :
566  2;
567 uint32_t pktsts :
568  4;
569 uint32_t Reserved :
570  11;
571  }
572  b;
574 typedef union _USB_OTG_FSIZ_TypeDef
575 {
576  uint32_t d32;
577  struct
578  {
579 uint32_t startaddr :
580  16;
581 uint32_t depth :
582  16;
583  }
584  b;
587 {
588  uint32_t d32;
589  struct
590  {
591  uint32_t nptxfspcavail :
592  16;
593  uint32_t nptxqspcavail :
594  8;
595  struct
596  {
597  uint32_t terminate :
598  1;
599  uint32_t token :
600  2;
601  uint32_t chnum :
602  4;
603  } nptxqtop;
604  uint32_t Reserved :
605  1;
606  }
607  b;
610 {
611  uint32_t d32;
612  struct
613  {
614 uint32_t txfspcavail :
615  16;
616 uint32_t Reserved :
617  16;
618  }
619  b;
621 
623 {
624  uint32_t d32;
625  struct
626  {
627 uint32_t Reserved_in :
628  16;
629 uint32_t pwdn :
630  1;
631 uint32_t Reserved_17 :
632  1;
633 uint32_t vbussensingA :
634  1;
635 uint32_t vbussensingB :
636  1;
637 uint32_t sofouten :
638  1;
639 uint32_t disablevbussensing :
640  1;
641 uint32_t Reserved_out :
642  10;
643  }
644  b;
646 
647 typedef union _USB_OTG_DCFG_TypeDef
648 {
649  uint32_t d32;
650  struct
651  {
652 uint32_t devspd :
653  2;
654 uint32_t nzstsouthshk :
655  1;
656 uint32_t Reserved3 :
657  1;
658 uint32_t devaddr :
659  7;
660 uint32_t perfrint :
661  2;
662 uint32_t Reserved12_31 :
663  19;
664  }
665  b;
667 typedef union _USB_OTG_DCTL_TypeDef
668 {
669  uint32_t d32;
670  struct
671  {
672 uint32_t rmtwkupsig :
673  1;
674 uint32_t sftdiscon :
675  1;
676 uint32_t gnpinnaksts :
677  1;
678 uint32_t goutnaksts :
679  1;
680 uint32_t tstctl :
681  3;
682 uint32_t sgnpinnak :
683  1;
684 uint32_t cgnpinnak :
685  1;
686 uint32_t sgoutnak :
687  1;
688 uint32_t cgoutnak :
689  1;
690 uint32_t poprg_done :
691  1;
692 uint32_t Reserved :
693  20;
694  }
695  b;
697 typedef union _USB_OTG_DSTS_TypeDef
698 {
699  uint32_t d32;
700  struct
701  {
702 uint32_t suspsts :
703  1;
704 uint32_t enumspd :
705  2;
706 uint32_t errticerr :
707  1;
708 uint32_t Reserved4_7:
709  4;
710 uint32_t soffn :
711  14;
712 uint32_t Reserved22_31 :
713  10;
714  }
715  b;
718 {
719  uint32_t d32;
720  struct
721  {
722 uint32_t xfercompl :
723  1;
724 uint32_t epdisabled :
725  1;
726 uint32_t Reserved2 :
727  1;
728 uint32_t timeout :
729  1;
730 uint32_t intktxfemp :
731  1;
732 uint32_t Reserved5 :
733  1;
734 uint32_t inepnakeff :
735  1;
736 uint32_t emptyintr :
737  1;
738 uint32_t txfifoundrn :
739  1;
740 uint32_t Reserved14_31 :
741  23;
742  }
743  b;
747 {
748  uint32_t d32;
749  struct
750  {
751 uint32_t xfercompl :
752  1;
753 uint32_t epdisabled :
754  1;
755 uint32_t Reserved2 :
756  1;
757 uint32_t setup :
758  1;
759 uint32_t Reserved04_31 :
760  28;
761  }
762  b;
765 
767 {
768  uint32_t d32;
769  struct
770  {
771 uint32_t in :
772  16;
773 uint32_t out :
774  16;
775  }
776  ep;
778 
780 {
781  uint32_t d32;
782  struct
783  {
784 uint32_t non_iso_thr_en :
785  1;
786 uint32_t iso_thr_en :
787  1;
788 uint32_t tx_thr_len :
789  9;
790 uint32_t Reserved11_15 :
791  5;
792 uint32_t rx_thr_en :
793  1;
794 uint32_t rx_thr_len :
795  9;
796 uint32_t Reserved26 :
797  1;
798 uint32_t arp_en :
799  1;
800 uint32_t Reserved28_31 :
801  4;
802  }
803  b;
806 {
807  uint32_t d32;
808  struct
809  {
810 uint32_t mps :
811  11;
812 uint32_t reserved :
813  4;
814 uint32_t usbactep :
815  1;
816 uint32_t dpid :
817  1;
818 uint32_t naksts :
819  1;
820 uint32_t eptype :
821  2;
822 uint32_t snp :
823  1;
824 uint32_t stall :
825  1;
826 uint32_t txfnum :
827  4;
828 uint32_t cnak :
829  1;
830 uint32_t snak :
831  1;
832 uint32_t setd0pid :
833  1;
834 uint32_t setd1pid :
835  1;
836 uint32_t epdis :
837  1;
838 uint32_t epena :
839  1;
840  }
841  b;
844 {
845  uint32_t d32;
846  struct
847  {
848 uint32_t xfersize :
849  19;
850 uint32_t pktcnt :
851  10;
852 uint32_t mc :
853  2;
854 uint32_t Reserved :
855  1;
856  }
857  b;
860 {
861  uint32_t d32;
862  struct
863  {
864 uint32_t xfersize :
865  7;
866 uint32_t Reserved7_18 :
867  12;
868 uint32_t pktcnt :
869  2;
870 uint32_t Reserved20_28 :
871  9;
872 uint32_t supcnt :
873  2;
874  uint32_t Reserved31;
875  }
876  b;
878 typedef union _USB_OTG_HCFG_TypeDef
879 {
880  uint32_t d32;
881  struct
882  {
883 uint32_t fslspclksel :
884  2;
885 uint32_t fslssupp :
886  1;
887  }
888  b;
891 {
892  uint32_t d32;
893  struct
894  {
895 uint32_t frint :
896  16;
897 uint32_t Reserved :
898  16;
899  }
900  b;
902 
904 {
905  uint32_t d32;
906  struct
907  {
908 uint32_t frnum :
909  16;
910 uint32_t frrem :
911  16;
912  }
913  b;
916 {
917  uint32_t d32;
918  struct
919  {
920 uint32_t ptxfspcavail :
921  16;
922 uint32_t ptxqspcavail :
923  8;
924  struct
925  {
926  uint32_t terminate :
927  1;
928  uint32_t token :
929  2;
930  uint32_t chnum :
931  4;
932  uint32_t odd_even :
933  1;
934  } ptxqtop;
935  }
936  b;
939 {
940  uint32_t d32;
941  struct
942  {
943 uint32_t prtconnsts :
944  1;
945 uint32_t prtconndet :
946  1;
947 uint32_t prtena :
948  1;
949 uint32_t prtenchng :
950  1;
951 uint32_t prtovrcurract :
952  1;
953 uint32_t prtovrcurrchng :
954  1;
955 uint32_t prtres :
956  1;
957 uint32_t prtsusp :
958  1;
959 uint32_t prtrst :
960  1;
961 uint32_t Reserved9 :
962  1;
963 uint32_t prtlnsts :
964  2;
965 uint32_t prtpwr :
966  1;
967 uint32_t prttstctl :
968  4;
969 uint32_t prtspd :
970  2;
971 uint32_t Reserved19_31 :
972  13;
973  }
974  b;
977 {
978  uint32_t d32;
979  struct
980  {
981 uint32_t chint :
982  16;
983 uint32_t Reserved :
984  16;
985  }
986  b;
989 {
990  uint32_t d32;
991  struct
992  {
993 uint32_t chint :
994  16;
995 uint32_t Reserved :
996  16;
997  }
998  b;
1001 {
1002  uint32_t d32;
1003  struct
1004  {
1005 uint32_t mps :
1006  11;
1007 uint32_t epnum :
1008  4;
1009 uint32_t epdir :
1010  1;
1011 uint32_t Reserved :
1012  1;
1013 uint32_t lspddev :
1014  1;
1015 uint32_t eptype :
1016  2;
1017 uint32_t multicnt :
1018  2;
1019 uint32_t devaddr :
1020  7;
1021 uint32_t oddfrm :
1022  1;
1023 uint32_t chdis :
1024  1;
1025 uint32_t chen :
1026  1;
1027  }
1028  b;
1031 {
1032  uint32_t d32;
1033  struct
1034  {
1035 uint32_t prtaddr :
1036  7;
1037 uint32_t hubaddr :
1038  7;
1039 uint32_t xactpos :
1040  2;
1041 uint32_t compsplt :
1042  1;
1043 uint32_t Reserved :
1044  14;
1045 uint32_t spltena :
1046  1;
1047  }
1048  b;
1051 {
1052  uint32_t d32;
1053  struct
1054  {
1055 uint32_t xfercompl :
1056  1;
1057 uint32_t chhltd :
1058  1;
1059 uint32_t ahberr :
1060  1;
1061 uint32_t stall :
1062  1;
1063 uint32_t nak :
1064  1;
1065 uint32_t ack :
1066  1;
1067 uint32_t nyet :
1068  1;
1069 uint32_t xacterr :
1070  1;
1071 uint32_t bblerr :
1072  1;
1073 uint32_t frmovrun :
1074  1;
1075 uint32_t datatglerr :
1076  1;
1077 uint32_t Reserved :
1078  21;
1079  }
1080  b;
1083 {
1084  uint32_t d32;
1085  struct
1086  {
1087 uint32_t xfersize :
1088  19;
1089 uint32_t pktcnt :
1090  10;
1091 uint32_t pid :
1092  2;
1093 uint32_t dopng :
1094  1;
1095  }
1096  b;
1099 {
1100  uint32_t d32;
1101  struct
1102  {
1103 uint32_t xfercompl :
1104  1;
1105 uint32_t chhltd :
1106  1;
1107 uint32_t ahberr :
1108  1;
1109 uint32_t stall :
1110  1;
1111 uint32_t nak :
1112  1;
1113 uint32_t ack :
1114  1;
1115 uint32_t nyet :
1116  1;
1117 uint32_t xacterr :
1118  1;
1119 uint32_t bblerr :
1120  1;
1121 uint32_t frmovrun :
1122  1;
1123 uint32_t datatglerr :
1124  1;
1125 uint32_t Reserved :
1126  21;
1127  }
1128  b;
1130 
1132 {
1133  uint32_t d32;
1134  struct
1135  {
1136 uint32_t stoppclk :
1137  1;
1138 uint32_t gatehclk :
1139  1;
1140 uint32_t Reserved2_3 :
1141  2;
1142 uint32_t phy_susp :
1143  1;
1144 uint32_t Reserved5_31 :
1145  27;
1146  }
1147  b;
1149 
1177 #endif //__USB_OTG_REGS_H__
1178 
1179 
1187 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1188 
uint32_t Reserved9
Definition: usb_regs.h:124
union _USB_OTG_DCTL_TypeDef USB_OTG_DCTL_TypeDef
union _USB_OTG_DTXFSTSn_TypeDef USB_OTG_DTXFSTSn_TypeDef
union _USB_OTG_HNPTXSTS_TypeDef USB_OTG_HNPTXSTS_TypeDef
__IO uint32_t DOEPCTL
Definition: usb_regs.h:167
uint32_t Reserved0C
Definition: usb_regs.h:170
struct _USB_OTG_HREGS USB_OTG_HREGS
union _USB_OTG_PCGCCTL_TypeDef USB_OTG_PCGCCTL_TypeDef
union _USB_OTG_GCCFG_TypeDef USB_OTG_GCCFG_TypeDef
__IO uint32_t DIEPINT
Definition: usb_regs.h:149
struct _USB_OTG_HC_REGS USB_OTG_HC_REGS
__IO uint32_t DCFG
Definition: usb_regs.h:115
__IO uint32_t DIEPCTL
Definition: usb_regs.h:147
__IO uint32_t HCINT
Definition: usb_regs.h:207
__IO uint32_t GRXSTSR
Definition: usb_regs.h:92
union _USB_OTG_DIEPINTn_TypeDef USB_OTG_DIEPINTn_TypeDef
#define USB_OTG_MAX_TX_FIFOS
Definition: usb_regs.h:67
__IO uint32_t DOEPINT
Definition: usb_regs.h:169
__IO uint32_t HCDMA
Definition: usb_regs.h:210
__IO uint32_t CID
Definition: usb_regs.h:99
__IO uint32_t DIEPTXF[USB_OTG_MAX_TX_FIFOS]
Definition: usb_regs.h:102
union _USB_OTG_HCTSIZn_TypeDef USB_OTG_HCTSIZn_TypeDef
__IO uint32_t HFIR
Definition: usb_regs.h:187
__IO uint32_t DOEPTSIZ
Definition: usb_regs.h:171
union _USB_OTG_DOEPINTn_TypeDef USB_OTG_DOEPINTn_TypeDef
__IO uint32_t DOEPMSK
Definition: usb_regs.h:120
__IO uint32_t DVBUSPULSE
Definition: usb_regs.h:126
uint32_t Reserved20
Definition: usb_regs.h:123
uint32_t Reserved0C
Definition: usb_regs.h:118
struct USB_OTG_core_regs USB_OTG_CORE_REGS
union _USB_OTG_DEPXFRSIZ_TypeDef USB_OTG_DEPXFRSIZ_TypeDef
__IO uint32_t GINTMSK
Definition: usb_regs.h:91
union _USB_OTG_HCSPLT_TypeDef USB_OTG_HCSPLT_TypeDef
uint32_t Reserved30[2]
Definition: usb_regs.h:97
union _USB_OTG_HAINTMSK_TypeDef USB_OTG_HAINTMSK_TypeDef
union _USB_OTG_DEPCTL_TypeDef USB_OTG_DEPCTL_TypeDef
union _USB_OTG_HCFG_TypeDef USB_OTG_HCFG_TypeDef
__IO uint32_t DIEPMSK
Definition: usb_regs.h:119
union _USB_OTG_HFNUM_TypeDef USB_OTG_HFNUM_TypeDef
__IO uint32_t HCSPLT
Definition: usb_regs.h:206
__IO uint32_t DEACHMSK
Definition: usb_regs.h:130
__IO uint32_t DVBUSDIS
Definition: usb_regs.h:125
__IO uint32_t DOEPDMA
Definition: usb_regs.h:172
union _USB_OTG_DEP0XFRSIZ_TypeDef USB_OTG_DEP0XFRSIZ_TypeDef
__IO uint32_t GOTGINT
Definition: usb_regs.h:86
union _USB_OTG_GOTGINT_TypeDef USB_OTG_GOTGINT_TypeDef
struct USB_OTG_core_regs * PUSB_OTG_CORE_REGS
__IO uint32_t DIEPEMPMSK
Definition: usb_regs.h:128
__IO uint32_t DIEPTXF0_HNPTXFSIZ
Definition: usb_regs.h:95
struct _USB_OTG_INEPREGS USB_OTG_INEPREGS
__IO uint32_t GOTGCTL
Definition: usb_regs.h:85
union _USB_OTG_GINTSTS_TypeDef USB_OTG_GINTSTS_TypeDef
union _USB_OTG_GAHBCFG_TypeDef USB_OTG_GAHBCFG_TypeDef
struct _USB_OTG_GREGS USB_OTG_GREGS
union _USB_OTG_GOTGCTL_TypeDef USB_OTG_GOTGCTL_TypeDef
__IO uint32_t HNPTXSTS
Definition: usb_regs.h:96
__IO uint32_t HCFG
Definition: usb_regs.h:186
union _USB_OTG_DTHRCTL_TypeDef USB_OTG_DTHRCTL_TypeDef
union _USB_OTG_HCINTn_TypeDef USB_OTG_HCINTn_TypeDef
__IO uint32_t DTXFSTS
Definition: usb_regs.h:153
__IO uint32_t HCINTMSK
Definition: usb_regs.h:208
union _USB_OTG_GRSTCTL_TypeDef USB_OTG_GRSTCTL_TypeDef
__IO uint32_t GRXSTSP
Definition: usb_regs.h:93
uint32_t Reserved18
Definition: usb_regs.h:154
__IO uint32_t DCTL
Definition: usb_regs.h:116
__IO uint32_t DIEPDMA
Definition: usb_regs.h:152
__IO uint32_t * PCGCCTL
Definition: usb_regs.h:232
USB_OTG_GREGS * GREGS
Definition: usb_regs.h:224
__IO uint32_t DAINTMSK
Definition: usb_regs.h:122
__IO uint32_t HPTXSTS
Definition: usb_regs.h:190
union _USB_OTG_DSTS_TypeDef USB_OTG_DSTS_TypeDef
__IO uint32_t DAINT
Definition: usb_regs.h:121
__IO uint32_t HCCHAR
Definition: usb_regs.h:205
__IO uint32_t GCCFG
Definition: usb_regs.h:98
union _USB_OTG_HCINTMSK_TypeDef USB_OTG_HCINTMSK_TypeDef
uint32_t Reserved40C
Definition: usb_regs.h:189
__IO uint32_t HAINTMSK
Definition: usb_regs.h:192
__IO uint32_t GUSBCFG
Definition: usb_regs.h:88
union _USB_OTG_DRXSTS_TypeDef USB_OTG_DRXSTS_TypeDef
__IO uint32_t GINTSTS
Definition: usb_regs.h:90
__IO uint32_t HFNUM
Definition: usb_regs.h:188
__IO uint32_t GRSTCTL
Definition: usb_regs.h:89
__IO uint32_t GAHBCFG
Definition: usb_regs.h:87
__IO uint32_t HCTSIZ
Definition: usb_regs.h:209
__IO uint32_t DINEP1MSK
Definition: usb_regs.h:132
__IO uint32_t DOUTEP1MSK
Definition: usb_regs.h:134
uint32_t Reserved0C
Definition: usb_regs.h:150
union _USB_OTG_HPRT0_TypeDef USB_OTG_HPRT0_TypeDef
uint32_t Reserved40
Definition: usb_regs.h:131
union _USB_OTG_GUSBCFG_TypeDef USB_OTG_GUSBCFG_TypeDef
union _USB_OTG_HCCHAR_TypeDef USB_OTG_HCCHAR_TypeDef
union _USB_OTG_FSIZ_TypeDef USB_OTG_FSIZ_TypeDef
__IO uint32_t DTHRCTL
Definition: usb_regs.h:127
union _USB_OTG_HAINT_TypeDef USB_OTG_HAINT_TypeDef
General low level driver configuration.
struct _USB_OTG_OUTEPREGS USB_OTG_OUTEPREGS
union _USB_OTG_GINTMSK_TypeDef USB_OTG_GINTMSK_TypeDef
__IO uint32_t DSTS
Definition: usb_regs.h:117
__IO uint32_t DIEPTSIZ
Definition: usb_regs.h:151
union _USB_OTG_DAINT_TypeDef USB_OTG_DAINT_TypeDef
__IO uint32_t DEACHINT
Definition: usb_regs.h:129
union _USB_OTG_HFRMINTRVL_TypeDef USB_OTG_HFRMINTRVL_TypeDef
void setup()
Definition: AC_PID_test.cpp:26
union _USB_OTG_HPTXSTS_TypeDef USB_OTG_HPTXSTS_TypeDef
__IO uint32_t HAINT
Definition: usb_regs.h:191
struct _USB_OTG_DREGS USB_OTG_DREGS
__IO uint32_t * HPRT0
Definition: usb_regs.h:230
union _USB_OTG_DCFG_TypeDef USB_OTG_DCFG_TypeDef
union _USB_OTG_GRXSTS_TypeDef USB_OTG_GRXFSTS_TypeDef
uint32_t Reserved40[48]
Definition: usb_regs.h:100
__IO uint32_t GRXFSIZ
Definition: usb_regs.h:94
USB_OTG_HREGS * HREGS
Definition: usb_regs.h:226
uint32_t Reserved04
Definition: usb_regs.h:168
__IO uint32_t HPTXFSIZ
Definition: usb_regs.h:101
uint32_t Reserved04
Definition: usb_regs.h:148
USB_OTG_DREGS * DREGS
Definition: usb_regs.h:225