Section 22 USB Function Module (USB)
Rev. 1.00 Mar. 12, 2008 Page 892 of 1178
REJ09B0403-0100
22.10 Usage
Notes
22.10.1 Receiving Setup Data
Note the following for EPDR0s that receives 8-byte setup data:
1. As a latest setup command must be received in high priority, the write from the USB bus takes
priority over the read from the CPU. If the next setup command reception is started while the
CPU is reading data after the data is received, the read from the CPU is forcibly terminated.
Therefore, the data read after reception is started becomes invalid.
2. EPDR0s must always be read in 8-byte units. If the read is terminated at a midpoint, the data
received at the next setup cannot be read correctly.
22.10.2 Clearing the FIFO
If a USB cable is disconnected during data transfer, the data being received or transmitted may
remain in the FIFO. When disconnecting a USB cable, clear the FIFO.
While a FIFO is transferring data, it must not be cleared.
22.10.3 Overreading and Overwriting the Data Registers
Note the following when reading or writing to a data register of this module.
(1) Receive data registers
The receive data registers must not be read exceeding the valid amount of receive data, that is, the
number of bytes indicated by the receive data size register. Even for EPDR1 which has double
FIFO buffers, the maximum data to be read at one time is 64 bytes. After the data is read from the
current valid FIFO buffer, be sure to write 1 to EP1RDFN in TRG, which switches the valid
buffer, updates the receive data size to the new number of bytes, and enables the next data to be
received.
(2) Transmit data registers
The transmit data registers must not be written to exceeding the maximum packet size. Even for
EPDR2 which has double FIFO buffers, write data within the maximum packet size at one time.
After the data is written, write 1 to PKTE in TRG to switch the valid buffer and enable the next
data to be written. Data must not be continuously written to the two FIFO buffers.
Summary of Contents for H8S Family
Page 2: ...Rev 1 00 Mar 12 2008 Page ii of xIviii...
Page 8: ...Rev 1 00 Mar 12 2008 Page viii of xIviii...
Page 28: ...Rev 1 00 Mar 12 2008 Page xxviii of xIviii...
Page 48: ...Rev 1 00 Mar 12 2008 Page xlviii of xIviii...
Page 70: ...Section 1 Overview Rev 1 00 Mar 12 2008 Page 22 of 1178 REJ09B0403 0100...
Page 108: ...Section 2 CPU Rev 1 00 Mar 12 2008 Page 60 of 1178 REJ09B0403 0100...
Page 116: ...Section 3 MCU Operating Modes Rev 1 00 Mar 12 2008 Page 68 of 1178 REJ09B0403 0100...
Page 152: ...Section 5 Interrupt Controller Rev 1 00 Mar 12 2008 Page 104 of 1178 REJ09B0403 0100...
Page 206: ...Section 6 Bus Controller BSC Rev 1 00 Mar 12 2008 Page 158 of 1178 REJ09B0403 0100...
Page 420: ...Section 9 14 Bit PWM Timer PWMX Rev 1 00 Mar 12 2008 Page 372 of 1178 REJ09B0403 0100...
Page 476: ...Section 12 Watchdog Timer WDT Rev 1 00 Mar 12 2008 Page 428 of 1178 REJ09B0403 0100...
Page 552: ...Section 14 CRC Operation Circuit CRC Rev 1 00 Mar 12 2008 Page 504 of 1178 REJ09B0403 0100...
Page 712: ...Section 18 I2 C Bus Interface IIC Rev 1 00 Mar 12 2008 Page 664 of 1178 REJ09B0403 0100...
Page 804: ...Section 19 LPC Interface LPC Rev 1 00 Mar 12 2008 Page 756 of 1178 REJ09B0403 0100...
Page 838: ...Section 20 Ethernet Controller EtherC Rev 1 00 Mar 12 2008 Page 790 of 1178 REJ09B0403 0100...
Page 964: ...Section 24 RAM Rev 1 00 Mar 12 2008 Page 916 of 1178 REJ09B0403 0100...
Page 1066: ...Section 25 Flash Memory Rev 1 00 Mar 12 2008 Page 1018 of 1178 REJ09B0403 0100...
Page 1098: ...Section 26 Boundary Scan JTAG Rev 1 00 Mar 12 2008 Page 1050 of 1178 REJ09B0403 0100...
Page 1226: ...Rev 1 00 Mar 12 2008 Page 1178 of 1178 REJ09B0403 0100...
Page 1229: ......
Page 1230: ...H8S 2472 Group H8S 2462 Group Hardware Manual...