| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
RM0312 Datasheet(PDF) 132 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
RM0312 Datasheet(HTML) 132 Page - STMicroelectronics |
|
132 / 275 page ![]() 16-bit general purpose timer (TIM2/TIM3) RM0312 132/275 DocID022352 Rev 3 For example, you can measure the period (in the TIMx_CCR1 register) and the duty cycle (in the TIMx_CCR2 register) of the PWM applied on TI1 using the following procedure (depending on fMASTER frequency and prescaler value): 1. Select the active input capture or trigger input for TIMx_CCR1: write the CC1S bits to 0b01 in the TIMx_CCMR1 register (TI1FP1 selected). 2. Select the active polarity for TI1FP1 (used both for capture in TIMx_CCR1 and counter clear): write the CC1P bit to ‘0’ (active on rising edge). 3. Select the active input for TIMx_CCR2: write the CC2S bits to 0b10 in the TIMx_CCMR2 register (TI1FP2 selected). 4. Select the active polarity for TI1FP2 (used for capture in TIMx_CCR2): write the CC2P bit to ‘1’ (active on falling edge). 5. Select the valid trigger input: write the TS bits to 0b101 in the TIMx_SMCR register (TI1FP1 selected). 6. Configure the clock/trigger controller in reset mode: write the SMS bits to ‘100’ in the TIMx_SMCR register. 7. Enable the captures: write the CC1E and CC2E bits to ‘1’ in the TIMx_CCER1 register. Figure 53. PWM input signal measurement example 17.5.4 Output stage The output stage generates an intermediate waveform called OCiREF (active high) which is then used for reference. Break functions and polarity act at the end of the chain. Figure 54. Channel output stage block diagram TI1 TIMx_CNT 0000 0001 0002 0003 0004 0000 0004 TIMx_CCR1 TIMx_CCR2 0004 0002 IC1 Capture period measurement reset counter IC2 Capture pulse width measurement OC1REF OC2REF output control output control TIMx_CH1 OC1 from capture/compare channels TIMx_CH2 OC2 |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |