I have implemented a working GPIF state machine that captures N individual lines of data, with one DMA buffer the size of one line. At the end of acquisition, the state machine loops indefinitely at the final state waiting for a vendor command to reset the acquisition for a new frame.
I've been struggling with commiting/flushing data however. I'll either get the last line of one acquisition prepended to the start of the next, or the current acquisition never completes (Begin/Wait/FinishDataXfer will time out), depending on the size of the acquisition.
Things that are unclear to me:
1) Do I need to flush at the end state of the GPIF if I've made sure to capture exactly one buffer of data? It seems like if I don't flush I may or may not get data returned.
2) I'm really confused about the remark in the reference manual saying that I need to read data while doing a commit to avoid a zero length packet. I tried this (forcing the acquisition to end with a half full buffer), and without it the acquisition did not return data. With the read data it did, but I get one extra sample. Is that expected?
3) For CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE, is the callback called during the FLUSH state? Or only when the buffer is actually full?Show Less
你好，我使用一个uvc工具验证发送设置camera 图像对比度，饱和度命令，但是CyU3PUsbRegisterSetupCallback(CyCx3AppUSBSetupCB, CyTrue)注册的回调函数不响应，函数头里加了日志也没有通过串口打印出来。此uvc工具直接测试usb camera摄像头是有效果的。我想咨询一下，fx3需要如何注册回调函数才会响应类似命令？Show Less
I am facing an issue with SDK 1.3.4 while using multi thread. I have ported a project source to SDK 1.3.4 that I already used in SDK 1.3.1. I have not changed anything in my source code, I just build the source with 1.3.4.
In firmware we are just getting commands from HID call back, once I received command in HID call back I will set a event and in another thread I will wait for that event once I received the event I will perform my things. This simple concept is not working if I build my project in SDK 1.3.3 or SDK 1.3.4. Please help us to solve this issue at earliest.
Thanks and Regards,
Vignesh Kumar R.
We have application of video stream and we are using Bulk transfer, Our frame size transfer are around 8.1MB. We tested the our application where Window 7 64bit can run up to 10000 frames without failure. Then we tested several Window 10 64 bit machine, it can fail randomly. For example we let our application run 1000 frames and it can fail 10 to 20 frames randomly, sometimes even more.
Test condition: Both Host application and Firmware and Bit files are the same. The only different are Two machine, Window 7 64 bit and Window 10 64Bits
Do you have any idea on this?
I am very new to the FX3 and I am trying to stream data from a 32 bit bus sampled at 10MHz to the computer. Data is sampled on the GPIF using two alternating threads. A program written on linux using libusb and cython simply reads 2MB of data (for now) and dumps it to the disk.
Currently, I have a testbench set up to generate a 16-bit binary counter to be sampled. However, looking at the dumped data returned, there are (seemingly random) gaps in the data where the counter will jump values. I cant seem to find any consistency as to where the data drops and how much will be lost.
Is there any way to figure out how to avoid packet loss?
i was able to change the CY_FX_ISO_MAXPKT parameter.
when Running OUT Traffic (from the EP_OUT) from the streamer GUI, i was able to see in USB3 Trace that the Data len that my host is sending is actually the one that i defined in CY_FX_ISO_MAXPKT parameter.
my problem here is when i want to test the other way, IN_EP from the streamer GUI.
when choosing the IN_EP from the Streamer GUI and press on start, im able to see that there is traffic but in the USB3 Trace i see that the Data Len that the FX3 sending is always 0 no matter what CY_FX_ISO_MAXPKT is configured.
only when CY_FX_ISO_MAXPKT = 1024 i able to see that the FX3 is success to send ISOC Data Packet with Len = 1024 (verified it in the USB3 Trace).
is there something else that i need to configure? or maybe i miss something here?
more details (from the USBIsocSourceSink module) :
/* ISO Mult settings for SS and HS operation. */
#define CY_FX_ISO_PKTS (1)
/* Burst length in packets supported by the ISO endpoints, when operating in USB 3.0 mode. */
#define CY_FX_ISO_BURST (1)
/* Dma buffer size multiplier. As ISO endpoints will only transfer ISO_PKTS * ISO_BURST packets of data in*/
/* each interval, this can be set to 1 without any performance limitation. */
#define CY_FX_DMA_MULTIPLIER (1)
I am currently using a USB2 High-Speed FTDI chip for USB-to-SPI conversion.
I am trying to get the lowest possible time to send multiple, small datagrams over SPI. I am not too concerned about the time to actually send the bits (so far at least, maybe withFX3 that's a new constraint!) which is only a handful of microseconds.
To test the speeds, I perform a loop to send 6 bytes back-to-back (Windows 10, 6-core Xeon, C#) 100 times then calculate the average time with the following psuedocode:
1. Start stopwatch
2. Chip select assertion
3. Read+Write 6 bytes over SPI bus at 10 MHz clock
4. Chip select de-assertion
5. Repeat #2 through #4 until 100 cycles are reached
6. Stop Stopwatch
7. Calculate average total time per SPI transaction (= Elapsed time of stopwatch divided by 100)
This yields about 700 microseconds per SPI transaction (on average) when the computer is doing nothing but running this loop, so it's probably a best-case situation.
Here's my questions:
1. If I use GPIO-controlled slave-selects with FX3, what is an estimate of the total cycle time I would see per SPI transaction (assume 6 bytes transfer, 10MHz clock)...can that 700 microseconds number drop substantially?
2. Would this be done with DMA mode or register mode? If the number could be dropped low enough I could test with some dummy writes and an oscilloscope with an FX3 eval to ballpark it.
This isn't a legally-binding number :).
I'm just trying to estimate if it would be worth testing something with an FX3 eval board for example. If that 700 microseconds could come down to below something like 150 microseconds I would consider spending time on it, but if you think it's not going to get that low I would pass and live with what I have.
I am writing firmware for the CX3 to interface a new sensor and am running into a confounding problem. My program behaves differently when I rearrange the order of functions in my C source code. This leads me to believe I have some memory corruption issues. I found the CyU3PMemCorruptionCheck() and CyU3PBufCorruptionCheck() functions in cyu3os.h and am trying to use them in my program. But when I do, the linker complains they are not defined. In what library are they defined?
Our Image Sensor has MIPI CSI-2® v3.0 (September 2019).
But CX3 has MIPI CSI-2 compliant (Version 1.01).
Does CX3 suitable for our design?Show Less