Skip to content

Commit b817e9b

Browse files
cnadler86me-no-dev
andauthored
Fix gdma: gdma_disconnect(309): no peripheral is connected to the channel (#804)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
1 parent 12c147f commit b817e9b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

target/esp32s3/ll_cam.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@ esp_err_t ll_cam_deinit(cam_obj_t *cam)
191191
esp_intr_free(cam->dma_intr_handle);
192192
cam->dma_intr_handle = NULL;
193193
}
194-
gdma_disconnect(cam->dma_channel_handle);
195-
gdma_del_channel(cam->dma_channel_handle);
196-
cam->dma_channel_handle = NULL;
197-
// GDMA.channel[cam->dma_num].in.link.addr = 0x0;
198-
194+
if (cam->dma_channel_handle) {
195+
// gdma_disconnect(cam->dma_channel_handle); // not needed since code never calls gdma_connect() to connect channel to peripheral
196+
gdma_del_channel(cam->dma_channel_handle);
197+
cam->dma_channel_handle = NULL;
198+
// GDMA.channel[cam->dma_num].in.link.addr = 0x0;
199+
}
199200
LCD_CAM.cam_ctrl1.cam_start = 0;
200201
LCD_CAM.cam_ctrl1.cam_reset = 1;
201202
LCD_CAM.cam_ctrl1.cam_reset = 0;

0 commit comments

Comments
 (0)