Testing ov5640 with STM32F407DISC always gets a DCMI_FLAG_ERRRI

Thread Starter

lanoz

Joined Nov 1, 2021
1
My DCMI setting is as follow:
Code:
  hdcmi.Instance = DCMI;
  hdcmi.Init.SynchroMode = DCMI_SYNCHRO_HARDWARE;
  hdcmi.Init.PCKPolarity = DCMI_PCKPOLARITY_RISING;
  hdcmi.Init.VSPolarity = DCMI_VSPOLARITY_HIGH;
  hdcmi.Init.HSPolarity = DCMI_HSPOLARITY_LOW;
  hdcmi.Init.CaptureRate = DCMI_CR_ALL_FRAME;
  hdcmi.Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;
  hdcmi.Init.JPEGMode = DCMI_JPEG_ENABLE;
The ov5640 HREF is active low and VSYNC is active high and it runs in JPEG mode 3, the waveform of VSYNC (yellow) and HSYNC (green) is shown below:
1635745986(1).png
1635746002(1).png
When debugging with keil, I always have a DCMI_FLAG_ERRRI error. The manual says it is happens when using embedded synchronization, which I am not using. I can recieve the start of a jpeg image, 0xFF 0xD8 , in my ram, but it is followed by another 0xFF.
1635770182(1).png

I can not figure it out by myself, I truly need your help.
 
Top