Unable to receive USART data using DMA normal mode in while loop more than one cycle
Hello,
Am using STM32F4 DISC board, with FreeRTOS with CMSIS v1, on CubeIDE with HAL generation.
To receive data from USART, below code has been used:
while(1)
{
.....
ret = HAL_UART_Receive_IT(&huart6, rx_data, SIZE_RX_BYTES);
if(ret != HAL_OK) {}
......
ret = HAL_UART_Transmit_IT(&huart6, temp_data, SIZE_TX_BYTES);
if(ret != HAL_OK) {}
......
}
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
.......
}
DMA is set to normal mode in CubeMxIDE, FIFO enabled, data width of both buses as byte, burst as single.
So, it is observed that unless USART global interrupt is enabled, DMA receive / tx doesn't behave cyclic, but happens only once.
What is the relation between USART global interrupt and DMA receive enable/interrupt? Will clearing TC flag in FCR register of DMA solve my problem?
