【务必拉取】修复ui发送使用临时变量buffer的问题,增加了DMAbuffer防止裁判系统接收溢出

This commit is contained in:
NeoZng
2023-04-24 07:11:19 +08:00
parent 7a95d3c451
commit 1c384d5193
4 changed files with 35 additions and 28 deletions

View File

@@ -274,7 +274,10 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
hdma_usart6_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_usart6_rx.Init.Mode = DMA_NORMAL;
hdma_usart6_rx.Init.Priority = DMA_PRIORITY_HIGH;
hdma_usart6_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
hdma_usart6_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
hdma_usart6_rx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
hdma_usart6_rx.Init.MemBurst = DMA_MBURST_SINGLE;
hdma_usart6_rx.Init.PeriphBurst = DMA_PBURST_SINGLE;
if (HAL_DMA_Init(&hdma_usart6_rx) != HAL_OK)
{
Error_Handler();
@@ -292,7 +295,10 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
hdma_usart6_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_usart6_tx.Init.Mode = DMA_NORMAL;
hdma_usart6_tx.Init.Priority = DMA_PRIORITY_HIGH;
hdma_usart6_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
hdma_usart6_tx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
hdma_usart6_tx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
hdma_usart6_tx.Init.MemBurst = DMA_MBURST_SINGLE;
hdma_usart6_tx.Init.PeriphBurst = DMA_PBURST_SINGLE;
if (HAL_DMA_Init(&hdma_usart6_tx) != HAL_OK)
{
Error_Handler();