USB superspeed peripherals Forum Discussions
Hi,We need the camera to initialize, and the mipi on the CX3 can be initialized successfully. If the new camera does not have the initial success, then the CX3 initialization will report the error AppInit:MipicsiInit Err = 0x55.
Our camera USES ov9282, which is the mipi data that we initialize and send to cx3.
In addition, does cx3 support the continue mode of mipi?Is there any continue mode information about the cx3 mipi?
Show LessDear SIr,
I add hid device to my CX3 UVC code based on Memo_CX3_UVC_HID_ButtonTrigger.zip. I can see compositive device on my WIN10 system and also may send KEY to PC occasionally.
But I found it is unstable, and then I review MouseDemo provided by SDK1.3.3 and add some error-recovery code, but it still cannot be stable
1: before UVC appstart is called, (amcap is not started) , gpio event occurs and the first 'x' can be sent without error ,but no 'x' char is received by PC
and in the following gpio event, HID key function is not working, ' Get Buffer 1 Failed 69', 69 is x045,that means ,
CY_U3P_ERROR_TIMEOUT, /**< Timeout on relevant operation. */
2: after amcap is started , and video appears, gpio event occurs, the "x" char can be seen(I open a txt file, 'x" can be seen when I push the button), and then
if amcap is close, the hid key function ,return Get Buffer 1 Failed 69 again!
3. Then when amcap is restarted, amcap is not working,no video appear, maybe HID error also destroy UVC state machine.
4. HID endpoint and dma channel are created in CyCx3UvcAppInit(); which is started before main thread running.
Can you give me some advice? the following code sections are much similar with CX3_UVC_HID_ButtonTrigger.zip. and add extra error recovery codes based on MouseDemo app provided by SDK1.3.3.
Best regards!
David
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CyU3PDmaBuffer_t buf_p;
uint8_t KeyBuf[6] ={0};
uint32_t My_Hid_SendKey(uint8_t keybuf[])
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
status = CyU3PDmaChannelGetBuffer (&glChHandleHID, &buf_p, 1000);// see SDK1.3.3 mousedemo
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4,"Get Buffer 1 Failed %x \n\r",status); //mady: Get the current buffer of the DMA Channel
CyU3PDmaChannelReset (&glChHandleHID); // see SDK1.3.3 mousedemo
CyU3PDmaChannelSetXfer (&glChHandleHID, 0); // see SDK1.3.3 mousedemo
status = CyU3PDmaChannelGetBuffer (&glChHandleHID, &buf_p, 1000);// see SDK1.3.3 mousedemo
if (status != CY_U3P_SUCCESS)
return status;
// esUVCAppErrorHandler (status);
}
CyU3PThreadSleep (63);
buf_p.buffer[0]=0x00;
buf_p.buffer[1]=0x00;
buf_p.buffer[2]=0x1b; //mady: Fill the contents of the buffer to send character 'x'
buf_p.buffer[3]=0x00; //mady: 6 key press can be sent at a time. Here we send 'x' alone for key press.
buf_p.buffer[4]=0x00; //0x1B is the code for 'x' (taken from HID usage table) we set the rest 5 key presses as none.
buf_p.buffer[5]=0x00;
buf_p.buffer[6]=0x00;
buf_p.buffer[7]=0x00;
status = CyU3PDmaChannelCommitBuffer (&glChHandleHID, 8, 0); //send 'x' to PC
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4,"Commit Buffer 1 Failed %x \n\r",status); // see SDK1.3.3 mousedemo
CyU3PDmaChannelReset (&glChHandleHID); // see SDK1.3.3 mousedemo
CyU3PDmaChannelSetXfer (&glChHandleHID, 0); // see SDK1.3.3 mousedemo
//return status;
// esUVCAppErrorHandler (status);
}
else{
//After sending 'x', we should tell the PC has the Key has been released. Other wise it will continuously print 'x'
status = CyU3PDmaChannelGetBuffer (&glChHandleHID, &buf_p, 1000); // see SDK1.3.3 MouseDemo
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4,"Get Buffer 2 Failed %x \n\r",status);
CyU3PDmaChannelReset (&glChHandleHID);
CyU3PDmaChannelSetXfer (&glChHandleHID, 0);
status = CyU3PDmaChannelGetBuffer (&glChHandleHID, &buf_p, 1000); // see SDK1.3.3 MouseDemo
if (status != CY_U3P_SUCCESS)
return status;
//return status;
// esUVCAppErrorHandler (status);
}
buf_p.buffer[0]=0x00;
buf_p.buffer[1]=0x00;
buf_p.buffer[2]=0x00;
buf_p.buffer[3]=0x00;
buf_p.buffer[4]=0x00; //Buffer with all zeros to tell PC that no key is pressed and all keys are released
buf_p.buffer[5]=0x00;
buf_p.buffer[6]=0x00;
buf_p.buffer[7]=0x00;
status = CyU3PDmaChannelCommitBuffer (&glChHandleHID, 8, 0);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4,"Commit Buffer 2 Failed %x \n\r",status);
CyU3PDmaChannelReset (&glChHandleHID);
CyU3PDmaChannelSetXfer (&glChHandleHID, 0);
//return status;
// esUVCAppErrorHandler (status);
}
}
return status;
}
////////////////////////////////////////////////////////////////////////////////////////////
// HID Dmacallback, it seems just printing debug info
//////////////////////////////////////////////////////////////////////////////////////////
void
CyFxHIDDmaCallback (
CyU3PDmaChannel *chHandle, /* Handle to the DMA channel. */
CyU3PDmaCbType_t type, /* Callback type. */
CyU3PDmaCBInput_t *input) /* Callback status. */
{
CyU3PDmaBuffer_t buf_p;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
CyU3PDebugPrint (4, "CONS");
CyU3PDebugPrint (1,"%d",cnt);
CyU3PThreadSleep (64);
//
// CyU3PThreadSleep (1000);
// CyU3PDeviceReset (0);
//status = CyU3PDmaChannelGetBuffer (chHandle, &buf_p, CYU3P_NO_WAIT);
// status = CyU3PDmaChannelCommitBuffer (chHandle, 8, 0);
}
/////////////////////////////////////////////////////////////////////////////////
// HID endpoint dma channel reate
/////////////////////////////////////////////////////////////////////////////////
#ifdef HID
endPointConfig.enable = 1;
endPointConfig.epType = CY_U3P_USB_EP_INTR;
endPointConfig.pcktSize = 64;
endPointConfig.isoPkts = 0; /* KYS: Was 1 */
endPointConfig.streams = 0 ;
endPointConfig.burstLen = 1; /* KYS: Added */
/* Configure the Endpoint */
status = CyU3PSetEpConfig(0x85,&endPointConfig);
if (status != CY_U3P_SUCCESS)
{
/* Error Handling */
CyU3PDebugPrint (4, "USB Set Endpoint config failed, Error Code = %d\n",status);
//CyFxAppErrorHandler(status);
}
else
{
CyU3PDebugPrint (2,"HID EP Created\n\r");
}
CyU3PUsbFlushEp (0x85);
dmaCfg1.size = 64;
dmaCfg1.count = 2;
dmaCfg1.prodSckId = CY_U3P_CPU_SOCKET_PROD;
dmaCfg1.consSckId = CY_U3P_UIB_SOCKET_CONS_5;
dmaCfg1.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg1.notification = CY_U3P_DMA_CB_CONS_EVENT; //Create a DMA Channel Betwwen CPU and USB to send Keyboard data to PC
dmaCfg1.cb = CyFxHIDDmaCallback;
dmaCfg1.prodHeader = 0;
dmaCfg1.prodFooter = 0;
dmaCfg1.consHeader = 0;
dmaCfg1.prodAvailCount = 0;
status = CyU3PDmaChannelCreate (&glChHandleHID,
CY_U3P_DMA_TYPE_MANUAL_OUT, &dmaCfg1);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PDmaChannelCreateHID failed, Error code = %d %d\n", status,glChHandleHID.state);
CyU3PDebugPrint(4, " %x ",glDmaSocketCtrl[CyU3PDmaGetIpNum (CY_U3P_UIB_SOCKET_CONS_0 | HID_EP)][CyU3PDmaGetSckNum (CY_U3P_UIB_SOCKET_CONS_0 | HID_EP)].singleHandle);
CyCx3UvcAppErrorHandler (status);
}
else
{
CyU3PDebugPrint (2,"HID DMA Created\n\r");
}
status = CyU3PDmaChannelSetXfer (&glChHandleHID, 0);
if (status != CY_U3P_SUCCESS)
{
CyCx3UvcAppErrorHandler (status);
}
#endif
Show LessI tried to start GPIF mashine as in SRAM example using CyFx3BootGpifSMStart function. In debug mode CyU3PGpifLoad function return status value = 0 but CyFx3BootGpifSMStart function return value = 68. How can I fix this error? Where is error code discriptions?
Show LessHello.
I use FX3 super speed exploere kit for control display
I want output text
But size of array for fonts is very big
Please, say me, how placr array in flash memory&
Key words PROGMEM and __flash is not using for this chip?
Show LessI'm tried to add HID on UVC to be a Comopsite device but on WIN10 USB3.0 interface the HID didnt work when suspend occur
back to HID demo on SDK, I change CyU3PConnectState(CyTrue,CyFalse) to CyU3PConnectState(CyTrue,CyTrue) make it USB3.0 device doesnt work too
anyone get any idea about HID working on WIN10 USB3.0 environment?
Show LessWho can help me ? under what circumstances trigger cy_u3p_usb_event_rest event? because when i load a .img to ram,fw can receive 2 times cy_u3p_usb_event_rest.
Show LessHi everyone.
I have some problem.
cuz when i try to JTAG debugging at Explorer Kit. USB2.0 port was not working
not show anything...
i try below step.
1. insert j4 jumper
2. connect Explorer Kit to my computer by usb 3.0 cable
3. driver read success ( ' Cypress FX3 USB BootLoader Deevice' )
4. connect usb 2.0 cable
5. not working, not show anything
when i see user guide. there write down like 'automatically install' and 'trouble shooting' but in that case was driver was pop up at device manager.
but in my case, any pop up wasn't show at my computer. so, cant 'automatically install' and cant 'istall ownself'
how can i do?
anybody have same problem?
Show LessHello,
I would have liked to use the example provided by the document www.cypress.com/?docID=45797 , " Designing with the EZ-USB® FX3™ Slave FIFO Interface"
In the pdf it mentions several files like SF_streamIN.img, slaveFIFO2b_streamIN.sof, TEST.txt, ... that I cannot manage to find anywhere. they are not provided in the sdk 1.3, and google can't find any hold of them either.
where can I get a copy of this project's files ?
Show LessI use cyusb3014 to transfer data with fpga through GPIF.
FPGA can receive data from cyusb3014 but cyusb3014 don't receive data from fpga. the slwr is low and sloe is high when fpga send data to cyusb3014 so i believe the connection and source code should be right.
may cyusb3014 some feature gpif port broken?
may R_USB3 don't use 1% 200ohm cause this problem?
Show Less