Transfer Error (invalid Data) with USART1 & DMA
Hello,
I setup USART1 using DMA with a STM32G071 & using HAL lib.
Currently, i try to send uint8_t TxBuffer[7]={0x16,0x07,0x98,0x09,0x00,0x00,1B}.
Transfert is done using HAL_UART_Transmit_DMA(&huart1, &TxBuffer[0], 7) and i have well manage the required interrupt signals because it send 7 bytes on Tx signal multiples times & not only ones;
but on the Tx Signal when i look the data transmitted by the DMA to USART, i can see the folowing data {0x16,0x07,0x98,0x03,0xD0,0x00,00}... 3 first bytes are always right but the other bytes values are always wrong...
It look like that DMA was badly configurate (wrong memory increment). but it seem right (see below):
hdma_usart1_tx.Instance = DMA1_Channel3;
hdma_usart1_tx.Init.Request = DMA_REQUEST_USART1_TX;
hdma_usart1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_usart1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_usart1_tx.Init.MemInc = DMA_MINC_ENABLE;
hdma_usart1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_usart1_tx.Init.MemDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_usart1_tx.Init.Mode = DMA_NORMAL;
hdma_usart1_tx.Init.Priority = DMA_PRIORITY_LOW;
Do you have any idea what it happens here?
Thanks a lot
