I am working on a personal project using the OV2640 camera module as well, and I am wondering whether someone here came across the problem described above or if someone has any ideas what the issue might be as I am stumped. I have a custom board with a STM32F407 MCU running a real time OS (ChibiOS) and using the DCMI interface to get the data from the camera as jpeg images. It works fine about 80% of the time, but 20% of the images I capture come out corrupted. See the attached image for how the corruption manifests - it seems like some data is missing or shifted from the jpeg file?
I’ve been playing with the OV2640 registers for a long time but I don’t seem to be able to solve the issue. I am using MC0 cl0ock output to clock the camera module at 8Mhz, PCLK is 12Mhz (changing PCLK does not seem to solve the problem). If I could just narrow down whether the problem is in the sensors itself (maybe the PLLs and clocks are not set correctly?), or with my code on the MCU, or with the hardware (PCB), that would be a big step already.
So does anyone have any ideas? I’m happy to post more info if required.