USB superspeed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
Hi,
We are facing the same type of issue mentioned USB Speed change event behavior in some mother boards with "AUTO" XHCI mode configuration in BIOS and the endpoint reconfiguration for USB reset event solves this issue.
But we are working with CX3 based camera with Type-C connector.
In some motherboards boot up below is the sequence of enumeration.
- Camera connects to PC as a High Speed device.
- Host issues a reset.
- Camera comes up as Super Speed device.
In ideal condition we are establishing the USB 3.0 connection as mentioned Type C connector enumeration issue
1.This works fine in one orientation (where we will toggle the Type-C mux GPIO after a CY_U3P_USB_EVENT_SS_COMP_ENTRY or CY_U3P_USB_EVENT_USB3_LNKFAIL).
2.With the other orientation we are configuring the MUX wrongly and the device end up working as a High Speed device even after a reset from host.
To make this work we have implemented a simple logic where we will disable the USB PHY using CyU3PConnectState(CyFalse, CyFalse) and toggle the MUX GPIO again for every endpoint re-configuration process.
The problem we face in scenario 1 is we are receiving multiple reset requests during the entire boot up process and not getting connect request as USB 3.0 immediately after toggling the MUX.
Is our fix recommended and need advice if there is any other method to solve this.
Regards,
Indumathi.
Show Lesshi
CyU3PI2cPreamble_t works well if the i2c address is only 2-4 bytes width. but if the register address width is longer than 8 bytes, it is hard to use this structure.
who know how configure CyU3PI2cPreamble_t if the register length longer then 8 bytes.
for example, if i want to read register address 0x123456789acbde1234, the value with is 10byes, how to configure?
i tried to separate write/read sequence using following two functions. but cannot work seems due to clock-stretching. who can help here?
CyU3PReturnStatus_t
GW5200_SensorReadNB(uint8_t SlaveAddr, uint8_t *buf, int n)
{
CyU3PReturnStatus_t apiRetStatus=CY_U3P_SUCCESS;
CyU3PI2cPreamble_t preamble;
int i = 0;
preamble.buffer[0] = SlaveAddr;//0x21;
preamble.length = 1;
preamble.ctrlMask = 0x0000;//After the second byte,need to restart the I2C communication
apiRetStatus = CyU3PI2cReceiveBytes (&preamble, buf, n,0);
if (apiRetStatus == CY_U3P_SUCCESS)
{
IMX390_GW_delay(800);
}
else
CyU3PDebugPrint (4, "GW5200_SensorReadNB failed Error Code = %d\n",apiRetStatus);
#if 1
CyU3PDebugPrint (4, "read:");
for(i = 0; i < n; i++)
{
CyU3PDebugPrint (4, "0x%x ", buf);
}
CyU3PDebugPrint (4, "\r\n");
#endif
return apiRetStatus;
}
CyU3PReturnStatus_t
GW5200_SensorWriteNB(uint8_t SlaveAddr,uint16_t count, uint8_t *buf)
{
CyU3PReturnStatus_t apiRetStatus=CY_U3P_SUCCESS;
CyU3PI2cPreamble_t preamble;
int i = 0;
preamble.buffer[0] = SlaveAddr; /* Slave address: Write operation */
preamble.length = 1;
preamble.ctrlMask = 0x0000;
apiRetStatus = CyU3PI2cTransmitBytes (&preamble, buf, count, 0);
if (apiRetStatus == CY_U3P_SUCCESS)
{
IMX390_GW_delay(800); /* known issue for SDK I2C */
}
else
{
CyU3PDebugPrint (4, "GW5200_SensorWriteNB error!\r\n");
}
#if 0
CyU3PDebugPrint (4, "write:");
for(i = 0; i < count; i++)
{
CyU3PDebugPrint (4, "0x%x ", buf);
}
CyU3PDebugPrint (4, "\r\n");
#endif
return apiRetStatus;
}
thanks
xingxing
Hi,
we are using CX3 to get data from image sensor (ONSemi AR0330CM) + image signal processor (ONSemi AP1302) over USB to host PC. We would like to get maximum possible frame rate, but we are kinda stuck now.
We have configured all components to get 1920x1080 px, and we are able to get about 51 fps in YUV 4:2:2. In order to achieve this, we had to set THS-EXIT parameter in AP1302 to increase pause between the frames on MIPI interface. We believe that this parameter is limiting us from getting faster frame rates. We have development kit for sensor + ISP and we have verified that same settings on the kit yield same results, and reducing THS-EXIT causes fps increase.
However if we reduce THS-EXIT on our hardware, we do not get picture from the UVC interface, instead there are errors reported in MIPI error thread, namely "Unrecoverable Sync Byte Error".
I would like to understand why this happens, but I do not see any reason why there would be some pause between packets required in order to get CX3 interface working as intended. I have thought that there should be no need to any pauses or waits as CX3 MIPI received internally uses multiple threads with separate buffers and is able to switch instantly and seamlessly between the threads writing to different buffers.
Can anyone possibly explain how is THS-EXIT related other parameters and give us some hint of what we can change so we can reduce this value even further?
Thanks a lot for any ideas, hints and other pieces of information that might help us.
EDIT 04/04/2019:
After some more experimenting we have concluded that value required for THS-EXIT depends on packet size. If we increase packet size, we have to increase THS-EXIT as well. It looks like CX3 does need some time to process the data it has received into it's buffers before it can receive another packet.
Can anyone clarify if there is any strict requirement for pauses between MIPI packets, and how to calculate required pause length?
Best regards
Ivo
Show LessI have inherited some firmware code for our CX3 chip, which is connected to an OV4689 sensor and streaming video over USB 3 to the PC. The person who wrote the firmware code originally needed to send/receive (3K worth of) camera calibration data over USB, and couldn't figure out how to do that. So, they created separate dma channels to send and to receive "side-band data" to/from the PC. I don't understand this code very well. I would have thought ONE dmachannel, bi-directional, would be enough, but this person created two...
The way it's supposed to work is by handshake. The PC sends a request to the firmware, the firmware processes the request, and sends a reply. The firmware never issues a DMA request to the PC first. This should make it straight-forward.
When the PC sends a request to the CX3, I get notified in the DMA callback. For whatever reason, the programmer wrote it so there is a background, application thread, and when the callback gets called that a DMA buffer was received, an event is set, and the background thread goes and reads the event and does what is necessary (like send calibration data).
The DMA "produced" callback calls DMAChannelGetBuffer( RecvStream ), then reads the packet, then calls DmaChannelDiscardBuffer( ), then sets the event for the background thread. The background thread then calls DmaChannelGetBuffer ( SendStream ), copies the calibration data, then calls DmaChannelCommitBuffer( ).
On the PC side, I've opened up an overlapped IO file handle and am sitting there waiting for reads from the sideband USB channel. No rocket science there.
NOW WHAT IS WEIRD:
If anywhere in the background thread, I call CyU3PThreadSleep(), even with a timeout of just 1, the DMA transfer won't happen. DmaChannelGetBuffer( SendStream ) will sit there and time out! A timeout would seem to imply the send buffer is "busy", but since this is the first packet I'm sending over DMA, I don't see how it could be busy. There is something else weird at work here.
Anybody have any good advice, thoughts?
Show LessI would like to connect a FX3 with a microcontroller like STM32H7 equipped with a FMC, FMC stands for Flexible memory controller, a port for connecting RAMs and flashes, short description from
https://www.st.com/resource/en/datasheet/stm32h750vb.pdf
Flexible external memory controller with up to 32-bit data bus:
– SRAM, PSRAM, NOR Flash memory clocked up to 133 MHz in synchronous mode
– SDRAM/LPSDR SDRAM
– 8/16-bit NAND Flash memories
more details
chapter 21
I have the following questions:
- I have found examples of FX3 connected to FPGA's but not to processor, if there is one example, could you highlight?
- would it be possible to direct connect micro and FX3 or there is a clear need of some sort of buffer/translator from the electrical or logical point of view?
- if the matching works, what could be the best performance I might expect?
I think that FX3 would be configured as FIFO slave as described in
AN65974 - Designing with the EZ-USB® FX3™ Slave FIFO Interface
thanks for your help
Show LessHi,The PMODE[2:0] pin is Z11(USB boot):can find bootload on PC.
But after I download the img file to the USB RAM,PC can't find usb device.I check the clock,voltage are OK.Is CYUSB3014 chip has system on chip?I buy chip from device vendor.
Show Less
I need to set up a DMA transfer from my CX3 to my PC. On the CX3 side, every 5 seconds, I want to send a DMA packet over USB. On the PC's side, I want to set up a loop that will sit and wait for information to come over the USB bus, and when received, display it. In an infinite loop. I need some information on how, on the CX3, to set up the DMA channel, and how, on the PC, to open up the WinUsb device and read the incoming packets in a loop.
There is a "bounty" on this, we'll pay $ for good help... I'm not kidding. We're stuck and at the end of our tether. We have most of the code to do this, but there are some nagging issues...
Show LessHello,
We are using FX3S cypress device (CYUSB3025) which is connected with our Host processor at USB 3.0 interface. The application running on Cypress FX3S device is MSC (mass storage). An eMMC and sd card are connected at the storage ports of cypress device.
We are getting an random issue with the cypress device.
At few power ups, Host processor do not not detect the cypress device and ultimately no access to eMMC. The issue is observed for 1 out of every 10 power ups.
for debugging, we have seen the UART prints of Cypress device, i have attached the logs of CYPRESS UART for passing and failing case.
The above observation is with firmware version 1.3.1.
We have also updated the Cypress boot image with firmware 1.3.4, but the problem is still there with problem frequency 1 out of 15 power ups.
Please look at the UART pass/fail logs and suggest us that what can be the issue and also how can we debug this issue?
Thanks and Regards
Tarang Jindal
Show LessI am using a lauterbach JTAG model LA-3500 DEBUG-USB3 for ARM9 with Denebola board based on CX3.
When I flash my own bootloader in SPI, It is not possible to debug with JTAG using the following command:
D.LOAD D:\Dev\SmileFW\Bootloader_v2\CX3\Bootloader_v2\Release\Bootloader_v2.elf /NOCODE
On the other hand if the spi is empty (full of 0xff) It is possible to step , put break point .
I don't figure out why it is not possible to debug with SPI flash loaded ?
Show LessHello,
I'm currently trying out the "UsbSpiDmaMode" example and when i try so send data to my sensor, the CYUSB3KIT-003 keep sending data over spi and doesn't stop.
Also the LED2 (the Blue one) keep glowing, but i think that's because SSN is connected to the led.
best regards,
Matthias
Show Less