1. Document Overview Overview Using USB-BASIC-F/W User-Defined Macros User-Defined Information...

Size: px
Start display at page:

Download "1. Document Overview Overview Using USB-BASIC-F/W User-Defined Macros User-Defined Information..."

Transcription

1 APPLICATION NOTE Renesas USB Device USB Basic Firmware R01AN0512EJ0110 Rev.1.10 Introduction This document is an instruction manual for the Renesas USB Device USB basic firmware, a sample program for USB interface control using the Renesas USB Device. Target Device RX62N, RX630 and R8A66597 Contents 1. Document Overview Overview Using USB-BASIC-F/W User-Defined Macros User-Defined Information Workspace Sample Applications Peripheral Driver (PCD) Peripheral Control Transfer Host Driver (HCD) Host Control Transfer Host Manager (MGR) Non-OS Scheduler uitron System HUB class driver(hubcd) Data Transfer DTC Transfer EXDMA Transfer Restrictions R01AN0512EJ0110 Rev.1.10 Page 1 of 126

2 1. Document Overview 1.1 Overview This document is an instruction manual for the Renesas USB Devices USB basic firmware, a sample program for USB interface control using the Renesas USB Devices. This firmware includes uitron ver. and OS less ver. This document is intended to be used together with the device s data sheet. 1.2 Related Documents [1] Universal Serial Bus Revision 2.0 Specification [ [2] Renesas USB Device Hardware Manual Available from the Renesas website Renesas Website [ USB Device Page [ 1.3 List of Terms Terms and abbreviations used in this document are listed below. USB: Universal Serial Bus USB-BASIC-F/W: USB basic firmware for Renesas USB Device (non-os/uitron) non-os: USB basic firmware for OS less system uitron: USB basic firmware for uitron system HEW: High-performance Embedded Workshop PCD: Peripheral control driver of USB-BASIC-F/W PDCD: Peripheral device class driver (device driver and USB class driver) HCD: Host control driver of USB-BASIC-F/W MGR: Peripheral device state manager of HCD HDCD: Host device class driver (device driver and USB class driver) HUBCD: Hub class sample driver APL: Application program HTST: Host electrical test Task: Processing unit scheduler: Used to schedule functions, like a simplified OS Scheduler macro: Used to call a scheduler function (non-os) R01AN0512EJ0110 Rev.1.10 Page 2 of 126

3 2. Overview 2.1 Features of USB-BASIC-F/W The main features of USB-BASIC-F/W are as follows. [Overall] Can control RX62N, RX630 and R8A66597 by common source code. Can use same source code in uitron or non-os. Can operate in either host function or peripheral function mode. Multiple device class drivers may be installed without the need to customize USB-BASIC-F/W. (Device class drivers can be registered up to the maximum number of devices that can be connected.) [Host function mode] When a no-response condition is detected during data transfer, the transfer is retried (n retries per transfer on the same pipe: specified by user in file r_usbc_cdefusr.h). Common API for control transfer, bulk transfer and interrupt transfer is provided. API for devices connect/disconnect processing is provided. API for suspend/resume processing is provided. HUBCD sample program code is provided. Sample application for data transfer is added. (This application operates as Vendor class.) A single pipe can perform multiple exclusive data communication tasks in order to manage HDCD pipe information tables. [Peripheral function mode] Operation can be confirmed by using USBCommandVerifier.exe. (USBCV is available for download from API for control transfer is provided. Common API for bulk transfer and interrupt transfer is provided. API for devices connect/disconnect processing is provided. API for suspend/resume processing is provided. Sample application for data transfer is added. (This application operates as Vendor class.) The following functions must be provided by the customer to match the system under development. Overcurrent detection processing when connecting USB cables (host function mode). Descriptor analysis (host function mode). Device class driver 2.2 Development Goals USB-BASIC-F/W was developed with the following goals in mind. To simplify the development of USB communication programs by customers using Renesas USB Device. To provide source code examples for hardware control of USB. 2.3 Functions The functions provided by USB-BASIC-F/W are as follows. In host function mode, enumeration as low-speed/full-speed/high-speed device (However, operating speed is different by devices ability.) In peripheral function mode, enumeration as USB1.1/2.0/3.0 host 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) Transfer error determination and transfer retry R01AN0512EJ0110 Rev.1.10 Page 3 of 126

4 2.4 Task Configuration USB Basic Firmware In peripheral function mode, USB-BASIC-F/W comprises the peripheral driver, which controls H/W, and the application. In host function mode, USB-BASIC-F/W comprises the host driver, which controls H/W, the manager, which manages device states, the hub class driver, which controls devices connected to the down ports of the USB hub, and the application. Peripheral driver and host driver initiate hardware control according to messages from the various tasks or interrupt handler. They also notify the appropriate task when hardware control ends, of processing results, and of hardware requests. Manager manages the states of devices connected and performs enumeration. In addition, manager issues a message to host driver or hub class driver when the application changes the device state. Hub class driver is sample program code for managing the states of devices connected to the down ports of the USB hub and performing enumeration. uitron Scheduler Function non-os Figure 2.1 Task Configuration of USB-BASIC-F/W R01AN0512EJ0110 Rev.1.10 Page 4 of 126

5 Table 2.1 Task Functions No. Module Name Function 1 USB interrupt handler USB interrupt handler void usb_cstd_usbhandler(void) (USB packet transmit/receive end and special signal detection) 2 Peripheral driver (PCD) void usb_pstd_pcdtask(usbc_vp_int_t) 3 Host driver (HCD) void usb_hstd_hcdtask(usbc_vp_int_t) 4 Host manager (MGR) void usb_hstd_mgrtask(usbc_vp_int_t) Hardware control in peripheral function mode Peripheral transaction management Hardware control in host function mode Host transaction management Device state management Enumeration HCD/HUBCD control message determination HUB down port device state management HUB down port enumeration 5 Hub class driver (HUBCD) void usb_hhub_task(usbc_vp_int_t) 6 Device class driver (PDCD/HDCD) Provided by the customer as appropriate for the system. 7 Device driver (HDD) Provided by the customer as appropriate for the system. 8 Application (APL) Provided by the customer as appropriate for the system. 2.5 Non-OS Scheduler Function A scheduler function manages requests generated by the tasks and hardware according to the relative priority of the tasks. When multiple requests are generated by tasks with the same priority, they are executed using a FIFO configuration. To assure commonality with non-os and uitron-compatible firmware, requests between tasks are implemented by transmitting and receiving messages. In addition, call-back functions are used for responses to tasks indicating the end of a request, so the customer need only install appropriate class drivers for the system and there is no need to modify the scheduler itself. 2.6 Sequence Outline Like USB-BASIC-F/W comprises usbc_cstd_maintask, MainInit, MainLoop and usb_cstd_usbhandler. In non-os, the compositions add scheduler. When an interrupt occurs, the function mode that is selected by USB operational mode setting is checked and notification is sent by means of a message to PCD/HCD. When the PCD or HCD task receives a message from the USB interrupt handler, it determines the interrupt source and executes the appropriate processing. (For a sequence outline of PCD/HCD task, see sections 8 and 10.) The PCD or HCD is selected by USB function setting. (For a USB function setting, see sections 5.) R01AN0512EJ0110 Rev.1.10 Page 5 of 126

6 usbc_cstd_main Task MainInit() Start Idle Task MainLoop() Idle Task MainInit Initialize USB function Register driver Initialize scheduler function Set priority Set USB operating mode usb_cstd_usbhandler Operating mode? Clear interrupt source USBC_PERI_PP USBC_HOST_PP Clear interrupt source Return Send message to PCD Send message to HCD Return USB_FUNCSEL_PP == USBC_PERI_PP USB_FUNCSEL_PP == USBC_HOST_PP Task MainLoop Application MainLoop Application USBC_TRCV_MSG? Yes Processing No Task processing flag set? Yes PCD task No Task processing flag set? Yes HCD task No Return Scheduler Tasks starting is controlled by scheduler PDCD task MGR task Processing request? No HUB task Yes Scheduler HDCD task Select request with top priority Return Scheduler Set task processing flag Return Return Figure 2.2 Sequence Outline (non-os) R01AN0512EJ0110 Rev.1.10 Page 6 of 126

7 usbc_cstd_main Task MainInit() MainInit Initialize USB function Start Idle task Start PCD task Start MGR task Start HCD task MainLoop() Register driver Set USB operating mode Return Task usb_cstd_usbhandler USBC_TRCV_MSG? Processing Operating mode? USBC_HOST_PP USBC_PERI_PP Clear interrupt Clear interrupt source source Send message to PCD Send message to HCD Return Figure 2.3 Sequence Outline (uitron) R01AN0512EJ0110 Rev.1.10 Page 7 of 126

8 2.7 Non-OS Task Operation Example An example of the operation of a USB-BASIC-F/W task is shown below. Execution request received by MGR task in host function mode Note: Operation is the same in peripheral function mode. MainLoop Application Execution request MGR task execution HCD task USBC_TRCV_MSG? No Flag set? HCD task Yes No Yes Processing Return MGR task MGR task HUB task HDCD task USBC_TRCV_MSG? Processing Yes No Scheduler Return return HUB task USBC_TRCV_MSG? No Yes Processing Return HDCD task USBC_TRCV_MSG? No Yes Processing Return Figure 2.4 Task Operation Example (non-os) R01AN0512EJ0110 Rev.1.10 Page 8 of 126

9 2.8 uitron Task-Related Operation Operation related to USB-BASIC-F/W tasks is shown below. Figure 2.5 Task-Related Operation (uitron) R01AN0512EJ0110 Rev.1.10 Page 9 of 126

10 3. Using USB-BASIC-F/W 3.1 Overview USB-BASIC-F/W is a USB driver that is adapted for the customer s system by making changes to the non-os scheduler macros or uitron system control macros (r_usbc_citron.h, r_usbc_cmacsystemcall.h), user information (r_usbc_cdefusr.h, r_usb_cdefusr.h), and non-os settings (r_usbc_ckernelid.h, main.c, r_usb_psmpl_apl.c, r_usb2_hsmpl_apl.c) to add HDCD and PDCD tasks. 3.2 Changing USB-BASIC-F/W In order to use USB-BASIC-F/W, it is necessary to make changes to the following program code and header files. 1. It is necessary select the project and the build configuration in USB-BASIC-F/W. Select the project of the non-os or uitron from HEW project, and select the build configuration of the appropriate function (Host mode or Peripheral mode) for the system under development from HEW build configuration in USB-BASIC-F/W and set the selected project in the active condition. 2. Sample application source code for executing data transfer is provided. These should be changed as needed to match the system under development. Initialization of the control MCU, interrupt handlers, interrupt control, DTC or DMA control, etc. (See table 3.1.) For the non-os, adjustments to the duration of the specified wait time functions (usbc_cpu_delayxms() function, usbc_cpu_delay1us() function) For the non-os, settings of functions that disable or enable USB-related interrupts in order to use the scheduler function (usb_cstd_intdisable() function, usb_cstd_intenable() function) The USB interrupt disable function (usb_cstd_intdisable() function) and USB interrupt enable function (usb_cstd_intenable() function) disable and enable, respectively. Make any necessary changes to the settings to match the MCU being used. 3. For using R8A66597, it is necessary to make changes to the hardware settings in the usb_cstd_pinconfig function in r_usb_csignal.c to match the system under development. Make sure to refer to section 5 regarding the definitions for the settings. External bus operating voltage (set by user-defined information) FIFO access endian specification (common with CPU endian mode: set by user-defined information) Interrupt pin operation level DMA pin operation level BRDY interrupt operating mode SOF pin operating mode Low-power sleep operation specification (set by user-defined information) 4. Some files must be customized by the customer. Refer to 5, User-Defined Information, and make appropriate changes to the user settings. 5. Debug Information Output Function Make the appropriate settings in the file r_usbc_cmacprint.h to enable or disable output of debug information. (Debug information can be output by creating a serial driver, or the like.) R01AN0512EJ0110 Rev.1.10 Page 10 of 126

11 Table 3.1 List of Functions Type Function Description void usb_cstd_targetinit(void) System initialization void usb_cstd_usbinthand(void) USB interrupt handler void usb_cstd_dma0/1inthand(void) DTC/DMA interrupt handler void usbc_cpu_usbintinit(void) USB interrupt enable void usbc_cpu_dmaintinit(void) DTC/DMA interrupt enable uint16_t usb_cstd_d0fifo2bufstartdma(uint32_t SourceAddr) DTC/DMA read start uint16_t usb_cstd_buf2d0fifostartdma(uint32_t DistAddr) DTC/DMA write start void usb_cstd_stopdma(void) DTC/DMA stop void usb_cstd_intenable(void) USB interrupt enable for scheduler function of non-os void usb_cstd_intdisable(void) USB interrupt disable for scheduler function of non-os void usbc_cpu_delay1us(uint16_t time) 1us delay void usbc_cpu_delayxns(uint16_t time) 1ms delay 3.3 Creating HDCD and PDCD Tasks USB-BASIC-F/W includes sample application source code for executing data transfer, it is necessary to create HDCD or PDCD tasks to match the system under development. It must also be configured to enable control of the scheduler function of the non-os firmware. For the non-os, HDCD or PDCD tasks should be configured to run USBC_TRCV_MSG at the start of processing, and in case of USBC_NG, to end the function. For the non-os, the following processing routines must be added to HDCD to enable control by the scheduler function. Refer to the sample application function (usb2_hstd_maintask() function). 1. Class check processing (to check the class driver during enumeration) 2. Initialization processing 3. Enumeration waits processing (so that when multiple devices are attached, the other devices wait until enumeration of the current device ends) Note: RX62N does not require this processing. 4. Task processing (created to match the system) For non-os, the following processing routines must be added to PDCD to enable control by the scheduler function. Refer to the sample function (usb_pstd_maintask() function). 5. Task processing (created to match the system) R01AN0512EJ0110 Rev.1.10 Page 11 of 126

12 HDCD_Task USBC_TRCV_MSG? No Yes Processing contents USB_MSG_CLS_ CHECKREQUEST USB_MSG _CLS_INIT R8A66597 only USB_MSG _CLS_WAIT USB_MSG _CLS_TASK 1. Class check processing enumeration 2. Initialization processing 3. Enumeration wait processing 4. Task processing Return PDCD_Task USBC_TRCV_MSG? 5. Task processing Return Figure 3.1 PDCD/HDCD Sequence for non-os 3.4 Note The customer will need to make a variety of customizations, for example designating classes, issuing vendor-specific requests, making settings with regard to the communication speed or program capacity, or making individual settings that affect the user interface. Note: USB-BASIC-F/W is not guaranteed to provide USB communication operation. The customer should verify operation when utilizing it in a system and confirm the ability to connect to a variety of different types of devices. R01AN0512EJ0110 Rev.1.10 Page 12 of 126

13 4. User-Defined Macros 4.1 Overview USB-BASIC-F/W includes macros for hardware register access (including FIFO access), so an executable file customized to the customer s requirements can be generated by rewriting the macro header files. Make appropriate changes to the macros for accessing the registers and FIFOs to match the system under development. The macros comprise the six types listed below. Scheduler macros are defined in (r_usbc_cmacsystemcall.h), debug output macros in (r_usbc_cmacprint.h), and register access macros in (r_usb_cmacusr.h). 1. Non-OS scheduler macros 2. uitron system call macros 3. Debug output macros 4. Register and FIFO data register read/write macros 5. Register bit set/clear/modify macros 6. Status register bit clear macro 7. Status register bit set macro Non-OS Scheduler Macros USB-BASIC-F/W includes the file r_usbc_cscheduler.c, which contains functions for registering the scheduler macros USBC_SND_MSG, USBC_ISND_MSG, USBC_WAI_MSG, USBC_TRCV_MSG, USBC_PGET_BLK, and USBC_REL_BLK. Functions are registered to scheduler macros in r_usbc_cmacsystemcall.h. [Function registration example] #define USBC_SND_MSG(ID, MESS) usbc_cstd_sndmsg((uint8_t)id,(usbc_msg_t*)mess) #define USBC_ISND_MSG(ID, MESS) usbc_cstd_isndmsg((uint8_t)id,(usbc_msg_t*)mess) #define USBC_WAI_MSG(ID, MESS, TM) usbc_cstd_waimsg((uint8_t)id, (USBC_MSG_t*)MESS, (uint16_t)tm) #define USBC_TRCV_MSG(ID, MESS, TM) usbc_cstd_recmsg((uint8_t)id,(usbc_msg_t**)mess,(usbc_tm_t)tm) #define USBC_PGET_BLK(ID, BLK) usbc_cstd_pgetblk((uint8_t)id,(usbc_mh_t*)blk) #define USBC_REL_BLK(ID, BLK) usbc_cstd_relblk((uint8_t)id,(usbc_mh_t)blk) [USB_NG registration example] #define USBC_CRE_TSK(ID,INFO) USBC_NG R01AN0512EJ0110 Rev.1.10 Page 13 of 126

14 4.1.2 uitron System Call Macro The uitron system call macro is shown below. Modify the code as necessary to match the ITRON version used. Note that ITRON macros are redefined for USB-BASIC-F/W in the file r_usbc_cmacsystemcall.h, so the ITRON macros are defined by conditional compilation even when ITRON is not used. Therefore, this file should be also be modified to match the ITRON version used. #define USBC_CRE_TSK(ID,INFO) cre_tsk( (USBC_ID_t)ID, (USBC_TSK_t*)INFO ) #define USBC_DEL_TSK(ID) del_tsk( (USBC_ID_t)ID ) #define USBC_STA_TSK(ID,CODE) sta_tsk( (USBC_ID_t)ID, (USBC_VI_t)CODE ) #define USBC_ACT_TSK(ID) act_tsk( (USBC_ID_t)ID ) #define USBC_TER_TSK(ID) ter_tsk( (USBC_ID_t)ID ) #define USBC_EXT_TSK() ext_tsk( ) #define USBC_REF_TST(ID, STS) ref_tst( (USBC_ID_t)ID, (USBC_RTST_t*)STS ) #define USBC_DLY_TSK(TIME) dly_tsk( (USBC_RT_t)TIME ) #define USBC_CRE_MBX(ID, INFO) cre_mbx( (USBC_ID_t)ID, (USBC_MBX_t*)INFO ) #define USBC_DEL_MBX(ID) del_mbx( (USBC_ID_t)ID ) #define USBC_SND_MSG(ID, MESS) snd_mbx( (USBC_ID_t)ID, (USBC_MSG_t*)MESS ) #define USBC_ISND_MSG(ID, MESS) isnd_mbx( (USBC_ID_t)ID, (USBC_MSG_t*)MESS ) #define USBC_RCV_MSG(ID, MESS) rcv_mbx( (USBC_ID_t)ID, (USBC_MSG_t**)MESS ) #define USBC_PRCV_MSG(ID, MESS) prcv_mbx( (USBC_ID_t)ID, (USBC_MSG_t**)MESS ) #define USBC_TRCV_MSG(ID, MESS, TM) trcv_mbx( (USBC_ID_t)ID, (USBC_MSG_t**)MESS, (USBC_TM_t)TM ) #define USBC_CRE_MPL(ID, INFO) cre_mpf( (USBC_ID_t)ID, (USBC_MPL_t*)INFO ) #define USBC_DEL_MPL(ID) del_mpf( (USBC_ID_t)ID ) #define USBC_PGET_BLK(ID, BLK) pget_mpf( (USBC_ID_t)ID, (USBC_MH_t*)BLK ) #define USBC_IPGET_BLK(ID, BLK) ipget_mpf( (USBC_ID_t)ID, (USBC_MH_t*)BLK ) #define USBC_REL_BLK(ID, BLK) rel_mpf( (USBC_ID_t)ID, (USBC_MH_t)BLK ) #define USBC_CRE_SEM(ID, INFO) cre_sem( (USBC_ID_t)ID, (USBC_SEM_t*)INFO ) #define USBC_WAI_SEM(ID) wai_sem( (USBC_ID_t)ID ) #define USBC_POL_SEM(ID) pol_sem( (USBC_ID_t)ID ) #define USBC_SIG_SEM(ID) sig_sem( (USBC_ID_t)ID ) #define USBC_CRE_ALM(ID, INFO) cre_alm( (USBC_ID_t)ID, (USBC_ALM_t*)INFO ) #define USBC_STA_ALM(ID, TIME) sta_alm( (USBC_ID_t)ID, (USBC_RT_t)TIME ) #define USBC_STP_ALM(ID) stp_alm( (USBC_ID_t)ID ) #define USBC_DEL_ALM(ID) del_alm( (USBC_ID_t)ID ) R01AN0512EJ0110 Rev.1.10 Page 14 of 126

15 4.1.3 Debug Information Output Macros This type of macro outputs debug information to a UART or display device. A serial driver or display device driver is required. #define USBC_SPRINTF0(FORM) fprintf(stderr,form) #define USBC_SPRINTF1(FORM,x1) fprintf(stderr,form,x1) #define USBC_SPRINTF2(FORM,x1,x2) fprintf(stderr,form,x1,x2) #define USBC_SPRINTF3(FORM,x1,x2,x3) fprintf(stderr,form,x1,x2,x3) #define USBC_SPRINTF4(FORM,x1,x2,x3,x4) fprintf(stderr,form,x1,x2,x3,x4) #define USBC_SPRINTF5(FORM,x1,x2,x3,x4,x5) fprintf(stderr,form,x1,x2,x3,x4,x5) #define USBC_SPRINTF6(FORM,x1,x2,x3,x4,x5,x6) fprintf(stderr,form,x1,x2,x3,x4,x5,x6) #define USBC_SPRINTF7(FORM,x1,x2,x3,x4,x5,x6,x7) fprintf(stderr,form,x1,x2,x3,x4,x5,x6,x7) #define USBC_SPRINTF8(FORM,x1,x2,x3,x4,x5,x6,x7,x8) fprintf(stderr,form,x1,x2,x3,x4,x5,x6,x7,x8) #define USBC_PRINTF0(FORM) printf(form) #define USBC_PRINTF1(FORM,x1) printf(form,x1) #define USBC_PRINTF2(FORM,x1,x2) printf(form,x1,x2) #define USBC_PRINTF3(FORM,x1,x2,x3) printf(form,x1,x2,x3) #define USBC_PRINTF4(FORM,x1,x2,x3,x4) printf(form,x1,x2,x3,x4) #define USBC_PRINTF5(FORM,x1,x2,x3,x4,x5) printf(form,x1,x2,x3,x4,x5) #define USBC_PRINTF6(FORM,x1,x2,x3,x4,x5,x6) printf(form,x1,x2,x3,x4,x5,x6) #define USBC_PRINTF7(FORM,x1,x2,x3,x4,x5,x6,x7) printf(form,x1,x2,x3,x4,x5,x6,x7) #define USBC_PRINTF8(FORM,x1,x2,x3,x4,x5,x6,x7,x8) printf(form,x1,x2,x3,x4,x5,x6,x7,x8) If no debug information will be output, the following lines should be commented out as shown. //#define USBC_DEBUGSIO_PP /* enable serial out (printf) */ //#define USBC_DEBUGLCD_PP /* enable display out (lprintf) */ Register and FIFO Data Register Read/Write Macros This type of macro performs read or write access to registers or FIFO port registers. #define USB_RD( r, v ) #define USB_WR( r, v ) do { (( v ) = ( USB_IP.r.WORD )); } while(0) do { (( USB_IP.r.WORD ) = ( v )); } while(0) #define USB_RDW( r, v ) do { (( v ) = ( USB_IP.r )); } while(0) #define USB_WRW( r, v ) do { (( USB_IP.r ) = ( v )); } while(0) #define USB_RD_FF( r, v ) do { (( v ) = ( USB_IP.r )); } while(0) #define USB_WR_FF( r, v ) do { (( USB_IP.r ) = ( v )); } while(0) R01AN0512EJ0110 Rev.1.10 Page 15 of 126

16 4.1.5 Register Bit Set/Clear/Modify Macros This type of macro sets, clears, or modifies the value of bits in registers. Each macro is written to accommodate the RMW (Read Modify Write) instruction, and it uses a register and FIFO data register read/write macro of the type mentioned above. Notes: 1. These macros do not need to be modified by the customer. 2. Do not use the bit clear macro to clear bits in status registers. /* set bit(s) of USB register */ /* r : USB register */ /* v : value to set */ #define USB_SET_PAT( r, v ) do { (( USB_IP.r.WORD ) = ( v )); } while(0) /* reset bit(s) of USB register */ /* r : USB register */ /* m : bit pattern to reset */ #define USB_CLR_PAT( r, m ) do { (( USB_IP.r.WORD ) &= ( (uint16_t)(~(m)) )); } while(0) /* modify bit(s) of USB register */ /* r : USB register */ /* v : value to set */ /* m : bit pattern to modify */ #define USB_MDF_PAT( r, v, m ) do { \ uint16_t mtmp; \ USB_RD( r, mtmp ); \ mtmp &= ( (uint16_t)(~(m)) ); \ mtmp = ( (uint16_t)(v & m) ); \ USB_WR( r, mtmp ); \ } while(0) Status Register Bit Clear Macro This macro clears bits in status registers. This macro is written to accommodate the RMW (Read Modify Write) instruction, and it uses a register and FIFO data register read/write macro of the type mentioned above. This macro is designed to avoid deleting status bits that have changed during the execution of the RMW instruction. Notes: 1. This macro does not need to be modified by the customer. 2. This macro should only be used for status registers where writing 1 has no effect. /* reset bit(s) of USB status */ /* r : USB register */ /* m : bit pattern to reset */ #define USB_CLR_STS( r, m ) USB_WR( r, ( (uint16_t)(~(m)) ) ) R01AN0512EJ0110 Rev.1.10 Page 16 of 126

17 5. User-Defined Information 5.1 Overview An executable file customized to the customer s requirements can be generated by rewriting the user system definition information file (r_usbc_cdefusr.h) and user-defined information file (r_usb_cdefusr.h) included in USB-BASIC-F/W. The items listed below should be changed to match the system under development. 5.2 User System Definition Information File (r_usbc_cdefusr.h) 1. Target device designation 2. Installed USB-IP type designation IP function designation (number of Pipe) IP function designation (number of Device Address) IP function designation (buffer size) 6. Transfer speed designation 7. Bus width designation 8. USB port designation 9. External bus operating voltage designation 10. Oscillating frequency of connected resonator 11. Operating environment designation 12. Create Systemcall designation (uitron) 13. CPU byte endian designation 14. DTC/DMA designation 15. Low Power Mode designation 16. PID = NAK setting at transfer end enable designation (peripheral function mode) 17. Software retry count at pipe no-response (host function mode) 18. Control read data buffer size (host function mode) 19. Device address initial value (host function mode) 20. Hub down port count (host function mode) Target Device Designation The target device may be specified as either of the following two options. 1) USBC_ASSP_PP: R8A ) USBC_RX600_PP: RX62N or RX630 Example: RX62N or RX630 #define USBC_TARGET_CHIP_PP USBC_RX600_PP This setting is selected by the macro definition of HEW project in USB-BASIC-F/W. The macro definition is selected from option category in Standard toolchain of compiler tab Installed USB-IP Type Designation The USB-IP type may be specified as either of the following three options. 1) USBC_592IP_PP: Installed 592IP 2) USBC_596IP_PP: Installed 596IP 3) USBC_597IP_PP: Installed 597IP Example: Installed 597IP #define USBC_IPSEL_PP USBC_597IP_PP R01AN0512EJ0110 Rev.1.10 Page 17 of 126

18 IP Function Designation (Number of Pipe) The number of pipe may be specified as either of the following two options. 1) USBC_IP_PIPE_9_PP: 1-9 of PIPE use 2) USBC_IP_PIPE_7_PP: 1-7 of PIPE use Example: 1-9 of PIPE use #define USBC_IP_PIPE_PP USBC_IP_PIPE_9_PP IP Function Designation (Number of Device Address) The number of device address may be specified as either of the following two options. 1) USBC_IP_DEVADD_A_PP: 10 device address use 2) USBC_IP_DEVADD_5_PP: 5 device address use Example: 5 device address use #define USBC_IP_DEVADD_PP USBC_IP_DEVADD_5_PP IP Function Designation (Buffer Size) The buffer type may be specified as either of the following two options. 1) USBC_PIPEBUFF_FIX_PP: PIPEBUF is fixation 2) USBC_PIPEBUFF_CHANGE_PP: PIPEBUF is changeable Example: PIPEBUF is fixation #define USBC_PIPEBUF_MODE_PP USBC_PIPEBUF_CHANGE_PP Transfer Speed Designation The target speed may be specified as either of the following two options. 1) USBC_HS_PP: High-Speed support 2) USBC_FS_PP: Full-Speed support Example: Full-Speed support #define USBC_SPEEDSEL_PP USBC_FS_PP Bus Width Designation The bus width may be specified as either of the following two options. 1) USBC_BUSSIZE_16_PP: 16 bits 2) USBC_BUSSIZE_32_PP: 32 bits Example: 16 bits #define USBC_BUSSIZE_PP USBC_BUSSIZE_16_PP R01AN0512EJ0110 Rev.1.10 Page 18 of 126

19 5.2.8 USB Port Designation The USB port may be specified as either of the following two options. 1) USBC_1PORT_PP: 1 USB Port use 2) USBC_2PORT_PP: 2 USB Ports use Example: 1 USB Port use #define USBC_PORTSEL_PP USBC_1PORT_PP Operating Environment Designation The operating environment may be specified as either of the following two options. 1) USBC_FW_OS_PP: OS support 2) USBC_FW_NONOS_PP: No OS support Example: No OS support #define USBC_FW_PP USBC_FW_NONOS_PP This setting is selected by the macro definition of HEW project in USB-BASIC-F/W. The macro definition is selected from option category in Standard toolchain of compiler tab External Bus Operating Voltage Designation The external bus operating voltage may be specified as either of the following two options. 1) USBC_VIF1: 1.8 V applied to external bus pins. 2) USBC_VIF3: 3.3 V external bus pins. Example: 3.3 V #define USB_LDRVSEL USBC_VIF3 For the RX62N and RX630, use the USBC_VIF3 setting Oscillating Frequency of Connected Resonator Oscillating frequency of connected resonator may be specified as one of the following three options. 1) USBC_XTAL48: 48 MHz resonator connected. 2) USBC_XTAL24: 24 MHz resonator connected. 3) USBC_XTAL12: 12 MHz resonator connected. Example: 24 MHz resonator #define USBC_XINSEL USBC_XTAL24 For the RX62N and RX630. Use the USBC_XTAL24 setting. R01AN0512EJ0110 Rev.1.10 Page 19 of 126

20 Create System call Designation (uitron) It may be specified as either of the following two options that the Task Creation System call is supported or not supported. 1) USBC_OS_CRE_USE_PP: Task Creation System call support 2) USBC_OS_CRE_NOTUSE_PP: No Task Creation System call support Example: No Task Creation System call support #define USBC_OS_CRE_MODE_PP USBC_OS_CRE_NOTUSE_PP CPU Byte Endian Designation The CPU byte endian may be specified as either of the following two options. This setting is for CPU access to FIFO. 1) USBC_BYTE_LITTLE_PP: Little Endian (Definition from upper byte) 2) USBC_BYTE_BIG_PP: Big Endian (Definition from under byte) Example: Little endian #define USBC_CPUBYTE_PP USBC_BYTE_LITTLE_PP DTC/DMA Designation The DTC/DMA may be specified as either of the following two options. 1) USBC_TRANS_DMA_PP: DMA 2) USBC_TRANS_DTC_PP: DTC Example: DTC #define USBC_TRANS_MODE_PP USBC_TRANS_DTC_PP The RX62N and RX630 support only DTC. Use the USBC_TRANS_DTC_PP setting Low Power Mode Designation The low power mode may be specified as either of the following two options. 1) USBC_LPWR_NOT_USE_PP: Not low power mode 2) USBC_ LPWR_USE_PP: Low power mode Example: Not low power mode #define USBC_LPWR_MODE_PP USBC_LPWR_NOT_USE_PP For the R8A66597, use the USBC_LPWR_NOT_USE_PP setting PID = NAK Setting at Transfer End Enable Designation (Peripheral Function Mode) It may be specified as either of the following two options that the PID = NAK set or not set at transfer end enable. 1) USBC_NONPERIODIC_PP: PID = NAK 2) USBC_PERIODIC_PP: No PID = NAK Example: PID = NAK #define USBC_PERIODIC_MODE_PP USBC_PERIODIC_PP R01AN0512EJ0110 Rev.1.10 Page 20 of 126

21 Software Retry Count at Pipe No-Response (Host Function Mode) It is necessary to specify the number of software retries when a no-response condition occurs during a transfer. Example: Up to one retry by USB-BASIC-F/W at pipe no-response #define USBC_PIPEERR 1u Control Read Data Buffer Size (Host Function Mode) It is necessary to specify the data buffer size when a control read transfer is received. Example: 20-byte device descriptor, 256-byte configuration descriptor #define USBC_DEVICESIZE 20u #define USBC_CONFIGSIZE 256u Device Address (Host Function Mode) It is necessary to specify the device address of the device connected to PORT0. Example: Device address starts from 2. #define USBC_DEVICEADDR 2u For the RX62N, addresses in the range 1 to 5 may be specified. For the R8A66597, addresses in the range 1 to 10 may be specified Hub Down Port Count (Host Function Mode) It is necessary to specify the number of hub down ports that can be connected. Example: Connected hub has 4 down ports. #define USBC_HUBDOWNPORT 4u R01AN0512EJ0110 Rev.1.10 Page 21 of 126

22 User System Definition Information for Each Devices The user system definition information for each device is shown below. Table 5.1 For the RX62N, the user system definition information (r_usbc_cdefusr.h) Section Flag Set Object Set Value Remarks Number * (o: default setting) USBC_TARGET_CHIP_PP o USBC_RX600_PP This setting is selected by the macro definition of HEW project USBC_IPSEL_PP o USBC_597IP_PP USBC_IP_PIPE_PP o USBC_IP_PIPE_9_PP USBC_IP_DEVADD_PP o USBC_IP_DEVADD_5_PP USBC_PIPEBUF_MODE_PP o USBC_PIPEBUF_FIX_PP USBC_SPEEDSEL_PP o USBC_FS_PP USBC_BUSSIZE_PP o USBC_BUSSIZE_16_PP USBC_PORTSEL_PP o USBC_1PORT_PP USBC_LDRVSEL (NOT_USED) o USBC_VIF USBC_XINSEL o USBC_XTAL O USBC_FW_PP USBC_FW_NONOS_PP USBC_FW_OS_PP O USBC_OS_CRE_MODE_PP o USBC_OS_CRE_NOTUSE_PP USBC_OS_CRE_USE_PP O USBC_CPUBYTE_PP o USBC_BYTE_LITTLE_PP USBC_BYTE_BIG_PP USBC_TRANS_MODE_PP o USBC_TRANS_DTC_PP O USBC_LPWR_MODE_PP o USBC_LPWR_NOT_USE_PP USBC_LPWR_USE_PP O USBC_PERIODIC_MODE_P P o USBC_NONPERIODIC_PP USBC_PERIODIC_PP O USBC_PIPEERROR o 1u O USBC_DEVICESIZE o 20u O USBC_CONFIGSIZE o 256u O USBC_DEVICEADDR o 1u O USBC_HUBDOWNPORT o 4u * : Flag - : Not selected(use the default setting.), O: Select from Set Value. This setting is selected by the macro definition of HEW project. If USB_C_FW_NO NOS_PP setting in 5,2,11, use the default setting. If RI600 is used, use the default setting. R01AN0512EJ0110 Rev.1.10 Page 22 of 126

23 Table 5.2 Section Number For the RX630, the user system definition information (r_usbc_cdefusr.h) Flag * Set Object Set Value (o: default setting) USB Basic Firmware Remarks USBC_TARGET_CHIP_PP o USBC_RX600_PP This setting is selected by the macro definition of HEW project USBC_IPSEL_PP o USBC_597IP_PP USBC_IP_PIPE_PP o USBC_IP_PIPE_9_PP USBC_IP_DEVADD_PP o USBC_IP_DEVADD_5_PP USBC_PIPEBUF_MODE_PP o USBC_PIPEBUF_FIX_PP USBC_SPEEDSEL_PP o USBC_FS_PP USBC_BUSSIZE_PP o USBC_BUSSIZE_16_PP USBC_PORTSEL_PP o USBC_1PORT_PP USBC_LDRVSEL (NOT_USED) o USBC_VIF USBC_XINSEL o USBC_XTAL O USBC_FW_PP USBC_FW_NONOS_PP USBC_FW_OS_PP O USBC_OS_CRE_MODE_PP o USBC_OS_CRE_NOTUSE_PP USBC_OS_CRE_USE_PP O USBC_CPUBYTE_PP o USBC_BYTE_LITTLE_PP USBC_BYTE_BIG_PP USBC_TRANS_MODE_PP o USBC_TRANS_DTC_PP O USBC_LPWR_MODE_PP o USBC_LPWR_NOT_USE_PP USBC_LPWR_USE_PP O USBC_PERIODIC_MODE_P P o USBC_NONPERIODIC_PP USBC_PERIODIC_PP USBC_PIPEERROR o 1u USBC_DEVICESIZE o 20u - USBC_CONFIGSIZE o 256u USBC_DEVICEADDR o 1u USBC_HUBDOWNPORT o 4u * : Flag - : Not selected(use the default setting.), O: Select from Set Value. This setting is selected by the macro definition of HEW project. If USB_C_FW_NO NOS_PP setting in 5,2,11, use the default setting. If RI600 is used, use the default setting. R01AN0512EJ0110 Rev.1.10 Page 23 of 126

24 Table 5.3 Section Number USB Basic Firmware For the R8A66597, the user system definition information (r_usbc_cdefusr.h) Flag * Set Object Set Value (o: default setting) Remarks USBC_TARGET_CHIP_PP o USBC_ASSP_PP This setting is selected by the macro definition of HEW project USBC_IPSEL_PP o USBC_597IP_PP USBC_IP_PIPE_PP o USBC_IP_PIPE_9_PP USBC_IP_DEVADD_PP o USBC_IP_DEVADD_A_PP USBC_PIPEBUF_MODE_PP o USBC_PIPEBUF_CHANGE_PP USBC_SPEEDSEL_PP o USBC_HS_PP USBC_BUSSIZE_PP o USBC_BUSSIZE_16_PP O USBC_PORTSEL_PP o USBC_2PORT_PP USBC_1PORT_PP O USBC_LDRVSEL (NOT_USED) USBC_VIF1 o USBC_VIF O USBC_XINSEL USBC_XTAL12 o USBC_XTAL24 USBC_XTAL USBC_FW_PP o USBC_FW_NONOS_PP This setting is selected by the macro definition of HEW project USBC_OS_CRE_MODE_PP o USBC_OS_CRE_NOTUSE_PP O USBC_CPUBYTE_PP o USBC_BYTE_LITTLE_PP USBC_BYTE_BIG_PP USBC_TRANS_MODE_PP o USBC_TRANS_DTC_PP USBC_LPWR_MODE_PP o USBC_LPWR_NOT_USE_PP O USBC_PERIODIC_MODE_P P o USBC_NONPERIODIC_PP USBC_PERIODIC_PP O USBC_PIPEERROR o 1u O USBC_DEVICESIZE o 20u O USBC_CONFIGSIZE o 256u O USBC_DEVICEADDR o 1u O USBC_HUBDOWNPORT o 4u * : Flag - : Not selected(use the default setting.), O: Select from Set Value. R01AN0512EJ0110 Rev.1.10 Page 24 of 126

25 5.3 User-Defined Information File (r_usb_cdefusr.h) 1. USB Function designation 2. Power Consumption Control Function designation 3. Auto Clock Mode designation 4. Sleep Mode designation 5. Hardware address designation 6. Hi-speed operation enable/disable USB Function Designation The hardware function may be specified as one of the following three options. 1) USBC_HOST_PP: Used as USB host. 2) USBC_PERI_PP: Used as USB peripheral. 3) USBC_HOST_PERI_PP: Used as both USB host and USB peripheral. Example: USB peripheral #define USBC_FUNCSEL_PP USBC_PERI_PP Power Consumption Control Function Designation It is necessary to specify the power consumption control function. Reference: The power consumption control function may be specified as one of the following three options. 1) USBC_NOT_STOP_PP: The power consumption control is not used (clock does not stop). 2) USBC_XCKE_USE_PP: The power consumption control function is used with the clock in the stopped state. 3) USBC_PCUT_USE_PP: The low-power sleep state is used. (This setting is for M66592 and M66596.) Example: The power consumption control is not used #define USBC_OSCSEL_PP USBC_CLK_NOT_STOP_PP This function is not used by the RX62N and RX630. Use the USBC_CLK_NOT_STOP_PP setting. For the R8A66597, use the USBC_NOT_STOP_PP or the USBC_XCKE_USE_PP setting Auto Clock Mode Designation The hardware function may be specified as one of the following two options. 1) USBC_ATCKM_NOT_USE_PP: No auto clock mode 2) USBC_ATCKM_USE_PP: Auto clock mode (This setting is for M66592 and M66596.) Example: No auto clock mode #define USBC_ATCKMSEL_PP USBC_ATCKM_NOT_USE_PP This function is not used by the RX62N, RX630 and R8A Use the USBC_ATCKM_NOT_USE_PP setting. R01AN0512EJ0110 Rev.1.10 Page 25 of 126

26 5.3.4 Sleep Mode Designation The sleep mode may be specified as one of the following two options. 1) USBC_LPSM_DISABLE_PP: No sleep mode 2) USBC_LPSM_ENABLE_PP: Sleep mode (The setting is for R8A66597.) Example: No sleep mode #define USBC_LPWRSEL_PP USBC_LPSM_DISABLE_PP This function is not used by the RX62N and RX630. Use the USBC_LPSM_DISABLE_PP setting Hardware Address Designation It is necessary to specify the standard address for accessing the hardware. For each register, the address is specified as an offset from the designated standard address. Example: 0x #define USBC_BASE (uint32_t)(0x ) This setting is not used by the RX62N and RX630. (#define USB0 specifies the address.) Hi-Speed Operation Enable/Disable Either of the following two options may be selected for hi-speed operation. 1) USBC_HS_DISABLE: Full- or low-speed operation will be selected automatically according to the connected device. 2) USBC_HS_ENABLE: Hi-, full-, or low-speed operation will be selected automatically according to the connected device. Example: Disabled #define USBC_HSESEL USBC_HS_DISABLE For the RX62N and RX630, select USBC_HS_DISABLE. R01AN0512EJ0110 Rev.1.10 Page 26 of 126

27 5.3.7 User System Definition Information for Each Device The user system definition information for each device is shown below. Table 5.4 For the RX62N, the user system definition information (r_usb_cdefusr.h) Section Flag Set Object Set Value Remarks Number * (o: default setting) O USBC_FUNCSEL_PP USBC_HOST_PP USBC_PERI_PP USBC_HOST_PERI_PP This setting is selected by the macro definition of HEW project USBC_OSCSEL_PP o USBC_CLK_NOT_STOP_PP USBC_ATCKMSEL_PP o USBC_ATCKM_NOT_USE_PP USBC_LPWRSEL_PP o USBC_LPWR_DISABLE_PP USB_BASE o 0x000A USB_HSESEL o USBC_HS_DISABLE * : Flag - : Not selected(use the default setting.), O: Select from Set Value. Table 5.5 For the RX630, the user system definition information (r_usb_cdefusr.h) Section Flag Set Object Set Value Remarks Number * (o: default setting) USBC_FUNCSEL_PP USBC_PERI_PP This setting is selected by the macro definition of HEW project USBC_OSCSEL_PP o USBC_CLK_NOT_STOP_PP USBC_ATCKMSEL_PP o USBC_ATCKM_NOT_USE_PP USBC_LPWRSEL_PP o USBC_LPWR_DISABLE_PP USB_BASE o 0x000A USB_HSESEL o USBC_HS_DISABLE * : Flag - : Not selected(use the default setting.), O: Select from Set Value. Table 5.6 Section Flag Set Object Set Value Number * (o: default setting) O USBC_FUNCSEL_PP USBC_HOST_PP USBC_PERI_PP For the R8A66597, the user system definition information (r_usb_cdefusr.h) O USBC_OSCSEL_PP o USBC_CLK_NOT_STOP_PP USBC_CLK_XCKE_USE_PP USBC_ATCKMSEL_PP o USBC_ATCKM_NOT_USE_PP O USBC_LPWRSEL_PP o USBC_LPWR_DISABLE_PP USBC_LPWR_ENABLE_PP O USB_BASE o 0x O USB_HSESEL o USBC_HS_ENABLE USBC_HS_DISABLE * : Flag - : Not selected(use the default setting.), O: Select from Set Value. Remarks This setting is selected by the macro definition of HEW project. R01AN0512EJ0110 Rev.1.10 Page 27 of 126

28 6. Workspace 6.1 Overview The workspace of USB-BASIC-F/W is described below. Workspace of USB-BASIC-F/W includes two projects. 1. NonOS_StdFw: non-os 2. Itron_StdFw: uitron (R8A66597 is not supported) And, USB-BASIC-F/W includes build configurations. [For the RX62N] 1. PORT0_P: PORT0 is Peripheral mode 2. PORT1_H: PORT1 is Host mode 3. PORT0_P_PORT1_H:USB0 is Peripheral mode and USB1 is Host mode [For the RX630] 4. RX630_PORT0_P: PORT0 is Peripheral mode [For the R8A66597] 5. ASSP_PERI: PORT0 is Peripheral mode 6. ASSP_HOST: PORT1 is Host mode Each configuration selects source files as compiled. In peripheral function mode, USB-BASIC-F/W comprises two tasks, PCD and sample application, and a scheduler. In host function mode, it comprises four tasks, HCD, MGR, HUB, and sample application, and a scheduler. Sample application is run as tasks. R01AN0512EJ0110 Rev.1.10 Page 28 of 126

29 6.2 Structure of Files and folders Folder Structure The folder structure in which the files are provided in USB-BASIC-F/W is shown below. These provided files in USB- BASIC-F/W include sample application and sample code of resource for hardware. < HEW workspace: USBSTDFW > (USB-BASIC-F/W) + USBSTDFW For USB0 + class + hubd Sample hub driver + smpl USB standard request sample + include Common header file + USB20 + HCD Host control driver + PCD Peripheral control driver + LIB Common library + USB2STDFW For USB1 (RX630 and R8A66597 are not used.) Structure is same to USBSTDFW + USBCSTDFW For USB0 and USB1 + include Common header file (The following is sample code) + RI600_4 For uitron + config_pstd For PORT0_P and RX630_PORT0_P + config_hstd For PORT1_H + config_cstd For PORT0_P_PORT1_H + HwResourceForUSB Resource for hardware + RX62N For RX62N + RX630 For RX630 + SmplMain + APL Sample application + Project Each projects R01AN0512EJ0110 Rev.1.10 Page 29 of 126

30 6.2.2 List of Files The files provided in USB-BASIC-F/W are listed below. The files of USB2STDFW folder are left out. USB Basic Firmware Table 6.1 List of Files Folder File Name Description Project (O: Selected ) 1) * 2) * 3) * 4) * 5) * 6) * HCD r_usb_hcontrolrw.c Control read/write processing O O O HCD r_usb_hdriver.c HCD task O O O HCD r_usb_hdriverapi.c HCD/MGR API functions O O O HCD r_usb_hintfifo.c INTR, INTN, BEMP interrupt O O O processing HCD r_usb_hmanager.c MGR task O O O HCD r_usb_hsignal.c USB signal control, oscillation control O O O processing HCD r_usb_hstdfunction. USB function extension library O O O c functions HCD r_usb_hlibusbip.c USB library functions O O O PCD r_usb_pcontrolrw.c Control read/write processing O O O O PCD r_usb_pdriver.c PCD task O O O O PCD r_usb_pdriverapi.c PCD API functions O O O O PCD r_usb_pintfifo.c INTR, INTN, BEMP interrupt O O O O processing PCD r_usb_psignal.c USB signal control, oscillation control processing O O O O PCD r_usb_pstdrequest.c USB standard request responses O O O O PCD r_usb_pstdfunction. USB function extension library O O O O c functions PCD r_usb_plibusbip.c USB library functions O O O O LIB r_usb_cdataio.c Data read/write, FIFO access O O O O O O processing LIB r_usb_cintfifo.c INTR, INTN, BEMP interrupt O O O O O O processing LIB r_usb_cinthandler.c USB interrupt handler O O O O O O LIB r_usb_clibusbip.c USB library functions O O O O O O LIB r_usb_csignal.c USB signal control, oscillation control O O O O O O processing LIB r_usb_cstdfunction. USB function extension library O O O O O O c functions (host/peripheral mixed) USBCSTDFW r_usbc_cscheduler.c Scheduler control O O O O O O include r_usbc_cdefusbip.h USB driver definitions O O O O O O include r_usbc_citron.h System header file O O O O O O include r_usbc_ckernelid.h ID definitions (Task ID, etc.) O O O O O O include r_usbc_cmacsystem Macro definitions (scheduler macros) O O O O O O call.h include r_usbc_cmacprint.h Macro definitions O O O O O O (macros for displaying debug information) include r_usbc_ctypedef.h Variable type definitions O O O O O O include r_usbc_cdef592ip.h Register definitions for 592IP (not used by RX62N) R01AN0512EJ0110 Rev.1.10 Page 30 of 126

31 Project (O: Selected ) include r_usbc_cdef596ip.h Register definitions for 596IP (not used by RX62N) include r_usbc_cdef597ip.h Register definitions for 597IP (not used by RX62N) O O include r_usbc_cusbdefbitd USB register definitions for RX600 O O O O efine.h series include r_usb_cdefusr.h User setting (hardware operation O O O O O O designation) definitions include r_usbc_cdefusrpp.h USB driver definitions O O O O O O include r_usb_cextern.h USB-BASIC-F/W external reference O O O O O O definitions include r_usb_cmacusr.h Macro definitions (register access O O O O O O macros) include r_usb_crevision.h Common library revision designations O O O O O O hubd r_usb_hhubsys.c HUBCD functions (non-os) O O O hubd r_usb_hhubsys_uitro HUBCD functions (uitron) O O n.c SMPL r_usb_pclassvendor. Peripheral class requests O O O O c SMPL r_usb_smp_csub.c Common library functions O O O O O O SMPL r_usb_smp_hsub.c Host standard requests O O O SmplMain main.c Sample main program O O O O O O SmplMain RX62NRSK.c RX62N RSK processing O O O O O SmplMain RX630RSK.c RX630 RSK processing O SmplMain RX62NRSK_Extern.h RX62N RSK external reference O O O O O definitions SmplMain RX630RSK_Extern.h RX630 RSK external reference O definitions APL r_usbc_phsmpl_apl Host and Peripheral sample application O.c APL r_usbc_phsmpl_dat Data for Host and Peripheral sample O a.c application APL r_usbc_cdata.c Data transfer data for port 0 and port 1 O sample application APL r_usbc_cdata.h Data transfer settings for port 0 and O port 1 sample application APL r_usb2_hsmpl_apl. Host port 1 sample application O c APL r_usb_hsmpl_apl.c Host sample application for R8A66597 O APL r_usb2_cdata.c Data transfer data for port 1 sample O application APL r_usb2_cdata.h Data transfer settings for port 1 sample O application APL r_usb_psmpl_apl.c Peripheral port 0 sample application O O O APL r_usb_psmpl_data. Data for peripheral port 0 sample O O O c application APL r_usb_cdata.c Data transfer data for port 0 sample O O O O application APL r_usb_cdata.h Data transfer settings for port 0 sample O O O O application config_pstd r_usb_rx62n.cfg Configuration file O config_pstd ritable_pstd.src Vector table setting O R01AN0512EJ0110 Rev.1.10 Page 31 of 126

32 Project (O: Selected ) config_pstd r_usb_rx630.cfg Configuration file O config_pstd ritable_rx630_pstd.sr Vector table setting O c config_hstd r_usb_rx62n.cfg Configuration file O config_hstd ritable_hstd.src Vector table setting O config_cstd r_usb_rx62n.cfg Configuration file O config_cstd ritable_cstd.src Vector table setting O HwResourceF orusb ritable_rx62n.src Vector table setting for RX62N (non- OS only) O O O HwResourceF orusb ritable_rx630.src Vector table setting for RX630 (non-os only) O HwResourceF ritable_assp.src Vector table setting for R8A66597 O O orusb (non-os only) HwResourceF dbsct.c Section setting O O O O O O orusb HwResourceF resetprg.c Reset program O O O O O O orusb HwResourceF Output file of HEW O O O O O O orusb RX62N iodefine.h IO definition file for RX62N O O O O O RX630 iodefine.h IO definition file for RX630 O * 1): PORT0_P, 2): PORT1_H, 3): PORT0_P_PORT1_H, 4): RX630_PORT0_P, 5): ASSP_PERI, 6): ASSP_HOST R01AN0512EJ0110 Rev.1.10 Page 32 of 126

33 7. Sample Applications 7.1 Sample application for Data transfer (APL) USB-BASIC-F/W supports the sample application (APL) that can transfer data using pipes 1, 2, 6, and 7 in host or peripheral function mode as vendor specific class. When writing custom applications, refer to r_usb2_hsmpl_apl.c and r_usb_psmpl_apl.c and make the applications APL Sequence The APL sequence in USB-BASIC-F/W is shown below. Peripheral function mode APL Initialize data transfer processing Data transfer complete? YES ERROR Host function mode APL R_usb2_hstd_ SetPipeInfo R_usb2_hstd_ SetPipeRegistration Initialize data transfer processing R_usb2_hstd_ TransferStart Reset data transfer processing R_usb_pstd_ TransferStart Data transfer complete? YES Count down of data transfer counter ERROR return Data transfer counter is not 0? YES R_usb2_hstd_ TransferStart NO All data transfer counter is 0? YES Reset data transfer processing NO R_usb2_hstd_ TransferStart Figure 7.1 APL sequence R01AN0512EJ0110 Rev.1.10 Page 33 of 126

34 7.1.2 APL Global Area The APL global area in USB-BASIC-F/W is shown below. USB Basic Firmware Table 7.1 List of APL global area (Peripheral function mode) Type Variable Description 1 USBC_UTR_t usb_gcstd_smpltrnmsg[ ] Message area of pipes for data transfer request 2 uint32_t usb_gcstd_smpltrncnt[ ] Data transfer counter of pipes 3 uint32_t usb_gcstd_smpltrnsize[ ] Data transfer size of pipes 4 uint8_t * usb_gcstd_smpltrnptr[ ] Data address pointer of pipes for data transfer 5 uint8_t usb_gcstd_smpltrndata1[ ] Data address of pipe1 for data transfer 6 uint8_t usb_gcstd_smpltrndata2[ ] Data address of pipe2 for data transfer 7 uint8_t usb_gcstd_smpltrndata3[ ] Data address of pipe3 for data transfer 8 uint8_t usb_gcstd_smpltrndata4[ ] Data address of pipe4 for data transfer 9 uint8_t usb_gcstd_smpltrndata5[ ] Data address of pipe5 for data transfer 10 uint8_t usb_gcstd_smpltrndata6[ ] Data address of pipe6 for data transfer 11 uint8_t usb_gcstd_smpltrndata7[ ] Data address of pipe7 for data transfer 12 uint8_t usb_gcstd_smpltrndata8[ ] Data address of pipe8 for data transfer 13 uint8_t usb_gcstd_smpltrndata9[ ] Data address of pipe9 for data transfer 14 uint16_t usb_gpstd_smpleptbl1[ ] Pipe information table for data transfer application 15 uint16_t usb_gpstd_smpleptbl2[ ] Dummy of pipe information table 16 uint16_t usb_gpstd_smpleptbl3[ ] Dummy of pipe information table 17 uint16_t usb_gpstd_smpleptbl4[ ] Dummy of pipe information table 18 uint16_t usb_gpstd_smpleptbl5[ ] Dummy of pipe information table 19 uint16_t * usb_gpstd_smplepptr[ ] Pointer table of pipe information table 20 uint8_t usb_gpstd_smpldevicedescriptor[ ] Device descriptor for data transfer application 21 uint8_t usb_gpstd_smplqualifierdescriptor[ ] Qualifier descriptor for data transfer application 22 uint8_t usb_gpstd_smplconfigurationh_1[ ] Configuration descriptor of hi-speed for data transfer application 23 uint8_t usb_gpstd_smplconfigurationf_1[ ] Configuration descriptor of full-speed for data transfer application 24 uint8_t * usb_gpstd_smplconptr[ ] Pointer table of configuration descriptor for data transfer application 25 uint8_t * usb_gpstd_smplconptrother[ ] Pointer table of other speed configuration descriptor for data transfer application 26 uint8_t usb_gpstd_stringdescriptor0[ ] String Descriptor0 for data transfer application 27 uint8_t usb_gpstd_stringdescriptor1[ ] String Descriptor1 for data transfer application 28 uint8_t usb_gpstd_stringdescriptor2[ ] String Descriptor2 for data transfer application 29 uint8_t usb_gpstd_stringdescriptor3[ ] String Descriptor3 for data transfer application 30 uint8_t usb_gpstd_stringdescriptor4[ ] String Descriptor4 for data transfer application 31 uint8_t usb_gpstd_stringdescriptor5[ ] String Descriptor5 for data transfer application 32 uint8_t * usb_gpstd_strptr[ ] Pointer table of string descriptor for data transfer descriptor R01AN0512EJ0110 Rev.1.10 Page 34 of 126

USB Basic Host and Peripheral Driver using Firmware Integration Technology

USB Basic Host and Peripheral Driver using Firmware Integration Technology APPLICATION NOTE R01AN2025EJ0123 Rev.1.23 Introduction This application note describes the USB basic firmware, which utilizes Firmware Integration Technology (FIT). This module performs hardware control

More information

RX Family APPLICATION NOTE. USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology.

RX Family APPLICATION NOTE. USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology. APPLICATION NOTE RX Family USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology R01AN2166EJ0110 Rev.1.10 Introduction This application note describes the

More information

USB Basic Host and Peripheral Driver using Firmware Integration Technology

USB Basic Host and Peripheral Driver using Firmware Integration Technology APPLICATION NOTE R01AN2025EJ0124 Rev.1.24 Introduction This application note describes the USB basic firmware, which utilizes Firmware Integration Technology (FIT). This module performs hardware control

More information

USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology

USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology USB Basic Mini Host and Peripheral Driver (USB Mini Firmware) Using Firmware Integration Technology Introduction APPLICATION NOTE This application note describes the USB Basic Mini Firmware, which utilizes

More information

RX Family, RL78 Family

RX Family, RL78 Family Introduction APPLICATION NOTE This application note explains the method of controlling R1EV24xxx, R1EX24xxx, and HN58X24xxx series I 2 C serial EEPROM, manufactured by Renesas Electronics, by using a Renesas

More information

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology Introduction APPLICATION NOTE R01AN1692EJ0231 Rev. 2.31 This application note describes the I 2 C bus interface (RIIC) module using

More information

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device. APPLICATION NOTE RX Family R01AN1691EJ0220 Rev. 2.20 Introduction This application note describes the simple I 2 C module using firmware integration technology (FIT) for communications between devices

More information

SD Mode SD Memory Card Driver Firmware Integration Technology

SD Mode SD Memory Card Driver Firmware Integration Technology APPLICATION NOTE RX Family R01AN4233EJ0202 Rev.2.02 Introduction This application note describes the SD Mode SD Memory Card driver which uses Firmware Integration Technology (FIT). This driver controls

More information

Clock Synchronous Control Module for Serial Flash Memory Access Firmware Integration Technology

Clock Synchronous Control Module for Serial Flash Memory Access Firmware Integration Technology APPLICATION NOTE RX Family R01AN2662EJ0234 Rev.2.34 Introduction This application note explains how to control and use serial flash memory with microcontrollers manufactured by Renesas Electronics. Refer

More information

1. Overview Ethernet FIT Module Outline of the API API Information... 5

1. Overview Ethernet FIT Module Outline of the API API Information... 5 Introduction APPLICATION NOTE R01AN2009EJ0115 Rev.1.15 This application note describes an Ethernet module that uses Firmware Integration Technology (FIT). This module performs Ethernet frame transmission

More information

SH7286 Group APPLICATION NOTE. USB Function Module: USB Mass Storage Class Oct. 22, Summary. Target Device. Contents. R01AN0063EJ0100 Rev. 1.

SH7286 Group APPLICATION NOTE. USB Function Module: USB Mass Storage Class Oct. 22, Summary. Target Device. Contents. R01AN0063EJ0100 Rev. 1. APPLICATION NOTE R01AN0063EJ0100 Rev. 1.00 Summary This application note describes how to use the SH7286 USB function module and shows an example to create the firmware which is compliant to the USB mass

More information

USB Interrupt Transfer Example PSoC 3 / PSoC 5

USB Interrupt Transfer Example PSoC 3 / PSoC 5 USB Interrupt Transfer Example PSoC 3 / PSoC 5 Project Objective This code example demonstrates how to perform USB Interrupt Transfer from a PC using the USB HID driver and PSoC 3 device. Overview USB

More information

AD5669R - Microcontroller No-OS Driver

AD5669R - Microcontroller No-OS Driver One Technology Way P.O. Box 9106 Norwood, MA 02062-9106 Tel: 781.329.4700 Fax: 781.461.3113 www.analog.com AD5669R - Microcontroller No-OS Driver Supported Devices AD5669R Evaluation Boards EVAL-AD5669RSDZ

More information

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX

Read section 8 of this document for detailed instructions on how to use this interface spec with LibUSB For OSX CP2130 INTERFACE SPECIFICATION 1. Introduction The Silicon Labs CP2130 USB-to-SPI bridge is a device that communicates over the Universal Serial Bus (USB) using vendor-specific control and bulk transfers

More information

RX Family APPLICATION NOTE

RX Family APPLICATION NOTE Using the Graphic LCD Controller Module Firmware Integration Technology Introduction APPLICATION NOTE R01AN3509EJ0100 Rev. 1.00 This application note describes the method to display images on the TFT-LCD

More information

MCUXpresso SDK USB Stack User s Guide

MCUXpresso SDK USB Stack User s Guide NXP Semiconductors Document Number: USBSUG User s Guide Rev. 5, 03/2017 MCUXpresso SDK USB Stack User s Guide 1 Overview This document provides the following: Detailed steps to compile the USB examples,

More information

USB Device Development Kit for HT32 Series Microcontrollers

USB Device Development Kit for HT32 Series Microcontrollers USB Device Development Kit for HT32 Series Microcontrollers D/N:AN0309E Introduction The HT32 series USB device development kit provides several components including a HT32 series USB device firmware library,

More information

Bluetooth low energy Protocol Stack

Bluetooth low energy Protocol Stack APPLICATION NOTE R01AN2768EJ0130 Rev.1.30 Introduction This manual describes how to develop an application using the Bluetooth low energy software (hereafter called BLE software), and overview of RWKE

More information

RX Smart Configurator

RX Smart Configurator APPLICATION NOTE RX Smart Configurator User s Guide: e² studio R20AN0451ES0120 Rev.1.20 Introduction This application note describes the basic usage of the RX Smart Configurator (hereafter called the Smart

More information

* USB Full-Speed Hub Controller

* USB Full-Speed Hub Controller * Full-Speed Hub Controller RENESAS 8Bit Single-chip Microcomputer 740 Family / 38000 Series Code:U_38K2 Date:Oct.10 06 Page: 1 of 13 Advantage of 38K2 group (#1) function #1 Point 1 Easy setting! Can

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for RENESAS M16C CPUs and HEW workbench Document Rev. 1 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/28 embos for M16C CPUs

More information

This document is an application note for the USB Peripheral Mass Storage Class Driver (PMSC) built using the USB Basic Mini Firmware.

This document is an application note for the USB Peripheral Mass Storage Class Driver (PMSC) built using the USB Basic Mini Firmware. using Basic Mini Firmware Introduction APPLICATION NOTE This document is an application note for the built using the USB Basic Mini Firmware. Target Device RL78/G1C, RL78/L1C, R8C/3MU, R8C/34U, R8C/3MK,

More information

RX Family APPLICATION NOTE. Flash Module Using Firmware Integration Technology. Introduction. Target Device. Related Documents

RX Family APPLICATION NOTE. Flash Module Using Firmware Integration Technology. Introduction. Target Device. Related Documents Introduction APPLICATION NOTE The (FIT) has been developed to allow users of supported RX devices to easily integrate reprogramming abilities into their applications using self-programming. Self-programming

More information

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA CE97091- PSoC 4: Time-Stamped ADC Data Transfer Using DMA Objective This code example uses a DMA channel with two descriptors to implement a time-stamped ADC data transfer. It uses the Watch Dog Timer

More information

1. Opening the sample code workspace Loading the selected sample code project and Opening sample code source files... 5

1. Opening the sample code workspace Loading the selected sample code project and Opening sample code source files... 5 APPLICATION NOTE Renesas Starter Kit Sample Code for e 2 studio R01AN1243EG0200 Rev.2.00 Introduction Renesas Starter Kits (RSK) are supplied as complete development systems for the selected microcontroller.

More information

Get Connected with USB on RX62N RX62N USB

Get Connected with USB on RX62N RX62N USB Get Connected with USB on RX62N RX62N USB LAB PROCEDURE Description: This lab is an introduction to the Renesas USB solution using an RX62N RSK. The RX USB block supports both Host and Function operation

More information

Universal Serial Bus Host Stack User s Manual V3.41

Universal Serial Bus Host Stack User s Manual V3.41 μc/ USB Host TM Universal Serial Bus Host Stack User s Manual V3.41 Micrium 1290 Weston Road, Suite 306 Weston, FL 33326 USA www.micrium.com Designations used by companies to distinguish their products

More information

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision 1.00 For Use With Analog Devices ADSP-SC58x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

In the HEW, open a new project by selecting New workspace from the main menu.

In the HEW, open a new project by selecting New workspace from the main menu. 1.1 Introduction Renesas s HEW 4.0 is used for developing application programs. Each program is opened as a separate project and the related files are stored in the relevant project directory. In the HEW,

More information

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used to connect devices such as microcontrollers, sensors,

More information

RL78/G14, RL78/G1C, RL78/L12, RL78/L13, RL78/L1C Group

RL78/G14, RL78/G1C, RL78/L12, RL78/L13, RL78/L1C Group APPLICATION NOTE RL78/G14, RL78/G1C, RL78/L12, RL78/L13, RL78/L1C Group Clock Synchronous Single Master Control Software Using CSI Mode of Serial Array Unit Introduction This application note explains

More information

Renesas USB MCU and USB ASSP

Renesas USB MCU and USB ASSP APPLICATION NOTE Renesas USB MCU and USB ASSP LibUSB - A Complete RX USB Function and PC Host Solution R01AN0492EJ0200 Rev. 2.00 Introduction You don t necessarily have to follow a class specification

More information

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family Getting Started with Renesas Development Tools R8C/3LX Family Description: The purpose of this lab is to allow a user new to the Renesas development environment to quickly come up to speed on the basic

More information

AD916x API Specification Rev 1.0

AD916x API Specification Rev 1.0 AD916x API Specification Rev 1.0 Page 1 of 84 TABLE OF CONTENTS Introduction...5 Purpose...5 Scope...5 DISCLAIMER...5 Software Architecture...6 Folder Structure...7 API Interface...8 Overview...8 ad916x.h...8

More information

Using UART in radio data transmission with the CDP-02 module By Tomihiko Uchikawa

Using UART in radio data transmission with the CDP-02 module By Tomihiko Uchikawa Using UART in radio data transmission with the CDP-02 module By Tomihiko Uchikawa Abstract: The first time a customer uses the CDP-TX-02N/RX-02N (called CDP-02 module) radio module, they are often uncertain

More information

AD9164 API Specification Rev 1.0

AD9164 API Specification Rev 1.0 AD9164 API Specification Rev 1.0 Page 1 of 89 ADI Confidential TABLE OF CONTENTS Introduction...5 Purpose...5 Scope...5 DISCLAIMER...5 Software Architecture...6 Folder Structure...7 API Interface...8 Overview...8

More information

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide August 12, 2011 AN - 166 HI-3200 Avionics Data Management Engine Evaluation Board Software Guide Introduction This application note provides more detail on the HI-3200 demo software provided in the Holt

More information

Certified Wireless USB Wire Adapter Model

Certified Wireless USB Wire Adapter Model Certified Wireless Wire Adapter Model Abdul R. Ismail Intel Corporation Content also provided by: Matt Katagiri, NEC Agenda Overview Software-Hardware Overview Delivery Mechanism: RPipe Hardware Architecture

More information

Universal Serial Bus - USB 2.0

Universal Serial Bus - USB 2.0 USB Packet Types USB has four packet types Token packets (type of transaction) Data Packets (payload / information) Handshake Packets (ack & error correction) Start of Frame packets (flag start of a new

More information

S1R72U01 Technical Manual

S1R72U01 Technical Manual S1R72U01 Technical Manual Rev. 1.00 NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right

More information

USB Peripheral Mass Storage Class Driver (PMSC) using Firmware Integration Technology

USB Peripheral Mass Storage Class Driver (PMSC) using Firmware Integration Technology APPLICATION NOTE Introduction R01AN2029EJ0123 Rev.1.23 This application note describes the USB peripheral mass storage class driver (PMSC), which utilizes Firmware Integration Technology (FIT). This module

More information

SL811HS Embedded USB Host/Slave Controller

SL811HS Embedded USB Host/Slave Controller SL811HS Embedded USB Host/Slave Controller Features First USB Host/Slave controller for embedded systems in the market with a standard microprocessor bus interface Supports both full speed (12 Mbps) and

More information

SCI Multi-Mode Module Using Firmware Integration Technology

SCI Multi-Mode Module Using Firmware Integration Technology Introduction APPLICATION NOTE R01AN1815EJ0211 Rev.2.11 This application note describes the serial communications interface (SCI) module which uses Firmware Integration Technology (FIT). This module uses

More information

NFC Framework and NT3H1201 Device Driver v1.1

NFC Framework and NT3H1201 Device Driver v1.1 NFC Framework and NT3H1201 Device Driver v1.1 Quickstart Guide for ARIS board All information contained in these materials, including products and product specifications, represents information on the

More information

Emulating Dual SPI Using FlexIO

Emulating Dual SPI Using FlexIO Freescale Semiconductor, Inc. Document Number: AN5242 Application Note Rev. 0, 01/2016 Emulating Dual SPI Using FlexIO 1. Introduction This application note discusses one example of how to use FlexIO module

More information

SL811HS Embedded USB Host/Slave Controller

SL811HS Embedded USB Host/Slave Controller SL811HS Embedded USB Host/Slave Controller 1.0 Features The first USB Host/Slave controller for embedded systems in the market with a standard microprocessor bus interface. Supports both full-speed (12

More information

RL78/I1A APPLICATION NOTE. Lighting Communications Using RL78/I1A (Transmission) Introduction. Target Devices. Contents. R01AN3193EJ0100 Rev.1.

RL78/I1A APPLICATION NOTE. Lighting Communications Using RL78/I1A (Transmission) Introduction. Target Devices. Contents. R01AN3193EJ0100 Rev.1. Introduction APPLICATION NOTE R01AN3193EJ0100 Rev.1.00 The application note explains the control program to be implemented in RL78/I1A Lighting Communication Master Evaluation Board. Refer to the "RL78/I1A

More information

Wind River USB for VxWorks 6 Programmer's Guide. Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3

Wind River USB for VxWorks 6 Programmer's Guide. Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3 Wind River USB for VxWorks 6 Programmer's Guide Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3 Copyright 2006 Wind River Systems, Inc. All rights reserved. No part of this publication may be reproduced

More information

Embedded USB Host/Slave Controller

Embedded USB Host/Slave Controller Embedded USB Host/Slave Controller Features Introduction First USB Host/Slave controller for embedded systems in the market with a standard microprocessor bus interface Supports both full speed (12 Mbps)

More information

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

CP2501 Programmer s Guide and API Specification

CP2501 Programmer s Guide and API Specification CP2501 Programmer s Guide and API Specification 1. Introduction The CP2501 devices are programmable, 8051-based devices that add a Windows-compatible, HID USB touchscreen interface to multi-touch devices,

More information

How to Develop Firmware for a Direct Drive TFT-LCD Design with RX62N By: Daniel Azimov, Software Specialist, System Design Center, Future Electronics A Direct Drive TFT-LCD design can drive high quality

More information

This process is a fundamental step for every USB device, fore without it, the device would never be able to be used by the OS.

This process is a fundamental step for every USB device, fore without it, the device would never be able to be used by the OS. What is USB Enumeration? Enumeration is the process by which a USB device is attached to a system and is assigned a specific numerical address that will be used to access that particular device. It is

More information

Bulk endpoints transport data whenever required and reliably; bulk data is acknowledged and therefore fault tolerant.

Bulk endpoints transport data whenever required and reliably; bulk data is acknowledged and therefore fault tolerant. DIY IN THIS DOCUMENT The way of thinking Specifying and discovering device capabilities What to do with your data Programming Devices Summary The (Universal Serial Bus) standard has been with us for many

More information

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C26 Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

s132_nrf52 release notes

s132_nrf52 release notes s132_nrf52 release notes Table of Contents Introduction to the s132_nrf52 release notes These release notes describe the changes in the s132_nrf52 from version to version. The release notes are intended

More information

This application note describes the specification of the JPEG codec unit (in the following, JCU) driver of SH7268/SH7269.

This application note describes the specification of the JPEG codec unit (in the following, JCU) driver of SH7268/SH7269. APPLICATION NOTE SH7268/7269 Group JPEG Codec Unit "JCU" Sample Driver R01AN2338EJ0104 Rev. 1.04 Introduction This application note describes the specification of the JPEG codec unit (in the following,

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

More information

RELEASE NOTE. RZ/T1 Group Encoder I/F HIPERFACE DSL application package. Summary. Device that HIPERFACE DSL functionality is checked

RELEASE NOTE. RZ/T1 Group Encoder I/F HIPERFACE DSL application package. Summary. Device that HIPERFACE DSL functionality is checked RELEASE NOTE R01AN3595EJ0110 Rev.1.10 Summary This document explains about RZ/T1. To use this application package, obtain release package of RZ/T1 Encoder I/F Configuration Library on the Renesas Electronics

More information

Firmware Programming Guide for PDIUSBD12

Firmware Programming Guide for PDIUSBD12 Philips Semiconductors Interconnectivity 23 September 1998 Version 1.0 Interconnectivity Page 2 of 22 This is a legal agreement between you (either an individual or an entity) and Philips Semiconductors.

More information

ARDUINO MEGA INTRODUCTION

ARDUINO MEGA INTRODUCTION ARDUINO MEGA INTRODUCTION The Arduino MEGA 2560 is designed for projects that require more I/O llines, more sketch memory and more RAM. With 54 digital I/O pins, 16 analog inputs so it is suitable for

More information

TPMC810. Isolated 2x CAN Bus. Version 1.1. User Manual. Issue June 2009

TPMC810. Isolated 2x CAN Bus. Version 1.1. User Manual. Issue June 2009 The Embedded I/O Company TPMC810 Isolated 2x CAN Bus Version 1.1 User Manual Issue 1.1.6 June 2009 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone: +49-(0)4101-4058-0 Fax: +49-(0)4101-4058-19

More information

SPI Framework Module Guide

SPI Framework Module Guide Application Note Introduction This module guide will enable you to effectively use a module in your own design. Upon completion of this guide, you will be able to add this module to your own design, configure

More information

Optional Pause Pulse for constant frame length of 282 clock ticks

Optional Pause Pulse for constant frame length of 282 clock ticks PSoC Creator Component Datasheet Single Edge Nibble Transmission (SENT_TX) 1.0 Features Compliant with SAE J2716 APR2016 (Issued 2007-04, Revised 2016-04) without any serial message formats Selectable

More information

Release Notes. Cypress EZ-USB FX3 SDK. Version 1.2.2

Release Notes. Cypress EZ-USB FX3 SDK. Version 1.2.2 Cypress EZ-USB FX3 SDK Release Notes Version 1.2.2 Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intl): 408.943.2600 http://www.cypress.com Cypress EZ-USB

More information

Sample Program using using USB Peripheral Mass Storage Class Driver (PMSC) to communicate via USB with USB Host Firmware Integration Technology

Sample Program using using USB Peripheral Mass Storage Class Driver (PMSC) to communicate via USB with USB Host Firmware Integration Technology APPLICATION NOTE R01AN2239EJ0123 RX Family Rev.1.23 Sample Program using using USB Peripheral Mass Storage Class Driver (PMSC) to communicate via USB with USB Host Firmware Integration Technology Introduction

More information

Integrated Device Technology, Inc Stender Way, Santa Clara, CA Phone #: (408) Fax #: (408) Errata Notification

Integrated Device Technology, Inc Stender Way, Santa Clara, CA Phone #: (408) Fax #: (408) Errata Notification Integrated Device Technology, Inc. 2975 Stender Way, Santa Clara, CA - 95054 Phone #: (408) 727-6116 Fax #: (408) 727-2328 Errata Notification EN #: IEN01-02 Errata Revision #: 11/5/01 Issue Date: December

More information

RX110, RX111, RX113, RX130

RX110, RX111, RX113, RX130 Introduction APPLICATION NOTE R01AN1666EJ0230 Rev. 2.30 This module (ADC FIT module) provides support for all features of the 12-bit A/D Converter (S12AD) on the RX110, RX111, RX113, RX130, RX210, RX230,

More information

Programming in the MAXQ environment

Programming in the MAXQ environment AVAILABLE The in-circuit debugging and program-loading features of the MAXQ2000 microcontroller combine with IAR s Embedded Workbench development environment to provide C or assembly-level application

More information

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP2

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP2 REJ10J1644-0100 E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP2 Renesas Microcomputer Development Environment System M16C Family / R8C/Tiny Series Notes on Connecting the R8C/10, R8C/11,

More information

AN3281 Application note

AN3281 Application note Application note STM8 8-bit MCUs I 2 C optimized examples Introduction This document describes how to use the following I 2 C optimized examples: Hardware configuration example of a common I 2 C bus Master

More information

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704

USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704 USB Complete The Developer's Guide Fifth Edition Jan Axelson Lakeview Research LLC Madison, WI 53704 Contents Introduction 1 USB Basics 1 Uses and limits 1 Benefits for users 2 Benefits for developers

More information

S1R72U06 Application Note

S1R72U06 Application Note S1R72U06 Application Note Rev. 1.00 NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right

More information

Cross-Domain Development Kit XDK110 Platform for Application Development

Cross-Domain Development Kit XDK110 Platform for Application Development USB Guide Cross-Domain Development Kit Platform for Application Development Bosch Connected Devices and Solutions : Data Sheet Document revision 1.0 Document release date 03/01/2017 Document number Technical

More information

PCI-HPDI32A-COS User Manual

PCI-HPDI32A-COS User Manual PCI-HPDI32A-COS User Manual Preliminary 8302A Whitesburg Drive Huntsville, AL 35802 Phone: (256) 880-8787 Fax: (256) 880-8788 URL: www.generalstandards.com E-mail: support@generalstandards.com User Manual

More information

When using this application note with other Renesas MCUs, careful evaluation is recommended after making modifications to comply with the alternate

When using this application note with other Renesas MCUs, careful evaluation is recommended after making modifications to comply with the alternate APPLICATION NOTE RX Family R01AN0513EJ0232 Rev.2.32 Introduction This application note describes. This driver operates in combination with the USB Basic Host Driver (USB-BASIC-F/W). It is referred to below

More information

8. Power Management and Sleep Modes

8. Power Management and Sleep Modes 8. Power Management and Sleep Modes 8.1 Features Power management for adjusting power consumption and functions Five sleep modes Idle Power down Power save Standby Extended standby Power reduction register

More information

Using FlexIO to emulate communications and timing peripherals

Using FlexIO to emulate communications and timing peripherals NXP Semiconductors Document Number: AN12174 Application Note Rev. 0, 06/2018 Using FlexIO to emulate communications and timing peripherals 1. Introduction The FlexIO is a new on-chip peripheral available

More information

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP9

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP9 REJ10J1646-0100 E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP9 Renesas Microcomputer Development Environment System M16C Family / R8C/Tiny Series Notes on Connecting the R8C/18, R8C/19,

More information

AN434: CP2110/4 Interface Specification

AN434: CP2110/4 Interface Specification The Silicon Laboratories CP2110 and CP2114 are USB devices that comply with the USB-defined HID (Human Interface Device) class specification. The USB host communicates with HID devices through the use

More information

M480 Series Errata Sheet

M480 Series Errata Sheet M480 Series Errata Sheet Errata Sheet for 32-bit NuMicro Family Document Information Abstract Apply to This errata sheet describes the functional problem known at the release date of this document. M480

More information

PDIUSBD11 USB Peripheral with I 2 C Serial Interface

PDIUSBD11 USB Peripheral with I 2 C Serial Interface PDIUSBD USB Peripheral with I C Serial Interface Features The PDIUSBD USB Device with Serial Interface from Philips Semiconductor allows almost any microcontroller the option of having a USB Interface.

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F38X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F38x Development Kit contains the following items: C8051F380 Target Board C8051Fxxx Development Kit Quick-start Guide Silicon Laboratories

More information

USB Host Mass Storage Class Driver (HMSC) using Firmware Integration Technology

USB Host Mass Storage Class Driver (HMSC) using Firmware Integration Technology APPLICATION NOTE Introduction R01AN2026EJ0123 Rev.1.23 This application note describes USB Host Mass Storage Class Driver(HMSC), which utilizes Firmware Integration Technology (FIT). This module operates

More information

AN433: CP2110/4 HID-to-UART API Specification

AN433: CP2110/4 HID-to-UART API Specification The Silicon Labs HID-to-UART interface library provides a simple API to configure and operate CP2110 and CP2114 devices. The library provides interface abstraction so that users can develop their application

More information

M16C R8C FoUSB/UART Debugger. User Manual REJ10J

M16C R8C FoUSB/UART Debugger. User Manual REJ10J REJ10J1725-0100 M16C R8C FoUSB/UART Debugger User Manual Renesas Microcomputer Development Environment System R8C Family R8C/2x Series Notes on Connecting R8C/2A, R8C/2B, R8C/2C, R8C/2D Rev.1.00 Issued

More information

RAM Based File System for HTTP daemon on Renesas M16 board

RAM Based File System for HTTP daemon on Renesas M16 board RAM Based File System for HTTP daemon on Renesas M16 board Cuong Phu Nguyen cpnguyen Kyung Chul Lee kclee CSC 714 Real Time Computer Systems Dr. Mueller November 30, 2005 1. Introduction The Renesas M16

More information

AN How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video Class (UVC) Framework

AN How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video Class (UVC) Framework AN75779 How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video Class (UVC) Framework Author: Karnik Shah Associated Project: Yes Software Version: FX3 SDK1.2.3 Related Application Notes:

More information

UM ISP1181x Microcontroller Eval Kit. Document information. Keywords isp1181a, isp1181b, usb, universal serial bus, peripheral

UM ISP1181x Microcontroller Eval Kit. Document information. Keywords isp1181a, isp1181b, usb, universal serial bus, peripheral Rev. 0 February 007 User manual Document information Info Content Keywords ispa, ispb, usb, universal serial bus, peripheral Abstract This document explains the ISPx microcontroller eval kit. This kit

More information

LibUSB: Create a Solution Without the Class Struggle!

LibUSB: Create a Solution Without the Class Struggle! LibUSB: Create a Solution Without the Class Struggle! RX USB lab 2L01I Description: Use a LibUSB PC Host application together with an target board USB Device. Lab objectives Understand how to easily create

More information

Approximately half the power consumption of earlier Renesas Technology products and multiple functions in a 14-pin package

Approximately half the power consumption of earlier Renesas Technology products and multiple functions in a 14-pin package Renesas Technology to Release R8C/Mx Series of Flash MCUs with Power Consumption Among the Lowest in the Industry and Powerful On-Chip Peripheral Functions Approximately half the power consumption of earlier

More information

Hello and welcome to this Renesas Interactive module that provides an overview of the RX DMA Controller

Hello and welcome to this Renesas Interactive module that provides an overview of the RX DMA Controller Hello and welcome to this Renesas Interactive module that provides an overview of the RX DMA Controller 1 The purpose of this Renesas Interactive module is to give you a basic understanding of the RX Direct

More information

How to Read This Manual

How to Read This Manual User's Manual RI850V4 V2 Real-Time Operating System User's Manual: Coding Target Device RH850 Family (RH850G3K) RH850 Family (RH850G3M) RH850 Family (RH850G3KH) RH850 Family (RH850G3MH) All information

More information

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003 Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003 S3C2440X is a derivative product of Samsung s S3C24XXX family of microprocessors for mobile communication market. The S3C2440X s main enhancement

More information

Bluetooth Low Energy Protocol Stack

Bluetooth Low Energy Protocol Stack APPLICATION NOTE Bluetooth Low Energy Protocol Stack R01AN1375EJ0120 Rev.1.20 Introduction This manual describes the installation, configuration and usage of sample program, which is included in the Bluetooth

More information

How to Implement USB Suspend/Resume Feature with MCUXpresso SDK USB Stack

How to Implement USB Suspend/Resume Feature with MCUXpresso SDK USB Stack NXP Semiconductors Document Number: AN5385 Application Note Rev. 0, How to Implement USB Suspend/Resume Feature with MCUXpresso SDK USB Stack 1. Introduction This application note contains the USB suspend/resume

More information

Design UART Loopback with Interrupts

Design UART Loopback with Interrupts Once the E is displayed, will the 0 reappear if you return the DIP switch to its OFF position and re-establish the loopback path? Usually not. When you break the loopback path, it will most likely truncate

More information

ARROW ARIS Board Software User s Guide 27/07/2016

ARROW ARIS Board Software User s Guide 27/07/2016 ARROW ARIS Board Software User s Guide All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and

More information

DAVE 3 Hands on / Quick Start Tutorial. Presentation Tutorial Start 1 v1.1: Creating a simple Project using PWM and Count Apps

DAVE 3 Hands on / Quick Start Tutorial. Presentation Tutorial Start 1 v1.1: Creating a simple Project using PWM and Count Apps DAVE Hands on / Quick Start Tutorial Presentation Tutorial Start v.: Creating a simple Project using PWM and Count Apps Project Changing the brightness of an LED with the PWM App PWMSP00 Interrupt on timer

More information

F²MC-8FX FAMILY MB95100 SERIES EMULATOR HW SETUP 8-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

F²MC-8FX FAMILY MB95100 SERIES EMULATOR HW SETUP 8-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note Fujitsu Microelectronics Europe Application Note MCU-AN-395002-E-V10 F²MC-8FX FAMILY 8-BIT MICROCONTROLLER MB95100 SERIES EMULATOR HW SETUP APPLICATION NOTE Revision History Revision History Date 2004-10-12

More information