SN32F280 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 241
Version 1.1
20.9.6 USB Signal Control Register (USB_SGCTL)
Address offset: 0x14
Reset value: 0x0000 0000
Bit
Name
Description
Attribute
Reset
31:3
Reserved
R
0
2
BUS_DRVEN
Enable to drive USB bus.
0: Not drive USB bus.
Write operation to BUS_DP or BUS_DN has no effect.
1: Drive USB bus.
The D+/D- bus state can be set by set BUS DP and BUS DN.
R/W
0
1
BUS_DP
USB D+ state
0: D+ state is low.
1: D+ state is high.
R/W
0
0
BUS_DN
USB D- state.
0: D- state is low.
1: D- state is high.
R/W
0
20.9.7 USB Endpoint 0 Control Register (USB_EP0CTL)
Address Offset: 0x18
Reset value: 0x0000 0000
Bit
Name
Description
Attribute
Reset
31
ENDP_EN
Enable Endpoint 0 function.
0: Disable endpoint 0 function. No handshake to endpoint0 SETUP/IN/
OUT token.
1: Enable endpoint 0 function.
R/W
0
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
R/W
0