Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 7 of 157
Apr 1, 2013
2.3 Function
USB-BASIC-FW source code includes files for Host, Peripheral (Function) and common code.
[Common code]
Device connect/disconnect, suspend/resume, and USB bus reset processing
Control transfer on pipe 0
Data transfer on pipes 1 to 9 (bulk or interrupt transfer: CPU access/DTC or DMA access)
[Host]
In host mode, enumeration as low-speed/full-speed/high-speed device (However, operating speed is different by
devices ability.)
Transfer error determination and transfer retry
[Peripheral ]
In peripheral mode, enumeration as USB Host of USB1.1/2.0/3.0.
2.4 Structure of Files and folders
2.4.1 Folder Structure
The folder structure in which the files are provided in USB-BASIC-FW (non-OS & RTOS) is shown below. The USB-
BASIC-F/W includes a sample (vendor) class driver, application and hardware resource sample code.
The source codes dependent on each device and evaluation board are stored in each hardware resource folder
(HwResourceForUSB_devicename).
Workspace
(USB-BASIC-FW) [Common USB code that is used by all USB firmware]
USBSTDFW
non-OS/RTOS
| | +―――class
hubd Sample hub driver
SMPL USB standard request sample
| | +―――USB20
HCD Host control driver
PCD Peripheral control driver
LIB Common library
include Common header file
(ANSI-C File I/O System Calls)
ANSI [open(), close(), read(), write(), etc of the USB class driver]
(HW Setting) [Hardware access layer; to manipulate the MCU’s USB register]
HwResourceForUSB_RX62N Hardware resource for RX62N/RX621 Group
HwResourceForUSB_RX62N_597assp Hardware resource for RX62N + R8A66597
HwResourceForUSB_RX63N Hardware resource for RX63N/RX631 Group
+―――HwResourceForUSB_RX63T Hardware resource for RX63T Group
HwResourceForUSB_RX630 Hardware resource for RX630 Group
(Sample Code) [Class driver and user application]
SmplMain Sample application
VENDOR Vendor Class Driver
(uITRON) [uItron OS code]
RI600_4 RTOS only
* 1. Copy the content of folder "HwResourceForUSB_devicename" and paste into "HwResourceForUSB" before code
compilation.
* 2. Please select the folder “HwResourceForUSB_RX62N_597assp” when using R8A66593.