how to proof the CX3 transfer the image data is not lost

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
wayu_4276666
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

Hi Sir,

I reference the AN75779, and i know the UVC transfer the image data use BULK mode.

The BULK mode has auto repeat transfer data, when the data was lost.

EX:the frame parameter is

H*V:1920*1080

FPS:30

Image Data type : UYVY 

My Question is:

Q1:How to proof the CX3 transfer the image data is not lost?

Q2:If Q1 can be proof, Do you have this design to Reference?

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Your understanding that AN75779 makes use of Bulk Endpoints for streaming video data is correct.

Please let me know if you are using CX3 (CYUSB3064) or FX3 (CYUSB3014) for your application. This is because the project that comes along with AN75779 is the reference example for FX3 and not CX3. For CX3, you can refer to the example projects in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\cx3_examples

Irrespective of the device used,it samples the data from the image sensor through the GPIF II interface, fills the DMA buffers associated with the P to U channel and sends out through the USB endpoint. When a DMA buffer associated with the P to U channel is filled, a DMA callback function will be invoked with the Callback type being PROD_EVENT. You can check the byte count of valid data inside the PROD_EVENT. You can also keep a track of the number of PROD_EVENTs. Similarly, when the host reads data from the USB endpoint, the callback function will be invoked with the Callback type being CONS_EVENT. By checking the number of PROD and CONS events, you can understand if there is any data loss. If any data loss happens, then the streaming will freeze and the UVC player will remain blank. If the video is seen properly on the UVC player, then there is no data loss.

The bit rate for each resolution supported by the device is reported to the host through the descriptors. If the UVC host application receives less amount of data than what it expects (based on the value reported by the device using descriptors), then the streaming will freeze and the host application will stay blank.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
3 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Your understanding that AN75779 makes use of Bulk Endpoints for streaming video data is correct.

Please let me know if you are using CX3 (CYUSB3064) or FX3 (CYUSB3014) for your application. This is because the project that comes along with AN75779 is the reference example for FX3 and not CX3. For CX3, you can refer to the example projects in the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\cx3_examples

Irrespective of the device used,it samples the data from the image sensor through the GPIF II interface, fills the DMA buffers associated with the P to U channel and sends out through the USB endpoint. When a DMA buffer associated with the P to U channel is filled, a DMA callback function will be invoked with the Callback type being PROD_EVENT. You can check the byte count of valid data inside the PROD_EVENT. You can also keep a track of the number of PROD_EVENTs. Similarly, when the host reads data from the USB endpoint, the callback function will be invoked with the Callback type being CONS_EVENT. By checking the number of PROD and CONS events, you can understand if there is any data loss. If any data loss happens, then the streaming will freeze and the UVC player will remain blank. If the video is seen properly on the UVC player, then there is no data loss.

The bit rate for each resolution supported by the device is reported to the host through the descriptors. If the UVC host application receives less amount of data than what it expects (based on the value reported by the device using descriptors), then the streaming will freeze and the host application will stay blank.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi,

I use the CX3(CYUSB3064) as my application.

The code base is use this example: \EZ-USB FX3 SDK\1.3\firmware\cx3_examples\cycx3_uvc_ov5640.

Thanks for your explain the CX3 operation.

BR ,

Ben

0 Likes

Hello,

Please let us know if you have anymore queries on this.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes