USB superspeed peripherals Forum Discussions
Hello,
We're using CX3 to transfer data from image sensor to Host app.
Structure: Image sensor - CX3 - Host App (USB2.0 port)
Image sensor: Raw 10, 4000 x 3000 x30fps -> streaming to CX3
I/F: MIPI
It's ok to drop the frame rate but image data should be received by Host App as it's quality (4000x3000)
USB 2.0 bandwidth is low so we couldn't received the image by Host App (the DMA buffer seem to be overwritten)
[Question] Any way to configure DMA buffer of CX3 to transfer this 4K image data to Host App through USB2.0 port without changing image quality?
Regards,
Show LessHi
We implemented uvc streaming application using our sensor on linux in super speed mode on cx3. There are also 2 usb virtual com ports. Everything is working fine while the cx3 is connected to super speed port on PC. We want to use a number of sensors so we connect the cx3 through usb 3 hub. The streaming is always failed after a short time. We get CY_U3P_ERROR_INVALID_SEQUENCE error in commit buffer and application reset doesn't help, we immediately get the same error after DMA channels recreate and reset of state machine. It happens only if we use hub. Are there a known problems using hubs with cx3? May be we should use specific hub model?
Thanks,
Roman Tcharny
Show LessHi,
I want to use CX3 to receive 1280x720p@15hz YUV422 sensor input and My CX3 MIPI Setting is as follow,
CY_U3P_CSI_DF_YUV422_8_2,//CY_U3P_CSI_DF_YUV422_8_2, //CY_U3P_CSI_DF_RAW10, | /* dataFormat */ | ||||
2, | /* numDataLanes */ | ||||
7, | /* pllPrd (0x0F = 15) | */ | |||
333, | /* pllFbd (0x1FF = 511) | */ //400.8MHz 19.2*(333+1)/(7+1)/2^1 = 400.8 | |||
CY_U3P_CSI_PLL_FRS_250_500M, | /* pllFrs | */ | |||
CY_U3P_CSI_PLL_CLK_DIV_8, | /* csiRxClkDiv */ //mipi detect clk 100 mhz , | ||||
CY_U3P_CSI_PLL_CLK_DIV_8, | /* parClkDiv | */ //para 100Mhz | |||
0x0806, | /* mclkCtl | */ | |||
CY_U3P_CSI_PLL_CLK_DIV_2, | /* mClkRefDiv */ //12 400.8/2 / (8+1+6+1) = 12.525 (12.5) | ||||
1280, | /* uint16_t hResolution */ | ||||
1 |
When I use AMPCAP to preview, CX3 Firmware UVCGpifCB always stay in state "CX3_PARTIAL_BUFFER_IN_SCK1" so the DMA callback is not work. What does it mean? How can I debug this issue? Thanks.
Show LessHi,
I used FX3 as a usb control device, then modified the firmware to enumerate the device as a UAC device.
and I want use another DSP board connect to FX3 via I2S.
there is only 1 line for data transfer(I2S-SD), and the DSP board have 2 line for data in/out(ADCDAT/DACDAT)
1. how should I connect the two device?
2. does the FX3's I2S support dumplex-mode?
Thanks.
Show Lessi am interfacing an image sensor to fx2lp
fx2lp CY7C68013A-56LTXC,it has RDY0 AND RDY1 signals
i am referring AN61345 slavefifo code,
my image sensor has LV and FV output,is it compulsary to connect
LV to RDY0
FV to RDY1 in gpif mode
or can i use other fx2lp gpio for LV and FV
For an example PA1 to FV?
i have attached my project gpif interfcace and schematic.
please tell me
Show LessDear Sir,
I use CyU3PGpioComplexUpdate () to update PWM,
but, when threshold = CY_FX_PWM_PERIOD (100 %,high level expected) or threshold =0 (0%,low level expected), the real PWM is 50%.
Does anyone know why?
David
Show LessIf i run FX3,FLAGA is going 1 to 0 and stays 0 forever
FLAG B is going low to high when i request the data from the control centre.
FLAG B is changing ,but FLAG A is not changing??why??
and data is missing in the control centre.
PCLK=100MHZ
I set CyU3PGpifSocketConfigure (0,CY_U3P_PIB_SOCKET_0,3,CyFalse,1);
as per AN65974 app note(EXAMPLE 3,FIGURE 13),
Before running FPGAi am running FX3,
HELP ME
Show LessHi,
I try to build my first project(CYUSB3014, \dma_examples\cyfxbulklpauto) in Eclipse, but it occurs some error. I fix part of them and it still exists other just like the following table.
Where can I find the define of ' CYU3P_AUTO_START '?
Description | Resource | Path | Location | Type |
Symbol 'CYU3P_AUTO_START' could not be resolved | cyfxbulklpauto.c | /USBBulkLoopAuto | line 673 | Semantic Error |
I have sample code for testing the camera streaming from the fx3 when connecting the camera, I have to perform the interrupt transfer by the side when the camera starts streaming,
I have an fx3 board and camera connected, I have used the libuvc and libusb libraries with opencv, I have used in the code to do,
#include <stdio.h>
#include <opencv/highgui.h>
#include <opencv2/core.hpp>
#include <opencv2/opencv.hpp>
#include "libuvc/libuvc.h"
#include "libuvc/libuvc_internal.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <iostream>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/opencv.hpp>
#include <thread>
using namespace std;
using namespace cv;
void cb(uvc_frame_t *frame, void *ptr) {
uvc_frame_t *bgr;
uvc_error_t ret;
IplImage* cvImg;
int wid = frame->width;
int hei = frame->height;
unsigned short data16[wid*hei];
unsigned char * bytedata = (unsigned char*) frame->data;
for(int ii=0; ii < wid*hei; ii++) {
data16[ii] = (unsigned short) (bytedata[2*ii]) | (unsigned short) (bytedata[2*ii+1] << :sunglasses: ;
}
cv::Mat Bayer( hei, wid, CV_16UC1, (void*) data16);
double min, max;
cv::minMaxLoc(Bayer, &min, &max);
cv::Mat bgrmat(wid,hei,CV_16UC3);
cv::cvtColor(Bayer, bgrmat, CV_BayerBG2RGB);
cv::pyrDown(bgrmat,bgrmat);
cv::pyrUp(bgrmat,bgrmat);
bgrmat.convertTo(bgrmat,CV_8UC3);
Bayer.convertTo(Bayer,CV_8UC3);
#if 0
#endif
cv::namedWindow("Test", CV_WINDOW_AUTOSIZE);
cv::imshow("Test", bgrmat);
cv::waitKey(1);
}
void task1() {
struct libusb_device_handle *usb_devh;
uvc_device_handle_t *internal_devh;
struct libusb_device_descriptor desc;
uvc_device_t *dev;
int result;
int recv;
unsigned char data_in[4];
result = libusb_open(dev->usb_dev, &usb_devh);
fprintf(stderr, " result %d\n", result);
}
int main(int argc, char **argv) {
uvc_context_t *ctx;
uvc_error_t res;
uvc_device_t *dev;
uvc_device_handle_t *devh;
uvc_stream_ctrl_t ctrl;
struct libusb_device_handle *usb_devh;
struct libusb_device_descriptor desc;
res = uvc_init(&ctx, NULL);
if (res < 0) {
uvc_perror(res, "uvc_init");
return res;
}
puts("UVC initialized");
res = uvc_find_device(
ctx, &dev,
0, 0, NULL);
if (res < 0) {
uvc_perror(res, "uvc_find_device");
} else {
puts("Device found");
res = uvc_open(dev, &devh);
if (res < 0) {
uvc_perror(res, "uvc_open");
} else {
puts("Device opened");
uvc_print_diag(devh, stderr);
res = uvc_get_stream_ctrl_format_size(
devh, &ctrl, UVC_FRAME_FORMAT_YUYV, 400, 400, 30);
uvc_print_stream_ctrl(&ctrl, stderr);
if (res < 0) {
uvc_perror(res, "get_mode");
} else {
int dummy;
int result;
res = uvc_start_streaming(devh, &ctrl, cb,&dummy, 0);
if (res < 0) {
uvc_perror(res, "start_streaming");
} else {
puts("Streaming for 10 seconds...");
uvc_error_t resAEMODE = uvc_set_ae_mode(devh, 1);
uvc_perror(resAEMODE, "set_ae_mode");
int i;
unsigned char data_in[4];
int recv;
while(1){
result = libusb_interrupt_transfer(devh->usb_devh, 0x82, data_in, 4, &recv, 1000);
printf("%d",result);
for(int i = 0; i < recv; i++)
{
printf("%02x ",data_in[i]);
}
printf("\n");
}
sleep(1);
// }
sleep(200);
uvc_stop_streaming(devh);
puts("Done streaming.");
}
}
uvc_close(devh);
puts("Device closed");
}
uvc_unref_device(dev);
}
uvc_exit(ctx);
puts("UVC exited");
return 0;
}
I have tested the interrupt transfer and camera streaming separately, which is working fine.
Show Less
Dear Sir,
Because CB failure occurs frequently in my CX3 board, I add the following code after CB failure, I want to know whether mipi-error cause this CB failure.
The errCnts is
257,(0x101)
or
,1
or
514(0x202)
or
258(0x102)
when CB failure occurs.
Can anyone explain what's the meaning for errCnts?
David
//read cx3 internal csi2 error status register
uint32_t errCnts=0;
static uint32_t i = 0;
CyU3PMipicsiGetErrors( CyTrue, &errCnts);
CyU3PDebugPrint (4,"\n\rCyCx3UvcAppThread_Entry:CyU3PMipicsiGetErrors %d,i=%d", errCnts,i);
i++;
Show Less