|
|
|
Component
FreeCntr
Time measurement based on counter value (suitable for short time periods)
Properties:
-
Component name - Name of the component.
-
Device - Device: compare/modulo/reload device or free running counter (the roll down menu propose the possible timers).
-
Counter - Name of the counter used by this component (for information only).
-
Interrupt service/event - Support of interrupt service. If this property is set to "Enabled", the component functionality (e.g. event invocation) depends on the interrupt service and will not operate if the CPU interrupts are disabled. For details please refer to chapter "interrupt service in the component's generated code".
The following items are available only if the group is enabled (the value is "Enabled"):
-
Interrupt - Interrupt vector invoked from the timer (for information only).
-
Interrupt priority - Priority of the interrupt associated with the timer.
-
Period/offset - Meaning of this time depends on selected device type and Reset counter on compare property.
- For free-running devices or if "Reset on compare" is selected, the time in this property represents interrupt period.
- Otherwise (for compare devices and "Reset counter on compare" property is set to "no") the time in this property represents offset (delay) between counter overflow and interrupt invocation. The value is lower then interrupt period (which is defined by timer overflow).
It is necessary to type here both value and unit (see Timing Setting Syntax). The setting may be made with the help of the Timing dialog box that gets open when clicking on button (...).
-
Reset counter on compare - The property is meaningful only if compare/modulo/reload device is selected:
- If the property is set to yes, counter is reset each time when compare matches the counter value. And event OnInterrupt is invoked during this reset (period of the event is defined by compare value).
- If the property is set to no, timer operates in free-running mode and the event OnInterrupt is invoked with a timer-overflow period (compare sets only delay between counter-overflow and OnInterrupt event).
If reload or modulo device is selected, this property should be set to yes. If free-running device is selected, the property is ignored.
-
Same period in modes - Time specified in property Period/offset must be exactly same in all speed modes.
-
Component uses entire timer - If this property is set to yes, it prevents the used timer peripheral from being shared by other components. If the timer is not shared, the component can use every subsystem of the timer, more actions may be done by the peripheral instead of driver code, e.g. generated code can be more efficient.
-
Initialization - Initial settings (after power-on or reset).
-
CPU clock/speed selection - Settings for the CPU speed modes: if the component is supported or not.
For details about speed modes please refer to page Speed Modes Support.
|