USB low-full-high speed peripherals Forum Discussions
Hello, I would like to ask how many slaves can be connected when the cy7c65211a chip uses SPI mode as the MASTER. Some of the data taken by my channel is old and distorted, I would like to ask what the reason is, hope to reply when you are free, thank you.
Show Lesshi,
When I used AN8716 firmware to send a message from the slave device to the master device on the CYUSB3KIT003 development board, the master device received an additional 4 bytes in the message header, but sending from the master device to the slave device was correct. The attachment shows the USB packet capture
Hello, I would like to ask. First, I set the Serial number of these three chips cy7c65211A to 001,002,003 respectively through the software "USB Serial Configuration Utility". VID and PID of these three chips are the same. Then open the device through PC using CyOpen function for operation; The programming idea of my PC computer is: after successfully turning on the device, by identifying different Serial numbers, the flashing frequency of the lamp with different Serial numbers is different, and the final result is found that the flashing frequency of the lamp is the same, what is the reason? Shouldn't the three cy7c65211A chips that should be connected all perform the same operation and access using API functions programmed via USB? When you have time to help answer, thank you, good luck with your work.
Show LessHi, I wrote a C# wrapper for the cyusbserial.dll and have a device configured as a spi *slave*. I can open the bridge and find ports, get the configuration and set the GPIO reliably. CyGetListofDevices(),CySetGpioValue(),CyOpen() all work perfectly.
In C# I have the following wrapper:
[DllImport("CyUSBSerial.dll")]
public unsafe static extern CY_RETURN_STATUS CySpiReadWrite([In] IntPtr hHandle, [In, Out] CY_DATA_BUFFER* readBuffer, [In, Out] CY_DATA_BUFFER* writeBuffer, [In] UInt32 timeout);
Initializing the buffer is interesting, as C# needs unsafe and fixed operations.
// write buffer creation
CY_DATA_BUFFER wBuffer = new CY_DATA_BUFFER();
wBuffer.transfercount = 0;
wBuffer.length = 8;
byte[] wArray = new byte[256];
unsafe
{
fixed (byte* w = &wArray[0])
{
wBuffer.buffer = w;
}
}
// read buffer creation
CY_DATA_BUFFER rBuffer = new CY_DATA_BUFFER();
rBuffer.transfercount = 0;
rBuffer.length = 8;
byte[] rArray = new byte[256];
unsafe
{
fixed (byte* r = &rArray[0])
{
rBuffer.buffer = r;
}
}
// call read/write
status = CySpiReadWrite(card.Handle, &rBuffer, &wBuffer, 10000);
When I call cySPpiReadWrite() to status usually returns with CY_ERROR_REQUEST_FAILED. What's funny is that I need to actually create a write buffer and pass it into CySpiReadWrite or I get CY_ERROR_INVALID_PARAMETER, even though I only want to receive data. Pass null into wBuffer causes the parameter error.
Th problem almost seems memory or garbage collection-related. Has anyone successfully made a C# interface for this?
Show Less你好,目前在使用CY7C65211A上的SPI传感器进行测试,使用提供的API函数发现写不了CS片选信号,只能读取CS片选信号,麻烦有空给个解答,谢谢,祝工作顺利。
Hello, because I used the USB Serial Configuration Utility for incorrect operation, resulting in the device identification error, is there any way to restore to the original device type? First of all, I can not use the tool "fwDownload.exe" to restore. It is also not possible to use USB Serial Configuration Utility for program. The following figure shows the current device connection status:
The following graph is my expected state:
Looking forward to your reply, thank you.
Show Less
你好,我想问下根据上图所示的设计,怎么通过PC去访问多个基于cy7c65211A芯片的usb设备,目前我们基于上图做的设计发现通过API函数无法识别出多个基于cy7c65211A芯片的usb设备,请问如何解决这个问题,并实现PC机对多个USB设备的正常访问?项目紧急,麻烦有空解答下,祝工作顺利,谢谢。
Show Less你好,我在linux环境下切换到这个“CyUSBSerial_SDK_Linux/linux/library”目录下,进行make编译报错:/usr/bin/ld: cannot find -lusb-1.0: No such file or directory,但是我使用命令:locate usb-1.0.so*,发现 系统路径是能找到该文件的,不知道报错是什么原因,有空解答下,谢谢,祝工作顺利。
Show Less