R01UH0823EJ0100 Rev.1.00
Page 907 of 1823
Jul 31, 2019
RX23W Group
32. USB 2.0 Host/Function Module (USBc)
32.2.32
PIPEn 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): PIPE1TRN 000A 0092h, PIPE2TRN 000A 0096h, PIPE3TRN 000A 009Ah, PIPE4TRN 000A 009Eh,
PIPE5TRN 000A 00A2h
b15
b14
b13
b12
b11
b10
b9
b8
b7
b6
b5
b4
b3
b2
b1
b0
Value after reset:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0