2899 views|6 replies

392

Posts

0

Resources
The OP
 

stm32L011F4 internal RTC alarm, there is a state where it cannot be woken up [Copy link]

As the title says, using the internal RTC, the second interrupt can wake up in most cases, but there is a situation where it cannot wake up after low power consumption. I don’t know why, please help. This phenomenon has not yet been found to be 100% reproducible, it only occurs occasionally, and it has occurred on each of the 4 boards I have made.

Low power consumption process:

Enable RTC ALARM interrupt

Turn off ADC, DMA

Close serial port, timer

Close the IO port and set it to analog

Enable low power clock and clear wake-up flag

Set to stop mode,

_WIF()

This post is from stm32/stm8

Latest reply

This kind of problem is not 100% reproducible and is indeed difficult to find, but the focus is on RTC.   Details Published on 2021-8-25 11:51
 

6555

Posts

0

Resources
2
 

Any flags that may be generated in the program must be cleared. If not, wake-up failure may occur.

Or after entering stop mode, have you tried to wake up through external interrupt?

This post is from stm32/stm8
 
 

1w

Posts

142

Resources
3
 

First determine whether there is an RTC clock oscillation stop problem, which can only occur when the power supply voltage is too low. If this problem is eliminated, it means that it is a software problem, so focus on checking the relevant programs.

This post is from stm32/stm8

Comments

It may not be a problem with the oscillation. I adjusted the position of the RTC enable and changed it to enable before entering low power consumption (it was enabled during initialization before). In this way, this phenomenon did not occur yesterday and today. I guess it is because after enabling the alarm clock, the second interrupt happened to come, and at this time, the peripherals were being used.  Details Published on 2021-8-24 15:44
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 

392

Posts

0

Resources
4
 
chunyang posted on 2021-8-23 20:51 First determine whether there is an RTC clock stop oscillation problem, which can only occur when the power supply voltage is too low. If this problem is eliminated, it means that it is a software problem, and focus on checking the relevant...

It may not be a problem of oscillation. I adjusted the position of RTC enable and changed it to enable before entering low power consumption (it was enabled during initialization before). This phenomenon did not occur yesterday and today. I guess it is because after enabling the alarm clock, the second interrupt happened to come, and at this time, the peripheral clock was set and the flag was cleared, resulting in sleep without clearing the flag, and no second interrupt was generated. I don't know if this makes sense.

This post is from stm32/stm8

Comments

This you can only try yourself.  Details Published on 2021-8-24 16:06
 
 
 

1w

Posts

142

Resources
5
 
Madai posted on 2021-8-24 15:44 It may not be a start-up problem. I adjusted the position of RTC enable and changed it to enable before entering low power consumption (it was enabled during initialization before...

This you can only try yourself.

This post is from stm32/stm8
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

1942

Posts

2

Resources
6
 

This kind of problem is not 100% reproducible and is indeed difficult to find, but the focus is on RTC.

This post is from stm32/stm8

Comments

Well, by modifying the RTC enabling code position, this problem was solved. I can only guess that the previous problem was that after the alarm was enabled, the second interrupt came immediately, and when it happened to be in the process of entering low power consumption to set the clock and clear the flag bit, the interrupt flag bit was not cleared, resulting in the alarm wake-up interrupt not being  Details Published on 2021-8-25 17:24
 
 
 

392

Posts

0

Resources
7
 
w494143467 posted on 2021-8-25 11:51 This kind of problem is not 100% reproducible and is indeed difficult to find, but the focus is on RTC.

Well, by modifying the RTC enabling code position, this problem was solved. I can only guess that the previous problem was that after the alarm was enabled, the second interrupt came immediately, and when it happened to be in the process of entering low power consumption to set the clock and clear the flag bit, the interrupt flag bit was not cleared, resulting in the alarm wake-up interrupt no longer being generated. I am not sure whether this is the case.

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