STM8S/A Standard Peripherals Drivers: TIM6_Exported_Functions

STM8S/A

STM8S/A Standard Peripherals Drivers
TIM6_Exported_Functions

Functions

void TIM6_ARRPreloadConfig (FunctionalState NewState)
 Enables or disables TIM6 peripheral Preload register on ARR.
void TIM6_ClearFlag (TIM6_FLAG_TypeDef TIM6_FLAG)
 Clears the TIM�s pending flags.
void TIM6_ClearITPendingBit (TIM6_IT_TypeDef TIM6_IT)
 Clears the TIM6's interrupt pending bits.
void TIM6_Cmd (FunctionalState NewState)
 Enables or disables the TIM6 peripheral.
void TIM6_DeInit (void)
 Deinitializes the TIM6 peripheral registers to their default reset values.
void TIM6_GenerateEvent (TIM6_EventSource_TypeDef TIM6_EventSource)
 Configures the TIM6 event to be generated by software.
uint8_t TIM6_GetCounter (void)
 Gets the TIM6 Counter value.
FlagStatus TIM6_GetFlagStatus (TIM6_FLAG_TypeDef TIM6_FLAG)
 Checks whether the specified TIM6 flag is set or not.
ITStatus TIM6_GetITStatus (TIM6_IT_TypeDef TIM6_IT)
 Checks whether the TIM6 interrupt has occurred or not.
TIM6_Prescaler_TypeDef TIM6_GetPrescaler (void)
 Gets the TIM6 Prescaler value.
void TIM6_InternalClockConfig (void)
 Enables the TIM6 internal Clock.
void TIM6_ITConfig (TIM6_IT_TypeDef TIM6_IT, FunctionalState NewState)
 Enables or disables the specified TIM6 interrupts.
void TIM6_PrescalerConfig (TIM6_Prescaler_TypeDef Prescaler, TIM6_PSCReloadMode_TypeDef TIM6_PSCReloadMode)
 Configures the TIM6 Prescaler.
void TIM6_SelectInputTrigger (TIM6_TS_TypeDef TIM6_InputTriggerSource)
 Selects the TIM6 Input Trigger source.
void TIM6_SelectMasterSlaveMode (FunctionalState NewState)
 Sets or Resets the TIM6 Master/Slave Mode.
void TIM6_SelectOnePulseMode (TIM6_OPMode_TypeDef TIM6_OPMode)
 Selects the TIM6�s One Pulse Mode.
void TIM6_SelectOutputTrigger (TIM6_TRGOSource_TypeDef TIM6_TRGOSource)
 Selects the TIM6 Trigger Output Mode.
void TIM6_SelectSlaveMode (TIM6_SlaveMode_TypeDef TIM6_SlaveMode)
 Selects the TIM6 Slave Mode.
void TIM6_SetAutoreload (uint8_t Autoreload)
 Sets the TIM6 Autoreload Register value.
void TIM6_SetCounter (uint8_t Counter)
 Sets the TIM6 Counter Register value.
void TIM6_TimeBaseInit (TIM6_Prescaler_TypeDef TIM6_Prescaler, uint8_t TIM6_Period)
 Initializes the TIM6 Time Base Unit according to the specified parameters.
void TIM6_UpdateDisableConfig (FunctionalState NewState)
 Enables or Disables the TIM6 Update event.
void TIM6_UpdateRequestConfig (TIM6_UpdateSource_TypeDef TIM6_UpdateSource)
 Selects the TIM6 Update Request Interrupt source.

Function Documentation

void TIM6_ARRPreloadConfig ( FunctionalState  NewState)

Enables or disables TIM6 peripheral Preload register on ARR.

Parameters:
NewState: The new state of the TIM6 peripheral Preload register. This parameter can be any of the FunctionalState enumeration.
Return values:
None

Definition at line 205 of file stm8s_tim6.c.

References ENABLE, IS_FUNCTIONALSTATE_OK, and TIM6_CR1_ARPE.

void TIM6_ClearFlag ( TIM6_FLAG_TypeDef  TIM6_FLAG)

Clears the TIM�s pending flags.

Parameters:
TIM6_FLAG: Specifies the flag to clear. This parameter can be one of the TIM6_FLAG_TypeDef enumeration.
Return values:
None

Definition at line 304 of file stm8s_tim6.c.

References IS_TIM6_CLEAR_FLAG_OK.

void TIM6_ClearITPendingBit ( TIM6_IT_TypeDef  TIM6_IT)

Clears the TIM6's interrupt pending bits.

Parameters:
TIM6_IT: Specifies the pending bit to clear. This parameter can be one of the TIM6_IT_TypeDef enumeration.
Return values:
None

Definition at line 388 of file stm8s_tim6.c.

References IS_TIM6_IT_OK.

void TIM6_Cmd ( FunctionalState  NewState)

Enables or disables the TIM6 peripheral.

Parameters:
NewState: The new state of the TIM6 peripheral. This parameter can be any of the FunctionalState enumeration.
Return values:
None

Definition at line 88 of file stm8s_tim6.c.

References ENABLE, IS_FUNCTIONALSTATE_OK, and TIM6_CR1_CEN.

void TIM6_DeInit ( void  )

Deinitializes the TIM6 peripheral registers to their default reset values.

Parameters:
None
Return values:
None

Definition at line 52 of file stm8s_tim6.c.

References TIM6_ARR_RESET_VALUE, TIM6_CNTR_RESET_VALUE, TIM6_CR1_RESET_VALUE, TIM6_CR2_RESET_VALUE, TIM6_IER_RESET_VALUE, TIM6_PSCR_RESET_VALUE, TIM6_SMCR_RESET_VALUE, and TIM6_SR1_RESET_VALUE.

void TIM6_GenerateEvent ( TIM6_EventSource_TypeDef  TIM6_EventSource)

Configures the TIM6 event to be generated by software.

Parameters:
TIM6_EventSource: Specifies the event source. This parameter can be one of the TIM6_EventSource_TypeDef enumeration.
Return values:
None

Definition at line 348 of file stm8s_tim6.c.

References IS_TIM6_EVENT_SOURCE_OK.

uint8_t TIM6_GetCounter ( void  )

Gets the TIM6 Counter value.

Parameters:
None
Return values:
uint8_t,:Counter Register value.

Definition at line 250 of file stm8s_tim6.c.

FlagStatus TIM6_GetFlagStatus ( TIM6_FLAG_TypeDef  TIM6_FLAG)

Checks whether the specified TIM6 flag is set or not.

Parameters:
TIM6_FLAG: Specifies the flag to check. This parameter can be one of the TIM6_FLAG_TypeDef enumeration.
Return values:
FlagStatus: The new state of TIM6_FLAG. This parameter can be any of the FlagStatus enumeration.

Definition at line 364 of file stm8s_tim6.c.

References IS_TIM6_GET_FLAG_OK, RESET, and SET.

ITStatus TIM6_GetITStatus ( TIM6_IT_TypeDef  TIM6_IT)

Checks whether the TIM6 interrupt has occurred or not.

Parameters:
TIM6_IT: Specifies the TIM6 interrupt source to check. This parameter can be one of the TIM6_IT_TypeDef enumeration.
Return values:
ITStatus: The new state of the TIM6_IT. This parameter can be any of the ITStatus enumeration.

Definition at line 319 of file stm8s_tim6.c.

References IS_TIM6_GET_IT_OK, RESET, and SET.

TIM6_Prescaler_TypeDef TIM6_GetPrescaler ( void  )

Gets the TIM6 Prescaler value.

Parameters:
None
Return values:
TIM6_Prescaler_TypeDef: Prescaler Register configuration value.

Definition at line 263 of file stm8s_tim6.c.

void TIM6_InternalClockConfig ( void  )

Enables the TIM6 internal Clock.

Parameters:
None
Return values:
None

Definition at line 471 of file stm8s_tim6.c.

References TIM6_SMCR_SMS.

void TIM6_ITConfig ( TIM6_IT_TypeDef  TIM6_IT,
FunctionalState  NewState 
)

Enables or disables the specified TIM6 interrupts.

Parameters:
TIM6_IT: Specifies the TIM6 interrupts sources to be enabled or disabled. This parameter can be any combination of the TIM6_IT_TypeDef enumeration.
NewState: The new state of the TIM6 peripheral. This parameter can be any of the FunctionalState enumeration.
Return values:
None
Required preconditions:
If QST option bit is enabled, the TIM6 Interrupt vector will be mapped on IRQ number 2 (irq0). Otherwise, it will be mapped on IRQ number 27 (irq25).

Definition at line 280 of file stm8s_tim6.c.

References ENABLE, IS_FUNCTIONALSTATE_OK, and IS_TIM6_IT_OK.

void TIM6_PrescalerConfig ( TIM6_Prescaler_TypeDef  Prescaler,
TIM6_PSCReloadMode_TypeDef  TIM6_PSCReloadMode 
)

Configures the TIM6 Prescaler.

Parameters:
Prescaler: Specifies the Prescaler Register value This parameter can be one of the TIM6_Prescaler_TypeDef enumeration.
TIM6_PSCReloadMode: Specifies the TIM6 Prescaler Reload mode. This parameter can be one of the TIM6_PSCReloadMode_TypeDef enumeration.
Return values:
None

Definition at line 178 of file stm8s_tim6.c.

References IS_TIM6_PRESCALER_OK, IS_TIM6_PRESCALER_RELOAD_OK, TIM6_EGR_UG, and TIM6_PSCRELOADMODE_IMMEDIATE.

void TIM6_SelectInputTrigger ( TIM6_TS_TypeDef  TIM6_InputTriggerSource)

Selects the TIM6 Input Trigger source.

Parameters:
TIM6_InputTriggerSource: Specifies Input Trigger source. This parameter can be one of the TIM6_TS_TypeDef enumeration.
Return values:
None

Definition at line 450 of file stm8s_tim6.c.

References IS_TIM6_TRIGGER_SELECTION_OK, and TIM6_SMCR_TS.

void TIM6_SelectMasterSlaveMode ( FunctionalState  NewState)

Sets or Resets the TIM6 Master/Slave Mode.

Parameters:
NewState: The new state of the synchronization between TIM6 and its slaves (through TRGO). This parameter can be any of the FunctionalState enumeration.
Return values:
None

Definition at line 428 of file stm8s_tim6.c.

References ENABLE, IS_FUNCTIONALSTATE_OK, and TIM6_SMCR_MSM.

void TIM6_SelectOnePulseMode ( TIM6_OPMode_TypeDef  TIM6_OPMode)

Selects the TIM6�s One Pulse Mode.

Parameters:
TIM6_OPMode: Specifies the OPM Mode to be used. This parameter can be one of the TIM6_OPMode_TypeDef enumeration.
Return values:
None

Definition at line 154 of file stm8s_tim6.c.

References IS_TIM6_OPM_MODE_OK, TIM6_CR1_OPM, and TIM6_OPMODE_SINGLE.

void TIM6_SelectOutputTrigger ( TIM6_TRGOSource_TypeDef  TIM6_TRGOSource)

Selects the TIM6 Trigger Output Mode.

Parameters:
TIM6_TRGOSource: Specifies the Trigger Output source. This parameter can be one of the TIM6_TRGOSource_TypeDef enumeration.
Return values:
None

Definition at line 403 of file stm8s_tim6.c.

References IS_TIM6_TRGO_SOURCE_OK, and TIM6_CR2_MMS.

void TIM6_SelectSlaveMode ( TIM6_SlaveMode_TypeDef  TIM6_SlaveMode)

Selects the TIM6 Slave Mode.

Parameters:
TIM6_SlaveMode: Specifies the TIM6 Slave Mode. This parameter can be one of the TIM6_SlaveMode_TypeDef enumeration.
Return values:
None

Definition at line 483 of file stm8s_tim6.c.

References IS_TIM6_SLAVE_MODE_OK, and TIM6_SMCR_SMS.

void TIM6_SetAutoreload ( uint8_t  Autoreload)

Sets the TIM6 Autoreload Register value.

Parameters:
Autoreload: Specifies the Autoreload register new value. This parameter is between 0x00 and 0xFF.
Return values:
None

Definition at line 239 of file stm8s_tim6.c.

void TIM6_SetCounter ( uint8_t  Counter)

Sets the TIM6 Counter Register value.

Parameters:
Counter: Specifies the Counter register new value. This parameter is between 0x00 and 0xFF.
Return values:
None

Definition at line 227 of file stm8s_tim6.c.

void TIM6_TimeBaseInit ( TIM6_Prescaler_TypeDef  TIM6_Prescaler,
uint8_t  TIM6_Period 
)

Initializes the TIM6 Time Base Unit according to the specified parameters.

Parameters:
TIM6_Prescaler: This parameter can be any of the TIM6_Prescaler_TypeDef enumeration.
TIM6_Period: This parameter must be a value between 0x00 and 0xFF.
Return values:
None

Definition at line 71 of file stm8s_tim6.c.

References IS_TIM6_PRESCALER_OK.

void TIM6_UpdateDisableConfig ( FunctionalState  NewState)

Enables or Disables the TIM6 Update event.

Parameters:
NewState: The new state of the TIM6 peripheral Preload register. This parameter can be any of the FunctionalState enumeration.
Return values:
None

Definition at line 110 of file stm8s_tim6.c.

References ENABLE, IS_FUNCTIONALSTATE_OK, and TIM6_CR1_UDIS.

void TIM6_UpdateRequestConfig ( TIM6_UpdateSource_TypeDef  TIM6_UpdateSource)

Selects the TIM6 Update Request Interrupt source.

Parameters:
TIM6_UpdateSource: Specifies the Update source. This parameter can be one of the TIM6_UpdateSource_TypeDef enumeration.
Return values:
None

Definition at line 132 of file stm8s_tim6.c.

References IS_TIM6_UPDATE_SOURCE_OK, TIM6_CR1_URS, and TIM6_UPDATESOURCE_REGULAR.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com