USB low-full-high speed peripherals Forum Discussions
Hello,
I have been using the Eclipse IDE provided by Cypress to develop firmwares for the FX3 so far and it has worked quite smoothly. Now I tried to develop some firmware for FX2LP devices (CY7C68013A in my case) and was happy to find an option under "New->Project->Cypress->FX2LP Project" to do so using the same Eclipse IDE.
But sadly it seems like the IDE does not recognize the register definitions provided for example in "fx2regs.h", instead it declares them as syntax errors. They do, however, compile without errors and the resulting .hex file does actually work when downloaded to the FX2LP.
So, is there a way to make Eclipse recognize the register definitions and make them available for autocomplete and stop Eclipse from throwing red and yellow lines all over my source code?
I would rather not have to switch to Keil because of the limitations to 4K firmware size.
Show LessI'm trying to build the CyUSB library and GUI on Ubuntu 18.04 with libusb-1.0-0 version 2:1.0.21-2 and GCC version 7.3.0. "make" runs successfully but running install.sh gives the below errors. Has anyone built this module successfully? What version of GCC did you use and did you have to change anything in the makefile(s)?
anna@anna-ThinkPad-P52s:~/Cypress/cyusb_linux_1.0.5 $ sudo ./install.sh
g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.cpp
g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt
cd lib; ln -sf libcyusb.so.1 libcyusb.so
rm -f lib/libcyusb.o
rm -f moc_controlcenter.cpp
rm -f ui_controlcenter.h
rm -f controlcenter.o main.o fx2_download.o fx3_download.o streamer.o moc_controlcenter.o
rm -f *~ core *.core
/usr/lib/x86_64-linux-gnu/qt4/bin/uic controlcenter.ui -o ui_controlcenter.h
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o controlcenter.o controlcenter.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
main.cpp: In function ‘void update_devlist()’:
main.cpp:133:62: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error in 'get_active_config_descriptor' ");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_setAltIf_clicked()’:
main.cpp:451:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r2, "Error in setting Alternate Interface");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp:455:49: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r1, "Error in claiming interface");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_setIFace_clicked()’:
main.cpp:472:69: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
if ( r ) libusb_error(r, "Error in 'get_active_config_descriptor' ");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void get_config_details()’:
main.cpp:562:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error getting configuration descriptor");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void get_device_details()’:
main.cpp:702:52: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error getting device descriptor");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void set_if_aif()’:
main.cpp:798:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r2, "Error in setting Alternate Interface");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp:803:48: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r1, "Error in setting Interface");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_kerneldetach_clicked()’:
main.cpp:840:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error in detaching kernel mode driver!");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void clearhalt_in()’:
main.cpp:1468:81: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while automatically clearing halt condition on IN pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void clearhalt_out()’:
main.cpp:1482:82: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while automatically clearing halt condition on OUT pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_rcv_clicked()’:
main.cpp:1501:37: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Data Read Error");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::pb6_send_file_selected(unsigned char*, int)’:
main.cpp:1542:41: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error in bulk write!");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::pb6_send_nofile_selected()’:
main.cpp:1602:73: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error in bulk write!\nPerhaps size > device buffer ?");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_clearhalt_out_clicked()’:
main.cpp:1628:68: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while clearing halt condition on OUT pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_clearhalt_in_clicked()’:
main.cpp:1646:67: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while clearing halt condition on IN pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb7_clearhalt_out_clicked()’:
main.cpp:1664:68: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while clearing halt condition on OUT pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb7_clearhalt_in_clicked()’:
main.cpp:1682:67: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
libusb_error(r, "Error while clearing halt condition on IN pipe");
^
main.cpp:74:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
^~~~~~~~~~~~
main.cpp: In function ‘void in_callback(libusb_transfer*)’:
main.cpp:1863:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’
libusb_error(transfer->status, "Transfer not completed normally");
^
main.cpp: In function ‘void out_callback(libusb_transfer*)’:
main.cpp:1916:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’
libusb_error(transfer->status, "Transfer not completed normally");
^
Makefile:233: recipe for target 'main.o' failed
make: *** [main.o] Error 1
Thus far I have the following DLL calls working:
CyGetListofDevices
CyGetDeviceInfo
Now I try to do a CyOpen....
Cy7C65211A_deviceNumber = c_uint8()
Cy7C65211A_interfaceNumber = c_uint8()
array_of_type_c_ubyte = (c_ubyte*CY_STRING_DESCRIPTOR_SIZE)
CY_Handle = array_of_type_c_ubyte()
Cy7C65211A_Ret_Code = CY7C65211A_CyOpen(Cy7C65211A_deviceNumber, Cy7C65211A_interfaceNumber, byref(CY_Handle))
I get a successful return as long as the deviceNumber = 0 or 1. It really doesn't matter what the interfaceNumber is as I have put in all kinds of numbers.
The handle returns are 4 bytes long. example of a return would be [104, 61, 122,3]
What is the problem? I have a successful return right?
The problem:
Cy7C65211A_Ret_Code = CY7C65211A_CyClose(CY_Handle)
Returns CY_ERROR_INVALID_PARAMETER
Since there is only 1 parameter I am assuming that the CyOpen wasn't as successful as one might think?
Could use a little help on this.
Show LessHi
Could you please tell me the kind of recommneded external EEROM( Maker, size,etc) for FX2LP boot.SO, the customer is going to use I2C interface.
Best Regatrds
Arai
Show LessHi
is there a signed driver for CY7C65215-32LTX ?
using cypressserial driver version 3.13.0.80 is being rejected by windows 10 as it cannot verify signature
i then tried driver from https://www.cypress.com/documentation/software-and-drivers/microsoft-certified-usb-uart-driver
which is older (version 59) and again win10 reject its signature looking at the security calalogue (cypressserial.cat)
i can see that it was signed by microsoft at oct21 2015, however the certificate is valid only up to mar19 2016
is there a plan to issue a driver with valid signature ?
BR
David
Show LessHello,
I am using PSoC Designer 5.4 SP 1 for PSoc 1.
I want to make HID's multimedia keyboard.
I am using USBFS_LoadInEP ().
void USBFS_LoadInEP(BYTE bEPNumber, BYTE *pData, WORD wLength, BYTE bToggle)
I want to know how to access Report ID 2.
How can I access Report 1 and Report 2?
6.4 CyUartWrite
This API writes the data to UART device.
Description
This API writes the data to UART device. User need to initialize the writeBuffer with buffer pointer, number of bytes
to write before invoking the API. On return the transferCount parameter in CY_DATA_BUFFER will contain the
number of bytes written.
Parameters
Parameters Description
CY_HANDLE handle Valid device handle
CY_DATA_BUFFER*
writeBuffer Write buffer details
UINT32 timeout API timeout value
3.10 CY_DATA_BUFFER
This structure is used to hold data buffer information.
Description
This structure is used by all the data transaction APIs in the library to perform read, write operations. Before using a
variable of this structre users need to initialize various members appropriately.
Data Types
CY_DATA_BUFFER
Members
Members Description
UCHAR * buffer; Pointer to the buffer from where the data is read/written
UINT32 length; Length of the buffer
UINT32 transferCount; Number of bytes actually read/written
Questions:
1. UINT32 timeout This is in what units? days, years, pico seconds, ?? And what is a typical value?
2. On the write DLL call you expect a pointer to the CY_DATA_BUFFER data structure. In that structure you want a pointer, in ASCII, of the pointer to the data buffer. Not sure this makes sense.
The pointer is an ASCII string? So, we have and address to an address that hs been converted to ASCII that when converted back from ASCII points to the ASCII string to be sent to the UART?
3. transferCount is bi directional? On a write I pass it the count "by value" and on the return you don't need to know the address "by reference" to store the byte count? How does that work?
4. Why didn't you put the timeout value in the data structure with the rest of the stuff?
Show Less3.16 CY_CALLBACK_EVENTS
Enumeration defining UART/SPI transfer error or status bit maps.
Description
Enumeration lists the bit maps that are used to report error or status during UART/SPI transfer.
Members
Members Description
CY_UART_CTS_BIT = 0x01 CTS pin notification bit
CY_UART_DSR_BIT = 0x02 State of transmission carrier. This signal corresponds to V.24 signal 106 andRS-232 signal DSR.
CY_UART_BREAK_BIT = 0x04 State of break detection mechanism of the device
CY_UART_RING_SIGNAL_BIT = 0x08 State of ring signal detection of the device
CY_UART_FRAME_ERROR_BIT = 0x10 A framing error has occurred
CY_UART_PARITY_ERROR_BIT = 0x20 A parity error has occured
CY_UART_DATA_OVERRUN_BIT= 0x40 Received data has been discarded due to overrun in the device
CY_UART_DCD_BIT = 0x100 State of receiver carrier detection mechanism of device. This signal corresponds to V.24 signal 109 and RS-232 signal DCD
CY_SPI_TX_UNDERFLOW_BIT = 0x200 Notification sent when SPI fifo is empty
CY_SPI_BUS_ERROR_BIT = 0x400 Spi bus error has been detected
CY_ERROR_EVENT_FAILED_BIT = 0x800 Event thread failed
Question: How can I read these bits directly? Do you have a DLL to allow me to do that?
Show LessHi,
We plan to use CY7C65211 as SPI master, and CY15B104Q (FRAM) as slave.
Regarding the description of CY7C65211 and CY15B104Q datasheet;
- CY7C65211 SPI master spec : Thmo (hold time) is 0ns min.
- CY15B104Q SPI slave spec : tH (Data hold time) is 5ns min. (VDD=2.7 to 3.6V)
* Both of configuration are CPOL=0 (Mode0)
Is communication specs out of range in this configuration?
In the CY7C65211 output the SCK and Valid data to slave with no hold time, but CY15B104Q can not latch correctly due to hold time is insufficient.
I’m afraid that valid data sent by host but can not be received correctly by slave.
Is my understanding correct?
Best regards, Shohei
Show LessHello,
I have interfaced fx2lp with image sensor in slavefifo configuration.
in AN61345 ,they have given that "The interface clock (IFCLK) coming from the FPGA is shifted by 180 degrees to meet the setup time requirements of the Slave FIFO interface of FX2LP"
I dint understand the above statement.can you please explain?
and i am facing some timimg issues in my appliation?is it above statement maaters when i am using sensor instead of fpga?
regards,
geetha.
Show Less