2014-09-18 09:45 AM
Hi
, I have
a question to ask
I'm working
with the
STM32L
discovery board
.
Currently
a while loop
cyclically
acquires
data from two
external sensors.
I'd like to
know the
frequency with which
I acquire
data from the sensors
so that you can
manage
the time
of acquisition.
What is the
simplest way to
do it
??
Thanks in advance
.2014-09-18 10:44 AM
What is the
simplest way to
do it
??
Toggle a GPIO, view period on a scope. Read a time stamp from a free running counter.2014-09-19 04:20 AM
Ok thanks Clive1.
I tried using the functions RTC_GetTime and RTC_TimeStampShow but only the first works. Surely I forgot something in the configurations. However, the second function prints the seconds. As it is possible to obtain the sub-second in order to have a more precise measure of time? Thanks.2014-09-19 04:49 AM
Hi
''As it is possible to obtain the sub-second in order to have a more precise measure of time? '' Yes, the RTC does go down to 100ms (0.1S) resolution. However, I think clive1 means use one of the timers NOT the RTC The timers are derived off the system clock so can give you resolution in the uS (possibly nS depending on your clock) I do not think the RTC has the resolution you need.