Datasheet
Section 16 USB Function Module (USB)
R01UH0309EJ0500 Rev. 5.00 Page 989 of 1408
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 Group
16.5.2 Cable Connection
USB function
Application
Cable disconnected
VBUS pin = 0 V
Protocol processing block reset
USB cable connection
IFR0.VBUSF = 1
USB bus connection interrupt
Protocol processing block
reset release
Bus reset reception
IFR0.BRST = 1
Bus reset interrupt
Wait for setup command
reception complete interrupt
General output port
D+ pull-up enabled?
USB module interrupt
setting
As soon as preparations are
completed, enable D+ pull-up.
Clear VBUSF flag.
(IFR0.VBUSF)
Firmware preparations for
start of USB communication
Clear bus reset flag.
(IFR0.BRST)
Clear FIFOs.
(EP0 to EP3)
Yes
No
Initial
settings
Wait for setup command
reception complete interrupt
Interrupt request
Interrupt request
Figure 16.3 Cable Connection Operation
The above flowchart shows the operation in the case of in section 16.9, Example of USB External
Circuitry.
In applications that do not require USB cable connection to be detected, processing by the USB
bus connection interrupt is not necessary. Preparations should be made with the bus-reset
interrupt.