Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 125 of 157
Apr 1, 2013
5.11 How to work USB-BASIC-FW as Host mode
This section describes how to operate the USB-BASIC-F/W as a host, using USB-BASIC-FW and sample code as an
example.
5.11.1 Device selection
Table 5.12 lists the main device hardware resources included in USB-BASIC-FW. Change the folder name of the device
to be operated from “HwResourceForUSB_device name” to “HwResourceForUSB.”
Table 5.12 The hardware resource of a sample code
Folder Device Evaluation Board
HwResourceForUSB_RX62N RX62N Renesas Starter Kit+ for RX62N
HwResourceForUSB_RX630 RX630 Renesas Starter Kit for RX630
HwResourceForUSB_RX63N RX63N Renesas Starter Kit+ for RX63N
HwResourceForUSB_RX63T RX63T Renesas Starter Kit+ for RX63T
HwResourceForUSB_RX62N_597assp R8A66597
Renesas Starter Kit+ for RX62N +
R0K866597D020BR
5.11.2 User Configuration File - r_usb_usrconfig.h
The USB-BASIC-F/W functions are set by rewriting the user definition configuration file (r_usb_usrconfig.h) in the
HwResourceForUSB folder. Please change the following items.
The following shows each definition item in the User Configuration file (r_usb_usrconfig.h).
1. ANSI / non-ANSI interface
The ANSI preprocessor directive may be set to one of the following two options.
#define USB_ANSIIO_PP USB_ANSIIO_USE_PP :Use ANSI Interface
: Recommended for new projects
#define USB_ANSIIO_PP USB_ANSIIO_NOT_USE_PP :Non-ANSI interface (legacy)
2. USB mode per port (host / peripheral)
Please select one USB mode (Host or Peripheral) for each USB module (USB IP0 and USB IP1).
Note: RX63T, RX630 and R8A66597 can only be set as USB_FUNCSEL_USBIP0_PP.
#define USB_FUNCSEL_USBIP0_PP USB_HOST_PP :Host mode for USB IP0
#define USB_FUNCSEL_USBIP0_PP USB_PERI_PP :Peripheral mode for USB IP0
#define USB_FUNCSEL_USBIP0_PP USB_NOUSE_PP :USBIP0 Not used
#define USB_FUNCSEL_USBIP1_PP USB_HOST_PP :Host mode for USB IP1
#define USB_FUNCSEL_USBIP1_PP USB_PERI_PP :Peripheral mode for USB IP1
#define USB_FUNCSEL_USBIP1_PP USB_NOUSE_PP :USBIP1 not used
3. USB ports
The USB port may be specified as one of the following two options (This definition is used only by R8A66597)
#define USB_PORTSEL_PP USB_1PORT_PP :Use one USB port
#define USB_PORTSEL_PP USB_2PORT_PP :Use both (two) USB ports
4. CPU byte endian
The CPU byte endian may be specified as one of the following two options.
#define USB_CPUBYTE_PP USB_BYTE_LITTLE_PP :Little Endian
#define USB_CPUBYTE_PP USB_BYTE_BIG_PP :Big Endian