| 数据搜索系统,热门电子元器件搜索 |
|
ST52F510 数据表(PDF) 72 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST52F510 数据表(HTML) 72 Page - STMicroelectronics |
|
72 / 106 page ![]() ST52F510/F513/F514 72/106 Figure 12.2 Timer 0 External Start/Stop Mode TxSTRT signal starts/stops the Timer from counting only if the peripherals are configured in Timer mode. The Timers are started by writing 1 in the TXSTRT bit of the PWMx_CR1 and are stopped by writing 0. This signal can be generated internally and/or externally by forcing the TSTRT pin (only TIMER0). TIMER 0 START/STOP can be given externally on the TSTRT pin. In this case, the T0STRT signal allows the user to work in two different configurable modes (see Figure 12.2): s LEVEL (Time Counter): If the T0STRT signal is high, the Timer starts counting. When the T0STRT is low the timer stops counting and the 16-bit current value is stored in the PWM0_COUNT_IN_x Input Registers couple. s EDGE (Period Counter): After reset, on the first T0STRT rising edge, TIMER 0 starts counting and at the next rising edge it stops. In this manner the period of an external signal may be measured. The same above mentioned modes, can be used to reset the Timer0 by using the TRES pin signal. The polarity of the T0SRTR Start/Stop signal can be changed by setting the STRPOL and RESPOL bits in the INT_POL Configuration Register (01h bit 3 and 4). When these bits are set, the PWM/Timer 0 is Started/Set on the low level or in the falling edge of the signal applied in the pins. The Timer output signal, TxOUT, is a signal with a frequency equal to the one of the 16 bit-Prescaler output signal, PRESCOUTx, divided by a 16-bit counter set by writing the Output Register couple PWMx_COUNT_OUT_x. Note: the contents of these registers upgrades the Timer counter after it stops counting. Since the register couple is written in two steps this can cause side effects. In order to avoid this, the user should write the MSB before writing the LSB: actually, the 16-bit value is latched in parallel when the LSB is written. By writing only the LSB (and MSB equal to 0), the PWM/Timer is used as with an 8 bit counter. Warning: in Timer Mode the Reload Register couple PWMx_RELOAD_x (see PWM mode) must be set to the higher value FFFFh (65535) otherwise it can affect the count duration. There can be two types of TxOUT waveforms: s type 1: TxOUT waveform equal to a square wave with a 50% duty-cycle s type 2: TxOUT waveform equal to a pulse signal with the pulse duration equal to the Prescaler output signal. Figure 12.3 TxOUT Signal Types Level Ed ge sta rt sto p start start stop start 01 1 0 4 4 3 2 Reset Clock Cou nted Va lue Timer Output Type 1 Type 2 Prescout*Counter |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |