ARM Technical Support Knowledge Articles

WATCH THE IO-PORTS OF CYPRESS USB CONTROLLER

Applies to: uVision IDE

Answer


Information in this article applies to:


QUESTION

I am using µVision for debugging a project with a Cypress USB device (EZ-USB, FX, FX2). However, the µVision peripheral dialogs contain only standard 8051 peripherals and do not show the memory mapped I/O ports of the Cypress USB devices. Is there a way to display the I/O port values?

ANSWER

Yes, you may use Watch Window of µVision which opens with the menu command View -> Watch & Call Stack Window. Now enter the I/O variables. When you are using the Cypress header file (i.e. EZRegs.h), then you can enter the I/O variables as described in the Cypress documentation (for example OUTB or PINA).

You may also replace the I/O port definitions PORTxCFG, OUTx and PINSx in this register definition file. For example, in EZRegs.h just add a struct that contains all these registers as shown below:

struct IOports  {
unsigned char PORTACFG;
unsigned char PORTBCFG;
unsigned char PORTCCFG;
unsigned char OUTA;
unsigned char OUTB;
unsigned char OUTC;
unsigned char PINSA;
unsigned char PINSB;
unsigned char PINSC;
};

EXTERN volatile struct IOports xdata IOports _at_ 0x7F93; // define Cypress I/O ports

Now you can add this single struct to the µVision Watch Window which allows you to review all port values while debugging.

MORE INFORMATION

Article last edited on: 2005-08-03 09:55:46

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential