From 7eabf23d4027d2fdc34b3d46176a487fc0236130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20D=C3=B6rre?= Date: Sat, 14 Oct 2023 11:31:31 +0000 Subject: [PATCH] correctly release dma channels --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 80b892e..84ddc05 100644 --- a/main.c +++ b/main.c @@ -194,6 +194,7 @@ static uint32_t handle_csum(uint32_t *args_in, uint8_t *data_in, uint32_t *resp_ dma_channel_wait_for_finish_blocking(channel); dma_sniffer_disable(); + dma_channel_cleanup(channel); dma_channel_unclaim(channel); *resp_args_out = dma_hw->sniff_data; @@ -257,7 +258,8 @@ static uint32_t calc_crc32(void *ptr, uint32_t len) crc = dma_hw->sniff_data ^ 0xffffffff; dma_sniffer_disable(); - dma_channel_unclaim(channel); + dma_channel_cleanup(channel); + dma_channel_unclaim(channel); return crc; }