USB superspeed peripherals Forum Discussions
I am using SPI to read/write register values of 2 sensors. At the same time, I used the same SPI flash memory for booting image storage and for user data storage. SPI read/write will happen for 2 sensors and flash memory user data. I have 2 questions regarding SPI I meant to use,
1. 3 GPIOs are used to select the 3 SPI devices: 2 sensors and 1 flash memory. will this cause SPI problem at the start up since at default all GPIOs are Power on default low while all 3 SPI devices has SSN low level valid.
2. timing control. 1 sensor has the following read/write timing requirement. The register address length together with the operation indicator totally 10 bit long while the register value is 2-byte long. SCK is 10MHz. Firmware has to be able to reconfigure SPI CyU3PSpiConfig t.wordlen from 10 bit to 16 bit within 0.5 SCK clock cycle, which is 50ns. It is quite hard. I try to use SPI register mode. But for register mode, every transfer is 8 bits. for the 10 bit, if pack it in left, the 6 padding '0' will be take as part of the register address, while the lower address 6 bits will be considered to be the register value. Such mess will happen to the following register values. So far, I have not get a success yet.
Thanks in advance.
Show LessHi,
I've successfully configured and tested a SPI DMA producer to pass data from the SPI producer to a USB socket for consumption. That DMA is currently configured like this:
//Configure DMA for real time streaming channel
CyU3PDmaChannelConfig_t dmaConfig;
dmaConfig.size = 1024;
dmaConfig.count = 64;
dmaConfig.prodSckId = CY_U3P_LPP_SOCKET_SPI_PROD;
dmaConfig.consSckId = CY_U3P_UIB_SOCKET_CONS_1;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
//Disable DMA callbacks
dmaConfig.prodHeader = 0;
dmaConfig.prodFooter = 0;
dmaConfig.consHeader = 0;
dmaConfig.notification = 0;
dmaConfig.cb = NULL;
dmaConfig.prodAvailCount = 0;
status = CyU3PDmaChannelCreate(&StreamingChannel, CY_U3P_DMA_TYPE_AUTO, &dmaConfig)
With its current configuration, the DMA doesn't transmit anything (except 0x0000) when streaming. Is there a way to set up another DMA that transmits data stored in memory on the CPU while simultaneously transmitting the data acquired during the transaction over USB?
My code can be found in the BurstMode branch of this repository.
Thanks for your help!
Show LessHi All,
Please go through attached snap which is about GPIF-tool based interface definition for FPGA configuration using slave-select-parallel-map.
Now if you look at CLK to GPIO[16] that is nothing but schematic-wise it is common 100MHz clock frequency. It is derived from 100 MHz clk-oscillator and sends 100 MHz to both FPGA and FX3 chip.
Now if you look at FX3 GPIO[27] pin to FPGA CCLK pin which provides clock frequency when FX3 writes FPGA bin file into it.
My worry is that i dont know how this GPIO[27] generated 100 MHz clock frequency ? I went through GPIF design, but no-where found relationship between GPIO[16] and GPIO[27]. Then how it provides 100 MHz clock ? where it is defined or configured to do so ?
Please let me know, it'll be very helpful for me.
Thanks,
Premji
Show LessHi,
i am using the FX3 SuperSpeed Explorer Kit, Windows 7 64 bit, Matlab 2018a.
If i try to connect Matlab to the Board via the CyUSB.dll, it results in error:
System.OverflowException: Arithmetic operation resulted in an overflow.
The code i am running is simple, the second line causes the error:
cyusb_lib = NET.addAssembly('E:\Projekte\Cypress\CyUSB.dll');
devList = CyUSB.USBDeviceList(CyUSB.CyConst.DEVICES_CYUSB);
I read a lot about problems with x64 and the CyUSB.dll, but theres nothing that is working for me.
I use the latest drivers and CyUSB.dll version 3.4.7
I have to add, that the code can run without error in like 1 out of 10-15 trials, but then matlab crashes after i try to run:
myUSBDevice = devList.Item(0);
which is also a known issue to many other users.
Thank you for your help
Sebastian
Down below i post the full error-log from Microsoft .NET Framework popup (why does it only say Win32 all the time, not Win64?):
************** Exception Text **************
System.OverflowException: Arithmetic operation resulted in an overflow.
at CyUSB.PInvoke.CountDevices(Guid g)
at CyUSB.USBDevice.get_DeviceCount()
at CyUSB.USBDeviceList.Add()
at CyUSB.USBDeviceList.PnP_Event_Handler(IntPtr pnpEvent, IntPtr hRemovedDevice)
at CyUSB.MsgForm.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
dotnetcli
Assembly Version: 1.0.6611.7500
Win32 Version:
CodeBase: file:///E:/Programme/Matlab2018/bin/win64/dotnetcli.DLL
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CyUSB
Assembly Version: 3.4.7.0
Win32 Version: 3.4.7.0
CodeBase: file:///E:/Projekte/Cypress/CyUSB.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Show LessHi,
I follow this thread in order to generate interrupt from fx3 gpio 25.
the external switch is connected at gpio 25.if i press this switch,external pulse is going at gpo 25,but CyFxGpioIntrCb() call back function is not geeting called.
I am blinking led that is connected at gpio 26 inside this call back(CyFxGpioIntrCb).led is not blinking inside this call back.
please let me know the reason for this.I have attached the source code.
thank you.
Show LessI want to switch FX3 work at USB3.0 mode and not support USB2.0 at the same time, connect to the host that don't support USB3.0, I want to the host wouldn't find FX3 device, because FX3 only work at USB3.0 mode and not support 2.0 at same time, which function can do it?
Show LessThe FX3 FW is an UAC + UVC design.
UAC & UVC data comes from FPGA via SlaveFIFO 32-bit I/F.
When using VLC to capture both Audio and Video from FX3, the VLC halts. Looks like only one frame was captured and shown, and there's no voice captured. However data from FX3 is continuously received in VLC.
When only UAC or only UVC is captured in VLC, it runs well. The issue only occurs when both UAC & UVC are captured.
The DMA buf size for UVC in FX3 FW is 16 KB, and 192 bytes for UAC. UAC uses 48K Hz, stereo, 16b. And the video format is Full HD @ 60 HZ, YUY2.
GPIF Thread 0 is for UVC and Thread 3 for UAC.
The UVC and UAC use the slavefifo I/F in turn. Here is the detail.
If audio data is available, 192 audio bytes will be sent to PC using Thread 3;
else if video data is available, 16 KB will be sent to PC using Thread 0;
else wait.
When VLC starts capturing the video & audio, I can see 6 audio packets ( 6 x 192 bytes) were sent to PC, and then video data starts.
What might be the cause of the issue?
Would it be the 16-KB video data in single transfer from FPGA are too large?
Thanks!
Show LessThe image sensor I'm using is MT9v034 monochrome version. I'm trying to find in the firmware where I change header information to match this sensor? I currently have the firmware running and AMCap finds my board but I only get a black screen on AMCap. I believe I need to modify the header information for my board to get things running. I also know from AN75779 I need to change the YUV information for monochrome by sending monochrome data in the 'Y' values and setting the other values to 0x80. Can you tell me where I should make these changes in the firmware? Where is the function I change?
Also can you tell me where in the firmware you change the PID and VID, and also where the "FX3" label is in firmware that AMCap sees the device is.
Any help you can provide would be greatly appreciated!
Brandon
Show LessHello
I can't find CYUSB3KIT-003 SuperSpeed Explorer Kit dimension drawing.
Who can provide CYUSB3KIT-003 dimension drawing or PCB?
Thanks very much.
Thanks.
Show Lessi'm currently working on a uvc application and I want the device to only work on usb 2.0. It work perfectly fine in usb 2.0 mode but if i force the cx3 to only work in usb 2CyU3PConnectState(CyTrue,CyFalse) the function CyU3PDmaMultiChannelCommitBuffer in the dma callback return 0x47. Do you have any idea why ?
Show Less