ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 10 Real Time System Design.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

CSC 360- Instructor: K. Wu Overview of Operating Systems.
INPUT-OUTPUT ORGANIZATION
1 ECE 372 – Microcontroller Design Parallel IO Ports - Outputs Parallel IO Ports E.g. Port T, Port AD Used to interface with many devices Switches LEDs.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Computer System Organization Computer-system operation – One or more CPUs, device controllers connect through common bus providing access to shared memory.
Real-Time Library: RTX
Cas Craven Nick Paine Glen Rhodes Lev Shuhatovich Joe Zugelter A little black box for your motorcycle.
Qstarz Data Logger Self-test Procedure. Reasons for unable to Log 1.Memory is full 2.Memory error due to improper operation 3.Device is broken We can.
Mark Schaumburg.  Dash Module for Formula Car  Sample pulse from engine for RPM  Display Information  Control gui  Can network interface  Request.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 6 Review I2C Communication, review fixed point arithmetic,
MotoHawk Training Model-Based Design of Embedded Systems.
68HC11 Polling and Interrupts
Informationsteknologi Wednesday, September 26, 2007 Computer Systems/Operating Systems - Class 91 Today’s class Mutual exclusion and synchronization 
CSC Timers Since this is a microcontroller it mainly finds itself in embedded devices Quite often embedded devices need to synchronize events The.
1 Homework Reading –Review previous material on “interrupts” Machine Projects –MP4 Due today –Starting on MP5 (Due at start of Class 28) Labs –Continue.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Concurrent Processes Lecture 5. Introduction Modern operating systems can handle more than one process at a time System scheduler manages processes and.
Electronics Design Laboratory Lecture #11, Fall 2014
Embedded Programming and Robotics
PICS / Microcontrollers
INPUT-OUTPUT ORGANIZATION
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Seongwoon Ko Ankith Cherala Jinliang Wei Kelton Stefan.
Peripherals and their Control An overview of industrially available “peripheral devices” that use “pulse-width modulation” for information passing. Review.
Digilent System Board Capabilities Serial Port (RS-232) Parallel Port 1 Pushbutton Hint: Good for a reset button Connected to a clock input. See Digilent.
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 8 Review.
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Introduction to Sensor Technology Week Five Adam Taylor
Autonomous Helicopter James LydenEE 496Harris Okazaki.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples.
I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 5 Mail Boxes / Binary Semaphores Fixed Point Arithmetic.
GLAST Large Area Telescope Instrument Flight Software Flight Unit Design Review 16 September 2004 Software Watchdog Steve Mazzoni Stanford Linear Accelerator.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 7 Review, Quiz, & Watchdog Timers.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 4 Review.
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.
PPI-8255.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Programming of FPGA in LiCAS ADC for Continuous Data Readout Week 6 Report Wednesday 6 th August 2008 Jack Hickish.
System Software Design Dan Sweet May 6 th, 2008 Western Washington University Bicycle Power Meter.
Embedded Systems February 10, Serial Interface - SPI  Serial Peripheral Interface  Synchronous communications  Clock supplied by the Master.
Final Presentation Smart-Home Smart-Switch using Arduino
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Big Picture Lab 4 Operating Systems C Andras Moritz
Lecture 8 Task Utilization. Theoretical Analysis.
Application Case Study Christmas Lights Controller
Chip Config & Drivers – Required Drivers:
Homework Reading Machine Projects
Do-more Technical Training
Topics Covered What is Real Time Operating System (RTOS)
Mobile Operating System
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Homework Reading Machine Projects Labs
CSE 466 – Fall Introduction - 1
E3165 DIGITAL ELECTRONIC SYSTEM
Introduction to Microprocessors and Microcontrollers
An Embedded Software Primer
Protocol Basics.
Computer Science & Engineering Electrical Engineering
Embedded System Development Lecture 12 4/4/2007
Presentation transcript:

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 Today’s Agenda Real Time Control Diagrams – Circular Queues – Message Queues – Health Monitor – Event Flags Examples

ENTC-489 Embedded Real Time Software Development Control Diagrams

ENTC-489 Embedded Real Time Software Development Symbols Semaphores & Mutexes Mailboxes and Message Queues

ENTC-489 Embedded Real Time Software Development Symbols Timers and Event Flags Tasks and Functions

ENTC-489 Embedded Real Time Software Development Symbols Hardware Global Variables

ENTC-489 Embedded Real Time Software Development Example 1 – Serial Port

ENTC-489 Embedded Real Time Software Development Example 1 – Serial Port Characteristics – Received characters When a character is received it is placed in a circular queue If the queue is full the incoming character is lost Counting semaphore indicates a character has been added to the queue Interface gets_with_pend(), getc_with_pend() – Transmitted characters Characters to be transmitted are placed in a circular queue If there is no room in the queue, the character is dropped Interface functions check for space in buffer, use timer delay before checking again if inadequate space Interface puts_with_pend(), putc_with_pend()

ENTC-489 Embedded Real Time Software Development Serial Port Control Diagram

ENTC-489 Embedded Real Time Software Development Circular Queues (put) Note: Always leaves on entry empty

ENTC-489 Embedded Real Time Software Development Circular Queues (get)

ENTC-489 Embedded Real Time Software Development Example 2 - Logger

ENTC-489 Embedded Real Time Software Development Example 2 - Logger Logger Characteristics – Tasks send information to be logged via send_sensors_to_log() or send_error_to_log() – Task waits for data to log, then sends to both the serial port and the EEPROM – Messages may come more rapidly than they can be written to the serial port or EEPROM – Most of the time this task does nothing

ENTC-489 Embedded Real Time Software Development Logger Control Diagram

ENTC-489 Embedded Real Time Software Development Logger Message Queue Operation

ENTC-489 Embedded Real Time Software Development Logger Task Flow Chart

ENTC-489 Embedded Real Time Software Development EEPROM Operation All Operations times or on the order of 1mS

ENTC-489 Embedded Real Time Software Development EEPROM Storage

ENTC-489 Embedded Real Time Software Development Example 2 - Health

ENTC-489 Embedded Real Time Software Development Health Task Warning/Cautions If you plan to try and restart tasks (as shown today) – If a task allocated memory and you kill the task, that memory is lost forever – If a task created a resource (Semaphores, Message Queues, etc) these will need to be deleted and recreated – In general, it is generally best to do a hardware reset.

ENTC-489 Embedded Real Time Software Development Health Task Control Diagram Global Variable Check in Advantages – Supports short watchdog timer values best – Allows tasks to set their own WDT times

ENTC-489 Embedded Real Time Software Development Global Variable Check In Flow Chart

ENTC-489 Embedded Real Time Software Development Health Task Control Diagram Event Flag Check in Advantages – Health task uses less CPU time

ENTC-489 Embedded Real Time Software Development Event Flag Check in Flow Chart

ENTC-489 Embedded Real Time Software Development Capstone Example Monitor critical information – Compass – Acceleration – Gyroscope Monitor non-critical information – GPS Position – Battery information (current,voltage,power) SPI Input from controlling device – PWM Values SPI Output to controlling device – Monitored data PWM – Motors – Camera gimble SPI RTS/CTS Functionality

ENTC-489 Embedded Real Time Software Development UAV Example Program Serial Port has two modes – SP1 – Sends XY location to serial port every 5 seconds – SP2 – (default) Can receive commands from serial port “Dump” dumps the logged information RGB LED, solid red if Z axis deviates 5 degrees from vertical, otherwise, blinking green Accelerometer – Must be read often (100Hz or faster) to compute current XY and tilt EEPROM Logging – xy position of darkest location and light level – xy position of brightest location and light level – Latest xy position, every 5 seconds – Logging disabled in SP2 – Yellow LED on for 1 second when a higher or lower light level is logged. Switch montioring – Debounce switches – SW1 Clears the XY location and log information and puts unit in SP1 mode – SW2 Puts unit in SP2 mode, stops logging