R01UH0823EJ0100 Rev.1.00
Page 936 of 1823
Jul 31, 2019
RX23W Group
32. USB 2.0 Host/Function Module (USBc)
32.3.4.4
Maximum Packet Size Setting
The DCPMAXP.MXPS[6:0] bits and the PIPEMAXP.MXPS[8:0] bits are used to specify the maximum packet size for
each pipe. DCP and PIPE1 to PIPE5 can be set to any of the maximum pipe sizes defined by USB Specification 2.0. For
PIPE6 to PIPE9, 64 bytes are the upper limit of the maximum packet size. The maximum packet size should be set before
beginning the transfer (PID[1:0] = 01b (BUF)).
DCP: Set 8, 16, 32, or 64.
PIPE1 to PIPE5: Set 8, 16, 32, or 64 when using bulk transfer.
PIPE1 and PIPE2: Set a value between 1 and 256 when using isochronous transfer.
PIPE6 to PIPE9: Set a value between 1 and 64.
32.3.4.5
Transaction Counter (For PIPE1 to PIPE5 in Reading Direction)
When the specified number of transactions has been completed in the data packet receiving direction, the USB
recognizes that the transfer has ended. Two transaction counters are provided: one is the PIPEnTRN register that
specifies the number of transactions to be executed and the other is the current counter that internally counts the number
of executed transactions. With the PIPECFG.SHTNAK bit set to 1, when the current counter value matches the specified
number of transactions, the corresponding PIPEnCTR.PID[1:0] bits are set to 00b (NAK) and the subsequent transfer is
disabled. The transactions can be counted again from the beginning by initializing the current counter of the transaction
counter function through the PIPEnTRE.TRCLR bit. The information read from PIPEnTRN differs depending on the
setting of the PIPEnTRE.TRENB bit.
The TRENB bit = 0: The specified transaction counter value can be read.
The TRENB bit = 1: The current counter value indicating the internally counted number of executed transactions
can be read.
When operating the TRCLR bit, the following should be noted.
If the transactions are being counted and PID[1:0] = 01b (BUF), the current counter cannot be cleared.
If there is any data left in the buffer, the current counter cannot be cleared.