Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

Break function configuration

Break function configuration
[TIM Exported Functions]

Functions

__STATIC_INLINE void LL_TIM_EnableBRK (TIM_TypeDef *TIMx)
 Enable the break function.
__STATIC_INLINE void LL_TIM_DisableBRK (TIM_TypeDef *TIMx)
 Disable the break function.
__STATIC_INLINE void LL_TIM_ConfigBRK (TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter)
 Configure the break input.
__STATIC_INLINE void LL_TIM_EnableBRK2 (TIM_TypeDef *TIMx)
 Enable the break 2 function.
__STATIC_INLINE void LL_TIM_DisableBRK2 (TIM_TypeDef *TIMx)
 Disable the break 2 function.
__STATIC_INLINE void LL_TIM_ConfigBRK2 (TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter)
 Configure the break 2 input.
__STATIC_INLINE void LL_TIM_SetOffStates (TIM_TypeDef *TIMx, uint32_t OffStateIdle, uint32_t OffStateRun)
 Select the outputs off state (enabled v.s.
__STATIC_INLINE void LL_TIM_EnableAutomaticOutput (TIM_TypeDef *TIMx)
 Enable automatic output (MOE can be set by software or automatically when a break input is active).
__STATIC_INLINE void LL_TIM_DisableAutomaticOutput (TIM_TypeDef *TIMx)
 Disable automatic output (MOE can be set only by software).
__STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput (TIM_TypeDef *TIMx)
 Indicate whether automatic output is enabled.
__STATIC_INLINE void LL_TIM_EnableAllOutputs (TIM_TypeDef *TIMx)
 Enable the outputs (set the MOE bit in TIMx_BDTR register).
__STATIC_INLINE void LL_TIM_DisableAllOutputs (TIM_TypeDef *TIMx)
 Disable the outputs (reset the MOE bit in TIMx_BDTR register).
__STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs (TIM_TypeDef *TIMx)
 Indicates whether outputs are enabled.
__STATIC_INLINE void LL_TIM_EnableBreakInputSource (TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
 Enable the signals connected to the designated timer break input.
__STATIC_INLINE void LL_TIM_DisableBreakInputSource (TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
 Disable the signals connected to the designated timer break input.
__STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity (TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source, uint32_t Polarity)
 Set the polarity of the break signal for the timer break input.

Function Documentation

__STATIC_INLINE void LL_TIM_ConfigBRK ( TIM_TypeDef *  TIMx,
uint32_t  BreakPolarity,
uint32_t  BreakFilter 
)

Configure the break input.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input.
Parameters:
TIMxTimer instance
BreakPolarityThis parameter can be one of the following values:

  • LL_TIM_BREAK_POLARITY_LOW
  • LL_TIM_BREAK_POLARITY_HIGH
BreakFilterThis parameter can be one of the following values:

  • LL_TIM_BREAK_FILTER_FDIV1
  • LL_TIM_BREAK_FILTER_FDIV1_N2
  • LL_TIM_BREAK_FILTER_FDIV1_N4
  • LL_TIM_BREAK_FILTER_FDIV1_N8
  • LL_TIM_BREAK_FILTER_FDIV2_N6
  • LL_TIM_BREAK_FILTER_FDIV2_N8
  • LL_TIM_BREAK_FILTER_FDIV4_N6
  • LL_TIM_BREAK_FILTER_FDIV4_N8
  • LL_TIM_BREAK_FILTER_FDIV8_N6
  • LL_TIM_BREAK_FILTER_FDIV8_N8
  • LL_TIM_BREAK_FILTER_FDIV16_N5
  • LL_TIM_BREAK_FILTER_FDIV16_N6
  • LL_TIM_BREAK_FILTER_FDIV16_N8
  • LL_TIM_BREAK_FILTER_FDIV32_N5
  • LL_TIM_BREAK_FILTER_FDIV32_N6
  • LL_TIM_BREAK_FILTER_FDIV32_N8
Return values:
None

Definition at line 2955 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_ConfigBRK2 ( TIM_TypeDef *  TIMx,
uint32_t  Break2Polarity,
uint32_t  Break2Filter 
)

Configure the break 2 input.

Note:
Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a second break input. BDTR BK2P LL_TIM_ConfigBRK2
BDTR BK2F LL_TIM_ConfigBRK2
Parameters:
TIMxTimer instance
Break2PolarityThis parameter can be one of the following values:

  • LL_TIM_BREAK2_POLARITY_LOW
  • LL_TIM_BREAK2_POLARITY_HIGH
Break2FilterThis parameter can be one of the following values:

  • LL_TIM_BREAK2_FILTER_FDIV1
  • LL_TIM_BREAK2_FILTER_FDIV1_N2
  • LL_TIM_BREAK2_FILTER_FDIV1_N4
  • LL_TIM_BREAK2_FILTER_FDIV1_N8
  • LL_TIM_BREAK2_FILTER_FDIV2_N6
  • LL_TIM_BREAK2_FILTER_FDIV2_N8
  • LL_TIM_BREAK2_FILTER_FDIV4_N6
  • LL_TIM_BREAK2_FILTER_FDIV4_N8
  • LL_TIM_BREAK2_FILTER_FDIV8_N6
  • LL_TIM_BREAK2_FILTER_FDIV8_N8
  • LL_TIM_BREAK2_FILTER_FDIV16_N5
  • LL_TIM_BREAK2_FILTER_FDIV16_N6
  • LL_TIM_BREAK2_FILTER_FDIV16_N8
  • LL_TIM_BREAK2_FILTER_FDIV32_N5
  • LL_TIM_BREAK2_FILTER_FDIV32_N6
  • LL_TIM_BREAK2_FILTER_FDIV32_N8
Return values:
None

Definition at line 3015 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableAllOutputs ( TIM_TypeDef *  TIMx )

Disable the outputs (reset the MOE bit in TIMx_BDTR register).

Note:
The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by software and is reset in case of break or break2 event.
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR MOE LL_TIM_DisableAllOutputs
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 3104 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableAutomaticOutput ( TIM_TypeDef *  TIMx )

Disable automatic output (MOE can be set only by software).

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR AOE LL_TIM_DisableAutomaticOutput
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 3061 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableBreakInputSource ( TIM_TypeDef *  TIMx,
uint32_t  BreakInput,
uint32_t  Source 
)

Disable the signals connected to the designated timer break input.

Note:
Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether or not a timer instance allows for break input selection. OR2 BKINE LL_TIM_DisableBreakInputSource
OR2 BKCMP1E LL_TIM_DisableBreakInputSource
OR2 BKCMP2E LL_TIM_DisableBreakInputSource
OR2 BKDFBK0E LL_TIM_DisableBreakInputSource
OR3 BKINE LL_TIM_DisableBreakInputSource
OR3 BKCMP1E LL_TIM_DisableBreakInputSource
OR3 BKCMP2E LL_TIM_DisableBreakInputSource
OR3 BKDFBK0E LL_TIM_DisableBreakInputSource
Parameters:
TIMxTimer instance
BreakInputThis parameter can be one of the following values:

  • LL_TIM_BREAK_INPUT_BKIN
  • LL_TIM_BREAK_INPUT_BKIN2
SourceThis parameter can be one of the following values:

  • LL_TIM_BKIN_SOURCE_BKIN
  • LL_TIM_BKIN_SOURCE_BKCOMP1
  • LL_TIM_BKIN_SOURCE_BKCOMP2
  • LL_TIM_BKIN_SOURCE_DFBK
Return values:
None

Definition at line 3174 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableBRK ( TIM_TypeDef *  TIMx )

Disable the break function.

BDTR BKE LL_TIM_DisableBRK

Parameters:
TIMxTimer instance
Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input.
Return values:
None

Definition at line 2923 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableBRK2 ( TIM_TypeDef *  TIMx )

Disable the break 2 function.

Note:
Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a second break input. BDTR BK2E LL_TIM_DisableBRK2
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2981 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableAllOutputs ( TIM_TypeDef *  TIMx )

Enable the outputs (set the MOE bit in TIMx_BDTR register).

Note:
The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by software and is reset in case of break or break2 event
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR MOE LL_TIM_EnableAllOutputs
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 3089 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableAutomaticOutput ( TIM_TypeDef *  TIMx )

Enable automatic output (MOE can be set by software or automatically when a break input is active).

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR AOE LL_TIM_EnableAutomaticOutput
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 3048 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableBreakInputSource ( TIM_TypeDef *  TIMx,
uint32_t  BreakInput,
uint32_t  Source 
)

Enable the signals connected to the designated timer break input.

Note:
Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether or not a timer instance allows for break input selection. OR2 BKINE LL_TIM_EnableBreakInputSource
OR2 BKCMP1E LL_TIM_EnableBreakInputSource
OR2 BKCMP2E LL_TIM_EnableBreakInputSource
OR2 BKDFBK0E LL_TIM_EnableBreakInputSource
OR3 BKINE LL_TIM_EnableBreakInputSource
OR3 BKCMP1E LL_TIM_EnableBreakInputSource
OR3 BKCMP2E LL_TIM_EnableBreakInputSource
OR3 BKDFBK0E LL_TIM_EnableBreakInputSource
Parameters:
TIMxTimer instance
BreakInputThis parameter can be one of the following values:

  • LL_TIM_BREAK_INPUT_BKIN
  • LL_TIM_BREAK_INPUT_BKIN2
SourceThis parameter can be one of the following values:

  • LL_TIM_BKIN_SOURCE_BKIN
  • LL_TIM_BKIN_SOURCE_BKCOMP1
  • LL_TIM_BKIN_SOURCE_BKCOMP2
  • LL_TIM_BKIN_SOURCE_DFBK
Return values:
None

Definition at line 3145 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableBRK ( TIM_TypeDef *  TIMx )

Enable the break function.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR BKE LL_TIM_EnableBRK
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2910 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableBRK2 ( TIM_TypeDef *  TIMx )

Enable the break 2 function.

Note:
Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a second break input. BDTR BK2E LL_TIM_EnableBRK2
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2968 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs ( TIM_TypeDef *  TIMx )

Indicates whether outputs are enabled.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR MOE LL_TIM_IsEnabledAllOutputs
Parameters:
TIMxTimer instance
Return values:
Stateof bit (1 or 0).

Definition at line 3117 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput ( TIM_TypeDef *  TIMx )

Indicate whether automatic output is enabled.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR AOE LL_TIM_IsEnabledAutomaticOutput
Parameters:
TIMxTimer instance
Return values:
Stateof bit (1 or 0).

Definition at line 3074 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity ( TIM_TypeDef *  TIMx,
uint32_t  BreakInput,
uint32_t  Source,
uint32_t  Polarity 
)

Set the polarity of the break signal for the timer break input.

Note:
Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether or not a timer instance allows for break input selection. OR2 BKINE LL_TIM_SetBreakInputSourcePolarity
OR2 BKCMP1E LL_TIM_SetBreakInputSourcePolarity
OR2 BKCMP2E LL_TIM_SetBreakInputSourcePolarity
OR2 BKINP LL_TIM_SetBreakInputSourcePolarity
OR3 BKINE LL_TIM_SetBreakInputSourcePolarity
OR3 BKCMP1E LL_TIM_SetBreakInputSourcePolarity
OR3 BKCMP2E LL_TIM_SetBreakInputSourcePolarity
OR3 BKINP LL_TIM_SetBreakInputSourcePolarity
Parameters:
TIMxTimer instance
BreakInputThis parameter can be one of the following values:

  • LL_TIM_BREAK_INPUT_BKIN
  • LL_TIM_BREAK_INPUT_BKIN2
SourceThis parameter can be one of the following values:

  • LL_TIM_BKIN_SOURCE_BKIN
  • LL_TIM_BKIN_SOURCE_BKCOMP1
  • LL_TIM_BKIN_SOURCE_BKCOMP2
PolarityThis parameter can be one of the following values:

  • LL_TIM_BKIN_POLARITY_LOW
  • LL_TIM_BKIN_POLARITY_HIGH
Return values:
None

Definition at line 3205 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetOffStates ( TIM_TypeDef *  TIMx,
uint32_t  OffStateIdle,
uint32_t  OffStateRun 
)

Select the outputs off state (enabled v.s.

disabled) in Idle and Run modes.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input. BDTR OSSI LL_TIM_SetOffStates
BDTR OSSR LL_TIM_SetOffStates
Parameters:
TIMxTimer instance
OffStateIdleThis parameter can be one of the following values:

  • LL_TIM_OSSI_DISABLE
  • LL_TIM_OSSI_ENABLE
OffStateRunThis parameter can be one of the following values:

  • LL_TIM_OSSR_DISABLE
  • LL_TIM_OSSR_ENABLE
Return values:
None

Definition at line 3035 of file stm32l4xx_ll_tim.h.