Skip to content

Commit 98ba86b

Browse files
committed
cam_hal: psram: reset DMA and yield after NO-EOI to resume capture
In PSRAM JPEG mode, a truncated frame (missing EOI) could leave GDMA in a bad state and cause subsequent captures to time out. Fix: - On the NO-EOI path, reset the DMA channel (`ll_cam_dma_reset(cam_obj)`). - Yield once (`vTaskDelay(1)`) to let the pipeline restart cleanly. Result: the driver recovers on the next frame instead of timing out, reducing spurious capture failures after truncated JPEGs.
1 parent c839423 commit 98ba86b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver/cam_hal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,10 @@ camera_fb_t *cam_take(TickType_t timeout)
727727

728728
CAM_WARN_THROTTLE(warn_eoi_miss_cnt,
729729
"NO-EOI - JPEG end marker missing");
730+
/* Reset DMA so capture can resume after a truncated frame */
731+
ll_cam_dma_reset(cam_obj);
730732
cam_give(dma_buffer);
733+
vTaskDelay(1);
731734
continue; /* wait for another frame */
732735
} else if (cam_obj->psram_mode &&
733736
cam_obj->in_bytes_per_pixel != cam_obj->fb_bytes_per_pixel) {

0 commit comments

Comments
 (0)