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

📄 at91sam9260_udp.html

📁 ATMEL AT91SAM9260的中段控制程序!
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</null></table>
<a name="UDP_CSR"></a><h4><a href="#UDP">UDP</a>: <i><a href="AT91SAM9260_h.html#AT91_REG">AT91_REG</a></i> UDP_CSR  <i>Endpoint Control and Status Register</i></h4><ul><null><font size="-2"><li><b>UDP</b> <i><a href="AT91SAM9260_h.html#AT91C_UDP_CSR">AT91C_UDP_CSR</a></i> 0xFFFA4030</font></null></ul><table border=1 cellpadding=0 cellspacing=0 width="100%"><null><th bgcolor="#FFFFCC"><b>Offset</b></th><th bgcolor="#FFFFCC"><b>Name</b></th><th bgcolor="#FFFFCC"><b>Description</b></th><tr><td align="CENTER" bgcolor="#FFFFCC">0</td><td align="CENTER"><a name="UDP_TXCOMP"></a><b>UDP_TXCOMP</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_TXCOMP">AT91C_UDP_TXCOMP</a></font></td><td><b>Generates an IN packet with data previously written in the DPR</b><br>This flag generates an interrupt while it is set to one.<br>Write (Cleared by the firmware)<br>0 = Clear the flag, clear the interrupt.<br>1 = No effect.<br>Read (Set by the USB peripheral)<br>0 = Data IN transaction has not been acknowledged by the Host.<br>1 = Data IN transaction is achieved, acknowledged by the Host.<br>After having issued a Data IN transaction setting TXPKTREADY, the device firmware waits for TXCOMP to be sure that the host has acknowledged the transaction.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">1</td><td align="CENTER"><a name="UDP_RX_DATA_BK0"></a><b>UDP_RX_DATA_BK0</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_RX_DATA_BK0">AT91C_UDP_RX_DATA_BK0</a></font></td><td><b>Receive Data Bank 0</b><br>This flag generates an interrupt while it is set to one.<br>Write (Cleared by the firmware)<br>0 = Notify USB peripheral device that data have been read in the FIFO's Bank 0.<br>1 = No effect.<br>Read (Set by the USB peripheral)<br>0 = No data packet has been received in the FIFO's Bank 0<br>1 = A data packet has been received, it has been stored in the FIFO's Bank 0.<br>When the device firmware has polled this bit or has been interrupted by this signal, it must transfer data from the FIFO to the microcontroller memory. The number of bytes received is available in RXBYTCENT field. Bank 0 FIFO values are read through the USB_FDRx register. Once a transfer is done, the device firmware must release Bank 0 to the USB peripheral device by clearing RX_DATA_BK0.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">2</td><td align="CENTER"><a name="UDP_RXSETUP"></a><b>UDP_RXSETUP</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_RXSETUP">AT91C_UDP_RXSETUP</a></font></td><td><b>Sends STALL to the Host (Control endpoints)</b><br>This flag generates an interrupt while it is set to one.<br>Read<br>0 = No setup packet available.<br>1 = A setup data packet has been sent by the host and is available in the FIFO.<br>Write<br>0 = Device firmware notifies the USB peripheral device that it has read the setup data in the FIFO.<br>1 = No effect.<br>This flag is used to notify the USB device firmware that a valid Setup data packet has been sent by the host and success-fully received by the USB device. The USB device firmware may transfer Setup data from the FIFO by reading the USB_FDRx register to the microcontroller memory. Once a transfer has been done, RXSETUP must be cleared by the device firmware.<br>Ensuing Data OUT transactions will not be accepted while RXSETUP is set.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">3</td><td align="CENTER"><a name="UDP_ISOERROR"></a><b>UDP_ISOERROR</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_ISOERROR">AT91C_UDP_ISOERROR</a></font></td><td><b>Isochronous error (Isochronous endpoints)</b><br>A CRC error has been detected in an isochronous transfer<br>Read<br>0 = No error in the previous isochronous transfer.<br>1 = CRC error has been detected, data available in the FIFO are corrupted.<br>Write<br>0 = reset the ISOERROR flag, clear the interrupt.<br>1 = No effect.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">4</td><td align="CENTER"><a name="UDP_TXPKTRDY"></a><b>UDP_TXPKTRDY</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_TXPKTRDY">AT91C_UDP_TXPKTRDY</a></font></td><td><b>Transmit Packet Ready</b><br>This flag is cleared by the USB device.<br>This flag is set by the USB device firmware.<br>Read<br>0 = Data values can be written in the FIFO.<br>1 = Data values can not be written in the FIFO.<br>Write<br>0 = No effect.<br>1 = A new data payload is has been written in the FIFO by the firmware and is ready to be sent.<br>This flag is used to generate a Data IN transaction (device to host). Device firmware checks that it can write a data payload in the FIFO, checking that TXPKTREADY is cleared. Transfer to the FIFO is done by writing in the USB_FDRx register. Once the data payload has been transferred to the FIFO, the firmware notifies the USB device setting TXPKTREADY to one. USB bus transactions can start. TXCOMP is set once the data payload has been received by the host.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">5</td><td align="CENTER"><a name="UDP_FORCESTALL"></a><b>UDP_FORCESTALL</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_FORCESTALL">AT91C_UDP_FORCESTALL</a></font></td><td><b>Force Stall (used by Control, Bulk and Isochronous endpoints).</b><br>Write-only<br>0 = No effect.<br>1 = Send STALL to the host.<br>Please refer to chapters 8.4.4 and 9.4.5 of the Universal Serial Bus Specification, Rev. 1.1 to get more information on the STALL handshake.<br>Control endpoints: during the data stage and status stage, this indicates that the microcontroller can not complete the request.<br>Bulk and interrupt endpoints: notify the host that the endpoint is halted.<br>The host acknowledges the STALL, device firmware is notified by the STALLSENT flag.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">6</td><td align="CENTER"><a name="UDP_RX_DATA_BK1"></a><b>UDP_RX_DATA_BK1</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_RX_DATA_BK1">AT91C_UDP_RX_DATA_BK1</a></font></td><td><b>Receive Data Bank 1 (only used by endpoints with ping-pong attributes).</b><br>This flag generates an interrupt while it is set to one.<br>Write (Cleared by the firmware)<br>0 = Notify USB device that data have been read in the FIFO&#146;s Bank 1.<br>1 = No effect.<br>Read (Set by the USB peripheral)<br>0 = No data packet has been received in the FIFO's Bank 1.<br>1 = A data packet has been received, it has been stored in FIFO's Bank 1.<br>When the device firmware has polled this bit or has been interrupted by this signal, it must transfer data from the FIFO to microcontroller memory. The number of bytes received is available in RXBYTECNT field. Bank 1 FIFO values are read through USB_FDRx register. Once a transfer is done, the device firmware must release Bank 1 to the USB device by clear-ing RX_DATA_BK1.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">7</td><td align="CENTER"><a name="UDP_DIR"></a><b>UDP_DIR</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_DIR">AT91C_UDP_DIR</a></font></td><td><b>Transfer Direction</b><br>0 = Allow Data OUT transactions in the control data stage.<br>1 = Enable Data IN transactions in the control data stage.<br>Please refer to Chapter 8.5.2 of the Universal Serial Bus Specification, Rev. 1.1 to get more information on the control data stage.<br>This bit must be set after the end of the setup stage. According to the request sent in the setup data packet, the data stage<br>will either be a device to host (DIR = 1) or host to device (DIR = 0) data transfer. It is not necessary to check this bit to reverse direction for the status stage.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">10..8</td><td align="CENTER"><a name="UDP_EPTYPE"></a><b>UDP_EPTYPE</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE">AT91C_UDP_EPTYPE</a></font></td><td><b>Endpoint type</b><font size="-1"><table bgcolor="#E3F2FF" border=1 cellpadding=0 cellspacing=0 width="100%"><null><th><b>Value</b></th><th><b>Label</b></th><th><b>Description</b></th><tr><td align="CENTER">0</td><td align="CENTER"><a name="UDP_EPTYPE_CTRL"></a><b>UDP_EPTYPE_CTRL</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_CTRL">AT91C_UDP_EPTYPE_CTRL</a></font></td><td><br>Control</td></tr>
<tr><td align="CENTER">1</td><td align="CENTER"><a name="UDP_EPTYPE_ISO_OUT"></a><b>UDP_EPTYPE_ISO_OUT</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_ISO_OUT">AT91C_UDP_EPTYPE_ISO_OUT</a></font></td><td><br>Isochronous OUT</td></tr>
<tr><td align="CENTER">2</td><td align="CENTER"><a name="UDP_EPTYPE_BULK_OUT"></a><b>UDP_EPTYPE_BULK_OUT</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_BULK_OUT">AT91C_UDP_EPTYPE_BULK_OUT</a></font></td><td><br>Bulk OUT</td></tr>
<tr><td align="CENTER">3</td><td align="CENTER"><a name="UDP_EPTYPE_INT_OUT"></a><b>UDP_EPTYPE_INT_OUT</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_INT_OUT">AT91C_UDP_EPTYPE_INT_OUT</a></font></td><td><br>Interrupt OUT</td></tr>
<tr><td align="CENTER">5</td><td align="CENTER"><a name="UDP_EPTYPE_ISO_IN"></a><b>UDP_EPTYPE_ISO_IN</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_ISO_IN">AT91C_UDP_EPTYPE_ISO_IN</a></font></td><td><br>Isochronous IN</td></tr>
<tr><td align="CENTER">6</td><td align="CENTER"><a name="UDP_EPTYPE_BULK_IN"></a><b>UDP_EPTYPE_BULK_IN</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_BULK_IN">AT91C_UDP_EPTYPE_BULK_IN</a></font></td><td><br>Bulk IN</td></tr>
<tr><td align="CENTER">7</td><td align="CENTER"><a name="UDP_EPTYPE_INT_IN"></a><b>UDP_EPTYPE_INT_IN</b><font size="-1"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPTYPE_INT_IN">AT91C_UDP_EPTYPE_INT_IN</a></font></td><td><br>Interrupt IN</td></tr>
</null></table></font>
</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">11</td><td align="CENTER"><a name="UDP_DTGLE"></a><b>UDP_DTGLE</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_DTGLE">AT91C_UDP_DTGLE</a></font></td><td><b>Data Toggle</b><br>Read-only<br>0 = Identifies DATA0 packet.<br>1 = Identifies DATA1 packet.<br>Please refer to Chapter 8 of the Universal Serial Bus Specification, Rev. 1.1 to get more information on DATA0, DATA1 packet definitions.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">15</td><td align="CENTER"><a name="UDP_EPEDS"></a><b>UDP_EPEDS</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_EPEDS">AT91C_UDP_EPEDS</a></font></td><td><b>Endpoint Enable Disable</b><br>Read<br>0 = Endpoint disabled.<br>1 = Endpoint enabled.<br>Write<br>0 = Disable endpoint.<br>1 = Enable endpoint.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">26..16</td><td align="CENTER"><a name="UDP_RXBYTECNT"></a><b>UDP_RXBYTECNT</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_RXBYTECNT">AT91C_UDP_RXBYTECNT</a></font></td><td><b>Number Of Bytes Available in the FIFO</b><br>Read-only.<br>When the host sends a data packet to the device, the USB device stores the data in the FIFO and notifies the microcontrol-ler. The microcontroller can load the data from the FIFO by reading RXBYTECENT bytes in the USB_FDRx register.</td></tr>
</null></table>
<a name="UDP_FDR"></a><h4><a href="#UDP">UDP</a>: <i><a href="AT91SAM9260_h.html#AT91_REG">AT91_REG</a></i> UDP_FDR  <i>Endpoint FIFO Data Register</i></h4><ul><null><font size="-2"><li><b>UDP</b> <i><a href="AT91SAM9260_h.html#AT91C_UDP_FDR">AT91C_UDP_FDR</a></i> 0xFFFA4050</font></null></ul><br>FIFO data value.<br>The microcontroller can push or pop values in the FIFO through this register. RXBYTECNT in the corresponding USB_CSRx register is the number of bytes to be read from the FIFO (sent by the host). The maximum number of bytes to write is fixed by the Max Packet Size in the Standard Endpoint Descriptor. It can not be more than the physical memory size associated to the endpoint. Please refer to the Universal Serial Bus Specification, Rev. 1.1 to get more information.<a name="UDP_TXVC"></a><h4><a href="#UDP">UDP</a>: <i><a href="AT91SAM9260_h.html#AT91_REG">AT91_REG</a></i> UDP_TXVC  <i>Transceiver Control Register</i></h4><ul><null><font size="-2"><li><b>UDP</b> <i><a href="AT91SAM9260_h.html#AT91C_UDP_TXVC">AT91C_UDP_TXVC</a></i> 0xFFFA4074</font></null></ul><table border=1 cellpadding=0 cellspacing=0 width="100%"><null><th bgcolor="#FFFFCC"><b>Offset</b></th><th bgcolor="#FFFFCC"><b>Name</b></th><th bgcolor="#FFFFCC"><b>Description</b></th><tr><td align="CENTER" bgcolor="#FFFFCC">8</td><td align="CENTER"><a name="UDP_TXVDIS"></a><b>UDP_TXVDIS</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_TXVDIS">AT91C_UDP_TXVDIS</a></font></td><td><b></b><br>0 = Enable the transceiver. <br>1 = Disable the transceiver.</td></tr>
<tr><td align="CENTER" bgcolor="#FFFFCC">9</td><td align="CENTER"><a name="UDP_PUON"></a><b>UDP_PUON</b><font size="-2"><br><a href="AT91SAM9260_h.html#AT91C_UDP_PUON">AT91C_UDP_PUON</a></font></td><td><b>Pull-up ON</b><br>0 = The 1.5KOhm integrated pull-up on DP is deconnected. <br>1 = The 1.5KOhm integrated pull-up on DP is connected.</td></tr>
</null></table>
</null><hr></html>

⌨️ 快捷键说明

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