HAL_UARTEx_ReceiveToIdle_DMA only fills the first carater of my array
Hello,
I am trying to receive an unknown length of data on a UART on a STM32H7A3
I have declared a buffer to receive the data and aligned it :
#define UART_RX_BUFF_SIZE 256
ALIGN_32BYTES (static uint8_t uart_buff[UART_RX_BUFF_SIZE]);Then as I am working on a cortex M7 I have declared a "free" zone at the address of my buffer for the DMA to access it :

Then I set up the handler to receive the character
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
if (huart->Instance == USART10)
{
__NOP();
HAL_UARTEx_ReceiveToIdle_DMA(&huart10, (uint8_t *)uart_buff, UART_RX_BUFF_SIZE);
}
}and finally i trigger the RX phase with the following:
HAL_UARTEx_ReceiveToIdle_DMA(&huart10, (uint8_t *)uart_buff, UART_RX_BUFF_SIZE);My problem is that what the interrupt happens, I see that the size is correct (the number of bytes that I am expecting) but the RX buffer if filled only on the first character. So, I can only see the last received character and not the full data. Each byte overwrites the one that came before and I am left with only the last one. Is there a missing increment that I am supposed to change or do I miss something?
Thank you by advance
Augustin
