STM8L15x Standard Peripherals Drivers: stm8l15x_tim1.h File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_tim1.h File Reference

This file contains all the functions prototypes for the TIM1 firmware library. More...

#include "stm8l15x.h"

Go to the source code of this file.

Defines

#define IS_TIM1_AUTOMATIC_OUTPUT_STATE(STATE)
#define IS_TIM1_BREAK_POLARITY(POLARITY)
#define IS_TIM1_BREAK_STATE(STATE)
#define IS_TIM1_CHANNEL(CHANNEL)
#define IS_TIM1_CLEAR_FLAG(FLAG)   ((((uint16_t)(FLAG) & (uint16_t)0xE100) == 0x0000) && ((FLAG) != 0x0000))
#define IS_TIM1_COMPLEMENTARY_CHANNEL(CHANNEL)
#define IS_TIM1_COUNTER_MODE(MODE)
#define IS_TIM1_DMA_SOURCE(SOURCE)
#define IS_TIM1_DMABase(SOURCE)
#define IS_TIM1_DMABurstLength(SOURCE)
#define IS_TIM1_ENCODER_MODE(MODE)
#define IS_TIM1_EVENT_SOURCE(SOURCE)   ((SOURCE) != 0x00)
#define IS_TIM1_EXT_POLARITY(POLARITY)
#define IS_TIM1_EXT_PRESCALER(PRESCALER)
#define IS_TIM1_EXT_TRG_FILTER(FILTER)   ((FILTER) <= 0x0F)
 TIM1 External Trigger Filer Value.
#define IS_TIM1_FORCED_ACTION(ACTION)
#define IS_TIM1_GET_FLAG(FLAG)
#define IS_TIM1_GET_IT(IT)
#define IS_TIM1_IC_FILTER(ICFILTER)   ((ICFILTER) <= 0x0F)
 TIM1 Input Capture Filer Value.
#define IS_TIM1_IC_POLARITY(POLARITY)
#define IS_TIM1_IC_PRESCALER(PRESCALER)
#define IS_TIM1_IC_SELECTION(SELECTION)
#define IS_TIM1_IT(IT)   ((IT) != 0x00)
#define IS_TIM1_LOCK_LEVEL(LEVEL)
#define IS_TIM1_OC_MODE(MODE)
#define IS_TIM1_OC_POLARITY(POLARITY)
#define IS_TIM1_OCIDLE_STATE(STATE)
#define IS_TIM1_OCM(MODE)
#define IS_TIM1_OCN_POLARITY(POLARITY)
#define IS_TIM1_OCNIDLE_STATE(STATE)
#define IS_TIM1_OCREFERENCECECLEAR_SOURCE(SOURCE)
#define IS_TIM1_OPM_MODE(MODE)
#define IS_TIM1_OSSI_STATE(STATE)
#define IS_TIM1_OUTPUT_STATE(STATE)
#define IS_TIM1_OUTPUTN_STATE(STATE)
#define IS_TIM1_PRESCALER_RELOAD(RELOAD)
#define IS_TIM1_PWMI_CHANNEL(CHANNEL)
#define IS_TIM1_SLAVE_MODE(MODE)
#define IS_TIM1_TIX_TRIGGER_SELECTION(SELECTION)
#define IS_TIM1_TIXCLK_SOURCE(SOURCE)
#define IS_TIM1_TRGO_SOURCE(SOURCE)
#define IS_TIM1_TRIGGER_SELECTION(SELECTION)
#define IS_TIM1_UPDATE_SOURCE(SOURCE)

Enumerations

enum  TIM1_AutomaticOutput_TypeDef { TIM1_AutomaticOutput_Enable = ((uint8_t)0x40), TIM1_AutomaticOutput_Disable = ((uint8_t)0x00) }
enum  TIM1_BreakPolarity_TypeDef { TIM1_BreakPolarity_Low = ((uint8_t)0x00), TIM1_BreakPolarity_High = ((uint8_t)0x20) }
enum  TIM1_BreakState_TypeDef { TIM1_BreakState_Enable = ((uint8_t)0x10), TIM1_BreakState_Disable = ((uint8_t)0x00) }
enum  TIM1_Channel_TypeDef { TIM1_Channel_1 = ((uint8_t)0x00), TIM1_Channel_2 = ((uint8_t)0x01), TIM1_Channel_3 = ((uint8_t)0x02), TIM1_Channel_4 = ((uint8_t)0x03) }
enum  TIM1_CounterMode_TypeDef {
  TIM1_CounterMode_Up = ((uint8_t)0x00), TIM1_CounterMode_Down = ((uint8_t)0x10), TIM1_CounterMode_CenterAligned1 = ((uint8_t)0x20), TIM1_CounterMode_CenterAligned2 = ((uint8_t)0x40),
  TIM1_CounterMode_CenterAligned3 = ((uint8_t)0x60)
}
enum  TIM1_DMABase_TypeDef {
  TIM1_DMABase_CR1 = ((uint8_t)0x00), TIM1_DMABase_CR2 = ((uint8_t)0x01), TIM1_DMABase_SMCR = ((uint8_t)0x02), TIM1_DMABase_ETR = ((uint8_t)0x03),
  TIM1_DMABase_DER = ((uint8_t)0x04), TIM1_DMABase_IER = ((uint8_t)0x05), TIM1_DMABase_SR1 = ((uint8_t)0x06), TIM1_DMABase_SR2 = ((uint8_t)0x07),
  TIM1_DMABase_EGR = ((uint8_t)0x08), TIM1_DMABase_CCMR1 = ((uint8_t)0x09), TIM1_DMABase_CCMR2 = ((uint8_t)0x0A), TIM1_DMABase_CCMR3 = ((uint8_t)0x0B),
  TIM1_DMABase_CCMR4 = ((uint8_t)0x0C), TIM1_DMABase_CCER1 = ((uint8_t)0x0D), TIM1_DMABase_CCER2 = ((uint8_t)0x0E), TIM1_DMABase_CNTH = ((uint8_t)0x0F),
  TIM1_DMABase_CNTL = ((uint8_t)0x10), TIM1_DMABase_PSCH = ((uint8_t)0x11), TIM1_DMABase_PSCL = ((uint8_t)0x12), TIM1_DMABase_ARRH = ((uint8_t)0x13),
  TIM1_DMABase_ARRL = ((uint8_t)0x14), TIM1_DMABase_RCR = ((uint8_t)0x15), TIM1_DMABase_CCR1H = ((uint8_t)0x16), TIM1_DMABase_CCR1L = ((uint8_t)0x17),
  TIM1_DMABase_CCR2H = ((uint8_t)0x18), TIM1_DMABase_CCR2L = ((uint8_t)0x19), TIM1_DMABase_CCR3H = ((uint8_t)0x1A), TIM1_DMABase_CCR3L = ((uint8_t)0x1B),
  TIM1_DMABase_CCR4H = ((uint8_t)0x1C), TIM1_DMABase_CCR4L = ((uint8_t)0x1D), TIM1_DMABase_BKR = ((uint8_t)0x1E), TIM1_DMABase_DTR = ((uint8_t)0x1F)
}
enum  TIM1_DMABurstLength_TypeDef {
  TIM1_DMABurstLength_1Byte = ((uint8_t)0x00), TIM1_DMABurstLength_2Byte = ((uint8_t)0x01), TIM1_DMABurstLength_3Byte = ((uint8_t)0x02), TIM1_DMABurstLength_4Byte = ((uint8_t)0x03),
  TIM1_DMABurstLength_5Byte = ((uint8_t)0x04), TIM1_DMABurstLength_6Byte = ((uint8_t)0x05), TIM1_DMABurstLength_7Byte = ((uint8_t)0x06), TIM1_DMABurstLength_8Byte = ((uint8_t)0x07),
  TIM1_DMABurstLength_9Byte = ((uint8_t)0x08), TIM1_DMABurstLength_10Byte = ((uint8_t)0x09), TIM1_DMABurstLength_11Byte = ((uint8_t)0x0A), TIM1_DMABurstLength_12Byte = ((uint8_t)0x0B),
  TIM1_DMABurstLength_13Byte = ((uint8_t)0x0C), TIM1_DMABurstLength_14Byte = ((uint8_t)0x0D), TIM1_DMABurstLength_15Byte = ((uint8_t)0x0E), TIM1_DMABurstLength_16Byte = ((uint8_t)0x0F),
  TIM1_DMABurstLength_17Byte = ((uint8_t)0x10), TIM1_DMABurstLength_18Byte = ((uint8_t)0x11), TIM1_DMABurstLength_19Byte = ((uint8_t)0x12), TIM1_DMABurstLength_20Byte = ((uint8_t)0x13),
  TIM1_DMABurstLength_21Byte = ((uint8_t)0x14), TIM1_DMABurstLength_22Byte = ((uint8_t)0x15), TIM1_DMABurstLength_23Byte = ((uint8_t)0x16), TIM1_DMABurstLength_24Byte = ((uint8_t)0x17),
  TIM1_DMABurstLength_25Byte = ((uint8_t)0x18), TIM1_DMABurstLength_26Byte = ((uint8_t)0x19), TIM1_DMABurstLength_27Byte = ((uint8_t)0x1A), TIM1_DMABurstLength_28Byte = ((uint8_t)0x1B),
  TIM1_DMABurstLength_29Byte = ((uint8_t)0x1C), TIM1_DMABurstLength_30Byte = ((uint8_t)0x1D), TIM1_DMABurstLength_31Byte = ((uint8_t)0x1E), TIM1_DMABurstLength_32Byte = ((uint8_t)0x1F)
}
enum  TIM1_DMASource_TypeDef {
  TIM1_DMASource_Update = ((uint8_t)0x01), TIM1_DMASource_CC1 = ((uint8_t)0x02), TIM1_DMASource_CC2 = ((uint8_t)0x04), TIM1_DMASource_CC3 = ((uint8_t)0x08),
  TIM1_DMASource_CC4 = ((uint8_t)0x10), TIM1_DMASource_COM = ((uint8_t)0x20)
}
enum  TIM1_EncoderMode_TypeDef { TIM1_EncoderMode_TI1 = ((uint8_t)0x01), TIM1_EncoderMode_TI2 = ((uint8_t)0x02), TIM1_EncoderMode_TI12 = ((uint8_t)0x03) }
enum  TIM1_EventSource_TypeDef {
  TIM1_EventSource_Update = ((uint8_t)0x01), TIM1_EventSource_CC1 = ((uint8_t)0x02), TIM1_EventSource_CC2 = ((uint8_t)0x04), TIM1_EventSource_CC3 = ((uint8_t)0x08),
  TIM1_EventSource_CC4 = ((uint8_t)0x10), TIM1_EventSource_COM = ((uint8_t)0x20), TIM1_EventSource_Trigger = ((uint8_t)0x40), TIM1_EventSource_Break = ((uint8_t)0x80)
}
enum  TIM1_ExtTRGPolarity_TypeDef { TIM1_ExtTRGPolarity_Inverted = ((uint8_t)0x80), TIM1_ExtTRGPolarity_NonInverted = ((uint8_t)0x00) }
enum  TIM1_ExtTRGPSC_TypeDef { TIM1_ExtTRGPSC_OFF = ((uint8_t)0x00), TIM1_ExtTRGPSC_DIV2 = ((uint8_t)0x10), TIM1_ExtTRGPSC_DIV4 = ((uint8_t)0x20), TIM1_ExtTRGPSC_DIV8 = ((uint8_t)0x30) }
enum  TIM1_FLAG_TypeDef {
  TIM1_FLAG_Update = ((uint16_t)0x0001), TIM1_FLAG_CC1 = ((uint16_t)0x0002), TIM1_FLAG_CC2 = ((uint16_t)0x0004), TIM1_FLAG_CC3 = ((uint16_t)0x0008),
  TIM1_FLAG_CC4 = ((uint16_t)0x0010), TIM1_FLAG_COM = ((uint16_t)0x0020), TIM1_FLAG_Trigger = ((uint16_t)0x0040), TIM1_FLAG_Break = ((uint16_t)0x0080),
  TIM1_FLAG_CC1OF = ((uint16_t)0x0200), TIM1_FLAG_CC2OF = ((uint16_t)0x0400), TIM1_FLAG_CC3OF = ((uint16_t)0x0800), TIM1_FLAG_CC4OF = ((uint16_t)0x1000)
}
enum  TIM1_ForcedAction_TypeDef { TIM1_ForcedAction_Active = ((uint8_t)0x50), TIM1_ForcedAction_Inactive = ((uint8_t)0x40) }
enum  TIM1_ICPolarity_TypeDef { TIM1_ICPolarity_Rising = ((uint8_t)0x00), TIM1_ICPolarity_Falling = ((uint8_t)0x01) }
enum  TIM1_ICPSC_TypeDef { TIM1_ICPSC_DIV1 = ((uint8_t)0x00), TIM1_ICPSC_DIV2 = ((uint8_t)0x04), TIM1_ICPSC_DIV4 = ((uint8_t)0x08), TIM1_ICPSC_DIV8 = ((uint8_t)0x0C) }
enum  TIM1_ICSelection_TypeDef { TIM1_ICSelection_DirectTI = ((uint8_t)0x01), TIM1_ICSelection_IndirectTI = ((uint8_t)0x02), TIM1_ICSelection_TRGI = ((uint8_t)0x03) }
enum  TIM1_IT_TypeDef {
  TIM1_IT_Update = ((uint8_t)0x01), TIM1_IT_CC1 = ((uint8_t)0x02), TIM1_IT_CC2 = ((uint8_t)0x04), TIM1_IT_CC3 = ((uint8_t)0x08),
  TIM1_IT_CC4 = ((uint8_t)0x10), TIM1_IT_COM = ((uint8_t)0x20), TIM1_IT_Trigger = ((uint8_t)0x40), TIM1_IT_Break = ((uint8_t)0x80)
}
enum  TIM1_LockLevel_TypeDef { TIM1_LockLevel_Off = ((uint8_t)0x00), TIM1_LockLevel_1 = ((uint8_t)0x01), TIM1_LockLevel_2 = ((uint8_t)0x02), TIM1_LockLevel_3 = ((uint8_t)0x03) }
enum  TIM1_OCIdleState_TypeDef { TIM1_OCIdleState_Set = ((uint8_t)0x55), TIM1_OCIdleState_Reset = ((uint8_t)0x00) }
enum  TIM1_OCMode_TypeDef {
  TIM1_OCMode_Timing = ((uint8_t)0x00), TIM1_OCMode_Active = ((uint8_t)0x10), TIM1_OCMode_Inactive = ((uint8_t)0x20), TIM1_OCMode_Toggle = ((uint8_t)0x30),
  TIM1_OCMode_PWM1 = ((uint8_t)0x60), TIM1_OCMode_PWM2 = ((uint8_t)0x70)
}
enum  TIM1_OCNIdleState_TypeDef { TIM1_OCNIdleState_Set = ((uint8_t)0x2A), TIM1_OCNIdleState_Reset = ((uint8_t)0x00) }
enum  TIM1_OCNPolarity_TypeDef { TIM1_OCNPolarity_High = ((uint8_t)0x00), TIM1_OCNPolarity_Low = ((uint8_t)0x88) }
enum  TIM1_OCPolarity_TypeDef { TIM1_OCPolarity_High = ((uint8_t)0x00), TIM1_OCPolarity_Low = ((uint8_t)0x22) }
enum  TIM1_OCReferenceClear_TypeDef { TIM1_OCReferenceClear_ETRF = ((uint8_t)0x08), TIM1_OCReferenceClear_OCREFCLR = ((uint8_t)0x00) }
enum  TIM1_OPMode_TypeDef { TIM1_OPMode_Single = ((uint8_t)0x01), TIM1_OPMode_Repetitive = ((uint8_t)0x00) }
enum  TIM1_OSSIState_TypeDef { TIM1_OSSIState_Enable = ((uint8_t)0x04), TIM1_OSSIState_Disable = ((uint8_t)0x00) }
enum  TIM1_OutputNState_TypeDef { TIM1_OutputNState_Disable = ((uint8_t)0x00), TIM1_OutputNState_Enable = ((uint8_t)0x44) }
enum  TIM1_OutputState_TypeDef { TIM1_OutputState_Disable = ((uint8_t)0x00), TIM1_OutputState_Enable = ((uint8_t)0x11) }
enum  TIM1_PSCReloadMode_TypeDef { TIM1_PSCReloadMode_Update = ((uint8_t)0x00), TIM1_PSCReloadMode_Immediate = ((uint8_t)0x01) }
enum  TIM1_SlaveMode_TypeDef { TIM1_SlaveMode_Reset = ((uint8_t)0x04), TIM1_SlaveMode_Gated = ((uint8_t)0x05), TIM1_SlaveMode_Trigger = ((uint8_t)0x06), TIM1_SlaveMode_External1 = ((uint8_t)0x07) }
enum  TIM1_TIxExternalCLK1Source_TypeDef { TIM1_TIxExternalCLK1Source_TI1ED = ((uint8_t)0x40), TIM1_TIxExternalCLK1Source_TI1 = ((uint8_t)0x50), TIM1_TIxExternalCLK1Source_TI2 = ((uint8_t)0x60) }
enum  TIM1_TRGOSource_TypeDef {
  TIM1_TRGOSource_Reset = ((uint8_t)0x00), TIM1_TRGOSource_Enable = ((uint8_t)0x10), TIM1_TRGOSource_Update = ((uint8_t)0x20), TIM1_TRGOSource_OC1 = ((uint8_t)0x30),
  TIM1_TRGOSource_OC1REF = ((uint8_t)0x40), TIM1_TRGOSource_OC2REF = ((uint8_t)0x50), TIM1_TRGOSource_OC3REF = ((uint8_t)0x60), TIM1_TRGOSource_OC4REF = ((uint8_t)0x70)
}
enum  TIM1_TRGSelection_TypeDef {
  TIM1_TRGSelection_TIM4 = ((uint8_t)0x00), TIM1_TRGSelection_TIM5 = ((uint8_t)0x10), TIM1_TRGSelection_TIM3 = ((uint8_t)0x20), TIM1_TRGSelection_TIM2 = ((uint8_t)0x30),
  TIM1_TRGSelection_TI1F_ED = ((uint8_t)0x40), TIM1_TRGSelection_TI1FP1 = ((uint8_t)0x50), TIM1_TRGSelection_TI2FP2 = ((uint8_t)0x60), TIM1_TRGSelection_ETRF = ((uint8_t)0x70)
}
enum  TIM1_UpdateSource_TypeDef { TIM1_UpdateSource_Global = ((uint8_t)0x00), TIM1_UpdateSource_Regular = ((uint8_t)0x01) }

Functions

void TIM1_ARRPreloadConfig (FunctionalState NewState)
 Enables or disables TIM1 peripheral Preload register on ARR.
void TIM1_BDTRConfig (TIM1_OSSIState_TypeDef TIM1_OSSIState, TIM1_LockLevel_TypeDef TIM1_LockLevel, uint8_t TIM1_DeadTime, TIM1_BreakState_TypeDef TIM1_Break, TIM1_BreakPolarity_TypeDef TIM1_BreakPolarity, TIM1_AutomaticOutput_TypeDef TIM1_AutomaticOutput)
 Configures the Break feature, dead time, Lock level, the OSSI, and the AOE(automatic output enable).
void TIM1_CCPreloadControl (FunctionalState NewState)
 Sets or Resets the TIM1 peripheral Capture Compare Preload Control bit.
void TIM1_CCxCmd (TIM1_Channel_TypeDef TIM1_Channel, FunctionalState NewState)
 Enables or disables the TIM1 Capture Compare Channel x (x=1,..,4).
void TIM1_CCxNCmd (TIM1_Channel_TypeDef TIM1_Channel, FunctionalState NewState)
 Enables or disables the TIM1 Capture Compare Channel xN (xN=1,..,3).
void TIM1_ClearFlag (TIM1_FLAG_TypeDef TIM1_FLAG)
 Clears the TIM1�s pending flags.
void TIM1_ClearITPendingBit (TIM1_IT_TypeDef TIM1_IT)
 Clears the TIM1's interrupt pending bits.
void TIM1_ClearOC1Ref (FunctionalState NewState)
 Clears or safeguards the OC1REF signal.
void TIM1_ClearOC2Ref (FunctionalState NewState)
 Clears or safeguards the OC2REF signal.
void TIM1_ClearOC3Ref (FunctionalState NewState)
 Clears or safeguards the OC3REF signal.
void TIM1_ClearOC4Ref (FunctionalState NewState)
 Clears or safeguards the OC4REF signal.
void TIM1_Cmd (FunctionalState NewState)
 Enables or disables the TIM1 peripheral.
void TIM1_CounterModeConfig (TIM1_CounterMode_TypeDef TIM1_CounterMode)
 Specifies the TIM1 Counter Mode to be used.
void TIM1_CtrlPWMOutputs (FunctionalState NewState)
 Enables or disables the TIM1 peripheral Main Outputs.
void TIM1_DeInit (void)
 Deinitializes the TIM1 peripheral registers to their default reset values.
void TIM1_DMACmd (TIM1_DMASource_TypeDef TIM1_DMASource, FunctionalState NewState)
 Enables or disables the TIM�s DMA Requests.
void TIM1_DMAConfig (TIM1_DMABase_TypeDef TIM1_DMABase, TIM1_DMABurstLength_TypeDef TIM1_DMABurstLength)
 Configures the TIM1�s DMA interface.
void TIM1_EncoderInterfaceConfig (TIM1_EncoderMode_TypeDef TIM1_EncoderMode, TIM1_ICPolarity_TypeDef TIM1_IC1Polarity, TIM1_ICPolarity_TypeDef TIM1_IC2Polarity)
 Configures the TIM1 Encoder Interface.
void TIM1_ETRClockMode1Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM1 External clock Mode1.
void TIM1_ETRClockMode2Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM1 External clock Mode2.
void TIM1_ETRConfig (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter)
 Configures the TIM1 External Trigger.
void TIM1_ForcedOC1Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction)
 Forces the TIM1 Channel1 output waveform to active or inactive level.
void TIM1_ForcedOC2Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction)
 Forces the TIM1 Channel2 output waveform to active or inactive level.
void TIM1_ForcedOC3Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction)
 Forces the TIM1 Channel3 output waveform to active or inactive level.
void TIM1_GenerateEvent (TIM1_EventSource_TypeDef TIM1_EventSource)
 Configures the TIM1 event to be generated by software.
uint16_t TIM1_GetCapture1 (void)
 Gets the TIM1 Input Capture 1 value.
uint16_t TIM1_GetCapture2 (void)
 Gets the TIM1 Input Capture 2 value.
uint16_t TIM1_GetCapture3 (void)
 Gets the TIM1 Input Capture 3 value.
uint16_t TIM1_GetCapture4 (void)
 Gets the TIM1 Input Capture 4 value.
uint16_t TIM1_GetCounter (void)
 Gets the TIM1 Counter value.
FlagStatus TIM1_GetFlagStatus (TIM1_FLAG_TypeDef TIM1_FLAG)
 Checks whether the specified TIM1 flag is set or not.
ITStatus TIM1_GetITStatus (TIM1_IT_TypeDef TIM1_IT)
 Checks whether the TIM1 interrupt has occurred or not.
uint16_t TIM1_GetPrescaler (void)
 Gets the TIM1 Prescaler value.
void TIM1_ICInit (TIM1_Channel_TypeDef TIM1_Channel, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, TIM1_ICSelection_TypeDef TIM1_ICSelection, TIM1_ICPSC_TypeDef TIM1_ICPrescaler, uint8_t TIM1_ICFilter)
 Initializes the TIM1 peripheral according to the specified parameters.
void TIM1_InternalClockConfig (void)
 Configures the TIM1 internal Clock.
void TIM1_ITConfig (TIM1_IT_TypeDef TIM1_IT, FunctionalState NewState)
 Enables or disables the specified TIM1 interrupts.
void TIM1_OC1FastConfig (FunctionalState NewState)
 Configures the TIM1 Capture Compare 1 Fast feature.
void TIM1_OC1Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState)
 Initializes the TIM1 Channel1 according to the specified parameters.
void TIM1_OC1NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity)
 Configures the TIM1 Channel 1N polarity.
void TIM1_OC1PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity)
 Configures the TIM1 Channel 1 polarity.
void TIM1_OC1PreloadConfig (FunctionalState NewState)
 Enables or disables the TIM1 peripheral Preload Register on CCR1.
void TIM1_OC2FastConfig (FunctionalState NewState)
 Configures the TIM1 Capture Compare 2 Fast feature.
void TIM1_OC2Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState)
 Initializes the TIM1 Channel2 according to the specified parameters.
void TIM1_OC2NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity)
 Configures the TIM1 Channel 2N polarity.
void TIM1_OC2PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity)
 Configures the TIM1 Channel 2 polarity.
void TIM1_OC2PreloadConfig (FunctionalState NewState)
 Enables or disables the TIM1 peripheral Preload Register on CCR2.
void TIM1_OC3FastConfig (FunctionalState NewState)
 Configures the TIM1 Capture Compare 3 Fast feature.
void TIM1_OC3Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState)
 Initializes the TIM1 Channel3 according to the specified parameters.
void TIM1_OC3NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity)
 Configures the TIM1 Channel 3N polarity.
void TIM1_OC3PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity)
 Configures the TIM1 Channel 3 polarity.
void TIM1_OC3PreloadConfig (FunctionalState NewState)
 Enables or disables the TIM1 peripheral Preload Register on CCR3.
void TIM1_OC4PreloadConfig (FunctionalState NewState)
 Enables or disables the TIM1 peripheral Preload Register on CCR4.
void TIM1_PrescalerConfig (uint16_t Prescaler, TIM1_PSCReloadMode_TypeDef TIM1_PSCReloadMode)
 Configures the TIM1 Prescaler.
void TIM1_PWMIConfig (TIM1_Channel_TypeDef TIM1_Channel, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, TIM1_ICSelection_TypeDef TIM1_ICSelection, TIM1_ICPSC_TypeDef TIM1_ICPrescaler, uint8_t TIM1_ICFilter)
 Configures the TIM1 peripheral in PWM Input Mode according to the specified parameters.
void TIM1_SelectCCDMA (FunctionalState NewState)
 Selects the TIM1 peripheral Capture Compare DMA source.
void TIM1_SelectCOM (FunctionalState NewState)
 Selects the TIM1 peripheral Commutation event.
void TIM1_SelectHallSensor (FunctionalState NewState)
 Enables or Disables the TIM�s Hall sensor interface.
void TIM1_SelectInputTrigger (TIM1_TRGSelection_TypeDef TIM1_InputTriggerSource)
 Selects the TIM1 Input Trigger source.
void TIM1_SelectMasterSlaveMode (FunctionalState NewState)
 Sets or Resets the TIM1 Master/Slave Mode.
void TIM1_SelectOCREFClear (TIM1_OCReferenceClear_TypeDef TIM1_OCReferenceClear)
 Selects the OCReference Clear source.
void TIM1_SelectOCxM (TIM1_Channel_TypeDef TIM1_Channel, TIM1_OCMode_TypeDef TIM1_OCMode)
 Selects the TIM1 Output Compare Mode.
void TIM1_SelectOnePulseMode (TIM1_OPMode_TypeDef TIM1_OPMode)
 Selects the TIM1�s One Pulse Mode.
void TIM1_SelectOutputTrigger (TIM1_TRGOSource_TypeDef TIM1_TRGOSource)
 Selects the TIM1 Trigger Output Mode.
void TIM1_SelectSlaveMode (TIM1_SlaveMode_TypeDef TIM1_SlaveMode)
 Selects the TIM1 Slave Mode.
void TIM1_SetAutoreload (uint16_t Autoreload)
 Sets the TIM1 Autoreload Register value.
void TIM1_SetCompare1 (uint16_t Compare1)
 Sets the TIM1 Capture Compare1 Register value.
void TIM1_SetCompare2 (uint16_t Compare2)
 Sets the TIM1 Capture Compare2 Register value.
void TIM1_SetCompare3 (uint16_t Compare3)
 Sets the TIM1 Capture Compare3 Register value.
void TIM1_SetCompare4 (uint16_t Compare4)
 Sets the TIM1 Capture Compare4 Register value.
void TIM1_SetCounter (uint16_t Counter)
 Sets the TIM1 Counter Register value.
void TIM1_SetIC1Prescaler (TIM1_ICPSC_TypeDef TIM1_IC1Prescaler)
 Sets the TIM1 Input Capture 1 prescaler.
void TIM1_SetIC2Prescaler (TIM1_ICPSC_TypeDef TIM1_IC2Prescaler)
 Sets the TIM1 Input Capture 2 prescaler.
void TIM1_SetIC3Prescaler (TIM1_ICPSC_TypeDef TIM1_IC3Prescaler)
 Sets the TIM1 Input Capture 3 prescaler.
void TIM1_SetIC4Prescaler (TIM1_ICPSC_TypeDef TIM1_IC4Prescaler)
 Sets the TIM1 Input Capture 4 prescaler.
void TIM1_TimeBaseInit (uint16_t TIM1_Prescaler, TIM1_CounterMode_TypeDef TIM1_CounterMode, uint16_t TIM1_Period, uint8_t TIM1_RepetitionCounter)
 Initializes the TIM1 Time Base Unit according to the specified parameters.
void TIM1_TIxExternalClockConfig (TIM1_TIxExternalCLK1Source_TypeDef TIM1_TIxExternalCLKSource, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, uint8_t ICFilter)
 Configures the TIM1 Trigger as External Clock.
void TIM1_UpdateDisableConfig (FunctionalState NewState)
 Enables or Disables the TIM1 Update event.
void TIM1_UpdateRequestConfig (TIM1_UpdateSource_TypeDef TIM1_UpdateSource)
 Selects the TIM1 Update Request Interrupt source.

Detailed Description

This file contains all the functions prototypes for the TIM1 firmware library.

Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm8l15x_tim1.h.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com