CYUSBS232 USB-UART LP Reference Design Kit Guide Doc. # 001-87891 Rev. ** Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): +1.408.943.2600 http://www.cypress.com Copyrights © Cypress Semiconductor Corporation, 2013. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement. All trademarks or registered trademarks referenced herein are property of the respective corporations. Flash Code Protection Cypress products meet the specifications contained in their particular Cypress PSoC Datasheets. Cypress believes that its family of PSoC products is one of the most secure families of its kind on the market today, regardless of how they are used. There may be methods, unknown to Cypress, that can breach the code protection features. Any of these methods, to our knowledge, would be dishonest and possibly illegal. Neither Cypress 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’. Cypress is willing to work with the customer who is concerned about the integrity of their code. Code protection is constantly evolving. We at Cypress are committed to continuously improving the code protection features of our products. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 2 Contents Safety Information 5 Regulatory Compliance ...............................................................................................5 General Safety Instructions .........................................................................................6 ESD Protection.................................................................................................6 Handling Boards...............................................................................................6 1. Introduction 1.1 1.2 1.3 1.4 1.5 1.6 1.7 Kit Contents .................................................................................................................7 Getting Started.............................................................................................................8 Additional Resources ...................................................................................................8 Technical Support........................................................................................................9 Document History ........................................................................................................9 Documentation Conventions .......................................................................................9 Abbreviations ...............................................................................................................9 2. Software Installation 2.1 2.2 2.3 14 USB-UART LP Bridge Controller Enumeration..........................................................14 USB-UART LP Bridge Controller Configuration on Windows OS ..............................17 3.2.1 Connecting CYUSBS232 RDK to Cypress USB-Serial Configuration Utility .17 3.2.2 USB Configuration .........................................................................................19 3.2.3 UART Configuration .......................................................................................22 3.2.3.1 Test Procedure for CYUSBS232 RDK Configured as USB-UART .26 3.2.3.2 Throughput Determination ...............................................................27 3.2.4 CYUSBS232 RDK Restore Default Configuration Settings ...........................28 4. Hardware 4.1 4.2 4.3 10 CYUSBS232 RDK Software ......................................................................................10 Install Hardware.........................................................................................................13 Uninstall Software......................................................................................................13 3. Kit Operation 3.1 3.2 7 31 Board Details .............................................................................................................31 Theory of Operation...................................................................................................32 Functional Description ...............................................................................................33 4.3.1 Features .........................................................................................................33 4.3.2 Power-Supply System....................................................................................33 4.3.3 USB Connector ..............................................................................................34 4.3.4 Headers..........................................................................................................34 4.3.5 LEDs ..............................................................................................................35 CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 3 Contents 5. Additional Information 5.1 A. Appendix A.1 A.2 A.3 A.4 37 Using the CYUSBS232 RDK on a Mac OS ...............................................................37 5.1.1 Using CYUSBS232 RDK Board in CDC Mode ..............................................37 5.1.2 Using the CYUSBS232 RDK Board in Vendor Mode.....................................38 39 Schematic ..................................................................................................................39 CY7C65213 USB-UART LP Bridge Controller Design Guidelines ............................40 Troubleshooting Guide ..............................................................................................41 Bill of Materials (BoM)................................................................................................42 CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 4 Safety Information Regulatory Compliance The CYUSBS232 USB-UART LP kit is intended for use as a development platform for hardware or software in a laboratory environment. The board is an open-system design, which does not include a shielded enclosure. This kit may cause interference to other electrical or electronic devices in close proximity. In a domestic environment, this product may cause radio interference. In such cases, take adequate preventive measures. Also, do not use this board near any medical equipment or RF devices. Attaching additional wiring to this product or modifying the product operation from the factory default may affect its performance and cause interference with other apparatus in the immediate vicinity. If such interference is detected, suitable mitigating measures must be taken. The CYUSBS232 contains electrostatic discharge (ESD) sensitive devices. Electrostatic charges readily accumulate on the human body and any equipment, and can discharge without detection. Permanent damage may occur on devices subjected to high-energy discharges. Cypress recommends proper ESD precautions to avoid performance degradation or loss of functionality. Store unused CYUSBS232 boards in the protective shipping package. End-of-Life/Product Recycling This kit has an end-of-life cycle after five years from the year of manufacturing mentioned on the back of the box. Contact your nearest recycler for discarding the kit. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 5 Safety Information General Safety Instructions ESD Protection ESD can damage boards and associated components. Cypress recommends that you perform procedures only at an ESD workstation. If an ESD workstation is not available, use appropriate ESD protection by wearing an antistatic wrist strap attached to the chassis ground (any unpainted metal surface) on the board when handling parts. Handling Boards CYUSBS232 boards are sensitive to ESD. Hold the board only by its edges. After removing the board from its box, place it on a grounded, static-free surface. Use a conductive foam pad if available. Do not slide the board over any surface. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 6 1. Introduction Thank you for your interest in the CYUSBS232 USB-UART LP Reference Design Kit (RDK). This RDK is an easy-to use kit, which showcases the unique features of CY7C65213, Cypress's USBUART LP Bridge Controller. This device is a full-speed USB-UART low-power bridge controller supporting the 8-pin UART serial interface and USB Implementers Forum (USB-IF) compliant battery charging detection (BCD) specifications. The controller features the lowest suspend-state current of 5 uA, and is offered in a 5×5, 32-pin QFN package to meet the dimensional requirements of portable devices. 1.1 Kit Contents The CYUSBS232 USB-UART LP RDK includes the following items: ■ CYUSBS232 RDK board ■ Quick start guide ■ USB standard-A to micro-B cable ■ Jumper wires ■ CY7C65213-32LTXI sample silicon chips CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 7 Introduction Figure 1-1. Kit Contents 1.2 Getting Started This kit guide helps you get acquainted with the CYUSBS232 RDK. The Software Installation chapter on page 10 provides step-by-step instructions to install the CYUSBS232 RDK software. The Kit Operation chapter on page 14 describes how the kit operates and explains how to configure the CY7C65213 USB-UART LP using the Cypress USB-Serial Configuration Utility. The Hardware chapter on page 31 discusses the hardware operation. The Additional Information on page 37 explains how to run the CYUSBS232 RDK on a Mac OS. The Appendix on page 39 provides the schematics, layout, bill of materials (BoM), troubleshooting guidelines, and board layout design guidelines for the CY7C65213 USB-UART LP controller. 1.3 Additional Resources Visit the USB-Serial webpage: www.cypress.com/go/usbserial for additional learning resources in the form of datasheets and application notes. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 8 Introduction 1.4 Technical Support For assistance, go to our support web page: www.cypress.com/go/support, or contact our customer support at +1 (800) 541-4736 Ext. 8 (in the USA), or +1 (408) 943-2600 Ext. 8 (International). 1.5 1.6 Document History Revision PDF Creation Date Origin of Change ** 09/03/2013 MVTA Description of Change Initial version of kit guide Documentation Conventions Table 1-1. Document Conventions for Guides Convention 1.7 Usage Courier New Displays file locations, user entered text, and source code: C:\ ...cd\icc\ Italics Displays file names and reference documentation. For example, CYUSBS232UART.cyusb. [Bracketed, Bold] Displays keyboard commands in procedures: [Enter] or [Ctrl] [C] File > Open Represents menu paths: File > Open > New Project Bold Displays commands, menu paths, and icon names in procedures: Click the File icon and then click Open. Times New Roman Displays an equation: 2+2=4 Text in gray boxes Describes cautions or unique functionality of the product. Abbreviations The following table lists the abbreviations used in this kit guide: Abbreviation Definition CDC communications device class CTS clear to send DCD data carrier detect DSR data set ready DTR data terminal ready PID product ID RDK reference design kit RI ring indicator RTS request to send UART universal asynchronous receiver transmitter USB universal serial bus VID vendor ID CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 9 2. 2.1 Software Installation CYUSBS232 RDK Software Follow these steps to install the CYUSBS232 RDK software: 1. Download and install the CYUSBS232 RDK software from www.cypress.com/go/CYUSBS232. The CYUSBS232 RDK software is available in two different formats for download: a. CYUSBS232 Kit ISO: This file is a complete package, stored in a CD-ROM image format that can be used to create a CD, or extract using ISO extraction programs, such as WinZip or WinRAR. This file includes all the required software, utilities, drivers, hardware files, and user documents. b. CYUSBS232 Kit Setup: This installation package contains the files related to the kit. It does not include the Windows installer, Microsoft .NET Framework, and Visual C++ redistributable packages. If these packages are not on your computer, the installer automatically downloads and installs them from the Internet. 2. Run cyautorun.exe to start the installation process. 3. Click Install CYUSBS232 RDK to start the installation, as shown in Figure 2-1. Figure 2-1. Kit Installer Startup Screen CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 10 Software Installation 4. Select the folder to install the CYUSBS232 RDK-related files. Choose the directory and click Next. Figure 2-2. Default Path for RDK Installation 5. The CYUSBS232 Kit ISO installer automatically installs the required software, if it is not present on your computer. The CYUSBS232 Kit Setup installer directs you to download the required software from the Internet. 6. Select the installation type. The drop-down menu has two options: Typical (installs all the required features) and Custom. Click Next after you select the installation type. Figure 2-3. Installation Type Options CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 11 Software Installation 7. Read the Cypress License Agreement and make a selection based on the terms of the license agreement. Click Next to continue the installation. Figure 2-4. Cypress License Agreement 8. When the installation begins, a list of packages appears on the installation page. A green check mark appears against every package after successful installation. If a message from Windows Security appears, accept the Always trust software from Cypress Semiconductor option and click Install. Figure 2-5. Installation Page CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 12 Software Installation 9. Enter your contact information or select the Continue Without Contact Information check box. Click Finish to complete the CYUSBS232 RDK installation. Figure 2-6. CYUSBS232 RDK Installation Complete 10.After the installation is complete, the kit contents are available at the following location: <Install directory>\Cypress\CYUSBS232 RDK\1.0\ 2.2 Install Hardware This kit does not require any additional hardware installation. 2.3 Uninstall Software You can uninstall the CYUSBS232 RDK software using one of the following methods: ■ Go to Start > All Programs > Cypress > Cypress Update Manager; click the Uninstall button. ■ Go to Start > Control Panel > Programs and Features. Select the CYUSBS232 RDK 1.0 Rev** program from the list and click the Uninstall/Change button. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 13 3. Kit Operation The CYUSBS232 RDK helps you evaluate the CY7C65213 USB-UART LP bridge controller. The CYUSBS232 RDK board is designed to work in USB bus-powered mode. Figure 3-1 shows an image of the board with references to the onboard components. Figure 3-1. CYUSBS232 RDK Board: Top and Bottom View Top View Bottom View .JDSP# $POOFDUPS 64#6"35-1 $:$ 7#64 $54 (/% (/% 7$$*0@065 (1*0 %$% 39% 7$$*0@065 (1*0 (1*0 (1*0 354 %53 (1*0 (1*0 (1*0 59% /PU6TFE (1*0 %43 3* (1*0 7#64 (/% (/% (1*0 %1PXFS-&% %5Y"DUJWJUZ-&% %3Y"DUJWJUZ-&% 3.1 USB-UART LP Bridge Controller Enumeration Connect the CYUSBS232 RDK board to the PC using a USB standard-A to micro-B cable. The board enumerates as a composite USB device. Follow these steps for device enumeration: 1. Use the USB standard-A to micro-B cable to connect to the micro-B connector on the board. 2. The PC detects the board and the software driver is automatically bound to the USB device. Note If the driver installation is unsuccessful, run setup.exe from the following folders with administrative privileges: <Install directory>\Cypress\CYUSBS232 RDK\1.0\driver\cyusb3 <Install directory>\Cypress\CYUSBS232 RDK\1.0\driver\cyusbserial For more information, refer to the Cypress USB-Serial Driver Installation Guide at the following location: <Install directory>\Cypress\CYUSBS232 RDK\1.0\documentation\ CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 14 Kit Operation Figure 3-2. Install Location for cyusb3 Driver Figure 3-3. Install Location for cyusbserial Driver Note If a "Welcome to the Found New Hardware Wizard" message appears, select the Yes, this time only option and click Next to continue the installation. 4. When the software drivers are successfully bound, the board enumeration is complete. The board appears as a composite device in the Windows OS device manager. (To launch the device manager in Win7, go to Start > Control Panel > Device Manager.), as shown in Figure 3-4. ■ USB-Serial Adapter under CypressUSBConsoleWindowsDriver ■ USB Serial Port (COM#) under Ports (COM & LPT) ■ USB-UART LP Vendor MFG under Universal Serial Bus controllers CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 15 Kit Operation Figure 3-4. CYUSBS232 RDK Board Enumeration as Single UART in Device Manager CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 16 Kit Operation 3.2 USB-UART LP Bridge Controller Configuration on Windows OS The CY7C65213 USB-UART LP bridge controller on the CYUSBS232 RDK board can be configured for various USB, UART, and system parameters by using the Cypress USB-Serial Configuration Utility. The following sections provide detailed descriptions of the device features and configurations. 3.2.1 Connecting CYUSBS232 RDK to Cypress USB-Serial Configuration Utility Follow these steps to connect the device using the Cypress USB-Serial Configuration Utility: 1. Connect the USB standard-A to micro-B cable to your PC and the micro-B connector on the board. 2. Run the configuration utility from Start > All Programs > Cypress > CYUSBS232 RDK > USB Serial Configuration Utility. For a detailed description about the configuration utility, refer to the USB-Serial Configuration Utility User Guide at the following location: <Install directory>\Cypress\CYUSBS232 RDK\1.0\documentation 3. The following figure shows the startup screen of the Cypress USB-Serial Configuration Utility. Figure 3-5. Configuration Utility Startup Screen 4. Click the Select Target tab. Select the device from the drop-down menu and click Connect. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 17 Kit Operation Figure 3-6. Configuration Utility Select Target Tab Note The version number displayed in Figure 3-6 may vary depending on the latest firmware version on the USB-UART LP bridge controller. 5. A new tab with the connected device's default parameters appears (see Figure 3-7). This tab allows you to modify the device configuration settings, which you can program into the device. Figure 3-7. Configuration Utility USB Tab CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 18 Kit Operation 3.2.2 USB Configuration The USB tab shows the default values of the board’s configurable USB and system parameters. Follow these steps to view and modify the parameters for the USB configuration: 1. Follow steps 1 to 5 in section 3.2.1 Connecting CYUSBS232 RDK to Cypress USB-Serial Configuration Utility to connect the board to the Cypress USB-Serial Configuration Utility. 2. Click the USB tab. Figure 3-8. USB-Serial Configuration Utility USB Tab 3. You can configure these USB parameters using the Cypress USB-Serial Configuration Utility: a. Vendor identification number (VID) b. Product identification number (PID) c. Power mode (bus powered or self powered) d. bMaxPower e. RI# and Sleep# (Remote Wake-up and Suspend) f. Manufacturer string g. Product string h. Serial number ■ Vendor ID (VID) and Product ID (PID) Default value: 0x04B4 and 0x0003 The 2-byte VID and PID must be set in hexadecimal format. The VID and PID fields cannot be zero or empty. The Cypress VID/PID is programmed by default; to change the VID and PID, uncheck the Use Cypress VID/PID option. Enter the specific VID and press the [Tab] or [Enter] key to enable the PID field. ■ Power Mode Default value: Bus powered CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 19 Kit Operation The USB power mode can be set either to self-powered or bus-powered mode. ■ bMaxPower Default Value: 100 mA The USB device current requirement value can be set from 1 mA to 500 mA in steps of 2 mA units in bus-powered mode and 0 mA to 500 mA in steps of 2 mA units in self-powered mode. ■ RI# and Sleep# Default value for RI#: Checked Default value for Sleep#: GPIO 04 Default value for Power enable: GPIO 03 Note ‘#’ indicates an active-low pin. Click the Configure button to configure RI#, Sleep#, and Power enable parameters. Figure 3-9. RI# and Sleep# Configuration Window The configurable options are: ■ ❐ RI#: Ring indicator is an input signal to the device, which is used to wake up the USB host from suspend state. This signal acts as a wake up source for the USB host. By enabling this option the device can be used to wake up the USB host from suspend. By checking the Invert Polarity box, the polarity of the RI# pin can be inverted. On this board, the J7.4 (GPIO header) is the RI# pin. ❐ Sleep#: The Sleep function is enabled by assigning a GPIO from the drop down menu. When the USB bus enters the Suspend state, this GPIO gets asserted. For this board, the default value for the Sleep# pin is GPIO 04. By checking the Invert Polarity box, the polarity of the assigned GPIO pin can be inverted. ❐ Power enable: The Power enable function is enabled by assigning a GPIO from the dropdown menu. When the USB-UART bridge is configured by the host, this GPIO is asserted. In bus-powered embedded systems, to meet the USB 2.0 Specification requirements during unconfigured and suspend state, this pin can be used as a notification to control the power to the system. For this board, the default value for the Power enable pin is GPIO 03. Manufacturer string Default value: Cypress Semiconductor You can enter the manufacturer string (up to 32 characters) in the text box field. ■ Product string Default value: USB-UART LP You can enter the product string (up to 32 characters) in the text box field. ■ Serial number string Default value: NULL (No serial number string) CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 20 Kit Operation You can enter the serial number string (up to 32 characters) in the text box field by checking the check box. If no serial number is required, uncheck the checkbox. System The configurable options are: a. VCC voltage is 3.3 V b. VCCIO voltage is less than 2 V c. Enable manufacturing interface d. I/O Level e. I/O Mode f. Program button g. Disconnect button ■ VCC voltage is 3.3 V Default status: Unchecked The RDK is designed only for USB bus-powered operation. This option must always be unchecked for the RDK. The CY7C65213 device supports VCC voltage range from 3.15 V to 5.25 V. ■ VCCIO voltage is less than 2 V Default status: Unchecked The RDK is designed only for 5-V operation. This option must always be unchecked for the RDK. The CY7C65213 device supports VCCIO voltage range from 1.71 V to 5.5 V. ■ Enable manufacturing interface Default status: Checked This option enables an additional vendor class manufacturing mode interface to reprogram the device. ■ I/O Level Default value: CMOS You can set the GPIO logic levels of the device to either CMOS or LVTTL. ■ I/O Mode Default value: Fast You can set the GPIO edge transitions of the device to either fast or slow for EMI considerations. Refer to the GPIO AC Specifications table in the datasheet for additional details. ■ Program button After configuring all the device parameters, the updated configuration settings must be programmed to the device. To program the device, click the Program button. ■ Disconnect button Click this button to disconnect the RDK from the Configuration utility. 4. After configuring the USB and system parameters, click the Program button to save the changed USB parameters onto the controller. On successful programming, the "Program Succeeded" message appears. 5. Click the Disconnect button to disconnect the board from the Configuration Utility. 6. Disconnect and reconnect the USB micro-B cable to the micro-B connector of the RDK to initiate a power-on-reset of the controller. The controller is reinitialized with the new parameters and the CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 21 Kit Operation board re-enumerates, as shown in Figure 3-4. 3.2.3 UART Configuration The RDK board can act as a USB-UART bridge to transfer and receive data between the device and the PC via terminal communication software, such as Hyperterminal or Tera Term. Follow these steps to view and modify the parameters for the UART configuration: 1. Follow steps 1 to 5 of section 3.2.1 Connecting CYUSBS232 RDK to Cypress USB-Serial Configuration Utility to connect the board to the Cypress USB-Serial Configuration Utility. 2. Click the UART tab. Figure 3-10. Configuration Utility UART Configuration Tab 3. Click the Configure button, as shown in Figure 3-10, to configure the UART parameters. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 22 Kit Operation Figure 3-11. Configuration Utility UART Settings You can configure the following UART parameters by using the Cypress USB-Serial Configuration Utility: a. Baud Rate b. Type c. Data Width d. Stop Bits e. Parity f. Invert RTS g. Invert CTS h. Invert DTR i. Invert DSR j. Invert DCD k. Invert RI l. Drop packets on RX error m. Disable CTS and DSR pull-up during suspend ■ Baud Rate Default value: 115200 You can set the baud rate for the UART in an editable drop-down combo box that lists the predefined, standard baud rates. You can also enter a specific baud rate in the combo box. The minimum and maximum baud rates supported by this board are 300 bps and 3 Mbps, respectively. ■ Type Default value: 8 pin You can set the UART type to: a. 2 pin (RXD and TXD pins) b. 4 pin (RXD, TXD, RTS#, and CTS# pins) c. 6 pin (RXD, TXD, RTS#, CTS#, DSR#, and DTR# pins) CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 23 Kit Operation d. 8 pin (RXD, TXD, RTS#, CTS#, DSR#, DTR#, RI#, and DCD#) ■ Data Width Default value: 8 bits You can set the UART Data width to either 7 bits or 8 bits. ■ Stop Bits Default value: 1 bit You can set the number of UART stop bits to either 1 bit or 2 bits. ■ Parity Default value: None You can set the parity for the UART data transfer to either None, Odd, Even, Mark, or Space. ■ Invert RTS Default value: Unchecked By checking this option, the polarity of the RTS line can be inverted. ■ Invert CTS Default value: Unchecked By checking this option, the polarity of the CTS line can be inverted. ■ Invert DTR Default value: Unchecked By checking this option, the polarity of the DTR line can be inverted. ■ Invert DSR Default value: Unchecked By checking this option, the polarity of the DSR line can be inverted. ■ Invert DCD Default value: Unchecked By checking this option, the polarity of the DCD line can be inverted. ■ Invert RI Default value: Unchecked By checking this option, the polarity of the RI line can be inverted. ■ Drop packets on RX error Default value: Unchecked This parameter defines the behavior of the UART when an error is detected in the packet received (RX packet/byte). When this option is selected, the data packet/byte in the RX buffer is discarded. ■ Disable CTS and DSR pull-up during suspend Default value: Checked In an embedded system, this parameter can be checked to reduce system current consumption during Suspend state. This parameter disables the CTS and DSR pull-up resistors in the Suspend state to meet USB 2.0 Specification current requirements. 4. After the UART configuration is complete, click OK to close the Configure UART Settings window and return to the UART tab. 5. Select CDC as the protocol in the drop-down menu. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 24 Kit Operation 6. After configuring the UART interface, click the Program button to save the changed UART settings onto the controller. On successful programming, the "Program Succeeded" message appears. 7. Click the Disconnect button to disconnect the board from the Configuration Utility. 8. Disconnect and reconnect the USB micro-B cable to the micro-B connector on the RDK to initiate a power-on-reset of the controller. The controller is reinitialized with the new parameters and the board re-enumerates, as shown in Figure 3-12. Figure 3-12. CYUSBS232 RDK Enumeration as USB-UART in Device Manager 9. The Cypress USB-Serial Configuration Utility is displayed, as shown in Figure 3-6. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 25 Kit Operation 3.2.3.1 Test Procedure for CYUSBS232 RDK Configured as USB-UART 1. To test the functionality of the UART interface, you can perform a quick loopback test by connecting the jumper wires as follows: ❐ J7.8 - J7.5 (TXD to RXD) ❐ J7.6 - J7.1 (RTS# to CTS#) ❐ J7.7 - J7.3 (DTR# to DSR#) Figure 3-13. Connection for Loopback Test 2. Open an instance of a serial emulation terminal, such as Tera Term, which can be installed from the following location: <Install directory>/cypress/CYUSBS232 RDK/1.0/teraterm 3. In the Tera Term: New Connection window, click Serial and select USB-Serial Port (COM#), as shown in Figure 3-14. Click OK. The screen appears, as shown in Figure 3-15. Note To change the UART parameters, go to Setup > Serial port in the Tera Term terminal. Figure 3-14. Tera Term Connection 4. Connecting TXD and RXD enables the data to flow from UART transmitter to receiver, which gets displayed on the same terminal, as shown in Figure 3-15. This test procedure validates the functioning of USB-UART bridge. If the local echo option is enabled, then the typed in data appears twice on the terminal. Note To enable the local echo option, go to Setup > Terminal. In the Tera Term: Terminal Setup window, check the local echo box. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 26 Kit Operation Figure 3-15. Tera Term Application: Loopback Test Output (local echo enabled) 3.2.3.2 Throughput Determination Throughput is the average rate of successful data transfer over the UART channel. It is measured in bits/second. A PC application can be used to determine the throughput of an USB-UART LP bridge controller. The CY7C65213 device supports 3 Mbps, but the actual reported throughput on a PC application (Tera Term) will be less than 3 Mbps, usually around 1 Mbps, due to protocol overhead and PC application latency. Follow these steps to determine the throughput of the USB-UART LP bridge controller: 1. In the Tera Term window, go to Setup > Serial Port: a. Enter ‘3000000’ in the Baud rate drop-down combo box. b. Select Hardware in the Flow control drop-down menu. c. Click OK 2. Go to Setup > Terminal > Receive and select CR+LF. Click OK to continue. 3. Go to File menu. Select Send File from the drop-down menu, as shown in Figure 3-16. Figure 3-16. Sending the File 4. Select a file to be sent through USB Serial Port (COM#). After the file is selected, the data transfer starts and the window is displayed, as shown in Figure 3-17. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 27 Kit Operation 5. Number of bytes transferred per second determines throughput. The "Tera Term :Send File" window shows effective data throughput in Bytes/sec; multiply this value by 8 to get the throughput in bits/sec. Again, multiply this value by 2 to get the unidirectional throughput. Figure 3-17. Throughput Determination 3.2.4 CYUSBS232 RDK Restore Default Configuration Settings The CYUSBS232 RDK board features the CY7C65213 USB-UART LP bridge controller, which is factory-programmed with default UART parameters. You can reconfigure the device using the Cypress USB-Serial Configuration Utility to meet specific requirements that overwrites the factory configuration. To restore the board to the default factory settings, follow these steps: 1. Follow steps 1 to 5 in section 3.2.1 Connecting CYUSBS232 RDK to Cypress USB-Serial Configuration Utility to connect the board to the Cypress USB-Serial Configuration Utility. 2. Click File > Open Configuration from > Disk, as shown in Figure 3-18. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 28 Kit Operation Figure 3-18. Select Configuration Window 3. Select the default configuration file from the following location: <Install directory>\Cypress\CYUSBS232 RDK\1.0\default factory settings\CYUSBS232UART.cyusb Figure 3-19. Select Default Configuration File Window CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 29 Kit Operation 4. After successfully loading the default configuration file, the message “Configuration settings were successfully loaded from the file” appears. Click OK to continue. Figure 3-20. Load Configuration 5. Click Program to update the configuration settings. On successful programming, the "Program Succeeded” message appears. Disconnect and reconnect the USB micro-B cable to the micro-B connector on the RDK to initiate a power-on-reset of the controller. 6. The Cypress USB-Serial Configuration Utility is displayed as shown in Figure 3-6, and the board enumerates as shown in Figure 3-4. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 30 4. 4.1 Hardware Board Details The CYUSBS232 RDK board consists of the following components: ■ CY7C65213 USB-UART LP bridge controller ■ Power-supply system ■ USB connector ■ Headers ■ LEDs Figure 4-1. CYUSBS232 RDK Board Top View Bottom View .JDSP# $POOFDUPS 64#6"35-1 $:$ 7#64 $54 (/% (/% 7$$*0@065 (1*0 %$% 39% 7$$*0@065 (1*0 (1*0 (1*0 354 %53 (1*0 (1*0 (1*0 59% /PU6TFE (1*0 %43 3* (1*0 7#64 (/% (/% (1*0 %1PXFS-&% %5Y"DUJWJUZ-&% %3Y"DUJWJUZ-&% CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 31 Hardware 4.2 Theory of Operation This section provides the block-level description of the CYUSBS232 RDK board. Figure 4-2. Hardware Block Diagram Power LED R e g u la to r J7 3 .3 V CON1 VBUS D+ USB C o n n e cto r UART S ig n a ls V C C IO VCC USB UART LP TX and RX a ctivity L E D s DGND G P IO s J6 The CYUSBS232 RDK board features the CY7C65213 full-speed USB-UART LP bridge controller that offers a configurable UART interface. This device is a fixed-function controller, which does not require any firmware development. The USB, UART, and system parameters of the controller can be modified using the easy-to-use Cypress USB-Serial Configuration Utility. The CYUSBS232 RDK board is powered from the USB by a USB standard-A to micro-B cable. This input voltage is regulated by an LDO regulator to 3.3 V and connected to the USB-UART LP bridge controller. All the UART pins and GPIO signals from the USB-UART LP bridge are brought out to the headers (J6 and J7) to allow connecting and testing the functionality easily. You can also interface any type of UART legacy device to these headers to convert it to an USB device. The CYUSBS232 RDK board has a power LED, TX activity LED, and RX activity LED. LED functions are explained in section 4.3.5 LEDs. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 32 Hardware 4.3 Functional Description This RDK uses the CY7C65213 USB-UART LP bridge controller, which is a full-speed USB controller that enables seamless PC connectivity by upgrading UART-based legacy devices to the USB with a minimum number of components. This device includes a UART, an internal regulator, an internal oscillator, and 512 bytes of flash in a 32-pin QFN package. For more information, refer to the USB-Serial web page at www.cypress.com/go/usbserial and the USB-Serial datasheet. 4.3.1 Features ■ ■ USB 2.0-certified, full-speed (12 Mbps) ❐ Supports communication driver class (CDC), personal health care device class (PHDC), and vendor-specific drivers ❐ BCD compliant with USB Battery Charging Specification, Rev. 1.2 (Peripheral Detect only) ❐ Integrated USB termination resistors Single-channel configurable UART interface ❐ Data rates up to 3 Mbps ❐ 256 bytes for each transmit and receive buffer ❐ Data format: 7 to 8 data bits 1 to 2 stop bits 4.3.2 ❐ No parity, even, odd, mark, or space parity ❐ Supports parity, overrun, and framing errors ❐ Supports flow control using Clear To Send (CTS), Request To Send (RTS), Data Terminal Ready (DTR), and Data Set Ready (DSR) Power-Supply System The CYUSBS232 RDK board is designed to operate in USB bus-powered mode. The onboard low drop-out regulator (LDO) provides the 3.3 V required for the bridge controller. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 33 Hardware 4.3.3 USB Connector A USB standard micro-B connector is used in the board. The shield of this connector is connected to the ground. Two inductors (L1 and L2) are placed on the VBUS and GND pins to reduce noise from the power supply lines. Figure 4-3. USB to UART Schematic VBUS CON1 VBUS DM DP GND SHIELD1 SHIELD2 1 2 L1 USB_DM 3 USB_DP 4 5 6 + C4 1uF L2 USB - MICRO B DX4R005J91R1500 JAE Electronics 4.3.4 Headers All the device signals (UART and GPIO) are available for external connectivity via the headers J7 and J6. The following tables provide the header details. Table 4-1. J7 (UART Signals) Header Pin # Name J.7.1 CTS# J.7.2 DCD# J.7.3 DSR# J.7.4 RI# J.7.5 RXD J.7.6 RTS# J.7.7 DTR# J.7.8 TXD J.7.9 Not Connected CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 34 Hardware Table 4-2. J6 (GPIO Header) GPIO Header Pin # 4.3.5 Name J.6.1 VBUS J.6.2 GND J.6.3 GND J.6.4 VCCIO_OUT J.6.5 GPIO2 J.6.6 GPIO4 J.6.7 GPIO3 J.6.8 GPIO1 (RXLED) J.6.9 GPIO0 (TXLED) LEDs The CYUSBS232 RDK board has three LEDs: ■ D1: This LED will turn on to indicate that the board is powered. ■ D2: This LED is connected to GPIO0 of the device. It will turn on to indicate the data transfer on the TXD pin of the UART. ■ D3: This LED is connected to GPIO1 of the device. It will turn on to indicate the data transfer on the RXD pin of the UART. Figure 4-4. D1 LED (VBUS Indication) 3 C3 U1 1 0.1uF 3 VBUS VCCIO R5 VBUS 1k D1 C1 USB_DP USB_DM 19 14 15 LED VCC USBDP USBDM 25 26 27 28 29 NC0 NC1 NC2 NC3 NC 0.1uF CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 35 Hardware Figure 4-5. D2 and D3 LEDs (TXD and RXD Activity Indication) VCCIO_out C2 RI# DSR# DCD# CTS# RESET# DTR# RTS# TxD RxD CBUS Serial UART 1uF GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 3 6 7 8 18 31 32 30 2 22 21 10 11 9 RI# DSR# DCD# CTS# RESET DTR# RTS# TxD RxD R7 R6 1k 1k D2 D3 LED LED GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 36 5. Additional Information 5.1 Using the CYUSBS232 RDK on a Mac OS 5.1.1 Using CYUSBS232 RDK Board in CDC Mode The CY7C65213 USB-UART LP bridge controller automatically binds to the AppleUSBCDC driver, which is the CDC class driver in Mac OS X. Follow these steps to use the CDC mode for Cypress USB-UART LP bridge on a Mac OS: 1. Connect the CYUSBS232 RDK board to Mac. The Mac CDC class driver (AppleUSBCDC) automatically binds to the device. After the driver successfully binds, a device node is created as /dev/tty.usbmodem<number>. 2. Install a standard terminal emulator, such as SerialTools to test the UART functionality of the device. SerialTools is a free application available in the Apple App Store. 3. Open the SerialTools application. In the Serial Port field, select the Cypress USB-UART LP bridge device node created in step 1. Figure 5-1. Connecting USB-UART Bridge in SerialTools 4. Configure the UART parameters, such as baud rate, stop bits, data width, and parity. 5. For simple loopback tests, short the RXD and TXD pins on the RDK. 6. Click Connect to start communicating with the device. 7. Type Cypress in the text field. Because the local echo is always enabled in the SerialTools application, the entered characters will be displayed twice. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 37 Additional Information Figure 5-2. SerialTools Application: Loopback Test Output 5.1.2 Using the CYUSBS232 RDK Board in Vendor Mode Follow these steps to use the CYUSBS232 RDK board in the vendor mode on a Mac OS. 1. Download the latest USB-Serial SDK for Mac from www.cypress.com/go/usbserial. 2. Follow the steps listed in the README file provided in the software development kit (SDK) to compile and install the library. 3. When the library is installed, execute the test utility (CyUSBSerialTestUtility) to verify communication with the CYUSBS232 RDK board. 4. For a detailed API description, refer to CyUSBSerial API Documentation.pdf in the <install directory>/common/doc folder of the SDK. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 38 CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** A B C 4 5 6 3 1 2 1 BCD1 0.1uF C1 VBUS 3 VBUS 2 TEST POINT LED D1 1k R5 L1 L2 5 TEST POINT BCD0 USB_DP USB_DM 25 26 27 28 29 13 12 5 19 14 15 0.1uF C3 NC0 NC1 NC2 NC3 NC4 BCD1 BCD0 VBD VCC USBDP USBDM U1 VCCIO_out USB_DP USB_DM SW2 0 ohm 0603 DEFAULT_OPTION = 1&2 VCCIO USB - MICRO B DX4R005J91R1500 JAE Electronics GND SHIELD1 SHIELD2 1 2 3 D DP VBUS DM CON1 1 VBUS + C4 1uF CY7C65213 4 4 GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 RI# DSR# DCD# CTS# RESET# DTR# RTS# TxD RxD 1uF C2 VCCD Serial UART 5 1 1 VCCIO NC 23 NC 16 VCCD GND AGND 17 24 GND 20 CBUS GND 4 EPAD 33 22 21 10 11 9 3 6 7 8 18 31 32 30 2 GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 RI# DSR# DCD# CTS# RESET DTR# RTS# TxD RxD LED LED 3 1k D3 1k R6 D2 R7 VCCIO_out RESET 0.1uF C6 3 2 1 VBUS 3 Date: Size A Title Vadj Vout 4 5 1uF C5 + CTS# DCD# DSR# RI# RxD RTS# DTR# TxD 3 SW3 3 VBUS GND GND VCCIO_OUT GPIO2 GPIO4 GPIO3 GPIO1 GPIO0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 2 1 Sheet 2 1 of CY7C65213 DEVICE CONNECTION Wednesday, August 28, 2013 2 630-60096-01 CYUSBS232 USB-UART LP BOARD 2 1 CON9 J7 CON9 J6 0 ohm 0603 2 1M R2 VCCIO 1 CYPRESS SEMICONDUCTOR © 2013 TC1070 GND SHDn Vin U3 2 Document Number 2 3 1 SW1 0 ohm 0603 DEFAULT_OPTION = NO LOAD 4.7k R1 VBUS 1 2 Rev 03 562k R3 A B C D A.1 3 A. Appendix Schematic The CYUSBS232 RDK board schematic is available at www.cypress.com/go/CYUSBS232. Figure A-1. CYUSBS232 Schematic 39 A.2 CY7C65213 USB-UART LP Bridge Controller Design Guidelines This section explains the guidelines for a board design using the CY7C65213 USB-UART LP bridge controller: ■ The CY7C65213 silicon can operate from 1.71 V to 5.5 V. ■ The VCCD pin should be shorted to the VCCIO pin when an operating voltage (VCCIO) is from 1.71 V to 1.89 V. ■ A 1-µF decoupling capacitor should be connected between the VCCD pin and ground when the operating voltage is greater than 2 V. ■ Decoupling capacitors (decap) must be placed close to VCCIO pins. Place the C3 decap close to VCCIO pin and C1 decap close to VCC pin; C10 is the 1-µF capacitor placed close to the VCCD pin. Figure A-2. Decoupling Capacitor Placement ■ Output current requirement of the LDO should be a minimum of 1 A. ■ Power traces should be routed with minimum of 20 mils trace width ■ The CY7C65213 USB-UART LP bridge controller has an exposed pad (EPad) in the bottom that must be connected to the GND pad on the PCB. ■ An active low 1-µs pulse width is required to reset the CY7C65213 USB-UART LP bridge controller. ■ USB traces (DP/DM) should be routed with a 90- impedance. ■ USB differential traces (DP/DM) should be routed with a solid reference plane. ■ In the BCD interface, the bus-detect signal should be connected with a resistor divider network from VBUS. Refer to the Application Examples section in the CY7C65213 datasheet for recommended values. CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 40 A.3 Troubleshooting Guide Problem Possible Cause USB cable is not connected to the PC. Possible Solution Connect the USB cable. The CYUSBS232 RDK board PC does not power up the USB Connect on a different USB port. does not power up in bus-pow- port. ered mode. Power on LEDs, D2 Use a different USB cable. Or use the self(5 V) and D4 (3.3 V) do not light USB cable is faulty powered mode and connect the 5-V DC up. power supply provided with the kit. Power on LED is faulty. Check if the voltage on the D2 LED is 5 V. Run setup.exe in the following location: The CYUSBS232 RDK board does not enumerate. USB driver is not bound to the RDK. a.<Install_directory>\ Cypress\CYUSBS232 RDK\1.0\driver\cyusb3 b.<Install_directory>\ Cypress\CYUSBS232 RDK\1.0\driver\cyusbserial UART does not work. UART is not properly configured. Load CYUSBS232UART.cyusb supplied with the kit. See 3.2.4 CYUSBS232 RDK Restore Default Configuration Settings on page 28. Assert power-on-reset to the RDK (remove and reconnect the USB micro-B cable to the micro-B connector on the RDK). CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 41 A.4 Bill of Materials (BoM) No. Qty. Reference Description Manufacturer Manufacturer Part No. 1 1 600-60096-01 REV** PCB, CYUSBS232 USB-Serial Board Cypress Semiconductor 600-60096-01 REV** 2 1 CON1 CONN RCPT 5POS R/A MICRO USB JAE Electronics DX4R005J91R1500 3 3 C1,C3,C6 CAP CER 0.1UF 16V 10% X7R 0402 TDK Corporation C1005X7R1C104K050BC 4 1 C2 CAP CER 1UF 16V 10% X5R 0402 TDK Corporation C1005X5R1C105K050BC 5 2 C4,C5 CAP CER 1UF 10V 10% X7R 0603 TDK Corporation C1608X7R1A105K080AC 6 3 D1,D2,D3 LED GREEN RECT CLEAR 0603 Lite-On Inc LTST-C193KGKT-5A 7 2 J6,J7 CONN HEADER 9POS .100" SGL GOLD Samtec Inc TSW-109-16-G-S 8 2 L1,L2 FERRITE CHIP 220 OHM 2A 0805 Murata Electronics BLM21PG221SN1D 9 1 R1 RES 4.70K OHM 1/10W 1% 0402 Panasonic Electronic SMD Components ERJ-2RKF4701X 10 1 R2 RES 1.00M OHM 1/10W 1% 0402 Panasonic Electronic SMD Components ERJ-2RKF1004X 11 1 R3 RES 562K OHM 1/10W 1% 0402 SMD Panasonic Electronic Components ERJ-2RKF5623X 12 3 R5,R6,R7 RES 1.00K OHM 1/10W 1% 0402 Panasonic Electronic SMD Components ERJ-2RKF1001X 13 3 SW1,SW2,SW3 RES 0.0 OHM 1/10W JUMP 0603 Panasonic Electronic SMD Components ERJ-3GEY0R00V 14 1 U1 USB-Serial Cypress Semiconductor CY7C65213-32LTXI 15 1 U3 IC REG LDO ADJ 50MA SOT23A-5 Microchip TC1070VCT713 CYUSBS232 USB-UART LP Reference Design Kit Guide, Doc. # 001-87891 Rev. ** 42