Datasheet

Section 14 Universal Serial Bus (USB)
Rev.7.00 Dec. 24, 2008 Page 499 of 698
REJ09B0074-0700
(2) USB Cable Connection (When USB module stop or power-down mode is used)
If the USB cable enters the connection state from the disconnection state in an application (self
powered) where USB module stop or power-down mode is used, perform the operation as
shown in figure 14.4.
Connect the USB cable
USB function
Firmware
No
Yes
Receive bus reset from the host
A bus reset interrupt occurs
Start USB operating
clock oscillation
USB operating
clock stabilization time has
passed?
Cancel USB module stop 2
Clear MSTPB0 in MSTPCRB to 0
Check by using the
port function in IRQx
Clear CK48READY in UIFR3
to 0
Enable D+ pull-up by
port 36 (P36)
Initialize the firmware
Wait for setup interrupt
Yes
Yes
Yes
No
No
No
Cancel UDC core reset
(Clear UDCRST in UCTLR to 0)
Clear all FIFOs
Wait for USB operating clock
stabilization
A USB operating clock
stabilization detection
interrupt occurs.
System ready?
Power-down mode?
USB module
stopped?
Start USB module
operation
*
*
EXIRQx
EXIRQx
External interrupt IRQx*
Note:
A VBUS interrupts in the USB module cannot be detected in power-down mode or in the USB module stop state.
Accordingly, in an application (self powered) where power-down mode or USB module stop is used,VBUS
interrupts of the USB must be detected via the external interrupt pin IRQx.
In this case, the IRQx pin must be specified as both-edge sensitive. When IRQx is used, VBUS interrupts in the
USB module need not to be used.
Check the USB
cable connection
state
Figure 14.4 USB Cable Connection
(When USB Module Stop or Power-Down Mode Is Used)