參數(shù)資料
型號: TriCore
廠商: SIEMENS AG
英文描述: 32-bit microcontrollers(32位微控制器)
中文描述: 32位微控制器(32位微控制器)
文件頁數(shù): 8/17頁
文件大?。?/td> 117K
代理商: TRICORE
How to use the
Watchdog Timer of the TriCore
8 of 17
AP3219 Rel.02
The following program in C-Code is an example how to change the register WDTCON0. It
can be included as a procedure in the mainfunction:
//Modify Access to WDTCON0 include this in your project
void WDT_Modify(unsigned long modify, unsigned long mask)
{
#define
WDTCON0 *((volatile unsigned int*) 0xF0000020)
unsigned int newvalue;
//by the mask selected bits will be changed by the variable modify
newvalue = WDTCON0 & (~mask));
newvalue = newvalue | (modify & mask);
newvalue = ((0xf2 | newvalue) & (0xfffffff3));
//bit 1 and 7:4 are
//written to 1’s and bit 3:2 written to 0’s
WDTCON0 = newvalue;
//write newvalue to WDTCON0
}
Now you can call the above mentioned procedure with the following instructions:
Mask = 0x0000000f;
Modify = 0x0000000f;
//new value for WDTCON0, ENDINIT will be set to
//bits that will be changed set to 1
WDT_Modify(Modify, Mask);
//Procedure call
Note:
The values of the variables “Mask” and “Modify” can be changed. This is only an
example and is described in the section entitled “How to change the WDTCON0”.
3.3
There are two classes of Watchdog Timer Errors:
Watchdog Access Error:
an incorrect access to WDTCON0 was attempted
Watchdog Timer Overflow Error:
the WDT counter overflowed
The Watchdog Access Error Status Flag, WDTSR.WDTAE, is set in case of an access
error. A Watchdog Access Error is generated when:
An illegal password is supplied during password access to register WDTCON0
Improper guard bits are supplied during a modifying access to WDTCON0
The Watchdog Overflow Error Status Flag, WDTSR.WDTOE, is set if an overflow error
occurs. A Watchdog Timer Overflow Error is generated if the WDT counter overflows. In all
error cases, the Watchdog Timer:
Generates an NMI trap request
Enters the Reset Pre-warning Mode
Sets the Watchdog Reset Pre-warning Flag, WDTSR.WDTPR and Watchdog Time-out
Period Indication Flag, WDTSR.WDTTO
Note:
When reset is caused by the WDT, the two error flags, WDTSR.WDTOE and
WDTSR.WDTAE, are not cleared. This allows the WDT to detect the Double
Watchdog Error condition. Any other reset cause will clear these error flags. They
are also cleared when WDTCON0.ENDINIT is set to 1.
Watchdog Error Conditions
相關(guān)PDF資料
PDF描述
TRR-8A33 Connectorized High-speed GaAs PIN
TRS1722 KIT INSULATED TERMINAL
TRS1755 33+3/4X66FT PLSTC TAPE
TRS1766 HIGH SENSITIVITY REFLECTIVE COLOR SENSOR WITH LIGHTTOVOLTAGE CONVERTERS
TRU-600 TRU-600
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
TRIDENT SAMPLE CASE 制造商:ITT Interconnect Solutions 功能描述:TRIDENT SAMPLE CASE / 192993-3000 / Trident
TRIG26362-I 制造商:Pass & Seymour/Legrand 功能描述:IG TR DECOR RECEPT 20A 125V IV
TRIG5362-REDSP 制造商:Pass & Seymour/Legrand 功能描述:IG SPD RECP TR 20A/125V ALARM RED
TRIG8300-RED 制造商:Pass & Seymour/Legrand 功能描述:HG IG TR DUP RECEPT 20A 125V RED
TRIG8300-W 制造商:Pass & Seymour/Legrand 功能描述:HG IG TR DUP RECEPT 20A 125V WH