I am working with the stm32f4xx for the using UART DMA Tx-Rx operations.
I have this line firstly:
Than I check the NDTR register with below code: (I stop the DMA before I get to these lines)
valueNDTR = __HAL_DMA_GET_COUNTER(huart->hdmarx);
Sometimes currentValueCDTR returns 0.
And I tried below lines, I expected value NDTR = DMA_BUF_SIZE but I get 0.
HAL_UART_DMAStop(&huart2); valueNDTR = __HAL_DMA_GET_COUNTER(huart->hdmarx);
What is the reason for the NDTR value returning 0, DMA is full or another reason?