ECU State Manager Module Development and Design for Automotive Platform Software Based on AUTOSAR 4.0



Similar documents
AUTOSAR Software Architecture

User-friendly Configuration of AUTOSAR ECUs with Specialized Software Tools

Development of AUTOSAR Software Components within Model-Based Design

Safety and Security Features in AUTOSAR

Safety and security related features in AUTOSAR

Product Information Services for Embedded Software

Do AUTOSAR and functional safety rule each other out?

Standardized software components will help in mastering the. software should be developed for FlexRay were presented at

Software Development for Multiple OEMs Using Tool Configured Middleware for CAN Communication

Plug and Play Solution for AUTOSAR Software Components

AUTOSAR Configuration Process - How to handle 1000s of parameters

Seminar Automotive Open Systems Architecture

Deeply Embedded Real-Time Hypervisors for the Automotive Domain Dr. Gary Morgan, ETAS/ESC

etpu Host Interface by:

Embedded OS. Product Information

In-Vehicle Networking

isolar Integrated Solution for AUTOSAR

Chapter 6, The Operating System Machine Level

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

CycurHSM An Automotive-qualified Software Stack for Hardware Security Modules

Migrating Application Code from ARM Cortex-M4 to Cortex-M7 Processors

LIN (Local Interconnect Network):

Chapter 12. Development Tools for Microcontroller Applications

System Software and TinyAUTOSAR

AUTOSAR Runtime Environment and Virtual Function Bus

Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas

Simple and error-free startup of the communication cluster. as well as high system stability over long service life are

RealTime Implementation of RTOS based Vehicle Tracking System

Advanced Electronic Platform Technologies Supporting Development of Complicated Vehicle Control Software

Automotive Software Engineering

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

Safety compliance. Energy management. System architecture advisory services. Diagnostics. Network topologies. Physical and functional partitioning

Configuration management in AUTOSAR

Microtronics technologies Mobile:

Customer Experience. Silicon. Support & Professional Eng. Services. Freescale Provided SW & Solutions

Mastering increasing product complexity with Collaborative Systems Engineering and PLM

Freescale Semiconductor, I

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

AutoSAR Overview. FESA Workshop at KTH Prof. Jakob Axelsson Volvo Cars and Mälardalen University

DESIGN AND IMPLEMENTATION OF ONLINE PATIENT MONITORING SYSTEM

Architectures and Platforms

Intecs S.p.A. AUTOSAR Conformance Testing: an overview

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

Medical Device Design: Shorten Prototype and Deployment Time with NI Tools. NI Technical Symposium 2008

Software Production. Industrialized integration and validation of TargetLink models for series production

Proposal for a Vehicle Tracking System (VTS)

PIE. Internal Structure

Intel Dialogic System Release 6.1 CompactPCI for Windows

ATV Data Link Simulator: A Development based on a CCSDS Layers Framework

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

An Introduction to MPLAB Integrated Development Environment

Introduction to RACE FUELS Hans-Christian von der Wense Munich, Germany

Introduction to Embedded Systems. Software Update Problem

CGI-based applications for distributed embedded systems for monitoring temperature and humidity

EHOOKS Prototyping is Rapid Again

Full and Para Virtualization

Vehicular On-board Security: EVITA Project

Rapid System Prototyping with FPGAs

Applying Use Cases to Microcontroller Code Development. Chris Gilbert Cypress Semiconductor

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Universal Flash Storage: Mobilize Your Data

Software Real Time Clock Implementation on MC9S08LG32

Safe Automotive software architecture (SAFE) WP3 Deliverable D3.6.b: Safety Code Generator Specification

7a. System-on-chip design and prototyping platforms

Application Note: AN00141 xcore-xa - Application Development

Freescale Leadership in Driving Standards. Customer Relationships. Long-term Global Presence. Broadest Automotive MCU Product Portfolio

EVITA-Project.org: E-Safety Vehicle Intrusion Protected Applications

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

Operating Systems. Lecture 03. February 11, 2013

Local Interconnect Network Training. Local Interconnect Network Training. Overview

Enhanced Project Management for Embedded C/C++ Programming using Software Components

PCI Express Overview. And, by the way, they need to do it in less time.

Bus Data Acquisition and Remote Monitoring System Using Gsm & Can

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Validating Diagnostics in Early Development Stages

A new approach to automotive electric/electronic engineering life-cycle management

Candle Plant process automation based on ABB 800xA Distributed Control Systems

Mentor Embedded Automotive Solutions

Alice. Software as a Service(SaaS) Delivery Platform. innovation is simplicity

Real Time Programming: Concepts

AUTOSAR Safety Solutions for Multicore ECUs and ADAS Systems. Robert Leibinger 5 th June 2015

Hardware-independent Software Development

Automotive Software Engineering at Hella KGaA. Software Engineering for Software Intensive Systems,

Hardware Virtualization for Pre-Silicon Software Development in Automotive Electronics

Internet of things (IOT) applications covering industrial domain. Dev Bhattacharya


Nios II Software Developer s Handbook

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Embedding Trust into Cars Secure Software Delivery and Installation

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Raghavendra Reddy D 1, G Kumara Swamy 2

I can make just such ones if I had tools, and I could make tools if I had tools. -Eli Whitney

Design of Remote data acquisition system based on Internet of Things

Selection Criteria for ZigBee Development Kits

AN1754 APPLICATION NOTE

Technical Training Module ( 30 Days)

AN4664 Application note

AUTOSAR Seminar WS2008/ Assignment: Simulation of Automotive Systems in the Context of AUTOSAR

Embedded Software development Process and Tools:

Transcription:

ECU State Manager Module Development and Design for Automotive Platform Software Based on AUTOSAR 4.0 Dhanamjayan P.R. 1, Kuruvilla Jose 2, Manjusree S. 3 1 PG Scholar, Embedded Systems, 2 Specialist, Automotive Electronics, 3 Assistant Professor. Department of Electronics Sree Buddha College of Engineering, Kerala, India, 2 Transportation Business Unit Tata Elxsi Ltd, Kerala, India 1 dhanamjayan.pr@gmail.com 3 manjusree.s1@gmail.com Abstract As the number of vehicles is increasing day by day, the infrastructure requirements associated with vehicles are also become complex. Hence the count of ECU used in vehicles, in order to satisfy these requirements are growing. As a result complexity increases. The complexity of ECU can be reduced to a great extend by using a standardized architecture. Hence AUTOSAR (AUTomotive Open System Architecture) came into existence and got much popularity in the automotive domain. AUTOSAR is an open and standardized platform for automotive software. By using AUTOSAR standardization, scalability, increased quality and safety of E/E systems can be achieved. EcuM (ECU State Manager) implements the Ecu state management in AUTOSAR platform. EcuM is module present in system services layer of AUTOSAR. EcuM is responsible for initialization and de-initialization of OS and other basic software modules. It also manages all the wakeup events associated with ECU. This paper focuses on the design and development of EcuM module based on AUTOSAR 4.0. Index Terms :API, AUTOSAR, ECU, EcuM. I. INTRODUCTION The AUTOSAR is an open and standardized layered automotive software architecture jointly developed by automobile manufacturers, suppliers and tool developers. The scope of AUTOSAR includes all the vehicle domains. For attaining software reusability with shorter development life cycle requires new software architecture. AUTOSAR is used as a standardized infrastructure for automotive application software development. Different ECU manufacturers uses their own software for ECUs. Hence the software associated with it is not standardized. In vehicles a large number of ECU are used for implementing different applications. If the ECU software is not standardized it becomes almost impossible to integrate the ECU to complex vehicle network infrastructure. Then it becomes costlier and complex. Inorder to overcome these, AUTOSAR architecture is widely accepted in automotive domains. It gives increased flexibility and scalability to transfer and integrate functions, cost optimization of scalable systems, flexibility for product modification and updates, improved reliability and quality of E/E systems. The rest of the paper is organized as follows. Software architecture is explained in section II. The different phases of ECU state manager is discussed in Section III. Section IV describes about the high and low design. The configuration is explained in Section V. the implementation and testing methods are illustrated in Section VI. Experimental results are presented in section VII. Concluding remarks are given in section VIII. II. SOFTWARE ARCHITECTURE AUTOSAR layered architecture describes hierarchical structure of software with relation and mapping of software layers with basic software modules. This architecture gives strong interaction between application software and underlying hardware components like sensors, actuators and microcontroller hardware. Fig 1(a) shows the AUTOSAR architecture that distinguishes on the highest abstraction layer between three software layers. The three software layers are Application layer, Runtime Environment (RTE) and Basic Software which runs on a microcontroller. The upper layer is the Application layer which consists of application software components which are linked through an abstract component, named the virtual function bus. The application software components are the smallest pieces that have individual functionality. The middle layer is the RTE, the layer providing communication services to the application software. The lower layer is the Basic Software layer that consists of functional group corresponding to system, memory and communication services. The Basic Software (BSW) layer in the AUTOSAR is further divided into layers: Services, ECU Abstraction, 230

Microcontroller Abstraction and Complex Drivers as in Fig.1.(b). Layer. It also contains drivers for external devices. The main task of this layer is to make higher software layers independent of ECU hardware layout. The Complex Drivers Layer spans from the hardware to the RTE. Its main task is to provide the possibility to integrate special purpose functionality like drivers for devices. The Services Layer is the highest layer of the Basic Software which provides basic services for applications and basic software modules. The RTE is a layer providing communication services to the application software. The main task of RTE is to make AUTOSAR software components independent from mapping to a specific ECU. The AUTOSAR Software Components communicate with other components (inter and/or intra ECU) and/or services via the RTE. (a) III. ECU STATE MANAGER The ECU State Manager (EcuM) module is a basic software module that manages common aspects of ECU states. EcuM is present in the system services layer of AUTOSAR architecture. Specifically, the ECU Manager module initializes and de-initializes the OS, the BSW Scheduler (SchM) and the Basic Software Mode Manager (BswM) as well as some basic software driver modules. ECU Manager module configures the ECU for SLEEP and SHUTDOWN when requested and manages all wakeup events on the ECU. The ECU Manager module provides the wakeup validation protocol to distinguish real wakeup events from erratic ones. The ECU Manager module have different phases of operation: STARTUP, UP, SLEEP, SHUTDOWN and OFF phases. (b) Fig 1(a)AUTOSAR layered architecture. (b) AUTOSAR layered architecture with BSW description The Basic software layers are further divided into functional groups. System services, memory and communication are examples of different services. The lowest software layer of Basic software (BSW) is the Microcontroller Abstraction Layer. It contains internal drivers, which are software modules with direct access to the internal peripherals and microcontroller. It s task is to make higher software layers independent on microcontroller. The drivers of Microcontroller Abstraction Layer are interfaced by the ECU Abstraction A. STARTUP Phase The purpose of the STARTUP phase is to initialize the basic software modules to the point where Generic Mode Management facilities are operational. ECU Manager module takes control of the ECU startup procedure. Startup process is done by executing a set of sequence before starting the OS (StartPreOS Sequence) and another set of sequence after starting the OS (StartPostOS Sequence). StartPreOS Sequence includes setting programmable interrupt priorities, initializing BSW modules, checking configuration consistency, setting default shutdown target and then starting the OS. StartPostOS sequence includes initializing BSW Scheduler i.e., Initializing the semaphores for critical sections used by BSW modules and initializing BSW Mode Manager. B UP Phase In the UP Phase, the EcuM_MainFunction is executed regularly and its major functions are to check if wakeup sources have woken up and to initiate wakeup validation, if necessary and to update the Alarm Clock timer. Wakeup source are not only handled during wakeup but continuously, in parallel to all other EcuM activities. This functionality runs 231

in the EcuM_MainFunction fully decoupled from the rest of ECU management. C SLEEP Phase The ECU saves energy in the SLEEP phase. Typically, no code is executed but power is still supplied, and if configured accordingly, the ECU is wakeable in this state. The ECU Manager module provides a configurable set of (hardware) sleep modes which typically are a tradeoff between power consumption and time to restart the ECU. The ECU Manager module wakes the ECU up in response to intended or unintended wakeup events (e.g. EVM spike on CAN line). Since unintended wakeup events should be ignored, the ECU Manager module provides a protocol to validate wakeup events. The protocol specifies a cooperative process between the driver which handles the wakeup source and the ECU Manager V. CONFIGURATION The configuration of EcuM module is done by using the configuration tool ezyconfig. The routing table is configured during the post build time and the parameters corresponding to minimum routing is configured at link time. This kind of tools are developed by AUTOSAR stack supplier.. In order to build AUTOSAR-compliant software for an ECU, the developer has to depend on configuration tools, since manual configuration is time consuming. Moreover each OEM would be having a specific requirement that needs to be achieved. These requirements can be achieved by extending the standard AUTOSAR specification like adding vendor specific modules, containers, parameters etc. D SHUTDOWN Phase The SHUTDOWN phase handles the controlled shutdown of basic software modules and finally results in the selected shutdown target OFF or RESET. E OFF Phase The ECU enters the OFF state when it is powered down. The ECU may be wakeable in this state but only for wakeup sources with integrated power control. In any case the ECU must be startable (e.g. by reset events). IV. DESIGN The ECU Manager Module provides a set of APIs (Application programming Interfaces) that are to be realized for EcuM functionality. Design of EcuM consists of mainly two phases. They are High Level Design (HLD) and Low Level Design (LLD). High Level Design gives the overall system design in terms of functional architecture and the overview of system development. The Low Level Design gives the design of the actual program code which is designed based on High Level design. It defines the internal logic of the corresponding module. HLD and LLD are done by using the design tool Enterprise Architect version 9.3. Enterprise Architect supports a number of methods of modeling business processes using UML as the foundation modeling language. Fig 2. High Level Design of EcuM A High Level Design of EcuM The High Level Design of EcuM is shown in Fig 2. B Low Level Design of EcuM Low level design is done by drawing the activity diagram/ flow chart of APIs realized by Ecu Manager module. It defines the internal logic of the APIs. The flow chart for some of the APIs that are realized is shown in Fig 3. 232

any error. Fig. 5 shows the snap shot of code build in Visual C++ 2010 express edition. Fig 3 Flow Chart of EcuM_Shutdown() VI. IMPLLEMENTATION AND TESTING The development of DCM is done by coding all the APIs realized by it. Coding is done using 'C' Language. The file structure for the development consists of header files and code files (source files). The ECU Manager module has a well defined code file structure which is shown in Fig. 4. It includes the header file and configuration file required for EcuM. The EcuM module implementation shall provide a file named EcuM.h which contains fix type declarations, forward declarations to generated types, and function prototypes. The ECU Manager module implementation shall provide a EcuM_Generated_Types.h file which contains generated type declarations that fulfill the forward declarations in EcuM.h. It also provides a EcuM_Cfg.h file which contains the configuration parameters. EcuM_Cbk.h file contains the callback/callout function prototypes required for EcuM module. SchM_EcuM.h and MemMap.h are included in ECU Manager module implementation. MemMap.h makes it possible to map the code and the data of the ECU Manager module into specific memory sections. The ECU Manager module shall include the Dem.h file contains the API and Event Id symbol definitions required to report errors. The file EcuM_Types.h shall include Rte_EcuM_Type.h to include the types which are common used by BSW Modules and Software Components. EcuM_Types.h and EcuM.h shall only contain types, that are not already defined in Rte_EcuM_Type.h. The coding was done in C by using Visual C++ 2010 express edition. It is successfully compiled and build without Fig 4. Code File Structure of EcuM Module Fig 5 Snap shot of code build in visual C++ 2010 express edition Testing is done inorder to verify the correctness of module implementation. First module testing is done and then integrated testing has to be carried out. The goal of unit testing is to isolate each part of the program and show that the 233

individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. Unit testing finds problems early in the development cycle. This includes both bugs in the programmer's implementation and flaws or missing parts of the specification for the unit. The unit testing of EcuM can be done by individually validating the API s associated with it. Visual C++ is used for EcuM module testing. Testing application has been written for the module testing. Once all the individual units are created and tested, integration testing is started by combining those Unit Tested modules. The main function or goal of Integration testing is to test the interfaces between the units/modules. The individual modules are first tested in isolation. Once the modules are unit tested, they are integrated one by one, till all the modules are integrated, to check the combinational behavior, and validate whether the requirements are implemented correctly or not. Validation platform used for integration testing is MPC5668G Evaluation board. International Journal of Technical Research and Applications e-issn: 2320-8163, VII. RESULTS The APIs(Application Programming Interface) associated with EcuM module is developed. Using the tool Enterprise Architect version 9.3 High Level Design (HLD) and Low Level Design (LLD) are done. The C code is written in Notepad++ and compiled using Diab compiler. The testing is done with the help of visual C++ 2010 express edition. A Unit Testing Results In the unit testing each of the Application Programming Interfaces(API) are tested by written test application C codes. By successfully running the test application API can be validated. After the successful testing of each APIs it can be bulid as a library file. Fig. 6. Shows build output (EcuM.lib) using the diab compiler. The library file is called by all other modules that requires the functionality of EcuM. Fig 6 Build output of EcuM from diab B Integration Testing Results After the creation of EcuM.lib file we have compiled the whole AUTOSAR source by integrating EcuM.lib with other software modules in the AUTOSAR. The successful compilation and building has generated an executable elf file. The screen shot of the AUTOSAR source compilation and elf file generation is shown in Fig. 7 The generated elf file is flashed to MPC5668G Board using Trace32 software. Fig. 8 shows the picture of MPC5668G evaluation board Through Interactive Generator block, message is send from CANoe to MPC5668G Board and this message can be viewed in Trace window of Vector CANoe. The successful communication between CANoe and MPC5668G evaluation board shows that integrating testing is a success. Fig 7 Integrated build output in diab compiler 234

[3] AUTOSAR Partnership, AUTOSAR_Technical OverviewV4.2.0R4.0Rev3.[Online]. Available. http://www.autosar.org/download/r4.0/autosar_tech nicaloverview.pdf 2011. [4] AUTOSAR, Technical Overview, V1.2.1, R4.0, Rev3.[Online] Available. http://www.autosar.org/, 2008. [5] ezyconfig manual,tata Elxsi Limited,November, 2009 [6] MPC5668G Microcontroller, Reference Manual Doc. No. MPC5668XRM Rev.2, Freescale Semiconductor, September, 2008. Fig 8 MPC5668G Evaluation board VIII. CONCLUSION As the development in automotive industry is in a rapid phase, a standardized architecture is necessary for ECU s in the vehicles to reduce complexity and to increase safety. Thus AUTOSAR architecture is now widely used as a standardized architecture in automotive industry because of its peculiar features. The Ecu State Manager (EcuM) module present inside the services layer of AUTOSAR architecture is being realized. All the APIs (Application Programming Interfaces) of EcuM module is developed. Based on the requirements and specifications the High Level Design and Low Level Design is done using the tool Enterprise Architect version 9.3. The module is then tested using Unit testing and Integrated testing. Unit testing is done by creating sample application in Microsoft Visual C++ for functional validation of APIs. Integration testing is done with the help of MPC5668G evaluation board and result was verified by transmitting and receiving messages between the MPC5668G board and Vector CANoe tool. REFERENCES [1] AUTOSAR, Specification ECU State Manager V4.2.0 R4.0 Rev 3, 2011. [Online]. Available. http://www.autosar.org/, 2011. [2] AUTOSAR, Release 4.0 Overview and Revision History V1.2.1 Release 4.0 Rev 3, 2012.[Online]. Available.http://www.autosar.org/, 2012. 235