iLLD_TC27xC  1.0
IfxStm.h File Reference

STM basic functionality. More...

#include "_Impl/IfxStm_cfg.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...
 

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 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, IfxStm_CompareConfig *config)
 Initialise stm compare register. More...
 
IFX_EXTERN void IfxStm_initCompareConfig (IfxStm_CompareConfig *config)
 Initialise compare configuration with default values. More...
 

Detailed Description

STM basic functionality.

Version
iLLD_0_1_0_10
                            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.