| Electronic Components Datasheet Search |
|
STM32W108HB Datasheet(PDF) 173 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM32W108HB Datasheet(HTML) 173 Page - STMicroelectronics |
|
173 / 278 page ![]() STM32W108HB STM32W108CC STM32W108CB STM32W108CZ General-purpose timers Doc ID 16252 Rev 14 173/278 To control the output waveform, software can update the TIMx_CCRy register at any time, provided that the buffer register is not enabled (OCyPE = 0). Otherwise TIMx_CCRy shadow register is updated only at the next update event. An example is given in Figure 35. Figure 35. Output compare mode, toggle on OC1 10.1.9 PWM mode Pulse width modulation mode allows you to generate a signal with a frequency determined by the value of the TIMx_ARR register, and a duty cycle determined by the value of the TIMx_CCRy register. PWM mode can be selected independently on each channel (one PWM per OCy output) by writing 110 (PWM mode 1) or 111 (PWM mode 2) in the OCyM bits in the TIMx_CCMR1 register. The corresponding buffer register must be enabled by setting the OCyPE bit in the TIMx_CCMR1 register. Finally, in up-counting or center-aligned mode the auto-reload buffer register must be enabled by setting the ARPE bit in the TIMx_CR1 register. Because the buffer registers are only transferred to the shadow registers when an update event occurs, before starting the counter initialize all the registers by setting the UG bit in the TIMx_EGR register. OCy polarity is software programmable using the CCyP bit in the TIMx_CCER register. It can be programmed as active high or active low. OCy output is enabled by the CCyE bit in the TIMx_CCER register. Refer to the TIMx_CCER register description in the Registers section for more details. In PWM mode (1 or 2), TIMx_CNT and TIMx_CCRy are always compared to determine whether TIMx_CCRy ≤TIMx_CNT or TIMx_CNT ≤TIMx_CCRy,depending on the direction of the counter. The OCyREF signal is asserted only: ● When the result of the comparison changes, or ● When the output compare mode (OCyM bits in the TIMx_CCMR1 register) switches from the "frozen" configuration (no comparison, OCyM = 000) to one of the PWM modes (OCyM = 110 or 111). OC1REF=OC1 TIMx_CNT B200 B201 0039 TIMx_CCR1 003A Write B201h in the TIMx_CCR1 register Match detected on TIMx_CCR1 Interrupt generated if enabled 003B B201 003A |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |