Lecture 13: TI MSP430 Watchdog Timer and Real-Time Clock

Slides:



Advertisements
Similar presentations
The 8051 Microcontroller and Embedded Systems
Advertisements

UBI >> Contents Chapter 7 Timers Laboratories MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
Chung-Ta King National Tsing Hua University
Programmable Interval Timer
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
Using the 8254 Timer-Counter Understanding the role of the system’s 8254 programmable Interval-Timer/Counter.
ECE 447 Fall 2009 Lecture 9: TI MSP430 Interrupts & Low Power Modes.
Instructor: Dr Aleksandar Milenkovic Lecture Notes
Timers in Hardware ECE152. Overview Why are timers important – Watchdog – Task switching – Accurate time of day Can use polling or interrupts.
ECE 331 – Digital System Design Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
The 8051 Microcontroller and Embedded Systems
INTERRUPTS PROGRAMMING
Chung-Ta King National Tsing Hua University
Lecture 9 Timer Operations and Programming. 2  Introduction  Summary of timers  Timer programming sequence  Summary of timer SFRs  Timer 0: 8-bit.
Timers. Range of timers Watchdog timer: Included in all devices (watchdog timer+). Its main function is to protect the system against malfunctions but.
LAB 7: WDT+ and Low-Power Optimization
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
USART interrupt.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
2/26/2015 Richard Kuo Assistant Professor
ARM Timers.
System Clocks.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 8.
ATmega128RFA1 Power Measurement. ATmega128RFA1 SoC (uC and Transceiver) Up to 16 MHz (i.e. almost 16 MIPS) Voltage range: 1.8v to 3.6v 16K bytes RAM 128.
Lecture Set 9 MCS-51 Serial Port.
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Lecture 25: LM3S9B96 Microcontroller – Watchdog Timer.
Lecture 11: TI MSP430 Timers Compare Modes
Lecture 11 Low Power Modes & Watchdog Timers
RX Voltage Detection Circuit (LVD) and Power-On Reset (POR)
Lecturers: Professor John Devlin Mr Robert Ross
ECE 447: Lecture 8 Timer System (1). ECE 447: 68HC11 Timer System 1.Generating delays - imposing a specific delay between two points in the program by.
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.
MCS51 - lecture 6. Lecture 6 1/32 Extending MCS51 system Built-in peripherals MCS51 family.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
IO Subsystem IV Ports and peripherals. IO Subsystem (1) All devices connected to the system buses, other than memory and CPU – Input and output ports.
Conclusion Speech. Content Organization Pronunciation Handwriting.
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
Real Time Interrupts Section Real-Time Interrupt (RTI) Most operating systems (OS) require an interrupt every T seconds by the RTI RTI interrupts.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Jump, Loop, and Call Instructions
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
Lecture 22: LM3S9B96 Microcontroller – SysTick and General-Purpose Timers.
Teaching Digital Logic courses with Altera Technology
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Watchdog Timers Refer to Chapter 11 in the reference book “Stellaris® LM3S9B96 Microcontroller.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Networked Embedded Systems Pengyu Zhang & Sachin Katti EE107 Spring 2016 Lecture 4 Timers and Interrupts.
INSTITUTE: INSTITUTE:PARUL INSTITUTE OF TECHNOLOGY BRANCH : BRANCH :B.E. E.C.5 TH SEM. SUBJECT:MICROCONTROLLER & INTERFACING TOPIC:AVR INTTRUPT TOPIC:AVR.
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
16F877A.
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
Lecture 10: TI MSP430 Timers and Capture Modes
Lecture 8: TI MSP430 Interrupts, ISRs
I2C Protocol and RTC Interfacing
Microprocessor Systems Design I
Networked Embedded Systems Sachin Katti
Timer and Interrupts.
ECE 353 Introduction to Microprocessor Systems
Chapter 6 General Purpose Input/Output
ECE 3430 – Intro to Microcomputer Systems
I2C Protocol and RTC Interfacing
I/O PORTS : MSP430x5xx devices have up to 12 digital I/O ports :
ECE 3430 – Intro to Microcomputer Systems
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
전자의료시스템 및 실습 System Configuration/Interrupt
Lecture 9: TI MSP430 Interrupts & Low Power Modes
CS4101 Introduction to Embedded Systems Lab 2: Basic IO and Timer
Lecture 17.
Presentation transcript:

Lecture 13: TI MSP430 Watchdog Timer and Real-Time Clock ECE 447 Fall 2009 Lecture 13: TI MSP430 Watchdog Timer and Real-Time Clock

ECE447: MSP430 Watchdog Timer Concept A watchdog timer (or computer operating properly timer) is a hardware timing device that triggers a system reset if the main program, due to some fault condition, such as a hang, neglects to regularly service the watchdog.

ECE447: Use Cases for Watchdog Timer Out of Control Software: Trapped in infinite loop Code/Memory overwrite Peripheral Failure: Polling a non responsive device SW controlled reset: The WDT register can be used to force a reset purposely

ECE 447: Enabling and Disabling the WDT The WDT is always active after a reset Default settings allow the software about 32ms to clear, stop, or reconfigure the WDT at startup. Up until now we have always stopped the WDT by setting the WDT-HOLD bit.

ECE447: Petting the Watchdog Petting is performed by writing to the WDT-CNTCL bit. All writes to the WDT register are protected by a 8 bit password. 0x5A must be the upper byte value of any write to the WDTCTL register Any other value will cause an immediate reset.

ECE 447: WDT Control Register

Basic Timer 1 provides two or three fucntions in the MSP430: ECE447: MSP430 Basic Timer1 Basic Timer 1 provides two or three fucntions in the MSP430: Clock for the LCD module Periodic Interrupts 1Hz clock signal to drive the Real-Time Clock The RTC only exists in newer MSP430xFxx family devices.

ECE447: MSP430 Basic Timer1 BTCNT1 and BTCNT2 count based on control bits in BTFRQx and BTIPx. BTCNT2 causes the BTIFG flasg to be set at each rollover, with a rame from 16ms to 2s.

ECE447: MSP430 Real Timer Clock Concept A Real-Time Clock (RTC) is a hardware device that counts time based on seconds, minutes, hours, days, months, and year. Unlike most clocks in a microcontroller that do not convey useful data directly, the RTC is directly human understandable.

ECE447: MSP430 Real Timer Clock Concept The current time and date are held in a set of registers that contain the following bytes: Second (RTCSEC) Minute (RTCMIN) Hour (RTCHOUR), which runs from 0-23 (24-hour format) Day of week (RTCDOW), which runs from 0-6 Day of month (RTCDAY) Month (RTCMON) Year (RTCYEARL), assuming BCD format Century (RTCYEARH), assuming BCD format.

ECE447: MSP430 Real Timer Clock Data Registers The RTC is controlled by the RTCCTL It is initially disabled at reset (RTCHOLD is set) It can store its data registers in BCD or unsigned binary numbers (RTCBDC) Care should be taken in reading the RTC, see Davies p286.

ECE447: MSP430 Real Timer Clock Data Registers The Real-Time Clock has an interrupt flag RTCFG and corresponding enable bit RTCIE in RTCCTL. The flag is set every minute, every hour, daily at midnight, or daily at noon depending on the RTCTEVx bits. There is no alarm interrupt function, this must be implemented in software if desired.

ECE447: MSP430 Class Exercise Write a C program that sets up the RTC and sets the date to today, 18:00:00, and starts the time displaying on the Hitachi LCD module attached to P1 (4-bit mode) The time will be displayed in 24hr format with hours, minutes, and seconds. The output should be updated any time that the corresponding values are updated in the RTC registers.