iLLD_TC29x  1.0
IfxStm.h File Reference

STM basic functionality. More...

#include "_Impl/IfxStm_cfg.h"
#include "Scu/Std/IfxScuCcu.h"
#include "Src/Std/IfxSrc.h"

Go to the source code of this file.

Data Structures

struct  IfxStm_CompareConfig
 Comparator Configuration Structure. More...
 

Enumerations

enum  IfxStm_Comparator {
  IfxStm_Comparator_0 = 0,
  IfxStm_Comparator_1
}
 Comparator Id defined in MODULE_STMx.ISCR.B.CMP0IRR(x = 0, 1, 2) More...
 
enum  IfxStm_ComparatorInterrupt {
  IfxStm_ComparatorInterrupt_ir0 = 0,
  IfxStm_ComparatorInterrupt_ir1 = 1
}
 Comparator Interrupt request source defined in MODULE_SRC.STM.STM[index].SRx (x =0, 1) More...
 
enum  IfxStm_ComparatorOffset {
  IfxStm_ComparatorOffset_0 = 0,
  IfxStm_ComparatorOffset_1,
  IfxStm_ComparatorOffset_2,
  IfxStm_ComparatorOffset_3,
  IfxStm_ComparatorOffset_4,
  IfxStm_ComparatorOffset_5,
  IfxStm_ComparatorOffset_6,
  IfxStm_ComparatorOffset_7,
  IfxStm_ComparatorOffset_8,
  IfxStm_ComparatorOffset_9,
  IfxStm_ComparatorOffset_10,
  IfxStm_ComparatorOffset_11,
  IfxStm_ComparatorOffset_12,
  IfxStm_ComparatorOffset_13,
  IfxStm_ComparatorOffset_14,
  IfxStm_ComparatorOffset_15,
  IfxStm_ComparatorOffset_16,
  IfxStm_ComparatorOffset_17,
  IfxStm_ComparatorOffset_18,
  IfxStm_ComparatorOffset_19,
  IfxStm_ComparatorOffset_20,
  IfxStm_ComparatorOffset_21,
  IfxStm_ComparatorOffset_22,
  IfxStm_ComparatorOffset_23,
  IfxStm_ComparatorOffset_24,
  IfxStm_ComparatorOffset_25,
  IfxStm_ComparatorOffset_26,
  IfxStm_ComparatorOffset_27,
  IfxStm_ComparatorOffset_28,
  IfxStm_ComparatorOffset_29,
  IfxStm_ComparatorOffset_30,
  IfxStm_ComparatorOffset_31
}
 Comparator start bit position defined in MODULE_STMx.CMCON.B.MSTART0(x = 0,1,2) More...
 
enum  IfxStm_ComparatorSize {
  IfxStm_ComparatorSize_1Bit = 0,
  IfxStm_ComparatorSize_2Bits = 1,
  IfxStm_ComparatorSize_3Bits = 2,
  IfxStm_ComparatorSize_4Bits = 3,
  IfxStm_ComparatorSize_5Bits = 4,
  IfxStm_ComparatorSize_6Bits = 5,
  IfxStm_ComparatorSize_7Bits = 6,
  IfxStm_ComparatorSize_8Bits = 7,
  IfxStm_ComparatorSize_9Bits = 8,
  IfxStm_ComparatorSize_10Bits = 9,
  IfxStm_ComparatorSize_11Bits = 10,
  IfxStm_ComparatorSize_12Bits = 11,
  IfxStm_ComparatorSize_13Bits = 12,
  IfxStm_ComparatorSize_14Bits = 13,
  IfxStm_ComparatorSize_15Bits = 14,
  IfxStm_ComparatorSize_16Bits = 15,
  IfxStm_ComparatorSize_17Bits = 16,
  IfxStm_ComparatorSize_18Bits = 17,
  IfxStm_ComparatorSize_19Bits = 18,
  IfxStm_ComparatorSize_20Bits = 19,
  IfxStm_ComparatorSize_21Bits = 20,
  IfxStm_ComparatorSize_22Bits = 21,
  IfxStm_ComparatorSize_23Bits = 22,
  IfxStm_ComparatorSize_24Bits = 23,
  IfxStm_ComparatorSize_25Bits = 24,
  IfxStm_ComparatorSize_26Bits = 25,
  IfxStm_ComparatorSize_27Bits = 26,
  IfxStm_ComparatorSize_28Bits = 27,
  IfxStm_ComparatorSize_29Bits = 28,
  IfxStm_ComparatorSize_30Bits = 29,
  IfxStm_ComparatorSize_31Bits = 30,
  IfxStm_ComparatorSize_32Bits = 31
}
 Size of compare value to compare with timer defined in MODULE_STMx.CMCON.B.MSIZE0(x = 0,1,2) More...
 
enum  IfxStm_SleepMode {
  IfxStm_SleepMode_enable = 0,
  IfxStm_SleepMode_disable = 1
}
 Enable/disable the sensitivity of the module to sleep signal
Definition in Ifx_STM.CLC.B.EDIS. More...
 

Functions

IFX_INLINE uint64 IfxStm_get (Ifx_STM *stm)
 Returns system timer value. More...
 
IFX_INLINE float32 IfxStm_getFrequency (Ifx_STM *stm)
 Returns the system timer frequency. More...
 
IFX_EXTERN void IfxStm_enableOcdsSuspend (Ifx_STM *stm)
 enable suspend by debugger. More...
 
IFX_EXTERN IfxStm_ResourceStm IfxStm_getIndex (Ifx_STM *stm)
 API to get the resource index of the STM specified. More...
 
IFX_INLINE uint32 IfxStm_getLower (Ifx_STM *stm)
 Returns the lower system timer value. More...
 
IFX_INLINE uint32 IfxStm_getOffset12Timer (Ifx_STM *stm)
 Gets the TIM3 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffset16Timer (Ifx_STM *stm)
 Gets the TIM4 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffset20Timer (Ifx_STM *stm)
 Gets the TIM5 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffset32Timer (Ifx_STM *stm)
 Gets the TIM6 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffset4Timer (Ifx_STM *stm)
 Gets the TIM1 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffset8Timer (Ifx_STM *stm)
 Gets the TIM2 couter value. More...
 
IFX_INLINE uint32 IfxStm_getOffsetTimer (Ifx_STM *stm, uint8 offset)
 Returns the timer value shifted right by offset. More...
 
IFX_INLINE void IfxStm_waitTicks (Ifx_STM *stm, uint32 ticks)
 Wait for requested time. The macro waits in while loop for the specified time in system timer ticks. More...
 
IFX_INLINE uint32 IfxStm_getCompare (Ifx_STM *stm, IfxStm_Comparator comparator)
 Returns the updated compare register value. More...
 
IFX_INLINE sint32 IfxStm_getTicksFromMicroseconds (Ifx_STM *stm, uint32 microSeconds)
 Returns the number of ticks for the selected micro seconds based on the STM frequency. More...
 
IFX_INLINE sint32 IfxStm_getTicksFromMilliseconds (Ifx_STM *stm, uint32 milliSeconds)
 Returns the number of ticks for the selected milli seconds based on the STM frequency. More...
 
IFX_INLINE void IfxStm_increaseCompare (Ifx_STM *stm, IfxStm_Comparator comparator, uint32 ticks)
 Update the compare register value increased with given ticks. More...
 
IFX_INLINE void IfxStm_updateCompare (Ifx_STM *stm, IfxStm_Comparator comparator, uint32 ticks)
 Update the compare register value. More...
 
IFX_EXTERN void IfxStm_clearCompareFlag (Ifx_STM *stm, IfxStm_Comparator comparator)
 Clear the compare interrupt flag. More...
 
IFX_EXTERN boolean IfxStm_initCompare (Ifx_STM *stm, const IfxStm_CompareConfig *config)
 Initialise stm compare register. More...
 
IFX_EXTERN void IfxStm_initCompareConfig (IfxStm_CompareConfig *config)
 Initialise compare configuration with default values. More...
 
IFX_EXTERN void IfxStm_enableComparatorInterrupt (Ifx_STM *stm, IfxStm_Comparator comparator)
 Enables the compare interrupt . More...
 
IFX_INLINE void IfxStm_setSleepMode (Ifx_STM *stm, IfxStm_SleepMode mode)
 
IFX_EXTERN void IfxStm_resetModule (Ifx_STM *stm)
 

Detailed Description

STM basic functionality.

Version
iLLD_1_0_0_11_0
                            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 IfxStm.h.

Function Documentation

IFX_EXTERN void IfxStm_resetModule ( Ifx_STM *  stm)
Parameters
stmpointer to STM registers
Returns
None

Definition at line 157 of file IfxStm.c.

IFX_INLINE void IfxStm_setSleepMode ( Ifx_STM *  stm,
IfxStm_SleepMode  mode 
)
Parameters
stmpointer STM registers
modemode selection (enable/ disable)
Returns
None

Definition at line 557 of file IfxStm.h.