ICE User Guide

Document # 38-12005 Rev. *D

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 Copyright © 2005 Corporation. All rights reserved. “Programmable System-on-Chip,” PSoC, PSoC Designer, and PSoC Express are trademarks of Cypress Semiconductor Corporation (Cypress), along with Cypress® and Cypress Semiconductor™. All other trademarks or registered trademarks referenced herein are the property of their respective owners. The information in this document is subject to change without notice and should not be construed as a commitment by Cypress. While reasonable precautions have been taken, Cypress assumes no responsibility for any errors that may appear in this document. No part of this document may be copied or reproduced in any form or by any means without the prior written consent of Cypress. Made in the U.S.A.

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 PAR- TICULAR 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 rea- sonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems appli- cation implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.

2 ICE User Guide, Document # 38-12005 Rev. *D Contents

1. Introduction 5 1.1 Support ...... 5 1.1.1 Product Upgrades ...... 5 1.2 Conventions...... 6 1.3 Acronyms ...... 6

2. Connecting to the ICE 7 2.1 Software Requirements ...... 7 2.2 Connecting the ICE Cube ...... 7 2.2.1 Connect Using a USB Port...... 8 2.3 Connecting the ICE-4000...... 8 2.3.1 Connect Using a Parallel Port ...... 8 2.3.2 Using the USB Adapter to Connect to a USB Port...... 9 2.4 Configuring the Software ...... 10

3. Troubleshooting 11 3.1 Windows Errors...... 11 3.1.1 Cannot install this hardware ...... 11 3.2 ICE Error Messages...... 11 3.2.1 Could not configure ICE ...... 11 3.2.2 Parallel port hardware read data errors ...... 12 3.2.3 Could not read from parallel port...... 12 3.2.4 Could not detect pod ...... 12 3.2.5 This project is incompatible with the Pod/Chip...... 12 3.2.6 Invalid memory reference ...... 12 3.2.7 The selected ICE port cannot be found...... 12 3.2.8 Could not configure ICE ...... 12 3.2.9 An ICE port is enumerating. Please try again...... 13 3.2.10 USB Hub Power Exceeded ...... 13 3.3 LPT Port Driver Error ...... 13 3.4 Specific Computer Errors...... 14 3.4.1 Gateway Solo 9500 ...... 14 3.4.2 Sony Vaio PCG-XG29 ...... 14

4. Accessing the Computer BIOS 15 4.1 Changing Parallel Port Mode ...... 15

5. Alternate Parallel Port Cards 17 5.1 Selecting an Alternate Parallel Port ...... 17

Revision History 19

ICE User Guide, Document # 38-12005 Rev. *D 3 Contents

4 ICE User Guide, Document # 38-12005 Rev. *D 1. Introduction

Use this guide to install and troubleshoot connection problems with the ICE Cube and ICE-4000 In- Circuit Emulator (ICE). Both PSoC ICE units provide significant debugging functionality that requires full two-way communication between the ICE and your computer to operate. There are several steps in the connection process, including both setting up the hardware and making the communications connection in the software. Making the software connection on your computer may require changes in the BIOS settings. PSoC Designer v. 4.1 or later supports the USB Adapter The USB Adapter allows the standard parallel port ICE-4000 to connect to a USB 1.1 or newer port as an alternative to the current parallel port method. Instructions for using the USB Adapter are included in this guide. PSoC Designer v. 4.2 supports the ICE Cube The ICE Cube provides enhanced debugging capability and supports USB 1.1 or newer. Instructions for connecting the ICE Cube to a computer are included in this guide.

1.1 Support Free technical support for PSoC Designer is available online at www.cypress.com. Resources include Training Seminars, Discussion Forums, Application Notes, PSoC Consultants, TightLink Technical Support Email/Knowledge Base, and Application Support Technicians. Technical Support may also be contacted by phone at 1-800-541-4736. Before using Cypress support services, know the version of PSoC Designer installed on your sys- tem. To determine the version, build, or service pack, click Help > About PSoC Designer.

1.1.1 Product Upgrades Cypress provides scheduled upgrades and version enhancements for PSoC software free of charge. You can order upgrades from your distributor on CD-ROM or download them directly from www.cypress.com under Software and Drivers. Critical updates to system documentation are also available on the Cypress web site.

ICE User Guide, Document # 38-12005 Rev. *D 5 Introduction

1.2 Conventions

The following table lists the document conventions used throughout this user guide.

Table 1-1. Documentation Conventions Convention Usage Displays file locations, user entered text, and source code: Courier New C:\ ...cd\icc\ Displays file names and reference documentation: Italics Read about the sourcefile.hex file in the PSoC Designer User Guide. Displays keyboard commands in procedures: [Bracketed, Bold] [Enter] or [Ctrl] [C] Represents menu paths: File > Open File > Open > New Project Displays commands, menu paths, and icon names in procedures: Bold Click the File icon and then click Open. Text in gray boxes Presents cautions or unique functionality of the product.

1.3 Acronyms The following acronyms are used throughout this user guide.

Table 1-2. Acronyms Acronym Description BIOS basic input output system. CAT5 category 5 cable ECP extended capabilities port EPP enhanced parallel port HAL hardware abstraction layer ICE in-circuit emulator IDE integrated development environment LPT line printer terminal (parallel port) OHCI open host connection interface UHCI universal host connection interface USB universal serial bus

6 ICE User Guide, Document # 38-12005 Rev. *D 2. Connecting to the ICE

Physically connecting the ICE Cube or ICE-4000 to a Windows compatible computer requires a few procedures and software configuration.

2.1 Software Requirements PSoC Designer 4.1 or later; or PSoC 1.22 or later, are required to use the ICE Cube or ICE-4000 development hardware. The most current version of either program is available for down- load on the Cypress web site at www.cypress.com or on CD-ROM from your distributor. Install the software prior to physically connecting the hardware to your computer. Refer to the installed software to determine system requirements.

2.2 Connecting the ICE Cube PSoC Designer v. 4.2 supports the ICE Cube. This new in-circuit emulator replaces the ICE-4000 and the USB Adapter for seamless USB connection, debugging, and programming.

Figure 2-1. The ICE Cube

The ICE Cube is required for CY8C29x66 support.

ICE User Guide, Document # 38-12005 Rev. *D 7 Connecting to the ICE

2.2.1 Connect Using a USB Port The ICE Cube connects to any computer using a standard USB 2.0 cable, included in Cypress development kits. Complete the following steps to connect the ICE Cube to your computer: 1. Install PSoC Designer v. 4.2 or later, and PSoC Programmer v. 1.22 or later on your computer. 2. Plug the USB cable into your computer and then attach the other end to the ICE Cube. The ICE Cube is a plug and play device and should be recognized automatically by any computer with PsoC Designer or PSoC Programmer installed. If USB connection problems occur, refer to Microsoft Windows Help for troubleshooting Windows connectivity issues.

2.3 Connecting the ICE-4000 The ICE-4000 is an earlier circuit emulator developed by Cypress prior to the ICE Cube. Connection information is included in this guide for reference purposes, but it is strongly recommended that the user upgrade to the ICE Cube for all development purposes .

Figure 2-2. The ICE-4000

2.3.1 Connect Using a Parallel Port Establishing a two-way parallel port connection to the ICE-4000 is required to take advantage of the significant debugging functionality available in the device. There are several steps in the connection process, including setting up the hardware and making the communications connection in the soft- ware. Configuring the parallel port connection on your computer may require changes to the BIOS settings. Some recent laptops do not support EPP and bi-directional modes in the BIOS needed for full two- way communication to the ICE-4000. A relatively easy method that bypasses the need for changing the BIOS settings is to install a parallel port card. This has the added benefit of providing a dedicated port to the ICE-4000, eliminating potential conflicts with other applications or printers. The Alternate Parallel Port Cards chapter on page 17 lists parallel port cards for both desktops and laptops that have been tested for compliance with the ICE. If you are using a parallel port and your PC’s main connection to its printer is through LPT1, you may need to temporarily re-route printing to an alternate port, the network, or a file. This is done through Control Panel > Printers.

8 ICE User Guide, Document # 38-12005 Rev. *D Connecting to the ICE

To physically connect your computer to the ICE-4000 through a parallel port complete the following steps: 1. With your computer off, attach the port interface cable to your computer, and then to the ICE- 4000. 2. Plug the AC Adapter into the ICE and then plug the adapter into an outlet. 3. Plug the CAT 5 cable into the ICE and then into the Pod. Proceed to 2.4 Configuring the Software, to continue installing the ICE-4000.

2.3.2 Using the USB Adapter to Connect to a USB Port PSoC Designer v. 4.1 and later supports the USB Adapter. The USB Adapter allows the standard parallel port ICE-4000 to connect to a USB 1.1 or later port. The adapter has a parallel cable connec- tor on one end and a USB "B" connector on the other. The ICE may be plugged directly into the adapter's connector or a parallel cable may be used. In order for the adapter to be recognized and configured automatically, it should be plugged in after installing PSoC Designer v. 4.1 or later. Once the adapter has been recognized, it will be available in the Project Settings dialog box under the Debugger tab. Using the USB Adapter, you can connect to the ICE and debug with the same functionality as with an LPTx parallel port connection.

The Open Host Controller Interface (OHCI) allows USB communication with the ICE to operate up to 30% faster than the Universal Host Controller Interface (UHCI). This improves download and debug- ging speed. To find out which interface you are using, look under the Universal Serial Bus Control- lers heading in Device Manager. You will see one of these three host controllers: Universal, Open, or Enhanced. Based on the port you are connected to, the USB Adapter will default to either Universal or Open. Typically, motherboards have UHCI. Most PCI USB hubs are OHCI. To physically connect your computer to the ICE, perform the following steps: 1. Plug the interface cable into the PC’s USB port and then into the ICE. 2. Plug the AC Adapter into the ICE and then plug the adapter into an outlet. 3. Plug the CAT5 cable into the ICE and then into the Pod.

For proper emulation, the reset line (XRES) on the ICE Pod must be able to control all circuits to which it is connected. This reset pin must be able to successfully transition from low to high, and back again, while sourcing a maximum of 5 mA of current in the high state. Failure to allow for the ICE Pod to control this line will result in unreliable debugging, and could potentially damage the hardware.

ICE User Guide, Document # 38-12005 Rev. *D 9 Connecting to the ICE

2.4 Configuring the Software Once the physical connection is made, you are ready to configure the internal connection from the computer to the ICE. The ICE enables communication and debugging between PSoC Designer and the Pod. To connect to the ICE from inside PSoC Designer, perform the following steps: ■ If you are using the ICE-4000, confirm that the Pod is connected to the ICE with the CAT5 Patch cable (less than 1 foot in length). ■ If you are using the ICE Cube confirm that the Flex-Pod is attached to the Ice Cube. 1. Confirm that the USB or parallel port connection is secure from the ICE to the PC. 2. Confirm that the ICE is powered from the power adapter. 3. Open a project. (Example projects are available.) 4. Click Tools > Options > Debugger. 5. Select the use default ICE connection for all projects. 6. Select the correct port from the drop-down window. 7. Click the Debugger icon to access the Debugger subsystem (using example project, Example_PWM_28-pin, from the ...\Examples directory of PSoC Designer). 8. Click Connect. Upon successful connection, you will receive notification in the Output tab of the Status window and a green indicator displaying Connected will appear in the lower-right corner of the program.

Note that the ICE-4000 works only at 3.3V or 5V.

10 ICE User Guide, Document # 38-12005 Rev. *D 3. Troubleshooting

Troubleshooting the ICE Cube or the ICE-4000 is provided for Windows and ICE error messages, and specific LPT Port Driver and computer errors. For additional support, refer to “Support” on page 5.

3.1 Windows Errors A common Microsoft Windows error message that may occur when installing an ICE Cube or ICE- 4000 is described below. For more information on solving specific Windows problems consult Microsoft.

3.1.1 Cannot install this hardware In Windows Me/2000/XP, if you plug in the USB Adapter before you install PSoC Designer you will be prompted by the Found New Hardware Wizard to install an unknown USB device. Exit the wizard, unplug the USB Adapter and then install PSoC Designer. After installing PSoC Designer, you may need to manually install the PSoC adapter drivers. You can do this via the Device Manager.

3.2 ICE Error Messages Use the table listed below each error message to determine how to solve the error.

3.2.1 Could not configure ICE

Problem Solution Change BIOS settings for parallel port to EPP and bi-directional. Incorrect BIOS settings See Accessing the Computer BIOS, on page 15. System needs to reboot System reboot may be required after installation. Verify that no printers or other devices are assigned to the paral- Conflicts with other software or hardware lel port used by the ICE. If a conflict is found, reassign the printer or device to a different port or to print to a file. Some computer BIOS may not support the required mode for bi- BIOS Issue directional communication with the ICE. Check with the computer manufacturer to see if a newer BIOS is available. Although all hardware is tested by Cypress before being shipped, it is possible to have a faulty parallel cable, CAT5 cable, or pod. Try swapping parallel cables or pods if possible. Swapping the Hardware Failure CAT5 cable is not advised. The ICE requires CAT5 cables 1 foot or less in length with all 8 wires connected. Some patch cables may contain only 4 wires.

ICE User Guide, Document # 38-12005 Rev. *D 11 Troubleshooting

3.2.2 Parallel port hardware read data errors

Problem Solution Change BIOS settings for parallel port to EPP and bi-directional. Incorrect BIOS Settings See Accessing the Computer BIOS, on page 15.

3.2.3 Could not read from parallel port

Problem Solution Pod is not connected to ICE. Connect the pod to the ICE. Cable connecting Pod to ICE is loose. Reconnect all cables and inspect connections for tightness. A device programming board is attached Verify setup. instead of a pod. The pod is defective. Replace the pod. Obtain all replacement parts from Cypress. Replace the cable. CAT5 cables must have 8 connectors The cable is defective. and be no more than 1 foot in length.

3.2.4 Could not detect pod

Problem Solution Change BIOS settings for parallel port to EPP and bi-directional. Incorrect BIOS Settings See Accessing the Computer BIOS, on page 15.

3.2.5 This project is incompatible with the Pod/Chip.

Problem Solution An obsolete pod is connected to the ICE. Upgrade to a current revision pod. The wrong project is selected for the pod. Verify that the project matches the pod type.

3.2.6 Invalid memory reference

Problem Solution Read Application Note AN2021 "What is an Invalid Memory Ref- The internal states of the ICE-base station erence" on www.cypress.com for a complete analysis of these and pod are corrupted. problems and their solutions.

3.2.7 The selected ICE port cannot be found.

Problem Solution The USB cable is detached from either the Plug the cable in and wait a few seconds, then press the Connect USB Adapter or the computer. ICE icon in the Debugger subsystem.

3.2.8 Could not configure ICE

Problem Solution Port setting incorrect. Configure port setting in software to correct port. Power disconnected. Check power cord connections. USB cable disconnected. Check USB cable connections.

12 ICE User Guide, Document # 38-12005 Rev. *D Troubleshooting

3.2.9 An ICE port is enumerating. Please try again.

Problem Solution Port is busy. Wait a few seconds and try the connection again.

3.2.10 USB Hub Power Exceeded

Problem Solution Attach to a direct power supply. Not enough power available for the device. Attach device closer to the primary USB port.

3.3 LPT Port Driver Error There is a problem with the PSoC Designer LPT port driver when logging off then on again using Windows XP. This problem is difficult to diagnose because of the interaction between the third-party LPT port driver used by PSoC Designer and the Hardware Abstraction Layer (HAL) drivers. The solution is to create a logon script to stop and restart the port driver when the user logs off and then back on the computer. 1. Click Start > Run. 2. In the Run dialog box, type mmc and then click OK to start the Microsoft Management Console. 3. Click File then select Add/Remove Snap-in... 4. In the Add/Remove Snap-in dialog box click Add to open the Add Standalone Snap-ins dialog box. 5. From the Snap-in list select Group Policy and click Add. 6. Verify that the Group Policy Wizard Group Policy Object is set to Local Computer, then click Fin- ish. 7. Close the Add Standalone Snap-in dialog box. 8. Click OK on the Add/Remove Snap-in dialog box. 9. Expand the Local Computer Policy tree in the left pane of the Console Root. 10. Expand User Configuration. 11. Expand Windows Settings. 12. Click Scripts (Logon/Logoff). 13. In the right hand pane, double click Logon. 14. Click Add in the Logon Properties dialog box. 15. Enter a script name such as C:\PD_DRVX.BAT and then click OK. 16. Click Apply then OK in the Logon Properties. 17. Close the Microsoft Management Console application. Choose to save the configuration. 18. Use Notepad to create a batch file in the location and with the name specified in step 15 contain- ing these two lines: net stop driverx net start driverx 19. Save and close the file using the complete filename specified in step 15. The filename suffix must be BAT.

ICE User Guide, Document # 38-12005 Rev. *D 13 Troubleshooting

3.4 Specific Computer Errors This section describes problems specific to certain makes and models of computers.

3.4.1 Gateway Solo 9500 There can be issues connecting the ICE to a Gateway Solo 9500. This problem can be solved if you upgrade the Gateway Solo 9500 BIOS, as described on the gateway web page at www.gateway.com. Download 7510769.exe from the Gateway web site and then follow the included instructions to update the BIOS.

3.4.2 Sony Vaio PCG-XG29 The Sony Vaio® PCG-XG29 shipped without a method to alter the parallel port from ECP to EPP in the BIOS. The parallel port on this class of notebooks must be altered to work with the Cypress ICE- 4000. The following is a free third-party software tool from Micro-Solutions that can change your parallel port from ECP to EPP mode. At www.micro-solutions.com, click Downloads to access testport.exe. 1. Save in C:\windows. 2. To use: Go to full-screen DOS Prompt. 3. Type micro-testport -epp and then press [Enter]. 4. Type exit and then press [Enter] to go back to Windows. 5. The parallel port should now be operational. For more information about the tool, you can also type "micro-testport /?" and hit [Enter] to change back to ECP, uni-directional, or bi-directional modes. Please note that we do not support this utility and are not responsible for failures.

This utility program only works on Windows 98 or Windows Me.

14 ICE User Guide, Document # 38-12005 Rev. *D 4. Accessing the Computer BIOS

Methods for accessing computer BIOS setup utilities vary depending on the BIOS and computer manufacturer. Table 4-1 lists most common BIOS providers and the typical hotkey commands used to access their BIOS utilities. Contact the computer manufacturer for information on accessing the BIOS of a specific computer.

Table 4-1. BIOS Hotkey Commands BIOS Manufacturer Key Command(s) ALR Advanced Logic Research, Inc. ® PC / PCI [F2] ALR PC non / PCI [Ctrl+Alt+Esc] AMD () BIOS [F1] AMI (American Megatrends, Inc.) BIOS [Delete] Award BIOS [Delete] DTK (Datatech Enterprises Co.) BIOS [Esc] Phoenix BIOS [Ctrl+Alt+Esc] Phoenix BIOS [Ctrl+Alt+S] Phoenix BIOS [Ctrl+Alt+Insert]

4.1 Changing Parallel Port Mode To change parallel port mode, complete the following steps: 1. Locate the parallel port mode setting in your computer BIOS or system configuration setup. The parallel port mode settings may be located in the Advanced Settings section, , Com- munication, or Input/Output sections. 2. Parallel port modes set to Normal or Uni-directional will not work. Change the setting to a differ- ent mode. 3. Exit the BIOS making sure you save the changes. Compaq computers with Compaq BIOS will not allow you to change the parallel port settings. You must disable the DMA channel, which will cause the parallel port to change to EPP mode. To do this, turn off the DMA channel assigned to the port and use the same hardware configuration that the cur- rent port is assigned. This will change the mode from ECP to EPP. For example; Change 0378-037F, IRQ 7 DMA2 to 0378-037F, IRQ7. On some older Compaq computers it may not be possible to assign the parallel port settings without a DMA setting. If this is the case, contact Compaq for a pos- sible BIOS upgrade.

Track all changes made to the BIOS. Incorrect BIOS settings will prevent a PC from working.

ICE User Guide, Document # 38-12005 Rev. *D 15 Accessing the Computer BIOS

16 ICE User Guide, Document # 38-12005 Rev. *D 5. Alternate Parallel Port Cards

In the event that you cannot get your existing parallel port to work with the Cypress PSoC ICE-4000, you should add a parallel port card that is known to be compatible with the ICE-4000. Cypress has tested the parallel port cards in Table 5-1 with systems that have not connected using their existing parallel port. One of these solutions is compatible with PCI bus-based PCs and the second uses the PCMCIA port available on many portable computers.

Table 5-1. Alternate Parallel Port Cards PC Type Port Parallel Port Option ® Desktop PCI SIIG, Inc. Cyberparallel PCI Model IO1839, Part# JJ-P00112 www.siig.com Quatech SPP-100 EPP Parallel PCMCIA Card. Notebook PCMCIA www.quatech.com/catalog/parallel_pcmcia.php

Follow the manufacturer instructions to install and configure these parallel ports. These cards include drivers that support Windows 98, 98SE, Me, NT, 2000, and XP.

5.1 Selecting an Alternate Parallel Port If the new parallel port card is installed as LPT2, PSoC Designer must be configured to use LPT2. To select an alternate parallel port: 1. Click Project > Settings. 2. Inside the dialog box, select Debugger. 3. Click the drop-down menu box, select LPT2, and then click OK. 4. Verify the connection by clicking the Connect icon. If the ICE-4000 still does not connect, make sure it is connected to the correct parallel port. Also, ver- ify that the parallel port is installed correctly according to the manufacturer’s instructions. The PC may need to be restarted after installing the new parallel port. If the PC is restarted, verify that the correct parallel port is still selected when re-entering PSoC Designer.

ICE User Guide, Document # 38-12005 Rev. *D 17 Alternate Parallel Port Cards

18 ICE User Guide, Document # 38-12005 Rev. *D Revision History

Document Revision History

Document Title: PSoC ICE User Guide Document #r: 38-12005 Origin of Revision ECN # Issue Date Description of Change Change ** 115171 04/23/2002 HMT New document to Cypress Document Control. Revision 2.10 for Cypress MicroSystems customers. *A See ECN HMT Update address and URLs. *B See ECN HMT Updates and new screen shots. *C See ECN HMT Updates for PSoC Designer 4.2, including name change. *D See ECN 08/15/2005 SFV Updates for PSoC Designer 4.2, including name change. This guide encompasses the old PSoC ICE Connection and Troubleshooting Guide and the old PSoC ICE USB Adapter guide.

ICE User Guide, Document # 38-12005 Rev. *D 19 20 ICE User Guide, Document # 38-12005 Rev. *D