cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Driver stm32f3xx_hal_adc_ex.c

GBarb
Associate

Dear all, I'm using the driver in object. My application when i use this driver sometime crash. After investigate, i found the reason of these crash in the driver in object.

Below an extracted of the driver in object where "my application" should not pass. In detail, "my application" should not pass in this "else" below.

QUESTIONS:

1- What's mean this check (see below) of this driver in object?

2- What can I do to avoid going into the "else"?

 if ( (ADC_IS_CONVERSION_ONGOING_REGULAR(hadc) == RESET) 

  && (ADC_IS_CONVERSION_ONGOING_REGULAR(&tmphadcSharingSameCommonRegister) == RESET) )

{

................

}

/* If one of the ADC sharing the same common group is enabled, no update  */

 /* could be done on neither of the multimode structure parameters.     */

 else

 {

  /* Update ADC state machine to error */

  SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);

   

  tmp_hal_status = HAL_ERROR;

 }

0 REPLIES 0