CY8CKIT-002 MiniProg3 User Guide Doc. # 001-59350 Rev. *F Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): 408.943.2600 http://www.cypress.com Copyrights Copyrights © Cypress Semiconductor Corporation, 2011-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 life-support 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. PSoC Designer™ and PSoC Creator™ are trademarks and PSoC® and CapSense® are registered trademarks of Cypress Semiconductor Corp. All other 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. 2 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F Contents Safety Information 1. Introduction 1.1 1.2 1.3 1.4 1.5 3.2 3.3 13 Interfaces ...................................................................................................................14 3.1.1 ISSP ...............................................................................................................14 3.1.2 JTAG ..............................................................................................................14 3.1.3 SWD/SWV......................................................................................................14 3.1.4 I2C..................................................................................................................14 3.1.5 Reference.......................................................................................................15 Connectors ................................................................................................................15 3.2.1 5-Pin Connector .............................................................................................15 3.2.2 10-Pin Connector ...........................................................................................15 Power.........................................................................................................................16 3.3.1 Voltage Detection ...........................................................................................16 A. Appendix A.1 A.2 9 System Requirements .................................................................................................9 MiniProg3.....................................................................................................................9 MiniProg3 Installation ................................................................................................10 Example Projects.......................................................................................................11 MiniProg3 LEDs.........................................................................................................11 3. Technical Description 3.1 7 CY8CKIT-002 Contents ...............................................................................................7 Programming ...............................................................................................................7 Debugging ...................................................................................................................8 Bridging........................................................................................................................8 Documentation Conventions........................................................................................8 2. Installing MiniProg3 2.1 2.2 2.3 2.4 2.5 5 17 Troubleshooting .........................................................................................................17 Regulatory Compliance Information ..........................................................................17 Revision History CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 19 3 Contents 4 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F Safety Information Regulatory Compliance CY8CKIT-002 is used as a development platform for hardware or software in a laboratory. In a domestic environment, this product may cause radio interference; adequate prevention measures should be taken. CY8CKIT-002, as shipped from the factory, is verified to meet with requirements of CE as a Class A product. The CY8CKIT-002 boards are sensitive to electrostatic discharge (ESD). Electrostatic charges accumulate on the human body and on other equipment. Devices that are subjected to high-energy discharges can suffer permanent damage. Proper ESD precautions are recommended to prevent loss of functionality. Store unused CY8CKIT-002 boards in the protective shipping package. General Safety Instructions ESD Protection ESD can damage boards and associated components. Cypress recommends that you work on the board at an ESD workstation, if available. Otherwise, use appropriate ESD protection, such as an antistatic wrist strap attached to a ground, when handling parts. CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 5 Safety Information 6 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 1 Introduction PSoC® MiniProg3 is an all-in-one programmer for PSoC 1, PSoC 3, PSoC 4, and PSoC 5LP architectures, a debug tool for PSoC 3, PSoC 4, and PSoC 5LP architectures, and an USB-I2C Bridge for debugging I2C serial connections and communicating with PSoC devices. Designed as a low-cost aid for developers to use in building their own systems around Cypress 8-bit and 32-bit PSoC devices, the MiniProg3 is included in the CY8CKIT-001 development kit and sold as a standalone kit, CY8CKIT-002. These kits are available through the Cypress Online Store or through our distributors. Figure 1-1. MiniProg3 1.1 CY8CKIT-002 Contents The CY8CKIT-002 MiniProg3 kit includes: ■ MiniProg3 programmer/debugger ■ 10-pin ribbon cable ■ USB cable ■ Software CD ■ Quick start guide The CY8CKIT-002 CD installs critical information, such as the kit documentation, which includes the user guide and release notes, in the following project directory: [Install path]\Cypress\CY8CKIT-002 MiniProg3 1.2 Programming The MiniProg3 programmer/debugger provides the flexibility to work with different programming and debugging interfaces, such as JTAG, SWD, ISSP, and I2C. MiniProg3 supports all 8-bit and 32-bit PSoC devices. When programming, MiniProg3 enables communication with target devices using I/O voltage levels from 1.5 V to 5.5 V. In addition, MiniProg3 can supply power to a simple target board at one of four voltage levels: 1.8 V, 2.5 V, 3.3 V, or 5 V. CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 7 Introduction 1.3 Debugging MiniProg3 supports the following debugging protocols for 8-bit and 32-bit PSoC devices: ■ SWD (PSoC 3, PSoC 4, PSoC 5LP) ■ JTAG (PSoC 3, PSoC 5LP) ■ I2C (limited PSoC 1 devices) The MiniProg3 debugger is supported by the software tools PSoC Creator and PSoC Designer. 1.4 Bridging MiniProg3 supports USB-I2C bridging protocols. These protocols are used for debugging certain PSoC 1 devices that support serial communication debugging, tuning, and configuration of fixed function devices. The MiniProg3 bridging capabilities are used by PSoC Designer, PSoC Creator, PSoC Programmer, Bridge Control Panel, and other applications. Tuning software tools also use these capabilities. Note If you want to develop your custom USB-I2C applications using MiniProg3, see the PSoC Programmer COM guide and examples of the custom USB-I2C applications. 1.5 Documentation Conventions Table 1-1. Document Conventions for User Guides Convention 8 Usage Courier New Displays file locations, user-entered text, and source code: C:\...cd\icc\ Italics Displays file names and reference documentation: Read about the sourcefile.hex file in the PSoC Designer User Guide. [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 menu, 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. CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 2. Installing MiniProg3 This chapter shows how to install MiniProg3 and its associated PC software. 2.1 System Requirements Make certain that your computer meets all of the requirements to connect to the MiniProg3 and its associated software. Table 2-1. Computer Requirements Computer Requirements Recommended Processor speed 2 GHz RAM 3 GB Hard disk free space 1 GB Screen resolution 1024x768 CD-ROM drive Yes USB port (or powered USB hub) 2.2 USB2 High Speed Microsoft Windows XP (SP1, SP2, SP3), Vista (32-bit, 64-bit), or Win 7 (32-bit, 64-bit) Yes Microsoft Windows .NET framework 2.0 SP1, 32-bit, or 64-bit Yes Microsoft Internet Explorer 7.0 or greater (SP1) Yes Adobe Reader (to view.PDF documents) Yes MiniProg3 Figure 2-1. Top View USB MiniProg3 Connector Busy LED 10-pin JTAG/SWD Connector Target Power LED 5-pin ISSP/I2C/SWD Connector Status LED Aux LED Figure 2-2. Bottom View CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 9 Installing MiniProg3 2.3 MiniProg3 Installation The MiniProg3 programmer and debugger are supported by PSoC Programmer, PSoC Designer, and PSoC Creator. Secondary software, such as Bridge Control Panel and Clock Programmer, use the programmer COM hardware layer to support MiniProg3 functionality. 1. Download and install PSoC Programmer. Follow the instructions to install the software. 2. Connect the MiniProg3 to your computer’s USB port using the USB cable. When properly connected, the four LEDs on the MiniProg3 flicker. The first two MiniProg3 drivers are automatically installed. Note Remove the warning sticker before using MiniProg3. 3. Run PSoC Programmer: Select Start > All Programs > Cypress > PSoC Programmer. The second MiniProg3 driver is automatically installed. 4. In PSoC Programmer, select View > Modern. Figure 2-3. PSoC Programmer in Modern View Mode: MiniProg3 Selected and Connected 5. To connect to the port, in the port selection window, click the MiniProg3 device. You can also click Connect/Disconnect. If the connection is successful, the green status LEDs on MiniProg3 light up and a blue dot appears next to MiniProg3 in the Port Selection box. Also, the indicator in the lower-right corner of the PSoC Programmer window turns green and shows Connected. You can now use MiniProg3 and the functions it supports. For more information on how to use PSoC Programmer, see the PSoC Programmer User Guide. 10 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F Installing MiniProg3 2.4 Example Projects MiniProg3 is supported by PSoC Programmer, a simple GUI that connects to programming hardware to program and configure PSoC devices, and to develop custom applications. Example projects and documentation are included in the PSoC Programmer installation and are available in the PSoC Programmer root installation folder: [Install path]\Cypress\Programmer\[Programmer Version]\Examples The PSoC Programmer root installation folder also includes documentation on how to use the programming interface: [Install path]\Cypress\Programmer\[Programmer Version]\Documents 2.5 MiniProg3 LEDs MiniProg3 has five indicator LEDs that, when lit, indicate the following: ■ Upper Left - Busy (Red): An operation (such as programming or debugging) is in progress. ■ Lower Left - Status (Green): The device is enumerated on the USB bus. When flashing, this LED indicates that MiniProg3 has received USB traffic. ■ Upper Right - Target Power (Red): MiniProg3 is supplying power to the target connectors. This LED does not light up if power to target connectors is supplied by a source other than MiniProg3. ■ Lower Right - Aux (Yellow): Reserved for future use. ■ Middle - No Label (Yellow): Flashes briefly during the initial configuration of the device. If it stays lit, this LED indicates that a configuration error has occurred. If this happens, disconnect the MiniProg3 from the USB port and then reconnect it. CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 11 Installing MiniProg3 12 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 3. Technical Description MiniProg3 is a protocol translation device. With MiniProg3, the PC host software can communicate through a high-speed USB to the target device to be programmed or debugged, as shown in Figure 3-1. The device-side communication protocol can be one of the several standards and can occur over either of the two connectors. Table 3-1 lists the protocols that are supported by each connector. MiniProg3 enables communication with the target devices using I/O voltage levels from 1.5 V to 5.5 V. In addition, MiniProg3 can provide power to a simple target board, at one of four voltage levels: 0.8 V, 2.5 V, 3.3 V, or 5 V. Figure 3-1. System Block Diagram PC USB Cable MiniProg3 10-pin Ribbon Cable or 5-pin Direct Connection Target Board Table 3-1. Connectors / Communication Protocol Support Connector ISSP JTAG SWD and SWVa I2C 5-pin Supported N/A SWD Supported 10-pin N/A Supported SWD and SWV N/A a. SWV trace is available only with SWD debugging. CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 13 Technical Description 3.1 Interfaces 3.1.1 ISSP In-System Serial Programming (ISSP) is a Cypress legacy interface used to program the PSoC 1 family of microcontrollers. MiniProg3 supports programming PSoC 1 devices through the 5-pin connector only. For more information about the ISSP interface, see the PSoC 1 Technical Reference Manual. 3.1.2 JTAG The Joint Test Action Group (JTAG) standard interface is supported by many high-end microcontrollers, including the PSoC 3 and PSoC 5LP families. This interface allows a daisy chain bus of multiple JTAG devices. The MiniProg3 supports programming and debugging the PSoC 3 and PSoC 5LP devices using JTAG, through the 10-pin connector only. 3.1.3 SWD/SWV Recent ARM-based devices have introduced a new serial debugging standard called Serial Wire Debug (SWD). The PSoC 3, PSoC 4, and PSoC 5LP family implements this standard, which offers the same programming and debugging functions as JTAG except the boundary scan and daisy chain. SWD uses fewer pins of the device than the JTAG. MiniProg3 supports programming and debugging PSoC 3, PSoC 4, and PSoC 5LP devices, using SWD, through the 5-pin or 10-pin connector. The Single Wire Viewer (SWV) interface, also introduced by ARM, is used for program and data monitoring, where the firmware may output data in a method similar to “printf” debugging on PCs, using a single pin. MiniProg3 supports monitoring of PSoC 3 and PSoC 5LP firmware, using SWV, through the 10-pin connector and in conjunction with SWD only. The PSoC 3, PSoC 4, and PSoC 5LP devices support the SWD programming through both the SWD and USB SWD lines. Before programming a PSoC 3, PSoC 4, or PSoC 5LP device, make sure you review the electrical connection requirements in the respective device datasheet or in the PSoC 3, PSoC 4, and PSoC 5LP device programming specifications. You can find the datasheets and programming specifications here: http://www.cypress.com/go/psoc3 http://www.cypress.com/go/psoc5lp http://www.cypress.com/go/programming 3.1.4 I2C A common serial interface standard is the I2C standard. It is mainly used for communication between microcontrollers and other ICs on the same board, but can also be used for intersystem communications. MiniProg3 uses an I2C multimaster host controller that allows the tool to exchange data with I2C-enabled devices on the target board. For example, this feature may be used to tune the CapSense® designs. When MiniProg3 is configured to I2C protocol mode, MiniProg3 enables internal 5.6-K pull-up resistors on the SDA and SCL lines. 14 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F Technical Description 3.1.5 Reference For more information on the PSoC 3 and PSoC 5LP JTAG, SWD, and I2C interfaces, see the PSoC 3 and PSoC 5LP Technical Reference Manuals. For more information on PSoC 1 interfaces, see the PSoC 1 Technical Reference Manual. 3.2 Connectors 3.2.1 5-Pin Connector The 5-pin connector is configured as a single row with a 100-mil pitch. It is designed to mate with a Molex model 22-23-2051 (straight) or 22-05-3051 (right angle) male header with a key tab. Figure 3-2. 5-Pin Connector with Pin Assignments SDAT SCLK XRES GND VTARG MiniProg3 (End View) 3.2.2 Mating Connector 10-Pin Connector The 10-pin connector is configured as a dual row with 50-mil pitch. It is used with a ribbon cable (provided) to mate to a similar connector on the target board. The recommended mating connectors are the Samtec FTSH-105-01-L-DV-K (surface mount) and the FTSH-105-01-L-D-K (through hole) or similar connectors available from other vendors. The signal assignment is shown in Figure 3-3. When programming JTAG devices, note that MiniProg3 does not support nTRST pins. Figure 3-3. 10-Pin Connector with Pin Assignments Note The ribbon cable connector extends beyond the body of the connector. Be sure to allow room. XRES GND TDI GND TDO GND TCK GND TMS VTARG Pin 1 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 15 Technical Description Here is a summary of the protocols and related pin assignments. Table 3-2. Communication Protocol Pin Assignments Protocol ISSP JTAG SWD / SWV I2C Signal SCLK SDAT XRES TMS TCK TDO TDI XRES SDIO SCK SWVa XRES SCK SDA 5-Pin 4 5 3 10-Pin 2 4 6 8 10 2 4 6 10 5 4 3 4 5 a. SWV trace is only available in conjunction with SWD debugging. 3.3 Power The MiniProg3 requires a connection to the Vddio supply of the target device to set the voltage level used for communication. This is required regardless of the communication protocol and the port selected. One of the connector’s VTARG pins must be connected to the Vddio supply of the target device. For PSoC 3 and PSoC 5LP, this is the Vddio1 supply because this supply is used to drive the debug pins. If you do not connect the VTARG or you connect it to the wrong supply, MiniProg3 cannot communicate with the target device. On boards where there is a single power supply for the entire board, MiniProg3 can, in some cases, supply power to the board. This supply is limited to approximately 200 mA, and is protected against excess current draw. You can select 1.8 V, 2.5 V, 3.3 V, or 5 V for the power supply voltage. The 5 V supply may be as low as 4.25 V or as high as 5.5 V, because it is supplied directly from the USB port. In addition to supplying power, MiniProg3 can also measure voltage on its VTARG line. The PSoC Programmer GUI displays the VTARG voltage in the Status group box (shown in Figure 2-3 on page 10). The accuracy of the measurement is 80–100 mV in the VTARG range 0 ≤ U ≤ 4.0 V, and a maximum of 200 mV in the range 4.0 ≤ U ≤ 5.0. Note Although ADC resolution in MiniProg3 is 20 mV, the actual accuracy is approximately 200 mV. Note that some users may need to add series resistance on the VTARG domain of the target board. Table 3-3 provides the maximum series resistance values for different voltage levels. Exceeding these values will result in unreliable communication link. Table 3-3. Maximum Series Resistance on VTARG Domain on Target Board VTARG 5.0 V 3.3 V 2.5 V 1.8 V 3.3.1 LIMIT 0.9*VTARG 0.9*VTARG 0.9*VTARG 0.9*VTARG VIH 4.50 V 2.97 V 2.25 V 1.62 V DROP 0.500 V 0.330 V 0.250 V 0.180 V MAX_SERIES 500 ohm 330 ohm 250 ohm 180 ohm Voltage Detection MiniProg3 can detect voltages in the range of 0 V to 5 V. Many of the Cypress software tools, such as PSoC Programmer and Bridge Control Panel, display this detected voltage in the application GUI. 16 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F A. A.1 Appendix Troubleshooting If you experience difficulty with your MiniProg3, see the following table to correct the problem. Table A-1. Troubleshooting Guide Problem Try LED does not blink upon power on. Make sure the MiniProg3 USB cable is properly attached to both MiniProg3 and the computer. If you are using a hub, make sure that the hub is properly attached to both MiniProg3 and the computer. If you are using a self-powered hub, the power must be properly connected. Bus-powered hubs are not recommended. No Windows USB plug-in sound. Make sure that your computer’s sound is properly configured. If you are using a hub, try to disconnect and reconnect the hub into the computer. If it is a powered hub, disconnect the power and reconnect it while the hub's USB cable is disconnected from the computer. Yellow light in the center of MiniProg3 stays on after connecting MiniProg3 and after launching PSoC Programmer or PSoC Creator. This indicates a configuration error. Run PSoC Creator or PSoC Programmer and try to disconnect and reconnect MiniProg3. If the yellow light persists, verify that the USB cable is in good condition, and that it is a high-speed certified cable. If the condition still persists, call technical support. Intermittent programming or debugging Try reducing the serial clock rate. Verify that the USB cable is in failures. good condition, and that it is a high-speed certified cable. If the condition still persists, call technical support. MiniProg3 is plugged in and the LED lights Launch one of the development tools, such have flashed but nothing is happening. PSoC Programmer, PSoC Creator, or PSoC Designer. as MiniProg3 is the *A version and the 5-pin There is a known issue with the *A version of MiniProg3 that was and 10-pin connectors are connected to fixed in the *B revision. If you have a *A programmer, then the device. connect to the device individually when programming. (The MiniProg3 revision, either *A or *B, is shown on the sticker on the back of the device.) A.2 Regulatory Compliance Information The CY8CKIT-002 complies with the CE-Low Voltage Directive 2006/95/EC (Europe) safety requirement. It has been tested and verified to comply with the following electromagnetic compatibility (EMC) regulations. ■ CISPR 22 - Emissions ■ EN 55022 Class A - Immunity (Europe) ■ CE - EMC Directive 2004/108/EC ■ CE Declaration of Conformity CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F 17 18 CY8CKIT-002 MiniProg3 User Guide, Doc. # 001-59350 Rev. *F Revision History Document Revision History Document Title: CY8CKIT-002 MiniProg3 User Guide Document Number: 001-59350 Revision ECN# Issue Date Origin of Change Description of Change ** 3371666 09/19/11 WBZ / RAVG *A 3421613 11/01/11 WBZ/ RAVG Information about accuracy and resolution of measured voltage added to Power section Initial Release. Safety Information section added. Appendix A Troubleshooting guide updated *B 3616863 5/10/12 ANDI / LRDK *C 3726686 08/28/12 AESA Updated template and changed installation path *D 3783535 10/10/12 RRAM Reorganized the Appendix section *E 3947113 03/25/13 SASH Updated Table 2-1 on page 9. Added PSoC 4 and PSoC 5LP device Updated Technical Description chapter on page 13: Updated “Power” on page 16: *F 4178554 10/30/2013 WBZ Updated description. Updated in new template. Distribution: Internal Posting: None CY8CKIT-002 MiniProg3 User Guide, Spec. # 001-59350 Rev. *F 19 Index 20 CY8CKIT-002 MiniProg3 User Guide, Spec. # 001-59350 Rev. *F