USB superspeed peripherals Forum Discussions
Hi all,
I want to setup many producer to many consumers as below:
1. CY_U3P_UIB_SOCKET_PROD_2 and CY_U3P_CPU_SOCKET_CONS. DMA channel create mode is CY_U3P_DMA_TYPE_MANUAL_IN. this is for receive endpont 0x02 data for fx3 do command passer.
2. CY_U3P_CPU_SOCKET_PROD and CY_U3P_PIB_SOCKET_1. DMA channel create mode is CY_U3P_DMA_TYPE_MANUAL_OUT. this is fx3 passer command to write data to extern FPGA with P-port( use GPIF II master desgin )
3. CY_U3P_PIB_SOCKET_0 and CY_U3P_UIB_SOCKET_CONS_6. DMA channel create mode is CY_U3P_DMA_TYPE_AUTO. this is fx3 passer command to read data from extern FPGA with P-port.
4. CY_U3P_CPU_SOCKET_PROD and CY_U3P_UIB_SOCKET_CONS_6. DMA channel create mode isCY_U3P_DMA_TYPE_MANUAL_OUT CY_U3P_DMA_TYPE_MANUAL_OUT. this is fx3 passer command to send data from cpu to endpoint 0x86.
In my case, i use CyU3PDmaChannelDestroy function to transform dam mode but destroy dma need to spend too much time
How do I choice which use multi channel DMA mode to design for my need?
all
Thank you!!
Show LessWhen EZ-USB CX3 is powered by USB, how to judge whether CX3 is in normal working state? When the USB is connected to the computer, the computer does not respond, that is, it fails to enumerate the USB. What should I do?
Show LessHi
We are working on a solution that involves i2C communication between the XC7A35T-1FTG256C and FX3 DK and are experiencing problems reading data from the FPGA register.
The issue is that the FX3 does not release the Bus after sending the device address followed by a read bit to the FPGA.
The register we are reading from is 0x40 and has one byte of data. The i2C read code is as follows:
CyU3PReturnStatus_t Status;
CyU3PI2cPreamble_t preamble;
preamble.length = 3;
preamble.buffer[0] = 0xA2; // i2C write address
preamble.buffer[1] = 0x04;
preamble.buffer[2] = 0xA3; // i2C read address
preamble.ctrlMask = 0x0002;
uint8_t buffer[] = {0};
Status = CyU3PI2cReceiveBytes(&preamble, (uint8_t *)&buffer, 1, 0);
CheckStatus("I2C_Write", Status);
I have attached an image of the results we get from the signal analyzer.
How do we implement the i2C read transaction in such a way that it releases the bus after sending the read address to the FPGA?
Thanks
Show LessI want to achieve an interrupt timer, how to achieve it?
I have seen from the data that it can be implemented by GPIO interrupt, but it can't generate interrupt. Here is my code:
//Initialization code:
CyU3PGpioClock_ t gpioClock;
CyU3PGpioComplexConfig_ t gpioConfig;
CyU3PReturnStatus_ t apiRetStatus = CY_ U3P_ SUCCESS;
/* Init the GPIO module */
- gpioClock.fastClkDiv = 2;
- gpioClock.slowClkDiv = 0;
- gpioClock.simpleDiv = CY_ U3P_ GPIO_ SIMPLE_ DIV_ BY_ 2;
- gpioClock.clkSrc = CY_ U3P_ SYS_ CLK;
- gpioClock.halfDiv = 0;
apiRetStatus = CyU3PGpioInit(&gpioClock, CyFxGpioIntrCb);
CyU3PGpioComplexConfig_ t gpioComplexConfig;
- gpioComplexConfig.outValue = CyFalse;
- gpioComplexConfig.inputEn = CyTrue;
- gpioComplexConfig.driveLowEn = CyFalse;
- gpioComplexConfig.driveHighEn = CyFalse;
- gpioComplexConfig.pinMode = CY_ U3P_ GPIO_ MODE_ STATIC;
- gpioComplexConfig.intrMode = CY_ U3P_ GPIO_ INTR_ TIMER_ THRES;
- gpioComplexConfig.timerMode = CY_ U3P_ GPIO_ TIMER_ POS_ EDGE;
- gpioComplexConfig.timer = 0;
- gpioComplexConfig.period = 0x00000001; // Reset after each interrupt
- gpioComplexConfig.threshold = 0x00000001; //Generate interrupt every 125us
apiRetStatus = CyU3PGpioSetComplexConfig(GPIO_ TIMER, &gpioComplexConfig);
if (apiRetStatus != CY_ U3P_ SUCCESS)
{
vJackyTestPrintErr("CyU3PGpioSetComplexConfig failed: %d\n",apiRetStatus);
}
/*****************************************************/
//Interrupt callback function:
/****************************************************/
void CyFxGpioIntrCb (
uint8_ t gpioId /* Indicates the pin that triggered the interrupt */
)
{
if(GPIO_ TIMER == gpioId)
{
dwTimeCountNow++;
if(dwTimeCountNow>TIME_ COUNT_ MAX)
{
dwTimeCountNow = 0;
}
}
}
/*******************************************/
//How can timer interrupt be generated? If GPIO can interrupt timer, is there a problem with my code?
//I'm looking forward to the teacher's reply
Show LessHi team,
i am woring on cx3 with a raw12 tof sensor. I want know how does raw12 align 16 bits. The pixel looks high side align four 0, can i modify it to add 0 to low side?
Show Less您好,
目前有一个相机的项目,需要使用一款USB芯片,,要求这个芯片能具有读卡器的功能,给客户推荐的型号是:CYUSB3035, 由于客户还要求相机可以连接PC机进行通信,这样的话,是不是额外的在添加一个CYUSB3014芯片,若使用2个USB芯片,成本就会上去,能否有一个方案,既可以进行读卡,也可以和PC机进行通讯。
谢谢
Show LessHi
I am writing to you behalf of my customer.
My customer is using SD3 (CYUSB3025) as eMMC interface on S-port0.
They have some question about default configuration on S-port0.
To iitiaize SIB block in cyfx3_msc.c,
intfParams.resetGpio = 0xFF; /* No GPIO control on SD/MMC power. */
intfParams.rstActHigh = CyTrue; /* Don't care as no GPIO is selected. */
intfParams.cardDetType = CY_U3P_SIB_DETECT_DAT_3; /* Card detect based on SD_DAT[3]. */
intfParams.voltageSwGpio = 45; /* Use GPIO_45 for voltage switch on S0 port. */
intfParams.lvGpioState = CyFalse; /* Driving GPIO low selects 1.8 V on SxVDDQ. */
intfParams.writeProtEnable = CyFalse; /* Write protect handling enabled. */
intfParams.lowVoltage = CyTrue; /* Low voltage operation enabled. */
intfParams.useDdr = CyTrue; /* DDR clocking enabled. */
intfParams.maxFreq = CY_U3P_SIB_FREQ_104MHZ; /* No S port clock limitation. */
intfParams.cardInitDelay = 0; /* No delay required between SD card insertion
before initialization. */
Question#1.
intfParams.useDdr = CyTrue; /* DDR clocking enabled. */
as CyTrue for DDR clocking, Does it mean both SDR and DDR can be used? or work as only DDR mode?
Question#2.
intfParams.maxFreq = CY_U3P_SIB_FREQ_104MHZ; /* No S port clock limitation. */
when they measured clock, SD3's eMMC clock is 48Mhz. They would like to 52MHz as Max speed of eMMC 4.41. but, Why 48MHz?
As my personal opinion, they are using 48MHz crystal into SD3 (CYUSB3025). So, SD_clock seems to have 48MHz.
To use max 52Mhz, SD_clock should be 26Mhz or 52Mhz into SD3 input. Is my understanding correct?
if there is any method on firmware to increase SD_clock on eMMC interface, please let me know.
Question#3.
Can USB Host access directly some register in SD3 (CYUSB3025) (for example, GPIF Configuration Register : 0xE0014000)?
Can USB Host access (read/write) directly some register in SD3 (CYUSB3025) (for example, GPIF Configuration Register : 0xE0014000)?
if yes, please let me know how to access the register by USB host.
Regards,
Jake
Show LessI referred AN75779 How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video
Class (UVC) Framework
I followed the chapter 3.6 Implementing Image Sensor Interface Using GPIF II Designer in above document.
I have error ( atleast one incoming transition in state machine)
With Regards & Thanks
Esakki
Show LessHi team,
i want usb uart to send binary data, i tried CyU3PDebugPrint lile CyU3PDebugPrint(4, mybinarybuff);
but all the data after 0 byte will be remove. can somebody help me ?
Show LessI have an LED controller where the RGB value is programmed with 24 bits of input data (attached to a GPIO pin)
The timings are 1.2 uS per bit. A high bit would be 0.9 uS high and 0.3 uS low - and a low bit is the opposite with 0.3uS High and 0.9uS Low.
So my question is how would I set up a GPIO pin on the FX3 to send a sequence of 24 bits at that speed? I was trying to use the example from:
Pulse on FX3 Complex GPIO – KBA228439
but wasn't able to get anything working since it seems like the calls between PulseNow would mess up the timing between bits. Thanks for the help!
Show Less