cancel
Showing results for 
Search instead for 
Did you mean: 

adc going to error handler

Srinath_03
Associate III

hi, I'm using adc1 and adc2 in multimode dma , normally when i start it is working and reading correctly, when again im calling mx_adc1_init function it is going to error handler, i don't know why, since I'm not deinit and reinit again the peripheral, directly calling the mx_adc1_init. why it is happening like this how to restart the again. since other gpio and fdcan peripherals are working fine with same init if i calling once again.

 

i have tried with hal deinit function also same behaviour only this time other peripherals also not working 

 

can someone suggest how to rectify this issue

1 REPLY 1
Imen.D
ST Employee

Hello @Srinath_03 

Please share more details as possible to help you solve your issue. If possible to share your code.

Have you used STM32CubeMx to generate your initialization code ?

Have you tried running the ADC example from the Cube firmware?

Which Cube/CubeMX version used? (make sure to use latest release which contains fixes)

Maybe you have an issue with DMA initialization (check if it is called before the ADC initialization).

Note that DMA clock needs to be enabled before configuring the ADCs to use DMA.

 

MX_GPIO_Init();
MX_DMA_Init();
MX_ADC1_Init();
MX_ADC2_Init();

 

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen