2016-08-19 01:50 AM
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?2016-08-19 02:08 AM
No, the wakeup timer is not intended to be read. You could infer the elapsed time from the RTC date/time/subsecond registers though.
JW2016-08-19 09:55 AM
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 at this path: STM32Cube_FW_L0_V1.7.0\Projects\STM32L073Z_EVAL\Examples\RTC\RTC_TimeStamp -Hannibal-