Micro C - embedded systems notes PDF

Title Micro C - embedded systems notes
Author Rensi Mathew
Course Embedded Systems
Institution APJ Abdul Kalam Technological University
Pages 4
File Size 196.1 KB
File Type PDF
Total Downloads 74
Total Views 152

Summary

embedded systems notes...


Description

Micro C/OS- II Micro C/OS-II is the acronym for MicroController Operating System version 2, which is the second version of the RTOS developed by Micrium Inc, which became a part of Silicon Labs in 2016.it belongs to µC/OS family of embedded software. It is a Real Time kernel written in ‘C’ language for embedded application development. It supports Multitasking & Priority based pre-emptive task scheduling. It is available for different family of processors/controllers and supports processors/controllers ranging from 8bit to 64bit like ARM family of processors, Intel 8085/x86/8051, Freescale 68K series and Altera Nios II are examples for some of the processors/controllers supported by MicroC/OS-II

The features of the µC/OS kernels include: 







Scalable: The μC/OS kernels allow for unlimited tasks and kernel objects. The kernels' memory footprint can be scaled down to contain only the features required for your application, typically 6–24 KBytes of code space and 1 KByte of data space. This means that a product can have just a few of µC/OS-II’s services while another product can have the full set of features. This allows you to reduce the amount of memory (both RAM and ROM) needed by µC/OS-II on a product per product basis. Scalability is accomplished with the use of conditional compilation. Portable: Most of µC/OS-II is written in highly portable ANSI C, with target microprocessor specific code written in assembly language. Assembly language is kept to a minimum to make µC/OS -II easy to port to other processors. ROMable: µC/OS-II was designed for embedded applications. This means that if you have the proper tool chain (i.e. C compiler, assembler and linker/locator), you can embed µC/OS-II as part of a product. Efficient : Micrium's kernels also include valuable runtime statistics, making the internals of your application observable. Identify performance bottlenecks, and optimize power usage, early in your development cycle.



   

Reliable : The μC/OS kernels include debugging feature that reduce development time. The kernels provide extensive range checking, including checks for pointers passed in API calls, task level services from ISRs, arguments within allowable range, and for valid specified options. Preemptive multitasking real-time kernel Very low interrupt disable time Configurable performance measurement metrics Suitable for safety-critical applications

Task Creation & Management     

  

The uC/OS-II supports up to 64 tasks. 8 Tasks are reserved for the uC/OS-II kernel. Each task should have a unique task priority assigned. No two tasks can have the same priority. In effect uC/OS-II supports 56 user level tasks. Task priority varies from 0 to 63, with 0 being the highest priority. Considering the future expansions, uC/OS-II advices developers not to use the priority values 0, 1, 2, 3, OS_LOWEST_PRIO-3, OS_LOWEST_PRIO-2, OS_LOWEST_PRIO-1and OS_LOWEST_PRIO. Currently, the uC/OS-II reserves only two task priorities for kernel tasks. The ID of a task is its priority. A Task Control Block (TCB) is assigned to a task when a task is created.

Task States Under MicroC/OS-II kernel, the tasks may be in one of the following state at a given point of time.

 Dormant: The dormant state corresponds to the state where a task is created but no resources are allocated to it. This means the task is still present in the program memory and is not moved to the RAM for execution.  Ready: Corresponds to a state where the task is incepted into memory and is awaiting the CPU for its turn for execution.  Running: Corresponds to a state where the task is being executed by CPU.  Waiting: Corresponds to a state where a running task is temporarily suspended from execution and does not have immediate access to resources. The waiting state might be invoked by various conditions like – the task enters a wait state for an event to occur (E.g. Waiting for user inputs such as keyboard input) or waiting for getting access to a shared resource  Interrupted: A task enters the Interrupted (or ISR) state when an interrupt is occurred and the CPU executes the ISR. Task Control Block (TCB)  TCB is a data structure for holding the state of a task. It is essential for handling the state information during a context switch.  The TCB under uC/OS-II is represented by OS_TCB.  TCB is a main-memory-resident data structure

 The contents of a TCB is saved/restored when a context-switch occurs.  Task priority, delay counter, event to wait, the location of the stack, etc are the information held by TCB for a task Task ID Task Prioroty Task Status Delay (timeout waiting for event) Pointers to top and bottom of stack Task size Pointer to previous and next TCB pointer to user definable data Pointer to Event Control Block Message received Task options...


Similar Free PDFs