/**
@page PWR_CurrentConsumption PWR Current Consumption example
@verbatim
******************** (C) COPYRIGHT 2015 STMicroelectronics *******************
* @file PWR/CurrentConsumption/readme.txt
* @author MCD Application Team
* @version V1.2.1
* @date 20-April-2015
* @brief Description of the PWR Current Consumption example.
******************************************************************************
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
@endverbatim
@par Example Description
This example shows how to configure the STM32L1xx system to measure different
Ultra Low Power modes current consumption. The Ultra Low Power modes are:
- Low Power Run Mode from Internal SRAM
- Low Power Run Mode from Internal FLASH
- Sleep Mode
- Low Power Sleep Mode
- STOP mode with or without RTC
- STANDBY mode with or without RTC
To run this example, user has to follow the following steps:
1. Select the Ultra Low power modes to be measured by uncommenting the corresponding
line inside the stm32l1xx_ulp_modes.h file.
#define LP_RUN_SRAM_MODE
#define LP_RUN_FLASH_MODE
#define SLEEP_MODE
#define LP_SLEEP_MODE
#define STOP_MODE
#define STOP_RTC_LSE_MODE
#define STOP_RTC_LSI_MODE
#define STANDBY_MODE
#define STANDBY_RTC_LSE_MODE
#define STANDBY_RTC_LSI_MODE
2. Use an external amperemeter to measure the IDD current.
3. This example can not be used in DEBUG mode as the JTAG IOs are disabled to
reduce power consumption.
Here below a detailed description of the example code:
@verbatim
1. First, the code checks if the BOR is disabled or not. If the BOR is ON, the
code writes to Option Bytes and launch and Option byte loading phase generating
a system reset.
2. After reset, the program waits for Key button connected to the PA.00 to be
pressed to enter the selected ultra low power mode.
- When the RTC is not used in the ultra low power mode configuration, press
again the Key button to exit the low power mode.
- When the RTC is used, the wakeup from low power mode is automatically
generated by the RTC (after 4s).
3. Ultra Low power modes description:
- Low Power Run mode
====================
The maximum clock when the system is in Low Power Run mode is ~128KHz.
This mode can only be entered when Voltage Range 2 is selected.
Low Power Run Mode from SRAM:
-----------------------------
- System Running at MSI (~32KHz)
- Flash 0 wait state
- Voltage Range 2
- Regulator in LP mode
- Code running from Internal SRAM
- All peripherals OFF
- FLASH switched OFF
- VDD from 1.65V to 3.6V
- Current Consumption ~10.5uA
- Wakeup using Key Button PA.00
Low Power Run Mode from FLASH:
------------------------------
- System Running at MSI (~32KHz)
- Flash 0 wait state
- Voltage Range 2
- Regulator in LP mode
- Code running from Internal FLASH
- All peripherals OFF
- VDD from 1.65V to 3.6V
- Current Consumption ~25uA
- Wakeup using Key Button PA.00
- Sleep Mode
============
- System Running at HSI (16MHz)
- Flash 1 wait state
- Voltage Range 2
- Code running from Internal FLASH
- Current Consumption ~1mA
- Wakeup using EXTI Line (Key Button PA.00)
- Low Power Sleep Mode
======================
The maximum clock when the system is in Low Power Run mode is ~128KHz.
This mode can only be entered when Voltage Range 2 is selected.
- System Running at MSI (~32KHz)
- Flash 0 wait state
- Voltage Range 2
- Regulator in LP mode
- Code running from Internal FLASH
- All peripherals OFF
- FLASH in Power Down mode
- VREFINT OFF
- VDD from 1.65V to 3.6V
- Current Consumption ~4.07uA
- Wakeup using EXTI Line (Key Button PA.00)
- STOP Mode
===========
- Regulator in LP mode
- VREFINT OFF
- LSI, HSI and HSE OFF
- No IWDG
- Current Consumption ~0.5uA
- Wakeup using EXTI Line (Key Button PA.00)
- STOP Mode with RTC clocked by LSE
===================================
- RTC Clocked by LSE external Clock (32.768KHz)
- Regulator in LP mode
- VREFINT OFF
- LSI, HSI and HSE OFF
- No IWDG
- Current Consumption ~1.6uA
- Automatic Wakeup using RTC on LSE (after 4s)
- STOP Mode with RTC clocked by LSI
===================================
- RTC Clocked by LSI
- Regulator in LP mode
- VREFINT OFF
- HSI and HSE OFF
- No IWDG
- Current Consumption ~1.3uA
- Automatic Wakeup using RTC on LSI (after ~4s)
- STANDBY Mode
==============
- IWDG and LSI OFF
- VREFINT OFF
- Current Consumption ~0.3uA
- Wakeup using WakeUp Pin 1 (PA.00)
- STANDBY Mode with RTC clocked by LSE
======================================
- RTC Clocked by LSE external Clock (32.768KHz)
- IWDG and LSI OFF
- VREFINT OFF
- Current Consumption ~1.3uA
- Automatic Wakeup using RTC on LSE (after 4s)
- STANDBY Mode with RTC clocked by LSI
======================================
- RTC Clocked by LSI
- IWDG OFF
- VREFINT OFF
- Current Consumption ~1.1uA
- Automatic Wakeup using RTC on LSI (after ~4s)
4. After reset the system clock frequency is configured to MSI Range 1 (~131KHz)
and Voltage range 2 and then according to each ultra low power mode the system
frequency is reconfigured again.
@endverbatim
@note The STM32L152-EVAL board contains an automatic IDD measurement circuit using
internal ADC. The associated software allowing the automatic IDD measurement
is provided with STM32L152-EVAL board demonstration firmware.
For more details, refer to UM1009 available on <a href="http://www.st.com/internet/mcu/family/141.jsp"> ST Microcontrollers </a>
@par Directory contents
- PWR/CurrentConsumption/stm32l1xx_conf.h Library Configuration file
- PWR/CurrentConsumption/stm32l1xx_it.c Interrupt handlers
- PWR/CurrentConsumption/stm32l1xx_it.h Interrupt handlers header file
- PWR/CurrentConsumption/main.c
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
STM32L1XX最新固件库 (1342个子文件)
cstart_thumb2.asm 4KB
SPI_DataExchangeDMA.bmp 2.25MB
logo.bmp 7KB
stm32l152d_eval_glass_lcd.c 109KB
stm32l1xx_tim.c 108KB
stm32l1xx_rtc.c 96KB
stm32l152d_eval_sdio_sd.c 87KB
stm32l1xx_adc.c 73KB
stm32l1xx_flash.c 70KB
stm32l1xx_rcc.c 67KB
stm32l1xx_usart.c 57KB
stm32l152d_eval_lcd.c 54KB
stm32l152d_eval_audio_codec.c 51KB
stm32l1xx_i2c.c 49KB
stm32l152_eval_lcd.c 48KB
fonts.c 46KB
stm32l1xx_spi.c 41KB
stm32l1xx_dma.c 38KB
stm32l1xx_sdio.c 37KB
stm32l1xx_pwr.c 33KB
stm32l152d_eval.c 31KB
stm32l1xx_ulp_modes.c 30KB
stm32l152d_eval_i2c_tsensor.c 29KB
stm32l152_eval_i2c_tsensor.c 29KB
main.c 29KB
stm32l152_eval_glass_lcd.c 28KB
stm32l152d_eval_i2c_ee.c 28KB
stm32l152_eval_i2c_ee.c 28KB
stm32l152_eval.c 26KB
stm32l152_eval_spi_sd.c 25KB
stm32l1xx_dac.c 25KB
stm32l1xx_lcd.c 24KB
main.c 22KB
stm32l1xx_syscfg.c 22KB
stm32l1xx_aes_util.c 21KB
stm32l1xx_flash_ramfunc.c 20KB
stm32l1xx_gpio.c 20KB
stm32l1xx_aes.c 20KB
stm32l1xx_opamp.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
system_stm32l1xx.c 20KB
共 1342 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
- szahui2019-03-19谢谢分享,有用
qq_40382676
- 粉丝: 2
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功