USB superspeed peripherals Forum Discussions
"Hello,
I've written my SPI initialization code for the cyusb3kit-003 as follows:
/* SPI initialization for application. */
CyU3PReturnStatus_t CyFxSpiInit(uint16_t pageLen)
{
CyU3PSpiConfig_t spiConfig;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
/* Start the SPI module and configure the master. */
status = CyU3PSpiInit();
if (status != CY_U3P_SUCCESS)
{
return status;
}
/* Start the SPI master block. Run the SPI clock at 8MHz
* and configure the word length to 8 bits. Also configure
* the slave select using FW. */
CyU3PMemSet((uint8_t *)&spiConfig, 0, sizeof(spiConfig));
spiConfig.isLsbFirst = CyFalse;
spiConfig.cpol = CyTrue;
spiConfig.ssnPol = CyFalse;
spiConfig.cpha = CyTrue;
spiConfig.leadTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK;
spiConfig.lagTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK;
spiConfig.ssnCtrl = CY_U3P_SPI_SSN_CTRL_FW;
spiConfig.clock = 4000000;
spiConfig.wordLen = 8;
status = CyU3PSpiSetConfig(&spiConfig, NULL);
return status;
}
However, when I load and run the code on the device and check the SPI clock pin with an oscilloscope, I don't see 4 MHz. Instead, I'm getting an inexplicable value like 1.9 kHz. What could be the reason?
Show Less您好,请教个问题,我们在设置flagA为currentThreadDMAReady,设置flag B为currentThreadDMAWarterMark,在cyU3PGpifLoad()下方调用CyU3PGpifSocketConfigure(0,CY_U3P_PIB_SOCKET_0,6,CyFalse,1),测试时,上位机不从USB取数,逻辑抓取信号发现flagA会被拉低,但是flagB一直是高,请问下可能是什么原因造成的呢?
Show LessHello, please ask me a question. We are now using zynq to send 25fps 2k*2k*16 bit image data to the upstream computer. The host computer's analysis data revealed that the image data will be lost. The host computer's beginDataXfer () API reception, the host computer's test data reception can reach 320MB/s, the firmware configuration is DMA buf 1k*16, and the zynq side has a fifo to ensure that transmission stops when half full. As a matter of course, there will be no problems with untimely retrieval. Please ask where the data may be lost. ? Thank you
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/%E8%B6%85%E9%AB%98%E9%80%9FUSB%E5%A4%96%E8%AE%BE/CYUSB3014%E4%B8%A2%E6%95%B0/td-p/653261
Show LessHello,
we use cyusb3014 in our production as a uvc device, we want to do the usbif test, there are two items failed under USB3CV test, i attach the test report,
1. TD 9.14 Suspend/Resume Test (Configuration Index 0x00) - Device State Configured
2. TD 9.23 Reset Device Test - Device State Default
the FW is base on AN75779, can you give some suggestion on this issue? thanks a lot.
Show LessHi,
I'm trying to stream continuous 16, 24, and 32-bit data from GPIF over USB, but I'm running into problems at the highest internal GPIF clock speed. With 16/24/32-bit data, the following works great:
clockConfig.setSysClk400 = CyTrue; // CyU3PDeviceInit() -> 403.2MHz clock
CyU3PPibClock_t pibClk = {4, CyTrue, CyFalse, CY_U3P_SYS_CLK}; // 89.6MHz GPIF clock
-> Streaming 16-bit data continuously is about 179.2 MiB/s, and it works well.
-> Streaming 24-bit data continuously is about 268.8 MiB/s, and it also works well.
-> Streaming 32-bit data continuously is about 358.4 MiB/s, and it also works well.
However, when I increase the internal GPIF clock to ~100MHz, then only 16-bit streaming works. I'm using:
clockConfig.setSysClk400 = CyTrue; // CyU3PDeviceInit() -> 403.2MHz clock
CyU3PPibClock_t pibClk = {4, CyFalse, CyFalse, CY_U3P_SYS_CLK}; // 100.8MHz GPIF clock
Streaming 24-bit data continuously is only about 302.4 MiB/s, so I don't understand why it drops data since the higher 32-bit transfer rate (358.4 MiB/s) above works.
If the DMA buffer size is 31 KB (with 2 buffers per socket), then the system transmits 31*2 KB of data fine but then drops ~30 clocks of data every 31KB after that. If the DMA buffer size is 34 KB, then the system transmits 34*2 KB of data fine but then drops ~30 clocks of data every 34KB after that.
Any ideas?
Thank you!
P.S. I'm basically using the code here: https://community.infineon.com/t5/USB-superspeed-peripherals/SuperSpeed-Design-Examples-V1-2-1-GPIF-Example2-external-clock/m-p/392528 . Ajeeth provided an example GpifToUsb.zip file to ping pong between two threads. Increasing the DMA buffer size to 16+KB and tweaking the GPIF state machine to use DMA_WM_TH0/DMA_WM_TH1 allows me to stream 16-bit data at 100MHz continuously with no drops.
Show LessHello,
I registered the falling edge interrupt of a gpio port on cyusb3014. The io port is the input port and the input value changes from 1 to 0 for a few seconds before changing back to 1. After receiving the interrupt, I read the level value of the io port. Theoretically, the level value of io is 0 when the interrupt is triggered, but I read the value of the io as 1 after the interrupt is triggered. May I ask if this is because my data value 0 is also ignored after the gpio interface triggers an interrupt?
Thank you.
Here is my code to simulate a serial port using the gpio port,
Hello all,
I developed a UVC driver with CX3. My image sensor has a resolution of 1920x1280. Normally, when I develop the driver at 1920x1280 resolution, the image does not appear. However, when I print frame info from the uart, frame size = 4972800B appears. If I set the resolution to 1920x1295 in the descriptor, based on the calculation that 1920*1295*2 = 4972800 corresponds to this frame size, the image appears. However, the extra parts of the image appear slightly distorted from the top and bottom. How can I set this buffer correctly and set it to 1920*1280*2 = 4915200B? Does anyone have any solution?
Show Less
Dear all,
part of my product contains a UART <-> USB bridge, just like in the cyfxusbuart example.
I have it configured to DMA AUTO mode, but the thread loop have
const uint32_t uart_rx_enabled = UART->lpp_uart_config;
const uint32_t uart_rx_disabled = UART->lpp_uart_config & (~(CY_U3P_LPP_UART_RTS | CY_U3P_LPP_UART_RX_ENABLE));
while (true) {
if (!g_is_uart_app_active) {
CyU3PThreadSleep(SLEEP_TIME_50MS);
continue;
}
UART->lpp_uart_config = uart_rx_disabled;
CyU3PDmaChannelSetWrapUp(&g_dma_handle_uart2usb);
UART->lpp_uart_config = uart_rx_enabled;
CyU3PThreadSleep(SLEEP_TIME);
}
so that partially filled buffers are committed as well.
However, occasionally, random bytes are transmitted. Sometimes just a few, sometimes 64 bytes. I believe to have narrowed the issue down to the UART RX disabling, as I can provoke the issue by decreasing SLEEP_TIME (with 1 ms sleeps the issue happens at almost every transmission) and do not see the issue when omitting the UART->lpp_uart_config... part.
Unfortunately, this freezes the whole device after a random amount of time.
Interestingly, I see the same issue when configuring it in DMA Manual mode just as in the cyfxusbuart example.
How should I implement this?
Best regards,
Florian
Hi. I'm trying to replicate the original design https://community.infineon.com/t5/Knowledge-Base-Articles/EZ-USB-CX3-Interfacing-with-the-onsemi-AR0234CS-sensor-KBA236855/ta-p/402602 on your board (not the Denebola kit). I don't see any access to the sensor on the I2C bus. I started looking at the source code, I see the functions CyCx3ImageSensorInit(void), CyCx3ImageSensorSleep(void), CyCx3ImageSensorWakeup(void), but they are not called anywhere. What does it mean? I started adding CyCx3ImageSensorInit(); to the source code,- it works(there is activity on I2C) only up to the line CyU3PTimerCreate (&Cx3ResetTimer, cycx3appprogrestimer, 0x00, TIMER_PERIOD, 0, CYU3P_NO_ACTIVATE);. After this line,- does not work. The sensor connection is standard 4 lines, the generator on the sensor board is 27MGz. I attach a photo of the installation and terminal output. e-CamView sees the device, but cannot read frames.
Show LessWe have created a FX3S driver for resell and it has been used successfully since 2022.
os : win 10 x64, win 10 x86; driver version : 1.2.3.20; chip : fx3s.
The device is now connected to a newly installed Windows 10 computer, and the (resell) driver is installed using the 'Device Manager' and 'Update driver' followed by 'Browse my computer for drivers'. The installation process reports:
The driver for this device has been blocked from starting because it is known to have problems with Windows. Contact the hardware vendor for a new driver. (Code 48)
How can this be fixed?
Show Less