Getting more FPS from OV5640

Moderators: Oren.R, Aviad.H

NovaNis
Posts: 10
Joined: Mon Aug 29, 2016 10:25 am

Getting more FPS from OV5640

Postby NovaNis » Sun Sep 11, 2016 8:02 pm

Hello there,

I've been using an OV5640 for a project for some time now... I'm using the camera through MIPI/CSI -2 lanes- . My objective was to capture images of at least 2Mpx resolution (4:3 aspect ratio) at at least 30fps. So far I've been able to tweak the driver (I'm developing on a Yocto based linux system) to capture 1280x960 at 30fps by capturing full sensor array and then using a 2x2 binning. So I'm getting a mere 1.2Mpx... I also added an UXGA mode 1600x1200 but could only get 15fps, by capturing full sensor array and then using onboard scaling... I guess I could only get 15fps because scaling is slower than binning... But nothing to acertain that fact in the obscure OV5640 documentation. Any idea about how to pump more fps from this device ?
Driver says that sysclk clock is set to 8.4Mhz. Relation between MIPI clock, pixel clock (??? and clock dividers regs, etc.) and FPS is still very unclear after reading the documentation. If anyone could explain to me clearly how that works, that could be of great help.

For example, here are my regs values for both 1280x960 and 1600x1200 if anyone can spot what's wrong... :

static struct reg_value ov5640_setting_30fps_1280_960[] = {

{0x3035, 0x14, 0, 0}, {0x3036, 0x54, 0, 0}, {0x3c07, 0x08, 0, 0},
{0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
{0x3820, 0x46, 0, 0}, {0x3821, 0x01, 0, 0}, {0x3814, 0x31, 0, 0}, // 0x3820 > 44 pour VFLIP
{0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x10, 0, 0},
{0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
{0x3805, 0x2f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
{0x3808, 0x02, 0, 0}, {0x3809, 0x80, 0, 0}, {0x380a, 0x01, 0, 0},
{0x380b, 0xe0, 0, 0}, {0x380c, 0x08, 0, 0}, {0x380d, 0x98, 0, 0},
{0x380e, 0x05, 0, 0}, {0x380f, 0x00, 0, 0}, {0x3810, 0x00, 0, 0},
{0x3811, 0x08, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
{0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
{0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
{0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x0e, 0, 0},
{0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
{0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x4713, 0x03, 0, 0},
{0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
{0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0}, {0x3503, 0x00, 0, 0},
{0x3808, 0x05, 0, 0}, {0x3809, 0x00, 0, 0}, {0x380a, 0x03, 0, 0},
{0x380b, 0xc0, 0, 0}, {0x3035, 0x11, 0, 0},
};

static struct reg_value ov5640_setting_30fps_UXGA_1600_1200[] = {

{0x3035, 0x11, 0, 0}, {0x3036, 0x54, 0, 0}, {0x3c07, 0x08, 0, 0},
{0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
{0x3820, 0x46, 0, 0}, {0x3821, 0x00, 0, 0}, {0x3814, 0x11, 0, 0},
{0x3815, 0x11, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
{0x3802, 0x00, 0, 0}, {0x3803, 0x00, 0, 0}, {0x3804, 0x0a, 0, 0},
{0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9f, 0, 0},
{0x3808, 0x04, 0, 0}, {0x3809, 0x00, 0, 0}, {0x380a, 0x03, 0, 0},
{0x380b, 0x00, 0, 0}, {0x380c, 0x0b, 0, 0}, {0x380d, 0x1c, 0, 0},
{0x380e, 0x07, 0, 0}, {0x380f, 0xb0, 0, 0}, {0x3810, 0x00, 0, 0},
{0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0},
{0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
{0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
{0x3a03, 0xd8, 0, 0}, {0x3a08, 0x00, 0, 0}, {0x3a09, 0x93, 0, 0},
{0x3a0a, 0x00, 0, 0}, {0x3a0b, 0x7b, 0, 0}, {0x3a0e, 0x0d, 0, 0},
{0x3a0d, 0x10, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x4713, 0x03, 0, 0},
{0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
{0x3824, 0x02, 0, 0}, {0x5001, 0xa3, 0, 0}, {0x3503, 0x00, 0, 0},
{0x3808, 0x05, 0, 0}, {0x3809, 0xa0, 0, 0}, {0x380a, 0x04, 0, 0},
{0x380b, 0x38, 0, 0}, {0x3035, 0x12, 0, 0},
};

Thanks in advance !

Oren.R
Posts: 65
Joined: Tue Dec 16, 2014 7:47 pm

Re: Getting more FPS from OV5640

Postby Oren.R » Mon Sep 12, 2016 5:51 pm

Hi,
i am sorry, but unfortunately we can not help here.
There are third party experts on these issues, i can refer you to.

NovaNis
Posts: 10
Joined: Mon Aug 29, 2016 10:25 am

Re: Getting more FPS from OV5640

Postby NovaNis » Tue Sep 13, 2016 3:41 pm

Well, as a matter of fact, I succeeded in getting more fps by overclocking the XCLK of the MIPI/CSI interface...
I can give more details if somebody is interested.

But thanks for your support.

Oren.R
Posts: 65
Joined: Tue Dec 16, 2014 7:47 pm

Re: Getting more FPS from OV5640

Postby Oren.R » Tue Sep 13, 2016 4:56 pm

Thanks for the update!
great news.

Goodluck!

Joe.G87
Posts: 3
Joined: Mon Mar 07, 2016 3:00 pm

Re: Getting more FPS from OV5640

Postby Joe.G87 » Mon Feb 27, 2017 10:31 pm

I may be interested in the details if you wish to share.

peterm
Posts: 6
Joined: Mon Mar 23, 2015 3:10 pm

Re: Getting more FPS from OV5640

Postby peterm » Mon May 15, 2017 4:00 pm

I am also interested in how you were able to integrate OV5640


Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests

cron