Skip to main content
JHeni
Associate II
April 17, 2019
Question

STM32CubeMX: STM32F413 assert on ADC_CHANNEL_TEMPSENSOR => Macro bug?

  • April 17, 2019
  • 0 replies
  • 507 views

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)

This topic has been closed for replies.