AnsweredAssumed Answered

My adc on a STM32F091RC does not work anymore after CubeMX upgrade

Question asked by Denis Gottardello on Jan 29, 2018
Latest reply on Jan 30, 2018 by T J

Hi. I have a very strange behaviour with adc.
The CubeMX setup is shown below

 

This is my empty callback

 

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) {
}

 

And the main

 

int main(void)
{
  HAL_Init();

 

  SystemClock_Config();

 

  MX_GPIO_Init();
  MX_ADC_Init();

 

  HAL_ADC_Start_IT(&hadc);

 

  while (1)
  {

 


    HAL_GPIO_WritePin(Led0_GPIO_Port, Led0_Pin, GPIO_PIN_SET);
    HAL_Delay(100);
    HAL_GPIO_WritePin(Led0_GPIO_Port, Led0_Pin, GPIO_PIN_RESET);
    HAL_Delay(100);

 


  }

 

}

 

The program does not work. In order to have my led blinking it working I have to comment out the line

HAL_ADC_Start_IT(&hadc);

 

 

What is wrong?

Outcomes