libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
libopencm3 Defined Constants and Types for the STM32F2xx Timers More...
Functions | |
void | timer_enable_irq (uint32_t timer_peripheral, uint32_t irq) |
Enable Interrupts for a Timer. More... | |
void | timer_disable_irq (uint32_t timer_peripheral, uint32_t irq) |
Disable Interrupts for a Timer. More... | |
bool | timer_interrupt_source (uint32_t timer_peripheral, uint32_t flag) |
Return Interrupt Source. More... | |
bool | timer_get_flag (uint32_t timer_peripheral, uint32_t flag) |
Read a Status Flag. More... | |
void | timer_clear_flag (uint32_t timer_peripheral, uint32_t flag) |
Clear a Status Flag. More... | |
void | timer_set_mode (uint32_t timer_peripheral, uint32_t clock_div, uint32_t alignment, uint32_t direction) |
Set the Timer Mode. More... | |
void | timer_set_clock_division (uint32_t timer_peripheral, uint32_t clock_div) |
Set Input Filter and Dead-time Clock Divider Ratio. More... | |
void | timer_enable_preload (uint32_t timer_peripheral) |
Enable Auto-Reload Buffering. More... | |
void | timer_disable_preload (uint32_t timer_peripheral) |
Disable Auto-Reload Buffering. More... | |
void | timer_set_alignment (uint32_t timer_peripheral, uint32_t alignment) |
Specify the counter alignment mode. More... | |
void | timer_direction_up (uint32_t timer_peripheral) |
Set the Timer to Count Up. More... | |
void | timer_direction_down (uint32_t timer_peripheral) |
Set the Timer to Count Down. More... | |
void | timer_one_shot_mode (uint32_t timer_peripheral) |
Enable the Timer for One Cycle and Stop. More... | |
void | timer_continuous_mode (uint32_t timer_peripheral) |
Enable the Timer to Run Continuously. More... | |
void | timer_update_on_any (uint32_t timer_peripheral) |
Set the Timer to Generate Update IRQ or DMA on any Event. More... | |
void | timer_update_on_overflow (uint32_t timer_peripheral) |
Set the Timer to Generate Update IRQ or DMA only from Under/Overflow Events. More... | |
void | timer_enable_update_event (uint32_t timer_peripheral) |
Enable Timer Update Events. More... | |
void | timer_disable_update_event (uint32_t timer_peripheral) |
Disable Timer Update Events. More... | |
void | timer_enable_counter (uint32_t timer_peripheral) |
Enable the timer to start counting. More... | |
void | timer_disable_counter (uint32_t timer_peripheral) |
Stop the timer from counting. More... | |
void | timer_set_output_idle_state (uint32_t timer_peripheral, uint32_t outputs) |
Set Timer Output Idle States High. More... | |
void | timer_reset_output_idle_state (uint32_t timer_peripheral, uint32_t outputs) |
Set Timer Output Idle States Low. More... | |
void | timer_set_ti1_ch123_xor (uint32_t timer_peripheral) |
Set Timer 1 Input to XOR of Three Channels. More... | |
void | timer_set_ti1_ch1 (uint32_t timer_peripheral) |
Set Timer 1 Input to Channel 1. More... | |
void | timer_set_master_mode (uint32_t timer_peripheral, uint32_t mode) |
Set the Master Mode. More... | |
void | timer_set_dma_on_compare_event (uint32_t timer_peripheral) |
Set Timer DMA Requests on Capture/Compare Events. More... | |
void | timer_set_dma_on_update_event (uint32_t timer_peripheral) |
Set Timer DMA Requests on Update Events. More... | |
void | timer_enable_compare_control_update_on_trigger (uint32_t timer_peripheral) |
Enable Timer Capture/Compare Control Update with Trigger. More... | |
void | timer_disable_compare_control_update_on_trigger (uint32_t timer_peripheral) |
Disable Timer Capture/Compare Control Update with Trigger. More... | |
void | timer_enable_preload_complementry_enable_bits (uint32_t timer_peripheral) |
Enable Timer Capture/Compare Control Preload. More... | |
void | timer_disable_preload_complementry_enable_bits (uint32_t timer_peripheral) |
Disable Timer Capture/Compare Control Preload. More... | |
void | timer_set_prescaler (uint32_t timer_peripheral, uint32_t value) |
Set the Value for the Timer Prescaler. More... | |
void | timer_set_repetition_counter (uint32_t timer_peripheral, uint32_t value) |
Set the Value for the Timer Repetition Counter. More... | |
void | timer_set_period (uint32_t timer_peripheral, uint32_t period) |
Timer Set Period. More... | |
void | timer_enable_oc_clear (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Enable the Output Compare Clear Function. More... | |
void | timer_disable_oc_clear (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Disable the Output Compare Clear Function. More... | |
void | timer_set_oc_fast_mode (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Enable the Output Compare Fast Mode. More... | |
void | timer_set_oc_slow_mode (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Enable the Output Compare Slow Mode. More... | |
void | timer_set_oc_mode (uint32_t timer_peripheral, enum tim_oc_id oc_id, enum tim_oc_mode oc_mode) |
Timer Set Output Compare Mode. More... | |
void | timer_enable_oc_preload (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Enable the Output Compare Preload Register. More... | |
void | timer_disable_oc_preload (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Disable the Output Compare Preload Register. More... | |
void | timer_set_oc_polarity_high (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Set the Output Polarity High. More... | |
void | timer_set_oc_polarity_low (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Set the Output Polarity Low. More... | |
void | timer_enable_oc_output (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Enable the Output Compare. More... | |
void | timer_disable_oc_output (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Disable the Output Compare. More... | |
void | timer_set_oc_idle_state_set (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer set Output Compare Idle State High. More... | |
void | timer_set_oc_idle_state_unset (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Timer Set Output Compare Idle State Low. More... | |
void | timer_set_oc_value (uint32_t timer_peripheral, enum tim_oc_id oc_id, uint32_t value) |
Timer Set Output Compare Value. More... | |
void | timer_enable_break_main_output (uint32_t timer_peripheral) |
Enable Output in Break. More... | |
void | timer_disable_break_main_output (uint32_t timer_peripheral) |
Disable Output in Break. More... | |
void | timer_enable_break_automatic_output (uint32_t timer_peripheral) |
Enable Automatic Output in Break. More... | |
void | timer_disable_break_automatic_output (uint32_t timer_peripheral) |
Disable Automatic Output in Break. More... | |
void | timer_set_break_polarity_high (uint32_t timer_peripheral) |
Activate Break when Input High. More... | |
void | timer_set_break_polarity_low (uint32_t timer_peripheral) |
Activate Break when Input Low. More... | |
void | timer_enable_break (uint32_t timer_peripheral) |
Enable Break. More... | |
void | timer_disable_break (uint32_t timer_peripheral) |
Disable Break. More... | |
void | timer_set_enabled_off_state_in_run_mode (uint32_t timer_peripheral) |
Enable Off-State in Run Mode. More... | |
void | timer_set_disabled_off_state_in_run_mode (uint32_t timer_peripheral) |
Disable Off-State in Run Mode. More... | |
void | timer_set_enabled_off_state_in_idle_mode (uint32_t timer_peripheral) |
Enable Off-State in Idle Mode. More... | |
void | timer_set_disabled_off_state_in_idle_mode (uint32_t timer_peripheral) |
Disable Off-State in Idle Mode. More... | |
void | timer_set_break_lock (uint32_t timer_peripheral, uint32_t lock) |
Set Lock Bits. More... | |
void | timer_set_deadtime (uint32_t timer_peripheral, uint32_t deadtime) |
Set Deadtime. More... | |
void | timer_generate_event (uint32_t timer_peripheral, uint32_t event) |
Force generate a timer event. More... | |
uint32_t | timer_get_counter (uint32_t timer_peripheral) |
Read Counter. More... | |
void | timer_set_counter (uint32_t timer_peripheral, uint32_t count) |
Set Counter. More... | |
void | timer_ic_set_filter (uint32_t timer, enum tim_ic_id ic, enum tim_ic_filter flt) |
Set Input Capture Filter Parameters. More... | |
void | timer_ic_set_prescaler (uint32_t timer, enum tim_ic_id ic, enum tim_ic_psc psc) |
Set Input Capture Prescaler. More... | |
void | timer_ic_set_input (uint32_t timer, enum tim_ic_id ic, enum tim_ic_input in) |
Set Capture/Compare Channel Direction/Input. More... | |
void | timer_ic_enable (uint32_t timer, enum tim_ic_id ic) |
Enable Timer Input Capture. More... | |
void | timer_ic_disable (uint32_t timer, enum tim_ic_id ic) |
Disable Timer Input Capture. More... | |
void | timer_slave_set_filter (uint32_t timer, enum tim_ic_filter flt) |
Set External Trigger Filter Parameters for Slave. More... | |
void | timer_slave_set_prescaler (uint32_t timer, enum tim_ic_psc psc) |
Set External Trigger Prescaler for Slave. More... | |
void | timer_slave_set_polarity (uint32_t timer, enum tim_et_pol pol) |
Set External Trigger Polarity for Slave. More... | |
void | timer_slave_set_mode (uint32_t timer, uint8_t mode) |
Set Slave Mode. More... | |
void | timer_slave_set_trigger (uint32_t timer, uint8_t trigger) |
Set Slave Trigger Source. More... | |
void | timer_slave_set_extclockmode2 (uint32_t timer_peripheral, enum tim_ecm2_state state) |
Set External Clock Mode 2. More... | |
libopencm3 Defined Constants and Types for the STM32F2xx Timers
LGPL License Terms libopencm3 License
#define TIM10_ARR TIM_ARR(TIM10) |
Definition at line 289 of file timer_common_all.h.
#define TIM10_CCER TIM_CCER(TIM10) |
Definition at line 229 of file timer_common_all.h.
#define TIM10_CCMR1 TIM_CCMR1(TIM10) |
Definition at line 202 of file timer_common_all.h.
#define TIM10_CCR1 TIM_CCR1(TIM10) |
Definition at line 315 of file timer_common_all.h.
#define TIM10_CNT TIM_CNT(TIM10) |
Definition at line 249 of file timer_common_all.h.
#define TIM10_CR1 TIM_CR1(TIM10) |
Definition at line 98 of file timer_common_all.h.
#define TIM10_DIER TIM_DIER(TIM10) |
Definition at line 144 of file timer_common_all.h.
#define TIM10_EGR TIM_EGR(TIM10) |
Definition at line 184 of file timer_common_all.h.
#define TIM10_PSC TIM_PSC(TIM10) |
Definition at line 269 of file timer_common_all.h.
#define TIM10_SR TIM_SR(TIM10) |
Definition at line 164 of file timer_common_all.h.
#define TIM11_ARR TIM_ARR(TIM11) |
Definition at line 290 of file timer_common_all.h.
#define TIM11_CCER TIM_CCER(TIM11) |
Definition at line 230 of file timer_common_all.h.
#define TIM11_CCMR1 TIM_CCMR1(TIM11) |
Definition at line 203 of file timer_common_all.h.
#define TIM11_CCR1 TIM_CCR1(TIM11) |
Definition at line 316 of file timer_common_all.h.
#define TIM11_CNT TIM_CNT(TIM11) |
Definition at line 250 of file timer_common_all.h.
#define TIM11_CR1 TIM_CR1(TIM11) |
Definition at line 99 of file timer_common_all.h.
#define TIM11_DIER TIM_DIER(TIM11) |
Definition at line 145 of file timer_common_all.h.
#define TIM11_EGR TIM_EGR(TIM11) |
Definition at line 185 of file timer_common_all.h.
#define TIM11_PSC TIM_PSC(TIM11) |
Definition at line 270 of file timer_common_all.h.
#define TIM11_SR TIM_SR(TIM11) |
Definition at line 165 of file timer_common_all.h.
#define TIM12_ARR TIM_ARR(TIM12) |
Definition at line 291 of file timer_common_all.h.
#define TIM12_CCER TIM_CCER(TIM12) |
Definition at line 231 of file timer_common_all.h.
#define TIM12_CCMR1 TIM_CCMR1(TIM12) |
Definition at line 204 of file timer_common_all.h.
#define TIM12_CCR1 TIM_CCR1(TIM12) |
Definition at line 317 of file timer_common_all.h.
#define TIM12_CCR2 TIM_CCR2(TIM12) |
Definition at line 333 of file timer_common_all.h.
#define TIM12_CNT TIM_CNT(TIM12) |
Definition at line 251 of file timer_common_all.h.
#define TIM12_CR1 TIM_CR1(TIM12) |
Definition at line 100 of file timer_common_all.h.
#define TIM12_DIER TIM_DIER(TIM12) |
Definition at line 146 of file timer_common_all.h.
#define TIM12_EGR TIM_EGR(TIM12) |
Definition at line 186 of file timer_common_all.h.
#define TIM12_PSC TIM_PSC(TIM12) |
Definition at line 271 of file timer_common_all.h.
#define TIM12_SMCR TIM_SMCR(TIM12) |
Definition at line 130 of file timer_common_all.h.
#define TIM12_SR TIM_SR(TIM12) |
Definition at line 166 of file timer_common_all.h.
#define TIM13_ARR TIM_ARR(TIM13) |
Definition at line 292 of file timer_common_all.h.
#define TIM13_CCER TIM_CCER(TIM13) |
Definition at line 232 of file timer_common_all.h.
#define TIM13_CCMR1 TIM_CCMR1(TIM13) |
Definition at line 205 of file timer_common_all.h.
#define TIM13_CCR1 TIM_CCR1(TIM13) |
Definition at line 318 of file timer_common_all.h.
#define TIM13_CNT TIM_CNT(TIM13) |
Definition at line 252 of file timer_common_all.h.
#define TIM13_CR1 TIM_CR1(TIM13) |
Definition at line 101 of file timer_common_all.h.
#define TIM13_DIER TIM_DIER(TIM13) |
Definition at line 147 of file timer_common_all.h.
#define TIM13_EGR TIM_EGR(TIM13) |
Definition at line 187 of file timer_common_all.h.
#define TIM13_PSC TIM_PSC(TIM13) |
Definition at line 272 of file timer_common_all.h.
#define TIM13_SR TIM_SR(TIM13) |
Definition at line 167 of file timer_common_all.h.
#define TIM14_ARR TIM_ARR(TIM14) |
Definition at line 293 of file timer_common_all.h.
#define TIM14_CCER TIM_CCER(TIM14) |
Definition at line 233 of file timer_common_all.h.
#define TIM14_CCMR1 TIM_CCMR1(TIM14) |
Definition at line 206 of file timer_common_all.h.
#define TIM14_CCR1 TIM_CCR1(TIM14) |
Definition at line 319 of file timer_common_all.h.
#define TIM14_CNT TIM_CNT(TIM14) |
Definition at line 253 of file timer_common_all.h.
#define TIM14_CR1 TIM_CR1(TIM14) |
Definition at line 102 of file timer_common_all.h.
#define TIM14_DIER TIM_DIER(TIM14) |
Definition at line 148 of file timer_common_all.h.
#define TIM14_EGR TIM_EGR(TIM14) |
Definition at line 188 of file timer_common_all.h.
#define TIM14_PSC TIM_PSC(TIM14) |
Definition at line 273 of file timer_common_all.h.
#define TIM14_SR TIM_SR(TIM14) |
Definition at line 168 of file timer_common_all.h.
#define TIM15_ARR TIM_ARR(TIM15) |
Definition at line 294 of file timer_common_all.h.
#define TIM15_BDTR TIM_BDTR(TIM15) |
Definition at line 358 of file timer_common_all.h.
#define TIM15_CCER TIM_CCER(TIM15) |
Definition at line 234 of file timer_common_all.h.
#define TIM15_CCMR1 TIM_CCMR1(TIM15) |
Definition at line 207 of file timer_common_all.h.
#define TIM15_CCR1 TIM_CCR1(TIM15) |
Definition at line 320 of file timer_common_all.h.
#define TIM15_CCR2 TIM_CCR2(TIM15) |
Definition at line 334 of file timer_common_all.h.
#define TIM15_CNT TIM_CNT(TIM15) |
Definition at line 254 of file timer_common_all.h.
#define TIM15_CR1 TIM_CR1(TIM15) |
Definition at line 103 of file timer_common_all.h.
#define TIM15_CR2 TIM_CR2(TIM15) |
Definition at line 117 of file timer_common_all.h.
#define TIM15_DCR TIM_DCR(TIM15) |
Definition at line 370 of file timer_common_all.h.
#define TIM15_DIER TIM_DIER(TIM15) |
Definition at line 149 of file timer_common_all.h.
#define TIM15_DMAR TIM_DMAR(TIM15) |
Definition at line 382 of file timer_common_all.h.
#define TIM15_EGR TIM_EGR(TIM15) |
Definition at line 189 of file timer_common_all.h.
#define TIM15_PSC TIM_PSC(TIM15) |
Definition at line 274 of file timer_common_all.h.
#define TIM15_RCR TIM_RCR(TIM15) |
Definition at line 302 of file timer_common_all.h.
#define TIM15_SMCR TIM_SMCR(TIM15) |
Definition at line 131 of file timer_common_all.h.
#define TIM15_SR TIM_SR(TIM15) |
Definition at line 169 of file timer_common_all.h.
#define TIM16_ARR TIM_ARR(TIM16) |
Definition at line 295 of file timer_common_all.h.
#define TIM16_BDTR TIM_BDTR(TIM16) |
Definition at line 359 of file timer_common_all.h.
#define TIM16_CCER TIM_CCER(TIM16) |
Definition at line 235 of file timer_common_all.h.
#define TIM16_CCMR1 TIM_CCMR1(TIM16) |
Definition at line 208 of file timer_common_all.h.
#define TIM16_CCR1 TIM_CCR1(TIM16) |
Definition at line 321 of file timer_common_all.h.
#define TIM16_CNT TIM_CNT(TIM16) |
Definition at line 255 of file timer_common_all.h.
#define TIM16_CR1 TIM_CR1(TIM16) |
Definition at line 104 of file timer_common_all.h.
#define TIM16_CR2 TIM_CR2(TIM16) |
Definition at line 118 of file timer_common_all.h.
#define TIM16_DCR TIM_DCR(TIM16) |
Definition at line 371 of file timer_common_all.h.
#define TIM16_DIER TIM_DIER(TIM16) |
Definition at line 150 of file timer_common_all.h.
#define TIM16_DMAR TIM_DMAR(TIM16) |
Definition at line 383 of file timer_common_all.h.
#define TIM16_EGR TIM_EGR(TIM16) |
Definition at line 190 of file timer_common_all.h.
#define TIM16_PSC TIM_PSC(TIM16) |
Definition at line 275 of file timer_common_all.h.
#define TIM16_RCR TIM_RCR(TIM16) |
Definition at line 303 of file timer_common_all.h.
#define TIM16_SR TIM_SR(TIM16) |
Definition at line 170 of file timer_common_all.h.
#define TIM17_ARR TIM_ARR(TIM17) |
Definition at line 296 of file timer_common_all.h.
#define TIM17_BDTR TIM_BDTR(TIM17) |
Definition at line 360 of file timer_common_all.h.
#define TIM17_CCER TIM_CCER(TIM17) |
Definition at line 236 of file timer_common_all.h.
#define TIM17_CCMR1 TIM_CCMR1(TIM17) |
Definition at line 209 of file timer_common_all.h.
#define TIM17_CCR1 TIM_CCR1(TIM17) |
Definition at line 322 of file timer_common_all.h.
#define TIM17_CNT TIM_CNT(TIM17) |
Definition at line 256 of file timer_common_all.h.
#define TIM17_CR1 TIM_CR1(TIM17) |
Definition at line 105 of file timer_common_all.h.
#define TIM17_CR2 TIM_CR2(TIM17) |
Definition at line 119 of file timer_common_all.h.
#define TIM17_DCR TIM_DCR(TIM17) |
Definition at line 372 of file timer_common_all.h.
#define TIM17_DIER TIM_DIER(TIM17) |
Definition at line 151 of file timer_common_all.h.
#define TIM17_DMAR TIM_DMAR(TIM17) |
Definition at line 384 of file timer_common_all.h.
#define TIM17_EGR TIM_EGR(TIM17) |
Definition at line 191 of file timer_common_all.h.
#define TIM17_PSC TIM_PSC(TIM17) |
Definition at line 276 of file timer_common_all.h.
#define TIM17_RCR TIM_RCR(TIM17) |
Definition at line 304 of file timer_common_all.h.
#define TIM17_SR TIM_SR(TIM17) |
Definition at line 171 of file timer_common_all.h.
Definition at line 280 of file timer_common_all.h.
Definition at line 356 of file timer_common_all.h.
Definition at line 222 of file timer_common_all.h.
Definition at line 195 of file timer_common_all.h.
Definition at line 213 of file timer_common_all.h.
Definition at line 308 of file timer_common_all.h.
Definition at line 326 of file timer_common_all.h.
Definition at line 338 of file timer_common_all.h.
Definition at line 347 of file timer_common_all.h.
Definition at line 240 of file timer_common_all.h.
Definition at line 89 of file timer_common_all.h.
Definition at line 109 of file timer_common_all.h.
Definition at line 364 of file timer_common_all.h.
Definition at line 135 of file timer_common_all.h.
Definition at line 376 of file timer_common_all.h.
Definition at line 175 of file timer_common_all.h.
Definition at line 260 of file timer_common_all.h.
Definition at line 300 of file timer_common_all.h.
Definition at line 123 of file timer_common_all.h.
Definition at line 155 of file timer_common_all.h.
Definition at line 281 of file timer_common_all.h.
Definition at line 223 of file timer_common_all.h.
Definition at line 196 of file timer_common_all.h.
Definition at line 214 of file timer_common_all.h.
Definition at line 309 of file timer_common_all.h.
Definition at line 327 of file timer_common_all.h.
Definition at line 339 of file timer_common_all.h.
Definition at line 348 of file timer_common_all.h.
Definition at line 241 of file timer_common_all.h.
Definition at line 90 of file timer_common_all.h.
Definition at line 110 of file timer_common_all.h.
Definition at line 365 of file timer_common_all.h.
Definition at line 136 of file timer_common_all.h.
Definition at line 377 of file timer_common_all.h.
Definition at line 176 of file timer_common_all.h.
Definition at line 261 of file timer_common_all.h.
Definition at line 124 of file timer_common_all.h.
Definition at line 156 of file timer_common_all.h.
Definition at line 282 of file timer_common_all.h.
Definition at line 224 of file timer_common_all.h.
Definition at line 197 of file timer_common_all.h.
Definition at line 215 of file timer_common_all.h.
Definition at line 310 of file timer_common_all.h.
Definition at line 328 of file timer_common_all.h.
Definition at line 340 of file timer_common_all.h.
Definition at line 349 of file timer_common_all.h.
Definition at line 242 of file timer_common_all.h.
Definition at line 91 of file timer_common_all.h.
Definition at line 111 of file timer_common_all.h.
Definition at line 366 of file timer_common_all.h.
Definition at line 137 of file timer_common_all.h.
Definition at line 378 of file timer_common_all.h.
Definition at line 177 of file timer_common_all.h.
Definition at line 262 of file timer_common_all.h.
Definition at line 125 of file timer_common_all.h.
Definition at line 157 of file timer_common_all.h.
#define TIM4_ARR TIM_ARR(TIM4) |
Definition at line 283 of file timer_common_all.h.
#define TIM4_CCER TIM_CCER(TIM4) |
Definition at line 225 of file timer_common_all.h.
#define TIM4_CCMR1 TIM_CCMR1(TIM4) |
Definition at line 198 of file timer_common_all.h.
#define TIM4_CCMR2 TIM_CCMR2(TIM4) |
Definition at line 216 of file timer_common_all.h.
#define TIM4_CCR1 TIM_CCR1(TIM4) |
Definition at line 311 of file timer_common_all.h.
#define TIM4_CCR2 TIM_CCR2(TIM4) |
Definition at line 329 of file timer_common_all.h.
#define TIM4_CCR3 TIM_CCR3(TIM4) |
Definition at line 341 of file timer_common_all.h.
#define TIM4_CCR4 TIM_CCR4(TIM4) |
Definition at line 350 of file timer_common_all.h.
#define TIM4_CNT TIM_CNT(TIM4) |
Definition at line 243 of file timer_common_all.h.
#define TIM4_CR1 TIM_CR1(TIM4) |
Definition at line 92 of file timer_common_all.h.
#define TIM4_CR2 TIM_CR2(TIM4) |
Definition at line 112 of file timer_common_all.h.
#define TIM4_DCR TIM_DCR(TIM4) |
Definition at line 367 of file timer_common_all.h.
#define TIM4_DIER TIM_DIER(TIM4) |
Definition at line 138 of file timer_common_all.h.
#define TIM4_DMAR TIM_DMAR(TIM4) |
Definition at line 379 of file timer_common_all.h.
#define TIM4_EGR TIM_EGR(TIM4) |
Definition at line 178 of file timer_common_all.h.
#define TIM4_PSC TIM_PSC(TIM4) |
Definition at line 263 of file timer_common_all.h.
#define TIM4_SMCR TIM_SMCR(TIM4) |
Definition at line 126 of file timer_common_all.h.
#define TIM4_SR TIM_SR(TIM4) |
Definition at line 158 of file timer_common_all.h.
Definition at line 284 of file timer_common_all.h.
Definition at line 226 of file timer_common_all.h.
Definition at line 199 of file timer_common_all.h.
Definition at line 217 of file timer_common_all.h.
Definition at line 312 of file timer_common_all.h.
Definition at line 330 of file timer_common_all.h.
Definition at line 342 of file timer_common_all.h.
Definition at line 351 of file timer_common_all.h.
Definition at line 244 of file timer_common_all.h.
Definition at line 93 of file timer_common_all.h.
Definition at line 113 of file timer_common_all.h.
Definition at line 368 of file timer_common_all.h.
Definition at line 139 of file timer_common_all.h.
Definition at line 380 of file timer_common_all.h.
Definition at line 179 of file timer_common_all.h.
Definition at line 264 of file timer_common_all.h.
Definition at line 127 of file timer_common_all.h.
Definition at line 159 of file timer_common_all.h.
Definition at line 285 of file timer_common_all.h.
Definition at line 245 of file timer_common_all.h.
Definition at line 94 of file timer_common_all.h.
Definition at line 114 of file timer_common_all.h.
Definition at line 140 of file timer_common_all.h.
Definition at line 180 of file timer_common_all.h.
Definition at line 265 of file timer_common_all.h.
Definition at line 160 of file timer_common_all.h.
Definition at line 286 of file timer_common_all.h.
Definition at line 246 of file timer_common_all.h.
Definition at line 95 of file timer_common_all.h.
Definition at line 115 of file timer_common_all.h.
Definition at line 141 of file timer_common_all.h.
Definition at line 181 of file timer_common_all.h.
Definition at line 266 of file timer_common_all.h.
Definition at line 161 of file timer_common_all.h.
#define TIM8_ARR TIM_ARR(TIM8) |
Definition at line 287 of file timer_common_all.h.
#define TIM8_BDTR TIM_BDTR(TIM8) |
Definition at line 357 of file timer_common_all.h.
#define TIM8_CCER TIM_CCER(TIM8) |
Definition at line 227 of file timer_common_all.h.
#define TIM8_CCMR1 TIM_CCMR1(TIM8) |
Definition at line 200 of file timer_common_all.h.
#define TIM8_CCMR2 TIM_CCMR2(TIM8) |
Definition at line 218 of file timer_common_all.h.
#define TIM8_CCR1 TIM_CCR1(TIM8) |
Definition at line 313 of file timer_common_all.h.
#define TIM8_CCR2 TIM_CCR2(TIM8) |
Definition at line 331 of file timer_common_all.h.
#define TIM8_CCR3 TIM_CCR3(TIM8) |
Definition at line 343 of file timer_common_all.h.
#define TIM8_CCR4 TIM_CCR4(TIM8) |
Definition at line 352 of file timer_common_all.h.
#define TIM8_CNT TIM_CNT(TIM8) |
Definition at line 247 of file timer_common_all.h.
#define TIM8_CR1 TIM_CR1(TIM8) |
Definition at line 96 of file timer_common_all.h.
#define TIM8_CR2 TIM_CR2(TIM8) |
Definition at line 116 of file timer_common_all.h.
#define TIM8_DCR TIM_DCR(TIM8) |
Definition at line 369 of file timer_common_all.h.
#define TIM8_DIER TIM_DIER(TIM8) |
Definition at line 142 of file timer_common_all.h.
#define TIM8_DMAR TIM_DMAR(TIM8) |
Definition at line 381 of file timer_common_all.h.
#define TIM8_EGR TIM_EGR(TIM8) |
Definition at line 182 of file timer_common_all.h.
#define TIM8_PSC TIM_PSC(TIM8) |
Definition at line 267 of file timer_common_all.h.
#define TIM8_RCR TIM_RCR(TIM8) |
Definition at line 301 of file timer_common_all.h.
#define TIM8_SMCR TIM_SMCR(TIM8) |
Definition at line 128 of file timer_common_all.h.
#define TIM8_SR TIM_SR(TIM8) |
Definition at line 162 of file timer_common_all.h.
#define TIM9_ARR TIM_ARR(TIM9) |
Definition at line 288 of file timer_common_all.h.
#define TIM9_CCER TIM_CCER(TIM9) |
Definition at line 228 of file timer_common_all.h.
#define TIM9_CCMR1 TIM_CCMR1(TIM9) |
Definition at line 201 of file timer_common_all.h.
#define TIM9_CCR1 TIM_CCR1(TIM9) |
Definition at line 314 of file timer_common_all.h.
#define TIM9_CCR2 TIM_CCR2(TIM9) |
Definition at line 332 of file timer_common_all.h.
#define TIM9_CNT TIM_CNT(TIM9) |
Definition at line 248 of file timer_common_all.h.
#define TIM9_CR1 TIM_CR1(TIM9) |
Definition at line 97 of file timer_common_all.h.
#define TIM9_DIER TIM_DIER(TIM9) |
Definition at line 143 of file timer_common_all.h.
#define TIM9_EGR TIM_EGR(TIM9) |
Definition at line 183 of file timer_common_all.h.
#define TIM9_PSC TIM_PSC(TIM9) |
Definition at line 268 of file timer_common_all.h.
#define TIM9_SMCR TIM_SMCR(TIM9) |
Definition at line 129 of file timer_common_all.h.
#define TIM9_SR TIM_SR(TIM9) |
Definition at line 163 of file timer_common_all.h.
#define TIM_ARR | ( | tim_base | ) | MMIO32((tim_base) + 0x2C) |
Definition at line 279 of file timer_common_all.h.
#define TIM_BDTR | ( | tim_base | ) | MMIO32((tim_base) + 0x44) |
Definition at line 355 of file timer_common_all.h.
#define TIM_BDTR_AOE (1 << 14) |
Definition at line 1018 of file timer_common_all.h.
#define TIM_BDTR_BKE (1 << 12) |
Definition at line 1024 of file timer_common_all.h.
#define TIM_BDTR_BKP (1 << 13) |
Definition at line 1021 of file timer_common_all.h.
#define TIM_BDTR_DBA_MASK (0x1F << 0) |
Definition at line 1052 of file timer_common_all.h.
#define TIM_BDTR_DBL_MASK (0x1F << 8) |
Definition at line 1049 of file timer_common_all.h.
#define TIM_BDTR_DTG_MASK 0x00FF |
Definition at line 1044 of file timer_common_all.h.
#define TIM_BDTR_MOE (1 << 15) |
Definition at line 1015 of file timer_common_all.h.
#define TIM_BDTR_OSSI (1 << 10) |
Definition at line 1030 of file timer_common_all.h.
#define TIM_BDTR_OSSR (1 << 11) |
Definition at line 1027 of file timer_common_all.h.
#define TIM_CCER | ( | tim_base | ) | MMIO32((tim_base) + 0x20) |
Definition at line 221 of file timer_common_all.h.
#define TIM_CCER_CC1E (1 << 0) |
Definition at line 978 of file timer_common_all.h.
#define TIM_CCER_CC1NE (1 << 2) |
Definition at line 972 of file timer_common_all.h.
#define TIM_CCER_CC1NP (1 << 3) |
Definition at line 969 of file timer_common_all.h.
#define TIM_CCER_CC1P (1 << 1) |
Definition at line 975 of file timer_common_all.h.
#define TIM_CCER_CC2E (1 << 4) |
Definition at line 966 of file timer_common_all.h.
#define TIM_CCER_CC2NE (1 << 6) |
Definition at line 960 of file timer_common_all.h.
#define TIM_CCER_CC2NP (1 << 7) |
Definition at line 957 of file timer_common_all.h.
#define TIM_CCER_CC2P (1 << 5) |
Definition at line 963 of file timer_common_all.h.
#define TIM_CCER_CC3E (1 << 8) |
Definition at line 954 of file timer_common_all.h.
#define TIM_CCER_CC3NE (1 << 10) |
Definition at line 948 of file timer_common_all.h.
#define TIM_CCER_CC3NP (1 << 11) |
Definition at line 945 of file timer_common_all.h.
#define TIM_CCER_CC3P (1 << 9) |
Definition at line 951 of file timer_common_all.h.
#define TIM_CCER_CC4E (1 << 12) |
Definition at line 942 of file timer_common_all.h.
#define TIM_CCER_CC4NP (1 << 15) |
Definition at line 936 of file timer_common_all.h.
#define TIM_CCER_CC4P (1 << 13) |
Definition at line 939 of file timer_common_all.h.
#define TIM_CCMR1 | ( | tim_base | ) | MMIO32((tim_base) + 0x18) |
Definition at line 194 of file timer_common_all.h.
#define TIM_CCMR1_CC1S_IN_TI1 (0x1 << 0) |
Definition at line 759 of file timer_common_all.h.
#define TIM_CCMR1_CC1S_IN_TI2 (0x2 << 0) |
Definition at line 758 of file timer_common_all.h.
#define TIM_CCMR1_CC1S_IN_TRC (0x3 << 0) |
Definition at line 760 of file timer_common_all.h.
#define TIM_CCMR1_CC1S_MASK (0x3 << 0) |
Definition at line 761 of file timer_common_all.h.
#define TIM_CCMR1_CC1S_OUT (0x0 << 0) |
Definition at line 757 of file timer_common_all.h.
#define TIM_CCMR1_CC2S_IN_TI1 (0x2 << 8) |
Definition at line 730 of file timer_common_all.h.
#define TIM_CCMR1_CC2S_IN_TI2 (0x1 << 8) |
Definition at line 729 of file timer_common_all.h.
#define TIM_CCMR1_CC2S_IN_TRC (0x3 << 8) |
Definition at line 731 of file timer_common_all.h.
#define TIM_CCMR1_CC2S_MASK (0x3 << 8) |
Definition at line 732 of file timer_common_all.h.
#define TIM_CCMR1_CC2S_OUT (0x0 << 8) |
Definition at line 728 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_CK_INT_N_2 (0x1 << 4) |
Definition at line 793 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_CK_INT_N_4 (0x2 << 4) |
Definition at line 794 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_CK_INT_N_8 (0x3 << 4) |
Definition at line 795 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_16_N_5 (0xA << 4) |
Definition at line 802 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_16_N_6 (0xB << 4) |
Definition at line 803 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_16_N_8 (0xC << 4) |
Definition at line 804 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_2_N_6 (0x4 << 4) |
Definition at line 796 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_2_N_8 (0x5 << 4) |
Definition at line 797 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_32_N_5 (0xD << 4) |
Definition at line 805 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_32_N_6 (0xE << 4) |
Definition at line 806 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_32_N_8 (0xF << 4) |
Definition at line 807 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_4_N_6 (0x6 << 4) |
Definition at line 798 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_4_N_8 (0x7 << 4) |
Definition at line 799 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_8_N_6 (0x8 << 4) |
Definition at line 800 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_DTF_DIV_8_N_8 (0x9 << 4) |
Definition at line 801 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_MASK (0xF << 4) |
Definition at line 808 of file timer_common_all.h.
#define TIM_CCMR1_IC1F_OFF (0x0 << 4) |
Definition at line 792 of file timer_common_all.h.
#define TIM_CCMR1_IC1PSC_2 (0x1 << 2) |
Definition at line 812 of file timer_common_all.h.
#define TIM_CCMR1_IC1PSC_4 (0x2 << 2) |
Definition at line 813 of file timer_common_all.h.
#define TIM_CCMR1_IC1PSC_8 (0x3 << 2) |
Definition at line 814 of file timer_common_all.h.
#define TIM_CCMR1_IC1PSC_MASK (0x3 << 2) |
Definition at line 815 of file timer_common_all.h.
#define TIM_CCMR1_IC1PSC_OFF (0x0 << 2) |
Definition at line 811 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_CK_INT_N_2 (0x1 << 12) |
Definition at line 767 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_CK_INT_N_4 (0x2 << 12) |
Definition at line 768 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_CK_INT_N_8 (0x3 << 12) |
Definition at line 769 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_16_N_5 (0xA << 12) |
Definition at line 776 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_16_N_6 (0xB << 12) |
Definition at line 777 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_16_N_8 (0xC << 12) |
Definition at line 778 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_2_N_6 (0x4 << 12) |
Definition at line 770 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_2_N_8 (0x5 << 12) |
Definition at line 771 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_32_N_5 (0xD << 12) |
Definition at line 779 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_32_N_6 (0xE << 12) |
Definition at line 780 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_32_N_8 (0xF << 12) |
Definition at line 781 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_4_N_6 (0x6 << 12) |
Definition at line 772 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_4_N_8 (0x7 << 12) |
Definition at line 773 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_8_N_6 (0x8 << 12) |
Definition at line 774 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_DTF_DIV_8_N_8 (0x9 << 12) |
Definition at line 775 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_MASK (0xF << 12) |
Definition at line 782 of file timer_common_all.h.
#define TIM_CCMR1_IC2F_OFF (0x0 << 12) |
Definition at line 766 of file timer_common_all.h.
#define TIM_CCMR1_IC2PSC_2 (0x1 << 10) |
Definition at line 786 of file timer_common_all.h.
#define TIM_CCMR1_IC2PSC_4 (0x2 << 10) |
Definition at line 787 of file timer_common_all.h.
#define TIM_CCMR1_IC2PSC_8 (0x3 << 10) |
Definition at line 788 of file timer_common_all.h.
#define TIM_CCMR1_IC2PSC_MASK (0x3 << 10) |
Definition at line 789 of file timer_common_all.h.
#define TIM_CCMR1_IC2PSC_OFF (0x0 << 10) |
Definition at line 785 of file timer_common_all.h.
#define TIM_CCMR1_OC1CE (1 << 7) |
Definition at line 735 of file timer_common_all.h.
#define TIM_CCMR1_OC1FE (1 << 2) |
Definition at line 752 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_ACTIVE (0x1 << 4) |
Definition at line 739 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_FORCE_HIGH (0x5 << 4) |
Definition at line 743 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_FORCE_LOW (0x4 << 4) |
Definition at line 742 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_FROZEN (0x0 << 4) |
Definition at line 738 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_INACTIVE (0x2 << 4) |
Definition at line 740 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_MASK (0x7 << 4) |
Definition at line 746 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_PWM1 (0x6 << 4) |
Definition at line 744 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_PWM2 (0x7 << 4) |
Definition at line 745 of file timer_common_all.h.
#define TIM_CCMR1_OC1M_TOGGLE (0x3 << 4) |
Definition at line 741 of file timer_common_all.h.
#define TIM_CCMR1_OC1PE (1 << 3) |
Definition at line 749 of file timer_common_all.h.
#define TIM_CCMR1_OC2CE (1 << 15) |
Definition at line 706 of file timer_common_all.h.
#define TIM_CCMR1_OC2FE (1 << 10) |
Definition at line 723 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_ACTIVE (0x1 << 12) |
Definition at line 710 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_FORCE_HIGH (0x5 << 12) |
Definition at line 714 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_FORCE_LOW (0x4 << 12) |
Definition at line 713 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_FROZEN (0x0 << 12) |
Definition at line 709 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_INACTIVE (0x2 << 12) |
Definition at line 711 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_MASK (0x7 << 12) |
Definition at line 717 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_PWM1 (0x6 << 12) |
Definition at line 715 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_PWM2 (0x7 << 12) |
Definition at line 716 of file timer_common_all.h.
#define TIM_CCMR1_OC2M_TOGGLE (0x3 << 12) |
Definition at line 712 of file timer_common_all.h.
#define TIM_CCMR1_OC2PE (1 << 11) |
Definition at line 720 of file timer_common_all.h.
#define TIM_CCMR2 | ( | tim_base | ) | MMIO32((tim_base) + 0x1C) |
Definition at line 212 of file timer_common_all.h.
#define TIM_CCMR2_CC3S_IN_TI3 (0x1 << 0) |
Definition at line 874 of file timer_common_all.h.
#define TIM_CCMR2_CC3S_IN_TI4 (0x2 << 0) |
Definition at line 875 of file timer_common_all.h.
#define TIM_CCMR2_CC3S_IN_TRC (0x3 << 0) |
Definition at line 876 of file timer_common_all.h.
#define TIM_CCMR2_CC3S_MASK (0x3 << 0) |
Definition at line 877 of file timer_common_all.h.
#define TIM_CCMR2_CC3S_OUT (0x0 << 0) |
Definition at line 873 of file timer_common_all.h.
#define TIM_CCMR2_CC4S_IN_TI3 (0x2 << 8) |
Definition at line 846 of file timer_common_all.h.
#define TIM_CCMR2_CC4S_IN_TI4 (0x1 << 8) |
Definition at line 845 of file timer_common_all.h.
#define TIM_CCMR2_CC4S_IN_TRC (0x3 << 8) |
Definition at line 847 of file timer_common_all.h.
#define TIM_CCMR2_CC4S_MASK (0x3 << 8) |
Definition at line 848 of file timer_common_all.h.
#define TIM_CCMR2_CC4S_OUT (0x0 << 8) |
Definition at line 844 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_CK_INT_N_2 (0x1 << 4) |
Definition at line 909 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_CK_INT_N_4 (0x2 << 4) |
Definition at line 910 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_CK_INT_N_8 (0x3 << 4) |
Definition at line 911 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_16_N_5 (0xA << 4) |
Definition at line 918 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_16_N_6 (0xB << 4) |
Definition at line 919 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_16_N_8 (0xC << 4) |
Definition at line 920 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_2_N_6 (0x4 << 4) |
Definition at line 912 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_2_N_8 (0x5 << 4) |
Definition at line 913 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_32_N_5 (0xD << 4) |
Definition at line 921 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_32_N_6 (0xE << 4) |
Definition at line 922 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_32_N_8 (0xF << 4) |
Definition at line 923 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_4_N_6 (0x6 << 4) |
Definition at line 914 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_4_N_8 (0x7 << 4) |
Definition at line 915 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_8_N_6 (0x8 << 4) |
Definition at line 916 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_DTF_DIV_8_N_8 (0x9 << 4) |
Definition at line 917 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_MASK (0xF << 4) |
Definition at line 924 of file timer_common_all.h.
#define TIM_CCMR2_IC3F_OFF (0x0 << 4) |
Definition at line 908 of file timer_common_all.h.
#define TIM_CCMR2_IC3PSC_2 (0x1 << 2) |
Definition at line 928 of file timer_common_all.h.
#define TIM_CCMR2_IC3PSC_4 (0x2 << 2) |
Definition at line 929 of file timer_common_all.h.
#define TIM_CCMR2_IC3PSC_8 (0x3 << 2) |
Definition at line 930 of file timer_common_all.h.
#define TIM_CCMR2_IC3PSC_MASK (0x3 << 2) |
Definition at line 931 of file timer_common_all.h.
#define TIM_CCMR2_IC3PSC_OFF (0x0 << 2) |
Definition at line 927 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_CK_INT_N_2 (0x1 << 12) |
Definition at line 883 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_CK_INT_N_4 (0x2 << 12) |
Definition at line 884 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_CK_INT_N_8 (0x3 << 12) |
Definition at line 885 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_16_N_5 (0xA << 12) |
Definition at line 892 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_16_N_6 (0xB << 12) |
Definition at line 893 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_16_N_8 (0xC << 12) |
Definition at line 894 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_2_N_6 (0x4 << 12) |
Definition at line 886 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_2_N_8 (0x5 << 12) |
Definition at line 887 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_32_N_5 (0xD << 12) |
Definition at line 895 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_32_N_6 (0xE << 12) |
Definition at line 896 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_32_N_8 (0xF << 12) |
Definition at line 897 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_4_N_6 (0x6 << 12) |
Definition at line 888 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_4_N_8 (0x7 << 12) |
Definition at line 889 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_8_N_6 (0x8 << 12) |
Definition at line 890 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_DTF_DIV_8_N_8 (0x9 << 12) |
Definition at line 891 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_MASK (0xF << 12) |
Definition at line 898 of file timer_common_all.h.
#define TIM_CCMR2_IC4F_OFF (0x0 << 12) |
Definition at line 882 of file timer_common_all.h.
#define TIM_CCMR2_IC4PSC_2 (0x1 << 10) |
Definition at line 902 of file timer_common_all.h.
#define TIM_CCMR2_IC4PSC_4 (0x2 << 10) |
Definition at line 903 of file timer_common_all.h.
#define TIM_CCMR2_IC4PSC_8 (0x3 << 10) |
Definition at line 904 of file timer_common_all.h.
#define TIM_CCMR2_IC4PSC_MASK (0x3 << 10) |
Definition at line 905 of file timer_common_all.h.
#define TIM_CCMR2_IC4PSC_OFF (0x0 << 10) |
Definition at line 901 of file timer_common_all.h.
#define TIM_CCMR2_OC3CE (1 << 7) |
Definition at line 851 of file timer_common_all.h.
#define TIM_CCMR2_OC3FE (1 << 2) |
Definition at line 868 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_ACTIVE (0x1 << 4) |
Definition at line 855 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_FORCE_HIGH (0x5 << 4) |
Definition at line 859 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_FORCE_LOW (0x4 << 4) |
Definition at line 858 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_FROZEN (0x0 << 4) |
Definition at line 854 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_INACTIVE (0x2 << 4) |
Definition at line 856 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_MASK (0x7 << 4) |
Definition at line 862 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_PWM1 (0x6 << 4) |
Definition at line 860 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_PWM2 (0x7 << 4) |
Definition at line 861 of file timer_common_all.h.
#define TIM_CCMR2_OC3M_TOGGLE (0x3 << 4) |
Definition at line 857 of file timer_common_all.h.
#define TIM_CCMR2_OC3PE (1 << 3) |
Definition at line 865 of file timer_common_all.h.
#define TIM_CCMR2_OC4CE (1 << 15) |
Definition at line 822 of file timer_common_all.h.
#define TIM_CCMR2_OC4FE (1 << 10) |
Definition at line 839 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_ACTIVE (0x1 << 12) |
Definition at line 826 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_FORCE_HIGH (0x5 << 12) |
Definition at line 830 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_FORCE_LOW (0x4 << 12) |
Definition at line 829 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_FROZEN (0x0 << 12) |
Definition at line 825 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_INACTIVE (0x2 << 12) |
Definition at line 827 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_MASK (0x7 << 12) |
Definition at line 833 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_PWM1 (0x6 << 12) |
Definition at line 831 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_PWM2 (0x7 << 12) |
Definition at line 832 of file timer_common_all.h.
#define TIM_CCMR2_OC4M_TOGGLE (0x3 << 12) |
Definition at line 828 of file timer_common_all.h.
#define TIM_CCMR2_OC4PE (1 << 11) |
Definition at line 836 of file timer_common_all.h.
#define TIM_CCR1 | ( | tim_base | ) | MMIO32((tim_base) + 0x34) |
Definition at line 307 of file timer_common_all.h.
#define TIM_CCR2 | ( | tim_base | ) | MMIO32((tim_base) + 0x38) |
Definition at line 325 of file timer_common_all.h.
#define TIM_CCR3 | ( | tim_base | ) | MMIO32((tim_base) + 0x3C) |
Definition at line 337 of file timer_common_all.h.
#define TIM_CCR4 | ( | tim_base | ) | MMIO32((tim_base) + 0x40) |
Definition at line 346 of file timer_common_all.h.
#define TIM_CNT | ( | tim_base | ) | MMIO32((tim_base) + 0x24) |
Definition at line 239 of file timer_common_all.h.
#define TIM_CR1 | ( | tim_base | ) | MMIO32((tim_base) + 0x00) |
Definition at line 88 of file timer_common_all.h.
#define TIM_CR1_ARPE (1 << 7) |
Definition at line 399 of file timer_common_all.h.
#define TIM_CR1_CEN (1 << 0) |
Definition at line 430 of file timer_common_all.h.
#define TIM_CR1_OPM (1 << 3) |
Definition at line 421 of file timer_common_all.h.
#define TIM_CR1_UDIS (1 << 1) |
Definition at line 427 of file timer_common_all.h.
#define TIM_CR1_URS (1 << 2) |
Definition at line 424 of file timer_common_all.h.
#define TIM_CR2 | ( | tim_base | ) | MMIO32((tim_base) + 0x04) |
Definition at line 108 of file timer_common_all.h.
#define TIM_CR2_CCDS (1 << 3) |
Definition at line 479 of file timer_common_all.h.
#define TIM_CR2_CCPC (1 << 0) |
Definition at line 485 of file timer_common_all.h.
#define TIM_CR2_CCUS (1 << 2) |
Definition at line 482 of file timer_common_all.h.
#define TIM_CR2_TI1S (1 << 7) |
Definition at line 461 of file timer_common_all.h.
#define TIM_DCR | ( | tim_base | ) | MMIO32((tim_base) + 0x48) |
Definition at line 363 of file timer_common_all.h.
#define TIM_DIER | ( | tim_base | ) | MMIO32((tim_base) + 0x0C) |
Definition at line 134 of file timer_common_all.h.
#define TIM_DMAR | ( | tim_base | ) | MMIO32((tim_base) + 0x4C) |
Definition at line 375 of file timer_common_all.h.
#define TIM_EGR | ( | tim_base | ) | MMIO32((tim_base) + 0x14) |
Definition at line 174 of file timer_common_all.h.
#define TIM_PSC | ( | tim_base | ) | MMIO32((tim_base) + 0x28) |
Definition at line 259 of file timer_common_all.h.
#define TIM_RCR | ( | tim_base | ) | MMIO32((tim_base) + 0x30) |
Definition at line 299 of file timer_common_all.h.
#define TIM_SMCR | ( | tim_base | ) | MMIO32((tim_base) + 0x08) |
Definition at line 122 of file timer_common_all.h.
#define TIM_SMCR_ECE (1 << 14) |
Definition at line 493 of file timer_common_all.h.
#define TIM_SMCR_ETF_CK_INT_N_2 (0x1 << 8) |
Definition at line 504 of file timer_common_all.h.
#define TIM_SMCR_ETF_CK_INT_N_4 (0x2 << 8) |
Definition at line 505 of file timer_common_all.h.
#define TIM_SMCR_ETF_CK_INT_N_8 (0x3 << 8) |
Definition at line 506 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_16_N_5 (0xA << 8) |
Definition at line 513 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_16_N_6 (0xB << 8) |
Definition at line 514 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_16_N_8 (0xC << 8) |
Definition at line 515 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_2_N_6 (0x4 << 8) |
Definition at line 507 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_2_N_8 (0x5 << 8) |
Definition at line 508 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_32_N_5 (0xD << 8) |
Definition at line 516 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_32_N_6 (0xE << 8) |
Definition at line 517 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_32_N_8 (0xF << 8) |
Definition at line 518 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_4_N_6 (0x6 << 8) |
Definition at line 509 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_4_N_8 (0x7 << 8) |
Definition at line 510 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_8_N_6 (0x8 << 8) |
Definition at line 511 of file timer_common_all.h.
#define TIM_SMCR_ETF_DTS_DIV_8_N_8 (0x9 << 8) |
Definition at line 512 of file timer_common_all.h.
#define TIM_SMCR_ETF_MASK (0xF << 8) |
Definition at line 519 of file timer_common_all.h.
#define TIM_SMCR_ETF_OFF (0x0 << 8) |
Definition at line 503 of file timer_common_all.h.
#define TIM_SMCR_ETP (1 << 15) |
Definition at line 490 of file timer_common_all.h.
#define TIM_SMCR_ETPS_ETRP_DIV_2 (0x1 << 12) |
Definition at line 497 of file timer_common_all.h.
#define TIM_SMCR_ETPS_ETRP_DIV_4 (0x2 << 12) |
Definition at line 498 of file timer_common_all.h.
#define TIM_SMCR_ETPS_ETRP_DIV_8 (0x3 << 12) |
Definition at line 499 of file timer_common_all.h.
#define TIM_SMCR_ETPS_MASK (0X3 << 12) |
Definition at line 500 of file timer_common_all.h.
#define TIM_SMCR_ETPS_OFF (0x0 << 12) |
Definition at line 496 of file timer_common_all.h.
#define TIM_SMCR_MSM (1 << 7) |
Definition at line 522 of file timer_common_all.h.
#define TIM_SR | ( | tim_base | ) | MMIO32((tim_base) + 0x10) |
Definition at line 154 of file timer_common_all.h.
enum tim_ecm2_state |
External clock mode 2.
Enumerator | |
---|---|
TIM_ECM2_DISABLED | |
TIM_ECM2_ENABLED |
Definition at line 1147 of file timer_common_all.h.
enum tim_et_pol |
Slave external trigger polarity.
Enumerator | |
---|---|
TIM_ET_RISING | |
TIM_ET_FALLING |
Definition at line 1141 of file timer_common_all.h.
enum tim_ic_filter |
Input Capture input filter.
The frequency used to sample the input and the number of events needed to validate an output transition.
TIM_IC_CK_INT_N_x No division from the Deadtime and Sampling Clock frequency (DTF), filter length x TIM_IC_DTF_DIV_y_N_x Division by y from the DTF, filter length x
Definition at line 1098 of file timer_common_all.h.
enum tim_ic_id |
Input Capture channel designators.
Enumerator | |
---|---|
TIM_IC1 | |
TIM_IC2 | |
TIM_IC3 | |
TIM_IC4 |
Definition at line 1084 of file timer_common_all.h.
enum tim_ic_input |
Input Capture input source.
The direction of the channel (input/output) as well as the input used.
Enumerator | |
---|---|
TIM_IC_OUT | |
TIM_IC_IN_TI1 | |
TIM_IC_IN_TI2 | |
TIM_IC_IN_TRC | |
TIM_IC_IN_TI3 | |
TIM_IC_IN_TI4 |
Definition at line 1131 of file timer_common_all.h.
enum tim_ic_psc |
Input Capture input prescaler.
TIM_IC_PSC_x Input capture is done every x events
Enumerator | |
---|---|
TIM_IC_PSC_OFF | |
TIM_IC_PSC_2 | |
TIM_IC_PSC_4 | |
TIM_IC_PSC_8 |
Definition at line 1120 of file timer_common_all.h.
enum tim_oc_id |
Output Compare channel designators.
Enumerator | |
---|---|
TIM_OC1 | |
TIM_OC1N | |
TIM_OC2 | |
TIM_OC2N | |
TIM_OC3 | |
TIM_OC3N | |
TIM_OC4 |
Definition at line 1061 of file timer_common_all.h.
enum tim_oc_mode |
Output Compare mode designators.
Enumerator | |
---|---|
TIM_OCM_FROZEN | |
TIM_OCM_ACTIVE | |
TIM_OCM_INACTIVE | |
TIM_OCM_TOGGLE | |
TIM_OCM_FORCE_LOW | |
TIM_OCM_FORCE_HIGH | |
TIM_OCM_PWM1 | |
TIM_OCM_PWM2 |
Definition at line 1072 of file timer_common_all.h.
void timer_clear_flag | ( | uint32_t | timer_peripheral, |
uint32_t | flag | ||
) |
Clear a Status Flag.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | flag | Unsigned int32. TIMx_SR Timer Status Register Flags. Status register flag. |
Definition at line 203 of file timer_common_all.c.
References TIM_SR.
void timer_continuous_mode | ( | uint32_t | timer_peripheral | ) |
Enable the Timer to Run Continuously.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 365 of file timer_common_all.c.
References TIM_CR1.
void timer_direction_down | ( | uint32_t | timer_peripheral | ) |
Set the Timer to Count Down.
This has no effect if the timer is set to center aligned.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 341 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_DIR_DOWN.
void timer_direction_up | ( | uint32_t | timer_peripheral | ) |
Set the Timer to Count Up.
This has no effect if the timer is set to center aligned.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 327 of file timer_common_all.c.
References TIM_CR1.
void timer_disable_break | ( | uint32_t | timer_peripheral | ) |
Disable Break.
Disables the break function of an advanced timer.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1476 of file timer_common_all.c.
References TIM_BDTR.
void timer_disable_break_automatic_output | ( | uint32_t | timer_peripheral | ) |
Disable Automatic Output in Break.
Disables the automatic output feature of the Break function of an advanced timer so that the output is re-enabled at the next update event following a break event.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1412 of file timer_common_all.c.
References TIM_BDTR.
void timer_disable_break_main_output | ( | uint32_t | timer_peripheral | ) |
Disable Output in Break.
Disables the output in the Break feature of an advanced timer. This clears the Master Output Enable in the Break and Deadtime Register.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1376 of file timer_common_all.c.
References TIM_BDTR.
void timer_disable_compare_control_update_on_trigger | ( | uint32_t | timer_peripheral | ) |
Disable Timer Capture/Compare Control Update with Trigger.
If the capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded, they are updated by software generating the COMG event (timer_generate_event).
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 600 of file timer_common_all.c.
References TIM_CR2.
void timer_disable_counter | ( | uint32_t | timer_peripheral | ) |
Stop the timer from counting.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 447 of file timer_common_all.c.
References TIM_CR1.
void timer_disable_irq | ( | uint32_t | timer_peripheral, |
uint32_t | irq | ||
) |
Disable Interrupts for a Timer.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | irq | Unsigned int32. TIMx_DIER Timer DMA and Interrupt Enable Values. Logical OR of all interrupt enable bits to be cleared |
Definition at line 145 of file timer_common_all.c.
References TIM_DIER.
void timer_disable_oc_clear | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Disable the Output Compare Clear Function.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
Definition at line 736 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_disable_oc_output | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Disable the Output Compare.
The channel output compare functionality is disabled.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1193 of file timer_common_all.c.
References TIM_CCER, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_disable_oc_preload | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Disable the Output Compare Preload Register.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action) |
Definition at line 1041 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_disable_preload | ( | uint32_t | timer_peripheral | ) |
Disable Auto-Reload Buffering.
This causes the counter to be loaded immediately with a new count value when the auto-reload register is written, so that the new value becomes effective for the current count cycle rather than for the cycle following an update event.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 296 of file timer_common_all.c.
References TIM_CR1.
void timer_disable_preload_complementry_enable_bits | ( | uint32_t | timer_peripheral | ) |
Disable Timer Capture/Compare Control Preload.
The capture/compare control bits CCxE, CCxNE and OCxM preload is disabled.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 635 of file timer_common_all.c.
References TIM_CR2.
void timer_disable_update_event | ( | uint32_t | timer_peripheral | ) |
Disable Timer Update Events.
Update events are not generated and the shadow registers keep their values.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 421 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_UDIS.
void timer_enable_break | ( | uint32_t | timer_peripheral | ) |
Enable Break.
Enables the break function of an advanced timer.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1460 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_BKE.
void timer_enable_break_automatic_output | ( | uint32_t | timer_peripheral | ) |
Enable Automatic Output in Break.
Enables the automatic output feature of the Break function of an advanced timer so that the output is re-enabled at the next update event following a break event.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1394 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_AOE.
void timer_enable_break_main_output | ( | uint32_t | timer_peripheral | ) |
Enable Output in Break.
Enables the output in the Break feature of an advanced timer. This does not enable the break functionality itself but only sets the Master Output Enable in the Break and Deadtime Register.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1359 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_MOE.
void timer_enable_compare_control_update_on_trigger | ( | uint32_t | timer_peripheral | ) |
Enable Timer Capture/Compare Control Update with Trigger.
If the capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded, they are updated by software generating the COMG event (timer_generate_event) or when a rising edge occurs on the trigger input TRGI.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 581 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_CCUS.
void timer_enable_counter | ( | uint32_t | timer_peripheral | ) |
Enable the timer to start counting.
This should be called after the timer initial configuration has been completed.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 435 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_CEN.
void timer_enable_irq | ( | uint32_t | timer_peripheral, |
uint32_t | irq | ||
) |
Enable Interrupts for a Timer.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | irq | Unsigned int32. TIMx_DIER Timer DMA and Interrupt Enable Values. Logical OR of all interrupt enable bits to be set |
Definition at line 131 of file timer_common_all.c.
References TIM_DIER.
void timer_enable_oc_clear | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Enable the Output Compare Clear Function.
When this is enabled, the output compare signal is cleared when a high is detected on the external trigger input. This works in the output compare and PWM modes only (not forced mode). The output compare signal remains off until the next update event.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
Definition at line 702 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR1_OC1CE, TIM_CCMR1_OC2CE, TIM_CCMR2, TIM_CCMR2_OC3CE, TIM_CCMR2_OC4CE, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_enable_oc_output | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Enable the Output Compare.
The channel output compare functionality is enabled.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1154 of file timer_common_all.c.
References TIM_CCER, TIM_CCER_CC1E, TIM_CCER_CC1NE, TIM_CCER_CC2E, TIM_CCER_CC2NE, TIM_CCER_CC3E, TIM_CCER_CC3NE, TIM_CCER_CC4E, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_enable_oc_preload | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Enable the Output Compare Preload Register.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
Definition at line 1009 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR1_OC1PE, TIM_CCMR1_OC2PE, TIM_CCMR2, TIM_CCMR2_OC3PE, TIM_CCMR2_OC4PE, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_enable_preload | ( | uint32_t | timer_peripheral | ) |
Enable Auto-Reload Buffering.
During counter operation this causes the counter to be loaded from its auto-reload register only at the next update event.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 280 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_ARPE.
void timer_enable_preload_complementry_enable_bits | ( | uint32_t | timer_peripheral | ) |
Enable Timer Capture/Compare Control Preload.
The capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded when a COM event occurs.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 618 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_CCPC.
void timer_enable_update_event | ( | uint32_t | timer_peripheral | ) |
Enable Timer Update Events.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 407 of file timer_common_all.c.
References TIM_CR1.
void timer_generate_event | ( | uint32_t | timer_peripheral, |
uint32_t | event | ||
) |
Force generate a timer event.
The event specification consists of 8 possible events that can be forced on the timer. The forced events are automatically cleared by hardware. The UG event is useful to cause shadow registers to be preloaded before the timer is started to avoid uncertainties in the first cycle in case an update event may never be generated.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | event | Unsigned int32. Event specification TIMx_EGR Timer Event Generator Values |
Definition at line 1612 of file timer_common_all.c.
References TIM_EGR.
uint32_t timer_get_counter | ( | uint32_t | timer_peripheral | ) |
Read Counter.
Read back the value of a timer's counter register contents
[in] | timer_peripheral | Unsigned int32. Timer register address base |
Definition at line 1626 of file timer_common_all.c.
References TIM_CNT.
bool timer_get_flag | ( | uint32_t | timer_peripheral, |
uint32_t | flag | ||
) |
Read a Status Flag.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | flag | Unsigned int32. Status register flag TIMx_SR Timer Status Register Flags. |
Definition at line 186 of file timer_common_all.c.
References TIM_SR.
void timer_ic_disable | ( | uint32_t | timer_peripheral, |
enum tim_ic_id | ic | ||
) |
Disable Timer Input Capture.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | ic | tim_ic_id. Input Capture channel designator. |
Definition at line 1786 of file timer_common_all.c.
References TIM_CCER.
void timer_ic_enable | ( | uint32_t | timer_peripheral, |
enum tim_ic_id | ic | ||
) |
Enable Timer Input Capture.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | ic | tim_ic_id. Input Capture channel designator. |
Definition at line 1774 of file timer_common_all.c.
References TIM_CCER.
void timer_ic_set_filter | ( | uint32_t | timer_peripheral, |
enum tim_ic_id | ic, | ||
enum tim_ic_filter | flt | ||
) |
Set Input Capture Filter Parameters.
Set the input filter parameters for an input channel, specifying:
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | ic | tim_ic_id. Input Capture channel designator. |
[in] | flt | tim_ic_filter. Input Capture Filter identifier. |
Definition at line 1659 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_IC1, TIM_IC2, TIM_IC3, and TIM_IC4.
void timer_ic_set_input | ( | uint32_t | timer_peripheral, |
enum tim_ic_id | ic, | ||
enum tim_ic_input | in | ||
) |
Set Capture/Compare Channel Direction/Input.
The Capture/Compare channel is defined as output (compare) or input with the input mapping specified:
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | ic | tim_ic_id. Input Capture channel designator. |
[in] | in | tim_ic_input. Input Capture channel direction and source input. |
Definition at line 1736 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_IC1, TIM_IC2, TIM_IC3, TIM_IC4, TIM_IC_IN_TI1, and TIM_IC_IN_TI2.
void timer_ic_set_prescaler | ( | uint32_t | timer_peripheral, |
enum tim_ic_id | ic, | ||
enum tim_ic_psc | psc | ||
) |
Set Input Capture Prescaler.
Set the number of events between each capture.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | ic | tim_ic_id. Input Capture channel designator. |
[in] | psc | tim_ic_psc. Input Capture sample clock prescaler. |
Definition at line 1692 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_IC1, TIM_IC2, TIM_IC3, and TIM_IC4.
bool timer_interrupt_source | ( | uint32_t | timer_peripheral, |
uint32_t | flag | ||
) |
Return Interrupt Source.
Returns true if the specified interrupt flag (UIF, TIF or CCxIF, with BIF or COMIF for advanced timers) was set and the interrupt was enabled. If the specified flag is not an interrupt flag, the function returns false.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | flag | Unsigned int32. Status register flag TIMx_SR Timer Status Register Flags. |
Definition at line 166 of file timer_common_all.c.
References TIM_DIER, TIM_SR, and TIM_SR_BIF.
void timer_one_shot_mode | ( | uint32_t | timer_peripheral | ) |
Enable the Timer for One Cycle and Stop.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 353 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_OPM.
void timer_reset_output_idle_state | ( | uint32_t | timer_peripheral, |
uint32_t | outputs | ||
) |
Set Timer Output Idle States Low.
This determines the value of the timer output compare when it enters idle state.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | outputs | Unsigned int32. Timer Output Idle State Controls TIMx_CR2_OIS: Force Output Idle State Control Values |
Definition at line 488 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_OIS_MASK.
void timer_set_alignment | ( | uint32_t | timer_peripheral, |
uint32_t | alignment | ||
) |
Specify the counter alignment mode.
The mode can be edge aligned or centered.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | alignment | Unsigned int32. Alignment bits in 5,6: TIMx_CR1 CMS[1:0]: Center-aligned Mode Selection |
Definition at line 311 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_CMS_MASK.
void timer_set_break_lock | ( | uint32_t | timer_peripheral, |
uint32_t | lock | ||
) |
Set Lock Bits.
Set the lock bits for an advanced timer. Three levels of lock providing protection against software errors. Once written they cannot be changed until a timer reset has occurred.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
[in] | lock | Unsigned int32. Lock specification TIM_BDTR_LOCK Timer Lock Values |
Definition at line 1569 of file timer_common_all.c.
References TIM_BDTR.
void timer_set_break_polarity_high | ( | uint32_t | timer_peripheral | ) |
Activate Break when Input High.
Sets the break function to activate when the break input becomes high.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1428 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_BKP.
void timer_set_break_polarity_low | ( | uint32_t | timer_peripheral | ) |
Activate Break when Input Low.
Sets the break function to activate when the break input becomes low.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1444 of file timer_common_all.c.
References TIM_BDTR.
void timer_set_clock_division | ( | uint32_t | timer_peripheral, |
uint32_t | clock_div | ||
) |
Set Input Filter and Dead-time Clock Divider Ratio.
This forms the sampling clock for the input filters and the dead-time clock in the advanced timers 1 and 8, by division from the timer clock.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | clock_div | Unsigned int32. Clock Divider Ratio in bits 8,9: TIMx_CR1 CKD[1:0] Clock Division Ratio |
Definition at line 263 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_CKD_CK_INT_MASK.
void timer_set_counter | ( | uint32_t | timer_peripheral, |
uint32_t | count | ||
) |
Set Counter.
Set the value of a timer's counter register contents.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | count | Unsigned int32. Counter value. |
Definition at line 1640 of file timer_common_all.c.
References TIM_CNT.
void timer_set_deadtime | ( | uint32_t | timer_peripheral, |
uint32_t | deadtime | ||
) |
Set Deadtime.
The deadtime and sampling clock (DTSC) is set in the clock division ratio part of the timer mode settings. The deadtime count is an 8 bit value defined in terms of the number of DTSC cycles:
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
[in] | deadtime | Unsigned int32. Deadtime count specification as defined above. |
Definition at line 1594 of file timer_common_all.c.
References TIM_BDTR.
void timer_set_disabled_off_state_in_idle_mode | ( | uint32_t | timer_peripheral | ) |
Disable Off-State in Idle Mode.
Disables the off-state in idle mode for the break function of an advanced timer. When the master output is disabled the output is also disabled.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1550 of file timer_common_all.c.
References TIM_BDTR.
void timer_set_disabled_off_state_in_run_mode | ( | uint32_t | timer_peripheral | ) |
Disable Off-State in Run Mode.
Disables the off-state in run mode for the break function of an advanced timer in which the complementary outputs have been configured. It has no effect if no complementary output is present. When the capture-compare output is disabled, the output is also disabled.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1515 of file timer_common_all.c.
References TIM_BDTR.
void timer_set_dma_on_compare_event | ( | uint32_t | timer_peripheral | ) |
Set Timer DMA Requests on Capture/Compare Events.
Capture/compare events will cause DMA requests to be generated.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 548 of file timer_common_all.c.
References TIM_CR2.
void timer_set_dma_on_update_event | ( | uint32_t | timer_peripheral | ) |
Set Timer DMA Requests on Update Events.
Update events will cause DMA requests to be generated.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 562 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_CCDS.
void timer_set_enabled_off_state_in_idle_mode | ( | uint32_t | timer_peripheral | ) |
Enable Off-State in Idle Mode.
Enables the off-state in idle mode for the break function of an advanced timer. When the master output is disabled the output is set to its inactive level as defined by the output polarity.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1533 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_OSSI.
void timer_set_enabled_off_state_in_run_mode | ( | uint32_t | timer_peripheral | ) |
Enable Off-State in Run Mode.
Enables the off-state in run mode for the break function of an advanced timer in which the complementary outputs have been configured. It has no effect if no complementary output is present. When the capture-compare output is disabled while the complementary output is enabled, the output is set to its inactive level as defined by the output polarity.
[in] | timer_peripheral | Unsigned int32. Timer register address base TIM1 or TIM8 |
Definition at line 1496 of file timer_common_all.c.
References TIM_BDTR, and TIM_BDTR_OSSR.
void timer_set_master_mode | ( | uint32_t | timer_peripheral, |
uint32_t | mode | ||
) |
Set the Master Mode.
This sets the Trigger Output TRGO for synchronizing with slave timers or passing as an internal trigger to the ADC or DAC.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | mode | Unsigned int32. Master Mode TIMx_CR2 MMS[6:4]: Master Mode Selection |
Definition at line 533 of file timer_common_all.c.
References TIM_CR2.
void timer_set_mode | ( | uint32_t | timer_peripheral, |
uint32_t | clock_div, | ||
uint32_t | alignment, | ||
uint32_t | direction | ||
) |
Set the Timer Mode.
The modes are:
The alignment and count direction are effective only for timers 1 to 5 and 8 while the clock divider ratio is effective for all timers except 6,7 The remaining timers are limited hardware timers which do not support these mode settings.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses (TIM1, TIM2 ... TIM5, TIM8) |
[in] | clock_div | Unsigned int32. Clock Divider Ratio in bits 8,9: TIMx_CR1 CKD[1:0] Clock Division Ratio |
[in] | alignment | Unsigned int32. Alignment bits in 5,6: TIMx_CR1 CMS[1:0]: Center-aligned Mode Selection |
[in] | direction | Unsigned int32. Count direction in bit 4,: TIMx_CR1 DIR: Direction |
Definition at line 237 of file timer_common_all.c.
References TIM_CR1, TIM_CR1_CKD_CK_INT_MASK, TIM_CR1_CMS_MASK, and TIM_CR1_DIR_DOWN.
void timer_set_oc_fast_mode | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Enable the Output Compare Fast Mode.
When this is enabled, the output compare signal is forced to the compare state by a trigger input, independently of the compare match. This speeds up the setting of the output compare to 3 clock cycles as opposed to at least 5 in the slow mode. This works in the PWM1 and PWM2 modes only.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
Definition at line 775 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR1_OC1FE, TIM_CCMR1_OC2FE, TIM_CCMR2, TIM_CCMR2_OC3FE, TIM_CCMR2_OC4FE, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_idle_state_set | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer set Output Compare Idle State High.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1235 of file timer_common_all.c.
References TIM_CR2, TIM_CR2_OIS1, TIM_CR2_OIS1N, TIM_CR2_OIS2, TIM_CR2_OIS2N, TIM_CR2_OIS3, TIM_CR2_OIS3N, TIM_CR2_OIS4, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_idle_state_unset | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Set Output Compare Idle State Low.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1278 of file timer_common_all.c.
References TIM_CR2, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_mode | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id, | ||
enum tim_oc_mode | oc_mode | ||
) |
Timer Set Output Compare Mode.
Specifies how the comparator output will respond to a compare match. The mode can be:
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
[in] | oc_mode | enum tim_oc_mode. OC mode designators. TIM_OCM_FROZEN, TIM_OCM_ACTIVE, TIM_OCM_INACTIVE, TIM_OCM_TOGGLE, TIM_OCM_FORCE_LOW, TIM_OCM_FORCE_HIGH, TIM_OCM_PWM1, TIM_OCM_PWM2 |
Definition at line 860 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR1_CC1S_OUT, TIM_CCMR1_CC2S_OUT, TIM_CCMR1_OC1M_ACTIVE, TIM_CCMR1_OC1M_FORCE_HIGH, TIM_CCMR1_OC1M_FORCE_LOW, TIM_CCMR1_OC1M_FROZEN, TIM_CCMR1_OC1M_INACTIVE, TIM_CCMR1_OC1M_PWM1, TIM_CCMR1_OC1M_PWM2, TIM_CCMR1_OC1M_TOGGLE, TIM_CCMR1_OC2M_ACTIVE, TIM_CCMR1_OC2M_FORCE_HIGH, TIM_CCMR1_OC2M_FORCE_LOW, TIM_CCMR1_OC2M_FROZEN, TIM_CCMR1_OC2M_INACTIVE, TIM_CCMR1_OC2M_PWM1, TIM_CCMR1_OC2M_PWM2, TIM_CCMR1_OC2M_TOGGLE, TIM_CCMR2, TIM_CCMR2_CC3S_OUT, TIM_CCMR2_CC4S_OUT, TIM_CCMR2_OC3M_ACTIVE, TIM_CCMR2_OC3M_FORCE_HIGH, TIM_CCMR2_OC3M_FORCE_LOW, TIM_CCMR2_OC3M_FROZEN, TIM_CCMR2_OC3M_INACTIVE, TIM_CCMR2_OC3M_PWM1, TIM_CCMR2_OC3M_PWM2, TIM_CCMR2_OC3M_TOGGLE, TIM_CCMR2_OC4M_ACTIVE, TIM_CCMR2_OC4M_FORCE_HIGH, TIM_CCMR2_OC4M_FORCE_LOW, TIM_CCMR2_OC4M_FROZEN, TIM_CCMR2_OC4M_INACTIVE, TIM_CCMR2_OC4M_PWM1, TIM_CCMR2_OC4M_PWM2, TIM_CCMR2_OC4M_TOGGLE, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, TIM_OC4, TIM_OCM_ACTIVE, TIM_OCM_FORCE_HIGH, TIM_OCM_FORCE_LOW, TIM_OCM_FROZEN, TIM_OCM_INACTIVE, TIM_OCM_PWM1, TIM_OCM_PWM2, and TIM_OCM_TOGGLE.
void timer_set_oc_polarity_high | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Set the Output Polarity High.
The polarity of the channel output is set active high.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1076 of file timer_common_all.c.
References TIM_CCER, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_polarity_low | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Set the Output Polarity Low.
The polarity of the channel output is set active low.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) |
Definition at line 1115 of file timer_common_all.c.
References TIM_CCER, TIM_CCER_CC1NP, TIM_CCER_CC1P, TIM_CCER_CC2NP, TIM_CCER_CC2P, TIM_CCER_CC3NP, TIM_CCER_CC3P, TIM_CCER_CC4P, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_slow_mode | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Timer Enable the Output Compare Slow Mode.
This disables the fast compare mode and the output compare depends on the counter and compare register values.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
Definition at line 810 of file timer_common_all.c.
References TIM_CCMR1, TIM_CCMR2, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_oc_value | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id, | ||
uint32_t | value | ||
) |
Timer Set Output Compare Value.
This is a convenience function to set the OC preload register value for loading to the compare register.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses (TIM9 .. TIM14 not yet supported here). |
[in] | oc_id | enum tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) |
[in] | value | Unsigned int32. Compare value. |
Definition at line 1319 of file timer_common_all.c.
References TIM_CCR1, TIM_CCR2, TIM_CCR3, TIM_CCR4, TIM_OC1, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, and TIM_OC4.
void timer_set_output_idle_state | ( | uint32_t | timer_peripheral, |
uint32_t | outputs | ||
) |
Set Timer Output Idle States High.
This determines the value of the timer output compare when it enters idle state.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | outputs | Unsigned int32. Timer Output Idle State Controls TIMx_CR2_OIS: Force Output Idle State Control Values. If several settings are to be made, use the logical OR of the output control values. |
Definition at line 468 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_OIS_MASK.
void timer_set_period | ( | uint32_t | timer_peripheral, |
uint32_t | period | ||
) |
Timer Set Period.
Specify the timer period in the auto-reload register.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | period | Unsigned int32. Period in counter clock ticks. |
Definition at line 683 of file timer_common_all.c.
References TIM_ARR.
void timer_set_prescaler | ( | uint32_t | timer_peripheral, |
uint32_t | value | ||
) |
Set the Value for the Timer Prescaler.
The timer clock is prescaled by the 16 bit scale value plus 1.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | value | Unsigned int32. Prescaler values 0...0xFFFF. |
Definition at line 650 of file timer_common_all.c.
References TIM_PSC.
void timer_set_repetition_counter | ( | uint32_t | timer_peripheral, |
uint32_t | value | ||
) |
Set the Value for the Timer Repetition Counter.
A timer update event is generated only after the specified number of repeat count cycles have been completed.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
[in] | value | Unsigned int32. Repetition values 0...0xFF. |
Definition at line 668 of file timer_common_all.c.
References TIM_RCR.
void timer_set_ti1_ch1 | ( | uint32_t | timer_peripheral | ) |
Set Timer 1 Input to Channel 1.
The first timer capture input is taken from the timer input channel 1 only.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 517 of file timer_common_all.c.
References TIM_CR2.
void timer_set_ti1_ch123_xor | ( | uint32_t | timer_peripheral | ) |
Set Timer 1 Input to XOR of Three Channels.
The first timer capture input is formed from the XOR of the first three timer input channels 1, 2, 3.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 503 of file timer_common_all.c.
References TIM_CR2, and TIM_CR2_TI1S.
void timer_slave_set_extclockmode2 | ( | uint32_t | timer_peripheral, |
enum tim_ecm2_state | state | ||
) |
Set External Clock Mode 2.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | state | tim_ecm2_state. External Clock Mode 2 state |
Definition at line 1874 of file timer_common_all.c.
References TIM_SMCR, and TIM_SMCR_ECE.
void timer_slave_set_filter | ( | uint32_t | timer_peripheral, |
enum tim_ic_filter | flt | ||
) |
Set External Trigger Filter Parameters for Slave.
Set the input filter parameters for the external trigger, specifying:
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | flt | tim_ic_filter. Input Capture Filter identifier. |
Definition at line 1804 of file timer_common_all.c.
References TIM_SMCR.
void timer_slave_set_mode | ( | uint32_t | timer_peripheral, |
uint8_t | mode | ||
) |
Set Slave Mode.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | mode | Unsigned int8. Slave mode TIMx_SMCR SMS Slave mode selection |
Definition at line 1848 of file timer_common_all.c.
References TIM_SMCR.
void timer_slave_set_polarity | ( | uint32_t | timer_peripheral, |
enum tim_et_pol | pol | ||
) |
Set External Trigger Polarity for Slave.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | pol | tim_et_pol. Slave External Trigger polarity. |
Definition at line 1832 of file timer_common_all.c.
References TIM_SMCR, and TIM_SMCR_ETP.
void timer_slave_set_prescaler | ( | uint32_t | timer_peripheral, |
enum tim_ic_psc | psc | ||
) |
Set External Trigger Prescaler for Slave.
Set the external trigger frequency division ratio.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | psc | tim_ic_psc. Input Capture sample clock prescaler. |
Definition at line 1819 of file timer_common_all.c.
References TIM_SMCR.
void timer_slave_set_trigger | ( | uint32_t | timer_peripheral, |
uint8_t | trigger | ||
) |
Set Slave Trigger Source.
[in] | timer_peripheral | Unsigned int32. Timer register address base |
[in] | trigger | Unsigned int8. Slave trigger source TIMx_SMCR TS Trigger selection |
Definition at line 1861 of file timer_common_all.c.
References TIM_SMCR.
void timer_update_on_any | ( | uint32_t | timer_peripheral | ) |
Set the Timer to Generate Update IRQ or DMA on any Event.
The events which will generate an interrupt or DMA request can be
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 382 of file timer_common_all.c.
References TIM_CR1.
void timer_update_on_overflow | ( | uint32_t | timer_peripheral | ) |
Set the Timer to Generate Update IRQ or DMA only from Under/Overflow Events.
[in] | timer_peripheral | Unsigned int32. Timer register address base Timer register base addresses |
Definition at line 395 of file timer_common_all.c.
References TIM_CR1, and TIM_CR1_URS.