2023-10-20 03:14 AM
Hello!
I’m struggling to get a decent jpeg frame rate with both OV2640 and ov5640 using DCMI. I'm getting about 10fps!
I’m using what seems to be the technique that other are using to determine when a jpeg frame has arrived.
while (1)
{
jpegComplete=0;
HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, (uint32_t)picBuf, 0x8000);
while (jpegComplete==0);
HAL_DCMI_Stop(&hdcmi);
process image in picBuf...
}
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi)
{
jpegComplete=1;
}
What I’m finding is that HAL_DCMI_Stop() is taking 100mSec to complete.
I get about 10fps on a 480x320 image, where jpgeg image is about 10k, which cant be right.
So the question is, is there a 'right' way to get jpeg images using DCMI?
I using stm32H723, I’ve tried all sorts of different hacks trying to improve it, I’m sure the camera, DMA & DCMI config are right as I get decent framerates in non jpeg and it seems to align with loads of sample code that I've found. Fundamentally I think the HAL_DCMI_Stop() is the problem.
Thanks
Mark