Mismatch between HAL_ADC_Stop_DMA and warning in RM0431 8.3.18
Hello,
RM0431, section 8.3.18, contains the following warning:
"To switch off a peripheral connected to a DMA stream request, it is mandatory to, first, switch off the DMA stream to which the peripheral is connected, then to wait for EN bit = 0. Only then can the peripheral be safely disabled."
However, HAL_ADC_Stop_DMA() in the STM32F7xx HAL driver v1.3.3 (stm32f7xx_hal_adc.c) uses the opposite order:
1. Line 1526: __HAL_ADC_DISABLE(hadc);
2. Line 1532: hadc->Instance->CR2 &= ~ADC_CR2_DMA;
3. Line 1538: tmp_hal_status = HAL_DMA_Abort(hadc->DMA_Handle);
Could you clarify which sequence should be used?
