
IX PERIPHERAL MODULES 7 (USB): USB FUNCTION CONTROLLER (USB)
S1C33E07 TECHNICAL MANUAL
EPSON
IX-1-61
IX
USB
0x300924: USB_Test (USB Test)
Name
Address
Register name
Bit
Setting
Init. R/W
Remarks
EnUSB_Test
–
Test_SE0_NAK
Test_J
Test_K
Test_Packet
D7
D6–4
D3
D2
D1
D0
0
–
0
R/W
–
R/W
0 when being read.
00300924
(B)
1 Enable USB test
0 Do nothing
–
1 Test_SE0_NAK
0 Do nothing
1 Test_J
0 Do nothing
1 Test_K
0 Do nothing
1 Test_Packet
0 Do nothing
USB_Test
(USB test)
The operation setting is done in this register for the USB test mode. Set the bit corresponding to the test mode
specified by the SetFeature request, and after completing the status stage, set the EnUSB_Test bit to 1 and perform
the test mode operation defined by the USB standard.
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
performing the test. In addition, set the EnAutoNego bit of the USB_Control register to 0 (to be cleared)
to disable 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 10 (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 10 (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
endpoint 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.)