USB low-full-high speed peripherals Forum Discussions
Hello!
The problem is, that I'm trying to rewrite my existing Windows program to Linux. The program uses DeviceIoControl() function to communicate with the CY7C68013A controller. I used it like this:
VENDOR_OR_CLASS_REQUEST_CONTROL myRequest;
int nBytes = 0;
myRequest.direction = 0x00;
myRequest.index = 0xBEEF;
myRequest.recepient = 0x00;
myRequest.request = 0xA2;
myRequest.requestType = 0x02;
myRequest.requestTypeReservedBits = 0x01;
myRequest.value = 0x007F & addr_I2C;
DeviceIoControl (handle,
IOCTL_EZUSB_VENDOR_OR_CLASS_REQUEST,
&myRequest,
sizeof(VENDOR_OR_CLASS_REQUEST_CONTROL),
buffer,
bufferSize,
(unsigned long *)&nBytes,
NULL);
to set some control data into the device, and
BULK_TRANSFER_CONTROL bulkControl;
DWORD ioctl_val = IOCTL_EZUSB_BULK_READ;
int nBytes = 0;
bulkControl.pipeNum = 2;
DeviceIoControl (handle,
ioctl_val,
&bulkControl,
sizeof (BULK_TRANSFER_CONTROL),
buffer,
MAX_DATA_SIZE,
(unsigned long *)&nBytes,
NULL);
to get some bulk data from the device.
Now I'd like to rewrite these code fragments to Linux using libusb or cyusb libraries. Could you help me, please, to find any information source that shows the existing code analogs of Win32 and Linux libusb/cyusb for the CY7C68013A controller programming?
Can CY7C68013A fifoadr[1:0] be configured by a register not by the pins.
I want to save two pins and the fifoadr[1:0] is always 10
that will never change.
Hi,
I've got dev board with FX2LP and fpga. I've done some test's with provided example and tutorial under Windows; I have Cypress chip emulating COM port, with rx and tx lines connected to FPGA. I can send messages and commands with hyperterminal to FPGA, it work flawlessly. Eeprom is programmed, so it enumerates as COM port propely after power on. On Linux it is seen as : Bus 001 Device 004: ID 04b4:4717 Cypress Semiconductor Corp. , but none of /dev/ttyS standard ports.
How to enable this? For Windows there are .inf and .sys driver files. Are there any for Linux? Are those needed anyway? (for CY7C68013A as virtual com only)
Show LessHello -
Using PSoC Creator 2.2; PSoC 5LP device (CY8C5868L), and I'm trying to get our USB information to display within Windows Device Manager.
Within PSoC Creator; the USBFS -> USBUART component, I changed the Device Descriptor to our USB ID (0x2923) and changed the Product ID (0x501).
In the String Descriptor tab; I changed the strings from Cypress information to our company / product descriptions, and saved / applied.
When I rebuilt the project, and when the device first appeared under "Other" in the Device Manager, it showed as the product name I gave it. However, when I point it to the driver, after it installs, it renames to "Cypress USB UART".
I can't find where I'm supposed to change this (I manually changed the USBUART_1_cdc.inf file to include my company information, but that didn't change how Device Manager enumerated it).
I tried uninstalling the driver, re-building the project, and then connecting again, and same result, it first identifies as I want it to, but after the driver installs, it re-names to Cypress USB USART.
There must be a setting or step that I am missing, and appreciate any assistance in getting this resolved.
Jason
Show Lessi use the same application to capture the camera data use cyusb.
but now i found that in the system windowx xp it works very well, int win7 32 or vistat system it loss data very strong.
my application code is: the code means capture vide size 1280*720 ,in xp system the return data alomost is 1280*720,
but in win7 32 or vista system it is alomost less 1280*720. i check the driver in win7 and vista is right.
by the way the xp system and win7 system vista is install in the same pc.
can any people help me? thanks.
DWORD WINAPI Camera_Thread(void *param)
{
CCyUSBEndPoint* pInEndpt = pUSB->BulkInEndPt;
int QueueSize = 2;
PUCHAR *inContext = new PUCHAR[QueueSize];
OVERLAPPED *inOvLap = new OVERLAPPED[QueueSize];
PUCHAR *buffers = new PUCHAR[QueueSize];
for (int i=0; i< QueueSize; i++)
{
inOvLap.hEvent = CreateEvent(NULL, false, false, NULL);
}
pInEndpt->TimeOut = 1000;
pInEndpt->SetXferSize(1024*1024);
for(int i=0;i<QueueSize;i++)
buffers = new unsigned char [1024*1024];
for(int i=0;i<QueueSize;i++)
inContext = pInEndpt->BeginDataXfer(buffers, 1024*1024, &inOvLap);
LONG dwBytes = 0;
int i=0;
while(m_bPlaying)
{
pInEndpt->WaitForXfer(&inOvLap, 1000);
pInEndpt->FinishDataXfer(buffers, dwBytes, &inOvLap, inContext);
inContext = pInEndpt->BeginDataXfer(buffers,1024*1024,&inOvLap);
if(dwBytes==1280*720)
{
pCameraFrameCount++;
}
i++;
if(i==QueueSize)
{
i=0;
}
}
return 0;
}
I've two boards with same circuit based on CY7C68014A. Though one of the boards is working fine, other board is not working correctly and windows reports code 43 error during driver installation.
I noticed that non-working board has +3.3V on D+ line. While I'm able to debug the board through serial port, USB connection is not working. Please advise.
Show LessHi All,
I made a modified version of http://www.cypress.com/?docID=42647 with 3 endpoints. For CDC out endpoint i want manual commit so that i can also send data to fpga. But manual commit is not sending data to fpga but automatic commit is working. Nothings seems wrong. Here is the code. I will really appreciate some feedback.
void TD_Init(void) // Called once at startup
{
// Return FIFO setings back to default just in case previous firmware messed with them.
SYNCDELAY; PINFLAGSAB = 0x00;
SYNCDELAY; PINFLAGSCD = 0x00;
SYNCDELAY; FIFOPINPOLAR = 0x00;
// Global settings
SYNCDELAY; REVCTL = 0x03;
SYNCDELAY; CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1); // 48MHz
// IFCLKSRC 3048MHZ IFCLKOE IFCLKPOL ASYNC GSTATE IFCFG1 IFCFG0
SYNCDELAY; IFCONFIG = 0xE3; //1110 0011
// EP1OUT & EP1IN
SYNCDELAY; EP1OUTCFG = 0x00;
SYNCDELAY; EP1INCFG = 0xA0;
// VALID DIR TYPE1 TYPE0 SIZE 0 BUF1 BUF0
SYNCDELAY; EP2CFG = 0xA2;
SYNCDELAY; EP4CFG = 0xE2;
SYNCDELAY; EP6CFG = 0xD0;//1101 0000
SYNCDELAY; EP8CFG = 0x00;
// 0 INFM1 OEP1 AUTOOUT AUTOIN ZEROLENIN 0 WORDWIDE
SYNCDELAY; EP2FIFOCFG = 0x00;
// SYNCDELAY; EP2FIFOCFG = 0x10;
SYNCDELAY; EP4FIFOCFG = 0x0C;
SYNCDELAY; EP6FIFOCFG = 0x0C;
SYNCDELAY; EP8FIFOCFG = 0x00;
SYNCDELAY; EP4AUTOINLENH = 0x02;
SYNCDELAY; EP4AUTOINLENL = 0x00;
SYNCDELAY; EP6AUTOINLENH = 0x02;
SYNCDELAY; EP6AUTOINLENL = 0x00;
SYNCDELAY; FIFORESET = 0x80;
SYNCDELAY; FIFORESET = 0x82;
SYNCDELAY; FIFORESET = 0x84;
SYNCDELAY; FIFORESET = 0x86;
SYNCDELAY; FIFORESET = 0x00;
SYNCDELAY; OUTPKTEND = 0x82;
SYNCDELAY; OUTPKTEND = 0x82;
}
void TD_Poll(void) // Called repeatedly while the device is idle
{
if( !( EP2468STAT & 0x01 ) )
{ // EP2EF=0 when FIFO NOT empty, host sent packet
OUTPKTEND = 0x02; // SKIP=0, pass buffer on to master
}
if (!(EP1INCS & 0x02)) // check if EP1IN is available
{
EP1INBUF[0] = 0x0A; // if it is available, then fill the first 10 bytes of the buffer with
EP1INBUF[1] = 0x20; // appropriate data.
EP1INBUF[2] = 0x00;
EP1INBUF[3] = 0x00;
EP1INBUF[4] = 0x00;
EP1INBUF[5] = 0x00;
EP1INBUF[6] = 0x00;
EP1INBUF[7] = 0x02;
EP1INBUF[8] = 0x00;
EP1INBUF[9] = 0x00;
EP1INBC = 10; // manually commit once the buffer is filled
}
}
Show LessHi All,
Here is an Example project on Keyboard Implementation using Encore V . This is a wired keyboard example project which supports standard 104 key keyboard. It also has other features like
1) Ghost key detection
2) USB Suspend
3) USB remote Wakeup
4) Power button - Sleep, shutdown
5) CD controls: play/pause, stop, fwd/next, and back/previous
6) Volume Controls: up, down, mute
7) Internet keys: WWW browser, e-mail, search, backward, forward, and favorite
😎 Debounce for all button press
Attached along with this project is an Excel sheet giving the details of Keyboard Matrix.
Regards,
SRAM
Show LessHi All,
Here is an Example project on Keyboard Implementation using Encore V . This is a wired keyboard example project which supports standard 104 key keyboard. It also has other features like
1) Ghost key detection
2) USB Suspend
3) USB remote Wakeup
4) Power button - Sleep, shutdown
5) CD controls: play/pause, stop, fwd/next, and back/previous
6) Volume Controls: up, down, mute
7) Internet keys: WWW browser, e-mail, search, backward, forward, and favorite
😎 Debounce for all button press
Attached along with this project is an Excel sheet giving the details of Keyboard Matrix.
Regards,
SRAM
Show Less