R01UH0823EJ0100 Rev.1.00
Page 895 of 1823
Jul 31, 2019
RX23W Group
32. USB 2.0 Host/Function Module (USBc)
EPNUM[3:0] Bits (Endpoint Number)
The EPNUM[3:0] bits specify the endpoint number for the selected pipe.
Setting 0000b means an unused pipe.
Do not make the settings such that the combination of the settings of the DIR and EPNUM[3:0] bits should be the same
for two or more pipes (EPNUM[3:0] bits = 0000b can be set for all of the pipes).
The DIR bit specifies the transfer direction for the selected pipe.
When the DIR bit has been set to 0 by software, the USB uses the selected pipe in the receiving direction, and when
software has set the DIR bit to 1, the USB uses the selected pipe in the transmitting direction.
SHTNAK Bit (Pipe Disabled at End of Transfer)
The SHTNAK bit specifies whether to modify the PID[1:0] bits to 00b (NAK) upon the end of transfer when the selected
pipe is in the receiving direction.
The SHTNAK bit is valid when the selected pipe is PIPE1 to PIPE5 in the receiving direction.
When the SHTNAK bit has been set to 1 by software for the selected pipe in the receiving direction, the USB modifies
the PIPEnCTR.PID[1:0] bits corresponding to the selected pipe to 00b (NAK) on determining the end of the transfer. The
USB determines that the transfer has ended on any of the following conditions.
A short packet (including a zero-length packet) is successfully received.
The transaction counter is used and the number of packets specified by the counter are successfully received.
The DBLB bit selects either single or double buffer mode for the FIFO buffer used by the selected pipe.
The DBLB bit is valid when PIPE1 to PIPE5 are selected.
BFRE Bit (BRDY Interrupt Operation Specification)
The BFRE bit specifies the BRDY interrupt generation timing from the USB to the CPU with respect to the selected
pipe.
When the BFRE bit has been set to 1 by software and the selected pipe is in the receiving direction, the USB detects the
transfer completion and generates the BRDY interrupt on having read the relevant packet.
When the BRDY interrupt is generated with the above conditions, 1 should be written to the BCLR bit in the port control
register by software. The FIFO buffer assigned to the selected pipe is not enabled for reception until 1 is written to the
BCLR bit.
When the BFRE bit has been set to 1 by software and the selected pipe is in the transmitting direction, the USB does not
generate the BRDY interrupt.
For details, refer to
section 32.3.3.1, BRDY Interrupt
.
TYPE[1:0] Bits (Transfer Type)
The TYPE[1:0] bits select the transfer type for the pipe selected by the PIPESEL.PIPESEL[3:0] bits (selected pipe).
Before setting the PID[1:0] bits to 01b (BUF) for the selected pipe (before starting USB communication using the
selected pipe), set the TYPE[1:0] bits to a value other than 00b.