参数资料
型号: EP20K100BC672-1
厂商: ALTERA CORP
元件分类: PLD
英文描述: LOADABLE PLD, PBGA672
文件页数: 49/68页
文件大小: 975K
代理商: EP20K100BC672-1
53
4317K–AVR–03/2013
AT90PWM2/3/2B/3B
The following code example shows one assembly and one C function for turning off the Watch-
dog Timer. The example assumes that interrupts are controlled (e.g. by disabling interrupts
globally) so that no interrupts will occur during the execution of these functions.
Note:
1. The example code assumes that the part specific header file is included.
Note: If the Watchdog is accidentally enabled, for example by a runaway pointer or brown-out
condition, the device will be reset and the Watchdog Timer will stay enabled. If the code is not
set up to handle the Watchdog, this might lead to an eternal loop of time-out resets. To avoid this
situation, the application software should always clear the Watchdog System Reset Flag
(WDRF) and the WDE control bit in the initialization routine, even if the Watchdog is not in use.
Assembly Code Example(1)
WDT_off:
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Clear WDRF in MCUSR
in
r16, MCUSR
andi
r16, (0xff & (0<<WDRF))
out
MCUSR, r16
; Write logical one to WDCE and WDE
; Keep old prescaler setting to prevent unintentional time-out
lds
r16, WDTCSR
ori
r16, (1<<WDCE) | (1<<WDE)
sts
WDTCSR, r16
; Turn off WDT
ldi
r16, (0<<WDE)
sts
WDTCSR, r16
; Turn on global interrupt
sei
ret
C Code Example
void WDT_off(void)
{
__disable_interrupt();
__watchdog_reset();
/* Clear WDRF in MCUSR */
MCUSR &= ~(1<<WDRF);
/* Write logical one to WDCE and WDE */
/* Keep old prescaler setting to prevent unintentional time-out */
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Turn off WDT */
WDTCSR = 0x00;
__enable_interrupt();
}
相关PDF资料
PDF描述
EP20K100BC672-2 LOADABLE PLD, PBGA672
EP20K100BC672-3 LOADABLE PLD, PBGA672
EP20K100BI672-1 LOADABLE PLD, PBGA672
EP20K100BI672-2 LOADABLE PLD, PBGA672
EP20K100BI672-3 LOADABLE PLD, PBGA672
相关代理商/技术参数
参数描述
EP20K100BI356-1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Field Programmable Gate Array (FPGA)
EP20K100BI356-1ES 制造商:未知厂家 制造商全称:未知厂家 功能描述:FPGA
EP20K100BI356-2 制造商:未知厂家 制造商全称:未知厂家 功能描述:Field Programmable Gate Array (FPGA)
EP20K100BI356-2ES 制造商:未知厂家 制造商全称:未知厂家 功能描述:FPGA
EP20K100BI356-3 制造商:未知厂家 制造商全称:未知厂家 功能描述:Field Programmable Gate Array (FPGA)