logo资料库

AUTOSAR_SWS_CANTransceiverDriver.pdf

第1页 / 共84页
第2页 / 共84页
第3页 / 共84页
第4页 / 共84页
第5页 / 共84页
第6页 / 共84页
第7页 / 共84页
第8页 / 共84页
资料共84页,剩余部分请下载后查看
1 Introduction
1.1 Goal of CAN Transceiver Driver
1.2 Explicitly uncovered CAN transceiver functionality
1.3 Single wire CAN transceivers according SAE J2411
2 Acronyms and abbreviations
3 Related documentation
3.1 Input documents
3.2 Related standards and norms
3.3 Related specification
4 Constraints and assumptions
4.1 Limitations
4.2 Applicability to car domains
5 Dependencies to other modules
5.1 File structure
5.1.1 Code file structure
6 Requirements Traceability
7 Functional specification
7.1 CAN transceiver driver operation modes
7.1.1 Operation mode switching
7.2 CAN transceiver hardware operation modes
7.2.1 Example for temporary “Go-To-Sleep” mode
7.2.2 Example for “PowerOn/ListenOnly” mode
7.3 CAN transceiver wake up types
7.4 Enabling/Disabling wakeup notification
7.5 CAN transceiver wake up modes
7.6 Error classification
7.6.1 Development Errors
7.6.2 Runtime Errors
7.6.3 Transient Faults
7.6.4 Production Errors
7.6.5 Extended Production Errors
7.7 Preconditions for driver initialization
7.8 Instance concept
7.9 Wait states
7.10 Transceivers with selective wakeup functionality
8 API specification
8.1 Imported types
8.2 Type definitions
8.3 Function definitions
8.3.1 CanTrcv_Init
8.3.2 CanTrcv_SetOpMode
8.3.3 CanTrcv_GetOpMode
8.3.4 CanTrcv_GetBusWuReason
8.3.5 CanTrcv_VersionInfo
8.3.6 CanTrcv_ SetWakeupMode
8.3.7 CanTrcv_GetTrcvSystemData
8.3.8 CanTrcv_ClearTrcvWufFlag
8.3.9 CanTrcv_ReadTrcvTimeoutFlag
8.3.10 CanTrcv_ClearTrcvTimeoutFlag
8.3.11 CanTrcv_ReadTrcvSilenceFlag
8.3.12 CanTrcv_CheckWakeup
8.3.13 CanTrcv_SetPNActivationState
8.3.14 CanTrcv_CheckWakeFlag
8.3.15 CanTrcv_DeInit
8.4 Scheduled functions
8.4.1 CanTrcv_MainFunction
8.4.2 CanTrcv_MainFunctionDiagnostics
8.5 Call-back notifications
8.6 Expected Interfaces
8.6.1 Mandatory Interfaces
8.6.2 Optional Interfaces
8.6.3 Configurable interfaces
9 Sequence diagram
9.1 Wake up with valid validation
9.2 Interaction with DIO module
9.3 De-Initialization (SPI Synchronous)
9.4 De-Initialization (SPI Asynchronous)
10 Configuration specification
10.1 How to read this chapter
10.2 Containers and configuration parameters
10.2.1 CanTrcv
10.2.2 CanTrcvGeneral
10.2.3 CanTrcvConfigSet
10.2.4 CanTrcvChannel
10.2.5 CanTrcvAccess
10.2.6 CanTrcvDioAccess
10.2.7 CanTrcvDioChannelAccess
10.2.8 CanTrcvSpiAccess
10.2.9 CanTrcvSpiSequence
10.2.10 CanTrcvDemEventParameterRefs
10.2.11 CanTrcvPartialNetwork
10.2.12 CanTrcvPnFrameDataMaskSpec
10.3 Published Information
11 Not applicable requirements
Document Title Specification of CAN Transceiver Driver AUTOSAR CP R20-11 Specification of CAN Trans- ceiver Driver Document Owner Document Responsibility Document Identification No AUTOSAR AUTOSAR 71 Document Status published Part of AUTOSAR Standard Classic Platform Part of Standard Release R21-11 Document Change History Date 2021-11-25 R21-11 AUTOSAR Release Changed by Change Description  Updated state machine behavior for Release Management CanTrcv_Init  Editorial changes 2020-11-30 R20-11 AUTOSAR  Modeling of Development Errors, Release Management Runtime Errors, and Transient Faults.  SOME/IP transformation props miss- ing is added.  Clean up of APIs with return type void, that specify a return value.  CanTrcv Operation Mode Inconsist- encies corrected. 2019-11-28 R19-11 AUTOSAR  Sequence diagram De-Initialization Release Management (SPI Synchronous) and De- Initialization (SPI Asynchronous) split into different pages.  Minor correction in CanTrcv initializa- tion functionality.  Changed Document Status from Fi- nal to published 2018-10-31 4.4.0 AUTOSAR  Removed DET reporting behavior for Release Management the APIs CanTrcv_MainFunctionDiagnostics and CanTrcv_MainFunction during un-initialized state. 1 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 Date 2017-12-08 Document Change History Release Changed by Change Description 4.3.1 AUTOSAR  CanTrcv_DeInit API added in state Release Management machine diagram  Editorial changes 'Runtime errors' 2016-11-30 4.3.0 AUTOSAR Re- lease Man- agement added  Added CanTrcv_DeInit API  Sequence diagram updated  CanTrcvGetVersionInfo renamed to CanTrcvVersionInfoApi  Updated Configuration class for con- figuration parameters  Minor corrections in the MainFunc- tion periods 2014-10-31 4.2.1 AUTOSAR  Revised the configuration of CAN Release Management Transceiver.  Minor corrections in wait state func- tionality.  Clarification regarding the wakeup sources. 2014-03-31 4.1.3 AUTOSAR  Revised configuration for SPI inter- Release Management face.  Revised naming convention for transceiver driver 2013-10-31 4.1.2 AUTOSAR  Removed 'Timing' row from sched- Release Management 2013-03-15 4.1.1 AUTOSAR Administration uled functions API table.  Editorial changes  Removed chapter(s) on change doc- umentation  Updated sequence diagrams  Reworked according to the new SWS_BSWGeneral 2 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Date 2011-12-22 Specification of CAN Transceiver Driver AUTOSAR CP R20-11 Document Change History Release Changed by Change Description 4.0.3 AUTOSAR Administration  Added support for Partial Networking  Implemented Production error con- cept  Updated Baud rate configuration pa- rameter handling  Added support to detect that power- on was caused by CAN communica- tion  Reentrancy attribute is corrected for APIs  Corrections in few requirements  Optional Interfaces Table is correct- ed 2009-12-18 4.0.1 AUTOSAR  CanTrcv state names changed and Administration state diagram modified  Usage of SBCs are no longer re- stricted  Mode switch requests to the current mode are allowed  CanTrvc driver has to invoke CanIf_TrcvModeIndication after each mode switch request, when the re- quested mode has been reached 2010-02-02 3.1.4 AUTOSAR  Wakeup event reporting: In R4.0, Administration CanTrcv stores wakeup events. CanIf invokes function CanTrcv_CheckWakeup() periodical- ly to check for wakeup events.  Wakeup modes: In R4.0, wakeup through interrupt mechanism is not supported. Only POLLING and NOT_SUPPORTED wakeup modes are available in CanTrcv.  Sleep Wait Count added: Wait count for transitioning into sleep mode (CanTrcvSleepWaitCount) added.  Legal disclaimer revised 2008-08-13 3.1.1 AUTOSAR  Legal disclaimer revised Administration 3 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 Document Change History Date 2007-12-21 Release Changed by Change Description 3.0.1 AUTOSAR  Changed API name Administration CanIf_TrcvWakeupByBus to CanIf_SetWakeupEvent  New error code CANTRCV_E_PARAM_TRCV_WAK EUP_MODE has been added.  Output parameter in the API’s CanTrcv_GetOpMode, CanTrcv_GetBusWuReason and CanTrcv_GetVersionInfo is changed to pointer type.  API CanTrcv_CB_WakeupByBus has been modified  Document meta information extend- ed  Small layout adaptations made  CAN transceiver driver is below CAN interface. All API access from higher layers are routed through CAN inter- face.  One CAN transceiver driver used per CAN transceiver hardware type. For different CAN transceiver hardware types different CAN transceiver driv- ers are used. One CAN transceiver driver supports all CAN transceiver hardware of same type  Legal disclaimer revised  Release Notes added   “Advice for users” revised “Revision Information” added  Initial release 2007-01-24 2.1.15 AUTOSAR Administration 2006-05-16 2.0 AUTOSAR Administration 4 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 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 intellectual 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. It has neither been developed, nor tested for non-automotive applications. The word AUTOSAR and the AUTOSAR logo are registered trademarks. 5 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 Table of Content 1 Introduction ............................................................................................................. 8 1.1 Goal of CAN Transceiver Driver ...................................................................... 9 1.2 Explicitly uncovered CAN transceiver functionality ......................................... 9 1.3 Single wire CAN transceivers according SAE J2411 ...................................... 9 2 Acronyms and abbreviations................................................................................ 10 3 Related documentation ........................................................................................ 11 3.1 Input documents ............................................................................................. 11 3.2 Related standards and norms ........................................................................ 11 3.3 Related specification ...................................................................................... 11 4 Constraints and assumptions ............................................................................... 12 4.1 Limitations ...................................................................................................... 12 4.2 Applicability to car domains ........................................................................... 12 5 Dependencies to other modules .......................................................................... 13 5.1 File structure .................................................................................................. 13 5.1.1 Code file structure ................................................................................... 13 6 Requirements Traceability ................................................................................... 14 7 Functional specification ........................................................................................ 22 7.1 CAN transceiver driver operation modes ....................................................... 22 7.1.1 Operation mode switching ....................................................................... 23 7.2 CAN transceiver hardware operation modes ................................................ 24 7.2.1 Example for temporary “Go-To-Sleep” mode ......................................... 24 7.2.2 Example for “PowerOn/ListenOnly” mode .............................................. 24 7.3 CAN transceiver wake up types ..................................................................... 24 7.4 Enabling/Disabling wakeup notification ......................................................... 25 7.5 CAN transceiver wake up modes .................................................................. 25 7.6 Error classification .......................................................................................... 26 7.6.1 Development Errors ................................................................................ 26 7.6.2 Runtime Errors ........................................................................................ 27 7.6.3 Transient Faults ....................................................................................... 27 7.6.4 Production Errors .................................................................................... 27 7.6.5 Extended Production Errors .................................................................... 27 7.7 Preconditions for driver initialization .............................................................. 28 7.8 Instance concept ............................................................................................ 28 7.9 Wait states ..................................................................................................... 28 Transceivers with selective wakeup functionality ..................................... 28 7.10 8 API specification ................................................................................................... 30 8.1 Imported types ............................................................................................... 30 8.2 Type definitions .............................................................................................. 30 8.3 Function definitions ........................................................................................ 33 8.3.1 CanTrcv_Init ............................................................................................ 33 8.3.2 CanTrcv_SetOpMode ............................................................................. 34 8.3.3 CanTrcv_GetOpMode ............................................................................. 37 8.3.4 CanTrcv_GetBusWuReason ................................................................... 38 6 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 8.3.5 CanTrcv_VersionInfo............................................................................... 39 8.3.6 CanTrcv_ SetWakeupMode .................................................................... 40 8.3.7 CanTrcv_GetTrcvSystemData ................................................................ 41 8.3.8 CanTrcv_ClearTrcvWufFlag .................................................................... 43 8.3.9 CanTrcv_ReadTrcvTimeoutFlag ............................................................. 44 8.3.10 CanTrcv_ClearTrcvTimeoutFlag ......................................................... 45 8.3.11 CanTrcv_ReadTrcvSilenceFlag ........................................................... 46 8.3.12 CanTrcv_CheckWakeup ...................................................................... 47 8.3.13 CanTrcv_SetPNActivationState ........................................................... 47 8.3.14 CanTrcv_CheckWakeFlag ................................................................... 48 8.3.15 CanTrcv_DeInit .................................................................................... 49 8.4 Scheduled functions ....................................................................................... 50 8.4.1 CanTrcv_MainFunction ........................................................................... 50 8.4.2 CanTrcv_MainFunctionDiagnostics ........................................................ 51 8.5 Call-back notifications .................................................................................... 52 8.6 Expected Interfaces ....................................................................................... 52 8.6.1 Mandatory Interfaces............................................................................... 52 8.6.2 Optional Interfaces .................................................................................. 52 8.6.3 Configurable interfaces ........................................................................... 54 9 Sequence diagram ............................................................................................... 55 9.1 Wake up with valid validation ......................................................................... 55 9.2 Interaction with DIO module .......................................................................... 56 9.3 De-Initialization (SPI Synchronous) ............................................................... 58 9.4 De-Initialization (SPI Asynchronous) ............................................................. 60 10 Configuration specification ............................................................................... 62 10.1 10.2 How to read this chapter ........................................................................... 62 Containers and configuration parameters ................................................ 63 10.2.1 CanTrcv ................................................................................................ 63 10.2.2 CanTrcvGeneral ................................................................................... 63 10.2.3 CanTrcvConfigSet ................................................................................ 67 10.2.4 CanTrcvChannel .................................................................................. 68 10.2.5 CanTrcvAccess .................................................................................... 75 10.2.6 CanTrcvDioAccess .............................................................................. 75 10.2.7 CanTrcvDioChannelAccess ................................................................. 75 10.2.8 CanTrcvSpiAccess ............................................................................... 76 10.2.9 CanTrcvSpiSequence .......................................................................... 77 10.2.10 CanTrcvDemEventParameterRefs ...................................................... 78 10.2.11 CanTrcvPartialNetwork ........................................................................ 79 10.2.12 CanTrcvPnFrameDataMaskSpec ........................................................ 82 Published Information ............................................................................... 83 10.3 11 Not applicable requirements ............................................................................ 84 7 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
Specification of CAN Transceiver Driver AUTOSAR CP R20-11 1 Introduction This specification describes the functionality, APIs and configuration of CAN Trans- ceiver Driver module. The CAN Transceiver Driver module is responsible for handling the CAN transceiver hardware chips on an ECU. The CAN Transceiver is a hardware device, which adapts the signal levels that are used on the CAN bus to the logical (digital) signal levels recognised by a microcon- troller. In addition, the transceivers are able to detect electrical malfunctions like wiring is- sues, ground offsets or transmission of long dominant signals. Depending on the in- terfacing with the microcontroller, they flag the detected error summarized by a single port pin or very detailed by SPI. Some transceivers support power supply control and wake up via the CAN bus. Dif- ferent wake up/sleep and power supply concepts are usual on the market. Within the automotive environment, there are mainly three different CAN bus physics used. These are ISO11898 for high-speed CAN (up to 1Mbits/s), ISO11519 for low- speed CAN (up to 125Kbits/s) and SAE J2411 for single-wire CAN. Latest developments include System Basis Chips (SBCs) where power supply con- trol and advanced watchdogs are implemented in addition to CAN. These are en- closed in one housing and controlled through single interface (e.g. via SPI). 8 of 84 Document ID 71: AUTOSAR_SWS_CANTransceiverDriver
分享到:
收藏