Skip to main content
Visitor II
October 1, 2026
Question

Mismatch between HAL_ADC_Stop_DMA and warning in RM0431 8.3.18

  • October 1, 2026
  • 1 reply
  • 41 views

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?
 

1 reply

ST Technical Moderator
October 1, 2026

Hello ​@sangwoohan 

Thank you for bringing this issue to our attention.

I reported this internally.

Internal ticket number: CDM0066174 (This is an internal tracking number and is not accessible or usable by customers).

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om