- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am working on interfacing ov7670 with CYUSB3KIT-003 as per this blog:
Checked all the signals like PCLK,HREF,VSYNC,XCLK, all looks fine. firmware loaded to FX-3 but failed to display anything on vlc/webcamoid application. Here s the frame/buffer log...
Please help to resolve this issue. What more I should figure out.
Best Regards,
/Ash
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar @JayakrishnaT_76 @Ajeethkumar_P Thank you all for your suggestions and guidance.
I figured it out and I can see the data streaming is there. But I did not understand why it takes VGA(640x483) (even not mentioned in attached DS) instead of VGA(640x480). when I apply 480 there is nothing comes up on host application.
Also, how can I cross check the total number of bytes from sensor to send to host? since there are lot of data is coming on wireshark log through USBCap, where and how can I cross check the 1 frame data? any way to check.....
Please suggest~
Best Regards,
/Ash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
From the UART debug prints, it looks like there are commit buffer failures happening. Could you check the return status of the MultiChannelCommitBuffer API. Note that, it is not recommended to use debugPrints inside a callback function. So you could try either setting an event or assigning the return status to another variable and printing that variable in the infinite for loop.
Is the AN75779 default firmware being used without any modifications?
Could you share the wireshark traces?
Is the host application fast enough to read all the data being sent from FX3.
You could also refer to the Troubleshooting section in the AN75779 Application note.
https://www.infineon.com/dgdl/Infineon-AN75779_How_to_Implement_an_Image_Sensor_Interface_with_EZ-US...
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Thanks for your prompt reply.
I checked that and here is the log....
host is my Desktop PC (win10) with vlc application running on it.
I followed this: https://github.com/circuitvalley/Cypress-FX3-USB3
Please suggest~
Best Regards,
/Ash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Could you answer the remaining questions I have asked in my previous post?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar please find the answers below. Thanks.
- From the UART debug prints, it looks like there are commit buffer failures happening. Could you check the return status of the MultiChannelCommitBuffer API. Note that, it is not recommended to use debugPrints inside a callback function. So you could try either setting an event or assigning the return status to another variable and printing that variable in the infinite for loop.
2. Is the AN75779 default firmware being used without any modifications?
- I followed this: https://github.com/circuitvalley/Cypress-FX3-USB3
3. Could you share the wireshark traces?
- please check attached file.
4. Is the host application fast enough to read all the data being sent from FX3.
- yes seems.
5. You could also refer to the Troubleshooting section in the AN75779 Application note.
https://www.infineon.com/dgdl/Infineon-AN75779_How_to_Implement_an_Image_Sensor_Interface_with_EZ-US...
- I will check it. Please let me know what I need to cross check from here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please check (probe) the signals, FV, LV and data lines at the FX3 side, as we suspect that there is no data coming from the image sensor module.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Are the lines probed near the FX3 side?
Could you also probe the PCLK line near the FX3?
If possible, please send the photo of the camera and FX3 interface setup.
Try using the CyU3PGpifGetSMState(..) API in the infinite for loop and print the output using debugprints and kindly share with us the results.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar PCLK, HREF, VSYNCsignals at FX3
I have used 'CyU3PGpioSetValue(), CyU3PGpioInit() under CyU3PGpioSimpleConfig_t().
I didn't understand this. suddenly it showing something in buffers like......
but still there is nothing on display screen (vlc) at host. Please suggest~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Could you use the cyfxgpif2config.h file inside the attached folder instead of the one given in the link you had pointed us to.
Also it is recommended to download the firmware from AN75779 and kindly refer to the document of AN75779 on instructions and details related to the UVC camera application with FX3.
https://www.infineon.com/dgdl/Infineon-AN75779_How_to_Implement_an_Image_Sensor_Interface_with_EZ-US....
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Thanks fro your suggestion. I replaced the "cyfxgpif2config.h" with the old, i am using. I found that its the same file, there is no change in mine (old one). but anyway, I tested it with the new "cyfxgpif2config.h"(you shared) and result is like....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Could you please try the firmware coming with AN75779, pointed in the previous post. It is a tried and tested firmware. This will help us to narrow down the issue, if the issue still persists even after using this firmware.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Please refer to the following KBA : https://community.infineon.com/t5/Knowledge-Base-Articles/FX3-Error-in-CyU3PDmaMultiChannelCommitBuf...
Also try using different host applications.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Thanks. I already going through it but not sure which method I need to implement and test.....
Could you please share any working example code which refers the VGA camera (30fps) interface to FX3.? would be helpful to debug....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The KBA mention this: " This error does not occur in FX3 SDK versions 1.3.5 and later, and if CyU3PDmaMultiChannelGetBuffer()succeeds before CyU3PDmaMultiChannelCommitBuffer() is called."
Do you have any link to download FX3 SDK v1.3.5?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Thank you for sharing this.
I tested this. this only included image file. here is the UART log..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar , what are the changes I need to do if I connected to USB2.0 (HS). seems, FX3 detects the connected USB as "Detected HS USB Connection". Please suggest~
@AliAsgar Also, it shows the Error: Reading Sensor ID failed!
Did you use the 0v7670 configuration? like.....
/* I2C Slave address for the image sensor. */
#ifdef SADDR_HIGH
#define SENSOR_ADDR_WR 0xBA /* Slave address used to write sensor registers. */
#define SENSOR_ADDR_RD 0xBB /* Slave address used to read from sensor registers. */
#else
#define SENSOR_ADDR_WR 0x42 /* Slave address used to write sensor registers. */
#define SENSOR_ADDR_RD 0x43 /* Slave address used to read from sensor registers. */
#endif
#define I2C_SLAVEADDR_MASK 0xFE /* Mask to get actual I2C slave address value without direction bit. */
#define I2C_MEMORY_ADDR_WR 0xA0 /* I2C slave address used to write to an EEPROM. */
#define I2C_MEMORY_ADDR_RD 0xA1 /* I2C slave address used to read from an EEPROM. */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
I had tested the VGA resolution 30fps with a different camera, not the the OV7670.
I have attached the firmware project folder. Modify the sensor.c and sensor.h files according to your sensor, build the project in eclipse and try to program the FX3 with the firmware image obtained.
If the issue still persists, could you please send us a photo of how the camera is connected to FX3, where each connection is seen clearly.
Please let us know the bus width of GPIF interface used?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Thank you. I will check it and update sensor.c and sensor.h as per the ov7670 configuration.
I will share the requested details and log. May I know which sensor module (with VGA, 30fps) you have tested with FX3?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
I had worked with the MT9M114 Onsemi image sensor. By photo I meant the actual FX3 and image sensor connection photo.
Are the UART prints taken after modification of the sensor.c and sensor.h files? What modifications were done?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar . Okay. Please refer the attached files.
yes the UART log is after modifying sensor.c/sensor.h files.
Also, while debugging I found that "request to start video stream' doesn't call, means the check condition is not true here, so it doesn't go inside to srart the ApplinStart().
flag get set to 32 and #define CY_FX_UVC_STREAM_EVENT (1 << 0).
Please suggest!
Best Regards,
/Ash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Hi.
It enters into the streaming "application start " when I run the host application. but this gives me log with "0 buffers".
what should the Full Buf contains..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Hi,
Do I need to reconsider this below definitions again? Please suggest~
/* UVC Video Streaming Endpoint Packet Size */
#define CY_FX_EP_BULK_VIDEO_PKT_SIZE (0x400) /* 1024 Bytes */
/* UVC Video Streaming Endpoint Packet Count */
#define CY_FX_EP_BULK_VIDEO_PKTS_COUNT (0x10) /* 16 packets (burst of 16) per DMA buffer. */
/* DMA buffer size used for video streaming. */
#define CY_FX_UVC_STREAM_BUF_SIZE (CY_FX_EP_BULK_VIDEO_PKTS_COUNT * CY_FX_EP_BULK_VIDEO_PKT_SIZE) /* 16 KB */
/* Maximum video data that can be accommodated in one DMA buffer. */
#define CY_FX_UVC_BUF_FULL_SIZE (CY_FX_UVC_STREAM_BUF_SIZE - 16)
/* Number of DMA buffers per GPIF DMA thread. */
#define CY_FX_UVC_STREAM_BUF_COUNT (4)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Hi, hope you have checked the attached contents in my previous replies. Please suggest, I stuck here.
Best Regards,
/Ash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
What host application you are using to capturing the data from FX3?
Regards,
Ajeeth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Inside MultiChannelGetBuffer API in the prod Event of the DMA callback, assign the value of the dmaBuffer.count to a variable and print this variable along with number of frames and number of buffers. This will give us an idea of how much data is being transmitted to FX3 in each buffer.
Full buffer in this case should be of 16 KB - 16.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Please share your uvc.c file with me.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar Hi,
After comment out "DEBUG_PRINT_FRAME_COUNT", it shows the below log with Full Buf, Partial Buf, Cons Events....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ash,
Do you get the video data when "DEBUG_PRINT_FRAME_COUNT" is commented out?
If there is no video data coming, share with me the Wireshark traces.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AliAsgar This is the log with comment out /* "DEBUG_PRINT_FRAME_COUNT" */
please refer the attached wireshark traces. Thanks.