Вы находитесь на странице: 1из 27
Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs)
Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs)
Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs)
Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs)

Part 1: In-Car Networking

ELECTRONIC CONTROL UNITS (ECUS)

Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs) 1
Part 1: In-Car Networking ELECTRONIC CONTROL UNITS (ECUS) [C2X] Summer 2014 Electronic Control Units (ECUs) 1

[C2X] Summer 2014

Electronic Control Units (ECUs)

1

!
!

Electronic Control Units (ECUs)

Current middle and upper class vehicles carry 80 Electronic Control Units (ECUs)

100 networked

Image: Mitsubishi Electric
Image: Mitsubishi Electric
Control Units (ECUs) 100 networked Image: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs) 2
Control Units (ECUs) 100 networked Image: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs) 2
Control Units (ECUs) 100 networked Image: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs) 2
Control Units (ECUs) 100 networked Image: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs) 2

[C2X] Summer 2014

Electronic Control Units (ECUs)

2

Sensors

Actors

Sensors Actors Architecture Communication, Diagnosis   ECU       Transceiver   Power

Architecture

Sensors Actors Architecture Communication, Diagnosis   ECU       Transceiver   Power
Sensors Actors Architecture Communication, Diagnosis   ECU       Transceiver   Power
Sensors Actors Architecture Communication, Diagnosis   ECU       Transceiver   Power

Communication, Diagnosis

 
 
 

ECU

 
ECU      
ECU      
   

Transceiver

 

Power

 

Supply

    Transceiver   Power   Supply     ECU   Sensor Core  
    Transceiver   Power   Supply     ECU   Sensor Core  
    ECU  
   

ECU     

    ECU  
 
    ECU  

Sensor

Core Sensor     Actor

   

Actor

Drivers Drivers

Drivers

Drivers Drivers

Drivers

Drivers Drivers
  ( ⇨ next slide)
 

(⇨ next slide) next slide)

  ( ⇨ next slide)
  ( ⇨ next slide)
Images: Mitsubishi Electric
Images: Mitsubishi Electric
Drivers   ( ⇨ next slide) Images: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs)
Drivers   ( ⇨ next slide) Images: Mitsubishi Electric [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

3

Architecture ²   ECU Core ª   ≜ Personal Computer ª   addiKonal external guard

Architecture

Architecture ²   ECU Core ª   ≜ Personal Computer ª   addiKonal external guard hardware
Architecture ²   ECU Core ª   ≜ Personal Computer ª   addiKonal external guard hardware
Architecture ²   ECU Core ª   ≜ Personal Computer ª   addiKonal external guard hardware

² ECU Core

ª Personal Computer ª addiKonal external guard hardware (e.g., watchdog) for safety criKcal applicaKons

hardware (e.g., watchdog) for safety criKcal applicaKons Image: Mitsubishi Electric I/O drivers watchdog
Image: Mitsubishi Electric I/O drivers watchdog Microcontroller ext. memory ext. memory (MCU) (⇨ next slide)
Image: Mitsubishi Electric
I/O drivers
watchdog
Microcontroller
ext. memory
ext. memory
(MCU)
(⇨ next slide)
address bus
ASIC
opt.
data bus
Co-Processors,
communication
DSPs,
diagnosis
[C2X] Summer 2014
Electronic Control Units (ECUs)
4
Architecture Program Data CPU Memory Memory External Bus DMA Sys. Timer Bus Ctrl. Bus Ctrl.

Architecture

Architecture Program Data CPU Memory Memory External Bus DMA Sys. Timer Bus Ctrl. Bus Ctrl. Ports
Architecture Program Data CPU Memory Memory External Bus DMA Sys. Timer Bus Ctrl. Bus Ctrl. Ports
Architecture Program Data CPU Memory Memory External Bus DMA Sys. Timer Bus Ctrl. Bus Ctrl. Ports
Program Data CPU Memory Memory External Bus DMA Sys. Timer Bus Ctrl. Bus Ctrl. Ports
Program
Data
CPU
Memory
Memory
External Bus
DMA
Sys. Timer
Bus Ctrl.
Bus Ctrl.
Ports
Interface to
other controllers
Interfaces
(CAN, serial,
Interrupt
Serial Bus
Handler
JTAG,
)
A/D
Timers
System Ctrl.
Converter(s)
[C2X] Summer 2014
Electronic Control Units (ECUs)
5
Architecture ²   Microcontroller (MCU) ª   8, 16, 32 Bit ª   Infineon, Freescale,

Architecture

Architecture ²   Microcontroller (MCU) ª   8, 16, 32 Bit ª   Infineon, Freescale, Fujitsu,
Architecture ²   Microcontroller (MCU) ª   8, 16, 32 Bit ª   Infineon, Freescale, Fujitsu,
Architecture ²   Microcontroller (MCU) ª   8, 16, 32 Bit ª   Infineon, Freescale, Fujitsu,

² Microcontroller (MCU)

ª 8, 16, 32 Bit ª Infineon, Freescale, Fujitsu,

² Memory

ª VolaKle memory

§SRAM (some kByte) §Typically integrated into microcontroller

ª Non-volaKle memory

§Flash (256 kByte

§Serial EEPROM (some kByte, e.g., for error log)

some MByte)

² Power supply

ª DC/DC converter, e.g., to 5 V or 3.3 V

²   Power supply ª   DC/DC converter, e.g., to 5 V or 3.3 V [C2X]
²   Power supply ª   DC/DC converter, e.g., to 5 V or 3.3 V [C2X]

[C2X] Summer 2014

Electronic Control Units (ECUs)

6

Architecture ²   Clock ª   Quartz Xtal, some 10 MHz ( ⇨ ECU requires

Architecture

Architecture ²   Clock ª   Quartz Xtal, some 10 MHz ( ⇨ ECU requires only
Architecture ²   Clock ª   Quartz Xtal, some 10 MHz ( ⇨ ECU requires only
Architecture ²   Clock ª   Quartz Xtal, some 10 MHz ( ⇨ ECU requires only

² Clock

ª Quartz Xtal, some 10 MHz ( ECU requires only passive cooling)

² External guard hardware

ª Watchdog

§Expects periodic signal from MCU §Resets MCU on Kmeout

ª ASIC guard

§For more complex / criKcal ECUs §ASIC sends quesKon, MCU must send correct answer before Kmeout §Resets (or disables) ECU on Kmeout or error

² Internal Buses

ª Low-cost ECUs can use shared bus for address and data ª Parallel

ECUs can use shared bus for address and data ª   Parallel [C2X] Summer 2014 Electronic
ECUs can use shared bus for address and data ª   Parallel [C2X] Summer 2014 Electronic

[C2X] Summer 2014

Electronic Control Units (ECUs)

7

Architecture ²   Sensor drivers ª   ResisKve sensors (e.g., simple potenKometer for length, angle)

Architecture

Architecture ²   Sensor drivers ª   ResisKve sensors (e.g., simple potenKometer for length, angle) ª
Architecture ²   Sensor drivers ª   ResisKve sensors (e.g., simple potenKometer for length, angle) ª
Architecture ²   Sensor drivers ª   ResisKve sensors (e.g., simple potenKometer for length, angle) ª

² Sensor drivers

ª ResisKve sensors (e.g., simple potenKometer for length, angle) ª CapaciKve, inducKve sensors (e.g., pressure, distance) ª AcKve sensors (simple voltage / complex data output)

² Actor drivers

ª D/A conversion ª High-power amplifiers ª Bridges

² Further requirements

ª Electro-magneKc interference (EMI) characterisKcs ª Mechanical robustness ª Water resistance ª Thermal resistance ª Chemical resistance

resistance ª   Thermal resistance ª   Chemical resistance [C2X] Summer 2014 Electronic Control Units (ECUs)
resistance ª   Thermal resistance ª   Chemical resistance [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

8

Automo;ve Opera;ng Systems ²   Hardware abstracKon ª   Ofen missing, hardware accessed directly ª

Automo;ve Opera;ng Systems

Automo;ve Opera;ng Systems ²   Hardware abstracKon ª   Ofen missing, hardware accessed directly ª  
Automo;ve Opera;ng Systems ²   Hardware abstracKon ª   Ofen missing, hardware accessed directly ª  
Automo;ve Opera;ng Systems ²   Hardware abstracKon ª   Ofen missing, hardware accessed directly ª  

² Hardware abstracKon

ª Ofen missing, hardware accessed directly ª Recent trends towards operaKng systems

² ApplicaKon Programming Interface (API)

ª Common for message transmission over external buses

² Sofware safeguards

ª E.g., stack overflow ª ParKcularly helpful during development

E.g., stack overflow ª   ParKcularly helpful during development [C2X] Summer 2014 Electronic Control Units (ECUs)
E.g., stack overflow ª   ParKcularly helpful during development [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

9

Automo;ve Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended

Automo;ve Opera;ng Systems

Automo;ve Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate
Automo;ve Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate
Automo;ve Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate

² Process States

running

Automo;ve Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate

start

Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate
Opera;ng Systems ²   Process States running start wait terminate preempt waiting release suspended activate

wait

terminate

preempt

waiting

Process States running start wait terminate preempt waiting release suspended activate ready [C2X] Summer 2014

release

suspended

start wait terminate preempt waiting release suspended activate ready [C2X] Summer 2014 Electronic Control Units

activate

start wait terminate preempt waiting release suspended activate ready [C2X] Summer 2014 Electronic Control Units (ECUs)

ready

start wait terminate preempt waiting release suspended activate ready [C2X] Summer 2014 Electronic Control Units (ECUs)
start wait terminate preempt waiting release suspended activate ready [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

10

Automo;ve Opera;ng Systems ²   Scheduling suspended Activation time or event based ready Scheduler Priority

Automo;ve Opera;ng Systems

Automo;ve Opera;ng Systems ²   Scheduling suspended Activation time or event based ready Scheduler Priority Order
Automo;ve Opera;ng Systems ²   Scheduling suspended Activation time or event based ready Scheduler Priority Order
Automo;ve Opera;ng Systems ²   Scheduling suspended Activation time or event based ready Scheduler Priority Order

² Scheduling

suspended

Automo;ve Opera;ng Systems ²   Scheduling suspended Activation time or event based ready Scheduler Priority Order

Activation time or event based

²   Scheduling suspended Activation time or event based ready Scheduler Priority Order Dispatcher running Set

ready

Scheduling suspended Activation time or event based ready Scheduler Priority Order Dispatcher running Set of suspended

Scheduler

suspended Activation time or event based ready Scheduler Priority Order Dispatcher running Set of suspended tasks

Priority

Activation time or event based ready Scheduler Priority Order Dispatcher running Set of suspended tasks Set

Order

time or event based ready Scheduler Priority Order Dispatcher running Set of suspended tasks Set of

Dispatcher

or event based ready Scheduler Priority Order Dispatcher running Set of suspended tasks Set of ready

running

Set of suspended tasks

Set of ready tasks

Priority queue of ready tasks

Task executed

tasks Set of ready tasks Priority queue of ready tasks Task executed [C2X] Summer 2014 Electronic
tasks Set of ready tasks Priority queue of ready tasks Task executed [C2X] Summer 2014 Electronic

[C2X] Summer 2014

Electronic Control Units (ECUs)

11

Automo;ve Opera;ng Systems ²   Scheduling ª   The act of assigning an order of

Automo;ve Opera;ng Systems

Automo;ve Opera;ng Systems ²   Scheduling ª   The act of assigning an order of acKvaKon,
Automo;ve Opera;ng Systems ²   Scheduling ª   The act of assigning an order of acKvaKon,
Automo;ve Opera;ng Systems ²   Scheduling ª   The act of assigning an order of acKvaKon,

² Scheduling

ª The act of assigning an order of acKvaKon, given a process model, acKvaKon sequence, and deadlines

§dynamic: Schedule is calculated at run Kme §sta*c: Schedule is fixed, e.g., at compile Kme (fully determinisKc)

ª Feasible schedule:

all Kme constraints fulfilled, no deadline violated ª Dispatcher coordinates context switches

² Context switches

ª For one process to change state to running , another process may need to be preempted ª CPU registers etc. will now be occupied by new process, operaKng system takes care of persisKng informaKon

by new process, operaKng system takes care of persisKng informaKon [C2X] Summer 2014 Electronic Control Units
by new process, operaKng system takes care of persisKng informaKon [C2X] Summer 2014 Electronic Control Units

[C2X] Summer 2014

Electronic Control Units (ECUs)

12

Real Time Proper;es ²   Latency ª   Time difference from event to reacKon ²

Real Time Proper;es

Real Time Proper;es ²   Latency ª   Time difference from event to reacKon ²  
Real Time Proper;es ²   Latency ª   Time difference from event to reacKon ²  
Real Time Proper;es ²   Latency ª   Time difference from event to reacKon ²  

² Latency

ª Time difference from event to reacKon

² Jijer

ª Difference of max and min latency ª High importance in feedback control systems

² ExecuKon Kme

ª Time difference of task start and end ª Worst Case ExecuKon Time (WCET)

§Defined for program aspects, dependent on plakorm §Considers every possible cause of delay (interrupts, caching, …) §Important for guaranteeing determinism

caching, …) §   Important for guaranteeing determinism [C2X] Summer 2014 Electronic Control Units (ECUs) 13
caching, …) §   Important for guaranteeing determinism [C2X] Summer 2014 Electronic Control Units (ECUs) 13

[C2X] Summer 2014

Electronic Control Units (ECUs)

13

Real Time Proper;es ²   Terminology of Real Time ProperKes Start End Execution Time Task

Real Time Proper;es

Real Time Proper;es ²   Terminology of Real Time ProperKes Start End Execution Time Task Time
Real Time Proper;es ²   Terminology of Real Time ProperKes Start End Execution Time Task Time
Real Time Proper;es ²   Terminology of Real Time ProperKes Start End Execution Time Task Time
²   Terminology of Real Time ProperKes Start End Execution Time Task Time Latency (Response
²   Terminology of Real Time ProperKes
Start
End
Execution Time
Task
Time
Latency (Response Time)
Leeway
Activation
Deadline
[C2X] Summer 2014
Electronic Control Units (ECUs)
14
Real Time Proper;es ²   Sof deadline Soft Firm Hard 1 0 -1 Deadline ª

Real Time Proper;es

Real Time Proper;es ²   Sof deadline Soft Firm Hard 1 0 -1 Deadline ª  
Real Time Proper;es ²   Sof deadline Soft Firm Hard 1 0 -1 Deadline ª  
Real Time Proper;es ²   Sof deadline Soft Firm Hard 1 0 -1 Deadline ª  

² Sof deadline

Soft Firm Hard 1 0 -1 Deadline
Soft
Firm
Hard
1
0
-1
Deadline

ª Delivering result afer sof deadline less helpful (reduced benefit) ª e.g., car speeds up radio gets louder

² Firm deadline

ª Delivering result afer firm deadline useless

(no benefit) ª e.g., incoming traffic bulleKn SatNav powered up

² Hard deadline

ª Delivering result afer hard deadline causes damage or harm (negaKve benefit) ª e.g., brake pedal is pushed car decelerates

benefit) ª   e.g., brake pedal is pushed ⇨ car decelerates [C2X] Summer 2014 Electronic Control
benefit) ª   e.g., brake pedal is pushed ⇨ car decelerates [C2X] Summer 2014 Electronic Control

[C2X] Summer 2014

Electronic Control Units (ECUs)

15

Real Time Proper;es ²   Real Kme systems ª   Internal image of system state

Real Time Proper;es

Real Time Proper;es ²   Real Kme systems ª   Internal image of system state in
Real Time Proper;es ²   Real Kme systems ª   Internal image of system state in
Real Time Proper;es ²   Real Kme systems ª   Internal image of system state in

² Real Kme systems

ª Internal image of system state in memory ª State described by set of variables ª Needs conKnuous update of image

² Real Kme architecture

ª Event triggered system

§Image update with every change of state

ª Time triggered system

§Image update in fixed intervals §internal or global clock (needs synchronizaKon)

intervals §   internal or global clock (needs synchronizaKon) [C2X] Summer 2014 Electronic Control Units (ECUs)
intervals §   internal or global clock (needs synchronizaKon) [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

16

OSEK/VDX ²   1993 ª   Founded as OSEK – “ Offene Systeme und deren

OSEK/VDX

OSEK/VDX ²   1993 ª   Founded as OSEK – “ Offene Systeme und deren Schni7stellen
OSEK/VDX ²   1993 ª   Founded as OSEK – “ Offene Systeme und deren Schni7stellen
OSEK/VDX ²   1993 ª   Founded as OSEK – “ Offene Systeme und deren Schni7stellen

² 1993

ª Founded as OSEK – “ Offene Systeme und deren Schni7stellen für die Elektronik im Kra>fahrzeug” ª BMW, Bosch, Daimler Chrysler, Opel, Siemens, VW, Univ. Karlsruhe

² 1994

ª Merged with VDX – “ Vehicle Distributed Execu*ve” ª PSA und Renault

² Today

ª More than 50 partners ª (Parts) standardized as ISO 17356 series ª Standardizes common communicaKons stack, network management, opera;ng system ( next slides), … ª Many free implementaKons ( freeOSEK , openOSEK, nxtOSEK, …)

Many free implementaKons ( freeOSEK , openOSEK , nxtOSEK , …) [C2X] Summer 2014 Electronic Control
Many free implementaKons ( freeOSEK , openOSEK , nxtOSEK , …) [C2X] Summer 2014 Electronic Control

[C2X] Summer 2014

Electronic Control Units (ECUs)

17

OSEK/VDX OSEK Operating System   Application     OSEK COM          

OSEK/VDX

OSEK/VDX OSEK Operating System   Application     OSEK COM          
OSEK/VDX OSEK Operating System   Application     OSEK COM          
OSEK/VDX OSEK Operating System   Application     OSEK COM          

OSEK Operating System

 

Application

 
 
 
 

OSEK COM

   
OSEK COM    
   
 
   
 
 

Interaction Layer

   

OSEK/VDX

    Interaction Layer     OSEK/VDX Network Management   Network Layer    
    Interaction Layer     OSEK/VDX Network Management   Network Layer    
Network
Network

Network

Management

Management

 

Network Layer

 
 
 
 
 
 
 
 

Data Link Layer

 
Management   Network Layer       Data Link Layer   Bus Communication Hardware Bus

Bus Communication Hardware

Bus

Bus

Data Link Layer   Bus Communication Hardware Bus [C2X] Summer 2014 Electronic Control Units (ECUs) 18
Data Link Layer   Bus Communication Hardware Bus [C2X] Summer 2014 Electronic Control Units (ECUs) 18

[C2X] Summer 2014

Electronic Control Units (ECUs)

18

OSEK/VDX ²   ProperKes ª   OperaKng system for single processor ª   StaKc configuraKon

OSEK/VDX

OSEK/VDX ²   ProperKes ª   OperaKng system for single processor ª   StaKc configuraKon §
OSEK/VDX ²   ProperKes ª   OperaKng system for single processor ª   StaKc configuraKon §
OSEK/VDX ²   ProperKes ª   OperaKng system for single processor ª   StaKc configuraKon §

² ProperKes

ª OperaKng system for single processor ª StaKc configuraKon

§Tasks §Resources §FuncKons

ª Can meet requirements of hard deadlines ª Programs execute directly from ROM ª Very low memory requirements ª Standardized system ( “OSEK conformant ECUs”)

ª   Standardized system ( ⇨ “OSEK conformant ECUs”) [C2X] Summer 2014 Electronic Control Units (ECUs)
ª   Standardized system ( ⇨ “OSEK conformant ECUs”) [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

19

OSEK/VDX ²   ConfiguraKon ª   OperaKng system configured at compile Kme ª   OSEK

OSEK/VDX

OSEK/VDX ²   ConfiguraKon ª   OperaKng system configured at compile Kme ª   OSEK ImplementaKon
OSEK/VDX ²   ConfiguraKon ª   OperaKng system configured at compile Kme ª   OSEK ImplementaKon
OSEK/VDX ²   ConfiguraKon ª   OperaKng system configured at compile Kme ª   OSEK ImplementaKon

² ConfiguraKon

ª OperaKng system configured at compile Kme

ª OSEK ImplementaKon Language (OIL)

§Scheduling strategy §Task prioriKes §

CPU OSEK_Demo

{

 

OSEK_Example_OS

{

MICROCONTROLLER = Intel80x86;

};

TASK Sample_TASK

{

PRIORITY = 12; SCHEDULE = FULL; AUTOSTART = TRUE; ACTIVATION = 1;

};

};

= FULL; AUTOSTART = TRUE; ACTIVATION = 1; }; … }; [C2X] Summer 2014 Electronic Control
= FULL; AUTOSTART = TRUE; ACTIVATION = 1; }; … }; [C2X] Summer 2014 Electronic Control

[C2X] Summer 2014

Electronic Control Units (ECUs)

20

OSEK/VDX ²   Building of OSEK/VDX firmware Configurator *.oil *.c *.h Generator os.c os.h Compiler

OSEK/VDX

OSEK/VDX ²   Building of OSEK/VDX firmware Configurator *.oil *.c *.h Generator os.c os.h Compiler *.obj
OSEK/VDX ²   Building of OSEK/VDX firmware Configurator *.oil *.c *.h Generator os.c os.h Compiler *.obj
OSEK/VDX ²   Building of OSEK/VDX firmware Configurator *.oil *.c *.h Generator os.c os.h Compiler *.obj

² Building of OSEK/VDX firmware

Configurator *.oil *.c *.h Generator os.c os.h Compiler *.obj Linker os.elf
Configurator
*.oil
*.c
*.h
Generator
os.c
os.h
Compiler
*.obj
Linker
os.elf
*.c *.h Generator os.c os.h Compiler *.obj Linker os.elf [C2X] Summer 2014 Electronic Control Units (ECUs)
*.c *.h Generator os.c os.h Compiler *.obj Linker os.elf [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

21

OSEK/VDX ²   Tasks ª   StaKc priority ª   RelaKonships of tasks §  

OSEK/VDX

OSEK/VDX ²   Tasks ª   StaKc priority ª   RelaKonships of tasks §   SynchronizaKon
OSEK/VDX ²   Tasks ª   StaKc priority ª   RelaKonships of tasks §   SynchronizaKon
OSEK/VDX ²   Tasks ª   StaKc priority ª   RelaKonships of tasks §   SynchronizaKon

² Tasks

ª StaKc priority ª RelaKonships of tasks

§SynchronizaKon §Message exchange §Signaling

ª Support for Kme triggered services ª Error management ª C macros for definiKon provided

DeclareTask(SampleTask);

TASK(SampleTask) { /* read sensors, trigger actors */ TerminateTask();

}

{ /* read sensors, trigger actors */ TerminateTask(); } [C2X] Summer 2014 Electronic Control Units (ECUs)
{ /* read sensors, trigger actors */ TerminateTask(); } [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

22

OSEK/VDX ²   Scheduling ª   Scheduler always chooses highest priority task ª   Configurable

OSEK/VDX

OSEK/VDX ²   Scheduling ª   Scheduler always chooses highest priority task ª   Configurable modes:
OSEK/VDX ²   Scheduling ª   Scheduler always chooses highest priority task ª   Configurable modes:
OSEK/VDX ²   Scheduling ª   Scheduler always chooses highest priority task ª   Configurable modes:

² Scheduling

ª Scheduler always chooses highest priority task ª Configurable modes:

§Non preempKve: Tasks are never preempted §PreempKve: Higher priority tasks always preempt lower priority tasks §Mixed: Individual configuraKon of each task

Priority
Priority

suspended

running

suspended

running

ready

running

suspended

suspended running ready running suspended preempted by higher priority task Task 2 Task 1 [C2X]

preempted by higher priority task

Task 2

Task 1

suspended preempted by higher priority task Task 2 Task 1 [C2X] Summer 2014 Electronic Control Units
suspended preempted by higher priority task Task 2 Task 1 [C2X] Summer 2014 Electronic Control Units

[C2X] Summer 2014

Electronic Control Units (ECUs)

23

AUTOSAR ²   TradiKonal paradigm: one funcKon ⇨ one ECU (incl. sofware and OS, supplied

AUTOSAR

AUTOSAR ²   TradiKonal paradigm: one funcKon ⇨ one ECU (incl. sofware and OS, supplied by
AUTOSAR ²   TradiKonal paradigm: one funcKon ⇨ one ECU (incl. sofware and OS, supplied by
AUTOSAR ²   TradiKonal paradigm: one funcKon ⇨ one ECU (incl. sofware and OS, supplied by

² TradiKonal paradigm:

one funcKon one ECU (incl. sofware and OS, supplied by OEM)

² AUTOSAR ( Automo*ve Open System Architecture) IniKaKve of automobile manufacturers to make sofware development independent of operaKng system

² Mix and match of hardware and sofware

ª IntegraKon at manufacturer ª In-house development of sofware at manufacturer ª Independence of/from OEM

of sofware at manufacturer ª   Independence of/from OEM [C2X] Summer 2014 Electronic Control Units (ECUs)
of sofware at manufacturer ª   Independence of/from OEM [C2X] Summer 2014 Electronic Control Units (ECUs)

[C2X] Summer 2014

Electronic Control Units (ECUs)

24

AUTOSAR ²   AUTOSAR RunKme Environment (RTE) ª   Middleware abstracKng away from lower layers

AUTOSAR

AUTOSAR ²   AUTOSAR RunKme Environment (RTE) ª   Middleware abstracKng away from lower layers ²
AUTOSAR ²   AUTOSAR RunKme Environment (RTE) ª   Middleware abstracKng away from lower layers ²
AUTOSAR ²   AUTOSAR RunKme Environment (RTE) ª   Middleware abstracKng away from lower layers ²

² AUTOSAR RunKme Environment (RTE)

ª Middleware abstracKng away from lower layers

² ApplicaKon Sofware Components

ª Rely on strict interfaces, independent of MCU, Sensors, Actors

Data

 

Data

 

Data

 

Data

 

Data

 

Data

Software

Software

Software

Software

Software

Software

 

AUTOSAR RTE

 

OS

Services

Comms

   

OS

Services

Comms

 
 

Hardware Abstraction

 

Hardware Abstraction

 
 
 
  Hardware Abstraction   Hardware Abstraction     ECU 1       ECU 2  
  Hardware Abstraction   Hardware Abstraction     ECU 1       ECU 2  
 

ECU 1

     

ECU 2

 
    ECU 1       ECU 2   [C2X] Summer 2014 Electronic Control Units
    ECU 1       ECU 2   [C2X] Summer 2014 Electronic Control Units

[C2X] Summer 2014

Electronic Control Units (ECUs)

25

AUTOSAR Application Layer AUTOSAR Runtime Environment Diagnostic Communi- Comm. Gateway cation Manager XCP

AUTOSAR

AUTOSAR Application Layer AUTOSAR Runtime Environment Diagnostic Communi- Comm. Gateway cation Manager XCP
AUTOSAR Application Layer AUTOSAR Runtime Environment Diagnostic Communi- Comm. Gateway cation Manager XCP
AUTOSAR Application Layer AUTOSAR Runtime Environment Diagnostic Communi- Comm. Gateway cation Manager XCP

Application Layer

AUTOSAR Runtime Environment

Diagnostic Communi- Comm. Gateway cation Manager XCP Services Generic NM CAN NM Protocol Data Unit
Diagnostic
Communi-
Comm.
Gateway
cation
Manager
XCP
Services
Generic NM
CAN NM
Protocol Data Unit Router
CAN XCP
FlexRay XCP
FlexRay NM
FlexRay
CAN
Transport
Transport
Protocol
Protocol
FlexRay
CAN
ECU
Abstraction Layer
Interface
Interface
FlexRay
CAN
Microcontroller
Abstraction Layer
Driver
Driver
Microcontroller
[C2X] Summer 2014
Electronic Control Units (ECUs)
26
Complex Drivers
Main Takeaways ²   ECUs ª   Principles ª   Architecture ª   Real-Kme properKes

Main Takeaways

Main Takeaways ²   ECUs ª   Principles ª   Architecture ª   Real-Kme properKes (hard,
Main Takeaways ²   ECUs ª   Principles ª   Architecture ª   Real-Kme properKes (hard,
Main Takeaways ²   ECUs ª   Principles ª   Architecture ª   Real-Kme properKes (hard,

² ECUs

ª Principles ª Architecture ª Real-Kme properKes (hard, firm, sof deadlines)

² OSEK/VDX

ª MoKvaKon ª StaKc configuraKon ª Scheduling

² AUTOSAR

ª MoKvaKon ª Run Time Environment ª Component Principle

MoKvaKon ª   Run Time Environment ª   Component Principle [C2X] Summer 2014 Electronic Control Units
MoKvaKon ª   Run Time Environment ª   Component Principle [C2X] Summer 2014 Electronic Control Units

[C2X] Summer 2014

Electronic Control Units (ECUs)

27