cx3 raw streamer is not work.

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.
gyle_4646071
Level 1
Level 1

Hello.

I'm testing with a Denebola board.

I am trying to transmit image sensor as raw data,

I have referenced the following post.

Original post is

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

but It cannot working with 'CX3_RAWData_Cypress Driver and Descriptors.zip'.


1. When I only turned off  '#define RAW', it worked as uvc.

UVC worked very well.
(The settings of ov5640 were used as sdk library)

2. When I set it to #define RAW, it worked as a usb StreamerExample.
When 0x99,0x88 was sent to the control endpoint, it worked normally. (11.jpg)
However, error code -997 occurred in 'Transfer Data-IN' at the endpoint (12.jpg).

3. How do I transfer and get data normally?
(Send in yuv format as original post author intended)

Regards.

0 Likes
1 Solution

Hello,

I went through the code and found that the issue is with the resolution settings not being written to the MIPI bridge or the image sensor before starting the streaming.

So, in the 0x99 vendor command, you will have to configure (write) the resolution settings to the MIPI block and the image sensor ( this is done in the  CyCx3UvcApplnUSBSetupCB() when CX3_USB_UVC_SET_CUR_REQ is sent) as follows:
1.) Firstly, confirm the resolution that you want to stream from the available list( 720p, 1080p, 5M for SS).

2.) Check for the CX3_USB_UVC_SET_CUR_REQ, and copy the respective write settings for the resolution selected (let's say 1080p) and add it as shown:

pastedImage_14.png

This will write the 1080p settings to the MIPI block and the image sensor before calling CyCx3UvcAppInStart() -- works with the current 24KB buffer size being used!!

720p with the 24KB buffer size being used in the firmware doesn't work since the frame size (1280x720x2 = 1843200) is exactly divisible by the DMA buffer size of 24KB (24576 Bytes) which makes the frame end in a full buffer (which is not recommended) and so the GPIF state machines gets struck.

To avoid this, you can either use 23KB or 26KB of buffer size and try streaming. Using these buffer sizes will make the frame end with a partial buffer and the state machine will work as expected.

Alternatively, if you want to be able to try using all the resolutions, you can try as follows:
1.) Add separate vendor commands for all the resolutions available  (for ex, 0x98 for 1080p, 0x97 for 720p ... and so on).

2.) Call the respective vendor command to the resolution you want to use before calling 0x99 (which contains only the CyCx3UvcAppInStart() and others) to start the stream.

This will give you flexibility of selecting whichever resolution you want to use (using vendor commands) before calling the 0x99 to start the streaming.

Regards,
Yashwant

View solution in original post

0 Likes
5 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,


Can you please elaborate your process?
How did you implement the start - stream - stop functions?

Also, are using streamer application to stream the data?

If you were using streamer, did you click on Transfer Data-IN while the streamer application was running?

Please elaborate your procedure so that i can try and reproduce it on my end.

Regards,

Yashwant

0 Likes

Hello,

I used a translator, so the grammar can be weird.

I will explain my condition in detail.

1. I referenced the original post 'CX3_RAWData_Cypress Driver and Descriptors.zip' as it is without modification.

If '#define RAW' in the source code is not set, it is normally displayed as UVC.

2. RDK : Denebola board. (with OV5640)

   SDK : fx3_1.3.4

   camera initial config : sdk default library

3. When set to '#define RAW',

displayed as 'cypress FX3 USB StreamerExample Device' in 'usb control center'.

4. i test

\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\streamer\x86\Release\Streamer.exe

but, NO Succcesses Only Failures.

13.png14.png

IN usb control center,

'cypress FX3 USB StreamerExample Device' 

bulk in endpoint(0x83) -> Transfer Data-in

Only error code : 997

5.

I want to receive data in yuv format as the original post author said.
(Actually, I should receive the raw data)
Please tell me what to do.

Regards.

0 Likes

Hello,

Please let me know if I have anything to do.

Thank you.

0 Likes

Hello,

I went through the code and found that the issue is with the resolution settings not being written to the MIPI bridge or the image sensor before starting the streaming.

So, in the 0x99 vendor command, you will have to configure (write) the resolution settings to the MIPI block and the image sensor ( this is done in the  CyCx3UvcApplnUSBSetupCB() when CX3_USB_UVC_SET_CUR_REQ is sent) as follows:
1.) Firstly, confirm the resolution that you want to stream from the available list( 720p, 1080p, 5M for SS).

2.) Check for the CX3_USB_UVC_SET_CUR_REQ, and copy the respective write settings for the resolution selected (let's say 1080p) and add it as shown:

pastedImage_14.png

This will write the 1080p settings to the MIPI block and the image sensor before calling CyCx3UvcAppInStart() -- works with the current 24KB buffer size being used!!

720p with the 24KB buffer size being used in the firmware doesn't work since the frame size (1280x720x2 = 1843200) is exactly divisible by the DMA buffer size of 24KB (24576 Bytes) which makes the frame end in a full buffer (which is not recommended) and so the GPIF state machines gets struck.

To avoid this, you can either use 23KB or 26KB of buffer size and try streaming. Using these buffer sizes will make the frame end with a partial buffer and the state machine will work as expected.

Alternatively, if you want to be able to try using all the resolutions, you can try as follows:
1.) Add separate vendor commands for all the resolutions available  (for ex, 0x98 for 1080p, 0x97 for 720p ... and so on).

2.) Call the respective vendor command to the resolution you want to use before calling 0x99 (which contains only the CyCx3UvcAppInStart() and others) to start the stream.

This will give you flexibility of selecting whichever resolution you want to use (using vendor commands) before calling the 0x99 to start the streaming.

Regards,
Yashwant

0 Likes

The data could not be checked, but it is operating normally without any errors.
Thank you very much.
I will link this solution to the original post.

0 Likes