CE-2800: Embedded Systems Software I Watchdog Timers 1 The Watchdog timer.

Slides:



Advertisements
Similar presentations
Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Advertisements

Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer 2 Port (A,B), No Bidirectional.
8051 Core Specification.
The 8085 Microprocessor Architecture
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
COMP3221: Microprocessors and Embedded Systems Lecture 16: Interrupts II Lecturer: Hui Wu Session 2, 2005.
Fuses and Lock Bits The ATMega128 has several special memory areas -Six lock bits which determine program memory features. -Three fuse bytes which determine.
TAP (Test Access Port) JTAG course June 2006 Avraham Pinto.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
External & internal Interrupts. Interrupt Sources There are 21 different interrupts and each one has its own vector located in a predefined location at.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – System Control Refer to Chapter 6 in the reference book “Stellaris® LM3S9B96 Microcontroller.
NS Training Hardware. System Controller Module.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
AVR Reset Sources When a reset event occurs.... -I/O registers set to initial values immediately -internal delay stretched to allow power to stabilize.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
System Clocks.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Lecture 25: LM3S9B96 Microcontroller – Watchdog Timer.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
Lecture 11 Low Power Modes & Watchdog Timers
RX Voltage Detection Circuit (LVD) and Power-On Reset (POR)
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
SE-3910 Real-time Systems Week 5, Class 1 – Quick-Quiz (Ungraded) – Lab 4 turn-in up - due Tuesday, Week 5 – Select when to use Polling or Interrupts –
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
CS-280 Dr. Mark L. Hornick 1 Atmel Timer/Counter System Most microcontrollers include some type of timer system Facilitates real-time monitoring and control.
Conclusion Speech. Content Organization Pronunciation Handwriting.
8254 Timer.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the Direct Memory.
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
COMP3221: Microprocessors and Embedded Systems--Lecture 10 1 COMP3221: Microprocessors and Embedded Systems Lecture 10: Shift and Bit-set Instructions.
CS-280 Dr. Mark L. Hornick 1 Sequential Execution Normally, CPU sequentially executes instructions in a program Subroutine calls are synchronous to the.
Chapter Microcontroller
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Watchdog Timers Refer to Chapter 11 in the reference book “Stellaris® LM3S9B96 Microcontroller.
The 8051 Microcontroller Chapter 6 INTERRUPTS. 2/29 Interrupt is the occurrence of a condition an event that causes a temporary suspension of a program.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
INSTITUTE: INSTITUTE:PARUL INSTITUTE OF TECHNOLOGY BRANCH : BRANCH :B.E. E.C.5 TH SEM. SUBJECT:MICROCONTROLLER & INTERFACING TOPIC:AVR INTTRUPT TOPIC:AVR.
Special Features. Device Configuration bits Revision Device Configuration bits Revision On-chip Power-on Reset (POR) Revision On-chip Power-on Reset (POR)
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
16F877A.
Refer to Chapter 5 in the reference book
BITS EDU. CAMPUS , VARNAMA
Programmable Interval Timer
Interrupt Source: under
Reset Sources and Watchdog Timer
RX Compare Match Timer (CMT)
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
COMP2121: Microprocessors and Interfacing
Lecture 18 Interrupt 동국대학교 홍유표.
8-bit Timer/Counter2 with PWM and Asynchronous Operation
전자의료시스템 및 실습 System Configuration/Interrupt
Interrupt Source: under
Interrupt Source: under
The 8085 Microprocessor Architecture
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
8051 Development System Details
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

CE-2800: Embedded Systems Software I Watchdog Timers 1 The Watchdog timer

The operation of the Atmega32 can be reset due to various events Power-on Reset – The MCU is reset when the supply voltage is below the Power-on Reset threshold (VPOT). External Reset – The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse length. Brown-out Reset – The MCU is reset when the supply voltage VCC is below the Brown-out Reset threshold (VBOT) and the Brown-out Detector is enabled. JTAG AVR Reset – The MCU is reset as long as there is a logic one in the Reset Register, one of the scan chains of the JTAG system. Refer to the section “IEEE (JTAG) Boundary-scan” on page 225 for details. Watchdog Reset – The MCU is reset when the Watchdog Timer period expires and the Watchdog is enabled. Watchdog Timers2

CS-280 Dr. Mark L. Hornick 3 All resets cause the PC to vector to address 0

Brown Out Detection -> Why is it necessary? Watchdog Timers4

When a reset occurs the MCUCSR Status Register contains the reason for the reset Watchdog Timers5

What is the watchdog timer? A special timer that, once configured and enabled, counts down to 0 When expired, causes the CPU to reset The countdown can be restarted at any time before expiration If periodically restarted, the expiration will never occur, and the reset will never happen. Watchdog Timers6

Why use a watchdog timer? Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. In many cases, embedded devices operate in total isolation and are not accessible to an operator. Manually resetting a device in this scenario when its software “hangs” is not possible. In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers7

The Clementine In 1994, a deep space probe, the Clementine, was launched to make observations of the moon and a large asteroid (1620 Geographos). After months of operation, a software exception caused a control thruster to fire continuously for 11 minutes, which depleted most of the remaining fuel and caused the probe to rotate at 80 RPM. Control was eventually regained, but it was too late to successfully complete the mission. This caused some money to be wasted 8Watchdog Timers

Enabling the Watchdog Timer Bits 7..5 – Res: Reserved Bits – These bits are reserved bits in the ATmega32 and will always read as zero. Bit 4 – WDTOE: Watchdog Turn-off Enable – More on subsequent slide Bit 3 – WDE: Watchdog Enable – When set, the Watchdog Timer is enabled. Bits 2..0 – WDP2, WDP1, WDP0: Watchdog Timer Prescaler 2, 1, and 0 – The WDP2, WDP1, and WDP0 bits determine the Watchdog Timer prescaling when the Watchdog Timer is enabled. The different prescaling values and their corresponding Timeout Periods are shown on the next slide. Watchdog Timers9

Setting the watchdog timer timeout Watchdog Timers10 Driven by internal 1 MHz clock Prescaler bits WDPx determine timeout

Resetting the Watchdog timer A single instruction! WDR When executed, causes the timer to reset and start counting over Watchdog Timers11

Disabling the Watchdog timer Bit 4 – WDTOE: Watchdog Turn-off Enable – This bit must be set before the WDE bit is written to logic zero. Otherwise, the Watchdog will not be disabled. Once written to one, hardware will clear this bit after four clock cycles. Refer to the description of the WDE bit for a Watchdog disable procedure. Bit 3 – WDE: Watchdog Enable – When set, the Watchdog Timer is enabled. WDE can only be cleared if the WDTOE bit is set first. To disable an enabled Watchdog Timer, the following procedure must be followed: 1. In the same operation, set both WDTOE and WDE. A logic one must be written to WDE even if it is already set before the disable operation starts. 2. Within the next four clock cycles, clear WDE. This disables the Watchdog. Watchdog Timers12