I am working with the stm32f4xx for the using UART DMA Tx-Rx operations.
I have this line firstly:
HAL_UART_Receive_DMA(&huart2,(uint8_t*)dma_rx_buf,DMA_BUF_SIZE);
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?