#[repr(C)]pub struct TIM_Base_InitTypeDef {
pub Prescaler: u32,
pub CounterMode: u32,
pub Period: u32,
pub ClockDivision: u32,
pub RepetitionCounter: u32,
pub AutoReloadPreload: u32,
}
Expand description
@brief TIM Time base Configuration Structure definition
Fields§
§Prescaler: u32
< Specifies the prescaler value used to divide the TIM clock. This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF
CounterMode: u32
< Specifies the counter mode. This parameter can be a value of @ref TIM_Counter_Mode
Period: u32
< Specifies the period value to be loaded into the active Auto-Reload Register at the next update event. This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
ClockDivision: u32
< Specifies the clock division. This parameter can be a value of @ref TIM_ClockDivision
RepetitionCounter: u32
< Specifies the repetition counter value. Each time the RCR downcounter reaches zero, an update event is generated and counting restarts from the RCR value (N). This means in PWM mode that (N+1) corresponds to:
- the number of PWM periods in edge-aligned mode
- the number of half PWM period in center-aligned mode GP timers: this parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. Advanced timers: this parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.
AutoReloadPreload: u32
< Specifies the auto-reload preload. This parameter can be a value of @ref TIM_AutoReloadPreload
Trait Implementations§
Source§impl Clone for TIM_Base_InitTypeDef
impl Clone for TIM_Base_InitTypeDef
Source§fn clone(&self) -> TIM_Base_InitTypeDef
fn clone(&self) -> TIM_Base_InitTypeDef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more