STM8L15x Standard Peripherals Drivers: TIM2_TIM3_TIM5_Registers_Bits_Definition

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

TIM2_TIM3_TIM5_Registers_Bits_Definition

Defines

#define TIM_ARRH_ARR   ((uint8_t)0xFF)
#define TIM_ARRL_ARR   ((uint8_t)0xFF)
#define TIM_BKR_AOE   ((uint8_t)0x40)
#define TIM_BKR_BKE   ((uint8_t)0x10)
#define TIM_BKR_BKP   ((uint8_t)0x20)
#define TIM_BKR_LOCK   ((uint8_t)0x03)
#define TIM_BKR_MOE   ((uint8_t)0x80)
#define TIM_BKR_OSSI   ((uint8_t)0x04)
#define TIM_CCER1_CC1E   ((uint8_t)0x01)
#define TIM_CCER1_CC1P   ((uint8_t)0x02)
#define TIM_CCER1_CC2E   ((uint8_t)0x10)
#define TIM_CCER1_CC2P   ((uint8_t)0x20)
#define TIM_CCMR_CCxS   ((uint8_t)0x03)
#define TIM_CCMR_ICxF   ((uint8_t)0xF0)
#define TIM_CCMR_ICxPSC   ((uint8_t)0x0C)
#define TIM_CCMR_OCM   ((uint8_t)0x70)
#define TIM_CCMR_OCxFE   ((uint8_t)0x04)
#define TIM_CCMR_OCxPE   ((uint8_t)0x08)
#define TIM_CCMR_TIxDirect_Set   ((uint8_t)0x01)
#define TIM_CCR1H_CCR1   ((uint8_t)0xFF)
#define TIM_CCR1L_CCR1   ((uint8_t)0xFF)
#define TIM_CCR2H_CCR2   ((uint8_t)0xFF)
#define TIM_CCR2L_CCR2   ((uint8_t)0xFF)
#define TIM_CNTRH_CNT   ((uint8_t)0xFF)
#define TIM_CNTRL_CNT   ((uint8_t)0xFF)
#define TIM_CR1_ARPE   ((uint8_t)0x80)
#define TIM_CR1_CEN   ((uint8_t)0x01)
#define TIM_CR1_CMS   ((uint8_t)0x60)
#define TIM_CR1_DIR   ((uint8_t)0x10)
#define TIM_CR1_OPM   ((uint8_t)0x08)
#define TIM_CR1_UDIS   ((uint8_t)0x02)
#define TIM_CR1_URS   ((uint8_t)0x04)
#define TIM_CR2_CCDS   ((uint8_t)0x08)
#define TIM_CR2_MMS   ((uint8_t)0x70)
#define TIM_CR2_TI1S   ((uint8_t)0x80)
#define TIM_DER_CC1DE   ((uint8_t)0x02)
#define TIM_DER_CC2DE   ((uint8_t)0x04)
#define TIM_DER_UDE   ((uint8_t)0x01)
#define TIM_EGR_BG   ((uint8_t)0x80)
#define TIM_EGR_CC1G   ((uint8_t)0x02)
#define TIM_EGR_CC2G   ((uint8_t)0x04)
#define TIM_EGR_TG   ((uint8_t)0x40)
#define TIM_EGR_UG   ((uint8_t)0x01)
#define TIM_ETR_ECE   ((uint8_t)0x40)
#define TIM_ETR_ETF   ((uint8_t)0x0F)
#define TIM_ETR_ETP   ((uint8_t)0x80)
#define TIM_ETR_ETPS   ((uint8_t)0x30)
#define TIM_IER_BIE   ((uint8_t)0x80)
#define TIM_IER_CC1IE   ((uint8_t)0x02)
#define TIM_IER_CC2IE   ((uint8_t)0x04)
#define TIM_IER_TIE   ((uint8_t)0x40)
#define TIM_IER_UIE   ((uint8_t)0x01)
#define TIM_OISR_OIS1   ((uint8_t)0x01)
#define TIM_OISR_OIS2   ((uint8_t)0x04)
#define TIM_PSCR_PSC   ((uint8_t)0x07)
#define TIM_SMCR_MSM   ((uint8_t)0x80)
#define TIM_SMCR_SMS   ((uint8_t)0x07)
#define TIM_SMCR_TS   ((uint8_t)0x70)
#define TIM_SR1_BIF   ((uint8_t)0x80)
#define TIM_SR1_CC1IF   ((uint8_t)0x02)
#define TIM_SR1_CC2IF   ((uint8_t)0x04)
#define TIM_SR1_TIF   ((uint8_t)0x40)
#define TIM_SR1_UIF   ((uint8_t)0x01)
#define TIM_SR2_CC1OF   ((uint8_t)0x02)
#define TIM_SR2_CC2OF   ((uint8_t)0x04)

Define Documentation

#define TIM_ARRH_ARR   ((uint8_t)0xFF)

Autoreload Value (MSB) Mask.

Definition at line 2074 of file stm8l15x.h.

#define TIM_ARRL_ARR   ((uint8_t)0xFF)

Autoreload Value (LSB) Mask.

Definition at line 2075 of file stm8l15x.h.

#define TIM_BKR_AOE   ((uint8_t)0x40)

Automatic Output Enable Mask.

Definition at line 2089 of file stm8l15x.h.

#define TIM_BKR_BKE   ((uint8_t)0x10)

Break Enable Mask.

Definition at line 2091 of file stm8l15x.h.

#define TIM_BKR_BKP   ((uint8_t)0x20)

Break Polarity Mask.

Definition at line 2090 of file stm8l15x.h.

#define TIM_BKR_LOCK   ((uint8_t)0x03)

Lock Configuration Mask.

Definition at line 2093 of file stm8l15x.h.

#define TIM_BKR_MOE   ((uint8_t)0x80)

Main Output Enable Mask.

Definition at line 2088 of file stm8l15x.h.

Referenced by TIM2_CtrlPWMOutputs(), TIM3_CtrlPWMOutputs(), and TIM5_CtrlPWMOutputs().

#define TIM_BKR_OSSI   ((uint8_t)0x04)

Off-State Selection for Idle mode Mask.

Definition at line 2092 of file stm8l15x.h.

#define TIM_CCER1_CC1E   ((uint8_t)0x01)

Capture/Compare 1 output enable Mask.

Definition at line 2064 of file stm8l15x.h.

Referenced by TI1_Config(), TIM2_CCxCmd(), TIM2_OC1Init(), TIM2_SelectOCxM(), TIM3_CCxCmd(), TIM3_OC1Init(), TIM3_SelectOCxM(), TIM5_CCxCmd(), TIM5_OC1Init(), and TIM5_SelectOCxM().

#define TIM_CCER1_CC2E   ((uint8_t)0x10)

Capture/Compare 2 output enable Mask.

Definition at line 2062 of file stm8l15x.h.

Referenced by TI2_Config(), TIM2_CCxCmd(), TIM2_OC2Init(), TIM2_SelectOCxM(), TIM3_CCxCmd(), TIM3_OC2Init(), TIM3_SelectOCxM(), TIM5_CCxCmd(), TIM5_OC2Init(), and TIM5_SelectOCxM().

#define TIM_CCMR_CCxS   ((uint8_t)0x03)

Capture/Compare x Selection Mask.

Definition at line 2053 of file stm8l15x.h.

Referenced by TI1_Config(), TI2_Config(), TIM2_EncoderInterfaceConfig(), TIM3_EncoderInterfaceConfig(), and TIM5_EncoderInterfaceConfig().

#define TIM_CCMR_ICxF   ((uint8_t)0xF0)

Input Capture x Filter Mask.

Definition at line 2051 of file stm8l15x.h.

Referenced by TI1_Config(), and TI2_Config().

#define TIM_CCMR_ICxPSC   ((uint8_t)0x0C)
#define TIM_CCMR_OCxFE   ((uint8_t)0x04)

Output Compare x Fast Enable Mask.

Definition at line 2056 of file stm8l15x.h.

Referenced by TIM2_OC1FastConfig(), TIM2_OC2FastConfig(), TIM3_OC1FastConfig(), TIM3_OC2FastConfig(), TIM5_OC1FastConfig(), and TIM5_OC2FastConfig().

#define TIM_CCMR_OCxPE   ((uint8_t)0x08)
#define TIM_CCMR_TIxDirect_Set   ((uint8_t)0x01)
#define TIM_CCR1H_CCR1   ((uint8_t)0xFF)

Capture/Compare 1 Value (MSB) Mask.

Definition at line 2079 of file stm8l15x.h.

#define TIM_CCR1L_CCR1   ((uint8_t)0xFF)

Capture/Compare 1 Value (LSB) Mask.

Definition at line 2080 of file stm8l15x.h.

#define TIM_CCR2H_CCR2   ((uint8_t)0xFF)

Capture/Compare 2 Value (MSB) Mask.

Definition at line 2083 of file stm8l15x.h.

#define TIM_CCR2L_CCR2   ((uint8_t)0xFF)

Capture/Compare 2 Value (LSB) Mask.

Definition at line 2084 of file stm8l15x.h.

#define TIM_CNTRH_CNT   ((uint8_t)0xFF)

Counter Value (MSB) Mask.

Definition at line 2067 of file stm8l15x.h.

#define TIM_CNTRL_CNT   ((uint8_t)0xFF)

Counter Value (LSB) Mask.

Definition at line 2068 of file stm8l15x.h.

#define TIM_CR1_ARPE   ((uint8_t)0x80)

Auto-Reload Preload Enable Mask.

Definition at line 1994 of file stm8l15x.h.

Referenced by TIM2_ARRPreloadConfig(), TIM3_ARRPreloadConfig(), and TIM5_ARRPreloadConfig().

#define TIM_CR1_CEN   ((uint8_t)0x01)

Counter Enable Mask.

Definition at line 2000 of file stm8l15x.h.

Referenced by TIM2_Cmd(), TIM3_Cmd(), and TIM5_Cmd().

#define TIM_CR1_CMS   ((uint8_t)0x60)

Center-aligned Mode Selection Mask.

Definition at line 1995 of file stm8l15x.h.

Referenced by TIM2_CounterModeConfig(), TIM2_TimeBaseInit(), TIM3_CounterModeConfig(), TIM3_TimeBaseInit(), TIM5_CounterModeConfig(), and TIM5_TimeBaseInit().

#define TIM_CR1_DIR   ((uint8_t)0x10)
#define TIM_CR1_OPM   ((uint8_t)0x08)

One Pulse Mode Mask.

Definition at line 1997 of file stm8l15x.h.

Referenced by TIM2_SelectOnePulseMode(), TIM3_SelectOnePulseMode(), and TIM5_SelectOnePulseMode().

#define TIM_CR1_UDIS   ((uint8_t)0x02)

Update DIsable Mask.

Definition at line 1999 of file stm8l15x.h.

Referenced by TIM2_UpdateDisableConfig(), TIM3_UpdateDisableConfig(), and TIM5_UpdateDisableConfig().

#define TIM_CR1_URS   ((uint8_t)0x04)

Update Request Source Mask.

Definition at line 1998 of file stm8l15x.h.

Referenced by TIM2_UpdateRequestConfig(), TIM3_UpdateRequestConfig(), and TIM5_UpdateRequestConfig().

#define TIM_CR2_CCDS   ((uint8_t)0x08)

Capture/Compare DMA Selection

Definition at line 2005 of file stm8l15x.h.

Referenced by TIM2_SelectCCDMA(), TIM3_SelectCCDMA(), and TIM5_SelectCCDMA().

#define TIM_CR2_MMS   ((uint8_t)0x70)

MMS Selection Mask.

Definition at line 2004 of file stm8l15x.h.

Referenced by TIM2_SelectOutputTrigger(), TIM3_SelectOutputTrigger(), and TIM5_SelectOutputTrigger().

#define TIM_CR2_TI1S   ((uint8_t)0x80)

TI1 selection

Definition at line 2003 of file stm8l15x.h.

Referenced by TIM2_SelectHallSensor(), TIM3_SelectHallSensor(), and TIM5_SelectHallSensor().

#define TIM_DER_CC1DE   ((uint8_t)0x02)

Capture/Compare 1 DMA request Enable mask.

Definition at line 2022 of file stm8l15x.h.

#define TIM_DER_CC2DE   ((uint8_t)0x04)

Capture/Compare 2 DMA request Enable mask.

Definition at line 2021 of file stm8l15x.h.

#define TIM_DER_UDE   ((uint8_t)0x01)

Update DMA request Enable mask.

Definition at line 2023 of file stm8l15x.h.

#define TIM_EGR_BG   ((uint8_t)0x80)

Break Generation Mask.

Definition at line 2044 of file stm8l15x.h.

#define TIM_EGR_CC1G   ((uint8_t)0x02)

Capture/Compare 1 Generation Mask.

Definition at line 2047 of file stm8l15x.h.

#define TIM_EGR_CC2G   ((uint8_t)0x04)

Capture/Compare 2 Generation Mask.

Definition at line 2046 of file stm8l15x.h.

#define TIM_EGR_TG   ((uint8_t)0x40)

Trigger Generation Mask.

Definition at line 2045 of file stm8l15x.h.

#define TIM_EGR_UG   ((uint8_t)0x01)

Update Generation Mask.

Definition at line 2048 of file stm8l15x.h.

Referenced by TIM2_PrescalerConfig(), TIM3_PrescalerConfig(), and TIM5_PrescalerConfig().

#define TIM_ETR_ECE   ((uint8_t)0x40)

External Clock Mask.

Definition at line 2016 of file stm8l15x.h.

Referenced by TIM2_ETRClockMode2Config(), TIM3_ETRClockMode2Config(), and TIM5_ETRClockMode2Config().

#define TIM_ETR_ETF   ((uint8_t)0x0F)

External Trigger Filter Mask.

Definition at line 2018 of file stm8l15x.h.

#define TIM_ETR_ETP   ((uint8_t)0x80)

External Trigger Polarity Mask.

Definition at line 2015 of file stm8l15x.h.

#define TIM_ETR_ETPS   ((uint8_t)0x30)

External Trigger Prescaler Mask.

Definition at line 2017 of file stm8l15x.h.

#define TIM_IER_BIE   ((uint8_t)0x80)

Break Interrupt Enable Mask.

Definition at line 2026 of file stm8l15x.h.

#define TIM_IER_CC1IE   ((uint8_t)0x02)

Capture/Compare 1 Interrupt Enable Mask.

Definition at line 2029 of file stm8l15x.h.

#define TIM_IER_CC2IE   ((uint8_t)0x04)

Capture/Compare 2 Interrupt Enable Mask.

Definition at line 2028 of file stm8l15x.h.

#define TIM_IER_TIE   ((uint8_t)0x40)

Trigger Interrupt Enable Mask.

Definition at line 2027 of file stm8l15x.h.

#define TIM_IER_UIE   ((uint8_t)0x01)

Update Interrupt Enable Mask.

Definition at line 2030 of file stm8l15x.h.

#define TIM_OISR_OIS1   ((uint8_t)0x01)

Output Idle state 1 (OC1 output) Mask.

Definition at line 2097 of file stm8l15x.h.

Referenced by TIM2_OC1Init(), TIM3_OC1Init(), and TIM5_OC1Init().

#define TIM_OISR_OIS2   ((uint8_t)0x04)

Output Idle state 2 (OC2 output) Mask.

Definition at line 2096 of file stm8l15x.h.

Referenced by TIM2_OC2Init(), TIM3_OC2Init(), and TIM5_OC2Init().

#define TIM_PSCR_PSC   ((uint8_t)0x07)

Prescaler Value Mask.

Definition at line 2071 of file stm8l15x.h.

#define TIM_SR1_BIF   ((uint8_t)0x80)

Break Interrupt Flag Mask.

Definition at line 2033 of file stm8l15x.h.

#define TIM_SR1_CC1IF   ((uint8_t)0x02)

Capture/Compare 1 Interrupt Flag Mask.

Definition at line 2036 of file stm8l15x.h.

#define TIM_SR1_CC2IF   ((uint8_t)0x04)

Capture/Compare 2 Interrupt Flag Mask.

Definition at line 2035 of file stm8l15x.h.

#define TIM_SR1_TIF   ((uint8_t)0x40)

Trigger Interrupt Flag Mask.

Definition at line 2034 of file stm8l15x.h.

#define TIM_SR1_UIF   ((uint8_t)0x01)

Update Interrupt Flag Mask.

Definition at line 2037 of file stm8l15x.h.

#define TIM_SR2_CC1OF   ((uint8_t)0x02)

Capture/Compare 1 Overcapture Flag Mask.

Definition at line 2041 of file stm8l15x.h.

#define TIM_SR2_CC2OF   ((uint8_t)0x04)

Capture/Compare 2 Overcapture Flag Mask.

Definition at line 2040 of file stm8l15x.h.

STM8S Firmware Library: Overview

 

 

 

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