How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 900 of 1852
Nov 30, 2020
RX23W Group 32. USB 2.0 Host/Function Module (USBc)
SQMON Flag (Sequence Toggle Bit Monitor Flag)
The SQMON flag indicates the expected value of the sequence toggle bit for the next transaction during the DCP
transfer.
The USB allows the SQMON flag to toggle upon normal completion of the transaction. However, the SQMON flag is
not allowed to toggle when a data PID mismatch occurs during the transfer in the receiving direction.
When the function controller is selected, the USB sets the SQMON flag to 1 (specifies DATA1 as the expected value)
upon successful reception of the setup packet.
When the function controller is selected, the USB does not reference the SQMON flag during the IN/OUT transaction of
the status stage, and does not allow the SQMON flag to toggle upon normal completion.
SQSET Bit (Sequence Toggle Bit Set)
The SQSET bit specifies DATA1 as the expected value of the sequence toggle bit for the next transaction during the DCP
transfer.
Do not set the SQCLR and SQSET bits to 1 simultaneously.
SQCLR Bit (Sequence Toggle Bit Clear)
The SQCLR bit specifies DATA0 as the expected value of the sequence toggle bit for the next transaction during the
DCP transfer. The SQCLR bit indicates 0.
Do not set the SQCLR and SQSET bits to 1 simultaneously.
SUREQCLR Bit (SUREQ Bit Clear)
When the host controller is selected, setting the SUREQCLR bit to 1 clears the SUREQ bit to 0. The SUREQCLR bit
indicates 0.
Set the SUREQCLR bit to 1 through software when communication has stopped with the SUREQ bit being 1 during the
setup transaction. However, for normal setup transactions, the USB automatically clears the SUREQ bit to 0 upon
completion of the transaction; therefore, clearing the SUREQ bit through software is not necessary.
Controlling the SUREQ bit through the SUREQCLR bit must be done while the DVSTCTR0.UACT bit is 0 and thus
communication is halted or while no transfer is being performed with bus disconnection detected.
When the function controller is selected, be sure to write 0 to the SUREQCLR bit.
SUREQ Bit (Setup Token Transmission)
The USB transmits the setup packet by setting the SUREQ bit to 1 when the host controller is selected.
After completing the setup transaction process, the USB generates either the SACK or SIGN interrupt and sets the
SUREQ bit to 0.
The USB also sets the SUREQ bit to 0 when software sets the SUREQCLR bit to 1.
Before setting the SUREQ bit to 1, set the DCPMAXP.DEVSEL[3:0] bits, registers USBREQ, USBVAL, USBINDX,
and USBLENG appropriately to transmit the desired USB request in the setup transaction. Before setting this bit to 1,
check that the PID[1:0] bits for the DCP are set to 00b (NAK). After setting the SUREQ bit to 1, do not modify the
DCPMAXP.DEVSEL[3:0] bits, registers USBREQ, USBVAL, USBINDX, or USBLENG until the setup transaction is
completed (the SUREQ bit = 1).
Write 1 to the SUREQ bit only when transmitting the setup token; for other purposes, write 0.
When the function controller is selected, be sure to write 0 to the SUREQ bit.
BSTS Flag (Buffer Status Flag)
Indicates whether DCP FIFO buffer access is enabled or disabled.
The meaning of the BSTS flag depends on the setting of ISEL bit in the port select register as shown below.
When the ISEL bit = 0, the BSTS flag indicates whether the received data can be read from the buffer.
When the ISEL bit = 1, the BSTS flag indicates whether the data to be transmitted can be written to the buffer.