|
From: zheng r. <zhe...@gm...> - 2018-11-01 02:47:23
|
> > Are you using a Cypress FX2? > Exactly, I am using FX2LP CY7C68013 with a CMOS camera. > You'll need to sit down with paper and pencil to figure this out, but I > suspect you have a problem. I did an FX2 design with a camera that had > exactly this problem. It works OK on some systems, and not on others, > depending on the quality of the host controller. > I am using Ubuntu OS on a DELL laptop workstation. How did you fix the problem finally? Your pixel stream isn't actually continuous during a frame. You get > continuous pixels during a scanline, then there's a pause during > horizontal blanking, and a longer pause during vertical blanking. Your > frame must be 640x564, so it takes two scanlines to get a packet ready > to send. If you count the H blanking, does the timing work out? Will > you accumulate more than 3072 bytes in 125 microseconds? If so, then > you will require an external FIFO to survive the bursting. > [image: tempsnip.png] The camera in may design has resolution of 752x480. When pixel clock is 26.6MHz, the line-valid interval A= 28.2us, line-blank interval Q = 3.52us, shown as the above figure. So a 125us micro-frame will cover 3.94 *(A+Q), and the device will get 752*4=3008 bytes. It looks that this is a little dangerous, right? Also, as you mentioned, if it miss one micro frame, the data will be lost because the device buffer is not very much (4KB) to keep the data until the next micro frame. right? > If I decrease the pixel clock to 24MHz or lower, is it possible to > > make it work? > > It should, yes. This can make the buffer accumulate less data in one micro-frame, but it still have the chance to miss a micro-frame and result in data loss, right? Currently this may be the only thing I can try. I will try it. Back to the original problem, for bulk transfer mode, increasing the buffer size on device side can guarantee smooth data transfer. What is the appropriate usage of isoc transfer mode? also require increasing the device buffer? Thanks a lot. Best regards, Zheng |