cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 Getting RTC Wakeup Counter

onurkepenek
Associate
Posted on August 19, 2016 at 10:50

Hello,

I'm planning to use STM32L0 for a battery powered application. I am working on STM32L0 discovery board now. In my project, the external pulses will be counted while microcontroller is in stop mode. And a timer, which can also be working in stop mode, for timing and task scheduling. I am using low power timer for counting external pulses, RTC wakeup timer for timing (with periodic timebase/wakeup configuration for clock configuration 1). I need to read counter value while timer is running (when external interrupt occurs etc.) to get elapsed time. But it seems that the value can't be read. Is there anyway to read this value?
2 REPLIES 2
Posted on August 19, 2016 at 11:08

No, the wakeup timer is not intended to be read. You could infer the elapsed time from the RTC date/time/subsecond registers though.

JW
Walid FTITI_O
Senior II
Posted on August 19, 2016 at 18:55

Hi onurkpnk,

You can use the RTC time stamp in your case. Read more about that in this application note AN4759. I recommend to get a look the the RTC_TimeStamp example in the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubel0.html

at this path:

STM32Cube_FW_L0_V1.7.0\Projects\STM32L073Z_EVAL\Examples\RTC\RTC_TimeStamp

-Hannibal-