From 7ca1a8f63c1cdb733a1b9a2e69eac53d7a281810 Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Thu, 26 Dec 2024 18:21:58 -0800 Subject: [PATCH] ports/stm32: Fix MDMA initialization. --- src/omv/ports/stm32/omv_csi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/omv/ports/stm32/omv_csi.c b/src/omv/ports/stm32/omv_csi.c index 7aeda9aaa..4787359e3 100644 --- a/src/omv/ports/stm32/omv_csi.c +++ b/src/omv/ports/stm32/omv_csi.c @@ -97,15 +97,16 @@ static int omv_csi_dma_config() { // Configure the DMA IRQ Channel NVIC_SetPriority(DMA2_Stream1_IRQn, IRQ_PRI_DMA21); - return 0; -} -void omv_csi_init0() { #if defined(OMV_MDMA_CHANNEL_DCMI_0) csi.mdma0.Instance = MDMA_CHAN_TO_INSTANCE(OMV_MDMA_CHANNEL_DCMI_0); csi.mdma1.Instance = MDMA_CHAN_TO_INSTANCE(OMV_MDMA_CHANNEL_DCMI_1); #endif + return 0; +} + +void omv_csi_init0() { omv_csi_abort(true, false); // Re-init i2c bus to reset the bus state after soft reset, which