2605 views|5 replies

1w

Posts

25

Resources
The OP
 

Wake up the pyboard via PA0 [Copy link]

 

In low-power applications, in order to reduce power consumption, we need to put the microcontroller into sleep mode and then wake it up through an external button or RTC. However, until version v1.11, micropython still does not provide a function to wake up through PA0 directly after sleep mode. However, we can set it through the register method, which is not complicated to use.

To wake up through PA0, that is, the WKUP pin function, you need to set the EWUP of the PWR_CSR register to 1, and then the pyb can be woken up by the rising edge signal on the PA0 pin.

The method is as follows :

游客,如果您要查看本帖隐藏内容请回复
This content is originally created by dcexpert

, a user of EEWORLD forum . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source.

Latest reply

grateful   Details Published on 2020-10-9 21:33
 
 

1w

Posts

25

Resources
2
 

Because waking up after machine.deepsleep() is equivalent to resetting, you need to first determine the reset cause through machine.reset_cause(), and then perform different processing.

 
 
 

1w

Posts

25

Resources
3
 

For the STM32L4 series, more WKUP pins are supported, and rising edge or falling edge wake-up is also supported. The registers used for wake-up are also different, but the methods are similar.

 
 
 

7

Posts

0

Resources
4
 

Support

 
 
 

2

Posts

0

Resources
5
 

Study

 
 
 

1

Posts

0

Resources
6
 

grateful

 
 
 

Guess Your Favourite
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