ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 7 Review, Quiz, & Watchdog Timers.

Slides:



Advertisements
Similar presentations
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Advertisements

A look at interrupts What are interrupts and why are they needed.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 6 Review I2C Communication, review fixed point arithmetic,
 A quantum is the amount of time a thread gets to run before Windows checks.  Length: Windows 2000 / XP: 2 clock intervals Windows Server systems: 12.
68HC11 Polling and Interrupts
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
CSC Timers Since this is a microcontroller it mainly finds itself in embedded devices Quite often embedded devices need to synchronize events The.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
A look at interrupts What are interrupts and why are they needed.
1 When to Switch Processes 3 triggers –System call, Interrupt and Trap System call –when a user program invokes a system call. e.g., a system call that.
Computer Organization and Assembly language
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
OS Spring’04 Introduction Operating Systems Spring 2004.
INPUT/OUTPUT ORGANIZATION INTERRUPTS CS147 Summer 2001 Professor: Sin-Min Lee Presented by: Jing Chen.
NS Training Hardware. System Controller Module.
Timers and Interrupts Shivendu Bhushan Sonu Agarwal.
Cortex-M3 Debugging System
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Writing an Embedded Controller. It usually consists of two parts – Initialization – A main loop More challenging than HW3 because HW3 is stateless, the.
COMP201 Computer Systems Exceptions and Interrupts.
DAT2343 Accessing Services Through Interrupts © Alan T. Pinck / Algonquin College; 2003.
A Few Words From Dilbert
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 10 Real Time System Design.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 8 Review.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 5 Mail Boxes / Binary Semaphores Fixed Point Arithmetic.
Dhanshree Nimje Smita Khartad
Interrupts general concepts interrupt systems. Interrupts - concepts 2/27 Interrupt - the event inside or outside of microprocessor system, requested.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
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.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
ECE 265 Midterm Review 12/1/ ECE265. Administrivia  The grade for quiz 3 was not entered into to Carmen before I handed them back.  I realize.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
1 Interrupts, Resets Today: First Hour: Interrupts –Section 5.2 of Huang’s Textbook –In-class Activity #1 Second Hour: More Interrupts Section 5.2 of Huang’s.
MicroC/OS-II S O T R.  MicroC/OS-II (commonly termed as µC/OS- II or uC/OS-II), is the acronym for Micro-Controller Operating Systems Version 2.  It.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Interrupts Microprocessor and Interfacing
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
Copyright © 2007 by Curt Hill Interrupts How the system responds.
Evaluating the Fault Tolerance Capabilities of Embedded Systems via BDM M. Rebaudengo, M. Sonza Reorda Politecnico di Torino Dipartimento di Automatica.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Lecture – 8 Interrupt 1. Outline Introduction Handling interrupt Interrupt sources Switching interrupt Peripheral interrupts Using two interrupts Conclusions.
Outlines  Introduction  Kernel Structure  Porting.
WAVECOM©2005. All rights reserved 1 PROTECTIONS Embedded Software Architecture AT commands Parser Customer Application written in Standard ANSI C Wavecom.
Homework Reading Machine Projects Labs
Lecture 2 Interrupts.
CS501 Advanced Computer Architecture
Microprocessor Systems Design I
MIPS I/O and Interrupt.
Interrupts In 8085 and 8086.
RX Watchdog Timer (WDT)
MIPS I/O and Interrupt.
An Embedded Software Primer
Ms. Shockey’s Room Room 609 AE
Operating Systems Chapter 5: Input/Output Management
Tonga Institute of Higher Education
Embedded System Development Lecture 7 2/21/2007
COMP3221: Microprocessors and Embedded Systems
CGS 3269: COMPUTER SYSTEMS ARCHITECTURE
Embedded System Development Lecture 12 4/4/2007
BIT 143:Programming & Data Structures in C#
Presentation transcript:

ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 7 Review, Quiz, & Watchdog Timers

ENTC-489 Embedded Real Time Software Development Today’s Agenda Announcements Review – Real World I2C Timing Examples Quiz Watchdog timers in Embedded Systems

ENTC-489 Embedded Real Time Software Development Announcements In recognition of the need to work during spring break, WDT Extra Credit Program, it will now replace two lowest Quiz/Homework grades Extra credit assignment will be handed out after the quiz which may replace lowest Quiz/Homework grade If you turn in both, you get a do-over on a total of 3 grades! Mid-term exam (25% of your grade) is the week after spring break. – Open book (should have calling information on µC/OS and IQmathLib functions handy) – Calculator recommended – Anything covered in my lectures is fair game!

ENTC-489 Embedded Real Time Software Development Overall View of Intensity Running Low = In Idle Task Measure Temperature & Humidity Delay

ENTC-489 Embedded Real Time Software Development Code to Get 1mS Time Delays

ENTC-489 Embedded Real Time Software Development Zoom on Reading Temperature Read Temp Command NAKed Read ACK, Read Data, Start Humidity Reading

ENTC-489 Embedded Real Time Software Development Read Temperature Loop

ENTC-489 Embedded Real Time Software Development Read Command with Delayed Stop Start of command based on OSTimeDly() and there are not many higher priority processes so the time is very close to the time set by OSTimeDly() we use for the stop bit generation. Delay varies Service Timer Interrupt

ENTC-489 Embedded Real Time Software Development Delay Before Stop

ENTC-489 Embedded Real Time Software Development Sending Read Temp Command Service I2C Interrupt Read Temp Command Address + Write Bit Service Timer Interrupt

ENTC-489 Embedded Real Time Software Development Command to Read Temperature Read 2 Bytes

ENTC-489 Embedded Real Time Software Development Generic Read Command

ENTC-489 Embedded Real Time Software Development Waiting for the Conversion I2C Interrupt Service SHT21 NAKs Command Extra from uC port Stop Bit Sent Address + Read Bit Timer Interrupt Service

ENTC-489 Embedded Real Time Software Development Reading Before Conversion Done Returns 0 Because of Command NAK

ENTC-489 Embedded Real Time Software Development Got the Conversion Address + Read Bit ACK High Order Byte ACK from uC Low Order Byte Stop from uC Start of Humid Cmd Service I2C IRQ

ENTC-489 Embedded Real Time Software Development Successful 2 Byte Read bytes_in 0, then 1 maxbytes = 2

ENTC-489 Embedded Real Time Software Development Break/Quiz

ENTC-489 Embedded Real Time Software Development Kernel Watchdog Timer What is a WDT? Why do I need one? How is a Kernel WDT different than a hardware WDT? Basic WDT Architecture

ENTC-489 Embedded Real Time Software Development What is a WDT? An independent, usually hardware mechanism to monitor the health of a software based system. Based on the principle of check in (often called a tickle) by software on a periodic basis If the software fails to tickle in the required time a hardware reset is issued

ENTC-489 Embedded Real Time Software Development Why do I need a WDT? Unanticipated events can cause the software to go crazy – Rare interrupt for which there is no handler – Undetected software bug – High energy sub-atomic particle (rare on earth) – Hardware (latch-up is moderately common) causes I/O pins to have unanticipated values WDT allows you to at minimum – Put hardware in a safe condition WDT may allow you to correct or work around the problem

ENTC-489 Embedded Real Time Software Development How is a Kernel WDT Different H/W WDT – Usually short timeouts (< 1 second to << 1 second) – Likelihood ALL the software is confused (no kernel) – Always results in a reset, which can be a booger to debug Kernel WDT – Timeout often set to > 1 second, depending on what the tasks are doing and the criticality of the tasks – Likelihood that only one task is malfunctioning, allowing system to operate with a limp – Health task can allow breakpoints when timeouts do occur, making debug a little easier

ENTC-489 Embedded Real Time Software Development Health Task Architecture All task pends must have a timeout < the required check-in time Health task must tickle the H/W WDT when everything is good Health task may delete and re-create tasks that do not check-in on time