| поискавой системы для электроныых деталей |
|
CR16MFS5 датащи(PDF) 43 Page - National Semiconductor (TI) |
|
|
|
|||||||||||||||||||||||||||||
CR16MFS5 датащи(HTML) 43 Page - National Semiconductor (TI) |
|
43 / 99 page ![]() 43 www.national.com When the counter reaches zero, an internal timer signal called T0OUT is set to 1 for one T0IN clock cycle. This signal sets the TC bit in the TWMT0 Control and Status Register (T0CSR). It also generates an interrupt called RTI (IRQ14) if the interrupt is enabled by the T0CSR.T0INTE bit. If the software loads TWMT0 with a new value, the timer uses that value the next time that it reloads the 16-bit timer register (in other words, after reaching zero). The software can re- start the timer at any time (on the very next edge of the T0IN clock) by setting the Restart (RST) bit in the T0CSR register. The T0CSR.RST bit is cleared automatically upon restart of the 16-bit timer. Note: If the user wishes to switch to power save or idle mode after setting T0CSR.RST, the user must wait for reset opera- tion to complete before doing the switch. 13.3 WATCHDOG OPERATION The WATCHDOG is an 8-bit down counter that operates on the rising edge of a specified clock source. Upon reset, the WATCHDOG is disabled; it does not count and no WATCH- DOG signal is generated. A write to either the WATCHDOG Count (WDCNT) register or the WATCHDOG Service Data Match (WDSDM) register starts the counter. The WATCH- DOG counter counts down from the value programmed in to the WDCNT register. Once started, only a reset can stop the WATCHDOG from operating. The WATCHDOG can be programmed to use either T0OUT or T0IN as its clock source (the output and input of Timer T0, respectively). The TWCFG.WDCT0I bit controls this clock selection. The software must periodically “service” the WATCHDOG. There are two ways to service the WATCHDOG, the choice depending on the programmed value of the WDSDME bit in the Timer and WATCHDOG Configuration (TWCFG) register. If TWCFG.WDSDME bit is cleared to 0, the WATCHDOG is serviced by writing a value to the WDCNT register. The value written to the register is reloaded into the WATCHDOG counter. The counter then continues counting down from that value. If TWCFG.WDSDME bit is set to 1, the WATCHDOG is ser- viced by writing the value 5C hex to the WATCHDOG Service Data Match (WDSDM) register. This reloads the WATCH- DOG counter with the value previously programmed into the WDCNT register. The counter then continues counting down from that value. A WATCHDOG error signal is generated by any of the follow- ing events: — The WATCHDOG serviced too late . — The WATCHDOG serviced too often. — The WDSDM register is written with a value other than 5C hex when WDSDM type servicing is enabled (TWCFG.WDSDME=1). A WATCHDOG error condition resets the device. 13.3.1 Register Locking The Timer and WATCHDOG Configuration (TWCFG) regis- ter is used to set the WATCHDOG configuration. It controls the WATCHDOG clock source (T0IN or T0OUT), the type of WATCHDOG servicing (using WDCNT or WDSDM), and the locking state of the TWCFG, TWCPR, TIMER0, T0CSR, and WDCNT registers. A register that is locked cannot be read or written. A write operation is ignored and a read operation re- turns unpredictable results. If the TWCFG register is itself locked, it remains locked until the device is reset. Any other locked registers also remain locked until the device is reset. This feature prevents a run- away program from tampering with the programmed WATCHDOG function. 13.3.2 Power Save Mode Operation The Timer and WATCHDOG Module is active in both the Power Save and Idle modes. The clocks and counters con- tinue to operate normally in these modes. The WDSDM reg- ister is accessible in the Power Save and Idle modes, but the other TWM registers are accessible only in the Active mode. Therefore, WATCHDOG servicing must be carried out using the WDSDM register in the Power Save or Idle mode. In the Halt mode, the entire device is frozen, including the Timer and WATCHDOG Module. Upon return to the Active mode, operation of the module resumes at the point at which it was stopped. Note: After a restart or WATCHDOG service through WD- CNT, do not enter Power Save mode for a period equivalent to 5 slow clock cycles. 13.4 TWM REGISTERS The TWM registers controls the operation of the Timing and WATCHDOG Module. There are six such registers: • Timer and WATCHDOG Configuration Register (TWCFG) • Timer and WATCHDOG Clock Prescaler Register (TWCP) • TWM Timer 0 Register (TWMT0) • TWMT0 Control and Status Register (T0CSR) • WATCHDOG Count Register (WDCNT) • WATCHDOG Service Data Match Register (WDSDM) The WDSDM register is accessible in both Active and Power Save mode. The other TWM registers are accessible only in Active mode. 13.4.1 Timer and WATCHDOG Configuration Register (TWCFG) The TWCFG register is a byte-wide, read/write register that selects the WATCHDOG clock input and service method, and also allows the WATCHDOG registers to be selectively locked. Once a bit is set, that bit cannot be cleared until the device resets. Upon reset, the non-reserved bits of the regis- ter are all cleared to 0. The register format is shown below. LTWCFG Lock TWCFG Register. When cleared to 0, ac- cess to the TWCFG register is allowed. When set to 1, the TWCFG register is locked. A 7 6 5 4 3 2 1 0 Reserve d WDSDME WDCT0I LWDCNT LTWMT0 LTWCP LTWCFG |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |