cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431C + ADC + DMA

AChas.1
Associate II

I'm using ADC with DMA in a large project, and faced some very strange problem: 

If I'm using DMA2 Channel 6 - ADC works correctly 

If I'm using DMA2 Channel 1 - the SW end up in Hard Fault 

Screenshot 2025-10-07 125752.pngScreenshot 2025-10-07 125821.pngScreenshot 2025-10-07 124405.png

The configuration is default. 

This is how I start the conversation 

  HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
  // Start the ADC in DMA mode
  HAL_ADC_Start_DMA(&hadc1, (uint32_t*) g_ADC_values, ADC_BUFFER_LENGTH);
0 REPLIES 0