USB low-full-high speed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
Sort by:
USB low-full-high speed peripherals
Sorry for the newbie question, but I am new to the PSoC devices. I need to talk to a single SPI device from a PC (both Windows and Linux). ...
Show More
Sorry for the newbie question, but I am new to the PSoC devices.
I need to talk to a single SPI device from a PC (both Windows and Linux). One solution I had in mind is an off-the-shelf USB to SPI chip that looks like a virtual COM port on the PC. Is this possible with PSoC? How easy is it to do?
Thanks,
Matt Show Less
I need to talk to a single SPI device from a PC (both Windows and Linux). One solution I had in mind is an off-the-shelf USB to SPI chip that looks like a virtual COM port on the PC. Is this possible with PSoC? How easy is it to do?
Thanks,
Matt Show Less
USB low-full-high speed peripherals
Hi All. I have transfer problem in Slave fifo with my FPGA. This following thing is my verilog code. My intention is always d...
Show More
Hi All.
I have transfer problem in Slave fifo with my FPGA.
This following thing is my verilog code.
My intention is always data out from in my FPGA. (For test)
`timescale 1ns/10ps
module usb(
input clk48m,
input i_Rstb,
///////////////////////////////
output o_ifclk, ////
output [1:0] o_fifoadr, ////
input i_flagc, ////
input i_flagb, ////
output o_sloe, ////
//output o_slrd, ////
output [15:0] o_fd, ////
output o_slcs,
output o_slwr,
output o_pktend
);
wire [1:0] o_fifoadr;
reg o_sloe;
//reg o_slrd;
wire clk48m;
assign o_ifclk = clk48m;
assign o_fifoadr= 2'b11;
assign o_slcs = 1'b0;
assign o_pktend = 1'b1;
//assign o_slwr = 1'b1;
//assign o_slrd = w_slrd;
reg [8:0] fd;
reg o_slwr;
reg [15:0] o_fd;
wire w_Rst = ~i_Rstb; ////////////////
always @(negedge i_Rstb or posedge clk48m)
begin
if(!i_Rstb)begin
o_sloe <= 1;
o_slwr <= 0;
fd <= 0;
o_fd <= 0;
end
else begin
o_sloe <= 1;
o_slwr <= 0;
fd <= fd + 1;
o_fd <= fd;
end
end
============================================
Is this any have wrong operation problems in AUTO IN?
And, i use this firmware /USB/Examples/FX2LP/bulkloop/bulkloop.c
//-----------------------------------------------------------------------------
// File: bulkloop.c
// Contents: Hooks required to implement USB peripheral function.
//
// $Archive: /USB/Examples/FX2LP/bulkloop/bulkloop.c $
// $Date: 3/23/05 2:55p $
// $Revision: 4 $
//
//
//-----------------------------------------------------------------------------
// Copyright 2003, Cypress Semiconductor Corporation
//-----------------------------------------------------------------------------
#pragma NOIV // Do not generate interrupt vectors
#include "fx2.h"
#include "fx2regs.h"
#include "syncdly.h" // SYNCDELAY macro
extern BOOL GotSUD; // Received setup data flag
extern BOOL Sleep;
extern BOOL Rwuen;
extern BOOL Selfpwr;
BYTE Configuration; // Current configuration
BYTE AlternateSetting; // Alternate settings
#define VR_NAKALL_ON 0xD0
#define VR_NAKALL_OFF 0xD1
//-----------------------------------------------------------------------------
// Task Dispatcher hooks
// The following hooks are called by the task dispatcher.
//-----------------------------------------------------------------------------
void TD_Init(void) // Called once at startup
{
/*
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1); SYNCDELAY; // set the CPU clock to 48MHz
SYNCDELAY;
IFCONFIG = 0x03; // use IFCLK pin driven by external logic (5MHz to 48MHz)
// use slave FIFO interface pins driven sync by external master
SYNCDELAY;
REVCTL = 0x03; // REVCTL.0 and REVCTL.1 to set to 1
SYNCDELAY;
EP2CFG = 0xA2; // EP2 is DIR=OUT, TYPE=BULK, SIZE=512, BUF=2x
SYNCDELAY;
FIFORESET = 0x80; // Reset the FIFO
SYNCDELAY;
FIFORESET = 0x82;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
OUTPKTEND = 0x82; // Arm both EP2 buffers to "prime the pump"
SYNCDELAY;
OUTPKTEND = 0x82;
SYNCDELAY;
EP2FIFOCFG = 0x10; // EP2 is AUTOOUT=1, AUTOIN=0, ZEROLEN=0, WORDWIDE=0
*/
IFCONFIG = 0x03; // use IFCLK pin driven by external logic (5MHz to 48MHz)
// use slave FIFO interface pins driven sync by external master
SYNCDELAY;
REVCTL = 0x03; // REVCTL.0 and REVCTL.1 set to 1
SYNCDELAY;
EP8CFG = 0xE0; // sets EP8 valid for IN's
// and defines the endpoint for 512 byte packets, 2x buffered
SYNCDELAY;
FIFORESET = 0x80; // reset all FIFOs
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x04;
SYNCDELAY;
FIFORESET = 0x06;
SYNCDELAY;
FIFORESET = 0x08;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY; // this defines the external interface to be the following:
EP8FIFOCFG = 0x0C; // this lets the EZ-USB auto commit IN packets, gives the
// ability to send zero length packets,
// and sets the slave FIFO data interface to 8-bits
PINFLAGSAB = 0x00; // defines FLAGA as prog-level flag, pointed to by FIFOADR[1:0]
SYNCDELAY; // FLAGB as full flag, as pointed to by FIFOADR[1:0]
PINFLAGSCD = 0x00; // FLAGC as empty flag, as pointed to by FIFOADR[1:0]
// won't generally need FLAGD
PORTACFG = 0x00; // used PA7/FLAGD as a port pin, not as a FIFO flag
SYNCDELAY;
FIFOPINPOLAR = 0x00; // set all slave FIFO interface pins as active low
SYNCDELAY;
EP8AUTOINLENH = 0x02; // EZ-USB automatically commits data in 512-byte chunks
SYNCDELAY;
EP8AUTOINLENL = 0x00;
SYNCDELAY;
EP8FIFOPFH = 0x80; // you can define the programmable flag (FLAGA)
SYNCDELAY; // to be active at the level you wish
EP8FIFOPFL = 0x00;
}
void TD_Poll(void) // Called repeatedly while the device is idle
{
}
BOOL TD_Suspend(void) // Called before the device goes into suspend mode
{
return(TRUE);
}
BOOL TD_Resume(void) // Called after the device resumes
{
return(TRUE);
}
//-----------------------------------------------------------------------------
// Device Request hooks
// The following hooks are called by the end point 0 device request parser.
//-----------------------------------------------------------------------------
BOOL DR_GetDescriptor(void)
{
return(TRUE);
}
BOOL DR_SetConfiguration(void) // Called when a Set Configuration command is received
{
Configuration = SETUPDAT[2];
return(TRUE); // Handled by user code
}
BOOL DR_GetConfiguration(void) // Called when a Get Configuration command is received
{
EP0BUF[0] = Configuration;
EP0BCH = 0;
EP0BCL = 1;
return(TRUE); // Handled by user code
}
BOOL DR_SetInterface(void) // Called when a Set Interface command is received
{
AlternateSetting = SETUPDAT[2];
return(TRUE); // Handled by user code
}
BOOL DR_GetInterface(void) // Called when a Set Interface command is received
{
EP0BUF[0] = AlternateSetting;
EP0BCH = 0;
EP0BCL = 1;
return(TRUE); // Handled by user code
}
BOOL DR_GetStatus(void)
{
return(TRUE);
}
BOOL DR_ClearFeature(void)
{
return(TRUE);
}
BOOL DR_SetFeature(void)
{
return(TRUE);
}
BOOL DR_VendorCmnd(void)
{
/*
BYTE tmp;
switch (SETUPDAT[1])
{
case VR_NAKALL_ON:
tmp = FIFORESET;
tmp |= bmNAKALL;
SYNCDELAY;
FIFORESET = tmp;
break;
case VR_NAKALL_OFF:
tmp = FIFORESET;
tmp &= ~bmNAKALL;
SYNCDELAY;
FIFORESET = tmp;
break;
default:
return(TRUE);
}
*/
return(FALSE);
}
//-----------------------------------------------------------------------------
// USB Interrupt Handlers
// The following functions are called by the USB interrupt jump table.
//-----------------------------------------------------------------------------
// Setup Data Available Interrupt Handler
void ISR_Sudav(void) interrupt 0
{
GotSUD = TRUE; // Set flag
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUDAV; // Clear SUDAV IRQ
}
// Setup Token Interrupt Handler
void ISR_Sutok(void) interrupt 0
{
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUTOK; // Clear SUTOK IRQ
}
void ISR_Sof(void) interrupt 0
{
EZUSB_IRQ_CLEAR();
USBIRQ = bmSOF; // Clear SOF IRQ
}
void ISR_Ures(void) interrupt 0
{
// whenever we get a USB reset, we should revert to full speed mode
pConfigDscr = pFullSpeedConfigDscr;
((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
pOtherConfigDscr = pHighSpeedConfigDscr;
((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
EZUSB_IRQ_CLEAR();
USBIRQ = bmURES; // Clear URES IRQ
}
void ISR_Susp(void) interrupt 0
{
Sleep = TRUE;
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUSP;
}
void ISR_Highspeed(void) interrupt 0
{
if (EZUSB_HIGHSPEED())
{
pConfigDscr = pHighSpeedConfigDscr;
((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
pOtherConfigDscr = pFullSpeedConfigDscr;
((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
}
EZUSB_IRQ_CLEAR();
USBIRQ = bmHSGRANT;
}
void ISR_Ep0ack(void) interrupt 0
{
}
void ISR_Stub(void) interrupt 0
{
}
void ISR_Ep0in(void) interrupt 0
{
}
void ISR_Ep0out(void) interrupt 0
{
}
void ISR_Ep1in(void) interrupt 0
{
}
void ISR_Ep1out(void) interrupt 0
{
}
void ISR_Ep2inout(void) interrupt 0
{
}
void ISR_Ep4inout(void) interrupt 0
{
}
void ISR_Ep6inout(void) interrupt 0
{
}
void ISR_Ep8inout(void) interrupt 0
{
}
void ISR_Ibn(void) interrupt 0
{
}
void ISR_Ep0pingnak(void) interrupt 0
{
}
void ISR_Ep1pingnak(void) interrupt 0
{
}
void ISR_Ep2pingnak(void) interrupt 0
{
}
void ISR_Ep4pingnak(void) interrupt 0
{
}
void ISR_Ep6pingnak(void) interrupt 0
{
}
void ISR_Ep8pingnak(void) interrupt 0
{
}
void ISR_Errorlimit(void) interrupt 0
{
}
void ISR_Ep2piderror(void) interrupt 0
{
}
void ISR_Ep4piderror(void) interrupt 0
{
}
void ISR_Ep6piderror(void) interrupt 0
{
}
void ISR_Ep8piderror(void) interrupt 0
{
}
void ISR_Ep2pflag(void) interrupt 0
{
}
void ISR_Ep4pflag(void) interrupt 0
{
}
void ISR_Ep6pflag(void) interrupt 0
{
}
void ISR_Ep8pflag(void) interrupt 0
{
}
void ISR_Ep2eflag(void) interrupt 0
{
}
void ISR_Ep4eflag(void) interrupt 0
{
}
void ISR_Ep6eflag(void) interrupt 0
{
}
void ISR_Ep8eflag(void) interrupt 0
{
}
void ISR_Ep2fflag(void) interrupt 0
{
}
void ISR_Ep4fflag(void) interrupt 0
{
}
void ISR_Ep6fflag(void) interrupt 0
{
}
void ISR_Ep8fflag(void) interrupt 0
{
}
void ISR_GpifComplete(void) interrupt 0
{
}
void ISR_GpifWaveform(void) interrupt 0
{
}
///////////////////////////////////////////////////////////////
Also, i have used https://secure.cypress.com/forums/forum/messageview.cfm?catid=8&threadid=3543&highlight_key=y&keyword1=slave%20fifo
But, it is not work.
===================================
Is this have any wrong problems?
And, So i have used it following code.
C:\Cypress\USB\Util\CyBulk\BulkLoop.dsw
CCyUSBDevice *USBDevice = new CCyUSBDevice(NULL);
unsigned char buf[512];
LONG length = 512;
if (USBDevice->BulkInEndPt)
USBDevice->BulkInEndPt->XferData(buf, length);
But this is not work.
I cannot receive any data form FPGA.
what is this exactly wrong?
Could you please let me know?
Please Help me. please.
Thanks
Show Less
I have transfer problem in Slave fifo with my FPGA.
This following thing is my verilog code.
My intention is always data out from in my FPGA. (For test)
`timescale 1ns/10ps
module usb(
input clk48m,
input i_Rstb,
///////////////////////////////
output o_ifclk, ////
output [1:0] o_fifoadr, ////
input i_flagc, ////
input i_flagb, ////
output o_sloe, ////
//output o_slrd, ////
output [15:0] o_fd, ////
output o_slcs,
output o_slwr,
output o_pktend
);
wire [1:0] o_fifoadr;
reg o_sloe;
//reg o_slrd;
wire clk48m;
assign o_ifclk = clk48m;
assign o_fifoadr= 2'b11;
assign o_slcs = 1'b0;
assign o_pktend = 1'b1;
//assign o_slwr = 1'b1;
//assign o_slrd = w_slrd;
reg [8:0] fd;
reg o_slwr;
reg [15:0] o_fd;
wire w_Rst = ~i_Rstb; ////////////////
always @(negedge i_Rstb or posedge clk48m)
begin
if(!i_Rstb)begin
o_sloe <= 1;
o_slwr <= 0;
fd <= 0;
o_fd <= 0;
end
else begin
o_sloe <= 1;
o_slwr <= 0;
fd <= fd + 1;
o_fd <= fd;
end
end
============================================
Is this any have wrong operation problems in AUTO IN?
And, i use this firmware /USB/Examples/FX2LP/bulkloop/bulkloop.c
//-----------------------------------------------------------------------------
// File: bulkloop.c
// Contents: Hooks required to implement USB peripheral function.
//
// $Archive: /USB/Examples/FX2LP/bulkloop/bulkloop.c $
// $Date: 3/23/05 2:55p $
// $Revision: 4 $
//
//
//-----------------------------------------------------------------------------
// Copyright 2003, Cypress Semiconductor Corporation
//-----------------------------------------------------------------------------
#pragma NOIV // Do not generate interrupt vectors
#include "fx2.h"
#include "fx2regs.h"
#include "syncdly.h" // SYNCDELAY macro
extern BOOL GotSUD; // Received setup data flag
extern BOOL Sleep;
extern BOOL Rwuen;
extern BOOL Selfpwr;
BYTE Configuration; // Current configuration
BYTE AlternateSetting; // Alternate settings
#define VR_NAKALL_ON 0xD0
#define VR_NAKALL_OFF 0xD1
//-----------------------------------------------------------------------------
// Task Dispatcher hooks
// The following hooks are called by the task dispatcher.
//-----------------------------------------------------------------------------
void TD_Init(void) // Called once at startup
{
/*
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1); SYNCDELAY; // set the CPU clock to 48MHz
SYNCDELAY;
IFCONFIG = 0x03; // use IFCLK pin driven by external logic (5MHz to 48MHz)
// use slave FIFO interface pins driven sync by external master
SYNCDELAY;
REVCTL = 0x03; // REVCTL.0 and REVCTL.1 to set to 1
SYNCDELAY;
EP2CFG = 0xA2; // EP2 is DIR=OUT, TYPE=BULK, SIZE=512, BUF=2x
SYNCDELAY;
FIFORESET = 0x80; // Reset the FIFO
SYNCDELAY;
FIFORESET = 0x82;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
OUTPKTEND = 0x82; // Arm both EP2 buffers to "prime the pump"
SYNCDELAY;
OUTPKTEND = 0x82;
SYNCDELAY;
EP2FIFOCFG = 0x10; // EP2 is AUTOOUT=1, AUTOIN=0, ZEROLEN=0, WORDWIDE=0
*/
IFCONFIG = 0x03; // use IFCLK pin driven by external logic (5MHz to 48MHz)
// use slave FIFO interface pins driven sync by external master
SYNCDELAY;
REVCTL = 0x03; // REVCTL.0 and REVCTL.1 set to 1
SYNCDELAY;
EP8CFG = 0xE0; // sets EP8 valid for IN's
// and defines the endpoint for 512 byte packets, 2x buffered
SYNCDELAY;
FIFORESET = 0x80; // reset all FIFOs
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x04;
SYNCDELAY;
FIFORESET = 0x06;
SYNCDELAY;
FIFORESET = 0x08;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY; // this defines the external interface to be the following:
EP8FIFOCFG = 0x0C; // this lets the EZ-USB auto commit IN packets, gives the
// ability to send zero length packets,
// and sets the slave FIFO data interface to 8-bits
PINFLAGSAB = 0x00; // defines FLAGA as prog-level flag, pointed to by FIFOADR[1:0]
SYNCDELAY; // FLAGB as full flag, as pointed to by FIFOADR[1:0]
PINFLAGSCD = 0x00; // FLAGC as empty flag, as pointed to by FIFOADR[1:0]
// won't generally need FLAGD
PORTACFG = 0x00; // used PA7/FLAGD as a port pin, not as a FIFO flag
SYNCDELAY;
FIFOPINPOLAR = 0x00; // set all slave FIFO interface pins as active low
SYNCDELAY;
EP8AUTOINLENH = 0x02; // EZ-USB automatically commits data in 512-byte chunks
SYNCDELAY;
EP8AUTOINLENL = 0x00;
SYNCDELAY;
EP8FIFOPFH = 0x80; // you can define the programmable flag (FLAGA)
SYNCDELAY; // to be active at the level you wish
EP8FIFOPFL = 0x00;
}
void TD_Poll(void) // Called repeatedly while the device is idle
{
}
BOOL TD_Suspend(void) // Called before the device goes into suspend mode
{
return(TRUE);
}
BOOL TD_Resume(void) // Called after the device resumes
{
return(TRUE);
}
//-----------------------------------------------------------------------------
// Device Request hooks
// The following hooks are called by the end point 0 device request parser.
//-----------------------------------------------------------------------------
BOOL DR_GetDescriptor(void)
{
return(TRUE);
}
BOOL DR_SetConfiguration(void) // Called when a Set Configuration command is received
{
Configuration = SETUPDAT[2];
return(TRUE); // Handled by user code
}
BOOL DR_GetConfiguration(void) // Called when a Get Configuration command is received
{
EP0BUF[0] = Configuration;
EP0BCH = 0;
EP0BCL = 1;
return(TRUE); // Handled by user code
}
BOOL DR_SetInterface(void) // Called when a Set Interface command is received
{
AlternateSetting = SETUPDAT[2];
return(TRUE); // Handled by user code
}
BOOL DR_GetInterface(void) // Called when a Set Interface command is received
{
EP0BUF[0] = AlternateSetting;
EP0BCH = 0;
EP0BCL = 1;
return(TRUE); // Handled by user code
}
BOOL DR_GetStatus(void)
{
return(TRUE);
}
BOOL DR_ClearFeature(void)
{
return(TRUE);
}
BOOL DR_SetFeature(void)
{
return(TRUE);
}
BOOL DR_VendorCmnd(void)
{
/*
BYTE tmp;
switch (SETUPDAT[1])
{
case VR_NAKALL_ON:
tmp = FIFORESET;
tmp |= bmNAKALL;
SYNCDELAY;
FIFORESET = tmp;
break;
case VR_NAKALL_OFF:
tmp = FIFORESET;
tmp &= ~bmNAKALL;
SYNCDELAY;
FIFORESET = tmp;
break;
default:
return(TRUE);
}
*/
return(FALSE);
}
//-----------------------------------------------------------------------------
// USB Interrupt Handlers
// The following functions are called by the USB interrupt jump table.
//-----------------------------------------------------------------------------
// Setup Data Available Interrupt Handler
void ISR_Sudav(void) interrupt 0
{
GotSUD = TRUE; // Set flag
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUDAV; // Clear SUDAV IRQ
}
// Setup Token Interrupt Handler
void ISR_Sutok(void) interrupt 0
{
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUTOK; // Clear SUTOK IRQ
}
void ISR_Sof(void) interrupt 0
{
EZUSB_IRQ_CLEAR();
USBIRQ = bmSOF; // Clear SOF IRQ
}
void ISR_Ures(void) interrupt 0
{
// whenever we get a USB reset, we should revert to full speed mode
pConfigDscr = pFullSpeedConfigDscr;
((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
pOtherConfigDscr = pHighSpeedConfigDscr;
((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
EZUSB_IRQ_CLEAR();
USBIRQ = bmURES; // Clear URES IRQ
}
void ISR_Susp(void) interrupt 0
{
Sleep = TRUE;
EZUSB_IRQ_CLEAR();
USBIRQ = bmSUSP;
}
void ISR_Highspeed(void) interrupt 0
{
if (EZUSB_HIGHSPEED())
{
pConfigDscr = pHighSpeedConfigDscr;
((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
pOtherConfigDscr = pFullSpeedConfigDscr;
((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
}
EZUSB_IRQ_CLEAR();
USBIRQ = bmHSGRANT;
}
void ISR_Ep0ack(void) interrupt 0
{
}
void ISR_Stub(void) interrupt 0
{
}
void ISR_Ep0in(void) interrupt 0
{
}
void ISR_Ep0out(void) interrupt 0
{
}
void ISR_Ep1in(void) interrupt 0
{
}
void ISR_Ep1out(void) interrupt 0
{
}
void ISR_Ep2inout(void) interrupt 0
{
}
void ISR_Ep4inout(void) interrupt 0
{
}
void ISR_Ep6inout(void) interrupt 0
{
}
void ISR_Ep8inout(void) interrupt 0
{
}
void ISR_Ibn(void) interrupt 0
{
}
void ISR_Ep0pingnak(void) interrupt 0
{
}
void ISR_Ep1pingnak(void) interrupt 0
{
}
void ISR_Ep2pingnak(void) interrupt 0
{
}
void ISR_Ep4pingnak(void) interrupt 0
{
}
void ISR_Ep6pingnak(void) interrupt 0
{
}
void ISR_Ep8pingnak(void) interrupt 0
{
}
void ISR_Errorlimit(void) interrupt 0
{
}
void ISR_Ep2piderror(void) interrupt 0
{
}
void ISR_Ep4piderror(void) interrupt 0
{
}
void ISR_Ep6piderror(void) interrupt 0
{
}
void ISR_Ep8piderror(void) interrupt 0
{
}
void ISR_Ep2pflag(void) interrupt 0
{
}
void ISR_Ep4pflag(void) interrupt 0
{
}
void ISR_Ep6pflag(void) interrupt 0
{
}
void ISR_Ep8pflag(void) interrupt 0
{
}
void ISR_Ep2eflag(void) interrupt 0
{
}
void ISR_Ep4eflag(void) interrupt 0
{
}
void ISR_Ep6eflag(void) interrupt 0
{
}
void ISR_Ep8eflag(void) interrupt 0
{
}
void ISR_Ep2fflag(void) interrupt 0
{
}
void ISR_Ep4fflag(void) interrupt 0
{
}
void ISR_Ep6fflag(void) interrupt 0
{
}
void ISR_Ep8fflag(void) interrupt 0
{
}
void ISR_GpifComplete(void) interrupt 0
{
}
void ISR_GpifWaveform(void) interrupt 0
{
}
///////////////////////////////////////////////////////////////
Also, i have used https://secure.cypress.com/forums/forum/messageview.cfm?catid=8&threadid=3543&highlight_key=y&keyword1=slave%20fifo
But, it is not work.
===================================
Is this have any wrong problems?
And, So i have used it following code.
C:\Cypress\USB\Util\CyBulk\BulkLoop.dsw
CCyUSBDevice *USBDevice = new CCyUSBDevice(NULL);
unsigned char buf[512];
LONG length = 512;
if (USBDevice->BulkInEndPt)
USBDevice->BulkInEndPt->XferData(buf, length);
But this is not work.
I cannot receive any data form FPGA.
what is this exactly wrong?
Could you please let me know?
Please Help me. please.
Thanks
Show Less
USB low-full-high speed peripherals
I am new to EZUSB. I have a FX2 chip, that I am trying to enumerate as a HID device. Before I start with the USB enumeration, can some one ...
Show More
I am new to EZUSB. I have a FX2 chip, that I am trying to enumerate as a HID device.
Before I start with the USB enumeration, can some one tell me what registers have to be initialized in the 8051?
I was thinking - IE0 (enable global interrupt), IP(not sure). I am not using any timers at the moment, so I don't have to initialize any timer registers.
Any USB registers need initializing?
Show Less
Before I start with the USB enumeration, can some one tell me what registers have to be initialized in the 8051?
I was thinking - IE0 (enable global interrupt), IP(not sure). I am not using any timers at the moment, so I don't have to initialize any timer registers.
Any USB registers need initializing?
Show Less
USB low-full-high speed peripherals
I'm trying to run the streamer demo. Unfortunately it doesn't work because of problems with the driver. I'm able to program the Cypress...
Show More
I'm trying to run the streamer demo. Unfortunately it doesn't work because of problems with the driver.
I'm able to program the Cypress firmware into the EEPROM. The device seems to be correctly identified as a Cy-Stream usb device but I'm unable to successfully install the CyStream.inf driver enclosed into the demo package. I always get Error 10 during the driver installation.
I tried to use the CyUSB driver instead (see the attached .inf). At this point the driver installation goes well but when I run (in debug) the Streamer application "int n = USBDevice->DeviceCount();" returns always 0. The GUID of the driver and the app. are the original Cypress GUID and are therefore correct.
Can anybody help me to come out from this situation?
Thanks, Job
.inf file
; Installation INF for the Cypress Generic USB Driver for Windows 98ME/2000/XP
;
[Version]
Signature="$CHICAGO$"
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
provider=%CYPRESS%
;---Uncomment and complete below to support WHQL submission---;
;CatalogFile=cyusb.cat
;DriverVer=mm/dd/yyyy,x.y.v.z
;-------------------------------------------------------------;
[SourceDisksNames]
1=%CYUSB_INSTALL%,,,
[SourceDisksFiles]
CyUsbME.sys = 1
CyUsb.sys = 1
;-----Uncomment below to support script file processing-----;
;CyUsb.spt = 1
;------------------------------------------------------------;
[Manufacturer]
%MfgName%=Cypress
[Cypress]
%VID_04B4&PID_1003.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1003
;[PreCopySection]
;HKR,,NoSetupUI,,1
[DestinationDirs]
CyUsbME.Files.Ext = 10,System32\Drivers
CyUsb.Files.Ext = 10,System32\Drivers
;-----Uncomment below to support script file processing-----;
;CyUsb.Files.Spt = 10,System32\CyUsb
;------------------------------------------------------------;
[CyUsb]
CopyFiles=CyUsbME.Files.Ext
;-----Uncomment below to support script file processing-----;
;CopyFiles=CyUsb.Files.Spt
;------------------------------------------------------------;
AddReg=CyUsbME.AddReg
[CyUsb.HW]
AddReg=CyUsb.AddReg.Guid
[CyUsb.NT]
CopyFiles=CyUsb.Files.Ext
;-----Uncomment below to support script file processing-----;
;CopyFiles=CyUsb.Files.Spt
;------------------------------------------------------------;
AddReg=CyUsb.AddReg
[CyUsb.NT.HW]
AddReg=CyUsb.AddReg.Guid
[CyUsb.NT.Services]
Addservice = CyUsb, 0x00000002, CyUsb.AddService
[CyUsb.AddService]
DisplayName = %CyUsb.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\CyUsb.sys
LoadOrderGroup = Base
[CyUsbME.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,CyUsbME.sys
[CyUsb.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,CyUsb.sys
[CyUsbME.Files.Ext]
CyUsbME.sys
[CyUsb.Files.Ext]
CyUsb.sys
;-----Uncomment below to support script file processing-----;
;[CyUsb.Files.Spt]
;CyUsb.spt
;------------------------------------------------------------;
[CyUsb.AddReg.Guid]
HKR,,DriverGUID,,%CyUsb.GUID%
;-----Uncomment below to support script file processing-----;
;HKR,,DriverEXECSCRIPT,,%CyUsb.EXECSCRIPT%
;------------------------------------------------------------;
;---------------------------------------------------------------;
[Strings]
CYPRESS="Cypress"
MfgName="Cypress"
CYUSB_INSTALL="Cypress Generic USB Driver Installation Disk"
VID_04B4&PID_1003.DeviceDesc="Cypress Device"
CyUsb.SvcDesc="Saphyrion Generic USB Driver"
;------------Replace GUID below with custom GUID-------------;
CyUsb.GUID="{AE18AA60-7F6A-11d4-97DD-00010229B959}"
;
;------------------------------------------------------------;
;-----Uncomment below to support script file processing-----;
;CyUsb.EXECSCRIPT="\systemroot\system32\CyUsb\CyUsb.spt"
;------------------------------------------------------------;
Show Less
I'm able to program the Cypress firmware into the EEPROM. The device seems to be correctly identified as a Cy-Stream usb device but I'm unable to successfully install the CyStream.inf driver enclosed into the demo package. I always get Error 10 during the driver installation.
I tried to use the CyUSB driver instead (see the attached .inf). At this point the driver installation goes well but when I run (in debug) the Streamer application "int n = USBDevice->DeviceCount();" returns always 0. The GUID of the driver and the app. are the original Cypress GUID and are therefore correct.
Can anybody help me to come out from this situation?
Thanks, Job
.inf file
; Installation INF for the Cypress Generic USB Driver for Windows 98ME/2000/XP
;
[Version]
Signature="$CHICAGO$"
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
provider=%CYPRESS%
;---Uncomment and complete below to support WHQL submission---;
;CatalogFile=cyusb.cat
;DriverVer=mm/dd/yyyy,x.y.v.z
;-------------------------------------------------------------;
[SourceDisksNames]
1=%CYUSB_INSTALL%,,,
[SourceDisksFiles]
CyUsbME.sys = 1
CyUsb.sys = 1
;-----Uncomment below to support script file processing-----;
;CyUsb.spt = 1
;------------------------------------------------------------;
[Manufacturer]
%MfgName%=Cypress
[Cypress]
%VID_04B4&PID_1003.DeviceDesc%=CyUsb, USB\VID_04B4&PID_1003
;[PreCopySection]
;HKR,,NoSetupUI,,1
[DestinationDirs]
CyUsbME.Files.Ext = 10,System32\Drivers
CyUsb.Files.Ext = 10,System32\Drivers
;-----Uncomment below to support script file processing-----;
;CyUsb.Files.Spt = 10,System32\CyUsb
;------------------------------------------------------------;
[CyUsb]
CopyFiles=CyUsbME.Files.Ext
;-----Uncomment below to support script file processing-----;
;CopyFiles=CyUsb.Files.Spt
;------------------------------------------------------------;
AddReg=CyUsbME.AddReg
[CyUsb.HW]
AddReg=CyUsb.AddReg.Guid
[CyUsb.NT]
CopyFiles=CyUsb.Files.Ext
;-----Uncomment below to support script file processing-----;
;CopyFiles=CyUsb.Files.Spt
;------------------------------------------------------------;
AddReg=CyUsb.AddReg
[CyUsb.NT.HW]
AddReg=CyUsb.AddReg.Guid
[CyUsb.NT.Services]
Addservice = CyUsb, 0x00000002, CyUsb.AddService
[CyUsb.AddService]
DisplayName = %CyUsb.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\CyUsb.sys
LoadOrderGroup = Base
[CyUsbME.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,CyUsbME.sys
[CyUsb.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,CyUsb.sys
[CyUsbME.Files.Ext]
CyUsbME.sys
[CyUsb.Files.Ext]
CyUsb.sys
;-----Uncomment below to support script file processing-----;
;[CyUsb.Files.Spt]
;CyUsb.spt
;------------------------------------------------------------;
[CyUsb.AddReg.Guid]
HKR,,DriverGUID,,%CyUsb.GUID%
;-----Uncomment below to support script file processing-----;
;HKR,,DriverEXECSCRIPT,,%CyUsb.EXECSCRIPT%
;------------------------------------------------------------;
;---------------------------------------------------------------;
[Strings]
CYPRESS="Cypress"
MfgName="Cypress"
CYUSB_INSTALL="Cypress Generic USB Driver Installation Disk"
VID_04B4&PID_1003.DeviceDesc="Cypress Device"
CyUsb.SvcDesc="Saphyrion Generic USB Driver"
;------------Replace GUID below with custom GUID-------------;
CyUsb.GUID="{AE18AA60-7F6A-11d4-97DD-00010229B959}"
;
;------------------------------------------------------------;
;-----Uncomment below to support script file processing-----;
;CyUsb.EXECSCRIPT="\systemroot\system32\CyUsb\CyUsb.spt"
;------------------------------------------------------------;
Show Less
USB low-full-high speed peripherals
USB low-full-high speed peripherals
Can CY7C64215 be programmed in-situ using MiniProg3 that is included in the PSoC3/5 Dev Kit? Since EnCore III is based on the same MCU as PSoC...
Show More
Can CY7C64215 be programmed in-situ using MiniProg3 that is included in the PSoC3/5 Dev Kit? Since EnCore III is based on the same MCU as PSoC1, I am guessing it is possible in theory.
I understand that I cannot use it to debug it (like it cannot any PSoC 1 chips) but can anyone confirm or deny it can program the part using ISSP before I go down designing around it?
Thanks.
Hiroo Show Less
I understand that I cannot use it to debug it (like it cannot any PSoC 1 chips) but can anyone confirm or deny it can program the part using ISSP before I go down designing around it?
Thanks.
Hiroo Show Less
USB low-full-high speed peripherals
We are having some really random heap corruption issues calling cyusb.sys DeviceIOControl functions from managed code using IOCompletion ports...
Show More
We are having some really random heap corruption issues calling cyusb.sys DeviceIOControl functions from managed code using IOCompletion ports. I can run my device and process millions of transactions using this code before it crashes. Sometimes it takes 20 minutes to crash sometimes takes 12 hours...
Anyway, I wanted to try a different driver just to see if, perhaps cyusb.sys was at fault.
I can try Jungo free for 30 days but balk at paying the price for the drivers if somehow switching over solves my problem. So, I was thinking of using the generic WinUSB drivers...(I realize of course I'll have to re-write parts of my code for the MS API) I am also not using any Iso endpoints either. So, It should work.
I'm just wondering if anyone here has had any success with drivers other than CyUSB. Show Less
Anyway, I wanted to try a different driver just to see if, perhaps cyusb.sys was at fault.
I can try Jungo free for 30 days but balk at paying the price for the drivers if somehow switching over solves my problem. So, I was thinking of using the generic WinUSB drivers...(I realize of course I'll have to re-write parts of my code for the MS API) I am also not using any Iso endpoints either. So, It should work.
I'm just wondering if anyone here has had any success with drivers other than CyUSB. Show Less
USB low-full-high speed peripherals
Hi, I'm working on a custom EZ-USB development board. It is mounting a XXX FX2 connected with a 24LC64 64k serial eeprom. The board is working...
Show More
Hi, I'm working on a custom EZ-USB development board. It is mounting a XXX FX2 connected with a 24LC64 64k serial eeprom. The board is working well with demos like BulkLopp... (both download in Ram and program/load from EEProm). Although the CyStream demo doesn't work. The Driver under Vista simply hangs and returns error code 10. Is there anything different with the CyStream demo respect to other demo app. provided by Cypress? Any key requirements which justifies such a different behaviour ?
Regards, Joel
P.S. I'm downloading and programming the original binaries which are provided in the Cypress Reference designs
Show Less
Regards, Joel
P.S. I'm downloading and programming the original binaries which are provided in the Cypress Reference designs
Show Less
USB low-full-high speed peripherals
Hi, I'm planning to build a USB2 based application which requires a significant data bandwidth (between 20 and 40 MByte/S) using an EZ-USB FX2...
Show More
Hi, I'm planning to build a USB2 based application which requires a significant data bandwidth (between 20 and 40 MByte/S) using an EZ-USB FX2. I'm wondering if there is any difference in performances using CyDvk.sys or CyUSB.sys (Cypress stated that CyDvk is just a "non production" subset of CyUSB). Can somebody give me an advice about features included in CyDvk but which aren't in CyUSB and how they affect the maximal data throughput ?
I've a FX2 platform with the CyStream application programmed in a eprom (downloaded from Cypress web site). Unfortunately when it comes to the driver assignment (Vista home) something goes wrong and I always get an Eroor code 10 on the USB device (CyStream.inf and CyDvk.sys) . The same board works perfectly with al the other demos like BulkLoop... which are using CyUSB.sys.
Any input about using CyDVK.sys on Vista x86 machines?
Thanks in advance, Joel Brenner
Show Less
I've a FX2 platform with the CyStream application programmed in a eprom (downloaded from Cypress web site). Unfortunately when it comes to the driver assignment (Vista home) something goes wrong and I always get an Eroor code 10 on the USB device (CyStream.inf and CyDvk.sys) . The same board works perfectly with al the other demos like BulkLoop... which are using CyUSB.sys.
Any input about using CyDVK.sys on Vista x86 machines?
Thanks in advance, Joel Brenner
Show Less
USB low-full-high speed peripherals
Thank everyone for your attention. When Cy7c68013a is configured in GPIF mode for IN transfer, I find a error. for example, the data is...
Show More
Thank everyone for your attention.
When Cy7c68013a is configured in GPIF mode for IN transfer, I find a error. for example, the data is 10,11,12,13,....,521,however, the data got in the host is 0,10,11,12,13,....,520. i.e, the first word is zero, and all the origin data shifted to the next place except the last of the origin which is lost.
I have tested for times and the result is same. I don't known what's porblem. I thought it the inherent chip problem.
Thank you again. Show Less
When Cy7c68013a is configured in GPIF mode for IN transfer, I find a error. for example, the data is 10,11,12,13,....,521,however, the data got in the host is 0,10,11,12,13,....,520. i.e, the first word is zero, and all the origin data shifted to the next place except the last of the origin which is lost.
I have tested for times and the result is same. I don't known what's porblem. I thought it the inherent chip problem.
Thank you again. Show Less