Skip to main content
ABN
Associate III
August 20, 2024
Solved

ADC in STOP2 mode

Hi ST Community

 

Is it possible to use the ADC polling/DMA/IT in STOP2 mode. The application is to develop a low power platform for ADC sampling and go back to sleep. After a certain period send this data over BLE.

This topic has been closed for replies.
STTwo-32
STTwo-32Best answer
ST Technical Moderator
August 20, 2024

Hello @ABN 

As you can see on the table table 25 of the RM0434, the ADC can work only in RUN, SLEEP, Low Power run and Low Power Sleep modes:

Screenshot_2024-08-20-06-31-06-17_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Best Regards

STTwo-32 

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.

5 replies

STTwo-32
STTwo-32Best answer
ST Technical Moderator
August 20, 2024

Hello @ABN 

As you can see on the table table 25 of the RM0434, the ADC can work only in RUN, SLEEP, Low Power run and Low Power Sleep modes:

Screenshot_2024-08-20-06-31-06-17_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Best Regards

STTwo-32 

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.
ABN
ABNAuthor
Associate III
August 20, 2024

Hi @STTwo-32 

Thanks for sharing the table. I have couple more questions
1. Any necessary steps to be taken to put ADC block in low power mode

2. After waking up from STOP2 mode, any re-initialization of ADC to be done so that ADC can be used in RUN mode?

STTwo-32
ST Technical Moderator
August 20, 2024

For the first and a second question, i think t

You can follow the same steps as on this example.

Best Regards 

STTwo-32 

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.
ABN
ABNAuthor
Associate III
August 21, 2024

@STTwo-32 

I went through the example. But I was not able to see the IOC configuration and the driver files. Instead of the approach given in the example, I used ADC Polling method

ABN_0-1724225756624.png

In this approach I'm getting HAL_ERROR in the HAL_ADC_PollForConversion