28 USB FUNCTION CONTROLLER (USB)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
28-37
D7
EnUSB_Test
When this bit is set to 1, if one of the lower order 4 bits in the USB_Test register is set to 1, the IC will
go into the test mode corresponding to the bit. When performing the test mode, the DisBusDetect bit of
the USB_Control register must be set to 1 not to detect the USB suspend and the reset before perform-
ing the test. In addition, set the EnAutoNego bit of the USB_Control register to 0 (to be cleared) to dis-
able the Auto Negotiation.
Note that the change to the test mode must be done after completing the status stage for the SetFeature
request.
D[6:4]
Reserved
D3
Test_SE0_NAK
By setting this bit to 1 and the EnUSB_Test bit to 1, the Test_SE0_NAK test mode can start.
D2
Test_J
By setting this bit to 1 and the EnUSB_Test bit to 1, the Test_J test mode can start. In this test mode,
before EnUSB_Test bit is set to 1, set OpMode to 0x2 (Disable Bitstuffing and NRZI encoding).
D1
Test_K
By setting this bit to 1 and the EnUSB_Test bit to 1, the Test_K test mode can start. In this test mode,
before EnUSB_Test bit is set to 1, set OpMode to 0x2 (Disable Bitstuffing and NRZI encoding).
D0
Test_Packet
By setting this bit to 1, the Test_Packet test mode can start.
Since this test mode uses the endpoint EPc, set the followings.
(1) Set the MaxPacketSize of the endpoint EPc to 64 or more, the direction of transfer to IN and the
EndPointNumber to 0xf to make the endpoint be ready to use. And allocate the FIFO of the end-
point EPc for 64 bytes or more.
(2) Do not overlap the above setting with the settings of the endpoints EPa and EPb.
Or clear the EPaConfig_0.EnEndPoint bit and EPbConfig_0.EnEndPoint bit.
(3) Clear the FIFO of the EPc and write data for the following test packet into this FIFO.
(4) Set the EnIN_TranErr of the EPcIntEnb register to 0 (clear this bit).
IN_TranErr status is set to 1 at every time the Test Packet transmission completes.
The data to write into the FIFO in the packet transmission test mode are the following 53 bytes.
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee,
0xee, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0xdf,
0xef, 0xf7, 0xfb, 0xfd, 0xfc, 0x7e, 0xbf, 0xdf,
0xef, 0xf7, 0xfb, 0xfd, 0x7e
Since the SIE adds the PID and CRC to the test packet when sending it, the data to write into the FIFO are
from “the data after the DATA 0 PID” to “the data before the CRC16” that are described as the test packet
data in the USB standard Rev.2.0. (Note that Test Packet is defined only HS mode in USB specification.)
EPnControl (Endpoint Control)
Register name Address
Bit
Name
Setting
Init. R/W
Remarks
EPnControl
(Endpoint
control)
0x300c25
(8 bits)
D7
AllForceNAK
1 Set all ForceNAK
0 Do nothing
0
W 0 when being read.
D6
EPrForceSTALL
1 Set EP’s ForceSTALL
0 Do nothing
0
W
D5
AllFIFO_Clr
1 Clear all FIFO
0 Do nothing
0
W
D4–1 –
–
–
–
D0
EP0FIFO_Clr
1 Clear EP0 FIFO
0 Do nothing
0
W
This register sets operations of entire endpoints, and display them.
D7
AllForceNAK
Sets the ForceNAK bit of all endpoints to 1.