How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 914 of 1852
Nov 30, 2020
RX23W Group 32. USB 2.0 Host/Function Module (USBc)
32.2.31 Pipe n Transaction Counter Enable Register (PIPEnTRE) (n = 1 to 5)
Note: Modify each bit in the PIPEnTRE register while the PID[1:0] bits are 00b (NAK). Before modifying these bits after modifying the
PIPEnCTR.PID[1:0] bits for the selected pipe from 01b (BUF) to 00b (NAK), check that the PIPEnCTR.PBUSY flag is 0.
However, if the USB changes the PID[1:0] bits to 00b (NAK), the PBUSY flag does not need to be checked by software.
TRCLR Bit (Transaction Counter Clear)
Clears the current value of the transaction counter corresponding to the relevant pipe and then sets the TRCLR bit to 0.
TRENB Bit (Transaction Counter Enable)
Enables or disables the transaction counter.
For the pipe in the receiving direction, setting the TRENB bit to 1 after setting the total number of the packets to be
received in the PIPEnTRN register through software allows the USB to control hardware as described below on having
received the number of packets equal to the setting of the PIPEnTRN register.
While the PIPECFG.SHTNAK bit is 1, the USB modifies the PID[1:0] bits to 00b (NAK) for the corresponding
pipe on having received the number of packets equal to the setting of the PIPEnTRN register.
While the PIPECFG.BFRE bit is 1, the USB asserts the BRDY interrupt on having received the number of packets
equal to the setting of the PIPEnTRN register and then reading the last received data.
For the pipe in the transmitting direction, set the TRENB bit to 0.
When the transaction counter is not used, set the TRENB bit to 0.
When the transaction counter is used, set the PIPEnTRN register before setting the TRENB bit to 1. Set the TRENB bit
to 1 before receiving the first packet to be counted by the transaction counter.
Address(es): USB0.PIPE1TRE 000A 0090h, USB0.PIPE2TRE 000A 0094h, USB0.PIPE3TRE 000A 0098h, USB0.PIPE4TRE 000A 009Ch,
USB0.PIPE5TRE 000A 00A0h
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
——————TRENBTRCLR————————
Value after reset:
0000000000000000
Bit Symbol Bit Name Description R/W
b7 to b0 Reserved These bits are read as 0. The write value should be 0. R/W
b8 TRCLR Transaction Counter Clear 0: Invalid
1: The current counter value is cleared.
R/W
b9 TRENB Transaction Counter Enable 0: Transaction counter is disabled.
1: Transaction counter is enabled.
R/W
b15 to b10 Reserved These bits are read as 0. The write value should be 0. R/W