FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5152 Discussions

horizontal blanking problem with D5M on tPaD board

Honored Contributor II

I am having the following problem with the duration of horizontal blanking at the D5M's output. 


I have tried two image sizes with the same result, 1920x1080 and 800 x 600, no binning. Horizontal blanking register set at 0. 


The total duratino of the horizontal blanking should be 2 X HBMIN 

and HBMIN = 208* (Row_bin + 1) + 64+ WDC/2. 

Since there is no binning, Row_bin = 0, and WDC = 80. 

This yields HBMIN = 312, that is the LVAL = 0 should have duration of 624PIXCLK cycles. 


But... what I see in SignalTapII is the LVAL = 0 duration of exactly 900 PIXCLK cycles. In the same time, the duration of LVAL = 1 is either 1920 or 800, that is correct. 


Any help is greatly appreciated!
0 Kudos
3 Replies
Honored Contributor II

I noticed some more strange things, even with the original tpad_camera design. 

According to the user manual, expexted frame rate is xa 44 fps. 

resolution is 800 x 600, row and column binning... 

This frame rate corresponds to the equations from the user manual, ie HBMIN value = 500 and horizontal blanking should last 1000 clock cycles. 

BUT, looking at LVAL in SignalTapII, I see that horizontal blanking lasts for 1552 clock cycles! 


Please advise, I need to use D5M to output 1920x1080 HD @ 30 fps and have no idea how to do it. As I wrote above, horizontal blanking is always 900 pixels when not binning whatever frame width. This is too high so I cannot get 30fps by varying Vblank.
Honored Contributor II

Some more analysis shows a regular behaviour which is either not documented or I am simply a lame... 


When there is no binning, there are 276 extra cycles in horizontal blanking 

When there are both horizontal and vertical binning equalling 1, there are 552 = 2 * 276 extra cycles in horizontal blanking. 

Regardless the image width in both cases! 



So 276 is the magic number, but I could not find it mentioned in the documentation. 


I hope there is somebody experienced in this, able to advise. 


Honored Contributor II

I solved the problem.  


The datasheet that came with the tpad board is definitely wrong. HBmin listed there is for some other image sensor, whereas the one on my board is MT9P031, with timing identical to what I see here. 


Hope people will find this info useful.