logo资料库

AUTOSAR_PRS_E2EProtocol.pdf

第1页 / 共121页
第2页 / 共121页
第3页 / 共121页
第4页 / 共121页
第5页 / 共121页
第6页 / 共121页
第7页 / 共121页
第8页 / 共121页
资料共121页,剩余部分请下载后查看
1 Introduction and functional overview
2 Acronyms and Abbreviations
3 Related documentation
3.1 Input documents & related standards and norms
3.2 Related specification
4 Constraints and assumptions
4.1 Limitations
4.2 Applicability to car domains
4.3 Background information concerning functional safety
4.3.1 Functional safety and communication
4.3.2 Sources of faults in E2E communication
4.3.2.1 Software faults
4.3.2.2 Random hardware faults
4.3.2.3 External influences, environmental stress
4.3.3 Communication faults
4.3.3.1 Repetition of information
4.3.3.2 Loss of information
4.3.3.3 Delay of information
4.3.3.4 Insertion of information
4.3.3.5 Masquerading
4.3.3.6 Incorrect addressing
4.3.3.7 Incorrect sequence of information
4.3.3.8 Corruption of information
4.3.3.9 Asymmetric information sent from a sender to multiple receivers
4.3.3.10 Information from a sender received by only a subset of the receivers
4.3.3.11 Blocking access to a communication channel
5 Functional specification
5.1 Overview of communication protection
5.2 Overview of E2E Profiles
5.2.1 Error detection
5.3 Specification of E2E Profile 1 (Only for CP)
5.3.1 Data Layout
5.3.2 Counter
5.3.3 Data ID
5.3.4 CRC calculation
5.3.5 Timeout detection
5.3.6 E2E Profile 1 variants
5.3.7 E2E_P01Protect
5.3.8 Calculate CRC
5.3.9 E2E_P01Check
5.3.10 E2E Profile 1 Protocol Examples
5.3.10.1 DataIDMode set to E2E_P01DATAID_ALT
5.3.10.2 DataIDMode set to E2E_P01DATAID_LOW
5.3.10.3 DataIDMode set to E2E_P01DATAID_NIBBLE
5.4 Specification of E2E Profile 2 (only for CP)
5.4.1 E2E_P02Protect
5.4.2 E2E_P02Check
5.5 Specification of E2E Profile 4
5.5.1 Data Layout
5.5.1.1 User data layout
5.5.1.2 Header layout
5.5.2 Counter
5.5.3 Length
5.5.4 CRC
5.5.5 Timeout detection
5.5.6 E2E Profile 4 variants
5.5.7 E2E_P04Protect
5.5.8 E2E_P04Check
5.6 Specification of E2E Profile 5
5.6.1 Data Layout
5.6.1.1 User data layout
5.6.1.2 Header layout
5.6.2 Counter
5.6.3 Data ID
5.6.4 Length
5.6.5 CRC
5.6.6 Timeout detection
5.6.7 E2E_P05Protect
5.6.8 E2E_P05Check
5.7 Specification of E2E Profile 6
5.7.1 Data Layout
5.7.1.1 User data layout
5.7.1.2 Header layout
5.7.2 Counter
5.7.3 Data ID
5.7.4 Length
5.7.5 CRC
5.7.6 Timeout detection
5.7.7 E2E_P06Protect
5.7.8 E2E_P06Check
5.8 Specification of E2E Profile 7
5.8.1 Data Layout
5.8.1.1 User data layout
5.8.1.2 Header layout
5.8.2 Counter
5.8.3 Data ID
5.8.4 Length
5.8.5 CRC
5.8.6 Timeout detection
5.8.7 E2E Profile 7 variants
5.8.8 E2E_P07Protect
5.8.9 E2E_P07Check
5.9 Specification of E2E Profile 11
5.9.1 Data Layout
5.9.1.1 User data layout
5.9.1.2 Header layout
5.9.2 Counter
5.9.3 Data ID
5.9.4 Length
5.9.5 CRC
5.9.6 Timeout detection
5.9.7 E2E_P11Protect
5.9.8 E2E_P11Check
5.10 Specification of E2E Profile 22
5.10.1 Data Layout
5.10.1.1 User data layout
5.10.1.2 Header layout
5.10.2 Counter
5.10.3 Data ID
5.10.4 Length
5.10.5 CRC
5.10.6 Timeout detection
5.10.7 E2E_P22Protect
5.10.8 E2E_P22Check
5.11 Specification of E2E state machine
5.11.1 Overview of the state machine
5.11.2 State machine specification
5.12 Basic Concepts of CRC Codes
5.12.1 Mathematical Description
5.12.2 Euclidian Algorithm for Binary Polynomials and Bit-Sequences
5.12.3 CRC calculation, Variations and Parameter
5.13 CRC Standard Parameters
5.13.1 8-bit CRC calculation
5.13.1.1 8-bit SAE J1850 CRC Calculation
5.13.1.2 8-bit 0x2F polynomial CRC Calculation
5.13.2 16-bit CRC calculation
5.13.2.1 16-bit CCITT-FALSE CRC16
5.13.3 32-bit CRC calculation
5.13.3.1 32-bit Ethernet CRC Calculation
5.13.3.2 32-bit 0xF4ACFB13 polynomial CRC calculation
5.13.4 64-bit CRC calculation
5.13.4.1 64-bit ECMA polynomial CRC calculation
6 E2E API specification
6.1 API of middleware to applications
6.2 API of E2E
7 Configuration Parameters
8 Protocol usage and guidelines
8.1 Periodic use of E2E check
8.2 Error handling
8.3 Maximal lengths of Data, communication buses
E2E Protocol Specification AUTOSAR FO Release 1.3.0 Document Title Document Owner E2E Protocol Specification AUTOSAR Document Responsibility AUTOSAR Document Identification No 849 Document Status Final Part of AUTOSAR Standard Foundation Part of Standard Release 1.3.0 Date Release Changed by Description Document Change History 2017-12-08 1.3.0 2017-10-27 1.2.0 AUTOSAR Release Management AUTOSAR Release Management • No content changes • Initial Release 1 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 Disclaimer This work (specification and/or software implementation) and the material contained in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the companies that have contributed to it shall not be liable for any use of the work. The material contained in this work is protected by copyright and other types of intel- lectual property rights. The commercial exploitation of the material contained in this work requires a license to such intellectual property rights. This work may be utilized or reproduced without any modification, in any form or by any means, for informational purposes only. For any other purpose, no part of the work may be utilized or reproduced, in any form or by any means, without permission in writing from the publisher. The work has been developed for automotive applications only. developed, nor tested for non-automotive applications. It has neither been The word AUTOSAR and the AUTOSAR logo are registered trademarks. 2 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 Table of Contents 1 Introduction and functional overview 2 Acronyms and Abbreviations 3 Related documentation 3.1 3.2 Input documents & related standards and norms . . . . . . . . . . . . Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Constraints and assumptions 4.1 4.2 4.3 4.3.3 4.3.2.1 4.3.2.2 4.3.2.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . Background information concerning functional safety . . . . . . . . . . Functional safety and communication . . . . . . . . . . . . . 4.3.1 4.3.2 Sources of faults in E2E communication . . . . . . . . . . . . Software faults . . . . . . . . . . . . . . . . . . . . . Random hardware faults . . . . . . . . . . . . . . . . External influences, environmental stress . . . . . . Communication faults . . . . . . . . . . . . . . . . . . . . . . Repetition of information . . . . . . . . . . . . . . . . Loss of information . . . . . . . . . . . . . . . . . . . Delay of information . . . . . . . . . . . . . . . . . . Insertion of information . . . . . . . . . . . . . . . . . Masquerading . . . . . . . . . . . . . . . . . . . . . . Incorrect addressing . . . . . . . . . . . . . . . . . . Incorrect sequence of information . . . . . . . . . . . Corruption of information . . . . . . . . . . . . . . . Asymmetric information sent from a sender to multi- ple receivers . . . . . . . . . . . . . . . . . . . . . . Information from a sender received by only a subset of the receivers . . . . . . . . . . . . . . . . . . . . . Blocking access to a communication channel . . . . 4.3.3.1 4.3.3.2 4.3.3.3 4.3.3.4 4.3.3.5 4.3.3.6 4.3.3.7 4.3.3.8 4.3.3.9 4.3.3.10 4.3.3.11 5 Functional specification 5.3 5.1 Overview of communication protection . . . . . . . . . . . . . . . . . . 5.2 Overview of E2E Profiles . . . . . . . . . . . . . . . . . . . . . . . . . Error detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Layout Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CRC calculation . . . . . . . . . . . . . . . . . . . . . . . . . Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . E2E Profile 1 variants . . . . . . . . . . . . . . . . . . . . . . E2E_P01Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Specification of E2E Profile 1 (Only for CP) 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 7 9 9 9 9 10 10 10 10 10 11 11 11 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 15 15 17 17 17 19 20 20 21 3 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 Data Layout 5.6.1.1 5.6.1.2 Data Layout 5.5.1.1 5.5.1.2 5.3.8 5.3.9 5.3.10 5.3.10.1 5.3.10.2 5.3.10.3 Calculate CRC . . . . . . . . . . . . . . . . . . . . . . . . . . E2E_P01Check . . . . . . . . . . . . . . . . . . . . . . . . . E2E Profile 1 Protocol Examples . . . . . . . . . . . . . . . . DataIDMode set to E2E_P01DATAID_ALT . . . . . . DataIDMode set to E2E_P01DATAID_LOW . . . . . DataIDMode set to E2E_P01DATAID_NIBBLE . . . . Specification of E2E Profile 2 (only for CP) . . . . . . . . . . . . . . . . 5.4.1 E2E_P02Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.2 E2E_P02Check . . . . . . . . . . . . . . . . . . . . . . . . . Specification of E2E Profile 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.1 . . . . . . . . . . . . . . . . . . . . User data layout Header layout . . . . . . . . . . . . . . . . . . . . . . Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.2 Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.3 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.4 Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . 5.5.5 E2E Profile 4 variants . . . . . . . . . . . . . . . . . . . . . . 5.5.6 E2E_P04Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.7 5.5.8 E2E_P04Check . . . . . . . . . . . . . . . . . . . . . . . . . Specification of E2E Profile 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 User data layout . . . . . . . . . . . . . . . . . . . . Header layout . . . . . . . . . . . . . . . . . . . . . . Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.2 Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.3 Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.4 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.5 Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . 5.6.6 E2E_P05Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.7 5.6.8 E2E_P05Check . . . . . . . . . . . . . . . . . . . . . . . . . Specification of E2E Profile 6 . . . . . . . . . . . . . . . . . . . . . . . 5.7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . User data layout . . . . . . . . . . . . . . . . . . . . Header layout . . . . . . . . . . . . . . . . . . . . . . Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.2 Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.3 Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.4 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.5 Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . 5.7.6 E2E_P06Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.7 5.7.8 E2E_P06Check . . . . . . . . . . . . . . . . . . . . . . . . . Specification of E2E Profile 7 . . . . . . . . . . . . . . . . . . . . . . . 5.8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . User data layout . . . . . . . . . . . . . . . . . . . . Header layout . . . . . . . . . . . . . . . . . . . . . . Data Layout 5.7.1.1 5.7.1.2 Data Layout 5.8.1.1 5.8.1.2 5.4 5.5 5.6 5.7 5.8 22 23 26 26 27 27 27 30 32 37 38 38 38 39 40 40 40 41 41 45 49 49 49 50 50 51 51 51 52 52 55 58 58 58 59 59 60 60 60 61 61 65 68 68 68 69 4 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 5.9 Data Layout 5.9.1.1 5.9.1.2 5.10.1.1 5.10.1.2 5.10.1 Data Layout 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.2 Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.3 Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.4 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.5 Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . 5.8.6 E2E Profile 7 variants . . . . . . . . . . . . . . . . . . . . . . 5.8.7 E2E_P07Protect . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.8 5.8.9 E2E_P07Check . . . . . . . . . . . . . . . . . . . . . . . . . Specification of E2E Profile 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.9.1 User data layout . . . . . . . . . . . . . . . . . . . . Header layout . . . . . . . . . . . . . . . . . . . . . . Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . E2E_P11Protect . . . . . . . . . . . . . . . . . . . . . . . . . E2E_P11Check . . . . . . . . . . . . . . . . . . . . . . . . . 5.10 Specification of E2E Profile 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User data layout . . . . . . . . . . . . . . . . . . . . Header layout . . . . . . . . . . . . . . . . . . . . . . Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Timeout detection . . . . . . . . . . . . . . . . . . . . . . . . E2E_P22Protect . . . . . . . . . . . . . . . . . . . . . . . . . E2E_P22Check . . . . . . . . . . . . . . . . . . . . . . . . . 69 70 70 70 71 71 71 75 79 80 80 80 82 82 83 83 84 84 87 91 91 91 92 92 93 93 93 94 94 97 5.11 Specification of E2E state machine . . . . . . . . . . . . . . . . . . . . 100 Overview of the state machine . . . . . . . . . . . . . . . . . 101 State machine specification . . . . . . . . . . . . . . . . . . . 101 5.12 Basic Concepts of CRC Codes . . . . . . . . . . . . . . . . . . . . . . 105 Mathematical Description . . . . . . . . . . . . . . . . . . . . 105 Euclidian Algorithm for Binary Polynomials and Bit-Sequences 108 CRC calculation, Variations and Parameter . . . . . . . . . . 109 5.13 CRC Standard Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 109 8-bit CRC calculation . . . . . . . . . . . . . . . . . . . . . . 111 8-bit SAE J1850 CRC Calculation . . . . . . . . . . . 111 8-bit 0x2F polynomial CRC Calculation . . . . . . . . 111 16-bit CRC calculation . . . . . . . . . . . . . . . . . . . . . . 112 16-bit CCITT-FALSE CRC16 . . . . . . . . . . . . . . 112 32-bit CRC calculation . . . . . . . . . . . . . . . . . . . . . . 113 32-bit Ethernet CRC Calculation . . . . . . . . . . . 113 32-bit 0xF4ACFB13 polynomial CRC calculation . . 114 5.10.2 5.10.3 5.10.4 5.10.5 5.10.6 5.10.7 5.10.8 5.13.2 5.13.3 5.11.1 5.11.2 5.12.1 5.12.2 5.12.3 5.13.1 5.13.1.1 5.13.1.2 5.13.2.1 5.13.3.1 5.13.3.2 5 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 5.13.4 6 E2E API specification 7 Configuration Parameters 5.13.4.1 64-bit CRC calculation . . . . . . . . . . . . . . . . . . . . . . 115 64-bit ECMA polynomial CRC calculation . . . . . . 115 116 API of middleware to applications . . . . . . . . . . . . . . . . . . . . . 116 API of E2E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 118 6.1 6.2 8 Protocol usage and guidelines 119 Periodic use of E2E check . . . . . . . . . . . . . . . . . . . . . . . . . 119 8.1 8.2 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 8.3 Maximal lengths of Data, communication buses . . . . . . . . . . . . . 120 6 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
E2E Protocol Specification AUTOSAR FO Release 1.3.0 1 Introduction and functional overview The concept of E2E communication protection assumes that safety-related data ex- change shal lbe protected at runtime against the effects of faults on the communica- tion link (see Figure 1.1). Faults detected between a sender and a receiver using E2E communication protection include systematic software faults, such as fauls that are introduced on the lower communication layers of sender or receiver, and random hard- ware faults introduced by the MCU hardware, communication peripherals, transceivers, communication lines or other communication infrastructure. The concept of E2E communication protection assumes that safety-related data ex- change shall be protected at runtime against the effects of faults within the commu- nication link (see Figure 1.1). Examples for such faults are random HW faults (e.g. corrupt registers of a CAN transceiver), interference (e.g. due to EMC), and systematic faults of the lower communication layers (e.g. RTE, IOC, COM and network stacks). Figure 1.1: Overview of E2E communication protection between a sender and a receiver By using E2E communication protection mechanisms, faults in lower software and hardware layers can be detected and handled at runtime. The E2E Supervision pro- vides mechanisms for E2E communication protection, adequate for safety-related com- munication having requirements up to ASIL D. The algorithms of protection mechanisms are implemented in the E2E Supervision. The callers of the E2E Supervision are responsible for the correct usage of the E2E 7 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL — ECU 2ECU 1SenderE2ECommunicationProtectionLower Communication LayersReceiverMCU HardwareCommunicationInfrastructureupper Communication LayersE2ECommunicationProtectionLower Communication LayersMCU Hardwareupper Communication Layers
E2E Protocol Specification AUTOSAR FO Release 1.3.0 Supervision, in particular for providing correct parameters the E2E Supervision rou- tines. The E2E communication protection allows the following: 1. It protects the safety-related data to be sent by adding control data, 2. It verifies the safety-related data received using this control data, and 3. It provides the check result to the receiver, which then has to handle it sufficiently. To provide the appropriate solution addressing flexibility and standardization, AUTOSAR specifies a set of flexible E2E profiles that implement an appropriate combi- nation of E2E communication protection mechanisms. Each specified E2E profile has a fixed set of mechanisms, as well as configuration options to configure the protocol header layout and status evaluation on the receiver side. The E2E Supervision can be invoked from communication middleware e.g. from Adaptive Platform’s ARA, Classic Platform’s RTE. It can be also invoked in a non- standardized way from other software, e.g. non-volatile memory managers, local IPCs, or intra-ECU bus stacks. Appropriate usage of the E2E Supervision to fulfill the specific safety requirements for communication depends on several aspects. The specified profiles are capable, to a high probability, of detecting a large variety of communication faults. However, the use of a specific E2E profile requires the user to demonstrate that the selected pro- file provides sufficient error detection capabilities for the considered use case (taking into account various contributing factors, such as hardware failure rates, bit error rates, number of nodes in the network, repetition rate of messages, the usage of a gateway, potential software faults on the communication channel), as well as appropriate reac- tion on detected faults (e.g. by revoking repeated messages, determining timed-out communication or reacting on corrupt messages by initiating a safety reaction). This specification specifies also the functionality, API and the configuration of the CRC routines. The following routines for CRC calculation are specified: • CRC8: SAEJ1850 • CRC8H2F: CRC8 0x2F polynomial • CRC16 • CRC32 • CRC32P4: CRC32 0x1F4ACFB13 polynomial • CRC64: CRC-64-ECMA For all routines (CRC8, CRC8H2F, CRC16, CRC32, CRC32P4 and CRC64), the fol- lowing calculation methods are possible: • Table based calculation: Fast execution, but larger code size (ROM table) 8 of 121 Document ID 849: AUTOSAR_PRS_E2EProtocol — AUTOSAR CONFIDENTIAL —
分享到:
收藏