Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
Page 554 of 846 REJ09B0140-0900 Rev. 9.00
Sep 16, 2010
H8S/2215 Group
(3) Suspend and Remote-Wakeup Operations
Figures 15.10 and 15.11 are flowcharts of the suspend and remote-wakeup operations. If the USB
bus enters a non-suspend state from the suspend state due to a remote-wakeup signal from this
function, perform the operations shown below.
USB function Firmware
USB cable connected
A bus idle of 3 ms or
more occurs
A suspend/resume
interrupt occurs
Suspend state
Output resume signal
to USB bus
A suspend/resume
interrupt occurs
Enable SPRSi and
IRQ6 interrupts
(Set SPRSiE in UIER3 to 1)
(Set IRQ6E in IER to 1)
Initialize standby
enable flag
(Clear standby enable
flag to 0)
Run user program
Software standby state
Mask all interrupts
(Manipulate bit I using
LDC instruction, etc.)
Enable IRQ6 interrupt
(Set IRQ6E in IER to 1)
Unmask all interrupts
(Clear bit I using LDC
instruction, etc.)
Transition to software
standby
(Execute SLEEP
instruction)
Suspend interrupt
processing
(see figure 15.9)
IRQ6
NMI or IRQx
IRQ6
Suspend/remote-wakeup
interrupt processing
Main process
No
No
Yes
Yes
Standby enable
flag = 0?
Remote-wakeup
interrupt processing
(see figure 15.11)
*
1
*
1
*
1
*
2
*
2
*
2
Standby enable
flag = 1?
Notes: 1. The standby enable flag is a software flag for controlling transition to the standby
state. There is no such hardware flag.
2. Interrupts should be masked from when the IRQ6 interrupt is received until the
SLEEP instruction is executed. Finally, unmask the interrupts using the LDC
instruction or the like and execute the SLEEP instruction immediately afterward.
Remote-
wakeup
Figure 15.10 Example Flowchart of Suspend and Remote-Wakeup Operations