Hey there, I'm using the FX2 on a Spartan-3 devel board. I'm going through the GPIF Primer, but I'm running into a problem in uVision2. The code that is being generated by the GPIF Designer (gpif.c) contains the following segment: // use dual autopointer feature... AUTOPTRSETUP = 0x07; // inc both pointers, // ...warning: this introduces pdata hole(s) // ...at E67B (XAUTODAT1) and E67C (XAUTODAT2) // source AUTOPTRH1 = MSB( &WaveData ); AUTOPTRL1 = LSB( &WaveData ); // destination AUTOPTRH2 = 0xE4; AUTOPTRL2 = 0x00; // transfer for ( i = 0x00; i < 128; i++ ) { EXTAUTODAT2 = EXTAUTODAT1; } The problem is that when this attempts to compile, I get the following errors: compiling gpif.c... GPIF.C(251): error C202: 'AUTOPTRH1': undefined identifier GPIF.C(252): error C202: 'AUTOPTRL1': undefined identifier Google's got nothing useful to say abuot this that I can find, and neither have I have been able to find anything on these forums so far. I seem to get this issue everywhere I turn (both in my own project, and in the example code), and can't seem to fix it. Any help? This is really driving me up the wall. Thanks
I must have a later version than you. In fact it's the LP version. The header file is called lpregs.h and contains the following:
#define AUTOPTR1H AUTOPTRH1 // for backwards compatibility with examples #define AUTOPTR1L AUTOPTRL1 // for backwards compatibility with examples #define APTR1H AUTOPTRH1 // for backwards compatibility with examples #define APTR1L AUTOPTRL1 // for backwards compatibility with examples // this is how they are defined in the TRM sfr AUTOPTRH1 = 0x9A; sfr AUTOPTRL1 = 0x9B; sfr AUTOPTRH2 = 0x9D; sfr AUTOPTRL2 = 0x9E;
Where did you find a newer version? I'm working entirely with stuff strait from the Cypress website. I've downloaded everything in the last three or four days.
It came with the development kit (can't remember the code as I'm at home). It's the FX2LP kit, and it's on the CD that comes with it. I believe it's supposed to be backward compatible with FX2 and FX1. The 'LP' version main difference is just that (low power) - I believe about a third of the current compared to the FX2 IIRC.