18. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
SWC Types
Application software component
is an atomic software component that carries out an application or part of it. It can use
ALL AUTOSAR communication mechanisms and services
Sensoractuator software component
is an atomic SWC that handles the specifics of sensors or actuators. It directly interacts
with the ecu-abstraction.
Parameter software component
Atomic SWC
it provides parameter values. They can be fixed data, const or variable. It allows access
to fixed data or calibration data
They don’t have an internal behavior
They only have PPorts of Parameter Interfce type
Need to be on the same ECU as the SWCs accessing them since a parameter SWC
represents the memory containing the calibration parameter
18
19. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
SWC Types
Service software component
provides services specified by AUTOSAR through interfaces specified by AUTOSAR. This component may
interact directly with modules from BSW
Represents the different BSW Module services in the VFB view
Complex driver software component
it generalizes the ECUAbstraction component. It can define ports to interact with components in specific
ways and can also directly interact with BSW modules
Complex device drivers can use BSW services
Complex device drivers exist to fulfill certain needs:
Implementing a complex application that cannot be otherwise implemented due to the AUTOSAR BSW layered
architecture
Timing critical applications
Non-AUTOSAR applications within AUTOSAR ECU
Nvblock software component
it allows SWCs to access NV data
It represents the Nvmanager from BSW layer
19
23. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Runnable Entities 23
Atomic SWC
Each Atomic Software Component consists of at
least one Runnable Entity that executes code.
A Runnable Entity serves to structure the
Software Component's functionality.
Each Runnable Entity can be scheduled or triggered
individually and independently from other Runnable
Entities.
Each Runnable Entity should be triggered by at
least one Event.
Runnable Entities are implemented by
C-functions
Runnable
26. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Events
Events trigger Runnable Entities.
These elements will then be referenced within the XML denition of
the Runnable Entity.
These events can be from different types:
AsynchronousServerCallReturnsEvent:
The event is raised when an asynchronous server call is finished.
DataSendCompletedEvent:
This event is raised when the referenced data element have been sent or
an error occurs.
DataReceivedEvent:
This event is raised when the referenced data elements are
received
26
Atomic SWC
Runnable
event
27. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Events
DataReceiveErrorEvent:
This event is raised by the RTE when the communication layer detects and
notifies an error concerning the reception of the referenced data element.
OperationInvokedEvent:
The OperationInvokedEvent references the operation invoked by the client.
TimingEvent:
A TimingEvent references the Runnable Entity that needs to be started in responseto the
TimingEvent.
ModeSwitchEvent:
ModeTypes can be used in order to transmit status information. such
that ECUs can then start or disable services. Consequently whenever a Mode is entered
or exited a Runnable Entity must be started
27
30. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Exclusive Areas
The RTE provides a mechanism to synchronize the access to Exclusive Areas.
Exclusive areas are critical sections and lead to preemption-avoidance if a
Runnable Entity enters or exits it.
An Exclusive Area ensures the atomically access to a resource. This can be
indicated by using the following two API functions:
void Rte_Enter_<name> ();
void Rte_Exit_<name> ();
This simply is indicated by the following XMLcode
<EXCLUSIVE-AREA>
<SHORT-NAME> name </SHORTNAME>
</EXCLUSIVE-AREA>
Now, all Runnable Entities within this Internal Behaviour have the ability to
use this Exclusive Area
30
Atomic SWC
Runnable A
event
Runnable B
Exclusive
Area
Atomic SWC
Runnable A
event
Runnable B
Exclusive
Area
Atomic SWC
Runnable A
event
Runnable B
Exclusive
Area
Atomic SWC
Runnable A
event
Runnable B
Exclusive
Area
31. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Ports
These ports are used to connect the SWC to other
instances.
The most basic type of ports are the sender and
receiver ports.
These are used to provide means of data transmission
between
different SWCs, or between the SWC and the RTE.
Another common type of port interface is the
Client/Server.
These ports are used when the SWC needs to use a
function (in the application layer these are known as
runnables) contained within another SWC or a function
of a BSW module.
31
40. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Example1 (power) using Arc core studio and
SystemDesk
The application consists of one SWC called Power which has two RPorts and
one Pport
The two RPorts are called RpCurrent and RpVoltage, and the PPort is called
PpPower. RpCurrent, RpVoltage, and PpPower ports are all assigned to
sender-receiver interfaces if_current, if_voltage and if_power
respectively.
The SWC also contains a parameter which is used for calibration called
GainFactor.
The implementation of the SWC is the multiplication of the values of the
signals current, voltage and calibration parameter GainFactor.
The data signals Current and Voltage are received via CAN communication
and Power is sent on the CAN signal.
The calibration of the parameter GainFactor is done through the MC tool
which is discussed in section 5.5.2 Testing with setup -2.
40
41. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
To model SWC in Arctic Studio, ARtext SWCD language is used.
Modeling SWC includes:
data model development where the data types and interfaces are
defined,
Atomic SWCs definition where the ports corresponding to the
application are assigned,
modeling the internal behaviour of atomic SWCs,
and specifying mapping sets.
41Example1 (power) using Arc core studio and
SystemDesk
44. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Next step is to design the actual implementation for
the defined SWC.
Every application SWC must contain internal behaviour
which describes the RTE aspects of a component that
is the calibration parameters, data type mappings, kind
of access to the data access to the data elements,
runnable entities, and the events they respond to.
A calibration parameter has to be defined in the
enclosing internal behaviour.
a calibration parameter GainFactor is defined and a
runnable Get_Power.
The Get_Power runnable entity contains the
information about the type of data access to the data
element of its ports and a timing event which triggers
the runnable every 0.01s.
44Example1 (power) using Arc core studio and
SystemDesk
Internal behavior
event
Runnable
Get_power
Event
GetPower_timin
gEvent
SWC Power
51. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Basic Software Configuration
In BSW configuration, different BSW modules
used will be configured. Though there are
different modules, some of the modules are
dependent on the other, thus, the order in which
the BSW modules are configured is important. For
example, when configuring CAN cluster, CAN
driver needs to be configured first, then the CAN
interface module in order to provide
communication to the upper modules like PDU
router and COM modules.
51Example1 (power) using Arc core
studio and SystemDesk
Used BSW Modules
54. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Port Configuration
To initialise required ports and configure its port direction, slew rate,
and port modes, a port driver module is used. As the aim here is to
achieve CAN communication, the CAN ports on the MCU must be
configured. Apart from CAN ports GIO ports were also initialized.
the Port direction is set as IN for receiving and OUT for sending port.
Port is set to CAN mode on initialization. It is important to enter the
right Pin Id as this value will be assigned to the symbolic name derived
from the port pin container short name. The Pin Id for CAN_TX port
is 89 and CAN_RX port is 90, this information can be accessed from
the datasheet of TMS570LS1227
54Example1 (power) using Arc core studio and
SystemDesk
64. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
OS Configuration:
OS module can be considered as the heart of all BSW modules and it
is closely linked to the RTE module. OS configuration involves
configuring OS Events, OS Alarms, OS Task and OS Application. OS
Event configuration involves adding the only event in the system;
GetPower_TimeEvent a timing event which was configured during SWC
modeling. This event will activate the RTE Task. To activate the timing
event, an alarm dedicated to this event has to be configured.
OsAlarm10ms was created to trigger the GetPower_TimeEvent every
10ms
64Example1 (power) using Arc core studio and
SystemDesk
68. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
Example1 (power) using Arc core studio and
SystemDesk
The second task configured for our system was OsStartupTask, which
runs once and initializes some of the BSW modules. The code for
OsStartupTask is as shown below. The PowerUser configured in the
EcuM configuration is set to run and some of the BSW modules which
are used in the system are initialized by the function
EcuM_StartupTwo().
68
OS Configuration:
71. 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
71
73. 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
73
76. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
AUTOSAR – An open standardized software architecture for the
automotive industry Simon Fürst, BMW 1st AUTOSAR Open
Conference & 8th AUTOSAR Premium Member Conference October
23rd, 2008, Cobo Center, Detroit, MI, USA
http://st.inf.tu-
dresden.de/files/teaching/ws08/ase/03_AUTOSAR_Tutorial.pdf
Institutionen för systemteknik Department of Electrical Engineering
Examensarbete Implementation of CAN Communication Stack in
AUTOSAR Examensarbete utfört i Datorteknik
vid Tekniska högskolan vid Linköpings universitet Av Johan Alexandersson
och Olle Nordin
http://liu.diva-portal.org/smash/get/diva2:822343/FULLTEXT01.pdf
76
78. 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
78
79. 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
79
80. https://www.facebook.com/groups/embedded.system.KS/
Follow us
Press
here
#LEARN_IN DEPTH
#Be_professional_in
embedded_system
References
AUTOSAR Adaptive Platform
https://vector.com/conference_india/files/presentations/Day1/3_AUTOSA
R%20Adaptive%20Platform.pdf
Configuring the RTE - ARC Core
http://dev.arccore.com/public/user-doc/UD441x/Configuring-the-
RTE_9503283.html
How to create an application model in Arctic Studio
https://www.youtube.com/watch?v=3Ts0V8EepIU
Increasing efficiency in ECU function development for Battery
Management Systems SHIVARAM SINGH RAJPUT
https://kth.diva-portal.org/smash/get/diva2:1091139/FULLTEXT01.pdf
80