2021-11-01 05:39 AM
My DCMI setting is as follow:
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:
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.
I can not figure it out by myself, I truly need your help.