cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303 ADC doesn't run, advice welcome!

Waller.George
Associate III

Hi all,

The ADC on my STM32F303 doesn't want to run. I'm trying to measure 8 input channels via DMA with TIM7 as the ADC trigger. Having had a thorough read of the examples in the repo for Cube, my setup should work but it doesn't. The values never change and the ADC interrupt is never fired. I have gone through all of the ADC and timer registers and, as far as I can see, everything is in order. I'm not sure what I'm missing now. Attached is my .ioc file for Cube and below is my code for starting the conversions. Any advice is very welcome!

	// Calibrate the ADC
	if(HAL_ADCEx_Calibration_Start(&hadc3, ADC_SINGLE_ENDED) != HAL_OK)
	{
		Error_Handler();
	}
 
	// Start the ADC in DMA mode
	if(HAL_ADC_Start_DMA(&hadc3, (uint32_t*)adc_results, EMG_ADC_N_CHANNELS) != HAL_OK)
	{
		Error_Handler();
	}
 
	// Now start the timer to trigger the ADC results
	if(HAL_TIM_Base_Start(&htim7) != HAL_OK)
	{
		Error_Handler();
	}

0 REPLIES 0