/**
@page UART_WakeUpFromStop UART Wake up from Stop mode example
@verbatim
******************** (C) COPYRIGHT 2016 STMicroelectronics *******************
* @file UART/UART_WakeUpFromStop/readme.txt
* @author MCD Application Team
* @brief Description of the UART-triggered MCU wake-up from STOP mode.
******************************************************************************
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
@endverbatim
@par Example Description
This example shows how to configure an UART to wake up the MCU from STOP mode
when the proper stimulus is received.
Board: STM32L011K4-Nucleo (embeds a STM32L011K4 device)
Tx Pin: PA.02 (Arduino A7)
Rx Pin: PA.03 (Arduino A2)
_________________________ _________________________
| ______________| |______________ |
| |USART | | USART| |
| | | | | |
| | TX |_____________________| RX | |
| | | | | |
| | | | | |
| | | | | |
| | RX |_____________________| TX | |
| | | | | |
| |______________| |______________| |
| | | |
| | | |
| STM32 Board 1 | | STM32 Board 2 |
| (follows a sequence of | | (sends stimuli to wake |
| RUN/STOP modes) | | up STM32 Board 1) |
|_________________________| |_________________________|
Board 1 enters STOP mode and is awoken by Board 2 which sends
the proper data to wake up the board 1 MCU.
When the proper wake-up event is recognized, the WUF interrupt is triggered which wakes
up board 1.
To confirm its wake up, board 1 sends a confirmation message to board 2 which
checks it is the expected message.
This cycle is repeated 4 times to verify 4 different events
1�) wake-up by RXNE flag rising
2�) wake-up by Start Bit detection
3�) wake-up by 7-bit long address match
4�) wake-up by 4-bit long address match
WARNING: as both boards do not behave the same way, "BOARD_IN_STOP_MODE"
compilation switch is defined in UART/UART_WakeUpFromStop/Src/main.c and must be
enabled at compilation time before loading the executable in board 1 (that which
is set in STOP mode).
The stimuli-transmitting board (board 2) needs to be loaded with an executable
software obtained with BOARD_IN_STOP_MODE disabled.
At the very beginning, board 1 LED3 is ON then is turned off.
This means that board 1 has entered STOP mode.
Parallely, board 2 LED3 is quickly blinking (100 ms period). The user has
just to wait for board 1 LED3 to be turned off and then to put a jumper between PA.12 (Arduino D2)
and GND to send the first wake-up stimulus to board 1.
This starts the test sequence and no more action is required from the user.
Board 1 LED3 behavior as described below allows to follow the
test progress:
ON ____ _______ _______ _______ ____
| | | | | | | |
OFF |________| |________| |________| |________|
Enter Exit Enter Exit Enter Exit Enter Exit
Stop Stop Stop Stop Stop Stop Stop Stop
Mode Mode Mode Mode Mode Mode Mode Mode
(RXNE flag) (Start Bit (7-bit add. (4-bit add.
Detection) match) match)
Simultaneously, board 2 LED3 behavior shown below allows to follow the
test progress on the other side:
BLINKING
ON ****________ _______ _______ _______ ____
| | | | | | | |
OFF |________| |________| |________| |________|
Jumper WkUp 2nd stim WkUp 3rd stim WkUp 4th stim WkUp LED ON
set conf sent conf sent conf sent conf to mark
rcv'ed rcv'ed rcv'ed rcv'ed passed
1st stimulus test
sent
(RXNE flag) (Start Bit (7-bit add. (4-bit add.
Detection) match) match)
- If the test fails or if there is an initialization or transfer error, LED3
transmits a sequence of three dots, three dashes, three dots.
At the beginning of the main program the HAL_Init() function is called to reset
all the peripherals, initialize the Flash interface and the systick.
Then the SystemClock_Config() function is used to configure the system
clock (SYSCLK) to run at 32 MHz.
The UART is configured as follows:
- BaudRate = 9600 baud
- Word Length = 8 bits (8 data bits, no parity bit)
- One Stop Bit
- Parity none
- Hardware flow control disabled (RTS and CTS signals)
@note USARTx/UARTx instance used and associated resources can be updated in "main.h"
file depending hardware configuration used.
@note This example can not be used in DEBUG mode due to the fact that the
Cortex-M0+ core is no longer clocked during low power mode and so debugging
features are not available.
@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
than the peripheral interrupt. Otherwi
没有合适的资源?快使用搜索试试~ 我知道了~
STM32L011K4-Nucleo.rar_RTC 低功耗_STM32L011k库sample_boardzwd_stm32l
共1087个文件
c:202个
h:159个
s:157个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 176 浏览量
2022-07-14
05:14:47
上传
评论
收藏 5.5MB RAR 举报
温馨提示
是超级低功耗STM32L011库软件,包含各种sample运用;已经在STM32L011G3芯片实现带有各种功能,包含串口 rtc/rtc唤醒 带中断低功耗休眠等...
资源详情
资源评论
资源推荐
收起资源包目录
STM32L011K4-Nucleo.rar_RTC 低功耗_STM32L011k库sample_boardzwd_stm32l (1087个子文件)
Project.STM32L011K4_NUCLEO.cspy.bat 2KB
Project.pbd.browse 1.33MB
main.c 30KB
main.c 22KB
main.c 21KB
main.c 19KB
main.c 18KB
main.c 17KB
main.c 17KB
main.c 16KB
main.c 16KB
main.c 14KB
main.c 13KB
main.c 13KB
main.c 13KB
main.c 13KB
main.c 13KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 12KB
main.c 11KB
main.c 11KB
main.c 11KB
main.c 11KB
main.c 11KB
main.c 11KB
main.c 11KB
main.c 10KB
main.c 10KB
main.c 10KB
main.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
system_stm32l0xx.c 10KB
main.c 10KB
main.c 10KB
main.c 10KB
main.c 10KB
main.c 10KB
main.c 10KB
main.c 9KB
main.c 9KB
main.c 9KB
main.c 9KB
main.c 9KB
共 1087 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
局外狗
- 粉丝: 64
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 农村信用社联合社计算机信息系统投产与变更管理办.docx
- 农村信用社联合社计算机信息系统数据管理办法.docx
- 利用SPSS作临床效度分析线上计算网站介绍-医学研究部统计谘.(医学PPT课件).ppt
- 利用Zabbix监控mysqldump定时备份数据库状态.docx
- 利用计算机解决问题的基本过程.doc
- 化工铁路通信工程总结.doc
- 北京大学网络教育软件工程作业.docx
- 医药公司(连锁店)计算机操作规程未新系统的自行按照旧制修改-新系统过制的编号加修模版.doc
- 医药公司(连锁店)计算机系统操作规程模版.doc
- 医药连锁门店计算机系统的操作和管理程序未新系统的自行按照旧制修改-新系统过制的编号加修模版.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0