cancel
Showing results for 
Search instead for 
Did you mean: 

ADC stop working after updating STM32CubeIDE to 1.18.0 version

Pedro Oliveira
Associate II

Hi everyone,

I am using an STM32H750 microcontroller and programming it through CubeIDE.

After updating STM32CubeIDE to the latest version (1.18.0), ADC3 stopped working. For some reason that I couldn't identify, the EOS bit in the ADC_ISR register is not being set after the conversion.

I have already downloaded the previous version (1.17.0), and the firmware still works on it.

P.S.: I am using ADC through BDMA.

Below is the function that stopped working and the ADC3 configuration:

 

void adc_sample(void){

LL_ADC_REG_StartConversion(hadc1.Instance);

LL_ADC_REG_StartConversion(hadc3.Instance);

 

while(!(LL_ADC_IsActiveFlag_EOS(hadc1.Instance)));

while(!(LL_ADC_IsActiveFlag_EOS(hadc3.Instance)));

 

LL_ADC_ClearFlag_EOS(hadc1.Instance);

LL_ADC_ClearFlag_EOS(hadc3.Instance);

}

 

/** Common config

*/

hadc3.Instance = ADC3;

hadc3.Init.Resolution = ADC_RESOLUTION_12B;

hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE;

hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV;

hadc3.Init.LowPowerAutoWait = DISABLE;

hadc3.Init.ContinuousConvMode = DISABLE;

hadc3.Init.NbrOfConversion = 4;

hadc3.Init.DiscontinuousConvMode = DISABLE;

hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START;

hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;

hadc3.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;

hadc3.Init.Overrun = ADC_OVR_DATA_PRESERVED;

hadc3.Init.LeftBitShift = ADC_LEFTBITSHIFT_NONE;

hadc3.Init.OversamplingMode = DISABLE;

hadc3.Init.Oversampling.Ratio = 1;

if (HAL_ADC_Init(&hadc3) != HAL_OK)

{

Error_Handler();

}

1 REPLY 1
KDJEM.1
ST Employee

Hello @Pedro Oliveira;

 

First of all, I apologize for my late reply.

I noted that clock prescaler initialization for ADC3 is not generated.

hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1

 For that could you please add this function under static void MX_ADC3_Init(void) and let me know if the issue is solved or not?

 

The missing ClockPrescaler issue is reported internally.

Internal ticket number: 208196 (This is an internal tracking number and is not accessible or usable by customers)

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.