3. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Background
Today’s automotive industry is faced with
a growing demand for technical
appliances and this requires an increased
use of ECUs which is reflected in the
complexity of the system.
Traditionally, solutions have been specific
for a certain platform or model and this
structure is more becoming unmanageable
and costly.
Instead of making specific solutions a
standardized future is the way to go.
This increased complexity could be
manageable and improved by a
standardized architecture and the
solution is AUTOSAR
3
5. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Application software that supports the AUTOSAR standard will receive
several benefits.
The following examples are the driving forces why we need AUTOSAR as
listed in :
Manage increasing E/E complexity – Associated with growth in functional scope.
Improve flexibility – More room for updates, upgrades and modifications.
Improve scalability – The system can in a more graceful manner be enlarged.
Improve quality and reliability – Proven software applications can be reused.
Detection of errors in early design phases
5
(AUTomotive Open System ARchitecture)
14. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_systemWhat is the AUTOSAR standard and
why is it created?
AUTOSAR is standardized software architecture developed in
cooperation between car manufacturers originally intended for the
automotive industry but is steadily gaining interest from other
industries as well.
AUTOSAR was developed with the intention of being able to handle
the increased complexity in today’s automotive industry and to
decouple software from hardware.
Also Integration of functional modules from multiple suppliers
Software updates and upgrades over vehicle lifetime
Consideration of availability and safety requirements
14
22. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Step 1: Input Descriptions
The input description step contains three descriptions:
Software Components: This description is independent
of the actual implementation of the software component.
Among the necessary data to be specified are the
interfaces and the hardware requirements.
System: The system topology (interconnections between
ECUs) need to be specified together with the available
data busses, used protocols, function clustering and
communication matrix and attributes (e.g. data rates,
timing/latency, …).
Hardware: The available hardware (processors, sensors,
actuators, …) needs to be specified together with the
signal processing methods and programming capabilities
22
Step 1: Input Descriptions
Step 2: System Configuration
Step 3: ECU-configuration
Step 4: Generation of Software
Executables
38. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
4 Steps 38
Functions of the car
Brake control BC
Throttle Control TC
Engine Control EH
Door locking DL
Mapping of SWC to ECU
TC Software
Components
(SWCs)
EH
Software
Components
(SWCs)
BC
Software
Components
(SWCs)
DL
Software
Components
(SWCs)
ECU Extract FilesAn extract is created for
each ECU...
Step 1: Input Descriptions
Step 2: System Configuration
Step 3: ECU-configuration
Step 4: Generation of Software
Executables
42. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Microcontroller Abstraction Layer
The Microcontroller Abstraction Layer
(MCAL) is located at the very bottom of the
BSW layer.
MCAL uses its internal software drivers to
directly communicate with the
microcontroller.
These drivers include: memory,
communication and I/O drivers. The task of
the layer is to make layers above it
microcontroller independent.
When the MCAL is implemented it is
microcontroller dependent but provides a
standardized and microcontroller
independent interface upwards in the stack
thus fulfilling its purpose
42
Source: www.autosar.org
43. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
ECU Abstraction Layer
Located on top of the MCAL is the ECU Abstraction Layer
(ECUAL).
Internally it has drivers for external devices and uses the
interface defined by the MCAL to access drivers at the lowest
level.
Layers higher up in the stack can use the provided API to gain
access to devices and peripherals without having to know
anything about the hardware, for example, whether or not a
device is located internally or externally, what the
microcontroller interface looks like etc.
The ECUAL aims to make upper layers independent of how the
ECU is structured.
implementation the ECUAL is microcontroller independent but
dependent on the ECU hardware;
Upper layers interfacing the ECUAL are no longer dependent on
either of them (microcontroller and ECU Hardware).
43
44. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Complex Drivers Layer
Typically this layer is used to integrate special purpose
functionality and functionality currently being migrated from
a previous system
Since this is the layer between the microcontroller and the
RTE, drivers for devices with strict timing constraints can
benefit from being placed in the CDL as the multi-layered
parts of the BSW layer is likely to introduce overhead due to
additional layers and standardization.
Drivers for devices not compliant with AUTOSAR can also be
put here
“How does the standard support migration from existing
solutions?”
The introduction and creation of Complex Drivers in the
AUTOSAR standard can be used to migrate existing solutions
44
46. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Runtime Environment
The RTE is the layer between the application layer
and the BSW layer. It provides the application
software with services from the service layer.
All communication between SWCs, either on
the same ECU or different ones, or services are
done via the RTE.
The main task of the RTE is to make the layer
above and below it completely independent of each
other.
In other words, SWCs running on an ECU have no
idea what the ECU looks like hence a SWC will be
able to run on different looking ECUs without any
modifications
Logically the RTE can be seen as two sub-parts
realizing different SWC functionality:
Communication
Scheduling
46
Source: www.autosar.org
47. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Virtual Function Bus
47
It provides generic communication services
that can be consumed by any existing
AUTOSAR software component.
Although any of these services are virtual,
they will then in a later development phase be
mapped to actual implemented methods, that
are specific for the underlying hardware
infrastructure.
In virtual speciation of the communication
topology and interaction between components
which is done via the virtual function bus,
the runtime environment provides an actual
implementation for these artifacts.
It could also be said that the runtime environment
provides an actual representation of the virtual
concepts of the VFB for one specific ECU.
48. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Example VFB to RTE mapping where the virtual communication topology is
mapped to three different ECU's
48
Source: www.autosar.org
Each ECU has its own customized RTE
implementation which is generated
during the ECU Configuration process
.
The Depending on the location of each
component, the formerly virtual interaction
can then be mapped to real interaction
implementation.
components that are mapped onto one
ECU will communicate through Intra
ECU-Mechanisms, like function calls
while Inter-ECU communication will be
realized using, e.g. a communication bus
infrastructure.
54. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Mapping of Runnable Entities and Basic Software Schedulable
Entities to tasks (informative)
The RTE-Configurator uses parts
of the ECU Configuration of
other BSW Modules, e.g. the
mapping of RunnableEntitys to
OsTasks. In this configuration
process the RTE-Configurator
expects OS objects (e.g. Tasks,
Events, Alarms...) which are used in
the generated RTE and Basic
Software Scheduler.
54
Source: www.autosar.org
58. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_systemRTE Implementation Example 1:
Without OsEvent
Description of the example:
RunnableEntity RE1 is activated by TimingEvent 100ms T1.
RunnableEntity RE2 is activated by TimingEvent 100ms T2.
RunnableEntity RE3 is activated by TimingEvent 100ms T3.
Execution order of the RunnableEntitys shall be R1, R2 then R3. RE2 shall be monitored.
Possible RTE configuration:
RE1/T1 is mapped to OsTask TaskA with RtePositionInTask equal to 1.
RE2/T2 is mapped to OsTask TaskB but virtually mapped to TaskA with RtePositionInTask equal to 2.
RE3/T3 is mapped to OsTask TaskA with RtePositionInTask equal to 3.
Possible RTE implementation: RTE starts cyclic OsAlarm with 100ms period. This OsAlarm is
configured to activate TaskA.
Non preemptive scheduling is configured for Task A.
TaskB priority = TaskA priority + 1
58
Source: www.autosar.org
59. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_systemRTE Implementation Example 2:
With OsEvent
Description of the example:
RunnableEntity RE1 is activated by DataReceivedEvent DR1.
RunnableEntity RE2 is activated by DataReceivedEvent DR2.
RunnableEntity RE3 is activated by DataReceivedEvent DR3. Evaluation order of the
RTEEvents shall be DR1, DR2 then DR3. All the runnables shall be monitored.
Possible RTE configuration:
RE1 is mapped to OsTask TaskB but virtually mapped to TaskA with a reference to OsEvent
EvtA and RtePositionInTask equal to 1.
RE2 is mapped to OsTask TaskC but virtually mapped to TaskA with a reference to OsEvent
EvtB and RtePositionInTask equal to 2.
RE3 is mapped to OsTask TaskD but virtually mapped to TaskA with a reference to OsEvent
EvtC and RtePositionInTask equal to 3.
Possible RTE implementation:
RTE set EvtA, EvtB and EvtC according to the callbacks from COM. Full preemptive
scheduling is configured for Task A.
TaskB priority = TaskC priority = TaskD priority = TaskA priority + 1
59
Source: www.autosar.org
73. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
What is Next ?
We will create a MCAL “(Microcontroller Abstraction Layer)” Drivers
For Atmega32 according to Autosar Specifications
73
MCAL (Microcontroller
Abstraction Layer)
MCAL is a software module that
directly accesses on-chip MCU
peripheral modules and external
devices that are mapped to memory,
and makes the upper software layer
independent of the MCU.
Details of the MCAL software module
are shown below.
94. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
https://www.autosar.org
Embedded Microcomputer Systems Real Time Interfacing Third
Edition Jonathan W. Valvano University of Texas at Austin.
MicroC/OS-II the real-time kernel second edition jean j.labrosse.
RTOS Concepts http://www.embeddedcraft.org.
OSEK/VDX Operating System Specification 2.2.3
AUTOSAR Layered Software Architecture
The Trampoline Handbook release 2.0
Trampoline (OSEK/VDX OS) Test Implementation -Version 1.0,
Florent PAVIN ; Jean-Luc BECHENNEC
94
96. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
Real Time Systems (RETSY)
Jean-Luc Béchennec - Jean-Luc.Bechennec@irccyn.ec-nantes.fr
Sébastien Faucou - Sebastien.Faucou@univ-nantes.fr
jeudi 12 novembre 15
AUTOSAR Specification of Operating System V5.0.0 R4.0 Rev 3
OSEK - Basics http://taisnotes.blogspot.com.eg/2016/07/osek-basic-
task-vs-extended-task.html
OSEK OS Session Speaker Deepak V.
M.S Ramaiah School of Advanced Studies - Bangalore 1
Introducción a OSEK-OS - El Sistema Operativo del CIAA-Firmware
Programación de Sistemas Embebidos
MSc. Ing. Mariano Cerdeiro
96
99. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
AUTOSAR Method, Vector Webinar 2013-04-17
https://vector.com/portal/medien/cmc/events/Webinars/2013/Vector_Web
inar_AUTOSAR_Method_20130417.pdf
AUTOSAR Configuration Process - How to handle 1000s of parameters
Vector Webinar 2013-04-19
https://vector.com/portal/medien/cmc/events/Webinars/2013/Vector_Web
inar_AUTOSAR_Configuration_Process_20130419_EN.pdf
AUTOSAR Runtime Environment and Virtual Function Bus, Nico Naumann
https://hpi.de/fileadmin/user_upload/fachgebiete/giese/Ausarbeitungen_A
UTOSAR0809/NicoNaumann_RTE_VFB.pdf
99
100. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
The AUTOSAR Adaptive Platform for Connected and Autonomous
Vehicles, Simon Fürst, AUTOSAR Steering Committee 8th Vector
Congress 29-Nov-2016, Alte Stuttgarter Reithalle, Stuttgart,
Germany
https://vector.com/congress/files/presentations/VeCo16_06_29Nov_Re
ithalle_Fuerst_BMW.pdf
A Review of Embedded Automotive Protocols, Nicolas Navet1,
Françoise Simonot-Lion2 April 14, 2008
https://www.realtimeatwork.com/wp-
content/uploads/chapter4_CRC_2008.pdf
100