Professional Documents
Culture Documents
OSEK-1995
OSEK-1995
SAE TECHNICAL950291
PAPER SERIES
C. Hoffmann
Volkswagen AG
International CongressDetroit,
and Exposition
Michigan
February 27 - March 2, 1995
400 Commonwealth Drive, Warrendale, PA 15096-0001 U.S.A. Tel : (412)776-4841 Fax:(412)776-5760
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
The appearance of the ISSN code at the bottom of this page indicates SAE's consent
that copies of the paper may be made for personal or internal use of specific clients.
This consent is given on the condition, however, thatthe copier pay a $5.00 per article
copy fee through the Copyright Clearance Center, Inc. Operations Center, 222
Rosewood Drive, Danvers, MA 01923 for copying beyond that permitted by Sections
107 or 108 of the U.S. Copyright Law. This consent does not extend to other kinds
of copying such as copying for general distribution, for advertising or promotional
purposes, for creating new collective works, or for resale.
SAE routinely stocks printed papers for a period of three years following date of
publication. Direct your orders to SAE Customer Sales and Satisfaction
Department.
Quantity reprint rates can be obtained from the Customer Sales and Satisfaction
Department.
950291
ABSTRACT
The individual development process for distributed,
communicating electronic control units hinders the
integration of Automotive systems and increases the
overall costs. In order to facilitate such applications,
services and protocols for Communication, Network
Management, and Operating System must be
standardized. The aim of the OSEK project is to
work out a respective specification proposal in co
operation with several car manufacturers and
suppliers. This will permit a cost-effective system
integration and support the portation of system
functions between different electronic control units. The project "Open Systems and Interfaces for
Electronics in Cars (OSEK)" thus aims to specify an
1. INTRODUCTION open architecture for communicating vehicle
In a distributed control system, several controllers systems [2]. This architecture comprises:
(stations) are connected via a communication link • Communication (Data exchange within and
(Fig. 1), e.g. electronic control units within an between Control Units);
automobile. Generally these control units are • Network Management (Configuration determi
supplied by different companies, and they have nation and monitoring); and
different microcontroller architectures. For the
connection of distributed system functions, stations • Realtime Executive (Operating system for
exchange messages with standardized interfaces. A Control Unit software).
uniform network management guarantees the safe
operation of safety-relevant, distributed systems [1]. With OSEK this expensive investment is only
needed once, and it is possible to re-use it with
The development costs for the communication and minor modifications for various applications.
network management software may be significantly
reduced, if the interfaces and procedures are Particular targets of OSEK are:
standardized not just within one subsystem, but for • company-independent specification of interfaces,
the entire distributed system. The software should be functions and protocols for Communication,
implemented in a uniform operating system. In Network Management and Realtime Executive;
addition, operating systems with uniform interfaces
offer different application programs available from • specification of a hardware- and software
various suppliers which co-exist in a single independent user interface, which enhances
processor. In that way, the multitasking approach portability and re-usability of application
serves as an efficient means to cut costs. programs;
71
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
• efficient architectural adaption to respective electronic control units for production purposes.
applications by reconfiguration and scaling; and Today's extremely costly and error-prone stage
between prototypes and end products is thus
• functional verification and implementation of overcome.
prototypes in selected pilot projects.
It is not the aim of OSEK to engage into an
implementation of products. These should be left
open for e.g. software houses or microcontroller
manufacturers.
72
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
73
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
Communication by channel implies the synchro As in the case of variables, channels are defined as
nization of the communication partners, i.e. the station-global and network-global. A network-global
sequencing of participant tasks over time. A channel is implemented by a channel buffer y in the
message can only be received if it has been transmitting station and channel buffers y' in the
previously stored into the channel. Transmission is
however done asynchronously. There are two receiving stations. The message transfer is
reception modes, either asynchronous (non performed by the interaction layer.
blocking) or synchronous (blocking). In the 3. OSEK NETWORK MANAGEMENT
synchronous mode, the receive task is blocked until
a new message arrives in the channel (Fig. 7). In (OSEK-NM)
order to prevent receivers from blocking The reliability and availability of the communication
continuously, the ready state of the receiver is limited link is guaranteed by an integrated network
by a timeout. management (OSEK-NM). Its essential services are:
74
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
• defined and synchronized initialization of the management at a time t. This set may change,
network communication, determination of the e.g. differing among stations in case of failures,
configuration. Application tasks can only start or stations being switched on or off by the driver.
their operation, after all data transmitting stations • The Reference Configuration is given by the
are fully operational. car manufacturer. It depends on the vehicle
• continuous configuration monitoring, detecting equipment and options available. This reference
the addition or the eventual failure of stations. is used as a comparison to the actual
Changes in configuration are relayed to the configuration, which allows to eventually start
application layer, where a functional operations of the application.
reconfiguration must be decided (e.g. graceful • The Sum of actual Configurations is the union
degradation). of all actual configurations observed since the
• defined and synchronized transfer of the network first start of the distributed system. It may serve
into the "sleep mode". as a substitute for the reference configuration.
This configuration management makes up the core All configurations are accessible through the
services of OSEK-NM. Further optional services are: application layer.
• initialization of operating resources and of The state diagram of the network management
objects defined by OSEK-KOM and OSEK-BS; within a single station is shown in Fig. 9.
• control of operation modes;
• detection, management and messaging of
failures;
• diagnostic support, e.g. error statistics,
monitoring; and
• handling of network resources, e.g. temporary
channels.
The configurations are as follows: Operational. All status messages on the network
from other stations are then received, and the actual
• The Actual Configuration is the set of all configuration is derived from that. Without any
operational stations recorded by the network reception of status messages from other stations,
75
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
the own station repeats its own status message after • offer users a variety of services, functions, of
a timeout. It follows, that a logical ring can always be which only a portion is incorporated into the
built up. With the reception of some other status actual application;
messages, available stations are inserted into a • guarantee 100% portability of tasks; and
logical ring according to their given addresses.
• may be dynamically reconfigured and scaled.
Status messages are triggered by a respective
message from the predecessor station, and are Such a complexity appears to be an overkill in high-
directed to the successor station. Since all these volume Automotive applications. OSEK-BS is
data are accessible to the application layer, the therefore deliberately restricted in its capabilities. To
availability of the reference configuration can be overcome this, the basic targets are somewhat
easily checked. similar to those of commercial realtime executives.
However, there are some significant differences.
In case that a station is no longer operational, it OSEK-BS:
reverts to the state Non-operational. From there, a • is configured and scaled just statically. The
respectively adapted status message is cyclically number of tasks, resources and services is
transmitted. A station failure can also be detected,
when its status message is no longer transmitted specified in advance by a user;
within a given timeout. This is diagnosed in all other • also aims at the portability of tasks. There is
stations, which then go back to the Reset state, and however no 100% portability;
determine the actual configuration from scratch. • requires experienced users, since application
Announcement of Stations errors are not always backed up by extensive
routines; and
A new station is detected from its status message by • operates from ROM code.
the other stations within the actual configuration. It is
incorporated into the logical ring.
4.1 The OSEK-BS Concept
Withdrawal of Stations
It is the basis for the independent development of
There is no defined specific procedure. A station just different application programs. Their execution in
discontinues the transmission of its own status realtime is controlled by events from the plant. The
message. control-unit hardware is accessible through uniform
interfaces. This enables the application software to
Sleep Mode have a certain degree of independence from the
control-unit hardware.
The switch-down to sleep mode is initiated by one
station. The corresponding request is entered into its Execution Layers
status message, which is then transmitted from
station to station. If all stations in the logical ring The overall application software is partitioned into
have acknowledged the request for sleep mode by software portions, which are concurrently processed
forwarding it, and when this information transfer has according to their urgency in realtime. In order to
completed a full loop, the entire network can be cover the large variety of realtime constraints,
switched down. OSEK-BS contains 4 different execution layers with
different priority levels (Fig. 10). These priority levels
4. OSEK OPERATING SYSTEM determine the order of processing.
(OSEK-BS) The Interrupt level holds the highest priority. It is
It will provide a uniform and efficient execution dedicated for time-critical activities, which are
environment for all Automotive Electronic Control characterized by short latency and execution times.
Units. Program Modules written e.g. in "C" language In order to match these constraints, the Interrupt
will be readily exchanged. Service Routines (ISR) should not contain any data
processing. The interrupt response and acknow
There seems to be an inherent contradiction
ledge can be very fast, if the real processing of data
between the targets for standardization and and other actions are shifted to the job level.
efficiency. This is due to the commercial realtime
executives which burden applications with huge The next priority level is taken by the internal
overheads. They: operating-system functions, which are defined by
core and optional services.
76
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
77
Downloaded from SAE International by University of New South Wales, Saturday, September 15, 2018
• Event Control Management of events When this paper was filed for publication to the SAE
for task synchronization. in July 1994, a rough specification of OSEK had just
• Time Control Cyclical release of certain been completed. Currently a detailed specification is
tasks into the ready being worked out. It should be noted, that the OSEK
initiative is not restricted to a limited region of the
state, which are then world. All potential partners willing to be actively
activated.
involved in a fruitful OSEK co-operation are most
• Angle Control Optional version similar welcome onto the OSEK bandwagon.
to time control.
REFERENCES
b) Optional Services: /1/
Kiencke U., "Distributed Realtime Processing
• • Time Management Provision
time, services to calcu
absolute
of in Automotive Networks", SAE Technical Paper
No. 900696, 1990.
late relative times and to
exchange time units. /2/ Mathony H.-J., Kaiser K.-H., Unruh J., Raith T.,
Thurner T., "Open Systems and their
• • Angle Management Similar to time
control. Interfaces for the electronic in Cars - OSEK",
• • Error Management User sup ort in of
errors.
case 13. Tagung 'Elektronik im Kraft-fahrzeug im
Haus der Technik, Essen, 1993.
• Intertask Station-global variables /3/ Besel, K.-G., Hirth, T. "Design systems for the
Communication and channels. MSR-Project", (German-language), VDI-
Exclusive access to
Berichte Nr.: 1009, S. 503, 1992.
• Semaphore
Management atomic operations, com /4/ Leohold, J., "The MSR-Project: Tool support
monly used resources for new ways of cooperation between vehicle
and devices. manufacturer and supplier", (German-
language) VDI-Berichte Nr.: 1009, S. 491,
5.SCALING AND CONFIGURATION 1992.
The concepts and services of OSEK shall be applied /5/ ISO "Information Processing Systems - Open
to all stations of a distributed system, from the top- Systems Interconnection - Basic Reference
end to the bottom-end. They must support different Model", ISO 7498, 1984.
bus protocols such as CAN, ABUS, VAN, J1850, K
BUS, P-BUS, l-BUS etc. An adaption to the required /6/ Mathony H.-J., Kaiser K.-H., Unruh J.,
capabilities and the used resources is done by "Network Architecture for CAN", SAE Technical
scaling and configuring. Paper No. 930004, 1993.
The core services are mandatory basic functions. /7/ Raith T., Thurner T., Kocher H., "Netsoftware
They are part of any implementation. The optional for databus systems in vehicles", (German-
services are then used to extend the performance of language), VDI-Berichte Nr.: 819, S. 171,
OSEK for a specific application. The configuration is 1990.
done by static parameters. /8/ Kühner T., Häußler B., Thurner T., Müller K.
H., "Standardized netsoftware moduls for car
6.SUMMARY
ECU'S - realized on a CAN-System", (German-
The aims of the OSEK initiative are to specify language), VDI-Berichte Nr.: 1009, S. 653,
uniform services, interfaces and protocols for the 1992.
communication, network management and the
operating system of a distributed realtime system.
The cooperative effort of many car manufacturers
and suppliers is not just in order to achieve a
standardization. It guarantees, that practical
application issues are considered on a broad basis
within the OSEK specification, ensuring its
acceptance by development engineers in their daily
programs.
78