AN1169. USB Mass Storage Class on an Embedded Device FEATURES INTRODUCTION LIMITATIONS ASSUMPTIONS SYSTEM HARDWARE. Microchip Technology Inc.
|
|
|
- Reginald Brown
- 9 years ago
- Views:
Transcription
1 USB Mass Storage Class on an Embedded Device Author: INTRODUCTION In recent years, there has been immense growth in Universal Serial Bus (USB) based applications, primarily due to the Plug-and-Play nature of USB. This application note discusses and provides a Mass Storage Device (MSD) function driver that can be integrated with almost any application running on Microchip 32-bit PIC microcontroller products with USB peripheral support. It describes the design and implementation of a USB MSD function driver using a Secure Digital card, which is useful to developers of USB mass storage solutions. This application may be used as a stand-alone MSD or as a Secure Digital/Multimedia Card (SD/MMC) reader/ writer interface. The MSD function driver uses the Microchip PIC32 USB device stack. ASSUMPTIONS Sean Justice Microchip Technology Inc. The author assumes that the reader is familiar with the following Microchip development tools: MPLAB IDE and MPLAB REAL ICE in-circuit emulator. It is also assumed that the reader is familiar with C programming language, and USB device protocol and descriptors. Terminology from these technologies is used in this document, and only brief overviews of the concepts are provided. Advanced users are encouraged to read the associated specifications. FEATURES This application note provides key components of an MSD device function driver. The Microchip MSD device function driver incorporates the following features: Functions independently of RTOS or application Supports Microchip MPLAB IDE tool suite Supports the MSD 1.0 specification Uses two USB endpoints that are configured for bulk transfers File system support (FAT16, FAT32, NTFS) is dependent on the host OS No custom drivers required Handles standard MSD USB configuration requests, as stated in Chapter 9 of the Universal Serial Bus Specification, Revision 2.0 (available on the Internet at the following URL: LIMITATIONS Since the MSD function driver is developed for use in embedded systems, the limitations are those that are inherited by the USB device stack (refer to Microchip Application Note AN1176, USB Device Stack for PIC32 Programmer s Guide. SYSTEM HARDWARE This application and firmware was developed for the following hardware: PIC32MX Family Microcontroller PIM (Processor Interface Module), supporting USB Microchip Explorer 16 Development Board USB PICtail Plus Daughter Board PICtail Daughter Board for SD and MMC Cards The USB device and MSD function driver source files can be modified to use an alternative development board and accommodate most hardware differences Microchip Technology Inc. DS01169A-page 1
2 PIC MCU MEMORY RESOURCE REQUIREMENTS The MSD function driver inherits all of the memory requires of the USB device stack. Refer to the Memory Resource Requirements section of AN1176, USB Device Stack for PIC32 Programmer s Guide for more information. The MSD function driver consumes Flash and RAM memory as shown in the following table: TABLE 1: MEMORY REQUIREMENTS Memory Flash RAM Size 11,700 Bytes 608 Bytes The MSD function driver application defines the following items: USB descriptor table MSD report structure The USB descriptor table and MSD report structure, are required for any MSD function driver application. USB descriptor table memory requirements are shown in the following table: TABLE 2: USB DESCRIPTOR TABLE Memory Size Flash 188 Bytes INSTALLING SOURCE FILES The complete source for the Microchip MSD function driver is available for download from the Microchip web site (see source code). The source code is distributed in a single Microsoft Windows installation file. Perform the following steps to complete the installation: 1. Execute the installation file. A Windows installation wizard will guide you through the installation process. 2. Before continuing with the installation process, you must accept the software license agreement by clicking I accept. 3. After completion of the installation process, you should see the following directory structure: a) msd_device_driver directory under \PIC32 Solutions\Microchip\USB. This directory contains the source files and documentation for the MSD function driver. b) USB directory under \PIC32 Solutions\ Microchip\Include. This directory contains the include files for the MSD function driver. c) usb_msd_device_demo directory under \PIC32 Solutions. This directory contains the demo project and source files for the MSD function driver mouse demo. 4. Refer to the release notes for the latest version-specific features and limitations. The amount of memory resources consumed by the USB descriptor table may vary, depending on various factors, including, but not limited to, whether multiple USB function drivers are used. If more than one driver is used, the number of configurations, interfaces, and endpoint configurations will affect memory consumption. DS01169A-page Microchip Technology Inc.
3 SOURCE FILE ORGANIZATION The MSD device class consists of multiple files. These files are organized in multiple directories. Table 3 shows the directory structure. TABLE 3: DEMO APPLICATION MSD SOURCE FILE DIRECTORY STRUCTURE File Directory Description msd.c msddsc.tmpl mediasd.c sdcard.tmpl \PIC32 Solutions\Microchip\USB\msd_device_driver USB MSD device class driver \PIC32 Solutions\Microchip\USB\msd_device_driver MSD descriptor template \PIC32 Solutions\Microchip\USB\msd_device_driver SD interface API \PIC32 Solutions\Microchip\USB\msd_device_driver SD user modifiable defines template usb_device_msd.h \PIC32 Solutions\Microchip\Include\USB API defines and modifiable macros msd_pri.h \PIC32 Solutions\Microchip\USB\msd_device_driver Private function and macro defines mediasd.h \PIC32 Solutions\Microchip\Include\USB SD interface header file An application that demonstrates the MSD function driver by simulating a removable disk drive is included with the Microchip MSD function driver. This application is designed to run on the Explorer 16 development board with Microchip USB device stack software. However, the application can be modified to support most boards. The disk-drive-simulation demo application performs the following services: USB device enumeration for MSD function driver (seen as a removable disk drive on Windows Explorer) Write, read, edit, or delete files on the simulated drive File system support (FAT16, FAT32, NTFS) is dependent on the host OS See the capacity of the SD memory card by using the disk properties function of the PC 2008 Microchip Technology Inc. DS01169A-page 3
4 Programming the Demo Application To program a target with the demo application, you must have access to an MPLAB REAL ICE in-circuit emulator. The following procedure assumes that you will be using MPLAB IDE. If not, please refer to your specific programmer s instructions. 1. Connect MPLAB REAL ICE in-circuit emulator to the Explorer 16 board or your target board. 2. Apply power to the target. 3. Launch MPLAB IDE. 4. Select the PIC32 device supporting USB of your choice (required only if you are importing a hex file previously built). 5. Enable MPLAB REAL ICE as a programmer. 6. Import the previously built hex file into MPLAB, if you wish to use it. 7. If you are rebuilding the hex file, open the project file and follow the build procedure to create the application hex file. 8. The demo application contains necessary configuration options required for the Explorer 16 board. If you are programming another type of board, make sure that you select the appropriate oscillator mode from the MPLAB IDE configuration settings menu. 9. Select the Programmer menu option in MPLAB IDE, and click Select Programmer->6 REAL ICE. 10. When MPLAB IDE has detected the REAL ICE in-circuit emulator and the PIC MCU, select the Programmer menu option and click Program to program the device. 11. After a few seconds, the message Programming successful will be displayed. If it is not, check the board and MPLAB REAL ICE connections. Refer to MPLAB IDE and REAL ICE online help for further assistance. 12. Remove power from the board and disconnect the MPLAB REAL ICE cable from the target board. 13. Reapply power to the board and make sure that the LCD reads PIC32 MSD Device. If it does not, check your programming steps and repeat, if necessary. Building the Demo Application The demo application included in this application note can be built using the Microchip C32 C compiler. If required, port the source to the compiler that you customarily use with Microchip microcontroller products. This application note includes a predefined MSD project file for use with Microchip MPLAB IDE. The project was created using a PIC32MX device with USB. If a different device is used, the appropriate device must be selected through the MPLAB IDE menu command. In addition, the demo application project uses additional include paths as defined in the Build Options of MPLAB IDE. The following include paths are required:.\..\microchip\include..\..\microchip\include DS01169A-page Microchip Technology Inc.
5 Table 4 lists the source files that are necessary to build the demo application. TABLE 4: DEMO APPLICATION PROJECT FILES File Directory Description main.c \PIC32 Solutions\usb_msd_device_demo Main demo source file msddsc.c \PIC32 Solutions\usb_msd_device_demo MSD USB descriptors sdcard.def \PIC32 Solutions\usb_msd_device_demo SD card user defines HardwareProfile.h \PIC32 Solutions\usb_msd_device_demo Hardware defines for the PIC32MX usb_config.h \PIC32 Solutions\usb_msd_device_demo USB specific defines for helper functions msd.c \PIC32 Solutions\Microchip\USB\msd_device_driver USB MSD source file mediasd.c \PIC32 Solutions\Microchip\USB\msd_device_driver SD card APIs msd_pri.h \PIC32 Solutions\Microchip\USB\msd_device_driver Private function and macro definitions usb_device_msd.h \PIC32 Solutions\Microchip\Include\USB USB MSD include file mediasd.h \PIC32 Solutions\Microchip\Include\USB SD card API prototypes and defines usb_device.c \PIC32 Solutions\Microchip\USB USB device APIs usb_hal.c \PIC32 Solutions\Microchip\USB USB hardware APIs usb_hal_core.c \PIC32 Solutions\Microchip\USB USB hardware core APIs usb.h \PIC32 Solutions\Microchip\Include\USB USB defines and API prototypes usb_ch9.h \PIC32 Solutions\Microchip\Include\USB USB defines and support, as in Chapter 9 of the Universal Serial Bus Specification, Revision 2.0 usb_common.h \PIC32 Solutions\Microchip\Include\USB USB common defines usb_device.h \PIC32 Solutions\Microchip\Include\USB USB device defines and API prototypes usb_hal.h \PIC32 Solutions\Microchip\Include\USB USB hardware support mstimer.c \PIC32 Solutions\Microchip\Common 1 millisecond timer ex16lcd.c \PIC32 Solutions\Microchip\Common Explorer 16 Development Board LCD mstimer.h \PIC32 Solutions\Microchip\Include 1 millisecond timer defines ex16lcd.h \PIC32 Solutions\Microchip\Include Explorer 16 Development Board LCD defines 2008 Microchip Technology Inc. DS01169A-page 5
6 The following is a high-level procedure for building the demo application. This procedure assumes that you are familiar with MPLAB IDE and will be using MPLAB IDE to build the application. If not, refer to the instructions for your programmer to create and build the project. 1. Make sure that source files for the Microchip MSD function driver are installed. If not, please refer to Installing Source Files section. 2. Launch MPLAB IDE and open the project file. 3. Use MPLAB IDE menu commands to build the project. Note that the demo project is created to compile properly when the source files are located in the wizard-recommended directory structure. If you have moved or installed the source files to another location, you must recreate or modify existing project settings to build. See Building the Demo Application for more information. 4. The build process should finish successfully. If not, make sure that your MPLAB IDE and compiler are setup correctly. Application-Specific USB Support In using the Microchip PIC32 USB device firmware stack, the MSD demo implements the following application-specific tables. 1. USB Descriptor Table 2. Endpoint Configuration Table 3. Function Driver Table THE USB DESCRIPTOR TABLE Every USB device must provide a set of descriptors (data structures) that describe the device and provide details to the USB host about which class drivers to use. These descriptors are provided, and the information they contain, is clearly defined in Chapter 9 of the Universal Serial Bus Specification, Revision 2.0 and Universal Serial Bus Mass Storage Class, Bulk-Only Transport, Revision 1.0, available on the USB web site. Refer to these documents for complete details. The USB device descriptors can be organized into three groups: Device Configuration Strings The device descriptor identifies the type of device and gives the number of possible configurations. The configuration descriptors describe the types of interfaces and endpoints used. This group also includes class-specific descriptors. The string descriptors, although generally optional, provide user-readable information that the host may display. Demo Application Descriptor Table The descriptor table that is provided by the demo application is included in the source file msddsc.c and outlined in Appendix C: USB MSD Function Driver Descriptor Table Definitions. The demo application descriptor table can be modified to add other interfaces or configurations. However, it is advisable that a thorough understanding of Chapter 9 of the Universal Serial Bus Specification, Revision 2.0 and other applicable device function-driver-specific specifications is achieved before attempting to modify a descriptor table. DS01169A-page Microchip Technology Inc.
7 ENDPOINT CONFIGURATION TABLE The endpoint configuration table is used by the USB device stack to properly configure all endpoints by interface and alternate setting as defined by the descriptor table. The table identifies which function driver will be used to service events that occur on each endpoint. Each table entry contains the following information: Maximum packet size Configuration flags Configuration number Endpoint number Interface number Alternate setting Index in device function table for the endpoint handler The endpoint configuration table for the demo application contains one entry because the MSD function driver only requires two endpoints (Bulk-In and Bulk- Out). The following table can be found in the source file msddsc.c. Microchip application note AN1176, USB Device Stack for PIC32 Programmer s Guide provides additional information about the endpoint configuration table. EXAMPLE 1: ENDPOINT CONFIGURATION TABLE const EP_CONFIG _EpConfigTlb[] = { { MSD_EP_OUT_SIZE, // max pack size USB_EP_TRANSMIT USB_EP_HANDSHAKE USB_EP_RECEIVE, // configure for Tx & Rx // enable handshaking 1, // configuration number 1, // endpoint number 0, // interface number 0, // alternate setting 0 // handler function index }; }, 2008 Microchip Technology Inc. DS01169A-page 7
8 FUNCTION DRIVER TABLE Since a device may implement more then one class or vendor-specific USB device function driver, the Microchip USB device stack uses a table to manage access to support the function driver(s). Each table entry contains the information necessary to manage a single function driver. Each table entry contains the following information: Initialization routine Event handler routine Initialization flags The function driver table for the demo applications contains one entry because there is only one function driver: MSD. The following table can be found in the source file msddsc.c. Refer to AN1176, USB Device Stack for PIC32 Programmer s Guide for further information on the function driver table. EXAMPLE 2: FUNCTION DRIVER TABLE const FUNC_DRV _DevFuncTbl[] = { { MSDInit, // Initialization routine MSDEventhandler, // Event handler routine 0 // Initialization flags } }; DS01169A-page Microchip Technology Inc.
9 MSD FUNCTION DRIVER OVERVIEW MSD Descriptor Every USB device has descriptor structure associated with it. A device may contain multiple function drivers e.g., HID, CDC, which are defined in the interface layer. Figure 1 shows a descriptor structure tree that would define an MSD class. FIGURE 1: Device Descriptor Configuration Descriptor Interface Descriptor Endpoint Descriptor USB DESCRIPTOR FOR MSD FUNCTION DRIVER String Descriptor MSD Function Driver Descriptor Information MSD Command Block and Status Wrappers (CBW and CSW) Bulk transfers are useful for transferring data when time is not a critical factor. Only high-speed and fullspeed devices can do bulk transfers. A bulk transfer can send large amounts of data without overloading the bus, because it waits for the availability of the bus. The Mass Storage Class supports two transport protocols that determine which transfer type the device and host use to send command, data and status information. These two types of transport protocols are: Bulk-Only Transport (BOT) Control/Bulk/Interrupt (CBI) Transport BOT is a data transport protocol that uses Bulk transport, whereas CBI transport uses Control transfer, Bulk transport and Interrupt transfer. In this application, BOT is used as the data transport protocol. The Mass Storage Class specification defines two class-specific requests, Get Max LUN and Mass Storage Reset, that must be implemented by a mass storage device. (LUN [Logical Unit Number] is how a SCSI bus identified multiple drives [units] on a single bus.) Bulk-Only Mass Storage Reset is used to reset the mass storage device and its associated interface. The Get Max LUN request is used to determine the number of logical units that are supported by the device. The value of Max LUN can vary between 0 and 15 (1-16 logical devices). Note that the LUN starts from 0. The device may share multiple logical units that share the common device characteristics. The host should not send the Command Block Wrapper (CBW) to a non-existing LUN. A device implementing BOT will support at least three endpoints: Control (required by all USB devices), Bulk- In and Bulk-Out. The USB 2.0 specification defines a control endpoint (Endpoint 0) as the default endpoint that does not require a descriptor. The Bulk-In endpoint is used for transferring data and status from the device to the host, and the Bulk-Out endpoint is used for transferring commands and data from the host to the device. Note: USB defines data flow direction from the point of view of the host. An IN endpoint transmits data from the device to the host and an OUT endpoint receives data from the host Microchip Technology Inc. DS01169A-page 9
10 Bulk-Only Transport (BOT) Like a Control transfer, a Bulk Only Transfer (BOT) also consists of a Command stage, an optional Data stage and a Status stage. The Data stage may or may not be present for all command requests. Figure 2 shows the flow of Command transport, Data- In, Data-Out and Status transport for BOT. The Command Block Wrapper (CBW) is a short packet of exactly 31 bytes in length. The CBW and all subsequent data and Command Status Wrapper (CSW) start on a new packet boundary. It is important to note that all CBW transfers are ordered little-endian with LSB (byte 0) first. FIGURE 2: COMMAND/DATA/STATUS FLOW IN BULK-ONLY TRANSPORT Ready Command Transport (CBW) Data-Out (from host) Data-In (to host) Status Transport (CSW) DS01169A-page Microchip Technology Inc.
11 Table 5 shows the format of a CBW packet. In the CBW, the dcbwsignature value, h (littleendian representation of the ASCII string USBC, for USB Command), identifies a CBW packet. dcbwtag is the command block tag that is echoed back in CSW to associate the CSW with the corresponding CBW. dcbwdatatransferlength indicates the number of bytes the host expects to transfer on a Bulk-In or Bulk- Out endpoint (as indicated by the Direction bit). Only bit 7 of bmcbwflags is used to indicate the direction of data flow, with a 1 signifying Data-In (i.e., from device to host). The field, bcbwlun, specifies the device LUN to which the command block is being sent. The field, bcbwcb, defines the valid length of the command block. The CBWCB is the command block to be executed by the device. TABLE 5: COMMAND BLOCK WRAPPER (CBW) FORMAT Command Block Wrapper Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit dcbwsignature dcbwtag dcbwtransferlength bmcbwflags 13 Reserved (0) bcbwlun 14 Reserved (0) bcdmclength CBWCB Microchip Technology Inc. DS01169A-page 11
12 Table 6 shows the format of a CSW which is 13 bytes in length. A dcswsignature value of h (little-endian representation of the ASCII string USBS, for USB Status) identifies a CSW packet. The field, dcswtag, echoes the dcswtag value from the associated CBW. For Data-Out, dcswdataresidue is the difference between the data expected and the actual amount of data processed by the device. For Data-In, it is the difference between the data expected and the actual amount of relevant data sent by the device. The value of dcswdataresidue is always less than or equal to the value of dcbwdatatransferlength. The value of bcswstatus indicates the success or failure of the command. The bcswstatus value of 00h indicates command success; 01h indicates command failure; and 02h indicates phase error. TABLE 6: COMMAND STATUS WRAPPER (CSW) FORMAT Command Status Wrapper Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit dcswsignature dcswtag dcswdataresidue bmcswstatus DS01169A-page Microchip Technology Inc.
13 SCSI Commands After the successful enumeration of the target USB device, the host initiates commands according to the Interface Sub-Class specified in the interface descriptor during the enumeration process. The USB MSD application specifies interface subclass of 06h, indicating that the device will support SCSI Primary Commands-2 (SPC-2) or later. An Interface Protocol value of 50h in the interface descriptor indicates that the BOT protocol is being used. As shown in Figure 2, a BOT transfer begins with a CBW. The device indicates the successful transport of a CBW by accepting (ACKing) the CBW. If the host detects a STALL of the Bulk-Out endpoint during Command transport, the host will respond with a Reset recovery. The host will attempt to transfer an exact number of bytes to or from the device as specified by the dcbwdatatransferlength and the Direction bit. The device will send each CSW to the host via the Bulk- In endpoint. In this section, we briefly describe the SCSI commands that are supported in the MSD implementation. The reader may refer to SCSI Primary Commands-3 (SPC-3) and SCSI Block Commands-2 (SBC-2) specifications for further details. The first byte of the command block, CBWCB, is always the operation code or opcode in short. INQUIRY (Opcode 12h) READ CAPACITY (Opcode 25h) READ (10) (Opcode 28h) WRITE (10) (Opcode 2Ah) REQUEST SENSE (6) (Opcode 03h) MODE SENSE (6) (Opcode 1Ah) PREVENT ALLOW MEDIUM REMOVAL (Opcode 1Eh) TEST UNIT READY (Opcode 00h) VERIFY (10) (Opcode 2Fh) START/STOP (Opcode 1Bh) The following items describe the operations: INQUIRY (Opcode 12h): The INQUIRY command requests that the information regarding the logical unit and SCSI target device is sent to the application client (host). The SPC-3 specification requires that the INQUIRY data should be returned, even though the device server is not ready for other commands. Moreover, the standard INQUIRY data should be available without incurring any media access delays. The standard INQUIRY data is at least 36 bytes and is shown in Appendix D: Standard Inquiry Format. READ CAPACITY (Opcode 25h): The READ CAPACITY command requests that the device server transfer bytes of parameter data that describe the capacity and medium format to the Data-In buffer. The response to the READ CAPACITY command is 4 bytes of returned Logical Block Address and 4 bytes of block length in bytes. Returned Logical Block Address is the logical block address of the last logical block on the direct access block device. If the number of logical blocks exceeds the maximum value that can be specified in the returned Logical Block Address field, the device will set the returned Logical Block Address field to FFFFFFFFh. READ (10) (Opcode 28h): The READ (10) command specifies that the device server reads the specified logical block(s) and transfers them to the Data-In buffer. The READ (10) command is a 10-byte CBWCB, with the eighth and ninth bytes specifying the TRANSFER LENGTH. The TRANSFER LENGTH field specifies the number of contiguous logical blocks of data that will be read and transferred to the Data-In buffer, starting with the logical block specified by the Logical Block Address field (bytes 3-6). A TRANSFER LENGTH field set to zero specifies that no logical blocks will be read. WRITE (10) (Opcode 2Ah): The WRITE (10) command requests that the device server transfers the specified logical blocks from the Data-Out buffer and write them. The CBWCB format for the WRITE (10) command is the same as the READ (10) command with TRANSFER LENGTH specifying the number of contiguous logical blocks of data that will be transferred from the Data-Out buffer and written, starting with the logical block specified by the Logical Block Address field. A TRANSFER LENGTH field set to zero specifies that no logical blocks will be written Microchip Technology Inc. DS01169A-page 13
14 REQUEST SENSE (6) (Opcode 03h): The REQUEST SENSE (6) command requests that the device server transfers the sense data to the application client. Appendix E: Fixed Format Sense Data shows the fixed format sense data response. The contents of the RESPONSE CODE field indicate the error type and format of the sense data. RESPONSE CODE 70h signifies the current error. RESPONSE CODE 71h signifies the deferred error in the fixed format sense data. And, code values 72h and 73h indicate the current and deferred error code in the descriptor format sense data. The SENSE KEY, ADDITIONAL SENSE CODE (ASC), and ADDITIONAL SENSE CODE QUALIFIER (ASCQ) fields provide a hierarchy of information. The SENSE KEY field indicates the generic information describing an error or exception condition. The ASC field indicates further information related to the error reported in the SENSE KEY field. The ASCQ field indicates the detailed information related to the ADDITIONAL SENSE CODE. Refer to Table 27 and Table 28 of the SPC-3 specification for a list of SENSE KEY error codes, and ASC and ASCQ error code assignments. This application implements the fixed format, current error code sense data response. MODE SENSE (6) (Opcode 1Ah): The MODE SENSE (6) command provides a means for a device server to report parameters to an application client. It is a complementary command to the MODE SELECT (6) command. The mode parameter header that is used by the MODE SENSE (6) and the MODE SELECT (6) command is shown in Appendix F: Mode Sense Header. The MEDIUM TYPE and DEVICE SPECIFIC PARAMETER fields are unique for each device type. In this application, the MEDIUM TYPE field is set to 00h, indicating a direct access block device. This value is the same as the value of the PERIPHERAL DEVICE TYPE field in the standard INQUIRY data. TEST UNIT READY (Opcode 00h): The TEST UNIT READY command provides a means to check if the logical unit is ready. This is not a request for self-check. If the logical unit is able to accept an appropriate medium access command, without returning a Check Condition status, this command will return a Good status. Otherwise, the command is terminated with the Check Condition status and the SENSE KEY is set to reflect the error condition. PREVENT ALLOW MEDIUM REMOVAL (Opcode 1Eh): The PREVENT ALLOW MEDIUM REMOVAL command requests that the logical unit enables or disables the removal of the medium. The prevention of medium removal will begin when an application client issues a PREVENT ALLOW MEDIUM REMOVAL command with a PREVENT field (fifth byte, bits 0-1 of CBWCB) of 01b or 11b (i.e., medium removal prevented). Because there is no way to prevent the removal of an SD card, the firmware decodes the command and prepares to notify the host PC that the operation has been successfully completed. If the medium is inaccessible, the command is specified as Fail (bcswstatus = 0x01) with the SENSE KEY set to Not Ready. VERIFY (10) (Opcode 2Fh): The VERIFY (10) command requests that the device server verifies the specified logical block(s) on the medium. If the BYTCHK bit is set to 0, the device will perform medium verification with no data comparison, and will not transfer any data from the Data-Out buffer. If the BYTCHK bit is set to 1, the device server will perform a byte-by-byte comparison of user data that is read from the medium and user data that is transferred from the Data-Out buffer. The firmware decodes the command and then prepares to notify the host PC that the command has been successfully completed. If the medium is inaccessible, the command is specified as Fail, with the SENSE KEY set to Not Ready. START/STOP (Opcode 1Bh): The START/STOP command requests that the device server changes the power condition of the logical unit, load, or eject, the medium. This includes specifying that the device server enable or disable the direct access block device for medium access operations by controlling power conditions and timers. The POWER CON- DITION field (fifth byte, bit 7-4) is used to specify that the logical unit be placed into a power condition or to adjust a timer. If the value of this field is not equal to 0h, the START (fifth byte, bit 0) and LOEJ (Load Eject, fifth byte, bit 1) bits are ignored. If the POWER CONDITION field is Active (1h), Idle (2h), or Standby (3h), the logical unit will transition to the specified power. If POWER CONDITION = 0h (START_VALID), the START, LOEJ = (0,0) signifies that the logical unit will transition to the stopped power condition; START, LOEJ = (0,1) signifies the logical unit will unload the medium; START, LOEJ = (1,0) signifies that the logical unit will transition to the active power condition. If START, LOEJ = (1,1), then the logical unit will load the medium. DS01169A-page Microchip Technology Inc.
15 UNSUPPORTED Commands If the command opcode field in the CBWCB is not supported, the SENSE KEY is set to Illegal Request, indicating that there was an illegal parameter in the CDB, with ASC and ACSQ codes set corresponding to an invalid command opcode. Secure Digital (SD) Card A Secure Digital card is a common storage media used in portable devices (e.g., PDAs, digital cameras and MP3 players, among others). SD cards can be purchased in various storage sizes. Both SD cards and the MMC support the SPI transfer protocol, and have an electrical interface that is almost identical. While the form factor and the shape of the SD card and the MMC are identical, SD cards can be operated up to four times faster, have a write-protect switch, and may include cryptographic security for protection of copyrighted data. These features have increased the popularity of SD cards over MMC. Consequently, SD cards are the focus of this design. However, MMC have been tested and found to be fully functional with the MSD design. An SD card can be operated in SD Bus mode or Serial Peripheral Interface (SPI) mode. In this application, the SD card is connected to the SPI bus of the PIC32MX and operated in that mode. In the SPI mode, only one data line is used for data transmission in each direction. Therefore, the data transfer rate in this mode is the same as it is in SD Bus mode with one data line (up to 25 Kbits per second). Apart from the Power and Ground, the SPI bus consists of Chip Select (CS), Serial Data Input (SDI), Serial Data Output (SDO) and Serial Clock (SCLK) signals. The SD card and MMC sample data input on the rising clock edge and set data output on the falling clock edge. On power-up, an SD card wakes up in SD Bus mode. Therefore, an initialization routine is required to operate the SD card in SPI mode. Initialization can be achieved by asserting the CS signal (logic low) during the reception of the Reset command, CMD0. In SPI mode, unlike SD Bus mode, the selected card always responds to the command. In case of a data retrieval problem, the card responds with an error response instead of a timeout, as it does in SD Bus mode. See References for information on the SD card specification. Note: Use of the information in these last two paragraphs may require a license from the SD Card Association Microchip Technology Inc. DS01169A-page 15
16 CONCLUSION This document and the associated custom demo application consisting of a mass storage demo using the MSD function driver. Normally, managing the Universal Serial Bus requires that a developer handle protocols for device identification, control, and data transfer. However, Microchip has taken care of the USB details and provided a simple HID function driver to make implementing applications simple for developers who use supported Microchip microcontrollers. REFERENCES Microchip Application Note AN1176, USB Device Stack for PIC32 Programmer s Guide Universal Serial Bus Specification, Revision Directory Snoop, Version 5.01, FAT File System Specification available by license, MC74VHCT125A Data Sheet, MMC Specifications some are available by license and others are available for purchase, Microchip MPLAB IDE In-circuit Development Environment, available free of charge, by license, from SCSI Primary Commands-2 (SPC-2), Revision i23, 18 July 2003, SCSI Primary Commands-3 (SPC-3), Revision 21d, 14 February 2005, SCSI Block Commands-2 (SBC-2), Revision 16, 13 November 2004, SD Card Specification available by license, SnoopyPro 0.22, USB Complete: Everything You Need to Develop Custom USB Peripherals by Jan Axelson, ISBN Universal Serial Bus Mass Storage Class Bulk-Only Transport, Revision usbmassbulk_10.pdf DS01169A-page Microchip Technology Inc.
17 APPENDIX A: MICROCHIP MSD FUNCTION DRIVER DEPENDENCIES MSDEventHandler USB Device Event Handler Function The Microchip MSD function driver application note provides an event handler that is compliant with Microchip s AN1176, USB Device Stack for PIC32 Programmer s Guide application note. This routine must be placed into the defined USB device function driver table. Syntax PUBLIC BOOL MSDEventHandler(USB_EVENT event, void *data, UINT size) Parameters event Enumerated data type identifying the event that has occurred (see below pre-defined events) data A pointer to event-dependent data (if available, see below) size The size of the event-dependent data, in bytes. Return Values TRUE if successful; FALSE, if not Remarks Refer to AN1176, USB Device Stack for PIC32 Programmer s Guide for more information. MSDInit USB Device Initialization Handler Function This routine initializes all data structures associated with MSD Function Driver. This routine must be placed into the defined USB device function driver table. Syntax PUBLIC BOOL MSDInit(unsigned long flags) Parameters flags reserved, pass a 0 Return Values TRUE if initialization passed, else FALSE Remarks The flags parameter is passed as the initialization flags parameter of the USB device function driver table. Note: Refer to Application Note AN1176, USB Device Stack for PIC32 Programmer s Guide for more information on HIDEventHandler and HIDInit Microchip Technology Inc. DS01169A-page 17
18 APPENDIX B: MSD FUNCTION DRIVER MACROS The USB Mass Storage Class on an Embedded Device provides several function driver macros to customize it for an application. The following MSD function driver macros are available in the Microchip USB MSD Class on an Embedded Device and should be defined by the application in usb_config.h. MSD_USB_ENDPNT MSD_EP_IN_SIZE MSD_EP_OUT_SIZE MSD_USB_ENDPNT Purpose: The endpoint from which the MSD function driver will send and receive data Default: 1 MSD_EP_IN_SIZE Purpose: The size, in bytes, of the MSD function driver endpoint IN Default: 32 MSD_EP_OUT_SIZE Purpose: The size, in bytes, of the MSD function driver endpoint OUT Default: 64 DS01169A-page Microchip Technology Inc.
19 APPENDIX C: USB MSD FUNCTION DRIVER DESCRIPTOR TABLE DEFINITIONS TABLE C-1: DEVICE DESCRIPTOR Field MSD Function Driver Value Description blength 12h Size of this descriptor bdescriptortype 1 Type, always USB device descriptor bcdusb 200h USB specification version in BCD bdeviceclass 0 Device class code bdevicesubclass 0 Device sub-class code bdeviceprotocol 0 Device protocol bmaxpacketsize 10h Endpoint 0 max packet size idvendor 4D8h Vendor ID (VID) idproduct 9 Product ID (PID) bcddevice 1 Device release number in BCD imanufacturer 1 Manufacturer name string index iproduct 2 Product description string index iserialnum 0 Product serial number string index bnumconfigurations 1 Number of supported configurations TABLE C-2: CONFIGURATION DESCRIPTOR Field MSD Function Driver Value Description blength 9 Size of this descriptor bdescriptortype 2 Type, always USB configuration descriptor wtotallength 20h Total length of all descriptors bnuminterfaces 1 Number of interfaces bconfigurationvalue 1 ID value iconfiguration 0 Index of the string descriptor bmattributes reserved_zero 0 Always 0 remote_waking 1 1 if device supports remote wake-up self_powered 0 1 if device is self-powered reserved_one 1 Always 1 bmaxpower 50 milliamps/2 ex. 100 ma = Microchip Technology Inc. DS01169A-page 19
20 TABLE C-3: INTERFACE DESCRIPTOR Field MSD Function Driver Value Description blength 9 Size of this descriptor bdescriptortype 4 Type, always USB interface descriptor binterfacenumber 0 ID number of the interface balternatesetting 0 ID number of the alternate interface setting bnumendpoints 2 Number of endpoints in this interface binterfaceclass 8 USB Mass Storage interface class ID binterfacesubclass 6 USB Mass Storage interface sub-class ID binterfaceprotocol 50h USB SCSI transport interface BOT protocol ID iinterface 0 Interface description string index TABLE C-4: ENDPOINT DESCRIPTOR Field MSD Function Driver Value Description blength 7 Size of this descriptor bdescriptortype 5 Type, always USB endpoint descriptor bendpointaddress ep_num 1 Endpoint number reserved 0 Always 0 direction 1 IN or OUT bmattribute transfer_type 0 Transfer type synch_type 1 Synch type usage_type 0 Usage type reserved 0 Always 0 wmaxpacketsize 64 Largest packet the endpoint can handle binterval 0 Time between polling this endpoint for data TABLE C-5: SERIAL STRING DESCRIPTOR Field MSD Function Driver Value Description blength 4 Size of this descriptor bdescriptortype 3 Type, always USB string descriptor wlangid[] 409h String DS01169A-page Microchip Technology Inc.
21 TABLE C-6: MANUFACTURE STRING DESCRIPTOR Field MSD Function Driver Value Description blength 34h Size of this descriptor bdescriptortype 3 Type, always USB string descriptor wlangid[] Microchip Technology Inc. String TABLE C-7: SERIAL STRING DESCRIPTOR Field MSD Function Driver Value Description blength 3Ah Size of this descriptor bdescriptortype 3 Type, always USB string descriptor wlangid[] Microchip Mass Storage Drive String 2008 Microchip Technology Inc. DS01169A-page 21
22 APPENDIX D: STANDARD INQUIRY FORMAT Standard Inquiry Format Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 Peripheral Qualifiers Peripheral Device Type 1 RMB Reserved 2 Version 3 Obsolete NORMACA HISUP Response Data Format 4 Additional Length (n-4) 5 SCCS ACC TPGS 3PC Reserved PROTECT 6 BQUE ENSERV VS MULTIP MCHNGR Obsolete ADDR16 7 Obsolete WUSB16 SYNC LINKED Obsolete CMDQUE VS T10 Vendor Identification Product Identification Product Revision Level DS01169A-page Microchip Technology Inc.
23 APPENDIX E: FIXED FORMAT SENSE DATA Fixed Format Sense Data Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 Response Code (70h or 71h) 1 Obsolete 2 Filemark EOM ILI Reserved Sense Key 3 4 Information Additional Sense Length (n-7) 8 9 Command Specific Information Additional Sense Code 13 Additional Sense Code Qualifiers 14 Field Replacement Unit Code Sense Key Specific Additional Sense Bytes...n APPENDIX F: MODE SENSE HEADER Mode Sense Header Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 Mode Data Length 1 Medium Type 2 Device Specific Parameter 3 Block Descriptor Length 2008 Microchip Technology Inc. DS01169A-page 23
24 Software License Agreement The software supplied herewith by Microchip Technology Incorporated (the Company ) is intended and supplied to you, the Company s customer, for use solely and exclusively with products manufactured by the Company. The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATU- TORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU- LAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. APPENDIX G: SOURCE CODE FOR THE MASS STORAGE CLASS FUNCTION DRIVER The complete source code for the Microchip USB Mass Storage Class on an Embedded Device driver is offered under a no-cost license agreement. It is available for download as a single archive file from the Microchip corporate web site, at: After downloading the archive, always check the file release notes for the current revision level and a history of changes to the software Microchip Technology Inc. DS01169A-page 24
25 REVISION HISTORY Rev. A Document (02/2008) This is the initial released version of this document Microchip Technology Inc. DS01169A-page 25
26 NOTES: DS01169A-page Microchip Technology Inc.
27 Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, Accuron, dspic, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, rfpic and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dspicdem, dspicdem.net, dspicworks, dsspeak, ECAN, ECONOMONITOR, FanSense, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mtouch, PICkit, PICDEM, PICDEM.net, PICtail, PIC 32 logo, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rflab, Select Mode, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2008, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company s quality system processes and procedures are for its PIC MCUs and dspic DSCs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip s quality system for the design and manufacture of development systems is ISO 9001:2000 certified Microchip Technology Inc. DS01169A-page 27
28 WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: Web Address: Atlanta Duluth, GA Tel: Fax: Boston Westborough, MA Tel: Fax: Chicago Itasca, IL Tel: Fax: Dallas Addison, TX Tel: Fax: Detroit Farmington Hills, MI Tel: Fax: Kokomo Kokomo, IN Tel: Fax: Los Angeles Mission Viejo, CA Tel: Fax: Santa Clara Santa Clara, CA Tel: Fax: Toronto Mississauga, Ontario, Canada Tel: Fax: ASIA/PACIFIC Asia Pacific Office Suites , 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: Fax: Australia - Sydney Tel: Fax: China - Beijing Tel: Fax: China - Chengdu Tel: Fax: China - Hong Kong SAR Tel: Fax: China - Nanjing Tel: Fax: China - Qingdao Tel: Fax: China - Shanghai Tel: Fax: China - Shenyang Tel: Fax: China - Shenzhen Tel: Fax: China - Wuhan Tel: Fax: China - Xiamen Tel: Fax: China - Xian Tel: Fax: China - Zhuhai Tel: Fax: ASIA/PACIFIC India - Bangalore Tel: Fax: India - New Delhi Tel: Fax: India - Pune Tel: Fax: Japan - Yokohama Tel: Fax: Korea - Daegu Tel: Fax: Korea - Seoul Tel: Fax: or Malaysia - Kuala Lumpur Tel: Fax: Malaysia - Penang Tel: Fax: Philippines - Manila Tel: Fax: Singapore Tel: Fax: Taiwan - Hsin Chu Tel: Fax: Taiwan - Kaohsiung Tel: Fax: Taiwan - Taipei Tel: Fax: Thailand - Bangkok Tel: Fax: EUROPE Austria - Wels Tel: Fax: Denmark - Copenhagen Tel: Fax: France - Paris Tel: Fax: Germany - Munich Tel: Fax: Italy - Milan Tel: Fax: Netherlands - Drunen Tel: Fax: Spain - Madrid Tel: Fax: UK - Wokingham Tel: Fax: /02/08 DS01169A-page Microchip Technology Inc.
AN1142. USB Mass Storage Class on an Embedded Host INTRODUCTION. USB Mass Storage Class. Overview
USB Mass Storage Class on an Embedded Host Author: INTRODUCTION With the introduction of Microchip's microcontrollers with the USB OTG peripheral, microcontroller applications can easily support USB Embedded
TB3016. Using the PIC MCU CTMU for Temperature Measurement IMPLEMENTATION BASIC PRINCIPLE MEASUREMENT CIRCUIT
Using the PIC MCU CTMU for Temperature Measurement Author: Padmaraja Yedamale Microchip Technology Inc. The Charge Time Measurement Unit (CTMU), introduced on the latest generation of PIC24F and PIC18F
AN1303. Software Real-Time Clock and Calendar Using PIC16F1827 DATA INTERFACE INTRODUCTION IMPLEMENTATION INTERNAL REGISTER MAP
Software Real-Time Clock and Calendar Using PIC16F1827 Author: INTRODUCTION Cristian Toma Microchip Technology Inc. This application note describes the implementation of software Real-Time Clock and Calendar
AN1286. Water-Resistant Capacitive Sensing INTRODUCTION THEORY OF OPERATION. Sensing Steps. Sensing Steps Description DESIGN
Water-Resistant Capacitive Sensing AN1286 Author: INTRODUCTION Thomas Perme Steven Lin Microchip Technology Inc. This application note describes a new hardware sensing method which is resilient to water
Installing and Licensing MPLAB XC C Compilers
Installing and Licensing MPLAB XC C Compilers DS50002059G Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
AN1163. USB HID Class on an Embedded Device FEATURES INTRODUCTION LIMITATIONS ASSUMPTIONS SYSTEM HARDWARE. Microchip Technology Inc.
USB HID Class on an Embedded Device AN1163 Author: INTRODUCTION The Human Interface Device (HID) is a class for use with Universal Serial Bus (USB). The HID class consists of devices that a human may use
AN1199. 1-Wire Communication with PIC Microcontroller INTRODUCTION. OVERVIEW OF THE 1-Wire BUS. 1-Wire Protocol. Prerequisites
1-Wire Communication with PIC Microcontroller Author: INTRODUCTION This application note introduces the user to the 1-Wire communication protocol and describes how a 1-Wire device can be interfaced to
Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23X256,23X640 SERIES DEVICES VCC 23X256/ HOLD.
Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices Author: INTRODUCTION Martin Bowman Microchip Technology Inc. This document details recommended usage of the Microchip 23X256 and 23X640
AN1164. USB CDC Class on an Embedded Device INTRODUCTION ASSUMPTIONS FEATURES LIMITATIONS
USB CDC Class on an Embedded Device AN1164 Author: Bud Caldwell Microchip Technology Inc. INTRODUCTION The Universal Serial Bus (USB) has made it very simple for end users to attach peripheral devices
AN687. Precision Temperature-Sensing With RTD Circuits RTD OVERVIEW INTRODUCTION EQUATION 1:
Precision Temperature-Sensing With RTD Circuits Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. The most widely measured phenomena in the process control environment is temperature. Common
AN1325. mtouch Metal Over Cap Technology THEORY OF OPERATION INTRODUCTION CROSS SECTION OF METAL OVER CAPACITIVE (UNPRESSED)
mtouch Metal Over Cap Technology AN1325 Authors: INTRODUCTION Keith Curtis Dieter Peter Microchip Technology Inc. As a user interface, capacitive touch has several advantages: it is low power, low cost,
Uninstalling Incorrect USB Device Drivers
DEVELOPMENT SYSTEMS Uninstalling Incorrect USB Device Drivers RECOMMENDED UNINSTALL METHODS When using the Microchip development tools listed below, trouble may be experienced as a result of incorrect
AN1212. Using USB Keyboard with an Embedded Host INTRODUCTION. USB Keyboard Overview. USB Keyboard with an Embedded Host USB KEYBOARD OUTPUT REPORT
Using USB Keyboard with an Embedded Host Author: INTRODUCTION Amardeep Gupta Microchip Technology Inc. Microcontroller applications can easily support USB embedded host functionality with the introduction
AN1156. Battery Fuel Measurement Using Delta-Sigma ADC Devices INTRODUCTION REVIEW OF BATTERY CHARGING AND DISCHARGING CHARACTERISTICS
Battery Fuel Measurement Using Delta-Sigma ADC Devices Author: INTRODUCTION Youbok Lee, Ph.D. Microchip Technology Inc. The battery fuel status indicator is a common feature of the battery-supported handheld
Universal Programming Module 2
Universal Programming Module OVERVIEW The Universal Programming Module (UPM) is a handy, low-cost board that supports the programming of Microchip devices using MPLAB in-circuit emulators and debuggers.
AN1275. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder KEY FEATURES OVERVIEW. Microchip Technology Inc.
KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder Author: OVERVIEW Enrique Aleman Microchip Technology Inc. This application note describes a KEELOQ with AES code hopping decoder implemented
AN1265. KEELOQ with AES Microcontroller-Based Code Hopping Encoder INTRODUCTION DUAL ENCODER OPERATION BACKGROUND FUNCTIONAL INPUTS AND
KEELOQ with AES Microcontroller-Based Code Hopping Encoder Authors: INTRODUCTION This application note describes the design of a microcontroller-based KEELOQ Hopping Encoder using the AES encryption algorithm.
AN1470. Manchester Decoder Using the CLC and NCO ABSTRACT INTRODUCTION MANCHESTER ENCODED DATA (AS PER G.E. THOMAS)
Manchester Decoder Using the CLC and NCO Authors: ABSTRACT A Manchester decoder can be built using Microchip s award winning CLC (Configurable Logic Cell) blocks and NCO (Numerically Controlled Oscillator)
AN956. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software OVERVIEW INTRODUCTION. Microchip Technology Inc.
Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software Author: INTRODUCTION Rawin Rojvanit Microchip Technology Inc. The RS-232 serial interface is no longer a common port found
Simplified Description of USB Device Enumeration
Future Technology Devices International Ltd. Technical Note TN_113 Simplified Description of USB Device Enumeration Document Reference No.: FT_000180 Issue Date: 2009-10-28 USB Enumeration is the process
Timers: Timer0 Tutorial (Part 1)
Timers: Timer0 Tutorial (Part 1) 2007 Microchip Technology Inc. DS51682A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
TC1047/TC1047A. Precision Temperature-to-Voltage Converter. General Description. Applications. Block Diagram. Features.
Precision Temperature-to-Voltage Converter Features Supply Voltage Range: - TC147: 2.7V to 4.4V - TC147A: 2.V to.v Wide Temperature Measurement Range: - -4 o C to +12 o C High Temperature Converter Accuracy:
AN1857. RGBW Color Mixing DALI Control Gear. COLOR MIXING USING RED, GREEN, BLUE AND WHITE LEDs INTRODUCTION HARDWARE
RGBW Color Mixing DALI Control Gear AN1857 Author: INTRODUCTION Mihai Cuciuc Microchip Technology Inc. This application note provides an example of obtaining custom colors by combining the spectra of the
PIC32 Microcontroller Families
32-bit Microcontrollers Winter 2009 PIC32 Microcontroller Families With USB, CAN and Ethernet www.microchip.com/pic32 Building on the heritage of Microchip Technology s world-leading 8- and 16-bit PIC
AN295 USB AUDIO CLASS TUTORIAL. 1. Introduction. 2. USB, Isochronous Transfers, and the Audio Class. 1.1. Overview. 2.1. USB Operational Overview
USB AUDIO CLASS TUTORIAL 1. Introduction Isochronous data transfers can be used by universal serial bus (USB) devices designed to transfer data to or from a host at a constant rate. Systems streaming audio
Features, Value and Benefits of Digital Control for Power Supplies
Author: INTRODUCTION Sagar Khare Microchip Technology Inc. Control of Switch Mode Power Supplies (SMPSs) has traditionally been a purely analog domain. The advent of low-cost, high-performance Digital
Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller
Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller Author: INTRODUCTION Brian Chu Microchip Technology Inc. Batteries often
AN249 HUMAN INTERFACE DEVICE TUTORIAL. Relevant Devices This application note applies to all Silicon Labs USB MCUs. 1.
HUMAN INTERFACE DEVICE TUTORIAL Relevant Devices This application note applies to all Silicon Labs USB MCUs. 1. Introduction The Human Interface Device (HID) class specification allows designers to create
Section 15. Input Capture
Section 15. Input Capture HIGHLIGHTS This section of the manual contains the following topics: 15.1 Introduction...15-2 15.2 Input Capture Registers...15-4 15.3 Timer Selection...15-8 15.4 Input Capture
AN1543. Using MRF24W with PIC32 Internal Program Flash Memory For EZ_CONFIG_STORE ALTERNATIVE LOW-COST SOLUTIONS OVERVIEW SCOPE
Using MRF24W with PIC32 Internal Program Flash Memory For EZ_CONFIG_STORE Author: OVERVIEW This application note describes the EZ_CONFIG_STORE feature used in the Wi-Fi G Demo Board and TCPIP-WiFi EZConfig
TCP/IP Networking: Web-Based Status Monitoring
TCP/IP Networking: Web-Based Status Monitoring Microchip TCP/IP Stack HTTP2 Module 2007 Microchip Technology Incorporated. All Rights Reserved. Web-Based Status Monitoring Slide 1 Welcome to the first
AN1066. Microchip MiWi Wireless Networking Protocol Stack INTRODUCTION CONSIDERATIONS TERMINOLOGY FEATURES
Microchip MiWi Wireless Networking Protocol Stack Author: INTRODUCTION Implementing applications with wireless networking is now common. From consumer devices to industrial applications, there is a growing
AN1332. Current Sensing Circuit Concepts and Fundamentals CURRENT SENSING RESISTOR INTRODUCTION. Description. Microchip Technology Inc.
Current Sensing Circuit Concepts and Fundamentals Author: INTRODUCTION Yang Zhen Microchip Technology Inc. Current sensing is a fundamental requirement in a wide range of electronic applications. Typical
WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD
WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD 2004 Microchip Technology Inc. DS51512A Note the following details of the code protection feature on Microchip devices: Microchip products meet
TB055. PS/2 to USB Mouse Translator IMPLEMENTATION OVERVIEW. Hardware FIGURE 1: PS/2 TO USB MOUSE TRANSLATOR HARDWARE DIAGRAM (1)
PS/2 to USB Mouse Translator TB55 Author: OVERVIEW Reston Condit Microchip Technology Inc. This Technical Brief details the translation of a PS/2 mouse to a USB mouse using the PIC16C745/765. The PIC16C745/765
AN1492. Microchip Capacitive Proximity Design Guide INTRODUCTION CAPACITIVE SENSING BASICS SENSING
Microchip Capacitive Proximity Design Guide Author: INTRODUCTION Xiang Gao Microchip Technology Inc. Proximity detection provides a new way for users to interact with electronic devices without having
Integrated Development Environment
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
AN1256. Microchip s Power MOSFET Driver Simulation Models INTRODUCTION MODEL DESCRIPTION. Using The Power MOSFET Simulation Models
Microchip s Power MOSFET Driver Simulation Models Author: INTRODUCTION Cliff Ellison (Microchip Technology Inc.) Ron Wunderlich (Innovative Ideas and Design) The simulation models for Microchip s power
Integrated Development Environment
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
TC7660. Charge Pump DC-to-DC Voltage Converter. Package Types. Features. General Description. Applications. Functional Block Diagram TC7660
Charge Pump DC-to-DC Voltage Converter Features Wide Input Voltage Range:.V to V Efficient Voltage Conversion (99.9%, typ) Excellent Power Efficiency (9%, typ) Low Power Consumption: µa (typ) @ V IN =
MCP73X23 Lithium Iron Phosphate (LiFePO 4 ) Battery Charger Evaluation Board User s Guide
MCP73X23 Lithium Iron Phosphate (LiFePO 4 ) Battery Charger Evaluation Board User s Guide 2009 Microchip Technology Inc. DS51850A Note the following details of the code protection feature on Microchip
AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc.
Brushed DC Motor Fundamentals AN905 Author: Reston Condit Microchip Technology Inc. INTRODUCTION Brushed DC motors are widely used in applications ranging from toys to push-button adjustable car seats.
AN1140. USB Embedded Host Stack INTRODUCTION USB OVERVIEW. Host vs. Embedded Host. USB Hosts and Peripheral Devices
USB Embedded Host Stack AN1140 Author: INTRODUCTION USB has become the standard method for devices to communicate with a PC. From general purpose devices, such as Flash drives and mice, to special purpose
AVR287: USB Host HID and Mass Storage Demonstration. 8-bit Microcontrollers. Application Note. Features. 1 Introduction
AVR287: USB Host HID and Mass Storage Demonstration Features Based on AVR USB OTG Reduced Host Runs on AT90USB647/1287 Support bootable/non-bootable standard USB mouse Support USB Hub feature (Mass Storage
MCP2515 CAN Bus Monitor Demo Board User s Guide
MCP2515 CAN Bus Monitor Demo Board User s Guide 2008 Microchip Technology Inc. DS51757A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
Bypassing Endpoint Security for $20 or Less. Philip A. Polstra, Sr. @ppolstra ppolstra.blogspot.com
Bypassing Endpoint Security for $20 or Less Philip A. Polstra, Sr. @ppolstra ppolstra.blogspot.com Roadmap Why this talk? Who is this dude talking at me? Brief history of USB How does USB work? It s all
SMART Modular Small Form Factor USB Key
SMART Modular Small Form Factor USB Key SH9MKxxGQxx Rev E www.smartm.com REVISION HISTORY Date Revision Section(s) Description June 2014 A All Initial release October 2014 B 1.4.1, 1.4.2, 2.2, 4.2, 4.4,
AN1353. Op Amp Rectifiers, Peak Detectors and Clamps INTRODUCTION BASIC RECTIFIERS. Choosing the Components. Positive Half-Wave Rectifier.
Op Amp Rectifiers, Peak Detectors and Clamps Author: Dragos Ducu, Microchip Technology Inc. INTRODUCTION This application note covers a wide range of applications, such as halfwave rectifiers, fullwave
dspic30f3012/3013 dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata Silicon Errata Summary
dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata The dspic30f3012/3013 (Rev. B0) samples you have received were found to conform to the specifications and functionality
MCP2200 USB to RS-232 Demo Board User s Guide
MCP2200 USB to RS-232 Demo Board User s Guide DS51901A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.
Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures Features Compliance to USB 2.0 - Chapters 8 and 9 - Classes: HID, MSC, CDC, PHDC Interoperability: OS, classes, self- and bus-powered
Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction
Atmel AVR4903: ASF - USB Device HID Mouse Application Features USB 2.0 compliance - Chapter 9 compliance - HID compliance - Low-speed (1.5Mb/s) and full-speed (12Mb/s) data rates Standard USB HID mouse
AN1465. Digitally Addressable Lighting Interface (DALI) Communication TERMINOLOGY PHYSICAL LAYER DALI FREE-FORM LAYOUT. Topology FIGURE 1:
Digitally Addressable Lighting Interface (DALI) Communication Author: Shaima Husain Microchip Technology Inc. The Digitally Addressable Lighting Interface (DALI) has emerged as a standard in Europe to
LIN Serial Analyzer User s Guide Rev2.0
LIN Serial Analyzer User s Guide Rev2.0 2008 Microchip Technology Inc. DS51675B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
MCP1701A. 2 µa Low-Dropout Positive Voltage Regulator. Features. General Description. Applications. Package Types
2 µa Low-Dropout Positive Voltage Regulator Features 2.0 µa Typical Quiescent Current Input Operating Voltage Range up to 10.0V Low-Dropout Voltage (LDO): - 120 mv (typical) @ 100 ma - 380 mv (typical)
PICkit 3 Programmer/Debugger User s Guide
PICkit 3 Programmer/Debugger User s Guide 2009 Microchip Technology Inc. DS51795A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel
AVR115: Data Logging with Atmel File System on ATmega32U4 Microcontrollers 01101010 11010101 01010111 10010101 Application Note 1 Introduction Atmel provides a File System management for AT90USBx and ATmegaxxUx
How To Use Microchip.Com
PICkit 2 Programmer/Debugger User s Guide 2008 Microchip Technology Inc. DS51553E Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AN645. PIC16C57 Based Code Hopping Security System PINOUT OVERVIEW FEATURES BLOCK DIAGRAM RECOMMENDED READING
PI657 Based ode Hopping Security System Author: OVERVIEW This document describes a PI657 based code hopping automotive security system. The security system implements all the basic features found on security
Universal Serial Bus Mass Storage Class. Bulk-Only Transport
Universal Serial Bus Mass Storage Class Bulk-Only Transport Revision 1.0 Change History Revision Issue Date Comments 0.7 September 23, 1998 Initial draft, pre-release 0.8 October 6, 1998 Revisions made
MPLAB XC8 GETTING STARTED GUIDE. MPLAB XC8 Getting Started Guide
MPLAB XC8 GETTING STARTED GUIDE MPLAB XC8 Getting Started Guide This document provides a starting point for programmers who are just starting out with the MPLAB XC8 C Compiler, particularly those who are
Section 5. Flash Programming
Section 5. Flash Programming HIGHLIGHTS This section of the manual contains the following topics: 5.1 Introduction...5-2 5.2 Control Registers... 5-3 5.3 Run-Time Self-Programming (RTSP) Operation... 5-10
AN3354 Application note
Application note STM32F105/107 in-application programming using a USB host 1 Introduction An important requirement for most Flash-memory-based systems is the ability to update firmware installed in the
PIC18F26K20/46K20 Rev. B2/B3/B5/B6 Silicon Errata and Data Sheet Clarification
PIC18F26K20/46K20 Rev. B2/B3/B5/B6 Silicon Errata and Data Sheet Clarification The PIC18F26K20/46K20 family devices that you have received conform functionally to the current Device Data Sheet (DS41303G),
ZENA Wireless Network Analyzer User s Guide
ZENA Wireless Network Analyzer User s Guide 2008 Microchip Technology Inc. DS51606C Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or
APPLICATION NOTE Atmel AVR32848: Android Accessory Demo 32-bit Atmel Microcontrollers Features Control an accessory from an Android device Send data to and from an Android device to an accessory Supported
Resistive Temperature Detector (RTD) Reference Design
Resistive Temperature Detector (RTD) Reference Design DS51891A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their
TivaWare USB Library USER S GUIDE SW-TM4C-USBL-UG-2.1.1.71. Copyright 2008-2015 Texas Instruments Incorporated
TivaWare USB Library USER S GUIDE SW-TM4C-USBL-UG-2.1.1.71 Copyright 2008-2015 Texas Instruments Incorporated Copyright Copyright 2008-2015 Texas Instruments Incorporated. All rights reserved. Tiva and
Universal Serial Bus Device Class Definition for Printing Devices
Universal Serial Bus Device Class Definition for Printing Devices Version 1.1 January 2000 Contributors Axiohn IPB Kevin Butler [email protected] Canon Sadahiko Sano [email protected] Canon Naoki
Touch Through Metal. mtouch Metal Over Capacitive Technology Part 1
Touch Through Metal mtouch Metal Over Capacitive Technology Part 1 2010 Microchip Technology Incorporated. All Rights Reserved. Touch Through Metal Slide 1 Hello and welcome to Microchip s Touch Through
Software Real Time Clock Implementation on MC9S08LG32
Freescale Semiconductor Document Number: AN4478 Rev. 0, 03/2012 Software Real Time Clock Implementation on MC9S08LG32 by: Nitin Gupta Automotive and Industrial Solutions Group 1 Introduction The MC9S08LG32
AN1861. Bluetooth Smart Communication Using Microchip RN4020 Module and 16-bit PIC Microcontroller BLUETOOTH SMART COMMUNICATION INTRODUCTION
Bluetooth Smart Communication Using Microchip RN4020 Module and 16-bit PIC Microcontroller Author: Venkatesh Bengeri and Pradeep Shamanna INTRODUCTION Most of the embedded applications require real-time
AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS
AVR1309: Using the XMEGA SPI Features Introduction to SPI and the XMEGA SPI module Setup and use of the XMEGA SPI module Implementation of module drivers Polled master Interrupt controlled master Polled
PIC10F200/202/204/206
Memory Programming Specification This document includes the programming specifications for the following devices: PIC10F200 PIC10F202 PIC10F204 PIC10F206 1.0 PROGRAMMING THE PIC10F200/202/204/206 The PIC10F200/202/204/206
dspic Digital Signal Controllers
dspic Digital Signal Controllers Spring 2011 dspic Digital Signal Controllers Digital Signal Controller Solutions Building on the legacy of Microchip s world-leading 8-bit PIC microcontrollers, 16-bit
Freescale MQX USB Device User Guide
Freescale MQX USB Device User Guide MQXUSBDEVUG Rev. 4 02/2014 How to Reach Us: Home Page: freescale.com Web Support: freescale.com/support Information in this document is provided solely to enable system
UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction
User manual Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software Introduction This document provides an introduction on how to use IAR Embedded Workbench for ARM software
Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration
AVR270: USB Mouse Demonstration Features Runs with AT90USB Microcontrollers at 8MHz USB Low Power Bus Powered Device (less then 100mA) Supported by any PC running Windows (98SE or later), Linux or Mac
Analog-to-Digital Converters
Analog-to-Digital Converters In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip s midrange PICmicro Microcontrollers series. 1 Analog-to-Digital Converters
MPLAB Code Configurator User s Guide
MPLAB Code Configurator User s Guide 2013-2014 Microchip Technology Inc. DS40001725B MPLAB CODE CONFIGURATOR USER S GUIDE Note the following details of the code protection feature on Microchip devices:
Serial EEPROM Powered for Automotive
Automotive Memory Products Serial EEPROM Powered for Automotive www.microchip.com/memory Microchip Serial Memory Products Microchip Technology has developed industry-leading processes for each step in
PL2571 (Chip Rev B) Hi-Speed USB to SATA Bridge Controller Product Datasheet
PL2571 (Chip Rev B) Hi-Speed USB to SATA Bridge Controller Product Datasheet Document Revision: 1.3 Document Release: Prolific Technology Inc. 7F, No. 48, Sec. 3, Nan Kang Rd. Nan Kang, Taipei 115, Taiwan,
ZENA Wireless Network Analyzer User s Guide
ZENA Wireless Network Analyzer User s Guide 2007 Microchip Technology Inc. DS51606B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
28-PIN DEMO BOARD USER S GUIDE
28-PIN DEMO BOARD USER S GUIDE 2006-2015 Microchip Technology Inc. DS40001301B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
Real-Time Data Monitor User s Guide
Real-Time Data Monitor User s Guide 2008 Microchip Technology Inc. DS70567A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
AN3998 Application note
Application note PDM audio software decoding on STM32 microcontrollers 1 Introduction This application note presents the algorithms and architecture of an optimized software implementation for PDM signal
Using WinUSB in a Visual Studio Project with Freescale USB device controller
Freescale Semiconductor Document Number: AN4378 Application Note Rev. 0, 10/2011 Using WinUSB in a Visual Studio Project with Freescale USB device controller by: Paolo Alcantara Microcontroller Solutions
DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB
DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB Contents at a Glance 1. Introduction of MPLAB... 4 2. Development Tools... 5 3. Getting Started... 6 3.1. Create a Project... 8 3.2. Start MPLAB...
PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram
TOOLSTICK VIRTUAL TOOLS USER S GUIDE RELEVANT DEVICES 1. Introduction The ToolStick development platform consists of a ToolStick Base Adapter and a ToolStick Daughter card. The ToolStick Virtual Tools
AN1095. Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers INTRODUCTION THEORY OF OPERATION
A1095 Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers Author: ITRODUCTIO Microchip Technology has expanded its product portfolio to include a wide variety
TABLE 1: BUCK REGULATOR
A Digital Constant Current Power LED Driver Author: INTRODUCTION Stephen Bowling Microchip Technology Inc. This document describes a power LED driver solution using the PIC12HV615 microcontroller (MCU).
etpu Host Interface by:
Freescale Semiconductor Application Note AN2821 Rev. 2, 08/2007 etpu Host Interface by: David Paterson Ming Li MCD Applications 1 Introduction This application note discusses the enhanced Time Processing
Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension
User manual Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension Introduction This document describes the demonstration user interface that was developed to illustrate use
AN11008 Flash based non-volatile storage
Rev. 1 5 January 2011 Application note Document information Info Content Keywords Flash, EEPROM, Non-Volatile Storage Abstract This application note describes the implementation and use of a library that
AN1307 FULL STEP MODE PHASE VOLTAGE AND PHASE CURRENT MICROSTEPPING WITH 1/4 STEP SIZE
Stepper Motor Control with dspic DSCs AN1307 Author: INTRODUCTION Sorin Manea Microchip Technology Inc. This application note describes how to drive a stepper motor with a dspic33f motor control family
AN709. System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices INTRODUCTION INSURING BUS-FREE DURING POWER-UP
M AN709 System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices Author: INTRODUCTION Rick Stoneking Developing systems that implement the I 2 C protocol for communicating with serial
RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards
RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards 2012 Roving Networks. All rights reserved. Version 1.0 9/7/2012 USER MANUAL OVERVIEW The RN-131 and RN-171 WiFly radio modules are complete, standalone
PICkit 2 Microcontroller Programmer USER S GUIDE
PICkit 2 Microcontroller Programmer USER S GUIDE 2007 Microchip Technology Inc. DS51553D Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
AVR32807: Getting Started with the AVR UC3 Software Framework USB Classes. 32-bit Microcontrollers. Application Note. Features.
AVR32807: Getting Started with the AVR UC3 Software Framework USB Classes Features Full Speed (12Mbit/s) and High Speed (480Mbit/s) data rates Control, Bulk, Isochronuous and Interrupt transfer types Device
