USB superspeed peripherals Forum Discussions
Hi all,
I working fx-2 and fx-3 cypress EV board. I created one C++ console application in PC visual studio-17. I include CyAPI.h header and CyAPI.lib library realtive path in C/C++ and linker properties. its build successful and i added below code in my c++ file
int main(void)
{
CCyBulkEndPoint *OutEndpt_I2C = NULL, *InEndpt_I2C = NULL, *InEndpt_TS = NULL;
CCyUSBDevice *USBDevice = NULL;
UCHAR DevCnt = 0;
int i = 0, numOfEpts = 0;
CCyUSBEndPoint *endpt = NULL;
USBDevice = new CCyUSBDevice(NULL);
if (0 == (DevCnt = USBDevice->DeviceCount()))
{
printf("\n\n\n*** Cypress Device Not Connected ***\n\n\n");
//exit(-1);
return false;
}
printf("\n*** Number of Cypress Devices are (%d)***\n", DevCnt);
for (i = 0; i < USBDevice->DeviceCount(); i++)
{
if (USBDevice->Open(i))
{
if (0x04b4 == USBDevice->VendorID && 0x00F0 == USBDevice->ProductID)
{
printf("\n\n\n*** Cypress Device Connected ***\n\n\n");
break;
}
USBDevice->Close();
}
}
if (USBDevice != NULL)
{
USBDevice->Reset();
numOfEpts = USBDevice->EndPointCount();
for (i = 0; i < numOfEpts; i++)
{
endpt = USBDevice->EndPoints;
if (endpt->Attributes == 2)
{
if ((endpt->Address & 0x80) && (endpt->bIn))
{// BULK : In-EndPoint
if ((endpt->Address & 0x7F) == 0x01)
{
InEndpt_I2C = (CCyBulkEndPoint *)USBDevice->EndPoints;;
}
else if ((endpt->Address & 0x7F) == 0x02)
{
InEndpt_TS = (CCyBulkEndPoint *)USBDevice->EndPoints;;
}
}
else
{// BULK : Out-EndPoint
if ((endpt->Address & 0x7F) == 0x01)
{
OutEndpt_I2C = (CCyBulkEndPoint *)USBDevice->EndPoints;;
}
}
}
}
}
return true;
}
This code is working fine and detecting fx-3 device correctly, if i connect fx-2 device its showing " printf("\n\n\n*** Cypress Device Not Connected ***\n\n\n"); " .
Q1. is it fx2 need different lib file?
Q2. in given SDK have cpp lib and inc file its working properly. if you have any CPP code with fx2 lib please let me know.
Show LessHi,
Which GPIOs can be used in the CX3 as SPI Master second bus ?
thanks
Hi,
Can anyone explain about the situations on which CyU3PDmaChannelGetBuffer fails with timeout error. One situation I guess is that if host side application fails to clear the buffers in time, it leads to CyU3PDmaChannelGetBuffer failure with timeout error. My doubt is that, Is there any other situations which leads to this error. Please help me to know about the other situations if any.
Thanks in advance,
Vignesh Kumar R.
Show LessHi,
I am using Cypress FX3S USB Dongle Rev 1.0 Hardware.
This has Two SD card connections. one USB 3.0 host connection.
I am using EzUsb Eclipse IDE for building FX3SMassStorage Application,
When I load this fx3sMassStorage Application to FX3S using Cypress Control center,
I am getting two FAT Partitions/Drive each 1.8GB, as I am using 4GB SD card on either SD socket.
When FX3SMassStorage Application is loaded, Only Primary SD card two 1.8GB FAT partitions in detecting ,
But Secondary 4GB card's two FAT partitions is not mounted or detected in MyComputer.
When I Download the Debug/Release raid1 .img to FX3S using Cypress Control center,
I am not getting any Mass Storage Drive in My Computer and/or Storage Drives in Computer Management.
In This I connected two 4GB SD card on both SD card sockets in FX3S.
But Both cards are detecting in Transcend Card Reader.
I am facing this Raid1 Partition or Drive of FX3S is not showing in Windows 7 MyComputer and/or Storages in Computer Management.
But when I load FX3S MassStorage Application first and then do button reset on FX3S and Load FX3S Raid1 Application using cy control center,
I am getting one 1.8GB FAT Partition in My computer, But another 1.8GB Raid1 FAT partition is not detecting.
I am using below
Application: https://www.cypress.com/file/124466/download
AN89661 USB RAID 1 Disk Design Using EZ-USB FX3S.zip
Thanks & Regards
Ashok
Show LessI'm wondering how to add the feature to send debug messages through uart port? For example, a simple firmware of BootLedBlink of SDK 1.3.4. How can I add debug messages when the button been pressed? or when the LED is set on/off. I want to monitor the debug info through a terminal.
Show LessHI
I'm working with the FX3 SuperSpeed Explorer Kit to try and send data to (and receive data from) FPGA. I download code example from:AN65974 - Designing with the EZ-USB® FX3™ Slave FIFO Interface.
In the Loop_back case,the FPGA does not correctly receive the data sent by the Control Center, but Control Center can correctly receive the data of the FPGA. The data from Control Center is always 0.
What cause problems with transfer accuracy?
Show Less
If I add two usb in the PC.
CCyUSBDevice* m_pCyUSBDevice1;
CCyUSBDevice* m_pCyUSBDevice2;
m_pCyUSBDevice1->Open(0);
m_pCyUSBDevice2->Open(1);
However, if remove one usb.
m_pCyUSBDevice1->Isopen = true;
m_pCyUSBDevice2->Isopen = true;
1. How to identify which one is remove? Why those are all opened?
2. If the removed one is inserted, how to open it? I don't know which one?
3. Could you help to descripe the solution by codes more detail?
Show Less