Renesas R5S72644 Doll User Manual


  Open as PDF
of 2152
 
Section 26 USB 2.0 Host/Function Module
Page 1504 of 2108 R01UH0134EJ0400 Rev. 4.00
Sep 24, 2014
SH7262 Group, SH7264 Group
(4) Maximum Packet Size Setting
The MXPS bit in DCPMAXP and PIPEMAXP is 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 the
USB specification. 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 = BUF).
1. DCP: 64 should be set when using high-speed operation.
2. DCP: Select and set 8, 16, 32, or 64 when using full-speed operation.
3. PIPE1 to PIPE5: 512 should be set when using high-speed bulk transfer.
4. PIPE1 to PIPE5: Select and set 8, 16, 32, or 64 when using full-speed bulk transfer.
5. PIPE1 and PIPE2: Set a value between 1 and 1024 when using high-speed isochronous
transfer.
6. PIPE1 and PIPE2: Set a value between 1 and 1023 when using full-speed isochronous transfer.
7. PIPE6 to PIPE9: Set a value between 1 and 64.
The high bandwidth transfers used with interrupt transfers and isochronous transfers are not
supported.
(5) Transaction Counter (For PIPE1 to PIPE5 in Reading Direction)
When the specified number of transactions have been completed in the data packet receiving
direction, this module recognizes that the transfer has ended. The transaction counter function is
available when the pipes assigned to the D0FIFO/D1FIFO port have been set in the direction of
reading data from the buffer memory. Two transaction counters are provided: one is the TRNCNT
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. When the current counter value
matches the number of the transactions specified in TRNCNT, reading the buffer memory is
enabled. The current counter of the transaction counter function is initialized by the TRCLR bit, so
that the transactions can be counted again starting from the beginning. The information read from
TRNCNT differs depending on the setting of the TRENB bit.
TRENB = 0: The specified transaction counter value can be read.
TRENB = 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 = BUF, the current counter cannot be cleared.
If there is any data left in the buffer, the current counter cannot be cleared.