5627 views|1 replies

9

Posts

0

Resources
The OP
 

ADC abnormality after STM32L071RB chip wakes up from STOP mode [Copy link]

In a recent project, I used the ADC of STM32L071RBT6 to convert and sample the external power supply voltage. Everything was normal after booting up, but once the system entered STOP mode, the ADC conversion data was abnormal after waking up. It was very unreliable, and it was flying all over the place from 0 to the maximum value. I don’t know why. After waking up, I initialized the clock with SystemClock_Config(), and the clock should be fine. In addition, I also tried ADC deinit & init, but they didn’t work. Has anyone encountered similar problems? /********************************************************************** * trigger MCU enter stop mode */ void powerSaving(void){ //config GPIO to analog mode (zero consumption for every analog GPIO) lightLed(LED_GREEN, false); //HAL_ADC_DeInit(&hadc); //clear wakeup flag __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); //call power function to enter "STOP" mode HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); //after stop, program continue run from here //config RCC SystemClock_Config(); //sysclkConfig_after_stop(); //adc init HAL_ADC_DeInit(&hadc); MX_ADC_Init(); HAL_ADCEx_Calibration_Start(&hadc, ADC_SINGLE_ENDED); //config GPIO }


This post is from stm32/stm8

Latest reply

After waking up and configuring the clock, you need to confirm whether the clock is configured correctly. Also, after configuring the clock, add a delay to see if it works.  Details Published on 2018-5-3 08:33
 

77

Posts

0

Resources
2
 
After waking up and configuring the clock, you need to confirm whether the clock is configured correctly. Also, after configuring the clock, add a delay to see if it works.
This post is from stm32/stm8
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list