OSEK Standard and experiments on microcontroller devices. Paolo Gai Evidence Srl

Similar documents
ERIKA Enterprise API Tutorial

Porting applications over the various conformance classes of Erika Enterprise

ERIKA Enterprise Minimal API Manual....multithreading on a thumb!

Real-time kernels for embedded systems. Evidence Srl

OSEK/VDX OSEK/VDX. Operating System. Operating System Specification 2.1r1. Version 2.1 revision November 2000

Freescale Semiconductor, Inc. OSEKturbo OS/ARM7 v.2.2. Technical Reference

ERIKA Enterprise LWIP Tutorial

Freescale Semiconductor, Inc. OSEKturbo OS/DSP v.2.2 Technical Reference Revised <01/28/2004> For More Information:

OSEKturbo OS/C167 v.2.2

Freescale Semiconductor, Inc. OSEKturbo OS/MPC5xx v Technical Reference Because of last-minute software changes, some information in this manual

Part I. Aknoledgement. Mauro Marinoni Objectives. Why an embedded O.S.?

Using the TASKING RTOS for TriCore

OSEK. Operating System

RT-Druid reference manual

ID 025C: An Introduction to the OSEK Operating System

AN3423 Application note

RTA-OS3.0 VRTA Port Guide

TECS Components Providing Functionalities of OSEK Specifications for ITRON OS

Copyright Metrowerks Corp. ALL RIGHTS RESERVED. Metrowerks reserves the right to make changes without further notice to any products herein to

RTA-OSEK. Binding Manual: HC12X16/Metrowerks

Copyright Metrowerks Corp. ALL RIGHTS RESERVED. Metrowerks reserves the right to make changes without further notice to any products herein to

Efficient EDF Implementation for Small Embedded Systems

Freescale Semiconductor, Inc MOTOROLA, ALL RIGHTS RESERVED Motorola reserves the right to make changes without further notice to any products he

EMARO-ARIA RETSY labs. Jean-Luc Béchennec, Sébastien Faucou

A fully Open-Source Platform for Automotive Systems

Freescale Semiconductor, Inc MOTOROLA, ALL RIGHTS RESERVED Motorola reserves the right to make changes without further notice to any products he

ERIKA Enterprise Manual for the Altera Nios II target. the multicore RTOS on FPGAs

MULTI SLOTH: An Efficient Multi-Core RTOS using Hardware-Based Scheduling

An application-based EDF scheduler for OSEK/VDX

RTA-OSEK. Binding Manual: MPC55XX/Diab

RTA-OSEK. fåñáåéçå=qêá`çêé=ñ~ãáäó=ïáíü=íüé=q~ëâáåö=`çãéáäéê. cé~íìêéë=~í=~=dä~ååé. oq^jlpbh. `çãéáäéêl^ëëéãääéêliáåâéê.

Labs Real-Time OS : OSEK/VDX

RTA-OSEK Texas Instruments TMS570 with the TI Compiler

Product Information Embedded Operating Systems

Real-Time Operating Systems (Working Draft) What is an Operating System (OS)?

RTA-OSEK Texas Instruments TMS470R1x with the TI Compiler

SLEEPY SLOTH: Threads as Interrupts as Threads

ERIKA Enterprise FIFO message passing Tutorial

EE458 - Embedded Systems Exceptions and Interrupts

Implementing AUTOSAR. Zhang Enqin Shanghai Automotive Lab. Aug 27-28, 2009

ERIKA Enterprise OSEK COM Manual

ARM Advanced Interrupt Controller

ERIKA Enterprise Manual for the Atmel AVR5 targets

Real-Time Operating Systems: Some Examples

RTA-OSEK Renesas SH2A with the WindRiver Compiler

Model Based Development of Embedded Control Software

Tasks. Task Implementation and management

Overview The Microcontroller The Flex Board Expansion boards Multibus board Demo board How to: Compile demo Flash & Run Demos

KERNEL THREAD IMPLEMENTATION DETAILS. CS124 Operating Systems Winter , Lecture 9

Introduction to Lab 2

Multicore for safety-critical embedded systems: challenges andmarch opportunities 15, / 28

Introduction to Lab 2

RTA-OSEK Infineon TriCore with the Green Hills Software Compiler

A New Real-time Kernel development on an embedded platform

Introduction to Lab 2

RTA-OSEK Freescale MPC55xx/56xx with the WindRiver Compiler

BTF-Specification. Version History. Version Author Datum Description

An implementation of the flexible spin-lock model in ERIKA Enterprise on a multi-core platform

ERIKA Enterprise pre-built Virtual Machine for Freescale PPC

Microkernel Construction

Interrupt handling. Purpose. Interrupts. Computer Organization

1.1 CPU I/O Burst Cycle

Grundlagen Microcontroller Interrupts. Günther Gridling Bettina Weiss

Adding Timing Analysis to Functional Design to Predict Implementation Errors

oscan Embedded Real-time Operating Systems

Driving the standard for optimized embedded systems

arxiv: v1 [cs.se] 24 Nov 2017

Precept 3: Preemptive Scheduler. COS 318: Fall 2018

RTA-OSEK. Binding Manual: MPC55xx/GreenHills

OS timing hooks. Generic trace interface. Specification Version 1.4

Fully Preemptive nxtosek Kernel with Preemption Threshold Scheduling

Interrupts (Exceptions) Gary J. Minden September 11, 2014

Sleepy Sloth: Threads as Interrupts as Threads

CHAPTER 11 INTERRUPTS PROGRAMMING

Measuring Interrupt Latency

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

Fast Interrupts. Krste Asanovic, UC Berkeley / SiFive Inc. (Chair) Kevin Chen, Andes (Vice-Chair)

Interrupts (Exceptions) (From LM3S1968) Gary J. Minden August 29, 2016

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

Scheduling Algorithm and Analysis

Real-Time Programming

Real-time operating systems and scheduling

The system has sixteen mailboxes. They are accessed through 32 register.

Global Optimization of Fixed-Priority Real-Time Systems by RTOS-Aware Control-Flow Analysis

OSEKturbo Design Tool for Deterministic Scheduling v.1.1

AN2585 Application note

COEN-4720 Embedded Systems Design Lecture 4 Interrupts (Part 1) Cristinel Ababei Dept. of Electrical and Computer Engineering Marquette University

Processes (Tasks) and operating systems. Why multiple processes? Example: engine control

SAFER SLOTH: Efficient, Hardware-Tailored Memory Protection

SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T A N D S P R I N G 2018

Scilab/Scicos code generator for FLEX

The HC11. Alexandra Carey & Richard Hughey. University of California, School of Engineering Santa Cruz, CA 95064

CSCI 8530 Advanced Operating Systems. Part 10 Clock and Timer Management

Lesson 5: Software for embedding in System- Part 2

RTA-OSEK Getting Started Guide

Getting Started. Build Version Revision 1.3 (GettingStartedGuide.pdf )

Interrupts, Etc. Operating Systems In Depth V 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

OSEK-Like Kernel Support for Engine Control Applications Under EDF Scheduling

Context Switch DAVID KALINSKY

INTERRUPTS in microprocessor systems

Transcription:

OSEK Standard and experiments on microcontroller devices Paolo Gai Evidence Srl pj@evidence.eu.com

summary the hardware example 1 ISR2 and tasks example 2 application modes and resources example 3 events, alarms, ErrorHook, ORTI

the hardware the evaluation board used is a FLEX board (Light or Full) with a Demo Daughter board during the examples, we ll use the following devices: the DSPIC MCU 1 timer a button used to generate interrupts when pressed or released also used as external input leds 16x2 LCD

Example 1 Tasks and ISR2 The demo shows the usage of the following primitives: DeclareTask ActivateTask TerminateTask - Schedule Demo structure The demo is consists of two tasks, Task1 and Task2. Task1 repeatedly puts on and off a sequence of LEDs Task2 simply turns on and off a LED, and is activated by the press of a button. Task2 is de facto a disturbing task that, depending on the configuration parameters, may preempt Task1

Ex. 1 Configuration 1: Full preemptive This configuration is characterized by the following properties: periodic interrupt Task1 activation LED 0 to 5 blink button Task2 activation Task2 always preempts Task1, blinks LED 6/7 and prints a message Notes: Task2 is automatically activated by StartOS AUTOSTART=TRUE Conformance Class is BCC1 lost activations if the button pressed too fast!

Ex. 1 Configuration 2: Non preemptive Task1 is NON preemptive Task2 runs only when Task1 does not run LEDs 6 and 7 does not interrupt the ChristmasTree IRQs are not lost, but task activations may be

Ex. 1 Configuration 3: Preemption points Task1 calls Schedule in the middle of the Christmas tree Result: Task2 can now preempt Task1 in the middle of the Christmas tree

Ex. 4 Configuration 4: Multiple Activations. BCC2 Conformance class Task2 can now store pending activations, which are executed whenever possible

Example 2 - Resources and App. modes The demo shows the usage of the following primitives: GetActiveApplicationMode, GetResource, ReleaseResource Demo structure Two tasks, LowTask and HighTask. They share a resource. LowTask is a periodic low priority task, activated by a timer, with a long execution time. Almost all its execution time is spent inside a critical section. LED 0 is turned on when LowTask is inside the critical section. HighTask is a high priority task that increments (decrements) a counter depending on the application mode being ModeIncrement (ModeDecrement). The task is aperiodic, and is activated by the ISR linked to the button.

Example 2 - Resources and App. modes (2) Application Modes are used to implement a task behavior dependent on a startup condition (ERIKA specific) HighTask and LowTask are configured to share the same stack by setting the following line inside the OIL task properties: STACK = SHARED;

Example 3 - Event and Alarm API Example The demo shows the usage of the following primitives: WaitEvent, Getevent, ClearEvent, SetEvent, ErrorHook, StartupHook, SetRelAlarm, CounterTick Demo structure: The demo consists of two tasks, Task1 and Task2. Task1 is an extended task. Extended tasks are tasks that: can call blocking primitives (WaitEvent) must have a separate stack A task is considered an Extended Task when the OIL file includes events inside the task properties. Task1 waits for two events: Timer CounterTick AlarmTask1 TimerEvent LED 1 Button IRQ SetEvent(ButtonEvent) LED 2

Example 3 - Event and Alarm API Example (2) Button press ISR2 SetRelAlarm(AlarmTask2) Task2 activation LED 3 on. ErrorHook when the button is pressed rapidly twice SetRelAlarm primitive called by the Button IRQ on an already armed alarm The alarm support is basically a wakeup mechanism that can be attached to application or external events (such as timer interrupts) by calling CounterTick to implement an asynchronous notification. (ERIKA Enterprise specific) Task1 needs a separate stack because it uses WaitEvent.

Example 3 - Event and Alarm API Example (3) Running the example Timer Interrupt Counter1 incremented. AlarmTask1 TimerEvent event set on Task1 Task1 wakes up, get the event, and blinks LED 1. The visible result is that LED 1 periodically blinks on the board. button press Task1 runs and LED 3 goes on and off rapid button press ErrorHook due to multiple calls of SetRelAlarm ORTI Informations are available for this demo