R01UH0823EJ0100 Rev.1.00
Page 896 of 1823
Jul 31, 2019
RX23W Group
32. USB 2.0 Host/Function Module (USBc)
32.2.28
Pipe Maximum Packet Size Register (PIPEMAXP)
Note 1. The value of these bits is 0000h when no pipe is selected with the PIPESEL.PIPESEL[3:0] bits and 0040h when a pipe is
selected.
Note 2. Modify the MXPS[8:0] bits while the PIPEnCTR.PID[1:0] bits are 00b (NAK) and before the pipe is selected by the
CURPIPE[3:0] bits in the port select register. Before modifying these bits after modifying the PIPEnCTR.PID[1:0] bits for the
selected pipe from 01b (BUF) to 00b (NAK), check that the PIPEnCTR.PBUSY flag is 0. However, if the USB changes the
PID[1:0] bits to 00b (NAK), the PBUSY flag does not need to be checked by software.
Note 3. Modify the DEVSEL[3:0] bits while the PIPEnCTR.PID[1:0] bits are 00b (NAK). To modify these bits after modifying the
PIPEnCTR.PID[1:0] bits for the selected pipe from 01b (BUF) to 00b (NAK), check that the PIPEnCTR.PBUSY flag is 0.
However, if the USB changes the PID[1:0] bits to 00b (NAK), the PBUSY flag does not need to be checked by software.
The PIPEMAXP register specifies the maximum packet size for PIPE1 to PIPE9.
MXPS[8:0] Bits (Maximum Packet Size)
The MXPS[8:0] bits specify the maximum data payload (maximum packet size) for the selected pipe.
These bits should be set to the appropriate value for each transfer type based on USB Specification 2.0. Note that the
maximum value of PIPE1 and PIPE2 is 256. While MXPS[8:0] = 000h, do not write to the FIFO buffer or do not set the
PID[1:0] bits to 01b (BUF).
DEVSEL[3:0] Bits (Device Select)
When the host controller is selected, these bits specify the USB device address of the peripheral device which is the
communication target.
The DEVSEL[3:0] bits should be set after setting the address to the DEVADDn (n = 0 to 5) register corresponding to the
value to be set in the DEVSEL[3:0] bits. For example, before setting the DEVSEL[3:0] bits to 0010b, the address should
be set to DEVADD2.
When the function controller is selected, the DEVSEL[3:0] bits should be set to 0000b.
Address(es): 000A 006Ch
b15
b14
b13
b12
b11
b10
b9
b8
b7
b6
b5
b4
b3
b2
b1
b0
DEVSEL[3:0]
—
—
—
MXPS[8:0]
Value after reset:
0
0
0
0
0
0
0
0
0
0/1
0
0
0
0
0
0
Bit
Symbol
Bit Name
Description
R/W
b8 to b0
Maximum Packet Size*
PIPE1 and PIPE2:
1 byte (001h) to 256 bytes (100h)
PIPE3 to PIPE5:
8 bytes (008h), 16 bytes (010h),
32 bytes (020h), 64 bytes (040h)
(Bits [8:7] and [2:0] are not provided.)
PIPE6 to PIPE9:
1 byte (001h) to 64 bytes (040h)
(Bits [8:7] are not provided.)
R/W
b11 to b9
—
Reserved
These bits are read as 0. The write value should be 0.
R/W
b15 to b12 DEVSEL[3:0]
Device Select*
b3
b0
0 0 0 0: Address 0000
0 0 0 1: Address 0001
0 0 1 0: Address 0010
0 0 1 1: Address 0011
0 1 0 0: Address 0100
0 1 0 1: Address 0101
Settings other than above are prohibited.
R/W