Difference between revisions of "Component: STM32 Timer (Storage)"
(XML import) |
(No difference)
|
Latest revision as of 12:03, 25 February 2020
Author | Matrix TSL |
Version | 1.1 (Release) |
Category | Storage |
Contents
STM32 Timer component
Allows you to measure the passage of time via the use of the STM hardware timer. Works like a stopwatch with macros to start, stop and reset the timer counter. Returns time as integer Seconds, Milliseconds and also Floating Point and String.
Examples
No additional examples
Downloadable macro reference
GetCountSeconds
Returns the count value as a number of whole seconds, rounded down to the nearest second
Parameters
- This macro has no parameters
Return value
StartCounter
Starts the timer counting.
Parameters
- BOOL ResetCounters
- Range: 0-1 where 0=Do Not Reset and 1=Reset
Return value
- This call does not return a value
GetCountString
Returns the count value as a floating point string in seconds.
Parameters
- BYTE Precision
- Number of decimal places to display in string
Return value
GetCountMilliseconds
Returns the count value as a number of milliseconds
Parameters
- This macro has no parameters
Return value
StopCounter
Stops the timer counting.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ResetCounter
No additional information
Parameters
- This macro has no parameters
Return value
- This call does not return a value
GetCountReal
Returns the count value as a floating point value in seconds.
Parameters
- This macro has no parameters
Return value
GetRawCount
Returns the number of milliseconds elapsed since the timer was started.
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Timer Delay (ms)
This property is of type Unsigned integer and can be referenced with the variable name TimerDelay.
Number of milliseconds between timer events which increment the simulated timer counter variable.
10ms will yield the highest resolution. Values less than this will likely just increase the error and making the timer run slow.
Higher delays will yield greater accuracy.
Decimal Points
This property is of type Unsigned integer and can be referenced with the variable name DecimalPoints.
No additional information