ports/stm32: Only enable frame int manually in jpeg mode.

The frame interrupt was being enabled for non-JPEG transfers,
causing massive image corruption and out-of-sync issues on the M4
and M7. This interrupt only needs to be enabled for JPEG mode
where the size of the image is not known.
This commit is contained in:
Kwabena W. Agyeman 2025-08-14 19:06:43 -07:00
parent 908d612ace
commit cc137456dc

View File

@ -626,7 +626,7 @@ static int stm_csi_snapshot(omv_csi_t *csi, image_t *image, uint32_t flags) {
}
// In JPEG mode, enable the end of frame interrupt.
if (!csi->mipi_if && csi->pixformat != PIXFORMAT_JPEG) {
if (!csi->mipi_if && csi->pixformat == PIXFORMAT_JPEG) {
__HAL_DCMI_ENABLE_IT(&csi->dcmi, DCMI_IT_FRAME);
}