# HG changeset patch
# User Ideenmodellierer
# Date 1730748062 -3600
# Node ID 6fc0e3d230e4f27a9b9c65cae8f2e321cb19e27b
# Parent  7c996354b8acdffe76cc05bd28d0c46080102b22
UART6 DMA handling:
Make sure that RX transmission uses DMA stream 2

diff -r 7c996354b8ac -r 6fc0e3d230e4 Small_CPU/Src/stm32f4xx_it_v3.c
--- a/Small_CPU/Src/stm32f4xx_it_v3.c	Sun Nov 03 20:53:05 2024 +0100
+++ b/Small_CPU/Src/stm32f4xx_it_v3.c	Mon Nov 04 20:21:02 2024 +0100
@@ -250,7 +250,7 @@
 }
 
 #ifdef ENABLE_GPIO_V2
-void DMA2_Stream1_IRQHandler(void)
+void DMA2_Stream2_IRQHandler(void)
 {
   HAL_DMA_IRQHandler(&hdma_usart6_rx);
 }
diff -r 7c996354b8ac -r 6fc0e3d230e4 Small_CPU/Src/uart_Internal.c
--- a/Small_CPU/Src/uart_Internal.c	Sun Nov 03 20:53:05 2024 +0100
+++ b/Small_CPU/Src/uart_Internal.c	Mon Nov 04 20:21:02 2024 +0100
@@ -103,7 +103,7 @@
 
 	/* USART6 DMA Init */
 	/* USART6_RX Init */
-	hdma_usart6_rx.Instance = DMA2_Stream1;
+	hdma_usart6_rx.Instance = DMA2_Stream2;
 	hdma_usart6_rx.Init.Channel = DMA_CHANNEL_5;
 	hdma_usart6_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
 	hdma_usart6_rx.Init.PeriphInc = DMA_PINC_DISABLE;
@@ -174,6 +174,11 @@
 	huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE;
 	huart6.Init.OverSampling = UART_OVERSAMPLING_16;
 	HAL_UART_Init(&huart6);
+
+	UART_clearRx6Buffer();
+	dmaRx6Active = 0;
+	dmaTx6Active = 0;
+	tx6BufferQueLen = 0;
 }