Anonymous
Not applicable
Sep 16, 2009
06:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 16, 2009
06:09 AM
Hi,
I have a problem with a CyStream based device that uses GPIF for a long time. The problem is as follows:
We use an FX2 as a streaming device connected to either an ADC or an FPGA.
With the standard CyStream example code, no GPIF is used, however we use GPIF to interface to the ADC/FPGA.
Becasue it is a streaming device data is continuously aquired without any 8051 code in the data-loop.
The GPIF is a effectively just a simple Data-active cycle which is looped continuously and is aborted with GPIFABORT.
The streaming works perfectly until I set GPIFABORT to 0xff and try to restart the
waveform.
Below you can find Td_Init and the code to start and stop the stransfer (not TD_Poll isn't doing anything).
I hope someone can help with this problem. If any new info is required please let me know.
Best regards,
Peter
void TD_Init(void) // Called once at startup
{
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
REVCTL = 0x03;
SYNCDELAY;
EP1OUTCFG = 0xA0;
SYNCDELAY;
EP1INCFG = 0xA0;
SYNCDELAY;
EP2CFG = 0xA0;
SYNCDELAY;
EP4CFG = 0xA0;
SYNCDELAY;
EP6CFG = 0xE0;
SYNCDELAY;
EP8CFG = 0x00;
SYNCDELAY;
// Reset ALL fifo's
FIFORESET = 0x80;
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x04;
SYNCDELAY;
FIFORESET = 0x06;
SYNCDELAY;
FIFORESET = 0x08;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
EP2FIFOCFG = 0x00;
SYNCDELAY;
EP4FIFOCFG = 0x00;
SYNCDELAY;
EP6FIFOCFG = 0x0C;
SYNCDELAY;
EP8FIFOCFG = 0x00;
SYNCDELAY;
TOGCTL = 0x16; // EP6 IN
TOGCTL = 0x36; // EP6 IN Reset
AUTOPTRSETUP |= 0x01;
Rwuen = TRUE;
GpifInit();
IFCONFIG &= ~(0x60);
}
StartTransfer()
{
GPIFABORT = 0xFF;
while( !( GPIFTRIG & 0x80 ) )
{
;
}
EP6FIFOCFG = 0x00;
SYNCDELAY;
EP6FIFOCFG = 0x0C;
SYNCDELAY;
EP6GPIFFLGSEL = 0x02;
SYNCDELAY;
GPIFTRIG = GPIFTRIGRD | GPIF_EP6;
SYNCDELAY;
GPIFREADYCFG |= 0x80; // This will start the GPIF
SYNCDELAY;
}
EndTransfer()
{
GPIFABORT = 0xFF;
while( !( GPIFTRIG & 0x80 ) )
{
;
}
}
I have a problem with a CyStream based device that uses GPIF for a long time. The problem is as follows:
We use an FX2 as a streaming device connected to either an ADC or an FPGA.
With the standard CyStream example code, no GPIF is used, however we use GPIF to interface to the ADC/FPGA.
Becasue it is a streaming device data is continuously aquired without any 8051 code in the data-loop.
The GPIF is a effectively just a simple Data-active cycle which is looped continuously and is aborted with GPIFABORT.
The streaming works perfectly until I set GPIFABORT to 0xff and try to restart the
waveform.
Below you can find Td_Init and the code to start and stop the stransfer (not TD_Poll isn't doing anything).
I hope someone can help with this problem. If any new info is required please let me know.
Best regards,
Peter
void TD_Init(void) // Called once at startup
{
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
REVCTL = 0x03;
SYNCDELAY;
EP1OUTCFG = 0xA0;
SYNCDELAY;
EP1INCFG = 0xA0;
SYNCDELAY;
EP2CFG = 0xA0;
SYNCDELAY;
EP4CFG = 0xA0;
SYNCDELAY;
EP6CFG = 0xE0;
SYNCDELAY;
EP8CFG = 0x00;
SYNCDELAY;
// Reset ALL fifo's
FIFORESET = 0x80;
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x04;
SYNCDELAY;
FIFORESET = 0x06;
SYNCDELAY;
FIFORESET = 0x08;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
EP2FIFOCFG = 0x00;
SYNCDELAY;
EP4FIFOCFG = 0x00;
SYNCDELAY;
EP6FIFOCFG = 0x0C;
SYNCDELAY;
EP8FIFOCFG = 0x00;
SYNCDELAY;
TOGCTL = 0x16; // EP6 IN
TOGCTL = 0x36; // EP6 IN Reset
AUTOPTRSETUP |= 0x01;
Rwuen = TRUE;
GpifInit();
IFCONFIG &= ~(0x60);
}
StartTransfer()
{
GPIFABORT = 0xFF;
while( !( GPIFTRIG & 0x80 ) )
{
;
}
EP6FIFOCFG = 0x00;
SYNCDELAY;
EP6FIFOCFG = 0x0C;
SYNCDELAY;
EP6GPIFFLGSEL = 0x02;
SYNCDELAY;
GPIFTRIG = GPIFTRIGRD | GPIF_EP6;
SYNCDELAY;
GPIFREADYCFG |= 0x80; // This will start the GPIF
SYNCDELAY;
}
EndTransfer()
{
GPIFABORT = 0xFF;
while( !( GPIFTRIG & 0x80 ) )
{
;
}
}
1 Reply
Anonymous
Not applicable
Jul 24, 2014
12:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 24, 2014
12:27 AM
Hi
Please provide the timing waveform and the *.gpf file.
Regards,
Vikas.