cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve the ADC problem when exiting stop mode in STM32WB5

Yuki_I
Visitor

I'm using an STM32WB5MMG module.
I was facing a problem with AD not working properly when exiting from stop2 mode.

HAL_ADC_PollForConversion()

returns a value other than HAL_OK
And,

HAL_ADC_GetValue(&hadc1)

returns only 0.

I have confirmed the same problem in the following post, but it remained unresolved, so I would like to know how to resolve it.
https://community.st.com/t5/stm32-mcus-wireless/how-to-get-adc-to-work-after-stop0-mode-stm32wb5/td-p/95710

Similar to this post
Before entering STOP2 mode, tried to do

HAL_ADC_DeInit(&hadc1);

and after exiting from STOP2 mode, tried to do

MX_ADC1_Init()

But, The process in this function below had error.

if (HAL_ADC_Init(&hadc1) != HAL_OK)
  {
    Error_Handler();
  }


Is there any approach I should try?

0 REPLIES 0