/**
@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
没有合适的资源?快使用搜索试试~ 我知道了~
STM32L152连接BC26-NBiot模块实现LWM2M协议传输温湿度数据到ONENET中移物联网平台.zip
共1119个文件
c:311个
h:258个
js:201个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 178 浏览量
2024-12-20
20:35:48
上传
评论
收藏 20.3MB ZIP 举报
温馨提示
1、嵌入式物联网单片机项目开发例程,简单、方便、好用,节省开发时间。 2、代码使用KEIL 标准库开发,当前在STM32L152运行,如果是STM32L15X其他型号芯片,依然适用,请自行更改KEIL芯片型号以及FLASH容量即可。 3、软件下载时,请注意keil选择项是jlink还是stlink。 4、有偿指导v:wulianjishu666; 5、如果接入其他传感器,请查看账号发布的其他资料。 6、单片机与模块的接线,在代码当中均有定义,请自行对照。 7、若硬件有差异,请根据自身情况调整代码,程序仅供参考学习。 8、代码有注释说明,请耐心阅读。
资源推荐
资源详情
资源评论
收起资源包目录
STM32L152连接BC26-NBiot模块实现LWM2M协议传输温湿度数据到ONENET中移物联网平台.zip (1119个子文件)
Project.uvgui.Administrator 141KB
ONENET手机助手APP(无源码).apk 2.74MB
cstart_thumb2.asm 4KB
清除KEIL编译残余,双击鼠标.bat 480B
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 52KB
stm32l1xx_i2c.c 50KB
smp.c 48KB
stm32l152_eval_lcd.c 48KB
fonts.c 47KB
stm32l1xx_spi.c 41KB
stm32l1xx_dma.c 38KB
stm32l1xx_sdio.c 37KB
stm32l1xx_pwr.c 34KB
stm32l152d_eval.c 31KB
stm32l1xx_ulp_modes.c 31KB
stm32l152d_eval_i2c_tsensor.c 29KB
stm32l152_eval_i2c_tsensor.c 29KB
main.c 29KB
stm32l152_eval_glass_lcd.c 29KB
stm32l152d_eval_i2c_ee.c 28KB
stm32l152_eval_i2c_ee.c 28KB
stm32l152_eval.c 26KB
stm32l152_eval_spi_sd.c 26KB
stm32l1xx_dac.c 25KB
stm32l1xx_lcd.c 24KB
main.c 22KB
stm32l1xx_syscfg.c 22KB
stm32l1xx_aes_util.c 21KB
stm32l1xx_flash_ramfunc.c 21KB
stm32l1xx_gpio.c 21KB
stm32l1xx_aes.c 21KB
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
共 1119 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
边缘计算网关定制开发
- 粉丝: 3293
- 资源: 1125
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功