cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX: STM32F413 assert on ADC_CHANNEL_TEMPSENSOR => Macro bug?

JHeni
Associate II

Hey guys,

i did setup my project using Cube MX, configured all outputs and inputs.

Generated the Startupcode with CubeMX.

Directly after start of main() MX_ADC1_Init() is called.

I did setup the Temp Sensor as well

/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time. 
  */
  sConfig.Channel = ADC_CHANNEL_TEMPSENSOR;
  sConfig.Rank = 11;
  if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
  {
    Error_Handler();
  }

However

assert_param(IS_ADC_CHANNEL(sConfig->Channel));

fails. So i was wondering. is there a Bug in the IS_ADC_CHANNEL Macro or am I missing something?

I'm using the latest HAL (STM32F4 Cube V1.24)

0 REPLIES 0