FX3 / CX3 Firmware for Streaming RAW Image Data using Cypress Driver

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

For Image formats that are not supported by the UVC, (like RAW), the attached firmares can be used as reference (FX3 and CX3 firmwares attached)

   

The main difference between the UVC firmwares and the firmware attached below are:

   

(i) Vendor Commands are used to Start and Stop streaming rather than UVC Class Specific Control requests. Vendor command 0x99 is sent from PC to start the streaming. Vendor command 0x88 is for stopping the streaming in these firmwares.

   

(ii) These firmwares have normal Cypress Descriptors enabling the Device to bind to Cypress Driver (cyusb3.sys) unlike the UVC Firmwares that have UVC Descriptors and bind to UVC Drivers.

   

(iii) No UVC Headers are added to the Image data.

   

(iv) No memory is allocated for UVC Headers or footers during DMA Channel Creation

   

(v) The data streaming with  the attached firmware can be tested using Cypress Streamer Application

   

Note:

   

1a) In the FX3 firmware attached below, the sensor.c and sensor.h files are incomplete without any sensor configuration values. The user has to fill those files with the values of his/her sensor. Cypress would provide comple sensor.c and sensor.h files for MT9M114 sensor, provided the customer requests for the same via Cypress tech support along with an NDA signed with Aptina.

   

1b) In the FX3 firmware, enable the macro "#define CY_DRIVER" in uvc.h for the firmware to toggle between UVC and Non-UVC (raw) applications

   

2a) The CX3 firmware attached below uses the OV5640 sensor and the sensor configuration is also done in the firmware (without exposing the actual register values written). Though the OV5640 gives out YUY data, it is treated as RAW data and can be streamed to the host. (for testing purpose only. In the actual implementation, OV5640 settings are replaced by the original RAW Streaming sensor)

   

2b) In the CX3 firmware, enable the macro "#define RAW" in cycx3_uvc.h file to switch between UVC and Non-UVC (raw) firmwares.

   

Regards,

   

- Madhu Sudhan

0 Likes
1 Solution
Anonymous
Not applicable

 Hello Madhu,

   

 

   

We just came across your post and are interested in using CX3 reference code that you have posted.

   

We are working with OV4685 and CX3 RDK. OV4685 gives out RAW10 video format data. We have started going through your code.

   

From what I understood, you have modified to code to create a custom USB class instead of using UVC. Please correct me if I am wrong.

   

Can you please tell us which application you used to capture RAW frames and how did you convert RAW frames to RGB?

   

 

   

Regards,

   

Shakthi

View solution in original post

0 Likes
22 Replies
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Attaching the CX3 firmware

0 Likes
Anonymous
Not applicable

In the 1b) step in order to use non-UVC, should the macro CY_DRIVER be enabled or disabled?

0 Likes
Anonymous
Not applicable

 Hello Madhu,

   

 

   

We just came across your post and are interested in using CX3 reference code that you have posted.

   

We are working with OV4685 and CX3 RDK. OV4685 gives out RAW10 video format data. We have started going through your code.

   

From what I understood, you have modified to code to create a custom USB class instead of using UVC. Please correct me if I am wrong.

   

Can you please tell us which application you used to capture RAW frames and how did you convert RAW frames to RGB?

   

 

   

Regards,

   

Shakthi

0 Likes
Anonymous
Not applicable

 Hi Shakthi,

   

Yes you are right. It transfers frames usnig a custom class (using custom cypress driver) instead of UVC.

   

The host application in this case should be made by the customer's themselves for playing the video. As of now this was just tested using the streamer Application of Cypress which constatly received data and discards them (without attempting to play it as a video).

   

We are planning to create a RAW video player in the future, but we are yet to comeup with a time line.

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hi Madhu Sudhan ,

   

You firmware  FX3_RAWData_Cypress Driver and Descriptors.zip help me a lot. 

   

I use 0x99 to start stream, and use 0x88 to stop stream. I can get the image via Streamer, but the image's SYNC not correct. Could you help me how to solve this issue, (using UVC header in your firmware, UVC code is perfect, and image is very good. ).

   

Thanks a lot.

   

B.R.

   

Bert

0 Likes

Hello BertYu,

   

I was wondering if you got the RAW version you mention here ever worked for you, considering this is a post from last year. I would really appreciate any ideas on what you might have done to get it to work.

   

 

   

Best,

   

Miguel

0 Likes
Anonymous
Not applicable

 Hi Madhu Sudhan,

   

Even we are facing similar kind of issue

   

We are using OV5640 image sensor to capture RAW data.

   

We have came accross this post and using CX3_RAWData_Cypress Driver and Descriptors.zip firmware to stream RAW data. We could send stop/start command without any issue. But while running cypress streamer, after initial few data capture application stops capturing data.

   

What could be the possible root cause?

   

Regards,

   

Sujay

0 Likes
Anonymous
Not applicable

Hi Sujay, Madhu Sudhan,

   

Did any of you successfully stream Raw data from OV5640 sensor? If yes, can you please help share what kind of hardware and software you used?

   

Thank you!

   

Hugang

0 Likes

Hi Sujay,

I have the same issue. Have you solved this problem?

0 Likes

Hi, I also want to get the RAW16 data from my sensor, but i didn't know how to resolve the data transfer from the CX3. Have you solved your problem yet?

0 Likes
Anonymous
Not applicable

Hi everyone,

   

Good job on releasing this piece of code, Madhu Sudhan:)

   

I'm currently working with this firmware but i'm facing a serious problem.

   

Sometimes, very rarely BSOD is occuring. I haven't noticed and correlation with other processes.

   

Did someone has similar problem?

   

Greetings,

   

Sebastian B

0 Likes
Anonymous
Not applicable

Hi,

   

I'm using a Image Sensor with 12-bit Raw Bayer output and the firmware from this topic to capture the data.

   

When I start the stream I retrieved the following error:

   

Error in multichannelcommitbuffer: Code = 71, size = 4000, dmaDone 8

   

How can I capture the data with the Cypress Streamer? In some cases I get a few successes when I started the Streamer before starting the stream with the vendor cmd 0x99 but then only failures...

   

Does the host not fast enough read the data?

   

 

   

Best Regards

   

Rene

0 Likes

had you sloved the problem for get a few successes ?

0 Likes
Anonymous
Not applicable

Hi:

   

I use CX3_RAWData_Cypress Driver and Descriptors.zip firmware to stream RAW data.I use Cypress Streamer Application to test the RAW data of OV5640,but the transfer always fails.why?

   

How can I solve the problem?Thanks a lot.

0 Likes
Anonymous
Not applicable

hi Madhu Sudhan,

   

Can you help to share GPIF-II project for FX3, so I can modify to support 16bit RAW data transfer.

   

Thanks,

   

hal

0 Likes
Anonymous
Not applicable

This seemed like the perfect starting point for the project I am working on which is a scientific imager which needs more control than what is provided in the UVC protocol and it must be raw. We are using the CX3 and OV5640 from OmniVision.

   

Unfortunately this project does not seem to work.

   

1. sending the vendor commands from control center always return error 997 but the firmware receives the command.

   

2. Streamer application is hit or miss but sometimes I can get it to work for a few seconds, but in the firmware I never see a consume event in the DMA callback and subsequently the buffers fill up and firmware gets an error 47 which just stops then starts the streaming, by then the streamer application is off in the weeds. 

   

So has anyone gotten this to work recently as documented here? I also built my own host using CyUSB and XferData which always times out without getting a single byte. Probably not the same issue as I see that Streamer uses overlapping transfer method. For my application I don't really care about the streaming video speed that is mostly to just make sure the sensor is in the right position for the application so it can read a single raw frame.

   

Any thoughts?

Anonymous
Not applicable

Okay, I figured out my problem with error 997 wrong size length.

   

I can get this code working but only at 640x480 once I stream video frames larger than that e.g. 720P, I get DMA sync error 0x47 constantly. I am using Async IO in my home brewed C# application which is very similar to how Streamer does it. This problem persists even if I remove all the YUV422 to RGB processing. Also I see MIPI errors occasionally. 

Hi ffrank.lafon

I have met the same problem with you, had you resolve the problem with error 997 with a large resolution at the end?

0 Likes
napac_2439691
Level 1
Level 1

I am using the cx3 firmware but everytime I program my board the driver is not recognized how can I solve this? 

0 Likes
Anonymous
Not applicable

I am using Windows 8.1 USB Hub cannot see any device when I program my device with Fx3 firmware using Control Center?

Are there any solutions for this issue?

0 Likes
jingc_3301211
Level 3
Level 3
First like received

Hi,

I am using raw sensor and comment CY_DRIVER to enable UVC mode, I can see the  preview image(as expected in wrong color). So the sensor and GPIF II should be both OK.

But if I uncomment CY_DRIVER to get RAW streaming,

before I send 0x99 , the UART prints Error in multichannelcommitbuffer: Code = 71, size = 4000, dmaDone 8

after I send 0x99, it stops to print messages and I can only get a few packets.

fx3.png

0 Likes
gyle_4646071
Level 1
Level 1

cx3 raw streamer is not work.

I have been helped on this issue.
So you link the post.

0 Likes