Question
Resetting CNDTR for UART DMA method
I'd like to set the counter of huart2.hdmarx->Instance->CNDTR;
To reset the buffer index.
How is this done?
nevermind.
The peripheral required disabling first it seems.
huart2.hdmarx->Instance->CCR &= ~DMA_CCR_EN; // disable
huart2.hdmarx->Instance->CNDTR = sizeof(rx_buff); // reset counter
huart2.hdmarx->Instance->CCR |= DMA_CCR_EN; // re-enable
