How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 915 of 1852
Nov 30, 2020
RX23W Group 32. USB 2.0 Host/Function Module (USBc)
32.2.32 Pipe n Transaction Counter Register (PIPEnTRN) (n = 1 to 5)
The PIPEnTRN register retains the setting by a USB bus reset.
When written to:
This register specifies the total of packets (number of transactions) to be received in corresponding pipe.
When read from:
This register indicates the specified number of transactions if the PIPEnTRE.TRENB bit is 0.
This register indicates the number of currently counted transactions if the PIPEnTRE.TRENB bit is 1.
The USB increments the value of the PIPEnTRN register by one when all of the following conditions are satisfied on
receiving the packet.
The PIPEnTRE.TRENB bit = 1
(PIPEnTRN set value current counter value + 1) on receiving the packet.
The payload of the received packet agrees with the setting of the PIPEMAXP.MXPS[8:0] bits.
The USB sets the value of the PIPEnTRN register to 0000h when any of the following conditions are satisfied.
(1) All of the following conditions are satisfied.
The PIPEnTRE.TRENB bit = 1
(PIPEnTRN set value = current counter value + 1) on receiving the packet.
The payload of the received packet agrees with the setting of the PIPEMAXP.MXPS[8:0] bits.
(2) All of the following conditions are satisfied.
The PIPEnTRE.TRENB bit = 1
The USB has received a short packet.
(3) All of the following conditions are satisfied.
The PIPEnTRE.TRENB bit = 1
The PIPEnTRE.TRCLR bit has been set to 1 by software.
For the pipe in the transmitting direction, set the PIPEnTRN register to 0000h.
When the transaction counter is not used, set the PIPEnTRN register to 0000h.
Setting the number of transactions to be transferred to the PIPEnTRN register is only enabled when the
PIPEnTRE.TRENB bit is 0. To modify the number of transactions to be transferred, set the TRCLR bit to 1 (to clear the
current counter value) before setting the PIPEnTRE.TRENB bit to 1.
Address(es): USB0.PIPE1TRN 000A 0092h, USB0.PIPE2TRN 000A 0096h, USB0.PIPE3TRN 000A 009Ah, USB0.PIPE4TRN 000A 009Eh,
USB0.PIPE5TRN 000A 00A2h
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Value after reset:
0000000000000000