Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 63 of 157
Apr 1, 2013
4.9 How to run USB-BASIC-FW in peripheral mode
This section describes how to operate the USB-BASIC-F/W as a peripheral, using USB-BASIC-FW and sample code as
an example.
4.9.1 Device selection
Table 4-10 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 4-10 Hardware resource for Sample code
Folder Name 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 RX63N
HwResourceForUSB_RX62N_597assp R8A66597
R8A66593
Renesas Starter Kit+ for RX62N +
R0K866597D020BR
4.9.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, R8A66597 and R8A66593 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.
#define USB_PORTSEL_PP USB_1PORT_PP Use one USB port
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