USB superspeed peripherals Forum Discussions
What is the maximum CSI clock frequency that should be used per lane in the FX3 configuration utility?
Hi,
I am currently working in a CX3 project which need command an I2C device which has 1 byte address and 1 byte data.
To do that I have implemented a function based on standard function used to communicated with a Image sensor. But changing the preamble structure in order to work correctly with the Data transfer format showed in slave device's data sheet (see the atached picture Data transfer).
*************************************************************************************************
CyU3PReturnStatus_t I2C_SendToSlave(uint8_t slaveAddr, uint8_t regAddr, uint8_t data)
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
CyU3PI2cPreamble_t preamble;
/* Customizacion del Preamble */
preamble.buffer[0] = slaveAddr;
preamble.buffer[1] = regAddr;
preamble.length = 2;
preamble.ctrlMask = 0x0000;
status = CyU3PI2cTransmitBytes(&preamble,&data,1,0);
CyU3PThreadSleep(1);
return(status);
}
*************************************************************************************************
Nevertheless CX3 is not able to command the I2C device. For this reason, I have capture the bus data in Oscilloscope. So, as you can see in the attached figure named i2c1byte CX3 only send the addres device (0x33) but does not send the address or the data. He send '1' all time instead. Moreover, if I make a debug in firmware, it gives me an error code 0x55, and also 0x4A sometimes, when I call the CyU3PI2cTransmitBytes() function.
So I have a couple of questions :
- ¿Is I2C hard core embedded in CX3 able to send 1 byte address and 1 byte data? . If yes, how could I work properly with it?.
- ¿ Have I any issue in the function code? ¿Why I2C bus does not send the address or data?.
Thanks.
Show LessHello,
On Page 5 of the FX3 SDK troubleshooting guide, it says that
The USB driver in the FX3 SDK monitors the number of USB link errors that are detected by the hardware; and causes a re-enumeration when the number of errors crosses a threshold value (about 64 errors) within a 1 second period. This code is not expected to come into play on a functional link, because there will be no more than one or two errors per second happening. If the device is re-enumerating, it is likely that there is a bad USB link due to bad interconnect cables or traces.
My question is that if this threshold (64 errors) can be modified? Or can this re-enumerating be disabled ? We do not want the USB disconnect. The error handle on the bulk/control endpoint seems easier to do than re-enumerating.
Best regards,
Qiu
Show Less
Hello,
I am trying to connect a Cypress Fx3 superspeed kit with a FPGA board using the synchronous slave FIFO 2bit example.
Data TX(FPGA → FX3) using slave FIFO.
However, after started to TX data from the FPGA, Flag A is high and it does not change its value. (FIFO ADDRESS Value 0b00)
And PKTEND# is working but PtoU Call Back function is not working.
I already checked the constraints and board PINs according to the documentation are well.
Do you know any idea in this problem?
epCfg.enable = CyTrue;
epCfg.epType = CY_U3P_USB_EP_BULK;
epCfg.burstLen = 1;
epCfg.streams = 0;
epCfg.pcktSize = 1024;
CyU3PSetEpConfig(CY_FX_EP_PRODUCER, &epCfg);
CyU3PSetEpConfig(CY_FX_EP_CONSUMER, &epCfg);
dmaCfg.size = 1024;
dmaCfg.count = 2;
dmaCfg.prodSckId = CY_FX_PRODUCER_USB_SOCKET;
dmaCfg.consSckId = CY_FX_CONSUMER_PPORT_SOCKET;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaCfg.cb = CyFxSlFifoUtoPDmaCallback;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
CyU3PDmaChannelCreate (&glChHandleSlFifoUtoP,CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);
dmaCfg.prodSckId = CY_FX_PRODUCER_PPORT_SOCKET;
dmaCfg.consSckId = CY_FX_CONSUMER_USB_SOCKET;
dmaCfg.cb = CyFxSlFifoPtoUDmaCallback;
CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU,CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);
#define CY_FX_EP_PRODUCER 0x01 /* EP 1 OUT */
#define CY_FX_EP_CONSUMER 0x81 /* EP 1 IN */
#define CY_FX_PRODUCER_USB_SOCKET CY_U3P_UIB_SOCKET_PROD_1 /* USB Socket 1 is producer */
#define CY_FX_CONSUMER_USB_SOCKET CY_U3P_UIB_SOCKET_CONS_1 /* USB Socket 1 is consumer */
#define CY_FX_PRODUCER_PPORT_SOCKET CY_U3P_PIB_SOCKET_0 /* P-port Socket 0 is producer */
#define CY_FX_CONSUMER_PPORT_SOCKET CY_U3P_PIB_SOCKET_3 /* P-port Socket 3 is consumer */
GPIF 32bit mode and PCLK 100Mhz
clockConfig.cpuClkDiv = 2;
clockConfig.dmaClkDiv = 2;
clockConfig.mmioClkDiv = 2;
clockConfig.useStandbyClk = CyFalse;
clockConfig.clksrc=CY_U3P_SYS_CLK;
status = CyU3PDeviceInit (&clockConfig);
Hello,
I ran into a situation where all the application threads are unresponsive.
Using tx_thread_info_get() in the DMA callback of the CDC interface this is what it looks like:
The Slave_FIFO_sync, main_thread, gpif_thread, usb_thread and Heartbeat threads are all stuck in state 0(active) and unresponsive.
Since FX3 is a single threaded CPU, I'm curious how this can happen?
How can I go about debugging this? Any ThreadX features I can query for details?
Thanks you!
Show Less
Hello everyone,
I'm planning to buy CYUSB3KIT and build USB link. I searched a few hours for knowledge what exactly usb control center can (or cyusb on Linux) but I don't have clear information. I'm bulding link for testing USB connection in various environments (for example in noise, various quality of wires etc.) and I need to send data and then check if received data are valid. I plan on testing in FS, HS and (if it succeeds) SS speed. Perfectly if application allows me to send known amount of packets with known data (in bulk transfers I saw incrementing 32bit integer) periodically (for example every 5 seconds) - then I can define when USB connection is better or worse in which environment (based in isochronous transfers on data correctness rate). I care about isochronous and bulk/interrupt (with CRC) transfers. I'd like to use examples prepared by Cypress with minimum alterations if possible to my use. My host will be likely Raspberry Pi 4B.
I saw example with bulk and isochronous loopback and also srcsink but no solution for host-to-device transmission with checking data in FX3 device. So I likely use loopback with usb control center/cyusb. But if it allows to make loopback isochronous transfers to-file? And if incrementing 32bit integers means that incrementing values are sending one by one in next packets or use full bandwith to transfer it?
Can I please for informations / screenshot what I can do in usb control center / cyusb?
I also may consider other solutions with that. I am new in USB and FX3.
Thank you for read my message. Sorry if I sorry if I confused it.
Regards, Tom
Show LessHi,
I have two questions about fx3.
Q1: When the CPU is done by software CPU resets(not whole device reset) , are the status of all I/O pins retained?
Q2: What is the maximum current consumption in the following cases?
1.current consumption while RESET# is Low
2.current consumption during RESET RECOVERY TIME
Regards,
Nagata.
Show LessHello,
inside the FX3 firmware the function CyU3PReturnStatus_t CyU3PUsbSetTxDeemphasis (uint32_t value) can be used to set the TX de-emphasis setting for the USB 3.0 signal. The Tx de-emphasis value should be less than 0x1F and default value is 0x11.
USB3 specifies TX de-emphasis from min 3.0 dB to max 4.0 dB (nominal is 3.5 dB).
What is the relation between the digital hex values and the values in dB?
Many thanks in advance
Daniel
Show LessWhat is the maximum current value that can be passed through the GPIO pin of CYUSB3014-BZXI?
Table 9 of the data sheet has a list of Iol and Ioh. Does this solve this question? Is this value per pin? Is there a specified value for the input current?
Thanks,
Tetsuo
Hello,
I tried referencing the pingpong buffer mechanism stated in AN75779 (UVC) for my ADC application. Using a GUI made in visual studio, I'm able to capture data properly:
But there are times when the data is corrupted.
I am using the "bulkEpt.XferData(ref buffer, ref bytes, false);" function to transfer data to and from the FX3 onboard.
Attached is the project source files that I modified to resemble the AN75779 pingpong buffer mechanism. Inside is also the folder containing the modified state machine I use with the firmware.
Thanks,
jl46