1
ARM Processors / 36 HAL TIM Generic Driver
« on: August 01, 2022, 09:22:58 am »
Field Documentation
• uint32_t TIM_Base_InitTypeDef::Prescaler
ระบุ the prescaler value ที่ใช้เพื่อหาร the TIM clock. This parameter สามารถเป็น a number ระหว่าง Min_Data =
0x0000 and Max_Data = 0xFFFF
• uint32_t TIM_Base_InitTypeDef::CounterMode
ระบุ the counter mode. This parameter สามารถเป็นค่าหนึ่งของ TIM_Counter_Mode
• uint32_t TIM_Base_InitTypeDef::Period
ระบุ the period value ที่จะถูกโหลดลงใน the active Auto-Reload Register ที่ the next update event. This parameter
สามารถเป็น a number ระหว่าง Min_Data = 0x0000 and Max_Data = 0xFFFF.
• uint32_t TIM_Base_InitTypeDef::ClockDivision
ระบุ the clock division. This parameter สามารถเป็นค่าหนึ่งของ TIM_ClockDivision
• uint32_t TIM_Base_InitTypeDef::RepetitionCounter
ระบุ the repetition counter value. แต่ละครั้งที่ the RCR downcounter ถึงศูนย์, an update event จะถูกสร้างและการนับจะ
สตาร์ทใหม่จาก the RCR value (N). ซึ่งหมายความว่าใน PWM mode ที่ (N+1) ตรงกันกับ:
– จำนวนของ PWM periods ใน edge-aligned mode
– จำนวนของ half PWM period ใน center-aligned mode GP timers: this parameter ต้องเป็น a number ระหว่าง
Min_Data = 0x00 and Max_Data = 0xFF. Advanced timers: this parameter ต้องเป็น a number ระหว่าง
Min_Data = 0x0000 and Max_Data = 0xFFFF.
• uint32_t TIM_Base_InitTypeDef::AutoReloadPreload
ระบุ the auto-reload preload. This parameter สามารถเป็นค่าหนึ่งของ TIM_AutoReloadPreload