RTOS & Applications for LPC2148 Aman Arora Ashmita Sinha Karthik Shankar 1 EE382M | Advanced Embedded Systems Architecture Spring 2011 | Project Presentation.

Slides:



Advertisements
Similar presentations
Project: Processes and Resource Management Textbook: pages Lubomir Bic.
Advertisements

Jon Stanley EE382N-4 Spring  Objectives  Tasks  Keil MCB2300 ARM7 Evaluation Board ◦ System overview ◦ Measurement setup ◦ Instruction power.
The eCos real-time operating system an open source tool to create embedded kernels and applications.
Real-Time Library: RTX
Mark Schaumburg.  Dash Module for Formula Car  Sample pulse from engine for RPM  Display Information  Control gui  Can network interface  Request.
Computer System Overview
ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.
© ABB Group Jun-15 Evaluation of Real-Time Operating Systems for Xilinx MicroBlaze CPU Anders Rönnholm.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Travis Reed Todd Hummel Kwan-Truc. Concept USB 1.1 SPI b.
IO Controller Module Arbitrates IO from the CCP Physically separable from CCP –Can be used as independent data logger or used in future projects. Implemented.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Tileli Amimeur Sami Gharahi Fall 2009 *Drinking from a fire hose.
ECE 4220 Real Time Embedded Systems Final Project Presentation Spring 2014 University of Missouri Columbia By: Michael Brauch Temperature Data Logger.
P ORTING F REE RTOS TO MCB2140 BOARD Ashwini Athalye Sravya Kusam Shruti Ponkshe.
MSP432™ MCU RTOS Solutions
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.
Evolution of Microcontroller Firmware Development David Benjamin.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
328eForth for Arduino Uno C. H. Ting February 16, 2012 SVFIG.
Advanced Embedded Systems Design Pre-emptive scheduler BAE 5030 Fall 2004 Roshani Jayasekara Biosystems and Agricultural Engineering Oklahoma State University.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Ch. 9 Interrupt Programming and Real-Time Sysstems From Valvano’s Introduction to Embedded Systems.
UART and UART Driver B. Ramamurthy.
LPC2148 Programming Using BLUEBOARD
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
FreeRTOS.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Real-time Closed Loop Controller Raffaele Cetrulo Rolando Ortega Hector Rubio.
Overview Task State Diagram Task Priority Idle Hook AND Co-Routines
Embedded Systems OS. Reference Materials The Concise Handbook of Real- Time Systems TimeSys Corporation.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
Real Time Operating Systems Michael Thomas Date: Rev. 1.00Date.
Multi-Tasking The Multi-Tasking service is offered by VxWorks with its real- time kernel “WIND”.
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.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 19: Real-Time Systems System Characteristics.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Windows CE Portable Modular Real-time Small footprint Embedded market.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
CSE466 - Fall What is an Embedded System  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)  Lacks some or.
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 1 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
1 Round Robin Non-Preemptive Scheduler Lecture 12.
AT91SAM7X256 Board and FreeRTOS Overview Real-Time Systems Lab Dae Don Jeon
Task Management 김백규. Task states(1/2)  Running  currently utilising the processor.  Ready  tasks are those that are able to execute.  they are not.
Big Picture Lab 4 Operating Systems C Andras Moritz
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Outlines  Introduction  Kernel Structure  Porting.
IBM’s OS/2 by Chris Axford Chris Evans Elizabeth McGinnis Erik Swensson.
FreeRTOS synopsis 김백규 -. FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source ( mini size.
LPC2148's RTOS Bruce Chhuon 4/10/07. What is a Real Time Operating System? ● A Real Time Operating System (RTOS) manages hardware and software resources.
REAL-TIME OPERATING SYSTEMS
Chapter 19: Real-Time Systems
Implementation of Embedded OS
Discussions on hw5 Objectives:
Round Robin Non-Preemptive Scheduler
Computer System Laboratory
CS4101 嵌入式系統概論 Tasks and Scheduling
Discussions on hw5 Objectives:
Chapter 19: Real-Time Systems
LPC2148 ARM7 myKernel Details
Presentation transcript:

RTOS & Applications for LPC2148 Aman Arora Ashmita Sinha Karthik Shankar 1 EE382M | Advanced Embedded Systems Architecture Spring 2011 | Project Presentation

Agenda Objective Overview FreeRTOS Porting MCB2140 & LPC2148 CLI & Applications Results and Status Demo 2

Objective To port an RTOS on LPC2148 ARM7 based SOC from NXP Development board - MCB2140 from KEIL To develop applications on top of the RTOS Most importantly, LEARN !!! 3

Overview 4 LPC 2148 (ARM7) FreeRTOS FLASH MUSIC LED CLI RTOS Selection Understanding FreeRTOS Understanding MCB2140 & LPC2148 Porting CLI & Application Development Testing & Debugging

Tasks and division TaskWho? Choosing a RTOSAman, Karthik, Ashmita Understanding the board and the SOC Aman, Karthik, Ashmita Understanding the concepts of FreeRTOS Aman, Karthik, Ashmita Porting the RTOS and writing the LED Task Karthik, Ashmita The Music TaskAman, Karthik The Flash TaskAman, Karthik Command Line InterfaceAman, Ashmita Porting FatFSKarthik, Ashmita 5

FreeRTOS Why FreeRTOS? Free! Active project Low footprint – 4K to 7K Good documentation Features Written mostly in C Supports tasks and co-routines Many communication and synchronization primitives Version Mini-real time kernel freeRTOSConfig.h 6

FreeRTOS Scheduler Supports preemptive, cooperative or hybrid scheduling Threads are maintained in a queue Scheduling algorithm – highest priority first Threads which are runnable and have highest priority are scheduled Threads with same priority run with round robin scheduling Preemption implemented Tick count – Tasks can mention the max time to be blocked Will be waken up after the time 7

FreeRTOS Tasks Running, Ready, Blocked or Suspended state Task priority – 0 to (configMAX_PRIORITIES - 1) 0 – lowest APIs xTaskCreate, vTaskResume, vTaskSuspend, xTaskHandle, vTaskDelete Idle task – priority 0 Idle task hook (called during each cycle of idle task) Co-routines Only intended for very small processors with severe RAM constraints Shared stack Complex 8

FreeRTOS Inter process communication Queues Passed by value Blocking or Non-Blocking Zero time out creates non-blocking Used in ISRs Mutex With priority inversion Semaphore 9

Porting Used FreeRTOS for LPC2888 as reference Existing port used Rowley-GCC compiler Modified Startup.s Reduced stack size for FIQ Kept the same values for PLL Removed EMC configurations Modified SOC specific register addresses (LPC214x.h) Removed extra hardware configurations from prvSetupHardware function (like I 2 S, USB, etc.) Modified compiler dependent ISR definitions Redid project files/makefiles for Keil uVision Reduced the functionalities in the RTOS due to compiler limitations Removed the ErrorChecking task Enabled vTaskDelete 10

MCB2140 LPC2148 SD Card Slot Potentiometer Speaker LED COM ports Reset USB/Power 11

flash_task(R/W) Communication(Pr ogramming & hyperterminal) music_task 12 led_task (P1:16 –23) LPC2148

Program Flow ledTask CLI Task flashTask musicTask mt dm fm Reset Startup.s main 13

Command Line Interface Interface to the user through COM port Some commands implemented TOP CLEAR START LED STOP LED START FLASH MT FM DM STOP FLASH START MUSIC STOP MUSIC ECHO 14

LED Task Mainly used for debugging purpose LEDs mapped to P1.16 -> P1.23 implement 8 bit counter LED Port Init LED Toggle Delay LED Clear LED Task Delete and Update Task List LED Task Create TASK 15 start led stop led

Music Task Uses both ADC & DAC Timer Interrupt period determined based on POT position (Timer1) Registered ISR using VICVectAddr & VICIntEnable registers Potentiometer ADC Timer Interrupt Sine Wave Sample Generation DAC Speaker 16

Flash Task Used APIs for SPI and MMC communication (Source: NXP) Modified hardware specific initializations (Init function) CLK freq Block /Sector Configuration Changed bare metal calls to RTOS level calls Resolved conflicts in register addresses 17

Flash Task mmc_write_block(block) MMCWR -> data MT FM DM EXIT mmc_write_block(block) mmc_read_block(block) Compare MMCWR & MMCRD mmc_read_block(block) MMCRD -> data Flash Prompt Parse command 18 Update Task List Delete Flash Task

Flash Task APIs MMC_Init Send CMD0(Idle State Cmd) CMD1(SEND_OP_C OND) CMD16(SET_BLOC KLEN) MMC_Read_Block Generate Address corresponding to given block number CMD17(READ_SINGLE_ BLOCK) SPI_Receive MMC_Write_Block Generate Address corresponding to given block number CMD24(WRITE_SINGLE _BLOCK) SPI_Send 19

FatFS Generic FAT filesystem module for small embedded systems Provides application interface (fopen, fclose, fmount) and disk I/O interface (disk initialize, disk read/write) Found existing implementation for OLIMEX ARM7 board Issues faced: Port was for MMC interface - had different pinout Unable to initialize disk Compiler Issues 20

Results and Status Successfully ported FreeRTOS on LPC2148 Created Command Line Interface through UART Successfully developed/ported applications LED Music Flash Block read and write only Struggling with FatFS porting 21

Next Time… Port a more complex Operating System Start early on FatFS port!!! Add USB interface to SD card 22

References LPC2148 user manual an10406.pdf an10406.pdf 23

DEMO … 24