Introduction: The watchdog in hardware is not the gatekeeper's idea, but a very fierce dog! If you don't feed it on time, it's going to restart the system! This is the function we want ~1. Watchdog overviewThe watchdog timer (Wdt,watch dog
used as a general-purpose 16-bit timer to request the interrupt operation. The watchdog timer generates 128 PCLK cycle reset signals. The main features are as follows:
16-bit timer for general interrupt mode.
When the counter is reduced to 0 (overflow), a reset signal of 128 PLK cycles is generated.
The function block
In Linux, for the S3C2440 Development Board, the watchdog timer has been configured by default, for example:
Devicedrivers --->
[*] Watchdog timer support --->
However, the watchdog timer is not enabled, so we will see the follow
Some time ago, cgminer was set to start when it was started. Due to various problems, the system was not very stable and it was stopped from time to time.
I checked it online, and Raspberry Pi immediately tried the hardware guard function, which basically solved my problem.
?
The principle is simple:
Watchdog requires heartbeat)
If no data is fed within the specified time period (15 seconds by default), the
void Wwdg_init(void){LPC_SC, PCLKSEL0 |= (30); Crossover number is eightLPC_WDT-Wdclksel = ~ (30);LPC_WDT, Wdclksel |= (10); Set WDT clock to APBLPC_WDT, Wdclksel |= (1); Lock Clock SourceLPC_WDT-WDTC = 0xFFFF; Setting overloaded valuesLPC_WDT, wdmod |= (10) | ( 11); Watchdog enable and set trigger resetAt this point the initialization is complete.}Shutdown Total System Interrupt__asm void Nvic_setprimask(void){Cpsid IBX R14}Turn on total system outag
In chapter 5, kernel service, I will explain the use of eka2's millisecond timer. Eka2 uses a 1 millisecond tick timer to drive time shards and timer queues, and tracks wall clock time ).
Generates a regular high-speed timer with 1 millisecond interrupt without drift, and puts forward the minimum
/* =============== How to use the timer interrupt ---- tf0 (TF1) value hardware reset method ========
1. Total disconnectionSecond, enable the timer to interruptThird: Set the special function register tmod and configure the working mode.Fourth, set the initial values of the count registers th0 and tl0.Fifth: Set tcon and set the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.