What is AUTOSAR?
Prerequisites:
Reader reading this and using AUTOSAR must have knowledge of Embedded Systems, C programming, layered Architecture, knowledge of communication protocols like CAN, I2C, etc. AUTOSAR is advanced stage of Embedded Systems so reader is expected to have knowledge of terms given above.
AUTOSAR stands for
Automotive
Open
System
ARchitecture which is a consortium of companies like
BMW Group,
BOSCH,
Continental,
Daimler,
Ford,
General Motors,
PSA Group,
Toyota, and
VOLKSWAGEN.These are the core members of the AUTOSAR partnership who founded AUTOSAR. There are different types of memberships by which a entity can contribute to AUTOSAR development those are
Core members, Premium Members, Development Members. I have listed above the Core members but there are many premium members who are engaged in tool development, service providers,etc. AUTOSAR aims to standardize the software development of the ECUs used in automotive applications.
AUTOSAR has implemented a
layered architecture similar to OSI model. It has different layers to handle and abstract different operations of code. AUTOSAR is used for micro controllers which targets applications mostly in automotive space which utilizes CAN, Flex Ray, Ethernet etc. Although AUTOSAR is targeted for automotive applications, but it is not limited to automotive it can be used in industrial applications also. Being used in applications based on micro controllers it is developed with a view to use least memory possible as micro controllers have resource constraints.
Fig. Simplified AUTOSAR layered Architecture
Above image is a simplified AUTOSAR layered architecture. Its called simplified because there are also deep layers in each block which are hidden as this is AUTOSAR introduction. I will brief below about layers:
- Application Layer: This layer has the application code which resides in top. It can have different application blocks called as Software Component(SWC) for each feature which the ECU needs to support according to application.
- AUTOSAR RTE: This is one of the important layers of AUTOSAR as it provides communication between different SWCs and also between ECUs. Application layer uses this layer while communicating with other layers below.
- Services Layer: This layer provides different services for application to use. Services like: System Services, Memory Services, Crypto Services, Off board communication services, Communication services.
- ECU Abstraction Layer: This layer provides ECU related abstractions. It contains different abstracted layers like I/O Hardware Abstraction layer, On board device abstraction, Memory hardware Abstraction, Crypto hardware abstraction, etc.
- MCAL: This is Micro Controller Abstraction Layer it has drivers using which the above layers communicates with Micro controller hardware peripherals.
What is the need of AUTOSAR?
Embedded systems is a vast field having n number of Semiconductor manufacturers, hardware and software platforms which can be selected based on application requirements. Due to such varieties the development effort is tough and the portability of code is hard which further increases the development cost. From automotive point of view the vehicle is a complex machine which consists of n number of small embedded systems called Electronic control Unit(ECUs) so maintenance and development of code for such controllers is not a easy task. Further complexity is increased if different ECUs use different MCUs for decreasing cost, then each ECU will have different software as hardware platforms will be different and they also need to be developed to follow custom created standard to communicate with other ECUs. This is the conventional way of writing software which is very hard to maintain and very less chance of code portability or reuse ability. A automobile has n number of parts which are manufactured by different companies called Tier 1 companies which supplies the parts to OEMs like BMW, Volkswagen, etc. Today all mechanical parts are becoming intelligent by adding ECU in them to increase control and efficiency. So those ECUs also need to have a common way of communication to communicate with the ECU of OEM for this again a custom standard needs to be implemented and maintained. Hence a standardized software development infrastructure was needed to solve this problem and AUTOSAR solves this very well.
AUTOSAR uses a layered architecture which has different layers dedicated to perform different operations and abstraction. The application code is fully portable as AUTOSAR is designed in such a way that the application code is written independent of the hardware so the same application code can run on different hardware platforms. AUTOSAR has a layer dedicated to support hardware functionalities called MCAL (Micro controller abstraction) layer which has drivers based on hardware used. As AUTOSAR provides standard "way" of communication ECUs can communicate with each other without any need to maintain custom standard of communication. AUTOSAR has standard "ways" of communication which is common between ECUs utilizing AUTOSAR. AUTOSAR has abstraction of drivers of MCU so no need to write drivers of MCUs to use its peripherals.
Isn't this a limitation as AUTOSAR has all drivers and functionality implemented already?
Actually its not a limitation because in today's fast paced world there are strict deadlines which needs to be met for it one cannot put more time in development, so having drivers ready to use is a good feature. By using ready made drivers we can focus on application development instead of drivers development.
What if I am using a different device which I want to interface with ECU using AUTOSAR?
If you are using a device which is not supported by AUTOSAR, then you can use the
Complex Device Drivers for it. This layer gives you direct access to MCAL layer from application and you can directly interface the device with the ECU for which you have to develop the code.
Types of AUTOSAR:
There are two types of AUTOSAR named as Classic and Adaptive. The classic have all the modules which are generally needed for a application whereas the Adaptive can be configured and adapted according to application by removing unnecessary modules. Current Classic release version is 4.4.0 and current adaptive version is 19.03
I guess introduction of AUTOSAR is done till now. If you have any doubts or suggestions please let me know in comments.