iLLD_TC27xC
1.0
|
Standard interface: Timer. More...
#include "Cpu/Std/Ifx_Types.h"
#include "Src/Std/IfxSrc.h"
#include "Port/Std/IfxPort.h"
#include "IfxStdIf.h"
Go to the source code of this file.
Data Structures | |
struct | IfxStdIf_Timer_ |
Standard interface object. More... | |
struct | IfxStdIf_Timer_TrigConfig |
Trigger configuration. More... | |
struct | IfxStdIf_Timer_Config |
Timer configuration. More... | |
Typedefs | |
typedef struct IfxStdIf_Timer_ | IfxStdIf_Timer |
Forward declaration. More... | |
typedef float32(* | IfxStdIf_Timer_GetFrequency )(IfxStdIf_InterfaceDriver driver) |
Return the timer frequency in Hz. More... | |
typedef Ifx_TimerValue(* | IfxStdIf_Timer_GetPeriod )(IfxStdIf_InterfaceDriver driver) |
Return the timer period in ticks. More... | |
typedef float32(* | IfxStdIf_Timer_GetResolution )(IfxStdIf_InterfaceDriver driver) |
Return the timer resolution in seconds. More... | |
typedef Ifx_TimerValue(* | IfxStdIf_Timer_GetTrigger )(IfxStdIf_InterfaceDriver driver) |
Return the timer trigger point. More... | |
typedef boolean(* | IfxStdIf_Timer_SetFrequency )(IfxStdIf_InterfaceDriver driver, float32 frequency) |
Set the timer frequency in Hz. More... | |
typedef void(* | IfxStdIf_Timer_UpdateInputFrequency )(IfxStdIf_InterfaceDriver driver) |
Indicates the driver that the imput frequency has changed and that it should be taken in account. More... | |
typedef void(* | IfxStdIf_Timer_ApplyUpdate )(IfxStdIf_InterfaceDriver driver) |
Apply requested updates. More... | |
typedef void(* | IfxStdIf_Timer_DisableUpdate )(IfxStdIf_InterfaceDriver driver) |
Disable updates. More... | |
typedef float32(* | IfxStdIf_Timer_GetInputFrequency )(IfxStdIf_InterfaceDriver driver) |
Return the timer input frequency in Hz. More... | |
typedef void(* | IfxStdIf_Timer_Run )(IfxStdIf_InterfaceDriver driver) |
Immediately start the timer. More... | |
typedef boolean(* | IfxStdIf_Timer_SetPeriod )(IfxStdIf_InterfaceDriver driver, Ifx_TimerValue period) |
Set the timer period. More... | |
typedef void(* | IfxStdIf_Timer_SetSingleMode )(IfxStdIf_InterfaceDriver driver, boolean enabled) |
Stop timer at the end of the period. More... | |
typedef void(* | IfxStdIf_Timer_SetTrigger )(IfxStdIf_InterfaceDriver driver, Ifx_TimerValue triggerPoint) |
Set trigger point. More... | |
typedef void(* | IfxStdIf_Timer_Stop )(IfxStdIf_InterfaceDriver driver) |
Immediately stops the timer. More... | |
typedef boolean(* | IfxStdIf_Timer_AckTimerIrq )(IfxStdIf_InterfaceDriver driver) |
Return the timer interrupt flag and reset it. More... | |
typedef boolean(* | IfxStdIf_Timer_AckTriggerIrq )(IfxStdIf_InterfaceDriver driver) |
Return the trigger interrupt flag and reset it. More... | |
Enumerations | |
enum | IfxStdIf_Timer_OutputEvent { IfxStdIf_Timer_Output_disabled, IfxStdIf_Timer_Output_enabled } |
Output event enable / disable. More... | |
enum | IfxStdIf_Timer_CountDir { IfxStdIf_Timer_CountDir_up, IfxStdIf_Timer_CountDir_upAndDown, IfxStdIf_Timer_CountDir_down } |
Timer increment direction. More... | |
Standard interface: Timer.
IMPORTANT NOTICE
Infineon Technologies AG (Infineon) is supplying this file for use exclusively with Infineon's microcontroller products. This file can be freely distributed within development tools that are supporting such microcontroller products.
THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Definition in file IfxStdIf_Timer.h.
struct IfxStdIf_Timer_ |
Standard interface object.
Definition at line 220 of file IfxStdIf_Timer.h.
struct IfxStdIf_Timer_TrigConfig |
Trigger configuration.
Definition at line 242 of file IfxStdIf_Timer.h.
Data Fields | ||
---|---|---|
boolean | enabled | If true, the trigger functionality is Initialised, else ignored. |
Ifx_Priority | isrPriority | Interrupt isrPriority of the trigger interrupt, if 0 the interrupt is disable. |
IfxSrc_Tos | isrProvider | Interrupt service provider for the trigger interrupt. |
IfxPort_PadDriver | outputDriver | Output pad driver. |
boolean | outputEnabled | If TRUE, the output pin is enabled, else disabled. In case the output is disabled, the output pin is not initialized. |
IfxPort_OutputMode | outputMode | Output mode. |
boolean | risingEdgeAtPeriod | Set the clock signal polarity, if TRUE, the rising edge is at the period, else at the trigger offset. When the timer is stopped, the output is set to high. |
Ifx_TimerValue | triggerPoint | Trigger point in timer ticks. |
struct IfxStdIf_Timer_Config |
Timer configuration.
Definition at line 255 of file IfxStdIf_Timer.h.
Data Fields | ||
---|---|---|
IfxStdIf_Timer_CountDir | countDir | Timer counting mode. |
float32 | frequency | PWM frequency in Hz. This parameter is only used to initialise the timer structure. An additional cell is required to build the timer. |
Ifx_Priority | isrPriority | Interrupt isrPriority of the timer interrupt, if 0 the interrupt is disable. |
IfxSrc_Tos | isrProvider | Interrupt service provider for the timer interrupt. |
float32 | minResolution | Minimum resolution of the timer in seconds. if 0, this parameter is ignored. If the configuration does not enable this setting a warning is given. |
float32 | startOffset | FIXME make startOffset as Ifx_TimerValue. Timer initial offset in % of the period. |
IfxStdIf_Timer_TrigConfig | trigger | Trigger configuration. |
typedef struct IfxStdIf_Timer_ IfxStdIf_Timer |
Forward declaration.
Definition at line 76 of file IfxStdIf_Timer.h.
typedef boolean(* IfxStdIf_Timer_AckTimerIrq)(IfxStdIf_InterfaceDriver driver) |
Return the timer interrupt flag and reset it.
driver | Pointer to the interface driver object |
Definition at line 210 of file IfxStdIf_Timer.h.
typedef boolean(* IfxStdIf_Timer_AckTriggerIrq)(IfxStdIf_InterfaceDriver driver) |
Return the trigger interrupt flag and reset it.
driver | Pointer to the interface driver object |
Definition at line 216 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_ApplyUpdate)(IfxStdIf_InterfaceDriver driver) |
Apply requested updates.
Such requested update are calls to:
It is important to note, that only one call to Timer_applyUpdate() is allowed within one timer period!!! In order to ensure correct update synchronisation, disableUpdate() should have been called previously.
driver | Pointer to the interface driver object |
Definition at line 135 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_DisableUpdate)(IfxStdIf_InterfaceDriver driver) |
Disable updates.
The following API action will not be taken in account before applyUpdate is called:
driver | Pointer to the interface driver object |
Definition at line 152 of file IfxStdIf_Timer.h.
typedef float32(* IfxStdIf_Timer_GetFrequency)(IfxStdIf_InterfaceDriver driver) |
Return the timer frequency in Hz.
driver | Pointer to the interface driver object |
Definition at line 82 of file IfxStdIf_Timer.h.
typedef float32(* IfxStdIf_Timer_GetInputFrequency)(IfxStdIf_InterfaceDriver driver) |
Return the timer input frequency in Hz.
driver | Pointer to the interface driver object |
Definition at line 158 of file IfxStdIf_Timer.h.
typedef Ifx_TimerValue(* IfxStdIf_Timer_GetPeriod)(IfxStdIf_InterfaceDriver driver) |
Return the timer period in ticks.
driver | Pointer to the interface driver object |
Definition at line 88 of file IfxStdIf_Timer.h.
typedef float32(* IfxStdIf_Timer_GetResolution)(IfxStdIf_InterfaceDriver driver) |
Return the timer resolution in seconds.
driver | Pointer to the interface driver object |
Definition at line 94 of file IfxStdIf_Timer.h.
typedef Ifx_TimerValue(* IfxStdIf_Timer_GetTrigger)(IfxStdIf_InterfaceDriver driver) |
Return the timer trigger point.
driver | Pointer to the interface driver object |
Definition at line 100 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_Run)(IfxStdIf_InterfaceDriver driver) |
Immediately start the timer.
Please note that other mechanism may avoid the timer to tick, such as when the global (input) clock to the timer block is inactive.
driver | Pointer to the interface driver object |
Definition at line 167 of file IfxStdIf_Timer.h.
typedef boolean(* IfxStdIf_Timer_SetFrequency)(IfxStdIf_InterfaceDriver driver, float32 frequency) |
Set the timer frequency in Hz.
driver | Pointer to the interface driver object |
frequency | Requested timer frequency in Hz |
TRUE | The requested frequency could be set |
FALSE | The requested frequency is out of range |
Definition at line 108 of file IfxStdIf_Timer.h.
typedef boolean(* IfxStdIf_Timer_SetPeriod)(IfxStdIf_InterfaceDriver driver, Ifx_TimerValue period) |
Set the timer period.
Timer_applyUpdate() shall be invoked in order this to take effect.
driver | Pointer to the interface driver object |
period | Period value in ticks |
TRUE | The requested period could be set |
FALSE | The requested period is out of range |
Definition at line 177 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_SetSingleMode)(IfxStdIf_InterfaceDriver driver, boolean enabled) |
Stop timer at the end of the period.
Timer_applyUpdate() shall be invoked in order this to take effect.
driver | Pointer to the interface driver object |
enabled | If TRUE, enable the single mode, else disable the single mode (continuous mode) |
Definition at line 186 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_SetTrigger)(IfxStdIf_InterfaceDriver driver, Ifx_TimerValue triggerPoint) |
Set trigger point.
Timer_applyUpdate() shall be invoked in order this to take effect.
driver | Pointer to the interface driver object |
triggerPoint | Trigger point in ticks from the period start. |
Definition at line 198 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_Stop)(IfxStdIf_InterfaceDriver driver) |
Immediately stops the timer.
driver | Pointer to the interface driver object |
Definition at line 204 of file IfxStdIf_Timer.h.
typedef void(* IfxStdIf_Timer_UpdateInputFrequency)(IfxStdIf_InterfaceDriver driver) |
Indicates the driver that the imput frequency has changed and that it should be taken in account.
driver | Pointer to the interface driver object |
Definition at line 114 of file IfxStdIf_Timer.h.
Timer increment direction.
Enumerator | |
---|---|
IfxStdIf_Timer_CountDir_up |
Timer is counting up. |
IfxStdIf_Timer_CountDir_upAndDown |
Timer is counting up and down. |
IfxStdIf_Timer_CountDir_down |
Timer is counting down. |
Definition at line 68 of file IfxStdIf_Timer.h.
Output event enable / disable.
Definition at line 54 of file IfxStdIf_Timer.h.
void IfxStdIf_Timer_initConfig | ( | IfxStdIf_Timer_Config * | config) |
Initialize the configuration structure to default
config | Timer configuration. This parameter is initialised by the function |
Definition at line 28 of file IfxStdIf_Timer.c.
Referenced by IfxCcu6_TimerWithTrigger_initConfig(), IfxGtm_Atom_Timer_initConfig(), and IfxGtm_Tom_Timer_initConfig().