diff Small_CPU/Src/uart_Internal.c @ 923:6fc0e3d230e4 Evo_2_23 tip

UART6 DMA handling: Make sure that RX transmission uses DMA stream 2
author Ideenmodellierer
date Mon, 04 Nov 2024 20:21:02 +0100
parents 7c996354b8ac
children
line wrap: on
line diff
--- 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;
 }