41.7.13 UDPHS Endpoint Control Register (Control, Bulk, Interrupt Endpoints)

This register view is relevant only if UDPHS_EPTCFGx.EPT_TYPE = 0x0, 0x2 or 0x3.

The reset value for UDPHS_EPTCTL0 is 0x00000001.

Name: UDPHS_EPTCTLx
Offset: 0x010C + x*0x20 [x=0..15]
Reset: 0x00000000
Property: Read-only

Bit 3130292827262524 
 SHRT_PCKT        
Access R 
Reset 0 
Bit 2322212019181716 
      BUSY_BANK   
Access R 
Reset 0 
Bit 15141312111098 
 NAK_OUTNAK_INSTALL_SNTRX_SETUPTXRDYTX_COMPLTRXRDY_TXKLERR_OVFLW 
Access RRRRRRRR 
Reset 00000000 
Bit 76543210 
    NYET_DISINTDIS_DMA AUTO_VALIDEPT_ENABL 
Access RRRR 
Reset 0000 

Bit 31 – SHRT_PCKT Short Packet Interrupt Enabled (cleared upon USB reset)

For OUT endpoints: sends an Interrupt when a Short Packet has been received.

For IN endpoints: a Short Packet transmission is ensured upon end of the DMA Transfer, thus signaling a BULK or INTERRUPT end of transfer, but only if the UDPHS_DMACONTROLx register END_B_EN and UDPHS_EPTCTLx register AUTO_VALID bits are also set.

ValueDescription
0

Short Packet Interrupt is masked.

1

Short Packet Interrupt is enabled.

Bit 18 – BUSY_BANK Busy Bank Interrupt Enabled (cleared upon USB reset)

For OUT endpoints: an interrupt is sent when all banks are busy.

For IN endpoints: an interrupt is sent when all banks are free.

ValueDescription
0

BUSY_BANK Interrupt is masked.

1

BUSY_BANK Interrupt is enabled.

Bit 15 – NAK_OUT NAKOUT Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

NAKOUT Interrupt is masked.

1

NAKOUT Interrupt is enabled.

Bit 14 – NAK_IN NAKIN Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

NAKIN Interrupt is masked.

1

NAKIN Interrupt is enabled.

Bit 13 – STALL_SNT Stall Sent Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

Stall Sent Interrupt is masked.

1

Stall Sent Interrupt is enabled.

Bit 12 – RX_SETUP Received SETUP Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

Received SETUP is masked.

1

Received SETUP is enabled.

Bit 11 – TXRDY TX Packet Ready Interrupt Enabled (cleared upon USB reset)

CAUTION: Interrupt source is active as long as the corresponding UDPHS_EPTSTAx register TXRDY flag remains low. If there are no more banks available for transmitting after the software has set UDPHS_EPTSTAx/TXRDY for the last transmit packet, then the interrupt source remains inactive until the first bank becomes free again to transmit at UDPHS_EPTSTAx/TXRDY hardware clear.
ValueDescription
0

TX Packet Ready Interrupt is masked.

1

TX Packet Ready Interrupt is enabled.

Bit 10 – TX_COMPLT Transmitted IN Data Complete Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

Transmitted IN Data Complete Interrupt is masked.

1

Transmitted IN Data Complete Interrupt is enabled.

Bit 9 – RXRDY_TXKL Received OUT Data Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

Received OUT Data Interrupt is masked.

1

Received OUT Data Interrupt is enabled.

Bit 8 – ERR_OVFLW Overflow Error Interrupt Enabled (cleared upon USB reset)

ValueDescription
0

Overflow Error Interrupt is masked.

1

Overflow Error Interrupt is enabled.

Bit 4 – NYET_DIS NYET Disable (Only for High Speed Bulk OUT Endpoints) (cleared upon USB reset)

Note: According to the Universal Serial Bus Specification, Rev 2.0 (8.5.1.1 NAK Responses to OUT/DATA During PING Protocol), a NAK response to an HS Bulk OUT transfer is expected to be an unusual occurrence.
ValueDescription
0

Lets the hardware handle the handshake response for the High Speed Bulk OUT transfer.

1

Forces an ACK response to the next High Speed Bulk OUT transfer instead of a NYET response.

Bit 3 – INTDIS_DMA Interrupt Disables DMA (cleared upon USB reset)

If set, when an enabled endpoint-originated interrupt is triggered, the DMA request is disabled regardless of the UDPHS_IEN register EPT_x bit for this endpoint. Then, the firmware will have to clear or disable the interrupt source or clear this bit if transfer completion is needed.

If the exception raised is associated with the new system bank packet, then the previous DMA packet transfer is normally completed, but the new DMA packet transfer is not started (not requested).

If the exception raised is not associated to a new system bank packet (NAK_IN, NAK_OUT, etc.), then the request cancellation may happen at any time and may immediately stop the current DMA transfer.

This may be used, for example, to identify or prevent an erroneous packet to be transferred into a buffer or to complete a DMA buffer by software after reception of a short packet.

Bit 1 – AUTO_VALID Packet Auto-Valid Enabled (Not for CONTROL Endpoints) (cleared upon USB reset)

Set this bit to automatically validate the current packet and switch to the next bank for both IN and OUT endpoints.

For IN Transfer:

If this bit is set, the UDPHS_EPTSTAx register TXRDY bit is set automatically when the current bank is full and at the end of DMA buffer if the UDPHS_DMACONTROLx register END_B_EN bit is set.

The user may still set the UDPHS_EPTSTAx register TXRDY bit if the current bank is not full, unless the user needs to send a Zero Length Packet by software.

For OUT Transfer:

If this bit is set, the UDPHS_EPTSTAx register RXRDY_TXKL bit is automatically reset for the current bank when the last packet byte has been read from the bank FIFO or at the end of DMA buffer if the UDPHS_DMACONTROLx register END_B_EN bit is set. For example, to truncate a padded data packet when the actual data transfer size is reached.

The user may still clear the UDPHS_EPTSTAx register RXRDY_TXKL bit, for example, after completing a DMA buffer by software if UDPHS_DMACONTROLx register END_B_EN bit was disabled or in order to cancel the read of the remaining data bank(s).

Bit 0 – EPT_ENABL Endpoint Enable (cleared upon USB reset)

ValueDescription
0

The endpoint is disabled according to the device configuration. Endpoint 0 should always be enabled after a hardware or UDPHS bus reset and participate in the device configuration.

1

The endpoint is enabled according to the device configuration.