NAKSTS=B_0x0, EPTYP=B_0x0, DPID=B_0x0
OTG device IN endpoint 4 control register
MPSIZ | Maximum packet size The application must program this field with the maximum packet size for the current logical endpoint. This value is in bytes. |
USBAEP | USB active endpoint Indicates whether this endpoint is active in the current configuration and interface. The core clears this bit for all endpoints (other than EP 0) after detecting a USB reset. After receiving the SetConfiguration and SetInterface commands, the application must program endpoint registers accordingly and set this bit. |
DPID | Endpoint data PID Applies to interrupt/bulk IN endpoints only. Contains the PID of the packet to be received or transmitted on this endpoint. The application must program the PID of the first packet to be received or transmitted on this endpoint, after the endpoint is activated. The application uses the SD0PID and SD1PID register fields to program either DATA0 or DATA1 PID. 0 (B_0x0): DATA0 1 (B_0x1): DATA1 |
NAKSTS | NAK status It indicates the following: When either the application or the core sets this bit: For non-isochronous IN endpoints: The core stops transmitting any data on an IN endpoint, even if there are data available in the Tx FIFO. For isochronous IN endpoints: The core sends out a zero-length data packet, even if there are data available in the Tx FIFO. Irrespective of this bits setting, the core always responds to SETUP data packets with an ACK handshake. 0 (B_0x0): The core is transmitting non-NAK handshakes based on the FIFO status. 1 (B_0x1): The core is transmitting NAK handshakes on this endpoint. |
EPTYP | Endpoint type This is the transfer type supported by this logical endpoint. 0 (B_0x0): Control 1 (B_0x1): Isochronous 2 (B_0x2): Bulk 3 (B_0x3): Interrupt |
STALL | STALL handshake Applies to non-control, non-isochronous IN endpoints only (access type is rw). The application sets this bit to stall all tokens from the USB host to this endpoint. If a NAK bit, Global IN NAK, or Global OUT NAK is set along with this bit, the STALL bit takes priority. Only the application can clear this bit, never the core. |
TXFNUM | Tx FIFO number These bits specify the FIFO number associated with this endpoint. Each active IN endpoint must be programmed to a separate FIFO number. This field is valid only for IN endpoints. |
CNAK | Clear NAK A write to this bit clears the NAK bit for the endpoint. |
SNAK | Set NAK A write to this bit sets the NAK bit for the endpoint. Using this bit, the application can control the transmission of NAK handshakes on an endpoint. The core can also set this bit for OUT endpoints on a transfer completed interrupt, or after a SETUP is received on the endpoint. |
SD0PID | Set DATA0 PID Applies to interrupt/bulk IN endpoints only. Writing to this field sets the endpoint data PID (DPID) field in this register to DATA0. |
SD1PID | Set DATA1 PID Writing to this field sets the endpoint data PID (DPID) field in this register to DATA1. |
EPDIS | Endpoint disable The application sets this bit to stop transmitting/receiving data on an endpoint, even before the transfer for that endpoint is complete. The application must wait for the endpoint disabled interrupt before treating the endpoint as disabled. The core clears this bit before setting the endpoint disabled interrupt. The application must set this bit only if endpoint enable is already set for this endpoint. |
EPENA | Endpoint enable The application sets this bit to start transmitting data on an endpoint. The core clears this bit before setting any of the following interrupts on this endpoint: SETUP phase done Endpoint disabled Transfer completed |