Skip to content

Commit 804cdbe

Browse files
committed
Fix gdma: gdma_disconnect(309): no peripheral is connected to the channel
1 parent ac8d927 commit 804cdbe

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
@@ -186,11 +186,12 @@ esp_err_t ll_cam_deinit(cam_obj_t *cam)
186186
esp_intr_free(cam->dma_intr_handle);
187187
cam->dma_intr_handle = NULL;
188188
}
189-
gdma_disconnect(cam->dma_channel_handle);
190-
gdma_del_channel(cam->dma_channel_handle);
191-
cam->dma_channel_handle = NULL;
192-
// GDMA.channel[cam->dma_num].in.link.addr = 0x0;
193-
189+
if (cam->dma_channel_handle) {
190+
// gdma_disconnect(cam->dma_channel_handle); // not needed since code never calls gdma_connect() to connect channel to peripheral
191+
gdma_del_channel(cam->dma_channel_handle);
192+
cam->dma_channel_handle = NULL;
193+
// GDMA.channel[cam->dma_num].in.link.addr = 0x0;
194+
}
194195
LCD_CAM.cam_ctrl1.cam_start = 0;
195196
LCD_CAM.cam_ctrl1.cam_reset = 1;
196197
LCD_CAM.cam_ctrl1.cam_reset = 0;

0 commit comments

Comments
 (0)