SH7286 Group
USB Function Module: USB Mass Storage Class
5. Sample Program Overview
This chapter describes the features and the configuration of the sample program. This sample program operates on the
SH7286 CPU board, and the SH7286 CPU board operates as a RAM disk. USB transfer is started by an interrupt from
the USB function module.
5.1
State Transition Diagram
Figure 5 shows the state transition diagram of this sample program. This sample program transitions to three states as
shown in Figure 5.
Immediately after the power supply has been turned on,
the system is in reset state. After the initial settings have been
completed, it returns to the stationary state.
Initial settings completed
USB communication
completed
Interrupt generated
(USBFI0)
Control transfer
Bulk transport
USB communication state
Reset state
Stationary state
Figure 5 State Transition Diagram
•
Reset state
The SH7286 enters reset state when it is reset at power-on, or manually reset. The sample program mainly
configures the SH7286 in reset state.
•
Stationary state
When configuring the SH7286 is completed, the sample program stays in stationary state as the main loop.
•
USB communication state
The SH7286 transitions to USB communication state when the USB module generates an interrupt in stationary
state. In this state, the SH7286 transfers data according to the type of interrupts. USB interrupt flag registers 0 and 1
(USBIFR 0, 1) specify interrupts used in this sample program. When an interrupt occurs, the corresponding bits to
USBIFR0 and USBIFR1 are set to 1.
R01AN0063EJ0100 Rev. 1.00
Page 15 of 32
Oct. 22, 2010