Closed krishnak closed 4 years ago
what if sensor_irq triggers twice per frame (one for start and another for finish)?
If you really want to measure the overhead of a call, use the mcycle CSR.
That is a valid point, to test that I did the following
If the sensor_irq is getting triggered twice per frame then the else block will produce an equivalent count as that of IF block, yes it does!!. your theory is correct.
But that means the camera module is delivering only half the frames for the setting.
Do you have any register settings for OV7740 that has been tested on OV7740 for greater than 30FPS?
[X] BUG REPORT
I am using a OV7740 camera module, it can deliver 60FPS at VGA and 120FPS at QVGA. I have set the camera module at QVGA@ 60FPS. I am using the following interrupt routine (see below) to capture the image frame. It is an example from your github for standalone-sdk demo dvp_ov.
I am using a counter fpscount to calculate how many times this interrupt fired in a second, I use a timer interrupt every 5 seconds to read this fpscount and then reset fpscount=0.
I get 58FPS - it is very close to 60FPS the camera frame rate - Good.
I move the fpscount++ inside the if block as below
Now the only instruction that is executed extra is dvp_get_interrupt(DVP_STS_FRAME_FINISH)
Now the fps drops to 28.
Please note: No other processing is done on the image frame, it is not even displayed on LCD. When I display it on a LCD the FPS drops to 22.
As you can see the FPS is dropping from 58 to 28, to half the frame rate by one single call to if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) This can't be right, can you please let me know whether it is a bug or is it something to do with my settings.
I am using the development release of standalone SDK, I am using toolchain 8.2.0 downloaded from github.
Test code