4 operation, 1 cable connection – Renesas SH7641 User Manual
Page 816
Section 20 USB Function Module
Rev. 4.00 Sep. 14, 2005 Page 766 of 982
REJ09B0023-0400
20.4 Operation
20.4.1 Cable
Connection
Cable disconnected
VBUS pin = 0 V
UDC core reset
USB cable connection
USBIFR1/VBUS = 1
USB bus connection interrupt
UDC core reset release
Bus reset reception
USBIFR0/BRST = 1
Bus reset interrupt
Wait for setup command
reception complete interrupt
USB function
Application
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 VBUS flag
(USBIFR1/VBUS)
Firmware preparations for
start of USB communication
Clear bus reset flag
(USBIFR0/BRST)
Clear FIFOs
(EP0, EP1, EP2, EP3)
Yes
No
Initial
settings
Wait for setup command
reception complete interrupt
Interrupt request
Interrupt request
Figure 20.2 Cable Connection Operation
The flowchart in figure 20.2 shows the operation in the case for section 20.8, 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.