[Help] fx3 with 16-bit parallel data

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

cross mob
user_1510591
Level 1
Level 1
First like received First like given

Hi community

I'm setting up the 16-bit parallel FX3 camera data with the parameters below:

 16-bit synchronous parallel data interface 16 bits per pixel

 YUY2 color space

 1280 x 720-pixel resolution (720p)

 30 frames per second

 Active low frame/line valid signals

 Negative clock edge polarity

I use the firmware provided in AN75779.zip. The only change is to convert from 8-bit to 16-bit, Negative clock edge polarity and Active low for FV,LV.

For 16-bit synchronous parallel data interface, I go to the Interface Definition tab in GPIF II Designer and choose the 16 Bit option for Data Bus Width, Negative clock edge polarity and Active low for FV,LV. Then i go to the state machine tab, change the counter limit value of LD_DATA_COUNT and LD_ADDR_COUNT to 8183.Finally, i update the cyfxgpif2config.h.

But I just got the black screen. I added DEBUG_PRINT_FRAME_COUNT and print "Bytes per frame" is only received:

Leaving Suspend Mode

UVC: Completed 0 frames and 0 buffers

Application Started

UVC: Completed 0 frames and 0 buffers

Bytes per frame 480

Bytes per frame 480

Bytes per frame 480

...

Bytes per frame 480

UVC: Completed 60 frames and 0 buffers

Bytes per frame 480

Bytes per frame 480

Bytes per frame 480

...

Bytes per frame 480

UVC: Completed 90 frames and 0 buffers

Bytes per frame 480

...

Can show me how to solve this problem.  Thanks in advance.

0 Likes
1 Solution

Hi,

Thank you for the information of Sensor + ISP.

We need to scrutinize details of each behavior.

1. Could you please probe and confirm the timing of FV, LV, and CLK line of ISP?

    Also, please compare it to Image Sensor Interface Timing Diagram on AN75779.

2. Could you please check GPIF II state using CyU3PGpifGetSMState?

Usage of CyU3PGpifGetSMState

uint8_t curState_p;

CyU3PGpifGetSMState(&curState_p);

CyU3PDebugPrint (4, "Current status = %d\r\n", curState_p);

By using this, we are able to know whether GPIF II works fine or not and which state the GPIF II is in.

3. I am not sure but it looks like there is no communication between ISP and FX3 in the firmware.

    Is not ISP needed initialization? Our sample project is supposed to initialize it in Commit Control Request.

    (Sample project uses SensorScaling_HD720p_30fps() on sensor.c)

Best regards,

Hirotaka Takayama

View solution in original post

12 Replies
HirotakaT_91
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hi,

Are you sure that FX3 is enumerated as USB 3.0 device?

Best regards,

Hirotaka Takayama

0 Likes

Hi HirotakaT_91

Yes, I used USB3.0.  Attached is the source code of the project. Can you see help me?

http://www.mediafire.com/file/3qt9jqjkju70q2c/project1.rar/file

Thanks very much.

0 Likes

Hi,

Thank you for attaching source code of the project.

Unfortunately, I am not able to access the web-page which you posted due to security software block.

Would it be possible to attach your source code directly on this thread?

Best regards,

Hirotaka Takayama

0 Likes
lock attach
Attachments are accessible only for community members.

Hi HirotakaT_91

Yes, the attachment is my source code.

Thank you.

0 Likes

Hello

Can someone please help me about this problem?

0 Likes

Hello,

The attached GPIF II design file does not up-to-date which means Data bus width does not set to 16 bit, etc.

Hence, I am not able to investigate enough.

However, I guess that the issue occurs on the GPIF II state machine due to changing Polarity of FV and LV.

FV and LV which your sensor outputs acts active Low? If my assumption is correct, kindly change the Transition Equation Entry on GPIF II State Machine accordingly.

For example, Equation Entry for WAIT_FOR_FRAME_START_0 state on default GPIF II AN75779 setting will start both FV and LV are set to 1 (High). However, if you would like to start your sensor accordingly, kindly set the Equation Entry as opposite (!FV & !LV).

If you have any clarification, kindly let us know.

Best regards,

Hirotaka Takayama

lock attach
Attachments are accessible only for community members.

Hi HirotakaT_91

Thanks for your help.

Yes, FV and LV is active Low.  I tried change all the logic levels of FV, LV in Equation Entry and received debug log:

Bytes per frame 4857400

UVC: Completed 3541 frames and 0 buffers

Bytes per frame 4857400

...

Bytes per frame 4857400

UVC: Completed 3572 frames and 0 buffers

Bytes per frame 4857400

...

I think the exact value of Bytes per frame must be 1280 * 720 * 2 = 1843200. I don't understand why the DMA Buffer is always "0 buffer".

Attached is GPIF II design file. Can you check and help me if GPIF II design file is configured correctly?

Thank you so much.

0 Likes

Hello,

GPIF II setting looks good.

So far, it is unclear the root cause.

Would it be possible to tell me the sensor name and specification what you are using?

Best regards,

Hirotaka Takayama

lock attach
Attachments are accessible only for community members.

Hi Hirotaka

Attached is block diagram and specification . On the camera side we use IMX290 + MDIN_540 board. IMX290 + MDIN 540 board has been confirmed to work when connected to another board. Now having trouble connecting to FX3.

Thank you so much.

0 Likes

Hi,

Thank you for the information of Sensor + ISP.

We need to scrutinize details of each behavior.

1. Could you please probe and confirm the timing of FV, LV, and CLK line of ISP?

    Also, please compare it to Image Sensor Interface Timing Diagram on AN75779.

2. Could you please check GPIF II state using CyU3PGpifGetSMState?

Usage of CyU3PGpifGetSMState

uint8_t curState_p;

CyU3PGpifGetSMState(&curState_p);

CyU3PDebugPrint (4, "Current status = %d\r\n", curState_p);

By using this, we are able to know whether GPIF II works fine or not and which state the GPIF II is in.

3. I am not sure but it looks like there is no communication between ISP and FX3 in the firmware.

    Is not ISP needed initialization? Our sample project is supposed to initialize it in Commit Control Request.

    (Sample project uses SensorScaling_HD720p_30fps() on sensor.c)

Best regards,

Hirotaka Takayama

Hi Hirotaka

Camera already works. Thanks for your help very much.

I edited the camera register so that FV, LV time to same as timing Diagram and changed the "GUID used to identify streaming-encoding format" to UYVY. Then I get the correct video at 720p 30fps.

Now I am transferring the video to Full HD 30fps.

Thank you.

Hi,

Good to hear that!

Thanks,

Hirotaka Takayama

0 Likes