Datasheet
Section 22 USB Function Module (USB)
Rev. 2.00 Aug. 20, 2008 Page 863 of 1198
REJ09B0403-0200
22.5 Operation
22.5.1 Operation at Cable Connection
USB function
Application
Cable disconnected
VBUS pin = 0 V
UDC core reset
USB cable connection
IFR1.VBUSF = 1
USB bus connection interrupt
UDC core 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
in general output port
Clear VBUSF flag
(IFR1.VBUSF)
Firmware preparations for
start of USB communication
Clear bus reset flag
(IFR0.BRST)
Clear FIFOs
(EP0, EP1, EP2, EP3)
Yes
No
Initial
settings
Wait for setup command
reception complete interrupt
Interrupt request
Interrupt request
Figure 22.2 Operation at Cable Connection
The above flowchart shows the operation in the case of in section 22.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.










