How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 899 of 1852
Nov 30, 2020
RX23W Group 32. USB 2.0 Host/Function Module (USBc)
The USB modifies the setting of the PID[1:0] bits as follows.
The USB sets PID[1:0] bits to 11b (STALL) on receiving the data of a size exceeding the maximum packet size
when the PID[1:0] bits has been set to 01b (BUF) by software.
The USB sets PID[1:0] bits to 00b (NAK) on detecting a receive error, such as a CRC error, three consecutive
times.
The USB also sets PID[1:0] bits to 11b (STALL) on receiving the STALL handshake.
(2) When the function controller is selected
The USB modifies the setting of the PID[1:0] bits as follows.
The USB modifies the PID[1:0] bits to 00b (NAK) on receiving the setup packet. Here, the USB sets the
INTSTS0.VALID flag to 1. The setting of the PID[1:0] bits cannot be modified until the VALID flag is set to 0 by
software.
The USB sets PID[1:0] bits to 11b (STALL) on receiving the data of a size exceeding the maximum packet size
when the PID[1:0] bits have been set to 01b (BUF) by software.
The USB sets PID[1:0] bits to 1xb (STALL) on detecting the control transfer sequence error.
The USB sets PID[1:0] bits to 00b (NAK) on detecting the USB bus reset.
The USB does not check the setting of the PID[1:0] bits while the SET_ADDRESS request is processed.
The PID[1:0] bits are initialized by a USB bus reset.
CCPL Bit (Control Transfer End Enable)
When the function controller is selected, setting the CCPL bit to 1 enables the status stage of the control transfer to be
completed.
When the CCPL bit is set to 1 by software while the corresponding PID[1:0] bits are set to 01b (BUF), the USB
completes the control transfer status stage.
During control read transfer, the USB transmits the ACK handshake in response to the OUT transaction from the USB
host, and transmits the zero-length packet in response to the IN transaction from the USB host during control write or no-
data control transfer. However, on detecting the SET_ADDRESS request, the USB operates in auto response mode from
the setup stage up to the status stage completion irrespective of the setting of the CCPL bit.
The USB modifies the CCPL bit from 1 to 0 on receiving a new setup packet.
1 cannot be written to the CCPL bit by software while the INTSTS0.VALID flag is 1.
The CCPL bit is initialized by a USB bus reset.
When the host controller is selected, be sure to write 0 to the CCPL bit.
PBUSY Flag (Pipe Busy Flag)
The PBUSY flag indicates whether DCP is used or not for the transaction when USB changes the PID[1:0] bits from 01b
(BUF) to 00b (NAK).
The USB modifies the PBUSY flag from 0 to 1 upon start of the USB transaction for the relevant pipe, and modifies the
PBUSY flag from 1 to 0 upon completion of one transaction.
Reading the PBUSY flag after the PID[1:0] bits have been set to 00b (NAK) by software allows checking whether
modification of the pipe settings is possible.
For details, refer to
section 32.3.4.1, Pipe Control Register Switching Procedures.