⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regfile.txt

📁 Coms sensor 的USB 通信程序
💻 TXT
字号:
(1) EndpX Transfer & Fifo's Register Defination :      a. endp_en   (1 bit)  //Endpoint enable         1: Endp is enable        0: Endp is not enable     b. endp_dir  (1 bit)  //Endpoint Transfer Direction          1: Out transfer        0: In  transfer      c. pkt_xfr_num   (2 bit)  //Transfer Data Pid For ISO         00: Sigle  pkt transfer        01: Double pkt transfer        10: Triple pkt transfer        11: Reserved     d. pkt_size  (11 bit)        0-1024     e. endp_type (2 bit)        00 : Reserve        01 : ISO   Transfer         10 : Bulk  Transfer        11 : Intr  Transfer     f. nxt_data_pid[1:0]         00 : Data0 --- C3        01 : Data1 --- 4B        10 : Data2 --- 87        11 : DataM --- 0F       g. fifo initial address   (13:6) ---- 64 Bytes Jump                fifo buffer length     (13:6) ---- 64 Bytes Jump         fifo endp rd/wr temp address [13:0]        fifo appl wr/rd temp address [13:0]        fifo data count number       [13:0]         fifo over  flow    (1 bit)        fifo under flow    (1 bit)      h. fifo_soft_reset    (1 bit)        endp_ready         (1 bit)        endp_stall         (1 bit)          appl_status        (1 bit)          Endpx_conf[31:0]  = {                        // 03                         endp_buff_depth[7:0]                       // 02                       endp_start_addr[7:0]                        // 01                       endp_dir                         endp_type   [1:0]                                pkt_xfr_numb[1:0]                       pkt_max_size[10:8]                       // 00                       pkt_max_size[7:0]                       }// 04endp_usb_enable// endp_soft_reset   /* Reserved */endp_stallendp_spk_start   endp_app_readyendp_usb_readyendp_next_dpid[1:0] // 06 05usb_cur_start_addr[13:0]                 // 08 07app_cur_start_addr[13:0] // 0a 09fifo_data_count[13:0]// 0b 0c 0d 0eReserved// 0ffifo_oflow =  r012f[7]   ;   // fifo over  flowfifo_uflow =  r012f[6]   ;   // fifo under flowfifo_bempt =  r012f[5]   ;   // fifo burst empty(can not support a app read transfer)fifo_bfull =  r012f[4]   ;   // fifo burst full (can not support a app write transfer) fifo_nempt =  r012f[3]   ;   // fifo near empty (can not support a usb read transfer) fifo_nfull =  r012f[2]   ;   // fifo near full  (can not support a usb wrtie transfer) fifo_fempt =  r012f[1]   ;   // fifo fully emptyfifo_ffull =  r012f[0]   ;   // fifo fully full             ///////////////////////////////////////////////////////////// 16 General Purpose Registers   //////////////////////////////////////////////////////////////////00: USB Status Registersbit7   Hign Speed              // Indicate The device is plug into a high speed hostbit6   usb_have_attach	     // Indicate The device has attached to the hostbit5   usb_normal_mode	     // Indicate The device work in the normal modebit4   usb_wakeup_enable	// Indicate The device can go into the wakeup modebit3   usb_test_mode	     // Set the USB Control in the test modebit2   usb_int_enable	     // Enable Interruptbit1   usb_go_suspend	     // Indicate the device is in the suspend mode    bit0   Soft Reset              // Software reset for the whole usb control 01:      Configuration[7:0]      // Indicated the device's Configuration Value                              // Only set_configuration command can change its value02:       Device Address[7:0]     // Indicated the device's Address Value                             // Only set_address command can change its value     03:  VSTA     (Vendor-Specific Test Mode Status)     04: [7:5]   test_reg[2:0] [4]     Vctload_M[3:0]   Vctl[3:0]   05:  Endp 0 Status & Controlbit7     ep0 fifo full    // Endp 0 fifo fullbit6     ep0 fifo empty   // Endp 0 fifo empty bit5     ep0 read ready   // Fifo is ready for MCU to readbit4     ep0 write ready  // Fifo is ready for MCU to writebit3     ep0 soft reset   //  bit2     ep0 fifo done    // For Short Packet write transferbit1     ep0 fifo stall   // Endp 0 is Stalled bit0     ep0 fifo clear   // Flush Endp 0 Fifo06:  ep0 fifo data count [7:0]07:  ep0 fifo data port   // For MCU to Access08: Interrupt Enable 1    // USB  Interrupt Enable bit 09: Interrupt Enable 2    // Endp Interrupt Enable bit0a: Interrupt Enable 3    // Fifo Error Interrupt Enable bit 0b: Interrupt Enable 4    // Reserved0c: Interrupt Source 1    // USB  Interrupt Sourcebit7     endp0_fifo_err     bit6     usb_command_errbit5     usb_resumebit4     usb_suspendbit3     usb_resetbit2     usb_endp0_inbit1     usb_endp0_outbit0     usb_endp0_setup    0d: Interrupt Source 2  // Endp Interrupt Sourcebit0     endp1_usb_intrbit1     endp2_usb_intrbit2     endp3_usb_intrbit3     endp4_usb_intrbit4     endp5_usb_intrbit5     endp6_usb_intrbit6     endp7_usb_intrbit7     endp8_usb_intr0e: Interrupt Source 3 // Endp Fifo Error Interruptbit0     endp1_fifo_errbit1     endp2_fifo_errbit2     endp3_fifo_errbit3     endp4_fifo_errbit4     endp5_fifo_errbit5     endp6_fifo_errbit6     endp7_fifo_errbit7     endp8_fifo_err      0f: Interrupt Souce 4 // Reserved                      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -