Datasheet

Section 14 Universal Serial Bus (USB)
Rev.7.00 Dec. 24, 2008 Page 497 of 698
REJ09B0074-0700
14.5 Communication Operation
14.5.1 Initialization
The USB must be initialized as described in the flowchart in figure 14.2.
Cancel power-on reset
USB function Firmware
No
Yes
Set each interrupt
Start USB operationg clock
oscillation.
USB
operating clock
stabilization time has
passed?
Cancel USB module stop 2
(Clear MSTPB0 in
MSTPCRB to 0)
Clear CK48READY in UIFR3 to 0
USB module stop 2
(Write to 1 MSTPB0 in MSTPCRB)
Wait for USB cable
connection
Yes
Yes
No
No
(Bus powered)
(Self powered)
To USB cable
connecting procedure
Enter power-down mode
(If necessary)
Set each interrupt
Wait for USB operating
clock stabilization
USB interface operation OK
USB operating clock stabilization
detection interrupt occurs.
Cancel USB interface reset
(Clear UIFRST in UCTLR to 0)
Self powered?
System needs to
enter power-down
mode?
Cancel USB module stop 1
(Clear USBSTP1 in
EXMDLSTP to 0)
Select USB operating clock
(Write 1 to UCKS3 to UCKS0
in UCTLR)
To 14.5.2 (1)
*
*
*
EXIRQ0
Note: Before entering power-down mode, set USB module stop 2 by setting the MSTPB0 bit in MSTPCRB to 1.
Figure 14.2 USB Initialization