Professional Documents
Culture Documents
Electronic Control Units (Ecus) : Part 1: in - Car Networking
Electronic Control Units (Ecus) : Part 1: in - Car Networking
ECU Power
Transceiver
Supply
ECU
Sensors
Actors
Sensor Core Actor
Drivers Drivers
(⇨ next slide)
Program Data
CPU
External Bus Memory Memory
DMA
Ports Interface to
other controllers
Interfaces
Interrupt
(CAN, serial, Serial Bus
Handler
JTAG, ...)
A/D
Timers System Ctrl.
Converter(s)
² 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
running
wait terminate
preempt
waiting suspended
start
release activate
ready
Activation
time or event based
Scheduler
Priority
Priority queue of ready tasks
Order
Dispatcher
² 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
² Latency
ª Time
difference
from
event
to
reacKon
² Jijer
ª Difference
of
max
and
min
latency
ª High
importance
in
feedback
control
systems
Start End
Execution Time
Task
Time
Latency (Response Time) Leeway
Activation Deadline
Deadline
² Firm
deadline
ª Delivering
result
afer
firm
deadline
useless
-1
(no
benefit)
ª e.g.,
incoming
traffic
bulleKn
⇨
SatNav
powered
up
² 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,
…)
Application
OSEK COM
Bus
² 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”)
configured
at
OSEK_Example_OS
compile
Kme
{
MICROCONTROLLER = Intel80x86;
…
ª OSEK
ImplementaKon
};
Language
(OIL)
§ Scheduling
strategy
TASK Sample_TASK
§ Task
prioriKes
{
PRIORITY = 12;
§ …
SCHEDULE = FULL;
AUTOSTART = TRUE;
ACTIVATION = 1;
};
…
};
Generator
os.c os.h
Compiler
*.obj
Linker
os.elf
² 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();
}
² 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
AUTOSAR RTE
ECU 1 ECU 2
Application Layer
Diagnostic
Communi-
Comm. Gateway
cation
Manager
XCP
Services Generic NM
CAN NM Protocol Data Unit Router
Complex Drivers
CAN XCP FlexRay NM
FlexRay XCP
FlexRay CAN
Transport Transport
Protocol Protocol
Microcontroller
² ECUs
ª Principles
ª Architecture
ª Real-‐Kme
properKes
(hard,
firm,
sof
deadlines)
² OSEK/VDX
ª MoKvaKon
ª StaKc
configuraKon
ª Scheduling
² AUTOSAR
ª MoKvaKon
ª Run
Time
Environment
ª Component
Principle