SN32F260 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 113
Version 1.5
30:29
ENDP_STATE[1:0]
Endpoint Handshake State
00: NAK.
01: ACK. For IN transaction, device will handshake data0/1 to IN
transaction. For OUT transaction, device will handshake ACK to OUT
token and the following data0/1. After IN/OUT ACK transaction
completes, the ENDP_STATE will automatically return to NAK state.
10/11: INOUT_STALL: Device will handshake STALL to both IN or OUT
token.
ENDP_STATE will automatically return to NAK state after USB Setup
transaction has completed.
R/W
00
28
IN_STALL_EN
Enable EP0 to handshake STALL to EP0 IN transaction.
0: Disable
1: Enable
IN_STALL_EN enable is only effective to EP0 IN token. The EP0
handshake for EP0 OUT transaction depends on OUT_STALL_EN and
ENDP_STATE setting.
This bit will be automatically cleared to ‘0’ after
USB setup transaction has completed.
R/W
0
27
OUT_STALL_EN
Enable EP0 to handshake STALL to EP0 OUT transaction.
0: Disable
1: Enable
OUT_STALL_EN enable is only effective to EP0 OUT token. The EP0
handshake state to EP0 IN transaction depends on IN_STALL_EN and
ENDP_STATE setting.
This bit will be automatically cleared to ‘0’ after
USB setup transaction has completed.
R/W
0
26:7
Reserved
-
R
0
6:0
ENDP_CNT[6:0]
Endpoint Byte Count
For IN transaction, the ENDP_CNT indicates the byte count to be
uploaded to host. The maximum count for IN transaction should depend
on the bMaximumPacketSize0 declaration in USB Device Descriptor and
cannot exceed 64 bytes for USB FS device.
For OUT transaction, the ENDP_CNT indicates the byte count received
from host.
R/W
0
10.9.8 USB Endpoint n Control Register (USB_EPnCTL, n = 1 ~ 4)
Address Offset: 0x1C, 0x20, 0x24, 0x28
Reset value: 0x0000 0000
Bit
Name
Description
Attribute
Reset
31
ENDP_EN
EPn function enable bit
0: Disable EPn function. No handshake to EPn IN/OUT token.
1: Enable EPn function.
R/W
0
30:29
ENDP_STATE[1:0]
Endpoint Handshake State
00: NAK
For IN direction usage, device will handshake NAK to IN token.
For OUT direction usage, device will handshake NAK to OUT token.
01: ACK:
For IN direction usage, device will handshake data0/1 to IN token.
For OUT direction usage, device will handshake ACK to OUT token
and the following data0/1.
After IN/OUT ACK transaction completes, the ENDP_STATE will
automatically return to NAK state.
10/11: STALL
For IN direction usage, device will handshake STALL to IN token.
For OUT direction usage, device will handshake STALL to OUT token
and the following data0/1.
R/W
0
28:7
Reserved
-
-
0
6:0
ENDP_CNT[6:0]
Endpoint Byte Count
For IN direction usage, the ENDP_CNT indicates the byte count to be
uploaded to host.
For OUT direction usage, the ENDP_CNT indicates the byte count
received from host.
R/W
0