STM8L15x Standard Peripherals Drivers
|
stm8l15x_tim3.c File Reference
This file provides firmware functions to manage the following functionalities of the TIM3 peripheral:
- TimeBase management
- Output Compare management
- Input Capture management
- Interrupts, DMA and flags management
- Clocks management
- Synchronization management
- Specific interface management.
#include "stm8l15x_TIM3.h"
Go to the source code of this file.
Functions | |
static void | TI1_Config (TIM3_ICPolarity_TypeDef TIM3_ICPolarity, TIM3_ICSelection_TypeDef TIM3_ICSelection, uint8_t TIM3_ICFilter) |
Configure the TI1 as Input. | |
static void | TI2_Config (TIM3_ICPolarity_TypeDef TIM3_ICPolarity, TIM3_ICSelection_TypeDef TIM3_ICSelection, uint8_t TIM3_ICFilter) |
Configure the TI2 as Input. | |
void | TIM3_ARRPreloadConfig (FunctionalState NewState) |
Enables or disables TIM3 peripheral Preload register on ARR. | |
void | TIM3_BKRConfig (TIM3_OSSIState_TypeDef TIM3_OSSIState, TIM3_LockLevel_TypeDef TIM3_LockLevel, TIM3_BreakState_TypeDef TIM3_BreakState, TIM3_BreakPolarity_TypeDef TIM3_BreakPolarity, TIM3_AutomaticOutput_TypeDef TIM3_AutomaticOutput) |
Configures the Break feature, dead time, Lock level, the OSSI, and the AOE(automatic output enable). | |
void | TIM3_CCxCmd (TIM3_Channel_TypeDef TIM3_Channel, FunctionalState NewState) |
Enables or disables the TIM3 Capture Compare Channel x. | |
void | TIM3_ClearFlag (TIM3_FLAG_TypeDef TIM3_FLAG) |
Clears the TIM�s pending flags. | |
void | TIM3_ClearITPendingBit (TIM3_IT_TypeDef TIM3_IT) |
Clears the TIM's interrupt pending bits. | |
void | TIM3_Cmd (FunctionalState NewState) |
Enables or disables the TIM3 peripheral. | |
void | TIM3_CounterModeConfig (TIM3_CounterMode_TypeDef TIM3_CounterMode) |
Specifies the TIM3 Counter Mode to be used. | |
void | TIM3_CtrlPWMOutputs (FunctionalState NewState) |
Enables or disables the TIM3 peripheral Main Outputs. | |
void | TIM3_DeInit (void) |
Deinitialize the TIM3 peripheral registers to their default reset values. | |
void | TIM3_DMACmd (TIM3_DMASource_TypeDef TIM3_DMASource, FunctionalState NewState) |
Enables or disables the TIM3 DMA Requests. | |
void | TIM3_EncoderInterfaceConfig (TIM3_EncoderMode_TypeDef TIM3_EncoderMode, TIM3_ICPolarity_TypeDef TIM3_IC1Polarity, TIM3_ICPolarity_TypeDef TIM3_IC2Polarity) |
Configures the TIM3 Encoder Interface. | |
void | TIM3_ETRClockMode1Config (TIM3_ExtTRGPSC_TypeDef TIM3_ExtTRGPrescaler, TIM3_ExtTRGPolarity_TypeDef TIM3_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM3 External clock Mode1. | |
void | TIM3_ETRClockMode2Config (TIM3_ExtTRGPSC_TypeDef TIM3_ExtTRGPrescaler, TIM3_ExtTRGPolarity_TypeDef TIM3_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM3 External clock Mode2. | |
void | TIM3_ETRConfig (TIM3_ExtTRGPSC_TypeDef TIM3_ExtTRGPrescaler, TIM3_ExtTRGPolarity_TypeDef TIM3_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM3 External Trigger. | |
void | TIM3_ForcedOC1Config (TIM3_ForcedAction_TypeDef TIM3_ForcedAction) |
Forces the TIM3 Channel1 output waveform to active or inactive level. | |
void | TIM3_ForcedOC2Config (TIM3_ForcedAction_TypeDef TIM3_ForcedAction) |
Forces the TIM3 Channel2 output waveform to active or inactive level. | |
void | TIM3_GenerateEvent (TIM3_EventSource_TypeDef TIM3_EventSource) |
Configures the TIM3 event to be generated by software. | |
uint16_t | TIM3_GetCapture1 (void) |
Gets the TIM3 Input Capture 1 value. | |
uint16_t | TIM3_GetCapture2 (void) |
Gets the TIM3 Input Capture 2 value. | |
uint16_t | TIM3_GetCounter (void) |
Gets the TIM3 Counter value. | |
FlagStatus | TIM3_GetFlagStatus (TIM3_FLAG_TypeDef TIM3_FLAG) |
Checks whether the specified TIM3 flag is set or not. | |
ITStatus | TIM3_GetITStatus (TIM3_IT_TypeDef TIM3_IT) |
Checks whether the TIM3 interrupt has occurred or not. | |
TIM3_Prescaler_TypeDef | TIM3_GetPrescaler (void) |
Gets the TIM3 Prescaler value. | |
void | TIM3_ICInit (TIM3_Channel_TypeDef TIM3_Channel, TIM3_ICPolarity_TypeDef TIM3_ICPolarity, TIM3_ICSelection_TypeDef TIM3_ICSelection, TIM3_ICPSC_TypeDef TIM3_ICPrescaler, uint8_t TIM3_ICFilter) |
Initializes the TIM3 peripheral according to the specified parameters. | |
void | TIM3_InternalClockConfig (void) |
Enables the TIM3 internal Clock. | |
void | TIM3_ITConfig (TIM3_IT_TypeDef TIM3_IT, FunctionalState NewState) |
Enables or disables the specified TIM3 interrupts. | |
void | TIM3_OC1FastConfig (FunctionalState NewState) |
Configures the TIM3 Capture Compare 1 Fast feature. | |
void | TIM3_OC1Init (TIM3_OCMode_TypeDef TIM3_OCMode, TIM3_OutputState_TypeDef TIM3_OutputState, uint16_t TIM3_Pulse, TIM3_OCPolarity_TypeDef TIM3_OCPolarity, TIM3_OCIdleState_TypeDef TIM3_OCIdleState) |
Initializes the TIM3 Channel1 according to the specified parameters. | |
void | TIM3_OC1PolarityConfig (TIM3_OCPolarity_TypeDef TIM3_OCPolarity) |
Configures the TIM3 Channel 1 polarity. | |
void | TIM3_OC1PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM3 peripheral Preload Register on CCR1. | |
void | TIM3_OC2FastConfig (FunctionalState NewState) |
Configures the TIM3 Capture Compare 2 Fast feature. | |
void | TIM3_OC2Init (TIM3_OCMode_TypeDef TIM3_OCMode, TIM3_OutputState_TypeDef TIM3_OutputState, uint16_t TIM3_Pulse, TIM3_OCPolarity_TypeDef TIM3_OCPolarity, TIM3_OCIdleState_TypeDef TIM3_OCIdleState) |
Initializes the TIM3 Channel2 according to the specified parameters. | |
void | TIM3_OC2PolarityConfig (TIM3_OCPolarity_TypeDef TIM3_OCPolarity) |
Configures the TIM3 Channel 2 polarity. | |
void | TIM3_OC2PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM3 peripheral Preload Register on CCR2. | |
void | TIM3_PrescalerConfig (TIM3_Prescaler_TypeDef Prescaler, TIM3_PSCReloadMode_TypeDef TIM3_PSCReloadMode) |
Configures the TIM3 Prescaler. | |
void | TIM3_PWMIConfig (TIM3_Channel_TypeDef TIM3_Channel, TIM3_ICPolarity_TypeDef TIM3_ICPolarity, TIM3_ICSelection_TypeDef TIM3_ICSelection, TIM3_ICPSC_TypeDef TIM3_ICPrescaler, uint8_t TIM3_ICFilter) |
Configures the TIM3 peripheral in PWM Input Mode according to the specified parameters. | |
void | TIM3_SelectCCDMA (FunctionalState NewState) |
Selects the TIM3 peripheral Capture Compare DMA source. | |
void | TIM3_SelectHallSensor (FunctionalState NewState) |
Enables or Disables the TIM�s Hall sensor interface. | |
void | TIM3_SelectInputTrigger (TIM3_TRGSelection_TypeDef TIM3_InputTriggerSource) |
Selects the TIM3 Input Trigger source. | |
void | TIM3_SelectMasterSlaveMode (FunctionalState NewState) |
Sets or Resets the TIM3 Master/Slave Mode. | |
void | TIM3_SelectOCxM (TIM3_Channel_TypeDef TIM3_Channel, TIM3_OCMode_TypeDef TIM3_OCMode) |
Selects the TIM3 Output Compare Mode. | |
void | TIM3_SelectOnePulseMode (TIM3_OPMode_TypeDef TIM3_OPMode) |
Selects the TIM�s One Pulse Mode. | |
void | TIM3_SelectOutputTrigger (TIM3_TRGOSource_TypeDef TIM3_TRGOSource) |
Selects the TIM3 Trigger Output Mode. | |
void | TIM3_SelectSlaveMode (TIM3_SlaveMode_TypeDef TIM3_SlaveMode) |
Selects the TIM3 Slave Mode. | |
void | TIM3_SetAutoreload (uint16_t Autoreload) |
Sets the TIM3 Autoreload Register value. | |
void | TIM3_SetCompare1 (uint16_t Compare) |
Sets the TIM3 Capture Compare1 Register value. | |
void | TIM3_SetCompare2 (uint16_t Compare) |
Sets the TIM3 Capture Compare2 Register value. | |
void | TIM3_SetCounter (uint16_t Counter) |
Sets the TIM3 Counter Register value. | |
void | TIM3_SetIC1Prescaler (TIM3_ICPSC_TypeDef TIM3_IC1Prescaler) |
Sets the TIM3 Input Capture 1 prescaler. | |
void | TIM3_SetIC2Prescaler (TIM3_ICPSC_TypeDef TIM3_IC2Prescaler) |
Sets the TIM3 Input Capture 2 prescaler. | |
void | TIM3_TimeBaseInit (TIM3_Prescaler_TypeDef TIM3_Prescaler, TIM3_CounterMode_TypeDef TIM3_CounterMode, uint16_t TIM3_Period) |
Initializes the TIM3 Time Base Unit according to the specified parameters. | |
void | TIM3_TIxExternalClockConfig (TIM3_TIxExternalCLK1Source_TypeDef TIM3_TIxExternalCLKSource, TIM3_ICPolarity_TypeDef TIM3_ICPolarity, uint8_t ICFilter) |
Configures the TIM3 Trigger as External Clock. | |
void | TIM3_UpdateDisableConfig (FunctionalState NewState) |
Enables or Disables the TIM3 Update event. | |
void | TIM3_UpdateRequestConfig (TIM3_UpdateSource_TypeDef TIM3_UpdateSource) |
Selects the TIM3 Update Request Interrupt source. |
Detailed Description
This file provides firmware functions to manage the following functionalities of the TIM3 peripheral:
- TimeBase management
- Output Compare management
- Input Capture management
- Interrupts, DMA and flags management
- Clocks management
- Synchronization management
- Specific interface management.
- 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_tim3.c.