You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cam_hal/ll_cam: avoid ISR queue use-after-free; fully quiesce DMA on stop
In PSRAM DMA mode the driver could dereference a deleted event queue and
leave EOF interrupts armed after shutdown, leading to late ISRs and NPDs.
Changes:
- ll_cam_send_event(): return early if event_queue is NULL; use a local
`woken` and propagate to caller via `hp` when non-NULL.
- cam_deinit(): call cam_stop() before deleting queues; NULL out
event_queue and frame_buffer_queue after vQueueDelete().
- ll_cam_stop(): disable all GDMA IN interrupts and clear them with a
full W1C mask; stop CAM_START and halt link.
- ll_cam_start(): clear all interrupts, then enable only IN_SUC_EOF.
- ll_cam_dma_reset(): use 0xFFFFFFFF W1C mask for int_clr.
- ISRs (VSYNC/DMA): use `hp` variable and portYIELD_FROM_ISR() if set.
- cam_obj.state: mark as volatile.
- Headers: update ll_cam_send_event() signature to `BaseType_t *hp`.
Result: no null-pointer derefs or late interrupts after teardown; ISR
wakeups propagate correctly and the DMA path restarts cleanly.
0 commit comments