This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Documentation

#Documentation

BSW_RH850_FORD

Automotive Basic Software (BSW) modules for the Renesas RH850 microcontroller platform, tailored for Ford automotive requirements. This repository provides core AUTOSAR services, OS abstraction, CAN network management, cryptographic services, and tools for integration into automotive ECU projects.

Features

Project Structure (partial)

BSW/
  ├── Nm/         # AUTOSAR Network Management (Nm.c)
  ├── CanNm/      # CAN Network Management (CanNm.h)
  ├── CanSM/      # CAN State Manager (CanSM.h)
  ├── Os/         # OS abstraction types and error handling
  ├── Csm/        # Crypto Service Manager makefiles
Generators/
  ├── Rte/        # RTE datatype definitions and XSLT utilities
  ├── Diag_A2lGen/# Diagnostic generator and licensing

Note: Only a subset of files/folders is shown.
For the full structure, browse the repo.

Getting Started

Prerequisites

  • Hardware: Renesas RH850 microcontroller
  • Compiler: Compatible with automotive toolchains and AUTOSAR build systems
  • Build Tools: GNU Make, batch script support

Usage

  • Integrate the BSW modules with your automotive ECU application.
  • Use the Network Management stack for managing CAN communication between ECUs.
  • Use the OS abstraction for scheduling and error handling.
  • Use the CSM for cryptographic operations as per AUTOSAR requirements.

License

This project is provided for educational and research purposes or authorized automotive development.
Unless otherwise specified, the code is provided under the MIT License.
See LICENSE for details.

Disclaimer

Some files are provided “as is” and without warranty.
See module headers and delivery documentation for more information.


If you add new documentation, place it in the Doc/ or Generators/ directory and update this README.

Note: This summary is based on a partial file search and may not cover all modules in the repository. For the complete file list, browse the repo on GitHub.

1 - Documentation

Documentation

1.1 - BSWMD

BSWMD

1.2.1 - about

About

Copyright

Vector Informatik GmbH

1.2.2 - about

About

About This Content

June 2, 2006

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

1.2.3 - about

About

Copyright

Vector Informatik GmbH

1.2.4 - about

About

Copyright

Vector Informatik GmbH

1.2.5 - about

About

Copyright

Vector Informatik GmbH

1.2.6 - about

About

About This Content

September, 2015

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

Third Party Content

The Content includes items that have been sourced from third parties as set out below. If you did not receive this Content directly from the Eclipse Foundation, the following is provided for informational purposes only, and you should look to the Redistributor’s license for terms and conditions of use.

Ant 1.9.6

Information about what changed in Ant 1.9.6 from Ant 1.9.5 can be found in the 1.9.6 release notes.

Information about what changed in Ant 1.9.5 from Ant 1.9.4 can be found in the 1.9.5 release notes.

The plug-in includes software developed by The Apache Software Foundation as part of the Ant project.

The Ant binary code in ant.jar and the scripts ant, ant.bat, ant.cmd, antenv.cmd, antRun, antRun.bat, antRun.pl, complete-ant-cmd.pl, envset.cmd, lcp.bat, runant.pl, runant.py and runrc.cmd are included with the plug-in with no modifications.

Your use of the Ant code and the scripts is subject to the terms and conditions of the Apache License, Version 2.0. A copy of the license is contained in the file ASL-LICENSE-2.0.txt and is also available at http://www.apache.org/licenses/LICENSE-2.0.html.

The names "Ant" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org.

The Apache attribution NOTICE file is included with the Content in accordance with 4d of the Apache License, Version 2.0.

Ant includes the following software:

DOM

DOM is developed by the World Wide Web Consortium. Your use of DOM is subject to the terms and conditions of the license found in the file DOM-LICENSE.html which is included with this plug-in and can also be found at http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.

SAX

SAX is developed by the SAX project (http://www.saxproject.org). Your use of SAX is subject to the terms and conditions of the license found in the file SAX-LICENSE.html which is included with this plug-in.

1.2.7 - about

About

About This Content

June 5, 2006

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor’s license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

1.2.8 - about

About

About This Content

June 28, 2007

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

1.2.9 - about

About

About This Content

June 5, 2006

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor’s license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

1.2.10 - about

About

Copyright

Vector Informatik GmbH

1.2.11 - about

About

About This Content

February 6, 2015

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

Third Party Content

The Content includes items that have been sourced from third parties as set out below. If you did not receive this Content directly from the Eclipse Foundation, the following is provided for informational purposes only, and you should look to the Redistributor's license for terms and conditions of use.

The Content includes items that have been sourced from third parties as follows:

JUnit 4.12

The plug-in is accompanied by software developed by JUnit.org. The JUnit 4.12 code included with the plug-in includes no modifications. Your use of JUnit 4.12 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at http://www.eclipse.org/legal/cpl-v10.html. The binary code is located in junit.jar and the source code is located in source-bundle or in the org.junit.source bundle.
The original source and binaries are available from http://search.maven.org/#search|gav|1|g%3A%22junit%22%20AND%20a%3A%22junit%22, namely:
http://search.maven.org/remotecontent?filepath=junit/junit/4.12/junit-4.12-sources.jar
http://search.maven.org/remotecontent?filepath=junit/junit/4.12/junit-4.12.jar

1.2.12 - about

About

About This Content

June 28, 2007

License

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

Third Party Content

The Content includes items that have been sourced from third parties as set out below. If you did not receive this Content directly from the Eclipse Foundation, the following is provided for informational purposes only, and you should look to the Redistributor’s license for terms and conditions of use.

Flute 1.3

The plug-in is accompanied by software developed by W3C at http://www.w3.org/Style/CSS/SAC/. Flute 1.3 ("Flute") is included with the plug-in without modification in lib/flute.jar. Your use of Flute is subject to the terms and conditions of the W3C Software License ("W3CSL"). A copy of the W3CSL can be found in about_files/copyright-software-20021231.htm and is also available at http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231. Source code for Flute is available at http://www.w3.org/Style/CSS/SAC/.

1.2.13 - cpl-v10

Common Public License - v 1.0

Common Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

    a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
    b) in the case of each subsequent Contributor:
    i) changes to the Program, and
    ii) additions to the Program;
    where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

    a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
    b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
    c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
    d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

    a) it complies with the terms and conditions of this Agreement; and
    b) its license agreement:
    i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
    ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
    iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
    iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

    a) it must be made available under this Agreement; and
    b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

1.2.14 - DOM-LICENSE

DOM License

W3C Software Notice and License

This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.

License

By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.

Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:

  • The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
  • Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
  • Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)

Disclaimers

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.

The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.

Notes

This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

This formulation of W3C's notice and license became active on December 31 2002. This version removes the copyright ownership notice such that this license can be used with materials other than those owned by the W3C, reflects that ERCIM is now a host of the W3C, includes references to this specific dated version of the license, and removes the ambiguous grant of "use". Otherwise, this version is the same as the previous version and is written so as to preserve the Free Software Foundation's assessment of GPL compatibility and OSI's certification under the Open Source Definition.

1.2.15 - DVCfg_AutomationInterfaceDocumentation

DaVinci Configurator AutomationInterface Documentation

1.2.16 - DVCfg_AutomationInterfaceDocumentation_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
Page 26
Page 27
Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Page 41
Page 42
Page 43
Page 44
Page 45
Page 46
Page 47
Page 48
Page 49
Page 50
Page 51
Page 52
Page 53
Page 54
Page 55
Page 56
Page 57
Page 58
Page 59
Page 60
Page 61
Page 62
Page 63
Page 64
Page 65
Page 66
Page 67
Page 68
Page 69
Page 70
Page 71
Page 72
Page 73
Page 74
Page 75
Page 76
Page 77
Page 78
Page 79
Page 80
Page 81
Page 82
Page 83
Page 84
Page 85
Page 86
Page 87
Page 88
Page 89
Page 90
Page 91
Page 92
Page 93
Page 94
Page 95
Page 96
Page 97
Page 98
Page 99
Page 100
Page 101
Page 102
Page 103
Page 104
Page 105
Page 106
Page 107
Page 108
Page 109
Page 110
Page 111
Page 112
Page 113
Page 114
Page 115
Page 116
Page 117
Page 118
Page 119
Page 120
Page 121
Page 122
Page 123
Page 124
Page 125
Page 126
Page 127
Page 128
Page 129
Page 130
Page 131
Page 132
Page 133
Page 134
Page 135
Page 136
Page 137
Page 138
Page 139
Page 140
Page 141
Page 142
Page 143
Page 144
Page 145
Page 146
Page 147
Page 148
Page 149
Page 150
Page 151
Page 152
Page 153
Page 154
Page 155
Page 156
Page 157
Page 158
Page 159
Page 160
Page 161
Page 162
Page 163
Page 164
Page 165
Page 166
Page 167
Page 168
Page 169
Page 170
Page 171
Page 172
Page 173
Page 174
Page 175
Page 176
Page 177
Page 178
Page 179
Page 180
Page 181
Page 182
Page 183
Page 184
Page 185
Page 186
Page 187
Page 188
Page 189
Page 190
Page 191
Page 192
Page 193
Page 194
Page 195
Page 196
Page 197
Page 198
Page 199
Page 200
Page 201
Page 202
Page 203
Page 204
Page 205
Page 206
Page 207
Page 208
Page 209
Page 210
Page 211
Page 212
Page 213
Page 214
Page 215
Page 216
Page 217
Page 218
Page 219
Page 220
Page 221
Page 222
Page 223
Page 224
Page 225
Page 226
Page 227
Page 228
Page 229
Page 230
Page 231
Page 232
Page 233
Page 234
Page 235
Page 236
Page 237
Page 238
Page 239
Page 240
Page 241
Page 242
Page 243
Page 244
Page 245
Page 246
Page 247
Page 248
Page 249
Page 250

1.2.17 - DVCfg_AutomationInterfaceDocumentations

DaVinci Configurator AutomationInterface
Development Documentation of the AutomationInterface (AI)
DaVinci Configurator Team
July 19, 2017
© 2017
Vector Informatik GmbH
Ingersheimerstr. 24
70499 Stuttgart

Contents
1
Introduction
9
1.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.2
Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2
Getting started with Script Development
10
2.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.2
Automation Script Development Types . . . . . . . . . . . . . . . . . . . . . . . .
10
2.3
Script File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.4
Script Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.4.1
Script Project Development . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.4.2
Java JDK Setup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.4.3
IntelliJ IDEA Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
2.4.4
Gradle Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
3
AutomationInterface Architecture
17
3.1
Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
3.2
Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
3.2.1
Why Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
3.3
Script Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
3.3.1
Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
3.3.2
Script Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.3.3
Script Locations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.4
Script loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.4.1
Internal Script Reload Behavior . . . . . . . . . . . . . . . . . . . . . . . .
20
3.5
Script editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
3.6
Licensing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
3.7
Script Coding Conventions and Constraints . . . . . . . . . . . . . . . . . . . . .
21
3.7.1
Usage of static fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
3.7.2
Usage of Outer Closure Scope Variables . . . . . . . . . . . . . . . . . . .
23
3.7.3
States over script task execution . . . . . . . . . . . . . . . . . . . . . . .
23
3.7.4
Usage of Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
3.7.5
Usage of DaVinci Configurator private Classes Methods or Fields . . . . .
23
4
AutomationInterface API Reference
24
4.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
4.2
Script Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.2.1
Script Task Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.2.1.1
Script Creation with IDE Code Completion Support . . . . . . .
26
4.2.1.2
Script Task isExecutableIf . . . . . . . . . . . . . . . . . . . . . .
27
4.2.2
Description and Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
4.3
Script Task Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3.1
Available Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3.1.1
Application Types . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3.1.2
Project Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
4.3.1.3
UI Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
4.3.1.4
Generation Types . . . . . . . . . . . . . . . . . . . . . . . . . .
31
4.4
Script Task Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
© 2017, Vector Informatik GmbH
2 of 250


Contents
4.4.1
Execution Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
4.4.1.1
Code Block Arguments . . . . . . . . . . . . . . . . . . . . . . .
34
4.4.2
Task Execution Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
4.4.3
Script Path API during Execution . . . . . . . . . . . . . . . . . . . . . .
35
4.4.3.1
Path Resolution by Parent Folder
. . . . . . . . . . . . . . . . .
36
4.4.3.2
Path Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
4.4.3.3
Script Folder Path Resolution
. . . . . . . . . . . . . . . . . . .
37
4.4.3.4
Project Folder Path Resolution . . . . . . . . . . . . . . . . . . .
37
4.4.3.5
SIP Folder Path Resolution . . . . . . . . . . . . . . . . . . . . .
38
4.4.3.6
Temp Folder Path Resolution . . . . . . . . . . . . . . . . . . . .
38
4.4.3.7
Other Project and Application Paths
. . . . . . . . . . . . . . .
39
4.4.4
Script logging API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
4.4.5
User Interactions and Inputs
. . . . . . . . . . . . . . . . . . . . . . . . .
40
4.4.5.1
UserInteraction . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
4.4.6
Script Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
4.4.6.1
Script Exceptions
. . . . . . . . . . . . . . . . . . . . . . . . . .
42
4.4.6.2
Script Task Abortion by Exception . . . . . . . . . . . . . . . . .
42
4.4.6.3
Unhandled Exceptions from Tasks . . . . . . . . . . . . . . . . .
43
4.4.7
User defined Classes and Methods
. . . . . . . . . . . . . . . . . . . . . .
44
4.4.8
Usage of Automation API in own defined Classes and Methods . . . . . .
45
4.4.8.1
Access the Automation API like the Script code{} Block
. . . .
45
4.4.8.2
Access the Project API of the current active Project . . . . . . .
45
4.4.9
User defined Script Task Arguments in Commandline
. . . . . . . . . . .
46
4.4.9.1
User defined Argument Validators . . . . . . . . . . . . . . . . .
47
4.4.9.2
Call Script Task with Task Arguments . . . . . . . . . . . . . . .
49
4.4.10 Stateful Script Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
4.5
Project Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
4.5.1
Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
4.5.2
Accessing the active Project . . . . . . . . . . . . . . . . . . . . . . . . . .
52
4.5.3
Creating a new Project
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
4.5.3.1
Mandatory Settings . . . . . . . . . . . . . . . . . . . . . . . . .
55
4.5.3.2
General Settings . . . . . . . . . . . . . . . . . . . . . . . . . . .
55
4.5.3.3
Target Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
4.5.3.4
Post Build Settings
. . . . . . . . . . . . . . . . . . . . . . . . .
57
4.5.3.5
Folders Settings
. . . . . . . . . . . . . . . . . . . . . . . . . . .
57
4.5.3.6
DaVinci Developer Settings . . . . . . . . . . . . . . . . . . . . .
59
4.5.3.7
vVIRTUALtarget Settings
. . . . . . . . . . . . . . . . . . . . .
60
4.5.4
Opening an existing Project . . . . . . . . . . . . . . . . . . . . . . . . . .
62
4.5.4.1
Parameterized Project Load
. . . . . . . . . . . . . . . . . . . .
62
4.5.4.2
Open Project Details
. . . . . . . . . . . . . . . . . . . . . . . .
63
4.5.5
Saving a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
4.5.6
Opening AUTOSAR Files as Project . . . . . . . . . . . . . . . . . . . . .
64
4.5.6.1
Raw AUTOSAR models as Project . . . . . . . . . . . . . . . . .
65
4.6
Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
4.6.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
4.6.2
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
4.6.2.1
Read the ActiveEcuc
. . . . . . . . . . . . . . . . . . . . . . . .
66
4.6.2.2
Write the ActiveEcuc . . . . . . . . . . . . . . . . . . . . . . . .
69
4.6.2.3
Read the SystemDescription
. . . . . . . . . . . . . . . . . . . .
72
4.6.2.4
Write the SystemDescription . . . . . . . . . . . . . . . . . . . .
73
4.6.3
BswmdModel in AutomationInterface
. . . . . . . . . . . . . . . . . . . .
75
© 2017, Vector Informatik GmbH
3 of 250


Contents
4.6.3.1
BswmdModel Package and Class Names . . . . . . . . . . . . . .
75
4.6.3.2
Reading with BswmdModel . . . . . . . . . . . . . . . . . . . . .
75
4.6.3.3
Writing with BswmdModel . . . . . . . . . . . . . . . . . . . . .
76
4.6.3.4
Sip DefRefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77
4.6.3.5
BswmdModel DefRefs . . . . . . . . . . . . . . . . . . . . . . . .
77
4.6.3.6
Switching from Domain Models to BswmdModel . . . . . . . . .
78
4.6.4
MDF Model in AutomationInterface . . . . . . . . . . . . . . . . . . . . .
78
4.6.4.1
Reading the MDF Model . . . . . . . . . . . . . . . . . . . . . .
79
4.6.4.2
Reading the MDF Model by String . . . . . . . . . . . . . . . . .
81
4.6.4.3
Writing the MDF Model
. . . . . . . . . . . . . . . . . . . . . .
82
4.6.4.4
Simple Property Changes . . . . . . . . . . . . . . . . . . . . . .
83
4.6.4.5
Creating single Child Members (0:1) . . . . . . . . . . . . . . . .
83
4.6.4.6
Creating and adding Child List Members (0:*) . . . . . . . . . .
84
4.6.4.7
Updating existing Elements . . . . . . . . . . . . . . . . . . . . .
86
4.6.4.8
Deleting Model Objects . . . . . . . . . . . . . . . . . . . . . . .
87
4.6.4.9
Duplicating Model Objects . . . . . . . . . . . . . . . . . . . . .
87
4.6.4.10 Special properties and extensions . . . . . . . . . . . . . . . . . .
88
4.6.4.11 Reverse Reference Resolution - ReferencesPointingToMe . . . . .
90
4.6.4.12 AUTOSAR Root Object
. . . . . . . . . . . . . . . . . . . . . .
90
4.6.4.13 ActiveEcuC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
4.6.4.14 DefRef based Access to Containers and Parameters
. . . . . . .
91
4.6.4.15 Ecuc Parameter and Reference Value Access . . . . . . . . . . .
92
4.6.5
SystemDescription Access . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
4.6.6
Transactions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
4.6.6.1
Transactions API
. . . . . . . . . . . . . . . . . . . . . . . . . .
95
4.6.6.2
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
4.6.7
Model Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
98
4.6.8
Post-build selectable Variance . . . . . . . . . . . . . . . . . . . . . . . . .
99
4.6.8.1
Investigate Project Variance
. . . . . . . . . . . . . . . . . . . .
99
4.6.8.2
Variant Model Objects
. . . . . . . . . . . . . . . . . . . . . . . 100
4.6.9
Additional Model API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.6.9.1
User Annotations
. . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.7
Generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.7.1
Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.7.1.1
Generation Settings . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.7.1.2
Generation of External Generation Step . . . . . . . . . . . . . . 107
4.7.1.3
Evaluate generation or validation results
. . . . . . . . . . . . . 107
4.7.2
Generation Task Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
4.7.3
Software Component Templates and Contract Phase Headers Generation 111
4.7.3.1
Swct Generation Settings . . . . . . . . . . . . . . . . . . . . . . 111
4.7.3.2
Generation with default Project Settings
. . . . . . . . . . . . . 111
4.7.3.3
Generation of all Software Components . . . . . . . . . . . . . . 111
4.7.3.4
Generation of one Software Component . . . . . . . . . . . . . . 112
4.7.3.5
Generation of multiple Software Components . . . . . . . . . . . 113
4.7.3.6
Evaluate generation results . . . . . . . . . . . . . . . . . . . . . 113
4.8
Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.8.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.8.2
Access Validation-Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.8.3
Model Transaction and Validation-Result Invalidation . . . . . . . . . . . 115
4.8.4
Solve Validation-Results with Solving-Actions . . . . . . . . . . . . . . . . 115
4.8.4.1
Solver API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
© 2017, Vector Informatik GmbH
4 of 250


Contents
4.8.5
Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
4.8.5.1
Access Validation-Results of a Model Object . . . . . . . . . . . 118
4.8.5.2
Access Validation-Results of a DefRef . . . . . . . . . . . . . . . 118
4.8.5.3
Filter Validation-Results using an ID Constant . . . . . . . . . . 119
4.8.5.4
Identification of a Particular Solving-Action . . . . . . . . . . . . 119
4.8.5.5
Validation-Result Description as MixedText . . . . . . . . . . . . 120
4.8.5.6
Further IValidationResultUI Methods . . . . . . . . . . . . . . . 120
4.8.5.7
IValidationResultUI in a variant (Post Build Selectable) Project 121
4.8.5.8
Erroneous CEs of a Validation-Result . . . . . . . . . . . . . . . 121
4.8.5.9
Examine Solving-Action Execution . . . . . . . . . . . . . . . . . 123
4.8.5.10 Create a Validation-Result in a Script Task . . . . . . . . . . . . 124
4.8.5.11 Turn off auto-solving-action execution . . . . . . . . . . . . . . . 126
4.9
Update Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.9.1
Method Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.9.2
Example: Content of Input Files has changed. . . . . . . . . . . . . . . . . 127
4.9.3
Example: List of Input Files shall be changed . . . . . . . . . . . . . . . . 128
4.9.4
Prerequisites
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.10 Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.10.1 Communication Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.10.1.1 CanControllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.10.1.2 CanFilterMasks
. . . . . . . . . . . . . . . . . . . . . . . . . . . 133
4.10.2 Diagnostics Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
4.10.2.1 DemEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.10.3 Mode Management Domain . . . . . . . . . . . . . . . . . . . . . . . . . . 137
4.10.3.1 BswM Auto Configuration
. . . . . . . . . . . . . . . . . . . . . 137
4.10.4 Runtime System Domain
. . . . . . . . . . . . . . . . . . . . . . . . . . . 140
4.10.4.1 Component Port Connection . . . . . . . . . . . . . . . . . . . . 140
4.10.4.2 Data Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
4.11 Persistency
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.11.1 Model Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.11.1.1 Export ActiveEcuc . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.11.1.2 Export Post-build selectable Variants . . . . . . . . . . . . . . . 162
4.11.1.3 Advanced Export
. . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.11.2 Model Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
4.12 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
4.12.1 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
4.12.2 Converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.13 Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
4.13.1 Java Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
4.13.1.1 Script Task Creation in Java Code . . . . . . . . . . . . . . . . . 168
4.13.1.2 Java Code accessing Groovy API . . . . . . . . . . . . . . . . . . 168
4.13.1.3 Java Code in dvgroovy Scripts . . . . . . . . . . . . . . . . . . . 169
4.13.2 Unit testing API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.13.2.1 JUnit4 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.13.2.2 Execution of Spock Tests . . . . . . . . . . . . . . . . . . . . . . 171
4.13.2.3 Registration of Unit Tests in Scripts . . . . . . . . . . . . . . . . 171
5
Data models in detail
173
5.1
MDF model - the raw AUTOSAR data
. . . . . . . . . . . . . . . . . . . . . . . 173
5.1.1
Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
5.1.2
The models inheritance hiearchy . . . . . . . . . . . . . . . . . . . . . . . 173
5.1.2.1
MIObject and MDFObject . . . . . . . . . . . . . . . . . . . . . 174
© 2017, Vector Informatik GmbH
5 of 250


Contents
5.1.3
The models containment tree . . . . . . . . . . . . . . . . . . . . . . . . . 174
5.1.4
The ECUC model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.1.5
Order of child objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.1.6
AUTOSAR references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.1.7
Model changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5.1.7.1
Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5.1.7.2
Undo/redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5.1.7.3
Event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5.1.7.4
Deleting model objects
. . . . . . . . . . . . . . . . . . . . . . . 178
5.1.7.5
Access to deleted objects . . . . . . . . . . . . . . . . . . . . . . 178
5.1.7.6
Set-methods
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
5.1.7.7
Changing child list content . . . . . . . . . . . . . . . . . . . . . 178
5.1.7.8
Change restrictions
. . . . . . . . . . . . . . . . . . . . . . . . . 178
5.2
Post-build selectable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.2.1
Model views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.2.1.1
What model views are . . . . . . . . . . . . . . . . . . . . . . . . 179
5.2.1.2
The IModelViewManager project service
. . . . . . . . . . . . . 179
5.2.1.3
Variant siblings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
5.2.1.4
The Invariant model views . . . . . . . . . . . . . . . . . . . . . 182
5.2.1.5
Accessing invisible objects . . . . . . . . . . . . . . . . . . . . . . 184
5.2.1.6
IViewedModelObject
. . . . . . . . . . . . . . . . . . . . . . . . 185
5.2.2
Variant specific model changes
. . . . . . . . . . . . . . . . . . . . . . . . 185
5.2.3
Variant common model changes . . . . . . . . . . . . . . . . . . . . . . . . 186
5.3
BswmdModel details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
5.3.1
BswmdModel - DefinitionModel . . . . . . . . . . . . . . . . . . . . . . . . 187
5.3.1.1
Types of DefinitionModels
. . . . . . . . . . . . . . . . . . . . . 188
5.3.1.2
DefRef Getter methods of Untyped Model . . . . . . . . . . . . . 189
5.3.1.3
References
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5.3.1.4
Post-build selectable with BswmdModel . . . . . . . . . . . . . . 192
5.3.1.5
Creation ModelView of the BswmdModel . . . . . . . . . . . . . 193
5.3.1.6
Lazy Instantiating . . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.3.1.7
Optional Elements . . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.3.1.8
Class and Interface Structure of the BswmdModel . . . . . . . . 194
5.3.1.9
BswmdModel write access
. . . . . . . . . . . . . . . . . . . . . 195
5.3.2
BswmdModel generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.3.2.1
DerivativeMapping . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.4
Model Utility Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.4.1
AutosarUtil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.4.2
AsrPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.4.3
AsrObjectLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
5.4.3.1
Object links depend on the MDF object type . . . . . . . . . . . 200
5.4.3.2
Restrictions of object links . . . . . . . . . . . . . . . . . . . . . 200
5.4.3.3
Examples for object link strings
. . . . . . . . . . . . . . . . . . 200
5.4.4
DefRefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
5.4.4.1
TypedDefRefs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.4.4.2
DefRef Wildcards
. . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.4.5
CeState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.4.5.1
Getting a CeState object . . . . . . . . . . . . . . . . . . . . . . 204
5.4.5.2
IParameterStatePublished . . . . . . . . . . . . . . . . . . . . . . 204
5.4.5.3
IContainerStatePublished . . . . . . . . . . . . . . . . . . . . . . 205
5.5
Model Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
© 2017, Vector Informatik GmbH
6 of 250


Contents
5.5.1
EcucDefinitionAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
5.5.1.1
Post-build loadable
. . . . . . . . . . . . . . . . . . . . . . . . . 206
5.5.1.2
Post-build selectable . . . . . . . . . . . . . . . . . . . . . . . . . 209
5.5.2
EcuConfigurationAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
5.5.2.1
Post-build loadable
. . . . . . . . . . . . . . . . . . . . . . . . . 211
5.5.2.2
Post-build selectable . . . . . . . . . . . . . . . . . . . . . . . . . 213
6
AutomationInterface Content
215
6.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
6.2
Folder Structure
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
6.3
Script Development Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
6.3.1
DVCfg_AutomationInterfaceDocumentation.pdf . . . . . . . . . . . . . . 215
6.3.2
Javadoc HTML Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
6.3.3
Script Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
6.4
Libs and BuildLibs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
7
Automation Script Project
217
7.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
7.2
Automation Script Project Creation
. . . . . . . . . . . . . . . . . . . . . . . . . 217
7.3
Project File Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
7.4
IntelliJ IDEA Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.4.1
Supported versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.4.2
Building Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.4.3
Debugging with IntelliJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
7.4.4
Troubleshooting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
7.5
Project Migration to newer DaVinci Configurator Version . . . . . . . . . . . . . 221
7.6
Debugging Script Project
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
7.7
Build System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
7.7.1
Jar Creation and Output Location . . . . . . . . . . . . . . . . . . . . . . 222
7.7.2
Gradle File Structure
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
7.7.2.1
projectConfig.gradle File settings . . . . . . . . . . . . . . . . . . 222
7.7.3
Advanced Build Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
7.7.3.1
Usage of external Libraries (Jars) in the AutomationProject
. . 223
7.7.3.2
Static Compilation of Groovy Code . . . . . . . . . . . . . . . . 224
7.7.3.3
Gradle dvCfgAutomation API Reference
. . . . . . . . . . . . . 225
8
AutomationInterface Changes between Versions
227
8.1
Currently Supported Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
8.2
Changes in MICROSAR AR4-R18 - Cfg5.15 . . . . . . . . . . . . . . . . . . . . . 230
8.2.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.2
Automation Script Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.2.1
Supported IntelliJ IDEA Version . . . . . . . . . . . . . . . . . . 230
8.2.2.2
BuildSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.3
Script Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.3.1
User defined arguments . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.4
Project Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
8.2.5
Project Creation vVIRTUALtarget settings . . . . . . . . . . . . . . . . . 230
8.2.6
Model changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
8.2.7
Model Automation API . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.1
IVarianceApi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.2
Access methods
. . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.3
Reverse Reference Resolution - ReferencesPointingToMe . . . . . 232
© 2017, Vector Informatik GmbH
7 of 250


Contents
8.2.7.4
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.5
User Annotations
. . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.6
Variance
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.7.7
Model Synchronization
. . . . . . . . . . . . . . . . . . . . . . . 232
8.2.8
Persistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.2.9
Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.10 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.10.1 Validation-Result Access Methods . . . . . . . . . . . . . . . . . 233
8.2.11 Generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.11.1 SWC Templates and Contract Headers Generation . . . . . . . . 233
8.2.12 BswmdModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.12.1 BswmdModel Groovy . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.12.2 DerivativeMapping . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.13 Mode Management Domain . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.14 Runtime System Domain
. . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.14.1 Data Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.3
Changes in MICROSAR AR4-R17 - Cfg5.14 . . . . . . . . . . . . . . . . . . . . . 235
8.3.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.2
Script Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.2.1
Stateful Script Tasks . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.3
Automation Script Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.3.1
Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.3.2
Supported IntelliJ IDEA Version . . . . . . . . . . . . . . . . . . 235
8.3.3.3
BuildSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.4
Converter Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.5
UserInteraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.3.6
Project Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.3.6.1
AUTOSAR Arxml Files . . . . . . . . . . . . . . . . . . . . . . . 236
8.3.7
Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.3.7.1
Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.3.7.2
MDF Model Read and Write . . . . . . . . . . . . . . . . . . . . 236
8.3.7.3
SystemDescription Access . . . . . . . . . . . . . . . . . . . . . . 237
8.3.7.4
ActiveEcuc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.8
Persistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.9
Generation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.10 BswmdModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.10.1 Writing with BswmdModel . . . . . . . . . . . . . . . . . . . . . 237
8.3.11 BswmdModel Groovy
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.3.12 Diagnostics Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.3.13 Communication Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.3.14 Runtime System Domain
. . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.4
Changes in MICROSAR AR4-R16 - Cfg5.13 . . . . . . . . . . . . . . . . . . . . . 239
8.4.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
8.4.2
API Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
8.4.3
Beta Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
9
Appendix
240
Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Figures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
ToDos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
© 2017, Vector Informatik GmbH
8 of 250

1 Introduction
1.1 General
The user of the DaVinci Configurator Pro can create scripts, which will be executed inside of
the Configurator to:
• Create projects
• Update projects
• Manipulate the data model with an access to the whole AUTOSAR model
• Generate code
• Executed repetitive tasks with code, without user interaction
• More
The scripts are written by the user with the DaVinci Configurator AutomationInterface.
1.2 Facts
Installation
The DaVinci Configurator Pro can execute customer defined scripts out of the
box. No additional scripting language installation is required by the customer.
Languages
The scripts are written in Groovy or Java. See 3.2 on page 18 for details.
Debugging Support
The scripts can be debugged via IntelliJ IDEA. See 7.6 on page 221.
Documentation
The AutomationInterface provides a comprehensive documentation:
• This document
• Javadoc HTML pages as class reference
• Script samples and templates
– ScriptProject creation assistant in the DaVinci Configurator
• API documentation inside of an IDE
• Integrated Definition (BSWMD) description for all modules in the SIP
Code Completion
You have code completion for Groovy and Java for the DaVinci Configu-
rator AutomationInterface. You have to use IntelliJ IDEA for code completion.1
There is also a SIP based code completion for contained Module, Container and Parameter
definitions. This eases the traversal through the AUTOSAR model.
1See chapter 7 on page 217 for details.
© 2017, Vector Informatik GmbH
9 of 250

2 Getting started with Script Development
2.1 General
This chapter gives a short introduction of how to get started with script file or script project
creation.
Attention: You need at least one of the License Options .WF or .MD to develop scripts.
The script project creation assistant will not be available otherwise.
2.2 Automation Script Development Types
The DaVinci Configurator supports two types of automation scripts:
• Script files (.dvgroovy files)
• Script projects (.jar files)
Script File
The script file provides the simplest way to implement an automation script.
When the script gets bigger you should migrate to a script project.
To create a script file proceed with chapter 2.3.
Script Project
The script project is more effort to create and maintain, but provides IDE
support for:
• Code completion
• Syntax highlighting
• API Documentation
• Debug support
• Build support
It is the recommended way to develop scripts, containing more tasks or multiple clas-
ses.
To create a script project proceed with chapter 2.4 on page 12.
2.3 Script File
The script file is the simplest way to implement an automation script. It could be sufficient
for small tasks and if the developer does not need support by the tool during implementing the
script and if debugging is not required.
Prerequisites
Before you start, please make sure that you have a SIP containing a DaVinci
Configurator 5 available on your system.
© 2017, Vector Informatik GmbH
10 of 250





Chapter 2.
Getting started with Script Development
Creation
Inside your SIP you find examples of automation script files.
Create your own
script folder and copy an example, e.g. ...ScriptSamples/SimpleScript.dvgroovy to your
folder.
Rename the script file and open it in any text editor. In case of SimpleScript.dvgroovy
it consists of several tasks.
One of the tasks will print a "HelloApplication" string to the
console.
Figure 2.1: Script Samples location
Open the DaVinci Configurator inside your SIP. If not yet visible open the Views
• Script Locations
• Script Tasks
via the View menu.
In the Script Locations View select the location folder User@Machine. On its context menu
you can Add a script location. Select your own script folder.
Figure 2.2: Script Locations View
Alternatively you could add the script location to the Session folder. In this case the script
location would only be stored in the current session.
Switch to the Script Tasks View. It provides an overview over the tasks contained in your
script.
Figure 2.3: Script Tasks View
© 2017, Vector Informatik GmbH
11 of 250



Chapter 2.
Getting started with Script Development
Execute the SimpleAppTask by double-click or by the Execute Command contained in its
context menu or by the Execute Button of the Task View and check that "HelloApplication" is
printed in the console.
You can modify the implementation according to your needs. For the AutomationInterface
API Reference see chapter 4 on page 24. It is sufficient to edit and save the modifications in
your editor. The file is automatically reloaded by the DaVinci Configurator then and can be
executed immediately.
Debugging
It is not possible to debug a script file, if you want to debug, please migrate to a
script project, see chapter 2.4.
2.4 Script Project
The script project is the preferred way to develop an automation script, if the content is more
than one simple task.
A script project is a normal IDE project (IntelliJ IDEA recommended), with compile bindings
to the DaVinci Configurator AutomationInterface.
The DaVinci Configurator will load a script project as a single .jar file. So the script project
must be built and packaged into a .jar file before it can be executed.
Prerequisites
Before you start, please make sure that the following items are available on
your system:
• SIP containing a DaVinci Configurator 5
• Java JDK: For the development with the IntelliJ IDEA a "Java SE Development Kit 8"
(JDK 8) is required. Please install the JDK 8 as described in chapter 2.4.2 on page 14.
• IDE: For the script project development the recommended IDE is IntelliJ IDEA. Please
install IntelliJ IDEA as described in chapter 2.4.3 on page 15.
• Build system: To build the script project the build system Gradle is required. See
chapter 2.4.4 on page 15 for installation instructions.
Project Creation
Open the DaVinci Configurator inside your SIP. If not yet visible open the
following Views via the View menu:
• Script Locations
• Script Tasks
Switch to the View Script Tasks and select the Button Create New Script Project....
Figure 2.4: Create New Script Project... Button
Note: If the button is not available, please make sure you have least one of the License
Options .WF or .MD 
to develop scripts.
© 2017, Vector Informatik GmbH
12 of 250



Chapter 2.
Getting started with Script Development
The New Automation Script Project dialogs is opened. Click Next because you are reading
the document.
On the second page first you have to select a Script template on which the new project shall be
based on. Please select Default Automation Project and click Next.
On the third page Project Settings, please specify the following items:
• Script Project Name
– Define a name for your new project.
• Project Location
– Select a parent folder in which your project shall be created in.
Note: A new folder with the project name is created in this folder.
• Gradle Distribution URL
– Select one option:
∗ Gradle Default
· This will download the required Gradle build system. To use this option you
need internet access.
∗ Custom URL
· Specify an URL to your own Gradle distribution.
New settings are displayed to specify the path. To setup your own Gradle
build system see 2.4.4 on page 15.
• Open IntelliJ IDEA
– Select this option if the project shall automatically be opened in IntelliJ IDEA after
creation. In case IntelliJ IDEA is not installed on your system a warning will be
issued.
Figure 2.5: Project Settings
Proceed until the dialog is finished.
© 2017, Vector Informatik GmbH
13 of 250



Chapter 2.
Getting started with Script Development
A new project will be created. Necessary tasks as setting up the IntelliJ IDEA and building the
project are automatically initiated. At the end IntelliJ IDEA will be started with the created
project.
You can now modify the implementation according to your needs. For the AutomationInterface
API Reference see chapter 4 on page 24. To edit and rebuild the project use IntelliJ IDEA.
After each build the project is automatically reloaded by the DaVinci Configurator and can be
executed there.
IntelliJ IDEA Usage
Ensure that the Gradle JVM and the Project SDK are set in the IntelliJ
IDEA Settings. For details see 2.4.3 on the following page.
Having modified and saved MyScript.groovy in the IntelliJ IDEA editor you can build the
project by pressing the Run Button provided in the toolbar. The functionality of this Run
Button is determined by the option selected in the Menu beneath this button. In this menu
<ProjectName> [build] shall be selected.
Figure 2.6: Project Build
For more information to IntelliJ IDEA usage please see chapter 7.4 on page 218. If you have
trouble with IntelliJ, see 7.4.4 on page 220.
Debugging
To debug the script project follow the instructions in chapter 7.6 on page 221.
DaVinci Configurator views
The View Script Tasks provides an overview over the scripts
and tasks contained in the project. The newly created project already contains a sample script
file MyScript.groovy.
The Default Automation Project sample script file contains one task that prints a "Hello-
Application" string to the console. Run and check it as already described in 2.3 on page 10.
If you have selected a different Script Sample the MyScript.groovy will contain the sample
code.
The View Script Locations contains the path to the script project build folder containing the
built .jar file.
2.4.1 Script Project Development
For more details to the development of a script project see chapter 7 on page 217.
2.4.2 Java JDK Setup
Install a JDK 8 on your system. The Java JDK website provides download versions for different
systems. Download an appropriate version.
The architecture is not relevant, both x86 and x64 are valid.
The JDK is needed for the Java Compiler for IntelliJ IDEA and Gradle.
© 2017, Vector Informatik GmbH
14 of 250




Chapter 2.
Getting started with Script Development
2.4.3 IntelliJ IDEA Setup
Install IntelliJ IDEA on your system. The IntelliJ IDEA website provides download versions
for different applications. Download1 a version that supports Java and Groovy and that is in
the list of supported versions (see list 7.4.1 on page 218).
Code completion and compilation additionally require that the Project SDK is set. Therefore
open the File -> Project Structure Dialog in IntelliJ IDEA and switch to the settings dialog
for Project. If not already available set an appropriate option for the Project SDK. Please
set the value to a valid Java JDK ( see 2.4.2 on the previous page). Do not select a JRE.
Figure 2.7: Project SDK Setting
To enable building of projects ensure that the Gradle JVM is set. Therefore open the File
-> Settings Dialog in IntelliJ IDEA and find the settings dialog for Gradle. If not already
available set an appropriate option for the Gradle JVM. Please set the value to the same Java
JDK as the Project SDK above. Do not select a JRE.
If you do not have the Gradle settings, please make sure that the Gradle plugin inside of
IntelliJ IDEA is installed. Open the File -> Settings Dialog then Plugins and select the
Gradle plugin.
Figure 2.8: Gradle JVM Setting
2.4.4 Gradle Setup
If your system has internet access you can use the default Gradle Build System provided by
the DaVinci Configurator. In this case you do not have to install Gradle. If you are a Vector
internal user you could also skip the Gradle installation.
1 Vector-Internal:
If
you
are
inside
of
the
Vector
intranet,
you
could
download
it
from:
file:////vistrpesfs1/project2/DaVinci/Eclipse/Platform/CFG5/BuildComponents/IntelliJ
© 2017, Vector Informatik GmbH
15 of 250


Chapter 2.
Getting started with Script Development
If you want to use your own Gradle Build System install it on your system. The Gradle website
provides the required download version for the Gradle Build System. Please download the
version 3.0
. See chapter 7.7 on page 221 for more details to the Build System.
© 2017, Vector Informatik GmbH
16 of 250


3 AutomationInterface Architecture
3.1 Components
The DaVinci Configurator consists of three components:
• Core components
• AutomationInterface (AI) - also called Automation API
• Scripting engine
The other part is the script provided by the user.
The Scripting engine will load the script, and the script uses the AutomationInterface to perform
tasks. The AutomationInterface will translate the requests from the script into Core components
calls.
Figure 3.1: DaVinci Configurator components and interaction with scripts
The separation of the AutomationInterface and the Core components has multiple benefits:
• Stable API for script writters
– Including checks, that the API will not break in following releases
• Well defined and documented API
• Abstraction from the internal heavy lifting
– This ease the usage for the user, because the automation interfaces are tailored to
the use cases.
PublishedApi
All AutomationInterface classes are marked with a special annotation to high-
light the fact that it is part of the published API. The annotation is called @Publishe-
dApi.
So every class marked with @PublishedApi can be used by the client code. But if a class is
not marked with @PublishedApi or is marked with @Deprecated it should not be used by any
client code, nor shall a client call methods via reflection or other runtime techniques.
© 2017, Vector Informatik GmbH
17 of 250


Chapter 3.
AutomationInterface Architecture
You should not access DaVinci Configurator private or package private classes, methods or
fields.
3.2 Languages
The DaVinci Configurator provides out of the box language support for:
• Java1
• Groovy2
The recommended scripting language is Groovy which shall be preferred by all users.
3.2.1 Why Groovy
Flat Learning Curve
Groovy is concise, readable with an expressive syntax and is easy to
learn for Java developers3.
• Groovy syntax is 95%-compatible with Java4
• Any Java developer will be able to code in Groovy without having to know nor understand
the subtleties of this language
This is very important for teams where there’s not much time for learning a new language.
Domain-Specific Languages (DSL)
Groovy has a flexible and malleable syntax, advanced
integration and customization mechanisms, to integrate readable business rules in your appli-
cations.
The DSL features of Groovy are extensively used in DaVinci Automation API to provide simple
and expressive syntax.
Powerful Features
The Groovy language supports Closures, builders, runtime & compile-time
meta-programming, functional programming, type inference, and static compilation.
Website
The website of Groovy is http://groovy-lang.org. It provides a good documentation
and starting guides for the Groovy language.
Groovy Book
The book "Groovy in Action, Second Edition"provides a comprehensive
guide to Groovy programming language. It is written by the developers of Groovy.
1http://http://www.java.com [2016-05-09]
2http://groovy-lang.org [2016-05-09]
3Copied from http://groovy-lang.org [2016-05-09]
4Copied from http://melix.github.io/blog/2010/07/27/experience_feedback_on_groovy.html [2016-05-09]
5Groovy in Action, Second Edition by Dierk König, Paul King, Guillaume Laforge, Hamlet D’Arcy, Cédric
Champeau, Erik Pragt, and Jon Skeet June 2015 ISBN 9781935182443
https://www.manning.com/books/groovy-in-action-second-edition [2016-05-09]
© 2017, Vector Informatik GmbH
18 of 250



Chapter 3.
AutomationInterface Architecture
3.3 Script Structure
A script always contains one or more script tasks. A script is represented by an instance of
IScript, the contained tasks are instances of IScriptTask.
Figure 3.2: Structure of scripts and script tasks
You create the IScript and IScriptTask instance with the API described in chapter 4.2 on
page 25.

The script task type (IScriptTaskType) defines where the task could be executed. It also
defines the signature of the task’s code {} block. See chapter 4.3 on page 29 for the available
script task types.
3.3.1 Scripts
Script contain the tasks to execute and are loaded from the script locations specified in the
DaVinci Configurator.
The DaVinci Configurator supports two types of automation scripts:
• Script files (.dvgroovy files)
• Script projects (.jar files)
For details to the script project, see chapter 7 on page 217.
© 2017, Vector Informatik GmbH
19 of 250


Chapter 3.
AutomationInterface Architecture
3.3.2 Script Tasks
Script tasks are the executable units of scripts, which are executed at certain points in the
DaVinci Configurator (specified by the IScriptTaskType). Every script task has a code {}
block, which contains the logic to execute.
3.3.3 Script Locations
Script locations define where script files are loaded from. These locations are edited in the
DaVinci Configurator Script Locations view. You can also start the Configurator with the
option –scriptLocations to specify additional locations.
The DaVinci Configurator could load scripts from different script locations:
• SIP
• Project
• User-defined directories
• More
3.4 Script loading
All scripts contained in the script locations are automatically loaded by the DaVinci Configu-
rator. If new scripts are added to script locations these scripts are automatically loaded.
If a script changes during runtime of the DaVinci Configurator the whole script is reloaded and
then executable, without a restart of the tool or a reload of the project.
This enables script development during the runtime of the DaVinci Configurator
• No project reload
• No tool restart
• Faster feedback loops
Note: A jar file of a script project should be updated by the Gradle build system, not by hand.
Because the Java VM is holding a lock to the file. If you try to replace the file in the explorer
you will get an error message.
3.4.1 Internal Script Reload Behavior
Your script can be loaded and unloaded automatically multiple times during the execution of
the DaVinci Configurator. More precise, when a script is currently not used and there are
memory constraints your script will be automatically unloaded.
If the script will be executed again, it is automatically reloaded and then executed. So it is
possible that the script initialization code is called multiple times in the DaVinci Configurator
lifecycle. But this is no issue, because the script and the tasks shall not have any internal
state during initialization.
© 2017, Vector Informatik GmbH
20 of 250


Chapter 3.
AutomationInterface Architecture
Memory Leak Prevention
The feature above is implemented to prevent leaking memory from
an automation script into the DaVinci Configurator memory. So when the memory run low, all
unused scripts are unloaded, which will also free leaked memory of scripts.
But this does not mean that is impossible to construct memory leaks from an automation
script. E.g. Open file handles without closing them will still cause a memory leak.
3.5 Script editing
The DaVinci Configurator does not contain any editing support for scripts, like:
• Script editor
• Debugger
• REPL (Read-Eval-Print-Loop)
These tasks are delegated to other development tools:
• IntelliJ IDEA (recommended)
• EclipseIDE
• Notepad++
See chapter 7 on page 217 for script development and debugging with IntelliJ IDEA.
3.6 Licensing
The DaVinci Configurator requires certain license options to develop and/or execute script
tasks.
The required license options differ between development and execution time. Normally you
need more license options to develop scripts than you need to execute them.
The default license options are:
• .PRO option for execution
• .WF option for development and debugging
The license option .MD includes the option .WF for automation scripts. So you can also use
.MD as replacement of .WF.
Some script task may require different options during development or execution. It is also
possible that the execution does not require any license option. See chapter 4.3 on page 29 for
details, which script task type requires which license.
3.7 Script Coding Conventions and Constraints
This section describes conventions, which you are advised to apply.
© 2017, Vector Informatik GmbH
21 of 250


Chapter 3.
AutomationInterface Architecture
Requirement Levels - Wording
• Shall: This word, or the terms "Mandatory", "Required" or "Must", mean that the rule or
convention is an absolute requirement.
• Shall not: This word, or the terms "Must not" mean that the rule or convention is an
absolute prohibition.
• Should: This word, or the adjective "Recommended", mean that there may exist valid
reasons in particular circumstances to ignore a particular item, but the full implications
must be understood and carefully weighed before choosing a different course.
• Should not: This phrase, or the phrase "Not recommended" mean that there may exist
valid reasons in particular circumstances when the particular behavior is acceptable or
even useful, but the full implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
• May: This word, or the adjective "Optional", mean that an item is truly optional.
See also "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels"6.
3.7.1 Usage of static fields
You shall not use any static fields in your script code or other written classes inside of your
project. Except static final constants of simple immutable types like (normally compile time
constants):
• int
• boolean
• double
• String
• ...
Static fields will cause memory leaks, because the fields are not garbage collected. Exam-
ple:
scriptTask (" Name "){
code {
MyClass . leakVariable . add (" Leaked Memory ")
}
}
c l a s s MyClass {
s t a t i c List l e a k V a r i a b l e = []
}
Listing 3.1: Static field memory leak
The use of static fields of the AutomationInterface is allowed.
6https://www.ietf.org/rfc/rfc2119.txt
© 2017, Vector Informatik GmbH
22 of 250


Chapter 3.
AutomationInterface Architecture
3.7.2 Usage of Outer Closure Scope Variables
The same static field rule applies to variables passed from outer Closure scopes into a script
task code{} block. You shall not cache/save data into such variables.
Example:
scriptTask (" Name "){
def i n v a l i d V a r i a b l e = [] // List
code {
invalidVariable . add (" Leaked Memory ")
}
}
Listing 3.2: Memory leak with closure variable
3.7.3 States over script task execution
You shall not hold or save any states over multiple script task executions in your classes.
The script task should be state less. All states are provided by the Automation API or the data
models.
If you need to cache data over multiple executions, see chapter 4.4.10 on page 50 for a solu-
tion.
3.7.4 Usage of Threads
A script task shall not create any Thread, Executor, ThreadPool or ForkJoinPool in-
stances. If multithreading is required, the Automation API provides the corresponding met-
hods.
A different thread will not provide any Automation APIs and will cause IllegalStateExcepti-
ons.
3.7.5 Usage of DaVinci Configurator private Classes Methods or Fields
A script task should not call or rely on any non published API or private (also package private)
classes, methods or fields. You also should not use any reflection techniques to reflect about
Configurator internal APIs. Otherwise it is not guaranteed that your script will work with other
DaVinci Configurator versions. See 3.1 on page 17 for details about PublishedApi.
But it is valid to use reflection for your own script code.
© 2017, Vector Informatik GmbH
23 of 250


4 AutomationInterface API Reference
4.1 Introduction
This chapter contains the description of the DaVinci Configurator AutomationInterface. The
figure 4.1 shows the APIs and the containment structure of the different APIs.
Figure 4.1: The API overview and containment structure
The components have an hierarchical order, where and when the components are usable. When a
component is contained in another the component is only usable, when the other is active.
© 2017, Vector Informatik GmbH
24 of 250


Chapter 4.
AutomationInterface API Reference
Usage examples:
• The Generation API is only usable inside of a loaded Project
• The Workflow Update API is only usable outside of a loaded Project
4.2 Script Creation
This section lists the APIs to create, execute and query information for script tasks. The
sections document the following aspects:
• Script task creation
• Description and help texts
• Task executable query
4.2.1 Script Task Creation
To create a script task you have to call one of the scriptTask() methods. The last parameter
of the scriptTask methods can be used to set additional options of the task. Every script task
needs one IScriptTaskType. See chapter 4.3 on page 29 for all available task types.
The code{ } block is required for every IScriptTask. The block contains the code, which is
executed when the task is executed.
Script Task with default Type
The method scriptTask() will create an script task for the
default IScriptTaskType DV_PROJECT.
scriptTask (" TaskName "){
code {// Task execution code here
}
}
Listing 4.1: Task creation with default type
Script Task with Task Type
You could also define the used IScriptTaskType at the script-
Task() methods.
The methods
• scriptTask(String, IApplicationScriptTaskType, Closure)
• scriptTask(String, IProjectScriptTaskType, Closure)
will create an script task for passed IScriptTaskType. The two methods differentiate, if a
project is required or not. See chapter for all available task types 4.3 on page 29
© 2017, Vector Informatik GmbH
25 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName ", DV_APPLICATION ){
code {// Task execution code here
}
}
Listing 4.2: Task creation with TaskType Application
scriptTask (" TaskName ", DV_PROJECT ){
code {// Task execution code here
}
}
Listing 4.3: Task creation with TaskType Project
Multiple Tasks in one Script
It is also possible to define multiple tasks in one script.
scriptTask (" TaskName "){
code { }
}
scriptTask (" SecondTask "){
code { }
}
Listing 4.4: Define two tasks is one script
4.2.1.1 Script Creation with IDE Code Completion Support
The IDE could not know which API is available inside of a script file. So a glue code is needed
to tell the IDE, what API is callable inside of a script file.
The ScriptApi.daVinci() method enables the IDE code completion support in a script file.
You have to write the daVinci{ } block and inside of the block the code completion is available.
The following sample shows the glue code for the IDE:
i m p o r t s t a t i c com . vector . cfg . a u t o m a t i o n . api . Sc ri pt Api .*
// daVinci enables the IDE code completion support
daVinci {
// Normal script code here
scriptTask (" TaskName "){
code {// Script task execution code here
}
}
}
Listing 4.5: Script creation with IDE support
The daVinci{} block is only required for code completion support in the IDE. It has no effect
during runtime, so the daVinci{} is optional in script files (.dvgroovy)
© 2017, Vector Informatik GmbH
26 of 250


Chapter 4.
AutomationInterface API Reference
4.2.1.2 Script Task isExecutableIf
You can set an isExecutableIf handler, which is called before the IScriptTask is executed.
The code can evaluate, if the IScriptTask shall be executable. If the handler returns true, the
code of the IScriptTask is executable, otherwise false. See class IExecutableTaskEvaluator
for details.
The Closure isExecutable has to return a boolean. The passed arguments to the closure are
the same as the code{ } block arguments.
Inside of the Closure a property notExecutableReasons is available to set reasons why it is not
executable. It is highly recommended to set reasons, when the Closure returns false.
scriptTask (" TaskName "){
isExecutableIf { taskArgument ->
// Decide , if the task shall be executable
if ( t a s k A r g u m e n t == " C o r r e c t A r g u m e n t " ) {
r e t u r n t r u e
}notExecutableReasons.addReason "The argument is not 'CorrectArgument'"
r e t u r n f a l s e
}
code { taskArgument ->
// Task execution code here
}
}
Listing 4.6: Task with isExecutableIf
4.2.2 Description and Help
Script Description
The script can have an optional description text. The description shall
list what this script contains. The method scriptDescription(String) sets the description
of the script.
The description shall be a short overview. The String can be multiline.
// You can set a description for the whole script
scriptDescription " The Script has a description "
scriptTask (" Task "){
code {}
}
Listing 4.7: Script with description
Task Description
A script task can have an optional description text. The description shall
help the user of the script task to understand what the task does. The method taskDescrip-
tion(String) sets the description of the script task.
The description shall be a short overview. The String can be multiline.
© 2017, Vector Informatik GmbH
27 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
taskDescription " The description of the task "
code { }
}
Listing 4.8: Task with description
Task Help
A script task can also have an optional help text. The help text shall describe in
detail what the task does and when it could be executed. The method taskHelp(String) sets
the help of the script task.
The help shall be elaborate text about what the task does and how to use it. The String can
be multiline.
The help text is automatically expanded with the help for user defined script task arguments,
see IScriptTaskBuilder.newUserDefinedArgument(String, Class, String).
scriptTask (" TaskName "){
taskDescription " The short description of the task "
taskHelp """
The long help text
of the script with multiple lines
And paragraphs ...
""". stripIndent ()
// stripIndent () will strip the indentation of multiline strings
// The three """ are needed , if you want to write a multiline string
code { }
}
Listing 4.9: Task with description and help text
© 2017, Vector Informatik GmbH
28 of 250



Chapter 4.
AutomationInterface API Reference
4.3 Script Task Types
The IScriptTaskType instances define where a script task is executed in the DaVinci Configu-
rator. The types also define the arguments passed to the script task execution and what return
type an execution has.
Every script task needs an IScriptTaskType. The type is set during creation of the script
tasks.
License Options
For the common explanation of the required license options, see chapter 3.6
on page 21.
Interfaces
All task types implement the interface IScriptTaskType. The following figure
show the type and the defined sub types:
Figure 4.2: IScriptTaskType interfaces
4.3.1 Available Types
The class IScriptTaskTypeApi defines all available IScriptTaskTypes in the DaVinci Confi-
gurator. All task types start with the prefix DV_.
None at parameters and return types mean, that any arguments could be passed and return to
or from the task. Normally it will be nothing. The arguments are used, when the task is called
in unit tests for example.
4.3.1.1 Application Types
Application
The type DV_APPLICATION is for application wide script tasks. A task could
create/open/close/update projects. Use this type, if you need full control over the project
handling, or you want to handle multiple project at once.
© 2017, Vector Informatik GmbH
29 of 250


Chapter 4.
AutomationInterface API Reference
Name
Application
Code identifier
DV_APPLICATION
Task type interface
IApplicationScriptTaskType
Parameters
None
Return type
None
Execution
Standalone
Required license option
Development: .WF Execution: .PRO
4.3.1.2 Project Types
Project
The type DV_PROJECT is for project script tasks. A task could access the currently
loaded project. Manipulate the data, generate and save the project. This is the default type, if
no other type is specified.
Name
Project
Code identifier
DV_PROJECT
Task type interface
IProjectScriptTaskType
Parameters
None
Return type
None
Execution
Standalone
Required license option
Development: .WF Execution: .PRO
Module activation
The type DV_ON_MODULE_ACTIVATION allows the script to hook any Mo-
dule Activation in a loaded project. Every DV_ON_MODULE_ACTIVATION task is automatically
executed, when an "Activate Module" operation is executed. The script task is called after the
module was created.
Name
Module activation
Code identifier
DV_ON_MODULE_ACTIVATION
Task type interface
IProjectScriptTaskType
Parameters
MIModuleConfiguration moduleConfiguration
Return type
Void
Execution
Automatically during module activation
Required license option
Development: .WF Execution: .PRO
Module deactivation
The type DV_ON_MODULE_DEACTIVATION allows the script to hook any
Module Deactivation in a loaded project. Every DV_ON_MODULE_DEACTIVATION task is automa-
tically executed, when an "Deactivate Module" operation is executed. The script task is called
before the module is deleted.
Name
Module deactivation
Code identifier
DV_ON_MODULE_DEACTIVATION
Task type interface
IProjectScriptTaskType
Parameters
MIModuleConfiguration moduleConfiguration
Return type
Void
Execution
Automatically during module deactivation
Required license option
Development: .WF Execution: .PRO
© 2017, Vector Informatik GmbH
30 of 250


Chapter 4.
AutomationInterface API Reference
4.3.1.3 UI Types
Editor selection
The type DV_EDITOR_SELECTION allows the script task to access the currently
selected element of an editor. The task is executed in context of the selection and is not callable
by the user without an active selection.
Name
Editor selection
Code identifier
DV_EDITOR_SELECTION
Task type interface
IProjectScriptTaskType
Parameters
MIObject selectedElement
Return type
Void
Execution
In context menu of an editor selection
Required license option
Development: .WF Execution: .PRO
Editor multiple selections
The type DV_EDITOR_MULTI_SELECTION allows the script task to
access the currently selected elements of an editor. The task is executed in context of the
selection and is not callable by the user without an active selection. The type is also usable
when the DV_EDITOR_SELECTION apply.
Name
Editor multiple selections
Code identifier
DV_EDITOR_MULTI_SELECTION
Task type interface
IProjectScriptTaskType
Parameters
List<MIObject> selectedElements
Return type
Void
Execution
In context menu of an editor selection
Required license option
Development: .WF Execution: .PRO
4.3.1.4 Generation Types
Generation Step
The type DV_GENERATION_STEP defines that the script task is executable as
a GenerationStep during generation. The user has to explicitly create an GenerationStep in the
Project Settings Editor, which references the script task.
Name
Generation Step
Code identifier
DV_GENERATION_STEP
Task type interface
IProjectScriptTaskType
Parameters
EGenerationPhaseType phase
EGenerationProcessType processType
IValidationResultSink resultSink
Return type
Void
Execution
Selected as GenerationStep in GenerationProcess
Required license option
Development: .MD Execution: None
See chapter 4.7.2 on page 109 for usage samples.
Custom Workflow Step
The type DV_CUSTOM_WORKFLOW_STEP defines that the script task
is executable as a CustomWorkflow step in the CustomWorkflow process. The user has to
explicitly create an CustomWorkflow step in the Project Settings Editor, which references the
script task.
© 2017, Vector Informatik GmbH
31 of 250


Chapter 4.
AutomationInterface API Reference
Name
Custom Workflow Step
Code identifier
DV_CUSTOM_WORKFLOW_STEP
Task type interface
IProjectScriptTaskType
Parameters
None
Return type
Void
Execution
Selected as Custom Workflow Step in the Project Settings
Required license option
Development: .WF Execution: .PRO
See chapter 4.7.2 on page 109 for usage samples.
Generation Process Start
The type DV_ON_GENERATION_START defines that the script task is
automatically executed when the generation is started.
Name
Generation Process Start
Task type interface
IProjectScriptTaskType
Code identifier
DV_ON_GENERATION_START
Parameters
List<EGenerationPhaseType> generationPhases
List<IGenerator> executedGenerators
Return type
Void
Execution
Automatically before GenerationProcess
Required license option
Development: .MD Execution: None
See chapter 4.7.2 on page 109 for usage samples.
Generation Process End
The type DV_ON_GENERATION_END defines that the script task is
automatically executed when the generation has finished.
Name
Generation Process End
Code identifier
DV_ON_GENERATION_END
Task type interface
IProjectScriptTaskType
Parameters
EGenerationProcessResult processResult
List<IGenerator> executedGenerators
Return type
Void
Execution
Automatically after GenerationProcess
Required license option
Development: .MD Execution: None
See chapter 4.7.2 on page 109 for usage samples.
© 2017, Vector Informatik GmbH
32 of 250


Chapter 4.
AutomationInterface API Reference
4.4 Script Task Execution
This section lists the APIs to execute and query information for script tasks. The sections
document the following aspects:
• Script task execution
• Logging API
• Path resolution
• Error handling
• User defined classes and methods
• User defined script task arguments
4.4.1 Execution Context
Every IScriptTask could be be executed, and retrieve passed arguments and other context
information. This execution information of a script task is tracked by the IScriptExecution-
Context.
The IScriptExecutionContext holds the context of the execution:
• The script task arguments
• The current running script task
• The current active script logger
• The active project, if existing
• The script temp folder
• The script task user defined arguments
The IScriptExecutionContext is also the entry point into every automation API, and pro-
vide access to the different API classes. The classes are describes in their own chapters like
IProjectHandlingApiEntryPoint or IWorkflowApiEntryPoint.
The context is immediately active, when the code block of an IScriptTask is called.
Groovy Code
The client sample illustrates the seamless usage of the IScriptExecutionCon-
text class in Groovy:
scriptTask (" taskName ", DV_APPLICATION ){
code {
// The IScriptExecutionContext is automatically active here
// Call methods of the IScriptExecutionContext
def logger = s c r i p t L o g g e r
def temp = paths . t e m p F o l d e r
// Use an automation API
workflow {
// Now the Workflow API is active
}
}
}
Listing 4.10: Access automation API in Groovy clients by the IScriptExecutionContext
© 2017, Vector Informatik GmbH
33 of 250


Chapter 4.
AutomationInterface API Reference
In Groovy the IScriptExecutionContext is automatically activated inside of the code{}
block.
Java Code
For java clients the method IScriptExecutionContext.getInstance(Class)
provides access to the API classes, which are seamlessly available for the groovy clients:
// Java code
// Passed from the script task :
IScriptExecutionContext scriptContext = ...;
// Retrieve automation API in Java
IWorkflowApi workflow = scriptContext . getInstance ( IWorkflowApiEntryPoint . class )
. getWorkflow ();
IWorkflowContext workflowCtx = workflow . getWorkflow ();
// In groovy code it would be:
workflow {
}
Listing 4.11: Access to automation API in Java clients by the IScriptExecutionContext
In Java code the context is always the first parameter passed to every task code (see IScript-
TaskCode).
4.4.1.1 Code Block Arguments
The code block can have arguments passed into the script task execution. The arguments passed
into the code{ } block are defined by the IScriptTaskType of the script task. See chapter 4.3
on page 29 
for the list of arguments (including types) passed by each individual task type.
scriptTask (" Task "){
code { arg1 , arg2 , ... -> // arguments here defined by the IScriptTaskType
}
}
scriptTask (" Task2 "){
// Or you could specify the type of the arguments for code completion
code { String arg1 , List < Double > arg2 ->
}
}
Listing 4.12: Script task code block arguments
The arguments can also retrieved with IScriptExecutionContext.getScriptTaskArguments().
4.4.2 Task Execution Sequence
The figure 4.3 on the next page shows the overview sequence when a script task gets executed
by the user and the interaction with the IScriptExecutionContext. Note that the context
gets created each time the task is executed.
© 2017, Vector Informatik GmbH
34 of 250



Chapter 4.
AutomationInterface API Reference
Figure 4.3: Script Task Execution Sequence
4.4.3 Script Path API during Execution
Script tasks could resolve relative and absolute file system paths with the IAutomationPat-
hsApi.
As entry point call paths in a code{ } block (see IScriptExecutionContext.getPaths()).
There are multiple ways to resolve relative paths:
• by Script folder
• by Temp folder
• by SIP folder
• by Project folder
• by any parent folder
© 2017, Vector Informatik GmbH
35 of 250


Chapter 4.
AutomationInterface API Reference
4.4.3.1 Path Resolution by Parent Folder
The resolvePath(Path parent, Object path) method resolves a file path relative to supplied
parent folder.
This method converts the supplied path based on its type:
• A CharSequence, including String or GString. Interpreted relative to the parent direc-
tory. A string that starts with file: is treated as a file URL.
• A File: If the file is an absolute file, it is returned as is. Otherwise, the file’s path is
interpreted relative to the parent directory.
• A Path: If the path is an absolute path, it is returned as is. Otherwise, the path is
interpreted relative to the parent directory.
• A URI or URL: The URL’s path is interpreted as the file path. Currently, only file: URLs
are supported.
• A IHasURI: The returned URI is interpreted as defined above.
• A Closure: The closure’s return value is resolved recursively.
• A Callable: The callable’s return value is resolved recursively.
• A Supplier: The supplier’s return value is resolved recursively.
• A Provider: The provider’s return value is resolved recursively.
The return type is java.nio.file.Path.
scriptTask (" TaskName "){
code {
// Method resolvePath (Path , Object ) resolves a path relative to the
supplied folder
Path parentFolder = Paths . get ('.')
Path p = paths . resolvePath ( parentFolder , " MyFile . txt ")
/* The resolvePath (Path , Object ) method will resolve
* relative and absolute paths to a java . nio . file . Path object .
*/
}
}
Listing 4.13: Resolves a path with the resolvePath() method
4.4.3.2 Path Resolution
The resolvePath(Object) method resolves the Object to a file path. Relative paths are
preserved, so relative paths are not converted into absolute paths.
This method converts the supplied path same as the resolvePath(Path, Object) method.
The return type is java.nio.file.Path. See 4.4.3.1. But it does NOT convert relative paths
into absolute.
© 2017, Vector Informatik GmbH
36 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
code {
// Method resolvePath () resolves a path and preserve relative paths
Path p = paths . resolvePath (" MyFile . txt ")
/* The resolvePath () method will resolve
* relative and absolute paths to a java . nio . file . Path object .
* Is also preserves relative paths .
*/
}
}
Listing 4.14: Resolves a path with the resolvePath() method
4.4.3.3 Script Folder Path Resolution
The resolveScriptPath(Object) method resolves a file path relative to the script directory
of the executed IScript.
This method converts the supplied path same as the resolvePath(Path, Object) method.
The return type is java.nio.file.Path. See 4.4.3.1 on the previous page.
scriptTask (" TaskName "){
code {
// Method resolveScriptPath () resolves a path relative to the script
folder
Path p = paths . resolveScriptPath (" MyFile . txt ")
/* The resolveScriptPath () method will resolve
* relative and absolute paths to a java . nio . file . Path object .
*/
}
}
Listing 4.15: Resolves a path with the resolveScriptPath() method
4.4.3.4 Project Folder Path Resolution
The resolveProjectPath(Object) method resolves a file path relative to the project directory
(see getDpaProjectFolder()) of the current active project.
This method converts the supplied path same as the resolvePath(Path, Object) method.
The return type is java.nio.file.Path. See 4.4.3.1 on the preceding page.
There must be an active project to use this method. See chapter 4.5.2 on page 52 for details
about active projects.
© 2017, Vector Informatik GmbH
37 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
code {
// Method resolveProjectPath () resolves a path relative active project
folder
Path p = paths . resolveProjectPath (" MyFile . txt ")
/* The resolveProjectPath () method will resolve
* relative and absolute paths to a java . nio . file . Path object .
*/
}
}
Listing 4.16: Resolves a path with the resolveProjectPath() method
4.4.3.5 SIP Folder Path Resolution
The resolveSipPath(Object) method resolves a file path relative to the SIP directory (see
getSipRootFolder()).
This method converts the supplied path same as the resolvePath(Path, Object) method.
The return type is java.nio.file.Path. See 4.4.3.1 on page 36.
scriptTask (" TaskName "){
code {
// Method resolveSipPath () resolves a path relative SIP folder
Path p = paths . resolveSipPath (" MyFile . txt ")
/* The resolveSipPath () method will resolve
* relative and absolute paths to a java . nio . file . Path object .
*/
}
}
Listing 4.17: Resolves a path with the resolveSipPath() method
4.4.3.6 Temp Folder Path Resolution
The resolveTempPath(Object) method resolves a file path relative to the script temp di-
rectory of the executed IScript. A new temporary folder is created for each IScriptTask
execution.
This method converts the supplied path same as the resolvePath(Path, Object) method.
The return type is java.nio.file.Path. See 4.4.3.1 on page 36.
scriptTask (" TaskName "){
code {
// Method resolveTempPath () resolves a path relative to the temp folder
Path p = paths . resolveTempPath (" MyFile . txt ")
/* The resolveTempPath () method will resolve
* relative and absolute paths to a java . nio . file . Path object .
*/
}
}
Listing 4.18: Resolves a path with the resolveTempPath() method
© 2017, Vector Informatik GmbH
38 of 250


Chapter 4.
AutomationInterface API Reference
4.4.3.7 Other Project and Application Paths
The IAutomationPathsApi will also resolve any other Vector provided path variable like $(Ecu-
cFile). The call would be paths.ecucFile, add the variable to resolve as a Groovy pro-
perty.
Short list of available variables (not complete, please see DaVinci Configurator help for more
details):
• EcucFile
• OutputFolder
• SystemFolder
• AutosarFolder
• more ...
scriptTask (" TaskName ", DV_PROJECT ){
code {
// The property OutputFolder is the folder of the generated artifacts
Path folder = paths . outputFolder
}
}
Listing 4.19: Get the project output folder path
scriptTask (" TaskName "){
code {
// The property sipRootFolder is the folder of the used SIP
Path folder = paths . sipRootFolder
}
}
Listing 4.20: Get the SIP folder path
4.4.4 Script logging API
The script task execution (IScriptExecutionContext) provides a script logger to log events
during an execution. The method getScriptLogger() returns the logger. The logger can be
used to log:
• Errors
• Warnings
• Debug messages
• More...
You shall always prefer the usage of the logger before using the println() of stdout or
stderr.
In any code block without direct access to the script API, you can write the following code to
access the logger: ScriptApi.scriptLogger
© 2017, Vector Informatik GmbH
39 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
code {// Use the scriptLogger to log messages
scriptLogger . info
"My script is running "
scriptLogger . warn
"My Warning "
scriptLogger . error "My Error "
scriptLogger . debug "My debug message "
scriptLogger . trace "My trace message "
// Also log an Exception as second argument
scriptLogger . error ("My Error ", new RuntimeException (" MyException "))
}
}
Listing 4.21: Usage of the script logger
The ILogger also provides a formatting syntax for the format String. The syntax is {Index-
Number} and the index of arguments after the format String.
It is also possible to use the Groovy GString syntax for formatting.
scriptTask (" TaskName "){
code { argument ->
// Use the format methods to insert data
scriptLogger . infoFormat ("My script {0} with :{1} ", scriptTask , argument )
}
}
Listing 4.22: Usage of the script logger with message formatting
scriptTask (" TaskName "){
code { argument ->
// Use the Groovy GString syntax to insert data
scriptLogger . info "My script $scriptTask with : $argument "
}
}
Listing 4.23: Usage of the script logger with Groovy GString message formatting
4.4.5 User Interactions and Inputs
The UserInteraction and UserInput API provides methods to directly communicate with the
user, via MessageBoxes or Input dialogs.
You should use the API only if you want do communicate directly with the user, because some
API calls may block and wait for user interaction. So you should not use the API for batch
jobs.
4.4.5.1 UserInteraction
The UserInteraction API provides methods to display messages to the user directly. In UI
mode the DaVinci Configurator will prompt a message box an will block until the user has
acknowledged the message. In console (non UI) mode, the message is logged to the console in
a user logger.
© 2017, Vector Informatik GmbH
40 of 250


Chapter 4.
AutomationInterface API Reference
The user logger will display error, warnings and infos by default. The logger name will not be
displayed.
The user interaction is good to display information where the user has to respond to immediately.
Please use the feature sparingly, because users do not like to acknowledge multiple messages for
a single script task execution.
The code block userInteractions{} provides the API inside of the block. The following
methods can be used:
• errorToUser()
• warnToUser()
• infoToUser()
• messageToUser(ELogLevel, Object)
The severity (error, warning, info) will change the display (icons, text) of the message box. No
other semantic is applied by the severity.
scriptTask (" TaskName ", DV_APPLICATION ){
code {
userInteractions {
warnToUser (" Warning displayed to the user as message box ")
}
// You could also write
userInteractions . errorToUser (" Error message for the user ")
}
}
Listing 4.24: UserInteraction from a script
© 2017, Vector Informatik GmbH
41 of 250



Chapter 4.
AutomationInterface API Reference
4.4.6 Script Error Handling
4.4.6.1 Script Exceptions
All exceptions thrown by any script task execution are sub types of ScriptingException.
Figure 4.4: ScriptingException and sub types
4.4.6.2 Script Task Abortion by Exception
The script task can throw an ScriptClientExecutionException to abort the execution of an
IScriptTask, and display a meaningful message to the user.
scriptTask (" TaskName "){
code {// Stop the execution and display a message to the user
t h r o w new S c r i p t C l i e n t E x e c u t i o n E x c e p t i o n ( " Message to the User " )
}
}
Listing 4.25: Stop script task execution by throwing an ScriptClientExecutionException
Exception with Console Return Code
An ScriptClientExecutionException with an return
code of type Integer will also abort the execution of the IScriptTask.
© 2017, Vector Informatik GmbH
42 of 250


Chapter 4.
AutomationInterface API Reference
But it also changes the return code of the console application, if the IScriptTask was executed
in the console application. This could be used when the console application of the DaVinci
Configurator is called for other scripts or batch files.
scriptTask (" TaskName "){
code {// The return code will be returned by the DvCmd.exe process
def r e t u r n C o d e = 50
t h r o w new S c r i p t C l i e n t E x e c u t i o n E x c e p t i o n ( returnCode , " Message to the
User ")
}
}
Listing 4.26: Changing
the
return
code
of
the
console
application
by
throwing
an
ScriptClientExecutionException
Reserved Return Codes
The returns codes 0-20 are reversed for internal use of the DaVinci
Configurator, and are not allowed to be used by a client script. Also negative returns codes are
not permitted.
4.4.6.3 Unhandled Exceptions from Tasks
When a script task execution throws any type of Exception (more precise Throwable) the
script task is marked as failed and the Exception is reported to the user.
© 2017, Vector Informatik GmbH
43 of 250


Chapter 4.
AutomationInterface API Reference
4.4.7 User defined Classes and Methods
You can define your own methods and classes in a script file. The methods a called like any
other method.
scriptTask (" Task "){
code {userMethod()
}
}
def u s e r M e t h o d () {
r e t u r n " U s e r S t ri n g "
}
Listing 4.27: Using your own defined method
Classes can be used like any other class. It is also possible to define multiple classes in the
script file.
scriptTask (" Task "){
code {
new Us er Cl as s () . u s e r M e t h o d ()
}
}
c l a s s U se rC la ss {
def u s e r M e t h o d () {
r e t u r n " R e t u r n V a l u e "
}
}
Listing 4.28: Using your own defined class
You can also create classes in different files, but then you have to write imports in your script
like in normal Groovy or Java code.
The script should be structured as any other development project, so if the script file gets too
big, please refactor the parts into multiple classes and so on.
daVinci Block
The classes and methods must be outside of the daVinci{ } block.
i m p o r t s t a t i c com . vector . cfg . a u t o m a t i o n . api . Sc ri pt Api .*
daVinci {
scriptTask (" Task "){
code {}
}
}
def u s e r M e t h o d () {}
c l a s s U serC lass {}
Listing 4.29: Using your own defined method with a daVinci block
Code Completion
Note that the code completion for the Automation API will not work auto-
matically in own defined classes and methods. You have to open for example a scriptCode{}
© 2017, Vector Informatik GmbH
44 of 250


Chapter 4.
AutomationInterface API Reference
block. The chapter 4.4.8 describes how to use the Automation API for your own defined classes
and methods.
4.4.8 Usage of Automation API in own defined Classes and Methods
In your own methods and classes the automation API is not automatically available differently
as inside of the script task code{} block. But it is often the case, that methods need access to
the automation API.
The class ScriptApi provides static methods as entry points into the automation API.
The static methods either return the API objects, or you could pass a Closure, which will
activate the API inside of the Closure.
4.4.8.1 Access the Automation API like the Script code{} Block
The ScriptApi.scriptCode(Closure) method provides access to all automation APIs the
same way as inside of the normal script code{} block.
This is useful, when you want to call script code API inside of your own methods and clas-
ses.
def yourMethod (){
// Needs access to an automation API
ScriptApi . scriptCode {
// API is now available
workflow . update ()
}
}
Listing 4.30: ScriptApi.scriptCode{} usage in own method
The ScriptApi.scriptCode() method can be used to call API in Java style.
def yourMethod (){
// Needs access to an automation API
ScriptApi . scriptCode (). workflow . update ()
}
Listing 4.31: ScriptApi.scriptCode() usage in own method
Java note: The ScriptApi.scriptCode() returns the IScriptExecutionContext.
4.4.8.2 Access the Project API of the current active Project
The ScriptApi.activeProject() method provides access to the project automation API of
the currently active project. This is useful, when you want to call project API inside of your
own methods and classes.
© 2017, Vector Informatik GmbH
45 of 250


Chapter 4.
AutomationInterface API Reference
def yourMethod (){
// Needs access to an automation API
ScriptApi . activeProject {
// Project API is now available
transaction {
// Now model modifications are allowed
}
}
}
Listing 4.32: ScriptApi.activeProject{} usage in own method
The ScriptApi.activeProject() method returns the current active IProject.
def yourMethod (){
// Needs access to an automation API
IProject theActiveProject = ScriptApi . activeProject ()
}
Listing 4.33: ScriptApi.activeProject() usage in own method
4.4.9 User defined Script Task Arguments in Commandline
A script task can create IScriptTaskUserDefinedArgument, which can be set by the user
(e.g. from the commandline) to pass user defined arguments to the script task execution. An
argument can be optional or required. The arguments are type safe and checked before the task
is executed.
Possible valueTypes are:
• String
• Boolean
• Void: For parameter where only the existence is relevant.
• File: The existence of the file is not checked by default. See argument validators.
• Path: Same as File
• Integer
• Long
• Double
The help text is automatically expanded with the help for user defined script task argu-
ments.
scriptTask (" TaskName "){
//
newUserDefinedArgument ( String argName , Class <T> valueType , String help )
def procArg = n e w U s e r D e f i n e d A r g u m e n t ( " p " , Void , " Enables the pr o c es sin g of
... ")
code {
if ( procArg . hasValue ) {
scriptLogger . info
" The argument -p was defined "
}
}
}
Listing 4.34: Script task UserDefined argument with no value
© 2017, Vector Informatik GmbH
46 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
/** newUserDefinedArgument(String argName, Class<T> valueType, String help)
*/
def countArg = n e w U s e r D e f i n e d A r g u m e n t ( " count " , Integer ,
" The amount of elements to create ")
def nameArg = n e w U s e r D e f i n e d A r g u m e n t ( " name " , String ,
" The element name to create ")
code {
int count = countArg . value
String name = nameArg . value
scriptLogger . info
" The arguments --name and -- count were $name , $count "
}
}
Listing 4.35: Define and use script task user defined arguments from commandline
scriptTask (" TaskName "){
/** newUserDefinedArgument(String argName, Class<T> valueType,
*
T defaultValue , String help )
*/
def procArg = n e w U s e r D e f i n e d A r g u m e n t ( " p " , Double , 25.0 , // The Default value
" Help text ... ")
code {
d o u b l e value = procArg . value
scriptLogger . info
" The argument -p was $value "
}
}
Listing 4.36: Script task UserDefined argument with default value
scriptTask (" TaskName "){
/** newUserDefinedArgument(String argName, Class<T> valueType, String help)
*/
def multiArg = n e w U s e r D e f i n e d A r g u m e n t ( " multiArg " , String , " Help text ... " )
/** The client calls the task with arguments:
*
-- multiArg " ArgOne " -- multiArg " ArgTwo "
*/
code {
List < String > values = multiArg . values
// Call values instead of value
scriptLogger . info
" The argument -- multiArg
had values : $values "
}
}
Listing 4.37: Script task UserDefined argument with multiple values
4.4.9.1 User defined Argument Validators
You could also specify a validator for the argument to check for special conditions, like the
file must exist. This is helpful to provide a quick feedback to the user, if the task would be
executable. Simply add the validator at the end of the newUserDefinedArgument() call. The
validator code is called when the input is checked.
© 2017, Vector Informatik GmbH
47 of 250


Chapter 4.
AutomationInterface API Reference
There are also default validators available, like:
• Constraints.IS_EXISTING_FOLDER
• Constraints.IS_EXISTING_FILE
• Constraints.IS_VALID_AUTOSAR_SHORT_NAME
Please see chapter 4.12.1 on page 165 for more available validators.
i m p o r t com . vector . cfg . business . C o n s t r a i n t s
scriptTask (" TaskName "){
/** newUserDefinedArgument(String argName, Class<T> valueType,
*
T defaultValue , String help , Consumer <T> validator )
*/
def contArg = n e w U s e r D e f i n e d A r g u m e n t ( " p " , String ,
" Help text ... ",
Constraints .
IS_VALID_AUTOSAR_SHORT_NAME_PATH )
code {
String value = contArg . value
scriptLogger . info
" The argument -p was $value "
}
}
Listing 4.38: Script task UserDefined argument with predefined validator
Or you implement your own validation logic, by passing a Closure, which throws an exception,
if the value is invalid.
scriptTask (" TaskName "){
/** newUserDefinedArgument(String argName, Class<T> valueType,
*
T defaultValue , String help , Consumer <T> validator )
*/
def procArg = n e w U s e r D e f i n e d A r g u m e n t ( " p " , Integer , 20 ,
" Help text ... ",
// The validator code
{ value ->
if ( value % 2) {
t h r o w new I l l e g a l A r g u m e n t E x c e p t i o n ( " The value has to be
even .")
}
})
code {
}
}
Listing 4.39: Script task UserDefined argument with own validator
© 2017, Vector Informatik GmbH
48 of 250


Chapter 4.
AutomationInterface API Reference
4.4.9.2 Call Script Task with Task Arguments
The commandline option taskArgs is used to specify the arguments passed to a script task to
execute:
--taskArgs <TASK_ARGS>
Passes arguments to the specified script tasks.
The arguments have the following syntax:
Syntax: --taskArgs "<TaskName>" "<Arguments to Task>"
E.g. --taskArgs "MyTask" "-s --projectCfg MyFile.cfg"
If only one task is executed, the "<TaskName>" can be omitted.
For multiple task arguments the following syntax apply:
Syntax: --taskArgs "<TaskName>" "<Arguments to Task>"
"<TaskName2>" "<Arguments to Task2>"
E.g. --taskArgs "MyTask" "-s --projectCfg MyFile.cfg"
"Task2" "-d --saveTo saveFile.txt"
Note: The newlines in the listing are only for visualization.
If the task name is not unique, your can specify the full qualified name with script name
--taskArgs "MyScript:MyTask" "-s --projectCfg MyFile.cfg"
Arguments with spaces inside the script task argument could be quoted with ""
--taskArgs "MyScript:MyTask" "-s --projectCfg \"Path to File\MyFile.cfg\" -d"
The task help of a task will print the possible arguments of a script task.
--scriptTaskHelp taskName
© 2017, Vector Informatik GmbH
49 of 250


Chapter 4.
AutomationInterface API Reference
4.4.10 Stateful Script Tasks
Script tasks normally have no state or cached data, but it can be useful to cache data during
an execution, or over multiple task executions. The IScriptExecutionContext provides two
methods to save and restore data for that purpose:
• getExecutionData() - caches data during one task execution
• getSessionData() - caches data over multiple task executions
Execution Data
Caches data during a single script task execution, which allows to save cal-
culated values or services needed in multiple parts of the task, without recalculating or creating
it. Note: When the task is executed again the executionData will be empty.
scriptTask (" TaskName "){
code {// Cache a value for the execution
executionData . myCacheValue = 500
def val = e x e c u t i o n D a t a . m y C a c h e V a l u e // Retrieve the value anywhere
scriptLogger . info
" The cached value is $val "
// Or access it from any place with ScriptApi . scriptCode like :
def sa m eV al ue = S cr ip tA pi . s c r i p t C o d e . e x e c u t i o n D a t a . m y C a c h e V a l u e
}
}
Listing 4.40: executionData - Cache and retrieve data during one script task execution
Session Data
Caches data over multiple task executions, which allows to implement a stateful
task, by saving and retrieving any data calculated by the task itself.
Caution: The data is saved globally so the usage of the sessionData can lead to memory
leaks or OutOfMemoryErrors. You have to take care not to store too much memory in the
sessionData.
The DaVinci Configurator will also free the sessionData, when the system run low on free
memory. So you have to deal with the fact, that the sessionData was freed, when the script
task getting executed again. But the data is not deallocated during a running execution.
scriptTask (" TaskName "){
// Setup - set the value the first time , this is only executed once ( during
initialization )
sessionData . myExecutionCount = 1
code {// Retrieve the value
def e x e c u t i o n C o u n t = s e s s i o n D a t a . m y E x e c u t i o n C o u n t
scriptLogger . info
" The task was executed $executionCount times "
// Update the value
sessionData . myExecutionCount = executionCount + 1
}
}
Listing 4.41: sessionData - Cache and retrieve data over multiple script task executions
© 2017, Vector Informatik GmbH
50 of 250


Chapter 4.
AutomationInterface API Reference
API usage
Both methods executionData and sessionData return the same API of type
IScriptTaskUserData.
The IScriptTaskUserData provides methods to retrieve and store properties by a key (like a
Map). The retrieval and store methods are Object based, so any Object can be a key. The
exception are Class instances (like String.class, which required that the value is an instance
of the Class).
On retrieval if a property does not exist an UnknownPropertyException is thrown. Properties
can be set multiple times and will override the old value. The keys of the properties used to
retrieve and store data are compared with Object.equals(Object) for equality.
The listing below describes the usage of the API:
scriptTask (" TaskName "){
code {
def val
// The sessionData and executionData have the same API
// You have multiple ways to set a value
executionData . myCacheId = " VALUE "
executionData . set (" myCacheId ", " VALUE ")
executionData [" myCacheId "] =
" VALUE "
// Or with classes for a service locator pattern
executionData . set ( Integer .class , 50)
// Possible for any Class
executionData [ Integer ] = 50
// There are the same ways to retrieve the values
val = executionData . myCacheId
val = executionData . get (" myCacheId ")
val = executionData [" myCacheId "]
// Or with classes for a service locator pattern
val
= executionData . get ( Integer . class )
val
= executionData [ Integer ]
// You can also ask if the property exists
b o o l e a n exists = e x e c u t i o n D a t a . has ( " my Ca ch eId " )
}
}
Listing 4.42: sessionData and executionData syntax samples
© 2017, Vector Informatik GmbH
51 of 250


Chapter 4.
AutomationInterface API Reference
4.5 Project Handling
Project handling comprises creating new projects, opening existing projects or accessing the
currently active project.
IProjectHandlingApi provides methods to access to the active project, for creating new pro-
jects and for opening existing projects.
getProjects() allows accessing the IProjectHandlingApi like a property.
scriptTask ('taskName ') {
code {
// IProjectHandlingApi is available as " projects " property
def p r o j e c t H a n d l i n g A p i = projects
}
}
Listing 4.43: Accessing IProjectHandlingApi as a property
projects(Closure) allows accessing the IProjectHandlingApi in a scope-like way.
scriptTask ('taskName ') {
code {
projects {
// IProjectHandlingApi is available inside this Closure
}
}
}
Listing 4.44: Accessing IProjectHandlingApi in a scope-like way
4.5.1 Projects
Projects in the AutomationInterface are represented by IProject instances. These instances
can be created by:
• Creating a new project
• Loading an existing project
You can only access IProject instances by using a Closure block at IProjectHandlingApi or
IProjectRef class. This shall prevent memory leaks, by not closing open projects.
4.5.2 Accessing the active Project
The IProjectHandlingApi provides access to the active project. The active project is either
(in descending order):
• The last IProject instance activated with a Closure block
– Stack-based - so multiple opened projects are possible and the last (inner) Closure
block is used.
• The passed project to a project task
• Or the loaded project in the current DaVinci Configurator in an application task
© 2017, Vector Informatik GmbH
52 of 250



Chapter 4.
AutomationInterface API Reference
The figure 4.5 describes the behavior to search for the active project of a script task.
Figure 4.5: Search for active project in getActiveProject()
It is possible that there is no active project, e.g. no project was loaded.
You can switch the active project, by calling the with(Closure) method on an IProject
instance.
// Retrieve theProject from other API like load a project
IProject theProject = ...;
theProject . with {
// Now theProject is the new active project inside of this closure
}
Listing 4.45: Switch the active project
To access the active project you can use the activeProject(Closure) and getActivePro-
ject() methods.
© 2017, Vector Informatik GmbH
53 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask ('taskName ') {
code {
if ( projects . p r o j e c t A c t i v e ) {
// active IProject is available as " activeProject " property
scriptLogger . info " Active project : ${ projects . activeProject . projectName }"
projects . activeProject {
// active IProject is available inside this Closure
scriptLogger . info " Active project : ${ projectName }"
}
else {
scriptLogger . info 'No project active '
}
}
}
Listing 4.46: Accessing the active IProject
isProjectActive() returns true if and only if there is an active IProject. If isProjec-
tActive() returns true it is safe to call getActiveProject().
getActiveProject() allows accessing the active IProject like a property.
activeProject(Closure) allows accessing the active IProject in a scope-like way. This will
enable the project specific API inside of the Closure.
4.5.3 Creating a new Project
The method createProject(Closure) creates a new project as specified by the given Closure.
Inside the closure the ICreateProjectApi is available.
The new project is not opened and usable until IProjectRef.openProject(Closure) is called
on the returned IProjectRef.
scriptTask ('taskName ', DV_APPLICATION ) {
code {
def n e w P r o j e c t = projects . c r e a t e P r o j e c t {
projectName ' NewProject '
projectFolder paths . resolveTempPath (' projectFolder ')
}
scriptLogger . info (" Project created and saved to: $newProject ")
// Now open the project
newProject . openProject {
// Inside here the project can be used
}
}
}
Listing 4.47: Creating a new project (mandatory parameters only)
The next is a more sophisticated example of creating a project with multiple settings:
© 2017, Vector Informatik GmbH
54 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask ('taskName ', DV_APPLICATION ) {
code {
def n e w P r o j e c t = projects . c r e a t e P r o j e c t {
projectName ' NewProject '
projectFolder paths . resolveTempPath (' projectFolder ')
general {
author ' projectAuthor '
version '0.9 '
}
postBuild {
loadable true
selectable true
}
folders . ecucFileStructure = ONE_FILE_PER_MODULE
folders . moduleFilesFolder = 'Appl / GenData '
folders . templatesFolder = 'Appl / Source '
target . vVIRTUALtargetSupport = false
daVinciDeveloper . createDaVinciDeveloperWorkspace = false
}
}
}
Listing 4.48: Creating a new project (with some optional parameters)
The ICreateProjectApi contains the methods to parameterize the creation of a new pro-
ject.
4.5.3.1 Mandatory Settings
Project Name
Specify the name newly created project with setProjectName(String). The
name given here is postfixed with ".dpa" for the new project’s .dpa file.
The following constraints apply:
• Constraints.IS_VALID_PROJECT_NAME 4.12.1 on page 165
Project Folder
Specify the folder in which to create the new project in with setProjectFol-
der(Object). The value given here is converted to Path using the converter ScriptConver-
ters.TO_SCRIPT_PATH 4.12.2 on page 166.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
4.5.3.2 General Settings
Use getGeneral() or general(Closure) to specify the new project’s general settings. The
provided settings are defined in ICreateProjectGeneralApi.
© 2017, Vector Informatik GmbH
55 of 250


Chapter 4.
AutomationInterface API Reference
Author
The author for the new project can be specified with setAuthor(String). This is an
optional parameter defaulting to the name of the currently logged in user if the parameter is
not provided explicitly.
The following constraints apply:
• Constraints.IS_NON_EMPTY_STRING 4.12.1 on page 165
Version
The version for the new project can be specified with setVersion(Object). This
is an optional parameter defaulting to "1.0" if the parameter is not provided explicitly. The
value given here is converted to IVersion using ScriptConverters.TO_VERSION 4.12.2 on
page 166.

The following constraints apply:
• Constraints.IS_NOT_NULL 4.12.1 on page 165
Description
The description for the new project can be specified with setDescription(String).
This is an optional parameter defaulting to "" if the parameter is not provided explicitly.
The following constraints apply:
• Constraints.IS_NOT_NULL 4.12.1 on page 165
Start Menu Entries
setCreateStartMenuEntries(boolean) defines whether or not to create
start menu entries for the new project. This is an optional parameter defaulting to false if the
parameter is not provided explicitly.
4.5.3.3 Target Settings
Use getTarget() or target(Closure) to specify the new project’s target settings for compiler,
derivatives and pin layouts.
ICreateProjectTargetApi contains the API to specify the new project’s target settings.
Available Derivatives
getAvailableDerivatives() returns all possible input values for set-
Derivative(DerivativeInfo).
Derivative
Set the derivative for the new project with setDerivative(DerivativeInfo).
This is an optional parameter defaulting to the first element in the collection returned by
getAvailableDerivatives() (or null if the collection is empty). The value given here must
be one of the values returned by getAvailableDerivatives().
Available Compilers
getAvailableCompilers() returns all possible input values for set-
Compiler(ImplementationProperty). Note: the available compilers depend on the currently
configured derivative. This method will return the empty collection if no derivative has been
configured at the time it is called.
© 2017, Vector Informatik GmbH
56 of 250


Chapter 4.
AutomationInterface API Reference
Compiler
Set the compiler for the new project with setCompiler(ImplementationProperty).
This is an optional parameter defaulting to the first element in the collection returned by ge-
tAvailableCompilers() (or null if the collection is empty). The value given here must be
one of the values returned by getAvailableCompilers().
Available Pin Layouts
getAvailablePinLayouts() returns all possible input values for set-
PinLayout(ImplementationProperty). Note: the available pin layouts depend on the cur-
rently configured derivative. This method will return the empty collection if no derivative has
been configured at the time it is called.
Pin Layout
Set the pin layout of the selected derivative for the new project with setPinLa-
yout(ImplementationProperty). This is an optional parameter defaulting to the first element
in the collection returned by getAvailablePinLayouts() (or null if the collection is empty).
The value given here must be one of the values returned by getAvailablePinLayouts().
vVIRTUALtarget Support
setvVIRTUALtargetSupport(boolean) specifies whether or not
to support the vVIRTUALtarget for the new project. This is an optional parameter defaulting to
false if the parameter is not provided explicitly. See also ICreateProjectApi.getVirtualTarget()
and ICreateProjectVirtualTargetApi for specifying further details (path to vVIRTUALtar-
get project, ...).
The following constraints apply:
• vVIRTUALtarget support may not be available depending on the purchased license
4.5.3.4 Post Build Settings
Use getPostBuild() or postBuild(Closure) to specify the new project’s post build settings
for Post-build selectable and or loadable projects.
ICreateProjectPostBuildApi contains the API to specify the new project’s post build set-
tings.
Post-build Loadable Support
setLoadable(boolean) sets whether or not to support Post-
build loadable for the new project. This is an optional parameter defaulting to false if the
parameter is not provided explicitly.
Post-Build Selectable Support
setSelectable(boolean) sets whether or not to support
Post-build selectable for the new project. This is an optional parameter defaulting to false if
the parameter is not provided explicitly.
4.5.3.5 Folders Settings
Use getFolders() or folders(Closure) to specify the new project’s folders settings.
ICreateProjectFolderApi contains the methods to specify the new project’s folders set-
tings.
© 2017, Vector Informatik GmbH
57 of 250


Chapter 4.
AutomationInterface API Reference
Module Files Folder
Set the module files folder for the new project with setModuleFilesFol-
der(Object). This is an optional parameter defaulting to ".\Appl\GenData" if the parameter
is not provided explicitly. The value given here is converted to Path using ScriptConver-
ters.TO_PATH 4.12.2 on page 166. Normally a relative path (to be interpreted relative to the
project folder) should be given here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
Templates Folder
Set the templates folder for the new project with setTemplatesFolder(Object).
This is an optional parameter defaulting to ".\Appl\Source" if the parameter is not provided
explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
Service Components Folder
Set the service component files folder for the new project with
setServiceComponentFilesFolder(Object).
This is an optional parameter defaulting to
".\Config\ServiceComponents" if the parameter is not provided explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
Application Components Folder
Set the application component files folder for the new project
with setApplicationComponentFilesFolder(Object). This is an optional parameter defaul-
ting to ".\Config\ApplicationComponents" if the parameter is not provided explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
Log Files Folder
Set the log files folder for the new project with setLogFilesFolder(Object).
This is an optional parameter defaulting to ".\Config\Log" if the parameter is not provided
explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
© 2017, Vector Informatik GmbH
58 of 250


Chapter 4.
AutomationInterface API Reference
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
Measurement And Calibration Files Folder
Set the measurement and calibration files folder
for the new project with setMeasurementAndCalibrationFilesFolder(Object). This is an
optional parameter defaulting to ".\Config\McData" if the parameter is not provided expli-
citly.
The folder object passed to the method is converted to Path using ScriptConverters.TO_PATH 4.12.2
on page 166. 
Normally a relative path (to be interpreted relative to the project folder) should
be given here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
AUTOSAR Files Folder
Set the AUTOSAR files folder for the new project with setAuto-
sarFilesFolder(Object). This is an optional parameter defaulting to ".\Config\AUTOSAR"
if the parameter is not provided explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165
ECUC File Structure
The literals of EEcucFileStructure define the alternative ECUC file
structures supported by the new project. The following alternatives are supported:
SINGLE_FILE results in a single ECUC file containing all module configurations.
ONE_FILE_PER_MODULE results in a separate ECUC file for each module configuration all located
in a common folder.
ONE_FILE_IN_SEPARATE_FOLDER_PER_MODULE results in a separate ECUC file for each module
configuration each located in its separate folder.
Set the ECUC file structure to use for the new project with the method setEcucFileStruc-
ture(EEcucFileStructure). This is an optional parameter defaulting to EEcucFileStruc-
ture.SINGLE_FILE if the parameter is not provided explicitly.
4.5.3.6 DaVinci Developer Settings
Use getDaVinciDeveloper() to specify the new project’s DaVinci Developer settings.
ICreateProjectDaVinciDeveloperApi contians the methods for specifying the new project’s
DaVinci Developer settings.
Create DEV Workspace
setCreateDaVinciDeveloperWorkspace(boolean) specifies whet-
her or not to create a DaVinci Developer workspace for the new project. This is an optional
parameter defaulting to true if and only if a compatible DaVinci Developer installation can be
detected and the parameter is not provided explicitly.
© 2017, Vector Informatik GmbH
59 of 250


Chapter 4.
AutomationInterface API Reference
DEV Executable
Set the DaVinci Developer executable for the new project with setDaVin-
ciDeveloperExecutable(Object). This is an optional parameter defaulting to the location of
a compatible DaVinci Developer installation (if there is any) if the parameter is not provided
explicitly.
The value given here is converted to Path using ScriptConverters.TO_SCRIPT_PATH 4.12.2 on
page 166.

The following constraints apply:
• Constraints.IS_COMPATIBLE_DA_VINCI_DEV_EXECUTABLE 4.12.1 on page 166
DEV Workspace
Set the DaVinci Developer workspace for the new project with setDaVin-
ciDeveloperWorkspace(Object). This is an optional parameter defaulting to
".\Config\Developer\<ProjectName>.dcf" if the parameter is not provided explicitly.
The value given here is converted to Path using ScriptConverters.TO_PATH 4.12.2 on page 166.
Normally a relative path (to be interpreted relative to the project folder) should be given
here.
The following constraints apply:
• Constraints.IS_DCF_FILE 4.12.1 on page 166
• Constraints.IS_CREATABLE_FOLDER 4.12.1 on page 165 (applies to the parent Path of
the given Path to the DaVinci Developer executable)
Import Mode Preset
setUseImportModePreset(boolean) specifies whether or not to use the
import mode preset for the new project. This is an optional parameter defaulting to true if
the parameter is not provided explicitly.
Object Locking
setLockCreatedObjects(boolean) specifies whether or not to lock created
objects for the new project. This is an optional parameter defaulting to true if the parameter
is not provided explicitly.
Selective Import
The literals of ESelectiveImport define the alternative modes for the se-
lective import into the DaVinci Developer workspace during project updates. The following
alternatives are supported:
ALL results in selective import for all elements.
COMMUNICATION_ONLY results in selective import for communication elements only.
Set the selective import mode for the new project with setSelectiveImport(ESelectiveImport).
This is an optional parameter defaulting to ESelectiveImport.ALL if the parameter is not pro-
vided explicitly.
4.5.3.7 vVIRTUALtarget Settings
Use getVirtualTarget() to specify the new project’s vVIRTUALtarget settings. The vVIR-
TUALtarget support may not be available depending on the purchased license.
© 2017, Vector Informatik GmbH
60 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (' ProjectCreation ', DV_APPLICATION ) {
code {
def p rj Fo ld er = paths . r e s o l v e T e m p P a t h ( ' p r o j e c t F o l d e r ')
def n e w P r o j e c t = projects . c r e a t e P r o j e c t {
projectName ' tpVttFullyCustom '
projectFolder prjFolder
target {
vVIRTUALtargetSupport = true
}
virtualTarget {
createVirtualTargetProjectFile = true
virtualTargetExecutable = getCustomVttExe ()
virtualTargetProject = new File ( prjFolder . toFile () , "/ MyVtt / custom .
vttproj ")
}
}
scriptLogger . info (" Project created and saved ")
}
}
Listing 4.49: Creating a new project with custom VTT settings
Create vVIRTUALtarget project file
setCreateVirtualTargetProjectFile(boolean) spe-
cifies whether or not to create a vVIRTUALtarget project file for the new project.
This
is an optional parameter defaulting to true. However the vVIRTUALtarget project file is
only created when ICreateProjectTargetApi.vVIRTUALtargetSupport(boolean) evaluates
to true.
vVIRTUALtarget Project
Set the path to the vVIRTUALtarget project (*.vttproj) for the
new project with setVirtualTargetProject(Object). This is an optional parameter defaul-
ting to ’.\Config\VTT\ProjectName.vttproj’ if the parameter is not provided explicitly. See also
ICreateProjectTargetApi.setvVIRTUALtargetSupport(boolean) and ICreateProjectVir-
tualTargetApi.setCreateVirtualTargetProjectFile(boolean) at which both have to be
true to force the creation of the vVIRTUALtarget project.
The value given here is converted to Path using ScriptConverters.TO_SCRIPT_PATH 4.12.2 on
page 166.

vVIRTUALtarget Executable
Set the vVIRTUALtarget executable (VttCmd.exe) for the new
project with setVirtualTargetExecutable(Object). This is an optional parameter defaulting
to the location of the currently registered installation (if there is any) if the parameter is not
provided explicitly.
The value given here is converted to Path using ScriptConverters.TO_SCRIPT_PATH 4.12.2 on
page 166.

© 2017, Vector Informatik GmbH
61 of 250


Chapter 4.
AutomationInterface API Reference
4.5.4 Opening an existing Project
You can open an existing DaVinci Configurator Dpa project with the automation interface.
The method openProject(Object, Closure) opens the project at the given .dpa file location,
delegates the given code to the opened IProject.
The project is automatically closed after leaving the Closure code of the openProject(Object,
Closure) method.
The Object given as .dpa file is converted to Path using ScriptConverters.TO_SCRIPT_PATH 4.12.2
on page 166

scriptTask ('taskName ', DV_APPLICATION ) {
code {
// replace getDpaFileToLoad () with the path to the . dpa file to be loaded
projects . openProject ( getDpaFileToLoad ()) {
// the opened IProject is available inside this Closure
scriptLogger . info 'Project loaded and ready '
}
}
}
Listing 4.50: Opening a project from .dpa file
4.5.4.1 Parameterized Project Load
You can also configure how a Dpa project is loaded, e.g. by disabling the generators.
The method parameterizeProjectLoad(Closure) returns a handle on the project specified by
the given Closure. Using the IOpenDpaProjectApi, the Closure may further customize the
project’s opening procedure.
The project is not opened until openProject() is called on the returned IProjectRef.
scriptTask ('taskName ', DV_APPLICATION ) {
code {
def project = projects . p a r a m e t e r i z e P r o j e c t L o a d {
// replace getDpaFileToLoad () with the path to the . dpa file to be loaded
dpaFile getDpaFileToLoad ()
// prevent activation of generators and validation
loadGenerators false
enableValidation false
}
project . openProject {
// the opened IProject is available inside this Closure
scriptLogger . info 'Project loaded and ready '
}
}
}
Listing 4.51: Parameterizing the project open procedure
IOpenProjectApi contains the methods for parameterizing the process of opening a project.
© 2017, Vector Informatik GmbH
62 of 250


Chapter 4.
AutomationInterface API Reference
DPA File
The method setDpaFile(Object) sets the .dpa file of the project to be opened.
The value given here is converted to Path using ScriptConverters.TO_SCRIPT_PATH 4.12.2 on
page 166.

Generators
Using setLoadGenerators(boolean) specifies whether or not to activate genera-
tors (including their validations) for the opened project.
Validation
setEnableValidation(boolean) specifies whether or not to activate validation
for the opened project.
4.5.4.2 Open Project Details
IProjectRef is a handle on a project not yet loaded but ready to be opened. This could be
used to open the project.
IProjectRef instances can be obtained from form the following methods:
• IProjectHandlingApi.createProject(Closure) 4.5.3 on page 54
• IProjectHandlingApi.parameterizeProjectLoad(Closure) 4.5.4 on the preceding page
The IProject is not really opened until IProjectRef.openProject(Closure) is called. Here,
the project is opened and the given Closure is executed on the opened project. When IPro-
jectRef.openProject(Closure) returns the project has already been closed.
4.5.5 Saving a Project
IProject.saveProject() saves the current state including all model changes of the project to
disc.
scriptTask ('taskName ', DV_APPLICATION ) {
code {
// replace getDpaFileToLoad () with the path to the . dpa file to be loaded
def project = projects . o p e n P r o j e c t ( g e t D p a F i l e T o L o a d () ) {
// modify the opened project
transaction {
operations . activateModuleConfiguration ( sipDefRef . EcuC )
}
// save the modified project
saveProject ()
}
}
}
Listing 4.52: Opening, modifying and saving a project
© 2017, Vector Informatik GmbH
63 of 250


Chapter 4.
AutomationInterface API Reference
4.5.6 Opening AUTOSAR Files as Project
Sometimes it could be helpful to load AUTOSAR arxml files instead of a full-fledged DaVinci
Configurator project.
For example to modify the content of a file for test cases with the
AutomationInterface, instead of using an XML editor.
You could load multiple arxml files into a temporary project, which allowed to read and write
the loaded file content with the normal model APIs.
The following elements are loaded by default, without specifying the AUTOSAR files:
• ModuleDefinitions from the SIP: To allow the usage of the BswmdModel
• AUTOSAR standard definition: Refinement resolution of definitions
Caution: Some APIs and services may not be available for this type of project, like:
• Update workflow: You can’t update a non existing project
• Validation: The validation is disabled by default
• Generation: The generators are not loaded by default
The method parameterizeArxmlFileLoad(Closure) allows to load multiple arxml files into a
temporary project. The given Closure is used to customize the project’s opening procedure by
the IOpenArxmlFilesProjectApi.
The arxml file project is not opened until openProject() is called on the returned IPro-
jectRef.
scriptTask ('taskName ', DV_APPLICATION ) {
code {
def project = projects . p a r a m e t e r i z e A r x m l F i l e L o a d {
// Add here your arxml files to load
arxmlFiles ( arxmlFilesToLoad )
rawAutosarDataMode = true
}project.openProject {
scriptLogger . info 'Project loaded and ready '
}
}
}
Listing 4.53: Opening Arxml files as project
Arxml Files
Add arxml files to load with the method arxmlFiles(Collection). Multiple
files and method calls are allowed. The given values are converted to Path instances using
ScriptConverters.TO_SCRIPT_PATH 4.12.2 on page 166.
Raw AUTOSAR Data Mode
the method setRawAutosarDataMode(boolean) specifies whet-
her or not to use the raw ATUOSAR data model.
Currently only this mode is supported! You have to set rawAutosarDataMode = true.
Note: In raw mode most of the provided services and APIs will disabled, see below for de-
tails.
© 2017, Vector Informatik GmbH
64 of 250


Chapter 4.
AutomationInterface API Reference
4.5.6.1 Raw AUTOSAR models as Project
Sometimes it could be helpful to create an empty AUTOSAR model or load single ARXML
file. This is called raw mode (IProjectHandlingRawApi).
You could for example create an empty AUTOSAR model add elements and then export the
snippet as an ARXML file.
In raw mode most of the provided services and APIs will disabled, like:
• Ecuc access
• BswmdModel support
• Generation
• Validation
• Workflow
• Domain API
• ChangeInspector
• and more
Empty AUTOSAR model
The emptyAutosarModel(String, Closure) method creates a
new empty AUTOSAR model, only containing one MIARPackage created by this method with
the path AsrPath.
The passed AUTOSAR version defines the version of the AUTOSAR model, the version is
specified in the format "4.2.1" or "4.0.3", ...
scriptTask (" taskName ", DV_APPLICATION ) {
code {
def a s r P k g T o C r e a t e = AsrPath . create ( " / MyPkg " )
def a u t o s a r V e r s i o n = " 4.2.1 "
projects . raw . emptyAutosarModel ( autosarVersion , asrPkgToCreate ) {
modelProject , myPkg ->
// modelProject is the created IProject
// myPkg is the MIARPackage specified above with asrPkgToCreate
// Now you could use the model like any other project :
transaction {
// For example create a new sub package :
def mySubPkg = myPkg . s u b P a c k a g e . b y N a m e O r C r e a t e ( " MySubPkg " )
}
// Then export the package content
def e x p o r t F o l d e r = paths . g e t T e m p F o l d e r ()
persistency . modelExport . exportModelTree ( exportFolder , myPkg )
}
}
}
Listing 4.54: Create an empty AUTOSAR model
© 2017, Vector Informatik GmbH
65 of 250


Chapter 4.
AutomationInterface API Reference
4.6 Model
4.6.1 Introduction
The model API provides means to retrieve AUTOSAR model content and to modify AUTO-
SAR data. This comprises Ecuc data (module configurations and their content) and System
Description data.
In this chapter you’ll first find a brief introduction into the model handling. Here you also find
some simple cut-and-paste examples which allow starting easily with low effort. Subsequent
sections describe more and more details which you can read if required.
Chapter 5 on page 173 may additionally be useful to understand detailed concepts and as a
reference to handle special use cases.
4.6.2 Getting Started
The model API basically provides two different approaches:
• The MDF model is the low level AUTOSAR model. It stores all data read from AUTO-
SAR XML files. Its structure is base on the AUTOSAR MetaModel. In 5.1 on page 173
you find detailed information about this model.
• The BswmdModel is a model which wraps the MDF model to provide convenient and
type-safe access to the Ecuc data. It contains, definition based classes for module con-
figurations, containers, parameters and references. The class CanGeneral for example
as type-safe implementation in contrast to the generic AUTOSAR class MIContainer in
MDF.
It is strongly recommended to use the BswmdModel model to deal with Ecuc data
because it simplifies scripting a lot.
4.6.2.1 Read the ActiveEcuc
This section provides some typical examples as a brief introduction for reading the Ecuc by
means of the BswmdModel. See chapter 4.6.3.2 on page 75 for more details.
The following example specifies no types for the local variables. It therefore requires no import
statements. A drawback on the other hand is that the type is only known at runtime and you
have no type support in the IDE:
© 2017, Vector Informatik GmbH
66 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName "){
code {
// Gets the module DefRef searching all definitions of this SIP
def m o d u l e D e f R e f = si pD ef Re f . EcuC
// Creates all BswmdModel instances with this definition . A List <EcuC >
in this case .
def e c u c M o d u l e s = b s w m d M o d e l ( m o d u l e D e f R e f )
// Gets the EcucGeneral container of the first found module instance
def ecuc = e c u c M o d u l e s . single
def e c u c G e n e r a l = ecuc . e c u c G e n e r a l
// Gets an ( enum ) parameter of this container
def cpuType = e c u c G e n e r a l . CPUType
}
}
Listing 4.55: Read with BswmdModel objects starting with a module DefRef (no type
declaration)
In contrast to the listing above the next one implements the same behavior but specifies all
types:
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . EcuC
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l . cputype .
CPUType
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l . cputype .
ECPUType
scriptTask (" TaskName "){
code {
// Gets the ecuc module configuration
EcuC ecuc = bswmdModel ( EcuC ). single
// Gets the EcucGeneral container
EcucGeneral ecucGeneral = ecuc . ecucGeneral
// Gets an enum parameter of this container
CPUType cpuType = ecucGeneral . CPUType
if ( cpuType . value == ECPUType . CPU32Bit ) {
"Do something ... "
}
}
}
Listing 4.56: Read with BswmdModel objects starting with a module class (strong typing)
© 2017, Vector Informatik GmbH
67 of 250


Chapter 4.
AutomationInterface API Reference
The bswmdModel() API takes an optional closure argument which is being called for each
created BswmdModel object. This object is used as parameter of the closure:
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . EcuC
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l . cputype .
ECPUType
scriptTask (" TaskName "){
code {
// Executes the closure with all instances of this definition
bswmdModel ( EcuC ) {
// The related BswmdModel instance is parameter of this closure
ecuc ->
if ( ecuc . e c u c G e n e r a l . CPUType . value == ECPUType . CPU32Bit ) {
"Do something ... "
}
}
}
}
Listing 4.57: Read with BswmdModel objects with closure argument
Additionally to the DefRef, an already available MDF model object can be specified to create
the related BswmdModel object for it:
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l . cputype .
ECPUType
scriptTask (" TaskName "){
code {
// Gets the MDF model instance of the Ecuc General container
def co nt ai ne r = mdfModel ( E c u c G e n e r a l . DefRef ) . single
// Executes the closure with this MDF object instance
bswmdModel ( container , EcucGeneral . DefRef ) {
// The related BswmdModel instance is parameter of this closure
ecucGeneral ->
if ( e c u c G e n e r a l . CPUType . value == ECPUType . CPU32Bit ) {
"Do something ... "
}
}
}
}
Listing 4.58: Read with BswmdModel object for an MDF model object
© 2017, Vector Informatik GmbH
68 of 250


Chapter 4.
AutomationInterface API Reference
4.6.2.2 Write the ActiveEcuc
This section provides some typical examples as a brief introduction for writing the Ecuc by
means of the BswmdModel. See chapter 4.6.3.3 on page 76 for more details.
For the most cases the entry point for writing the ActiveEcuc is a (existing) module configuration
object which can be retrieved with the bswmdModel() API. Because the model is in read-only
state by default, every call to an API which creates or deletes elements has to be executed in
a transaction() block.
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . EcuC
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
scriptTask (" TaskName "){
code {
transaction {
// Gets the first found ecuc module instance
EcuC ecuc = bswmdModel ( EcuC ). single
// Gets the EcucGeneral container or create one if it is missing
EcucGeneral ecucGeneral = ecuc . ecucGeneralOrCreate
// Gets an boolean parameter of this container or create one if it
is missing
def e c u C S a f e B s w C h e c k s = e c u c G e n e r a l . e c u C S a f e B s w C h e c k s O r C r e a t e
// Sets the parameter value to true
ecuCSafeBswChecks . value = true
}}}
Listing 4.59: Write with BswmdModel required/optional objects
© 2017, Vector Informatik GmbH
69 of 250


Chapter 4.
AutomationInterface API Reference
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . EcuC
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c h a r d w a r e .
ecuccoredefinition . EcucCoreDefinition
scriptTask (" TaskName "){
code {
transaction {
// Gets the first found ecuc module instance
EcuC ecuc = bswmdModel ( EcuC ). single
// Gets the EcucCoreDefinition list ( creates ecucHardware if it is
missing )
def e c u c C o r e D e f i n i t i o n s = ecuc . e c u c H a r d w a r e O r C r e a t e .
ecucCoreDefinition
// Adds two EcucCores
EcucCoreDefinition core0 = ecucCoreDefinitions . createAndAdd ("
EcucCore0 ")
EcucCoreDefinition core1 = ecucCoreDefinitions . createAndAdd ("
EcucCore1 ")
if ( e c u c C o r e D e f i n i t i o n s . exists ( " E cu cC ore0 " ) ) {
// Sets EcucCoreId to 0
ecucCoreDefinitions . byName (" EcucCore0 "). ecucCoreId . setValue (0) ;
}
// Creates a new EcucCore by method ' byNameOrCreate '
EcucCoreDefinition core2 = ecucCoreDefinitions . byNameOrCreate ("
EcucCore2 ");
}}}
Listing 4.60: Write with BswmdModel multiple objects
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . EcuC
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
scriptTask (" TaskName "){
code {
transaction {
// Gets the first found ecuc module instance
EcuC ecuc = bswmdModel ( EcuC ). single
// Duplicates container ' EcucGeneral ' and all its children
EcucGeneral ecucGeneral_Dup = ecuc . ecucGeneral . duplicate ()
}
}
}
Listing 4.61: Write with BswmdModel - Duplicate a container
© 2017, Vector Informatik GmbH
70 of 250


Chapter 4.
AutomationInterface API Reference
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
scriptTask (" TaskName "){
code {
transaction {
// Gets the first found ecuc module instance
EcucGeneral ecucGeneral = bswmdModel ( EcucGeneral ). single
// Deletes ' ecucGeneral ' from model
ecucGeneral . moRemove ()
// Checks if the container ' ecucGeneral ' was removed from repository
if ( e c u c G e n e r a l . m o I s R e m o v e d () ) {
"Do something ... "
}
}
}
}
Listing 4.62: Write with BswmdModel - Delete elements
© 2017, Vector Informatik GmbH
71 of 250


Chapter 4.
AutomationInterface API Reference
4.6.2.3 Read the SystemDescription
This section contains only one example for reading the SystemDescription by means of the MDF
model. See chapter 4.6.4.1 on page 79 for more details.
// Required imports
i m p o r t com . vector . cfg . model . mdf . ar4x . s w c o m p o n e n t t e m p l a t e . datatype .
dataprototypes .*
i m p o r t com . vector . cfg . model . mdf . ar4x . c o m m o n s t r u c t u r e . d a t a d e f p r o p e r t i e s .*
scriptTask (" mdfModel ", DV_PROJECT ){
code {
// Create a type - safe AUTOSAR path
def asrPath =
AsrPath . create ("/ PortInterfaces / PiSignal_Dummy / DeSignal_Dummy ",
MIVariableDataPrototype )
// Enter the MDF model tree starting at the object with this path
mdfModel ( asrPath ) { MIVariableDataPrototype prototype ->
// Traverse down to the swDataDefProps
prototype . swDataDefProps { MISwDataDefProps swDataDefPropsParam ->
// swDataDefPropsVariant is a List < MISwDataDefPropsConditional >
// Execute the following for ALL elements of this List
swDataDefPropsParam . swDataDefPropsVariant {
MISwDataDefPropsConditional swDataDefPropsCondParam ->
// Resolve the dataConstr reference ( type MIDataConstr )
def target = s w D a t a D e f P r o p s C o n d P a r a m . dat aC o n st r . refTarget
// Get the swCalibrationAccess enum value
def access = s w D a t a D e f P r o p s C o n d P a r a m . s w C a l i b r a t i o n A c c e s s
a s s e r t access == M I S w C a l i b r a t i o n A c c e s s E n u m . N O T _ A C C E S S I B L E
}
}
}
}
}
Listing 4.63: Read system description starting with an AUTOSAR path in closure
The same sample as above, but in property access style instead of closures:
© 2017, Vector Informatik GmbH
72 of 250


Chapter 4.
AutomationInterface API Reference
// Create a type - safe AUTOSAR path
def asrPath =
AsrPath . create ("/ PortInterfaces / PiSignal_Dummy / DeSignal_Dummy ",
MIVariableDataPrototype )
def pr ot ot yp e = mdfModel ( asrPath )
def s w D a t a D e f P r o p s P a r a m = pr ot ot yp e . s w D a t a D e f P r o p s
// Execute the following for ALL swDataDefPropsVariant
swDataDefPropsParam . swDataDefPropsVariant . each { swDataDefPropsCondParam ->
//
Resolve the dataConstr reference ( type MIDataConstr )
def target = s w D a t a D e f P r o p s C o n d P a r a m . d a t a C o n s t r . refTarget
// Get the swCalibrationAccess enum value
def access = s w D a t a D e f P r o p s C o n d P a r a m . s w C a l i b r a t i o n A c c e s s
a s s e r t access == M I S w C a l i b r a t i o n A c c e s s E n u m . N O T _ A C C E S S I B L E
}
Listing 4.64: Read system description starting with an AUTOSAR path in property style
4.6.2.4 Write the SystemDescription
Writing the system description looks quite similar to the reading, but you have to use methods
like (see chapter 4.6.4.3 on page 82 for more details):
• get<Element>OrCreate() or <element>OrCreate
• createAndAdd()
• byNameOrCreate()
You have to open a transaction before you can modify the MDF model, see chapter 4.6.6 on
page 95 
for details.
The following samples show the different types of write API:
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) { dataPrototype ->
dataPrototype . category = " NewCategory "
}
}
Listing 4.65: Changing a simple property of an MIVariableDataPrototype
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) {
int count = 0
a s s e r t a dm in Da ta == null
adminDataOrCreate {
count ++
}
a s s e r t count == 1
a s s e r t adminData != null
}
}
Listing 4.66: Creating non-existing member by navigating into its content with OrCreate()
© 2017, Vector Informatik GmbH
73 of 250


Chapter 4.
AutomationInterface API Reference
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) {
a s s e r t a dm in Da ta . sdg . empty
adminData {
sdg . createAndAdd ( MISdg ) {
gid = " NewGidValue "
}
}
a s s e r t a dm in Da ta . sdg . first . gid == " N e w G i d V a l u e "
}
}
Listing 4.67: Creating new members of child lists with createAndAdd() by type
transaction {
// The path points to an MISenderReceiverInterface
mdfModel ( asrPath ) { sendRecIf ->
def dataList = s en dR ec If . d a t a E l e m e n t
def d a t a E l e m e n t = dataList . b y N a m e O r C r e a t e ( " M y D a t a E l e m e n t " )
dataElement . name = " NewName "
def d a t a E l e m e n t 2 = dataList . b y N a m e O r C r e a t e ( " NewName " )
a s s e r t d a t a E l e m e n t == d a t a E l e m e n t 2
}
}
Listing 4.68: Updating existing members of child lists with byNameOrCreate() by type
© 2017, Vector Informatik GmbH
74 of 250


Chapter 4.
AutomationInterface API Reference
4.6.3 BswmdModel in AutomationInterface
The AutomationInterface contains a generated BswmdModel. The BswmdModel provides clas-
ses for all Ecuc elements of the AUTOSAR model (ModuleConfigurations, Containers, Para-
meter, References). The BswmdModel is automatically generated from the SIP of the DaVinci
Configurator.
You should use the BswmdModel whenever possible to access Ecuc elements of the AUTOSAR
model. For accessing the Ecuc elements with the BswmdModel, see chapter 4.6.3.2.
For a detailed description of the BswmdModel, see chapter 5.3.1 on page 187.
4.6.3.1 BswmdModel Package and Class Names
The generated model is contained in the Java package com.vector.cfg.automation.model.ecuc.
Every Module has its own sub packages with the name:
• com.vector.cfg.automation.model.ecuc.<AUTOSAR-PKG>.<SHORTNAME>
– e.g. com.vector.cfg.automation.model.ecuc.microsar.dio
– e.g. com.vector.cfg.automation.model.ecuc.autosar.ecucdefs.can
The packages then contain the class of the element like Dio for the module. The full path would
be com.vector.cfg.automation.model.ecuc.microsar.dio.Dio.
For the container DioGeneral it would be:
• com.vector.cfg.automation.model.ecuc.microsar.dio.diogeneral.DioGeneral
To use the BswmdModel in script files, you have to write an import, when accessing the
class:
// The required BswmdModel import of the class Dio
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . dio . Dio
scriptTask (" TaskName "){
code {Dio.DefRef //Usage of the class Dio
}
}
Listing 4.69: BswmdModel usage with import
4.6.3.2 Reading with BswmdModel
The bswmdModel() methods provide entry points to start navigation through the ActiveEcuc.
Client code can use the Closure overloads to navigate into the content of the found bswmd ob-
jects. Inside the called closure the related bswmd object is available as closure parameter.
The following types of entry points are provided here:
• bswmdModel(WrappedTypedDefRef) searches all objects with the specified definition and
returns the BswmdModel instances.
• bswmdModel(Class) searches all objects with the specified class and returns the Bswmd-
Model instances. Finds the same elements as above.
© 2017, Vector Informatik GmbH
75 of 250


Chapter 4.
AutomationInterface API Reference
• bswmdModel(MIHasDefinition, WrappedTypedDefRef) returns the BswmdModel instance
for the provided MDF model instance.
• bswmdModel(Class, String) searches all objects with the specified class and the mat-
ching path, see IMdfModelApi.mdfModel(String) or chapter 4.6.4.2 on page 81 for de-
tails.
When a closure is being used, the object found by bswmdModel() is provided as parameter when
the closure is called.
The bswmdModel() method itself returns the found objects too. Retrieving the objects member
and children (Container, Parameter) as properties or methods are then possible directly using
the returned object.
Examples:
code {
// Gets the ecuc module configuration
EcuC ecuc = bswmdModel ( EcuC ). single
}
Listing 4.70: Read with BswmdModel the EcuC module configuration
Or the same with a DefRef instead of a Class:
code {
// Gets the ecuc module configuration
EcuC ecuc = bswmdModel ( EcuC . DefRef ). single
}
Listing 4.71: Read with BswmdModel the EcuC module configuration with DefRef
For more usage samples please see chapter 4.6.2.1 on page 66.
4.6.3.3 Writing with BswmdModel
As well as for reading with BswmdModel the entry points for writing with BswmdModel are also
the bswmdModel() methods. There has to be at least one existing element in the ActiveEcuc
from which the navigation can be started. For the most cases the entry point for writing the
ActiveEcuc is the module configuration.
Example:
code {
transaction {
// Gets the ecuc module configuration
EcuC ecuc = bswmdModel ( EcuC ). single
// Gets the EcucGeneral container or create one if it is missing
EcucGeneral ecucGeneral = ecuc . ecucGeneralOrCreate
}
}
Listing 4.72: Write with BswmdModel the EcucGeneral container
For more usage samples please see chapter 4.6.2.2 on page 69.
The model is in read-only state by default, so no objects could be created. For this reason all
calls which creates or deletes elements has to be executed within a transaction() block.
© 2017, Vector Informatik GmbH
76 of 250


Chapter 4.
AutomationInterface API Reference
See 5.3.1.9 on page 195 for more details to the BswmdModel write API.
4.6.3.4 Sip DefRefs
The sipDefRef API provides access to retrieve generated DefRef instances from the SIP without
knowing the correct Java/Groovy imports. This is mainly useful in script files, where no IDE
helps with the imports.
If you are using an Automation Script Project you can ignore this API and use the
DefRefs provided by the generated classes, which is superior to this API, because they are
typesafe and compile time checked. See 4.6.3.5 for details.
The listing show the usage of the sipDefRef API with short names and definition paths.
code {
def t he De fR ef
// You can call sipDefRef .< ShortName >
theDefRef = sipDefRef . EcucGeneral
theDefRef = sipDefRef . Dio
theDefRef = sipDefRef . DioPort
// Or you can use the [] notation
theDefRef = sipDefRef [" Dio "]
theDefRef = sipDefRef [" DioChannelGroup "]
// If the DefRef is not unique you have to specify the full definition
theDefRef = sipDefRef ["/ MICROSAR / EcuC / EcucGeneral "]
theDefRef = sipDefRef ["/ MICROSAR / Dio "]
theDefRef = sipDefRef ["/ MICROSAR / Dio / DioConfig / DioPort "]
}
Listing 4.73: Usage of the sipDefRef API to retrieve DefRefs in script files
4.6.3.5 BswmdModel DefRefs
The generated BswmdModel classes contain DefRef instances for each definition element (Mo-
dules, Containers, Parameters). You should always prefer this API over the Sip DefRefs, because
this is type safe and checked during compile time.
You can use the DefRefs by calling <ModelClassName>.DefRef. The literal DefRef is a static
constant in the generated classes.
For simple parameters like Strings, Integer there is no generated class, so you have to call the
method on its parent container like <ParentContainerClass>.<ParameterShortName>DefRef.
There exist generated classes for Parameters of type Enumeration and References to Container
and therefore you have both ways to access the DefRef:
• <ModelClassName>.DefRef or
• <ParentContainerClass>.<ParameterShortName>DefRef
To use the DefRefs of the classes you have to add imports in script files, see chapter 4.6.3.1 on
page 75 
for required import names.
© 2017, Vector Informatik GmbH
77 of 250


Chapter 4.
AutomationInterface API Reference
// Required imports
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l .
EcucGeneral
i m p o r t com . vector . cfg . a u t o m a t i o n . model . ecuc . microsar . ecuc . e c u c g e n e r a l . cputype .
CPUType
scriptTask (" TaskName "){
code {
def t he De fR ef
// DefRef from EcucGeneral container
theDefRef = EcucGeneral . DefRef
// DefRef from generated parameter
theDefRef = CPUType . DefRef
// Or the same
theDefRef = EcucGeneral . CPUTypeDefRef
// DefRef from simple parameter
theDefRef = EcucGeneral . AtomicBitAccessInBitfieldDefRef
theDefRef = EcucGeneral . DummyFunctionDefRef
}
}
Listing 4.74: Usage of generated DefRefs form the bswmd model
4.6.3.6 Switching from Domain Models to BswmdModel
You can switch from domain models to the BswmdModel, if the domain model is backed by Acti-
veEcuC elements. Please read the documentation of the different domain models, for whether
this is possible for a certain domain model.
To switch from a domain model to the BswmdModel, you can call one of the methods for IHas-
ModelObjects like, bswmdModel(IHasModelObject, WrappedTypedDefRef). But you need a
DefRef to get the type safe BswmdModel object. The domain model documents, which DefRef
must be used for the certain domain model object.
// Domain model object of the communication domain
ICanController canDomainModel = ...
def c a n C o n t r o l l e r B s w m d = c a n D o m a i n M o d e l . b s w m d M o d e l ( C a n C o n t r o l l e r . DefRef )
// Or use a closure
canDomainModel . bswmdModel ( CanController . DefRef ){ canControllerBswmd ->
// Use the bswmd object
}
Listing 4.75: Switch from a domain model object to the corresponding BswmdModel object
4.6.4 MDF Model in AutomationInterface
Access to the MDF model is required in all areas which are not covered by the BswmdModel.
This is the SystemDescription (non-Ecuc data) and details of the Ecuc model which are not
covered by the BswmdModel.
The MDF model implements the raw AUTOSAR data model and is based on the AUTOSAR
meta-model. For details about the MDF model, see chapter 5.1 on page 173.
© 2017, Vector Informatik GmbH
78 of 250


Chapter 4.
AutomationInterface API Reference
For more details concerning the methods mentioned in this chapter, you should also read the
JavaDoc sections in the described interfaces and classes.
4.6.4.1 Reading the MDF Model
The mdfModel() methods provide entry points to start navigation through the MDF model.
Client code can use the Closure overloads to navigate into the content of the found MDF
objects. Inside the called closure the related MDF object is available as closure parameter.
The following types of entry points are provided here:
• mdfModel(TypedAsrPath) searches an object with the specified AUTOSAR path
• mdfModel(TypedDefRef) searches all objects with the specified definition
• mdfModel(Class) searches all objects with the specified model type (meta class)
• mdfModel(String) searches for model elements with by different properties, see 4.6.4.2
on page 81 for details.
When a closure is being used, the object found by mdfModel() is provided as parameter when
this closure is called:
code {
// Create a type - safe AUTOSAR path for a MIVariableDataPrototype
def asrPath =
AsrPath . create ("/ PortInterfaces / PiSignal_Dummy / DeSignal_Dummy ",
MIVariableDataPrototype )
// Use the Java - Style syntax
def d a t a D e f P r o p s M d f = mdfModel ( asrPath ) . s w D a t a D e f P r o p s
// Or use the Closure syntax to navigate
// Enter the MDF model tree starting at the object with this path
mdfModel ( asrPath ) {
// Parameter type is MIVariableDataPrototype :
dataPrototype ->
// Traverse down to the swDataDefProps
dataPrototype . swDataDefProps { MISwDataDefProps props
println "Do something ... "
}
}
}
Listing 4.76: Navigate into an MDF object starting with an AUTOSAR path
The mdfModel() method itself returns the found object too. Retrieving the objects member
(as property) is then possible directly using the returned object.
An alternative is using a closure to navigate into the MDF object and access its member
there:
© 2017, Vector Informatik GmbH
79 of 250


Chapter 4.
AutomationInterface API Reference
// Get an MDF object and get its members directly
def obj = mdfModel ( asrPath )
// Type MIVariableDataPrototype
def props = obj . s w D a t a D e f P r o p s
// Type MISwDataDefProps
// Get an MDF object and get its members using a closure
def props2
def obj2 = mdfModel ( asrPath ) {
props2 = swDataDefProps
}
// The results are the same
a s s e r t obj == obj2
a s s e r t props == props2
Listing 4.77: Find an MDF object and retrieve some content data
Closures can be nested to navigate deeply into the MDF model tree:
mdfModel ( asrPath ) {
int count = 0
swDataDefProps {
// swDataDefPropsVariant is a List < MISwDataDefPropsConditional >
// Execute the following for ALL elements of this List
List v = swDataDefPropsVariant {
println "Do something ... "
count ++
}
}
a s s e r t count >= 1
}
Listing 4.78: Navigating deeply into an MDF object with nested closures
When a member doesn’t exist during navigation into a deep MDF model tree, the specified
closure is not called:
mdfModel ( asrPath ) {
int count = 0
a s s e r t ad mi nD at a == null
adminData {
count ++
}
a s s e r t count == 0
}
Listing 4.79: Ignoring non-existing member closures
Retrieving a Child by Shortname or Definition
There are multiple ways to retrieve children
from an MDF model object, by the shortname or by its definition. The shortname can be used
at the object with childByName() or at the child list with byName().
childByName
The childByName(MIARObject, String, Closure) method calls the passed
Closure, if the request child exists. And returns the child MIReferrable below the specified
object which has this relative AUTOSAR path (not starting with ’/’).
© 2017, Vector Informatik GmbH
80 of 250


Chapter 4.
AutomationInterface API Reference
MIContainer canGeneral = ...
canGeneral . childByName (" CanMainFunctionRWPeriods "){ child ->
// Do something
}
Listing 4.80: Get a MIReferrable child object by name
Lists containing Referrables
• The method byName(String) retrieves the child with the shortname, or null, if no child
exists with this shortname.
• The method byName(String, Closure) retrieves the child with the shortname, or null,
if no child exists with this shortname. Then the closure is executed with the child as
closure parameter, if the child is not null. The child is finally returned.
• The method byName(Class, String) retrieves the child with the shortname and type,
or null, if no child exists with this shortname.
• The method byName(Class, String, Closure) retrieves the child with the shortname
and type, or null, if no child exists with this shortname. Then the closure is executed
with the child as closure parameter, if the child is not null. The child is finally returned.
• The method getAt(String) all members with this relative AUTOSAR path. Groovy
also allows to write list["ShortnameToSearchFor"].
// The asrPath points to an MISenderReceiverInterface
def pr ot ot yp e = mdfModel ( asrPath )
// byName () with shortname
def data1 = p ro to ty pe . d a t a E l e m e n t . byName ( " D e S i g n a l _ D u m m y " )
a s s e r t data1 . name == " D e S i g n a l _ D u m m y "
// byName () with type and shortname
def data2 = p ro to ty pe . d a t a E l e m e n t . byName ( M I V a r i a b l e D a t a P r o t o t y p e , " DeS ignal2 " )
// getAt () with shortname
def data3 = p ro to ty pe . d a t a E l e m e n t [ " D eS ig na l3 " ]
Listing 4.81: Retrieve child from list with byName()
Lists containing Parameters and Containers
• The method getAt(TypedDefRef) returns all children with the passed definition. Groovy
also allows to write list[DefRef].
4.6.4.2 Reading the MDF Model by String
The method mdfModel(String) searches for model elements by multiple ways at once. The
method evaluates the specified property in the following order, it will continue, if nothing was
found:
• AUTOSAR path, see mdfModel(AsrPath), if the path begins with an ’/’ and the model
element is no definition object (MIParamConfMultiplicity)
– Example: /ActiveEcuc/MyCan/MyContainer
© 2017, Vector Informatik GmbH
81 of 250


Chapter 4.
AutomationInterface API Reference
• ObjectLink, see AsrObjectLink, if the path begins with an ’/’ and the model element is
no definition object (type MIParamConfMultiplicity)
– Example: /ActiveEcuc/MyCan/MyContainer[0:ParameterDef]
• Definition path, see mdfModel(DefRef), if the path begins with an ’/’
– Example: /MICROSAR/Can
• AUTOSAR path relative to the ActiveEcuc package, if it does not begin with an ’/’
– Example: MyCan/MyContainer
• Definition path as DefRef with wildcard ANY starting at the moduleConfiguration, if it
does not begin with an ’/’
– Example: Can/CanGeneral
• Definition path as DefRef with wildcards, if it does begin with a valid wildcard like
/[ANY], see EDefRefWildcard.
– Example: /[ANY]/Can/CanGeneral
• Shortname of an MIARElement if the path does not contain any ’/’.
– Example: MyContainer
This method does not limit the search to the ActiveEcuC, so it can be used to retrieve any
object with the path String.
Remark: Even in post-build selectable variant models this method expects to find at most one
object because script code will never run in an unfiltered context.
Caution: This is a potential slow operation, you should use other mdfModel() methods, if
possible. Because this method must traverse the whole model in some cases.
def m o d u l e C f g 1 = mdfModel ( " / A c t i v e E c u C / Can " ) . single
def m o d u l e C f g 2 = mdfModel ( " Can " ) . single
def m o d u l e C f g 3 = mdfModel ( " /[ ANY ]/ Can " ) . single
def pa ra me te r
= mdfModel ("/ ActiveEcuc / MyCan / MyContainer [0: ParameterDef ]").
singleOrNull
Listing 4.82: Get elements with mdfModel(String)
4.6.4.3 Writing the MDF Model
Writing to the MDF model can be done with the same mdfModel(AsrPath) API, but you have
to call specific methods to modify the model objects. The methods are devided in the following
use cases:
• Change a simple property like Strings
• Change or create a single child relateion (0:1)
• Create a new child for a child list (0:*)
• Update an existing child from a child list (0:*)
You have to open a transaction before you can modify the MDF model, see chapter 4.6.6 on
page 95 
for details about transactions.
© 2017, Vector Informatik GmbH
82 of 250


Chapter 4.
AutomationInterface API Reference
4.6.4.4 Simple Property Changes
The properties of MDF model object simply be changed by with the setter method of the model
object. Simple setter exist for example for the types:
• String
• Enums
• Integer
• Double
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) { dataPrototype ->
dataPrototype . category = " NewCategory "
}
}
Listing 4.83: Changing a simple property of an MIVariableDataPrototype
4.6.4.5 Creating single Child Members (0:1)
For single child members (0:1), the automation API provides and additional method for the
getter get<Element>OrCreate() for convenient child object creation. The methods will create
the element, instead of returning null.
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) {
int count = 0
a s s e r t a dm in Da ta == null
adminDataOrCreate {
count ++
}
a s s e r t count == 1
a s s e r t a dm in Da ta != null
}
}
Listing 4.84: Creating non-existing member by navigating into its content with OrCreate()
If the compile time child type is not instatiatable, you have to provide the concrete type by
get<Element>OrCreate(Class childType).
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) {
introductionOrCreate ( MIBlockLevelContent ) { docuBlock ->
a s s e r t docuBlock in st an ce of M I B l o c k L e v e l C o n t e n t
}
}
}
Listing 4.85: Creating child member by navigating into its content with OrCreate() with type
© 2017, Vector Informatik GmbH
83 of 250


Chapter 4.
AutomationInterface API Reference
4.6.4.6 Creating and adding Child List Members (0:*)
For child list members, the automation API provides many createAndAdd() methods for con-
venient child object creation. These method will always create the element, regardless if the
same element (e.g. same ShortName) already exists.
If you want to update element see the chapter 4.6.4.7 on page 86.
transaction {
// The asrPath points to an MIVariableDataPrototype
mdfModel ( asrPath ) {
a s s e r t a dm in Da ta . sdg . empty
adminData {
sdg . createAndAdd ( MISdg ) {
gid = " NewGidValue "
}
}
a s s e r t a dm in Da ta . sdg . first . gid == " N e w G i d V a l u e "
}
}
Listing 4.86: Creating new members of child lists with createAndAdd() by type
These methods are available — but be aware that not all of these methods are available for all
child lists. Adding parameters, for example, is only permitted in the parameter child list of an
MIContainer instance.
All Lists:
• The method createAndAdd() creates a new MDF object of the lists content type and
appends it to this list. If the type is not instantiatable the method will thrown a Mo-
delException. The new object is finally returned.
• The method createAndAdd(Closure) creates a new MDF object of the lists content type
and appends it to this list. If the type is not instantiatable the method will thrown a
ModelException. Then the closure is executed with the new object as closure parameter.
The new object is finally returned.
• The method createAndAdd(Class) creates a new MDF object of the specified type and
appends it to this list. The new object is finally returned.
• The method createAndAdd(Class, Closure) creates a new MDF object of the specified
type and appends it to this list. Then the closure is executed with the new object as
closure parameter. The new object is finally returned.
• The method createAndAdd(Class, Integer) creates a new MDF object of the specified
type and inserts it to this list at the specified index position. The new object is finally
returned.
• The method createAndAdd(Class, Integer, Closure) creates a new MDF object of
the specified type and inserts it to this list at the specified index position. Then the
closure is executed with the new object as closure parameter. The new object is finally
returned.
© 2017, Vector Informatik GmbH
84 of 250


Chapter 4.
AutomationInterface API Reference
Lists containing Referrables
• The method createAndAdd(String) creates a new child with the specified shortname
and appends it to this list. The new object is finally returned. The used type is the lists
content type. If the type is not instantiatable the method will thrown a ModelException.
• The method createAndAdd(String, Closure) creates a new MIReferrable with the
specified shortname and appends it to this list. Then the closure is executed with the new
object as closure parameter. The new object is finally returned. The used type is the lists
content type. If the type is not instantiatable the method will thrown a ModelException.
• The method createAndAdd(Class, String) creates a new MIReferrable with the spe-
cified type and shortname and appends it to this list. The new object is finally returned.
• The method createAndAdd(Class, String, Closure) creates a new MIReferrable with
the specified type and shortname and appends it to this list. Then the closure is executed
with the new object as closure parameter. The new object is finally returned.
• The method createAndAdd(Class, String, Integer) creates a new MIReferrable with
the specified type and shortname and inserts it to this list at the specified index position.
The new object is finally returned.
• The method createAndAdd(Class, String, Integer, Closure) creates a new MIRe-
ferrable with the specified type and shortname and inserts it to this list at the specified
index position. Then the closure is executed with the new object as closure parameter.
The new object is finally returned.
Lists containing Parameters and Containers
• The method createAndAdd(TypedDefRef) creates a new Ecuc object (container or para-
meter) with the specified definition and appends it to this list. The new object is finally
returned.
• The method createAndAdd(TypedDefRef, Closure) creates a new Ecuc object (contai-
ner or parameter) with the specified definition and appends it to this list. Then the closure
is executed with the new object as closure parameter. The new object is finally returned.
• The method createAndAdd(TypedDefRef, Integer) creates a new Ecuc object (contai-
ner or parameter) with the specified definition and inserts it to this list at the specified
index position. The new object is finally returned.
• The method createAndAdd(TypedDefRef, Integer, Closure) creates a new Ecuc ob-
ject (container or parameter) with the specified definition and inserts it to this list at
the specified index position. Then the closure is executed with the new object as closure
parameter. The new object is finally returned.
Lists containing Containers
• The method createAndAdd(TypedDefRef, String) creates a new container with the
specified definition and shortname and appends it to this list.
The new container is
finally returned.
• The method createAndAdd(TypedDefRef, String, Closure) creates a new container
with the specified definition and shortname and appends it to this list. Then the closure
is executed with the new container as closure parameter. The new container is finally
returned.
© 2017, Vector Informatik GmbH
85 of 250


Chapter 4.
AutomationInterface API Reference
• The method createAndAdd(TypedDefRef, String, Integer) creates a new container
with the specified definition and shortname and inserts it to this list at the specified index
position. The new container is finally returned.
• The method createAndAdd(TypedDefRef, String, Integer, Closure) creates a new
container with the specified definition and shortname and inserts it to this list at the
specified index position. Then the closure is executed with the new container as closure
parameter. The new container is finally returned.
4.6.4.7 Updating existing Elements
For child list members, the automation API provides many byNameOrCreate() methods for
convenient child object update and creation on demand. These method will create the element
if id does not exists, or return the existing element.
transaction {
// The path points to an MISenderReceiverInterface
mdfModel ( asrPath ) { sendRecIf ->
def dataList = s en dR ec If . d a t a E l e m e n t
def d a t a E l e m e n t = dataList . b y N a m e O r C r e a t e ( " M y D a t a E l e m e n t " )
dataElement . name = " NewName "
def d a t a E l e m e n t 2 = dataList . b y N a m e O r C r e a t e ( " NewName " )
a s s e r t d a t a E l e m e n t == d a t a E l e m e n t 2
}
}
Listing 4.87: Updating existing members of child lists with byNameOrCreate() by type
These methods are available — but be aware that not all of these methods are available for all
child lists. Updating container, for example, is only permitted in the parameter child list of an
MIContainer instance.
Lists containing Referrables
• The method byNameOrCreate(String) retrieves the child with the passed shortname, or
creates the child, if it does not exist. The shortname is automatically set before returning
the new child.
• The method byNameOrCreate(TypedDefRef, String,Closure) retrieves the child with
the passed shortname, or creates the child, if it does not exist. The shortname is auto-
matically set before returning the new child. Then the closure is executed with the child
as closure parameter. The child is finally returned.
• The method byNameOrCreate(Class, String) retrieves the child with the passed type
and shortname, or creates the child, if it does not exist. The shortname is automatically
set before returning the new child.
• The method byNameOrCreate(Class, String,Closure) retrieves the child with the pas-
sed type and shortname, or creates the child, if it does not exist. The shortname is auto-
matically set before returning the new child. Then the closure is executed with the child
as closure parameter. The child is finally returned.
© 2017, Vector Informatik GmbH
86 of 250


Chapter 4.
AutomationInterface API Reference
Lists containing Containers
• The method byNameOrCreate(TypedDefRef, String) retrieves the child with the passed
definition and shortname, or creates the child, if it does not exist. The definition and
shortname are automatically set before returning the new child.
• The method byNameOrCreate(TypedDefRef, String, Closure) retrieves the child with
the passed definition and shortname, or creates the child, if it does not exist. The definition
and shortname are automatically set before returning the new child. Then the closure is
executed with the child as closure parameter. The child is finally returned.
4.6.4.8 Deleting Model Objects
The method moRemove(MIObject) deletes the specified object from the model. This method
must be called inside a transaction because it changes the model content.
Special case: If this method is being called on an active module configuration, it actually calls
IOperations.deactivateModuleConfiguration(MIModuleConfiguration) to deactivate the
module correctly.
// MIParameterValue param = ...
transaction {
a s s e r t ! param . m o I s R e m o v e d ()
param . moRemove ()
a s s e r t param . m o I s R e m o v e d ()
}
Listing 4.88: Delete a parameter instance
For details about model object deletion and access to deleted objects, read section 5.1.7.4 on
page 178 
ff.
moIsRemoved
The getMoIsRemoved(MIObject) method returns true if the specified object
has been removed (deleted) from the MDF model.
MIObject obj = ...
if (! obj . m o I s R e m o v e d () ) {
work with obj ...
}
Listing 4.89: Check is a model instance is deleted
4.6.4.9 Duplicating Model Objects
The duplicate(MIObject) method copies (clones) a complete MDF model sub-tree and adds
it as child below the same parent.
• The source object must have a parent. The clone will be added to the same MDF feature
below the same parent then
• AUTOSAR UUIDs will not be cloned. The clone will contain new UUIDs to guarantee
unambiguousness
© 2017, Vector Informatik GmbH
87 of 250


Chapter 4.
AutomationInterface API Reference
This method can clone any model sub-tree, also see IOperations.deepClone(MIObject, MI-
Object) for details.
Note: This operation must be executed inside of a transaction.
// MIContainer container = ...
transaction {
def newCont = co nt ai ne r . du pl ic at e ()
// The duplicated container newCont
}
Listing 4.90: Duplicates a container under the same parent
4.6.4.10 Special properties and extensions
asrPath
The getAsrPath(MIReferrable) method returns the AUTOSAR path of the speci-
fied object.
MIContainer canGeneral = ...
AsrPath path = canGeneral . asrPath
Listing 4.91: Get the AsrPath of an MIReferrable instance
See chapter 5.4.2 on page 199 for more details about AsrPaths.
asrObjectLink
The getAsrObjectLink(MIARObject) method returns the AsrObjectLink of
the specified object.
MIParameterValue param = ...
AsrObjectLink link = param . asrObjectLink
Listing 4.92: Get the AsrObjectLink of an AUTOSAR model instance
See chapter 5.4.3 on page 200 for more details about AsrObjectLinks.
defRef
The getDefRef() method returns the DefRef of the model object.
MIParameterValue param = ...
DefRef defRef = param . defRef
Listing 4.93: Get the DefRef of an Ecuc model instance
The MIParameterValue.setDefRef(DefRef) method sets the definition of this parameter to
the defRef.
MIParameterValue param = ...
DefRef newDefinition = ...
param . defRef = newDefinition
Listing 4.94: Set the DefRef of an Ecuc model instance
If the specified DefRef has a wildcard, the parameter must have a parent to calculate the
absolute definition path - otherwise a ModelCeHasNoParentException will be thrown.
If is has no wildcard and no parent, the absolute definition path of the defRef will be used.
© 2017, Vector Informatik GmbH
88 of 250


Chapter 4.
AutomationInterface API Reference
If the parameter has a parent or and parents definition does not match the defRefs parent
definition, this method fails with InconsistentParentDefinitionException.
The MIContainer.setDefRef(DefRef) method sets the definition of this container to the de-
fRef.
See chapter 5.4.4 on page 200 for more details about DefRefs.
ceState
The CeState is an object which aggregates states of a related MDF object. Client
code can e.g. check with the CeState if an Ecuc object has a related pre-configuration value.
The getCeState(MIObject) method returns the CeState of the specified model object.
MIParameterValue param = ...
IParameterStatePublished state = param . ceState
Listing 4.95: Get the CeState of an Ecuc parameter instance
See chapter 5.4.5 on page 203 for more details about the CeState.
ceState - User-defined Flag
The method isUserDefined() returns true, if the ecuc confi-
guration element like parameters is flagged as user-defined.
MIParameterValue param = ...
def flag = param . ceState . u s e r D e f i n e d
Listing 4.96: Retrieve the user-defined flag of an Ecuc parameter in Groovy
The method setUserDefined(boolean) sets or removes the user-defined flag of a ecuc confi-
guration element like parameters.
Note: This method must executed inside a transaction because it modifies the model state.
MIParameterValue param = ...
transaction {
param . ceState . userDefined = true
}
Listing 4.97: Set an Ecuc parameter instance to user defined
EcuConfigurationAccess and EcucDefinitionAccess
The Groovy automation interface also
provides special access methods for Ecuc elements (module configurations, container and para-
meter) to the
• EcuConfigurationAccess (see 5.5.1 on page 205)
• EcucDefinitionAccess (see 5.5.2 on page 210)
The getEcucDefinition() method returns the IEcucDefinition of the model object.
MIParameterValue param = ...
IEcucDefinition definition = param . ecucDefinition
Listing 4.98: Get the IEcucDefinition of an Ecuc model instance
The getEcuConfiguration() method returns the IEcucHasDefinition of the model object.
© 2017, Vector Informatik GmbH
89 of 250


Chapter 4.
AutomationInterface API Reference
MIParameterValue param = ...
IEcucHasDefinition cfg = param . ecuConfiguration
Listing 4.99: Get the IEcucHasDefinition of an Ecuc model instance
These methods are the same as for bswmd model objects.
4.6.4.11 Reverse Reference Resolution - ReferencesPointingToMe
You can resolve all references in the MDF model in the reverse direction, so you can start at a
reference target and navigate to all references which point to the reference target.
referencesPointingToMe
The getReferencesPointingToMe() method returns all reference
parameters in the active ecuc pointing to specified target (MIReferrable) object. It returns an
empty collection if the target object is invisible or removed.
The getReferencesPointingToMe(DefRef) method returns all reference parameters in the
active ecuc with the specified definition (DefRef) pointing to the specified target (MIReferrable)
object. It returns an empty collection if the target object is invisible, removed or the specified
definition is null.
List < MIReferenceValue > refs = container . referencesPointingToMe
// Or
DefRef refDefRef = // DefRef to reference parameter
def refByDef = c on ta in er . g e t R e f e r e n c e s P o i n t i n g T o M e ( refDefRef )
Listing 4.100: referencesPointingToMe sample
systemDescriptionObjectsPointingToMe
The method getSystemDescriptionObjectsPoin-
tingToMe() returns all objects located in the system description which are parent objects of
references pointing to the specified target. It returns an empty collection if the object is invisible
or removed.
List < MIObject > references =
systemDescElement . systemDescriptionObjectsPointingToMe
Listing 4.101: systemDescriptionObjectsPointingToMe sample
4.6.4.12 AUTOSAR Root Object
The getAUTOSAR() method returns the AUTOSAR root object (the root object of the MDF
model tree of AUTOSAR data).
MIAUTOSAR root = AUTOSAR
Listing 4.102: Get the AUTOSAR root object
4.6.4.13 ActiveEcuC
The activeEcuc access methods provide access to the module configurations of the Ecuc mo-
del.
© 2017, Vector Informatik GmbH
90 of 250


Chapter 4.
AutomationInterface API Reference
// Get the modules as Collection < MIModuleConfiguration >
Collection modules = activeEcuc . allModules
Listing 4.103: Get the active Ecuc and all module configurations
// Iterate over all module configurations
activeEcuc {
int count = 0
allModules . each { moduleCfg ->
count ++
}
a s s e r t count > 1
}
Listing 4.104: Iterate over all module configurations
activeEcuc {
// Parameter type is IActiveEcuc
ecuc ->
def defRef = DefRef . create ( E D e f R e f W i l d c a r d . AUTOSAR , " EcuC " )
// Get the modules as Collection < MIModuleConfiguration >
Collection foundModules = ecuc . modules ( defRef )
a s s e r t ! f o u n d M o d u l e s . empty
}
Listing 4.105: Get module configurations by definition
4.6.4.14 DefRef based Access to Containers and Parameters
The Groovy automation interface for the MDF model provides some overloaded access methods
for
• MIModuleConfiguration.getSubContainer()
• MIContainer.getSubContainer()
• MIContainer.getParameter()
to offer convenient filtering access to the subContainer and parameter child lists.
activeEcuc {
// Parameter type is IActiveEcuc
ecuc ->
def module = ecuc . modules ( EcuC . DefRef ) . first
// Get containers as List < MIContainer >
def c o n t a i n e r s = module . s u b C o n t a i n e r ( E c u c G e n e r a l . DefRef )
// Get parameters as List < MIParameterValue >
def cpuType = co nta in er s . first . parameter ( CPUType . DefRef )
a s s e r t cpuType . size () == 1
}
Listing 4.106: Get subContainers and parameters by definition
© 2017, Vector Informatik GmbH
91 of 250


Chapter 4.
AutomationInterface API Reference
4.6.4.15 Ecuc Parameter and Reference Value Access
The Groovy automation interface also provides special access methods for Ecuc parameter
values. These methods are implemented as extensions of the Ecuc parameter and value types
and can therefore be called directly at the parameter or reference instance.
Value Checks
• hasValue(MIParameterValue)
returns true if the parameter (or reference) has a value.
• containsBoolean(MINumericalValue)
returns true if the parameter value contains a valid boolean with the same semantic as
IModelAccess.containsBoolean(MINumericalValue).
Call this method in advance
to guarantee that getAsBoolean(MINumericalValueVariationPoint) doesn’t lead to
errors.
• containsInteger(MINumericalValue)
returns true if the parameter value contains a valid integer with the same semantic as
IModelAccess.containsInteger(MINumericalValue).
Call this method in advance
to guarantee that getAsInteger(MINumericalValueVariationPoint) doesn’t lead to
errors.
• containsDouble(MINumericalValue)
returns true if the parameter value contains a valid double (AUTOSAR float) with the
same semantic as
IModelAccess.containsFloat(MINumericalValue).
Call this method in advance
to guarantee that getAsDouble(MINumericalValueVariationPoint) doesn’t lead to er-
rors.
// MINumericalValue param = ...
if (! param . hasValue () ) {
scriptLogger . warn " The parameter has no value !"
}
if ( param . c o n t a i n s I n t e g e r () ) {
int value = param . value . a sI nt eg er
}
Listing 4.107: Check parameter values
Parameters
• getAsLong(MINumericalValueVariationPoint) returns the value as native long.
Throws NumberFormatException if the value string doesn’t represent an integer value.
Throws ArithmeticException if the value will not exactly fit in a long.
• getAsInteger(MINumericalValueVariationPoint) returns the value as native int.
© 2017, Vector Informatik GmbH
92 of 250


Chapter 4.
AutomationInterface API Reference
Throws NumberFormatException if the value string doesn’t represent an integer value.
Throws ArithmeticException if the value will not exactly fit in an int.
• getAsBigInteger(MINumericalValueVariationPoint) returns the value as BigInte-
ger.
Throws NumberFormatException if the value string doesn’t represent an integer value.
• getAsDouble(MINumericalValueVariationPoint) returns the value as Double.
Throws NumberFormatException if the value string doesn’t represent a float value.
• getAsBigDecimal(MINumericalValueVariationPoint) returns the value as BigDeci-
mal.
Note: This method will possibly return MBigDecimal.POSITIVE_INFINITY, MBigDeci-
mal.NEGATIVE_INFINITY or MBigDecimal.NaN.
If it is necessary to do computations with these special numbers,
use getAsDouble(MINumericalValueVariationPoint) instead.
Throws NumberFormatException if the value string doesn’t represent a float value.
• getAsBoolean(MINumericalValueVariationPoint) returns the value as Boolean.
Throws NumberFormatException if the value string doesn’t represent a boolean value.
• asCustomEnum(MITextualValue, Class) returns the value of the enum parameter as a
custom enum literal. If the Class destClass implements the IModelEnum interface, the lite-
rals are mapped via these information form the IModelEnum interface. Read the JavaDoc
of IModelEnum for more details.
// MINumericalValue param = ...
// MINumericalValueVariationPoint is the type of param . value
l o n g lo ng Va lu e = param . value . asLong
a s s e r t l on gV al ue == 10
int intValue = param . value . a sI nt eg er
a s s e r t intValue == 10
BigInteger bigIntValue = param . value . asBigInteger
a s s e r t b i g I n t V a l u e == B i g I n t e g e r . valueOf (10)
Double doubleValue = param . value . asDouble
a s s e r t Math . abs ( doubleValue -10.0) <= 0.0001
Listing 4.108: Get integer parameter value
References
• getAsAsrPath(MIARRef) returns the reference value as AUTOSAR path.
• getAsAsrPath(MIReferenceValue) returns the reference parameters value as AUTOSAR
path.
• getRefTarget(MIReferenceValue) returns the reference parameters target object (the
object referenced by this parameter). It returns null if the target cannot be resolved or
the reference parameter doesn’t contain a value reference.
© 2017, Vector Informatik GmbH
93 of 250


Chapter 4.
AutomationInterface API Reference
// MIReferenceValue refParam = ...
def asrPath1 = refParam . a sA sr Pa th
def asrPath2 = refParam . value . a sA sr Pa th
a s s e r t asrPath1 == asrPath2
String pathString = refParam . value . value
a s s e r t asrPath1 . a u t o s a r P a t h S t r i n g == p a t h S t r i n g
def target1 = refParam . re fT ar ge t
def target2 = refParam . value . re fT ar ge t
a s s e r t target1 == target2
Listing 4.109: Get reference parameter value
4.6.5 SystemDescription Access
The systemDescription API provides methods to retrieve system description data like the path
to the flat extract or the flat map instance.
It is grouped by the AUTOSAR version. So the getAutosar4() methods provides access to
AUTOSAR 4 model elements.
The getPaths() provides common paths to elements like:
• FlatMap path
• FlatExtract path
• FlatCompositionType path
AsrPath flatExtractPath = systemDescription . paths . flatExtractPath
AsrPath flatMapPath = systemDescription . paths . flatMapPath
Listing 4.110: Get the FlatExtract and FlatMap paths by the SystemDescription API
systemDescription {
autosar4 {
flatExtract . ifPresent { theFlatExtract ->
// do something with the flatMap
}
}
}
// Or in property style
def t h e F l a t E x t r a c t O p t = s y s t e m D e s c r i p t i o n . autosar4 . f l a t E x t r a c t
if ( t h e F l a t E x t r a c t O p t ) {
def t h e F l a t E x t r a c t = t h e F l a t E x t r a c t O p t . get ()
}
Listing 4.111: Get FlatExtract instance by the SystemDescription API
© 2017, Vector Informatik GmbH
94 of 250


Chapter 4.
AutomationInterface API Reference
4.6.6 Transactions
Model changes must always be executed within a transaction. The automation API provides
some simple means to execute transactions.
For details about transactions read 5.1.7 on page 177.
scriptTask (" TaskName ", DV_PROJECT ){
code {
transaction {
// Your transaction code here
}
}
}
Listing 4.112: Execute a transaction
scriptTask (" TaskName ", DV_PROJECT ){
code {
transaction (" Transaction name ") {
// The transactionName property is available inside a transaction
String name = transactionName
}
}
}
Listing 4.113: Execute a transaction with a name
The transaction name has no additional semantic. It is only be used for logging and to improve
error messages.
Nested Transactions
If you open a transaction inside of a transaction the inner transaction is
ignored and it is as no transaction call was done. So be aware that nested transactions are no
real transaction, which leads to the fact the these nested transactions can not be undone.
If you want to know whether a transaction is already running, see the transactions API be-
low.
4.6.6.1 Transactions API
The Transactions API with the keyword transactions provides access to running transactions
or the transaction history.
You can use method isTransactionRunning() to check if a transaction is currently running.
The method returns true, if a transaction is running in the current Thread.
© 2017, Vector Informatik GmbH
95 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName ", DV_PROJECT ){
code {
// Switch to the transactions API
transactions {
// Check if a transaction is running
a s s e r t
isTransactionRunning () == false
// Open a transaction
transaction {
// Now a transaction is running
a s s e r t
isTransactionRunning () == true
}
}
// Or the short form
transactions . isTransactionRunning ()
}
}
Listing 4.114: Check if a transaction is running
TransactionHistory
The transaction history API provides some methods to handle transaction
undo and redo. This way, complex model changes can be reverted quite easily.
• The undo() method executes an undo of the last transaction. If the last transaction frame
cannot be undone or if the undo stack is empty this method returns without any changes.
• The undoAll() method executes undo until the transaction stack is empty or an undoable
transaction frame appears on the stack.
• The redo() method executes an redo of the last undone transaction. If the last undone
transaction frame cannot be redone or if the redo stack is empty this method returns
without any changes.
• The canUndo() method returns true if the undo stack is not empty and the next undo
frame can be undone. This method changes nothing but you can call it to find out if the
next undo() call would actually undo something.
• The canRedo() method returns true if the redo stack is not empty and the next redo
frame can be redone. This method changes nothing but you can call it to find out if the
next redo() call would actually redo something.
scriptTask (" TaskName ", DV_PROJECT ){
code {
transaction (" TransactionName ") {
// Your transaction code here
}
transactions {
a s s e r t
transactionHistory . canUndo ()
transactionHistory . undo ()
a s s e r t ! t r a n s a c t i o n H i s t o r y . canUndo ()
}
}
}
Listing 4.115: Undo a transaction with the transactionHistory
© 2017, Vector Informatik GmbH
96 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" TaskName ", DV_PROJECT ){
code {
transaction (" TransactionName ") {
// Your transaction code here
}
transactions {
transactionHistory . undo ()
a s s e r t
transactionHistory . canRedo ()
transactionHistory . redo ()
a s s e r t ! t r a n s a c t i o n H i s t o r y . canRedo ()
}
}
}
Listing 4.116: Redo a transaction with the transactionHistory
4.6.6.2 Operations
The model operations implement convenient means to execute complex model changes like
AUTOSAR module activation or cloning complete model sub-trees. The operations API is
available inside of a transaction with the keyword operation. The class IOperations defines
the available methods.
• The method activateModuleConfiguration(DefRef) activates the specified module con-
figuration. This covers:
– Creation of the module including the reference in the ActiveEcuC (the ECUC-VALUE-
COLLECTION)
– Creation of mandatory containers and parameters (lower multiplicity > 0)
– Applying the recommended configuration
– Applying the pre-configuration values
Note: If the DefRef has a wildcard, activateModuleConfiguration(DefRef) tries to
activate the most specific module definition matching the wildcard, if unique. If it is not
unique the method will throw an exception. For example the DefRef /[ANY]/Dio will
activate the /MICROSAR/Dio instead of /AUTOSAR/EcucDefs/Dio.
transaction {
// Activates the Dio module
operations . activateModuleConfiguration ( sipDefRef . Dio )
}
Listing 4.117: Activation of the ModuleConfiguration Dio
• The method deactivateModuleConfiguration(MIModuleConfiguration) deletes the
specified module configuration from the model. In case of a split configuration, the re-
lated persistency location is being removed from the project settings. In XML file base
configurations, the related file is being deleted during the next project save if it doesn’t
contain configuration objects anymore.
© 2017, Vector Informatik GmbH
97 of 250


Chapter 4.
AutomationInterface API Reference
If the module configuration is referenced from the active-ECUC this link is being removed
too.
• The method changeBswImplementation(MIModuleConfiguration, MIBswImplementa-
tion) changes the BSW-implementation of a module configuration including the definition
of all contained containers and parameters.
• The deepClone(MIObject, MIObject) operation copies (clones) a complete MDF model
sub-tree and adds it as child below the specified parent.
– The source object must have a parent. The clone will be added to the same MDF
feature below the destination parent then
– AUTOSAR UUIDs will not be cloned. The clone will contain new UUIDs to gua-
rantee unambiguousness
• The method createModelObject(Class) creates a new element of the passed modelClass
(meta class). The modelObject must be added to the whole AUTOSAR model, before
finishing the transaction.
• setConfigurationVariantOfAllModuleConfigurations(EEcucConfigurationVariant)
sets the implementation configuration variant of all active MIModuleConfiguration. If a
module configuration does not support the requested variant it is ignored.
Supported enum values are:
– com.vector.cfg.model.access.ecuconfiguration.EEcucConfigurationVariant
∗ VARIANT_PRE_COMPILE
∗ VARIANT_LINK_TIME
∗ VARIANT_POST_BUILD_LOADABLE
This is for post-build loadable only! See the method setConfigurationVariant() in class
IEcucModuleConfiguration for details.
• The method createUniqueMappedAutosarPackage() can be used to create new MIAR-
Packages in new arxml files.
It creates an new instance of the specified AUTOSAR
package and adds it to the model tree. All non-existing parent packages will be created
too.
The new package (including new created parent packages) will be mapped uniquely to
the specified location (Path and AUTOSAR version).
4.6.7 Model Synchronization
The Model synchronization provides operation to solve and synchronize common model rela-
ted items. The model synchronization API is available inside of an active project with the
keyword modelSynchronization. The class IModelSynchronizationApi defines the available
methods.
The method synchronize() synchronizes the model for all registered model synchronization
elements like validations and other operations. The method will open a transaction, if isSyn-
chronizationRequired() returns true, otherwise this method does nothing.
© 2017, Vector Informatik GmbH
98 of 250


Chapter 4.
AutomationInterface API Reference
// Execute the model synchronization
modelSynchronization . synchronize ()
// Or more elaborated , but means the same
modelSynchronization {
if ( s y n c h r o n i z a t i o n R e q u i r e d ) {
synchronize ()
}
}
Listing 4.118: Model synchronization inside an open project
4.6.8 Post-build selectable Variance
The variance access API is the entry point for convenient access to variant AUTOSAR mo-
del content.
It provides means to filter variant model content and access variant specific
data.
For details about post-build selectable variance and model views read 5.2 on page 179.
4.6.8.1 Investigate Project Variance
The projects variance can be analyzed using the variance keyword. These methods can be
called then:
• The method hasPostBuildVariance() returns true if the active project contains post-
build variants.
• The method getInvariantValuesView() returns the invariant values view.
• The method getInvariantEcucDefView() returns the invariant Ecuc definition view.
• The method getCurrentlyActiveView() returns the currently active model view.
• The method getAllVariantViews() returns all available variant model views (one IPrede-
finedVariantView per predefined variant).
• The method variantView(String) returns the IPredefinedVariantView with the given
name.
scriptTask (" TaskName ", DV_PROJECT ){
code {// Activates the DoorLeftFront variant
variance . variantView (" DoorLeftFront "). activeWith {
// Now all MDF model accesses are executed in the variant "
DoorLeftFront "
}
}
}
Listing 4.119: Retrieve and use a variant view by name
• The method getAllVariantViewsOrInvariant() returns the same as the method ge-
tAllVariantViews() if the project contains variants. If the project contains no variants
(see hasPostBuildVariance()) the method returns a list containing only the IInvari-
antView.
© 2017, Vector Informatik GmbH
99 of 250


Chapter 4.
AutomationInterface API Reference
This helps to create code working with both variant and non-variant projects.
scriptTask (" TaskName ", DV_PROJECT ){
code {
def a c t i v e V i e w 1 = variance . c u r r e n t l y A c t i v e V i e w
a s s e r t a c t i v e V i e w 1 i n s t a n c e o f I I n v a r i a n t V a l u e s V i e w
// ... or with a closure
variance {
def a c t i v e V i e w 2 = c u r r e n t l y A c t i v e V i e w
a s s e r t a c t i v e V i e w 1 == a c t i v e V i e w 2
a s s e r t a c t i v e V i e w 1 == i n v a r i a n t V a l u e s V i e w
// Get number of variants
int num = a l l V a r i a n t V i e w s . size ()
a s s e r t num == 4
}
}
}
Listing 4.120: The default view is the IInvariantValuesView
4.6.8.2 Variant Model Objects
The following model object extensions provide convenient means to investigate model object
variance in detail.
• The method activeWith(IModelView, Closure) executes code under visibility of the
specified model view.
• The method isModelInvariant(MIObject) returns true if the object and all its parents
has no variation point conditions. If this is true, this model object instance is visible in
all variant views.
• The method isValueInvariant(MIObject) returns true if the object has the same value
in all variants.
For details about invariant views see 5.2.1.4 on page 182.
• The method isEcucDefInvariant(MIObject) returns true if the object is invariant ac-
cording to its EcuC definition.
See IInvariantEcucDefView for more details to the concept.
• The method isVisible(MIObject) returns true if the object is visible in the current
model view.
• The method isVisibleInModelView(MIObject, IModelView) returns true if the object
is visible in the specified model view.
• The method isNeverVisible(MIObject) returns true if the object is invisible in all
variant views.
• The method getVisibleVariantViews(MIObject) returns all variant views the specified
object is visible in.
• The method getVisibleVariantViewsOrInvariant(MIObject) For semantic details see
IModelViewManager.getVisibleVariantViewsOrInvariant(MIObject).
© 2017, Vector Informatik GmbH
100 of 250


Chapter 4.
AutomationInterface API Reference
• The method asViewedModelObject(MIObject) returns a new IViewedModelObject in-
stance using the currently active view.
• The method getVariantSiblings(MIObject) returns MDF object instances representing
the same object but in all variants.
For details about the sibling semantic see 5.2.1.3 on page 181.
• The method getVariantSiblingsWithoutMyself(MIObject) returns the same collection
as getVariantSiblings(MIObject) but without the specified object.
// IPredefinedVariantView viewDoorLeftFront = ...
// MIParameterValue variantParameter = ...
viewDoorLeftFront . activeWith {
a s s e r t variance . c u r r e n t l y A c t i v e V i e w == v i e w D o o r L e f t F r o n t
// The parameter instance is not visible in all variants ...
a s s e r t ! v a r i a n t P a r a m e t e r . i s M o d e l I n v a r i a n t ()
// ... but all variants have a sibling with the same value
a s s e r t
variantParameter . isValueInvariant ()
}
Listing 4.121: Execute code in a model view
© 2017, Vector Informatik GmbH
101 of 250


Chapter 4.
AutomationInterface API Reference
4.6.9 Additional Model API
4.6.9.1 User Annotations
In DaVinci Configurator the user can add AUTOSAR annotations to configuration elements.
You can create, modify, read and delete these annotations like in the UI editors.
All sub types of MIHasAnnotation elements support annotations like:
• MIModuleConfigurations
• MIContainers
• MIParameterValues
• MIIdentifiables
Although annotations are stored in the data model, their changeable state is independent of
the configuration element changeable state. Annotations can be added/changed/deleted on
every existing configuration element with valid definition, except the project was opened in
read-only mode.
The IUserAnnotation interface provide methods like:
• getLabel() - Returns the label of the annotation, like getName() of a container
• setLabel() - Changes the label
• getText() - Returns the text of the annotation.
• setText() - Changes the text
• isChangeable() - Returns true, if the annotation is changeable
• moRemove() - Deletes the annotation
Access User Annotations
The getUserAnnotations(MIARObject) method returns the IU-
serAnnotations for the model element. The returned list provides additional methods defined
in IUserAnnotationList.
// We already have the container " cont " or any other model element
def m y C o n t a i n e r = cont
def annos = m y C o n t a i n e r . u s e r A n n o t a t i o n s // Retrieve the list of a n n o t a t i o n s
def anno = annos . byLabel ( " MyLabel " )
// Select the annotation with " MyLabel "
def text = anno . text
// Get the Text
// Or short
text = myContainer . userAnnotations [" MyLabel "]. text
Listing 4.122: Get a UserAnnotation of a container
Creation and Modification of User Annotations
You can create new User Annotations with
the methods:
• createAndAdd(label)
• byLabelOrCreate(label)
© 2017, Vector Informatik GmbH
102 of 250


Chapter 4.
AutomationInterface API Reference
transaction {
// We already have the container " cont "
def anno = cont . u s e r A n n o t a t i o n s . c r e a t e A n d A d d ( " MyAnno " )
anno . text = "My Text "
}
Listing 4.123: Create a new UserAnnotation
transaction {
// We already have the container " cont "
def anno = cont . u s e r A n n o t a t i o n s . b y L a b e l O r C r e a t e ( " MyAnno " )
anno . text = "My Text "
}
Listing 4.124: Create or get the existing UserAnnotation by label name
Notes
The IUserAnnotationList is not updated, when the underlying model changes. You
have to retrieve a new instance of IUserAnnotationList to reflect changes.
The IUserAnnotationList is read only list and does not permit any modify operations defi-
ned in java.util.List, but certain operations like createAndAdd(String) will affect the list
content. If you delete a contained IUserAnnotation the list will not be updated.
© 2017, Vector Informatik GmbH
103 of 250


Chapter 4.
AutomationInterface API Reference
4.7 Generation
The Automation Interface provides generation API for different generation use cases:
• Normal code generation, see 4.7.1
– Including external generation steps
• SWC Templates and Contract Phase Headers generation, see 4.7.3 on page 111
4.7.1 Code Generation
The block generation encapsulates all settings and commands which are related to code ge-
neration of BSW modules:
The basic structure is the following:
generation {
settings {
// Settings like the selection of generators for execution are done
here
externalGenerationSteps {
// Settings related to externalGenerationSteps can be done here
}
}
// The execution of the generation or validation can be started here
}
Listing 4.125: Basic structure
4.7.1.1 Generation Settings
The class IGenerationSettingsApi encapsulates all settings which belong to a generation
process.
E.g.
• Select the generators to execute
• Select the target type (Real, VTT)
• Select the external generation steps
• If the module supports multiple module configurations, select the configurations which
shall be generated
The following chapters show samples for the standard use cases.
Generation with default Project Settings
The following snippet executes a validation with
the default project settings.
© 2017, Vector Informatik GmbH
104 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" validate_with_default_settings "){
code {generation{
validate ()
}
}
}
Listing 4.126: Validate with default project settings
To execute a generation with the standard project settings the following snippet can be used.
The validation is executed implicitly before the generation because of AUTOSAR require-
ments.
scriptTask (" generate_with_default_settings "){
code {generation{
generate ()
}
}
}
Listing 4.127: Generate with standard project settings
Generation of one Module
This sample selects one specific module and starts the generation.
There are two ways to open an settings block:
• settings
– This keyword creates empty settings. E.g. no module is selected for execution.
• settingsFromProject
– This keyword takes the project settings as template. E.g. modules from the project
settings are initially activated and can optionally be refined by explicit selections.
scriptTask (" generate_one_module "){
code {generation{
settings {
// To take the project settings as template use
// settingsFromProject {
selectGeneratorsByDefRef ("/ MICROSAR / Aaa ")
}generate()
}
}
}
Listing 4.128: Generate one module
Instead of selecting the generator directly by its DefRef, there is also the possibility to fetch
the generator object and select this object for execution.
© 2017, Vector Informatik GmbH
105 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" generate_one_module "){
code {generation{
settings {
// To take the project settings as template use
// settingsFromProject {
def gens = g e n e r a t o r B y D e f R e f ( " / MICROSAR / Aaa " )
selectGenerators ( gens )
}generate()
}
}
}
Listing 4.129: Generate one module
Generation of multiple Modules
To select more than one generator the following snippet can
be used.
scriptTask (" generate_two_modules "){
code {generation{
settings {
selectGeneratorsByDefRef ("/ MICROSAR / Aaa ", "/ MICROSAR / Bbb ")
}generate()
}
}
}
Listing 4.130: Generate two modules
Generation of Multi Instance Modules
Some module definitions have a upper multiplicity
greater than one. (E.g. [0:5] or [0:*]) This means it is allowed to create more than one module
configuration from this module definition. If the related generator is started with the default
API, all available module configurations are selected for generation. The following API can be
used to generate only a subset of all related module configurations.
© 2017, Vector Informatik GmbH
106 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" generate_one_module_with_two_configs "){
code {generation{
settings {
def gen = g e n e r a t o r B y D e f R e f ( " / MICROSAR / M u l t i I n s t M o d u l e " )
// clear default selection
gen . deselectAllModuleInstances ()
// Select the module configurations to generate
gen . selectModuleInstance ( AsrPath . create ("/ ActiveEcuC /
MultiInstModule1 "))
// Instead of the full qualified path , the module configuration
short name can also be used
gen . selectModuleInstance (" MultiInstModule2 ")
}generate()
}
}
}
Listing 4.131: Generate one module with two configurations
4.7.1.2 Generation of External Generation Step
Besides the internal generators, which are covered by the topics above, there are also external
generation steps which can be executed with the following API. A new block externalGenera-
tionSteps within the settings block encapsulates all settings related to external generation
scripts.
scriptTask (" generate_ext_gen_step "){
code {generation{
settings {
externalGenerationSteps {
// To take the project settings as template use
// externalGenerationStepsFromProject {}
selectStep (" ExtGen1 ")
selectStep (" ExtGen2 ")
}
}generate()
}
}
}
Listing 4.132: Execute an external generation step
4.7.1.3 Evaluate generation or validation results
Each validation and generation process has an overall result which states if the execution has
been successfully or not. Additionally to the overall state, the state of one specific generator can
also be of interest. To provide a possibility to access this information all methods for validate
and generate return an IGenerationResultModel.
© 2017, Vector Informatik GmbH
107 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" generate_with_default_settings "){
code {generation{
def result = generate ()
println " Overall result : " + result . result
println " Duration
: " + result . formattedDuration
// Access results of each generator or generation step
result . generationResultRoot . allGeneratorAndStepElements . each {
println " Generator name : " + it. name
println " Result
: " + it. currentState
}
}
}
}
Listing 4.133: Evaluate the generation result
© 2017, Vector Informatik GmbH
108 of 250


Chapter 4.
AutomationInterface API Reference
4.7.2 Generation Task Types
There are three types of IScriptTaskTypesfor the generation process:
• Generation Step: DV_GENERATION_STEP
• Custom Workflow Step: DV_CUSTOM_WORKFLOW_STEP
• Generation Process Start: DV_ON_GENERATION_START
• Generation Process End: DV_ON_GENERATION_END
The general description of the type is in chapter 4.3.1.4 on page 31. The following code samples
show the usage of these task types:
Generation Step
A sample for the DV_GENERATION_STEP type:
scriptTask (" GenStepTask ", DV_GENERATION_STEP ){
taskDescription " Task is executed as Generation Step "
def myArg = n e w U s e r D e f i n e d A r g u m e n t (
" myArgument ",
String ,
" Defines a user argument for the GenerationStep ")
code { phase , generationType , resultSink ->
def myArgVal = myArg . value
// The value myArgVal was passed from the generation step in the
project settings editor
scriptLogger . info " MyArg is: $myArgVal "
scriptLogger . info " GenerationType is: $generationType "
if ( phase . c a l c u l a t i o n ) {
// Execute code before / after calculation
transaction {
// Modify the Model in the calculation phase
}
}
if ( phase . v a l i d a t i o n ) {
// Execute code before / after validation
}
if ( phase . g e n e r a t i o n ) {
// Execute code before / after generation
}
}
}
Listing 4.134: Use a script task as generation step during generation
The Generation Step can also report validation results into the passed resultSink. See chap-
ter 4.8.5.10 on page 124 for a sample how to create an validation-result and report it.
The generationType defines if the current generation is for the REAL or VTT platform.
© 2017, Vector Informatik GmbH
109 of 250


Chapter 4.
AutomationInterface API Reference
Custom Workflow Step
A sample for the DV_CUSTOM_WORKFLOW_STEP type:
scriptTask (" GenStepTask ", DV_CUSTOM_WORKFLOW_STEP ){
taskDescription " Task is executed as custom workflow step "
def myArg = n e w U s e r D e f i n e d A r g u m e n t (
" myArgument ",
String ,
" User argument for the step ")
code {
def myArgVal = myArg . value
// The value myArgVal was passed from the custom workflow step in the
project settings editor
scriptLogger . info " MyArg is: $myArgVal "
}
}
Listing 4.135: Use a script task as custom workflow step
Generation Process Start
A sample for the DV_ON_GENERATION_START type:
scriptTask (" GenStartTask ", DV_ON_GENERATION_START ){
taskDescription " The task is automatically executed at generation start "
code { phasesToExecute , generators ->
scriptLogger . info " Phases are : $phasesToExecute "
scriptLogger . info " Generators to execute are : $generators "
// Execute code before the generation will start
}
}
Listing 4.136: Hook into the GenerationProcess at the start with script task
Generation Process End
A sample for the DV_ON_GENERATION_END type:
scriptTask (" GenEndTask ", DV_ON_GENERATION_END ){
taskDescription " The task is automatically executed at generation end "
code { generationResult , generators ->
scriptLogger . info " Process result was : $generationResult "
scriptLogger . info " Executed Generators : $generators "
// Execute code after the generation process was finished
}
}
Listing 4.137: Hook into the GenerationProcess at the end with script task
© 2017, Vector Informatik GmbH
110 of 250


Chapter 4.
AutomationInterface API Reference
4.7.3 Software Component Templates and Contract Phase Headers Generation
The Software Component Templates and Contract Phase Headers (Swct) generation automation
API provides access to configure and start the Swct generation.
The block generation.swct encapsulates all settings and commands which are related to this
use case.
The basic structure is the following:
generation . swct {
settings {
// Settings like the selection of components to generate
}
// The execution of the generation can be started here
generate ()
}
Listing 4.138: Basic Swct structure
4.7.3.1 Swct Generation Settings
The class IGenerationSwctSettingsApi encapsulates all settings which belong to a Swct ge-
neration process.
Examples:
• Select the software components to execute
• Retrieve the available software components
The following chapters show samples for the standard use cases.
4.7.3.2 Generation with default Project Settings
To execute the Swct generation with the standard project settings the following snippet can be
used:
scriptTask (" generate_with_default_settings "){
code {generation.swct{
generate ()
}
}
}
Listing 4.139: SWC Templates and Contract Headers generation with standard project settings
4.7.3.3 Generation of all Software Components
To execute the Swct generation for all available software components the following snippet can
be used:
© 2017, Vector Informatik GmbH
111 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" generate_with_default_settings "){
code {generation.swct{
settings . selectAll ()
generate ()
}
}
}
Listing 4.140: SWC Templates and Contract Headers generation of all components
4.7.3.4 Generation of one Software Component
This sample selects one specific software component and starts the generation. There are two
ways to open an settings block:
• settings
– This keyword creates empty settings. E.g. no component is selected for execution.
• settingsFromProject
– This keyword takes the project settings as template. E.g. component from the pro-
ject settings are initially activated and can optionally be refined by explicit selections.
scriptTask (" generate_one_component "){
code {generation.swct{
settings {
selectSoftwareComponent (" MyApplType ")
}
generate ()
}
}
}
Listing 4.141: SWC Templates and Contract Headers generation of one selected component
Instead of selecting the software component directly by its Name, there is also the possibility to
fetch the software component object and select() this object for execution.
scriptTask (" generate_one_component "){ code {
generation . swct {
settings {
def sw = s o f t w a r e C o m p o n e n t B y N a m e ( " M y App l T yp e " )
// Select the software component
sw. select ()
// You could also retrieve information about the component
def asrPath = sw . asrPath
if ( sw . selected ) {
/* Do something */ }
}generate()
}
}}
Listing 4.142: Swct generation get component and select component
© 2017, Vector Informatik GmbH
112 of 250


Chapter 4.
AutomationInterface API Reference
4.7.3.5 Generation of multiple Software Components
To select more than one Software Component the following snippet can be used.
scriptTask (" generate_one_component "){
code {generation.swct{
settings {
// Select the tow software components
selectSoftwareComponent (" MyApplType "," MySecondApplType ")
}
generate ()
}
}
}
Listing 4.143: Swct generation of multiple components
4.7.3.6 Evaluate generation results
The same API is used as for the normal generation, see chapter 4.7.1.3 on page 107 for de-
tails.
© 2017, Vector Informatik GmbH
113 of 250



Chapter 4.
AutomationInterface API Reference
4.8 Validation
4.8.1 Introduction
All examples in this chapter are based on the situation of the figure 4.6. The module and the
validators are not from the real MICROSAR stack, but just for the examples. There is a module
Tp that has 3 Buffer containers and each Buffer has a Size parameter with value=3.
There is also a validator that requires the Size parameter to be a multiple of 4. For each Size
parameter that violates this constraint, a validation-result with ID Tp00012 is created.
Such a validation-result has 2 solving-actions. One that sets the Size to the next smaller valid
value, and one that sets the Size to the next bigger valid value. The letter solving-action is
marked as preferred-solving-action.
There is also a Tp00011 result that stands for any other result. The examples will not touch
it.
Figure 4.6: example situation with the GUI
4.8.2 Access Validation-Results
A validation{} block gives access to the validation API of the consistency component. That
means accessing the validation-results which are shown in the GUI in the validation view,
and solving them by executing solving-actions which are also shown in the GUI beneath each
validation-result (with a bulb icon).
getValidationResults() waits for background-validation-idle and returns all validation-results
© 2017, Vector Informatik GmbH
114 of 250


Chapter 4.
AutomationInterface API Reference
of any kind. The returned collection has no deterministic order, especially it is not the same
order as in the GUI.
scriptTask (" CheckValidationResults_filterByOriginId ", DV_PROJECT ){
code {validation{
// access all validation - results
def a l l R e s u l t s = v a l i d a t i o n R e s u l t s
a s s e r t a l l R e s u l t s . size () > 3
// filter based on methods of IValidationResultUI e.g. isId ()
def t p 1 2 R e s u l t s = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }
a s s e r t t p 1 2 R e s u l t s . size () == 3
}
// alternative access to validation - results without a validation block
a s s e r t v a l i d a t i o n . v a l i d a t i o n R e s u l t s . size () > 3
}
}
Listing 4.144: Access all validation-results and filter them by ID
4.8.3 Model Transaction and Validation-Result Invalidation
Before we continue in this chapter with solving validation-results, the following information is
import to know:
Relation to model transactions:
Solving validation-results with solving-actions always creates a transaction implicitly.
An
IllegalStateException will be thrown if this is done within an explicitly opened tran-
saction.
Invalidation of validation-results:
Any model modification may invalidate any validation-result. In that case, the responsible
validator creates a new validation-result if the inconsistency still exists. Whether this happens
for a particular modification/validation-result depends on the validator implementation and is
not visible to the user/client.
Trying to solve an invalidated validation-result will throw an IllegalStateException. The-
refore it is not safe to solve a particular ISolvingActionUI that was fetched before the last
transaction. Instead, please fetch a solving-action after the last transaction, or use the method
ISolver.solve(Closure) which is the most preferred way of solving validation-results with
solving-actions.
See chapter 4.8.4.1 on the following page for details.
4.8.4 Solve Validation-Results with Solving-Actions
A single validation-result can be solved by calling solve() on one of its solving-actions.
© 2017, Vector Informatik GmbH
115 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" SolveSingleResultWithSolvingAction ", DV_PROJECT ){
code {validation{
def t p 1 2 R e s u l t s = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }
a s s e r t t p 1 2 R e s u l t s . size () == 3
// Take first ( any ) validation - result and filter its solving -
actions based on methods of ISolvingActionUI
tp12Results . first . solvingActions . filter {
it. description . contains (" next bigger valid value ")
}. single . solve () // reduce the collection to a single
ISolvingActionUI and call solve ()
a s s e r t
validationResults . filter {it. isId ("Tp", 12) }. size () == 2
// One Tp12 validation - result solved
}
}
}
Listing 4.145: Solve a single validation-result with a particular solving-action
4.8.4.1 Solver API
getSolver() gives access to the ISolver API, which has advanced methods for bulk soluti-
ons.
ISolver.solve(Closure) allows to solve multiple validation-results within one transaction.
You should always use this method to solve multiple validation-results at once instead of calling
ISolvingActionUI.solve() in a loop. This is very important, because solving one validation-
result, may cause invalidation of another one. And calling ISolvingActionUI.solve() of an
invalidated validation-result throws an IllegalStateException. Also, invalidated validation-
results may get recalculated and you would miss the recalculated validation-results with the
loop approach. But with ISolver.solve(Closure) you can solve invalidated->recalculated
results as well as results which didn’t exist at the time of the call (but have been caused by
solving some other validation-result).
ISolver.solve(Closure) first waits for background-validation-idle in order to have reprodu-
cible results.
The closure may contain multiple statements like:
result { specify result predicate }. withAction { select solving action }
All statements together will be used as a mapper from any solvable validation-result to a
particular solving-action.
The order of these statements does not affect the solving action
execution order. The statement order might only be relevant if multiple statements match on
a particular result, but would select a different solving-action. In that case, the first statement
that successfully selects a solving-action wins.
© 2017, Vector Informatik GmbH
116 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" SolveMultipleResults ", DV_PROJECT ){
code {
validation {
a s s e r t
validationResults . size () == 4
solver . solve {
// Call result () and pass a closure that works as filter
// based on methods of IValidationResultUI .
result {
isId ("Tp", 12)
}. withAction {
containsString (" next bigger valid value ")
}
// On the return value , call withAction () and pass a closure that
// selects a solving - action based on methods
// of IValidationResultForSolvingActionSelect
// multiple result () calls can be placed in one solve () call .
result { isId (" Com ", 34) }. withAction { containsString (" recalculate ")}
}
a s s e r t
validationResults . size () == 1
// Three Tp12 and zero Com34 ( didn 't exist ) results solved . One other
left
}}}
Listing 4.146: Fast solve multiple results within one transaction
Solve all PreferredSolvingActions
ISolver.solveAllWithPreferredSolvingAction() sol-
ves all validation-results with its preferred solving- action of each validation-result (solving-
action return by IValidationResultUI.getPreferredSolvingAction()). Validation-results
without a preferred solving-action are skipped.
This method first waits for background-validation-idle in order to have reproducible results.
scriptTask (" SolveAllWithPreferred ", DV_PROJECT ){
code {
validation {
a s s e r t
validationResults . size () == 4
solver . solveAllWithPreferredSolvingAction ()
a s s e r t
validationResults . size () == 1
// this would do the same
transactions . transactionHistory . undo ()
a s s e r t
validationResults . size () == 4
solver . solve {
result { true }. withAction { preferred }
}
a s s e r t
validationResults . size () == 1
}}}
Listing 4.147: Solve all validation-results with its preferred solving-action (if available)
© 2017, Vector Informatik GmbH
117 of 250


Chapter 4.
AutomationInterface API Reference
4.8.5 Advanced Topics
4.8.5.1 Access Validation-Results of a Model Object
You can retrieve validation-results also from any model object (MDF, Domain or BswmdMo-
del).
MIObject.getValidationResults() returns the validation-results of an MIObject. These are
those results for which IValidationResultUI.matchErroneousCE(MIObject) returns true.
scriptTask (" CheckValidationResultsOfObject ", DV_PROJECT ){
code {// sampleDefRefs contains DefRef constants just for this example.
Please use the real DefRefs from your SIP
// a Buffer container
def bu ff er 00 2 = mdfModel ( AsrPath . create ( " / A cti ve Ec u C / Tp / B uff er _0 02 " ) )
// the Size parameter
def si ze Pa ra m = b uf fe r0 02 . p ar am et er ( s a m p l e D e f R e f s . t p B u f f e r S i z e D e f R e f ) .
single
// the result exists for the Size parameter , not for the Buffer
container
a s s e r t s iz eP ar am . v a l i d a t i o n R e s u l t s . size () == 1
a s s e r t b uf fe r0 02 . v a l i d a t i o n R e s u l t s . size () == 0
}
}
Listing 4.148: Access all validation-results of a particular object
MIObject.getValidationResultsRecursive() returns the validation-results of an MIObject
and all its children. So this will return all results of the whole subtree, like an editor displays
results at parent objects.
IViewedModelObject.getValidationResults() returns the validation-results for the element
matching the model object and the model view, like BswmdModel objects.
IViewedModelObject.getValidationResultsRecursive() returns the validation-results of an
MIObject for the elements like BswmdModel objects all its children. This will also filter for the
correct IModelView. So this will return all results of the whole subtree, like an editor displays
results at parent objects.
4.8.5.2 Access Validation-Results of a DefRef
DefRef.getValidationResults() returns all validation-results which match the passed defi-
nition. So every configuration element which matches the validation-result and is an instance
of definition.
The used project for this call is the active project, see ScriptApi.getActiveProject().
© 2017, Vector Informatik GmbH
118 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" CheckValidationResultsOfDefRef ", DV_PROJECT ){
code {// sampleDefRefs contains DefRef constants just for this example.
Please use the real DefRefs from your SIP
a s s e r t
sampleDefRefs . tpBufferSizeDefRef . validationResults . size () == 3
}
}
Listing 4.149: Access all validation-results of a particular DefRef
4.8.5.3 Filter Validation-Results using an ID Constant
Groovy allows you to spread list elements as method arguments using the spread operator. This
allows you to define constants for the isId(String,int) method.
scriptTask (" FilterResultsUsingAnIdConstant2 ", DV_PROJECT ){
code {validation{
def t p1 2C on st = [ " Tp " ,12]
a s s e r t
validationResults . size () > 3
a s s e r t
validationResults . filter {it. isId (* tp12Const )}. size () == 3
}
}
}
Listing 4.150: Filter validation-results using an ID constant
4.8.5.4 Identification of a Particular Solving-Action
A so called solving-action-group-ID identifies a solving-action uniquely within one validation-
result. In other words, two solving-actions, which do semantically the same, from two validation-
results of the same result-ID (origin + number), belong to the same solving-action-group. This
semantical group may have an optional solving-action-group-ID, that can be used for solving-
action identification within one validation-result.
Keep in mind that the solving-action-group-ID is only unique within one validation-result-ID,
and that the group-ID assignment is optional for a validator implementation.
In order to find out the solving-action-group-IDs, press CTRL+SHIFT+F9 with a selected validation-
result to copy detailed information about that result including solving-action-group-IDs (if as-
signed) to the clipboard.
If group-IDs are assigned, it is much safer to use these for solving-action identification than
description-text matching, because a description-text may change.
© 2017, Vector Informatik GmbH
119 of 250


Chapter 4.
AutomationInterface API Reference
f i n a l int S A _ G R O U P _ I D _ T P 1 2 _ N E X T _ B I G G E R _ V A L I D _ V A L U E = 2
scriptTask (" SolveMultipleResultsByGroupId ", DV_PROJECT ){
code {
validation {
a s s e r t
validationResults . size () == 4
solver . solve {
result { isId ("Tp", 12) }
. withAction {
byGroupId ( SA_GROUP_ID_TP12_NEXT_BIGGER_VALID_VALUE )
}
// instead of . withAction { containsString (" next bigger valid value ")}
}
a s s e r t
validationResults . size () == 1
// Three Tp12 validation - results solved .
}
}
}
Listing 4.151: Fast solve multiple validation-results within one transaction using a solving-
action-group-ID
4.8.5.5 Validation-Result Description as MixedText
IValidationResultUI.getDescription() returns an IMixedText that describes the inconsis-
tency.
IMixedText is a construct that represents a text, whereby parts of that text can also hold the
object which they represent. This allows a consumer e.g. a GUI to make the object-parts of
the text clickable and to reformat these object-parts as wanted.
Consumers which don’t need these advanced features can just call IMixedText.toString()
which returns a default format of the text.
4.8.5.6 Further IValidationResultUI Methods
The following listing gives an overview of other "properties" of an IValidatonResultUI.
© 2017, Vector Informatik GmbH
120 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" IValidationResultUIApiOverview ", DV_PROJECT ){
code {
validation {
def r = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }. first
a s s e r t r . id . origin == " Tp "
a s s e r t r . id . id == 12
a s s e r t r . d e s c r i p t i o n . toString () . contains ( " must be a multiple of " )
a s s e r t r . severity == E V a l i d a t i o n S e v e r i t y T y p e . ERROR
a s s e r t r . s o l v i n g A c t i o n s . size () == 2
a s s e r t r . g e t S o l v i n g A c t i o n B y G r o u p I d (2) . d e s c r i p t i o n . contains ( " next bigger
valid value ")
// this result has a preferred - solving - action
a s s e r t r . p r e f e r r e d S o l v i n g A c t i o n == r . g e t S o l v i n g A c t i o n B y G r o u p I d (2)
// results with lower severity than ERROR can be acknowledged in the GUI
a s s e r t r . a c k n o w l e d g e m e n t . i sP re se nt () == false
// if the cause was an exception , r. cause . get () returns it
a s s e r t r . cause . i sP re se nt () == false
// an ERROR result gets reduced to WARNING if one of its erroneous CEs is
user - defined (user - overridden )
a s s e r t r . i s R e d u c e d S e v e r i t y () == false
// on - demand results are visualized with a gear - wheel icon
a s s e r t r . i s O n D e m a n d R e s u l t () == false
}
}
}
Listing 4.152: IValidationResultUI overview
4.8.5.7 IValidationResultUI in a variant (Post Build Selectable) Project
scriptTask (" IValidationResultUIInAVariantProject ", DV_PROJECT ){
code {validation{
def r = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }. first
a s s e r t r . i s G e n e r a l V a r i a n t C o n t e x t () // either it is a general result
...
a s s e r t r . p r e d e f i n e d V a r i a n t C o n t e x t s . size () == 0 // or it is assigned
to one or more ( but never all ) variants
// If a validator assigns a result to all variants , it will be a
general result at UI - side .
}
}
}
Listing 4.153: IValidationResultUI in a variant (post build selectable) project
4.8.5.8 Erroneous CEs of a Validation-Result
IValidationResultUI.getErroneousCEs() returns a collection of IDescriptor, each descri-
bing a CE that gets an error annotation in the GUI.
To check for a certain model element is affected by the result please use the methods, which
return true, if a model is affected by the validation-result:
© 2017, Vector Informatik GmbH
121 of 250


Chapter 4.
AutomationInterface API Reference
• IValidationResultUI.matchErroneousCE(MIObject)
• IValidationResultUI.matchErroneousCE(IHasModelObject)
• IValidationResultUI.matchErroneousCE(MIHasDefinition, DefRef)
scriptTask (" IValidationResultUIErroneousCEs ", DV_PROJECT ){
code {validation{
// sampleDefRefs contains DefRef constants just for this example .
Please use the real DefRefs from your SIP
def result = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }. first
// Retrieve the model element to check
def m o d e l E l e m e n t // = r e t r i e v e E l e m e n t ...
// Check if the model object is affected by the validation - result
a s s e r t result . m a t c h E r r o n e o u s C E ( m o d e l E l e m e n t )
}
}
}
Listing 4.154: CE is affected by (matches) an IValidationResultUI
Advanced Descriptor Details
An IDescriptor is a construct that can be used to "point to"
some location in the model. A descriptor can have several kinds of aspects to describe where it
points to. Aspect kinds are e.g. IMdfObjectAspect, IDefRefAspect, IMdfMetaClassAspect,
IMdfFeatureAspect.
getAspect(Class) gets a particular aspect if available, otherwise null.
A descriptor has a parent descriptor. This allows to describe a hierarchy.
E.g. if you want to express that something with definition X is missing as a child of the existing
MDF object Y. In this example you have a descriptor with an IDefRefAspect containing the
definition X. This descriptor that has a parent descriptor with an IMdfObjectAspect containing
the object Y.
The term descriptor refers to a descriptor together with its parent-descriptor hierarchy.
© 2017, Vector Informatik GmbH
122 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . c e d e s c r i p t o r . aspect .*
scriptTask (" IValidationResultUIErroneousCEs ", DV_PROJECT ){
code {validation{
// sampleDefRefs contains DefRef constants just for this example .
Please use the real DefRefs from your SIP
def result = v a l i d a t i o n R e s u l t s . filter { it . isId ( " Tp " , 12) }. first
def d e s c r i p t o r = result . e r r o n e o u s C E s . single // this result in this
example has only a single erroneous -CE descriptor
def d e f R e f A s p e c t = d e s c r i p t o r . ge tA sp ect ( I D e f R e f A s p e c t . class )
a s s e r t d e f R e f A s p e c t != null ; // this de sc ri pt or in this example has
an IDefRefAspect
a s s e r t d e f R e f A s p e c t . defRef . equals ( s a m p l e D e f R e f s . t p B u f f e r S i z e D e f R e f )
def o b j e c t A s p e c t = d e s c r i p t o r . ge tA sp ect ( I M d f O b j e c t A s p e c t . class )
a s s e r t o b j e c t A s p e c t != null // // this d es cr ip to r in this example
has an IMdfObjectAspect
// An IMdfObjectAspect would be unavailable for a descriptor
describing that something is missing
def p a r e n t O b j e c t A s p e c t = d e s c r i p t o r . parent . get Aspect (
IMdfObjectAspect . class )
a s s e r t
parentObjectAspect != null
// Dealing with descriptors is universal , but needs more code .
Using these methods might fit your needs .
a s s e r t result . m a t c h E r r o n e o u s C E ( o b j e c t A s p e c t . getO bject () )
a s s e r t result . m a t c h E r r o n e o u s C E ( p a r e n t O b j e c t A s p e c t . ge tObject () ,
sampleDefRefs . tpBufferSizeDefRef )
}
}
}
Listing 4.155: Advanced
use
case
-
Retrieve
Erroneous
CEs
with
descriptors
of
an
IValidationResultUI
4.8.5.9 Examine Solving-Action Execution
The easiest and most reliable option for verifying solving-action execution is to check the pre-
sence of validation-results afterwards.
This is also the feedback strategy of the GUI. After multiple solving-actions have been solved,
the GUI does not show the execution result of each individual solving-action, but just the
remaining validation-results after the operation. Only if a single solving-action is to be solved,
and that fails, the GUI shows the message of that failure including the reason.
The following describes further options of examination:
ISolvingActionUI.solve() returns an ISolvingActionExecutionResult.
An ISolvin-
gActionExecutionResult represents the result of one solving action execution. Use isOk() to
find out if it was successful. Call getUserMessage() to get the failure reason.
ISolver.solve(Closure) returns an ISolvingActionSummaryResult.
An ISolvingActi-
onSummaryResult represents the execution of multiple results.
ISolvingActionSummary-
Result.isOk() returns true if getExecutionResult() is EExecutionResult.SUCCESSFUL or
EExecutionResult.WARNING, this is if at least one sub-result was ok.
Call getSubResults() to get a list of ISolvingActionExecutionResults.
© 2017, Vector Informatik GmbH
123 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . util . activity . e x e c r e s u l t . E E x e c u t i o n R e s u l t
scriptTask (" SolvingReturnValue ", DV_PROJECT ){
code {validation{
a s s e r t
validationResults . size () == 4
// In this example , three validation - results have a preferred
solving action .
// One of the three cannot be solved because a parameter is user -
defined .
def s u m m a r y R e s u l t = solver . s o l v e A l l W i t h P r e f e r r e d S o l v i n g A c t i o n ()
a s s e r t
validationResults . size () == 2 // Two have been solved , one
with a preferred solving - action is left .
a s s e r t
summaryResult . executionResult == EExecutionResult . WARNING
// DemoAsserts is just for this example to show what kind of sub -
results the summaryResult contains .
DemoAsserts . summaryResultContainsASubResultWith ("OK", summaryResult )
// two such sub - results for the validation - results with preferred -
solving - action that could be solved
DemoAsserts . summaryResultContainsASubResultWith ([" invalid
modification "," not changeable "," Reason ","is user - defined "],
summaryResult )
// such a sub - result for the failed preferred solving action due to
the user - defined parameter
DemoAsserts . summaryResultContainsASubResultWith (" Maximum solving
attempts reached for the validation - result of the following
solving - action ", summaryResult )
// Cfg5 takes multiple attempts to solve a result because other
changes may eliminate a blocking reason , but stops after an
execution limit is reached .
}
}
}
Listing 4.156: Examine an ISolvingActionSummaryResult
4.8.5.10 Create a Validation-Result in a Script Task
The resultCreation API provides methods to create new IValidationResults, which could
then be reported to a IValidationResultSink. This is can be used to report validation-results
similar to a validator/generator, but from within a script task.
ValidationResultSink
The IValidationResultSink must be obtained by the context and is
not provided by the creation API. E.g. some script tasks pass an IValidationResultSink as
argument (like DV_GENERATION_STEP).
Or you have to activate the MD license option for development during script task creation by
calling the method requiresMDDevelopmentLicense(), then you could retrieve an IValida-
tionResultSink from the method getResultSink().
Reporting ValidationResult in Task providing a ResultSink
This sample applies to task types
providing a ResultSink in the Task API, like DV_GENERATION_STEP.
© 2017, Vector Informatik GmbH
124 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" ScriptTaskCreationResult " /* Insert with task type providing
resultSink */ ){
code {
validation {
resultCreation {
// The ValidationResultId group multiple results
def valId = c r e a t e V a l i d a t i o n R e s u l t I d F o r S c r i p t T a s k (
/* ID */ 1234 ,
/* Description */ " Summary of the ValidationResultId ",
/* Severity */ EValidationSeverityType . ERROR )
// Create a new resultBuilder
def builder = n e w R e s u l t B u i l d e r ( valId , " D e s c r i p t i o n of the Result " )
// You can add multiple elements as error objects to mark them
builder . addErrorObject ( sipDefRef . EcucGeneral . bswmdModel (). single )
// Add more calls when needed
// Create the result from the builder
def va lR es ul t = builder . b u i l d R e s u l t ()
// You need to report the result to a resultSink
// You have to get the sink from the context , e.g. script task args
// a sample line would be
resultSinkForTask . reportValidationResult ( valResult )
}
}
}}
Listing 4.157: Create a ValidationResult
Reporting ValidationResult with MD License Option for Development
This sample can be
used in every task types but you need a MD license option for development to retrieve the
ResultSink.
scriptTask (" ScriptTaskCreationResult ", DV_PROJECT ){
// Result reporting requires an MD license for development
requiresMDDevelopmentLicense ()
code {
validation {
resultCreation {
// The ValidationResultId group multiple results
def valId = c r e a t e V a l i d a t i o n R e s u l t I d F o r S c r i p t T a s k (
/* ID */ 1234 ,
/* Description */ " Summary of the ValidationResultId ",
/* Severity */ EValidationSeverityType . ERROR )
// Create a new resultBuilder
def builder = n e w R e s u l t B u i l d e r ( valId , " D e s c r i p t i o n of the Result " )
// Create the result from the builder
def va lR es ul t = builder . b u i l d R e s u l t ()
// When MD license is enabled you can access a resultSink
resultSink . reportValidationResult ( valResult )
}}}}
Listing 4.158: Report a ValidationResult when MD license option is available
© 2017, Vector Informatik GmbH
125 of 250


Chapter 4.
AutomationInterface API Reference
4.8.5.11 Turn off auto-solving-action execution
Auto-solving-action execution is a feature to simplify configuration by automatically adjusting
dependent data after a change was made by the user. This feature runs synchronous to the user
change and may have impact on UI responsiveness. If UI response time is not acceptable, this
should be reported to Vector.
Using setEnabled(boolean), auto-solving-action execution can be disabled to find out if this
is the cause and as an interim workaround.
If auto-solving-action execution is disabled, data might get out of sync after a user change,
E.g. Vtt dual target sync, BSW Internal Behavior, ... . In that case, these have to be solved
manually with the corresponding validaton-result’s solving action.
This setting is stored as user-independent project setting.
This setting can only be changed if isChangeable() returns true (false e.g. due to read-only
project), otherwise an IllegalStateException is thrown.
scriptTask (" SolvingReturnValue ", DV_PROJECT ){
code {validation{
settings {
if ( a u t o S o l v i n g A c t i o n E x e c u t i o n . c h an ge ab le ) {
autoSolvingActionExecution . enabled = false
}
}
}
}
}
Listing 4.159: Turn off auto solving action execution
© 2017, Vector Informatik GmbH
126 of 250


Chapter 4.
AutomationInterface API Reference
4.9 Update Workflow
The Update Workflow derives the initial EcuC from the input files and updates the project
accordingly. The Update Workflow API comprises modification of variants, modification of the
input files list and the execution of an update workflow.
4.9.1 Method Overview
• workflow: the workflow closure is the central entry point for the Workflow API.
– update: contains all settings for the Update Workflow and executes the update after
leaving the closure block.
∗ input: supports the modification of the input files list and specific settings.
· communication: the communication closure contains settings for the com-
munication extract and communication legacy input files (like cbd, ldf or
fibex). Take a look at the JavaDoc of ICommunicationApi for all possible
settings.
4.9.2 Example: Content of Input Files has changed.
In case of a changed content of input files, the update workflow can be started with the work-
flow.update(dpaProjectFilePath) method. This will start the Update Workflow, with the
input files as selected in the DaVinci Configurator GUI. The parameter dpaProjectFilePath
accepts the same types and has the same semantic as resolvePath described in 4.4.3.1 on
page 36.

scriptTask (" UpdateExistingProject ", DV_APPLICATION ) {
code {
workflow . update pathToDpaFile
}
}
Listing 4.160: "Update existing project"
The update workflow is started at the end of the update-closure.
© 2017, Vector Informatik GmbH
127 of 250


Chapter 4.
AutomationInterface API Reference
4.9.3 Example: List of Input Files shall be changed
scriptTask (" ChangeListOfComExtractsAndUpdate ", DV_APPLICATION ) {
code {
def e x t r a c t P a t h = paths . r e s o l v e P a t h ( e x t r a c t F i l e )
def d i a g E x t r a c t P a t h = paths . r e s o l v e P a t h ( d i a g E x t r a c t )
workflow . update ( dpaProjectFile ){
updateSettings {
updateMode = ECUC_ONLY
uuidUsageInStandardConfigurationEnabled = false ;
uuidUsageInSystemDescriptionEnabled = false ;
}input{
communication {
extract {
extractFiles { exFilePathList ->
// clear the list of communication extracts
exFilePathList . clear ()
// adds an communication extract
exFilePathList . add ( extractPath . asPersistablePath ())
}
// change the selection of the ecuInstance
// Note : this closure is deferred executed .
ecuInstanceSelection {
r e t u r n
availableEcuInstances [0]
}
}
}diagnostic{
extract {
extractFiles { exFilePathList ->
// clear the list of communication extracts
exFilePathList . clear ()
// adds an communication extract
exFilePathList . add ( diagExtractPath . asPersistablePath ())
}
// change the selection of the ecuInstance
// Note : this closure is deferred executed .
ecuInstanceSelection {
r e t u r n
availableEcuInstances [0]
}
}
}
}}}}
Listing 4.161: Change list of communication extracts and update
Note: The code in the ecuInstanceSelection closure is deferred executed.
The
access to variables, declared outside of this closure is not allowed.
This example shows the complete replacement of the current list of communication extracts
with one extract and the selection of the first ecuInstance in the new extract. The update
workflow is executed after the update closure block is left.
4.9.4 Prerequisites
The Update Workflow can’t be executed while the Project to update is open. E.g. in a IPro-
jectRef.openProject closure block or in a ScriptTask with the DV_PROJECT ScriptTaskType.
© 2017, Vector Informatik GmbH
128 of 250


Chapter 4.
AutomationInterface API Reference
Becaue the update workflow has to close and open the project during update, which would
cause strange behavior in your client code.
© 2017, Vector Informatik GmbH
129 of 250


Chapter 4.
AutomationInterface API Reference
4.10 Domains
The domain APIs are specifically designed to provide high convenience support for typical
domain use cases.
The domain API is the entry point for accessing the different domain interfaces. It is available
in opened projects in the form of the IDomainApi interface.
IDomainApi provides methods for accessing the different domain-specific APIs.
Each dom-
ain’s API is available via the domain’s name. For an example see the communication domain
API 4.10.1.
getDomain() allows accessing the IDomainApi like a property.
scriptTask ('taskName ') {
code {
// IDomainApi is available as " domain " property
def d om ai nA pi = domain
}
}
Listing 4.162: Accessing IDomainApi as a property
domain(Closure) allows accessing the IDomainApi in a scope-like way.
scriptTask ('taskName ') {
code {
domain {
// IDomainApi is available inside this Closure
}
}
}
Listing 4.163: Accessing IDomainApi in a scope-like way
4.10.1 Communication Domain
The communication domain API is specifically designed to support communication related
use cases. It is available from the IDomainApi 4.10 in the form of the ICommunicationApi
interface.
getCommunication() allows accessing the ICommunicationApi like a property.
scriptTask ('taskName ') {
code {
// ICommunicationApi is available as " communication " property
def c o m m u n i c a t i o n = domain . c o m m u n i c a t i o n
}
}
Listing 4.164: Accessing ICommunicationApi as a property
communication(Closure) allows accessing the ICommunicationApi in a scope-like way.
© 2017, Vector Informatik GmbH
130 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask ('taskName ') {
code {
domain . communication {
// ICommunicationApi is available inside this Closure
}
}
}
Listing 4.165: Accessing ICommunicationApi in a scope-like way
The following use cases are supported:
Accessing Can Controllers
getCanControllers() returns a list of all ICanControllers in
the configuration 4.10.1.1 on the following page.
© 2017, Vector Informatik GmbH
131 of 250


Chapter 4.
AutomationInterface API Reference
4.10.1.1 CanControllers
An ICanController instance represents a CanController MIContainer providing support for
use cases exceeding those supported by the model API.
scriptTask (' OptimizeAcceptanceFilters ', DV_APPLICATION ) {
code {
// replace $dpaFile with the path to your project
def t h e P r o j e c t = projects . o p e n P r o j e c t ( " $dpaFile " ) {
transaction {
domain . communication {
// open acceptance filters of all CanControllers
canControllers *. openAcceptanceFilters ()
// open acceptance filters of first CanController
canControllers . first . openAcceptanceFilters ()
canControllers [0]. openAcceptanceFilters () // same as above
// open acceptance filters of second CanController
// (if there is a second CanController )
canControllers [1]?. openAcceptanceFilters ()
// open acceptance filters of a dedicated CanController
canControllers . filter { it. name . contains 'CH0 ' }. single .
openAcceptanceFilters ()
// accessing a dedicated CanController
def ch0 = c a n C o n t r o l l e r s . filter { it . name . contains ' CH0 ' }. single
// assert : ch0 's first CanFilterMask value is XXXXXXXXXXX
a s s e r t ' X X X X X X X X X X X ' == ch0 . c a n F i l t e r M a s k s [0]. filter
// set CanFilterMask value to 01111111111
ch0 . canFilterMasks [0]. filter = ' 01111111111 '
a s s e r t ' 0 1 1 1 1 1 1 1 1 1 1 ' == ch0 . c a n F i l t e r M a s k s [0]. filter
// automatic acceptance filter optimization
ch0 . optimizeFilters { fullCan = true }
}
}
}scriptLogger.info('Successfully optimized Can acceptance filters.')
}
}
Listing 4.166: Optimizing Can Acceptance Filters
Opening Acceptance Filters
openAcceptanceFilters() opens all of this ICanController’s
acceptance filters.
Optimizing Acceptance Filters
optimizeFilters(Closure) optimizes this ICanControl-
ler’s acceptance filter mask configurations. The given Closure is delegated to the IOpti-
mizeAcceptanceFiltersApi interface for parameterizing the optimization.
Using setFullCan(boolean) it can be specified whether the optimization shall take full can
objects into account or not.
© 2017, Vector Informatik GmbH
132 of 250


Chapter 4.
AutomationInterface API Reference
Creating new CanFilterMasks
createCanFilterMask() creates a new ICanFilterMask for
this ICanController.
Accessing a CanController’s CanFilterMasks
getCanFilterMasks() returns all of this ICan-
Controller’s ICanFilterMasks.
Accessing a CanController’s MIContainer
getMdfObject() returns the MIContainer repre-
sented by this ICanController.
4.10.1.2 CanFilterMasks
An ICanFilterMask instance represents a CanFilterMask MIContainer providing support for
use cases exceeding those supported by the model API.
For example code see 4.10.1.1 on the previous page. The following use cases are supported:
Filter Types
ECanAcceptanceFilterType lists the possible values for an ICanFilterMask’s
filter type.
STANDARD results in a standard Can acceptance filter value with length 11.
EXTENDED results in an extended Can acceptance filter value with length 29.
MIXED results in a mixed Can acceptance filter value with length 29.
Accessing a CanFilterMask’s Filter Type
getFilterType() returns this ICanFilterMask’s
filter type.
Specifying a CanFilterMask’s Filter Type
Using setFilterType(ECanAcceptanceFilterType)
this ICanFilterMask’s filter type can be specified.
Accessing a CanFilterMask’s Filter Value
getFilter() returns this ICanFilterMask’s filter
value. A CanFilterMask’s filter value is a String containing the characters ’0’, ’1’ and ’X’
(don’t care). For determining if a given Can ID passes the filter it is matched bit for bit against
the String’s characters. The character at index 0 is matched against the most significant bit.
The character at index length() - 1 is matched against the least significant bit. The length
of the String corresponds to the CanFilterMask’s filter type.
Specifying a CanFilterMask’s Filter Value
Using setFilter(String) this ICanFilterMask’s
filter value can be specified.
Accessing a CanFilterMask’s MIContainer
getMdfObject() returns the MIContainer repre-
sented by this ICanFilterMask.
© 2017, Vector Informatik GmbH
133 of 250


Chapter 4.
AutomationInterface API Reference
4.10.2 Diagnostics Domain
The diagnostics domain API is specifically designed to support diagnostics related use cases.
It is available from the IDomainApi 4.10 on page 130 in the form of the IDiagnosticsApi
interface.
getDiagnostics() allows accessing the IDiagnosticsApi like a property.
scriptTask ('taskName ') {
code {
// IDiagnosticsApi is available as " diagnostics " property
def d i a g n o s t i c s = domain . d i a g n o s t i c s
}
}
Listing 4.167: Accessing IDiagnosticsApi as a property
diagnostics(Closure) allows accessing the IDiagnosticsApi in a scope-like way.
scriptTask ('taskName ') {
code {
domain . diagnostics {
// IDiagnosticsApi is available here
}
}
}
Listing 4.168: Accessing IDiagnosticsApi in a scope-like manner
The following use cases are supported:
Dem Events
The API provides access and creation of IDemEvents in the configuration. See
chapter 4.10.2.1 on the next page for more details.
Check for OBD II
isObd2Enabled() checks, if OBD II is available in the configuration.
Enable OBD II
setObd2Enabled(boolean) enables or disables OBD II in the configuration.
Note, that OBD II can only be enabled, if a valid SIP license was found.
Check for WWH-OBD
isWwhObdEnabled() checks, if WWH-OBD is available in the confi-
guration.
Enable WWH-OBD
setWwhObdEnabled(boolean) enables or disables WWH-OBD in the
configuration. Note, that WWH-OBD can only be enabled, if a valid SIP license was found.
© 2017, Vector Informatik GmbH
134 of 250


Chapter 4.
AutomationInterface API Reference
4.10.2.1 DemEvents
An IDemEvent instance represents a diagnostic event and and provides usecase centric functio-
nalities to modify and query diagnostic events.
Accessing Dem Events
getDemEvents() returns a list of all IDemEvents in the configuration.
Creating Dem Events
createDemEvent(Closure) is used to create diagnostic events of dif-
ferent kinds.
The method can be configured to create different types of DTCs/Events:
1. UDS Event: This is the default type of event, when only an ’eventName’ and a ’dtc’
number is specified. A new DemEventParameter container with the given shortname and
a new DemDTCClass with the given DemUdsDTC is created.
scriptTask ('taskName ') {
code {
transaction {
domain . diagnostics {
def udsEvent = c r e a t e D e m E v e n t {
eventName = " NewUdsEvent "
dtc = 0 x30
}
}}}}
Listing 4.169: Create a new UDS DTC with event
2. OBD II Event: If OBD II is enabled for the loaded configuration, and a ’obd2Dtc’ is spe-
cified instead of a ’dtc’, the method will create an OBD II relevant event. The difference
is, that it will set the parameter DemObdDTC instead of DemUdsDTC. It is also pos-
sible to specify ’dtc’ as well as ’obd2dtc’, which will result in both DTC parameters are set.
scriptTask ('taskName ') {
code {
transaction {
domain . diagnostics {
// OBD must be enabled and legislation must be OBD2
// Enable OBD2
obd2Enabled = true
def o bd 2E ve nt = c r e a t e D e m E v e n t {
eventName = ' NewOBD2Event '
obd2Dtc = 0 x40
}
def o b d 2 C o m b i n e d E v e n t = c r e a t e D e m E v e n t {
eventName = ' UDS_OBD2_Combined_Event '
dtc = 0 x31
obd2Dtc = 0 x41
}
}}}}
Listing 4.170: Enable OBD II and create a new OBD related DTC with event
© 2017, Vector Informatik GmbH
135 of 250


Chapter 4.
AutomationInterface API Reference
3. WWH-OBD Event: If WWH-OBD is enabled for the loaded configuration, and a ’ww-
hObdDtcClass’ with a value other than ’NO_CLASS’ is specified, the method will create
a WWH-OBD relevant event. Note that WWH-OBD relevant events usually du reference
the so called MIL indicator, thus this reference will be set by default in the newly created
DemEventParameter.
scriptTask ('taskName ') {
code {
transaction {
domain . diagnostics {
// OBD must be enabled , and legislation must be WWH - OBD
// The parameter '/ Dem / DemGeneral / DemMILIndicatorRef ' must
be set
wwhObdEnabled = true
def w w h O b d E v e n t = c r e a t e D e m E v e n t {
eventName = ' WWHOBD_Event '
dtc = 0 x50
// wwhObdClass != NO_CLASS indicates WWH - OBD event
wwhObdDtcClass = CLASS_A
}
}}}}
Listing 4.171: Enable WWH-OBD and create a new OBD related DTC with event
4. J1939 Event: The last type of event is a J1939 related event, which can be created when
J1939 is licensed and available for the loaded configuration. This is done in a similar way
as for UDS events, but additionally specifying ’spn’, ’fmi’ values as well as the name of
the referenced ’nodeAddress’.
scriptTask ('taskName ') {
code {
def n o d e A d d r e s s C o n t a i n e r = mdfModel ( AsrPath . create ( " / A c tiv eE cu C /
Dem / DemConfigSet / DemJ1939NodeAddress ", MIContainer ))
transaction {
domain . diagnostics {
// J1939 Event creation
// J1939 must be enabled and License must be available .
j1939Enabled = true
def j 1 9 3 9 E v e nt = c r e a t e D e m E v e n t {
eventName ' J1939_Event '
dtc 0 x30
spn 90
fmi 13
nodeAddress nodeAddressContainer
}
}}}}
Listing 4.172: Open a project, enable J1939 and create a new J1939 DTC with event
Important Note:
For every DTC numbers apply the rule, that if there are already DemDTCClasses with
the given number, they will be used. In such a case, no new DemDTCClass container is
created.
© 2017, Vector Informatik GmbH
136 of 250


Chapter 4.
AutomationInterface API Reference
4.10.3 Mode Management Domain
The mode management domain API is specifically designed to support mode management
related use cases. It is available from the IDomainApi 4.10 on page 130 in the form of the
IModeManagementApi interface.
getModeManagement() allows accessing the IModeManagementApi like a property.
scriptTask ('taskName ') {
code {
// IModeManagementApi is available as " modeManagement " property
def m o d e M a n a g e m e n t = domain . m o d e M a n a g e m e n t
}
}
Listing 4.173: Accessing IModeManagementApi as a property
modeManagement(Closure) allows accessing the IModeManagementApi in a scope-like way.
scriptTask ('taskName ') {
code {
domain . modeManagement {
// IModeManagementApi is available inside this Closure
}
}
}
Listing 4.174: Accessing IModeManagementApi in a scope-like way
4.10.3.1 BswM Auto Configuration
The IBswMAutoConfigurationApi allows for semi-automatic creation of dedicated parts of the
BswM configuration. The BswM auto configuration takes an input consisting of "features" and
"parameters" to be provided via the IBswMAutoConfigurationApi. Each feature may have
zero, one or more sub-features and zero, one or more parameters.
The corresponding BswM configuration content is derived based on the (de)activation of features
and the values assigned to the parameters.
The available features and parameters depend strongly on the project’s input data and general
project setup. They can be addressed by String identifiers. These identifiers are best obtained
from the corresponding auto configuration assistant of the BSW management editor in the Cfg5
GUI.
© 2017, Vector Informatik GmbH
137 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (' EcuStateHandlingAutoConfiguration ', DV_PROJECT ) {
code {
// In projects with post - build selectable variance switching to an
// IPredefinedVariantView for performing auto configuration is mandatory
variance . variantView ('Left '). activeWith {
domain . modeManagement . bswMAutoConfig ('Ecu State Handling ') {
activate '/ ECU State Machine / Support ComM '
set '/ ECU State Machine / Self Run Request Timeout ' to 0.2
set '/ ECU State Machine / Number of Run Request User ' to 4
overrides {
if ( addition || removal ) {
keepOverride
else if ( BswMArgumentRef . DEFREF . isDefinitionOf ( element )
&& feature ('/ ECU State Machine / Support ComM / CAN00_f26020e5 ').
enabled
&& parameter ('/ ECU State Machine / Number of PostRun Request
User '). value == 4) {
discardOverride
else {
keepOverride
}
}
}
}
}
}
Listing 4.175: ECU State Handling Auto Configuration
Executing the BswM Auto Configuration
IModeManagementApi.bswMAutoConfig(String,
Closure) delegates the given code to the IBswMAutoConfigurationApi of the given BswM
auto configuration domain.
Activating BswM Auto Configuration Features
activate(String) activates the BswM auto
configuration feature with the given identifier. All enabled sub-features of the specified feature
are also activated. Imagine the features displayed in a tree structure (like in Cfg5 GUI) where
checking a tree node automatically checks all children.
Deactivating BswM Auto Configuration Features
deactivate(String) deactivates the BswM
auto configuration feature with the given identifier. All enabled sub-features of the specified
feature are also deactivated. Imagine the features displayed in a tree structure (like in Cfg5
GUI) where unchecking a tree node automatically unchecks all children.
Assigning Values to BswM Auto Configuration Parameters
set(String) sets the parameter
with the given identifier to the specified value. Supported value types are boolean, BigInteger,
BigDecimal, String and MIReferrable (reference parameters).
Manually Adapting the BswM Auto Configuration Content
The BswM auto configuration
mechanism is useful for creating large parts of the BswM configuration based on certain built-in
heuristics. Where these heuristics fail to fulfill detailed project specific requirements manual
adaptations to the auto-generated configuration content become necessary.
© 2017, Vector Informatik GmbH
138 of 250


Chapter 4.
AutomationInterface API Reference
Per default manual adjustments are kept in the configuration. But subsequent BswM auto
configuration runs may render previously applied adjustments obsolete or dysfunctional. Using
overrides(Closure) a callback can be registered to be called for each detected adaptation. The
callback can decide for each adjustment if it is to remain in the configuration or if it is to be over-
written by the BswM auto configuration. For details on which information is provided to this
callback please refer to the javadoc provided with IBswMAutoConfigurationOverride.
Inspecting BswM Auto Configuration Domains
The getBswMAutoConfigDomains() met-
hod of the IModeManagementApi interface provides read-access to all available BswM auto
configuration domains. Available features and parameters can be inspected for various proper-
ties. See javadoc of IBswMAutoConfigurationDomain, IBswMAutoConfigurationFeature and
IBswMAutoConfigurationParameter for details.
domain . modeManagement {
// In projects with post - build selectable variance switching to an
// IPredefinedVariantView for inspecting auto configuration is mandatory
variance . variantView ('Left '). activeWith {
// get all BswM auto configuration domains
def e c u S t a t e H a n d l i n g D o m a i n = b s w M A u t o C o n f i g D o m a i n s . forEach {
scriptLogger . info it. identifier
}
def i sE na bl ed = b s w M A u t o C o n f i g D o m a i n ' Ecu State Handling ' feature '/ ECU
State Machine / Support ComM ' enabled
def i s A c t i v a t e d = b s w M A u t o C o n f i g D o m a i n ' Ecu State Handling ' feature '/ ECU
State Machine / Support ComM ' activated
if ( is En ab le d && i s A c t i v a t e d ) {
// activation state can be toggled at enabled features only
bswMAutoConfig ('Ecu State Handling ') {
deactivate '/ ECU State Machine / Support ComM '
}
}
bswMAutoConfigDomain ('Ecu State Handling ') {
// this code is delegated to the 'Ecu State Handling '
// auto configuration domain
def p1 = pa ra me te r '/ ECU State Machine / Self Run Request Timeout ' value
scriptLogger . info 'Self Run Request Timeout = ' + p1
def p2 = pa ra me te r '/ ECU State Machine / Number of Run Request User ' value
scriptLogger . info 'Number of Run Request User = ' + p2
// get all root features
rootFeatures . forEach { scriptLogger . info it. identifier }
// get all sub - features of a feature
feature '/ ECU State Machine / Support ComM ' subFeatures . forEach {
scriptLogger . info it. identifier
}
// get all parameters of a feature
feature '/ ECU State Machine ' parameters . forEach {
scriptLogger . info it. identifier
}
}
}
}
Listing 4.176: Inspecting Auto Configuration Elements
© 2017, Vector Informatik GmbH
139 of 250


Chapter 4.
AutomationInterface API Reference
4.10.4 Runtime System Domain
The runtime system domain API is specifically designed to support runtime system related
use cases.
It is available from the IDomainApi (see 4.10 on page 130) in the form of the
IRuntimeSystemApi interface.
getRuntimeSystem() allows accessing the IRuntimeSystemApi like a property.
scriptTask ('taskName ') {
code {
// IRuntimeSystemApi is available as " runtimeSystem " property
def r u n t i m e S y s t e m = domain . r u n t i m e S y s t e m
}
}
Listing 4.177: Accessing IRuntimeSystemApi as a property
runtimeSystem(Closure) allows accessing the IRuntimeSystemApi in a scope-like way.
scriptTask ('taskName ') {
code {
domain . runtimeSystem {
// IRuntimeSystemApi is available inside this Closure
}
}
}
Listing 4.178: Accessing IRuntimeSystemApi in a scope-like way
The following use cases are supported:
4.10.4.1 Component Port Connection
A component port (IComponentPort) represents a port prototype and its corresponding com-
ponent prototype, and in case of a delegation port the corresponding top level composition type
(Ecu Composition).
The connecting component ports use case allows connecting (a.k.a. mapping) different ports in
a similar way the component connection assistant does.
Selecting component ports to map
The entry point is to select a collection of component
ports and auto-map them to the possible target component ports by applying the matching
rules of the component connection assistant.
selectComponentPorts(Closure) allows the selection of IComponentPorts using predicates.
Predicates
To select the component ports predicates can be provided to narrow down the
component ports to be connected: this corresponds to the manual selection of certain component
ports in the component connection assistant.
Per default the predicates are combined via logical AND. To realize other combinations, use
the ’or’,’not’ and ’and’ predicates.
© 2017, Vector Informatik GmbH
140 of 250


Chapter 4.
AutomationInterface API Reference
Component Port Predicates
• unconnected() matches unconnected component ports.
• connected() matches connected component ports.
• senderReceiver() matches component ports whose port has a sender/receiver port in-
terface.
• clientServer() matches component ports whose port has a client/server port interface.
• modeSwitch() matches component ports whose port has a mode-switch port interface.
• nvData() matches component ports whose port has a NvData port interface.
• parameter() matches component ports whose port has a parameter (calibration) port
interface.
• provided() matches provided component ports (p-port).
• required() matches required component ports (r-port).
• providedRequired() matches provided-required component ports (pr-port).
• delegation() matches delegation ports (ports of the Ecu composition).
• application() matches component ports whose port interface is an application port
interface.
• service() matches component ports whose port interface is an service port interface.
• name(String) matches component ports with the given port name.
• name(Pattern) matches component ports with the given port name pattern.
• asrPath(String) matches component ports with the given port autosar path.
• asrPath(Pattern) matches component ports with the given port autosar path pattern.
• component(String) matches component ports with the given component name.
• component(Pattern) matches component ports with the given component name pattern.
• componentAsrPath(String) matches the component ports with the given component
autosar path.
• componentAsrPath(Pattern) matches component ports with the given component auto-
sar path pattern.
• portInterfaceMapping(String) matches component ports for whose port interfaces a
port interface mapping with the given port interface mapping name exists.
• portInterfaceMapping(Pattern) matches component ports for whose port interfaces a
port interface mapping with the given port interface mapping name pattern exists.
• portInterfaceMappingAsrPath(String) matches component ports for whose port in-
terfaces a port interface mapping with the given port interface mapping autosar path
exists.
• portInterfaceMappingAsrPath(Pattern) matches component ports for whose port in-
terfaces a port interface mapping with the given port interface mapping autosar path
pattern exists.
© 2017, Vector Informatik GmbH
141 of 250


Chapter 4.
AutomationInterface API Reference
• filterAdvanced(Closure) matches component ports for whose the given closure results
to true.
• and(Closure) combines the predicates inside the closure with a logical AND.
• or(Closure) combines the predicates inside the closure with a logical OR.
• not(Closure) negates the combination of predicates inside the closure.
Examples
scriptTask (" selectAllPorts ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s e l e c t e d P o r t s =
selectComponentPorts {
// no predicates : select ALL component ports
} getComponentPorts ()
scriptLogger . infoFormat (" Selected {0} component ports .", selectedPorts .
size ())
}
}
}
}
Listing 4.179: Selects all component ports
scriptTask (" selectAllUnconnectedPorts ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s e l e c t e d P o r t s =
selectComponentPorts {
unconnected () // select all unconnected component ports
} getComponentPorts ()
scriptLogger . infoFormat (" Selected {0} component ports .", selectedPorts .
size ())
}
}
}
}
Listing 4.180: Selects all unconnected component ports
© 2017, Vector Informatik GmbH
142 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" selectAllUnconnectedSRAndConnectedModePorts ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s e l e c t e d P o r t s =
selectComponentPorts {
// start with logical OR
or {
and { // unconnected sender / receiver ports
unconnected ()
senderReceiver ()
}
and { // connected modeSwitch ports
connected ()
modeSwitch ()
}
}
} getComponentPorts ()
scriptLogger . infoFormat (" Selected {0} component ports .", selectedPorts .
size ())
}
}
}
}
Listing 4.181: Select all unconnected sender/receiver or connected mode-switch component
ports
Auto-Mapping
The use case of auto-mapping component ports is based on the selection of
component ports: it offers the methods to auto-map.
autoMap() tries to auto-map the selection of component ports according the component con-
nection assistant default rules.
Examples for autoMap()
scriptTask (" automapAll ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
// no predicates : select ALL component ports
} autoMap ()
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size
())
}
}
}
}
Listing 4.182: Tries to auto-map all ports
© 2017, Vector Informatik GmbH
143 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" automapAllUnconnected ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
unconnected () // select all unconnected component ports
} autoMap ()
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size
())
}
}
}
}
Listing 4.183: Tries to auto-map all unconnected component ports
scriptTask (" autoMapUnconnectedSRCS ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
// select all unconnected client / server and unconnected
sender / receiver ports
unconnected ()
or {
clientServer ()
senderReceiver ()
}
} autoMap ()
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.184: Tries to auto-map all unconnected sender/receiver and client/server ports
i m p o r t com . vector . cfg . model . sysdesc . api . port . I C o m p o n e n t P o r t
scriptTask (" autoMapAdvancedfilter ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
// select component port by own custom filter predicate
filterAdvanced { IComponentPort port ->
" MyUUID ". equals ( port . getMdfPort (). getUuid2 ())
}
} autoMap ()
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.185: Tries to auto-map port determined by advanced filter
© 2017, Vector Informatik GmbH
144 of 250


Chapter 4.
AutomationInterface API Reference
autoMapTo(Closure) tries to auto-map the selection of component ports according the compo-
nent connection assistant rules but offers more control for the auto-mapping: Inside the closure
additional predicates for narrowing down the target component ports can be defined and code
to evaluate and change the auto-mapper results can be provided.
Narrowing down the target component ports may be useful to gain better matches for the auto-
mapper: In case several target component ports match equally, no auto-mapping is performed.
So reducing the target component ports my improve the results of the auto-mapping.
The component port selection will produce trace, info and warning logs. To see them, activate
the ’com.vector.cfg.dom.runtimesys.groovy.api.IComponentPortSelection’ logger with
the appropriate log level.
Control the auto-mapping in autoMapTo(Closure)
selectTargetPorts(Closure) allows to define predicates to narrow down the target ports for
the auto-mapping. The predicates are used to filter the possible target component ports which
were computed from the source component port selection.
scriptTask (" autoMapUnconnectedToComponentPrototype ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
unconnected () // select all unconnected ports
} autoMapTo {
selectTargetPorts {
component " App1 " // and auto - map them to all ports of
component " App1 "
}
}
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.186: Tries to auto map all unconnected ports to the ports of one component prototype
evaluateMatches(Closure) allows to evaluate and change the results of the auto-mapping. It
corresponds to the confirm page of the component connection assistant.
For each source component port the provided closure is called: Parameters are the source
component port, the optional matched target component port (or null), and a list of all potential
target component ports (respecting the selectTargetPorts(Closure) predicates). The return
value must be a list of target component ports.
© 2017, Vector Informatik GmbH
145 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . dom . r u n t i m e s y s . api . as si st an t . co nn ec ti on .
ISourceComponentPort
i m p o r t com . vector . cfg . dom . r u n t i m e s y s . api . as si st an t . co nn ec ti on .
ITargetComponentPort
scriptTask (" automapAllUnconnectedAndEvaluateMatches ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
unconnected ()
} autoMapTo {
evaluateMatches {
ISourceComponentPort sourcePort ,
ITargetComponentPort optionalMatchedTargetPort ,
List < ITargetComponentPort > potentialTargetPorts ->
if ( s o u r c e P o r t . g e t P o r t N a m e () . equals ( " M y E x c e p t i o n a l P o r t "
)) {
// example for excluding a port from auto - mapping
by having a close look
// sourcePort . getMdfPort () ....
r e t u r n n u l l
}
// default : do not change the auto - matched port
[ optionalMatchedTargetPort ]
}
}
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.187: Tries to auto-map all unconnected ports and evaluate matches
© 2017, Vector Informatik GmbH
146 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . dom . r u n t i m e s y s . api . as si st an t . co nn ec ti on .
ISourceComponentPort
i m p o r t com . vector . cfg . dom . r u n t i m e s y s . api . as si st an t . co nn ec ti on .
ITargetComponentPort
scriptTask (" automap1ToN ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
// select single delegation port
delegation ()
name " rDelegationSRPort1 "
} autoMapTo {
selectTargetPorts {
// select a collection of target ports ( names start with
" rSRPort ")
name ~" rSRPort .*"
}evaluateMatches {
ISourceComponentPort sourcePort ,
ITargetComponentPort optionalMatchedTargetPort ,
List < ITargetComponentPort > potentialTargetPorts ->
// return all potentialTargetPorts for 1:n
connections , not only the one matched best
potentialTargetPorts
}
}
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.188: Auto-map a component port and realize 1:n connection by using evaluate matches
forceConnectionWhen1To1() allows to force a mapping even the usual auto-mapping rules will
not match. Precondition is that the collections of source component ports and target component
ports only contain one component port each. Otherwise no mapping is done.
© 2017, Vector Informatik GmbH
147 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" autoMapTwoNonMatchingPorts ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def m a p p e d C o n n e c t o r s =
selectComponentPorts {
// select a single source component port
name " prNVPort1 "
component " NvApp1 "
} autoMapTo {
selectTargetPorts {
// select a single target component port
name " rSRPort2 "
component " App2 "
}
// force the connection even names do not match at all
forceConnectionWhen1To1 ()
}
scriptLogger . infoFormat (" Created {0} mappings .", mappedConnectors . size ()
)
}
}
}
}
Listing 4.189: Create mapping between two ports which names do not match.
4.10.4.2 Data Mapping
The data mapping use case allows to connect signal instances and data elements/operations in
a similar way the data mapping assistant does.
Communication Element
A data element or an operations to be data-mapped is represented
by an ICommunicationElement. A data element is represented by the subtype IDataCommuni-
cationElement, an operation is represented by the subtype IOperationCommunicationEle-
ment. A communication element contains the full context information (component prototype,
port prototype, data type hierarchy) necessary for data mapping.
Signal Instance
The system signals and system signal groups to be data-mapped are represen-
ted by a signal instance (IAbstractSignalInstance). ISignalInstance represents a system
signal, ISignalGroupInstance represents a system signal group. ’Signal instance’ means that
the system signal or system signal group is at least referenced by one ISignal or ISignalGroup.
System signals or system signal groups which are not referenced by an ISignal or ISignalGroup
are not represented as signal instance and so are not available for data mapping.
The entry point for data mapping is either to select a collection of signal instances and auto-map
them to the possible target communication elements or vice versa by applying the matching
rules of the data mapping assistant.
Mapping signal instances
selectSignalInstances(Closure) allows the selection of IAb-
stractSignalInstances using predicates.
Per default the predicates are combined via logical AND. To realize other combinations, use
the ’or’,’not’ and ’and’ predicates.
© 2017, Vector Informatik GmbH
148 of 250


Chapter 4.
AutomationInterface API Reference
Signal Instance Predicates
• unmapped() matches signal instances which are not data-mapped.
• mapped() matches signal instances which are data-mapped.
• signalGroup() matches signal instances which are a signal group instance.
• groupSignal() matches signal instances which are a group signal.
• transformed() matches signal instances which are transformation signals.
• tx() matches signal instances whose direction is compatible to EDirection.Tx.
• rx() matches signal instances whose direction is compatible to EDirection.Rx.
• name(String) matches signal instances with the given name.
• name(Pattern) matches signal instances with the given name pattern.
• asrPath(String) matches signal instances with the given autosar path.
• asrPath(Pattern) matches signal instances with the given autosar path pattern.
• iSignal(String) matches signal instances which are referenced at least by one ISignal/I-
SignalGroup with the given name.
• iSignal(Pattern) matches signal instances which are referenced at least by one ISig-
nal/ISignalGroup with the given name pattern.
• iSignalAsrPath(String) matches signal instances which are referenced at least by one
ISignal/ISignalGroup with the given autosar path.
• iSignalAsrPath(Pattern) matches signal instances which are referenced at least by one
ISignal/ISignalGroup with the given autosar path pattern.
• physicalChannel(String) matches signal instances which are referenced by at least an
ISignal/ISignalGroup for which an ISignalTriggering exists for a PhysicalChannel with
the given name.
• physicalChannel(Pattern) matches signal instances which are referenced by at least an
ISignal/ISignalGroup for which an ISignalTriggering exists for a PhysicalChannel with
the given name pattern.
• physicalChannelAsrPath(String) matches signal instances which are referenced by at
least an ISignal/ISignalGroup for which an ISignalTriggering exists for a PhysicalChannel
with the given autosar path.
• physicalChannelAsrPath(Pattern) matches signal instances which are referenced by at
least an ISignal/ISignalGroup for which an ISignalTriggering exists for a PhysicalChannel
with the given autosar path pattern.
• communicationCluster(String) matches signal instances which are referenced by at
least an ISignal/ISignalGroup which is sent via a PhysicalChannel of a Communication-
Cluster with the given name.
• communicationCluster(Pattern) matches signal instances which are referenced by at
least an ISignal/ISignalGroup which is sent via a PhysicalChannel of a Communication-
Cluster with the given name pattern.
© 2017, Vector Informatik GmbH
149 of 250


Chapter 4.
AutomationInterface API Reference
• communicationClusterAsrPath(String) matches signal instances which are referenced
by at least an ISignal/ISignalGroup which is sent via a PhysicalChannel of a Communi-
cationCluster with the given autosar path.
• communicationClusterAsrPath(Pattern) matches signal instances which are referenced
by at least an ISignal/ISignalGroup which is sent via a PhysicalChannel of a Communi-
cationCluster with the given autosar path pattern.
• pdu(String) matches signal instances which are referenced by at least an ISignal/ISig-
nalGroup for which an ISignalToIPduMapping exists for a Pdu with the given name.
• pdu(Pattern) matches signal instances which are referenced by at least an ISignal/I-
SignalGroup for which an ISignalToIPduMapping exists for a Pdu with the given name
pattern.
• pduAsrPath(String) matches signal instances which are referenced by at least an ISig-
nal/ISignalGroup for which an ISignalToIPduMapping exists for a Pdu with the given
autosar path.
• pduAsrPath(Pattern) matches signal instances which are referenced by at least an ISig-
nal/ISignalGroup for which an ISignalToIPduMapping exists for a Pdu with the given
autosar path pattern.
• frame(String) matches signal instances which are referenced by at least an ISignal/I-
SignalGroup which is sent via a Pdu for that a PduToFrameMapping exists for a Frame
with the given name.
• frame(Pattern) matches signal instances which are referenced by at least an ISignal/I-
SignalGroup which is sent via a Pdu for that a PduToFrameMapping exists for a Frame
with the given name pattern.
• frameAsrPath(String) matches signal instances which are referenced by at least an ISig-
nal/ISignalGroup which is sent via a Pdu for that a PduToFrameMapping exists for a
Frame with the given autosar path.
• frameAsrPath(Pattern) matches signal instances which are referenced by at least an
ISignal/ISignalGroup which is sent via a Pdu for that a PduToFrameMapping exists for
a Frame with the given autosar path pattern.
• filterAdvanced(Closure) matches signal instances for which the given closure results
to true.
• and(Closure) combines the predicates inside the closure with a logical AND.
• or(Closure) combines the predicates inside the closure with a logical OR.
• not(Closure) negates the combination of predicates inside the closure.
Examples
© 2017, Vector Informatik GmbH
150 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" SelectAllUnmappedSignalInstances ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s i g n a l I n s t a n c e s =
selectSignalInstances {
unmapped () // select all signal instances which are not yet
data mapped
} getSignalInstances ()
scriptLogger . infoFormat (" Selected {0} signal instances .",
signalInstances . size ())
}
}
}
}
Listing 4.190: Select all unmapped signal instances
scriptTask (" SelectAllUnmappedRxOrTransformedSignalInstances ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s i g n a l I n s t a n c e s =
selectSignalInstances {
// the signal instances should not be data - mapped yet
unmapped ()
or { // and should either be a rx signal or a transformation
signal
rx ()
transformed ()
}
} getSignalInstances ()
scriptLogger . infoFormat (" Selected {0} signal instances .",
signalInstances . size ())
}
}
}
}
Listing 4.191: Select all unmapped rx or transformed signal instances
© 2017, Vector Informatik GmbH
151 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
scriptTask (" SelectSignalInstancesUsingAdvancedFilter ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def s i g n a l I n s t a n c e s =
selectSignalInstances {
filterAdvanced { IAbstractSignalInstance signalInstance ->
// implement own custom filter
def m df Ob je ct = s i g n a l I n s t a n c e . g e t M d f O b j e c t ()
// work on directly on autosar model level ...
// select signal instance only which has admin data
def select = false
mdfObject . adminData {
select = true
}select
}
} getSignalInstances ()
scriptLogger . infoFormat (" Selected {0} signal instances .",
signalInstances . size ())
}
}
}
}
Listing 4.192: Select signal instances using an advanced filter
Auto-Mapping
The use case of auto-mapping signal instances is based on the selection of
signal instances: it offers the methods to auto-map.
autoMap() tries to auto-map the selection of IAbstractSignalInstances (ISignalInstance
or ISignalGroupInstance) according the data mapping assistant default rules. Therefore the
selection of possible target communication elements is computed and tried to match to the
selected signal instances.
Examples for autoMap()
scriptTask (" autoDatamapAllUnmappedSignalInstances ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectSignalInstances {
unmapped ()
} autoMap ()
scriptLogger . infoFormat (" Created {0} data mappings .",
dataMappings . size ())
}
}
}
}
Listing 4.193: Auto data map all unmapped signal instances
autoMapTo(Closure) tries to auto-map the selection of signal instances according the data
mapping assistant rules but offers more control for the auto-mapping: Inside the closure ad-
ditional predicates for narrowing down the target communication elements can be defined and
code to evaluate and change the auto-mapper results can be provided.
© 2017, Vector Informatik GmbH
152 of 250


Chapter 4.
AutomationInterface API Reference
autoMapTo(Closure) will produce trace, info and warning logs.
To see them, activate the
’com.vector.cfg.dom.runtimesys.groovy.api.ISignalInstanceSelection’ logger with the
appropriate log level.
Control the auto-mapping in autoMapTo(Closure)
selectTargetCommunicationElements(Closure) allows to define predicates to narrow down
the target communciation elements for the auto-mapping. The predicates are used to filter
the possible target communication elements which were computed from the signal instance
selection.
evaluateMatches(Closure) allows to evaluate and change the results of the auto-mapping. It
corresponds to the confirm page of the data mapping assistant.
For each signal instance the provided closure is called: Parameters are the signal instance,
the optional matched target communication element (or null), and a list of all potential tar-
get communication elements (respecting the selectTargetCommunicationElements(Closure)
predicates). The return value must be a communication element or null.
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapAllUnmappedSignalInstancesAndEvaluate ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectSignalInstances {
unmapped ()
} autoMapTo {
selectTargetCommunicationElements {
unmapped ()
}evaluateMatches {
IAbstractSignalInstance signal ,
ICommunicationElement optionalMatchedComElement ,
List < ICommunicationElement >
potentialComElements
->// evaluate
optionalMatchedComElement
}
}
scriptLogger . infoFormat (" Created {0} data mappings .",
dataMappings . size ())
}
}
}
}
Listing 4.194: Auto data map all unmapped signal instances to unmapped communication
elements and evaluate
Nested Array of Primitives
expandNestedArraysOfPrimitive(boolean) allows to control
the expansion of nested arrays of primitive globally. Per default, arrays are fully expanded
(allowing to data map each array element). By setting the value to ’false’, all nested arrays of
primitive are not expanded and can be directly data-mapped to a signal.
© 2017, Vector Informatik GmbH
153 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapAllSignalInstancesAndDoNotExpandNestedArrayElements ",
DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectSignalInstances {
} autoMapTo {
// do not expand nested array elements
expandNestedArraysOfPrimitive false
evaluateMatches {
IAbstractSignalInstance signal ,
ICommunicationElement optionalMatchedComElement ,
List < ICommunicationElement >
potentialComElements ->
// perform manual mapping to a signal group
if ( signal . getName () . equals ( " e l e m B _ c 2 5 5 f 5 e 3 8 f d 8 b 2 1 d " ) ) {
for final I C o m m u n i c a t i o n E l e m e n t c o m El eme nt :
potentialComElements ) {
if ( c o m E l e m e n t . g e t F u l l y Q u a l i f i e d N a m e () . equals ( " App2 .
rSRPort1 . Element_2 ")) {
r e t u r n c o m E l e m e n t
}
}
}
// now check : for the group signal the the record element
representing an array is not expanded
if ( signal . getName () . equals ( " f i e l d A _ f 1 d 3 7 8 3 e 2 3 5 e 8 8 d 3 " ) ) {
// group signal
for final I C o m m u n i c a t i o n E l e m e n t c o m El eme nt :
potentialComElements ) {
if ( c o m E l e m e n t . g e t F u l l y Q u a l i f i e d N a m e () . equals ( " App2 .
rSRPort1 . Element_2 . RecordElement ")) {
// do some direct mapping here
}
}
}optionalMatchedComElement
}
}
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.195: Auto data map all signal instances and do not expand nested array elements
expandNestedArraysOfPrimitive(String,boolean) allows to control the expansion of nested
arrays of primitive for single nested arrays. Per default, the expandNestedArraysOfPrimi-
tive(boolean) applies. For the given fully qualified communication element name, the global
setting can be overridden.
© 2017, Vector Informatik GmbH
154 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapAllSignalInstancesAndDoExpandSpecificNestedArrayElement "
, DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectSignalInstances {
} autoMapTo {
// do not expand nested array elements
expandNestedArraysOfPrimitive false
expandNestedArraysOfPrimitive ( " App2 . rSRPort1 . Element_2 .
RecordElement ",true )
evaluateMatches {
IAbstractSignalInstance signal ,
ICommunicationElement optionalMatchedComElement ,
List < ICommunicationElement >
potentialComElements ->
// perform manual mapping to a signal group
if ( signal . getName () . equals ( " e l e m B _ c 2 5 5 f 5 e 3 8 f d 8 b 2 1 d " ) ) {
for final I C o m m u n i c a t i o n E l e m e n t c o m El eme nt :
potentialComElements ) {
if ( c o m E l e m e n t . g e t F u l l y Q u a l i f i e d N a m e () . equals ( " App2 .
rSRPort1 . Element_2 ")) {
r e t u r n c o m E l e m e n t
}
}
}
// now check : for the group signal the the record element
representing an array is expanded :
// the single array elements can be mapped
if ( signal . getName () . equals ( " f i e l d A _ f 1 d 3 7 8 3 e 2 3 5 e 8 8 d 3 " ) ) {
// group signal
for final I C o m m u n i c a t i o n E l e m e n t c o m El eme nt :
potentialComElements ) {
if ( c o m E l e m e n t . g e t F u l l y Q u a l i f i e d N a m e () . equals ( " App2 .
rSRPort1 . Element_2 . RecordElement [0] ")) {
// do some direct mapping to array element here
}
}
}optionalMatchedComElement
}
}
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.196: Auto data map all signal instances and expand specific nested array element
Mapping communication elements
selectCommunicationElements(Closure) allows the se-
lection of ICommunicationElements using predicates.
Per default the predicates are combined via logical AND. To realize other combinations, use
the ’or’,’not’ and ’and’ predicates.
© 2017, Vector Informatik GmbH
155 of 250


Chapter 4.
AutomationInterface API Reference
Communication Element Predicates
• unconnected() matches communication elements whose component port is unconnected.
• connected() matches communication elements whose component port is connected.
• senderReceiver() matches communication elements whose port has a sender/receiver
port interface.
• clientServer() matches communication elements whose port has a client/server port
interface.
• provided() matches communication elements whose port is a provided port (p-port).
• required() matches communication elements whose port is a required port (r-port).
• delegation() matches communication elements whose port is delegation port.
• unmapped() matches communication elements whose are not data-mapped.
• mapped() matches communication elements whose are data-mapped.
• name(String) matches communication elements with the given data element or operation
name.
• name(Pattern) matches communication elements with the given data element or opera-
tion name pattern.
• asrPath(String) matches communication elements with the given data element or ope-
ration autosar path.
• asrPath(Pattern) matches communication elements with the given data element or ope-
ration autosar path pattern.
• component(String) matches communication elements with the given component name.
• component(Pattern) matches communication elements with the given component name
pattern.
• componentAsrPath(String) matches communication elements with the given component
name autosar path.
• componentAsrPath(Pattern) matches communication elements with the given compo-
nent name autosar path pattern.
• port(String) matches communication elements with the given component port name.
• port(Pattern) matches communication elements with the given component port name
pattern.
• portAsrPath(String) matches communication elements with the given component port
autosar path.
• portAsrPath(Pattern) matches communication elements with the given component port
autosar path pattern.
• filterAdvanced(Closure) Add a custom predicated which matches communication ele-
ments for which the given closure results to true.
• and(Closure) combines the predicates inside the closure with a logical AND.
• or(Closure) combines the predicates inside the closure with a logical OR.
• not(Closure) negates the combination of predicates inside the closure.
© 2017, Vector Informatik GmbH
156 of 250


Chapter 4.
AutomationInterface API Reference
Examples
scriptTask (" SelectAllUnmappedDelPortComElements ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def c o m E l e m e n t s =
selectCommunicationElements {
// select all unmapped delegation communication elements
delegation ()
unmapped ()
} getCommunicationElements ()
scriptLogger . infoFormat (" Selected {0} communication elements .",
comElements . size ())
}
}
}
}
Listing 4.197: Select all unmapped delegation port communication elements
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
i m p o r t com . vector . cfg . model . sysdesc . api . com . I D a t a C o m m u n i c a t i o n E l e m e n t
scriptTask (" SelectComElementsUsingAdvancedFilter ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def c o m E l e m e n t s =
selectCommunicationElements {
// advanced filter :
// only select communication elements
// which represent data elements of a specific data type
filterAdvanced { ICommunicationElement comElement ->
if ( c o m E l e m e n t i n s t a n c e o f I D a t a C o m m u n i c a t i o n E l e m e n t ) {
def m d f D a t a E l e m e n t = c o m E l em en t .
getDataElementOrOperationMdfObject ()
// check directly on autosar model level
r e t u r n
mdfDataElement . type . refTarget . name . equals ("
myCustomDataType ")
}
f a l s e
}
} getCommunicationElements ()
scriptLogger . infoFormat (" Selected {0} communication elements .",
comElements . size ())
}
}
}
}
Listing 4.198: Select communication elements using an advanced filter
autoMap() tries to auto-map the selection of ICommunicationElements (IDataCommunicationElement
or IOperationCommunicationElement) according the data mapping assistant default rules.
Therefore the selection of possible target signal instances is computed and tried to match to
the selected communciation elements.
Examples for autoMap()
© 2017, Vector Informatik GmbH
157 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask (" autoDatamapAllUnmappedSRDelPortComElements ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectCommunicationElements {
// select all unmapped sender / receiver delegation ports
delegation ()
unmapped ()
senderReceiver ();
} autoMap ()
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.199: Auto data map all unmapped sender/receiver delegation port communication
elements
autoMapTo(Closure) tries to auto-map the selection of communciation elements according the
data mapping assistant rules but offers more control for the auto-mapping: Inside the closure
additional predicates for narrowing down the target signal instances can be defined and code
to evaluate and change the auto-mapper results can be provided.
autoMapTo(Closure) will produce trace, info and warning logs.
To see them, activate the
’com.vector.cfg.dom.runtimesys.groovy.api.ICommunicationElementSelection’ logger with
the appropriate log level.
Control the auto-mapping in autoMapTo(Closure)
selectTargetSignalInstances(Closure) allows to define predicates to narrow down the tar-
get signal instances for the auto-mapping. The predicates are used to filter the possible target
signal instances which were computed from the communication element selection.
evaluateMatches(Closure) allows to evaluate and change the results of the auto-mapping. It
corresponds to the confirm page of the data mapping assistant.
For each communication element the provided closure is called: Parameters are the communi-
cation element, the optional matched target signal instance (or null), and a list of all potential
target signal instances (respecting the selectTargetSignalInstances(Closure) predicates).
The return value must be a signal instance or null.
© 2017, Vector Informatik GmbH
158 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapAllUnmappedComElementsAndEvaluate ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectCommunicationElements {
unmapped () // only unmapped communication elements
} autoMapTo {
selectTargetSignalInstances {
// only map to unmapped rx signal instances
unmapped ()
rx ()
}evaluateMatches {
ICommunicationElement
communicationElement ,
IAbstractSignalInstance optionalMatchedSignalInstance ,
List < IAbstractSignalInstance >
potentialSignalinstances ->
// evaluate the match here
if ( o p t i o n a l M a t c h e d S i g n a l I n s t a n c e != null ) {
def m d f S y s t e m S i g n a l =
optionalMatchedSignalInstance . getMdfObject ()
;
// check more specific ...
}optionalMatchedSignalInstance
}
}
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.200: Auto data map all unmapped communication elements to unmapped rx signal
instances and evaluate
Nested Array of Primitives
expandNestedArraysOfPrimitive(boolean) allows to control
the expansion of nested arrays of primitive globally. Per default, arrays are fully expanded
(allowing to data map each array element). By setting the value to ’false’, all nested arrays of
primitive are not expanded and can be directly data-mapped to a signal.
© 2017, Vector Informatik GmbH
159 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I S i g n a l G r o u p I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapDoNotExpandNestedArrayElements ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectCommunicationElements {
} autoMapTo {
expandNestedArraysOfPrimitive false // do not expand nested arrays
of primitive
evaluateMatches {
ICommunicationElement
communicationElement ,
IAbstractSignalInstance optionalMatchedSignalInstance ,
List < IAbstractSignalInstance >
potentialSignalInstances ->
if ( " App2 . rSRPort1 . E le me nt _2 " . equals ( c o m m u n i c a t i o n E l e m e n t .
getFullyQualifiedName ())) {
// manual matching : map to first signal group
for ( I A b s t r a c t S i g n a l I n s t a n c e p o t e n t i a l S i g n a l :
potentialSignalInstances ) {
if ( p o t e n t i a l S i g n a l in st an ce o f I S i g n a l G r o u p I n s t a n c e
) {
r e t u r n
potentialSignal
}
}
}
if ( " App2 . rSRPort1 . E le me nt _2 . R e c o r d E l e m e n t " . equals (
communicationElement . getFullyQualifiedName ())) {
// now the RecordElement which represents an array is
directly offered to map
// ....
}optionalMatchedSignalInstance
}
}
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.201: Autodatamap and do not expand nested array elements
expandNestedArraysOfPrimitive(String,boolean) allows to control the expansion of nested
arrays of primitive for single nested arrays. Per default, the expandNestedArraysOfPrimi-
tive(boolean) applies. For the given fully qualified communication element name, the global
setting can be overridden.
The fully qualified communication element name is e.g. determinable when using the data
mapping assistant, performing an arbitrary signal group mapping of the root data element,
and using the right-mouse menu its ’Copy fully qualified name’ action on the nested array
element.
© 2017, Vector Informatik GmbH
160 of 250


Chapter 4.
AutomationInterface API Reference
i m p o r t com . vector . cfg . model . sysdesc . api . com . I A b s t r a c t S i g n a l I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I S i g n a l G r o u p I n s t a n c e
i m p o r t com . vector . cfg . model . sysdesc . api . com . I C o m m u n i c a t i o n E l e m e n t
scriptTask (" autoDatamapDoExpandSpecificNestedArrayElement ", DV_PROJECT ){
code {
transaction {
domain . runtimeSystem {
def d a t a M a p p i n g s =
selectCommunicationElements {
} autoMapTo {
// do not generally expand nested arrays of primitive
expandNestedArraysOfPrimitive false
// but expand the following specific record element
expandNestedArraysOfPrimitive (" App2 . rSRPort1 . Element_2 .
RecordElement ",true )
evaluateMatches {
ICommunicationElement
communicationElement ,
IAbstractSignalInstance optionalMatchedSignalInstance ,
List < IAbstractSignalInstance >
potentialSignalInstances ->
if ( " App2 . rSRPort1 . E le me nt _2 " . equals (
communicationElement . getFullyQualifiedName ())) {
// manual matching : map to first signal group
for ( I A b s t r a c t S i g n a l I n s t a n c e p o t e n t i a l S i g n a l :
potentialSignalInstances ) {
if ( p o t e n t i a l S i g n a l in st an ce of
ISignalGroupInstance ) {
r e t u r n
potentialSignal
}
}
}
if ( " App2 . rSRPort1 . E le me nt _2 . R e c o r d E l e m e n t [0] " . equals (
communicationElement . getFullyQualifiedName ())) {
// the RecordElement ( representing an array of
primitive )
is expanded to map the single array
elements
// ....
}optionalMatchedSignalInstance
}
}
scriptLogger . infoFormat (" Created {0} data mappings .", dataMappings . size
())
}
}
}
}
Listing 4.202: Autodatamap and do expand a specific nested array element
© 2017, Vector Informatik GmbH
161 of 250


Chapter 4.
AutomationInterface API Reference
4.11 Persistency
The persistency API provides methods which allow to import and export model data from
and to files. The files are normally in the AUTOSAR .arxml format.
4.11.1 Model Export
The modelExporty allows to export MDF model data into .arxml files.
To access the export functionality use one of the getModelExport() or modelExport(Closure)
methods.
// You can access the API in every active project
def ex po rt Ap i = p e r s i s t e n c y . m o d e l E x p o r t
// Or you use a closure
persistency . modelExport {
}
Listing 4.203: Accessing the model export persistency API
4.11.1.1 Export ActiveEcuc
The method exportActiveEcuc(Object) exports the whole ActiveEcuC configuration into a
single file of type Path.
scriptTask ('taskName ') {
code {
def t e m p E x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
def r e s u l t F i l e = p e r s i s t e n c y . m o d e l E x p o r t . e x p o r t A c t i v e E c u c (
tempExportFolder )
}
}
Listing 4.204: Export the ActiveEcuc to a file
4.11.1.2 Export Post-build selectable Variants
The method exportPostbuildVariants(Object) exports the Post-build variants info. This
will export the ActiveEcuc and miscellaneous data. The ActiveEcuC is exported into one file
(even for split DPA-projects) per variant into <project-name>.<variant-name>.ecuc.arxml.
Miscellaneous data is exported into one file per variant. The files contain all data of the project
except:
• ModuleConfigurations, ModuleDefinitions
• BswImplementations, EcuConfigurations
• Variant information like EvaluatedVariantSet
The created files are <project-name>.<variant-name>.misc.arxml.
The method returns a List<Path> of exported files.
© 2017, Vector Informatik GmbH
162 of 250


Chapter 4.
AutomationInterface API Reference
scriptTask ('taskName ') {
code {
persistency . modelExport {
def t e m p E x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
def fileList = e x p o r t P o s t b u i l d V a r i a n t s ( t e m p E x p o r t F o l d e r )
}
}
}
Listing 4.205: Export a Post-build selectable project as variant files
4.11.1.3 Advanced Export
The advanced export use case provides access to multiple IModelExporter for special export
use cases like export the system description for the RTE.
Normally you would retrieve an IModelExporter by its ID via getExporter(String). On
this exporter you can call IModelExporter.export(Object) to export the model, or IMo-
delExporter.exportAsPostbuildVariants(Object) to export the model as variant divided
data.
You can retrieve a list of supported exporters from getAvailableExporter(). The list can
differ from data loaded in your project.
scriptTask ('taskName ') {
code {
def t e m p E x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
// Export with an exporter in one line
persistency . modelExport [" activeEcuc "]. export ( tempExportFolder )
}
}
Listing 4.206: Export the project with an exporter
scriptTask ('taskName ') {
code {
def t e m p E x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
def fileList
// Switch to the persistency export API
persistency . modelExport {
// The getAvailableExporter () returns all exporters in the system
def e x p o r t e r L i s t = g e t A v a i l a b l e E x p o r t e r ()
// Select an exporter by its ID
def e x p o r t e r O p t = g e t E x p o r t e r ( " a c t i v eEc uc " )
exporterOpt . ifPresent { exporter ->
// Export into folder , when exporter exists
fileList = exporter . export ( tempExportFolder )
}
}
}
}
Listing 4.207: Export the project with an exporter and checks
© 2017, Vector Informatik GmbH
163 of 250


Chapter 4.
AutomationInterface API Reference
Export an Model Tree
The method exportModelTree(Object, MIObject) exports the spe-
cified model object and the subtree into a single file of type Path.
scriptTask ('taskName ') {
code {
def e x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
MIARPackage autosarPkg = mdfModel ( AsrPath . create ("/ MICROSAR "))
def r e s u l t F i l e = p e r s i s t e n c y . m o d e l E x p o r t . e x p o r t M o d e l T r e e ( exportFolder ,
autosarPkg )
}
}
Listing 4.208: Export an AUTOSAR package to a file
Export an Model Tree including all referenced Elements
You could also export model trees
including all referenced elements with the exporter modelTreeClosure:
scriptTask ('taskName ') {
code {
def e x p o r t F o l d e r = paths . r e s o l v e T e m p P a t h ( " . " )
MIARPackage microsarPkg = mdfModel ( AsrPath . create ("/ MICROSAR "))
MIARPackage autosarPkg = mdfModel ( AsrPath . create ("/ AUTOSAR "))
persistency . modelExport [" modelTreeClosure "]. export ( exportFolder ,
autosarPkg , microsarPkg )
}
}
Listing 4.209: Exports two elements and all references elements
4.11.2 Model Import
The modelImport allows to import MDF model data from .arxml files.
To access the import functionality use one of the getModelImport() or modelImport(Closure)
methods.
Currently no import API is provided. Please inform Vector, if you need an import
API.

// You can access the API in every active project
def im po rt Ap i = p e r s i s t e n c y . m o d e l I m p o r t
// Or you use a closure
persistency . modelImport {
}
Listing 4.210: Accessing the model import persistency API
© 2017, Vector Informatik GmbH
164 of 250


Chapter 4.
AutomationInterface API Reference
4.12 Utilities
4.12.1 Constraints
Constraints provides general purpose constraints for checking given parameter values throug-
hout the automation interface. These constraints are referenced from the AutomationInterface
documentation wherever they apply. The AutomationInterface takes a fail fast approach ve-
rifying provided parameter values as early as possible and throwing appropriate exceptions if
values violate the corresponding constraints.
The following constraints are provided:
IS_NOT_NULL
Ensures that the given Object is not null.
IS_NON_EMPTY_STRING
Ensures that the given String is not empty.
IS_VALID_FILE_NAME
Ensures that the given String can be used as a file name.
IS_VALID_PROJECT_NAME
Ensures that the given String can be used as a name for a
project. A valid project name starts with a letter [a-zA-Z] contains otherwise only characters
matching [a-zA-Z0-9_] and is at most 128 characters long.
IS_NON_EMPTY_ITERABLE
Ensures that the given Iterable is not empty.
IS_VALID_AUTOSAR_SHORT_NAME
Ensures that the given String conforms to the
syntactical requirements for AUTOSAR short names.
IS_VALID_AUTOSAR_SHORT_NAME_PATH
Ensures that the given String conforms
to the syntactical requirements for AUTOSAR short name paths.
IS_WRITABLE
Ensures that the file or folder represented by the given Path exists and can
be written to.
IS_READABLE
Ensures that the file or folder represented by the given Path exists and can
be read.
IS_EXISTING_FOLDER
Ensures that the given Path points to an existing folder.
IS_EXISTING_FILE
Ensures that the given Path points to an existing file.
IS_CREATABLE_FOLDER
Ensures that the given Path either points to an existing folder
which can be written to or points to a location at which a corresponding folder could be
created.
© 2017, Vector Informatik GmbH
165 of 250


Chapter 4.
AutomationInterface API Reference
IS_DCF_FILE
Ensures that the given Path points to a DaVinci Developer workspace file
(.dcf file).
IS_DPA_FILE
Ensures that the given Path points to a DaVinci project file (.dpa file).
IS_ARXML_FILE
Ensures that the given Path points to an .arxml file.
IS_SYSTEM_DESCRIPTION_FILE
Ensures that the given Path points to a system des-
cription input file (.arxml, .dbc, .ldf, .xml or .vsde file).
IS_COMPATIBLE_DA_VINCI_DEV_EXECUTABLE
Ensures that the given Path points
to a compatible DaVinci Developer executable (DaVinciDEV.exe).
4.12.2 Converters
General purpose converters (java.util.Functions) for performing value conversions throug-
hout the automation interface are provided. These converters are referenced from the Automa-
tionInterface documentation wherever they apply. The AutomationInterface is typed strongly.
In some cases, however, e.g. when specifying file locations, it is desirable to allow for a range
of possibly parameter types. This is achieved by accepting parameters of type Object and
converting the given parameters to the desired type.
The following converters are provided:
ScriptConverters.TO_PATH
Attempts to convert arbitrary Objects to Paths using
IAutomationPathsApi.resolvePath(Object) 4.4.3.2 on page 36.
ScriptConverters.TO_SCRIPT_PATH
Attempts to convert arbitrary Objects to Paths using
IAutomationPathsApi.resolveScriptPath(Object) 4.4.3.3 on page 37.
ScriptConverters.TO_VERSION
Attempts to convert arbitrary Objects to IVersions. The
following conversions are implemented:
• For null or IVersion arguments the given argument is returned. No conversion is applied.
• Strings are converted using Version.valueOf(String).
• Numbers are converted by converting the int obtained from Number.intValue() using
Version.valueOf(int).
• All other Objects are converted by converting the String obtained from Object.toString().
ScriptConverters.TO_BIG_INTEGER
Attempts to convert arbitrary Objects to BigInte-
gers. The following conversions are implemented:
• For null or BigInteger arguments the given argument is returned. No conversion is
applied.
• Integers, Longs, Shorts and Bytes are converted using BigInteger.valueOf(long).
© 2017, Vector Informatik GmbH
166 of 250


Chapter 4.
AutomationInterface API Reference
• All other types of objects are interpreted as Strings (Object.toString()) and passed
to BigInteger.BigInteger(String).
ScriptConverters.TO_BIG_DECIMAL
Attempts to convert arbitrary Objects to BigDeci-
mals. The following conversions are implemented:
• For null or BigDecimal arguments the given argument is returned. No conversion is
applied.
• Floats and Doubles, are converted using BigDecimal.valueOf(double).
• Integers, Longs, Shorts and Bytes are converted using BigDecimal.valueOf(long).
• All other types of objects are interpreted as Strings (Object.toString()) and passed
to BigDecimal.BigDecimal(String).
ModelConverters.TO_MDF
Attempts to convert arbitrary Objects to MDFObjects.
The
following conversions are implemented:
• For null or MDFObject arguments the given argument is returned. No conversion is
applied.
• IHasModelObjects are converted using their getMdfModelElement() method.
• IViewedModelObjects are converted using their getMdfObject() method.
• For all other Objects ClassCastExceptions are thrown.
For thrown Exceptions see the used functions described above.
© 2017, Vector Informatik GmbH
167 of 250


Chapter 4.
AutomationInterface API Reference
4.13 Advanced Topics
This chapter contains advanced use cases and classes for special tasks. For a normal script these
items are not relevant.
4.13.1 Java Development
It is also possible to write automation scripts in plain Java code, but this is not recommended.
There are some items in the API, which need a different usage in Java code.
This chapter describes the differences in the Automation API when used from Java code.
4.13.1.1 Script Task Creation in Java Code
Java code could not use the Groovy syntax to provide script tasks. So another way is needed
for this. The IScriptFactory interface provides the entry point that Java code could provide
script tasks. The createScript(IScriptCreationApi) method is called when the script is
loaded.
This interface is not necessary for Groovy clients.
p u b l i c c l a s s
MyScriptFactoryAsJavaCode implements IScriptFactory {
@Override
p u b l i c v o i d c r e a t e S c r i p t ( I S c r i p t C r e a t i o n A p i creation ) {
creation . scriptTask (" TaskFromFactory ", IScriptTaskTypeApi .
DV_APPLICATION ,
( taskBuilder ) -> {
taskBuilder . code (
( scriptExecutionContext , taskArgs ) -> {
// Your script task code here
r e t u r n n u l l ;
});
});
creation . scriptTask (" Task2 ", IScriptTaskTypeApi . DV_PROJECT ,
( taskBuilder ) -> {
taskBuilder . code (
( scriptExecutionContext , taskArgs ) -> {
// Your script task code for Task2
here
r e t u r n n u l l ;
});
});
}
}
Listing 4.211: Java code usage of the IScriptFactory to contribute script tasks
You should try to use Groovy when possible, because it is more concise than the Java code,
without any difference at script task creation and execution.
4.13.1.2 Java Code accessing Groovy API
Most of the Automation API is usable from both languages Java and Groovy, but some methods
are written for Groovy clients. To use it from Java you have to write some glue code.
© 2017, Vector Informatik GmbH
168 of 250


Chapter 4.
AutomationInterface API Reference
Differences are:
• Accessing Properties
• Using API entry points.
• Creating Closures
Accessing Properties
Properties are not supported by Java so you have to use the getter/setter
methods instead.
API Entry Points
Most of the Automation API is added to the object by so called Dy-
namicObjects.
This is not available in Java, so you have to call IScriptExecutionCon-
text.getInstance(Class) instead.
So if you want to access The IWorkflowApi you have
to write:
// Java code :
IScriptExecutionContext scriptCtx = ...;
IWorkflowApi workflow = scriptCtx . getInstance ( IWorkflowApiEntryPoint . class ).
getWorkflow ()
// Instead of Groovy code :
workflow {
}
Listing 4.212: Accessing WorkflowAPI in Java code
Creating Closure instances from Java lambdas
The class Closures provides API to create
Closure instances from Java FunctionalInterfaces.
The from() methods could be used to call Groovy API from Java classes, which only accepts
Closure instances.
Sample:
Closure <?> c = Closures . from (( param ) -> {
// Java lambda
});
Listing 4.213: Java Closure creation sample
Creating Closure Instances from Java Methods
You could also create arbitrary Closures
from any Java method with the class MethodClosure. This is describe in:
http://melix.github.io/blog/2010/04/19/coding_a_groovy_closure_in.html1
4.13.1.3 Java Code in dvgroovy Scripts
It is not possible to write Java classes when using the .dvgroovy script file. You have to create
an automation script project, see chapter 7 on page 217.
1Last accessed 2016-05-24
© 2017, Vector Informatik GmbH
169 of 250


Chapter 4.
AutomationInterface API Reference
4.13.2 Unit testing API
The Automation Interface provides an connector to execute unit tests as script task. This is
helpful, if you want to write tests for:
• Generators
• Validations
• Workflow rules
• ...
Normally a script task executes it’s code block, but the unit test task will execute all contained
unit tests instead.
4.13.2.1 JUnit4 Integration
The AutomationInterface can execute JUnit 4 test cases and test suites.
Execution of JUnit Test Classes
A simple unit test class will look like:
i m p o r t org . junit . Test ;
p u b l i c c l a s s S c r i p t J U n i t T e s t {
@Test
p u b l i c v o i d t e s t Y o u r L o g i c () {
// Write your test code here
}
Listing 4.214: Run all JUnit tests from one class
You can access the Automation API with the ScriptApi class. See chapter 4.4.8 on page 45
for details.
Execution of multiple Tests with JUnit Suite
To execute multiple tests you have to group
the tests into a test suite.
i m p o r t org . junit . runner . RunWith ;
i m p o r t org . junit . runners . Suite ;
i m p o r t org . junit . runners . Suite . S u i t e C l a s s e s ;
@RunWith ( Suite . class )
@SuiteClasses ({
// Two test classes
ScriptJUnitTest .class ,
ScriptSpockTest .class ,
// Another JUnit suite
InnerSuiteScriptJUnitTests .class ,
})
p u b l i c c l a s s
AllMyScriptJUnitTests {
Listing 4.215: Run all JUnit tests using a Suite
You can also group test suites in test suites and so on.
© 2017, Vector Informatik GmbH
170 of 250


Chapter 4.
AutomationInterface API Reference
4.13.2.2 Execution of Spock Tests
The AutomationInterface can also execute Spock tests. See:
• Homepage: https://github.com/spockframework/spock2
• Documentation: http://spockframework.github.io/spock/docs/1.0/index.html3
It is also possible to group multiple Spock test into a JUnit Test Suite.
Usage sample:
i m p o r t spock . lang . S p e c i f i c a t i o n
c l a s s S c r i p t S p o c k T e s t extends S p e c i f i c a t i o n {
def " Simple Spock test " () {
when :
// Add your test logic here
def m y E x p e c t e d S t r i n g = " Expected "
then :
myExpectedString == " Expected "
}
}
Listing 4.216: Run unit test with the Spock framework
You can access the Automation API with the ScriptApi class. See chapter 4.4.8 on page 45
for details.
You have to add a Spock dependency in your build.gradle file:
dependencies {
compileDvCfg "org.spockframework:spock-core:1.0-groovy-2.4"
}
Note: after the change you have to call Gradle to update the IntelliJ IDEA project.
gradlew idea
4.13.2.3 Registration of Unit Tests in Scripts
A test or the root suite class has to be registered in a script to be executable. The first argument
is the taskName for the UnitTests the second is the class of the tests.
// You can add a unit test inside a script
unitTestTask (" MyUnitTest ", AllMyScriptJUnitTests . class )
Listing 4.217: Add a UnitTest task with name MyUnitTest
It is also possible to reference the test/suite class directly as a script inside of a script project.
So you don’t have to create a script as a wrapper.
2Last accessed 2016-05-24
3Last accessed 2016-05-24
© 2017, Vector Informatik GmbH
171 of 250


Chapter 4.
AutomationInterface API Reference
project . ext . automationClasses = [
" sample . MyScript ",
" sample . MyUnitTestSuite ", // This is a test suite
// Add here your test or suite class with full qualified name
]
Listing 4.218: The projectConfig.gradle file content for unit tests
© 2017, Vector Informatik GmbH
172 of 250

5 Data models in detail
This chapter describes several details and concepts of the involved data models. Be aware that
the information here is focused on the Java API. In most cases it is more convenient using the
Groovy APIs described in 4.6 on page 66. So, whenever possible use the Groovy API and read
this chapter only to get background information when required.
5.1 MDF model - the raw AUTOSAR data
The MDF model is being used to store the AUTOSAR model loaded from several ARXML
files. It consists of Java interfaces and classes which are generated from the AUTOSAR meta-
model.
5.1.1 Naming
The MDF interfaces have the prefix MI followed by the AUTOSAR meta-model name of the class
they represent. For example, the MDF interface related to the meta-model class ARPackage
(AUTOSAR package in the top-level structure of the meta-model) is MIARPackage.
5.1.2 The models inheritance hiearchy
The MDF model therefore implements (nearly) the same inheritance hierarchy and associations
as defined by the AUTOSAR model. These interfaces provide access to the data stored in the
model.
See figure 5.1 on the following page shows the (simplified) inheritance hierarchy of the ECUC
container type MIContainer. What we can see in this example:
• A container is an MIIdentifiable which again is a MIReferrable. The MIReferrable
is the type which holds the shortname (getName()). All types which inherit from the
MIReferrable have a shortname (MIARPackage, MIModuleConfiguration, ...)
• A container is also a MIHasContainer. This is an artificial base class (not part of the
AUTOSAR meta-model) which provides all features of types which have sub-containers.
The MIModuleConfiguration therefore has the same base type
• A container also inherits from MIHasDefinition. This is an artificial base class (not
part of the AUTOSAR meta-model) which provides all features of types which have an
AUTOSAR definition. The MIModuleConfiguration and MIParameterValue therefore
has the same base type
• All MIIdentifiables can hold ADMIN-DATA and ANNOTATIONs
• All MDF objects in the AUTOSAR model tree inherit from MIObject which is again an
MIObject
© 2017, Vector Informatik GmbH
173 of 250



Chapter 5.
Data models in detail
Figure 5.1: ECUC container type inheritance
5.1.2.1 MIObject and MDFObject
The MIObject is the base interface for all AUTOSAR model objects in the DaVinci Configurator
data model. It extends MDFObject which is the base interface of all model objects. Your
client code shall always use MIObject, when AUTOSAR model objects are used, instead of
MDFObject.
The figure 5.2 on the next page describes the class hierarchy of the MIObject.
5.1.3 The models containment tree
The root node of the AUTOSAR model is MIAUTOSAR. Starting at this object the complete model
tree can be traversed. MIAUTOSAR.getSubPackage() for example returns a list of MIARPackage
objects which again have child objects and so on.
Figure 5.3 on the following page shows a simple example of an MDF object containment hierar-
chy. This example contains two AUTOSAR packages with module configurations below.
© 2017, Vector Informatik GmbH
174 of 250




Chapter 5.
Data models in detail
Figure 5.2: MIObject class hierarchy and base interfaces
Figure 5.3: Autosar package containment
© 2017, Vector Informatik GmbH
175 of 250


Chapter 5.
Data models in detail
In general, objects which have child objects provide methods to retrieve them.
• MIAUTOSAR.getSubPackage() for example returns a list of child packages
• MIContainer.getSubContainer() returns the list of sub-containers and
MIContainer.getParameter() all parameter-values and reference-values of a container
5.1.4 The ECUC model
The interfaces and classes which represent the ECUC model don’t exactly follow the AUTOSAR
meta-model naming. because they are designed to store AUTOSAR 3 and AUTOSAR 4 models
as well.
Affected interfaces are:
• MIModuleConfiguration and its child objects (containers, parameters, . . . )
• MIModuleDef and its child objects (containers definitions, parameter definitions, . . . )
The ECUC model also unifies the handling of parameter- and reference-values. Both, parameter-
values and reference-values of a container, are represented as MIParameterValue in the MDF
model.
5.1.5 Order of child objects
Child object lists in the MDF model have the same order as the data specified in the ARXML
files. So, loading model objects from AXRML doesn’t change the order.
5.1.6 AUTOSAR references
All AUTOSAR reference objects in the MDF model have the base interface MIARRef.
Figure 5.4 on the next page shows this type hierarchy for the definition reference of an ECUC
container.
In ARXML, such a reference can be specified as:
<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">
/MIRCOSAR/Com/ComGeneral
</DEFINITION-REF>
• MIARRef.getValue() returns the AUTOSAR path of the object, the reference points to
(as specified in the ARXML file). In the example above "/MIRCOSAR/Com/ComGeneral"
would be this value
• MIContainerDefARRef.getRefTarget() on the other hand returns the referenced MDF
object if it exists. This method is located in a specific, typesafe (according to the type it
points to) reference interface which extends MIARRef. So, if an object with the AUTOSAR
path "/MIRCOSAR/Com/ComGeneral" exists in the model, this method will return it
© 2017, Vector Informatik GmbH
176 of 250



Chapter 5.
Data models in detail
Figure 5.4: The ECUC container definition reference
5.1.7 Model changes
5.1.7.1 Transactions
The MDF model provides model change transactions for grouping several model changes into
one atomic change.
A solving action, for example, is being executed within a transaction for being able to change
model content. Validation and generator developers don’t need to care for transactions. The
tools framework mechanisms guarantee that their code is being executed in a transaction were
required.
The tool guarantees that model changes cannot be executed outside of transactions. So, for
example, during validation of model content the model cannot be changed. A model change
here would lead to a runtime exception.
5.1.7.2 Undo/redo
On basis of model change transactions, MDF provides means to undo and redo all changes
made within one transaction. The tools GUI allows the user to execute undo/redo on this
granularity.
5.1.7.3 Event handling
MDF also supports model change events. All changes made in the model are reported by this
asynchronous event mechanism. Validations, for example, detect this way which areas of the
model need to be re-validated. The GUI listens to events to update its editors and views when
model content changes.
© 2017, Vector Informatik GmbH
177 of 250


Chapter 5.
Data models in detail
5.1.7.4 Deleting model objects
Model objects must be deleted by a special service API. In Java code that’s:
IModelOperationsPublished.deleteFromModel(MDFObject).
Deleting an object means:
• All associations of the object are deleted. The connection to its parent object, for example,
is being deleted which means that the object is not a member of the model tree anymore
• The object itself is being deleted. In fact, it is not really deleted (and garbage collected)
as a Java object but only marked as removed. Undo of the transaction, which deleted this
object, removes this marker and restores the deleted associations
5.1.7.5 Access to deleted objects
All subsequent access to content of deleted objects throws a runtime exception. Reading the
shortname of an MIContainer, for example.
5.1.7.6 Set-methods
Model interfaces provide get-methods to read model content. MDF also offers set-methods for
fields and child objects with multiplicity 0..1 or 1..1.
These set-methods can be used to change model content.
• MIARRef.getValue() for example returns a references AUTOSAR path
• MIARRef.setValue(String newValue) sets a new path
5.1.7.7 Changing child list content
MDF doesn’t offer set-methods for fields and child objects with multiplicity 0..* or 1..*.
MIContainer.getSubContainer(), for example, returns the list of sub-containers but there is
no MIContainer.setSubContainer() method to change the sub-containers.
Changing child lists means changing the list itself.
• To add a new object to a child list, client code must use the lists add() method. MIContai-
ner.getSubContainer().add(container), for example, adds a container as additional
sub-container. This added object is being appended at the end of the list
• Removing child list objects is a side-effect of deleting this object. The delete operation
removes it from the list automatically
5.1.7.8 Change restrictions
The tools transaction handling implements some model consistency checks to avoid model chan-
ges which shall be avoided. Such changes are, for example:
• Creating duplicate shortnames below one parent object (e.g. two sub-containers with the
same shortname)
• Changing or deleting pre-configured parameters
© 2017, Vector Informatik GmbH
178 of 250


Chapter 5.
Data models in detail
When client code tries to change the model this way, the related model change transaction is
being canceled and the model changes are reverted (unconditional undo of the transaction). A
special case here are solving actions. When a solving action inconsistently changes the model,
only the changes made by this solving action are reverted (partial transaction undo of one
solving action execution).
5.2 Post-build selectable
5.2.1 Model views
5.2.1.1 What model views are
After project load, the MDF model contains all objects found in the ARXML files. Variation
points are just data structures in the model without any special meaning in MDF.
If you want to deal with variants you must use model views. A model view filters access to the
MDF model based on the variant definition and the variation points.
There is one model view per variant. If you use this variants model view, the MDF model
filters exactly what this variant contains.
All other objects become invisible.
When your
retrieve parameters of a container for example, you’ll see only parameters contained in your
selected variant.
f i n a l b o o l e a n i sV is ib le = M o d e l A c c e s s U t i l . i sV is ib le ( t . p a r a m V a r i a n t A ) ;
Listing 5.1: Check object visibility
5.2.1.2 The IModelViewManager project service
The IModelViewManager handles model visibility in general. It provides the following me-
ans:
• Get all available variants
• Execute code with visibility of a specific predefined variant only. This means your code
sees all objects contained in the specified variant. All objects which are not contained in
this variant will be invisible
• Execute code with visibility of invariant data only (see IInvariantView).
• Execute code with unfiltered model visibility. This means that your code sees all objects
unconditionally. If the project contains variant data, you see all variants together
It additionally provides detailed visibility information for single model objects:
• Get all variants, a specific object is visible in
• Find out if an object is visible in a specific variant
f i n a l List < I P r e d e f i n e d V a r i a n t V i e w > variants = viewMgr . g e t A l l V a r i a n t V i e w s () ;
Listing 5.2: Get all available variants
© 2017, Vector Informatik GmbH
179 of 250


Chapter 5.
Data models in detail
try final I M o d e l V i e w E x e c u t i o n C o n t e x t context = viewMgr . e x e c u t e W i t h M o d e l V i e w ( t .
variantViewA )) {
assertIsVisible (t. paramInvariant );
assertIsVisible (t. paramVariantA );
assertNotVisible (t. paramVariantB );
}
try final I M o d e l V i e w E x e c u t i o n C o n t e x t context = viewMgr . e x e c u t e W i t h M o d e l V i e w ( t .
variantViewB )) {
assertIsVisible (t. paramInvariant );
assertNotVisible (t. paramVariantA );
assertIsVisible (t. paramVariantB );
}
try final I M o d e l V i e w E x e c u t i o n C o n t e x t context = viewMgr . e x e c u t e U n f i l t e r e d () ) {
assertIsVisible (t. paramInvariant );
assertIsVisible (t. paramVariantA );
assertIsVisible (t. paramVariantB );
}
Listing 5.3: Execute code with variant visibility
Important remark:
It is essential that the execute...() methods are used exactly as imple-
mented in the listing above. The try (...)
{...} construct is a new Java 7 feature which
guarantees that resources are closed whenever (and how ever) the try block is being left. For
details read:
http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
© 2017, Vector Informatik GmbH
180 of 250


Chapter 5.
Data models in detail
Collection < IPredefinedVariantView > visibleVariants = viewMgr .
getVisibleVariantViews (t. paramInvariant );
assertThat ( visibleVariants . size () , equalTo (2) );
assertThat ( visibleVariants , containsInAnyOrder (t. variantViewA , t. variantViewB ))
;
visibleVariants = viewMgr . getVisibleVariantViews (t. paramVariantA );
assertThat ( visibleVariants . size () , equalTo (1) );
assertThat ( visibleVariants , containsInAnyOrder (t. variantViewA ));
Listing 5.4: Get all variants, a specific object is visible in
5.2.1.3 Variant siblings
Variant siblings of an MDF object are MDF object instances which represent the same object
but in other variants.
The method IModelVarianceAccessPublished.getVariantSiblings() provides access to these
sibling objects:
This method returns MDF object instances representing the same object but in all variants. The
collection returned contains the object itself including all siblings from other variants.
The calculation of siblings depends on the object-type as follows:
• Ecuc Module Configuration:
Since module configurations are never variant, this method always returns a collection
which contains the specified object only
• Ecuc Container:
For siblings of a container all of the following conditions apply:
– They have the same AUTOSAR path
– They have the same definition path (containers with the same AUTOSAR path but
different definitions may occur in variant models - but they are not variant siblings
because they differ in type)
• Ecuc Parameter:
For siblings of a parameter all of the following conditions apply:
– The parent containers have the same AUTOSAR path
– The parameter siblings have the same definition path
The parameter values are not relevant so parameter siblings may have different values.
Multi-instance parameters are special. In this case the method returns all multi-instance
siblings of all variants.
• System description object:
For siblings of MIReferrables all of the following conditions apply:
– They have the same meta-class
– They have the same AUTOSAR path
For siblings of non-MIReferrables all of the following conditions apply:
– Their nearest MIReferrable-parents are either the same object or variant siblings
© 2017, Vector Informatik GmbH
181 of 250



Chapter 5.
Data models in detail
– Their containment feature paths below these nearest MIReferrable-parents is equal
Special use cases: When the specified object is not a member of the model tree (the object
itself or one of its parents has no parent), it also has no siblings. In this case this method
returns a collection containing the specified object only.
Remark concerning visibility: This method returns all siblings independent of the currently
visible objects. This means that the returned collection probably contains objects which are
not visible by the caller! It also means that the specified object itself doesn’t need to be visible
for the caller.
5.2.1.4 The Invariant model views
There are use cases which require to see the invariant model content only. One example are
generators for modules which don’t support variance at all.
There are two different invariant views currently defined:
• Value based invariance (values are equal in all variants):
The IInvariantValuesView contains objects were all variant siblings have the same value
and exist in all variants. One of the siblings is contained
• Definition based invariance (values which shall be equal in all variants):
The IInvariantEcucDefView contains objects which are not allowed to be variant accor-
ding to the BSWMD rules. One of the siblings is contained
All Invariant views derive from the same interface IInvariantView, so if you want to use an
invariant view and not specifying the exact view, you could use the IInvariantView interface.
The figure 5.5 describes the hierarchy.
Figure 5.5: Invariant views hierarchy
The InvariantValues model view
The IInvariantValuesView contains only elements which
have one of the following properties:
• The element and no parent has any MIVariationPoint with a post-build condition
• All variant siblings have the same value and exist in all variants. Then one of the siblings
is contained in the IInvariantValuesView
So the semantic of the InvariantValues model view is that all values are equal in all vari-
ants.
© 2017, Vector Informatik GmbH
182 of 250



Chapter 5.
Data models in detail
You could retrieve an instance of IInvariantValuesView by calling IModelViewManager.
getInvariantValuesView().
IModelViewManager viewMgr =...;
IInvariantValuesView invariantView = viewMgr . getInvariantValuesView ();
// Use the invariantView like any other model view
Listing 5.5: Retrieving an InvariantValues model view
Example
The figure 5.6 describes an example for a module with containers and the visibility
in the IInvariantValuesView.
• Container A is invisible because it is contained in variant 1 only
• Container B and C are visible because they are contained in all variants
• Parameter a is visible because it is contained in all variants with the same value
• Parameter b is invisible: It is contained in all variants but with different values
• Parameter c is invisible because it is contained in variant 3 only
Figure 5.6: Example of a model structure and the visibility of the IInvariantValuesView
Specification
See also the specification for details of the IInvariantValuesView.
The Invariant EcuC definition model view
The IInvariantEcucDefView contains the same
objects as the invariant values view but additionally excludes all objects which, by (EcuC /
BSWMD) definition, support variance. Using this view you can avoid dealing with objects which
are accidentally equal by value (in your test configurations) but potentially can be different
because they support variance.
More exact the IInvariantEcucDefView will additionally exclude elements which have the
following properties:
• If the parent module configuration specifies VARIANT-POST-BUILD-SELECTABLE as
implementation configuration variant
– All objects ( MIContainer, MINumericalValue, ...) are excluded, which support
variance according to their EcuC definition. (potentially variant objects)
© 2017, Vector Informatik GmbH
183 of 250


Chapter 5.
Data models in detail
• If the parent module configuration doesn’t specify VARIANT-POST-BUILD-SELECTABLE
as implementation configuration variant. All contained objects do not support variance,
so the view actually shows the same objects as the IInvariantValuesView.
The implementation configuration variant in fact overwrites the objects definition for elements
in the ModuleConfiguration.
Reasons to Use the view
The EcucDef view guarantees that you don’t access potentially
variant data without using variant specific model views. So it allows you to improve code
quality in your generator.
When your test configuration for example contains equal values for a parameter which is po-
tentially variant you will see this parameter in the invariant values view but not in the EcucDef
view. Consequences if you access data in other module configurations: When the BSWMD file
of this other module is being changed, e.g. a parameter now supports variance, objects can
become invisible due to this change. You are forced to adapt your code then.
Usage
You could retrieve an instance of IInvariantEcucDefView by calling IModelViewMa-
nager.getInvariantEcucDefView(). And then use is as any other IModelView.
IModelViewManager viewMgr =...;
IInvariantEcucDefView invariantView = viewMgr . getInvariantEcucDefView ();
// Use the invariantView like any other model view
Listing 5.6: Retrieving an InvariantEcucDefView model view
Specification
See also the specification for details of the IInvariantEcucDefView.
5.2.1.5 Accessing invisible objects
When you switch to a model view, objects which are not contained in the related variant become
invisible. This means that access to their content leads to an InvisibleVariantObjectFea-
tureException.
To simplify handling of invisible objects, some model services provide model access even for
invisible objects in variant projects. The affected classes and interfaces are:
• ModelUtil
• ModelAccessUtil
• IReferrableAccess
• IModelAccess
• IModelCompareService
• DefRef
• AsrPath
• IEcucDefinitionAccess (all methods which deal with configuration side objects)
Only a subset of the methods in these services work with invisible objects (read the methods
JavaDoc for details). The general policy to select exactly these methods was:
© 2017, Vector Informatik GmbH
184 of 250


Chapter 5.
Data models in detail
• Support access to type and object identity of MDF objects (definition and AUTOSAR
path)
• Parameter value or other content related information must still be retrieved in a context
the object is visible in
• Also not contained are methods which change model content. E.g. deleting invisible
objects, set parameter values, ...
5.2.1.6 IViewedModelObject
The IViewedModelObject is a container for one MIObject and an IModelView that was used
when viewing the MIObject.
The interface provides getter for the MIObject, and the IModelView which was active during
creation of the IViewedModelObject. So the IViewedModelObject represents a tuple of MI-
Object and IModelView.
This could be used to preserve the state/tuple of a MIObject and IModelView, for later retrie-
val.
Examples:
• BswmdModel objects
• Elements for validation results, retrieved in a certain view
• Model Query API like ModelTraverser, to preserve IModelView information
Notes:
A IViewedModelObject is immutable and will not update any state. Especially not when the
visibility of the getMdfObject(), is changed after the construction of the IViewedModelOb-
ject.
It is not guaranteed, that the MIObject is visible in the creation IModelView, after the model is
changed. It is also possible to create an IViewedModelObject of a MIObject and a IModelView,
where the MIObject is invisible.
The method getCreationModelView() returns the IModelView of the IViewedModelObject,
which was active when the model object was viewed IViewedModelObject.
5.2.2 Variant specific model changes
The CFG5 data model provides an execution context which guarantees that only the selected
variant is being modified. Objects which are visible in more than one variant are cloned auto-
matically. The clones and the object which is being modified (or their parents) automatically
get a variation point with the required post-build conditions.
The following picture shows how this execution context works:
See figure 5.7 on the following page.
• Before modifying the parameter, this instance is invariant. The same MDF instance is
visible in all variants
• When the client code changes the parameter value, the model automatically clones the
parameter first
© 2017, Vector Informatik GmbH
185 of 250



Chapter 5.
Data models in detail
Figure 5.7: Variant specific change of a parameter value
• Only the parameter instance which is visible in the currently active view is being modified.
The content of other variants stays untouched
Remark: This change mode is implicitly turned off when executing code in the IInvariant-
View or in an unfiltered context.
try final I M o d e l V i e w E x e c u t i o n C o n t e x t v i e w C o n t e x t = viewMgr .
executeWithModelView ( variantView )) {
try final I M o d e l V i e w E x e c u t i o n C o n t e x t m o d e C o n t e x t = viewMgr .
executeWithVariantSpecificModelChanges ()) {
ma. setAsString ( parameter , " Vector - Informatik ");
}
}
Listing 5.7: Execute code with variant specific changes
5.2.3 Variant common model changes
The CFG5 data model provides an execution context which guarantees that model objects are
modified in all variants.
The behavior of this mode depends on the mode flag parameter as follows:
• mode == ALL : All parameters and containers are affected
• mode == DEFINITION_BASED : Only those parameters and containers are af-
fected which do not support variance (according to their definition in the BSWMD file
and the implementation configuration variant of their module configuration)
• mode == OFF : Doesn’t turn on this change mode (this value is used internally only)
Remark: This method doesn’t allow to reduce the scope of this change mode. So if ALL is
already set, this method doesn’t permit to use DEFINITION_BASED (or OFF) to reduce the
effective amount of objects. ALL will be still active then.
The following picture shows how this execution context works:
See figure 5.8 on the next page.
• We start with a variant model which contains one parameter in two instances - one per
variant - with the values 3 and 7
• When the client code sets the parameter value in variant 1 to 4, the model automatically
modifies the variant sibling in variant 2
• As a result, the parameter has the same value in all variants
This change mode works with parameters and containers. The following operations are suppor-
ted:
© 2017, Vector Informatik GmbH
186 of 250



Chapter 5.
Data models in detail
Figure 5.8: Variant common change of a parameter value
• Container/parameter creation: The created object afterwards exists in all variants
the related parent exists in. Already existing objects are not modified. Missing objects
are created
• Container/parameter deletion: The deleted object afterwards is being removed from
all variants the related parent exists in. So actually all variant siblings are deleted
• Parameter value change: The parameter exists and has the same value in all variants
the parent container exists in. If a parameter instance is missing in a variant, it is being
created
Special behavior for multi-instance parameters:
• This mode guarantees that a set of multi-instance parameters is equal in all variants
• Only the values of multi-instance parameters are relevant. Their order can be different in
different variants
• Beside the values, this change mode guarantees that all variants contain the same number
of parameter instances. So, when a multi-instance set is being modified in a variant view,
this change mode creates or deletes objects in other variants to guarantee an equal number
of instances in all variant sibling sets
Remark: This change mode is implicitly turned on with the mode flag ALL when code is
being executed in the IInvariantView. It is being ignored implicitly when executing code in
an unfiltered context.
5.3 BswmdModel details
5.3.1 BswmdModel - DefinitionModel
The BswmdModel provides a type safe and easy access to data of BSW modules (Ecu configu-
ration elements).
Example:
• Access a single parameter /MICROSAR/ComM/ComMGeneral/ComMUseRte
You can to write: comM.getComMGeneral().getComMUseRte()
© 2017, Vector Informatik GmbH
187 of 250



Chapter 5.
Data models in detail
• Access containers[0:*] /MICROSAR/ComM/ComMChannel
You can to write:
for (ComMChannel channel : comM.getComMChannel()){
int value = channel.getComMChannelId().getValue();
}
The DaVinci Configurator internal Model (MDF model) has 1:1 relationship to your Bswmd-
Model. The BswmdModel will retrieve all data from the underlying MDF model.
Figure 5.9: The relationship between the MDF model and the BswmdModel
DefinitionModel
The DefinitionModel is the base implementation of every BswmdModel.
Every BswmdModel class is a subclass of the DefinitionModel where the classes begin with
GI, like GIContainer.
5.3.1.1 Types of DefinitionModels
There are two types of DefinitionModels:
1. BswmdModel (formally known as DefinitionTyped BswmdModel)
2. DefRef API (formally known as Untyped BswmdModel)
The BswmdModel consists of generated classes for the module definition elements like Mo-
duleDefinitions, Containers, Parameters in bswmd files. The generated class contains
getter methods for each child element. So you can access every child by the corresponding
getter method with compile time safety of the sub type.
The BswmdModel derives from the DefinitionModel DefRef API, so the BswmdModel
contains all functionalities of the DefRef API.
The DefRef API of the DefinitionModel provides an generic access to the Ecu configuration
structure via DefRefs. There are NO generated classes for the Definition structure. The
DefRef API uses the base classes of the DefinitionModel to provide this DefRef based access.
Every interface in the DefinitionModel starts with an GI. The Ecu Configuration elements have
corresponding base interfaces for each element:
© 2017, Vector Informatik GmbH
188 of 250


Chapter 5.
Data models in detail
• ModuleConfiguration - GIModuleConfiguration
• Container - GIContainer
• ChoiceContainer - GIChoiceContainer
• Parameter - GIParameter<?>
– Integer Parameter - GIParameter<BigInteger>
– Boolean Parameter - GIParameter<Boolean>
– Float Parameter - GIParameter<BigDecimal>
– String Parameter - GIParameter<String>
• Reference - GIReference<?>
– Container Reference - GIReferenceToContainer
– Foreign Reference- GIReference<Class>
So there are different classes for the different model types, e.g. all MDF classes start with MI,
the Untyped start with GI and DefinitionTyped classes are generated. The table 5.1 contrasts
the different model types and their corresonding classes.
AUTOSAR type
MDFModel
“Untyped” BswmdModel
“DefinitionTyped”
ModuleConfiguration
MIModuleConfiguration
GIModuleConfiguration
CanIf
(generated)
Container
MIContainer
GIContainer
CanIfPrivateCfg
(generated)
String Parameter
MITextualValue
GIParameter<String>
GString
Integer Parameter
MINumericalValue
GIParameter<BigInteger>
GInteger
Reference to Container
MIReferenceValue
GIReferenceToContainer
CanIfCtrlDrvInitHohConfigRef
(generated)
Enum Parameter
MITextualValue
GIParameter<String>
CanIfDispatchBusOffUL
(generated)
Table 5.1: Different Class types in different models
Note: The GString in the table is not the Groovy GString class.
It is com.vector.cfg.gen.core.bswmdmodel.param.GString.
5.3.1.2 DefRef Getter methods of Untyped Model
The DefRef API classes have no getter methods for the specific child types, but the children
could be retrieve via the generic getter methods like:
• GIContainer.getSubContainers()
• GIContainer.getParameters()
• GIContainer.getParameters(TypedDefRef)
• GIContainer.getParameter(TypedDefRef)
• GIContainer.getReferencesToContainer(TypedDefRef)
• GIModuleConfiguration.getSubContainer(TypedDefRef)
• GIParameter.getValueMdf()
Additionally there are methods to retrieve other referenced elements, like parent of reference
reverse lookup:
© 2017, Vector Informatik GmbH
189 of 250


Chapter 5.
Data models in detail
• GIContainer.getParent()
• GIContainer.getParent(DefRef)
• GIContainer.getReferencesPointingToMe()
• GIContainer.getReferencesPointingToMe(DefRef)
The following listing describe the usage of the untyped bswmd method in both models:
// Get the container from external method getCanIfInitConfigBswmd () ...
f i n a l G I C o n t a i n e r c an If In it = g e t C a n I f I n i t C o n f i g B s w m d () ;
// Gets all subcontainers from a container CanIfRxPduConfig from the canIfInit
instance
f i n a l List < GIContainer > s u b C o n t a i n e r s = ca nI fI ni t . g e t S u b C o n t a i n e r s (
CanIfRxPduConfig . DEFREF . castToTypedDefRef ());
if ( s u b C o n t a i n e r s . isEmpty () ) {
// ERROR Handling
}
f i n a l G I C o n t a i n e r cont = s u b C o n t a i n e r s . get (0) ;
// Gets exactly one CanIfCanRxPduHrhRef reference from the cont instance
f i n a l GIReference < MIContainer > child = cont . g e t R e f e r e n c e ( C a n I f C a n R x P d u H r h R e f .
DEFREF . castToTypedDefRef ());
Listing 5.8: Sample code to access element in an Untyped model with DefRefs
f i n a l
GIReferenceToContainer ref = getCanIfCanRxPduHrhRefBswmd ();
f i n a l G I C o n t a i n e r target = ref . g e t R e f T a r g e t () ;
Listing 5.9: Resolves a Refference traget of an Reference Parameter
f i n a l GIParameter < BigInteger > param = g e t C a n I f I n i t C o n f i g B s w m d () . g e t P a r a m e t e r (
CanIfInitConfiguration . CANIF_NUMBER_OF_CAN_TXPDU_IDS_DEFREF );
f i n a l B i g I n t e g e r value = param . g e t V a l u e M d f () ;
Listing 5.10: The value of a GIParameter
The figure 5.10 on the next page shows the available DefRef navigation methods for the Untyped
model. There are more methods to navigate with the DefRef API through the a DefinitionModel,
please look into the Javadoc documentation of the GI... classes for more functionality.
© 2017, Vector Informatik GmbH
190 of 250



Chapter 5.
Data models in detail
Figure 5.10: SubContainer DefRef navigation methods
5.3.1.3 References
All references in the BswmdModel are subtypes of GIReference. The generated model contains
generated DefintionTyped classes for references to container, for the other references their are
only Untyped classes like GInstanceReference.
A GIReference has the method getRefTargetMdf(), this will always return the target in the
MDF model as MIReferrable. For non GIReferenceToContainer this is the normal way to
resolve references, but for reference to container you should always try to use the method
getRefTarget(), which will not leave the BswmdModel.
Note: Try to use getRefTarget() as much as possible.
References to container
The following references are references to container (References poin-
ting to container) and are subtypes of the GIReferenceToContainer.
• Normal Reference
© 2017, Vector Informatik GmbH
191 of 250



Chapter 5.
Data models in detail
• SymbolicNameReference
• ChoiceReference
References have the method getRefTarget(), which returns the target as BswmdModel object,
if the type is known at model generation time, the type will be the generated type. Otherwise
the return type is GIContainer.
Note: It is always allowed to call getRefTarget(), also for references pointing to external
types.
Figure 5.11: Untyped reference interfaces in the BswmdModel
SymbolicNameReferences
SymbolicNameReferences have the same methods as GIReferen-
ceToContainer and the additional methods getRefTargetParameterMdf(), which returns the
target parameter as MIObject The method getRefTargetParameter() return a BswmdModel
object, if the type is known at model generation time, the type will be the generated type.
Otherwise the return type is GIParameter.
Note: It is always allowed to call getRefTargetParameter(), also for references pointing to
external types.
5.3.1.4 Post-build selectable with BswmdModel
The BswmdModel supports the Post-build selectable use case, in respect that you do not have
to switch nor cache the corresponding IModelView. The BswmdModel objects cache the so
called Creation ModelView and switch transparently to that view when accessing the Model.
So you don’t have to switch to the correct view on access. See figure 5.12 on the following page.
You only have to ensure, that the requested IModelView is active or passed as parameter, when
you create an instance at the GIModelFactory. Note: A lazy created object will inherit the
view of the existing element.
© 2017, Vector Informatik GmbH
192 of 250



Chapter 5.
Data models in detail
Figure 5.12: Creating a BswmdModel in the Post-build selectable use case
5.3.1.5 Creation ModelView of the BswmdModel
Every GIModelObject (BswmdModel object) has a creation IModelView. This is the IModel-
View, which was active or passed during creation of the BswmdModel. At every method call to
the BswmdModel, the model will switch to this view.
Using the creation ModelView of the BswmdModel
The method getCreationModelView()
returns the IModelView of this GIModelObject, which was active during the creation of this
BswmdModel.
The method executeWithCreationModelView() executes the code under visibility of the ge-
tCreationModelView() of this GIModelObject.
The returned IModelViewExecutionContext must be used within a Java "try-with-
resources" feature. 
It makes sure, that the old view is restored when the try is comple-
ted.
GIModelObject myModelObject = ...;
try final I M o d e l V i e w E x e c u t i o n C o n t e x t context = m y M o d e l O b j e c t .
executeWithCreationModelView ()) {
// do some operations
...
}
Listing 5.11: Java: Execute code with creation IModelView of BswmdModel object
The method executeWithCreationModelView(Runnable) executes the Runnable code under
visibility of the getCreationModelView() of this GIModelObject.
GIModelObject myModelObject = ...;
myModelObject . executeWithCreationModelView (() ->{
// do some operations
});
Listing 5.12: Java: Execute code with creation IModelView of BswmdModel object via runnable
© 2017, Vector Informatik GmbH
193 of 250


Chapter 5.
Data models in detail
The method executeWithCreationModelView() executes the Supplier code under visibility
of the getCreationModelView() of this GIModelObject. You could use this method, if you
want to return an object from this operation.
GIModelObject myModelObject = ...;
ReturnType returnVal = myModelObject . executeWithCreationModelView (() ->{
// do some operations
r e t u r n theValue ;
});
Listing 5.13: Java: Execute code with creation IModelView of BswmdModel object
5.3.1.6 Lazy Instantiating
The BswmdModel is instantiated lazily; this means when you create a ModuleConfiguration
object only one object for the module configuration is created.
When you call a getXXX() method on the configuration it will create the requested sub element,
if it exists. So you can start at any point in the model (e.g. a Subcontainer) and the model is
build successively, by your calls.
It is also allowed to call a getParent() on a Subcontainer, if the parent was not created yet.
The technique could be used in validations, when the creation of the full BswmdModel is too
expensive. Then you can create only the needed container; by an MDF model object.
5.3.1.7 Optional Elements
All elements (Container, Parameter . . . ) are considered as optional if they have a multiplicity
of 0:1. The BswmdModel provide a special handling of optional elements. This shall support
you to recognize optional element during development (in the most cases some kind of special
handling is needed). An optional Element has other access methods as a required Element: The
method getXXX() will not return the element, it will return a GIOptional<Element> object
instead. You can ask the GIOptional object if the element exists (optElement.exists()).
Then you can call optElement.get() to retrieve the real object.
You also have the choice to use the method existsXXX(). This method is equivalent to ge-
tXXX().exists(). The difference is that you get a compile error, if you try to use the optional
element without any check. When you are sure that the element must exist you can directly call
getXXXUnsafe(). Note: If you use any of the get methods (optElement.get() or getXXXUns-
afe()) and the element does not exist the normal BswmdModelException is thrown.
5.3.1.8 Class and Interface Structure of the BswmdModel
The upper part of the figure 5.13 on the next page shows the Untyped API (GI. . . interfaces).
The bottom left part is an example of DefinitionTyped (generated) class for the CanIf module.
The bottom right part are the classes used by the DefinitionTyped model, but are not visible
in the Untyped model.
© 2017, Vector Informatik GmbH
194 of 250



Chapter 5.
Data models in detail
Figure 5.13: Class and Interface Structure of the BswmdModel
5.3.1.9 BswmdModel write access
The BswmdModel supports a write access for ecu configuration elements. This means new
elements can be created and existing elements can be modified and deleted by the BswmdMo-
del.
NOTE: The model is in read-only state by default, so no objects could be created. For this reason
all calls to an API which creates or deletes elements has to be executed within a transaction.
See ModelDocumentation chapter "Model changes" for more details.
Optional and required Elements (0:1/1:1 Multiplicity)
For optional or required elements,
the following additional methods are generated, if BswmdModelWriteAccess is enabled:
• get...OrNull(): Returns the requested element or null if it is missing.
• get...OrCreate(): Returns the existing requested element or implicitly creates a new
one if it is missing.
E.g. EcucGeneral:
© 2017, Vector Informatik GmbH
195 of 250


Chapter 5.
Data models in detail
Ecuc ecuc = getEcucModuleConfig ();
// Gets the EcucGeneral container or null if it is missing .
EcucGeneral ecucGeneralOrNull = ecuc . getEcucGeneralOrNull ();
// Gets the existing EcucGeneral container or creates a new one if it is
missing .
EcucGeneral ecucGeneralOrCreate = ecuc . getEcucGeneralOrCreate ();
Listing 5.14: Additional write API methods for EcucGeneral
Multiple elements (Upper Multiplicity > 1)
For each multiple element, the return type
for these elements is changed from List<> to GIPList<> for parameter and GICList<> for
container, if BswmdModelWriteAccess is enabled. These new interfaces provide methods which
allow creating and adding new children for the corresponding elements:
• createAndAdd(): Creates a new child element, appends it to the list and returns the new
element.
• createAndAdd(int index): Creates a new child element, inserts it to the list at the
specified index position and returns the new element.
• For GICList<> only:
– createAndAdd(String shortName): Creates a new child element with the specified
shortName, appends it to the list and returns the new element.
– createAndAdd(String shortName, int index): Creates a new child element with
the specified shortName, inserts it to the list at the specified index position and
returns the new element.
– byName(String shortName): Gets the container by specified shortName or throws
an exception if it is missing.
– byNameOrNull(String shortName): Gets the container by specified shortName or
null if it is missing.
– byNameOrCreate(String shortName): Gets the container by specified shortName
or implicitly creates a new one if it is missing.
– exists(String shortname): Returns true if the container exists, otherwise false.
E.g. EcucCoreDefinition:
© 2017, Vector Informatik GmbH
196 of 250


Chapter 5.
Data models in detail
Ecuc ecuc = getEcucModuleConfig ();
// Gets the EcucCoreDefinition list ( create EcucHardware container if it is
missing )
GICList < EcucCoreDefinition > ecucCores = ecuc . getEcucHardwareOrCreate ().
getEcucCoreDefinition ();
// Adds two EcucCores
EcucCoreDefinition core0 = ecucCores . createAndAdd (" EcucCore0 ");
EcucCoreDefinition core1 = ecucCores . createAndAdd (" EcucCore1 ");
if ( e cu cC or es . exists ( " E cu cC or e0 " ) ) {
// Sets EcucCoreId from EcucCore0 to 0
ecucCores . byName (" EcucCore0 "). getEcucCoreId (). setValue (0) ;
}
// Creates a new EcucCore by method byNameOrCreate
EcucCoreDefinition core2 = ecucCores . byNameOrCreate (" EcucCore2 ");
...
Listing 5.15: EcucCoreDefinition as GICList<EcucCoreDefinition>
Other write API
• Deleting model objects: It is also possible to delete objects from the model.
– moRemove: Deletes the specified object from the model.
– moIsRemoved: Returns true, if the object was removed from repository, or is invisible
in the current active IModelView.
// Deletes the container ' EcucGeneral ' from the model .
ecucGeneral . moRemove ();
// Deletes the parameter ' EcuCSafeBswChecks ' from the model .
ecucGeneral . getEcuCSafeBswChecks . moRemove ();
// Deletes the child container ' EcucCoreDefinition ' with shortname 'EcucCore0 '
from the model .
ecucCores . byName (" EcucCore0 "). moRemove ();
// Checks if the container ' EcucGeneral ' was removed from repository , or is
invisible in the current active `IModelView `.
if ( e c u c G e n e r a l . m o I s R e m o v e d () ) {
...
}
Listing 5.16: Deleting model objects
• Duplication of containers: The method duplicate() copies a container with all its
children and appends it to the same parent.
© 2017, Vector Informatik GmbH
197 of 250


Chapter 5.
Data models in detail
// Duplicates the container ' EcucGeneral '
EcucGeneral duplicatedEcucGeneral = ecucGeneral . duplicate ();
// Duplicates the child container ' EcucCoreDefinition ' with shortname '
EcucCore0 '
EcucCoreDefinition duplicatedEcucCore0 = ecucCores . byName (" EcucCore0 ").
duplicate ();
Listing 5.17: Duplication of containers
• Parameter values: The method setValue(VALUE) sets the value of a parameter. This
method checks if the specified parameters configuration object is available and sets the
new value. If the parameter object is missing it is implicitly created in the model.
// Sets the value of the parameter ' EcuCSafeBswChecks ' to 'true '
ecucGeneral . getEcuCSafeBswChecks . setValue ( true );
Listing 5.18: Set parameter values with the BswmdModel Write API
• Reference targets: The method setRefTarget(REF_TARGET) sets the target of a re-
ference. This method sets the specified target object as reference target of the specified
reference parameter. If the reference parameter object is missing it is implicitly created
in the model.
// Gets the container 'OsCounter ' with shortname ' SystemTimer '
OsCounter osCounterTarget = os. getOsCounters . byName (" SystemTimer ");
// Sets the reference target of the parameter ' CanCounterRef '
can . getCanGeneral (). getCanCounterRef (). setRefTarget ( osCounterTarget );
Listing 5.19: Set reference targets with the BswmdModel Write API
© 2017, Vector Informatik GmbH
198 of 250


Chapter 5.
Data models in detail
5.3.2 BswmdModel generation
The BswmdModel for the automation interface is generated automatically by the DaVinciCon-
figurator.
5.3.2.1 DerivativeMapping
If the SIP contains one or more modules with a DerivativeMapping, the BswmdModel classes for
these modules can only be generated for one certain derivative. By default, the first derivative
is selected, sorted by UUID.
If a other derivative shall be selected for BswmdModel generation a Settings.xml file can be
defined in the SIP at <SIP-ROOT-PATH>\DaVinciConfigurator\Generators.
Sample file:
<Settings >
<Settings Name =" com . vector . cfg . gen . bswmdmodelgenerator .
BswmdAutomationModelSettings ">
<! -- Selects the derivative with the name or UUID specified by
Value -->
<Setting Name =" SelectedDerivative " Value =" SPX546B "/>
</ Settings >
</ Settings >
Listing 5.20: Settings.xml sample for DerivativeMapping
5.4 Model Utility Classes
5.4.1 AutosarUtil
The class AutosarUtil is a static utility class. Its methods are not directly related to the MDF
model but are useful when client code deals with AUTOSAR paths and shortnames on string
basis.
Some of these methods are
• isValidShortname(String): Checks if this shortname is valid according the rules, the
AUTOSAR standard defines (character set for example)
• getLastShortname(String): Returns the last shortname of the specified AUTOSAR
path
• getFirstShortname(String): Returns the first shortname of the specified AUTOSAR
path
• getAllShortnames(String): Returns all shortnames of the specified AUTOSAR path
5.4.2 AsrPath
The AsrPath class represents an AUTOSAR path without a connection to any model.
AsrPaths are constant; their values cannot be changed after they are created. This class is
immutable!
© 2017, Vector Informatik GmbH
199 of 250


Chapter 5.
Data models in detail
5.4.3 AsrObjectLink
This class implements an immutable identifier for AUTOSAR objects.
An AsrObjectLink can be created for each object in the MDF AUTOSAR model tree. The
main use case of object links is to identify an object unambiguously at a specific point in time for
logging reasons. Additionally and under specific conditions it is also possible to find the releated
MDF object using its AsrObjectLink instance. But this search-by-link cannot be guaranteed
for each object type and after model changes (details and restrictions below).
5.4.3.1 Object links depend on the MDF object type
• Referrables
The object link is actually identical with the AUTOSAR path
• Ecuc objects with a definition (module, container and parameter)
The object link additionally stores the DefRef
• Ecuc parameters
The object link additionally stores the parameters index. This is the index of all parame-
ters with the same definition below the same parent container instance in the unfiltered
model view
5.4.3.2 Restrictions of object links
• They are immutable and will therefore become invalid when the model changes
• So they don’t guarantee that the related MDF object can be retrieved after the model
has been changed. Search-by-link may even find another object or throw an exception in
this case
5.4.3.3 Examples for object link strings
The method getObjectLinkString() returns for example the following strings:
• For a container or module configuration object, the AUTOSAR path is returned: "/Acti-
veEcuC/Can/CanGeneral"
• For a parameter, the parents AUTOSAR path, the last shortname of its definition and a
positional index in the list of parameters with the same definition is used: "/ActiveEcu-
C/Can/CanGeneral[2:SomeDefName]"
• In case of variant objects, all variants, this object is visible in, are added: /ActiveEcuC/-
Can/CanConfigSet/CanHardwareObject[0:CanControllerRef]{VariantA, VariantB}
5.4.4 DefRefs
The DefRef class represents an AUTOSAR definition reference (e.g. /MICROSAR/CanIf) wit-
hout a connection to any model. A DefRef replaces the String which represents a definition
reference. You shall always use a DefRef instance, when you want to reference something by
it’s definition.
© 2017, Vector Informatik GmbH
200 of 250



Chapter 5.
Data models in detail
The class abstracts the behavior of definition references in the AUTOSAR model (e.g. AUTO-
SAR 3 and AUTOSAR 4 handling).
DefRefs are constant; their values can not be changed after they are created. All DefRef classes
are immutable.
A DefRef represents the definition reference as two parts:
• Package part - e.g. /MICROSAR
• Definition without the package part - e.g. CanIf/CanIfGeneral
This is used to navigate through the AUTOSAR model with refinements and wildcards. So you
have to create a DefRef with the two parts separated.
The figure 5.14 shows the structure of the DefRef class and its sub classes.
Figure 5.14: DefRef class structure
Creation
You can create a DefRef object with following public static methods (partial):
• DefRef.create(DefRef, String) - Parent DefRef, Child name
• DefRef.create(IDefRefWildcard, String) - Wildcard, Definition without package
• DefRef.create(MIHasDefinition) - Model object
• DefRef.create(MIHasDefinition, String) - Parent object, Child name
• DefRef.create(MIParamConfMultiplicity) - Definition object
• DefRef.create(String, String) - Package part, Definition without package
Wildcards
DefRef instances can also have a wildcard instead of a package String (IDefRefWildcard).
The wildcard is used to match on multiple packages. See chapter 5.4.4.2 on the next page for
details.
© 2017, Vector Informatik GmbH
201 of 250


Chapter 5.
Data models in detail
Useful Methods
This section describes some useful methods (Please look at the javadoc of
the DefRef class for a full documentation):
• defRef.isDefinitionOf(MIHasDefinition) - Checks the definition of the configuration
element and returns true if the element has the definition. The "defRef" object is e.g.
from the Constants class.
– Note: The method isDefinitionOf() returns false, if the element is removed or
invisible.
• defRef.asDefinitionOf(MIHasDefinition, Class<>) - Checks the definition of the
configuration element and returns the element casted to the configuration subtype, or
null.
– Note: The method asDefinitionOf() returns null, if the element is removed or
invisible.
MIObject yourObject = ...;
DefRef yourDefRef = ...;
if ( y o u r D e f R e f . i s D e f i n i t i o n O f ( y o u r O b j e c t ) {
// It is the correct instance
// Do something
}
// Or with an integrated cast in the TypedDefRef case
f i n a l M I C o n t a i n e r c on ta in er = y o u r D e f R e f . a s D e f i n i t i o n O f ( y ou rO bj ec t ) ;
if ( c on ta in er
!= null ){
// Do something
}
Listing 5.21: DefRef isDefinitionOf methods
5.4.4.1 TypedDefRefs
The TypedDefRef class represents an AUTOSAR definition reference with the type of the
AUTOSAR (MDF) model. So every TypedDefRef knows which Definition, Configuration and
Value element is correct for the Definition path.
The DEF_TYPE, CONFIG_TYPE and VALUE_TYPE are Java generics and are used many APIs to
return the specific type of a request.
In addition the most TypedDefRefs also provide additional TypeInfo data, like the Multiplicity
of the element. See TypeInfo javadoc for more details.
5.4.4.2 DefRef Wildcards
The DefRef class supports so called wildcards, which could be used to match on multiple
packages at once, like the /[MICROSAR] wildcard matches on any DefRef package starting with
/MICROSAR. E.g. /MICROSAR, /MICROSAR/S12x, ....
Every wildcard is of type IDefRefWildcard. An IDefRefWildcard instance could be passed
to the DefRef.create(IDefRefWildcard, String) method to create a DefRef with wildcard
information.
© 2017, Vector Informatik GmbH
202 of 250


Chapter 5.
Data models in detail
Predefined DefRef Wildcards
The class EDefRefWildcard contains the predefined IDefRef-
Wildcards for the DefRef class. These IDefRefWildcards could be used to create DefRefs,
without creating your own wildcard for the standard use cases
The DefRef.create(String, String) method will parse the first String to find a wildcard
matching the EDefRefWildcards.
Predefined wildcards:
The class EDefRefWildcard defines the following wildcards, with the
specified semantic:
• EDefRefWildcard.ANY /[ANY]: Matches on any package path. It is equal to any package
and any packages refines from ANY wildcard.
• EDefRefWildcard.AUTOSAR /[AUTOSAR]: Matches on the AUTOSAR3 and AUTOSAR4
packages (see DefRef class). It is equal to the AUTOSAR packages, but not to refined
packages e.g. /MICROSAR. Any packages which refined from AUTOSAR also refines
from AUTOSAR wildcard.
• EDefRefWildcard.NOT_AUTOSAR_STMD /[!AUTOSAR_STMD]: Matches on any package ex-
cept the AUTOSAR packages. It is equal to any package, except AUTOSAR packages.
Any package refines from NOT_AUTOSAR_STMD wildcard, except AUTOSAR packages.
• EDefRefWildcard.MICROSAR /[MICROSAR]: Matches on any package stating with /MI-
CROSAR (also /MICROSAR/S12x). It is equal to any package stating with /MICRO-
SAR. Any package starting with /MICROSAR refines from MICROSAR wildcard.
• EDefRefWildcard.NOT_MICROSAR /[!MICROSAR]: Matches on any package path not star-
ting with /MICROSAR. It is equal to any package not starting with /MICROSAR. Any
package, which does not start with /MICROSAR, refines from NOT_MICROSAR wildcard.
Also the AUTOSAR packages refine from NOT_MICROSAR wildcard.
Creation of the DefRef with Wildcard
The elements of EDefRefWildcard could be passed
to the DefRef constructor:
DefRef myDefRef = DefRef . create ( EDefRefWildcard . MICROSAR , " CanIf ");
Listing 5.22: Creation of DefRef with wildcard from EDefRefWildcard
Custom DefRef Wildcards
You could create your own wildcard by implementing the interface
IDefRefWildcard. Please choose a good name for your wildcard, because this could be displayed
to the user, e.g. in Validation results. The matches(DefRef) method shall return true, if the
passed DefRef matches the wildcard constraints.
Every wildcard string shall have the notation /[NameOfWildcard].
E.g.
/[MICROSAR], /[!MICROSAR].
5.4.5 CeState
The CeState is an object which allows to retrieve different states of a configuration entity
(typically containers or parameters).
The most important APIs for generator and script code are:
• IParameterStatePublished
© 2017, Vector Informatik GmbH
203 of 250



Chapter 5.
Data models in detail
• IContainerStatePublished
5.4.5.1 Getting a CeState object
The BSWMD models implement methods to get the CeState for a specific CE as the following
listing shows (the types GIParameter and GIContainer are interface base types in the BSWMD
models):
GIParameter parameter = ...;
IParameterStatePublished parameterState = parameter . getCeState ();
GIContainer container = ...;
IContainerStatePublished containerState = container . getCeState ();
Listing 5.23: Getting CeState objects using the BSWMD model
5.4.5.2 IParameterStatePublished
The IParameterStatePublished specifies a type-safe published API for parameter states. It
mainly covers the following state information
• Does this parameter have a pre-configuration value?
What is this value?
The same
information is being provided for recommended and initial (derived) values
• Is this parameter user-defined?
• Is value change or deletion allowed in the current configuration phase (post-build loadable
use case)?
• What is the configuration class of this parameter
The figure 5.15 shows the inheritance hierarchy of the IParameterStatePublished class and
its sub classes.
Figure 5.15: IParameterStatePublished class structure
Parameters have different types of state information:
© 2017, Vector Informatik GmbH
204 of 250


Chapter 5.
Data models in detail
• Simple state retrieval
Example: The method isUserDefined() returns true when the parameter has a user-
defined flag.
• States and values (pre-configuration, recommended configuration and inital (derived)
values)
Example: The method hasPreConfigurationValue() returns true when the parameter
has a pre-configured value. getPreConfigurationValue() returns this value.
• States and reasons
Example: The method isDeletionAllowedAccordingToCurrentConfigurationPhase()
returns true if the parameter can be deleted in the current configuration phase (post-build
loadable projects only). getNotDeletionAllowedAccordingToCurrentConfigurationP-
haseReasons() returns the reasons if deletion is not allowed.
5.4.5.3 IContainerStatePublished
The IContainerStatePublished specifies a type-safe published API for container states. It
mainly covers the following state information
• Does this container have a pre-configuration container (includes access to this container)?
The same information is being provided for recommended and initial (derived) values
• Is change or deletion allowed in the current configuration phase (post-build loadable use
case)?
• In which configuration phase has this container been created in (post-build loadable use
case)?
• What is the configuration class of this container
The figure 5.16 on the next page shows the inheritence hierarchy of the IContainerStatePu-
blished class and its sub classes.
This API provides state information similar to IParameterStatePublished. Some of the states
are container-specific, of course. getCreationPhase(), for example, which returns the phase a
container in a post-build loadable configuration has been created in.
5.5 Model Services
5.5.1 EcucDefinitionAccess
The IEcucDefinitionAccess provides convenient and typesafe access to definition objects
(module, container, parameter and reference definitions). The contained def() methods take
MDF definition objects and return wrappers which can be used to retrieve specific characteristics
of definitions.
Example:
© 2017, Vector Informatik GmbH
205 of 250



Chapter 5.
Data models in detail
Figure 5.16: IContainerStatePublished class structure
IEcucDefinitionAccess eda ;
MIIntegerParamDef intParamDef ;
// Get the integer definition wrapper
IEcucIntegerDefinition def = eda . def ( intParamDef );
// Get the ( optional ) default value
Optional < BigInteger > defaultOpt = def . getDefault ();
b o o l e a n
hasDefault = defaultOpt . isPresent ();
BigInteger defaultValue = defaultOpt . get ();
// Get the multiplicity
IEcucDefMultiplicity multiplicity = def . getMultiplicity ();
BigInteger lower = multiplicity . getLower ();
BigInteger upper = multiplicity . getUpper ();
Listing 5.24: Integer parameter definition access examples
5.5.1.1 Post-build loadable
EcucModuleDefinition
IEcucModuleDefinition is the interface of the module definition wrap-
per. It provides the following method(s):
getSupportedConfigurationVariants()
The getSupportedConfigurationVariants() method returns a collection of supported confi-
guration variants. Never returns null but an empty collection if no supported config variants
are specified.
The returned collection never contains the following literals:
© 2017, Vector Informatik GmbH
206 of 250


Chapter 5.
Data models in detail
• EEcucConfigurationVariant.PRECONFIGURED_CONFIGURATION
• EEcucConfigurationVariant.RECOMMENDED_CONFIGURATION
This method is for post-build loadable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the module definitions used
the following valid values:
• VARIANT-PRE-COMPILE
• VARIANT-LINK-TIME
• VARIANT-POST-BUILD-LOADABLE
• VARIANT-POST-BUILD-SELECTABLE
VARIANT-POST-BUILD was invalid! With AUTOSAR 4.2.1 and later, the following values are
valid (because the loadable and selectable specifications have been separated):
• VARIANT-PRE-COMPILE
• VARIANT-LINK-TIME
• VARIANT-POST-BUILD
VARIANT-POST-BUILD-LOADABLE and VARIANT-POST-BUILD-SELECTABLE are invalid!
This method takes the AUTOSAR version into account and returns the post-build loadable
relevant specification only.
EcucContainerDefinition
IEcucContainerDefinition is the interface of the container defi-
nition wrapper. It provides the following method(s):
getMultiplicityConfigurationClass()
The getMultiplicityConfigurationClass(EEcucConfigurationVariant) method returns the
multiplicity configuration class for the specified module implementation variant. The returned
value defines in which configuration phase the number of container instances latest may change
if the module implements the specified variant.
Supported values for the variant are
• EEcucConfigurationVariant.VARIANT_PRE_COMPILE
• EEcucConfigurationVariant.VARIANT_LINK_TIME
• EEcucConfigurationVariant.VARIANT_POST_BUILD_LOADABLE
Other values lead to an IllegalArgumentException.
This method doesn’t take the multiplicity into account. It only investigates the multiplicity
configuration class as specified in the related container definition. So it still may return EEcuc-
ConfigurationClass.POST_BUILD even if the multiplicity is 1:1 for example. The post-build
loadable use case differs here from post-build selectable (see supportsVariantMultiplicity())
because the changeability in the post-build phase is being inherited from parent objects. So, if
you want to find out if a container actually permits changes in the post-build phase, you should
use IContainerStatePublished.
This method is for post-build loadable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the container definitions
contained the postBuildChangeable flag to define post-build loadable support. This method
© 2017, Vector Informatik GmbH
207 of 250


Chapter 5.
Data models in detail
internally investigates the postBuildChangeable flag in this case but the multiplicityCon-
figClass table for AUROSAR 4.2.1 and newer versions.
EcucCommonAttributes
IEcucCommonAttributes is the base interface of all parameter and
reference definition wrappers. It provides the following method(s):
getMultiplicityConfigurationClass()
The getMultiplicityConfigurationClass(EEcucConfigurationVariant) method returns the
multiplicity configuration class for the specified module implementation variant. The returned
value defines in which configuration phase the number of parameter instances latest may change
if the module implements the specified variant.
Supported values for the variant are
• EEcucConfigurationVariant.VARIANT_PRE_COMPILE
• EEcucConfigurationVariant.VARIANT_LINK_TIME
• EEcucConfigurationVariant.VARIANT_POST_BUILD_LOADABLE
Other values lead to an IllegalArgumentException.
This method doesn’t take the multiplicity into account. It only investigates the multiplicity
configuration class as specified in the related parameter definition. So it still may return EEcuc-
ConfigurationClass.POST_BUILD even if the multiplicity is 1:1 for example. The post-build
loadable use case differs here from post-build selectable (see supportsVariantMultiplicity())
because the changeability in the post-build phase is being inherited from parent objects. So,
if you want to find out if a parameter actually permits changes in the post-build phase, you
should use IParameterStatePublished.
This method is for post-build loadable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the parameter definitions
contain the implementationConfigClass table to define post-build loadable support. This
method internally investigates the implementationConfigClass in this case but the multi-
plicityConfigClass table for AUROSAR 4.2.1 and newer versions.
getValueConfigurationClass()
The getValueConfigurationClass(EEcucConfigurationVariant) method returns the value
configuration class for the specified module implementation variant. The returned value defines
in which configuration phase the value of parameter instances latest may change if the module
implements the specified variant.
Supported values for the variant are
• EEcucConfigurationVariant.VARIANT_PRE_COMPILE
• EEcucConfigurationVariant.VARIANT_LINK_TIME
• EEcucConfigurationVariant.VARIANT_POST_BUILD_LOADABLE
Other values lead to an IllegalArgumentException.
This method never returns EEcucConfigurationClass.LINK.
This method is for post-build loadable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the parameter definitions
contain the implementationConfigClass table to define post-build loadable support. This
© 2017, Vector Informatik GmbH
208 of 250


Chapter 5.
Data models in detail
method internally investigates the implementationConfigClass in this case but the value-
ConfigClass table for AUROSAR 4.2.1 and newer versions.
5.5.1.2 Post-build selectable
EcucModuleDefinition
IEcucModuleDefinition is the interface of the module definition wrap-
per. It provides the following method(s):
supportsPostBuildVariance()
The supportsPostBuildVariance() method returns true if this module configuration supports
post-build selectable.
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the module definitions
supportedSupportedConfigurationVariants defined both, post-build loadable and selectable
support. With AUTOSAR 4.2.1 the supportedSupportedConfigurationVariants specifies
post-build loadable only and this method returns the value of the new postBuildVariantSup-
port flag.
EcucCommonAttributes
IEcucContainerDefinition is the interface of the container defini-
tion wrapper. It provides the following method(s):
supportsVariantMultiplicity()
The supportsVariantMultiplicity() method returns true if this container type supports
variant multiplicity. If true is returned this means that different variants may contain different
number of instances of this container type.
This method takes the multiplicity into account. So, if the container definition specifies the
multiplicity with lower == upper, it always returns false. Concerning post-build selectable it
never makes sense to permit variance if lower and upper multiplicity are equal.
This method is for post-build selectable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the container definitions
contained the postBuildChangeable flag to define post-build loadable support. This method
internally investigates the postBuildChangeable flag in this case but the postBuildVariant-
Multiplicity flag for AUROSAR 4.2.1 and newer versions.
supportsVariantShortname()
The supportsVariantShortname() method returns true if one of the following conditions
apply.
• supportsVariantMultiplicity() returns true
• The ADMIN-DATA flag postBuildSelectableChangeable is true
The use case for this specification are 1:1 containers. When this method returns true, 1:1
containers may have different shortnames in different variants. This is a Vector specific semantic
which is not provided by AUTOSAR.
EcucCommonAttributes
IEcucCommonAttributes is the base interface of all parameter and
reference definition wrappers. It provides the following method(s):
supportsVariantMultiplicity()
The supportsVariantMultiplicity() method returns true if this parameter type supports
© 2017, Vector Informatik GmbH
209 of 250


Chapter 5.
Data models in detail
variant multiplicity. If true is returned this means that different variants may contain different
number of instances of this parameter type.
This method takes the multiplicity into account. So, if the parameter definition specifies the
multiplicity with lower == upper, it always returns false. Concerning post-build selectable it
never makes sense to permit variance if lower and upper multiplicity are equal.
This method is for post-build selectable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the parameter definitions
contain the implementationConfigClass table to define post-build selectable support. This
method internally investigates the implementationConfigClass in this case but the post-
BuildVariantMultiplicity flag for AUROSAR 4.2.1 and newer versions.
supportsVariantValue()
The supportsVariantValue() method returns true if this parameter type supports a variant
value. If true is returned this means that different variants may contain different values in
instances of this parameter type.
This method is for post-build selectable only!
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the parameter definitions
contain the implementationConfigClass table to define post-build selectable support. This
method internally investigates the implementationConfigClass in this case but the post-
BuildVariantValue flag for AUROSAR 4.2.1 and newer versions.
5.5.2 EcuConfigurationAccess
The IEcuConfigurationAccess provides convenient and typesafe access to configuration ob-
jects (modules, containers, parameters and references). The contained cfg() methods take
MDF (ECU configuration) objects and return wrappers which can be used to retrieve specific
characteristics of the configuration content.
Example:
IEcuConfigurationAccess eca ;
MINumericalValue intParam ;
// Get the parameter wrapper
IEcucNumericalParameter numCfg = eca . cfg ( intParam );
// Check if this is an integer parameter
if ( numCfg i n s t a n c e o f I E c u c I n t e g e r P a r a m e t e r ) {
IEcucIntegerParameter intCfg = ( IEcucIntegerParameter ) numCfg ;
// Get the parameter value
b o o l e a n hasValue = intCfg . hasValue () ;
BigInteger value = intCfg . getValue ();
// Get the related definition wrapper
IEcucIntegerDefinition def = intCfg . getEcucDefinition ();
}
Listing 5.25: Integer parameter configuration access examples
© 2017, Vector Informatik GmbH
210 of 250


Chapter 5.
Data models in detail
5.5.2.1 Post-build loadable
EcucModuleConfiguration
IEcucModuleConfiguration is the base interface of all module
configuration wrappers. It provides the following method(s):
getConfigurationVariant()
The getConfigurationVariant() method returns the modules configuration variant.
This method never returns null. If the module has no value specified, this method returns a
default value as follows:
• EEcucConfigurationVariant.VARIANT_PRE_COMPILE, if it is contained in the supported
config variants of the related module definition
• otherwise EEcucConfigurationVariant.VARIANT_LINK_TIME, if it is contained in the
supported config variants of the related module definition
• otherwise EEcucConfigurationVariant.VARIANT_POST_BUILD_LOADABLE, if it is contai-
ned in the supported config variants of the related module definition
• otherwise EEcucConfigurationVariant.VARIANT_PRE_COMPILE, even if not contained in
the supported config variants of the related module definition or if the definition is not
available
Remark about AUTOSAR versions: Prior to AUTOSAR 4.2.1 the module configurations
implementation config variant defined if this module implements post-build loadable and/or
selectable. With AUTOSAR 4.2.1 the implementation config variant defines only if the module
implements post-build loadable.
The post-build selectable aspect has been separated from
this definition. This method handles the loadable semantic, independent of the AUTOSAR
version.
This is for post-build loadable only!
setConfigurationVariant()
The setConfigurationVariant(EEcucConfigurationVariant) method sets the specified im-
plementation configuration variant.
This is for post-build loadable only!
Supported values are
• EEcucConfigurationVariant.VARIANT_PRE_COMPILE
• EEcucConfigurationVariant.VARIANT_LINK_TIME
• EEcucConfigurationVariant.VARIANT_POST_BUILD_LOADABLE
Remarks concerning AUTOSAR versions:
• If the modules definition has schema version 4.2.1 or higher, the specified value is being
written directly to the model
• If the modules definition has a schema version lower than 4.2.1, the modules imple-
mentation configuration variant in the MDF model encodes both, post-build loadable
and post-build selectable.
The following behavior is being implemented in this case:
© 2017, Vector Informatik GmbH
211 of 250


Chapter 5.
Data models in detail
Current model value
Parameter
Result in the model
PRE_COMPILE
PRE_COMPILE
PRE_COMPILE
LINK_TIME
LINK_TIME
POST_BUILD_LOADABLE
POST_BUILD_LOADABLE
LINK_TIME
PRE_COMPILE
PRE_COMPILE
LINK_TIME
LINK_TIME
POST_BUILD_LOADABLE
POST_BUILD_LOADABLE
POST_BUILD_LOADABLE
PRE_COMPILE
PRE_COMPILE
LINK_TIME
LINK_TIME
POST_BUILD_LOADABLE
POST_BUILD_LOADABLE
POST_BUILD_SELECTABLE
PRE_COMPILE
POST_BUILD_SELECTABLE
LINK_TIME
POST_BUILD_SELECTABLE
POST_BUILD_LOADABLE
POST_BUILD
POST_BUILD
PRE_COMPILE
POST_BUILD_SELECTABLE
LINK_TIME
POST_BUILD_SELECTABLE
POST_BUILD_LOADABLE
POST_BUILD
EcucContainer
IEcucContainer is the base interface of all container wrappers. It provides
the following method(s):
getEffectiveMultiplicityConfigurationClass()
The getEffectiveMultiplicityConfigurationClass() method walks up the model tree to
find the related module configuration. Then it uses the module implementation configuration
variant to return the selected configuration class as specified in the container definition.
This method never returns null. In case the detection of the configuration class fails (e.g. if the
related module configuration cannot be detected), this method returns EEcucConfiguration-
Class.PRE_COMPILE by default. It also never returns EEcucConfigurationClass.LINK.
This method is for post-build loadable only!
getEffectiveMultiplicityConfigurationClassDefRef()
The getEffectiveMultiplicityConfigurationClass(DefRef) method walks up the model
tree to find the related module configuration. Then it uses the module implementation con-
figuration variant to return the selected configuration class of the specified parameter defini-
tion.
This method never returns null. In case the detection of the configuration class fails (e.g. if the
related module configuration cannot be detected), this method returns EEcucConfiguration-
Class.PRE_COMPILE by default. It also never returns EEcucConfigurationClass.LINK.
This method is for post-build loadable only!
getEffectiveValueConfigurationClass()
The getEffectiveValueConfigurationClass(DefRef) method walks up the model tree to
find the related module configuration. Then it uses the module implementation configuration
variant to return the selected configuration class of the specified parameter definition.
This method never returns null. In case the detection of the configuration class fails (e.g. if the
related module configuration cannot be detected), this method returns EEcucConfiguration-
Class.PRE_COMPILE by default. It also never returns EEcucConfigurationClass.LINK.
This method is for post-build loadable only!
EcucParameter
IEcucParameter is the base interface of all parameter and reference wrappers.
It provides the following method(s):
getEffectiveMultiplicityConfigurationClass()
The getEffectiveMultiplicityConfigurationClass() method walks up the model tree to
© 2017, Vector Informatik GmbH
212 of 250


Chapter 5.
Data models in detail
find the related module configuration. Then it uses the module implementation configuration
variant to return the selected configuration class as specified in the parameter definition.
This method never returns null. In case the detection of the configuration class fails (e.g. if
the related module configuration cannot be detected), this method returns EEcucConfigura-
tionClass.PRE_COMPILE by default.
This is for post-build loadable only!
getEffectiveValueConfigurationClass()
The getEffectiveValueConfigurationClass() method walks up the model tree to find the
related module configuration. Then it uses the module implementation configuration variant to
return the selected configuration class as specified in the parameter definition.
This method never returns null. In case the detection of the configuration class fails (e.g. if
the related module configuration cannot be detected), this method returns EEcucConfigura-
tionClass.PRE_COMPILE by default.
This is for post-build loadable only!
5.5.2.2 Post-build selectable
EcucModuleConfiguration
IEcucModuleConfiguration is the base interface of all module
configuration wrappers. It provides the following method(s):
supportsPostBuildVariance()
The supportsPostBuildVariance() method returns true if this module configuration supports
post-build selectable.
This is for post-build selectable only!
What this method actually does:
• It checks if the related definition specifies post-build selectable as supported
• It checks if the module configuration implements post-build variance. That’s true in the
following cases
– If the modules definition has schema version 4.2.1 or higher: Check if the modules
ADMIN-DATA flag "postBuildVariantSupport" is true (false is default if this flag is
missing)
– If the modules definition has a schema version lower than 4.2.1: Check if the modu-
les implementation configuration variant contains one of the following values VARI-
ANT_POST_BUILD_SELECTABLE or VARIANT_POST_BUILD
It returns true if both conditions are true.
setPostBuildVarianceSupport()
The setPostBuildVarianceSupport(boolean) method sets the post-build support flag in the
module configuration.
This is for post-build selectable only!
Remarks concerning AUTOSAR versions:
• If the modules definition has schema version 4.2.1 or higher, this method sets the modules
ADMIN-DATA flag "postBuildVariantSupport" to the specified value.
© 2017, Vector Informatik GmbH
213 of 250


Chapter 5.
Data models in detail
• If the modules definition has a schema version lower than 4.2.1, the modules imple-
mentation configuration variant in the MDF model encodes both, post-build loadable
and post-build selectable.
The following behavior is being implemented in this case:
Current model value
Parameter
Result in the model
PRE_COMPILE
true
POST_BUILD_SELECTABLE
false
PRE_COMPILE
LINK_TIME
true
POST_BUILD_SELECTABLE
false
LINK_TIME
POST_BUILD_LOADABLE
true
POST_BUILD
false
POST_BUILD_LOADABLE
POST_BUILD_SELECTABLE
true
POST_BUILD_SELECTABLE
false
PRE_COMPILE
POST_BUILD
true
POST_BUILD
false
POST_BUILD_LOADABLE
EcucContainer
IEcucContainer is the base interface of all container wrappers. It provides
the following method(s):
supportsVariantMultiplicity()
The supportsVariantMultiplicity() method returns true if the related module configura-
tion supports variance and this containers definition support variant multiplicity. If true is
returned this means that different variants may contain different number of instances of this
container.
If the container has no definition, this method returns false.
This method is for post-build selectable only!
EcucParameter
IEcucParameter is the base interface of all parameter and reference wrappers.
It provides the following method(s):
supportsVariantMultiplicity()
The supportsVariantMultiplicity() method returns true if the related module configura-
tion supports variance and this parameters definition support variant multiplicity. If true is
returned this means that different variants may contain different number of instances of this
parameter.
If the parameter has no definition, this method returns false.
This is for post-build selectable only!
supportsVariantValue()
The supportsVariantValue() method returns true if the related module configuration sup-
ports variance and this parameters definition support variant values. If true is returned this
means that different variants may contain different values in instances of this parameter.
If the parameter has no definition, this method returns false.
This is for post-build selectable only!
© 2017, Vector Informatik GmbH
214 of 250

6 AutomationInterface Content
6.1 Introduction
This chapter describes the content of the DaVinci Configurator AutomationInterface.
6.2 Folder Structure
The AutomationInterface consists of the following files and folders:
• BswmdModel: contains the generated BswmdModel that is automatically created by
the DaVinci Configurator during startup
• Core
– AutomationInterface
∗ _doc (find more details to its content in chapter 6.3)
· DVCfg_AutomationInterfaceDocumentation.pdf: this document
· javadoc: Javadoc HTML pages
· templates: script file and script project templates for a simple start of
script development
∗ buildLibs: AutomationInterface Gradle Plugin to provide the build logic to
build script projects, see also 7.7 on page 221
∗ libs: compile bindings to Groovy and to the DaVinci Configurator Automati-
onInterface, used by IntelliJ IDEA and Gradle
∗ licenses: the licenses of the used open source libraries
6.3 Script Development Help
The help for the AutomationInterface script development is distributed among the following
sources:
• DVCfg_AutomationInterfaceDocumentation.pdf (this document)
• Javadoc HTML Pages
• Script Templates
6.3.1 DVCfg_AutomationInterfaceDocumentation.pdf
You find this document as described in chapter 6.2. It provides a good overview of architecture,
available APIs and gives an introduction of how to get started in script development. The focus
of the document is to provide an overview and not to be complete in API description. To get
a complete and detailed description of APIs and methods use the Javadoc HTML Pages as
described in 6.3.2 on the next page.
© 2017, Vector Informatik GmbH
215 of 250


Chapter 6.
AutomationInterface Content
6.3.2 Javadoc HTML Pages
You find this documentation as described in chapter 6.2 on the preceding page. Open the file
index.html to access the complete DaVinci Configurator AutomationInterface API reference. It
contains descriptions of all classes and methods that are part of the AutomationInterface.
The Javadoc is also accessible at your source code in the IDE for script development.
6.3.3 Script Templates
You find the Script Templates as described in chapter 6.2 on the previous page. You may copy
them for a quick startup in script development.
6.4 Libs and BuildLibs
The AutomationInterface contains libraries to build projects, see buildLibs in 6.2 on the pre-
ceding page 
. And it contains other libraries which are described in libs in 6.2 on the previous
page.

© 2017, Vector Informatik GmbH
216 of 250

7 Automation Script Project
7.1 Introduction
An automation script project is a normal Java/Groovy development project, where the built
artifact is a single jar file. The jar file is created by the build system, see chapter 7.7 on
page 221.

It is the recommended way to develop scripts, containing more tasks or multiple classes.
The project provides IDE support for:
• Code completion
• Syntax highlighting
• API Documentation
• Debug support
• Build support
The recommended IDE is IntelliJ IDEA.
7.2 Automation Script Project Creation
To create a new script project please follow the instructions in chapter 2.4 on page 12.
7.3 Project File Content
An automation project will at least contain the following files and folders:
• Folders
– .gradle - Gradle temp folder - DO NOT commit it into a version control system
– build - Gradle build folder - DO NOT commit it into a version control system
– gradle - Gradle bootstrap folder - Please commit it into your version control system
– src - Source folder containing your Groovy, Java sources and resource files
• Files
– Gradle files - see 7.7.2 on page 222 for details
∗ gradlew.bat
∗ build.gradle
∗ settings.gradle
∗ projectConfig.gradle
∗ dvCfgAutomationBootstrap.gradle
© 2017, Vector Informatik GmbH
217 of 250




Chapter 7.
Automation Script Project
– IntelliJ Project files (optional) - DO NOT commit it into a version control system
∗ ProjectName.iws
∗ ProjectName.iml
∗ ProjectName.ipr
The IntelliJ Project files (*.iws, *.iml, *.ipr) can be recreated with the command in the
windows command shell (cmd.exe): gradlew idea
7.4 IntelliJ IDEA Usage
7.4.1 Supported versions
The supported IntelliJ IDEA versions are:
• 2016.1
• 2016.2
• 2016.3
Please use one of the versions above. With other versions, there could be problems with the
editing, code completion and so on.
The free Community edition is fully sufficient, but you could also use the Ultimate edi-
tion
.
7.4.2 Building Projects
Project Build
The standard way to build projects is to choose the option <ProjectName>
[build] in the Run Menu in the toolbar and to press the Run Button beneath that menu.
Figure 7.1: Project Build
Project Continuous Build
A further option is provided for the case you prefer an automatic
project building each time you save your implementation.
If you choose the menu option
<ProjectName> continuous [build] in the toolbar the Run Button has to be pressed only
one time to start the continuous building. Hence forward each saving of your implementation
triggers an automatic building of the script project.
But be aware that the continuous build option is available for .java and .groovy
files only. 
In case of changes in e.g. .gradle files you still have to press the Run Button in
order to build the project.
Figure 7.2: Project Continuous Build
The Continuous Build process can be stopped with the Stop Button in the Run View.
© 2017, Vector Informatik GmbH
218 of 250





Chapter 7.
Automation Script Project
Figure 7.3: Stop Continuous Build
If you want to exit the IntelliJ IDEA while the Continuous Build process is still running, you
will be asked to disconnect from it. Having disconnected you are allowed to exit the IDE.
Figure 7.4: Disconnect from Continuous Build Process
7.4.3 Debugging with IntelliJ
Be aware that only script projects and not script files are debuggable.
To enable debugging you must start DaVinci Configurator application with the enableDebugger
option as described in 7.6 on page 221.
In the IntelliJ IDEA choose the option <ProjectName> [debug] in the Run Menu located
in the toolbar. Pressing the Debug Button starts a debug session.
Figure 7.5: Project Debug
Set your breakpoints in IntelliJ IDEA and execute the task. To stop the debug session press
the Stop Button in the Debugger View.
© 2017, Vector Informatik GmbH
219 of 250




Chapter 7.
Automation Script Project
Figure 7.6: Stop Debug Session
If you want to exit the IntelliJ IDEA while the Debug process is still running, you will be asked
to disconnect from it. Having disconnected you are allowed to exit the IDE.
Figure 7.7: Disconnect from Debug Process
7.4.4 Troubleshooting
Code completion, Compilation
If the code completion or compilation does not work, please
verify that the Java JDK settings in the IntelliJ IDEA are correct. You have to set the Project
JDK and the Gradle JDK setting. See 2.4.3 on page 15.
Gradle build, build button
If the Gradle build does nothing after start or the build button is
grayed, please verify that the Java JDK settings in the IntelliJ IDEA are correct. You have to
set the Gradle JDK setting. See 2.4.3 on page 15.
If the build button is marked with an error, please make sure that the Gradle plugin inside of
IntelliJ IDEA is installed. Open File->Settings...->Plugins and select the Gradle plugin.
IntelliJ Build
You shall not use the IntelliJ menu "Build" or the context menu entries "Make
Project", "Make Module", "Rebuild Project" or "Compile". The project shall be build with
Gradle not with IntelliJ IDEA. So you have to select one of the Run Configuration (Run menu)
to build the project as described in chapter 7.4 on page 218.
Groovy SDK not configured
If you get the message ’Groovy SDK is not configured for ...’
in IntelliJ IDEA you probably have to migrate your project as described in chapter 7.5 on the
next page.

Debugging - DaVinci Configurator does not start
If the DaVinciCfg.exe does not start when
the enableDebugger option is passed, please check if the default port (8000) is free, or choose
another free port by appending the port number to the enableDebugger option.
Compile errors - Could not find com.vector.cfg:DVCfgAutomationInterface
If you get com-
pile errors inside of the IntelliJ IDEA, after updating the DaVinci Configurator or moving
projects.
Please execute the Project Migration to newer DaVinci Configurator Version step,
see 7.5 on the following page.
© 2017, Vector Informatik GmbH
220 of 250


Chapter 7.
Automation Script Project
7.5 Project Migration to newer DaVinci Configurator Version
If you update your DaVinci Configurator version in your SIP, it could be necessary to execute
the IntelliJ IDEA task of Gradle to update your compile dependencies.
Steps to execute:
1. Close IntelliJ IDEA.
2. Update the DaVinci Configurator in your SIP
3. Open a command shell (cmd.exe) at your project folder
• Folder containing the gradlew.bat
4. Type gradlew idea and press enter
5. Wait until the task has finished
6. Open IntelliJ IDEA
This will update the compile time dependencies of your Automation Script Project according
to the new DaVinci Configurator version.
After this, please read the Changes (see chapter 8 on page 227) in the new release and update
your script, if something of interest has changed.
7.6 Debugging Script Project
Be aware that only script projects and not script files are debuggable.
To debug a script project, any java debugger could be used. Simply add the enableDebugger
parameter to the commandline of the DaVinci Configurator and attach your debugger.
DVCfgCmd -s MyApplScriptTask --enableDebugger
You could attach a debugger at port 8000 (default). If the DaVinci Configurator does not start
with the option, please see 7.4.4 on the preceding page.
Different Debug Port
DVCfgCmd -s MyApplScriptTask --enableDebugger <YOUR-PORT> --waitForDebugger
Example:
DVCfgCmd -s MyApplScriptTask --enableDebugger 12345 --waitForDebugger
You could attach a debugger at port 12345 (select any free port) and the DVCfgCmd process will
wait until the debugger is attached. You could also use these commandline parameters with
the DaVinciCFG.exe to debug a script project with the DaVinci Configurator UI.
7.7 Build System
The build system uses Gradle1 to build a single Jar file. It also setups the dependencies to the
DaVinci Configurator and create the IntelliJ IDEA project.
1http://gradle.org/ [2016-05-25]
© 2017, Vector Informatik GmbH
221 of 250


Chapter 7.
Automation Script Project
To setup the Gradle installation, see chapter 2.4.4 on page 15.
7.7.1 Jar Creation and Output Location
The call to gradlew build in the root directory of your automation script project will create
the jar file. The jar file is then located in:
• <ProjectRoot>\build\libs\<ProjectName>-<ProjectVersion>.jar
7.7.2 Gradle File Structure
The default automation project contains the following Gradle build files:
• gradlew.bat
– Gradle batch file to start Gradle (Gradle Wrapper2)
• build.gradle
– General build file - You can modify it to adapt the build to your needs
• settings.gradle
– General build project settings - See Gradle documentation3
• projectConfig.gradle
– Contains automation project specific settings - You can modify it to adapt the build
to your needs
• dvCfgAutomationBootstrap.gradle
– This is the internal bootstrap file. DO NOT change the file content.
7.7.2.1 projectConfig.gradle File settings
The file contains two essential parts of the build:
• Names of the scripts to load (automationClasses)
• The path to the DaVinci Configurator installation (dvCfgInstallation)
• Project version (version)
automationClasses
You have to add your classes to the list of automationClasses to
make them loadable.
The syntax of automationClasses is a list of Strings, of all classes as full qualified Class
names.
Syntax: "javaPkg.subPkg.ClassName"
2https://docs.gradle.org/current/userguide/gradle_wrapper.html [2016-05-25]
3https://docs.gradle.org/current/dsl/org.gradle.api.initialization.Settings.html [2016-05-25]
© 2017, Vector Informatik GmbH
222 of 250


Chapter 7.
Automation Script Project
// The property project . ext . automationClasses defines the classes to load
project . ext . automationClasses = [
" sample . MyScript ",
" otherPkg . MyOtherScript ",
" javapkg . ClassName "
]
Listing 7.1: The automationClasses list in projectConfig.gradle
dvCfgInstallation
The dvCfgInstallation defines the path to the DaVinci Configurator in-
stallation in your SIP. The installation is needed to retrieve the build dependencies and the
generated model.
You can change the path to any location containing the correct version of the DaVinci Confi-
gurator.
// Please specify the path to your DaVinci Configurator installation
project . ext . dvCfgInstallation = new File ("<PATH -TO - DaVinciConfiguratorFolder >")
Listing 7.2: The dvCfgInstallation in projectConfig.gradle
You could also evaluate SystemEnv variables, other project properties or Gradle settings to
define the path dependent of the development machine, instead of encoding an absolute path.
This will help, when the project is committed to a version control system. But this is project
dependent and out of scope of the provided template project.
// Use a System environment variable as path to the DaVinci Configurator
project . ext . dvCfgInstallation = new File ( System . getenv (' YOUR_ENV_VARIABLE '))
Listing 7.3: The dvCfgInstallation with an System env in projectConfig.gradle
version
The project.version defines the version of your Automation project, e.g. defines
the version suffix of the jar file.
7.7.3 Advanced Build Topics
7.7.3.1 Usage of external Libraries (Jars) in the AutomationProject
You could reference external libraries (Jar files) in your AutomationProject. But you have to
configure the libraries in the Gradle build files. DO NOT add a dependency in IntelliJ, this
will not work.
The easiest and prefered way is the use a library from any Maven repository like MavenCentral
or JCenter. This will also handle versions, and transitive dependencies automatically.
Otherwise you could download the jar file an place it in your project4, but this is NOT recom-
mended.
The referenced libraries will be automatically bundled into your Automation project, see chapter
includeDependenciesIntoJarfor details.
4See Gradle online documentation, how to add local jar files to the build dependencies
© 2017, Vector Informatik GmbH
223 of 250


Chapter 7.
Automation Script Project
How to add a Library?
We assume we have a jar from a Maven repository like Apache Commons
IO (the identifier would be ’commons-io:commons-io:2.5’, See MavenCentral).
• Open your build.gradle
• Add the code for the dependency
dependencies {
// Change the identifier to your library to use
compile 'commons -io: commons -io :2.5 '
// You could add multiple libraries with additional compile lines
}
• Optional: if you are behind a proxy or firewall:
– You must either set proxy options for gradle 5
– Prefered way: use a Maven repository inside your network: To set a repository,
add before the dependencies block:
repositories {
// URL to your repository . The URL below is the Vector internal network
server .
// Please change the URL to your server
maven { url 'http :// vistrcfgci1 .vi. vector . int / artifactory / all ' }
// Or reference MavenCentral server
mavenCentral ()
}
• Update the IntelliJ IDEA project
1. Close IntelliJ IDEA.
2. Open a command shell (cmd.exe) at your project folder
– Folder containing the gradlew.bat
3. Type gradlew idea and press enter
4. Wait until the task has finished
5. Open IntelliJ IDEA
Now your project has access to the specified library.
7.7.3.2 Static Compilation of Groovy Code
The AutomationInterface contains a Groovy compiler extension. This allows you to use Auto-
mation API in static compiled Groovy code.
You have to mark your classes or methods with:
5Gradle and Java online documentation for details how to set proxy settings
© 2017, Vector Informatik GmbH
224 of 250


Chapter 7.
Automation Script Project
@CompileStatic ( extensions = 'com . vector . cfg . groovy . extensions .
AutomationTypeChecking ')
def myMethod () {
}
@CompileStatic ( extensions = 'com . vector . cfg . groovy . extensions .
AutomationTypeChecking ')
c l a s s MyClass {
}
Listing 7.4: @CompileStatic with Automation API
The same applies, if you want to use the @TypeChecked annotation:
@TypeChecked ( extensions = 'com . vector . cfg . groovy . extensions .
AutomationTypeChecking ')
def myMethod () {
}
Listing 7.5: @TypeChecked with Automation API
7.7.3.3 Gradle dvCfgAutomation API Reference
The DaVinci Configurator build system provides a Gradle DSL API to set properties of the
build. The entry point is the keyword dvCfgAutomation
dvCfgAutomation {
classes project . ext . automationClasses
}
Listing 7.6: DaVinci Configurator build Gradle DSL API
The following methods are defined inside of the dvCfgAutomation block:
• classes (Type List<String>) - Defines the automation classes to load
• useBswmdModel (Type boolean) - Enables or disables the usage of the BswmdModel inside
of the script project.
• useJarSignerDaemon (Type boolean) - Enables or disables the usage of the Jar Signer
Daemon process.
• includeDependenciesIntoJar (Type boolean) - Enables or disables the inclusion of
dependencies during build
useBswmdModel
The useBswmdModel enables or disables the usage of the BswmdModel in-
side of the project.
This is helpful, if you want to create a project, which shall run with
different SIPs. This prevent the inclusion of the BswmdModel. The default is true (Use the
BswmdModel) if nothing is specified.
dvCfgAutomation {
useBswmdModel false
}
Listing 7.7: DaVinci Configurator build Gradle DSL API - useBswmdModel
© 2017, Vector Informatik GmbH
225 of 250


Chapter 7.
Automation Script Project
useJarSignerDaemon
The useJarSignerDaemon enables or disables the usage of the usage of
the Jar Signer Daemon process. The process is spawned when a jar file shall be signed. This
will speedup the build process especially when thr project is built often. The daemon is closed
automatically, when not used in a certain time span.
The default of useJarSignerDaemon is true.
The Gradle task stopJarSignerDaemon will stop any running Signer daemon.
dvCfgAutomation {
useJarSignerDaemon true
}
Listing 7.8: DaVinci Configurator build Gradle DSL API - useJarSignerDaemon
includeDependenciesIntoJar
The includeDependenciesIntoJar enables or disables bund-
ling of gradle runtime dependencies (e.g. referenced jar files) into the resulting project jar. If
includeDependenciesIntoJar is enabled the project jar file will contain all jar dependencies
under the folder jars inside of the jar file.
The default of includeDependenciesIntoJar is true.
dvCfgAutomation {
includeDependenciesIntoJar false
}
Listing 7.9: DaVinci Configurator build Gradle DSL API - includeDependenciesIntoJar
© 2017, Vector Informatik GmbH
226 of 250

8 AutomationInterface Changes between
Versions
This chapter describes the supported functionality of different versions and all API changes
between different MICROSAR releases.
8.1 Currently Supported Features
The table below contains a list of functionalities of the DaVinci Configurator Automation
Interface.
Legend: A functionality is available if the Since column contains the DaVinci Configurator
version (see Since). Otherwise the functionality is not yet available.
Component
Functionality
Since
Scripts
Loading, Execution, Script-Projects
5.13
User defined Script Task Arguments in UI and Cmd
5.14 SP1
Stateful Script Tasks
5.14
Project
Open, modify, save and close project
5.13
Accessing the active UI project
5.13
Create a new project
5.13
Access to project settings
Open ARXML files as Project without DPA
5.14
Switch configuation phase (Post-build loadable)
Model
Access to the whole AUTOSAR model (EcuC and System-
5.13
Desc)
Transaction support (Undo, Redo)
5.13
Type save access to ECU model using definitions provided by
5.13
the generated BswmdModel
Post-build selectable support
5.13
Access of variants, Access/Modification of variant data
5.13
Post-build loadable support
5.13
CE-States: UserDefined, Changeable, Deletable
5.13
Consideration of pre-configuration status
5.13
Access and modification of User Annotations at the configura-
5.15
tion element
Generation
Generate code for specific modules
5.13
Generate code for predefined code generation sequence
5.13
Execute external generation steps
5.13
Custom workflow execution
Modify code generation sequence to enable/disable specific mo-
5.13
dules or generation steps
SWC Templates and Contract Headers Generation
5.15
Add a ScriptTask as external generation step
5.13
Add a ScriptTask as custom workflow step
5.14
Validation
Access to project validation result
5.13
Access to validation results of specific model elements
5.13
© 2017, Vector Informatik GmbH
227 of 250


Chapter 8.
AutomationInterface Changes between Versions
Solve valdiation results (by group, by id, by solving action type
5.13
(preferred solving action))
Update Work-
Updating a project
5.13
flow
Input file access and modification (non-variant)
5.13
Input file access and modification (variant)
5.15
Configuration of system description merge
Access to update report
Reporting
Create predefined project reports
Create report based on specific CE set
Diff and Merge
Diff and Merge a Project (ActiveEcuC)
Diff and Merge a Project (SystemDescription)
Access to diff report
Persistency
Export of configuration artefacts
5.14
Export of ActiveEcuc
5.14
Export of Post-build selectable Variants per Variant
5.14
Export of AUTOSAR model trees
5.15
Export of Module Configurations
Import of configuration artefacts (Please inform Vector, if you
need an import)
Import of Module Configurations
Domains
Base
Nothing planned
Communication
Access and modification of Can controller configuration
5.13
Access and modification of Can filter masks
5.13
Access and modification of CanBusTimings registers
Access and modification of FullCan flag of PDUs
PDU and Channel abstraction
Diagnostic
Access and modification of Diagnostic Data Identifier
Access and modification of Diagnostic Event Data
5.14
Access and modification of Diagnostic Events
5.14
Setup of event memory blocks
Access and modification of Production error handling
I/O
Nothing planned
Memory
Memory Domain Model Partitions, Memory blocks
FeeOptimization
Mode Manage-
BSW Management
5.15
ment
API to provide the auto configuration (e.g. ECU state, module
5.15
initialization, communication control, ...)
API to configure logical expressions
API for custom configuration
Watchdogs: Access to the watchdogs settings and supervised
entities
Initialization: Auto initialization and reset, Access to driver
init lists
Runtime
Sy-
Component Port Connection
5.14
stem
Data Mapping
5.14
Task Mapping
Component prototype creation
© 2017, Vector Informatik GmbH
228 of 250


Chapter 8.
AutomationInterface Changes between Versions
Communication
Nothing planned
Control
© 2017, Vector Informatik GmbH
229 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.2 Changes in MICROSAR AR4-R18 - Cfg5.15
8.2.1 General
The Cfg5.15 (AR4-R18) automation interface is mostly compatible to the Cfg5.14. So a script
written with Cfg5.14 will also run in the Cfg5.15 version.
8.2.2 Automation Script Project
You have to migrate your project to the new compile bindings. Please execute the instructions
in chapter 7.5 on page 221.
8.2.2.1 Supported IntelliJ IDEA Version
The IntelliJ IDEA version 2016.3 was added to the supported versions. See 7.4.1 on page 218
for details.
8.2.2.2 BuildSystem
Groovy - Static compilation
The AutomationInterface Groovy compiler extension added.
This allows you to use Automation API in static compiled Groovy code.
See 7.7.3.2 on
page 224.
includeDependenciesIntoJar
The includeDependenciesIntoJar Gradle build setting added.
See 7.7.3.3 on page 225 for details. The Gradle build will now automatically include jar depen-
dencies into your project jar.
8.2.3 Script Execution
8.2.3.1 User defined arguments
The ScriptTask user defined arguments now support validators to validate the input before
executing the task, like checking if the file exists. This provides fast user feedback. See 4.4.9.1
on page 47 
for details.
8.2.4 Project Handling
New API added to create empty raw AUTOSAR model projects, see chapter 4.5.6.1 on page 65
for details.
8.2.5 Project Creation vVIRTUALtarget settings
New API added to customize vVIRTUALtarget project and executable settings for project
creation. See chapter 4.5.3.7 on page 60 for details.
© 2017, Vector Informatik GmbH
230 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.2.6 Model changes
These changes could break your existing client code, if you have used these interfaces or met-
hods.
• Some interfaces have been renamed or moved:
– Interface MIMcFunctionDataRefSet moved
∗ from package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport
to package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport.rptsupport
– Interface MIMcFunctionDataRefSetConditional moved
∗ from package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport
to package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport.rptsupport
– Interface MIMcFunctionDataRefSetContent moved
∗ from package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport
to package com.vector.cfg.model.mdf.ar4x.commonstructure.
measurementcalibrationsupport.rptsupport
– Interface MIFt moved
∗ from package com.vector.cfg.model.mdf.model.autosar.commonpatterns.
textmodel.languagedatamodel.specializedloverviewparagraph
to package com.vector.cfg.model.mdf.model.autosar.commonpatterns.
textmodel.singlelanguagedata.specializedsloverviewparagraph
– Interface MIFt moved
∗ from package com.vector.cfg.model.mdf.model.autosar.commonpatterns.
textmodel.languagedatamodel.specializedlparagraph
to package com.vector.cfg.model.mdf.model.autosar.commonpatterns.
textmodel.singlelanguagedata.specializedslparagraph
• Some methods have been changed or removed:
– Interface com.vector.cfg.model.mdf.ar4x.diagnosticextract.dcm.
diagnosticservice.databyidentifier.MIDiagnosticDataByIdentifier
∗ MIDiagnosticDataIdentifierARRef getDataIdentifier()
changed to
MIDiagnosticAbstractDataIdentifierARRef getDataIdentifier()
∗ void setDataIdentifier(MIDiagnosticDataIdentifierARRef)
changed to
void setDataIdentifier(MIDiagnosticAbstractDataIdentifierARRef)
– Some ...Owner() methods were removed. The usage of these methods is not recom-
mended. Instead use the MIObject.miImmediateComposite() method.
© 2017, Vector Informatik GmbH
231 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.2.7 Model Automation API
8.2.7.1 IVarianceApi
New method IVarianceApi.getAllVariantViewsOrInvariant() added.
8.2.7.2 Access methods
New access methods for the EcuConfigurationAccess and EcucDefinitionAccess added.
See
chapter 4.6.4.10 on page 89 for details.
New MDF access method added mdfModel(String). This method tries to resolve a model
element by testing multiple ways. See chapter 4.6.4.2 on page 81 details.
8.2.7.3 Reverse Reference Resolution - ReferencesPointingToMe
New methods to query references starting from reference targets added. See chapter 4.6.4.11
on page 90 
for details.
8.2.7.4 Operations
New method setConfigurationVariantOfAllModuleConfigurations() added to IOperati-
ons class. See chapter 4.6.6.2 on page 97 for details.
New method createUniqueMappedAutosarPackage() added to IOperations class. See chap-
ter 4.6.6.2 on page 97 for details.
8.2.7.5 User Annotations
New API to access and modify User Annotations was added. See chapter 4.6.9.1 on page 102
for details.
8.2.7.6 Variance
New method variance.variantView(String name) added to retrieve a variant view by name.
8.2.7.7 Model Synchronization
New API added to execution the new Model Synchronization operation. See chapter 4.6.7 on
page 98 
for details.
8.2.8 Persistency
New Persistency model exporter added exportModelTree(). See chapter 4.11 on page 162 for
details.
© 2017, Vector Informatik GmbH
232 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.2.9 Workflow
New workflow API added to configure settings with updateSettings{}:
• Select the update mode (ECUC_ONLY, ECUC_AND_DEVELOPER_WORKSPACE)
• Parameter uuidUsageInStandardConfigurationEnabled
• Parameter uuidUsageInSystemDescriptionEnabled
8.2.10 Validation
8.2.10.1 Validation-Result Access Methods
New two new methods added to retrieve validation by model object in a recursive manner like
the editors.
• MIObject.getValidationResultsRecursive()
• IViewedModelObject.getValidationResultsRecursive()
8.2.11 Generation
8.2.11.1 SWC Templates and Contract Headers Generation
The SWC Templates and Contract Headers Generation (Swct) automation API was added, see
chapter 4.7.3 on page 111 for details.
8.2.12 BswmdModel
8.2.12.1 BswmdModel Groovy
Two new methods added to access the BswmdModel by MDF model objects in a generic way,
without knowing a DefRef. This is handy, if you want traverse an unknown Ecu configuration
structure.
• GIContainer bswmdModel(MIContainer)
• GIModuleConfiguration bswmdModel(MIModuleConfiguration) Both methods return
the base bswmd model types for the corresponding MDF model objects.
New methods added to access BswmdModel elements by path and or by Type:
• List bswmdModel(Class)
• List bswmdModel(Class, Closure)
• List bswmdModel(Class, String)
• List bswmdModel(Class, String, Closure)
© 2017, Vector Informatik GmbH
233 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.2.12.2 DerivativeMapping
Until R17 modules with DerivativeMapping were ignored from the DaVinciConfigurator and no
BswmdModel classes were generated for these modules. Just the corresponding AsrXxx (e.g.
AsrOs) model classes were included in the BswmdModel. Now the BswmdModel classes for
these modules are generated for one certain derivative.
By default, the first derivative is selected, sorted by UUID. The AsrXxx usages have to be
replaced by the actual module in the scripts. See 5.3.2.1 on page 199 for more details.
8.2.13 Mode Management Domain
Introduced BswM auto configuration API for automatically creating dedicated parts of the
BswM configuration. See chapter 4.10.3.1 on page 137 for details.
8.2.14 Runtime System Domain
8.2.14.1 Data Mapping
’autoMapTo’ allows control now about the handling of nested arrays of primitive. See 4.10.4.2
on page 153 
and 4.10.4.2 on page 159.
© 2017, Vector Informatik GmbH
234 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.3 Changes in MICROSAR AR4-R17 - Cfg5.14
8.3.1 General
This is the first stable version of the DaVinci Configurator AutomationInterface.
8.3.2 Script Execution
8.3.2.1 Stateful Script Tasks
A new API was added to support cache and retrieve data over multiple script task executions.
See 4.4.10 on page 50 for more details.
8.3.3 Automation Script Project
You have to migrate your project to the new compile bindings. Please execute the instructions
in chapter 7.5 on page 221.
8.3.3.1 Groovy
The used Groovy version was updated from 2.4.5 to 2.4.7, please see Groovy website for de-
tails.
8.3.3.2 Supported IntelliJ IDEA Version
The IntelliJ IDEA version 2016.2 was added to the supported versions. See 7.4.1 on page 218
for details.
8.3.3.3 BuildSystem
Gradle
The used default Gradle version was updated from 2.13 to 3.0, please see Gradle
website for details.
useJarSignDaemon
The useJarSignDaemon Gradle build setting added. See 7.7.3.3 on page 225
for details.
8.3.4 Converter Refactoring
The converters previously provided by com.vector.cfg.automation.api.Converters have
been moved to the new com.vector.cfg.automation.scripting.api.ScriptConverters and
com.vector.cfg.model.groovy.api.ModelConverters.
8.3.5 UserInteraction
UserInteraction API added to show messages to the user, see 4.4.5.1 on page 40.
© 2017, Vector Informatik GmbH
235 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.3.6 Project Load
8.3.6.1 AUTOSAR Arxml Files
New API added to open AUTOSAR arxml files as a temporary project. See chapter 4.5.6 on
page 64 
for details.
8.3.7 Model
Script Tasks Types
The existing script task type DV_MODULE_ACTIVATION renamed to the new
name DV_ON_MODULE_ACTIVATION.
A new DV_ON_MODULE_DEACTIVATION task type added, which is execution when a module con-
figuration is deleted.
8.3.7.1 Transactions
A new ITransactionsApi added which provide access to the transactionHistory and API to re-
trieve information of running transactions. A new method transactions.isTransactionRunning()
added.
The ITransactionHistoryApiwas moved to the new ITransactionsApi. The access to the
history is now transactions.transactionHistory{}.
Operations
The new operations added:
• deactivateModuleConfiguration() to delete a module configuration
• activateModuleConfiguration(DefRef, String shortName) to activate a module con-
figuration with the specified short name
• createModelObject(Class<T>) to create arbitrary MDF model objects
• parameter.setUserDefined(boolean) method added to set and reset the user defined
flag
8.3.7.2 MDF Model Read and Write
The whole MDF model API was changed from the old mdfRead() and mdfWrite() to one
method mdfModel() with explicit write/create methods. You have to change all your mdfRead()
and mdfWrite() calls to mdfModel(). And every mdfWrite() closure the implicit creation to
explicit create calls.
This was necessary due to the fact that the old implicit API leads to surprising results, when
methods are called, which use the read API, but called in a write context. So the method would
yield different results, when called in different contexts.
The new MDF model API will never create any elements implicitly. Now there are explicit
create methods, like in the BswmdModel:
• For 0:1 elements: get<Element>OrCreate() method
• For 0:* elements: list.createAndAdd() and byNameOrCreate() methods
© 2017, Vector Informatik GmbH
236 of 250


Chapter 8.
AutomationInterface Changes between Versions
The write context is not needed anymore, but you have to open a transaction() before calling
any write API.
See the chapter 4.6.4.1 on page 79 for the read API and 4.6.4.3 on page 82 for the write
API.
8.3.7.3 SystemDescription Access
The SystemDescription Access API added to retrieve paths to elements like flat map, flat extract
and the corresponding model elements. See chapter 4.6.5 on page 94 for details.
8.3.7.4 ActiveEcuc
The class IActiveEcuc was renamed to IActiveEcucApi to reflect that it is not the active ecuc
element, but the API of the active ecuc.
8.3.8 Persistency
New Persistency API added to import and export model data. See chapter 4.11 on page 162
for details.
8.3.9 Generation
The generation script tasks DV_GENERATION_ON_START and DV_GENERATION_ON_END renamed
to DV_ON_GENERATION_START and DV_ON_GENERATION_END.
The new script task type DV_CUSTOM_WORKFLOW_STEP added to execute tasks in the custom
workflow. See 4.3.1.4 on page 31 for details.
The return type of validation and generation methods has changed to IGenerationResultMo-
del. This type provides more detailed information about the executed steps.
8.3.10 BswmdModel
8.3.10.1 Writing with BswmdModel
The BswmdModel supports now a write access for ecuc configuration elements. This means new
elements can be created and existing elements can be modified and deleted by the BswmdModel.
See 5.3.1.9 on page 195 for more details.
8.3.11 BswmdModel Groovy
bswmdModelRead
The BswmdModel access was changed from the old bswmdModelRead() to
the new bswmdModel() method. This was done to support the new write access.
Domain Object Navigation
The BswmdModel API now support the navigation from domain
model to the BswmdModel. See 4.6.3.6 on page 78.
© 2017, Vector Informatik GmbH
237 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.3.12 Diagnostics Domain
Introduced new API which allows creation and querying of diagnostic events. Also OBD and
J1939 state of the configuration can be queried.
8.3.13 Communication Domain
Communication Domain API moved from
com.vector.cfg.dom.com.model.groovy into
com.vector.cfg.dom.com.groovy.api.
Can Controller classes moved from
com.vector.cfg.dom.com.model.groovy.can into
com.vector.cfg.dom.com.groovy.can.
8.3.14 Runtime System Domain
Runtime System API IRuntimeSystemApi now provides functionality to map ports and system
signals.
Entry points are the selectComponentPorts, selectSignalInstances and selectCommuni-
cationElements methods.
© 2017, Vector Informatik GmbH
238 of 250


Chapter 8.
AutomationInterface Changes between Versions
8.4 Changes in MICROSAR AR4-R16 - Cfg5.13
8.4.1 General
This is the first version of the DaVinci Configurator AutomationInterface.
8.4.2 API Stability
The API is not stable yet and could still be changed in later releases. So it could be necessary
to migrate your code when you update to later versions of the DaVinci Configurator.
8.4.3 Beta Status
Some features of the AutomationInterface are have beta status. This will change for later
versions of the AutomationInterface. Which means that some features:
• Are not fully tested
• Missing documentation
• Missing functionality
© 2017, Vector Informatik GmbH
239 of 250

9 Appendix
© 2017, Vector Informatik GmbH
240 of 250


Chapter 9.
Appendix
Nomenclature
AI
Automation Interface
AU T OSAR AUTomotive Open System ARchitecture
CE
Configuration Entity (typically a container or parameter)
Cf g
DaVinci Configurator
Cf g5 DaVinci Configurator
DV
DaVinci
IDE
Integrated Development Environment
J AR
Java Archive
J DK Java Development Kit
J RE
Java Runtime Environment
M DF Meta-Data-Framework
M SN ModuleShortName
© 2017, Vector Informatik GmbH
241 of 250


Figures
Figures
2.1
Script Samples location
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.2
Script Locations View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.3
Script Tasks View
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.4
Create New Script Project... Button . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.5
Project Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.6
Project Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.7
Project SDK Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
2.8
Gradle JVM Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
3.1
DaVinci Configurator components and interaction with scripts
. . . . . . . . . .
17
3.2
Structure of scripts and script tasks
. . . . . . . . . . . . . . . . . . . . . . . . .
19
4.1
The API overview and containment structure . . . . . . . . . . . . . . . . . . . .
24
4.2
IScriptTaskType interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3
Script Task Execution Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
4.4
ScriptingException and sub types . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
4.5
Search for active project in getActiveProject() . . . . . . . . . . . . . . . . . . . .
53
4.6
example situation with the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1
ECUC container type inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
5.2
MIObject class hierarchy and base interfaces
. . . . . . . . . . . . . . . . . . . . 175
5.3
Autosar package containment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
5.4
The ECUC container definition reference . . . . . . . . . . . . . . . . . . . . . . . 177
5.5
Invariant views hierarchy
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
5.6
Example of a model structure and the visibility of the IInvariantValuesView . . . 183
5.7
Variant specific change of a parameter value . . . . . . . . . . . . . . . . . . . . . 186
5.8
Variant common change of a parameter value . . . . . . . . . . . . . . . . . . . . 187
5.9
The relationship between the MDF model and the BswmdModel . . . . . . . . . 188
5.10 SubContainer DefRef navigation methods . . . . . . . . . . . . . . . . . . . . . . 191
5.11 Untyped reference interfaces in the BswmdModel . . . . . . . . . . . . . . . . . . 192
5.12 Creating a BswmdModel in the Post-build selectable use case . . . . . . . . . . . 193
5.13 Class and Interface Structure of the BswmdModel
. . . . . . . . . . . . . . . . . 195
5.14 DefRef class structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.15 IParameterStatePublished class structure
. . . . . . . . . . . . . . . . . . . . . . 204
5.16 IContainerStatePublished class structure . . . . . . . . . . . . . . . . . . . . . . . 206
7.1
Project Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.2
Project Continuous Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.3
Stop Continuous Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
7.4
Disconnect from Continuous Build Process . . . . . . . . . . . . . . . . . . . . . . 219
7.5
Project Debug
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
7.6
Stop Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
7.7
Disconnect from Debug Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
© 2017, Vector Informatik GmbH
242 of 250


Tables
Tables
5.1
Different Class types in different models . . . . . . . . . . . . . . . . . . . . . . . 189
© 2017, Vector Informatik GmbH
243 of 250

Listings
3.1
Static field memory leak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
3.2
Memory leak with closure variable . . . . . . . . . . . . . . . . . . . . . . . . . .
23
4.1
Task creation with default type . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.2
Task creation with TaskType Application . . . . . . . . . . . . . . . . . . . . . .
26
4.3
Task creation with TaskType Project . . . . . . . . . . . . . . . . . . . . . . . . .
26
4.4
Define two tasks is one script . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
4.5
Script creation with IDE support . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
4.6
Task with isExecutableIf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
4.7
Script with description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
4.8
Task with description
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
4.9
Task with description and help text
. . . . . . . . . . . . . . . . . . . . . . . . .
28
4.10 Access automation API in Groovy clients by the IScriptExecutionContext . . . .
33
4.11 Access to automation API in Java clients by the IScriptExecutionContext . . . .
34
4.12 Script task code block arguments . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
4.13 Resolves a path with the resolvePath() method . . . . . . . . . . . . . . . . . . .
36
4.14 Resolves a path with the resolvePath() method . . . . . . . . . . . . . . . . . . .
37
4.15 Resolves a path with the resolveScriptPath() method . . . . . . . . . . . . . . . .
37
4.16 Resolves a path with the resolveProjectPath() method . . . . . . . . . . . . . . .
38
4.17 Resolves a path with the resolveSipPath() method . . . . . . . . . . . . . . . . .
38
4.18 Resolves a path with the resolveTempPath() method . . . . . . . . . . . . . . . .
38
4.19 Get the project output folder path . . . . . . . . . . . . . . . . . . . . . . . . . .
39
4.20 Get the SIP folder path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
4.21 Usage of the script logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
4.22 Usage of the script logger with message formatting . . . . . . . . . . . . . . . . .
40
4.23 Usage of the script logger with Groovy GString message formatting . . . . . . . .
40
4.24 UserInteraction from a script . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
4.25 Stop script task execution by throwing an ScriptClientExecutionException . . . .
42
4.26 Changing the return code of the console application by throwing an ScriptClien-
tExecutionException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
4.27 Using your own defined method . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
4.28 Using your own defined class
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
4.29 Using your own defined method with a daVinci block . . . . . . . . . . . . . . . .
44
4.30 ScriptApi.scriptCode{} usage in own method . . . . . . . . . . . . . . . . . . . .
45
4.31 ScriptApi.scriptCode() usage in own method
. . . . . . . . . . . . . . . . . . . .
45
4.32 ScriptApi.activeProject{} usage in own method . . . . . . . . . . . . . . . . . . .
46
4.33 ScriptApi.activeProject() usage in own method . . . . . . . . . . . . . . . . . . .
46
4.34 Script task UserDefined argument with no value
. . . . . . . . . . . . . . . . . .
46
4.35 Define and use script task user defined arguments from commandline . . . . . . .
47
4.36 Script task UserDefined argument with default value . . . . . . . . . . . . . . . .
47
4.37 Script task UserDefined argument with multiple values . . . . . . . . . . . . . . .
47
4.38 Script task UserDefined argument with predefined validator . . . . . . . . . . . .
48
4.39 Script task UserDefined argument with own validator
. . . . . . . . . . . . . . .
48
4.40 executionData - Cache and retrieve data during one script task execution . . . .
50
4.41 sessionData - Cache and retrieve data over multiple script task executions . . . .
50
4.42 sessionData and executionData syntax samples . . . . . . . . . . . . . . . . . . .
51
4.43 Accessing IProjectHandlingApi as a property . . . . . . . . . . . . . . . . . . . .
52
© 2017, Vector Informatik GmbH
244 of 250


Listings
4.44 Accessing IProjectHandlingApi in a scope-like way . . . . . . . . . . . . . . . . .
52
4.45 Switch the active project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
4.46 Accessing the active IProject
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
4.47 Creating a new project (mandatory parameters only) . . . . . . . . . . . . . . . .
54
4.48 Creating a new project (with some optional parameters) . . . . . . . . . . . . . .
55
4.49 Creating a new project with custom VTT settings
. . . . . . . . . . . . . . . . .
61
4.50 Opening a project from .dpa file
. . . . . . . . . . . . . . . . . . . . . . . . . . .
62
4.51 Parameterizing the project open procedure
. . . . . . . . . . . . . . . . . . . . .
62
4.52 Opening, modifying and saving a project . . . . . . . . . . . . . . . . . . . . . . .
63
4.53 Opening Arxml files as project
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
4.54 Create an empty AUTOSAR model
. . . . . . . . . . . . . . . . . . . . . . . . .
65
4.55 Read with BswmdModel objects starting with a module DefRef (no type decla-
ration) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
4.56 Read with BswmdModel objects starting with a module class (strong typing) . .
67
4.57 Read with BswmdModel objects with closure argument
. . . . . . . . . . . . . .
68
4.58 Read with BswmdModel object for an MDF model object . . . . . . . . . . . . .
68
4.59 Write with BswmdModel required/optional objects . . . . . . . . . . . . . . . . .
69
4.60 Write with BswmdModel multiple objects . . . . . . . . . . . . . . . . . . . . . .
70
4.61 Write with BswmdModel - Duplicate a container . . . . . . . . . . . . . . . . . .
70
4.62 Write with BswmdModel - Delete elements
. . . . . . . . . . . . . . . . . . . . .
71
4.63 Read system description starting with an AUTOSAR path in closure . . . . . . .
72
4.64 Read system description starting with an AUTOSAR path in property style . . .
73
4.65 Changing a simple property of an MIVariableDataPrototype . . . . . . . . . . . .
73
4.66 Creating non-existing member by navigating into its content with OrCreate() . .
73
4.67 Creating new members of child lists with createAndAdd() by type . . . . . . . .
74
4.68 Updating existing members of child lists with byNameOrCreate() by type . . . .
74
4.69 BswmdModel usage with import . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
4.70 Read with BswmdModel the EcuC module configuration . . . . . . . . . . . . . .
76
4.71 Read with BswmdModel the EcuC module configuration with DefRef
. . . . . .
76
4.72 Write with BswmdModel the EcucGeneral container . . . . . . . . . . . . . . . .
76
4.73 Usage of the sipDefRef API to retrieve DefRefs in script files
. . . . . . . . . . .
77
4.74 Usage of generated DefRefs form the bswmd model . . . . . . . . . . . . . . . . .
78
4.75 Switch from a domain model object to the corresponding BswmdModel object . .
78
4.76 Navigate into an MDF object starting with an AUTOSAR path . . . . . . . . . .
79
4.77 Find an MDF object and retrieve some content data . . . . . . . . . . . . . . . .
80
4.78 Navigating deeply into an MDF object with nested closures . . . . . . . . . . . .
80
4.79 Ignoring non-existing member closures . . . . . . . . . . . . . . . . . . . . . . . .
80
4.80 Get a MIReferrable child object by name
. . . . . . . . . . . . . . . . . . . . . .
81
4.81 Retrieve child from list with byName() . . . . . . . . . . . . . . . . . . . . . . . .
81
4.82 Get elements with mdfModel(String) . . . . . . . . . . . . . . . . . . . . . . . . .
82
4.83 Changing a simple property of an MIVariableDataPrototype . . . . . . . . . . . .
83
4.84 Creating non-existing member by navigating into its content with OrCreate() . .
83
4.85 Creating child member by navigating into its content with OrCreate() with type
83
4.86 Creating new members of child lists with createAndAdd() by type . . . . . . . .
84
4.87 Updating existing members of child lists with byNameOrCreate() by type . . . .
86
4.88 Delete a parameter instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
4.89 Check is a model instance is deleted . . . . . . . . . . . . . . . . . . . . . . . . .
87
4.90 Duplicates a container under the same parent . . . . . . . . . . . . . . . . . . . .
88
4.91 Get the AsrPath of an MIReferrable instance . . . . . . . . . . . . . . . . . . . .
88
4.92 Get the AsrObjectLink of an AUTOSAR model instance . . . . . . . . . . . . . .
88
4.93 Get the DefRef of an Ecuc model instance . . . . . . . . . . . . . . . . . . . . . .
88
© 2017, Vector Informatik GmbH
245 of 250


Listings
4.94 Set the DefRef of an Ecuc model instance . . . . . . . . . . . . . . . . . . . . . .
88
4.95 Get the CeState of an Ecuc parameter instance . . . . . . . . . . . . . . . . . . .
89
4.96 Retrieve the user-defined flag of an Ecuc parameter in Groovy . . . . . . . . . . .
89
4.97 Set an Ecuc parameter instance to user defined . . . . . . . . . . . . . . . . . . .
89
4.98 Get the IEcucDefinition of an Ecuc model instance . . . . . . . . . . . . . . . . .
89
4.99 Get the IEcucHasDefinition of an Ecuc model instance . . . . . . . . . . . . . . .
90
4.100referencesPointingToMe sample . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
4.101systemDescriptionObjectsPointingToMe sample . . . . . . . . . . . . . . . . . . .
90
4.102Get the AUTOSAR root object . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
4.103Get the active Ecuc and all module configurations
. . . . . . . . . . . . . . . . .
91
4.104Iterate over all module configurations
. . . . . . . . . . . . . . . . . . . . . . . .
91
4.105Get module configurations by definition . . . . . . . . . . . . . . . . . . . . . . .
91
4.106Get subContainers and parameters by definition
. . . . . . . . . . . . . . . . . .
91
4.107Check parameter values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
92
4.108Get integer parameter value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93
4.109Get reference parameter value . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
4.110Get the FlatExtract and FlatMap paths by the SystemDescription API
. . . . .
94
4.111Get FlatExtract instance by the SystemDescription API . . . . . . . . . . . . . .
94
4.112Execute a transaction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
4.113Execute a transaction with a name . . . . . . . . . . . . . . . . . . . . . . . . . .
95
4.114Check if a transaction is running . . . . . . . . . . . . . . . . . . . . . . . . . . .
96
4.115Undo a transaction with the transactionHistory . . . . . . . . . . . . . . . . . . .
96
4.116Redo a transaction with the transactionHistory . . . . . . . . . . . . . . . . . . .
97
4.117Activation of the ModuleConfiguration Dio
. . . . . . . . . . . . . . . . . . . . .
97
4.118Model synchronization inside an open project . . . . . . . . . . . . . . . . . . . .
99
4.119Retrieve and use a variant view by name . . . . . . . . . . . . . . . . . . . . . . .
99
4.120The default view is the IInvariantValuesView . . . . . . . . . . . . . . . . . . . . 100
4.121Execute code in a model view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.122Get a UserAnnotation of a container . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.123Create a new UserAnnotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.124Create or get the existing UserAnnotation by label name . . . . . . . . . . . . . . 103
4.125Basic structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.126Validate with default project settings . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.127Generate with standard project settings . . . . . . . . . . . . . . . . . . . . . . . 105
4.128Generate one module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.129Generate one module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.130Generate two modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.131Generate one module with two configurations . . . . . . . . . . . . . . . . . . . . 107
4.132Execute an external generation step
. . . . . . . . . . . . . . . . . . . . . . . . . 107
4.133Evaluate the generation result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.134Use a script task as generation step during generation . . . . . . . . . . . . . . . 109
4.135Use a script task as custom workflow step . . . . . . . . . . . . . . . . . . . . . . 110
4.136Hook into the GenerationProcess at the start with script task . . . . . . . . . . . 110
4.137Hook into the GenerationProcess at the end with script task
. . . . . . . . . . . 110
4.138Basic Swct structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4.139SWC Templates and Contract Headers generation with standard project settings 111
4.140SWC Templates and Contract Headers generation of all components . . . . . . . 112
4.141SWC Templates and Contract Headers generation of one selected component . . 112
4.142Swct generation get component and select component
. . . . . . . . . . . . . . . 112
4.143Swct generation of multiple components . . . . . . . . . . . . . . . . . . . . . . . 113
4.144Access all validation-results and filter them by ID . . . . . . . . . . . . . . . . . . 115
© 2017, Vector Informatik GmbH
246 of 250


Listings
4.145Solve a single validation-result with a particular solving-action
. . . . . . . . . . 116
4.146Fast solve multiple results within one transaction . . . . . . . . . . . . . . . . . . 117
4.147Solve all validation-results with its preferred solving-action (if available) . . . . . 117
4.148Access all validation-results of a particular object . . . . . . . . . . . . . . . . . . 118
4.149Access all validation-results of a particular DefRef
. . . . . . . . . . . . . . . . . 119
4.150Filter validation-results using an ID constant . . . . . . . . . . . . . . . . . . . . 119
4.151Fast solve multiple validation-results within one transaction using a solving-
action-group-ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.152IValidationResultUI overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.153IValidationResultUI in a variant (post build selectable) project . . . . . . . . . . 121
4.154CE is affected by (matches) an IValidationResultUI . . . . . . . . . . . . . . . . . 122
4.155Advanced use case - Retrieve Erroneous CEs with descriptors of an IValidation-
ResultUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.156Examine an ISolvingActionSummaryResult . . . . . . . . . . . . . . . . . . . . . 124
4.157Create a ValidationResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.158Report a ValidationResult when MD license option is available . . . . . . . . . . 125
4.159Turn off auto solving action execution . . . . . . . . . . . . . . . . . . . . . . . . 126
4.160"Update existing project"
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.161Change list of communication extracts and update . . . . . . . . . . . . . . . . . 128
4.162Accessing IDomainApi as a property . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.163Accessing IDomainApi in a scope-like way . . . . . . . . . . . . . . . . . . . . . . 130
4.164Accessing ICommunicationApi as a property . . . . . . . . . . . . . . . . . . . . . 130
4.165Accessing ICommunicationApi in a scope-like way
. . . . . . . . . . . . . . . . . 131
4.166Optimizing Can Acceptance Filters . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.167Accessing IDiagnosticsApi as a property . . . . . . . . . . . . . . . . . . . . . . . 134
4.168Accessing IDiagnosticsApi in a scope-like manner . . . . . . . . . . . . . . . . . . 134
4.169Create a new UDS DTC with event . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.170Enable OBD II and create a new OBD related DTC with event . . . . . . . . . . 135
4.171Enable WWH-OBD and create a new OBD related DTC with event . . . . . . . 136
4.172Open a project, enable J1939 and create a new J1939 DTC with event . . . . . . 136
4.173Accessing IModeManagementApi as a property . . . . . . . . . . . . . . . . . . . 137
4.174Accessing IModeManagementApi in a scope-like way . . . . . . . . . . . . . . . . 137
4.175ECU State Handling Auto Configuration . . . . . . . . . . . . . . . . . . . . . . . 138
4.176Inspecting Auto Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . 139
4.177Accessing IRuntimeSystemApi as a property . . . . . . . . . . . . . . . . . . . . . 140
4.178Accessing IRuntimeSystemApi in a scope-like way
. . . . . . . . . . . . . . . . . 140
4.179Selects all component ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
4.180Selects all unconnected component ports . . . . . . . . . . . . . . . . . . . . . . . 142
4.181Select all unconnected sender/receiver or connected mode-switch component ports143
4.182Tries to auto-map all ports

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
4.183Tries to auto-map all unconnected component ports
. . . . . . . . . . . . . . . . 144
4.184Tries to auto-map all unconnected sender/receiver and client/server ports . . . . 144
4.185Tries to auto-map port determined by advanced filter
. . . . . . . . . . . . . . . 144
4.186Tries to auto map all unconnected ports to the ports of one component prototype 145
4.187Tries to auto-map all unconnected ports and evaluate matches
. . . . . . . . . . 146
4.188Auto-map a component port and realize 1:n connection by using evaluate matches147
4.189Create mapping between two ports which names do not match. . . . . . . . . . . 148
4.190Select all unmapped signal instances . . . . . . . . . . . . . . . . . . . . . . . . . 151
4.191Select all unmapped rx or transformed signal instances . . . . . . . . . . . . . . . 151
4.192Select signal instances using an advanced filter
. . . . . . . . . . . . . . . . . . . 152
4.193Auto data map all unmapped signal instances . . . . . . . . . . . . . . . . . . . . 152
© 2017, Vector Informatik GmbH
247 of 250


Listings
4.194Auto data map all unmapped signal instances to unmapped communication ele-
ments and evaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
4.195Auto data map all signal instances and do not expand nested array elements
. . 154
4.196Auto data map all signal instances and expand specific nested array element . . . 155
4.197Select all unmapped delegation port communication elements . . . . . . . . . . . 157
4.198Select communication elements using an advanced filter . . . . . . . . . . . . . . 157
4.199Auto data map all unmapped sender/receiver delegation port communication
elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
4.200Auto data map all unmapped communication elements to unmapped rx signal
instances and evaluate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
4.201Autodatamap and do not expand nested array elements . . . . . . . . . . . . . . 160
4.202Autodatamap and do expand a specific nested array element
. . . . . . . . . . . 161
4.203Accessing the model export persistency API . . . . . . . . . . . . . . . . . . . . . 162
4.204Export the ActiveEcuc to a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4.205Export a Post-build selectable project as variant files . . . . . . . . . . . . . . . . 163
4.206Export the project with an exporter . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.207Export the project with an exporter and checks . . . . . . . . . . . . . . . . . . . 163
4.208Export an AUTOSAR package to a file
. . . . . . . . . . . . . . . . . . . . . . . 164
4.209Exports two elements and all references elements . . . . . . . . . . . . . . . . . . 164
4.210Accessing the model import persistency API . . . . . . . . . . . . . . . . . . . . . 164
4.211Java code usage of the IScriptFactory to contribute script tasks . . . . . . . . . . 168
4.212Accessing WorkflowAPI in Java code . . . . . . . . . . . . . . . . . . . . . . . . . 169
4.213Java Closure creation sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
4.214Run all JUnit tests from one class
. . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.215Run all JUnit tests using a Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
4.216Run unit test with the Spock framework . . . . . . . . . . . . . . . . . . . . . . . 171
4.217Add a UnitTest task with name MyUnitTest
. . . . . . . . . . . . . . . . . . . . 171
4.218The projectConfig.gradle file content for unit tests . . . . . . . . . . . . . . . . . 172
5.1
Check object visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.2
Get all available variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.3
Execute code with variant visibility . . . . . . . . . . . . . . . . . . . . . . . . . . 180
5.4
Get all variants, a specific object is visible in
. . . . . . . . . . . . . . . . . . . . 181
5.5
Retrieving an InvariantValues model view . . . . . . . . . . . . . . . . . . . . . . 183
5.6
Retrieving an InvariantEcucDefView model view . . . . . . . . . . . . . . . . . . 184
5.7
Execute code with variant specific changes . . . . . . . . . . . . . . . . . . . . . . 186
5.8
Sample code to access element in an Untyped model with DefRefs
. . . . . . . . 190
5.9
Resolves a Refference traget of an Reference Parameter
. . . . . . . . . . . . . . 190
5.10 The value of a GIParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
5.11 Java: Execute code with creation IModelView of BswmdModel object . . . . . . 193
5.12 Java: Execute code with creation IModelView of BswmdModel object via runnable193
5.13 Java: Execute code with creation IModelView of BswmdModel object . . . . . . 194
5.14 Additional write API methods for EcucGeneral . . . . . . . . . . . . . . . . . . . 196
5.15 EcucCoreDefinition as GICList<EcucCoreDefinition> . . . . . . . . . . . . . . . 197
5.16 Deleting model objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
5.17 Duplication of containers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.18 Set parameter values with the BswmdModel Write API
. . . . . . . . . . . . . . 198
5.19 Set reference targets with the BswmdModel Write API . . . . . . . . . . . . . . . 198
5.20 Settings.xml sample for DerivativeMapping . . . . . . . . . . . . . . . . . . . . . 199
5.21 DefRef isDefinitionOf methods
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.22 Creation of DefRef with wildcard from EDefRefWildcard
. . . . . . . . . . . . . 203
5.23 Getting CeState objects using the BSWMD model . . . . . . . . . . . . . . . . . 204
© 2017, Vector Informatik GmbH
248 of 250


Listings
5.24 Integer parameter definition access examples
. . . . . . . . . . . . . . . . . . . . 206
5.25 Integer parameter configuration access examples
. . . . . . . . . . . . . . . . . . 210
7.1
The automationClasses list in projectConfig.gradle . . . . . . . . . . . . . . . . . 223
7.2
The dvCfgInstallation in projectConfig.gradle . . . . . . . . . . . . . . . . . . . . 223
7.3
The dvCfgInstallation with an System env in projectConfig.gradle
. . . . . . . . 223
7.4
@CompileStatic with Automation API . . . . . . . . . . . . . . . . . . . . . . . . 225
7.5
@TypeChecked with Automation API . . . . . . . . . . . . . . . . . . . . . . . . 225
7.6
DaVinci Configurator build Gradle DSL API . . . . . . . . . . . . . . . . . . . . 225
7.7
DaVinci Configurator build Gradle DSL API - useBswmdModel . . . . . . . . . . 225
7.8
DaVinci Configurator build Gradle DSL API - useJarSignerDaemon . . . . . . . 226
7.9
DaVinci Configurator build Gradle DSL API - includeDependenciesIntoJar . . . 226
© 2017, Vector Informatik GmbH
249 of 250


Listings
Todo list
© 2017, Vector Informatik GmbH
250 of 250

Document Outline


1.2.18 - epl-v10

Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

1.2.19 - epl-v10

Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

1.2.20 - epl-v10

Eclipse Public License - Version 1.0

Eclipse Public License - v 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

1.2.21 - license

Eclipse Foundation Software User Agreement

Eclipse Foundation Software User Agreement

April 9, 2014

Usage Of Content

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

Applicable Licenses

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with that Feature.
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module including, but not limited to the following locations:

  • The top-level (root) directory
  • Plug-in and Fragment directories
  • Inside Plug-ins and Fragments packaged as JARs
  • Sub-directories of the directory named "src" of certain Plug-ins
  • Feature directories

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in that directory.

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

Use of Provisioning Technology

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based product.
  2. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be accessed and copied to the Target Machine.
  3. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.

Cryptography

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

1.2.22 - license

Eclipse Foundation Software User Agreement

Eclipse Foundation Software User Agreement

April 9, 2014

Usage Of Content

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

Applicable Licenses

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with that Feature.
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module including, but not limited to the following locations:

  • The top-level (root) directory
  • Plug-in and Fragment directories
  • Inside Plug-ins and Fragments packaged as JARs
  • Sub-directories of the directory named "src" of certain Plug-ins
  • Feature directories

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in that directory.

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

Use of Provisioning Technology

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based product.
  2. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be accessed and copied to the Target Machine.
  3. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.

Cryptography

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

1.2.23 - license

Eclipse Foundation Software User Agreement

Eclipse Foundation Software User Agreement

April 9, 2014

Usage Of Content

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

Applicable Licenses

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with that Feature.
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module including, but not limited to the following locations:

  • The top-level (root) directory
  • Plug-in and Fragment directories
  • Inside Plug-ins and Fragments packaged as JARs
  • Sub-directories of the directory named "src" of certain Plug-ins
  • Feature directories

Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in that directory.

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

Use of Provisioning Technology

The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").

You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based product.
  2. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be accessed and copied to the Target Machine.
  3. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.

Cryptography

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.

Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

1.2.24 - SAX-LICENSE

SAX License

Origin

This page was originally taken from: http://www.saxproject.org/copying.html with the navigation links remove from the left-hand-side of the page.

Copyright Status

SAX is free!

In fact, it's not possible to own a license to SAX, since it's been placed in the public domain.

No Warranty

Because SAX is released to the public domain, there is no warranty for the design or for the software implementation, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide SAX "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of SAX is with you. Should SAX prove defective, you assume the cost of all necessary servicing, repair or correction.

In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute SAX, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use SAX (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the SAX to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.

Copyright Disclaimers

This page includes statements to that effect by David Megginson, who would have been able to claim copyright for the original work.

SAX 1.0

Version 1.0 of the Simple API for XML (SAX), created collectively by the membership of the XML-DEV mailing list, is hereby released into the public domain.

No one owns SAX: you may use it freely in both commercial and non-commercial applications, bundle it with your software distribution, include it on a CD-ROM, list the source code in a book, mirror the documentation at your own web site, or use it in any other way you see fit.

David Megginson, Megginson Technologies Ltd.
1998-05-11

SAX 2.0

I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and release all of the SAX 2.0 source code, compiled code, and documentation contained in this distribution into the Public Domain. SAX comes with NO WARRANTY or guarantee of fitness for any purpose.

David Megginson, Megginson Technologies Ltd.
2000-05-05


1.2.25 - Welcome

Welcome to the Java(TM) Platform

Welcome to the JavaTM Platform

Welcome to the JavaTM Standard Edition Runtime Environment. This provides complete runtime support for Java applications.

The runtime environment includes the JavaTM Plug-in product which supports the Java environment inside web browsers.

References

See the Java Plug-in product documentation for more information on using the Java Plug-in product.

See the Java Platform web site for more information on the Java Platform.


Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.

1.2.26 - Welcome

Welcome to the Java(TM) Platform

Welcome to the JavaTM Platform

Welcome to the JavaTM Standard Edition Runtime Environment. This provides complete runtime support for Java applications.

The runtime environment includes the JavaTM Plug-in product which supports the Java environment inside web browsers.

References

See the Java Plug-in product documentation for more information on using the Java Plug-in product.

See the Java Platform web site for more information on the Java Platform.


Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.

1.2.27 -

W3C Software License

W3C SOFTWARE NOTICE AND LICENSE

http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.

Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:

  1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
  2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
  3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.

The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.

____________________________________

This formulation of W3C's notice and license became active on December 31 2002. This version removes the copyright ownership notice such that this license can be used with materials other than those owned by the W3C, reflects that ERCIM is now a host of the W3C, includes references to this specific dated version of the license, and removes the ambiguous grant of "use". Otherwise, this version is the same as the previous version and is written so as to preserve the Free Software Foundation's assessment of GPL compatibility and OSI's certification under the Open Source Definition. Please see our Copyright FAQ for common questions about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed to site-policy@w3.org.
 

Joseph Reagle <site-policy@w3.org>

Last revised $Id: copyright-software-20021231.html,v 1.11 2004/07/06 16:02:49 slesch Exp $

1.3 - Doc

Doc

ApplicationNotes

DeliveryInformation

ReleaseNotes

SafetyManual

TechnicalReferences

UserManuals

1.3.1 - AN-ISC-8-1149_ErrorHook_E_OS_DISABLED_INT

website_Vector_BSW_RH850_FORD/content/en/docs/Doc/ApplicationNotes/AN-ISC-8-1149_ErrorHook_E_OS_DISABLED_INT

1.3.2 - AN-ISC-8-1149_ErrorHook_E_OS_DISABLED_INT_ind

Page 1
Page 2
Page 3
Page 4

1.3.3 - AN-ISC-8-1149_ErrorHook_E_OS_DISABLED_INTs


 
Avoid ErrorHook E_OS_DISABLED_INT 
Version 1.0 
2015-03-13 
Application Note  AN-ISC-8-1149 
 
 
 
Author(s) 
Birke, Holger 
Restrictions 
Customer confidential - MSR4 only 
Abstract 
This application note describes how to avoid ErrorHook E_OS_DISABLED_INT 
 
Table of Contents 
 

1.0 
Overview .......................................................................................................................................................... 1 
1.1 
Problem Description ...................................................................................................................................... 1 
2.0 
Solution ............................................................................................................................................................ 1 
2.1 
Do Not Use OS Timer ................................................................................................................................... 1 
2.2 
Do Not Lock Global Interrupts ....................................................................................................................... 3 
3.0 
Contacts ........................................................................................................................................................... 4 
 
 
 
1.0  Overview 
This note describes how to avoid the issue E_OS_DISABLEDINT notified by the OS ErrorHook() callout. 
 
1.1  Problem Description 
The CAN Driver uses the OS APIs GetCounterValue() and GetElapsedValue() to handle asynchronous 
state transitions. These calls will be done out of the context of Can_SetControllerMode() within some 
EXCLUSIVE_AREA from: 
  CAN Driver 
(CAN_EXCLUSIVE_AREA_6) 
  CAN Interface  (CANIF_EXCLUSIVE_AREA_0) 
  CANSM 
(CANSM_ EXCLUSIVE_AREA_1, CANSM_ EXCLUSIVE_AREA_4) 
  COMM   
(COMM_ EXCLUSIVE_AREA_1) 
 
If the integrator choose Global Interrupt Lock for these EXCLUSIVE_AREAs the OS will issue 
E_OS_DISABLEDINT by the ErrorHook() callout. 
Note: 
The issue only appears when you use Global Interrupt Lock for particular EXCLUSIVE_AREA. 
 
2.0  Solution 
There are different solutions for this problem. The integrator has to decide which one fits best to the project-specific 
needs. The descriptions of the EXCLUSIVE AREA have to be checked for limitations.  
2.1  Do Not Use OS Timer 
When the above described AREAs have to use Global Interrupt Lock, no OS timer can be used. Use the 
CAN Driver feature instead. 
 1  
Copyright © 2015 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 




 
 
Avoid ErrorHook E_OS_DISABLED_INT 
 
 
 
 
 
 
Figure 1 – GENy: Hardware Loop Check by Application 
 
 
Figure 2 –DaVinci Configurator: Hardware Cancel By Appl. 
 
This feature provides an additional API called instead of the OS timer and has to be implemented by the integrator. 
Refer to the CAN Driver Technical Reference for detailed description of the API. 
This API can either 
 
Use free running timer or 
  Use counter loop (wait dedicated amount of loop calls to secure timing) 
 
Attention: 
This additional API is called for every Hardware Loop, not only for state transitions. So the worst 
case scenario has to be taken into account for timeout (see CAN Driver Technical Reference) 
 
 
2 
Application Note  AN-ISC-8-1149 
 



 
 
Avoid ErrorHook E_OS_DISABLED_INT 
 
 
 
 
 
2.2  Do Not Lock Global Interrupts 
It is possible to use a user defined callback function to handle the EXCLUSIVE AREAs.  
 
Figure 3 – DaVinci Configurator Exclusive Areas 
 
Dependent on the conditions described in the technical references for these AREAs, it is possible to use: 
  No interrupt locks when the CAN Driver is used in polling mode, and all MainFunctions are called in same 
context.  
  CAN interrupt locks (from CAN Driver BSWM: Can_DisableControllerInterrupts(), 
Can_EnableControllerInterrupts()), and all MainFunctions are called in same context.  
  OS resources to lock MainFunctions and use additional CAN interrupt locks or CAN polling configuration. 
 
Attention: 
Make sure that all conditions described in the technical references for the upper described AREAs 
are fulfilled. 
 
 
 
 
 
 
3 
Application Note  AN-ISC-8-1149 
 


 
 
Avoid ErrorHook E_OS_DISABLED_INT 
 
 
 
 
 
3.0  Contacts 
 
 
 
 
Germany  
France, Belgium, Luxemburg: 
Sweden, Denmark, Norway,  
and all countries not named below: 
 
Finland, Iceland: 
 
 
 
Vector Informatik GmbH 
Vector France S.A.S. 
VecScan AB 
Ingersheimer Str. 24 
168, Boulevard Camélinat 
Theres Svenssons Gata 9 
70499 Stuttgart 
92240 Malakoff  
41755 Göteborg  
GERMANY 
FRANCE 
SWEDEN 
Phone:  +49 711-80670-0 
Phone:  +33 1 42 31 40 00 
Phone:  +46 31 764 76 00 
Fax: 
+49 711-80670-111 
Fax: 
+33 1 42 31 40 09 
Fax: 
+46 31 764 76 19  
E-mail:  info@de.vector.com 
E-mail:  information@fr.vector.com 
E-mail:  info@se.vector.com 
 
 
 
 
  
 
United Kingdom, Ireland: 
China: 
India: 
 
 
 
Vector GB Ltd. 
Vector Automotive Technology 
Vector Informatik India Pvt. Ltd. 
Rhodium, Central Boulevard 
(Shanghai) Co., Ltd.  
4/1/1/1, Sutar Icon, Sus Road, 
Blythe Valley Park 
Sunyoung Center 
Pashan, Pune - 411 021 
Solihull, Birmingham 
Room 1701, No.398 Jiangsu Road 
INDIA 
West Midlands B90 8AS 
Changning District 
 
UNITED KINGDOM 
Shanghai 200050 
 
Phone:  +44 121 50681-50 
P.R. CHINA 
Phone: +91 20 2587 2023 
Fax: 
+44 121 50681-69 
Phone: +86 21 6432 53530 
Fax:   +91 20 2587 2025 
 
Fax:   +86 21 6432 5308 
 
E-mail:  info@uk.vector.com 
E-mail: info@cn.vector.com 
E-mail: info@in.vector.com 
 
 
 
 
 
USA, Canada, Mexico: 
Japan: 
Korea: 
 
 
 
Vector CANtech, Inc. 
Vector Japan Co. Ltd. 
Vector Korea IT Inc. 
39500 Orchard Hill Place, Suite 550 
Tennozu Yusen Bldg. 16F 
5F, Gomoas bldg. 
Novi, MI  48375 
2-2-20 Higashi-shinagawa, 
12 Hannam-daero 11-gil, Yongsan-gu 
USA 
Shinagawa-ku, 
Seoul, 140-889 
 
Tokyo 140-0002 
REPUBLIC OF KOREA 
 
JAPAN 
 
Phone:  +1 248 449 9290 
Phone:  +81 3 5769 7800 
Phone:  +82 2 807 0600 
Fax: 
+1 248 449 9704 
Fax: 
+81 3 5769 6975 
Fax: 
+82 2 807 0601 
E-mail:  info@us.vector.com 
E-mail:  info@jp.vector.com 
E-mail:  info@kr.vector.com 
 
 
 
 
 
 
4 
Application Note  AN-ISC-8-1149 
 

1.3.4 - AN-ISC-8-1153_ThirdPartyModules

Third Party Modules

1.3.6 - AN-ISC-8-1153_ThirdPartyModuless


 
Third Party Modules 
Version 1.0 
2013-07-24 
Application Note AN-ISC-8-1153 
 
  
Author(s) 
Sven Hesselmann 
Restrictions 
Customer confidential - Vector decides 
Abstract 
Introduction how to integrate 3rd partly modules into the MICROSAR4 stack 
 
Table of Contents 

 
1.0 
Overview .......................................................................................................................................................... 1 
2.0 
Integration in DaVinci Configurator 5 ............................................................................................................... 2 
2.1 
Configuration With CFG5 .............................................................................................................................. 2 
2.1.1 
Adding of BSWMD File ............................................................................................................................... 2 
2.1.2 
Adding a Module to the Current Project ..................................................................................................... 3 
2.2 
External Generation Step .............................................................................................................................. 4 
2.2.1 
Manual Set-Up ............................................................................................................................................ 5 
2.2.2 
Automatic Set-Up ........................................................................................................................................ 5 
2.3 
Internal Behavior Description ........................................................................................................................ 5 
2.3.1 
Example for Internal Behavior Description ................................................................................................. 5 
2.3.2 
Templates for Internal Behavior Description .............................................................................................. 6 
2.4 
RTE configuration .......................................................................................................................................... 7 
2.5 
CDD Configuration ........................................................................................................................................ 7 
3.0 
Settings.xml ..................................................................................................................................................... 8 
4.0 
Integration Into the Build Project ...................................................................................................................... 8 
4.1 
Compiler_Cfg.h ............................................................................................................................................. 9 
4.2 
MemMap.h .................................................................................................................................................... 9 
5.0 
Additional Resources ..................................................................................................................................... 10 
6.0 
Contacts ......................................................................................................................................................... 10 
 
 
 
1.0  Overview 
This application note describes integration of third party modules (i.e. MCAL) into DaVinci Configurator Pro 5 
(CFG5 for short) and the MICROSAR stack for AUTOSAR Release 4.x. 
This application note uses the MCU module as an example. 
 
 1  
Copyright © 2013 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 



 
 
Third Party Modules 
 
 
 
 
 
 
Figure 1 – Overview of BSWMD file of MCU 
 
2.0  Integration in DaVinci Configurator 5 
For integration of a module into a MICROSAR stack, different things have to be done. 
If the module fulfills one of the following list points, check this chapter for the description. 
The module: 
•  has parts, generated based on the configuration (i.e. ECUC file) 
•  requires the SCHM API for Exclusive Area handling 
•  has cyclic MainFunction calls 
•  needs access to communication PDUs 
 
2.1  Configuration With CFG5 
If the module shall be configured within the CFG5, the tool requires its modules description in a BSWMD file (basis 
software module description). Also the module has to be added to the configuration. 
2.1.1  Adding of BSWMD File 
Provide an additional search path for BSWMD files within your configuration. The BSWMD file must end with 
.arxml to be noticed by CFG5. 
Open Project|Project Setting|Modules|Additional Definitions and Add the path to the module’s BSWMD file as 
shown in the following screenshots.  
 
2 
Application Note AN-ISC-8-1153 
 




 
 
Third Party Modules 
 
 
 
 
 
 
Figure 2 – Modules|Additional Definitions 
 
 
Figure 3 – BSWMD added 
 
Now the CFG5 knows the module and it can be added to the configuration. But before the configuration has to be 
closed and opened again. 
2.1.2  Adding a Module to the Current Project 
For adding the module to the current configuration, open Project|Project Settings|Modules and Add it with the 
blue plus. If the path to the module is within the delivered SIP, you will find it in Select from SIP otherwise in 
Select additional definition (see screenshots below). 
 
3 
Application Note AN-ISC-8-1153 
 




 
 
Third Party Modules 
 
 
 
 
 
 
Figure 4 – Module Assistant 
 
 
Figure 5 – Module Definitions 
 
Now the module is within your project, configure it using the Basic Editor.  
2.2  External Generation Step 
If the module has parts generated based on the configuration of the ECUC file and the generation shall be started 
from the CFG5, the generation list has to be extended. The configuration of the generation steps for third-party 
modules can either be done manually or by a configuration file, making it easier to reuse your module for further 
projects. 
 
4 
Application Note AN-ISC-8-1153 
 



 
 
Third Party Modules 
 
 
 
 
 
2.2.1  Manual Set-Up 
Open Project|Project Settings|Code Generation|External Generation Steps and Add the generation settings 
using the blue plus. 
 
Figure 6 – External Generation Steps 
 
Specify the module generator settings (i.e. parameters to be handed over). If the module generator also supports 
validation or requires a transformation of the input file, this can also be configured. For further information also see 
the Help Content of CFG5. 
2.2.2  Automatic Set-Up 
The settings described in 2.2.1 can also be done automatically by a so-called Settings.xml. For configuration 
options of the Settings.xml please refer to 3.0 Settings.xml. 
2.3  Internal Behavior Description 
Most AUTOSAR modules require Exclusive Area and / or MainFunction handling by the RTE. The MICROSAR 
RTE reads this information from the so-called Internal Behavior description, which is a part of a BSWMD file. This 
file has to be provided to the CFG5 by placing it into the folder for InternalBehavior files (default is 
./Config/InternalBehavior). 
The <BSW-IMPLEMENTATION> container within the BSWMD file must have a reference to the Internal Behavior 
(i.e. <BEHAVIOR-REF DEST="BSW-INTERNAL-
BEHAVIOR">/VendorX/Mcu_ib_bswmd/BswModuleDescriptions/Mcu/McuBehavior</BEHAVIOR-REF>, see also Figure 1). 
The RTE reads the Internal Behavior of the module from this file and provides a solving action to create an 
RteBswModuleInstance with this information. 
2.3.1  Example for Internal Behavior Description 
The following example for an Internal Behavior description defines an exclusive area called MCU_EXCLUSIVE_AREA_0 
and a MainFunction called Mcu_MainFunction, which has to be called with a cycle time of 0.01 seconds. The file 
should be placed into the folder for InternalBehavior files (default is ./Config/InternalBehavior) or the content can 
even be in the BSWMD file itself. 
 
 
5 
Application Note AN-ISC-8-1153 
 


 
 
Third Party Modules 
 
 
 
 
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://autosar.org/schema/r4.0 autosar_4-0-3.xsd"> 
  <AR-PACKAGES> 
    <AR-PACKAGE> 
      <SHORT-NAME>VendorX</SHORT-NAME> 
      <AR-PACKAGES> 
        <AR-PACKAGE> 
          <SHORT-NAME>Mcu_ib_bswmd</SHORT-NAME> 
          <AR-PACKAGES> 
            <AR-PACKAGE> 
              <SHORT-NAME>BswModuleDescriptions</SHORT-NAME> 
              <ELEMENTS> 
                <BSW-MODULE-DESCRIPTION> 
                  <SHORT-NAME>Mcu</SHORT-NAME> 
                  <PROVIDED-ENTRYS> 
                    <BSW-MODULE-ENTRY-REF-CONDITIONAL> 
                      <BSW-MODULE-ENTRY-REF DEST="BSW-MODULE-
ENTRY">/VendorX/Mcu_ib_bswmd/BswModuleDescriptions/Mcu_MainFunction</BSW-MODULE-ENTRY-REF> 
                    </BSW-MODULE-ENTRY-REF-CONDITIONAL> 
                  </PROVIDED-ENTRYS> 
                  <INTERNAL-BEHAVIORS> 
                    <BSW-INTERNAL-BEHAVIOR> 
                      <SHORT-NAME>McuBehavior</SHORT-NAME> 
                      <EXCLUSIVE-AREAS> 
                        <EXCLUSIVE-AREA> 
                          <SHORT-NAME>MCU_EXCLUSIVE_AREA_0</SHORT-NAME> 
                        </EXCLUSIVE-AREA> 
                      </EXCLUSIVE-AREAS> 
                      <ENTITYS> 
                        <BSW-SCHEDULABLE-ENTITY> 
                          <SHORT-NAME>Mcu_MainFunction</SHORT-NAME> 
                          <IMPLEMENTED-ENTRY-REF DEST="BSW-MODULE-
ENTRY">/VendorX/Mcu_ib_bswmd/BswModuleDescriptions/Mcu_MainFunction</IMPLEMENTED-ENTRY-REF> 
                        </BSW-SCHEDULABLE-ENTITY> 
                      </ENTITYS> 
                      <EVENTS> 
                        <BSW-TIMING-EVENT> 
                          <SHORT-NAME>Mcu_MainFunctionTimingEvent0</SHORT-NAME> 
                          <STARTS-ON-EVENT-REF DEST="BSW-SCHEDULABLE-
ENTITY">/VendorX/Mcu_ib_bswmd/BswModuleDescriptions/Mcu/McuBehavior/Mcu_MainFunction</STARTS-ON-EVENT-REF> 
                          <PERIOD>0.01</PERIOD> 
                        </BSW-TIMING-EVENT> 
                      </EVENTS> 
                    </BSW-INTERNAL-BEHAVIOR> 
                  </INTERNAL-BEHAVIORS> 
                </BSW-MODULE-DESCRIPTION> 
                <BSW-MODULE-ENTRY> 
                  <SHORT-NAME>Mcu_MainFunction</SHORT-NAME> 
                  <CALL-TYPE>SCHEDULED</CALL-TYPE> 
                  <EXECUTION-CONTEXT>TASK</EXECUTION-CONTEXT> 
                </BSW-MODULE-ENTRY> 
              </ELEMENTS> 
            </AR-PACKAGE> 
          </AR-PACKAGES> 
        </AR-PACKAGE> 
      </AR-PACKAGES> 
    </AR-PACKAGE> 
  </AR-PACKAGES> 
</AUTOSAR> 
 
2.3.2  Templates for Internal Behavior Description 
Some modules provided by a MICROSAR delivery are not developed by Vector and do not have an automatic 
Internal Behavior creation (i.e. MCALs). For easier integration some of them provide templates for the Internal 
Behavior description. If these files are available within the current delivery they are positioned at 
.\Misc\InternalBehaviorTemplates. Please remove the starting ‘_’ marking the files as templates, copy them to the 
 
6 
Application Note AN-ISC-8-1153 
 




 
 
Third Party Modules 
 
 
 
 
 
InternalBehavior folder of your project and adapt them to your configuration (i.e. changing the cycle time of the 
MainFunction). 
2.4  RTE configuration 
If the Internal Behavior is configured as described in 2.3 the RTE will provide a solving action to automatically 
create the required RTE configuration. If a MainFunction has to be called by the RTE, perform the according Task 
Mapping afterwards. The RTE will then generate the Exclusive Area and MainFunction calls as described in the 
Internal Behavior. 
2.5  CDD Configuration 
For your own modules that need access to any PDU within the communication stack, use the so-called CDD 
module (Complex Device Driver), which is part of the SIP. For adding the CDD to the current configuration, open 
Project|Project Settings|Modules and Add it via the blue plus. 
 
Figure 7 – Module Definitions CDD 
 
In the Basic Editor you can define, where the CDD shall be placed within the communication stack. 
 
Figure 8 – Configuring CDD 
 
For further information how to configure the CDD, please refer to its Technical Reference 
(TechnicalReference_Asr_CddCfg5.pdf). 
 
7 
Application Note AN-ISC-8-1153 
 


 
 
Third Party Modules 
 
 
 
 
 
3.0  Settings.xml 
The Settings.xml is an open interface to the CFG5. With this file the following configuration can be done: 
•  Settings for external validation and generation steps 
 
The file shall be placed to .\DaVinciConfigurator\Generators\<Msn> (i.e. 
C:\Vector\CBD1200333_D02_V85x\DaVinciConfigurator\Generators\Mcu\Settings_ExtGen_Mcu.xml) and is 
automatically known at start of the CFG5. 
The following example creates the same generator settings as the example in 2.2.1. 
 
<Settings> 
  <!-- external generator --> 
  <Settings Name="com.vector.cfg.gui.core.generators.ExtGenSteps"> 
    <Settings Name="ExtGenSettings_DrvMcu"> 
      <Setting Name="Active" Value="true"/> 
      <Setting Name="CommandLine" Value="C:\Vector\CBD1200333_D01_V85x_AddOn\Mcu\Mcu.exe"/> 
      <Setting Name="GenerationParameters" Value="$(GenDataFolder) $(ProcessingEcuCFile) --generate"/> 
      <Setting Name="SupportsStandAloneValidation" Value="true"/> 
      <Setting Name="ValidationParameters" Value="$(GenDataFolder) $(ProcessingEcuCFile) --validate"/> 
      <Setting Name="TransformationRequired" Value="false"/> 
      <Setting Name="TransformationXsltFile" Value=""/> 
      <Setting Name="TransformationOutput" Value=""/> 
      <Setting Name="WorkingDir" Value="C:\Vector\CBD1200333_D01_V85x_AddOn\Mcu"/> 
      <Setting Name="SpecificAsVersionRequired" Value="true"/> 
      <Setting Name="RequiredAsVersion" Value="4.0.3"/> 
    </Settings> 
  </Settings>   
</Settings> 
 
4.0  Integration Into the Build Project 
AUTOSAR has introduced a mechanism to integrate standardized code into different µC and Compilers. To adapt 
the modules into a project with specific compiler and linker settings the files MemMap.h and Compiler_Cfg.h have 
been introduced. If the module that shall be integrated into a build project that makes use of those mechanisms, 
these files have to be adapted.  
For further information on this topic please also refer to TechnicalReference_Asr_MemoryMapping.pdf within the 
SIP. 
 
Example code for the following chapters: 
#define MCU_START_SEC_VAR_INIT_8BIT 
#include "MemMap.h" 
 
VAR (uint8, MCU_INIT_DATA) Mcu_InitStatus = 0; 
 
#define MCU_STOP_SEC_VAR_INIT_8BIT 
#include "MemMap.h" 
 
 
#define MCU_START_SEC_PUBLIC_CODE 
#include "MemMap.h" 
 
FUNC(void, MCU_PUBLIC_CODE) Mcu_Init (P2CONST(Mcu_ConfigType, AUTOMATIC, MCU_APPL_CONST) ConfigPtr) 

… 

 
#define MCU_STOP_SEC_PUBLIC_CODE 
#include "MemMap.h" 
 
8 
Application Note AN-ISC-8-1153 
 


 
 
Third Party Modules 
 
 
 
 
 
4.1  Compiler_Cfg.h 
Add all used compiler abstraction defines from your module to this file, even if they are defined to nothing.  
Required Compiler_Cfg.h content for above given example: 
#define MCU_PUBLIC_CODE 
#define MCU_APPL_CONST 
#define MCU_INIT_DATA 
4.2  MemMap.h 
Add all used memory abstraction defines from your module to this file. 
Required MemMap.h content for above given example: 
#ifdef MCU_START_SEC_VAR_INIT_8BIT 
  #undef MCU_START_SEC_VAR_INIT_8BIT 
  #define START_SEC_VAR_INIT_8BIT 
#endif 
#ifdef MCU_STOP_SEC_VAR_INIT_8BIT 
  #undef MCU_STOP_SEC_VAR_INIT_8BIT 
  #define STOP_SEC_VAR 
#endif  
 
#ifdef MCU_START_SEC_PUBLIC_CODE 
  #undef MCU_START_SEC_PUBLIC_CODE 
  #define START_SEC_CODE 
#endif 
#ifdef MCU_STOP_SEC_PUBLIC_CODE 
  #undef MCU_STOP_SEC_PUBLIC_CODE 
  #define STOP_SEC_CODE 
#endif 
 
 
 
 
9 
Application Note AN-ISC-8-1153 
 


 
 
Third Party Modules 
 
 
 
 
 
5.0  Additional Resources 
VECTOR TECHNICAL REFERENCES 
TechnicalReference_Asr_MemoryMapping.pdf 
TechnicalReference_Asr_CddCfg5.pdf 
 
6.0  Contacts 
 
 
 
 
Germany  
France, Belgium, Luxemburg: 
Sweden, Denmark, Norway,  
and all countries not named below: 
 
Finland, Iceland: 
 
 
 
Vector Informatik GmbH 
Vector France S.A.S. 
VecScan AB 
Ingersheimer Str. 24 
168, Boulevard Camélinat 
Theres Svenssons Gata 9 
70499 Stuttgart 
92240 Malakoff  
41755 Göteborg  
GERMANY 
FRANCE 
SWEDEN 
Phone: +49 711-80670-0 
Phone: +33 1 42 31 40 00 
Phone: +46 31 764 76 00 
Fax:  +49 711-80670-111 
Fax:  +33 1 42 31 40 09 
Fax:  +46 31 764 76 19  
E-mail:  info@de.vector.com 
E-mail:  information@fr.vector.com 
E-mail:  info@se.vector.com 
 
 
 
 
  
 
United Kingdom, Ireland: 
China: 
India: 
 
 
 
Vector GB Ltd. 
Vector Automotive Technology 
Vector Informatik India Pvt. Ltd. 
Rhodium, Central Boulevard 
(Shanghai) Co., Ltd.  
4/1/1/1, Sutar Icon, Sus Road, 
Blythe Valley Park 
Sunyoung Center 
Pashan, Pune - 411 021 
Solihull, Birmingham 
Room 1701, No.398 Jiangsu Road 
INDIA 
West Midlands B90 8AS 
Changning District 
 
UNITED KINGDOM 
Shanghai 200050 
 
Phone: +44 121 50681-50 
P.R. CHINA 
Phone: +91 20 2587 2023 
Fax:  +44 121 50681-69 
Phone: +86 21 6432 53530 
Fax:   +91 20 2587 2025 
 
Fax:   +86 21 6432 5308 
 
E-mail:  info@uk.vector.com 
E-mail: info@cn.vector.com 
E-mail: info@in.vector.com 
 
 
 
 
 
USA, Canada, Mexico: 
Japan: 
Korea: 
 
 
 
Vector CANtech, Inc. 
Vector Japan Co. Ltd. 
Vector Korea IT Inc. 
39500 Orchard Hill Place, Suite 550 
Tennozu Yusen Bldg. 16F 
5F, Gomoas bldg. 
Novi, MI  48375 
2-2-20 Higashi-shinagawa, 
12 Hannam-daero 11-gil, Yongsan-gu 
USA 
Shinagawa-ku, 
Seoul, 140-889 
 
Tokyo 140-0002 
REPUBLIC OF KOREA 
 
JAPAN 
 
Phone: +1 248 449 9290 
Phone: +81 3 5769 7800 
Phone: +82 2 807 0600 
Fax:  +1 248 449 9704 
Fax:  +81 3 5769 6975 
Fax:  +82 2 807 0601 
E-mail:  info@us.vector.com 
E-mail:  info@jp.vector.com 
E-mail:  info@kr.vector.com 
 
 
 
 
 
 
10 
Application Note AN-ISC-8-1153 
 

Document Outline


1.3.7 - AN-ISC-8-1166_RTE_BRE_without_AUTOSAR_OS

Using RTE or BRE without AUTOSAR OS

1.3.8 - AN-ISC-8-1166_RTE_BRE_without_AUTOSAR_OS_ind

Outline
Page 1
Page 2
Page 3
Page 4

1.3.9 - AN-ISC-8-1166_RTE_BRE_without_AUTOSAR_OSs


 
 
Using RTE or BRE without AUTOSAR OS 
Version 1.1.1 
2016-06-08 
Application Note AN-ISC-8-1166 
Author 
Hannes Haas 
Restrictions  Customer Confidential – Vector decides 
Abstract 
This application note describes how to configure the MICROSAR BRE (Basic Runtime 
Environment) or a minimum RTE without using an AUTOSAR OS. 
 
 
 
 
Table of Contents 
1 
Overview ........................................................................................................................................ 2 
1.1 

Limitations ............................................................................................................................ 2 
2 
OS Configuration in DaVinci Configurator ................................................................................. 2 
2.1 
BRE Configuration Requirements for the OS ...................................................................... 3 
2.2 
Call Cycle of Tasks .............................................................................................................. 3 
3 
Mandated OS APIs ........................................................................................................................ 3 
4 
Calling of Tasks ............................................................................................................................. 4 
5 
Additional Resources ................................................................................................................... 4 
6 
Contacts ......................................................................................................................................... 4 
 
 
 



Using RTE or BRE without AUTOSAR OS 

Overview 
The RTE and BRE implementation assume the existence of an AUTOSAR OS or an OSEK OS as it 
very much depends on it functionalities and configuration description. If a different OS or a basic 
scheduler (non-AUTOSAR OS) is used, the provided interfaces must be similar to the interfaces 
defined by AUTOSAR OS. Interfaces in this context include. 

C APIs and header files 

ECUC configuration data exchange 

API behavior 
The intention of this document is to provide an overview of the configuration process and the required 
APIs. An exact description of the API behavior is not scope of this document. Please refer to the 
AUTOSAR OS specification for details. 
The focus of this document is set on a minimum RTE feature set that is also provided by the BRE. For 
more advanced RTE features the usage of an AUTOSAR OS is highly recommended. 
1.1  Limitations 
This document describes a RTE/BRE configuration for an ECU project without enhanced functionality 
such as 

Multi-core 

Application partitioning using MPU 

Safety requirements 
These assumptions are vital as otherwise the dependency between BRE and operating system 
becomes too complex to be managed and documented in such an application note. 

OS Configuration in DaVinci Configurator 
BRE requires the existence of an AUTOSAR OS in the ECUC project as it will e.g. read the tasks 
configuration from the OS configuration. 
In order to add an OS, launch DaVinci Configurator Pro and open the Project Settings page. Add the 
AUTOSAR OS as new BSW module. As the OS is not part of your delivery choose Select from 
AUTOSAR Standard Definition
. Now you can add the OS to your project. 
 
Figure 2-1 
Project Settings Editor in DaVinci Developer Pro 
It is not required to configure the OS completely, thus the OS configuration may contain validation 
errors as long as all information required for BRE is available. The AUTOSAR OS configuration must 
match with the behavior of your non-AUTOSAR OS with respect to the following aspects. Please 
configure these properties using DaVinci Configurator Pro: 

Tasks: Add a container for at least those tasks that are handled by BRE. The BRE will implement 
the tasks that are used to map BSW main functions to.  

TaskPriority: Configure the task priority of the tasks implemented by BRE 
Copyright © 2016 - Vector Informatik GmbH 
2 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Using RTE or BRE without AUTOSAR OS 

TaskSchedule: Attribute defines the preempt ability of the task. If this Task cannot be preempted 
by other Tasks select NON. If this Task can be preempted by other Tasks with higher TaskPriority 
select FULL. 
Having set up the OS in this way, the BRE can now be configured by e.g. mapping BSW main 
functions (MainFunctions) to the tasks. 
If no OSEK OS is used, only basic tasks shall be used as otherwise the interface to the OS will get too 
complex. In contrast to extended tasks, basic tasks can be integrated with a non-AUTOSAR and non 
OSEK-OS scheduler with reasonable effort. This documentation is therefore limited to the usage of 
basic tasks. 
To cause the BRE to utilize basic tasks only, it is only allowed to map Runnables (BSW 
MainFunctions) with same trigger conditions to one task (cyclic with same cycle time and offset). If 
there are different cycle times to be used, one task for each cycle time has to be defined. The same 
applies if different offset times shall be used. Mixing different trigger conditions can cause the BRE to 
utilize complex OS features such as extended tasks and schedule tables. 
2.1  BRE Configuration Requirements for the OS 
Once the BRE is configured, click Validate or Generate in DaVinci Configurator Pro. Activate at least 
the RTE generator (which is also used to generate the BRE code). The BRE will now update parts of 
the OS configuration based on the current configuration. To verify that only basic tasks are required by 
the BRE, check that no events are created in ‘Os/OsEvent’. 
If you do not use an OSEK configuration tool you will find the required OS configuration in the OS 
configuration within DaVinci Configurator Pro. The following OS configuration options added by the 
BRE are of importance for your non-AUTOSAR OS configuration. 
2.2  Call Cycle of Tasks 
For basic tasks the BRE implementation (see Rte.c) will invoke SetRelAlarm indicating the required 
cycle time (this is also the time configured for the main functions mapped to that task). Configure your 
non-AUTOSAR OS in a way that it invokes the task in that cycle time. 
 

Mandated OS APIs 
Assuming the BRE is configured as above, basic tasks will be used only.  
When using basic tasks, the following APIs are required by BRE and must be provided by the non-
AUTOSAR OS. The BRE implementation assumes that these APIs match the AUTOSAR OS 
standard: 

OS Tasks: As defined by the AUTOSAR OS, the BRE will utilize the TASK(x) macro when 
implementing the task. x is thereby the function name as defined in the OS configuration. If your 
OS does not provide this macro, define this or a similar macro within Os.h. 
 
 
Example 
#define TASK(x) void x##func(void) 
 
To invoke the task from your OS call:  <x>func(); 
 
 

Provision of SuspendAllInterrupts(void) and ResumeAllInterrupts(void) for critical 
section handling. These APIs shall support nested calls (i.e. lock interrupts the first time 
SuspendAllInterrupts is called, count the nesting and unlock interrupts the last time 
ResumeAllInterrupts is invoked). The API is used if 
Rte|RteBswModuleInstance|RteBswExclusiveAreaImpl|RteExclusiveAreaImplMechanism is set to 
"ALL_INTERRUPT_BLOCKING". This is the recommended setting and the default choice. 

Depending on the BRE configuration the APIs DisableAllInterrupts(void) and 
EnableAllInterrupts(void) are used that directly lock the interrupts without nesting. 
Copyright © 2016 - Vector Informatik GmbH 
3 
Contact Information:   www.vector.com   or +49-711-80 670-0 





Using RTE or BRE without AUTOSAR OS 

SetRelAlarm: Will be used to set up the cycle time and offset for (basic) tasks. You can use the 
API to enable the main function scheduling if required. If you have a simple scheduler that does 
not require dynamic alarm configuration, function may be defined to nothing within your Os.h 
implementation. Ensure the tasks are not called before the call of this API. 
 
 
Example 
#define SetRelAlarm (x, y, z) 
 
 
 
 
CancelAlarm
: API will be used to disable calling the main functions during ECU shutdown. You 
can use the API to disable the main function scheduling if required. If you have a simple scheduler 
this function may be defined to nothing within your Os.h implementation.  
 
 
Example 
#define CancelAlarm (x) 
 
 
 
 

TerminateTask: Will be called at the end of a basic task. If you have a simple scheduler this 
function may be defined to nothing within your Os.h implementation. 
 
 
Example 
#define TerminateTask() 
 
 
 
 

OS Functionality used by BRE must be published in the header Os.h. 
 

Calling of Tasks 
After the stack has been initialized (earliest after SchM_Init calling the SetRelAlarm() API) the 
Tasks have to be called by the non-AUTOSAR OS according to the defined cycle time. 

Additional Resources 
AUTOSAR STANDARD 
AUTOSAR_SWS_OS.pdf  AUTOSAR specification of OS 
AUTOSAR_SWS_RTE.pdf  AUTOSAR specification of RTE 
TECHNICAL REFERENCE 
TechnicalReference_Bre.pdf  MICROSAR BRE technical reference (available in SIP if 
BRE is being used) 

Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
Copyright © 2016 - Vector Informatik GmbH 
4 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Document Outline


1.3.10 - AN-ISC-8-1169_How_to_add_XCP_PDUs_in_DaVinciConfiguratorPro

How to add CAN XCP messages in DaVinciConfiguratorPro

1.3.11 - AN-ISC-8-1169_How_to_add_XCP_PDUs_in_DaVinciConfiguratorPro_ind

Outline
Page 1
Page 2
Page 3
Page 4

1.3.12 - AN-ISC-8-1169_How_to_add_XCP_PDUs_in_DaVinciConfiguratorPros


 
How to add CAN XCP messages in DaVinciConfiguratorPro 
Version 1.0 
2014-12-10 
Application Note  AN-ISC-8-1169 
 
  
Author(s) 
Hannes Haas 
Restrictions 
Customer confidential - Vector decides 
Abstract 
XCP PDUs are not always part of the databases provided by the vehicle manufacturer. 
This document describes how XCP PDUs can be added directly in DaVinci Configurator 
Pro. 
 
Table of Contents 

 
1.0 
Overview .......................................................................................................................................................... 2 
1.1 
BSW Module Configuration ........................................................................................................................... 2 
1.2 
ECUC Configuration ...................................................................................................................................... 2 
1.3 
CANIF Configuration ..................................................................................................................................... 3 
1.4 
XCP Configuration ......................................................................................................................................... 4 
2.0 
Additional Resources ....................................................................................................................................... 4 
3.0 
Contacts ........................................................................................................................................................... 4 
 1  
Copyright © 2014 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 



 
 
 
 
1.0  Overview 
The DaVinci Configurator Pro workflow allows adding XCP PDUs in two ways: 
•  XCP PDUs are defined in the SystemDescription or DBC/FIBEX file that has been provided by the vehicle 
manufacturer. Such files can be created or modified with Vector tools such as the AUTOSAR Network 
Explorer or CANdb++. The ECUC configuration (including the XCP PDUs) can be derived from such input 
formats. The XCP PDUs will have to be added each time a new version is received from the vehicle 
manufacturer. 
•  XCP PDUs can be created within DaVinci Configurator Pro by configuring the affected modules directly. 
These messages are independent of PDUs defined by the input formats provided by the vehicle 
manufacturer. During a database update the added PDUs will not be removed. 
 
This document describes the second approach: Adding XCP PDUs directly to the ECUC configuration. 
 
1.1  BSW Module Configuration 
This document assumes that CAN based communication (except XCP) is configured and operational.  
The names and the detailed properties are meant to be examples and can be modified as required. A general 
description how XCP is configured can be found in the technical reference of that module. 
 
1.2  ECUC Configuration 
Navigate to /MICROSAR/EcuC/EcucPduCollection 
•  Add a new (global) PDU for XCP message transmission (Tx) and message reception (Rx) 
•  Configure the PDU length to 8 bytes for both PDUs 
 
 
Figure 1 – Enter PDU Information for Rx. 
 
 
Figure 2 – Enter PDU Information for Tx 
 2  
Copyright © 2014 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 




 
 
How to add CAN XCP messages in DaVinciConfiguratorPro 
 
 
 
 
 
1.3  CANIF Configuration 
Navigate to /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg 
•  Add a new CANIF Rx PDU (CanIfRxPduCfg) 
•  Configure the CAN message: 
 
CanIfRxPduCanId 
The CAN ID that shall be use as Xcp Request ID 
CanIfRxPduCanIdType 
Type of CAN message (e.g. standard or extended addressing) 
CanIfRxPduHrhIdRef 
Hardware receive handle used to receive this message. This reference 
defines indirectly the channel the XCP message is received on. 
CanIfRxPduRef 
Reference to the global Rx PDU defined in the ECUC module (s. 1.2) 
CanIfRxPduUserRxIndicationUL 
Set this parameter to XCP 
CanIfRxPduUserRxIndicationName 
 
Will be set to Xcp_CanIfRxIndication by the configuration tool 
Figure 3 – Configure CAN Rx Message 
 
 
Navigate to /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg 
•  Add a new CANIF Tx PDU (CanIfTxPduCfg) 
•  Configure the CAN message 
 
CanIfTxPduBufferRef 
Buffering strategy. For XCP the existing default buffer (0 byte in size) 
can typically be reused. 
CanIfTxPduCanId 
The CAN ID that shall be use as Xcp Response ID 
CanIfTxPduCanIdType 
Type of CAN message (e.g. standard or extended addressing) 
CanIfTxPduDlc 
Set this parameter to 8 bytes (non CAN-FD) 
CanIfTxPduRef 
 
Reference to the global Tx PDU defined in the ECUC module (s. 1.2) 
Figure 4 – Configure CAN Tx Message 
CanIfTxPduType 
Set this parameter to STATIC 
CanIfTxPduUserTxConfirmationUL 
Set this parameter to XCP 
CanIfTxPduUserTxConfirmationName 
This parameter will be set to Xcp_CanIfTxConfirmation by the 
configuration tool 
 
 
3 
Application Note  AN-ISC-8-1169 
 





 
 
How to add CAN XCP messages in DaVinciConfiguratorPro 
 
 
 
 
 
1.4  XCP Configuration 
Navigate to the XCP settings in the basic editor 
•  Create one Rx and one Tx XCP PDU by adding choice containers (right click on the blue/yellow container, 
select Choose) below the XcpPdus node. 
 
Figure 5 – XCP Module in Basic Editor 
 
•  Configure the parameter Rx Pdu Ref and Tx Pdu Ref (screenshot looks the same for Tx) by selecting the 
global PDU that has been configured in the ECUC module (done in 1.2)
 
 
Figure 6 – Configuration of Rx Pdu Ref 
 
Figure 7 – Configuration of Tx Pdu Ref 
•  Within the XcpGeneral container, enable the flag XcpOnCanEnabled 
 
 
2.0  Additional Resources 
MICROSAR Technical References 
-  TechnicalReference_Asr_CanIf.pdf 
-  TechnicalReference_Asr_CanXcp.pdf 
-  TechnicalReference_Asr_Xcp.pdf 
-  XCP_ReferenceBook_<Version/Language>.pdf 
3.0  Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
 
4 
Application Note  AN-ISC-8-1169 
 

Document Outline


1.3.13 - AN-ISC-8-1170_Use_AR3_SWCs_in_AR4

Use AR3 SWCs in AR4

1.3.14 - AN-ISC-8-1170_Use_AR3_SWCs_in_AR4_ind

Outline
Page 1
Page 2
Page 3
Page 4

1.3.15 - AN-ISC-8-1170_Use_AR3_SWCs_in_AR4s


 
Use AR3 SWCs in AR4 
Version 1.02.00 
2015-01-16 
Application NoteAN-ISC-8-1170 
 
  
Author(s) 
Alexander Zeeb 
Restrictions 
Customer confidential - Vector decides 
Abstract 
This application note describes how to use SWC developed for AR3 in pure AR4 
environment. 
 
Table of Contents 

 
1.0 
Overview .......................................................................................................................................................... 2 
2.0 
WdgM Wrapper Service Component for AR3 Legacy SWC ............................................................................ 2 
2.1 
DaVinci Developer ......................................................................................................................................... 2 
2.2 
DaVinci Configurator Pro............................................................................................................................... 3 
2.3 
Mode Port WdgM_GlobalMode / WdgM_IndividualMode ............................................................................. 3 
3.0 
NVM Wrapper Service Component for AR3 Legacy SWC .............................................................................. 3 
3.1 
DaVinci Developer ......................................................................................................................................... 4 
3.1.1 
Port: NvMAdministration ............................................................................................................................. 4 
3.1.2 
Port: NvMService ........................................................................................................................................ 4 
4.0 
Adaptation for ECUM and COMM ................................................................................................................... 4 
4.1 
ECUM ............................................................................................................................................................ 4 
4.2 
COMM ........................................................................................................................................................... 4 
5.0 
Additional Resources ....................................................................................................................................... 4 
6.0 
Contacts ........................................................................................................................................................... 4 
 1  
Copyright © 2015 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 


 
 
 
 
1.0  Overview 
This application note describes what has to be done to integrate AR3 SWC in an AR4 environment (BSW) with as 
little adaptations as possible. Adaptations are mainly necessary if the AR3 SWC has dependencies to the 
interfaces of the modules NVM and WDGM. These modules in contrast to ECUM and COMM do not provide an 
AR3 legacy interface and hence need a wrapper component which translates between AR3 and AR4 interfaces.  
2.0  WdgM Wrapper Service Component for AR3 Legacy SWC 
The wrapper has to be designed and implemented manually and is realized by a Service Component Type in 
DaVinci Developer. This wrapper for the AR4 WDGM Service Component has to translate between the AR4 Port 
Interfaces of WDGM and the AR3 Port Interfaces of the SWC. 
Note: 
The AR4 Port Interface WdgM_AliveSupervision has a different and reduced set of Operations 
compared to AR3. AR4 does not support the de-/activation of Supervised Entities any more.  
Instead of the de/activation of Supervised Entities separately like in AR3, WDGM modes have to 
be requested- and released by the wrapper to change the state of the Supervised Entities. The 
description of these modes however is not part of this document. 
 
The wrapper component provides twice the set of Port Interfaces required by the AR3 legacy SWC: 
•  Compliant to AR3 (towards the SWC) 
•  Compliant to AR4 (towards the WDGM) 
 
Both sets have to be connected appropriately in DaVinci Configurator Pro. All necessary steps are explained in the 
following chapters. 
2.1  DaVinci Developer 
•  Create a Service C/S Port Interface WdgM_AliveSupervision with Operations according to AR3 like 
shown in the screenshot below. 
 
 
Figure 1 – AR3 C/S Port Interface WdgM_AliveSupervision 
 
Create the Service Component Type of the wrapper component: WdgM_AR3_Wrapper and assign the following 
two Port Interfaces:  
•  WdgM_AliveSupervision (AR4) Client (DWN_CS_AliveSupervision) 
•  WdgM_AliveSupervision (AR3) Server (UP_CS_AliveSupervision) 
 
Each Operation of the WdgM_AliveSupervision Server Port Prototype requires a Runnable, which is triggered on 
the corresponding Operation invocation. The Runnable of the Operation CheckpointReached can directly call the 
Operation UpdateAliveCounter.  
 2  
Copyright © 2015 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or +49-711-80 670-0 



 
 
Use AR3 SWCs in AR4 
 
 
 
 
 
Note: 
When using the UpdateAliveCounter interface, each call will trigger the report of a development 
error in case the development checks are activated within the WDGM. This is an AR feature used 
to notify the user that a deprecated functionality is used. 
 
2.2  DaVinci Configurator Pro 
The WDGM wrapper is connected between WDGM and application SWC. The SWC’s remaining WDGM Interfaces 
are connected directly with the WDGM. 
 
Figure 4 – Port Mapping in DaVinci Configurator Pro 
2.3  Mode Port WdgM_GlobalMode / WdgM_IndividualMode 
Both Mode Ports semantically describe the same modes in AR3 and AR4. The only difference is the name of those 
modes. 
AR3 
AR4 
Value 
ALIVE_OK 
SUPERVISION_OK 

ALIVE_FAILED 
SUPERVISION_FAILED 

ALIVE_EXPIRED 
SUPERVISION_EXPIRED 

ALIVE_STOPPED 
SUPERVISION_STOPPED 

ALIVE_DEACTIVATED 
SUPERVISION_DEACTIVATED  4 
Table 1 – Differences in Mode WdgM_GlobalMode and WdgM_IndividualMode 
Since the modes are in the correct order, AR3- and AR4 Mode Ports are compatible from a functional point of view.  
Note: 
The different naming can also be a reason for using the wrapper. 
3.0  NVM Wrapper Service Component for AR3 Legacy SWC 
The Port Interface of AR4 NVM is not compatible with Port Interface of AR3. Especially the return types have 
changed.  
 
3 
Application NoteAN-ISC-8-1170 
 


 
 
Use AR3 SWCs in AR4 
 
 
 
 
 
The wrapper has to be designed- and implemented manually and is realized by a Service Component Type in 
DaVinci Developer. This wrapper for the AR4 NVM Service Component translates between the AR4 Port Interfaces 
of NVM and the AR3 Port Interfaces of the SWC. 
3.1  DaVinci Developer 
3.1.1  Port: NvMAdministration 
The only Operation of this Port Interface (SetBlockProtection) changed its return value from POSSIBLE-
ERRORS(<none>) to POSSIBLE-ERRORS(E_NOT_OK). 
To meet the AR4 return value, this definition can be adapted at the require-port instance of the AR3 SWC.  
3.1.2  Port: NvMService 
Return types (POSSIBLE-ERRORS) of following Operations changed: 
•  GetErrorStatus 
•  GetDataIndex 
•  SetDataIndex 
•  SetRamBlockStatus 
 
Analog to NvMAdministration Port Interface, the SWC Port Interfaces have to be adapted to provide the new error 
codes.  
Note: In contrast to AR3, NvM_SetDataIndex can return an error in AR4 which has to be handled by the 
application. This can only happen if ‘Development Error Detection’ is enabled. 
4.0  Adaptation for ECUM and COMM 
As mentioned in chapter 1.0, ECUM and COMM both provide legacy AR3 interfaces which which has to be 
activated. Further adaptations are not required..  
4.1  ECUM 
Configure fixed-behaviour of ECUM (refer to ECUM Technical Reference: Support of EcuM fixed). 
 
4.2  COMM 
Instantiate the parameter ‘Operation GetInhibition Status Enabled’ and set this parameter to FALSE 
(/MICROSAR/ComM/ComMGeneral/ComMOperationGetInhibitionStatusEnabled). 
 
5.0  Additional Resources 
VECTOR TECHNICAL REFERENCES 
TechnicalReference_Asr_EcuM.pdf 
Technical Reference EcuM  
 
6.0  Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
 
4 
Application NoteAN-ISC-8-1170 
 

Document Outline


1.3.16 - AN-ISC-8-1184_Compiler_Warnings

Compiler Warnings

1.3.17 - AN-ISC-8-1184_Compiler_Warnings_ind

Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8

1.3.18 - AN-ISC-8-1184_Compiler_Warningss

 
Compiler Warnings 
Version 1.0 
2015-11-02 
Application Note AN-ISC-8-1184 
Author 
Andreas Raisch 
Restrictions  Customer confidential – Vector decides 
Abstract 
Warning free code is an important quality goal for embedded software. Nevertheless, 
compiler warnings can occur for highly configurable software. Typical compiler 
warnings are listed and justified within this document. 
 
 
 
 
Table of Contents 
1 
Overview ........................................................................................................................................ 2 
1.1 
Deviation Procedure ............................................................................................................ 3 
1.2 
Default BSW Delivery Process ............................................................................................ 3 
2 
Accepted Deviations ..................................................................................................................... 3 
2.1 
Unused/unreferenced parameter/argument ......................................................................... 4 
2.2 
Unused/unreferenced define, enum value ........................................................................... 4 
2.3 
Unused/unreferenced variable ............................................................................................. 4 
2.4 
Unused/unreferenced function ............................................................................................. 5 
2.5 
Condition evaluates always to true/false ............................................................................. 5 
2.6 
Unreachable code/statement ............................................................................................... 6 
2.7 
Dead assignment / variable set but not used ....................................................................... 6 
2.8 
ASM statements used .......................................................................................................... 6 
3 
Additional Resources ................................................................................................................... 7 
4 
Contacts ......................................................................................................................................... 8 
 
 
 


Compiler Warnings 
 

Overview 
MICROSAR BasicSoftware (BSW) is developed in a product line approach, independent from specific 
ECU projects or compilers. MICROSAR BSW supports the AUTOSAR MemoryAbstraction and 
CompilerAbstraction concepts and supports a huge range of different compiler vendors, versions and 
options. 
MICROSAR BSW is delivered as static source code and code generators to support the ECU project 
specific adaption and optimization of the BSW behavior and feature set based on AUTOSAR 
configuration files and user defined selections. 
Additionally, MICROSAR BSW supports compile time configuration, link time configuration and post-
build configuration. 
 
Figure 1 MICROSAR BSW Component 
A general quality goal for MICROSAR BSW is “warning free code”. The coding style guide for 
MICROSAR BSW is based on MISRA-C:2004. Checks for MISRA compliance are an essential part of 
our development process. Based on “HIS Gemeinsames Subset der MISRA C Guidelines v2.0“ 
(http://www.automotive-his.de) all rules are active. 
Nevertheless, we accept deviations to the “warning free code” goal based on the here defined list of 
exceptions. Known and accepted deviations are reported within the delivery as ESCAN type “Warning 
in released product”. 
Document [2] explains the relationship between user-selected code generation (optimization) options 
and compiler warnings. 
 
Copyright © 2015 - Vector Informatik GmbH 
2 
Contact Information:   www.vector.com   or +49-711-80 670-0 


Compiler Warnings 
 
1.1  Deviation Procedure 
Priority  Rule 
Rationale 
MICROSAR BSW shall be compiler 
Detection of compiler warning either during 
warning free. Thus, compiler warnings 
component development or more frequently 

shall be prevented wherever possible. 
when applying the customer specific 
compiler/options/BSW configuration during 
the delivery tests. 
If a compiler warning is detected, the code  We want to prevent to deliver defect code to 
shall be analyzed and, if reasonable, be 
our customers. We also need to take into 

changed/extended to become warning 
account e.g. runtime efficiency, maintainability 
free. 
and standardized code for many use-cases. 
If fixing the compiler warning is not a 
See list of accepted deviations in this 
solution, an ESCAN of type “Warning in 
document. 

released product” shall be created to 
document the accepted deviation also in 
the report of known issues of deliveries. 
Table 1 Priority of measures to prevent compiler warnings 
 
1.2  Default BSW Delivery Process 
The configuration and compilation and linkage during the delivery test activities yield most of the 
compiler warnings, because the development tool chain and settings specified by you are used. 
The process in short is: 

Customer specifies the compiler brand, version and options (via Questionnaire) and provides 
more information on the expected use-case 

Delivery engineer creates example configurations of the BSW and compiles and links the outcome 

Compiler warnings are analyzed and either documented as ESCAN of type “Warning in released 
product” or reported to the development teams to trigger a fix. 

ESCANs of type “Issue in released product” and “Warning in released product” are reported within 
the delivery documentation as “known issues” 
 

Accepted Deviations  
Deviations in this chapter are typically accepted as “Warning in released product” when  

it has been checked that no incorrect behavior at ECU runtime occurs 

no simple remedy exists 
 
 
Information 
If a compiler warning has passed the analyzing steps according Table 1 Priority of 
 
measures to prevent compiler warnings and the result is still “accepted deviation”, the 
compiler warning will not be fixed in the product.  
 
 
 
Copyright © 2015 - Vector Informatik GmbH 
3 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Compiler Warnings 
 
2.1  Unused/unreferenced parameter/argument 
Deviation ID 
CW_001 
Example compiler  „Unreferenced formal parameters“, „parameter is never used“, „has no-used 
warning strings 
argument“ 
BSW provides APIs as described by standards. Not all parameters are 
Reason 
necessary and used within the function in all possible usage scenarios. 
Configuration 
Yes 
dependent 
Potential risk 
The function contains unused code. 
Code inspection has to check that the unused code is not critical concerning 
Prevention of risk 
the expected behavior. Small increase of ROM footprint is accepted. 
Workarounds for suppressing such compiler warnings often conflict with 
Note 
MISRA-C:2004, rule 14.2 (See MISRA Compliance Documentation, Deviation 
ID MD_MSR_14.2) 
Table 2 CW_001 
2.2  Unused/unreferenced define, enum value 
Deviation ID 
CW_002 
Example compiler  „Unused enumeration values“, „Unused define value“ 
warning strings 
Encapsulation of defines, enum-values and similar items for multiple complex 
Reason 
configuration data sets (via #ifdef) reduces readability and maintainability. 
Configuration 
Yes 
dependent 
Defined but never used enums or defines may decrease readability and 
Potential risk 
maintainability. 
Prevention of risk 
Execution of runtime tests with different configuration variants. 
Note 

Table 3 CW_002 
2.3  Unused/unreferenced variable 
Deviation ID 
CW_003 
„unreferenced local variable within abc.c“, „variable "abc" was declared but 
Example compiler  never referenced“, „Variables related to message supervision are set but 
warning strings 
never used“ 
Because of goal "minimize RAM footprint", unused variables shall be disabled 
via #ifdef based on configuration data sets.  
Reason 
Nevertheless, warning can occur for rare cases where encapsulation for 
multiple complex configuration data sets (via #ifdef) reduces readability and 
maintainability. 
Configuration 
Yes 
dependent 
Potential risk 
The function contains unused code. 
Code inspection has to check that the unused variable is not critical 
Prevention of risk 
concerning the expected behavior. Small increase of RAM footprint is 
accepted. 
Note 

Table 4 CW_003 
Copyright © 2015 - Vector Informatik GmbH 
4 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Compiler Warnings 
 
2.4  Unused/unreferenced function 
Deviation ID 
CW_004 
Example compiler  „Declared but unused function abc“, „unused static function abc“ 
warning strings 
BSW provides APIs as described by standard. 
Because of goal "minimize ROM footprint", unused functions shall be 
disabled via #ifdef based on configuration data sets.  
Reason 
Not all provided functions might be used in the concrete ECU project 
(configuration and usage dependent). Encapsulation for multiple complex 
configuration data sets (via #ifdef) reduces readability and maintainability and 
is thus not provided on a per-function base for all APIs. 
Configuration 
Yes 
dependent 
Potential risk 
The project contains unused code. 
Prevention of risk 
See “Reason” 
Partly addressed by MISRA-C:2004, rule 8.10 (See MISRA Compliance 
Note 
Documentation, Deviation ID MD_MSR_8.10) 
Table 5 CW_004 
2.5  Condition evaluates always to true/false 
Deviation ID 
CW_005 
„conditional expression is constant“, „conditional expression or part of it is 
Example compiler  always true/false / statement not reached“, „condition is always true/false“, 
warning strings 
„compare out of range / condition is always true/false“, „The result of this 
logical operation is always 'false' or ‘true’“ 
Typically caused by an if-statement applied on external configuration data. 
Reason 
Configuration data is const for the given compilation context but might be 
changed at link-time or post-build time. 
Configuration 
Yes 
dependent 
Potential risk 
The function contains useless conditions with possibly dead code. 
The code inspection is in charge to distinguish between useless conditions 
Prevention of risk 
with possibly dead code and correct code as described in “reason”. 
Note 

Table 6 CW_005 
Copyright © 2015 - Vector Informatik GmbH 
5 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Compiler Warnings 
 
2.6  Unreachable code/statement 
Deviation ID 
CW_006 
„conditional expression or part of it is always true/false / statement not 
Example compiler  reached“, „statement will never be executed“, „this switch default label is 
warning strings 
unreachable“ 
Because of goal "minimize ROM footprint", unreachable code shall be 
disabled via #ifdef based on configuration data sets. 
Reason 
Nevertheless, warning might occur as secondary effect on e.g. "condition 
evaluates to true/false" 
Configuration 
Yes 
dependent 
Potential risk 
The function contains unused code. 
Code inspection has to check that the unused code is not critical concerning 
Prevention of risk 
the expected behavior. Small increase of ROM footprint is accepted. 
Addressed by MISRA-C:2004, rule 14.1 (See MISRA Compliance 
Note 
Documentation, Deviation ID MD_MSR_14.1) 
Table 7 CW_006 
2.7  Dead assignment / variable set but not used 
Deviation ID 
CW_007 
“Variable 'abc' was set but never used“, „"local variable is initialized but not 
Example compiler  referenced", „dead assignment to "abc" eliminated“, „Dead assignment 
warning strings 
(subtraction with zero)“, „Removed dead assignment“ 
Variable shall be always assigned a valid value. Overwriting the value before 
Reason 
use can therefore happen based on the assumed execution path. 
Configuration 
Yes 
dependent 
Potential risk 
The function contains unused code and variables. 
Code inspection has to check that the unused code is not critical concerning 
Prevention of risk 
the expected behavior. Small increase of ROM/RAM footprint is accepted. 
Note 

Table 8 CW_007 
2.8  ASM statements used 
Deviation ID 
CW_008 
Example compiler  “asm statements used“ 
warning strings 
MICROSAR is written in C but might use compiler specific ASM statements in 
Reason 
rare cases. Usage of ASM is strictly limited by coding style guide. 
Configuration 
No 
dependent 
Potential risk 
ASM syntax is compiler and compiler version dependent. 
Prevention of risk 
Component release test and delivery test shows correct behavior. 
Note 

Table 9 CW_008 
Copyright © 2015 - Vector Informatik GmbH 
6 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Compiler Warnings 
 

Additional Resources 
No 
Source 
Title 
Version 
Compliance Documentation MISRA
2.3.0 or later
[1]
-C:2004 / 
 
 
Vector 
MICROSAR 
[2] 
Vector 
Technical Reference MICROSAR ComStackLib 
2.0.0 or later 
 
 
 
 
Copyright © 2015 - Vector Informatik GmbH 
7 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Compiler Warnings 
 

Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
 
 
 
 
 
   
Copyright © 2015 - Vector Informatik GmbH 
8 
Contact Information:   www.vector.com   or +49-711-80 670-0 

1.3.19 - AN-ISC-8-1189_Vehicle_System_Group_Support

Vehicle System Group Support

1.3.20 - AN-ISC-8-1189_Vehicle_System_Group_Support_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5

1.3.21 - AN-ISC-8-1189_Vehicle_System_Group_Supports


 
 
Vehicle System Group Support 
Version 1.0.0 
2016-02-26 
Application Note AN-ISC-8-1189 
Author 
Wigbert Knape 
Restrictions 
Customer Confidential – Ford only 
Abstract 
Support of Vehicle System Groups in MICROSAR DCM/DEM BSW modules 
 
 
 
 
Table of Contents 
1 
Overview ........................................................................................................................................ 2 
2 
Vehicle System Groups ................................................................................................................ 2 
2.1 

Configuration With CANdelaStudio ...................................................................................... 2 
2.2 
Configuration with ODX ....................................................................................................... 2 
3 
Support in MICROSAR .................................................................................................................. 3 
3.1 

Vehicle System Groups for DTCs ........................................................................................ 3 
3.2 
Vehicle System Groups for diagnostic services ................................................................... 4 
4 
Additional Resources ................................................................................................................... 5 
5 
Contacts ......................................................................................................................................... 5 
 
 



Vehicle System Group Support 

Overview 
This document describes the supported vehicle system groups (VSG) capability of the Vector 
MICROSAR R14 BSW modules DCM and DEM.  

Vehicle System Groups 
Vehicle system groups define a set of diagnostic functions, such as services, DIDs or DTCs which are 
meant to be activated or deactivated at runtime (post build selectable). They can be defined in: 

CANdelaStudio, using the Vehicle System Groups tab  

ODX V2.2.0, using SUB-COMPONENT elements  
2.1  Configuration With CANdelaStudio 
CANdelaStudio provides the direct editor option Vehicle System Groups. The configured 
data is stored within the CDD file. 
 
Figure 2-1 
Vehicle System Groups in CANdelaStudio 
 
Use the tab Assigned Diagnostic Instances and Job Containers to add references to existing 
diagnostic services, e.g. to define references to ReadDataByIdentifier services. Use the tab Assigned 
DTCs
 to define references to DTCs. 
2.2  Configuration With ODX 
ODX 2.2.0 provides the xml elements SUB-COMPONENT to define vehicle system groups: 
Copyright © 2016 - Vector Informatik GmbH 
2 
Contact Information:   www.vector.com   or +49-711-80 670-0 




Vehicle System Group Support 
 
Figure 2-2 
SUB-COMPONENTS modelling in ODX 
 

Support in MICROSAR 
DaVinci Configurator 5 reads configured vehicle system groups via diagnostic data import and 
provides post build selectable diagnostic functions in the BSW software. 
 
Figure 3-1 
Diagnostic Fileset Configuration 
3.1  Vehicle System Groups for DTCs 
The complex device driver Vsg is used to select / deselect DTCs at a post build time. The Vsg 
provides a VsgItem container for each used vehicle system group. Inside this container a definition of 
multiple Dem Event Parameter Ref entries can be provided. Each Dem Event Parameter Ref 
references a DemEvent in the DEM module. 
The DaVinci Configurator 5 diagnostic data import automatically sets the Vsg configuration based on 
the imported CDD or ODX file. The import will create a VsgItem for each Vehicle System Group in the 
input file and creates for each DTC in the imported vehicle system group one DTC reference entry. 
Copyright © 2016 - Vector Informatik GmbH 
3 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Vehicle System Group Support 
 
 
Figure 3-2 
VehicleSystemGroup1 
At runtime an application shall call the Vsg APIs: Vsg_EnableVsg() or Vsg_DisableVsg(), to 
switch a given vehicle system group on or off.  
If a given vehicle system group is switched off, all DTCs referenced by the vehicle system group are 
treated as if they would not be present in the ECU. For further information see 
TechnicalReference_Cdd_Asr4DiagVsg.pdf. 
3.2  Vehicle System Groups for diagnostic services 
Vehicle system group support is provided for 

Services 

Subfunctions 

DIDs and DID operations (read/write) 

RIDs and RID operations (Start, Stop, Result) 

OBD: PIDs, MIDs 
It is the application’s responsibility to decide which service shall be available at runtime. The following 
APIs are provided:  
ServiceRequestManufacturerNotification_<SWC>_<Operation>  
Dcm_FilterDidLookUpResult  
Dcm_FilterRidLookUpResult 
to the application to implement a customer diagnostic service filter. For DIDs, DID operations and 
RIDs the extension APIs Dcm_FilterXXX are provided. All other uses cases shall be implemented, 
using the ServiceRequestNotification service interface. 
Example to disable the DID 0x1234 read  and DID 0x5678 write operation: 
Copyright © 2016 - Vector Informatik GmbH 
4 
Contact Information:   www.vector.com   or +49-711-80 670-0 


Vehicle System Group Support 
 
FUNC(Std_ReturnType, DCM_CODE) Dcm_FilterDidLookUpResult(Dcm_OpStatusType OpStatus, uint16 
Did, Dcm_DidOpType DidOperation) 

  Std_ReturnType result; 
 
  result = E_OK;    /* As default all DIDs and operations are supported, disabling is 
                       done selective on operation and DID */ 
 
  if (DCM_DID_OP_READ == DidOperation) 
  { 
    if (0x1234 == Did) 
    { 
      result = E_NOT_OK;  /* No read support for DID 0x1234*/ 
    } 
  } 
   
  if (DCM_DID_OP_WRITE == DidOperation) 
  { 
    if (0x5678 == Did) 
    { 
      result = E_NOT_OK;  /* No read support for DID 0x5678*/ 
    } 
  } 
 
  return result; 

 
 
For detailed information, which API is used to enable/disable a certain diagnostic function, please refer 
Table 9-8 Filter diagnostic objects and the corresponding filtering APIs / Callbacks of 
TECHNICALREFERENCE_DIAG_ASR4DCM_VECTOR.PDF. 
 
 

Additional Resources 
TECHNICALREFERENCE_CDD_ASR4DIAGVSG.PDF 
TECHNICALREFERENCE_DIAG_ASR4DCM_VECTOR.PDF 

Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
Copyright © 2016 - Vector Informatik GmbH 
5 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Document Outline


1.3.22 - AN-ISC-8-1196_Distributing_BSW_Components_across_Partitions

Distributing BSW Components across Partitions

1.3.23 - AN-ISC-8-1196_Distributing_BSW_Components_across_Partitions_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7

1.3.24 - AN-ISC-8-1196_Distributing_BSW_Components_across_Partitionss


 
 
Distributing BSW Components across Partitions 
Version 1.2 
2017-05-17 
Application Note AN-ISC-8-1196 
Author 
Wolf, Jonas 
Restrictions  Customer Confidential – Vector decides 
Abstract 
MICROSAR BSW is supposed to be executed in one memory partition (with some 
exceptions). Architectural constraints, e.g. a safety concept, may require distributing 
MICROSAR BSW across different memory partitions. This application note describes 
the general approach and common techniques for distribution. 
 
 
 
 
Table of Contents 
1 
Overview ........................................................................................................................................ 2 
2 
Introduction of Partitioning .......................................................................................................... 2 
3 
Techniques for Crossing Partitions ............................................................................................ 3 
3.1 

Trusted Functions ................................................................................................................ 3 
3.2 
Non-trusted Functions .......................................................................................................... 3 
3.3 
Inter OS Application Communicator (IOC) ........................................................................... 3 
3.4 
Sharing Data ........................................................................................................................ 3 
4 
Hooking into Interfaces ................................................................................................................ 4 
4.1 
Example Code...................................................................................................................... 6 
4.1.1  Source File of A (A\A.c) ....................................................................................................... 6 
4.1.2  Header File of B (B\B.h) ....................................................................................................... 6 
4.1.3  Source File of B (B\B.c) ....................................................................................................... 6 
4.1.4  Header File of Bmod (Bmod\Bmod.h) .................................................................................. 6 
4.1.5  Header File of Bmod (Bmod\B.h) ......................................................................................... 7 
4.1.6  Source File of Bmod (Bmod\Bmod.c) .................................................................................. 7 

5 
Additional Resources ................................................................................................................... 7 
6 
Contacts ......................................................................................................................................... 7 
 
 
 







Distributing BSW Components across Partitions 

Overview 
AUTOSAR was initially developed for single core microcontrollers without memory protection unit 
(MPU). The availability of more powerful microcontrollers and the introduction of ISO 26262 led to new 
concepts in AUTOSAR addressing these changes. 
This document provides an approach how to distribute basic software across partitions on one core. 
Distributing the basic software across different cores is out of scope of this application note. The term 
basic software is used in this application note for all software components below the Runtime 
Environment (RTE), i.e. AUTOSAR modules, like ECUM or COM as well as complex drivers (CDs). 
Above the RTE, i.e. for application software components (SWC), partitioning is usually automatically 
handled by configuration of the RTE. Thus, this is also out of scope for this application note. 
Application SWCs 
RTE 
Complex 
OS 
AUTOSAR Modules 
Drivers 
 
Figure 1-1 Basic Software 
Apart from a few exceptions it is not possible to distribute the basic software into different partitions by 
configuration. This application note describes an approach for partitioning the basic software. It details 
the available techniques for implementing the partition crossing and shows an example use-case. 
An AUTOSAR operating system with Scalability Class 3 (SC3) and an MPU is required for memory 
partitioning. The term partition and OS Application are used synonymously. 

Introduction of Partitioning 
Use the following three step approach to introduce working and effective partitioning of the basic 
software: 
1.  Define partitioning scheme 
Use the software architecture of the ECU to describe the partitions and assign all SWCs and basic 
software components to a partition. Assignment to a partition is mainly defined by your safety 
concept. Partitions can be used if software components with different quality levels are to be 
executed on one ECU. 
2.  Identify interfaces between components 
Use the information from the Technical References and the software architecture of the ECU to 
identify the interfaces between basic software components. Interfaces between software 
components are called functions and shared data. 
Make yourself aware of buffer ownership and also assign any buffers to a partition. 
3.  Select technique to implement partition crossing 
Select one of the techniques from Section 3 to implement a crossing of partitions. 
 
 
 
Copyright © 2017 - Vector Informatik GmbH 
2 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Distributing BSW Components across Partitions 
Note 
A lot of interfaces between BSW modules can be deactivated by configuration. Evaluate 
 
whether deactivation of the interface is an option and deactivate the interface if possible. 
This may especially apply for interfaces to DEM and DET. If the interface is deactivated, 
there is no need to introduce cross-partition calls. 
 
 
 

Techniques for Crossing Partitions 
3.1  Trusted Functions 
Trusted Functions are services exported by trusted applications for the use by other applications and 
are realized by the operating system (OS). Calling Trusted Functions usually implies switching from 
user mode to supervisor mode (and back when returning). 
Trusted Functions are executed on the stack of the caller. 
AUTOSAR specifies that interrupts have to be enabled when calling a Trusted Function. To ensure 
data consistency for an exclusive area in which the Trusted Function is called, OS resources can be 
used instead of disabling interrupts. This restriction does not apply to versions of Generation7 of 
MICROSAR OS. They do not require enabled interrupts when calling Trusted Functions. 
For more information on Trusted Functions see AUTOSAR SWS OS (Version 4.3, Section 8.4.4) and 
Technical Reference MICROSAR OS (e.g. Version 1.8.0, Section 3.3). 
3.2  Non-trusted Functions 
Non-trusted Functions are services exported by non-trusted OS applications for the use by other 
applications and are realized by the operating system (OS). They have the following characteristic:  

They run in user mode. 

They run with the MPU access rights of the owning OS application. 

They perform a stack switch to specific and secured Non-trusted Function stacks. 
Parameters are passed to the Non-trusted Function with a reference to a data structure provided by 
the caller. Returning of values is only possible if the caller passes the Non-trusted Functions 
parameters as pointer to global accessible data. 
3.3  Inter OS Application Communicator (IOC) 
If available in the operating system, IOC can be used to communicate between components as well. 
Since effort for configuration is higher than for the previously described techniques and there is only a 
benefit for rare use-cases, usage of IOC is not further described. The principles described for Non-
trusted Functions, Trusted Functions and hooking into interfaces (see Section 4) applies. 
3.4  Sharing Data 
It is in general not acceptable for two different partitions that comprise software of different quality 
levels to have write access to the same data in memory. Thus, usage of a shared buffer is usually 
avoided. 
An alternative is to restrict write access to the applications’ memory and use a buffer for each direction 
of communication. The sender has read and write access to the buffer. The receiver only has read 
access to the buffer. Read and write access can be enforced by configuring the MPU respectively. 
To signal updates to the sending buffer, both the sender and the receiver hold a flag. If the sender 
puts in new data it toggles the flag on sender side. The receiver can detect new data if its own flag and 
the flag of the sender differ. After reading, the receiver toggles its own flag. This way, the sender can 
Copyright © 2017 - Vector Informatik GmbH 
3 
Contact Information:   www.vector.com   or +49-711-80 670-0 





Distributing BSW Components across Partitions 
detect if data was read by the receiver. The two flags are readable from sender and receiver, but 
writable only by their respective owner. 

Hooking into Interfaces 
Usually Trusted Functions and Non-trusted Functions are not used by AUTOSAR basic software 
components. They can, however, be introduced manually by using the technique shown in the 
following example. 
There are two components A and B. A calls a function in B (B_func). Both components are assigned 
to different partitions. A is allocated to a non-trusted partition. B is allocated to a trusted partition. 
Thus, the function call from A to B needs to be redefined to a Trusted Function call. 
The original call and include graph are shown in Figure 4-1 and Figure 4-2. 
 
Figure 4-1 Original call graph 
 
Figure 4-2 Original include graph 
Redefinition of functions requires the introduction of a new component Bmod. Bmod will redefine the 
B_func to a different function name with the same signature, i.e. the Trusted Function configured in 
the operating system. In this example the Trusted Function call is named B_mod_B_func. The 
Trusted Function call in the operating system switches the memory protection to settings defined for 
the trusted application and finally calls B_func. 
Figure 4-3 shows the modified call graph. 
 
Figure 4-3 Modified call graph 
To make A call a function in Bmod instead of B, the include graph needs to modified as well. Figure 
4-4 
shows the modified include graph. 
Copyright © 2017 - Vector Informatik GmbH 
4 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Distributing BSW Components across Partitions 
 
Figure 4-4 Modified include graph 
To make this modification to the include graph the include path that pointed to B is modified to point to 
Bmod. Please note that in Bmod\B.h the include path is resolved in the header file itself and not using 
include path compiler options (see line 8 of Bmod\B.h below). 
The approach described above can also be used if no preprocessor define in the source file exists. 
The build system can also be used to set those defines individually for each source file, e.g. using the 
–D compiler option available for several compilers. All Vector components provide such a define in 
source code (see line 3 of B.c below). 
Copyright © 2017 - Vector Informatik GmbH 
5 
Contact Information:   www.vector.com   or +49-711-80 670-0 


Distributing BSW Components across Partitions 
4.1  Example Code 
4.1.1  Source File of A (A\A.c) 
#include "B.h" 
 
int A_func(void) 

    B_func(4u); 
    return 0; 

4.1.2  Header File of B (B\B.h) 
#ifndef B_H__ 
#define B_H__ 
 
typedef unsigned int btype; 
 
void B_func(btype); 
 
#endif 
4.1.3  Source File of B (B\B.c) 
#include <stdio.h> 
 
#define V_SOURCE_B 
 
#include "B.h" 
 
void B_func(btype a) 

    printf("Hallo %d\n", a); 

4.1.4  Header File of Bmod (Bmod\Bmod.h) 
#ifndef BMOD_H__ 
#define BMOD_H__ 
 
void B_mod_B_func(btype a); 
 
Copyright © 2017 - Vector Informatik GmbH 
6 
Contact Information:   www.vector.com   or +49-711-80 670-0 


Distributing BSW Components across Partitions 
#endif 
4.1.5  Header File of Bmod (Bmod\B.h) 
#ifndef BMODPROXY_H__ 
#define BMODPROXY_H__ 
 
#if !defined(V_SOURCE_B) 
# define B_func B_mod_B_func 
#endif 
 
#include "..\B\B.h" 
 
#endif 
4.1.6  Source File of Bmod (Bmod\Bmod.c) 
#include <stdio.h> 
 
/* Order of includes is important */ 
#include "..\B\B.h" 
#include "Bmod.h" 
 
 
void B_mod_B_func(btype a) 

    printf("trusted\n"); 
    B_func(a); 
    printf("non-trusted\n"); 


Additional Resources 
Intentionally left empty. 

Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
Copyright © 2017 - Vector Informatik GmbH 
7 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Document Outline


1.3.25 - AN-ISC-8-1207_Synchronization_Cry_Fls

Synchronization between AUTOSAR Cry and Fls

1.3.26 - AN-ISC-8-1207_Synchronization_Cry_Fls_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8

1.3.27 - AN-ISC-8-1207_Synchronization_Cry_Flss


 
 
Synchronization between AUTOSAR Cry and Fls 
Version 1.00.02 
2017-06-14 
Application Note AN-ISC-8-1207 
Author 
Bernhard Wissinger 
Restrictions  Customer Confidential – Vector decides 
Abstract 
AUTOSAR Crypto and Flash Driver might access a common hardware resource. This 
application note describes possible synchronization mechanisms. 
 
 
 
 
Table of Contents 
1 
Introduction ................................................................................................................................... 2 
1.1 

Access Conflict Types .......................................................................................................... 2 
2 
Use Case Description ................................................................................................................... 3 
3 
Synchronization Methods of SecOC and Fls ............................................................................. 3 
3.1 
Prevent Execution of SecOC_MainFunction ....................................................................... 4 
3.2 
Prevent Execution of Cry Function ...................................................................................... 5 
3.3 
Optimized Execution Prevention .......................................................................................... 5 
3.4 
Interrupt Fls Operation ......................................................................................................... 5 
3.5 
Asynchronous Operation of SecOC ..................................................................................... 6 
4 
Synchronization Method for Key Management .......................................................................... 8 
5 
Contacts ......................................................................................................................................... 8 
 
 
 




Synchronization between AUTOSAR Cry and Fls 

Introduction 
AUTOSAR defines Crypto Driver (Cry) and Flash Driver (Fls) as MCAL modules for independent 
hardware modules. But as the crypto module also provides key storage functionality, this is often 
implemented in the microcontroller by using a shared flash unit. This can lead to race conditions, if 
AUTOSAR Crypto Driver and Flash Driver are used concurrently. 
No Synchronization
Crypto Driver
Flash Driver
Software
Hardware

Crypto Module
Flash Module
Race Condition
Flash Memory
 
Figure 1 - Race Condition During Flash Memory Access 
This application note describes several synchronization methods and gives advice which method 
should be applied. The synchronization itself must be implemented by the application during the 
integration of the MICROSAR stack, as the used method depends on the system layout and 
requirements. 
 
 
Caution 
The occurrence and effect of the race condition heavily depends on the used 
 
microcontroller. Please double-check whether your specific hardware is affected and 
confirm whether the methods described in this application note are applicable to your 
system. 
 
 
 
 
Caution 
The examples in this application note are not thoroughly tested. The user must verify the 
 
functionality for the intended use case. Vector´s liability shall be expressly excluded to the 
extent admissible by law or statute. 
 
 
1.1  Access Conflict Types 
Table 1 lists possible access conflict types. In this application note, it is assumed that each of these 
combinations will lead to a race condition and must be prevented. E.g. even if the Crypto driver 
performs only a read access to the key (like MacVerify), a parallel read access of the flash driver to 
the hardware is not allowed. 
If the used microcontroller is less restrictive, a less restrictive synchronization scheme might be 
applied. Such optimized synchronization scheme is not covered by this application note. 
Copyright © 2017 - Vector Informatik GmbH 
2 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Synchronization between AUTOSAR Cry and Fls 
Crypto Driver 
Flash Driver 
Conflict 
Use Key (e.g. MacVerify, MacGenerate) 
Read Flash Memory 
Read / Read  
Write Key (e.g. KeyElementSet) 
Read Flash Memory 
Write / Read 
Use Key (e.g. MacVerify, MacGenerate) 
Write Flash Memory 
Read / Write 
Write Key (e.g. KeyElementSet) 
Write Flash Memory 
Write / Write 
Table 1 - Access Conflict Types 

Use Case Description 
The synchronization methods are discussed based on three different users of Crypto and Flash Driver. 
Please adapt the described concepts in case of a different use case shall be implemented. 
 
 
Caution 
The described behavior of the Fls module is implementation-specific. Please confirm this 
 
behavior for the used Fls module. 
 
 
User 
Functionality 
Call context of hardware access 
Nonvolatile Memory 
Fls: Read and Write 
Fls_MainFunction 
SecOC 
Cry: MAC Processing 
SecOC_MainFunction 
Key Management 
Cry: Key Update 
KM_MainFunction 
Table 2 - Users of Crypto Driver and Flash Driver 
The Fls is used asynchronously: the flash operation is started in Fls_MainFunction, but will be 
finished later.  
The Cry is used synchronously: the crypto hardware is idle after the execution of 
SecOC_MainFunction and KM_MainFunction is completed. 
asynchronous handling of Fls HW
Fls
Fls HW busy
Cry HW busy
conflict
Cry n
n
n
o
o
o
cti
cti
no Fls HW 
cti
n
no
n
n
n
u
u
o
access in 
u
F
cti
F
F
n
n
n
cti
this call 
n
u
n
u

cycle
Mai
F
n

Mai
F
n

Mai
C_
C_
C_
O
O
O
s_Mail
s_Mai
Sec
F
Sec
lF
Sec
cycle time
 
Figure 2 - Conflict between Fls and Cry 

Synchronization Methods of SecOC and Fls 
This chapter describes synchronization methods between Fls and Cry for the SecOC use case.  
 
 
Copyright © 2017 - Vector Informatik GmbH 
3 
Contact Information:   www.vector.com   or +49-711-80 670-0 




Synchronization between AUTOSAR Cry and Fls 
Caution 
It is assumed that Fls_MainFunction cannot interrupt 
 
SecOC_MainFunction. E.g. Fls_MainFunction is mapped to the same or a 
lower priority OS task as SecOC_MainFunction. 
 
 
Table 3 gives an overview and comparison of the different methods which are described in this 
chapter. 
Method  Characteristics 
AUTOSAR Extensions 
SecOC messages will not be sent during Fls 
None 
3.1 
operation. Especially Fls erase might take a long 
time. 
3.2 
Same as 3.1 
Cry extension “Read Start” interface 
Less impact on SecOC messages for “short” Fls 
Fls extension “GetHWStatus”
3.3
 
 
operations 
3.4 
Difficult if Suspend/Resume needs a long time 
Fls extension “Suspend/Resume” 
Fls extensions “Suspend/Resume” 
3.5 
Most complex approach 
and “asynchronous notification” 
Table 3 – Comparison Matrix 
3.1  Prevent Execution of SecOC_MainFunction 
The current state of Fls can be polled by the function Fls_GetStatus. Therefore 
SecOC_MainFunction should not be called in case Fls_GetStatus returns “busy”. 
 
 
Caution 
It is assumed that Fls_GetStatus can be called reentrant. Please confirm this behavior 
 
for the used Fls module. 
 
 
asynchronous handling of Fls HW
Fls
Fls HW busy
Cry HW busy
Cry n
s
n
o
u
o
cti
at
no Fls HW 
cti
n
no
n
n
u
St
o
access in 
u
F
cti
te
F
n
n
cti
this call 
n
u
n
u

cycle
Mai
F
n

s_Gl
F
F
n
Mai
C_
C_
O
ck 
O
s_Mai
e
l
s_Mai
Sec
F
Ch
lF
Sec
cycle time
 
Figure 3 - Prevent Execution of SecOC_MainFunction 
Copyright © 2017 - Vector Informatik GmbH 
4 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Synchronization between AUTOSAR Cry and Fls 
3.2  Prevent Execution of Cry Function 
This approach is similar to chapter 3.1. But instead of preventing the execution of 
SecOC_MainFunction, an API like Cry_XXX_DataFlashReadStart_Callout would be used. 
With the API Cry_XXX_DataFlashReadStart_Callout, the read permission is checked by the 
Cry driver: this shall be denied in case the Fls is busy. 
The SecOC_MainFunction will retry with the next cyclic call, if the parameter 
SecOCAuthenticationBuildAttempts in SecOC is set accordingly. 
 
 
Note 
The API Cry_XXX_DataFlashReadStart_Callout is not defined by AUTOSAR and 
 
might not be available for your hardware. 
 
 
 
3.3  Optimized Execution Prevention 
The API Fls_GetStatus returns the status of the Fls driver. Whereas this is implementation-specific, 
it might be only updated in context of Fls_MainFunction. Therefore it would report still “busy”, 
whereas the operation in the Fls hardware might be already finished. 
It is assumed an API like Fls_GetHWStatus is available, which reads the status of the Fls hardware 
itself. An optimized version of methods in chapter 3.1 and chapter 3.2 can be applied in this case: 

In task scheduling, SecOC_MainFunction is executed immediately before 
Fls_MainFunction. Therefore the Fls operation from the previous Fls_MainFunction might 
be already completed. 

The API Fls_GetHWStatus is used instead of Fls_GetStatus 
 
asynchronous handling of Fls HW
Fls
Fls HW busy
Fls HW busy
Cry HW busy
Cry
s
u

n
n
at
o
o
cti
cti
n
no
n
WSt
n
o
n
u
H
u
t
o
F
cti
F
cti
e
n
n
n
n
cti
u
u
n
u

Mai
F
F
n
s_G
Mai
l
n
F
F
n
C_
C_
O
O
ck 
s_Mai
e
l
s_Mail
s_Mai
Sec
F
Sec
F
Ch
lF
cycle time
 
Figure 4 - Optimized Execution Prevention 
With this approach, Cry handling is only skipped if the Fls needs a long processing time. 
3.4  Interrupt Fls Operation 
Some Fls drivers have a possibility to suspend and resume the current Fls operation. Such 
functionality is used for this approach: 

In task scheduling, SecOC_MainFunction is executed immediately before 
Fls_MainFunction. Therefore the Fls operation from the previous Fls_MainFunction might 
be already completed. 
Copyright © 2017 - Vector Informatik GmbH 
5 
Contact Information:   www.vector.com   or +49-711-80 670-0 































































Synchronization between AUTOSAR Cry and Fls 

In case Fls is busy: Fls operation is suspended before SecOC_MainFunction is called 

If Fls operation was suspended: resume Fls operation after SecOC_MainFunction is completed 
Fls
Fls suspended
Fls busy
Fls busy
Cry busy
Cry
n
n
o
o
cti
cti
n
no
n
no
u
u
F
cti
F
cti
n
n
d
n
e
n
u
n
u
Mai
F
F
n
Mai
n
spe
sum
C_
C_
e
O
O
s_Mail
s_Sul
s_Rl
s_Mail
Sec
F
F
Sec
F
F
cycle time
 
Figure 5 - Interrupt Fls Operation 
 
 
Caution 
The Fls_Suspend/Fls_Resume operation itself might need considerable time. This can 
 
lead to issues, if a high call frequency of SecOC_MainFunction of Fls_MainFunction 
is needed. 
 
 
3.5  Asynchronous Operation of SecOC 
In case Fls_Suspend/Fls_Resume needs a long processing time, a full-preemptive operating 
system might be used during waiting time. 
Appl
Task active
g
n

d
i
d
Cry
ss
shei
shei
ceo
fin
r
 
fin
d
on
 
p
d
n
e
cti
C
n
O
spe
u
ishe
F
sum
d
e
in
Su
n
f
n
i
e
R
 Sec
 
 
r
:
:

e
pe
r
Ma
r
s
in
g
e
_
sum
e
s
g
g
g
g
C
s
i
e
i
gi
e
Tr
_Su
c
Tr
cO
s
e
s_Rl
Tr
o
Fl
S
F
Pr
 
Figure 6 - Asynchronous Operation of SecOC 
SecOC_MainFunction is called by a separated extended OS task. Following example code 
illustrates the concept. 
Copyright © 2017 - Vector Informatik GmbH 
6 
Contact Information:   www.vector.com   or +49-711-80 670-0 


Synchronization between AUTOSAR Cry and Fls 
SecOC_Task: 
While(TRUE){ 
  WaitEvent(Event_TriggerSecOC);   
  If(FLS busy) { 
    Fls_Suspend(); 
    suspended=true; 
    WaitEvent(Event_SuspendFinished); 
    ClearEvent(Event_SuspendFinished); 
  } 
  ClearEvent(Event_TriggerSecOC); //clear trigger 
  SecOC_MainfunctionRx(); 
  SecOC_MainfunctionRx(); // call a 2nd time for verification retry 
  SecOC_MainfunctionTx(); 
  If(suspended){ 
    Fls_Resume(); 
    WaitEvent(Event_ResumeFinished); 
    ClearEvent(Event_ResumeFinished); 
    suspended=false; 
 }} 
The Fls must inform the SecOC_Task when Fls_Suspend/Fls_Resume is finished. 
Suspend_Finished: 
SetEvent(Event_SuspendFinished); 
Resume_Finished: 
SetEvent(Event_ResumeFinished); 
The application can trigger SecOC_Task either cyclic, or only if SecOC processing is needed.  
The transmission trigger can be obtained in following way. 
ComIPduCallout: //get transmission condition – added for all secured messages in Com 
SecOC_TxFlag=TRUE; 
After call to Com_MainFunction: 
Com_MainFunction(); 
if(SecOC_TxFlag){ // call this after Com_MainFunction 
  SecOC_TxFlag=FALSE; 
  SetEvent(Event_TriggerSecOC); //data of SecOC was prepared in Com  

The reception trigger can be obtained in following way. Please make sure the CAN driver is operated 
in interrupt mode. 
CanGenericPrecopy: // enable “CanGenericPrecopy” feature in CAN driver 
If(CANID=SecOCMessage CANID){ 
  SetEvent(Event_TriggerSecOC);  

Copyright © 2017 - Vector Informatik GmbH 
7 
Contact Information:   www.vector.com   or +49-711-80 670-0 



Synchronization between AUTOSAR Cry and Fls 
The OS Event is set before the message data is transferred to SecOC. But the SecOC_Task is 
activated only after the CAN ISR processing is finished due to OS priority handling. 

Synchronization Method for Key Management 
Synchronization between SecOC and Key Management is not needed, as both utilize the same Cry 
driver. Therefore the Cry driver should take care of this synchronization. 
 
 
Caution 
It is assumed that Fls_MainFunction cannot interrupt KM_MainFunction. E.g. 
 
Fls_MainFunction is mapped to the same or a lower priority OS task as 
KM_MainFunction. 
 
 
Synchronization of Key Management and Fls is less time critical than the synchronization between 
SecOC and Fls. Therefore simpler methods as described in chapter 3.1 and chapter 3.2 can be 
applied. 
If chapter 3.2 is applied, a callback form Cry driver which queries the write permission should be used. 
Such an API Cry_XXX_DataFlashWriteStart_Callout is implemented as an AUTOSAR 
extension for some Cry drivers developed by Vector. 

Contacts 
For a full list with all Vector locations and addresses worldwide, please visit http://vector.com/contact/. 
 
Copyright © 2017 - Vector Informatik GmbH 
8 
Contact Information:   www.vector.com   or +49-711-80 670-0 

Document Outline


1.3.28 - 2670.1_NS_LUA_Nexteer_MSR_Ford_SLP1_RH850-CBD1601056.D05

LIMITED USE SOFTWARE LICENSE AGREEMENT

1.3.29 - 2670.1_NS_LUA_Nexteer_MSR_Ford_SLP1_RH850-CBD1601056.D05_ind

Page 1
Page 2

1.3.30 - 2670.1_NS_LUA_Nexteer_MSR_Ford_SLP1_RH850-CBD1601056.D05s

LIMITED USE SOFTWARE LICENSE AGREEMENT 
 
0.1 
This Limited Use Software License Agreement (“Agreement”), effective August 3, 2018 (“Effective Date”), by 
and  between  VECTOR  NORTH  AMERICA  INC.  (f/n/a  VECTOR  CANTECH,  INC.),  a    Michigan  corporation,  having 
principal offices at 39500 Orchard Hill Place, Suite 550, Novi, Michigan 48375 (“CANtech”); VECTOR INFORMATIK 
GmbH,
  a    German  limited  liability  company,  having  principal  offices  at  Ingersheimer  Strasse  24,  D-70499  Stuttgart, 
Federal Republic of Germany (“Informatik”) (CANtech and Informatik hereafter collectively referred to as “Supplier”); 
and NEXTEER AUTOMOTIVE CORPORATION LLC, a Delaware limited liability company, having principal offices at 
3900 E. Holland Rd, Saginaw, Michigan 48601 (“Customer”). 
 
Vector  and  Licensee  hereby  agree  the  following  as  stated  in  the  SECOND  AMENDMENT  TO  THE  SOFTWARE 
LICENSE  AGREEMENT  AND  THE  GENERAL  TERMS  AND  CONDITIONS  FOR  INFORMATION  SYSTEMS  AND 
SERVICES

 
1. 

"Licensed  Software"  –  means  both  the  embedded  software  and  PC  software  specified  in  Schedule  A
together,  including,  where  applicable  but  not  limited  to,  source  code,  object  code  (including  microcode),  and  any 
revisions, derivatives, enhancements, modifications, upgrades, updates or releases relating thereto, provided or to be 
provided by Vector and all manuals, training materials, product, or other printed or electronic information relating to the 
embedded software or the PC software. 
 
2. 
Grant of Limited Use License.  Supplier is delivering the software specified in Schedule A as requested by 
Customer, under a limited use license, which is untested, non-validated, and non-warranted.  With respect to Software 
delivered  by  Supplier  to  Customer  under  limited  use  license,  during  the  term  specified  in  the  Software  Specification 
Document,  Supplier  hereby  grants  to  Customer  and  Customer  hereby  accepts  from  Supplier  a  worldwide,  non-
exclusive  and,  except  as  provided  herein,  an  irrevocable,  non-transferable  license  to  copy,  distribute,  use,  execute 
and display the delivered Generation Tool PC Software object code, the Embedded Software Source Code, as well as 
any  Source  Code  selected  therefrom  by  the  Generation  Tool  PC  Software,  which  license  shall  be  limited  to:  (i)  use 
under  the  network  protocol  specified  in  the  corresponding  Purchase  Order,  Transaction  Agreement,  or  Software 
Specification  Document  for  the  OEM  specified  in  the  corresponding  Purchase  Order,  Transaction  Agreement,  or 
Software  Specification  Document,  (ii)  use  in  Customer’s  automotive  electronic  module  research  and  development 
environment, excluding (A) any use in a mass production engine or vehicle, and (B) any use in any other applications 
including,  but  not  limited  to  network  development  or  analysis  tools  for  sale,  aerospace,  medical  applications, 
locomotive,  earth  moving  industries,  and  (iii)  use  on  the  specific  microcontroller  specified  in  the  corresponding 
Purchase  Order,  Transaction  Agreement,  or  Software  Specification  Document  with  the  compiler  version  specified  in 
the  corresponding  Purchase  Order,  Transaction  Agreement,  or  Software  Specification  Document.    Any  other  use, 
distribution, copying, execution or display of the Embedded Software or Generation Tool PC Software licensed under 
this Article 6 is expressly prohibited. 
 
4.  
CUSTOMER 
ACKNOWLEDGEMENTS 
AND 
ASSUMPTION  OF  RESPONSIBILITY.    Customer 
acknowledges and agrees that: (i) Customer is fully aware and has actual knowledge that prototype Software licensed 
under this Article 6 is untested, non-validated, non-warranted, and potentially dangerous to life, limb, and property and 
(ii)  Customer  shall  be  responsible  at  all  times  for  the  supervision,  control,  management,  condition,  development, 
configuration, testing, integration, operation and any other use of the Software in any Software environment (“Use”), 
including  without  limitation  any  Use  in  an  Electronic  Module  or  Electronic  Control  Unit  (ECU),  a  test  or  prototype 
vehicle, or an engine (whether or not the engine is used in a vehicle or a dynamometer) and any Use of the Software 
released to third parties by Customer.  
 
5. 
WARRANTY  DISCLAIMER.    AS  AN  EXPRESS  CONDITION  OF  CUSTOMER’S  USE  OF 
SOFTWARE LICENSED UNDER THIS  ARTICLE 6, CUSTOMER  ASSUMES THE ENTIRE RISK  AS TO 
THE USE AND PERFORMANCE.  SUCH SOFTWARE IS PROVIDED ‘AS IS’ WITHOUT WARRANTIES 
OF  ANY  KIND,  EITHER  EXPRESS  OR  IMPLIED,  WHETHER  WRITTEN  OR  ORAL,  INCLUDING,  BUT 
NOT  LIMITED  TO,  THE  IMPLIED  WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR  A 
PARTICULAR PURPOSE, WHICH ARE HEREBY SPECIFICALLY DISCLAIMED. 
 
 
6. 
LIMITATION  OF  LIABILITY  AND  INDEMNIFICATION.  EXCEPT  FOR  A  BREACH  OF  THE 
REPRESENTATION AND WARRANTY OF NO INFRINGEMENT OR MISAPPROPRIATION SET FORTH 
IN  SECTION  3.2(c)  AND  FOR  SUPPLIER'S  INDEMNITY  OBLIGATION  IN  SECTION  7.1(a)  OF  THE 
TERMS AND CONDITIONS, SUPPLIER SHALL NOT BE LIABLE TO CUSTOMER FOR ANY DAMAGES 
WHATSOEVER  THAT  ARISE  OR  RESULT  FROM OR  RELATE  TO  ANY  SOFTWARE  DELIVERED  BY 

 
Page 1 of 2 

LIMITED USE SOFTWARE LICENSE AGREEMENT 
 
SUPPLIER  TO  CUSTOMER  UNDER  THIS  ARTICLE  6,  INCLUDING  ANY  AMOUNTS  REPRESENTING 
DIRECT  DAMAGES,  INDIRECT  DAMAGES,  CONSEQUENTIAL  DAMAGES,  INCIDENTAL  DAMAGES, 
LOSS  OF  PROFIT,  LOSS  OF  BUSINESS,  EXEMPLARY  DAMAGES,  OR  PUNITIVE  DAMAGES  OF 
CUSTOMER  OR  ITS  AFFILIATES,  INCLUDING  COSTS  OR  DAMAGES  RELATED  TO  PRODUCT 
RECALLS, PROGRAM DEVELOPMENT/PRODUCTION DELAYS, WORK STOPPAGES, OR PRODUCT 
LIABILITY.  CUSTOMER SHALL INDEMNIFY SUPPLIER AND ITS AFFILIATES FROM AND AGAINST 
ANY AND ALL CLAIMS, LAWSUITS, AND OTHER DAMAGES, INCLUDING ATTORNEYS’ FEES, THAT 
ARISE  OR  RESULT  FROM  OR  RELATE  TO  THE  AUTHORIZED  OR  UNAUTHORIZED  USE  OR 
OPERATION  OF  THE  SOFTWARE,  INCLUDING  ANY  USE  BY  CUSTOMER’S  AFFILIATES, 
SUPPLIERS,  OR  ITS  CUSTOMERS  OR  ANY  OTHER  THIRD  PARTY  TO  WHOM  CUSTOMER  HAS 
PROVIDED THE SOFTWARE. 
 
7. 
Warning to Users.  Software provided to Customer pursuant to a Limited Use License shall contain a warning 
message,  which  is  shown  at  start  up.  The  warning  message  shall  contain  the  phrases  “Limited  Use  License-No 
Warranty” and “Not for Production Use”.” 
 
8. 

Termination.  This Agreement shall commence on the Effective Date stated above and shall continue for six 
(6) months, unless terminated automatically upon: (a) the execution by Licensee and Vector of a mutually acceptable 
Master Software License Agreement, governing Licensee’s use of the Licensed Software, or (b) Licensee’s rejection 
and return/destruction of the Licensed Software  within twelve(12) months of the Effective Date, whereupon Licensee 
shall provide Vector with satisfactory evidence of its removal from Licensee’s storage media and its return/destruction 
in  the  form  of  a  signed  statement.  Upon  termination  of  this  Agreement  pursuant  to  Section  8(b),  the  license  to  any 
Licensed  Software  hereunder  shall  automatically  and  simultaneously  terminate  and  Section  5  (Warranty  Disclaimer) 
and Section 6 (Indemnification) shall survive the termination of this Agreement.  No refunds of License Fees shall be 
given for termination of this Agreement. 
 
9. 
Entire  Agreement,  Applicable  Law.    Except  upon  termination  of  this  Agreement  pursuant  to  Section  8(a), 
this Agreement and Schedules A hereto constitute the entire agreement between Vector and Licensee and supersede 
any  prior or contemporaneous communications, representations  or agreements between  the parties,  whether oral or 
written,  regarding  the  subject  matter  of  this  Agreement  or  Schedules  A.    Licensee's  terms  and  conditions  (including 
those appearing on the front or reverse side of, or as an attachment to, a Licensee purchase order) shall not apply and 
shall be null and void.  This Agreement and Schedules A may not be changed except through a written amendment to 
this Agreement, signed by an authorized representative of each party.  This Agreement shall be governed by the laws 
of the United States of America and the State of Michigan. 
 
10. 
This Limited Use License, having an effective date set forth above in Part 0.1 hereof, shall be subject to the 
terms,  conditions,  and  limitations  of  the  Master  Software  License  Agreement  hereof,  which  are  hereby  incorporated 
into and made a part of this Limited Use License by reference as though fully set forth herein. 
   
SCHEDULE A  –  LICENSED SOFTWARE 
 
Description & Form of Software (source code, etc.) 
License Fee 
Project:  MSR_Ford_SLP1  (BETA-SIP) Supplement  
$0.00 
 
OEM: Ford 
Micro: Renesas RH850 
Compiler: GreenHills  
 
Note:  This project is offered at no additional charge.    (Non-Production). 
 
CBD1601056 
Maintenance Update MC# 40059245 
 
 
Page 2 of 2 

1.3.31 - DeliveryDescription_CBD1601056

Delivery Description CBD1601056

Delivery Description CBD1601056

Delivery Information

Build Information

Version Information

Delivery Information

Customer Information

Package Restriction:Nexteer Automotive Corporation Package: MSR_Ford_SLP1 - ECU product, "Steering Systems" Micro: R7F701373AEABG Compiler: Green Hills 2015.1.7 (Multi 6.1.6)

This delivery contains software modules that might have different license restrictions. Please note that the usage of this delivery is restricted to the most constraining license included. Please contact Vector or check your order confirmation whenever you need further information concerning the license conditions.

License Number:CBD1601056
License Expiry Date:License does not expire
OEM:Ford
SLP:MSR_Ford_SLP1
Controller:Rh850
CAN Cell:Mcan
Compiler:GreenHills
Ordered Derivative:R7F701373AEABG
Customer Contacts:Vinod Shankar Vinod.shankar@nexteer.com

Contact address for Vector for all topics concerning this license. This includes questions and issue reports. Please inform Vector if this contact changes.

Vector Contact:Please contact your local support team (https://vector.com: Support => Request Form => Embedded Software)
Non-Disclosure:A non-disclosure agreement related to this license exists.

Delivery Information

Delivery ID:18.00.15.01.60.10.56.05.00.00

This is the unique identification number of this delivery. Please always have this number ready when contacting Vector customer support.

SIP Version:18.00.15
Delivery Number:05
Release Type:Development
Delivery Type:Supplemental delivery
Delivery Reason:ESCAN00097942 & ESCAN00097946
Vector Order Confirmation Number:5020623
Tested Derivative:R7F701373AEABG

Version Information

Component Version Information

ProjectComponentVersion
Ccl_Asr4ComMCfg5Description8.01.00
Ccl_Asr4ComMCfg5GenTool_GeneratorMsr8.01.00
Ccl_Asr4ComMCfg5Implementation8.01.00
Ccl_Asr4SmCanDescription4.09.00
Ccl_Asr4SmCanGenTool_GeneratorMsr4.04.00
Ccl_Asr4SmCanImplementation2.13.00
Cdd_Asr4DiagVsgDescription3.00.00
Cdd_Asr4DiagVsgGenTool_GeneratorMsr4.00.00
Cdd_Asr4DiagVsgImplementation2.00.00
Cdd_AsrCddCfg5Description3.00.00
Cdd_AsrCddCfg5GenTool_GeneratorMsr5.01.01
Cdd_AsrCddCfg5Implementation1.00.00
CommonAsr__CommonImpl__Compiler_Cfg1.07.02
CommonAsr__CommonImpl__MemMap1.10.00
CommonAsr__CommonImpl_CanGeneralTypes1.01.00
CommonAsr__CommonImpl_ComStackTypes4.00.03
CommonAsr__CommonImpl_StdTypes3.04.04
CommonAsr_Rh850Impl_CompAbstract_GreenHills1.01.01
CommonAsr_Rh850Impl_PlatformTypes1.02.00
Cp_Asr4XcpDescription1.00.00
Cp_Asr4XcpGenTool_GeneratorMsr1.00.01
Cp_Asr4XcpImplementation1.00.00
Cp_XcpOnCanAsrImplementation2.00.00
Diag_A2lGenApplication1.05.00
Diag_Asr4DcmDescription7.02.00
Diag_Asr4DcmGenTool_GeneratorMsr7.02.01
Diag_Asr4DcmImplementation7.02.00
Diag_Asr4DemDescription11.01.02
Diag_Asr4DemGenTool_GeneratorMsr8.01.02
Diag_Asr4DemImplementation11.01.02
Diag_AsrSwcSecAccess_FordDescription1.01.00
Diag_AsrSwcSecAccess_FordImplementation1.01.00
Diag_DataCddt_FordDiagDescription1.00.01
DrvCan__baseAsrGenTool_GeneratorMsr4.02.08
DrvCan_Mpc5700McanLlDescription4.11.01
DrvCan_Mpc5700McanLlGenTool_GeneratorMsr3.02.00
DrvCan_Rh850McanAsrGenTool_GeneratorMsr_Settings1.03.00
DrvCan_Rh850McanAsrImplementation2.09.01
DrvCry_Rh850IcumDescription1.00.00
DrvCry_Rh850IcumGenTool_GeneratorMsr1.00.00
DrvCry_Rh850IcumImplementation1.00.00
DrvTrans_Tja1043CandioAsrDescription6.04.00
DrvTrans_Tja1043CandioAsrGenTool_GeneratorMsr3.01.00
DrvTrans_Tja1043CandioAsrImplementation4.02.00
EcuC_AsrEcuCDescription3.05.01
EcuC_AsrEcuCGenTool_GeneratorMsr4.02.00
Elisa__coreApplication1.08.02
GenTool_ConfiguratorCfg5Application5.15.03
GenTool_ConfiguratorCfg5InstallationManagerApplication1.00.00
GenTool_ConfiguratorCfg5PlatformTypesApplication1.00.01
GenTool_CsAsrLegacyDb2SystemDescrApplication1.08.17
GenTool_McDataConverterApplication1.00.12
GenTool_McDataConverterGenTool_GeneratorMsr2.00.00
Gw_AsrPduRCfg5Description9.01.01
Gw_AsrPduRCfg5GenTool_GeneratorMsr11.01.01
Gw_AsrPduRCfg5Implementation9.00.02
If_Asr4IfWdDescription6.01.00
If_Asr4IfWdGenTool_GeneratorMsr2.01.00
If_Asr4IfWdImplementation5.02.00
If_AsrIfCanDescription6.13.00
If_AsrIfCanGenTool_GeneratorMsr4.04.00
If_AsrIfCanImplementation6.13.00
If_AsrIfFeeSmallSectorDescription1.01.00
If_AsrIfFeeSmallSectorGenTool_GeneratorMsr1.01.00
If_AsrIfFeeSmallSectorImplementation1.00.02
If_AsrIfMemDescription4.05.00
If_AsrIfMemGenTool_GeneratorMsr5.02.00
If_AsrIfMemImplementation3.03.01
Il_AsrComCfg5Description12.00.01
Il_AsrComCfg5GenTool_GeneratorMsr12.00.01
Il_AsrComCfg5Implementation12.00.01
Mcal_Rh850P1xCRen02Asr4SubDescription1.00.00
Mcal_Rh850P1xCRen02Asr4SubGenTool_GeneratorMsr1.00.00
Mcal_Rh850P1xCRen02Asr4SubImplementation1.00.00
MemService_AsrNvMDescription5.08.01
MemService_AsrNvMGenTool_GeneratorMsr4.03.01
MemService_AsrNvMImplementation5.06.01
MSR_Ford_SLP1Preconfig18.00.01
Nm_Asr4NmCanDescription7.03.00
Nm_Asr4NmCanGenTool_GeneratorMsr7.02.00
Nm_Asr4NmCanImplementation6.03.00
Nm_Asr4NmIfDescription10.01.00
Nm_Asr4NmIfGenTool_GeneratorMsr9.01.00
Nm_Asr4NmIfImplementation10.00.00
Os_CoreGen7GenTool_GeneratorMsr2.20.00
Os_CoreGen7Implementation2.21.00
Os_PlatformRH850Gen7Description2.20.00
Os_PlatformRH850Gen7GenTool_GeneratorMsr2.14.00
Os_PlatformRH850Gen7GenTool_GeneratorMsr_Settings2.03.00
Os_PlatformRH850Gen7Implementation2.20.00
Rte_AnalyzerApplication1.00.00
Rte_AnalyzerGenTool_GeneratorMsr0.06.00
Rte_Asr4Description4.15.00
Rte_Asr4Generator4.15.00
Rte_Asr4GenTool_GeneratorMsr4.15.00
Rte_CoreGenerator1.15.00
Rte_DaVinciBaseGenerator3.13.35
SipModificationCheckerApplication1.01.00
SysService_Asr4BswMCfg5Description9.01.01
SysService_Asr4BswMCfg5GenTool_GeneratorMsr11.00.03
SysService_Asr4BswMCfg5Implementation9.01.01
SysService_Asr4EcuMDescription8.00.02
SysService_Asr4EcuMGenTool_GeneratorMsr8.00.01
SysService_Asr4EcuMImplementation8.00.02
SysService_Asr4WdMDescription6.01.00
SysService_Asr4WdMGenTool_GeneratorMsr2.01.00
SysService_Asr4WdMImplementation5.02.00
SysService_AsrCrcDescription5.05.00
SysService_AsrCrcGenTool_GeneratorMsr3.01.00
SysService_AsrCrcImplementation5.04.00
SysService_AsrCryDescription3.00.01
SysService_AsrCryGenTool_GeneratorMsr3.00.01
SysService_AsrCryImplementation3.00.01
SysService_AsrCryFordImplementation1.00.02
SysService_AsrCsmDescription3.01.00
SysService_AsrCsmGenTool_GeneratorMsr4.01.00
SysService_AsrCsmImplementation2.02.03
SysService_AsrDetDescription10.00.00
SysService_AsrDetGenTool_GeneratorMsr10.00.01
SysService_AsrDetImplementation10.00.00
SysService_CryptoCvImpl_actCLib2.05.01
SysService_CryptoCvImpl_ESLib2.06.01
Tp_Asr4TpCanDescription3.03.01
Tp_Asr4TpCanGenTool_GeneratorMsr4.02.01
Tp_Asr4TpCanImplementation3.03.01
VStdLib_GenericAsrImplementation2.00.02

Build Information

Build Environment - Options & Versions

Compiler
Version:This Green Hills compiler uses the Edison Design Group C/C++ Front End, version 3.10.1 (Oct 21 2015 22:58:45) Copyright 1988-2007 Edison Design Group, Inc. C-RH850 2015.1.7 RELEASE VERSION: Copyright (C) 1983-2015 Green Hills Software. All Rights Reserved.
RequestedCustomerOptions:-cpu=rh850g3m -reserve_r2 -Ogeneral -large_sda -sda=all --short_enum -no_callt -ignore_callt_state_in_interrupts -inline_prologue -prepare_dispose --no_commons -g -dual_debug -delete -fhard -nofloatio -shorten_loads -shorten_moves
VectorBuildEnvironmentOptions:-DBRS_DERIVATIVE_701373 -DBRS_OSC_CLK=16 -DBRS_TIMEBASE_CLOCK=240 -DBRS_EVA_BOARD_P1XC_292PIN -DBRS_DERIVATIVE_GROUP_P1M_C -DBRS_OS_USECASE_OSGEN7 -DBRS_PLATFORM_RH850 -DBRS_COMP_GHS -DBRS_CPU_LOCAL_RAM_SIZE_CORE0=128 -DBRS_CPU_RAM_START_CORE0=0xFEDE0000 -list=lst/.lst -object_dir=obj -stderr=err\.err -c
Assembler
Version:EASE: Copyright (C) 1983-2015 Green Hills Software. All Rights Reserved. Release: Compiler v2015.1.7 Build Directory: [Directory] BTOWORKER6:c:/build_2015_1_bto/2015-10-21.2100-2015_1_bto/win32-comp-ecom Revision: [VCInfo] http://toolsvc/branches/release-branch-70-bto/src@544153 (built by build) Revision Date: Thu Oct 22 01:50:13 2015
VectorDefaultOptions:-cpu=rh850g3m
Linker
Version:This Green Hills compiler uses the Edison Design Group C/C++ Front End, version 3.10.1 (Oct 21 2015 22:58:45) Copyright 1988-2007 Edison Design Group, Inc. C-RH850 2015.1.7 RELEASE VERSION: Copyright (C) 1983-2015 Green Hills Software. All Rights Reserved.
RequestedCustomerOptions:-cpu=rh850g3m -no_callt -delete
VectorBuildEnvironmentOptions:-o .elf -map=.map -cpu=rh850g3m --preprocess_linker_directive_full -e __usr_init_c0 TestSuit.ld

1.3.32 - IssueReport_CBD1601056

website_Vector_BSW_RH850_FORD/content/en/docs/Doc/DeliveryInformation/IssueReport_CBD1601056

1.3.33 - IssueReport_CBD1601056_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
Page 26
Page 27
Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Page 41
Page 42
Page 43
Page 44
Page 45
Page 46
Page 47
Page 48
Page 49
Page 50
Page 51
Page 52
Page 53
Page 54
Page 55
Page 56
Page 57
Page 58
Page 59
Page 60
Page 61
Page 62
Page 63
Page 64
Page 65
Page 66
Page 67
Page 68
Page 69
Page 70
Page 71
Page 72
Page 73
Page 74
Page 75
Page 76
Page 77
Page 78
Page 79
Page 80
Page 81
Page 82
Page 83
Page 84
Page 85
Page 86
Page 87
Page 88
Page 89
Page 90
Page 91
Page 92
Page 93
Page 94
Page 95
Page 96
Page 97
Page 98
Page 99
Page 100
Page 101
Page 102
Page 103
Page 104
Page 105
Page 106
Page 107
Page 108
Page 109
Page 110
Page 111
Page 112
Page 113
Page 114
Page 115
Page 116
Page 117
Page 118
Page 119
Page 120
Page 121
Page 122
Page 123
Page 124
Page 125
Page 126
Page 127
Page 128
Page 129
Page 130
Page 131
Page 132
Page 133
Page 134
Page 135
Page 136
Page 137
Page 138
Page 139
Page 140
Page 141
Page 142
Page 143
Page 144
Page 145
Page 146
Page 147
Page 148
Page 149
Page 150
Page 151
Page 152
Page 153
Page 154
Page 155
Page 156
Page 157
Page 158
Page 159
Page 160
Page 161
Page 162
Page 163
Page 164
Page 165
Page 166
Page 167
Page 168
Page 169
Page 170
Page 171
Page 172
Page 173
Page 174
Page 175
Page 176
Page 177
Page 178
Page 179
Page 180
Page 181
Page 182
Page 183
Page 184
Page 185
Page 186
Page 187
Page 188
Page 189
Page 190
Page 191
Page 192
Page 193
Page 194
Page 195
Page 196
Page 197
Page 198
Page 199
Page 200
Page 201
Page 202
Page 203
Page 204
Page 205
Page 206
Page 207
Page 208
Page 209
Page 210
Page 211
Page 212
Page 213
Page 214
Page 215
Page 216
Page 217
Page 218
Page 219
Page 220
Page 221
Page 222
Page 223
Page 224
Page 225
Page 226
Page 227
Page 228
Page 229
Page 230
Page 231
Page 232
Page 233
Page 234
Page 235
Page 236
Page 237
Page 238
Page 239
Page 240
Page 241
Page 242
Page 243
Page 244
Page 245
Page 246
Page 247
Page 248
Page 249
Page 250
Page 251
Page 252
Page 253
Page 254
Page 255
Page 256
Page 257
Page 258
Page 259
Page 260
Page 261
Page 262
Page 263
Page 264
Page 265
Page 266
Page 267
Page 268
Page 269
Page 270
Page 271
Page 272
Page 273
Page 274
Page 275
Page 276
Page 277
Page 278
Page 279
Page 280
Page 281
Page 282
Page 283
Page 284
Page 285
Page 286
Page 287
Page 288
Page 289
Page 290
Page 291
Page 292
Page 293
Page 294
Page 295
Page 296
Page 297
Page 298
Page 299
Page 300
Page 301
Page 302
Page 303
Page 304
Page 305
Page 306
Page 307
Page 308
Page 309
Page 310
Page 311
Page 312
Page 313
Page 314
Page 315
Page 316
Page 317
Page 318
Page 319
Page 320
Page 321
Page 322
Page 323
Page 324
Page 325
Page 326
Page 327
Page 328
Page 329
Page 330
Page 331
Page 332
Page 333
Page 334
Page 335
Page 336
Page 337
Page 338
Page 339
Page 340
Page 341
Page 342
Page 343
Page 344
Page 345
Page 346
Page 347
Page 348
Page 349
Page 350
Page 351
Page 352
Page 353
Page 354
Page 355
Page 356
Page 357
Page 358
Page 359
Page 360
Page 361
Page 362
Page 363
Page 364
Page 365
Page 366
Page 367
Page 368
Page 369
Page 370
Page 371
Page 372
Page 373
Page 374
Page 375
Page 376
Page 377
Page 378
Page 379
Page 380
Page 381
Page 382
Page 383
Page 384
Page 385
Page 386
Page 387
Page 388
Page 389
Page 390
Page 391
Page 392
Page 393
Page 394
Page 395
Page 396
Page 397
Page 398
Page 399
Page 400
Page 401
Page 402
Page 403
Page 404
Page 405
Page 406
Page 407
Page 408
Page 409
Page 410
Page 411
Page 412
Page 413
Page 414
Page 415
Page 416
Page 417
Page 418
Page 419
Page 420
Page 421
Page 422
Page 423
Page 424
Page 425
Page 426
Page 427
Page 428
Page 429
Page 430
Page 431
Page 432
Page 433
Page 434
Page 435
Page 436
Page 437
Page 438
Page 439
Page 440

1.3.34 - IssueReport_CBD1601056s


Issue Report
License Number
Customer
CBD1601056
Nexteer Automotive Corporation
Package: MSR_Ford_SLP1 - ECU product, "Steering 
Systems"
Maintenance Expiry Date
2018-03-01
SIP Version
18.00.15
SLP
Delivery Number
MSR_Ford_SLP1
D05
Report Creation Date
2018-07-31
Contact
In case of questions or the need for an update of the basic software delivery, please contact 
Support@vector.com or your Vector contact person.
Table of Contents
1.

Introduction
1.1 Resolving Issues
1.2 Issue Classification
2.
New Issues
2.1 Safety Relevant Issues: 29
2.2 Runtime Issues without Workaround: 41
2.3 Runtime Issues with Workaround: 52
2.4 Not Released Functionality: 11
2.5 Apparent Issues: 211
2.6 Compiler Warnings: 54
3.
New Issues for Information: 0
4.
Report Legend
5.
3rd Party Software Issues
6.
Quality Management Contact
1


Issue Report
1. Introduction
1.1 Resolving Issues
Reported issues are not automatically fixed with the next update delivery.
If a reported issue shall be fixed, please contact Vector agree on the issues that can be fixed with 
upcoming deliveries. 
Please note that Vector may fix issues without explicit request.
1.2 Issue Classification
This Issue Report provides issues that have been detected since the last report. The issues have 
been classified to facilitate the assessment of their impact:
The chapter 'New Issues' lists issues that have been detected since the last report and which could 
not be excluded based on the use-case defined in the questionnaire. The issues are classified as 
follows:

Safety Related Issues: Safety related issues have impact on the functional safety of the 
software module.  If this issue interferes with the functional safety concept of the ECU, this 
module (or module configuration) must not be used for serial production in a safety-related 
project. The effect of the issue to the ECU functionality and functional safety has to be 
analyzed by the user as the software usage and its configuration is not known by Vector. The 
risk of change has also to be taken into account.

Runtime Issues without Workaround: Runtime issues without a workaround require an 
update of the software delivery in case the issue affects the ECU overall functionality. The 
effect of an issue to the ECU functionality has to be analyzed by the customer as the software 
usage and its configuration is not known by Vector. The risk of change has also to be taken 
into account.

Runtime Issues with Workaround: It is not recommended to update a delivery due to a 
runtime issue with a documented workaround. The effect of an issue to the ECU functionality 
has to be analyzed by the user as the software usage and its configuration is not known by 
Vector. The risk of change has also to be taken into account.

Not Released Functionality: Not released functionalities (BETA) are either complete 
software modules or features in the software module that have not yet passed a complete 
development cycle (they are e.g. not or only partly tested). If a BETA issue ticket affects a 
complete software module, the software module must not be used for serial production. If a 
BETA issue ticket affects a feature in the software module, the user has to ensure that all 
BETA features are disabled as indicated for the serial production release of the ECU.

Apparent Issues: Apparent issues are detected immediately when using the software 
module. If an issue does not show up while working with the software module, the ECU 
project is not affected by the issue. Apparent issues may or may not have workarounds.

Compiler Warnings: As a service we also provide the known compiler warnings. The 
occurrence of a compiler warning may depend on the used software module configuration and 
compiler settings.
The chapter 'New Issues for Information' lists issues that are not relevant for the use-case that 
has been documented in the questionnaire provided to Vector. The issues may, however, be 
relevant for other use-cases. Additionally, issues that have been accepted or are tolerated by the 
OEM (as defined in the questionnaire) are reported here.
2


Issue Report
2. New Issues
3


Issue Report
2.1 Safety Relevant Issues
Safety related issues have impact on the functional safety of the software module.  If this issue 
interferes with the functional safety concept of the ECU, this module (or module configuration) 
must not be used for serial production in a safety-related project.
The effect of the issue to the ECU functionality and functional safety has to be analyzed by the 
user as the software usage and its configuration is not known by Vector. The risk of change has 
also to be taken into account.
Index
ESCAN00095054
Compile error for arrayBased SignalGroups and UINT8_N ApplType
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00095541
Initialization of Rte_CS_WaitingTaskList triggers protection hook
Rte_Core@Generator
ESCAN00095734
Path to the analyzed files is incomplete in the generation report
Rte_Analyzer@Application
ESCAN00096055
Rte_IsUpdated reports wrong status
Rte_Core@Implementation
ESCAN00096151
IR Analyzer misses data consistency problem
GenTool_IRAnalyzer@Application
ESCAN00096202
CANTRCV_30_TJA1043_CONFIGURATION_VARIANT != 
CANTRCV_30_TJA1043_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE is 
not ensured by ElisaPlugin
DrvTrans_Tja1043CandioAsr@ElisaPlugin
ESCAN00096387
Undefined ECU behavior due to invalid index access if 
<MSN>WriteOutOfBoundsWriteProtectionStrategy is INDEX_SATURATION and 
Post Build Variance Support is true
CommonAsr_ComStackLib@GenTool_GeneratorMsr
ESCAN00096411
Undefined ECU behavior due to invalid value access in post build selectable 
configuration with more than 2 variants
CommonAsr_ComStackLib@GenTool_GeneratorMsr
ESCAN00096425
IR Analyzer misses data consistency problem
GenTool_IRAnalyzer@Application
ESCAN00096797
EcuM_Shutdown throws a DET in some multicore projects in context of 
EcuM_Shutdown() and shutdown / reset is not performed
SysService_Asr4EcuM@Doc_TechRef
ESCAN00096892
Undefined ECU behavior due to invalid index access if 
PduRWriteOutOfBoundsWriteProtectionStrategy is INDEX_SATURATION and 
Post Build Variance Support is true
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00097193
Consider AUTOSAR package for ModeDeclarationGroups to allow 
ModeDeclarationGroups with same name in different packages
Rte_Core@Implementation
ESCAN00097384
Service 0x22: Overwritten RAM behind a DCM buffer
Diag_Asr4Dcm@Implementation
ESCAN00097518
CRC32 calculations deliver wrong results
MemService_AsrNvM@Implementation
ESCAN00097644
RTE dereferences NULL_PTR after execution of a mapped server runnable
Rte_Core@Implementation
4


Issue Report
Index
ESCAN00097801
Undefined ECU behavior due to invalid index access if 
<MSN>WriteOutOfBoundsWriteProtectionStrategy is INDEX_SATURATION and 
Post Build Variance Support is true
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00097829
Service 0x22: Overwritten call stack
Diag_Asr4Dcm@Implementation
ESCAN00097901
Rx Deferred Event Cache leads to unexpected ECU behaviour under high load
Il_AsrComCfg5@Implementation
ESCAN00098374
Memory corruption during module initialization
Diag_Asr4Dem@Implementation
ESCAN00098443
SchM_Init starts triggering runnables before Rte_Start when schedule tables 
are configured
Rte_Core@Implementation
ESCAN00098513
PanicHook is called or system enters endless loop on stack overflow
Os_CoreGen7@Implementation
ESCAN00098598
Rte_Call returns invalid data
Rte_Core@Implementation
ESCAN00098617
Shutdown / Reset of a multicore ECU is not performed as expected
SysService_Asr4EcuM@Implementation
ESCAN00099129
Implicit write or read accesses do not work
Rte_Core@Implementation
ESCAN00099150
External Rte_Read does not return initial value
Rte_Core@Implementation
ESCAN00099276
Memory corruption in CompareKey
SysService_AsrCryFord@Implementation
ESCAN00099646
Schedulable entity not triggered when entity is mapped to a basic task and 
cyclic trigger implementation is set to none
Rte_Core@Implementation
ESCAN00099865
Error in Silent Analysis
Nm_Asr4NmCan@Implementation
ESCAN00099885
Runnable with mode disabling not triggered when no mode switch point is 
configured
Rte_Core@Implementation
5


Issue Report
ESCAN00095054
Compile error for arrayBased SignalGroups and 
UINT8_N ApplType

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
12.00.00
Fixed in versions:
13.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler complains about an undefined Macro and will throw the following (Ansi Compiler) or 
similar messages:
1>..\..\..\..\external\BSW\Com\Com.c(5820): error C2059: syntax error : ')'
1>..\..\..\..\external\BSW\Com\Com.c(9377): error C2059: syntax error : ')'
1>..\..\..\..\external\BSW\Com\Com.c(9489): error C2061: syntax error : identifier 
'Com_RxSignalProcessing'
1>..\..\..\..\external\BSW\Com\Com.c(9489): error C2059: syntax error : ';'
1>..\..\..\..\external\BSW\Com\Com.c(9489): error C2059: syntax error : 'type'
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/Com/ComConfig/ComSignalGroup/ComSignalGroupArrayAccess is set to TRUE and 
UINT8_N applType is only defined for those groupSignals which are contained in an array based 
signalGroup.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set /MICROSAR/Com/ComConfig/ComSignalGroup/ComSignalGroupArrayAccess to FALSE (ony 
possible when no COM Based Transformer is used)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
6


Issue Report
ESCAN00095541
Initialization of Rte_CS_WaitingTaskList triggers 
protection hook

Component@Subcomponent:
Rte_Core@Generator
First affected version:
1.13.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The system calls the protection hook.
When does this happen:
-------------------------------------------------------------------
During runtime when the system is initialized and Rte_Start is called.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains client-server calls to mapped server runnables
and when one client operation can be called from runnables from different tasks.
This only happens when the server runnable is mapped to a task from a different partition than 
the task that contains the
BSW.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create separate server ports for every task that contains a client that calls the server runnable.
Create separate client ports for every task that contains a client that calls the server runnable.
Trigger the same server runnable by all server ports.
Map all server triggers to the same task.
Please note that every server port will use a separate queue, then.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
7


Issue Report
ESCAN00095734
Path to the analyzed files is incomplete in the 
generation report

Component@Subcomponent:
Rte_Analyzer@Application
First affected version:
0.07.00
Fixed in versions:
1.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The path to the analyzed files in the analysis report is not complete
The subfolder Source is missing for the stubs
".." is missing for the RTE sources
This is only a display problem in the report. The files are still analyzed.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
All
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
During the review, it should be considered that the paths miss '..' or 'source' in analysis report.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
8


Issue Report
ESCAN00096055
Rte_IsUpdated reports wrong status
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.08.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Rte_IsUpdated reports that a data element was updated although it was not updated or it reports 
that a data element
was not updated although it was updated.
When does this happen:
-------------------------------------------------------------------
During runtime.
When a Rte_Read API that receives a signal group with enabled update status is interrupted by a 
callback or another task that also
accesses the update flags.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the all of the following conditions are true:
- data element is mapped to a signal group
- Rte_IsUpdated is enabled for the data element
- ComIPduSignalProcessing of the mapped signal group is set to DEFERRED
- the task that contains Com_MainFunctionRx cannot interrupt the task that executes the Rte_Read
When the RTE is optimized for RUNTIME, only the update status of the flag of this data element 
can be wrong.
When the RTE is optimized for MEMORY also the update status of other data elements with update 
flags can be wrong.
The problematic APIs can be found by searching for Rte_Read APIs with accesses
to Rte_*RxUpdateFlags without interrupt locks.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Either 
configure another port access in another runnable that runs in a task that can interrupt the first 
access.
Or
call Rte_Read APIs with accesses to Rte_*RxUpdateFlags that are not protected with interrupt 
locks with locked interrupts.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
9


Issue Report
ESCAN00096151
IR Analyzer misses data consistency problem
Component@Subcomponent:
GenTool_IRAnalyzer@Application
First affected version:
0.09.00
Fixed in versions:
1.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Analyzer does not report a data consistency problem.
When does this happen:
-------------------------------------------------------------------
During RTE analyzer execution.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the analyzed source code contains multiple accesses to the same global 
variable in a task and
when one access is protected with an interrupt lock and the other accesses are not protected 
although an interrupt lock would have been required.
This error only leads to a problem in the ECU, when the RTE generator generates code that 
contains this problem.
At the creation date of this ESCAN, no RTE generator problem that leads to the generation of such 
code is known. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually check whether whether accesses to global variables that are not surrounded by interrupt 
locks can be interrupted
by accesses in other tasks or callbacks.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
10


Issue Report
ESCAN00096202
CANTRCV_30_TJA1043_CONFIGURATION_VARIANT !

CANTRCV_30_TJA1043_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE 
is not ensured by ElisaPlugin

Component@Subcomponent:
DrvTrans_Tja1043CandioAsr@ElisaPlugin
First affected version:
1.00.00
Fixed in versions:
1.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The condition:
- CANTRCV_30_TJA1043_CONFIGURATION_VARIANT != 
CANTRCV_30_TJA1043_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE
in order to fulfill the COV_CANTRCV_HL_LL_TJA1043_VARCOV_SW_FEAT_NOT_SUPPORTED fully 
is not ensured by ElisaPlugin.
When does this happen:
-------------------------------------------------------------------
 (1) Always and immediately: In case of ASIL-D version of driver is applied
In which configuration does this happen:
-------------------------------------------------------------------
- Independent of configuratopn: In case of ASIL-D version of driver is applied
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Please ensure by your own that the value of CANTRCV_30_TJA1043_CONFIGURATION_VARIANT !
= CANTRCV_30_TJA1043_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE
[-> See file CanTrcv_30_Tja1043_Cfg.h]
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
11


Issue Report
ESCAN00096387
Undefined ECU behavior due to invalid index access 
if <MSN>WriteOutOfBoundsWriteProtectionStrategy 
is INDEX_SATURATION and Post Build Variance 
Support is true

Component@Subcomponent:
CommonAsr_ComStackLib@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
8.03.03, 8.07.03, 8.03.80, 8.06.01, 8.07.81, 8.05.02, 
8.07.80, 8.01.01, 8.11.00, 8.00.01, 8.04.01, 8.03.81, 8.05.80
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The issue results in an undefined behavior of the ECU due to invalid index RAM write access in the 
bounds of the array.
When does this happen:
-------------------------------------------------------------------
The issue occurs always at runtime if VAR arrays are used by the component.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the Post Build Variance Support is true in the module configuration.
AND
all component configuration data is different in variants.
AND
<MSN>WriteOutOfBoundsWriteProtectionStrategy is configured to INDEX_SATURATION.
This feature is classified by the most components with the "WARNING" "The feature must never be 
used in productive builds!".
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
IF
the component generator offers the parameter <MSN>WriteOutOfBoundsWriteProtectionStrategy 
configure it to NONE
ELSE
no workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
12


Issue Report
ESCAN00096411
Undefined ECU behavior due to invalid value access 
in post build selectable configuration with more 
than 2 variants

Component@Subcomponent:
CommonAsr_ComStackLib@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
8.07.80, 8.05.80, 8.01.01, 8.03.80, 8.05.02, 8.00.01, 
8.07.03, 8.06.01, 8.03.03, 8.04.01, 8.11.01, 8.03.81, 8.07.81
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Undefined ECU behavior due to invalid CONST value access in arrays or structs.
The effect can be for example:
- Det_ReportError is called if configured.
- Callbacks can be called or even not if intended.
- Memory can be overwritten.
When does this happen:
-------------------------------------------------------------------
Always at runtime if the condition below matches.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the Post Build Variance Support is true in the module configuration
AND
arrays and structures are of the Configuration Class PRECOMPILE or LINKTIME (Note: Even POST-
BUILD configurations have data of the Configuration Class PRECOMPILE or LINKTIME)
AND
more than 2 configured variants
AND
the data is reduced. 
(The not optimized configuration data contains the same subsets of data in multiple variants. 
This triggers a variant dependent data reduction optimization in the generator. 
Note, that this is not visible in the generated code since the not optimized configuration data is not 
output by the generator.)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
13


Issue Report
ESCAN00096425
IR Analyzer misses data consistency problem
Component@Subcomponent:
GenTool_IRAnalyzer@Application
First affected version:
0.09.00
Fixed in versions:
1.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Analyzer does not report a data consistency problem.
When does this happen:
-------------------------------------------------------------------
During RTE analyzer execution.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the analyzed source code contains an unprotected access in a callback and 
when the accesses in the tasks are protected with interrupt
locks.
This only happens when the callback runs in the context of a preemptive task that can be 
interrupted by the accesses in the other tasks.
This error only leads to a problem in the ECU, when the RTE generator generates code that 
contains this problem.
At the creation date of this ESCAN, no RTE generator problem that leads to the generation of such 
code is known. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually check whether whether accesses to global variables in the callbacks are surrounded by 
interrupt locks.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
14


Issue Report
ESCAN00096797
EcuM_Shutdown throws a DET in some multicore 
projects in context of EcuM_Shutdown() and 
shutdown / reset is not performed

Component@Subcomponent:
SysService_Asr4EcuM@Doc_TechRef
First affected version:
2.00.00
Fixed in versions:
6.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The shutdown / reset of the ECU does not work and the API EcuM_Shutdown() causes a DET with 
error id ECUM_E_MODULE_NOT_IN_PREPSHUTDOWN.
When does this happen:
-------------------------------------------------------------------
During shutdown of the ECU. Maybe this happens not all the time, this depends on special timing.
In which configuration does this happen:
-------------------------------------------------------------------
In Multicore configurations where EcuM_Shutdown() is called from the OS shutdown hook for each 
core, and the shutdown hook is not core specific.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ensure that the OS shutdown hook calls EcuM_Shutdown only on the master core respectively on 
the core which is responsible for the ECU shutdown / reset.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
15


Issue Report
ESCAN00096892
Undefined ECU behavior due to invalid index access 
if PduRWriteOutOfBoundsWriteProtectionStrategy is 
INDEX_SATURATION and Post Build Variance 
Support is true

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
8.00.00
Fixed in versions:
10.01.01, 11.01.03, 13.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The issue results in an undefined behavior of the ECU due to invalid index RAM write access in the 
bounds of the array.
When does this happen:
-------------------------------------------------------------------
The issue occurs always at runtime if VAR arrays are used by the component.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the Post Build Variance Support is true in the module configuration.
AND
all component configuration data is different in variants.
AND
PduRWriteOutOfBoundsWriteProtectionStrategy is configured to INDEX_SATURATION.
This feature is classified with the "WARNING" "The feature must never be used in productive 
builds!".
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure PduRWriteOutOfBoundsWriteProtectionStrategy to NONE.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
16


Issue Report
ESCAN00097193
Consider AUTOSAR package for 
ModeDeclarationGroups to allow 
ModeDeclarationGroups with same name in 
different packages

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Up to now, in case two mode declaration groups are located in different packages, one of them 
was picked at random. If these mode declaration groups differ, this results in a generation error or 
falsely code. Depending on the selected mode declaration group and its usage two scenarios are 
possible:
Case 1: the Perl code generates a RTE49999 error when accessing non existing modes.
Case 2: the RTE switch API might not work as expected. Runnables or tasks might not be 
activated or falsely activated. For this, the values for the mode declaration group in 
Rte_<SWC>_Type.h differ from the values of 
Rte_GetInternalModeIndex_<ModeDeclarationGroupName> function in Rte.c and <SWC> has a 
mode switch point using the mode declaration group.
When does this happen:
-------------------------------------------------------------------
Whenever the definition of the mode declaration group does not match the mode declaration 
group used. This might toggle from one generation to the next one. 
Case 1: During generation.
Case 2: During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
Mode declaration groups with the same name are located in different packages AND
a mode switch point of a connected mode port of an SWC uses mode group values (function 
Rte_GetInternalModeIndex_<ModeDeclarationGroupName> in Rte.c) which differ from the 
expected mode group values (Rte_<SWC>_Type.h)
In addition to this, the following conditions have also to be fulfilled:
Case 1: a non-existing mode is accessed.
Case 2: the accessed mode values or transition values differ.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ensure that mode group declaration names differ.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
17


Issue Report
ESCAN00097384
Service 0x22: Overwritten RAM behind a DCM buffer
Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.00.00
Fixed in versions:
9.02.00, 8.06.01
Problem Description:
18


Issue Report
ESCAN00097384
Service 0x22: Overwritten RAM behind a DCM buffer
What happens (symptoms):
-------------------------------------------------------------------
The memory location behind a DCM message buffer will be corrupted.
The possible amount of overwritten memory depends on the largest configured DID with variable 
length (up to 65533 bytes).
The possible amount of overwritten memory of a configured paged-DID is the largest configured 
DCM buffer size minus one byte.
After ECU reset, the normal operation should be possible.
When does this happen:
-------------------------------------------------------------------
Depending on the configured DCM buffer size, maximum number of DIDs per single SID 0x22 
(ReadDataByIdentifier) request, the size of the DIDs with variable length or usage of a paged-DID, 
the following sequences may cause the issue:
[Variant1]: A valid diagnostic request for SID 0x22 with single or multiple DIDs is sent, where:
- At least one of the requested DIDs is with paged-data access.
Example:
Configuration: 
- DCM buffer: 100Byte
- DID0: fixed length length: 50Byte 
- DID1: paged DID with length: 500Byte 
REQ: 0x22 DID0 DID1
 DID0: ReadData() -> application writes 50 bytes
 DID1: ReadData() -> application writes up to 100 - (1 + 2 + 50 + 2) = 45 bytes, and for 
example we assume all 45 bytes are written. But RTE copies all specified in DID1 C/S interface 
100 bytes to the passed by DCM buffer pointer. As a result: in total 55 + 100 = 155 bytes has 
been written into the DCM buffer => 55 bytes overwritten behind it.
RES(start): 0x62 DID0 [50Byte] DID1 [45Byte]
 DID1: ReadData() -> application writes subsequent data portion, leading to further RAM out-of-
boundary access with size of overwritten memory, depending on the transport layer maximum 
frame size minus one byte (e.g. CanTp using normal addressing: up to 6 bytes).
RES(continued):DID1 [continued]...
[Variant2]: A valid diagnostic request for SID 0x22 with multiple DIDs is sent, where:
- The second or any subsequent DID in the request was configured with variable length, read via C/
S PortInterface, mapped to a server runnable with OsTask mapping different than the one of the 
Dcm_MainFunction/-Worker();
AND
- For the above specified DID the application does not utilize the maximum DID size (i.e. reports 
to DCM in the corresponding C/S Xxx_ReadDataLength() operation the current DID length to be 
less than its configured maximum).
AND
- This request shall lead to NRC 0x14 if the requested DID(s) with dynamic length would utilize 
their maximum size (regardless of the server runnable entity OsTask mapping).
Example:
Configuration: 
- DCM buffer: 100Byte
- DID0: fixed length: 50Byte 
- DID1: dynamic length: up to 80Byte
- DID2: fixed length: 20Byte
SEQ1: DID1 current variable length < DID1 maximum length so that sum of all requested DID1 
19


Issue Report
ESCAN00097384
Service 0x22: Overwritten RAM behind a DCM buffer
(current) lengths including the protocol response bytes (i.e. the SID and the DIDs) fit the DCM 
buffer size
 REQ: 0x22 DID0, DID1 
 DID1: ReadDataLength() returns 20Byte
 DID0: ReadData() -> application writes 50 Byte
 DID1: ReadData() -> application writes only 20 Byte, but RTE copies all DID1 80 bytes to the 
passed by DCM buffer pointer. As a result: in total 1+2+50+2+80 = 135 Byte has been written 
into the DCM buffer =>35 bytes overwritten behind it.
 RES: 0x62 DID0 [50Byte], DID1 [20Byte]: Length = 1 + 2 + 50 + 2 + 20 = 75 fits the DCM 
buffer
SEQ2: DID1 current variable length < DID1 maximum length so that sum of all requested DID1 
(current) lengths including the protocol response bytes (i.e. the SID and the DIDs) fit the DCM 
buffer size
 REQ: 0x22 DID0, DID1, DID2
 DID1: ReadDataLength() returns 20Byte
 DID0: ReadData() -> application writes 50 Byte
 DID1: ReadData() -> application writes only 20 Byte, but RTE copies all DID1 80 bytes to the 
passed by DCM buffer pointer. As a result: in total 1+2+50+2+80 = 135 Byte has been written 
into the DCM buffer =>35 bytes overwritten behind it.
 DID2: ReadData() -> application writes 20 Byte, but this call does not overwrite memory, since 
the pointer passed to the application is calculated considering the current size of DID1 (i.e. 
20bytes).
 RES: 0x62 DID0 [50Byte], DID1 [20Byte], DID2 [20Byte] : Length = 1 + 2 + 50 + 2 + 20 +2 + 
20 = 97 fits the DCM buffer
SEQ3: DID1 variable length <= DID1 maximum length so that sum of all requested DID1 
(current) lengths including the protocol response bytes (i.e. the SID and the DIDs) does not fit the 
DCM buffer size
 REQ: 0x22 DID0, DID1 
 DID1: ReadDataLength() returns 80Byte (maximum DID1 size)
 RES: 0x7F 0x22 0x14 -->No issue, since DCM rejects the request with no data reading. Positive 
response length would be: 1 + 2 + 50 + 2 + 80 = 135 does not fit the DCM buffer => NRC 0x14
In which configuration does this happen:
-------------------------------------------------------------------
- There is an RTE used in the ECU project.
AND
- Service 0x22 is supported and handled by DCM (in Dcm_Cfg.h: #define 
DCM_SVC_22_SUPPORT_ENABLED == STD_ON)
AND
- There is at least one DID with a data element (DcmDspData) configured to:
 - support paged read access (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPCLS_READ_PAGED_ENABLED == STD_ON)
 OR
 - have variable size (in Dcm_Cfg.h: #define 
DCM_DIDMGR_STATIC_DID_OPTYPE_READ_LENGTH_ENABLED == STD_ON)
 AND
 - Service 0x22 allows more than single DID per request
AND
- The access to those data elements is configured to be via a C/S interface (in DCM ECUC: /Dcm/
DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort == 
USE_DATA_ASYNCH_CLIENT_SERVER or USE_DATA_SYNCH_CLIENT_SERVER or 
20


Issue Report
ESCAN00097384
Service 0x22: Overwritten RAM behind a DCM buffer
USE_PAGED_DATA_ASYNCH_CLIENT_SERVER)
AND 
- The server runnable entity of those data elements has OsTask mapping other than the one the 
Dcm_MainFunction/-Worker() is mapped to.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
- Avoid OsTask mapping of affected DID data element server runnable entities to let RTE optimize 
the C/S calls to simple C-function calls without data copies.
OR
- Do not use RTE C/S ports but simple callout functions (i.e. specify for DcmDspDataUsePort one 
of the applicable XXX_FNC values).
OR
 - Omit usage of paged-DIDs, increasing the DCM buffer to fit all the paged-DID data at least in a 
single DID request of SID 0x22.
 AND
 - Reduce number of DIDs allowed per single SID 0x22 request to a single DID.
 OR
 - Omit configuration of DIDs with variable size where the DID size is smaller than the configured 
maximum and will never change (i.e. the ODX /CDD file specifies the DID from diagnostic client 
side, but the ECU will always report a fixed length). 
 OR
 - Increase the DCM buffer size so that the DID with maximum variable size will always fulfill the 
equation: 
 DCM buffer size >= 1 + (N*(2 + DID maximum size))
 where N is the maximum number of DIDs allowed per single SID 0x22 request.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
21


Issue Report
ESCAN00097518
CRC32 calculations deliver wrong results
Component@Subcomponent:
MemService_AsrNvM@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
CRC32s calculated internally by NVM are not as specified by AUTOSAR, i.e. the results may differ, 
depending on number of single CRC library calls done per NVM block.
Calculated values are still CRCs, but they don't match the results from using corresponding 
standardized CRC32 calculations
Since CRC handling is done internally, this is usually not visible to users.
The issue becomes visible, if NVM's configuration changed between a write and a read request 
(see below): Data may become unreadable due to failed CRC check.
When does this happen:
-------------------------------------------------------------------
It happens at run-time during CRC calculation.
However this behavior is symmetric, i.e. calculated CRC during writes match the CRC calculated 
during reads. Data can be written and read back as expected.
In which configuration does this happen:
-------------------------------------------------------------------
It happens for all blocks having CRC (NvMBlockUseCrc) enabled, and CRC type (NvMBlockCrcType) 
was set to CRC32 .
If (in a running project), the number of "Bytes per MainFunction" (NvMCrcNumOfBytes) was 
changed, existing data become unreadable, because same data result in different CRC.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In a running project's configuration don't change the number of "Bytes per 
MainFunction" (NvMCrcNumOfBytes).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
22


Issue Report
ESCAN00097644
RTE dereferences NULL_PTR after execution of a 
mapped server runnable

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.13.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE dereferences a null pointer after a mapped server runnable has been executed.
This usually results in an os trap.
When does this happen:
-------------------------------------------------------------------
During runtime when a client with lower task priority calls a mapped server runnable with higher 
priority.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when multiple clients are connected to the same server, and the server runnable
is mapped to a task with higher priority than at least one of the clients. This happens only for
synchronous client server communication.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
- map the server runnable to a task with lower priority than the client tasks
or
- create a proxy component that forwards the client calls to the server.
To do so a server port + server runnable is created for each client.
Each client is connected to the corresponding proxy server port.
A single proxy client port is connected to the server.
The server runnables of the proxy component calls the server through the single client port.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
23


Issue Report
ESCAN00097801
Undefined ECU behavior due to invalid index access 
if <MSN>WriteOutOfBoundsWriteProtectionStrategy 
is INDEX_SATURATION and Post Build Variance 
Support is true

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
8.00.00
Fixed in versions:
13.03.03, 11.00.01, 14.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The issue results in an undefined behavior of the ECU due to invalid index RAM write access in the 
bounds of the array.
When does this happen:
-------------------------------------------------------------------
The issue occurs always at runtime if VAR arrays are used by the component.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the Post Build Variance Support is true in the module configuration.
AND
all component configuration data is different in variants.
AND
PduRWriteOutOfBoundsWriteProtectionStrategy is configured to INDEX_SATURATION.
This feature is classified with the "WARNING" "The feature must never be used in productive 
builds!".
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure PduRWriteOutOfBoundsWriteProtectionStrategy to NONE.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
24


Issue Report
ESCAN00097829
Service 0x22: Overwritten call stack
Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.06.02, 9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The call stack will be corrupted leading to indeterminable behavior.
The possible amount of overwritten memory depends on the largest configured DID.
After ECU reset, the normal operation should be possible.
When does this happen:
-------------------------------------------------------------------
- When any asynchronous DID is requested via service 0x22.
AND
- The access to the DID specific data elements is configured to be via a C/S interface (in DCM 
ECUC: /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort == 
USE_DATA_ASYNCH_CLIENT_SERVER or USE_PAGED_DATA_ASYNCH_CLIENT_SERVER)
AND
- The maximal length of that DID is larger than one byte.
AND
-The read operation of that DID is cancelled due to
 - an interruption by a request of another tester with higher priority
 OR
 - Reaching the RCR-RP limit.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x22 is supported and handled by DCM (in Dcm_Cfg.h: #define 
DCM_SVC_22_SUPPORT_ENABLED == STD_ON)
AND
- There is at least one DID with a data element (DcmDspData) configured to support paged read 
access (in Dcm_Cfg.h: #define DCM_DIDMGR_OPCLS_READ_PAGED_ENABLED == STD_ON)
AND
- The access to any data element is configured to be via a C/S interface (in DCM ECUC: /Dcm/
DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort == 
USE_DATA_ASYNCH_CLIENT_SERVER or USE_PAGED_DATA_ASYNCH_CLIENT_SERVER)
AND
 - DCM shall prioritize two or more diagnostic clients (e.g. OBD and UDS clients) (in Dcm_Cfg.h 
#define DCM_NET_PROTOCOL_PRIORITISATION_ENABLED == STD_ON)
 OR
 - RCR-RP transmission limitation is supported (in Dcm_Cfg.h #define 
DCM_DIAG_RCRRP_LIMIT_ENABLED == STD_ON)
AND
- There is an RTE used in the ECU project.
AND 
- The server runnable entity of those data elements has OsTask mapping other than the one the 
Dcm_MainFunction/-Worker() is mapped to.
 
Resolution Description:
25


Issue Report
ESCAN00097829
Service 0x22: Overwritten call stack
Workaround:
-------------------------------------------------------------------
- Avoid OS-Task mapping of affected DID data element server runnable entities to let RTE 
optimize the C/S calls to simple C-function calls without data copies.
OR
- Do not use RTE C/S ports but simple callout functions (i.e. specify for DcmDspDataUsePort one 
of the applicable XXX_FNC values).
OR
- Omit usage of paged-DIDs, increasing the DCM buffer to fit all the paged-DID data at least in a 
single DID request of SID 0x22.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00097901
Rx Deferred Event Cache leads to unexpected ECU 
behaviour under high load

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
8.01.00
Fixed in versions:
12.00.02, 13.03.03, 14.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The usage of deferred event cache leads to unexpected ECU behaviour under high load.
When does this happen:
-------------------------------------------------------------------
Error may occur during run time, whenever it's temporarily required to open the interrupt locks. It 
is most likely to occur whenever Com_RxIndication is called in high frequency. 
In which configuration does this happen:
-------------------------------------------------------------------
ComDeferredEventCacheSupport == TRUE
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
(Increase ComRxDeferredEventCacheSize
AND
increase ComRxDeferredProcessingISRLockThreshold (if configurable)
AND
increase ComRxDeferredNotificationCacheSize (if configurable))
OR
Deactivate ComDeferredEventCacheSupport
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
26


Issue Report
ESCAN00098374
Memory corruption during module initialization
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
7.00.00
Fixed in versions:
14.05.00, 12.01.05
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Undefined behavior of the ECU due to out of bounds memory write access. 
Several bytes (number depends on the configuration, see below) of the memory following 
Dem_Cfg_DebounceData[<last valid>] is overwritten.
When does this happen:
-------------------------------------------------------------------
On call of Dem_NvM_InitDebounceData.
The API is intended to be called by the NvM module in order to (re-)initialize the data in case the 
non-volatile memory has never been stored or was corrupted. 
The Dem calls the API itself in case of a changed implementation version or changed configuration 
Id.
In which configuration does this happen:
-------------------------------------------------------------------
(Any /Dem/DemConfigSet/DemEventParameter/DemEventClass/DemDebounceAlgorithmClass/
DemDebounceCounterBased/DemDebounceCounterStorage == TRUE)
AND
(Dem/DemGeneral/DemUseMemcopyMacros == TRUE)
In such a configuration the number of overwritten bytes equals the number of events requiring de-
bounce counter storage (Dem/DemConfigSet/DemEventParameter/DemEventClass/
DemDebounceAlgorithmClass/DemDebounceCounterBased/DemDebounceCounterStorage == 
TRUE).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use VStdLib implementation of Dem_MemSet (Dem/DemGeneral/DemUseMemcopyMacros == 
FALSE)
OR 
if using an own implementation of Dem_MemSet_Macro(destination_ptr, value_byte, 
length_in_byte), cast 'destination_ptr' to an uint8 pointer, before writing to it
(for using an own implementation refer to the Dem Technical Reference).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
27


Issue Report
ESCAN00098443
SchM_Init starts triggering runnables before 
Rte_Start when schedule tables are configured

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.05.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Runnables are triggered directly after SchM_Init although Rte_Start was not called, yet.
A development error RTE_E_DET_UNINIT is thrown when the uninit checks are enabled.
When does this happen:
-------------------------------------------------------------------
During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains tasks that contain schedulable entities and runnable 
entities with periodic triggers
and when the task type is configured to basic task.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the task type to extended.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
28


Issue Report
ESCAN00098513
PanicHook is called or system enters endless loop 
on stack overflow

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
1.01.07
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The PanicHook is called (if configured) while a call of the ProtectionHook would be expected.
When does this happen:
-------------------------------------------------------------------
This happens with high probability if a task, ISR or hook function has caused a stack overflow 
which was detected by the MPU.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in scalability classes SC3 and SC4 if StackMonitoring is configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
On platforms where the MPU stays active in privileged mode, StackMonitoring may be switched 
off. The ProtectionHook is called as expected for a stack overflow then. This will have no influence 
on the safety if the MPU is set up as described in the technical reference, chapter "Stack 
Supervision by MPU".
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
29


Issue Report
ESCAN00098598
Rte_Call returns invalid data
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Rte_Call returns invalid return values and output parameters because it does not wait until the 
server is executed.
When does this happen:
-------------------------------------------------------------------
During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when all of the following conditions evaluate to true:
- the configuration contains client-server calls where client and server are mapped to different 
tasks
- the server task has a smaller priority or equal priority than the client task, is mapped to another 
core or uses APIs with WaitEvent() or Schedule() calls
- the server runnable has configured server call points
- the client ports of the server runnable are not connected
Problematic APIs can be identified by searching for SetEvent calls without WaitEvent calls in the 
same Rte_Call API.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Connect unconnected client-ports.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
30


Issue Report
ESCAN00098617
Shutdown / Reset of a multicore ECU is not 
performed as expected

Component@Subcomponent:
SysService_Asr4EcuM@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A requested shutdown / reset may not be finished completely by the EcuM.
When does this happen:
-------------------------------------------------------------------
If a shutdown / reset is requested.
In which configuration does this happen:
-------------------------------------------------------------------
This can only happen on multicore devices that execute the EcuM on multiple cores with different 
levels of diagnostic coverage (e.g. a system with a core with lock-step and a core without lock-
step).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround is available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
31


Issue Report
ESCAN00099129
Implicit write or read accesses do not work
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.07.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Data passed to Rte_IWrite or Rte_IWriteRef APIs never reaches the receiver.
Rte_IRead returns invalid data.
When does this happen:
-------------------------------------------------------------------
During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple implicit accesses to the same data element
and when one access runs in a task that cannot be interrupted by other accesses to the data 
element and the other access runs
in a task that can be interrupted by other accesses.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use explicit instead of implicit communication.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
32


Issue Report
ESCAN00099150
External Rte_Read does not return initial value
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Before first reception external Rte_Read returns uninitialized data instead of initial value.
When does this happen:
-------------------------------------------------------------------
During runtime
In which configuration does this happen:
-------------------------------------------------------------------
This happens when either
a) FanIn is configured with signal specific transformation
or
b) if the data element is a primitive byte array (uint8[]) and LdCom is used without data 
transformation or E2E protection is configured for the data element.
For a) problematic Rte_Read APIs can be found by searching for accesses to a variable Rte_
_callbackId
The problem occurs when the API contains a call to ComXf_Inv and no call to 
Com_ReceiveSignalGroupArray and when
no transformer length check is contained in the API: if (Rte__Length == 0)
For b) problematic Rte_Read APIs can be found by searching for Rte_MemCpy and Rte_MemCpy32 
operations that copy from a Rte_LdCom variable that is filled in a Rte_LdComCbkRxIndication 
callback
Rte_MemCpy(*(data), Rte_LdCom_, <len>);
The problem occurs when no transformer length check is contained in the API: if (Rte__Length == 
0)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Enable data transformation.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
33


Issue Report
ESCAN00099276
Memory corruption in CompareKey
Component@Subcomponent:
SysService_AsrCryFord@Implementation
First affected version:
1.00.00
Fixed in versions:
2.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Out of bounds memory write access.
This can be detected with:
- unexpected ECU behavior.
When does this happen:
-------------------------------------------------------------------
Whenever CompareKey of the Security Access is called.
In which configuration does this happen:
-------------------------------------------------------------------
Whenever the static variable CryFord_MacSecAccessWorkSpace is not directly followed by the 
static variable CryFord_MacSecAccessVerify_Buffer in the binary. This can be seen in the map file.
If SysService_AsrCryFord@Implementation version is < 2.00.00, then 
CryFord_MacSecAccessWorkSpace is located in CryFord_Cfg.c, otherwise it is located in CryFord.lib.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Link CryFord_MacSecAccessVerify_Buffer directly behind CryFord_MacSecAccessWorkSpace.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
34


Issue Report
ESCAN00099646
Schedulable entity not triggered when entity is 
mapped to a basic task and cyclic trigger 
implementation is set to none

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.05.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A schedulable entity is not triggered by the RTE.
When does this happen:
-------------------------------------------------------------------
Always during runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when all of the following conditions are true
- the configuration contains a schedulable entity
- the schedulable entity also is a runnable entity
- the schedulable entity is mapped to a basic task
- the cyclic trigger implementation is configured to none
- the basic task also contains other entities
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure an extended task.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
35


Issue Report
ESCAN00099865
Error in Silent Analysis
Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
5.00.00
Fixed in versions:
8.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In theory an invalid channel could be used for accessing the NmState variable array. This would 
lead to an out of bounds memory write access.
NOTE: From technical point of view, this issue should not occur. Nevertheless it cannot be 
guaranteed, because there is no technical verification that the greatest index is smaller or equal to 
the array size.
When does this happen:
-------------------------------------------------------------------
Each time the NmState is written after memory initialization.
In which configuration does this happen:
-------------------------------------------------------------------
Each configuration.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Check that the CanNm_GetSizeOfChannelConfig() is never greater than the 
CANNM_NUMBER_OF_CANNM_CHANNELS.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
36


Issue Report
ESCAN00099885
Runnable with mode disabling not triggered when 
no mode switch point is configured

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.13.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A runnable with mode disabling dependency is never triggered.
When does this happen:
-------------------------------------------------------------------
Always during runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the mode machine cannot leave the initial mode because no mode switch 
points are configured and when the runnable is configured
to be active in the initial mode.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Connect the mode port and configured mode switch points.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
37


Issue Report
2.2 Runtime Issues without Workaround
Runtime issues without a workaround require an update of the software delivery in case the issue 
affects the ECU overall functionality. The effect of an issue to the ECU functionality has to be 
analyzed by the customer as the software usage and its configuration is not known by Vector. The 
risk of change has also to be taken into account.
Index
ESCAN00092995
CAN-FD message without BRS will not be received
DrvCan_Mpc5700McanLl@Implementation
ESCAN00095297
Service 0x27: Wrong prioritisation between NRC 0x24 and 0x13
Diag_Asr4Dcm@Implementation
ESCAN00095298
No transmit cancellation when calling Can_CancelTx() / 
CanIf_CancelTransmit()
DrvCan__coreAsr@Implementation
ESCAN00095778
Wrong filterInitState Value calculation
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00096100
Main function tick time resolution smaller than 1 ms is not supported
Nm_Asr4NmCan@GenTool_GeneratorMsr
ESCAN00096102
Main function tick time resolution smaller than 1 ms is not supported
Ccl_Asr4SmCan@GenTool_GeneratorMsr
ESCAN00096203
Validator: Service 0x31: Routine info byte not considered in calculation of 
positive response length for the buffer size estimation
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00096207
Service 0x27: The attempt counters only the first eight security levels are 
read at power on/reset
Diag_Asr4Dcm@Implementation
ESCAN00096247
Service 0x22/0x2A/0x2F: ECU returns invalid data
Diag_Asr4Dcm@Implementation
ESCAN00096295
Debounce data not persisted after manual NV synchronization
Diag_Asr4Dem@Implementation
ESCAN00096492
Aging counter is incremented incorrectly
Diag_Asr4Dem@Implementation
ESCAN00096547
Pending Status Bit and WIR Status Bit are reset too early / unexpectedly
Diag_Asr4Dem@Implementation
ESCAN00096776
Execution of daq lists may fail.
Cp_Asr4Xcp@Implementation
ESCAN00096960
CycleState is not stored in NvRam
Diag_Asr4Dem@Implementation
ESCAN00097111
Service 0x2C: Reading DDDID contains invalid response data
Diag_Asr4Dcm@Implementation
ESCAN00097324
Missing TxAcknowledge in configurations with multiple variants
Rte_Core@Implementation
ESCAN00097367
DAQ overrun indication not deactivateable - max PID limited to 0x7B
Cp_Asr4Xcp@Implementation
ESCAN00097699
Dem_SetWIRStatus is processed and returns E_OK for unavailable events
Diag_Asr4Dem@Implementation
ESCAN00097735
Paged-Buffer: Positive response with corrupted data
Diag_Asr4Dcm@Implementation
ESCAN00097748
Memory corruption of management information leads to dead lock of 
corresponding block
If_AsrIfFeeSmallSector@Implementation
ESCAN00097848
Dem_GetWIRStatus returns E_OK for unavailable events
Diag_Asr4Dem@Implementation
ESCAN00097849
Dem_GetEventEnableCondition returns E_OK for unavailable events
Diag_Asr4Dem@Implementation
38


Issue Report
Index
ESCAN00097850
Dem_GetEventAvailable returns AvailableStatus 'True' for events unavailable 
in variant
Diag_Asr4Dem@Implementation
ESCAN00097911
Deferred Rx PDUs are not received if ComDeferredEventCacheSupport is 
enabled
Il_AsrComCfg5@Implementation
ESCAN00097951
Wrong marshalling/ unmarshalling of <XInt64> Signals
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00098006
Declined Immediate Nm Transmissions is retried later than expected
Nm_Asr4NmCan@Implementation
ESCAN00098203
Service 0x3E: S3 timer reloaded for different protocol
Diag_Asr4Dcm@Implementation
ESCAN00098248
Immediate priority block requests during WriteAll may lead to unsuccessful 
WriteAll
MemService_AsrNvM@Implementation
ESCAN00098392
S3 timer reloaded by any request from different tester
Diag_Asr4Dcm@Implementation
ESCAN00098604
Service 0x3E: Keep-Alive timer reloaded for different protocol
Diag_Asr4Dcm@Implementation
ESCAN00098606
Keep-Alive timer reloaded by any request from different tester
Diag_Asr4Dcm@Implementation
ESCAN00098938
Unconfirmed DTCs need healing before aging
Diag_Asr4Dem@Implementation
ESCAN00099092
CONNECT will stop a running DAQ measurement from resume mode
Cp_Asr4Xcp@Implementation
ESCAN00099171
Value of 'Cycles Since First Failed' is 0
Diag_Asr4Dem@Implementation
ESCAN00099197
Wrong DLC calculation for zero bit signals
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00099383
Failure to collect data via Client/Server or Sender/Receiver R-Port results in 
random data
Diag_Asr4Dem@Implementation
ESCAN00099495
Measurement failure when more than 255 measurement values are configured 
and used
Cp_Asr4Xcp@Implementation
ESCAN00099586
ErrorFrame after startup with wakeup validation
Ccl_Asr4SmCan@Implementation
ESCAN00099742
Status block is not immediately written to NvRAM after a clear request
Diag_Asr4Dem@Implementation
ESCAN00099810
Event heals too early after displacement
Diag_Asr4Dem@Implementation
ESCAN00099905
XCP internal memory not initialized correctly in huge configurations.
Cp_Asr4Xcp@Implementation
39


Issue Report
ESCAN00092995
CAN-FD message without BRS will not be received
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.09.00
Fixed in versions:
2.12.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A CAN-FD message without Bitrate Switching will:
- not be received by the upper layers.
- produce a DET Error (CAN_E_PARAM_DLC) for messages with a DLC greater than 8 bytes.
When does this happen:
-------------------------------------------------------------------
During runtime, 
always and immediately,
when a CAN-FD message is received without Bitrate Switching (CAN-FD BRS bit) set.
In which configuration does this happen:
-------------------------------------------------------------------
Only in configurations using CAN-FD Rx messages without Bitrate switching.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
40


Issue Report
ESCAN00095297
Service 0x27: Wrong prioritisation between NRC 
0x24 and 0x13

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.00.00
Fixed in versions:
8.04.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
NRC 0x13 is responded instead of NRC 0x24.
When does this happen:
-------------------------------------------------------------------
If a seed request was expected but a too long key request was sent.
Note: An NRC 0x13 caused by the minimum length check according to ISO 14229-1:2013 Figure 6 
is not affected by this issue.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x27 is supported (in Dcm_Cfg.h: DCM_SVC_27_SUPPORT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
41


Issue Report
ESCAN00095298
No transmit cancellation when calling 
Can_CancelTx() / CanIf_CancelTransmit()

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
2.00.00
Fixed in versions:
5.03.04, 5.05.06, 5.04.04, 4.06.06, 5.06.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Calling Can_CancelTx() / CanIf_CancelTransmit() will not lead to a cancellation.
Confirmation will be unexpectedly called
When does this happen:
-------------------------------------------------------------------
Only under specific circumstances:
same send request (same PDU) is stored multiple in the basic CAN hardware object, and API 
Can_CancelTx() is called.
In which configuration does this happen:
-------------------------------------------------------------------
MicroSar4:
CanMultiplexedTransmission == true / (CAN_MULTIPLEXED_TRANSMISSION == STD_ON)
and
CanCancelSupportApi == true / (CAN_CANCEL_SUPPORT_API == STD_ON)
MicroSar3:
CanMultiplexedTransmission == true / (CAN_MULTIPLEXED_TRANSMISSION == STD_ON)
and
CanCancelSupportApi == true / (CAN_CANCEL_SUPPORT_API == STD_ON)
and
CanTP Version >= 1.11.00 && CanTP Version < 1.27.04
and
CANTP_CANCEL_TRANSMIT == STD_ON or CANTP_TC == STD_ON or CANTP_CANIF_ENABLE_TC 
== STD_ON
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
42


Issue Report
ESCAN00095778
Wrong filterInitState Value calculation
Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
13.03.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The filterInitState value is not calculated correctly and set to a wrong value.
Therefore a wrong initial TxMode (TxModeTrue / TxModeFalse) is set during initialization of COM
 
When does this happen:
-------------------------------------------------------------------
During calculation of filterInitStates for each rx or tx signal/groupSignal.
In which configuration does this happen:
-------------------------------------------------------------------
In all configs with tx or rx filter configured and filterAlgorithm is equals MASKED_NEW_EQUALS_X/
MASKED_NEW_DIFFERS_X.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
43


Issue Report
ESCAN00096100
Main function tick time resolution smaller than 1 ms 
is not supported

Component@Subcomponent:
Nm_Asr4NmCan@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
8.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
AUTOSAR defines a float data type to configure the main function tick time.
The generator truncates the configured tick time to a millisecond.
e.g. 1.5 ms tick time is configured, but the counter values generated in the code are based on a 1 
ms tick time.
As a result, wrong timer values are used by the module
When does this happen:
-------------------------------------------------------------------
always
In which configuration does this happen:
-------------------------------------------------------------------
If a main function tick time with a resolution smaller than 1 ms is configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
44


Issue Report
ESCAN00096102
Main function tick time resolution smaller than 1 ms 
is not supported

Component@Subcomponent:
Ccl_Asr4SmCan@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
AUTOSAR defines a float data type to configure the main function tick time.
The generator truncates the configured tick time to a millisecond.
e.g. 1.5 ms tick time is configured, but the counter values generated in the code are based on a 1 
ms tick time.
As a result, wrong timer values are used by the module
When does this happen:
-------------------------------------------------------------------
always
In which configuration does this happen:
-------------------------------------------------------------------
If a main function tick time with a resolution smaller than 1 ms is configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
45


Issue Report
ESCAN00096203
Validator: Service 0x31: Routine info byte not 
considered in calculation of positive response length 
for the buffer size estimation

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
7.01.00
Fixed in versions:
8.05.00, 7.02.02
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During validation of Dcm module no validation error for insufficient buffer size is displayed. 
As a result of this wrong estimation for SID 0x31 (Routine Control), a Routine C/S port may 
overwrite a single byte memory location behind the Dcm diagnostic buffer.
When does this happen:
-------------------------------------------------------------------
Configurator 5: During validation of Dcm module.
DCM code: At runtime each and every time the affected Routine is started via valid diagnostic 
request (i.e. correct format, session, security).
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x31 (RoutineControl) is handled by DCM (in Dcm_Cfg.h #define 
DCM_SVC_31_SUPPORT_ENABLED == STD_ON);
AND
- At least 1 DcmDspRoutine exists with an explicitly configured routine info byte (RIB) parameter 
 (Parameter /MICROSAR/Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRoutineInfoByte 
exists (for DCM versions 8.03.XX and older: in Dcm_Cfg.h #define 
DCM_RIDMGR_SUPPORT_ROUTINEINFOBYTE_ENABLED == STD_ON);
AND
- Routine sub-function specific length of the response data (ResDataLen) fulfills the equation: 
ResDataLen >DcmDslBufferSize - 5 (i.e. response data exceeds the remaining buffer after 
exclusion of response protocol header: SID, SF, RID and the RIB);
Note: The explicit modelling of the routine info byte is typical for OBD projects where a UDS 
Routine overlaps with an OBD one. 
 But since MSR4 DCM allows the routine info byte usage also for any Routine, the issue is not 
limited only to OBD projects
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Increase the size of all DCM buffers (DcmDslBuffer) by one byte.
Optimization hint: 
 You may adapt only those buffers that are referred by a diagnostic protocol (DcmDslProtocolRow) 
which support SID 0x31 (DcmDslProtocolRow/DcmDslProtocolSIDTable refers to a 
DcmDsdServiceTable containing diagnostic service with ID 0x31).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
46


Issue Report
ESCAN00096207
Service 0x27: The attempt counters only the first 
eight security levels are read at power on/reset

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
7.02.01, 8.05.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following scenarios are possible after ECU power on/reset for the affected security levels:
1) The DCM will accept a new "GetSeed" request instead of sending NRC 0x37 (delay time not 
expired).
OR
2) The DCM will allow more attempts prior sending the NRC 0x36 (number of attempts exceeded) 
to an invalid key. 
When does this happen:
-------------------------------------------------------------------
1) If during the last ECU operation cycle the DCM has responded with NRC 0x36 and the ECU has 
been reset/powered down while the delay time was still active (i.e. during an attempt to shorten 
the penalty delay via reboot).
2) If during the last ECU operation cycle the DCM has registered some failed unlock attempts.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x27 (SecurityAccess) is handled by DCM (in Dcm_Cfg.h #define 
DCM_SVC_27_SUPPORT_ENABLED is set to STD_ON);
AND
- The NvM storage of an security access attempt counter is required (in Dcm_Cfg.h #define 
DCM_STATE_SEC_ATT_CNTR_EXT_STORAGE_ENABLED is set to STD_ON);
AND
 - There are more than eight security levels "DcmDspSecurityRow"s configured;
 AND
 - At least one security level (DcmDspSecurityRow), starting with the ninth one, needs NvM 
storage of the attempt counter (/Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/
DcmDspSecurityRow/DcmDspSecurityAttemptCounterEnabled == TRUE);
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
47


Issue Report
ESCAN00096247
Service 0x22/0x2A/0x2F: ECU returns invalid data
Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.05.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
On valid request of services:
0x22 (ReadDataByIdentifier),
0x2A (ReadDataByPeriodicIdentifier),
0x2F (InputOutputControlByIdentifier) 
the ECU responds with expected message length, but invalid DID data (i.e. the value of the last 
DID data element is located at the beginning of the DID response record, overwriting the first N 
data bytes, where N is the last data element length).
When does this happen:
-------------------------------------------------------------------
At runtime each time a valid request of one of the above services is processed on a DID that: 
- has more than one data element;
AND
- one or more data elements after the first one have asynchronous read access;
In which configuration does this happen:
-------------------------------------------------------------------
- There is any asynchronous DID configured (in Dcm_Cfg.h: 
DCM_DIDMGR_OPCLS_READ_ASYNC_ENABLED == STD_ON) 
AND
- At least one DID with more than one data element (in Dcm_Cfg.h: 
DCM_DIDMGR_MSIG_OPTYPE_READ_ENABLED == STD_ON)
AND
 - An affected diagnostic service (i.e. 0x22/0x2A) is internally handled in DCM (in Dcm_Cfg.h: 
DCM_SVC_22_SUPPORT_ENABLED == STD_ON resp. DCM_SVC_2A_SUPPORT_ENABLED == 
STD_ON)
OR
 - Service 0x2F, is internally handled in DCM (in Dcm_Cfg.h: DCM_SVC_2F_SUPPORT_ENABLED 
== STD_ON)
 AND
 - Service 0x2F IODID has more than one data element (in Dcm.c: 
DCM_DIDMGR_MSIG_OPTYPE_IO_ANY_ENABLED == STD_ON)
 AND
 - Service 0x2F shall return the IODID data (in Dcm_Cfg.h: 
DCM_DIDMGR_IODID_READ_SUPPORT_ENABLED == STD_ON)
 AND
 - Service 0x2F refers an asynchronous IODID. (in Dcm_Cfg.h: 
DCM_DIDMGR_ASYNC_IODID_SUPPORT_ENABLED == STD_ON)
 
Resolution Description:
48


Issue Report
ESCAN00096247
Service 0x22/0x2A/0x2F: ECU returns invalid data
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00096295
Debounce data not persisted after manual NV 
synchronization

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
7.00.00
Fixed in versions:
12.01.03, 13.06.00, 10.00.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After Dem's API Dem_RequestNvSynchronization the Nvm is not informed (call of NvM_WriteBlock 
does not occur for the debounce data block) to immediately persist the counter based Debounce 
data . 
Nevertheless, in a full shutdown sequence of the ECU, debounce data are correctly persisted.
When does this happen:
-------------------------------------------------------------------
Data loss of debounce data always occurs when ECU is restarted without a full shut down 
sequence (e.g. interrupted power supply) although API Dem_RequestNvSynchronization has been 
called before.
In which configuration does this happen:
-------------------------------------------------------------------
Events with counterbased debouncing have Dem/DemConfigSet/DemEventParameter/
DemEventClass/DemDebounceAlgorithmClass/DemDebounceCounterBased/
DemDebounceCounterStorage == TRUE
AND
Dem/DemGeneral/DemNvSynchronizeSupport == TRUE
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Nevertheless, under normal operation conditions (full shutdown sequence of ECU), debounce data 
are consistently persisted.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of the code. 
49


Issue Report
ESCAN00096492
Aging counter is incremented incorrectly
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
4.00.00
Fixed in versions:
13.06.00, 12.01.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Aging counter of the event is incremented earlier than expected. This can result in the event 
getting aged one aging cycle earlier.
When does this happen:
-------------------------------------------------------------------
When aging of the event is progressed by manually restarting the operation cycle of the event 
(reported operation cycle state as stop and start). 
It does not happen when operation cycle is implicitly restarted (reporting as an already started 
operation cycle as start again).
In which configuration does this happen:
-------------------------------------------------------------------
 /MICROSAR/Dem/DemGeneral/DemAgingBehavior == AGING_TYPE_2
 OR
 /MICROSAR/Dem/DemGeneral/DemAgingBehavior == AGING_TYPE_3
 OR
 /MICROSAR/Dem/DemGeneral/DemAgingBehavior == AGING_TYPE_5 
AND
/MICROSAR/Dem/DemConfigSet/DemEventParameter/DemEventClass/DemAgingCycleRef == /
MICROSAR/Dem/DemConfigSet/DemEventParameter/DemEventClass/DemOperationCycleRef
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
50


Issue Report
ESCAN00096547
Pending Status Bit and WIR Status Bit are reset too 
early / unexpectedly

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
5.00.00
Fixed in versions:
13.06.00, 12.01.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When application reads Pending / WIR status bit for a DTC it can read an incorrect value after 
restart as:
- the Pending status bit is reset for a DTC, although the DTC has not been tested passed for a 
whole operation cycle.
- as a result on the next operation cycle end also the WIR status bit will be reset, independent if 
the event has already healed. 
In best case event is healed and status is just reset too early.
Otherwise if event is not healed status bit is incorrect (reset instead of set) for a short time until 
event is recognized as failed again.
When does this happen:
-------------------------------------------------------------------
When the DTC has aged, but is still stored in the event memory, and the ECU is restarted.
In which configuration does this happen:
-------------------------------------------------------------------
DemGeneral/DemAgingRetainEnvironmentalData == TRUE
AND
(
DemGeneral/DemAgingBehavior == AGING_TYPE_1 (DEM_AGING_AT_PASSED)
OR 
DemGeneral/DemAgingBehavior == AGING_TYPE_4 
(DEM_AGING_AT_PASSED_CONT_NOT_FAILED)
)
AND 
DemConfigSet/DemEventParameter/DemEventClass/DemAgingCycleCounterThreshold > 0 (for 
events with aging target 0, the Pending status bit is intentionally reset when the event is aged 
with the first passed result)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
51


Issue Report
ESCAN00096776
Execution of daq lists may fail.
Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
On platforms where uint8_least is smaller than uint16, execution of daq lists may fail due to a 
counter variable that is too small.
As a result daq measurement might be performed only partially.
When does this happen:
-------------------------------------------------------------------
When more than 255 daq lists are used.
In which configuration does this happen:
-------------------------------------------------------------------
When daq measurement is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The basic data types are defined in the file Platform_Types.h
Please make sure that the type uint8_least is defined as unsigned short at least (uint16).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
52


Issue Report
ESCAN00096960
CycleState is not stored in NvRam
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
7.00.00
Fixed in versions:
13.06.02, 12.01.03, 10.00.03, 14.01.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Events can not be reported due to stopped operation cycle.
When does this happen:
-------------------------------------------------------------------
The operation cycle of the event was started and synchronized with NvM using API 
Dem_RequestNvSynchronization before ECU reset 
AND
The ECU did not perform a normal shutdown (e.g. hard reset or Clamp 15 ECU)
AND
the Event is reported after ECU start, and its operation cycle has not been restarted.
Note:
This scenario presumes that the integration correctly synchronizes the Dem state with the NV-Ram 
using API Dem_RequestNvSynchronization after the operation cycle was started.
Otherwise, data loss is expected due to the missing shutdown sequence.
In which configuration does this happen:
-------------------------------------------------------------------
DemGeneral/DemOperationCycleStatusStorage == TRUE
AND
Dem/DemGeneral/DemNvSynchronizeSupport == TRUE
AND
Dem/DemGeneral/DemOperationCycle != Dem/DemGeneral/DemRestartCycleOnInitRef
AND
Dem/DemGeneral/DemOperationCycle/DemOperationCycleType != DEM_OPCYC_OBD_DCY
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
53


Issue Report
ESCAN00097111
Service 0x2C: Reading DDDID contains invalid 
response data

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.02.00
Fixed in versions:
8.06.01, 9.01.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The positive response to the diagnostic service 0x22 (ReadDataByIdentifier) of valid and defined 
DDDID (DynamicallyDefinedDID) has the expected length, but contains unexpected/implausible 
data.
When does this happen:
-------------------------------------------------------------------
Each and every time the affected DDDID is read.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM supports and implements diagnostic service 0x2C (DynamicallyDefineDataIdentifier)
AND
- The number of DDDIDs and total number of their source items (i.e. source DIDs or memory 
blocks) does not fulfill the logical expression: 
 (SUM( DDDID(X).numSourceItems, X = 1..N) <= 256) OR (N >=256)
 
 where: N is the total number of DDDIDs in the DCM configuration, DDDID(X).numSourceItems is 
the number of source items a particular DDDID can hold (i.e. /Dcm/DcmConfigSet/DcmDsp/
DcmDspDidInfo/DcmDspDidAccess/DcmDspDidDefine/DcmDspDDDidMaxElements)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Reduce total number of source items per DDDID to fulfill the equation from the affected 
configuration page.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
54


Issue Report
ESCAN00097324
Missing TxAcknowledge in configurations with 
multiple variants

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.11.00
Fixed in versions:
1.18.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Rte_Feedback reports RTE_E_NO_DATA or RTE_E_TIMEOUT although COM notified the 
transmission.
When does this happen:
-------------------------------------------------------------------
During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when tx acknowledge is configured for a data element that is mapped to multiple 
signals (fan-out).
Moreover the project needs to use multiple postbuild variants.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
55


Issue Report
ESCAN00097367
DAQ overrun indication not deactivateable - max 
PID limited to 0x7B

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The configuration parameter /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/
XcpOverrunIndication has no influence.
The feature "overrun indication" always stays enabled.
This leads to the fact that the max PID is limited to 0x7B as the MSB is used for overrun indication.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When DAQ measurement is used.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
56


Issue Report
ESCAN00097699
Dem_SetWIRStatus is processed and returns E_OK 
for unavailable events

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
6.02.00
Fixed in versions:
12.01.04, 14.04.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dem_SetWIRStatus is processed and returns E_OK when called for an unavailable event. 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
(Dem/DemGeneral/DemUserControlledWirSupport == TRUE)
AND
(
(Dem/DemConfigSet/DemEventParameter/DemEventAvailableInVariant == FALSE for the 
concerned event)
OR
(Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY and concerned event is 
set unavailable by API Dem_SetEventAvailable)
)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
57


Issue Report
ESCAN00097735
Paged-Buffer: Positive response with corrupted data
Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
9.02.00, 8.06.01
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
ECU sends a positive response with corrupted data.
Note:
 The first bytes of the response are always valid so that the response can be recognized as a 
positive one.
 The exact amount of valid bytes depends on the chunk size of the transmission layer and other 
factors.
When does this happen:
-------------------------------------------------------------------
- When service 0x19 or 0x22 is requested
AND
- Paged-Buffer is used for transmission of the positive response
AND
- DCM is waiting for next paged data portion because DEM or the application had returned 
E_PENDING
AND
- DCM wants to defragment the Paged-Buffer, because some data was already transmitted
AND
- The amount of data available for transmission is greater than the amount of data already 
transmitted since last defragmentation
In which configuration does this happen:
-------------------------------------------------------------------
- If any service using the paged-buffer is supported (in Dcm_Cfg.h: #define 
DCM_PAGED_BUFFER_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
For Service 0x19:
 - Deactivate the Paged-Buffer for this service (/Dcm/DcmConfigSet/DcmPageBufferCfg/
DcmPagedBufferEnabled)
For Service 0x22:
 - Do not use the return value DCM_E_PENDING for ReadData() (paged-data-reading) callouts
OR
 - Do not use paged DIDs at all (/Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort !
= USE_PAGED_DATA_ASYNCH_CLIENT_SERVER and USE_PAGED_DATA_ASYNCH_FNC)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
58


Issue Report
ESCAN00097748
Memory corruption of management information 
leads to dead lock of corresponding block

Component@Subcomponent:
If_AsrIfFeeSmallSector@Implementation
First affected version:
1.00.00
Fixed in versions:
2.00.01, 1.00.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Memory corruption (e.g. double bit error caused by reset) leads to not repairable NVM/FEE block.
Application tries to write a block and FEE always stops processing the job because FLS issues an 
error while accessing FEE's management information.
FEE block can no longer be accessed by read or write jobs.
When does this happen:
-------------------------------------------------------------------
A reset can lead to an error in the flash hardware (e.g. double bit error) which issues a FLS error 
during read accesses. If FEE's management information is somehow affected by a such an error, 
FEE will no longer be able to read or write this block.
In which configuration does this happen:
-------------------------------------------------------------------
Every configuration.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
59


Issue Report
ESCAN00097848
Dem_GetWIRStatus returns E_OK for unavailable 
events

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
6.02.00
Fixed in versions:
12.01.04, 14.04.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dem_GetWIRStatus returns E_OK when called for an unavailable event. 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
From Dem version 7.00.00 on:
(Dem/DemGeneral/DemUserControlledWirSupport == TRUE)
AND
(
(Dem/DemConfigSet/DemEventParameter/DemEventAvailableInVariant == FALSE for the 
concerned event)
OR
(Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY and concerned event is 
set unavailable by API Dem_SetEventAvailable)
)
In earlier Dem versions:
(Dem/DemGeneral/DemUserControlledWirSupport == TRUE)
AND
(Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY and concerned event is 
set unavailable by API Dem_SetEventAvailable)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
60


Issue Report
ESCAN00097849
Dem_GetEventEnableCondition returns E_OK for 
unavailable events

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
6.02.00
Fixed in versions:
14.04.00, 12.01.04
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dem_GetEventEnableCondition returns E_OK when called for an unavailable event. 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
(Dem/DemGeneral/DemEnableConditionSupport)
AND
(
(Dem/DemConfigSet/DemEventParameter/DemEventAvailableInVariant == FALSE for the 
concerned event)
OR
(Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY and concerned event is 
set unavailable by API Dem_SetEventAvailable)
)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
61


Issue Report
ESCAN00097850
Dem_GetEventAvailable returns AvailableStatus 
'True' for events unavailable in variant

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
10.00.00
Fixed in versions:
14.04.00, 12.01.04
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dem_GetEventAvailable returns E_OK and AvailableStatus 'True' when called for an event 
unavailable in variant. 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY
AND
Dem/DemConfigSet/DemEventParameter/DemEventAvailableInVariant == FALSE for the event the 
API Dem_SetEventAvailable is called for.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
62


Issue Report
ESCAN00097911
Deferred Rx PDUs are not received if 
ComDeferredEventCacheSupport is enabled

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
8.01.00
Fixed in versions:
14.00.01, 13.03.03, 12.00.02
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Deferred Rx PDUs might not be processed if deferred event cache is enabled. This situation will 
sustain until the deferred event cache overflows. 
When does this happen:
-------------------------------------------------------------------
This issue may occur at runtime, whenever more deferred PDUs are received than the cache can 
store. In this case the fallback strategy will be applied. 
If during processing of the deferred PDU's new deferred PDUs are received, they might not be 
cached properly.
In which configuration does this happen:
-------------------------------------------------------------------
ComDeferredEventCacheSupport == TRUE
AND
type of processed Rx PDU is set to DEFERRED
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
If possible, set ComDeferredEventCacheSupport == FALSE. Otherwise no workaround is available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
63


Issue Report
ESCAN00097951
Wrong marshalling/ unmarshalling of <XInt64> 
Signals

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
12.00.03, 13.03.05, 14.01.02
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Signals/ GroupSignals with ComSignalType <XInt64> are read / written incorrectly from/ to the 
bus.
A Rx Signal for example could be truncated when it's read by Com_ReceiveSignal.
 
When does this happen:
-------------------------------------------------------------------
Issue occurs at runtime
In which configuration does this happen:
-------------------------------------------------------------------
ComSignalType == UINT64 || SINT64
AND
ComBitPosition starts at byte boundary
AND
32 Bits < ComBitSize < 64 Bits
AND
Signal does not end at byte boundary
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
64


Issue Report
ESCAN00098006
Declined Immediate Nm Transmissions is retried 
later than expected

Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
1.00.00
Fixed in versions:
7.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An Nm message is transmitted later than expected. 
The transmission is retried after CanNmImmediateNmCycleTime but should be retried after 
CanNmMainFunctionPeriod.
/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmImmediateNmCycleTime
/MICROSAR/CanNm/CanNmGlobalConfig/CanNmMainFunctionPeriod
When does this happen:
-------------------------------------------------------------------
After active startup of the ECU and if one of the 'Immediate Nm Transmissions' is declined.
In which configuration does this happen:
-------------------------------------------------------------------
- /MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/
CanNmImmediateNmTransmissions > 0 on the affected channel
AND
- /MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmImmediateNmCycleTime 
> /MICROSAR/CanNm/CanNmGlobalConfig/CanNmMainFunctionPeriod
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
65


Issue Report
ESCAN00098203
Service 0x3E: S3 timer reloaded for different 
protocol

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.05.00
Fixed in versions:
9.05.00, 8.06.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Although a different protocol is active a functional addressed 0x3E 0x80 request (with set SPRMIB) 
reloads the S3 timer during any non-default session.
When does this happen:
-------------------------------------------------------------------
Any time a functional addressed 0x3E 0x80 request is sent with a protocol priority higher than the 
active one.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM shall prioritize two or more diagnostic clients (e.g. OBD and UDS clients) (in Dcm_Cfg.h 
#define DCM_NET_PROTOCOL_PRIORITISATION_ENABLED == STD_ON)
AND
- The client specific session protection is activated (in Dcm_Cfg.h: #define 
DCM_NET_PROTECT_SESSION_OF_CLIENT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
66


Issue Report
ESCAN00098248
Immediate priority block requests during WriteAll 
may lead to unsuccessful WriteAll

Component@Subcomponent:
MemService_AsrNvM@Implementation
First affected version:
5.00.00
Fixed in versions:
5.07.01
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
NvM WriteAll does not finish successfully through NvM accepts WriteBlock for immediate priority 
blocks (return E_OK). Some blocks may be not ok after the WriteAll. During the following ReadAll 
integrity failed error may occur.
When does this happen:
-------------------------------------------------------------------
If some immediate priority WriteBlock jobs are requested during an ongoing WriteAll.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration with immediate priority NvM blocks (NvMBlockJobPriority == 0) and disabled 
parameter checks NvMDevErrorDetect == false && (NvMSafeBswChecks == false || 
EcuCSafeBswChecks == false) (depends on NvM version) and NvMKillWriteAllApi == true
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
67


Issue Report
ESCAN00098392
S3 timer reloaded by any request from different 
tester

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.00.00
Fixed in versions:
9.05.00, 8.06.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During non-default session a request from a different tester reloads the S3 timer.
When does this happen:
-------------------------------------------------------------------
Any time when during non-default session a request from a different tester with lower or equal 
priority is send.
In which configuration does this happen:
-------------------------------------------------------------------
- Pseudo parallel request handling is activated (in Dcm_Cfg.h: #define 
DCM_NET_MULTI_CLIENT_ENABLED == STD_ON)
AND
- The client specific session protection is activated (in Dcm_Cfg.h: #define 
DCM_NET_PROTECT_SESSION_OF_CLIENT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
68


Issue Report
ESCAN00098604
Service 0x3E: Keep-Alive timer reloaded for 
different protocol

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
9.05.00, 8.06.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Although a different protocol is active a functional addressed 0x3E 0x80 request (with set SPRMIB) 
reloads the Keep-Alive timer during any non-default session, which prevents ECU from going 
asleep.
When does this happen:
-------------------------------------------------------------------
Any time a functional addressed 0x3E 0x80 request is sent with a protocol priority higher than the 
active one.
In which configuration does this happen:
-------------------------------------------------------------------
- Keep-Alive timer is supported (in Dcm_Cfg.h #define DCM_NET_KEEP_ALIVE_TIME_ENABLED 
== STD_ON)
AND
- DCM shall prioritize two or more diagnostic clients (e.g. OBD and UDS clients) (in Dcm_Cfg.h 
#define DCM_NET_PROTOCOL_PRIORITISATION_ENABLED == STD_ON)
AND
- The client specific session protection is activated (in Dcm_Cfg.h: #define 
DCM_NET_PROTECT_SESSION_OF_CLIENT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
69


Issue Report
ESCAN00098606
Keep-Alive timer reloaded by any request from 
different tester

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
9.05.00, 8.06.03
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During non-default session a request from a different tester reloads the Keep-Alive timer, which 
prevents ECU from going asleep.
When does this happen:
-------------------------------------------------------------------
Any time when during non-default session a request from a different tester with lower or equal 
priority is send.
In which configuration does this happen:
-------------------------------------------------------------------
- Keep-Alive timer is supported (in Dcm_Cfg.h #define DCM_NET_KEEP_ALIVE_TIME_ENABLED 
== STD_ON)
AND
- Pseudo parallel request handling is activated (in Dcm_Cfg.h: #define 
DCM_NET_MULTI_CLIENT_ENABLED == STD_ON)
AND
- The client specific session protection is activated (in Dcm_Cfg.h: #define 
DCM_NET_PROTECT_SESSION_OF_CLIENT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
70


Issue Report
ESCAN00098938
Unconfirmed DTCs need healing before aging
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
9.00.00
Fixed in versions:
14.01.00, 12.01.05
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A stored DTC needs healing before aging, although neither its ConfirmedDTC nor WIR status bit is 
set.
When does this happen:
-------------------------------------------------------------------
Always.
In which configuration does this happen:
-------------------------------------------------------------------
Dem/DemGeneral/DemAgingAfterHealing == DEM_AGING_AFTER_HEALING_ALL_DTC
AND 
Dem/DemConfigSet/DemEventParameter/DemEventClass/DemIndicatorAttribute/
DemIndicatorHealingCycleCounterThreshold > 0
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
71


Issue Report
ESCAN00099092
CONNECT will stop a running DAQ measurement 
from resume mode

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.01
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the XCP Slave receives a CONNECT command, a running DAQ measurement (e.g. from 
resume mode) is stopped and has to be started again, manually.
The ASAM spec states that a DAQ measurement started by resume mode shall not be interrupted 
by the CONNECT command. The implementation deviates from this ASAM requirement.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When resume mode is used.
(/MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpResumeMode enabled and resume mode 
activated by CANape)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
72


Issue Report
ESCAN00099171
Value of 'Cycles Since First Failed' is 0
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
5.00.00
Fixed in versions:
15.01.00, 12.01.05
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Dem returns 0 for 'Cycles Since First Failed' for a DTC although the operation cycle was 
restarted at least once since the DTC was tested 'failed' for the first time.
When does this happen:
-------------------------------------------------------------------
1. A DTC is tested 'failed' (TestFailed status bit is set), but is not stored in event memory (for 
example because the event memory is already full).
2. Later on the DTC is stored in the event memory (for example because another DTC is cleared 
from event memory).
3. The DTC is tested 'failed' again (TestFailed status bit is still set).
4. The operation cycle is at least restarted once. 
5. The internal data element 'Cycles Since First Failed' is requested via extended data or snapshot 
records (by DCM service 19x04 or 19x06 or application APIs).
As soon as the TestFailed status bit is reset (by testing DTC 'passed') and the DTC is tested 'failed' 
again, the 'Cycles Since First Failed' will be calculated correctly from this failed result on (assuming 
that the DTC is still stored in the event memory).
In which configuration does this happen:
-------------------------------------------------------------------
The event/DTC has an extended data record (Dem/DemConfigSet/DemEventParameter/
DemExtendedDataClassRef) or snapshot record (Dem/DemConfigSet/DemEventParameter/
DemFreezeFrameClassRef) configured including data element 'CyclesSinceFirstFailed' (Dem/
DemGeneral/DemDataClass/DemDataElementInternalData == CYCLES_SINCE_FIRST_FAILED) 
AND
Dem/DemGeneral/DemEventMemoryEntryStorageTrigger == 
DEM_STORAGE_ON_FDC_THRESHOLD
From Dem version 8.00.00 to 12.xx.xx the ESCAN only holds for events/DTCs
a) with Dem/DemConfigSet/DemEventParameter/DemEventKind == DEM_EVENT_KIND_BSW
OR
b) which are part of a combined group (at least one other event references the same DTC by Dem/
DemConfigSet/DemEventParameter/DemDTCClassRef)
OR
c) using time based de-bouncing (Dem/DemConfigSet/DemEventParameter/DemEventClass/
DemDebounceAlgorithmClass/DemDebounceTimeBase)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
73


Issue Report
ESCAN00099197
Wrong DLC calculation for zero bit signals
Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
15.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
On reception-side, a zero bit signal might get rejected on partially received PDU.
A configured signal notification might not be called.
When does this happen:
-------------------------------------------------------------------
Issue occurs at runtime.
In which configuration does this happen:
-------------------------------------------------------------------
Configuration A:
- ComSignalEndianness == LITTLE_ENDIAN
AND
- ComBitSize is 0
AND
(
- ComBitPosition < 8
OR
- (ComBitPosition % 8) != 0, where ComBitPosition > 8
)
Configuration B:
- ComSignalEndianness == BIG_ENDIAN
AND
- ComBitSize is 0
AND
- (ComBitPosition % 8) != 7
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
74


Issue Report
ESCAN00099383
Failure to collect data via Client/Server or Sender/
Receiver R-Port results in random data

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
10.00.00
Fixed in versions:
12.01.05, 15.03.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The data content of DataElement(s) in ExtendedDataRecords, PIDs, DIDs and thereof in OBDII/ 
WWHOBD - FreezeFrames, SnapshotRecords deviates from the expected value, if the DataElement 
content is collected via RTE over a Client/Server or Sender/Receiver port interface.
When does this happen:
-------------------------------------------------------------------
When an OBDII - WWHOBD Freeze Frame, Snapshot Record, Extended Data Record is stored/ 
updated which triggers collecting data corresponding to configured Data Elements through the RTE 
from the Application.
Issue happens always when the RTE call to collect the data is not successful, whereupon the return 
code is not E_OK (0). According AUTOSAR, this RTE call MUST ALWAYS be successful - so in 
theory this issue shall NEVER occur, if the configuration is correct. In practice, a wrong RTE 
configuration may violate this constraint - check RTE specification for problematic configurations.
In which configuration does this happen:
-------------------------------------------------------------------
The DataElement in consideration here is configured to read data from application through a Client/
Server port:
 /Dem/DemGeneral/DemDataClass/DemDataElementUsePort == 
USE_DATA_CLIENT_SERVER_PORT or
 /Dem/DemGeneral/DemDataClass/DemDataElementUsePort == 
USE_DATA_CLIENT_SERVER_PORT_WITH_EVENTID
OR
The DataElement in consideration here is configured to read data from application through a 
Sender/Receiver port:
 /Dem/DemGeneral/DemDataClass/DemDataElementUsePort == USE_DATA_SENDER_RECEIVER
AND
The incorrect configuration of the RTE may result in un-successful data collection, and the RTE call 
returns an error value different from "E_OK" (0) and "E_NOT_OK" (1).
Examples for incorrect RTE configurations are :
- DEM R-Port is not connected in the RTE
- connection (e.g. to another ECU) can have timeouts, failures...
- failures with buffer transformations
- buffer overflow at the server side
- inaccessible server
- limits in simultaneous server access
- ... (this list is incomplete)
 
Resolution Description:
75


Issue Report
ESCAN00099383
Failure to collect data via Client/Server or Sender/
Receiver R-Port results in random data

Workaround:
-------------------------------------------------------------------
As required by AUTOSAR, use only Client/Server- or Sender/Receiver-port calls, that can never fail 
and will ALWAYS return the requested data and return value E_OK (0).
Particularly, always connect DEM's R-Ports! The MICROSAR RTE generates template code for 
unconnected ports - which doesn't comply above requirement.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00099495
Measurement failure when more than 255 
measurement values are configured and used

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.01
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the Master Tool configures and tries to measure more than 255 measurement values, the 
values with an index above 255 are not measured. The XCP frames are not assembled correctly 
and ODT frames are incomplete.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When DAQ measurement is used
(Presence of: /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
76


Issue Report
ESCAN00099586
ErrorFrame after startup with wakeup validation
Component@Subcomponent:
Ccl_Asr4SmCan@Implementation
First affected version:
2.06.00
Fixed in versions:
3.00.00
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
ErrorFrame after startup with wakeup validation.
When does this happen:
-------------------------------------------------------------------
After a successful wakeup validation and if only two ECUs are at the bus. 
In most cases this is a test setup, in which only the ECU and a tester, e.g. CANoe, are connected 
to the CAN bus.
1. WakeupValidation is started
2. A valid CAN Msg is received ==> wakeup is validated
3. The CAN controller is restarted.
 If right now the other ECU sends the next CAN Msg, the ECU doesn't get a acknowledgement
In which configuration does this happen:
-------------------------------------------------------------------
If wakeup validation (supported by CanSM) is used (i.e. CanSM_StartWakeupSources() is used in 
EcuM_StartWakeupSources() resp. the StopWakeupSources).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
77


Issue Report
ESCAN00099742
Status block is not immediately written to NvRAM 
after a clear request

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
7.00.00
Fixed in versions:
13.05.00, 12.01.05
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
1. The Status block is not immediately written to NvRAM after a clear request.
2. Depending on the configuration ClearDTC will return a final result although the Status block was 
not persisted in NvRAM.
When does this happen:
-------------------------------------------------------------------
This situation can happen in different scenarios wherein the status block is updated after a DTC 
Clear Operation within the same DEM main function call.
An example situation would be the following:
1. A clear request is triggered (->Status block is reset and marked to be persisted immediately on 
the following main function).
2. The status block content changes (e.g. due to a reported monitor result), before the Dem can 
trigger NvRAM storage. 
In this case the Dem will request the writing of the blocks to NvRAM only again after a new clear 
request, a call of Dem_RequestNvSynchronization or at the latest on Dem_Shutdown.
In which configuration does this happen:
-------------------------------------------------------------------
Dem/DemGeneral/DemUseNvm == TRUE 
AND
(
If NVM immediate updates are supported, i.e.
Dem/DemGeneral/DemClearDTCBehavior == DEM_CLRRESP_NONVOLATILE_FINISH
OR
Dem/DemGeneral/DemImmediateNvStorageSupport == TRUE OR any Dem/DemConfigSet/
DemDTCClass/DemImmediateNvStorage == TRUE
OR
Dem/DemGeneral/DemNvSynchronizeSupport == TRUE
)
Symptom 2 is only relevant in configurations with Dem/DemGeneral/DemClearDTCBehavior == 
DEM_CLRRESP_NONVOLATILE_FINISH.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
A workaround is to manually invoke the Dem_RequestNVSynchronization(), if available, which 
would write back all the modified NV Blocks (including for example de-bounce or available NvRAM 
block which wouldn't be written immediately after a clear request) to the backing storage.
Else the Status block would be written to NvM either at the next ClearDTC request or at shutdown.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
78


Issue Report
ESCAN00099810
Event heals too early after displacement
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
4.00.00
Fixed in versions:
14.03.00, 12.01.05
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An event may 'heal' too early and UDS Wir-Bit is reset too early.
When does this happen:
-------------------------------------------------------------------
After an event is displaced, the event is reported failed but the event's UDS pending status bit can 
not be set (e.g. event´s storage conditions not fullfilled or the event fails to acquire a memory slot 
and configuration is /MICROSAR/Dem/DemGeneral/DemPendingDtcProcessing == 
DEM_PROCESS_PDTC_STOREDONLY).
In which configuration does this happen:
-------------------------------------------------------------------
/DemGeneral/DemEventDisplacementStrategy != DEM_DISPLACEMENT_NONE
AND
Event has an indicator attached (/DemConfigSet/DemEventParameter/DemEventClass/
DemIndicatorAttribute/DemIndicatorRef)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
79


Issue Report
ESCAN00099905
XCP internal memory not initialized correctly in 
huge configurations.

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
 
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In configurations where many Odt Entries are configured >~10k, the resulting memory structure 
of the XCP is >64k. In this case the Xcp_Hlp_MemSet which has only an uint16 as length does not 
initialize the whole memory area. As a result the XCP component might have an undefined 
behaviour if such a configuration is used (e.g. an AllocDaq might not work and measurement is not 
possible).
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When a huge amount of Odt Entries is used (>~10k)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
80


Issue Report
2.3 Runtime Issues with Workaround
It is not recommended to update a delivery due to a runtime issue with a documented 
workaround. The effect of an issue to the ECU functionality has to be analyzed by the user as the 
software usage and its configuration is not known by Vector. The risk of change has also to be 
taken into account.
Index
ESCAN00061207
DaVinci Configurator 5: Issue Reporting Procedure
GenTool_ConfiguratorCfg5@Application
ESCAN00076256
BswM_CanSM_Indication called with locked interrupts - OS ErrorHook on Os 
API Invocation
Ccl_Asr4SmCan@Implementation
ESCAN00089164
The EcuM stays in RUN state even if EcuM_KillAllRunRequests has been called
SysService_Asr4EcuM@Implementation
ESCAN00091305
EcuM with fixed state machine causes a Det error in Dem_Init because this 
module has been initialized two times
SysService_Asr4EcuM@Implementation
ESCAN00091550
Service 0x27: Dcm allows seed/key attempt earlier than the configured 
security delay time
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00093906
ECU returns NRC 0x13 instead of 0x33 or other execution pre-condition 
related NRC for services with a sub-function parameter
Diag_Asr4Dcm@Implementation
ESCAN00094013
Missing callback configuration is not detected
If_AsrIfFeeSmallSector@Implementation
ESCAN00094333
Timeout Action Replace doesn't work for Rx SignalGroups with Array Access 
enabled
Il_AsrComCfg5@Implementation
ESCAN00094451
Supervision of the STmin by the application fails
Tp_Asr4TpCan@Implementation
ESCAN00094464
NvM data is not stored after calling ComM_DeInit()
Ccl_Asr4ComMCfg5@Implementation
ESCAN00095016
Service 0x23 responds with NRC 0x14 instead of 0x31
Diag_Asr4Dcm@Implementation
ESCAN00095254
Missing DET error PDUR_E_PDU_INSTANCES_LOST description in case of N:1 
communication interface routings with upper layer
Gw_AsrPduRCfg5@Doc_TechRef
ESCAN00095441
[Only in case of multiple CAN driver are used] FIFO behavior is not fulfilled for 
transmission of CAN messages
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00095651
Wrong software check for correct AuthID
DrvCry_Rh850Icum@Implementation
ESCAN00095653
Primitive returns with error with valid input parameters (using keyID on 2nd 
keypage)
DrvCry_Rh850Icum@Implementation
ESCAN00095919
Services 0x23/0x3D/0x2C: Unexpected response behavior on invalid memory 
Id request
Diag_Asr4Dcm@Implementation
ESCAN00095963
Service 0x31: Erroneous implementation of request minimum length check
Diag_Asr4Dcm@Implementation
ESCAN00096099
Main function tick time resolution smaller than 1 ms is not supported
Tp_Asr4TpCan@GenTool_GeneratorMsr
ESCAN00096195
Rte_LdComCbkTriggerTransmit returns invalid error code
Rte_Core@Implementation
81


Issue Report
Index
ESCAN00096248
Validator PDUR12501 is not shown as error for PduRDestPduRef
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00096369
CAN driver stops sending message.
DrvCan__coreAsr@Implementation
ESCAN00096716
Queued sender/receiver N:1 connections not detected
Rte_Analyzer@Application
ESCAN00096901
Possible incorrect interpretation of last page status
If_AsrIfFeeSmallSector@Implementation
ESCAN00096926
a2l: Calculation of communication parameter does not consider PropSeg 
parameter
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00097045
Dem_SetEventAvailable returns E_OK for events unavailable in variant
Diag_Asr4Dem@Implementation
ESCAN00097052
Data send completed trigger fired to early when 
Rte_ComSendSignalProxyPeriodic is used
Rte_Core@Implementation
ESCAN00097141
The Xcp Module ID is not according to AR 4
Cp_Asr4Xcp@Implementation
ESCAN00097176
When the XCP Master requests Timestamps but none are configured no 
negative response is returned
Cp_Asr4Xcp@Implementation
ESCAN00097264
Service 0x2C: Valid DDDID definition requests always responded with NRC 
0x31
Diag_Asr4Dcm@Description
ESCAN00097288
When fixed timestamps are configured but the XCP Master does not request 
them, no negative response is returned
Cp_Asr4Xcp@Implementation
ESCAN00097333
ComM_BusSM_ModeIndication called with locked interrupts - OS ErrorHook on 
Os API Invocation
Ccl_Asr4SmCan@Implementation
ESCAN00097361
Service 0x2A: Wrong prioritisation between NRC 0x13 and 0x31
Diag_Asr4Dcm@Implementation
ESCAN00097377
Communication not possible in Multi Channel use case on channels > 0
Cp_Asr4Xcp@Implementation
ESCAN00097381
Service 0x27: PowerOn delay time not started on single false access attempt
Diag_Asr4Dcm@Doc_TechRef
ESCAN00097520
Callout Dcm_FilterDidLookUpResult() is called with unexpected OpStatus
Diag_Asr4Dcm@Implementation
ESCAN00097602
CAN interrupt lost
DrvCan_Rh850McanAsr@Implementation
ESCAN00097637
EcuM calls the Mcu_SetMode API for setting the normal mcu mode with an 
invalid mcu mode
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00097731
Service 0x10: Jump to FBL performed although forced RCR-RP could not be 
sent
Diag_Asr4Dcm@Implementation
ESCAN00097925
Memory read access exception due to incorrect address conversion
Cp_Asr4Xcp@Implementation
ESCAN00098007
Declined Immediate Nm Transmissions is retried later than expected
Nm_Asr4NmCan@Doc_TechRef
ESCAN00098036
Cyclic PDUs with a ComGwRoutingTimeout are triggered when started if 
ComTxDlMonTimeBase is configured
Il_AsrComCfg5@Implementation
82


Issue Report
Index
ESCAN00098095
PduInfoPtr of API Appl_GenericConfirmation() contain DLC instead of message 
length
DrvCan__coreAsr@Implementation
ESCAN00098361
Service 0x2F: Wrong ReturnControlToECU operations are called on session/
security state change
Diag_Asr4Dcm@Implementation
ESCAN00099078
RTE generator does not trigger NvM_MainFunction when a NvBlock SWC has 
no NvBlockDescriptors
Rte_Core@Implementation
ESCAN00099239
Enabled event memory that has no events assigned leads to wrong code 
generation
Diag_Asr4Dem@GenTool_GeneratorMsr
ESCAN00099440
RTE sends unexpected data when activation reasons are configured for a 
runnable with implicit write accesses
Rte_Core@Implementation
ESCAN00099458
Channel restarts when all Partial Networks are released and channel is 
supposed to shut down
Nm_Asr4NmCan@GenTool_GeneratorMsr
ESCAN00099480
Dirty flags not handled when multiple implicit accesses for the same NvBlock 
descriptor are configured and implicit write is skipped
Rte_Core@Implementation
ESCAN00099536
Safety Manual does not fit to current description file / generator output
If_Asr4IfWd@root
ESCAN00099665
Xcp_Event throws DET check if called before Xcp_Init
Cp_Asr4Xcp@Implementation
ESCAN00100047
Consecutive failed cycle counter not persisted to NvRAM
Diag_Asr4Dem@Implementation
ESCAN00100243
incorrect ODT messages assembled if ODT Entries are initialized incompletely
Cp_Asr4Xcp@Implementation
83


Issue Report
ESCAN00061207
DaVinci Configurator 5: Issue Reporting Procedure
Component@Subcomponent:
GenTool_ConfiguratorCfg5@Application
First affected version:
5.00.01
Fixed in versions:
Problem Description:
This ticket describes the reporting of DaVinci Configurator Pro issues. This ticket is a general 
information and not an issue.
-----------------------------------------------------------------------------------------------------------------------------------------
Issues of the DaVinci Configurator Pro tool are not part of the active issue reporting (i.e. this 
report).
The DaVinci Configurator Pro issue list can be downloaded from our home page:
DaVinci Developer OpenIssue Lists
https://portal.vector.com/web/davinci/shared-folder?t=c2b431ff-5dae-4a72-83ec-b9c8ca17561c
DaVinci Configurator Pro OpenIssue Lists
https://portal.vector.com/web/davinci/shared-folder?t=15d156f3-65d3-4b6e-8107-ec44051aebff
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
This is not an issue but only a reference to the tool specific issue reporting.
No changes to the delivery required.
84


Issue Report
ESCAN00076256
BswM_CanSM_Indication called with locked 
interrupts - OS ErrorHook on Os API Invocation

Component@Subcomponent:
Ccl_Asr4SmCan@Implementation
First affected version:
2.00.00
Fixed in versions:
2.13.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Symptom 1)
OS API Invocation ends up with a call to ErrorHook.
Error Cause of this ErrorHook is that OS API is called whereas Interrupts are locked.
Errorcodes would then be:
osdErrATIntAPIDisabled 0x1104U,
osdErrHTMultipleActivation 0x1305U,
osdErrSEIntAPIDisabled 0x4105U,
osdErrSECallContext 0x4106U or
osdErrWEInterruptsDisabled 0x4403U
Symptom 2)
Rte Runnable that is triggered on TxError will not be called when Communication is shut down and 
Sending Request is outstanding
When does this happen:
-------------------------------------------------------------------
every time function "BswM_CanSM_Indication" ends up in an Os API Invocation (for example 
BswM Rule to stop Ipdu Groups AND a transmission is still ongoing AND TxError is configured to 
trigger a runnable in the Rte)
AND 
the function "BswM_CanSM_Indication" is called with locked interrupts (Transition to 
NO_COMMUNICATION)
In which configuration does this happen:
-------------------------------------------------------------------
If any BswM rule (which belongs to a BswM_CanSM_Indication), is configured as immediate 
AND 
an OS function is called within the call context of the BswM rule
AND
this OS function must not be called with locked interrupts.
e.g.
Std Rules in BswM are configured
AND
A Rte Runnable is triggered on Tx Error
AND 
Osek OS which implements the requirement "If ActivateTask / SetEvent is called with locked 
Interrupts, reject the action and call an ErrorHook" is used (for example Vector Os)
 
Resolution Description:
85


Issue Report
ESCAN00076256
BswM_CanSM_Indication called with locked 
interrupts - OS ErrorHook on Os API Invocation

Workaround:
-------------------------------------------------------------------
Configure the BswM port of the CanSM indication as deferred.
If the startup is not affected and a fast startup is desired it is possible to "copy" the port and set 
one as deferred (e.g. used for the shut down rules) and the other port as immediate (e.g. used for 
the startup rules).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
86


Issue Report
ESCAN00089164
The EcuM stays in RUN state even if 
EcuM_KillAllRunRequests has been called

Component@Subcomponent:
SysService_Asr4EcuM@Implementation
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The ECU stays in RUN state, even if anyone has called the API EcuM_KillAllRunRequests.
When does this happen:
-------------------------------------------------------------------
Always after EcuM_KillAllRunRequests() has been called and at least one channel is in a state 
unequal COMM_NO_COM_NO_PENDING_REQUEST.
In which configuration does this happen:
-------------------------------------------------------------------
Only in configurations with ECUM_FIXED_BEHAVIOR is active (EcuM/EcuMGeneral/
EcuMEnableFixBehavior).
 
Resolution Description:
87


Issue Report
ESCAN00089164
The EcuM stays in RUN state even if 
EcuM_KillAllRunRequests has been called

Workaround:
-------------------------------------------------------------------
The following shows a possible workaround to ignore all ComM channel states in case of an active 
KillAllRUNRequests.
Hint: EcuM_SetWakeupEvent considers wakeup events even if EcuM_KillAllRUNRequests() was 
called. This might cause that the EcuM transits from PostRun to Run again, because of a new 
occurred wakeup event. 
The call of the API ComM_GetState() has to be mapped to an application function in case that it is 
called in context of EcuM.c. This can be done by configure the following header file as a User 
Configuration file in the EcuM configuration (EcuM/EcuMGeneral/EcuMUserConfigurationFile):
- Example Appl_ComM_EcuM.h:
#if defined (ECUM_SOURCE)
extern Std_ReturnType Appl_ComM_GetState(const NetworkHandleType Channel, 
ComM_StateType* State);
# define ComM_GetState Appl_ComM_GetState
#endif
- Example Appl_ComM_EcuM.c:
#include "Std_Types.h"
#include "ComM.h"
#define ECUM_PRIVATE_CFG_INCLUDE
#include "EcuM_PrivateCfg.h"
#undef ECUM_PRIVATE_CFG_INCLUDE
Std_ReturnType Appl_ComM_GetState(const NetworkHandleType Channel, ComM_StateType* 
State)
{
 Std_ReturnType retVal = E_OK;
 /* Verify that EcuM_KillAllRUNRequests() was not called */
 if ((EcuM_GetKillAllInProgress() & (0x01u)) == 0u)
 {
 retVal = ComM_GetState(Channel, State);
 }
 else
 {
 /* In case of an active KillAllRunRequest, set the virtual ComM State to no communication and no 
request. */
 *State = COMM_NO_COM_NO_PENDING_REQUEST;
 }
 return retVal;
}
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
88


Issue Report
ESCAN00091305
EcuM with fixed state machine causes a Det error in 
Dem_Init because this module has been initialized 
two times

Component@Subcomponent:
SysService_Asr4EcuM@Implementation
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
 In some situations the EcuM with fixed state machine calls Dem_Init() two times, this lead to a 
Det error thrown by the Dem with the message DEM_E_WRONG_CONDITION,
When does this happen:
-------------------------------------------------------------------
During runtime of the EcuM API EcuM_StartupTwo().
In which configuration does this happen:
-------------------------------------------------------------------
All of the following conditions have to be fulfilled to be affected by this issue:
- The Ecum with fixed state machine has to be active (EcuM/EcuMGeneral/EcuMEnableFixBehavior).
- The include Dem has to be active (EcuM/EcuMFixedGeneral/EcuMIncludeDem).
- At least one wakeup source has to be configured for wakeup validation (EcuM/EcuMConfiguration/
EcuMCommonConfiguration/EcuMWakeupSource/EcuMValidationTimeout).
- At startup the standard wakeup source (ECUM_WKSOURCE_RESET) has to be cleared via the API 
EcuM_ClearWakeupEvent() to force a wakeup validation after startup and to prevent a transition 
to RUN state until this wakeup source is validated.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In case that the valid wakeup event during initialization (ECUM_WKSOURCE_RESET) is cleared in 
context of driver init list two or three and a wakeup event for validation is set the Dem_Init call 
has to be avoided.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
89


Issue Report
ESCAN00091550
Service 0x27: Dcm allows seed/key attempt earlier 
than the configured security delay time

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A security delay timer expires too early. Dcm accepts new seed requests before the configured 
delay time is expired.
When does this happen:
-------------------------------------------------------------------
If after last unsuccessful attempt responded with Nrc 0x36 (exceededNumberOfAttempts) a new 
seed request is sent before the expected delay time.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x27 is supported
AND
- There is more than one security level configured
AND
- Any delay time is configured for any security level (in Dcm_Cfg.h: 
DCM_STATE_SEC_RETRY_ENABLED == STD_ON or 
DCM_STATE_SEC_DELAY_ON_BOOT_ENABLED == STD_ON)
AND
- The dividend of a configured security delay time (in milliseconds) and the task cycle (also in 
milliseconds) is greater that 65535
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The equation shall become true: (<TimeParameter> / DcmTaskTime) < 63535.
Therefore, the following workarounds are possible:
1) Increase the DcmTaskTime parameter value.
OR
2) Reduce the timeout value in the corresponding timing parameter.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
90


Issue Report
ESCAN00093906
ECU returns NRC 0x13 instead of 0x33 or other 
execution pre-condition related NRC for services 
with a sub-function parameter

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.00.00
Fixed in versions:
8.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
ECU returns NRC 0x13 instead of 0x33 or other execution pre-condition related NRC for services 
with a sub-function parameter.
When does this happen:
-------------------------------------------------------------------
Each time a diagnostic client requests a service that:
- supports sub-function parameter (e.g. SID 0x10 (DiagnosticSessionControl) )
AND
- The requested sub-function is a valid one, but:
 - not supported in the currently active security level
 OR
 - not allowed under currently active ECU project specific sub-function related pre-conditions (i.e. 
modeled via DcmModeRules)
 AND
 - the request length is not valid for the sub-function 
In which configuration does this happen:
-------------------------------------------------------------------
For any diagnostic service that has sub-functions supported in different security levels resp. 
different DcmModeRule pre-conditions.
Example:
- ECU is configured to support the following security levels: locked, level X.
- Service 0x10 has following sub-functions (SF): 0x01 and 0x02.
This issue will occur if:
- SF 0x01 is allowed in all securitly levels (locked one inclusively) i.e. has no security restrictions
- SF 0x02 is allowed only once security access level X is enabled
Any request for service 0x10 0x02 with any wrong length more than two bytes, while the ECU is 
locked, will result in NRC 0x13 (ICMLOF) instead of 0x33 (SAD).
Please note:
This issue will _not_ occur if:
- All SID 0x10 sub-functions have the same diagnostic security access execution precondition 
dependency e.g. allowed only in the security level X. In this case not only the sub-functions but 
the SID 0x10 itself will not be supported in the security access locked level. This will result in NRC 
0x33 (SAD), which is no deviation of the ISO specification.
 
Resolution Description:
91


Issue Report
ESCAN00093906
ECU returns NRC 0x13 instead of 0x33 or other 
execution pre-condition related NRC for services 
with a sub-function parameter

Workaround:
-------------------------------------------------------------------
Avoid sub-function related security level resp. DcmModeRule execution precondition dependencies. 
Let the complete service (at SID level) be restricted via security level resp. DcmModeRule 
execution pre-condition.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00094013
Missing callback configuration is not detected
Component@Subcomponent:
If_AsrIfFeeSmallSector@Implementation
First affected version:
1.00.00
Fixed in versions:
2.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Fee in callback mode contains a global parameter with the last job result of FLS. This value is only 
updated upon invocation of FEE's JobEnd-/JobErrorNotification at the end of any FLS job. If FEE's 
callback functions aren't configured in FLS this parameter will never be updated. Consequently FEE 
always uses the initial value of this parameter (MEMIF_JOB_OK), which will lead to incorrect job 
processing.
FEE's callback functions shall be configured in FLS in following parameters:
Fls/FlsConfigSet/FlsJobEndNotification
Fls/FlsConfigSet/FlsJobErrorNotification
When does this happen:
-------------------------------------------------------------------
During job processing.
In which configuration does this happen:
-------------------------------------------------------------------
FEE is used with callback notifications _and_ callback functions aren't configured in FLS (Fls/
FlsConfigSet/FlsJobEndNotification and Fls/FlsConfigSet/FlsJobErrorNotification).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure FEE's callback functions:
Fls/FlsConfigSet/FlsJobEndNotification = Fee_30_SmallSector_JobEndNotification
Fls/FlsConfigSet/FlsJobErrorNotification = Fee_30_SmallSector_JobErrorNotification
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
92


Issue Report
ESCAN00094333
Timeout Action Replace doesn't work for Rx 
SignalGroups with Array Access enabled

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
7.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The timeout Replace action for rx SignalGroups with array access enabled does not replace the 
buffer value either with the initial value or the configured Rx Data Timeout Substitution Value.
When does this happen:
-------------------------------------------------------------------
During call of Com_MainFunctionRx()
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations with rx SignalGroups which have a configured timeout > 0, timeout action set 
to Replace and array access is enabled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Disable Array Access for signalGroups if applicable (no use of com-based transformer)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
93


Issue Report
ESCAN00094451
Supervision of the STmin by the application fails
Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
2.01.01
Fixed in versions:
3.03.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The separation time (STmin) between consecutive frames is not correct, when the time 
supervision is done by the application instead of the CanTp (the application calls the function 
CanTp_StopSeparationTime to trigger the transmission of the next consecutive frame).
When does this happen:
-------------------------------------------------------------------
Everytime the application is in charge of the STmin supervision
In which configuration does this happen:
-------------------------------------------------------------------
1. The parameter CanTp/CanTpGeneral/CanTpApplSTminStartFunction is not empty.
AND
2. The macro CANTP_CONFIGURATION_VARIANT == 
CANTP_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE (in CanTp_Cfg.h)
 OR
 The macro CANTP_POSTBUILD_VARIANT_SUPPORT == STD_ON (in CanTp_Cfg.h)
 
Resolution Description:
94


Issue Report
ESCAN00094451
Supervision of the STmin by the application fails
Workaround:
-------------------------------------------------------------------
The CanTp calls the function configured in CanTp/CanTpGeneral/CanTpApplSTminStartFunction to 
indicate that the separation time for the next CF has to be started.
In the configurations already mentioned and with the current implementation, the Tx NSDU id 
used by the CanTp when calling this function corresponds to an internal id, which could be 
different to the one in CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxNSduId, and 
therefore also different to the value assigned to the symbolic name of the Tx NSDU.
The mapping between the symbolic name of the Tx NSDU and the internal id is constant and can 
be found in the array CanTp_TxSduSnv2Hdl. The array can be found in CanTp_Lcfg.c or 
CanTp_PBcfg.c.
For example, if the CanTp_TxSduSnv2Hdl array looks like this:
static CONST(CanTp_TxSduSnv2HdlType, CANTP_PBCFG) CanTp_TxSduSnv2Hdl[7] = {
 /* Index TxSduCfgIdx Comment */
 { /* 0 */ CANTP_NO_TXSDUCFGIDXOFTXSDUSNV2HDL }, /* [Unused] */
 { /* 1 */ 0U }, /* [TxNSdu_PE2] */ /* 1 != 0 */
 { /* 2 */ 1U }, /* [TxNSdu_PM1] */
 { /* 3 */ 2U }, /* [TxNSdu_PS1] */
 { /* 4 */ 3U }, /* [TxNSdu_PE3] */
 { /* 5 */ CANTP_NO_TXSDUCFGIDXOFTXSDUSNV2HDL }, /* [Unused] */
 { /* 6 */ 4U } /* [TxNSdu_FS1] */
};
the CanTp will use the internal id 2 when calling the function to indicate the start of the separation 
time for the Tx NSDU with CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxNSduId = 3. 
That means the application has to react to id 2 instead of id 3 when the function configured in 
CanTp/CanTpGeneral/CanTpApplSTminStartFunction is called.
On the other hand, the function CanTp_StopSeparationTime can be called using the id in CanTp/
CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxNSduId or using the symbolic name of the Tx 
NSDU. Following the previous example, the application would have to call the function 
CanTp_StopSeparationTime using id 3.
Resolution:
-------------------------------------------------------------------
Not resolved yet.
95


Issue Report
ESCAN00094464
NvM data is not stored after calling ComM_DeInit()
Component@Subcomponent:
Ccl_Asr4ComMCfg5@Implementation
First affected version:
1.00.00
Fixed in versions:
8.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The status values of Mode Limitation and Wake-up Inhibition will be re-initialized on each 
ComM_Init() call.
The following values are affected:
- the state of Wake-up Inhibition if changed at run-time via ComM_PreventWakeUp() and
- the number of inhibited requests of FULL_COM by ComM users assigned to channels which have 
Mode Limitation or Wake-up Inhibition activated and
- the ECU Group Classification if changed at run-time via ComM_SetECUGroupClassification().
When does this happen:
-------------------------------------------------------------------
It happens if ComM_DeInit() is called and at least one ComM channel is not in 
COMM_NO_COM_NO_PENDING_REQUEST state.
Note, the behavior is as expected if ComM_DeInit() is called and all ComM channels are in 
COMM_NO_COM_NO_PENDING_REQUEST state.
In which configuration does this happen:
-------------------------------------------------------------------
1) Mode Limitation Enabled is activated or Wake-up Inhibition Enabled is activated
 #defien COMM_MODE_LIMITATION STD_ON or #define COMM_WAKEUP_INHIBITION STD_ON 
has been generated to ComM_Cfg.h
AND
2) Global NvM Block Descriptor is configured
 #define COMM_NVM_SUPPORT STD_ON has been generated to ComM_Cfg.h
 
Resolution Description:
96


Issue Report
ESCAN00094464
NvM data is not stored after calling ComM_DeInit()
Workaround:
-------------------------------------------------------------------
1) Create a user configuration file with the following content and assign it to 
ComMUserConfigurationFile parameter.
#if defined CCL_ASR_COMM_SOURCE
# define ComM_DeInit ComM_DeInit_Original
#endif
2) Define "new" ComM_DeInit() function in a source file
#include <NvM.h>
extern FUNC(void, COMM_CODE) ComM_DeInit_Original(void);
FUNC(void, COMM_CODE) ComM_DeInit(void)
{
 /* Clear the No Com Mode Limitation bit, it shall not be stored to NvM */
 (void)ComM_LimitECUToNoComMode(FALSE);
 /* Set block flag to be written in NvM */
 (void)NvM_SetRamBlockStatus((NvM_BlockIdType)COMM_NVM_BLOCK_ID, TRUE);
 /* Execute the original ComM_DeInit() */
 ComM_DeInit_Original();
}
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
97


Issue Report
ESCAN00095016
Service 0x23 responds with NRC 0x14 instead of 
0x31

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
8.05.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Service 0x23 (ReadMemoryByAddress) responds with NRC 0x14 instead of 0x31.
When does this happen:
-------------------------------------------------------------------
Each time a valid (supported by the ECU configuration) memory block is requested with SID 0x23 
will not fit the configured in DCM diagnostic buffer.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x23 supported by ECU and handled by DCM;
AND
 - There are readable memory blocks configured in DCM (ECUC container 
DcmDspReadMemoryRangeInfo) that do not fit the diagnostic buffer assigned with the 
DcmDslProtocolRow supporting SID 0x23;
 OR 
 - There are two or more readable memory blocks defined such 
 - they are located side by side 
 AND
 - have a common precondition that will allow reading all these blocks with a single request
 AND
 - their accumulated total length do no fit the configured buffer size as mentioned above.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Implement service 0x23 processor in the application.
Note: If SID 0x2C 0x02 shall be supported, DCM still handles it internally and requires the 
implementation of the callout Dcm_ReadMemory().
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
98


Issue Report
ESCAN00095254
Missing DET error PDUR_E_PDU_INSTANCES_LOST 
description in case of N:1 communication interface 
routings with upper layer

Component@Subcomponent:
Gw_AsrPduRCfg5@Doc_TechRef
First affected version:
2.08.00
Fixed in versions:
3.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
DET error PDUR_E_PDU_INSTANCES_LOST is reported in case of N:1 communication interface 
routings with upper layer due to N:1.
This DET could occur in different situation. And a chapter which explain the scenarios is missing. 
Hint: In case of a mixed N:1 Routing with upper layer, where the forwarding path has a 
confirmation, the destination is locked until the confirmation for the upper layer is called. If a 
gateway transmit function is called in the meantime this transmit request fails because the 
destination is not ready to receive the PDU and the DET is reported. 
When does this happen:
-------------------------------------------------------------------
During runtime
In which configuration does this happen:
-------------------------------------------------------------------
Mixed Communication Interface N:1 routings with gateway and upper layer sources. And a 
TxConfirmation is configured for the forwarding pathway.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In case of communication interface N:1 routing with upper layer, use no buffer routing for the 
gateway path and routings without TxConfirmation for the forwarding path.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
99


Issue Report
ESCAN00095441
[Only in case of multiple CAN driver are used] FIFO 
behavior is not fulfilled for transmission of CAN 
messages

Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
4.03.00
Fixed in versions:
4.05.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
FIFO behavior is not fulfilled for transmission of CAN messages
-> In case of transmission of CAN messages via the CanIf using the Tx-buffer of handling type: 
FIFO the CAN messages are not sent in order First in First Out but prioritized according to CAN 
identifier
When does this happen:
-------------------------------------------------------------------
- At runtime
In which configuration does this happen:
-------------------------------------------------------------------
Multiple CAN driver are configured
AND
At least one CAN driver has the parameter "CanMultiplexedTransmission" enabled
AND
There is at least one Tx-buffer of handling type FIFO configured for the CAN driver with enabled 
feature "CanMultiplexedTransmission"
(== at least one object "CanIfBufferCfg" is configured with "CanIfTxBufferHandlingType == FIFO")
Please note in this case the parameter "CanMultiplexedTransmission" must be disabled in order to 
fulfill FIFO behavior. Please ensure by your own that for all CAN drivers which has a Tx-buffer of 
handling type FIFO configured the feature "CanMultiplexedTransmission" is disabled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Please ensure by your own that for all CAN drivers which has a Tx-buffer of handling type FIFO 
configured the feature "CanMultiplexedTransmission" is disabled.
-> After correction of configuration please generate, compile and load your configuration into ECU
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
100


Issue Report
ESCAN00095651
Wrong software check for correct AuthID
Component@Subcomponent:
DrvCry_Rh850Icum@Implementation
First affected version:
1.00.00
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The AuthId is not checked correctly against the KeyId during the key update protocol.
All combinations are evaluated as valid.
An error will be generated in the hardware anyways. This error will then be reported to the CSM.
Additionally the use case of updating a BOOT_MAC with the BOOT_MAC_KEY is missing as a valid 
combination.
 
When does this happen:
-------------------------------------------------------------------
when the keyExtractUpdate is called with 65 Bytes of dataLength.
In which configuration does this happen:
-------------------------------------------------------------------
all configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Rely on the Hardware to detect the invalid M1-M3
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
101


Issue Report
ESCAN00095653
Primitive returns with error with valid input 
parameters (using keyID on 2nd keypage)

Component@Subcomponent:
DrvCry_Rh850Icum@Implementation
First affected version:
1.00.00
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A primitive returns with CSM_E_NOT_OK even if the input arguments are valid.
The AES-128 Encryption, AES-128 Decryption, CMAC AES-128 Generation and CMAC AES-128 
Verification fails and cannot provide a valid result.
When does this happen:
-------------------------------------------------------------------
The issue can be noticed during runtime for following API function calls:
 - Cry_30_Mpc577xC_AesDecryptUpdate
 - Cry_30_Mpc577xC_AesEncryptUpdate
 - Cry_30_Mpc577xC_CmacAes128GenUpdate
 - Cry_30_Mpc577xC_CmacAes128VerFinish
If a raw configuration for the corresponding primitive is used and in the Start function of the 
corresponding primitive a keyID is used which is located on the second keypage.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations if a raw-configuration is used for the occured primitives.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Only use mapped configurations for referencing key-IDs.
 OR
Only use keys from the first key page (key 1 - 10).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
102


Issue Report
ESCAN00095919
Services 0x23/0x3D/0x2C: Unexpected response 
behavior on invalid memory Id request

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A: ECU sends RCR-RP responses endlessly.
OR 
B: ECU sends RCR-RP until limit is reached and NRC 0x10 is sent.
When does this happen:
-------------------------------------------------------------------
Each and every time one of the following services 0x23/0x3D/0x2C is requested with an invalid 
memory identifier (MID).
In which configuration does this happen:
-------------------------------------------------------------------
For symptoms A and B:
- Service 0x23 is supported (in Dcm_Cfg.h: DCM_SVC_23_SUPPORT_ENABLED == STD_ON)
OR
- Service 0x3D is supported (in Dcm_Cfg.h: DCM_SVC_3D_SUPPORT_ENABLED == STD_ON)
OR
- Service 0x2C 0x02 is supported (in Dcm_Cfg.h: DCM_SVC_2C_02_SUPPORT_ENABLED == 
STD_ON)
 AND
 - Memory identifier is supported (in Dcm_Cfg.h: DCM_MEMMGR_MID_SUPPORT_ENABLED == 
STD_ON)
For symptom B: 
 - The DCM is configured to limit the number of RCR-RP responses (in Dcm_Cfg.h: 
DCM_DIAG_RCRRP_LIMIT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
1.) Configure system supplier specific request notification function (please see technical reference 
on chapter "How to Get Notified on a Diagnostic Service Execution Start and End" for further 
details).
2.) Within the Indication() operation the MID parameter has to be verified for the affected 
services. In case of invalid MID the NRC 0x31 shall be returned to Dcm.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
103


Issue Report
ESCAN00095963
Service 0x31: Erroneous implementation of request 
minimum length check

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
2.00.00
Fixed in versions:
8.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
- ECU sends a positive response for service 0x31 (RoutineControl) instead of NRC 0x13.
OR
- The application C/S operation (i.e. Xxx_Start()/Xxx_Stop()/Xxx_RequestResults()) receives a 
very large value for the current request length value (i.e. a negative integer value represented as 
a huge unsigned value greater than 4095 for CAN or in general 32767). This may lead to a NRC 
0x13 but also to a positive response transmission if the application does verify the request length 
for a minimum but not for maximum value, since DCM already does that.
When does this happen:
-------------------------------------------------------------------
When any multi signal RID containing a signal with dynamic length is requested, but not all signals 
behind the RID parameter are available in the request.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x31 is supported (in Dcm_Cfg.h: DCM_SVC_31_SUPPORT_ENABLED == STD_ON)
AND
- At least one Routine with dynamic length signal in request is supported (in Dcm_Cfg.h: 
DCM_RIDMGR_DYN_REQ_LEN_ENABLED == STD_ON) that:
 Additionally to the signal with dynamic length the Routine contains at least one more signal in the 
request (there is a /Dcm/DcmConfigSet/DcmDsp/DcmDspRoutineInfo with a 
DcmDspRoutineStartIn | DcmDspRoutineStopIn | DcmDspRoutineRequestResIn container including 
more than one DcmDspStartRoutineInSignal resp. DcmDspStopRoutineInSignal or 
DcmDspRoutineRequestResInSignal sub-containers, where the last one has 
DcmDspRoutineSignalType == VARIABLE_LENGTH).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Within the implementation of the C/S operations of the affected RIDs (i.e. 
Rte_Call_xxx_ROUTINE_NAME_Start/Stop/RequestResult() with more than one IN signal 
parameter where the last one represents array with dynamic length), please do verify:
- On a CAN ECU: that the function parameter "DataLength" does not have values greater than 
4095.
- On a other bus system ECU that supports longer messages (e.g. up to 65535): that the function 
parameter "DataLength" does not have values greater than the configured DCM diagnostic buffer 
or in most cases the value 32767 shall be enough to detect a negative value. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
104


Issue Report
ESCAN00096099
Main function tick time resolution smaller than 1 ms 
is not supported

Component@Subcomponent:
Tp_Asr4TpCan@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
AUTOSAR defines a float data type to configure the main function tick time.
The generator truncates the configured tick time to a millisecond.
e.g. 1.5 ms tick time is configured, but the counter values generated in the code are based on a 1 
ms tick time.
As a result, wrong timer values are used by the module
When does this happen:
-------------------------------------------------------------------
always
In which configuration does this happen:
-------------------------------------------------------------------
If a main function tick time with a resolution smaller than 1 ms is configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use a main function period which is an integer multiple of 1 ms.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
105


Issue Report
ESCAN00096195
Rte_LdComCbkTriggerTransmit returns invalid error 
code

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The LDCOM trigger transmit callback returns RTE_E_HARD_TRANSFORMER_ERROR instead of 
E_NOT_OK.
When does this happen:
-------------------------------------------------------------------
This happens when the transformation of the data failed.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when SomeIpXf is configured for a LDCOM PDU that has trigger transmit enabled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Implement a trigger transmit callback in the application, overwrite the callback in the LDCOM 
configuration with the application callback.
Call the RTE callback in the application callback and adjust the return code to E_NOT_OK when it 
is RTE_E_HARD_TRANSFORMER_ERROR.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
106


Issue Report
ESCAN00096248
Validator PDUR12501 is not shown as error for 
PduRDestPduRef

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
9.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Validator message PDUR12501 is shown on a PduRDestPduRef. It is shown as information only, 
but in reality shall be an error message.
When does this happen:
-------------------------------------------------------------------
During live validation in the DaVinci Configurator 5.
In which configuration does this happen:
-------------------------------------------------------------------
The validator message is shown if the global Pdu of PduRDestPduRef is referenced by more than 
one other container. This kind of 1:N routing path is not supported.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Check if the validation message is shown for a PduRDestPduRef. 
If No, then you're not affected.
If Yes, check if this is correctly configured. The PduR will only forward the Pdu to one of the 
destination container (the destination is chosen randomly while generating due to the internal Java 
structure). The routing to this destination container will then work as configured.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
107


Issue Report
ESCAN00096369
CAN driver stops sending message.
Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
5.03.00
Fixed in versions:
5.03.05, 5.06.01, 5.04.05, 5.07.01, 5.05.06
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
CAN driver stops sending message for one send mailbox (group of message or single message in 
case of FullCAN)
A DET will occur because of FIFO overrun after some messages written to the FIFO.
When does this happen:
-------------------------------------------------------------------
Only under specific circumstances:
- in case a BusOff event interrupts a CanIf_Transmit() or Can_Write() call.
In which configuration does this happen:
-------------------------------------------------------------------
CanIf uses FIFO buffer --> CanIfTxBufferHandlingType == FIFO 
(none AutoSar extension in CanIf)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use "CanBusoffProcessing" in "Polling" mode with lower priority than any message send operation.
or
call "STOP" and "START" transition after FIFO notifies overrun to DET or timeout for message 
confirmation occur
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
108


Issue Report
ESCAN00096716
Queued sender/receiver N:1 connections not 
detected

Component@Subcomponent:
Rte_Analyzer@Application
First affected version:
0.09.00
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RteAnalyzer reports that configuration contains more queued connections and/or more APIs with 
queues.
When does this happen:
-------------------------------------------------------------------
The error is issued during analysis of the code by RteAnalyzer in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens for configurations with queued sender/receiver N:1 communication over partition 
boundaries, when all senders are mapped to the same OsApplication.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ensure that the reported connections exist in the code. Afterwards, the message can be 
disregarded,
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
109


Issue Report
ESCAN00096901
Possible incorrect interpretation of last page status
Component@Subcomponent:
If_AsrIfFeeSmallSector@Implementation
First affected version:
1.00.02
Fixed in versions:
2.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Depending on the content, a block might not be readable although it has been written correctly 
before.
FEE may interpret content incorrectly, in case FlsBlankCheck is disabled for a block's partition.
When does this happen:
-------------------------------------------------------------------
If the last flash page of an instance is entirely filled with FlsEraseValue. FEE reads the last page of 
an instance to determine whether an erase abort has occurred. If the content of the last flash page 
of an instance matches the FlsEraseValue, FEE will interpret the last page as erased and 
consequently assumes an erase abort.
In which configuration does this happen:
-------------------------------------------------------------------
This is issue is only relevant if parameter Fee/FeePartitionConfiguration/FeeFlsBlankCheckApi is set 
to FALSE.
This issue is _NOT_ relevant for FEE usage on RH850 platform, because RH850 requires parameter 
Fee/FeePartitionConfiguration/FeeFlsBlankCheckApi to be set to TRUE.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
On RH850 platform it is highly recommended to enable parameter Fee/FeePartitionConfiguration/
FeeFlsBlankCheckApi. With this parameter enabled, this issue does not apply.
If SmallSectorFee is used on a different platform, where no FlsBlankCheck is necessary, the last 
page of an instance should not match the FlsEraseValue. The user has to make sure that the last 
page of block is _NOT_ filled with the erase value.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
110


Issue Report
ESCAN00096926
a2l: Calculation of communication parameter does 
not consider PropSeg parameter

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The calculation of the communication parameters (BTL Cycles, Sample Point) only consider input 
parameter Seg1 and Seg2
This is not entirely correct for AUTOSAR as there is an additional parameter PropSeg which must 
also be considered.
As a result the parameters in the CanXcp.a2l fragment are not correct which might lead to 
communication issues with the Xcp master.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
all configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The generated CanXcp.a2l fragment is only used by the Xcp Master Tool and can be modified 
manually to contain the correct BTL value.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
111


Issue Report
ESCAN00097045
Dem_SetEventAvailable returns E_OK for events 
unavailable in variant

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
7.00.00
Fixed in versions:
12.01.04, 14.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dem_SetEventAvailable returns E_OK when called for an event unavailable in variant, 
although availability of this event cannot be changed during runtime. 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
Dem/DemGeneral/DemAvailabilitySupport == DEM_EVENT_AVAILABILITY
AND
Dem/DemConfigSet/DemEventParameter/DemEventAvailableInVariant == FALSE for the event the 
API Dem_SetEventAvailable is called for.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Don't call API Dem_SetEventAvailable for an event unavailable in variant.
At least don't assume that an event unavailable in variant is set available during runtime although 
API returns E_OK. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
112


Issue Report
ESCAN00097052
Data send completed trigger fired to early when 
Rte_ComSendSignalProxyPeriodic is used

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.02.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A call to Rte_Write immediately triggers a runnable with data send completed trigger although 
COM did not call the confirmation callback, yet.
When does this happen:
-------------------------------------------------------------------
During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a signal is sent from a different partition than the partition that contains the 
COM module and when transmission acknowlegement is configured.
Moreover a runnable needs to be configured to be triggered on data send completion.
It only happens when there are no additional internal receivers and when /MICROSAR/Rte/
RteGeneration/RteEnforceIoc is enabled in the RTE configuration.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure an additional internal receiver.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
113


Issue Report
ESCAN00097141
The Xcp Module ID is not according to AR 4
Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
1.00.01, 3.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The service Xcp_GetVersionInfo() currently reports a MODULE_ID = 26. This value was used 
during the AR3 phase but is not according to AR4. In AR4 the MODULE_ID shall be 212.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
All configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The version information returned by Xcp_GetVersionInfo() can be interpreted accordingly (with 
different MODULE_ID)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
114


Issue Report
ESCAN00097176
When the XCP Master requests Timestamps but 
none are configured no negative response is 
returned

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the XCP Master requests timestamps to be active and no timestamps are configured in the 
XCP Slave, the Slave ignores this request. No negative response is returned to inform about this 
missing feature.
The resulting XCP frames do not contain timestamps while the XCP Master expects one. As a result 
the measurement is invalid.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When an XCP Master requests timestamps but none are configured in the Slave.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Enable timestamps in the XCP configuration
or
Disable Slave timestamps in the XCP Master Tool
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
115


Issue Report
ESCAN00097264
Service 0x2C: Valid DDDID definition requests 
always responded with NRC 0x31

Component@Subcomponent:
Diag_Asr4Dcm@Description
First affected version:
1.02.00
Fixed in versions:
9.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A diagnostic request for service 0x2C (DynamicallyDefineDataIdentifier) for definition of a DDDID 
(DynamicallyDefinedDID) is responded unexpectedly with NRC 0x31. 
After the issue occurred, the ECU is not blocked. All other services of the Dcm can be used 
normally.
When does this happen:
-------------------------------------------------------------------
Every time the affected by the configuration DDDID is requested for definition with service 0x2C.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM supports and implements diagnostic service 0x2C (DynamicallyDefineDataIdentifier)
AND
- The affected DDDID is configured with 256 SourceItems (ECUC parameter /Dcm/DcmConfigSet/
DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidDefine/DcmDspDDDidMaxElements = 256)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Define only DDDID (DynamicallyDefinedDID) with "DcmDspDDDidMaxElements" up to 255 as 
restricted per AR DCM SWS 4.x.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
116


Issue Report
ESCAN00097288
When fixed timestamps are configured but the XCP 
Master does not request them, no negative 
response is returned

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the XCP Slave has fixed timestamps configured (i.e. timestamps are always transmitted) but 
the XCP Master does not request timestamps in the SET_DAQ_LIST_MODE command, no error 
code is returned.
The resulting XCP frames do contain timestamps while the XCP Master expects none. As a result 
the measurement is invalid.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When fixed timestamps are configured but the XCP Master requests none.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Enable Slave timestamps in the XCP Master Tool
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
117


Issue Report
ESCAN00097333
ComM_BusSM_ModeIndication called with locked 
interrupts - OS ErrorHook on Os API Invocation

Component@Subcomponent:
Ccl_Asr4SmCan@Implementation
First affected version:
2.00.00
Fixed in versions:
2.13.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The ComM triggers a BswM indication within the call context of the 
ComM_BusSM_ModeIndication().
Symptom 1)
OS API Invocation ends up with a call to ErrorHook.
Error Cause of this ErrorHook is that OS API is called whereas Interrupts are locked.
Errorcodes would then be:
osdErrATIntAPIDisabled 0x1104U,
osdErrHTMultipleActivation 0x1305U,
osdErrSEIntAPIDisabled 0x4105U,
osdErrSECallContext 0x4106U or
osdErrWEInterruptsDisabled 0x4403U
Symptom 2)
Rte Runnable that is triggered on TxError will not be called when Communication is shut down and 
Sending Request is outstanding
When does this happen:
-------------------------------------------------------------------
Every time function "ComM_BusSM_ModeIndication" ends up in an Os API Invocation (for example 
ComM triggers BswM and BswM Rule to stop Ipdu Groups AND a transmission is still ongoing AND 
TxError is configured to trigger a runnable in the Rte)
AND 
the function "ComM_BusSM_ModeIndication" is called with locked interrupts.
In which configuration does this happen:
-------------------------------------------------------------------
If any BswM rule (which belongs to a ComM BswM indication), is configured as immediate 
AND 
an OS function is called within the call context of the BswM rule
AND
this OS function must not be called with locked interrupts.
e.g.
Std Rules in BswM are configured
AND
A Rte Runnable is triggered on Tx Error
AND 
Osek OS which implements the requirement "If ActivateTask / SetEvent is called with locked 
Interrupts, reject the action and call an ErrorHook" is used (for example Vector Os)
 
Resolution Description:
118


Issue Report
ESCAN00097333
ComM_BusSM_ModeIndication called with locked 
interrupts - OS ErrorHook on Os API Invocation

Workaround:
-------------------------------------------------------------------
Configure the BswM port of the ComM indication as deferred.
If the startup is not affected and a fast startup is desired it is possible to "copy" the port and set 
one as deferred (e.g. used for the shut down rules) and the other port as immediate (e.g. used for 
the startup rules).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00097361
Service 0x2A: Wrong prioritisation between NRC 
0x13 and 0x31

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.01.00
Fixed in versions:
9.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
ECU response with NRC 0x31 instead of NRC 0x13.
When does this happen:
-------------------------------------------------------------------
If a service 0x2A is requested with an unsupported transmissionMode and no 
periodicDataIdentifier.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x2A is supported (in Dcm_Cfg.h: DCM_SVC_2A_SUPPORT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use supplierIndication function notification to catch this length check. 
Note: Since the supplier specific Xxx_Indication() calls is performed after the SID level checks are 
executed, no session, security or other verification shall be performed within this callout - only the 
length check.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
119


Issue Report
ESCAN00097377
Communication not possible in Multi Channel use 
case on channels > 0

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In a multi channel setup with different bus systems (e.g. CAN and TcpIp), communication is only 
possible on channel 0 (CAN).
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
In a multi bus system setup with the option "Multi Client Support" disabled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Activate the option Multi Client Support
/MICROSAR/Xcp/XcpGeneral/XcpMultiClientSupport
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
120


Issue Report
ESCAN00097381
Service 0x27: PowerOn delay time not started on 
single false access attempt

Component@Subcomponent:
Diag_Asr4Dcm@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The ECU allows at power-on/reset immediate security access attempt. In other words: the first 
security access request for getting a new seed is positively responded, instead of sending NRC 
0x37 (DelayTimeNotExpired).
When does this happen:
-------------------------------------------------------------------
If the following sequence is ran:
- Security access request for getting seed of level X is positively responded.
- Security access request sending a key of level X failed with NRC 0x35 (i.e. prior reaching the 
false access attempt count limit).
- ECU is reset/powered down.
- ECU is online/powered on, already entered in a session supporting SID 0x27 and false access 
attempt delay time is not yet elapsed.
- Security access request for getting seed of level X is positively responded. <--- According to 
ISO14229-1:2013 NRC 0x37 is expected here.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x27 (SecurityAccess) is supported and implemented by DCM
AND
- The brute-force-attack prevention via access attempt count and delay time is enabled (in 
Dcm_Cfg.h #define DCM_STATE_SEC_RETRY_ENABLED == STD_ON)
AND
- The OEM does not override the defined in ISO14229-1:2013 defined behavior (i.e. the OEM may 
specify that the delay time at power-on/reset is started only if the restored attempt counter values 
is equal or greater than the specified limit other than single attempt)
AND
- The attempt counter(s) are stored into non-volatile memory (in Dcm_Cfg.h #define 
DCM_STATE_SEC_ATT_CNTR_EXT_STORAGE_ENABLED == STD_ON)
AND
 - The false access attempt count limit is > 1 (in DCM ECUC there is at least one parameter: /Dcm/
DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurityNumAttDelay > 1)
 AND
 - The above affected level supports the non-volatile storage of its attempt counter (in DCM ECUC 
the corresponding parameter of container DcmDspSecurityRow: 
DcmDspSecurityAttemptCounterEnabled = TRUE)
 
Resolution Description:
121


Issue Report
ESCAN00097381
Service 0x27: PowerOn delay time not started on 
single false access attempt

Workaround:
-------------------------------------------------------------------
The DCM application of the affected project shall implement the Xxx_SetSecurityAttemptCounter() 
API as follows:
- If DCM passed a value = 0, just store it into NvM
- If DCM passes a value > 0, and the last stored in NvM values is 0, then and only then store the 
value 255. 
 Note: Value 255 is chosen to be configuration independent, in case the attempt count changes for 
instance from two to three.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00097520
Callout Dcm_FilterDidLookUpResult() is called with 
unexpected OpStatus

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
5.00.00
Fixed in versions:
9.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The callout Dcm_FilterDidLookUpResult() is initially called with OpStatus DCM_PENDING instead of 
DCM_INITIAL.
When does this happen:
-------------------------------------------------------------------
When a specific DID within a DID range is requested over any DID related diagnostic service.
And the return value of the callout IsDidAvailable() is at least one time DCM_E_PENDING.
And the final return values of the very same callout are E_OK and DCM_DID_SUPPORTED.
In which configuration does this happen:
-------------------------------------------------------------------
- Any DID related diagnostic service is supported
AND
- DID ranges with gaps are supported (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPTYPE_RANGE_ISAVAIL_ENABLED == STD_ON)
AND
- External DID look up filtering is supported (in Dcm_Cfg.h: #define 
DCM_DIDMGR_EXTENDED_LOOKUP_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
- Just ignore the OpStatus within Dcm_FilterDidLookUpResult() if applicable (e.g. if filtering is 
done synchronously)
OR
- Manage the operation status by the application
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
122


Issue Report
ESCAN00097602
CAN interrupt lost
Component@Subcomponent:
DrvCan_Rh850McanAsr@Implementation
First affected version:
2.09.00
Fixed in versions:
2.20.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
OS system error "Missing interrupt request" (E_OS_SYS_ASSERTION) occurs.
When does this happen:
-------------------------------------------------------------------
At runtime in case an interrupt occurs while interrupts are not enabled by the CAN Driver.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations except pure polling configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure Disable and Restore CAN Interrupts to be handled by the application.
The application callback function shall handle the synchronization of the MCAN and INTC interrupt 
disabling as follows:
 For Rh850 (P1xC derivatives) the update of the MCAN.IE register has to be synchronized with the 
INTC:
 step 1: DI - Global Interrupt Disable, already accomplished by the Caller
 step 2: MCAN.IE = 0 - disable MCAN interrupt after storing the current content
 step 3: Dummy = MCAN.IE - dummy read of MCAN register
 step 4: SYNCP - ensure that all previous instructions have been completed and the read data 
requested from a peripheral has arrived at the CPU. 
 step 5: EI - Global Interrupt Enable, already accomplished by the Caller 
The application callback function shall handle the synchronization of the MCAN and INTC interrupt 
restoring as follows:
 step 6: restore the MCAN interrupt flags which were stored in step 2 
 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
123


Issue Report
ESCAN00097637
EcuM calls the Mcu_SetMode API for setting the 
normal mcu mode with an invalid mcu mode

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
8.00.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Mcu_SetMode API is called with a wrong mcu mode which can lead to an array out of bounds 
write access.
When does this happen:
-------------------------------------------------------------------
After wakeup from sleep.
In which configuration does this happen:
-------------------------------------------------------------------
The Mcu_ModeType values start with 0 instead of 1.
 
Resolution Description:
124


Issue Report
ESCAN00097637
EcuM calls the Mcu_SetMode API for setting the 
normal mcu mode with an invalid mcu mode

Workaround:
-------------------------------------------------------------------
The Mcu_SetMode API is called inside the callout EcuM_McuSetMode with the passed (and 
potentially wrong) McuMode.
To avoid passing the wrong mode to the Mcu the callout EcuM_McuSetMode can be adapted like 
the following:
FUNC(void, ECUM_CODE) EcuM_McuSetMode(Mcu_ModeType McuMode)
{
/
**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT! <USERBLOCK EcuM_McuSetMode> DO NOT CHANGE THIS 
COMMENT!
 
*********************************************************************************************************************/
 /* Add implementation of EcuM_McuSetMode() */
 if(McuMode == 0)
 {
 Mcu_SetMode(McuConf_McuModeSettingConf_McuModeSettingConf); // <=== Use symbolic 
names provided by the Mcu here.
 }
 
 
 return;
/
**********************************************************************************************************************
 * DO NOT CHANGE THIS COMMENT! </USERBLOCK> DO NOT CHANGE THIS COMMENT!
 
*********************************************************************************************************************/
} /* End of EcuM_McuSetMode() */
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
125


Issue Report
ESCAN00097731
Service 0x10: Jump to FBL performed although 
forced RCR-RP could not be sent

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
For a HIS compatible jump to FBL DCM triggers always a reset, independently of whether the 
forced RCR-RP could be sent by the transmission layer or not.
When does this happen:
-------------------------------------------------------------------
Whenever a jump to FBL is requested, e.g. via a 0x10 0x02 request.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x10 is supported (in Dcm_Cfg.h: #define DCM_SVC_10_SUPPORT_ENABLED == 
STD_ON)
AND
- Jump to bootloader is supported (in Dcm_Cfg.h: #define DCM_SVC_10_JMP2BOOT_ENABLED 
== STD_ON)
AND
- RCR-RP on jumping to the FBL is supported (in Dcm_Cfg.h: #define 
DCM_DIAG_RCRRP_ON_BOOT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The workaround for this issue involves overriding default service handling for service 
"DiagnosticSessionControl" (0x10).
Please contact Vector for technical details and support on how to implement it in order to avoid 
any unwanted side effects.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
126


Issue Report
ESCAN00097925
Memory read access exception due to incorrect 
address conversion

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The component raises an memory access exception on Posix systems due to an read access to a 
invalid address. This happens when the XCP command GET_DAQ_EVENT_INFO is used.
This command is activated when the option: /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/
XcpGetDAQEventInfo is enabled.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When the feature Event info is used
AND
the component is used on a operating system that uses relative addresses like Windows or Posix 
and the addresses are converted from virtual to physical addresses in the Xcp_GetPointer call-back.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Get Daq Event Info is an optional command. It can be deactivated and the information from 
XCP_events.a2l can be used instead.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
127


Issue Report
ESCAN00098007
Declined Immediate Nm Transmissions is retried 
later than expected

Component@Subcomponent:
Nm_Asr4NmCan@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
7.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The technical reference contains unprecise information about the procedure when an immediate 
Nm transmission was declined.
Current documentation states in chapter 3.15 that transmit request is retried after Immediate Nm 
message cycle time.
It should be: After main function cycle time.
/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmImmediateNmCycleTime
/MICROSAR/CanNm/CanNmGlobalConfig/CanNmMainFunctionPeriod
When does this happen:
-------------------------------------------------------------------
-
In which configuration does this happen:
-------------------------------------------------------------------
-
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Note in chapter 3.15 should be described as follows:
Note 
If the send request of an ‘immediate transmission’ is rejected by the lower layer (e.g. 
CanIf), the rejected send request is not considered as ‘immediate transmission’. That 
means that the counter that counts the number of ‘immediate transmissions’ 
ImmediateNmMsgCount is not decremented. The transmission will be retried in the 
next main function cycle. 
Example: Let ‘Immediate Nm Transmissions’ := 2. The initial counter value of 
ImmediateNmMsgCount is 1. 
1. When Repeat Message has just been entered, the first transmission request 
TReq A is rejected. ImmediateNmMsgCount is not decremented. 
2. CanNm waits until the next main function cycle of CanNm (first interval t int1st ). 
3. CanNm sends the NM message successfully. ImmediateNmMsgCount is 
decremented to 0. 
4. CanNm waits ‘Immediate Msg CycleTime’ (second interval t int2nd ). 
5. CanNm sends the next NM message successfully. 
6. Then ‘Msg Cycle Time’ is waited until the next NM message is sent because 
ImmediateNmMsgCount is already 0. 
If the first NM transmission request TReq A was successful (step 1), the second interval 
time t int2nd would be ‘Msg Cycle Time’ instead of ‘Immediate Msg CycleTime’. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
128


Issue Report
ESCAN00098036
Cyclic PDUs with a ComGwRoutingTimeout are 
triggered when started if ComTxDlMonTimeBase is 
configured

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
8.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Periodic or Mixed Tx ComIPdu's with a configured ComGwRoutingTimeout might get triggered after 
their respective ComIPduGroup is started.
When does this happen:
-------------------------------------------------------------------
This issue occurs at runtime after the ComIPduGroup is started within the next 
Com_MainFunctionTx call.
In which configuration does this happen:
-------------------------------------------------------------------
Tx ComIPdu is part of any routing relation
AND
ComGwRoutingTimeout is configured for the Tx ComIPdu
AND
ComMainfunctionTimingDomainSupport is enabled
AND
ComTxDlMonTimeBase is configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Deactivate ComTxDlMonTimeBase
OR
Set resolution of ComTxDlMonTimeBase higher than ComTxCycleCounterTimeBase, such that 
ComTxCycleCounterTimeBase is a multiple of ComTxDlMonTimeBase.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
129


Issue Report
ESCAN00098095
PduInfoPtr of API Appl_GenericConfirmation() 
contain DLC instead of message length

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
4.01.00
Fixed in versions:
6.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
PduInfoPtr of API Appl_GenericConfirmation() contain DLC instead of message length
When does this happen:
-------------------------------------------------------------------
while runtime always and immediate when a FD-message is received.
In which configuration does this happen:
-------------------------------------------------------------------
CanGenericConfirmation is set to API2 (CAN_GENERIC_CONFIRMATION == CAN_API2)
AND
CAN-FD messages supported (DLC / Length > 8byte)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
calculate length out of DLC
DlcToLengthMap[16] =
{
 0, 1, 2, 3,
 4, 5, 6, 7,
 8, 12, 16, 20,
 24, 32, 48, 64
};
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
130


Issue Report
ESCAN00098361
Service 0x2F: Wrong ReturnControlToECU 
operations are called on session/security state 
change

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.00.00
Fixed in versions:
9.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
DCM calls wrong ReturnControlToECU() operations on session/security state change for active IO 
controls.
When does this happen:
-------------------------------------------------------------------
- During transition to default session.
OR
- During transition to any non-default session if any state restriction of an active IO control is no 
longer fulfilled.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x24 is supported and handled by DCM (in Dcm_Cfg.h: #define 
DCM_SVC_24_SUPPORT_ENABLED == STD_ON)
AND
- Service 0x2F is supported and handled by DCM (in Dcm_Cfg.h: #define 
DCM_SVC_2F_SUPPORT_ENABLED == STD_ON)
AND
- The operation ReturnControlToEcu is configured for any IO control (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPTYPE_IO_RETCTRL2ECU_ENABLED == STD_ON)
AND
- At least one DID supports scaling and any IO operation (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OP_INFO_COMBINED_ENABLED == STD_ON)
AND
- Any DID supporting the scaling operation has an ID lower than that one of any IO DID
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
1.) Configure system supplier specific request notification function (please see technical reference 
on chapter "How to Get Notified on a Diagnostic Service Execution Start and End" for further 
details).
2.) Within the Indication() operation keep track of the active IO DIDs.
3.) Call the ReturnControlToECU() operation on each session/security change for each IO DID no 
longer supported in the new state.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
131


Issue Report
ESCAN00099078
RTE generator does not trigger NvM_MainFunction 
when a NvBlock SWC has no NvBlockDescriptors

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
NV memory is not restored or persisted.
When does this happen:
-------------------------------------------------------------------
Always. During runtime.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains NvBlockSWCs without NvBlockDescriptors.
The main functionality of NvBlockSWCs is to provide access to NvBlocks. It is therefore assumed 
that this
is an uncommon configuration that only occurs during development.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a NvBlockDescriptor in the NvBlockSWC.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
132


Issue Report
ESCAN00099239
Enabled event memory that has no events assigned 
leads to wrong code generation

Component@Subcomponent:
Diag_Asr4Dem@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Generated code leads to undefined behavior in DEM.
When does this happen:
-------------------------------------------------------------------
When requesting services (e.g. ClearDTC) for an event memory.
In which configuration does this happen:
-------------------------------------------------------------------
(
 Dem/DemGeneral/DemMaxNumberEventEntrySecondary > 0
 AND 
 No event with Dem/DemConfigSet/DemEventParameter/DemEventClass/DemEventDestination 
== DEM_DTC_ORIGIN_SECONDARY_MEMORY configured
)
OR
(
 Dem/DemGeneral/DemMaxNumberEventEntryPrimary > 0
 AND 
 No event with Dem/DemConfigSet/DemEventParameter/DemEventClass/DemEventDestination 
== DEM_DTC_ORIGIN_PRIMARY_MEMORY configured
)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set Dem/DemGeneral/DemMaxNumberEventEntrySecondary == 0, if no event with Dem/
DemConfigSet/DemEventParameter/DemEventClass/DemEventDestination == 
DEM_DTC_ORIGIN_SECONDARY_MEMORY is configured
If no event with Dem/DemConfigSet/DemEventParameter/DemEventClass/DemEventDestination 
== DEM_DTC_ORIGIN_PRIMARY_MEMORY is configured, set Dem/DemGeneral/
DemMaxNumberEventEntryPrimary == 1
and configure dummy event with 
Dem/DemConfigSet/DemEventParameter/DemEventClass/DemEventDestination == 
DEM_DTC_ORIGIN_PRIMARY_MEMORY
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
133


Issue Report
ESCAN00099440
RTE sends unexpected data when activation reasons 
are configured for a runnable with implicit write 
accesses

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.15.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A software component receives unexpected data.
When does this happen:
-------------------------------------------------------------------
During runtime when a runnable is triggered several times but is executed only once.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when activation reasons are configured for a runnable with implicit
write accesses.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use explicit instead of implicit communication or enable the parameter /MICROSAR/Rte/
RteGeneration/RteInitializeImplicitBuffers.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
134


Issue Report
ESCAN00099458
Channel restarts when all Partial Networks are 
released and channel is supposed to shut down

Component@Subcomponent:
Nm_Asr4NmCan@GenTool_GeneratorMsr
First affected version:
5.00.00
Fixed in versions:
9.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The network is restarted shortly before it is supposed to shut down.
The ECU is potentially kept awake forever.
As a consequence NM and application messages are transmitted unexpectedly.
When does this happen:
-------------------------------------------------------------------
1. A PNC is requested internally or a PNC request is received from another ECU at least once.
2. All internal and externally requested PNC have been released, the shutdown sequence is 
initiated. 
3. The affected channel is restarted.
In which configuration does this happen:
-------------------------------------------------------------------
Partial Networking must be enabled and either Pn Eira Calculation or Pn Era Calculation is enabled.
Additionally, the Pn Reset Time must be bigger than the Timeout Time.
- '/MICROSAR/ComM/ComMGeneral/ComMPncPrepareSleepTimer' is not configured
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmPnEnabled'
AND
(
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmPnEraCalcEnabled' on at 
least one channel
OR
-' /MICROSAR/CanNm/CanNmGlobalConfig/CanNmPnEiraCalcEnabled'
)
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmPnResetTime' > '/MICROSAR/CanNm/
CanNmGlobalConfig/CanNmChannelConfig/CanNmTimeoutTime'
 
Resolution Description:
135


Issue Report
ESCAN00099458
Channel restarts when all Partial Networks are 
released and channel is supposed to shut down

Workaround:
-------------------------------------------------------------------
Set the TimeoutTime greater than PnResetTime + PnCPrepareSleepTimer.
Refer to TechnicalReference_Asr_ComM.pdf for further details.
If PnCPrepareSleepTimer is not used, assume it has value zero.
Affected parameters:
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmPnResetTime'
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmTimeoutTime'
- '/MICROSAR/ComM/ComMGeneral/ComMPncPrepareSleepTimer'
Resolution:
-------------------------------------------------------------------
A validator is modified that prevents the generation of the wrong configuration.
ESCAN00099480
Dirty flags not handled when multiple implicit 
accesses for the same NvBlock descriptor are 
configured and implicit write is skipped

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.08.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A NvBlock is not written to NVRAM.
When does this happen:
-------------------------------------------------------------------
During runtime, when the application writes NvBlocks with implicit write accesses
and does not call Rte_IWrite or Rte_IWriteRef for all configured port accesses in every runnable 
call.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple write accesses to the same 
NvBlockDescriptor
in the same runnable. Moreover the dirty flag needs to be configured for the NvBlockDescriptor 
and InitializeImplicitBuffers needs to be configured to allow
that Rte_IWrite and Rte_IWriteRef calls are skipped.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Call Rte_IWrite or Rte_IWriteRef for all data elements with dirty flag handling.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
136


Issue Report
ESCAN00099536
Safety Manual does not fit to current description 
file / generator output

Component@Subcomponent:
If_Asr4IfWd@root
First affected version:
2.01.00
Fixed in versions:
2.01.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The safety manual was not updated after a update of the description file. Therefore the generator 
output did not fit to the generated output. Within the safety manual, the user has to verify some 
parameters / pre processor switches which were no more available.
These parameters were:
 - WdgIfUseAutosarDrvApi
 - WdgIfInternalTickCounterRef
 - WdgIfStateCombinerUseManualMode
Due to the fact that the WdgIfStateCombinerUseManualMode was removed, also the generator 
output has changed. Therefore also the Safety Manual was updated. The WdgIf_Interface does no 
more contain wdgif_statecombiner_common_config and wdgif_statecombiner_manual_config, but 
only wdgif_statecombiner_config.
WdgIf_StateCombinerManualConfigType does no more exist - instead of 
WdgIf_StateCombinerSlaveTriggerPatternType was introduced.
When does this happen:
-------------------------------------------------------------------
This issue is no issue depending to a runtime error. This issue does only effect the manual code 
verification procedure.
This issue is active only if the last entry of the change history in WdgIf_bswmd.arxml is 6.01.00.
In which configuration does this happen:
-------------------------------------------------------------------
Always during verification procedure described in safety manual.
 
Resolution Description:
137


Issue Report
ESCAN00099536
Safety Manual does not fit to current description 
file / generator output

Workaround:
-------------------------------------------------------------------
Use the new safety manual (r.2.624.118):
1 Safety Manual WdgIf
1.1 Safety features
SMI-519
This component provides the following safety features:
ID Safety feature 
CREQ-107414 WdgIf shall provide a service to set the mode of a watchdog device
CREQ-107415 WdgIf shall provide a service to set the trigger condition for a watchdog device
CREQ-107416 WdgIf shall support a mechanism to combine statuses of different cores and handle 
one watchdog for different cores
1.2 Configuration constraints
SMI-522
If a state combiner is used, the user of MICROSAR Safe shall configure 
o WdgIfStateCombinerSpinlockID and
o WdgIfStateCombinerStartUpSyncCycles
for each core that is used by the state combiner.
SMI-523
If a state combiner is used and WdgIfStateCombinerStartUpSyncCycles is set to a value s, the 
user of MICROSAR Safe shall consider that for the first s SupervisionCycles of the master, the 
master does not monitor the slave triggers.
However, reset requests from a slave within the first s SupervisionCycles, are escalated by the 
master with the next call of the master’s WdgM_MainFunction().
1.3 Additional verification measures
SMI-525
The user of MICROSAR Safe shall verify that the output path of the generator is empty before the 
generator is started.
The output path can be defined by the command line argument OUTPUT-DIRECTORY.
SMI-526
The user of MICROSAR Safe shall inspect the messages of the generator execution.
If the generator aborts the generation process with an error message, the (partially) generated 
output files shall not be used in the system.
If the generator detects an error, a message starting with "ERROR" is displayed on the standard 
output.
If the generator shows a warning message starting with "WARNING", the user of MICROSAR Safe 
shall ensure that the cause of the warning does not invalidate the generated output files.
SMI-527
The user of MICROSAR Safe shall verify that the following preprocessor directives are defined with 
the correct value independent from whether a state combiner is configured or not:
Preprocessor Directive Value 
WDGIF_VERSION_INFO_API STD_ON if WdgIfVersionInfoApi is TRUE, otherwise STD_OFF.
WDGIF_DEV_ERROR_DETECT STD_ON if WdgIfDevErrorDetect is TRUE, otherwise STD_OFF.
WDGIF_USE_STATECOMBINER STD_ON if WdgIfUseStateCombiner is TRUE, otherwise STD_OFF.
The defines can be found in WdgIf_Cfg_Features.h.
SMI-528
The user of MICROSAR Safe shall verify that the following preprocessor directives are defined with 
the correct value only if a state combiner is configured:
Preprocessor Directive Value 
WDGIF_STATECOMBINER_USE_OS_SPIN_LOCK STD_ON if WdgIfStateCombinerUseOsSpinlock is 
TRUE, otherwise STD_OFF.
This define can be found in WdgIf_Cfg_Features.h.
SMI-529
The user of MICROSAR Safe shall verify that the following preprocessor directives are defined with 
the correct value independent from whether a state combiner is configured or not:
138


Issue Report
ESCAN00099536
Safety Manual does not fit to current description 
file / generator output

Preprocessor Directive Value 
WDGIF_NUMBER_OF_WDGIFDEVICES The number of configured WD Interface Devices.
This define can be found in WdgIf_LCfg.h.
SMI-530
The user of MICROSAR Safe shall verify that the following preprocessor directives are defined with 
the correct value only if a state combiner is configured:
Preprocessor Directive Value 
WDGIF_NUMBER_OF_SLAVES The configured number of slave cores. Cores that are not attached 
to a State Combiner (i.e. they run independent from other cores) do not count as slave.
This define can be found in WdgIf_LCfg.h.
SMI-531
The user of MICROSAR Safe shall verify that the C-struct const WdgIf_InterfaceType 
WdgIf_Interface is defined in WdgIf_LCfg.c.
WdgIf_Interface shall contain the following fields:
Field Value Description 
1st WDGIF_NUMBER_OF_WDGIFDEVICES The number of WD Interface Devices.
2nd WdgIf_FunctionsPerWdg A reference to the list of WD Interface Devices.
If a state combiner is configured, WdgIf_Interface shall also contain the following field: 
Field Value Description 
3rd &wdgif_statecombiner_config A reference to the state combiner data structure.
SMI-532
The user of MICROSAR Safe shall verify that the array static const 
WdgIf_InterfaceFunctionsPerWdgDeviceType WdgIf_FunctionsPerWdg 
[WDGIF_NUMBER_OF_WDGIFDEVICES] is defined in WdgIf_LCfg.c.
WdgIf_FunctionsPerWdg shall refer all – and only - the WD Interface Devices that are configured 
in the EDF.
WdgIf_FunctionsPerWdg[i] shall refer the underlying WD Interface Device in the EDF with 
WdgIfDeviceIndex = i.
The fields in an array element in WdgIf_FunctionsPerWdg shall be set as follows:
Field Value Description 
1st &device_functions If the underlying WD Interface Device is directly linked to a WD driver for 
device, then the field refers to the C-struct device_functions.
1st NULL_PTR If the underlying WD Interface Device shares the WD driver with other WD Interface 
Devices using a state combiner, then the linked WD device is referred in 
wdgif_statecombiner_config.
If a state combiner is configured, an array element in WdgIf_FunctionsPerWdg shall also contain 
the following field: 
Field Value Description 
2nd WdgInstance A number that uniquely identifies the WD Interface Device instance for the 
underlying platform. All instances on the same platform are numbered consecutively starting with 
0. Example: One platform has instances A and B, another platform has instances C and D. Then A, 
B, C, and D have WdgInstance set (in this order) as: 0,1,0,1.
SMI-533
If a state combiner is configured, the user of MICROSAR Safe shall verify that the array static 
const WdgIf_StateCombinerConfigType wdgif_statecombiner_config is defined in WdgIf_LCfg.c.
The fields in wdgif_statecombiner_config shall be set as follows:
Field Value Description 
1st WDGIF_NUMBER_OF_SLAVES The number of configured slaves.
2nd WdgIfStateCombinerSpinlockID The value of field WdgIfStateCombinerSpinlockID in the EDF.
3rd WdgIfStateCombinerStartUpSyncCycles The value of field 
WdgIfStateCombinerStartUpSyncCycles in the EDF.
4th &device_functions A reference to the WD driver API functions for device.
5th wdgif_statecombiner_shared_memory A reference to the shared memory for the state 
combiners of the Watchdog Interfaces.
5th wdgif_statecombiner_slave_trigger_pattern A reference to the array of the state combiners 
139


Issue Report
ESCAN00099536
Safety Manual does not fit to current description 
file / generator output

trigger pattern of each slave.
SMI-534
If a state combiner is configured, the user of MICROSAR Safe shall verify that the array 
WdgIf_StateCombinerSharedMemory wdgif_statecombiner_shared_memory 
[WDGIF_NUMBER_OF_SLAVES] is defined in WdgIf_LCfg.c.
The WdgIf writes to this array, hence it is not const.
wdgif_statecombiner_shared_memory shall contain one array element for each configured slave 
and the fields in the element shall be set as shown in the following table:
Field Value Description 
1st 0u Initial value for the slave’s counter.
2nd (uint32)~0u Inverse initial value for the slave’s counter.
SMI-536
If the state combiner is configured in manual mode, the user of MICROSAR Safe shall verify that 
for a configured slave with ID the C-struct static const 
WdgIf_StateCombinerSlaveTriggerPatternType wdgif_statecombiner_config_slave<ID> is defined 
in WdgIf_LCfg.c.
wdgif_statecombiner_config_slave<ID> shall be set as follows:
Field Value Description 
1st WdgIfStateCombinerReferenceCycle The value of field WdgIfStateCombinerReferenceCycle in 
the EDF.
2nd WdgIfStateCombinerSlaveIncrementsMin The value of field 
WdgIfStateCombinerSlaveIncrementsMin in the EDF.
3rd WdgIfStateCombinerSlaveIncrementsMax The value of field 
WdgIfStateCombinerSlaveIncrementsMax in the EDF.
SMI-537
The user of MICROSAR Safe shall verify that for each configured platform the C-struct static const 
WdgIf_InterfaceFunctionsType <WdgIfDevice>_functions is defined in WdgIf_LCfg.c.
The fields for each C-struct <WdgIfDevice>_functions shall be set as follows:
Field Value Description 
1st Wdg__SetMode_ A reference to the WD driver’s API function to set the mode of the device 
referred to by infix.
2nd Wdg__SetTriggerCondition_ A reference to the WD driver’s API function to set the trigger 
condition of the device referred to by infix.
1.4 Safety features required from other components
SMI-520
This component requires the triggering of the watchdog and setting the triggering mode as a 
safety feature from the watchdog driver.
This requirement is fulfilled if a watchdog driver by Vector is used.
SMI-3085
The WdgIf shall be used in order to call the services of underlying Watchdog driver(/s) to set the 
mode and the trigger condition as expected by the drivers.
The user of MICROSAR Safe shall verify that the WdgIf services are only called by the WdgM.
This requirement is fulfilled for all components of MICROSAR (if Vector's WdgM is used).
If e.g. the trigger condition is called by another component, this may lead to unintended triggering 
of the watchdog.
If the watchdog stack is not properly set up, it may not provide the expected protection.
1.5 Dependencies to hardware
This component does not use a direct hardware interface.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
140


Issue Report
ESCAN00099665
Xcp_Event throws DET check if called before 
Xcp_Init

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The DET error XCP_E_UNINIT is thrown with the function id XCP_SID_EVENT when the Xcp_Event 
function is called before the component is initialized. This might be a valid use case when e.g. the 
Xcp_Event function is called from a different core with a different initialization duration or if it is 
called from interrupt functions.
If DET is entirely deactivated the function is called while the XCP might be in an uninitialized state. 
In this case the following might happen:
RAM is initialized to 0 by startup code: No negative side effects will happen
RAM is not initialized: XCP might express undefined behaviour and sample data which is not valid.
The safe way is to keep the SafeBsw Checks enabled as described in chapter workaround.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When DET reporting is on
(/MICROSAR/Xcp/XcpGeneral/XcpDevErrorDetect is enabled)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
As a temporary work around disable DET error reporting while the Safe BSW checks are still 
enabled.
Disable: /MICROSAR/Xcp/XcpGeneral/XcpDevErrorDetect
Enable: /MICROSAR/Xcp/XcpGeneral/XcpSafeBswChecks
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
141


Issue Report
ESCAN00100047
Consecutive failed cycle counter not persisted to 
NvRAM

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
9.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After ECU restart updates to Consecutive Failed Cycle Counter can be lost, although 
synchronization to NvRAM was triggered. As a side effect selected status bits like PDTC bit may 
wrongly be restored by the DEM during startup, although it was reset before shutdown.
When does this happen:
-------------------------------------------------------------------
1. Consecutive Failed Cycle Counter contains a non zero value which is persisted to NvRAM.
2. Consecutive Failed Cycle counter is reset at the end of a following operation cycle with a passed 
result.
3. Synchronization to NvRAM is triggered e.g. by Dem_Shutdown or 
Dem_RequestNvSynchronization.
3. Re-Initialize the Dem.
In which configuration does this happen:
-------------------------------------------------------------------
Event has Dem/DemGeneral/DemDataClass/DemDataElementInternalData element 
'CONSECUTIVE_FAILED_CYCLES' configured in a snapshot or extended data record
AND
/Dem/DemGeneral/DemUseNvm == TRUE
 
Resolution Description:
142


Issue Report
ESCAN00100047
Consecutive failed cycle counter not persisted to 
NvRAM

Workaround:
-------------------------------------------------------------------
During the ECU startup, after restoring the NV contents, create a copy of the cycle counters from 
the Dem NV data:
 
 Dem_Cfg_Primary/SecondaryEntry_0.ConsecutiveFailedCycleCounter
 Dem_Cfg_Primary/SecondaryEntry_1.ConsecutiveFailedCycleCounter
 ...
 Dem_Cfg_Primary/SecondaryEntry_<N>.ConsecutiveFailedCycleCounter
After Dem_Shutdown, check whether the copies still contain the values stored in 
Dem_Cfg_Primary/SecondaryEntry_<N>
If the values differ, mark the block as modified (In Autosar systems using 
NvM_SetRamBlockStatus()).
Example for primary memory:
After Initialization:
uint8 backup[DEM_CFG_GLOBAL_PRIMARY_SIZE];
for (lBlockIndex = 0; lBlockIndex < DEM_CFG_GLOBAL_PRIMARY_SIZE; lBlockIndex++)
{
 backup[lBlockIndex] = (Dem_Cfg_MemoryDataPtr[DEM_CFG_MEMORY_PRIMARY_INDEX + 
lBlockIndex])->ConsecutiveFailedCycleCounter;
}
After Shutdown:
for (uint8 lBlockIndex =0; lBlockIndex < DEM_CFG_GLOBAL_PRIMARY_SIZE; lBlockindex++)
{
 if (backup[lBlockIndex] != (Dem_Cfg_MemoryDataPtr[DEM_CFG_MEMORY_PRIMARY_INDEX + 
lBlockIndex])->ConsecutiveFailedCycleCounter)
 {
 
NvM_SetRamBlockStatus(NvM_BlockIdType)Dem_Cfg_MemoryBlockId[DEM_CFG_MEMORY_PRIMARY_INDEX 
+ lBlockIndex], TRUE); 
 }
}
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
143


Issue Report
ESCAN00100243
incorrect ODT messages assembled if ODT Entries 
are initialized incompletely

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the XCP Master uses a sequence like the following to only partially initialize the DAQ list:
ALLOC 1 DAQ
ALLOC ODT (2 ODTs )
ALLOC 7 ODT entries in ODT 0
ALLOC 7 ODT entries in ODT 1
Set DAQ pointer in ODT 0
Write DAQ
Set DAQ pointer in ODT 1
Write DAQ 
Write DAQ 
In each ODT, uninitialized entries remain (with address and length = 0). This will cause the Slave 
to assemble incomplete ODTs, because such uninitialized entries are ignored and cause an internal 
index not to be incremented correctly.
The impact is the following: The resulting DAQ list, sent on the bus, is incomplete.
When does this happen:
-------------------------------------------------------------------
When a DAQ list is initialized partially like described above.
In which configuration does this happen:
-------------------------------------------------------------------
When DAQ measurement is used
/MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
A Master Tool like CANape always initializes all ODT Entries that it has allocated, so this issue will 
only arise if a own Tool or script is used to create DAQ lists and only partially initializes them. The 
tools used must ensure that all Entries that are allocated are also initialized correctly.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
144


Issue Report
2.4 Not Released Functionality
Not released functionalities (BETA) are either complete software modules or features in the 
software module that have not yet passed a complete development cycle (they are e.g. not or 
only partly tested). If a BETA issue ticket affects a complete software module, the software 
module must not be used for serial production. If a BETA issue ticket affects a feature in the 
software module, the user has to ensure that all BETA features are disabled as indicated for the 
serial production release of the ECU.
Index
ESCAN00088830
BETA version - the BSW module has a feature with BETA state (Memory 
Protection in trusted applications)
Os_CoreGen7@Implementation
ESCAN00089701
BETA version - the BSW module has a feature with BETA state (Executing 
trusted applications in non privileged mode)
Os_CoreGen7@Implementation
ESCAN00091204
BETA version - the Nm module has a feature with BETA state (FEAT-1865)
Nm_Asr4NmIf@Implementation
ESCAN00091218
BETA version - the BSW module has a feature with BETA state (FEAT-371)
Diag_Asr4Dcm@Implementation
ESCAN00091231
BETA version - the BSW module has a feature with BETA state (FEAT-1899)
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00092470
BETA version - the BSW module has a feature with BETA state (FEAT-1454)
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00092868
BETA version - the BSW module is in BETA state
DrvCry_Rh850Icum@Implementation
ESCAN00093797
BETA version - the BSW module has a feature with BETA state (Barriers)
Os_CoreGen7@Implementation
ESCAN00093813
BETA version - the BSW module has a feature with BETA state (Fast Trusted 
Functions)
Os_CoreGen7@Implementation
ESCAN00094381
BETA version - the BSW module has a feature with BETA state (FEAT-2160)
Diag_Asr4Dcm@Implementation
ESCAN00094537
BETA version - the BSW module has a feature with BETA state (FEAT-2084)
Cp_Asr4Xcp@Implementation
145


Issue Report
ESCAN00088830
BETA version - the BSW module has a feature with 
BETA state (Memory Protection in trusted 
applications)

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA feature:
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not tested and not all quality measures have taken place
 
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Memory Protection in trusted applications.
To ensure that only productive code is used verify that:
- OsTrustedApplicationWithProtection is false for all applications.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not use memory protection for trusted.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
146


Issue Report
ESCAN00089701
BETA version - the BSW module has a feature with 
BETA state (Executing trusted applications in non 
privileged mode)

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA feature:
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not tested and not all quality measures have taken place
 
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Executing trusted applications in non privileged mode is implemented as a BETA feature:
To ensure that only productive code is used verify that:
- IsPrivileged is TRUE for all trusted applications
 
Resolution Description:
API Extensions:
-------------------------------------------------------------------
No extension of the API.
API Changes:
-------------------------------------------------------------------
No modification of the API.
Module handling changes:
-------------------------------------------------------------------
No modification of the module handling.
For a detailed description of the API and the handling of the module refer to the Technical 
Reference.
147


Issue Report
ESCAN00091204
BETA version - the Nm module has a feature with 
BETA state (FEAT-1865)

Component@Subcomponent:
Nm_Asr4NmIf@Implementation
First affected version:
10.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
 
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
The NmOsek has to support the specific coordination use cases:
- Use different intervals between the Nm_SynchronizationPoint() function call and the expected 
NmOsek_NetworkRelease() call in dependency of the state of NmOsek
- Use different shutdown times for CanNm and NmOsek on the same channel
To ensure that only productive code is used verify that:
- If Nm Coordination is active in Nm and NmOsek is used in the configuration, then check that
in NmOsek the configuration parameter "Wait Bus Sleep Extensions" is inactive
-Nm_Cfg.h contains the following line:
#define NM_WAIT_BUS_SLEEP_EXTENSIONS STD_OFF
 
Resolution Description:
148


Issue Report
ESCAN00091218
BETA version - the BSW module has a feature with 
BETA state (FEAT-371)

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.00.00
Fixed in versions:
8.03.00
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
 
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- The sender/receiver access to the application data. 
To ensure that only productive code is used verify that:
- Parameter DcmDspDataUsePort is not one of: USE_DATA_SENDER_RECEIVER
- Parameter DcmDspDidUsePort is not one of: USE_ATOMIC_SENDER_RECEIVER_INTERFACE, 
USE_ATOMIC_NV_DATA_INTERFACE
 
Resolution Description:
-
ESCAN00091231
BETA version - the BSW module has a feature with 
BETA state (FEAT-1899)

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
8.03.00
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
 
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Sender/Receiver Ports for NVM or complex types data.
To ensure that only productive code is used verify that:
- ECUC parameter /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidUsePort == 
USE_DATA_ELEMENT_SPECIFIC_INTERFACES
 
Resolution Description:
-
149


Issue Report
ESCAN00092470
BETA version - the BSW module has a feature with 
BETA state (FEAT-1454)

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
10.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Configuration of Switch Ports (Mode Request Port (BswM_EthIf_PortGroupLinkStateChg))
Additonal:
Currently the BswM general switch BswMEthIfEnabled is not set via a Auto-Validation. During 
fixing of this BETA ESCAN a validation has to be implemented which ensures that the 
BswMEthIfEnabled is true if the EthIf calls this API and if the Mode Request Port is configured in 
BswM.
 
Resolution Description:
ESCAN00092868
BETA version - the BSW module is in BETA state
Component@Subcomponent:
DrvCry_Rh850Icum@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The complete BSW module is in BETA state
 
Resolution Description:
150


Issue Report
ESCAN00093797
BETA version - the BSW module has a feature with 
BETA state (Barriers)

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Using barriers to synchronize tasks is implemented as a BETA feature. 
To ensure that only productive code is used verify that:
- No barriers (/MICROSAR/Os/OsBarrier) are configured in the configuration tool.
 
Resolution Description:
API Extensions:
-------------------------------------------------------------------
No extension of the API.
API Changes:
-------------------------------------------------------------------
No modification of the API.
Module handling changes:
-------------------------------------------------------------------
No modification of the module handling.
For a detailed description of the API and the handling of the module refer to the Technical 
Reference.
151


Issue Report
ESCAN00093813
BETA version - the BSW module has a feature with 
BETA state (Fast Trusted Functions)

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Os_CallFastTrustedFunction() API
To ensure that only productive code is used verify that:
- No elements are configured in /MICROSAR/Os/OsApplication/OsApplicationFastTrustedFunction
 
Resolution Description:
ESCAN00094381
BETA version - the BSW module has a feature with 
BETA state (FEAT-2160)

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.03.00
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- DEM API AR 4.3.0
To ensure that only productive code is used verify that:
- Switch "/Dcm/DcmConfigSet/DcmGeneral/DcmDemApiVersion" is not set to 
"DCM_DEM_API_4_03_00" in configuration tool.
- #define DCM_DEM_API_430_ENABLED in Dcm_Cfg.h is always STD_OFF
 
Resolution Description:
-
152


Issue Report
ESCAN00094537
BETA version - the BSW module has a feature with 
BETA state (FEAT-2084)

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
2.01.00
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software 
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place

Which functionality is BETA:
-------------------------------------------------------------------
The following feature/function is in BETA state. 
- Multi-Core support in XCP
To ensure that only productive code is used verify that:
- That no EcuC Hardware reference is configured in the Xcp 
 (/MICROSAR/Xcp/XcpConfig/XcpCoreDefinition/XcpEcuCCoreDefinitionRef is not defined)
- That the Xcp_Event function is only called from the BSW core.
 
Resolution Description:
No workaround possible
153


Issue Report
2.5 Apparent Issues
Apparent issues are detected immediately when using the software module. If an issue does not 
show up while working with the software module, the ECU project is not affected by the issue. 
Apparent issues may or may not have workarounds.
Index
ESCAN00073545
Final FBL response not cancelled on protocol preemption
Diag_Asr4Dcm@Implementation
ESCAN00079399
Linker error: '<Cdd>_Transmit' : undeclared identifier (or 
'<Cdd_RxIndication>')
Cdd_AsrCddCfg5@Description
ESCAN00087948
Update Bits are not cleared if Com_IpduGroupControl is called with initialize = 
false
Il_AsrComCfg5@Implementation
ESCAN00087958
Wrong return value of GetTaskState when called from PostTaskHook
Os_CoreGen7@Implementation
ESCAN00087977
Compiler error: PduR_Lcfg.c: 'PDUR_FCT_IPDUMTX' : undeclared identifier
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00089109
Software stack monitoring for non trusted functions not supported
Os_CoreGen7@Implementation
ESCAN00089287
Dem APIs are incompatible to the application
Diag_Asr4Dem@GenTool_GeneratorMsr
ESCAN00090666
Linker error caused by wrong memory section name
SysService_AsrCryFord@Implementation
ESCAN00090998
Configuration tool reports Rte90005 exception because of 
java.lang.IllegalArgumentException
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00091118
EcuM causes a Rte Det error (RTE_E_DET_UNINIT) in the shutdown sequence 
while the Nvm write all is performed
SysService_Asr4EcuM@Implementation
ESCAN00091322
Validiation error message cannot be solved: Error at validator runtime 
Consistency: an exception was caught while executing onModelEvent() of a 
validator. Configuration inconsistencies couldn't be reported by this 
validator.ModelView:UnfilteredInvariantProjectModelView
Nm_Asr4NmIf@GenTool_GeneratorMsr
ESCAN00092058
Inconsistent data types in interface DcmIf
Diag_Asr4Dem@GenTool_GeneratorMsr
ESCAN00092245
TechRef: Integration of secret key is not correct
Diag_AsrSwcSecAccess_Ford@Doc_TechRef
ESCAN00092505
The start address for CAN Message RAM only works for 64KByte alignment.
DrvCan_Mpc5700McanLl@GenTool_GeneratorMsr
ESCAN00092569
Compiler error: identifier "pduInfo_var_id" is undefined
DrvCan_Mpc5700McanLl@Implementation
ESCAN00092622
A change of the main function period does not lead to a rebuild of the SWC 
description
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00092718
<MSN>90005 - Generator (<Generator Name>) failure, because of an 
exception "exception in <Msn> generator during Validation encountered: 
java.lang.NullPointerException"
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
ESCAN00092720
DataRenamer not working for MICROSAR Define block
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
ESCAN00092955
Compiler error: incompatible types - from 'const <MSN>_PCConfigType *' to 
'const <MSN>ConfigType *const
SysService_Asr4EcuM@GenTool_GeneratorMsr
154


Issue Report
Index
ESCAN00093294
Invalid key accepted due to inconsistent Csm and CryFord job processing 
configuration
Diag_AsrSwcSecAccess_Ford@Implementation
ESCAN00093317
Value Calculations does not act as expected
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
ESCAN00093405
Auto Configuration - Invalid multiplicity after manual adaptations of container 
BswMAvailableActions
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00093449
A2L compu method RTE_CM_BOOLEAN cannot be used to calibrate boolean 
values
Rte_Core@Implementation
ESCAN00093502
Technical Reference: Wrong API description for Csm_SymKeyExtractStart
SysService_AsrCsm@Doc_TechRef
ESCAN00093634
CAN-FD format (Bosch V1.0, ISO-11898) inconsistent
DrvCan_Mpc5700McanLl@GenTool_GeneratorMsr
ESCAN00093839
CFG5 Exception or Compile Error "Too many initializer values"
CommonAsr_ComStackLib@GenTool_GeneratorMsr
ESCAN00094259
Auto-Configuration Communication Control shows an error in case of not 
available module Com
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00094298
The Ecu does not startup properly in some MultiCore configurations
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00094319
Auto-Configuration Communication Control: Init Mode of Lin Schedule 
Indication is missing
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00094355
[Error] CANIF10027 None CAN-channel has multiple BasicCAN Tx-objects. 
Hence the feature "CanIfMultipleBasicCANTxObjects" is not required in current 
configuration and must be disabled.
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00094416
Linker error: undefined reference to ComM_Nm_PrepareBusSleepMode
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
ESCAN00094506
API CanIf_CheckBaudrate is not described / the API CanIf_ChangeBaudrate is 
described twice
If_AsrIfCan@Doc_TechRef
ESCAN00094541
Auto-Configuration Communication Control: Rules without expressions are 
created and so validation errors are shown
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00094612
WdgM_GetTickCount is called with suspended interrupts
SysService_Asr4WdM@Implementation
ESCAN00094806
Compiler error: Undefined symbol 
RTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00094875
Compiler error: dld.exe: warning: Undefined symbol 'MemIf_*_WriteWrapper' 
in file 'obj/MemIf_Cfg.o'
If_AsrIfMem@GenTool_GeneratorMsr
ESCAN00094883
Improper workaround for MCAN Erratum #10
DrvCan_Mpc5700McanLl@Implementation
ESCAN00094972
Compiler error: Missing declaration for APIs Dcm_OptimizedSetNegResponse 
and Dcm_OptimizedProcessingDone
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00094980
Generator version check fails
Tp_Asr4TpCan@ElisaPlugin
ESCAN00094991
Generated SW-C template for S/R data interface does not comply with AR 4.x 
standard
Diag_Asr4Dcm@GenTool_GeneratorMsr
155


Issue Report
Index
ESCAN00095065
Compiler error: Missing declaration for API BswM_Dcm_RequestResetMode()
Diag_Asr4Dcm@Implementation
ESCAN00095083
Compiler error: #20: identifier "EcuM_WakeupSourceType" is undefined
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
ESCAN00095259
Compiler error: WdgIf uses undefined memory sections
If_Asr4IfWd@GenTool_GeneratorMsr
ESCAN00095262
Missing record layout for uint64 and sint64 data types
Rte_Core@Implementation
ESCAN00095296
Validation error: Reference to XcpOnCan/XcpOnCanVariableDlc not found
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00095310
Compiler error: identifier EcuM_GlobalConfigRoot not declared
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00095312
Generation cannot be started because of an error COMM90500 - A generated 
value is not in range of the specified datatype
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
ESCAN00095342
Compiler error: identifier PduR Routing Manager APIs not declared
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00095432
RTE generator generates to many compu scales
Rte_Core@Implementation
ESCAN00095490
Compiler error: Cannot open include file: 'Det.h'
Diag_Asr4Dcm@Implementation
ESCAN00095519
ConsistencyRT00002 Error at validator runtime: 
CanSMBorTxConfPollingValidator if CanIf is missing
Ccl_Asr4SmCan@GenTool_GeneratorMsr
ESCAN00095528
Compiler error: Undeclared Identifier 
'COM_UINT8_APPLTYPEOFRXACCESSINFO'
Il_AsrComCfg5@Implementation
ESCAN00095553
Compiler error: Undefined identifier *PtrType to VARs of simple types with 
<MSN>_USE_INIT_POINTER to STD_ON
CommonAsr_ComStackLib@GenTool_GeneratorMsr
ESCAN00095570
Auto-Configuration Communication Control: Activation of a PNC on one 
channel does also affect other channels with same PNC
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00095571
EcuM causes a Rte warning about a not existing mode request type map
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00095591
Compiler error: Invalid suffix 'U' on floating constant
Rte_Core@Implementation
ESCAN00095642
Compiler error: Service 0x2A is enabled, but no periodic messages have been 
configured for Dcm
Diag_Asr4Dcm@Doc_TechRef
ESCAN00095660
[Applies only if hardware: Tle9252 is used] BETA version - the BSW module is 
in BETA state
DrvTrans_Tja1043CandioAsr@Implementation
ESCAN00095684
esl_decryptAES* causes memory corruption
SysService_CryptoCv@Impl_ESLib
ESCAN00095690
RTE Analyzer fails due to duplicated runnable functions
Rte_Core@Implementation
ESCAN00095730
COM02300: Proposed ComBitSize may exceed allowed range for UINT8_N and 
UINT8_DYN signals
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00095747
Generator error for duplicate runnable symbols not triggered
Rte_Core@Implementation
ESCAN00095769
Validation Error : ConsistencyRT00002 - COM90008 - Model access request 
failure in ComSignalTimeoutValidatorAs4
Il_AsrComCfg5@GenTool_GeneratorMsr
156


Issue Report
Index
ESCAN00095785
RTE49999 error message: "Invalid data type mapping" for mapped DataType 
in CalibrationPort PortInterfaces
Rte_Core@Implementation
ESCAN00095786
Wrong generated limits for CharacteristicTables in Rte.a2l when physical 
constraints are configured
Rte_Core@Implementation
ESCAN00095808
RTE49999 when mode disablings are used in a task with schedule tables
Rte_Core@Implementation
ESCAN00095840
[Only in case of using a PN-CanTrcv ] ConsistencyRT00002 - Error at validator 
runtime: CanTrcvPnConfigurationValidator
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
ESCAN00095854
Configuration tool reports Rte90005 java.lang.NullPointerException during 
validation phase
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00095891
Auto-Configuration - SDLC: Wizard leads to validation errors in case of 
unconfigured channels
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00095900
RTE Analyzer reports false out of bounds access
GenTool_IRAnalyzer@Application
ESCAN00095937
RTE49999 when a curve use a value data type with texttable compu method
Rte_Asr4@Generator
ESCAN00095940
Missing check for UINT8_DYN signals when creating the Gw-Routing Key
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00095942
Undefined a2l data type in record layout
Rte_Core@Implementation
ESCAN00095944
Missing compu method in A2L
Rte_Core@Implementation
ESCAN00096004
Compiler error: NON RTE USE CASE - Redeclared typedef Csm_ReturnType
SysService_AsrCsm@Implementation
ESCAN00096021
[Error] ConsistencyRT00002 - Error at validator runtime: 
CanIfTxBufferSupportValidator
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00096024
Incorrect parameter in API Dem_PostRunRequested
Diag_Asr4Dem@Doc_TechRef
ESCAN00096026
RteAnalyzer reports incompatible pointer type passing for inter-runnable 
variables with multi-dimensional arrays
Rte_Core@Implementation
ESCAN00096061
Auto-Configuration - SDLC: Support of CAN FD PDUs is not working
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00096126
Com_Init may lead to long interrupt locks
Il_AsrComCfg5@Implementation
ESCAN00096128
Generator Exception in case the PduRSrcPdu global Pdu is referenced by more 
than one other container
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00096129
MEMMAP_SW_MINOR_VERSION / MEM_SW_MINOR_VERSION is not correct
CommonAsr__Common@Impl__MemMap
ESCAN00096177
RTE49999 when no trigger is assigned to a server operation
Rte_Core@Implementation
ESCAN00096187
RTE49999 when the base type on network representation has no size
Rte_Core@Implementation
ESCAN00096299
During generation of code the error occurs: "CANTRCV01009 No valid wakeup 
source specified."
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
157


Issue Report
Index
ESCAN00096311
Validation message "CANIF30001 At least one BasicCAN Tx-PDU is configured. 
Hence it is recommended to enable the Tx-buffer..." leads to invalid 
configuration
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00096335
Compiler error: Unknown identifier Dcm_DemApiNrcMapSelectDTC
Diag_Asr4Dcm@Implementation
ESCAN00096391
Compiler error: function "CanHL_WakeupProcessed" / 
"CanHL_SleepProcessed" was referenced but not defined
DrvCan__coreAsr@Implementation
ESCAN00096422
Validation rule inhibits generation in an valid (special) use case
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00096516
Compiler error: Wrong generated Rte_IocSend calls for queued communication
Rte_Core@Implementation
ESCAN00096521
Compile error on Unix systems due to upper case in include file
SysService_CryptoCv@Impl_actCLib
ESCAN00096532
Compiler error: undeclared identifier "WDGM_GLOBAL_STATUS_xxx"
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00096559
Wrong signal type for data conversion
Rte_Core@Implementation
ESCAN00096581
PduRTxBuffer references are incorrectly validated for transport protocol 1:N/N:
1 routing paths with API forwarding PduRDestPdu
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00096582
Non-interactive Mode fails
_3rdParty_McalIntegration_Helper@VectorIntegration
ESCAN00096594
C Standard Library is used
SysService_CryptoCv@Impl_actCLib
ESCAN00096615
RTE Analyzer fails due to duplicated runnable functions
Rte_Core@Implementation
ESCAN00096629
Linker error: unresolved symbol error for not existing callout function 
referenced in Det_Cfg.o in case of disabled DET
SysService_AsrDet@GenTool_GeneratorMsr
ESCAN00096748
Nonexistent "TimerSTMin" struct member in a2l file
Tp_Asr4TpCan@GenTool_GeneratorMsr
ESCAN00096774
Compiler error: Duplicated variable definitions in analyzer stubs
Rte_Core@Implementation
ESCAN00096900
Compiler error: identifier EcuM_Get<***> not declared
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00096969
Misleading function return code description for API 
Dcm_GetTesterSourceAddress
Diag_Asr4Dcm@Doc_TechRef
ESCAN00096982
AssertionError: The getMaxUnsignedValueForNumBytes utility allows only up 
to 4 bytes!
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00097053
Compiler error: Empty struct DCM_DIDMGROPTYPEREADCONTEXTTYPE_TAG
Diag_Asr4Dcm@Implementation
ESCAN00097056
Compiler error: 'Offset' : is not a member of 
'DCM_DIDMGROPTYPEREADCONTEXTTYPE_TAG'
Diag_Asr4Dcm@Implementation
ESCAN00097073
Sub-chapter "ResponseOnEvent Specifics" seems to be part of chapter 
"Handling with DID Ranges"
Diag_Asr4Dcm@Doc_TechRef
ESCAN00097086
Compiler error: Undefined reference to 
`Com_GetTxFilterInitValueArrayBasedFilterInitValueLengthOfTxSigInfo'
Il_AsrComCfg5@Implementation
158


Issue Report
Index
ESCAN00097087
Null pointer exception when a data element is missing
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00097092
Compiler error: Identifier "sint"<X> is undefined
Il_AsrComCfg5@Implementation
ESCAN00097096
Compiler error: incompatible pointer type / loss of volatile qualifier in pointer 
cast
DrvCan__coreAsr@Implementation
ESCAN00097143
WdgMLocalStateChangeCbk not created for all Supervised Entities
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00097148
WdgMGlobalStateChangeCbk / WdgMLocalStateChangeCbk function prototype 
generated with incompatible signature compared to RTE
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00097151
Incomplete Mirror Data
DrvCan_Mpc5700McanLl@Implementation
ESCAN00097168
EcuM debug data cannot be found in the map file
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00097174
WdgM_UpdateTickCount is declared not as "void" in SWC file
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00097203
Compiler error: "conversion of data types, possible loss of data" in case of 
large buffers
Diag_Asr4Dcm@Implementation
ESCAN00097240
CanIf debug data cannot be found in the map file
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00097257
Compiler error: error C2065: 'CanNm_CancelTransmit' : undeclared identifier
Nm_Asr4NmCan@Implementation
ESCAN00097274
Compiler error: Incompatible Rte_MemCpy prototypes
Rte_Core@Implementation
ESCAN00097291
Compiler error: Use of undeclared identifier Rte_Appl_AckFlags
Rte_Core@Implementation
ESCAN00097298
Mismatching data type Dem_DTCOriginType
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00097303
Compiler error: Call to job finished runnable misses parameters
Rte_Core@Implementation
ESCAN00097341
Mode Transition Value of Mode Declaration Group WdgM_Mode is set to 255
SysService_Asr4WdM@GenTool_GeneratorMsr
ESCAN00097355
Auto-Configuration Ecu State Handling: Self run request timeout value is not 
shown correct in case of 0
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00097457
Matrix dimensions are swapped for two dimensional arrays in A2L file
Rte_Core@Implementation
ESCAN00097476
RTE01004 error during contract phase generation (Could not read back 
DVCfgRteGen data)
Rte_Core@Implementation
ESCAN00097477
Code generation is not possible due to error RTE13068 - Insufficient data type 
to represent mode value
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
ESCAN00097525
RTE49999 when transformers are not configured for all fan-out signals
Rte_Core@Implementation
ESCAN00097531
a2l: In Variant use case only the first variant is generated for the bus specific 
a2l files
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00097649
Compiler error: Rte_Write writes a variable that does not exist
Rte_Core@Implementation
ESCAN00097683
A generated value is not in range of the specified datatype
Il_AsrComCfg5@GenTool_GeneratorMsr
159


Issue Report
Index
ESCAN00097684
Warning RTE49999 when XcpEvent support is enabled
Rte_Core@Implementation
ESCAN00097802
Activation reason data type uses bit access
Rte_Core@Implementation
ESCAN00097876
Generated data streams toggle with each code generation if 
<MSN>ReduceDataByStreaming is enabled
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00097910
Dcm_Swc.arxml: Missing values of Mode-Declarations in Mode-Declaration-
Groups
Diag_Asr4Dcm@GenTool_GeneratorMsr
ESCAN00097950
Compiler error: 'CanTp_GetRxSduCfgInd' undefined
Tp_Asr4TpCan@Implementation
ESCAN00097971
RTE49999: Mismatching constant values
Rte_Asr4@Generator
ESCAN00098057
Generated data streams toggle with each code generation if 
<MSN>ReduceDataByStreaming is enabled
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00098062
RTE49999: When InitializeImplicitBuffers is configured for implicit connections 
to NvBlock SWCs
Rte_Core@Implementation
ESCAN00098068
Null pointer exception when a service dependency contains an invalid pim 
reference
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00098104
RTE Analyzer reports false out of bound accesses
GenTool_IRAnalyzer@Application
ESCAN00098155
Inconsistencies of Technical Reference regarding Dem usage
SysService_Asr4WdM@Doc_TechRef
ESCAN00098167
RTE01081 Model object </MICROSAR/IoHwAb_swc/ComponentTypes/
IoHwAb> of command line parameter -m is invalid.
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00098187
RTE generator generates wrong compu method in case data type names are 
not unique
Rte_Core@Implementation
ESCAN00098204
RTE01060: Could not read Rte_Needs.ecuc.arxml when exclusive areas with 
implementation method resource are accessed from multiple partitions
Rte_Core@Implementation
ESCAN00098260
Erroneous validation message "CanIfMultipleBasicCANTxObjects is not 
required"
If_AsrIfCan@GenTool_GeneratorMsr
ESCAN00098424
a2l: OPTIONAL_CMD GET_DAQ_EVENT_INFO generated unconditionally.
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00098469
Unused Interrupt enabled
DrvCan_Mpc5700McanLl@Implementation
ESCAN00098487
PDUR_EXCLUSIVE_AREA_1 is created by tool but not used in embedded code
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00098523
GeneralDiagnosticInfo interface is named "GeneralEventInfo" instead of 
"GeneralEvtInfo"
Diag_Asr4Dem@GenTool_GeneratorMsr
ESCAN00098583
Generator Error Message ""XCP90110 Undefined DefinitionRef for Parameter." 
- misleading problem indication
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00098584
NvM NVM01036 validation does not clearly describe the problem
MemService_AsrNvM@GenTool_GeneratorMsr
160


Issue Report
Index
ESCAN00098599
RTE49999 when a data element without init value is connected to a data 
element without port accesses
Rte_Asr4@Generator
ESCAN00098646
RTE generator creates NvMRomBlockDataAddress with ROM variables that do 
not exist
Rte_Core@Implementation
ESCAN00098679
Compiler error: incompatible declaration of ComM_ConfigPtr
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
ESCAN00098712
Linker error: DemTriggerEventDataChangedCallback==FALSE and 
DemTriggerEventStatusChangedCallback==FALSE will only suppress the 
creation/usage of SWC port interfaces, but not the underlying function calls
Diag_Asr4Dem@GenTool_GeneratorMsr
ESCAN00098820
RTE generator reports unexpected exit code
Rte_Core@Implementation
ESCAN00098822
RTE Generator reports unexpected exit code
Rte_Analyzer@Application
ESCAN00098865
RTE49999 when sender and receiver use different init value constants with the 
same values
Rte_Core@Implementation
ESCAN00098866
Service 0x3E: Misleading caution box regarding external service 
implementation
Diag_Asr4Dcm@Doc_TechRef
ESCAN00098883
/MICROSAR/Xcp/XcpGeneral/XcpTimestampTicks limited in range to uint8
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00098887
Wrong linker section used
DrvCan_Mpc5700McanLl@Implementation
ESCAN00098893
Compiler error: Missing Rte_MemClr when activation reason is used in a 
system with OS applications
Rte_Core@Implementation
ESCAN00098918
Compiler error: Duplicated implicit APIs in analyzer stubs when the same port 
access is declared twice
Rte_Core@Implementation
ESCAN00098922
NmStateChangeCallback is not called if same states are passed in 
Nm_StateChangeNotification
Nm_Asr4NmCan@Implementation
ESCAN00098939
RTE49999 when application data type with texttable compu method is mapped 
to float implementation data type
Rte_Core@Implementation
ESCAN00098955
RTE49999 when a compu method declared CompuScales that would result in 
the same symbol
Rte_Asr4@Generator
ESCAN00098966
Missing reference about the cluster index for the Nm Gateway Coordination 
Extension
Nm_Asr4NmIf@Doc_TechRef
ESCAN00099018
NPE during generation with invalid ComRxDataTimeoutSubstitutionValue
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00099049
RTE49999: when task type is set to basic and cyclic trigger implementation is 
set to none
Rte_Core@Implementation
ESCAN00099057
EcuM Wakeup Source defines are generated multiple times with numerical 
postfix in case of variance
SysService_Asr4EcuM@GenTool_GeneratorMsr
ESCAN00099105
Compiler error: Rte.c accesses Rte_ActivationVector variable that is declared 
static in Rte_<osappl>.c
Rte_Core@Implementation
161


Issue Report
Index
ESCAN00099156
Missing description of OS_VTH_FORCED_TERMINATION and 
OS_VTHP_THREAD_CLEANUP
Os_CoreGen7@Doc_TechRef
ESCAN00099160
Patch action fails because file path is too long
_3rdParty_McalIntegration_Helper@VectorIntegration
ESCAN00099169
Compiler error/warning: Unreferenced formal parameter watchdog in 
actX25519.c
SysService_CryptoCv@Impl_actCLib
ESCAN00099179
Compiler error: MemMap_Common.h: Wrong pragma command / unknown 
memory section used
Tp_Asr4TpCan@Implementation
ESCAN00099186
Compiler error: Inconsistent setting for number of channels; with dynamic 
channel assignment, more SDUs than channels are expected
Tp_Asr4TpCan@Implementation
ESCAN00099189
a2l: Calculation of CAN-FD parameter SECONDARY_SAMPLE_POINT in 
CanXcp.a2l is incorrect
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00099274
Null pointer exception when data mapping exists in all variants but signal 
group does not
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00099313
Test case 109 of WdgM Verifier does not fail anymore
SysService_Asr4WdM@root
ESCAN00099318
Test case 107 of WdgM Verifier is marked as NOT PASSED
SysService_Asr4WdM@root
ESCAN00099345
Exception in Generator when XcpCalibration container is not present
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00099398
Compiler error: Incorrect expansion of Com_ReceiveShadowSignal with 
COM_RECEIVE_SIGNAL_MACRO_API
Il_AsrComCfg5@Implementation
ESCAN00099413
Compiler error: Duplicated variable definition in case of N:M communication 
with external and internal receivers
Rte_Core@Implementation
ESCAN00099473
The value <X> is not in the range of the specified datatype UINT_16
Il_AsrComCfg5@GenTool_GeneratorMsr
ESCAN00099474
a2l: Parameter XCP_MAX_ODT_ENTRY_SIZE fixed to 7
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00099518
CanXcp.a2l not variant specific
Cp_Asr4Xcp@GenTool_GeneratorMsr
ESCAN00099525
CanTpEnableSynchronousTransmit cannot be used with non MICROSAR 
Components
Tp_Asr4TpCan@Doc_TechRef
ESCAN00099526
CanTpEnableSynchronousTransmit cannot be used with non MICROSAR 
Components
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
ESCAN00099539
RTE49999: N:1 Inter-Partition Client-Server Communication with IOCs
Rte_Core@Implementation
ESCAN00099548
InitMonitorReason DEM_INIT_MONITOR_REENABLED is missing in callback 
description
Diag_Asr4Dem@Doc_TechRef
ESCAN00099553
State diagram of the EcuM with fixed state machine shows call of 
EcuM_AL_DriverRestart in the wrong transition.
SysService_Asr4EcuM@Doc_TechRef
ESCAN00099582
Compiler error: actAES.h:23 missing argument for macro P2FUNC
SysService_CryptoCv@Impl_actCLib
162


Issue Report
Index
ESCAN00099596
Compiler error: Missing dataSig variables
Rte_Core@Implementation
ESCAN00099599
Dem_SetOperationCycleState can not be called in the pre-initialized mode
Diag_Asr4Dem@Doc_TechRef
ESCAN00099644
Compiler error: QOverflowType struct without declaration
Rte_Core@Implementation
ESCAN00099667
Null pointer exception when no BswImplementation for LDCOM exists
Rte_Asr4@GenTool_GeneratorMsr
ESCAN00099693
Compiler error: Incompatible Declaration in Rte_Csm.h and Csm.h
SysService_AsrCsm@Implementation
ESCAN00099714
Compiler error/warning: argument type of string of Ioc_Write does not match 
prototype for implicit write
Rte_Core@Implementation
ESCAN00099814
Wrong references to CanTp_Cfg.c exist
Tp_Asr4TpCan@Doc_TechRef
ESCAN00099816
Compiler error: Missing buffer definition within struct Rte_tsRB
Rte_Core@Implementation
ESCAN00099948
Compiler error: Duplicated lower limit variable in RTE Analyzer stubs
Rte_Core@Implementation
ESCAN00099951
Compiler error: CanNm_SetMsgRequest undefined
Nm_Asr4NmCan@Implementation
ESCAN00099953
Compiler error: Too many struct initializers when InitializeImplicitBuffers is 
configured
Rte_Core@Implementation
ESCAN00099959
Compiler error: undefined reference to 
`CanTp_IsTxSduCfgIndUsedOfRxPduMap'
Tp_Asr4TpCan@Implementation
ESCAN00099970
Wrong error message for ScheduleTable ExpiryPoint offset
Os_CoreGen7@GenTool_GeneratorMsr
ESCAN00099987
RTE49999: when union is used for N:1 connections or PR ports
Rte_Core@Implementation
ESCAN00099988
Description: Lower Limit for parameter DemExtendedDataRecordNumber 
wrong
Diag_Asr4Dem@Description
ESCAN00100169
Parameter description of CheckRemoteSleepIndication is incorrect
Nm_Asr4NmCan@Doc_TechRef
ESCAN00100193
Improve description
AN-ISC-8-1184_Compiler_Warnings@Doc_ApplicationNote
ESCAN00100240
RTE generator creates duplicated A2L group objects in case of PR Ports
Rte_Core@Implementation
163


Issue Report
ESCAN00073545
Final FBL response not cancelled on protocol 
preemption

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.05.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The ECU will process the FBL final response even if there is higher protocol request sent.
When does this happen:
-------------------------------------------------------------------
When immediately after reprogramming of the ECU has ended, the very first request after ECU 
powers on in the application is a hi-priority one (i.e. OBD).
In which configuration does this happen:
-------------------------------------------------------------------
- Any configuration where the ECU shall be able to send a final response without request after 
reset.
AND
- Protocol prioritisation is to be supported (i.e. OBD vs. UDS).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
164


Issue Report
ESCAN00079399
Linker error: '<Cdd>_Transmit' : undeclared 
identifier (or '<Cdd_RxIndication>')

Component@Subcomponent:
Cdd_AsrCddCfg5@Description
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Linker error in PduR_Lcfg.c: '<Cdd>_Transmit' : undeclared identifier
Linker error in PduR_Lcfg.c: '<Cdd>_RxIndication' : undeclared identifier
The Cdd_AsrCddCfg5 is not derived according to the ASR 4.0.3 rules and allows a LOWER-
MULTIPLICITY of 0 for the CddPduRLowerLayerRxPdu and CddPduRLowerLayerTxPdu instead of the 
LOWER-MULTIPLICITY of 1.
The generic ASR PduR according to the ASR 4.0.3 Specification has no information to deactivate a 
communication direction (e.g. a Parameter in the PduRBswModules).
When does this happen:
-------------------------------------------------------------------
The error is issued by the linker after compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Rx only Cdd with a CddPduRLowerLayerContribution (just receive pathways exits)
The <CddName>.h file contains the following define: 
<CddName>_LOWERLAYERCOMIF_TX is defined to STD_OFF
OR
Tx only Cdd with a CddPduRLowerLayerContribution (just transmit pathways exits)
The <CddName>.h file contains the following define: 
<CddName>_LOWERLAYERCOMIF_RX is defined to STD_OFF
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Implement the not required '<Cdd>_Transmit' API on your own in a c and h file of your choice and 
add the header file with a user config file to the PduR configuration that the compiler does not 
throw a warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
165


Issue Report
ESCAN00087948
Update Bits are not cleared if 
Com_IpduGroupControl is called with initialize = 
false

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
1.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After a IpduGroup is stared with initialize = false a Signal is transmitted with set Update Bit 
although signal was not updated since the IpduGroup was stopped.
When does this happen:
-------------------------------------------------------------------
during the call of Com_IpduGroupControl or Com_IpduGroupStart.
In which configuration does this happen:
-------------------------------------------------------------------
If Tx UpdateBits are used
AND
if Com_IpduGroupControl/ Com_IpduGroupStart is used with initialize = false
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
166


Issue Report
ESCAN00087958
Wrong return value of GetTaskState when called 
from PostTaskHook

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
GetTaskState returns SUSPENDED for current task when called from PostTaskHook.
Return 'RUNNING' instead.
When does this happen:
-------------------------------------------------------------------
In PostTaskHook the task is still running. 
In which configuration does this happen:
-------------------------------------------------------------------
Configuration invariant.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not use the API GetTaskState for the current task in the PostTaskHook.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
167


Issue Report
ESCAN00087977
Compiler error: PduR_Lcfg.c: 
'PDUR_FCT_IPDUMTX' : undeclared identifier

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
2.03.00
Fixed in versions:
12.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error: PduR_Lcfg.c: 'PDUR_FCT_IPDUMTX' : undeclared identifier
Hint: If a module without routing paths is configured the validation can not determine the 
communication type.
 Ensure that the /MICROSAR/PduR/PduRBswModules Parameter are configured suitable to the 
post- build scenario.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
/ActiveEcuC/PduR/PduRGeneral[PduRDevErrorDetect] == true AND
Impl. Config Variant == VARIANT-POST-BUILD-LOADABLE AND
/ActiveEcuC/PduR/IpduM exists (/MICROSAR/PduR/PduRBswModules) AND
No routing path for IpduM exists AND the /ActiveEcuC/PduR/IpduM[PduRCommunicationInterface] 
== false
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The communication type must be configured for BSW modules without routing paths. 
Configure /ActiveEcuC/PduR/IpduM[PduRCommunicationInterface] to "true"
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
168


Issue Report
ESCAN00089109
Software stack monitoring for non trusted functions 
not supported

Component@Subcomponent:
Os_CoreGen7@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Stack monitoring in software is not supported for non trusted functions.
When does this happen:
-------------------------------------------------------------------
Always
In which configuration does this happen:
-------------------------------------------------------------------
In systems where non trusted functions and software stack checks are used:
In configuration:
/ActiveEcuC/Os/<Application>/OsApplicationNonTrustedFunction is used and /ActiveEcuC/Os/
OsOS[OsStackMonitoring] = TRUE
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
If a MPU is available, protect stacks by MPU.
In case that no MPU is available, user has to ensure that stack overflow does not occur during 
execution of non trusted functions. Otherwise non trusted functions shall not be used.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
169


Issue Report
ESCAN00089287
Dem APIs are incompatible to the application
Component@Subcomponent:
Diag_Asr4Dem@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
9.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Application interfaces cannot be connected to the Dem ports because of incompatible type 
definitions.
The Dem APIs use Dem_ExtendedStatusByteType which uses an incompatible compu-method 
compared to Dem_UdsStatusType.
When does this happen:
-------------------------------------------------------------------
Always when trying to connect an application software to the Dem
In which configuration does this happen:
-------------------------------------------------------------------
Applications using port definitions according to Autosar 4.1.2
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Change the datatype used in the application SWC to enumeration instead of bitfield.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
170


Issue Report
ESCAN00090666
Linker error caused by wrong memory section name
Component@Subcomponent:
SysService_AsrCryFord@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A linker error occurs due to a missing memory section. E.g. OsAppBswNonTrusted
When does this happen:
-------------------------------------------------------------------
If a special memory mapping configuration in MemMap.h was used to build the library.
 E.g. if memory protection is used and the BSW is mapped in the memory section of a special OS 
application. 
In which configuration does this happen:
-------------------------------------------------------------------
If the customer uses a different name for the related memory sections or OS applications.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Renaming the section due to the Vector Configuration
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
171


Issue Report
ESCAN00090998
Configuration tool reports Rte90005 exception 
because of java.lang.IllegalArgumentException

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.08.00
Fixed in versions:
4.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The configuration tool reports Rte90005 - Generator (MICROSAR RTE Generator) failure, because 
of an exception 
- Exception in Rte generator during Generation encountered: java.lang.IllegalArgumentException
When does this happen:
-------------------------------------------------------------------
This happen during generation phase.
In which configuration does this happen:
-------------------------------------------------------------------
This can happen sometimes in configurations that contain RTE errors found in calculation or 
validation phase.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Solving the reported RTE errors messages.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
172


Issue Report
ESCAN00091118
EcuM causes a Rte Det error (RTE_E_DET_UNINIT) 
in the shutdown sequence while the Nvm write all is 
performed

Component@Subcomponent:
SysService_Asr4EcuM@Implementation
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Rte throws a Det error with the ID RTE_E_DET_UNINIT during the shutdown sequence.
When does this happen:
-------------------------------------------------------------------
Always during the NvM_WriteAll() is performed.
In which configuration does this happen:
-------------------------------------------------------------------
Only in configurations with all the following parameters are set to true:
/ActiveEcuC/EcuM/EcuMGeneral/EcuMEnableFixBehavior
/ActiveEcuC/EcuM/EcuMFixedGeneral/EcuMModeSwitchRteAck
/ActiveEcuC/EcuM/EcuMFixedGeneral/EcuMIncludeNvramMgr
/ActiveEcuC/Rte/RteGeneration/RteDevErrorDetect
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The only workaround is to filter this DET message.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
173


Issue Report
ESCAN00091322
Validiation error message cannot be solved: Error at 
validator runtime Consistency: an exception was 
caught while executing onModelEvent() of a 
validator. Configuration inconsistencies couldn't be 
reported by this 
validator.ModelView:UnfilteredInvariantProjectModelView

Component@Subcomponent:
Nm_Asr4NmIf@GenTool_GeneratorMsr
First affected version:
9.00.00
Fixed in versions:
Problem Description:
174


Issue Report
ESCAN00091322
Validiation error message cannot be solved: Error at 
validator runtime Consistency: an exception was 
caught while executing onModelEvent() of a 
validator. Configuration inconsistencies couldn't be 
reported by this 
validator.ModelView:UnfilteredInvariantProjectModelView

What happens (symptoms):
-------------------------------------------------------------------
The following validation error message appears in the Validation view in DaVinci Configurator:
ConsistencyRT00002 Error at validator runtime (1 message)
 ConsistencyRT00002 Consistency: an exception was caught while executing onModelEvent() of a 
validator. Configuration inconsistencies couldn't be reported by this 
validator.ModelView:UnfilteredInvariantProjectModelView
This is not a configuration problem but an internal implementation error. Please contact Vector for 
support.
Validator-Class: 
com.vector.cfg.gen.Nm_Asr4NmIf.validation.NmGlobalCoordinatorTimeAllNmOsekInNormalValidator 
Validator-Description:NmGlobalCoordinatorTimeAllNmOsekInNormalValidator validates that the 
setting NmGlobalCoordinatorTimeAllNmOsekInNormal is defined if it required.
Further runtime errors of this validator won't be reported in the UI.
Ex: com.vector.cfg.gen.core.moduleinterface.exceptions.ValidationFailedException: [Error] 
NM01003 - A Specific Channel configuration is missing for the NmChannelConfig 
- The corresponding CanNmChannelConfig is missing for this NmChannelConfig
We are sorry, but due to this internal error, code generation of /[ANY]/CanNm, /MICROSAR/
NmOsek, /[ANY]/FrIf, /[ANY]/FrNm, /[ANY]/UdpNm, /[ANY]/ComM, /MICROSAR/Nm has to be 
blocked. As a workaround, you may try to restart DaVinci Configurator. Otherwise, please call 
Vector for support
 /ActiveEcuC/ComM
 FrIf
 UdpNm
 CanNm
 /ActiveEcuC/Nm
 FrNm
 /ActiveEcuC/NmOsek
Apparently, the message cannot be resolved.
When does this happen:
-------------------------------------------------------------------
During configuration with DaVinci Configurator.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration with Nm where a NmChannelConfig container exists that does not have a 
correspondent BusNmChannelConfig container (e.g. CanNmChannelConfig, FrNmChannel, 
LinNmChannelConfig, UdpNmChannelConfig, J1939NmChannelConfig, NmOsekChannelConfig, ...)
AND
(
('Coordinator Support Enabled' (/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/
NmCoordinatorSupportEnabled) is turned OFF in the NmGlobalFeatures container in Nm in the 
'Network Management General' / 'Basic Editor' in DaVinci Configurator-> Nm_Cfg.h contains 
#define NM_COORDINATOR_SUPPORT_ENABLED STD_OFF)
AND/OR
('Wait Bus Sleep Extensions' (/MICROSAR/NmOsek/NmOsekGlobalConfig/
NmOsekWaitBusSleepExtensions) is turned OFF or not defined or cannot be found in the 
175


Issue Report
ESCAN00091322
Validiation error message cannot be solved: Error at 
validator runtime Consistency: an exception was 
caught while executing onModelEvent() of a 
validator. Configuration inconsistencies couldn't be 
reported by this 
validator.ModelView:UnfilteredInvariantProjectModelView

NmOsekGlobalConfig container in NmOsek in the 'Network Management General' / 'Basic Editor' in 
DaVinci Configurator -> NmOsek_Cfg.h does not contain #define 
NMOSEK_WAIT_BUS_SLEEP_EXTENSIONS)
AND/OR
('Synchronizing Network' (/MICROSAR/Nm/NmChannelConfig/NmSynchronizingNetwork) is turned 
OFF for at least one NmChannelConfig container in Nm in the 'Network Management General' / 
'Basic Editor' in DaVinci Configurator)
AND/OR
('Coord Cluster Index' (/MICROSAR/Nm/NmChannelConfig/NmCoordClusterIndex) is undefined or 
set to 255 for at least one NmChannelConfig container in Nm in the 'Network Management 
General' / 'Basic Editor' in DaVinci Configurator)
)
Please note that this is an invalid configuration because either the NmChannelConfig container 
without a BusNmChannelConfig must be deleted or the corresponding BusNmChannelConfig 
container must be created.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In DaVinci Configurator:
1) Create the corresponding BusNmChannelConfig container and configure its parameters and sub-
containers.
OR
2) Delete the NmChannelConfig container that lacks a corresponding BusNmChannelConfig 
container.
Afterwards (no matter whether 1) or 2) has been applied), save the configuration, close it and re-
open it.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
176


Issue Report
ESCAN00092058
Inconsistent data types in interface DcmIf
Component@Subcomponent:
Diag_Asr4Dem@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
10.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
SWC-Validation of Dcm and Dem generates inconsistent data types in interface DcmIf. 
Limits of the corresponding enumeration data types do not match.
When does this happen:
-------------------------------------------------------------------
At Dem/Dcm SWC template import time in DaVinci Developer.
In which configuration does this happen:
-------------------------------------------------------------------
/Dem/DemGeneral/DemDcmSupport = True
within an AR 3.x RTE.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Import first the Dem_Swc.arxml file, then the Dcm_Swc.arxml file to override the Dem data types 
(imported through Dcm).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
177


Issue Report
ESCAN00092245
TechRef: Integration of secret key is not correct
Component@Subcomponent:
Diag_AsrSwcSecAccess_Ford@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
2.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Technical Reference is slightly outdated. 
In Chapter 4.1.1 the TechRef states out:
"SwcSecAccessFord_Cfg.c In this file the secret keys can be stored"
This is no longer correct since the implementation version 1.00.00. The key data are now fetched 
by using the DCM service "GetSecurityLevelFixedBytes".
When does this happen:
-------------------------------------------------------------------
Implementation version > 1.00.00
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
178


Issue Report
ESCAN00092505
The start address for CAN Message RAM only works 
for 64KByte alignment.

Component@Subcomponent:
DrvCan_Mpc5700McanLl@GenTool_GeneratorMsr
First affected version:
3.00.01
Fixed in versions:
3.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
No CAN communication on CAN Bus.
Just CAN ID "0" with dlc "0" is sent by the ECU.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
It happens when the start address is not aligned to a 64KByte block.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do only configure Start Addresses for the CAN Message RAM which are aligned to 64KByte 
boundaries.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
179


Issue Report
ESCAN00092569
Compiler error: identifier "pduInfo_var_id" is 
undefined

Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.08.00
Fixed in versions:
2.10.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error: identifier "pduInfo_var_id" is undefined
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Only if the MCAN Revision is less than 3.1.0 (CAN_MCAN_REVISION < 0x0310)
AND
CAN FD is activated (CAN_FD_SUPPORT != CAN_NONE).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
180


Issue Report
ESCAN00092622
A change of the main function period does not lead 
to a rebuild of the SWC description

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The SWC description file is not updated after a change of the EcuM main function period. 
When does this happen:
-------------------------------------------------------------------
After change of the parameter /MICROSAR/EcuM/EcuMGeneral/EcuMMainFunctionPeriod.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Adapt another parameter which leads to a rebuild of the SWC description, e.g. rename of a 
sleepmode [/EcuM/EcuMConfiguration/EcuMCommonConfiguration/EcuMSleepMode].
After rebuild the name of this sleepmode can be switched back to the old name, the rename is 
only necessary to trigger a rebuild.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
181


Issue Report
ESCAN00092718
<MSN>90005 - Generator (<Generator Name>) 
failure, because of an exception "exception in 
<Msn> generator during Validation encountered: 
java.lang.NullPointerException"

Component@Subcomponent:
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
First affected version:
5.01.00
Fixed in versions:
5.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During code generation, an error message similar to the following one:
[Error] <MSN>90005 - Generator (<Generator Name>) failure, because of an exception 
- Exception in <Msn> generator during Validation encountered: 
java.lang.NullPointerException 
 -------------------- 
 Erroneous CEs:
 [DefinitionRef: /MICROSAR/<Msn>]
 -------------------- 
 CEs:
 [DefinitionRef: /MICROSAR/<Msn>]
 -------------------- 
 AutoSolvingAction: <none>
 PreferredSolvingAction: <none>
 SolvingActions: <none>
 -------------------- 
 GeneratorPackage: <Generator Name>(<Generator version> - com.vector.cfg.gen.<module 
name>)
When does this happen:
-------------------------------------------------------------------
During code generation with DaVinci Configurator.
In which configuration does this happen:
-------------------------------------------------------------------
Any
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use 
com.vector.cfg.gen.CommonAsr_ComGenericGenLib.data.access.GenericGenAccess.getStruct(String) 
instead
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
182


Issue Report
ESCAN00092720
DataRenamer not working for MICROSAR Define 
block

Component@Subcomponent:
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
First affected version:
5.01.00
Fixed in versions:
5.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The data renamer does not work for the MICROSAR define block.
When does this happen:
-------------------------------------------------------------------
During code generation with DaVinci Configurator.
In which configuration does this happen:
-------------------------------------------------------------------
Any
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
183


Issue Report
ESCAN00092955
Compiler error: incompatible types - from 'const 
<MSN>_PCConfigType *' to 'const 
<MSN>ConfigType *const

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
Problem Description:
184


Issue Report
ESCAN00092955
Compiler error: incompatible types - from 'const 
<MSN>_PCConfigType *' to 'const 
<MSN>ConfigType *const

What happens (symptoms):
-------------------------------------------------------------------
The compiler throws an error like the following:
1> EcuM_Init_Cfg.c
1>GenData/EcuM_Init_Cfg.c(86): error C4133: 'initializing' : incompatible types - from 'const 
CanNm_PCConfigType *' to 'const EcuM_PbConfigType *const '
1>GenData/EcuM_Init_Cfg.c(87): error C4133: 'initializing' : incompatible types - from 'const 
EcuM_PCConfigType *' to 'const SchM_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(88): error C4133: 'initializing' : incompatible types - from 'const 
SchM_ConfigType *' to 'const Can_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(89): error C4133: 'initializing' : incompatible types - from 'const 
Can_PCConfigType *' to 'const CanIf_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(90): error C4133: 'initializing' : incompatible types - from 'const 
CanIf_PCConfigType *' to 'const Com_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(91): error C4133: 'initializing' : incompatible types - from 'const 
Com_PCConfigType *' to 'const PduR_PBConfigType *const '
1>GenData/EcuM_Init_Cfg.c(92): error C4133: 'initializing' : incompatible types - from 'const 
PduR_PCConfigType *' to 'const CanSM_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(93): error C4133: 'initializing' : incompatible types - from 'const 
CanSM_PCConfigType *' to 'const CanNm_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(103): error C4133: 'initializing' : incompatible types - from 'const 
CanNm_PCConfigType *' to 'const EcuM_PbConfigType *const '
1>GenData/EcuM_Init_Cfg.c(104): error C4133: 'initializing' : incompatible types - from 'const 
EcuM_PCConfigType *' to 'const SchM_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(105): error C4133: 'initializing' : incompatible types - from 'const 
SchM_ConfigType *' to 'const Can_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(106): error C4133: 'initializing' : incompatible types - from 'const 
Can_PCConfigType *' to 'const CanIf_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(107): error C4133: 'initializing' : incompatible types - from 'const 
CanIf_PCConfigType *' to 'const Com_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(108): error C4133: 'initializing' : incompatible types - from 'const 
Com_PCConfigType *' to 'const PduR_PBConfigType *const '
1>GenData/EcuM_Init_Cfg.c(109): error C4133: 'initializing' : incompatible types - from 'const 
PduR_PCConfigType *' to 'const CanSM_ConfigType *const '
1>GenData/EcuM_Init_Cfg.c(110): error C4133: 'initializing' : incompatible types - from 'const 
CanSM_PCConfigType *' to 'const CanNm_ConfigType *const '
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
In variant configurations with modules which uses different EcuC init phases in different variants (/
MICROSAR/EcuC/EcucGeneral/BswInitialization/InitFunction/InitPhase).
E.g. 
VARIANT_1: InitPhase = NO_INIT
VARIANT_2: InitPhase = INIT_TWO_MCAL
 
Resolution Description:
185


Issue Report
ESCAN00092955
Compiler error: incompatible types - from 'const 
<MSN>_PCConfigType *' to 'const 
<MSN>ConfigType *const

Workaround:
-------------------------------------------------------------------
To resolve this the content of theCONT EcuM_GlobalConfigRoot in EcuM_Init_Cfg.c has to be 
reordered to fit to the struct EcuM_GlobalConfigRootType.
e.g.
CONST(EcuM_GlobalConfigRootType, ECUM_CONST) EcuM_GlobalConfigRoot =
{
 {
 BswM_Config_CanNm_Ptr, 
 EcuM_Config_CanNm_Ptr, 
 CanNm_Config_CanNm_Ptr, 
 }, 
 {
 BswM_Config_ClassB_Ptr, 
 CanNm_Config_ClassB_Ptr, <===== Wrong position, must be the last one
 EcuM_Config_ClassB_Ptr, 
 }, 
 {
 BswM_Config_ClassC_Ptr, 
 CanNm_Config_ClassC_Ptr, <===== Wrong position, must be the last one
 EcuM_Config_ClassC_Ptr,
 }
};
typedef struct
{
 CONSTP2CONST(BswM_ConfigType, TYPEDEF, BSWM_INIT_DATA) CfgPtr_BswM_Init;
 CONSTP2CONST(EcuM_PbConfigType, TYPEDEF, ECUM_INIT_DATA) CfgPtr_EcuM_Init;
 CONSTP2CONST(CanNm_ConfigType, TYPEDEF, CANNM_INIT_DATA) CfgPtr_CanNm_Init;
} EcuM_GlobalPCConfigType;
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
186


Issue Report
ESCAN00093294
Invalid key accepted due to inconsistent Csm and 
CryFord job processing configuration

Component@Subcomponent:
Diag_AsrSwcSecAccess_Ford@Implementation
First affected version:
1.00.00
Fixed in versions:
2.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
SecurityAccess_FunctionFinish() declares key as valid even if the verification has failed.
When does this happen:
-------------------------------------------------------------------
While processing the security access key.
In which configuration does this happen:
-------------------------------------------------------------------
If configured Csm job processing type and CryFord job processing type are inconsistent.
E.g. Csm configured for sync job processing and CryFord for async processing.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
187


Issue Report
ESCAN00093317
Value Calculations does not act as expected
Component@Subcomponent:
CommonAsr_ComGenericGenLib@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An Value Calculation has only influence to values which are added to the ComStackLib. The values 
of the Define Creator are directly taken from the corresponding EcuC parameter.
Furthermore, Value Calculations for references (i.e convert a reference to an integer of the target) 
do not work either.
When does this happen:
-------------------------------------------------------------------
Always during the generation
In which configuration does this happen:
-------------------------------------------------------------------
Generators which uses ValueCalculators for parameters which are created by the Microsar Define 
creator.
or
Value calculation is used for a reference
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use a struct extender / custom #define for the DefRef and blacklist the DefRef instead
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
188


Issue Report
ESCAN00093405
Auto Configuration - Invalid multiplicity after 
manual adaptations of container 
BswMAvailableActions

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
10.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
User-modifications about a changed BswMAvailableActions subcontainer are recognized by the 
Auto Configuration assistant but even if they should be kept, the assistant will re-create the 
original action. This leads to an invalid model because the user modification is not removed by the 
assistant.
Example:
- Configure Communication Control is used and Reinitialize TX is turned ON, Finish is clicked.
- the /MICROSAR/BswM/BswMConfig/BswMModeControl/BswMAction CC_EnableDM_<I-PDU-
Group> has a BswMDeadlineMonitoringControl container which is deleted within the Basic Editor
- Instead another BswMAvailableActions subcontainer is created of another type, e.g. 
BswMComMModeLimitation
- Configure Communication Control is used once again and Finish is clicked. An option if offered to 
either keep this modification or to restore it, but independent of the choice, the original 
BswMDeadlineMonitoringControl is restored without removing the user modification. Because the 
user modification is not removed the multiplicity of the container BswMAvailableActions[0...1] is 
violated.
When does this happen:
-------------------------------------------------------------------
During the configuration with DaVinci Configurator in the BSW Management Editor in the following 
sequence:
- Configure <Auto Configuration> is clicked
- Finish is clicked
- Some objects like a /MICROSAR/BswM/BswMConfig/BswMModeControl/BswMAction/
BswMAvailableActions/BswMDeadlineMonitoringControl container are deleted or changed
- Configure <Auto Configuration> is clicked once again
- Finish is clicked
- the dialog 'Manual Adaptions' does pop up 
- Finish is clicked in the 'Manual Adaptions' dialog 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration using one of the Auto Configurations in BSW Management in DaVinci 
Configurator
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Redo the previously manual changes that have been overwritten.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
189


Issue Report
ESCAN00093449
A2L compu method RTE_CM_BOOLEAN cannot be 
used to calibrate boolean values

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Only FALSE can be selected in calibration tools for boolean calibration values
When does this happen:
-------------------------------------------------------------------
During calibration
In which configuration does this happen:
-------------------------------------------------------------------
If calibration is configured for a boolean element
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure an integer element with a dedicated compu method instead of a boolean element.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
190


Issue Report
ESCAN00093502
Technical Reference: Wrong API description for 
Csm_SymKeyExtractStart

Component@Subcomponent:
SysService_AsrCsm@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
On TechnicalReference_Csm, Csm_SymKeyExtractStart prototype is 
 Csm_ReturnType Csm_SymKeyExtractStart (Csm_ConfigIdType cfgId, const Csm_SymKeyType 
*keyPtr) 
But has to be
 FUNC( Csm_ReturnType, CSM_CODE ) Csm_SymKeyExtractStart( Csm_ConfigIdType cfgId )
There is no second parameter.
When does this happen:
-------------------------------------------------------------------
-
In which configuration does this happen:
-------------------------------------------------------------------
-
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
191


Issue Report
ESCAN00093634
CAN-FD format (Bosch V1.0, ISO-11898) 
inconsistent

Component@Subcomponent:
DrvCan_Mpc5700McanLl@GenTool_GeneratorMsr
First affected version:
3.00.01
Fixed in versions:
3.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After changing the Mcan Revision to M_CAN_REV_315 the parameter CanFd NISO is grey'ed and 
cannot be edited. 
This is not correct for M_CAN_REV_315 as for this revision both CAN-FD formats are available. 
When does this happen:
-------------------------------------------------------------------
During configuration time.
In which configuration does this happen:
-------------------------------------------------------------------
In every configuration.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Mark CanFd NISO parameter as "Set user defined",
configure the parameter as required,
mark CanFd NISO parameter as "Set NOT user defined".
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
192


Issue Report
ESCAN00093839
CFG5 Exception or Compile Error "Too many 
initializer values"

Component@Subcomponent:
CommonAsr_ComStackLib@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
8.06.00, 8.05.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
CFG5 shows the following error message
"Exception in <MSN> generator during Generation encountered"
and no files are generated.
The detailed error description is: java.lang.NullPointerException 
OR
the compiler informs about arrays of structs with too many initializer values.
When does this happen:
-------------------------------------------------------------------
at generation time
OR
at compile time
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the postbuild-selectable support is enabled for this module
AND
the generator uses the API setRequiresIndexUsedArray() with the parameter true.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
deactivate ComStackLib boolean deduplications
AND
configure <MSN>StructBoolDataUsage to a value different from "BITMASKING"
AND
generate again.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
193


Issue Report
ESCAN00094259
Auto-Configuration Communication Control shows 
an error in case of not available module Com

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
2.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Auto-Configuration shows the following error:
Configuration *error*
Reason for *error*:
Could not collect all necessary informations. Solve errors in depending Modules first!
To see following errors in the Validation view execute on-demand generator validation!
Container ComConfig does not exist. Element def.: /[ANY]/Com/ComConfig
When does this happen:
-------------------------------------------------------------------
Always during configuration.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations without the module Com.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
194


Issue Report
ESCAN00094298
The Ecu does not startup properly in some MultiCore 
configurations

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Ecu does not startup properly, e.g. communication does not start , the application is not 
started, the configuration variant is not detected correct etc.
When does this happen:
-------------------------------------------------------------------
Always after startup of the Ecu.
In which configuration does this happen:
-------------------------------------------------------------------
In MultiCore configurations with parameter "/EcuM/EcuMGeneral/EcuMBswCoreId" set to another 
value than to the ID of the master core
AND 
The OS symbols OS_CORE_ID_<X> are provided as a enumeration and not as a preprocessor 
define.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a header file with the following content and add it to /MICROSAR/EcuM/EcuMGeneral/
EcuMUserConfigurationFile:
#if defined(ECUM_CFG_H)
# undef ECUM_CORE_ID_STARTUP
# undef ECUM_CORE_ID_BSW
# define ECUM_CORE_ID_STARTUP <Core Id as Numerical Value, e.g. '0>
# define ECUM_CORE_ID_BSW <Core Id as Numerical Value, e.g. '1>
#endif
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
195


Issue Report
ESCAN00094319
Auto-Configuration Communication Control: Init 
Mode of Lin Schedule Indication is missing

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
10.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A validator in Cfg5 reports the following warning:
BSWM01057 Init Mode of CC_LinScheduleIndication_<Schedule Name> is not known.
 Set BswMBswModeInitValueMode(value=) to LinSMConf_LinSMSchedule_<NAME>
/ActiveEcuC/BswM/BswMConfig/BswMArbitration/
CC_LinScheduleIndication_LIN00_<Schedule_Name>/BswMModeInitValue/
BswMBswModeInitValue[BswMBswModeInitValueMode]
 /ActiveEcuC/BswM/BswMConfig/BswMArbitration/
CC_LinScheduleIndication_LIN00_<Schedule_Name>
When does this happen:
-------------------------------------------------------------------
Always after configuring the Auto-Configuration Communication Control.
In which configuration does this happen:
-------------------------------------------------------------------
Only in configurations with at least one Lin channel 
AND 
Auto-Configuration Communication Control is configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the normal schedule via the provided solving action.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
196


Issue Report
ESCAN00094355
[Error] CANIF10027 None CAN-channel has multiple 
BasicCAN Tx-objects. Hence the feature 
"CanIfMultipleBasicCANTxObjects" is not required 
in current configuration and must be disabled.

Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
One of the following validation messages always occurs during configuration:
[Error] CANIF10027 - A feature is not supported in current configuration and shall be disabled. 
- None CAN-channel has multiple BasicCAN Tx-objects. Hence the feature 
"CanIfMultipleBasicCANTxObjects" is not required in current configuration and must be disabled.
Solving action: Disable parameter: "CanIfMultipleBasicCANTxObjects".
-> After executing of this solving action you get the following validation message within the 
CanDrv:
[Error] CAN02002 - An invalid value is configured 
- CanMultipleBasicCANTxObjects is not active but multiple TX BasicCANs used on some controller.
Solving action: Enable parameter: "CanMultipleBasicCANTxObjects"
-> After execution of this solving action you get the validation message mentioned above
When does this happen:
-------------------------------------------------------------------
During configuration
In which configuration does this happen:
-------------------------------------------------------------------
In case there is at least one CAN channel with no BasicCAN Tx-hardware object (there is no 
"CanHardwareObject" with "CanHandleType" == BASIC and "CanObjectType" == TRANSMIT)
-> The configuration has only FullCAN-objects or no Tx-objects at all on at least one channel
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Make sure you get [Error] CANIF10027 (i.e. solve [Error] CAN02002 if present).
Set the parameter "CanIfMultipleBasicCANTxObjects" to user defined and keep it enabled.
[Error] CANIF10027 is then demoted to a warning that can be ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
197


Issue Report
ESCAN00094416
Linker error: undefined reference to 
ComM_Nm_PrepareBusSleepMode

Component@Subcomponent:
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
8.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A Compiler warning or error occurs similar to:
- missing prototype
- 'ComM_Nm_PrepareBusSleepMode' undefined; assuming extern returning int
- Implicit parameter-declaration for 'ComM_Nm_PrepareBusSleepMode'
- function ComM_Nm_PrepareBusSleepMode declared implicitly 
ComM_Nm_PrepareBusSleepMode(nmNetworkHandle)
Additionally a linker error occurs similar to:
- Nm.obj : unresolved external symbol _ComM_Nm_PrepareBusSleepMode referenced in function 
_Nm_BusSleepMode
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Configurations with CAN channels only where J1939Nm is attached on each CAN channel and no 
CanNm
(/MICROSAR/Nm/NmChannelConfig/NmBusType/NmStandardBusNmConfig/NmStandardBusType 
= NM_BUSNM_J1939NM exists in each NmChannelConfig container)
=> ComM_Cfg.h contains #define COMM_SILENTSUPPORTOFCHANNEL STD_OFF
AND
On at least one channel, another BusNm is configured as generic BusNm
(/MICROSAR/Nm/NmChannelConfig/NmBusType/NmGenericBusNmConfig is defined)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
198


Issue Report
ESCAN00094506
API CanIf_CheckBaudrate is not described / the API 
CanIf_ChangeBaudrate is described twice

Component@Subcomponent:
If_AsrIfCan@Doc_TechRef
First affected version:
6.00.00
Fixed in versions:
6.12.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The API: "CanIf_CheckBaudrate" is not described, but the API: "CanIf_ChangeBaudrate" is 
described twice
When does this happen:
-------------------------------------------------------------------
- During reading of technical reference
In which configuration does this happen:
-------------------------------------------------------------------
-
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Please see the CanIf-implementation or the AUTOSAR-specification for more information about the 
API: CanIf_CheckBaudrate().
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
199


Issue Report
ESCAN00094541
Auto-Configuration Communication Control: Rules 
without expressions are created and so validation 
errors are shown

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The validation tab shows the following message:
AR-ECUC02008 Invalid multiplicity (3 messages)
 AR-ECUC02008 Mandatory parameter BswMRuleExpressionRef is missing in 
CC_<CHANNELNAME>_<PNCNAME_RX
 BswMRuleExpressionRef
 /ActiveEcuC/BswM/BswMConfig/BswMArbitration/CC_<CHANNELNAME>_<PNCNAME>
 AR-ECUC02008 Mandatory parameter BswMRuleExpressionRef is missing in 
CC_<CHANNELNAME>_<PNCNAME_RX_DM
 BswMRuleExpressionRef
 /ActiveEcuC/BswM/BswMConfig/BswMArbitration/CC_<CHANNELNAME>_<PNCNAME>
 AR-ECUC02008 Mandatory parameter BswMRuleExpressionRef is missing in 
CC_<CHANNELNAME>_<PNCNAME_TX
 BswMRuleExpressionRef
 /ActiveEcuC/BswM/BswMConfig/BswMArbitration/CC_<CHANNELNAME>_<PNCNAME>
When does this happen:
-------------------------------------------------------------------
Always after execution of the Communication Control assistant.
In which configuration does this happen:
-------------------------------------------------------------------
In configurations with PNCs where at least one PduGroup is mapped to different PNCs
AND 
Not all PNCs of a channel are configured (selected) in the Communication Control assistant.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Rules must be deleted manually from configuration.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
200


Issue Report
ESCAN00094612
WdgM_GetTickCount is called with suspended 
interrupts

Component@Subcomponent:
SysService_Asr4WdM@Implementation
First affected version:
5.02.00
Fixed in versions:
5.02.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
WdgM_GetTickCount is called with suspended interrupts. If the timebase source is configured to be 
an Os counter, this results in an error. It is not allowed to call Os-APIs with suspended interrupts. 
The consequence is that the Os will run in error hook and will shutdown.
When does this happen:
-------------------------------------------------------------------
Always and immediately if an Os Counter is used as timebase.
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/WdgM/WdgMGeneral/WdgMTimebaseSource == WDGM_OS_COUNTER_TICK
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Implement WDGM_EXCLUSIVE_AREA_0 with an OS resource and assign all tasks to this resource, 
to which the following runnable/schedulabe entities are mapped:
- WdgM_Init
- WdgM_MainFunction
- All runnables calling any CheckpointReached operation
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
201


Issue Report
ESCAN00094806
Compiler error: Undefined symbol 
RTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
8.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Typical compiler error explanations may be:
 Symbol RTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION not defined.
Note: The above symbol is only an example. Typically all used diagnostic session related RTE 
mode defines will invoke an error, such as EXTENDED_SESSION, PROGRAMMING_SESSION etc.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM is licensed for AR 4.2.1 or newer version.
AND
- An application code (SW-C) uses the AR 4.2.X or newer RTE mode names (e.g. 
RTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create compatibility defines in the SW-C code or one of the included files (e.g. in worst case in 
Compiler_Cfg.h ) to link the two AR standards:
Example:
#define RTE_MODE_DcmDiagnosticSessionControl_DEFAULT_SESSION 
RTE_MODE_DcmDiagnosticSessionControl_DefaultSession
 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
202


Issue Report
ESCAN00094875
Compiler error: dld.exe: warning: Undefined symbol 
'MemIf_*_WriteWrapper' in file 'obj/MemIf_Cfg.o'

Component@Subcomponent:
If_AsrIfMem@GenTool_GeneratorMsr
First affected version:
5.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error: dld.exe: warning: Undefined symbol 'MemIf_*_WriteWrapper' in file 'obj/
MemIf_Cfg.o' 
When does this happen:
-------------------------------------------------------------------
During linking the project
In which configuration does this happen:
-------------------------------------------------------------------
Windriver Diab compiler for PPC version is used (tested with version 5.9.4.8)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Redefine MEMIF_LOCAL_INLINE to MEMIF_LOCAL (e.g. in Compiler_Cfg.h)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
203


Issue Report
ESCAN00094883
Improper workaround for MCAN Erratum #10
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.04.00
Fixed in versions:
2.15.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In case of a (Re-)Init while a MCAN TX Scan is in progress the MCAN TX Handler stops. 
After going back to Normal Mode the MCAN TX Handler does not execute any transmission 
requests.
When does this happen:
-------------------------------------------------------------------
At runtime
In which configuration does this happen:
-------------------------------------------------------------------
Only if the Workaround for MCAN Erratum #10 is activated (CAN_BOSCH_ERRATUM_010 == 
STD_ON).
The MCAN Erratum #10 is only relevant for MCAN Revisions less than 3.1.0. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
204


Issue Report
ESCAN00094972
Compiler error: Missing declaration for APIs 
Dcm_OptimizedSetNegResponse and 
Dcm_OptimizedProcessingDone

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
8.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error due to missing declaration for APIs Dcm_OptimizedSetNegResponse and 
Dcm_OptimizedProcessingDone.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
 - At least one user sub-service is configured (ECUC parameter DcmDsdSubServiceFnc is not 
empty)
AND 
 - There is no user service configured (all ECUC parameters DcmDsdSidTabFnc are empty/missing)
AND
 - In Dcm_Ext.c is no service or sub-service handler active (switch name depends on the extension 
type)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add the following lines in a user-configuration file for DCM:
/* ESCAN00094972 WA BEGIN */
# undef DCM_DIAG_EXTERN_SVC_HANDLING_ENABLED
# define DCM_DIAG_EXTERN_SVC_HANDLING_ENABLED STD_ON
/* ESCAN00094972 WA END */
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
205


Issue Report
ESCAN00094980
Generator version check fails
Component@Subcomponent:
Tp_Asr4TpCan@ElisaPlugin
First affected version:
1.00.01
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following line appears in the MICROSAR Safe Silence Verification Report:
error: assertion 'CANTP_CFG_GEN_MINOR_VERSION: "2U"' == '"1U"' does not hold
When does this happen:
-------------------------------------------------------------------
When running the Asr4TpCan MSSV checks.
In which configuration does this happen:
-------------------------------------------------------------------
This happens only when using the affected plugin to verify data from 4.02.xx CanTp generators. 
No errors should arise when verifying data from 4.01.xx CanTp generators.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The version check could be ignored. Even if the generator has been changed, the required checks 
remain the same, they do run and are properly showed in the report.
Resolution:
-------------------------------------------------------------------
The version check is now correct.
206


Issue Report
ESCAN00094991
Generated SW-C template for S/R data interface 
does not comply with AR 4.x standard

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
8.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Direct port mapping between DCM and DEM not possible. 
RTE validation check message ID RTE51008 is issued in DaVinci configurator.
When does this happen:
-------------------------------------------------------------------
At port mapping time.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM and DEM support S/R data access.
AND
- Direct mapping between DCM and DEM shared data is required.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Apply port interface mapping manually.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
207


Issue Report
ESCAN00095065
Compiler error: Missing declaration for API 
BswM_Dcm_RequestResetMode()

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
5.01.00
Fixed in versions:
8.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error due to missing declaration of BswM_Dcm_RequestResetMode() API .
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- Dcm is integrated in ASR 3 environment (Dcm_Cfg.h: 
DCM_BSW_ENV_ASR_VERSION_3XX_ENABLED == STD_ON)
AND
 - Final response after reset from FBL is not supported (Dcm_Cfg.h: 
DCM_DIAG_JUMPFROMFBL_ENABLED == STD_OFF)
 AND
 - Service 0x28 is not handled by DCM (Dcm_Cfg.h: DCM_SVC_28_SUPPORT_ENABLED == 
STD_OFF)
 AND
 - At least one sub-function of service 0x11 is handled by Dcm (Dcm_Cfg.h: 
DCM_MODE_ECU_RESET_ENABLED == STD_ON || DCM_MODE_RPD_SHTDWN_ENABLED == 
STD_ON)
 OR
 - At least one diagnostic session is configured for jumping to FBL (Dcm_Cfg.h: 
DCM_DIAG_JUMPTOFBL_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Enable feature jump from FBL. Set the ECUC parameter DcmFinalResponseToFblEnabled = TRUE.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
208


Issue Report
ESCAN00095083
Compiler error: #20: identifier 
"EcuM_WakeupSourceType" is undefined

Component@Subcomponent:
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
3.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error occurs: "error #20: identifier "EcuM_WakeupSourceType" is undefined "
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
See file: CanIf_Cfg.h
- CANIF_WAKEUP_SUPPORT == STD_OFF
AND
- CANIF_WAKEUP_VALIDATION == STD_OFF
AND
- CANIF_CONFIG_VARIANT != CANIF_CFGVAR_POSTBUILDTIME
AND CanIf-Version is >= 6.13.00 (See CanIf.h -> define: IF_ASRIFCAN_VERSION >= 0x0613u )
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
1) Enable wakeup within a CAN channel or a CAN transceiver channel, depending on change 
generate afterwards CanDrv / CanTrcv and CanIf once again [if applicable]
or
2) Create a user configuration file for CanIf and add #include "EcuM_Cbk.h", generate afterwards 
at least CanIf once again [recommended]
or
3) Just enable the parameter "CanIfWakeupSupport" and set it to user defined and generate 
afterwards at least the CanIf once again
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
209


Issue Report
ESCAN00095259
Compiler error: WdgIf uses undefined memory 
sections

Component@Subcomponent:
If_Asr4IfWd@GenTool_GeneratorMsr
First affected version:
2.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
WdgIf uses memory section which are not defined. The WdgIf assumes erroneously that Os 
provides these sections. This error leads to a compiler error like: #error "MemMap.h, wrong 
pragma command"
The sections of the WdgIf 
- WDGIF_START_SEC_VAR_INIT_8BIT / WDGIF_STOP_SEC_VAR_INIT_8BIT
- WDGIF_START_SEC_VAR_INIT_16BIT / WDGIF_STOP_SEC_VAR_INIT_16BIT
- WDGIF_START_SEC_VAR_INIT_32BIT / WDGIF_STOP_SEC_VAR_INIT_32BIT
are mapped to
(Gen6)
- <ApplicationName>_START_SEC_VAR_<InitPolicy>_8BIT / 
<ApplicationName>_STOP_SEC_VAR_<InitPolicy>_8BIT
- <ApplicationName>_START_SEC_VAR_<InitPolicy>_16BIT / 
<ApplicationName>_STOP_SEC_VAR_<InitPolicy>_16BIT
- <ApplicationName>_START_SEC_VAR_<InitPolicy>_32BIT / 
<ApplicationName>_STOP_SEC_VAR_<InitPolicy>_32BIT.
(Gen7)
- OS_START_SEC_<ApplicationName>_VAR_<InitPolicy>_8BIT / 
OS_STOP_SEC_<ApplicationName>_VAR_<InitPolicy>_8BIT
- OS_START_SEC_<ApplicationName>_VAR_<InitPolicy>_16BIT / 
OS_STOP_SEC_<ApplicationName>_VAR_<InitPolicy>_16BIT
- OS_START_SEC_<ApplicationName>_VAR_<InitPolicy>_32BIT / 
OS_STOP_SEC_<ApplicationName>_VAR_<InitPolicy>_32BIT.
Os currently supports only "InitPolicy" {-, NOINIT, ZEROINIT}. The actually needed init policy is 
"INIT".
When does this happen:
-------------------------------------------------------------------
Only if a multi core plattform is used and the WdgIf is configured to use the state combiner 
functionality.
In which configuration does this happen:
-------------------------------------------------------------------
If a container "/MICROSAR/WdgIf/WdgIfStateCombiner" is configured
AND
if /MICROSAR/WdgIf/WdgIfGeneral/WdgIfUseStateCombiner == true
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Provide the missing memory sections and locate them in a proper memory section.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
210


Issue Report
ESCAN00095262
Missing record layout for uint64 and sint64 data 
types

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The A2L file misses a record layout for 64 bit measurement objects
E.g. the generator generates:
 /begin MEASUREMENT Rte_c_PerInstanceMemory_3 "MICROSAR RTE"
 A_UINT64 NO_COMPU_METHOD 0 0 0 18446744073709551615
 ECU_ADDRESS 0
 /end MEASUREMENT
but does not generate
 /begin RECORD_LAYOUT RTE_RL_A_UINT64
 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT
 /end RECORD_LAYOUT
When does this happen:
-------------------------------------------------------------------
During generation
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains sender-receiver ports, inter-runnable variables, 
calibration parameters or per-instance memories that
use 64 bit integer data types and when measurement is enabled for the objects.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually add the record layout to the skeleton A2L file that includes Rte.a2l.
 /begin RECORD_LAYOUT RTE_RL_A_UINT64
 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT
 /end RECORD_LAYOUT
 /begin RECORD_LAYOUT RTE_RL_A_INT64
 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT
 /end RECORD_LAYOUT
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
211


Issue Report
ESCAN00095296
Validation error: Reference to XcpOnCan/
XcpOnCanVariableDlc not found

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
2.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The validator throws an error about a missing reference to
/MICROSAR/Xcp/XcpConfig/XcpTransportLayer/XcpOnCan/XcpOnCanVariableDlc
if the Container
/MICROSAR/Xcp/XcpConfig/XcpTransportLayer/XcpOnCan
is deleted when CAN is not used.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
If XcpOnCan is not used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
After restart of Cfg5 the validation error is gone.
It will re-appear if the container is created and deleted again.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
212


Issue Report
ESCAN00095310
Compiler error: identifier EcuM_GlobalConfigRoot 
not declared

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
8.00.04
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler throws the following (or similar) error:
"../../../external/BSW/EcuM/EcuM.c", line 2959: error (dcc:1525): identifier 
EcuM_GlobalConfigRoot not declared
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Only in PB-S configurations with MCAL modules which do only support PB-L.
 
Resolution Description:
213


Issue Report
ESCAN00095310
Compiler error: identifier EcuM_GlobalConfigRoot 
not declared

Workaround:
-------------------------------------------------------------------
1. Workaround:
This workaround does only work if in /ActiveEcuC/EcuC/EcucGeneral/BswInitialization no entry 
exists for one of those MCAL modules with entry "AdditionalInitCode" and without a ConfigPtrName 
set.
Add MCAL modules which do only support PB-L to the list of individual Postbuild modules in the 
configuration of the module EcuC:
EcuC/EcucGeneral/PostbuildLoadable/IndividualPostBuildLoadableModule
HINT: Consider the .groovy script in the attachments, this will add the individual Postbuild 
modules mentioned in workaround 1.
2. Workaround:
If Workaround 1 is not working because of the restrictions mentioned in the 1. workaround please 
use the following workaround:
Adaption of the files EcuM_Init_Cfg.h and EcuM_Init_Cfg.c. The adaption of these files is okay 
because these are template files.
Adapt the EcuM_Init_Cfg.h as follows:
...
extern CONST(EcuM_GlobalConfigRootType, ECUM_CONST) EcuM_GlobalConfigRoot; 
...
Adapt the EcuM_Init_Cfg.c as follows:
....
CONST(EcuM_GlobalConfigRootType, ECUM_CONST) EcuM_GlobalConfigRoot =
{
<CONTENT>
};
....
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
214


Issue Report
ESCAN00095312
Generation cannot be started because of an error 
COMM90500 - A generated value is not in range of 
the specified datatype

Component@Subcomponent:
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
8.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
[Error] COMM90500 - A generated value is not in range of the specified datatype 
- The value 256 with comment () is not in the range of the specified datatype UINT_8.
When does this happen:
-------------------------------------------------------------------
During code generation in the calculation or validation phase.
In which configuration does this happen:
-------------------------------------------------------------------
The number of connections between ComMChannels and ComMUsers exceeds 255.
Example: assume there are 15 ComMChannels and 17 ComMUsers.
If each ComMChannel is connected to each ComMUser there are 15 * 17 = 255 connections, the 
issue does not occur.
After adding a new ComMUser and connecting it to a ComMChannel the number of connections 
increases by 1 and becomes 256 and the issue occurs.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
215


Issue Report
ESCAN00095342
Compiler error: identifier PduR Routing Manager 
APIs not declared

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
12.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error: identifier PduR_RmTp_CopyRxData(), PduR_RmTp_CopyTxData(), 
PduR_RmTp_TpRxIndication() and PduR_RmTp_TpTxConfirmation not declared.
or 
Compiler error: identifier PduR_RmIf_RxIndication(), PduR_RmIf_RxIndication_MultiIf and 
PduR_RmIf_TxConfirmation not declared.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- configuration variant: Postbuild selectable
 and one variant has gateway pathways and a other variant does not have any gateway pathways 
(forwarding only).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use a gateway path in one of the variants as an invariant path. In the variants without gateway 
the path function as a dummy pathway.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
216


Issue Report
ESCAN00095432
RTE generator generates to many compu scales
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Measurement or characteristic objects in the A2L files reference compu methods with
COMPU_VTAB_RANGE although the used data types do not define any enumeration literals.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains application data types with texttable compu methods
and when the application data types are mapped to implementation data types that are also used 
without mapping them to the same application data type.
E.g. when an application data type is mapped to a platform type, the compu scale literals of the 
application data type will be generated for all measurement
objects that use the platform type.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create separate implementation data types for all interfaces.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
217


Issue Report
ESCAN00095490
Compiler error: Cannot open include file: 'Det.h'
Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.03.00
Fixed in versions:
8.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
DCM will not compile due to missing DET component header file.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- Development error detection is supported (in Dcm_Cfg.h: DCM_DEV_ERROR_DETECT == 
STD_ON)
AND
- Development error reporting is not supported (in Dcm_Cfg.h: DCM_DEV_ERROR_REPORT == 
STD_OFF)
AND
- DET component is not available (Det.h is not provided in the project)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Provide an empty Det.h file.
Resolution:
-------------------------------------------------------------------
Change dependency for inclusion of Det.h from DCM_DEV_ERROR_DETECT to 
DCM_DEV_ERROR_REPORT.
218


Issue Report
ESCAN00095519
ConsistencyRT00002 Error at validator runtime: 
CanSMBorTxConfPollingValidator if CanIf is missing

Component@Subcomponent:
Ccl_Asr4SmCan@GenTool_GeneratorMsr
First affected version:
3.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
 ConsistencyRT00002 - Error at validator runtime 
When does this happen:
-------------------------------------------------------------------
If the CanIf Module is deleted or a configuration without CanIf is loaded
In which configuration does this happen:
-------------------------------------------------------------------
If CanIf is deleted or missing
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Activate CanIf Module or remove the CanSM Module and reload the project
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
219


Issue Report
ESCAN00095528
Compiler error: Undeclared Identifier 
'COM_UINT8_APPLTYPEOFRXACCESSINFO'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
9.00.00
Fixed in versions:
13.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler reports an undeclared Identifier 'COM_UINT8_APPLTYPEOFRXACCESSINFO'.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
In configurations without any uint8 signal or groupSignal and array access enabled for at least one 
signalGroup. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add a dummy signal with appl. Type uint8
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
220


Issue Report
ESCAN00095553
Compiler error: Undefined identifier *PtrType to 
VARs of simple types with 
<MSN>_USE_INIT_POINTER to STD_ON

Component@Subcomponent:
CommonAsr_ComStackLib@GenTool_GeneratorMsr
First affected version:
8.04.00
Fixed in versions:
8.09.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile error occurs in the doxygen group *PBRootValueTypes. The type definition of the 
*PtrType used for VARs of simple types is undefined.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where
<MSN>_USE_INIT_POINTER is defined to STD_ON
AND
the generator instanciates objects of the type IVarVar (simple VARs in the config root) in the 
Configuration Class LINK time or POST-BUILD.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
221


Issue Report
ESCAN00095570
Auto-Configuration Communication Control: 
Activation of a PNC on one channel does also affect 
other channels with same PNC

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
12.00.00, 11.00.04
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The communication control shows all PDU Groups of a PNC, even if the PDU Groups are not 
relevant for this channel. On activation of one PDU Group, other PDU Groups of the same PNC on 
other channels are also affected.
Example:
ChannelONE ->PNCA -> PDUGroupA
ChannelTWO ->PNCA -> PDUGroupA
An activation of PDUGroupA on ChannelOne does also affect the configuration of ChannelTWO.
When does this happen:
-------------------------------------------------------------------
Always during configuration.
In which configuration does this happen:
-------------------------------------------------------------------
In configurations with PNCs which are mapped to more than one channel on the same ECU.
 
Resolution Description:
222


Issue Report
ESCAN00095570
Auto-Configuration Communication Control: 
Activation of a PNC on one channel does also affect 
other channels with same PNC

Workaround:
-------------------------------------------------------------------
Do not activate PDU Groups in context of a channel where the PDU Group is not relevant for this 
channel. Additional ensure that always the channel, the PNC and all relevant PDU Groups are 
activated (Marked with a check in the checkbox).
Example:
ChannelONE 
 ->PNCA 
 -> PDUGroupAChannelONE
 -> PDUGroupBChannelTWO
ChannelTWO 
 ->PNCA 
 -> PDUGroupAChannelONE
 -> PDUGroupBChannelTWO
Ensure that the following checkboxes are set to start PDUGroupAChannelONE when ChannelONE 
and PNCA are in Full Communication:
X ChannelONE 
 X PNCA 
 X PDUGroupAChannelONE
 O PDUGroupBChannelTWO (State of the checkbox might be wrong but don't care for this channel) 
Ensure that the following checkboxes are set to start PDUGroupAChannelTWO when ChannelTWO 
and PNCA are in Full Communication:
X ChannelTWO 
 X PNCA 
 O PDUGroupAChannelONE (State of the checkbox might be wrong but don't care for this channel)
 X PDUGroupBChannelTWO
Additional check the following three logical expressions (if existing):
CC_PNC_<CHANNELNAME>_<PNCNAME>_RX
CC_PNC_<CHANNELNAME>_<PNCNAME>_RX_DM
CC_PNC_<CHANNELNAME>_<PNCNAME>_TX
All three expressions must be like this:
 CC_PNC_<PNCNAME> != COMM_PNC_NO_COMMUNICATION
&& CC_CanSMIndication_<CHANNELNAME> != CANSM_BSWM_NO_COMMUNICATION
If one condition is missing please extend the logical expression to be like described here.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
223


Issue Report
ESCAN00095571
EcuM causes a Rte warning about a not existing 
mode request type map

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During validation the Rte throws the following warning:
Mode Declaration Group <EcuM_Mode> of Component <EcuM> has no mode request type map.
Each Mode Declaration Group used in the SW-C's ports has to have a unique mapping to an 
implementation data type. The Mode Group Data Type is set to <uint8>.
Help:
- define a mode request type map.
When does this happen:
-------------------------------------------------------------------
During validation of the Rte.
In which configuration does this happen:
-------------------------------------------------------------------
If /MICROSAR/EcuM/EcuMGeneral/EcuMEnableFixBehavior is set
OR 
If /MICROSAR/EcuM/EcuMFlexGeneral/EcuMModeHandling is set
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
224


Issue Report
ESCAN00095591
Compiler error: Invalid suffix 'U' on floating constant
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because the RTE generates an integer constant / upper limit using floating point
notation and suffix 'U', e.g. 1.84467440737096e+019U.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains application data types with high upper limits.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
225


Issue Report
ESCAN00095642
Compiler error: Service 0x2A is enabled, but no 
periodic messages have been configured for Dcm

Component@Subcomponent:
Diag_Asr4Dcm@Doc_TechRef
First affected version:
7.02.00
Fixed in versions:
8.06.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler issues the following error message:
Service 0x2A is enabled, but no periodic messages have been configured for Dcm. Please, refer to 
the Dcm TechRef for SID 0x2A configuration aspect.
Note: This is a DCM error check but in the Technical Reference it is not described that periodic 
transmission will not be considered in case Safe BSW Check is enabled.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in all configurations where 
- Service 0x2A is configured in Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTables/
DcmDsdServiceTable/DcmDsdServices
AND
- at least one Periodic Transmission is configured (/ActiveEcuC/Dcm/DcmConfigSet/DcmDsl/
DcmDslProtocol/DcmDslProtocolRow/<ProtocolName>/DcmDslPeriodicTransmission)
AND
- Safe BSW Check (/MICROSAR/Dcm/DcmConfigSet/DcmGeneral/DcmSafeBswChecks) is enabled
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In case you do not have DCM delivered as Safe BSW component disable Safe BSW Check (/
MICROSAR/Dcm/DcmConfigSet/DcmGeneral/DcmSafeBswChecks).
In the other case you cannot use periodic transmission as this is in current versions not supported 
in combination with Safe BSW.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
226


Issue Report
ESCAN00095660
[Applies only if hardware: Tle9252 is used] BETA 
version - the BSW module is in BETA state

Component@Subcomponent:
DrvTrans_Tja1043CandioAsr@Implementation
First affected version:
4.02.00
Fixed in versions:
4.03.00
Problem Description:
What is the impact of BETA software:
-------------------------------------------------------------------
BETA software - only in case of CAN transceiver hardware: Tle9252 is used in conjunction with this 
driver.
- must not be used in productive projects as they may result in unpredictable ECU behavior
- may not provide all features intended for the productive project
- is not or only partly tested and not all quality measures have taken place
Which functionality is BETA:
-------------------------------------------------------------------
The complete BSW module is in BETA state only in case of CAN transceiver hardware: Tle9252 is 
used in conjunction with this driver.
-> Especially the wake-up detection does not allow the distinction between WUP/LWU. Wake-up is 
reported always as WUP.
 
Resolution Description:
Resolved in STORYC-3911
227


Issue Report
ESCAN00095684
esl_decryptAES* causes memory corruption
Component@Subcomponent:
SysService_CryptoCv@Impl_ESLib
First affected version:
1.00.00
Fixed in versions:
2.09.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
AES decryption may lead to memory corruption (write access out of bounds)
Additionally AES decryption cannot complete; eslFinalizeDecryptAES* will fail, returning error code 
ESL_ERC_WS_TOO_SMALL.
When does this happen:
-------------------------------------------------------------------
It happens always under following conditions:
- esl_initWorkSpaceHeader was called with a workspace size of ESL_MINSIZEOF_WS_AES128. 
- esl_initDecryptAES* was successfully called with this workspace, and
- esl_decryptAES* is called with an input length that is a multiple of AES_BLOCK_SIZE (16bytes).
In which configuration does this happen:
-------------------------------------------------------------------
It happens in all configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Hand over a workspace with the right buffer size ESL_MAXSIZEOF_WS_AES128.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
228


Issue Report
ESCAN00095690
RTE Analyzer fails due to duplicated runnable 
functions

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Rte Analyzer aborts with error message:
ERROR: Linking globals named 'Dem_GetDTCOfEvent': symbol multiply defined!
or:
ERROR: Linking globals named 'WdgM_CheckpointReached': symbol multiply defined!
When does this happen:
-------------------------------------------------------------------
The error is issued by RTE Analyzer during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple service components with different names 
and
the same runnable entity symbol.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Remove the implementation of the regarded service component runnable from all but one 
RteAnalyzer stubs.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
229


Issue Report
ESCAN00095730
COM02300: Proposed ComBitSize may exceed 
allowed range for UINT8_N and UINT8_DYN signals

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
13.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
COM02300 proposes a ComBitSize for UINT8_N /DYN signals that matches the ComSignalLength. 
However, the proposed ComBitSize may exceed the max. allowed length (64 Bits).
When does this happen:
-------------------------------------------------------------------
- Live validation warning is issued and preferred solving action is proposed
In which configuration does this happen:
-------------------------------------------------------------------
- ComSignalType of ComSignal or ComGroupSignal is set to UINT8_N or UINT8_DYN
- ComSignalLength > 8 Bytes
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Delete ComBitSize Parameter for Array Based ComSignals / ComGroupSignals.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
230


Issue Report
ESCAN00095747
Generator error for duplicate runnable symbols not 
triggered

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The linker aborts with an error message that a runnable function is defined multiple times.
No error is reported during generation.
When does this happen:
-------------------------------------------------------------------
The error is issued by RTE Analyzer during compilation of the code, or any linker that works on the 
complete project, in case the configuration is as described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when in a system without applications two runnable entities are configured to have 
the same symbol.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Define unique symbol names for the affected runnables.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
231


Issue Report
ESCAN00095769
Validation Error : ConsistencyRT00002 - COM90008 
- Model access request failure in 
ComSignalTimeoutValidatorAs4

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
13.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Validation error is occurs: 
ConsistencyRT00002 Error at validator runtime (1 message)
 ConsistencyRT00002 Consistency encountered a validationResult with empty CE list[Error] 
COM90008 - Model access request failure 
When does this happen:
-------------------------------------------------------------------
Error may occur while configuring a ComSignal/ ComSignalGroup in following sequence:
1) Create ComSignal/ ComSignalGroup 
2) Refer created ComSignal/ ComSignalGroup from some other module, for example by /
MICROSAR/ComM/ComMConfigSet/ComMPnc/ComMPncComSignal/ComMPncComSignalRef
Issue is only present as long as the created Item has not been referred by a ComIPdu
In which configuration does this happen:
-------------------------------------------------------------------
- Any Configuration
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Complete configuration. A ComSignal/ ComSignalGroup must referred by exactly one ComIPdu. As 
soon as the ComSignal/ ComSignalGroup is referred by a ComIPdu,
the error will disappear. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
232


Issue Report
ESCAN00095785
RTE49999 error message: "Invalid data type 
mapping" for mapped DataType in CalibrationPort 
PortInterfaces

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Configuration tool reports an "ApplicationDataType <DataTypeName> is not mapped to an 
ImplementationDataType" message for a DataType that is mapped.
When does this happen:
-------------------------------------------------------------------
This happen during calculation phase.
In which configuration does this happen:
-------------------------------------------------------------------
This happens for configuration that have connected CalibrationPorts and both ports uses same 
DataTypes but from different DataType Packages in PortInterface.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use the same data types for the calibration SWC and the connected SWCs.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
233


Issue Report
ESCAN00095786
Wrong generated limits for CharacteristicTables in 
Rte.a2l when physical constraints are configured

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Wrong upper and lower limits are generated into Rte.a2l file.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains a characteristic table that references physical data 
constraints
and when the value axis data type specifies a compu method with scaling.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Either configure upper and lower limit for the compu scale or specify internal limits instead of 
physical limits
in the data constraints.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
234


Issue Report
ESCAN00095808
RTE49999 when mode disablings are used in a task 
with schedule tables

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.05.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an error message 
RTE49999 An unexpected error occured. (1 message)
 RTE49999 An unexpected error occured.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains OS applications and
when the configuration contains a basic task with multiple runnables that use different cycle times
and when one of the runnables uses mode disablings.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Map the runnable entity with the mode disabling to a separate tasks or remove the mode disabling
(the mode can be checked inside the runnable).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
235


Issue Report
ESCAN00095840
[Only in case of using a PN-CanTrcv ] 
ConsistencyRT00002 - Error at validator runtime: 
CanTrcvPnConfigurationValidator

Component@Subcomponent:
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
First affected version:
1.02.00
Fixed in versions:
3.03.01
Problem Description:
236


Issue Report
ESCAN00095840
[Only in case of using a PN-CanTrcv ] 
ConsistencyRT00002 - Error at validator runtime: 
CanTrcvPnConfigurationValidator

What happens (symptoms):
-------------------------------------------------------------------
After Import (CFG5 -> File -> Import -> using the "'Import Mode" = "Replace") of a CanTrcv 
configuration the following error occurs within the Validation-view of CFG5:
[Error] ConsistencyRT00002 - Error at validator runtime 
- Consistency encountered a validationResult with empty CE list[Error] CANTRCV90008 - Model 
access request failure 
- The element was already removed. ElementInfo: MDFObject already removed. /ActiveEcuC/
CanTrcv/CanTrcvConfigSet/CanTrcvChannel DefinitionRef: /MICROSAR/CanTrcv_Tja1145/CanTrcv/
CanTrcvConfigSet/CanTrcvChannel.
This is not a configuration problem but an internal implementation error. Please contact Vector for 
support.
Validator-Class: 
com.vector.cfg.gen.DrvTrans__baseCanxAsr.validation.CanTrcvPnConfigurationValidator Validator-
Description:Validates the configuration for selective wakeup
Further runtime errors of this validator won't be reported in the UI.
We are sorry, but due to this internal error, code generation of /MICROSAR/CanTrcv_Tja1145/
CanTrcv has to be blocked. As a workaround, you may try to restart DaVinci Configurator. 
Otherwise, please call Vector for support.
 -------------------- 
 Erroneous CEs:
 [DefinitionRef: /MICROSAR/CanTrcv_Tja1145/CanTrcv]
 -------------------- 
 CEs:
 [DefinitionRef: /MICROSAR/CanTrcv_Tja1145/CanTrcv]
 -------------------- 
 AutoSolvingAction: <none>
 PreferredSolvingAction: <none>
 SolvingActions: <none>
 -------------------- 
 --------------------
 Variants: [General][UnfilteredInvariantProjectModelView] 
When does this happen:
-------------------------------------------------------------------
After Import (CFG5 -> File -> Import -> using the "'Import Mode" = "Replace") of a CanTrcv 
configuration
In which configuration does this happen:
-------------------------------------------------------------------
If a PN (== Partial Networking) CanTrcv is used e.g. Tja1145, E52013, Tle9255
AND
the "'Import Mode" = "Replace" is used
OR
a "CanTrcvChannel" is just deleted
 
Resolution Description:
237


Issue Report
ESCAN00095840
[Only in case of using a PN-CanTrcv ] 
ConsistencyRT00002 - Error at validator runtime: 
CanTrcvPnConfigurationValidator

Workaround:
-------------------------------------------------------------------
This issue is not critical, please close the whole configuration including the CFG5 and open your 
configuration once again.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00095854
Configuration tool reports Rte90005 
java.lang.NullPointerException during validation 
phase

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.14.00
Fixed in versions:
4.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Configuration tool reports Rte90005 java.lang.NullPointerException.
When does this happen:
-------------------------------------------------------------------
This happens during validation phase.
In which configuration does this happen:
-------------------------------------------------------------------
This happens for configuration with incomplete data prototype mappings that are defined but not 
used any more.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Complete all data prototype mappings, even if they are not used.
OR
Delete all unused incomplete data prototype mappings in configuration.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
238


Issue Report
ESCAN00095891
Auto-Configuration - SDLC: Wizard leads to 
validation errors in case of unconfigured channels

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
8.01.02
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Cfg5 shows the following error:
AR-ECUC02008 Mandatory parameter ComMUserChannel is missing in 
SDLC_BswM_Backbone_<CHANNELNAME>.
 ComMUserChannel
 /ActiveEcuC/ComM/ComMConfigSet/DIAG_1_CAN/SDLC_BswM_Backbone_<CHANNELNAME>
When does this happen:
-------------------------------------------------------------------
After execution of the configuration wizard of the 'Auto Configuration: Smart DLC'.
In which configuration does this happen:
-------------------------------------------------------------------
Only if not all channels are selected in the BswM configuration wizard of the 'Auto Configuration: 
Smart DLC'.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Remove the not needed container SDLC_BswM_Backbone_<CHANNELNAME> from the channel 
which causes this error.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
239


Issue Report
ESCAN00095900
RTE Analyzer reports false out of bounds access
Component@Subcomponent:
GenTool_IRAnalyzer@Application
First affected version:
0.07.00
Fixed in versions:
1.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Analyzer reports Found 1 findings of category: 12002 Potential out of bounds write
although the access is not out of bounds.
When does this happen:
-------------------------------------------------------------------
During analysis.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the generated code contains memcpy accesses that copy to byte arrays that 
are elements
of other data structures and when the byte array is not the last element in the data structure.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
240


Issue Report
ESCAN00095937
RTE49999 when a curve use a value data type with 
texttable compu method

Component@Subcomponent:
Rte_Asr4@Generator
First affected version:
4.11.00
Fixed in versions:
4.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Generation aborts with an "RTE49999 Object reference not set to an instance of an object" 
error message.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains curves for which the value axis data type contains a 
texttable compu method.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure a linear compu method.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
241


Issue Report
ESCAN00095940
Missing check for UINT8_DYN signals when creating 
the Gw-Routing Key

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
12.00.00
Fixed in versions:
13.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In signal based gateway configuration, a compilation error may occur, if dynamic length signals/ 
group signals are used.
Further, memory (RAM) is wasted, as memory is reserved for UINT8_DYN signals/groupSignals in 
purpose of gateway routing, although routing of dynamic length signals / group signals is not 
supported.
When does this happen:
-------------------------------------------------------------------
At compile time, a compilation error will occur in below mentioned case.
At run time, waste of RAM.
In which configuration does this happen:
-------------------------------------------------------------------
Compilation error: 
In all configurations which contain gateway mappings and no signals or groupSignals with appl 
type:
ComSignalType = UINT8_N
and at least one signal or groupSignal has an appl type configured to:
ComSignalType = UINT8_DYN
Waste of RAM:
In all configurations which contain gateway mappings and dynamic length signals/ group signals.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
242


Issue Report
ESCAN00095942
Undefined a2l data type in record layout
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.11.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The record layout in Rte.a2l file looks like:
 /begin RECORD_LAYOUT RTE_RL_<name>
 FNC_VALUES 1 UNDEFINED ROW_DIR DIRECT
 STATIC_RECORD_LAYOUT
 /end RECORD_LAYOUT
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains curves mapped to array data types with native 
delcaration and when the
native declaration of base type is not: uint8, uint16, uint32, uint64, sint8, sint16, sint32, sint64, 
float32, float64 float80, boolean or string.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the native declaration to a platform type.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
243


Issue Report
ESCAN00095944
Missing compu method in A2L
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.11.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A characteristic object references a compu method that does not exist
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a map or curve is configured and no compu method is configured on 
application data type level but on implementation data type level.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually define the missing compu method in the A2L that includes Rte.a2l.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00096004
Compiler error: NON RTE USE CASE - Redeclared 
typedef Csm_ReturnType

Component@Subcomponent:
SysService_AsrCsm@Implementation
First affected version:
2.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning/error may occur due to duplicated definition of Csm_ReturnType , e.g.:
Redeclared typedef Csm_ReturnType
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
In configuration without RTE.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Define the macro Rte_TypeDef_Csm_ReturnType as well as the type definition within a global 
header. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
244


Issue Report
ESCAN00096021
[Error] ConsistencyRT00002 - Error at validator 
runtime: CanIfTxBufferSupportValidator

Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
3.04.00
Fixed in versions:
4.06.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After loading of configuration the following error occurs within the "Validation" view:
[Error] ConsistencyRT00002 - Error at validator runtime 
- Consistency: an exception was caught while executing onModelEvent() of a validator. 
Configuration inconsistencies couldn't be reported by this 
validator.ModelView:InvariantValuesModelView
This is not a configuration problem but an internal implementation error. Please contact Vector for 
support.
Validator-Class: 
com.vector.cfg.gen.If_AsrIfCan.validation.TxValidators.TxBufferValidators.CanIfTxBufferSupportValidator 
Validator-Description:Setting control of features: "CanIfPublicTxBuffering, 
"CanIfMultipleBasicCANTxObjects" and "CanIfCtrlDrvTxCancellation".
Further runtime errors of this validator won't be reported in the UI.
Ex: com.vector.cfg.model.exceptions.InvisibleVariantObjectFeatureException: Cannot read 
invisible feature: Source: /ActiveEcuC/CanIf/CanIfCtrlDrvCfg/DUT_CH0{Variant0} (DefRef: /
MICROSAR/CanIf/CanIfCtrlDrvCfg/CanIfCtrlCfg) View: InvariantValuesModelView Feature: parent
We are sorry, but due to this internal error, code generation of /MICROSAR/CanIf/
CanIfCtrlDrvCfg, /MICROSAR/CanIf/CanIfInitCfg/CanIfBufferCfg, /MICROSAR/CanIf/
CanIfPrivateCfg, /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduBufferRef, /MICROSAR/
CanIf/CanIfInitCfg/CanIfBufferCfg/CanIfBufferHthRef, /[ANY]/Can/CanConfigSet/
CanHardwareObject/CanHandleType, /MICROSAR/CanIf/CanIfPublicCfg/CanIfPublicTxBuffering, /
MICROSAR/CanIf/CanIfPrivateCfg/CanIfMultipleBasicCANTxObjects, /MICROSAR/CanIf, /
MICROSAR/CanIf/CanIfPublicCfg, /MICROSAR/CanIf/CanIfCtrlDrvCfg/CanIfCtrlDrvTxCancellation, /
MICROSAR/CanIf/CanIfInitCfg/CanIfInitHohCfg/CanIfHthCfg, /[ANY]/Can/CanConfigSet/
CanHardwareObject, /MICROSAR/CanIf/CanIfCtrlDrvCfg/CanIfCtrlCfg, /MICROSAR/CanIf/
CanIfInitCfg/CanIfTxPduCfg, /MICROSAR/CanIf/CanIfInitCfg/CanIfBufferCfg/
CanIfTxBufferHandlingType, /MICROSAR/CanIf/CanIfInitCfg/CanIfInitHohCfg/CanIfHthCfg/
CanIfHthCanCtrlIdRef, /MICROSAR/CanIf/CanIfInitCfg/CanIfInitHohCfg/CanIfHthCfg/
CanIfHthIdSymRef has to be blocked. As a workaround, you may try to restart DaVinci 
Configurator. Otherwise, please call Vector for support
-> BUT: This error occurs also after restart of Configurator 5.
When does this happen:
-------------------------------------------------------------------
After loading of configuration
In which configuration does this happen:
-------------------------------------------------------------------
--> Please note: If you don't get such error message then your configuration is not affected by 
this issue at all and you may ignore this issue.
In case of a configuration with multiple (> 1) variants [identities] especially in CAN-cluster: 
CanDrv, CanIf... etc.
-> Please note: In such case "Postbuild-Selectable Support" is enabled!
 
Resolution Description:
245


Issue Report
ESCAN00096021
[Error] ConsistencyRT00002 - Error at validator 
runtime: CanIfTxBufferSupportValidator

Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00096024
Incorrect parameter in API Dem_PostRunRequested
Component@Subcomponent:
Diag_Asr4Dem@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
7.05.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In description of API Dem_PostRunRequested() input parameter 'IsRequested' is not marked as 
pointer.
When does this happen:
-------------------------------------------------------------------
always
In which configuration does this happen:
-------------------------------------------------------------------
all configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
246


Issue Report
ESCAN00096026
RteAnalyzer reports incompatible pointer type 
passing for inter-runnable variables with multi-
dimensional arrays

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.14.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Analysis with RTE Analyzer fails because the RTE is unable to generate stubs that contain the 
correct variable for inter-runnable variable name with multi-dimensional arrays.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during the compilation of the code in case the configuration 
is as described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains inter-runnable variables with multi-dimensional 
arrays.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Edit the analyzer stub source file so that it passes a pointer to the array base type.
Eg: 
TSC_SUM_SSC_Rte_IrvRead_SUM_SSC_Rx_QueueProcess_Runnable_SUM_SSC_RxQueue_CounterSynch(SUM_SSC_Rx_QueueProcess_Runnable_SUM_SSC_RxQueue_CounterSynch);
This should become:
TSC_SUM_SSC_Rte_IrvRead_SUM_SSC_Rx_QueueProcess_Runnable_SUM_SSC_RxQueue_CounterSynch(SUM_SSC_Rx_QueueProcess_Runnable_SUM_SSC_RxQueue_CounterSynch[0]);
Fix this for both inter-runnable variables read and write. 
Please note that needs to be done before every analysis with RTE Analyzer as the file gets 
overwritten when the RTE is generated again.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
247


Issue Report
ESCAN00096061
Auto-Configuration - SDLC: Support of CAN FD PDUs 
is not working

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
10.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The SDLC configuration wizard does not provide the possibility to configure routing paths which 
contain CAN FD PDUs.
When does this happen:
-------------------------------------------------------------------
Always during configuration.
In which configuration does this happen:
-------------------------------------------------------------------
In CAN FD configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
248


Issue Report
ESCAN00096126
Com_Init may lead to long interrupt locks
Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
10.00.00
Fixed in versions:
13.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Depending on the amount of configured ComIPdus and ComSignals/ ComGroupSignals calling 
Com_Init may lead to a long duration where the interrupts are locked.
This can lead to some inconsistencies for the Os. However, this issue depends on the used OS and 
the way how Exclusive Areas are locked.
When does this happen:
-------------------------------------------------------------------
At runtime, when Com_Init() is called.
In which configuration does this happen:
-------------------------------------------------------------------
Large amount of ComIPdus and ComSignals/ ComGroupSignals are configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually implement the critical sections belonging to 
SchM_Enter_Com_COM_EXCLUSIVE_AREA_RX, SchM_Enter_Com_COM_EXCLUSIVE_AREA_TX in 
dependency to the initialization state of the Com.
If Com is not initialized, the critical section shall do nothing, otherwise the critical section should 
operate in normal fashion. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
249


Issue Report
ESCAN00096128
Generator Exception in case the PduRSrcPdu global 
Pdu is referenced by more than one other container

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
11.01.00
Fixed in versions:
12.00.00, 11.01.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A java exception occurs while generating the PduR:
PDUR90005 Exception in PduR generator during Validation encountered: 
java.lang.IllegalArgumentException: Handle ID of the src module is not unique 
(=java.util.stream.ReferencePipeline$Head@67fe09f1)! 
 /ActiveEcuC/PduR
When does this happen:
-------------------------------------------------------------------
If you generate the PduR code.
In which configuration does this happen:
-------------------------------------------------------------------
The exception occurs if the global Pdu of a PduRSrcPdu (PduRSrcPduRef) is referenced by more 
than one other module/container. 
E.g. if two different SoAdSocketRoutes reference this global Pdu.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
Beware that there is still an exception implemented for PduRDestPdu global Pdu references which 
are referenced by more than one other container. This is a wrong configuration and not supported.
250


Issue Report
ESCAN00096129
MEMMAP_SW_MINOR_VERSION / 
MEM_SW_MINOR_VERSION is not correct

Component@Subcomponent:
CommonAsr__Common@Impl__MemMap
First affected version:
1.10.00
Fixed in versions:
1.11.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The defines: MEMMAP_SW_MINOR_VERSION / MEM_SW_MINOR_VERSION [see file: MemMap.h] 
have an incorrect value "9" but the value must be "10".
When does this happen:
-------------------------------------------------------------------
- Always in case of taking a look on version
In which configuration does this happen:
-------------------------------------------------------------------
- In all configurations, is independent of configuration
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Please see the history for correct version.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
251


Issue Report
ESCAN00096177
RTE49999 when no trigger is assigned to a server 
operation

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator prints a RTE49999 error message.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains client-server calls and when the
server provides no trigger and server runnable for the server operation.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure a trigger and a server runnable.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00096187
RTE49999 when the base type on network 
representation has no size

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.15.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator reports a RTE49999 error message.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the network representation references no base type.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure a valid base type and size on the network representation.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
252


Issue Report
ESCAN00096299
During generation of code the error occurs: 
"CANTRCV01009 No valid wakeup source specified."

Component@Subcomponent:
DrvTrans__baseCanxAsr@GenTool_GeneratorMsr
First affected version:
2.01.00
Fixed in versions:
3.00.02, 3.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During generation of configuration the following error occurs:
CANTRCV01009 No valid wakeup source specified. (1 message)
 CANTRCV01009 Invalid wakeupsource configured for 'CanTrcvWakeupSourceRef' on Channel 
'CanTrcvChannel_CAN02'
 /ActiveEcuC/CanTrcv/CanTrcvConfigSet/CanTrcvChannel_CAN02[CanTrcvWakeupSourceRef]
{CV_2}
When does this happen:
-------------------------------------------------------------------
 (1) Always and immediately -> during generation of code
In which configuration does this happen:
-------------------------------------------------------------------
- Multiple CAN transceiver channels are configured [Container: CanTrcvChannel]
AND
- At least within one CAN transceiver channel the parameter "CanTrcvWakeupByBusUsed" is 
enabled
AND
- but there is at least one CAN transceiver channel with disabled parameter 
"CanTrcvWakeupByBusUsed" and there is no wakeup source configured for this channel 
[parameter: CanTrcvWakeupSourceRef]
 -> In such case for each such CAN transceiver the generation error [see above] occurs
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Please create a dummy wakeup source and reference it via the parameter: 
"CanTrcvWakeupSourceRef".
-> Afterwards please generate once again
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
253


Issue Report
ESCAN00096311
Validation message "CANIF30001 At least one 
BasicCAN Tx-PDU is configured. Hence it is 
recommended to enable the Tx-buffer..." leads to 
invalid configuration

Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
4.06.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following validation message leads to invalid configuration:
CANIF30001 Activation of feature is recommended. (1 message)
 CANIF30001 At least one BasicCAN Tx-PDU is configured. Hence it is recommended to enable the 
Tx-buffer, in order to avoid re-trying of Tx-requests by CAN upper layers.
 Enable the Tx-buffer: Enable parameter "CanIfPublicTxBuffering".
 /ActiveEcuC/Can/CanConfigSet/ABS_CHHS_4dfd5980_Tx_Std[CanHandleType]
 /ActiveEcuC/CanIf/CanIfPublicCfg[CanIfPublicTxBuffering]
especially in case of implementation variant: VARIANT-PRE-COMPILE a 
CANIF90005 Generator (MICROSAR Can Interface Generator) failure, because of an exception (1 
message)
 CANIF90005 Exception in CanIf generator during Validation encountered: 
java.util.NoSuchElementException 
 /ActiveEcuC/CanIf
occurs in case of no Tx-PDU is mapped to configured Tx-BasicCAN-HW-Objects [A "Tx-BasicCAN-
HW-Object" is from the configuration point of view: a "CanHardwareObject"-object of type 
"CanObjectType == TRANSMIT" and "CanHandleType == BASIC"]
When does this happen:
-------------------------------------------------------------------
- During the configuration using the Configurator 5 / generation of code
In which configuration does this happen:
-------------------------------------------------------------------
In case of in your configuration no Tx-PDUs are mapped to the Tx-BasicCAN-HW-Objects [see 
above]. In such case you get in addition the following validation message [e.g.]:
CANIF20004 Unused CAN hardware Tx-object is configured. (1 message)
 CANIF20004 No Tx-PDUs are mapped to object: "CanIfBufferCfg_Tx_Std_ad992627". Hence the 
configured Tx-hardware object(s): "CanIfBufferCfg_Tx_Std_ad992627", 
"ABS_CHHS_4dfd5980_Tx_Std", "ABS_CHHS_4dfd5980_Tx_Std" are NOT needed and you may 
remove them from configuration in order to reduce RAM and ROM consumption!
 Delete the unneeded Tx-hardware object(s).
 /ActiveEcuC/Can/CanConfigSet/ABS_CHHS_4dfd5980_Tx_Std
 /ActiveEcuC/CanIf/CanIfInitCfg/CanIfBufferCfg_Tx_Std_ad992627
 /ActiveEcuC/CanIf/CanIfInitCfg/CanIfInitHohCfg/ABS_CHHS_4dfd5980_Tx_Std
 
Resolution Description:
254


Issue Report
ESCAN00096311
Validation message "CANIF30001 At least one 
BasicCAN Tx-PDU is configured. Hence it is 
recommended to enable the Tx-buffer..." leads to 
invalid configuration

Workaround:
-------------------------------------------------------------------
As already mentioned on "Main" page: In such case you get in addition the following validation 
message [e.g.]:
CANIF20004 Unused CAN hardware Tx-object is configured. (1 message)
 CANIF20004 No Tx-PDUs are mapped to object: "CanIfBufferCfg_Tx_Std_ad992627". Hence the 
configured Tx-hardware object(s): "CanIfBufferCfg_Tx_Std_ad992627", 
"ABS_CHHS_4dfd5980_Tx_Std", "ABS_CHHS_4dfd5980_Tx_Std" are NOT needed and you may 
remove them from configuration in order to reduce RAM and ROM consumption!
 Delete the unneeded Tx-hardware object(s).
 /ActiveEcuC/Can/CanConfigSet/ABS_CHHS_4dfd5980_Tx_Std
 /ActiveEcuC/CanIf/CanIfInitCfg/CanIfBufferCfg_Tx_Std_ad992627
 /ActiveEcuC/CanIf/CanIfInitCfg/CanIfInitHohCfg/ABS_CHHS_4dfd5980_Tx_Std
Hence you have multiple workaround options:
either
- Please execute the solving action of validation message mentioned above [CANIF20004 delete 
the obsolete objects] and do not enable the parameter "CanIfPublicTxBuffering" [see above]]
or
- Map at least one Tx-PDU to the Tx-BasicCAN-HW-Object
or 
- Ignore the validation message to enable the parameter "CanIfPublicTxBuffering", set this 
parameter to "false" and set this parameter to "user defined".
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
255


Issue Report
ESCAN00096335
Compiler error: Unknown identifier 
Dcm_DemApiNrcMapSelectDTC

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.05.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During Dcm.c compilation an error of kind: unknown identifier Dcm_DemApiNrcMapSelectDTC 
occurs.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- DCM is configured to interact with a DEM API 4.3.0 (in Dcm_Cfg.h: #define 
DCM_DEM_API_430_ENABLED == STD_ON)
AND
 - DCM does internally support service 0x19
 AND
 - None of the following sub-functions of SID 0x19 is supported (at all or in DCM): 0x01, 0x02, 
0x03, 0x07, 0x08, 0x0A, 0x0F, 0x11, 0x12, 0x13, 0x14, 0x15, 0x17, 0x42;
 OR
 - DCM does not support (internally) OBD services 0x03, 0x07 and 0x0A.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
A configuration without sub-functions 0x02 (ReportDTCByStatusMask) or 0x0A 
(ReportAllSupportedDTCs) is highly unusual. Please check whether the configuration of SID 0x19 
is complete and add missing sub-functions.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
256


Issue Report
ESCAN00096391
Compiler error: function 
"CanHL_WakeupProcessed" / 
"CanHL_SleepProcessed" was referenced but not 
defined

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
5.02.00
Fixed in versions:
5.07.01, 5.04.05, 5.03.05, 5.05.06, 5.06.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error: 
function "CanHL_WakeupProcessed" / "CanHL_SleepProcessed" was referenced but not defined
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Wakeup over CAN is supported by CAN driver
and
CanWakeupSupport is not active
and
Compiler/Compiler option does not accept Declaration without Definition
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
257


Issue Report
ESCAN00096422
Validation rule inhibits generation in an valid 
(special) use case

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
2.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A validation rule inhibits the generation of the component if the WdgM is intended to be used on a 
core with an ID (WdgMModeCoreAssignment) which is greater or equal as the value for the 
maximum number of cores configured in the OS (OsNumberOfCores).
This use case can be a valid one if not all cores are used as AUTOSAR cores. Then the number of 
maximum number of cores in OS (OsNumberOfCores) is maybe "1", but 
'WdgMModeCoreAssignment' is configured with a value greater than "0". In this configuration core 
0 is a Non-AUTOSAR core and core 1 is an AUTOSAR core. This is a valid use case and the 
generator shall not inhibit the generation, but shall give a warning to double check this 
configuration if it is really intended.
When does this happen:
-------------------------------------------------------------------
If different cores are used at the controller and at least one core is a Non-AUTOSAR core. 
This ESCAN applies not if the Non-AUTOSAR core is the core with the highest core id.
In which configuration does this happen:
-------------------------------------------------------------------
If parameter "/MICROSAR/WdgM/WdgMConfigSet/WdgMMode/WdgMModeCoreAssignment" is 
greater or equal than "AUTOSAR/Os/OsOS/OsNumberOfCores".
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the parameter "/MICROSAR/WdgM/WdgMConfigSet/WdgMMode/WdgMModeCoreAssignment" 
to user defined.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
258


Issue Report
ESCAN00096516
Compiler error: Wrong generated Rte_IocSend calls 
for queued communication

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.03.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler reports unresolved symbols, like Rte_IocSend_<Identifier>.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens for configurations with queued sender/receiver N:1 communication over partition 
boundaries, when all senders are mapped to the same OsApplication an "Enforce IOC" (Microsar 
Parameter) is not set.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add an addition sender which is mapped to another OsApplication than the other senders.
OR 
Use a PR-Port instead of a R-Port on receiving side.
OR 
Activate "Enforce IOC" parameter.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
259


Issue Report
ESCAN00096521
Compile error on Unix systems due to upper case in 
include file

Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
2.04.00
Fixed in versions:
2.09.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In "actEd25519.h", this include is used
#include "actIED25519.h"
But the header has the file name "actIEd25519.h"
This causes a compile error on system with case sensitive file names.
When does this happen:
-------------------------------------------------------------------
compile time
In which configuration does this happen:
-------------------------------------------------------------------
compilation is done on a system with case sensitive file names
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
create a header file "actIED25519.h" with this content
#include "actIEd25519.h"
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
260


Issue Report
ESCAN00096532
Compiler error: undeclared identifier 
"WDGM_GLOBAL_STATUS_xxx"

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.01.00
Fixed in versions:
2.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler issues an error during compilation of WdgM.c: undeclared identifier 
"WDGM_GLOBAL_STATUS_xxx" where xxx can be "STOPPED", "OK", "FAILED" or "DEACTIVATED".
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- If WdgM is configured for single core usage
- The application referenced in "WdgMGlobalMemoryAppTaskRef" is not referenced at a 
WdgMAppTaskRef parameter of a supervised entity.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create an additional supervised entity which references the same OS application as 
"WdgMGlobalMemoryAppTaskRef". Create a WdgMLocalStatusParams for this new supervised 
entity and set "WdgMSupervisedEntityInitialMode" to "WDGM_LOCAL_STATUS_DEACTIVATED"
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
261


Issue Report
ESCAN00096559
Wrong signal type for data conversion
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.12.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The COM module reports that the signal data type is invalid.
When does this happen:
-------------------------------------------------------------------
After the RTE generator run in the calculation phase.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when data conversion for COM signals is configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the signal type parameter to user defined and select the value that is expected by COM.
In case the RTE generator selected SINT24 or UINT24 create type reference data types in the 
configuration
uint24 => uint32 
sint24 => sint32
and select SINT32 or UINT32 in the COM configuration.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
262


Issue Report
ESCAN00096581
PduRTxBuffer references are incorrectly validated 
for transport protocol 1:N/N:1 routing paths with 
API forwarding PduRDestPdu

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
11.01.00
Fixed in versions:
13.00.00, 12.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A validation error PDUR10501 is shown incorrectly for PduRDestPdus which are API Forwardings.:
PDUR10501 All PduRDestTxBufferRefs of gateway PduRDestPdus have to reference the same 
PduRTxBuffers for a 1:N/N:1 transport protocol routing path.
When does this happen:
-------------------------------------------------------------------
The error message is always shown for PduRDestPdus mentioned below. The message is shown 
during live validation in the DaVinci Configurator 5.
In which configuration does this happen:
-------------------------------------------------------------------
The incorrect validation message is shown for either:
- 1:N transport protocol routings with a PduRDestPdu which is a API Forwarding
- N:1 transport protocol routings with a PduRDestPdu which is a API Forwarding
The message is only shown if the API Forwarding does not reference the same PduRTxBuffers like 
the Gateway PduRDestPdus (which is the correct configuration).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the same PduRTxBuffers for the API Forwarding PduRDestPdu as for the Gateway 
PduRDestPdus. 
Another validation error 'PDUR11500 The PduRDestTxBufferRef 
PduRDestTxBufferRef(value=XXXXX) must only be configured for gateway routing paths.' is 
shown. Set the PduRDestTxBufferRef parameter for the API Forwarding PduRDestPdu to user 
defined. The error will be reduced to a warning. It does not affect the generation of the PduR.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
263


Issue Report
ESCAN00096582
Non-interactive Mode fails
Component@Subcomponent:
_3rdParty_McalIntegration_Helper@VectorIntegration
First affected version:
2.02.01
Fixed in versions:
2.02.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The non-interactive mode doesn't work: Running the batch file Script_MCAL_Prepare.bat (starts 
the 3rdParty MCAL Integration Helper tool) with the parameter --auto (providing a derivative) it is 
expected to finish the tool without user action. Instead a GUI window opens expecting a user 
action / dialog.
When does this happen:
-------------------------------------------------------------------
Starting the 3rdParty MCAL Integration Helper tool via Script_MCAL_Prepare.bat.
In which configuration does this happen:
-------------------------------------------------------------------
Any.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
ESCAN00096594
C Standard Library is used
Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
limits.h from C Standard Library is used
(in actPlatformTypes.h)
When does this happen:
-------------------------------------------------------------------
always
In which configuration does this happen:
-------------------------------------------------------------------
always
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
264


Issue Report
ESCAN00096615
RTE Analyzer fails due to duplicated runnable 
functions

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Rte Analyzer aborts with error message:
ERROR: Linking globals named 'Dem_GetEventUdsStatus': symbol multiply defined!
When does this happen:
-------------------------------------------------------------------
The error is issued by RTE Analyzer during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple service components with different names 
and
the same runnable entity symbol.
Moreover one service component needs to contain different runnables with the same symbol.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Remove the implementation of the regarded service component runnable from all but one 
RteAnalyzer stubs.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
265


Issue Report
ESCAN00096629
Linker error: unresolved symbol error for not 
existing callout function referenced in Det_Cfg.o in 
case of disabled DET

Component@Subcomponent:
SysService_AsrDet@GenTool_GeneratorMsr
First affected version:
10.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
If the DET is disabled and a callout funtion is configured which does not exist an unresolved 
symbol error is thrown by the linker.
When does this happen:
-------------------------------------------------------------------
The error is issued by the linker during linking of the code in case the configuration is as described 
below.
In which configuration does this happen:
-------------------------------------------------------------------
The issue occurs if all of the following conditions apply:
1) The DET is disabled by setting DetEnableDet = false
AND
2) One or more callout functions are configured, e.g. DetErrorHook, DetReportRuntimeErrorCallout 
or DetReportTransientFaultCallout
AND
3) At least one of the configured callout functions does not exist
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The following workarounds are possible: 
1) In order to disable the DET remove it from the configuration.
2) Don't link Det_Cfg.o in case DET is disabled in your configuration.
3) Provide the configured callout functions also for a disabled DET.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
266


Issue Report
ESCAN00096748
Nonexistent "TimerSTMin" struct member in a2l file
Component@Subcomponent:
Tp_Asr4TpCan@GenTool_GeneratorMsr
First affected version:
3.01.00
Fixed in versions:
4.01.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In the generated a2l file, the following symbol name can be found:
CanTp_TxState[0].TimerSTMin
When performing an update using the generated a2l file, a warning is issued stating that the 
symbol address couldn't be updated.
The CanTp continues to work properly. Only the debugging information related to the STmin is not 
available.
When does this happen:
-------------------------------------------------------------------
Always and immediately.
In which configuration does this happen:
-------------------------------------------------------------------
This happens only in configurations where the version 2.01.01 or higher of the CanTp 
implementation is used. (The implementation version can be found in the CanTp.h file)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually edit the generated a2l file and change all occurrences of "TimerSTMin" to "STminTimer".
Resolution:
-------------------------------------------------------------------
A resolution is not yet available.
267


Issue Report
ESCAN00096774
Compiler error: Duplicated variable definitions in 
analyzer stubs

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation in RTE Analyzer fails because the analyzer stubs contain multiple variable declarations 
with the same name.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the indirect API is configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
268


Issue Report
ESCAN00096900
Compiler error: identifier EcuM_Get<***> not 
declared

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
8.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler throws one of the following errors:
Compiler error: identifier EcuM_GetValidationTimeoutTable not declared
Compiler error: identifier EcuM_DecValidationTimeoutTable not declared
Compiler error: identifier EcuM_SetValidationTimeoutTable not declared
Compiler error: identifier EcuM_GetReasonOfWakeupSourceList not declared
Compiler error: identifier EcuM_GetChannelOfWakeupSourceList not declared
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
In variant configurations
AND
At least one variant don't use parameter EcuMValidationTimeout | EcuMComMChannelRef | 
EcuMResetReasonRef (Value = 0 or not existent)
AND 
Another variant use parameter EcuMValidationTimeout | EcuMComMChannelRef | 
EcuMResetReasonRef
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ensure that the parameters EcuMValidationTimeout | EcuMComMChannelRef | 
EcuMResetReasonRef are existent in all variants OR are not existent in all variants. But the 
existence for each of them has to be consistent over all variants.
It is sufficient to configure a dummy wakeup source which is not used by the code to ensure this.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
269


Issue Report
ESCAN00096969
Misleading function return code description for API 
Dcm_GetTesterSourceAddress

Component@Subcomponent:
Diag_Asr4Dcm@Doc_TechRef
First affected version:
7.02.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
API Dcm_GetTesterSourceAddress always returns E_OK, even if the TesterSourceAddress has an 
invalid value.
When does this happen:
-------------------------------------------------------------------
At runtime, if invalid function arguments are passed (e.g. invalid DcmRxPduId, NULL pointer for 
the return value etc.)
In which configuration does this happen:
-------------------------------------------------------------------
This happens in all configurations where 
- Dev error detect is disabled with Dcm/DcmConfigSet/DcmGeneral/DcmDevErrorDetect 
(DCM_DEV_ERROR_DETECT == STD_OFF)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Consider the E_NOT_OK return value to be returned only under following condition 
DCM_DEV_ERROR_DETECT == STD_ON.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
270


Issue Report
ESCAN00096982
AssertionError: The 
getMaxUnsignedValueForNumBytes utility allows 
only up to 4 bytes!

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
1.02.00
Fixed in versions:
9.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The DCM generator invokes assertion with message: "The getMaxUnsignedValueForNumBytes 
utility allows only up to 4 bytes!"
When does this happen:
-------------------------------------------------------------------
Each and every time DCM configuration shall be generated.
In which configuration does this happen:
-------------------------------------------------------------------
- One of the following diagnostic services is to be handled within DCM: 0x23 
(ReadMemoryByAddress), 0x2C 0x02 (DynamicallyDefineIdentifier by MemoryAddress) or 0x3D 
(WriteMemoryByAddress) (in Dcm_Cfg.h: DCM_SVC_XX_SUPPORT_ENABLED == STD_ON for any 
XX ={23, 2C, 3D}
AND
- The memory layout shall not be capable of supporting MID (MemoryID) (ECUC parameter: /Dcm/
DcmConfigSet/DcmDsp/DcmDspMemory/DcmDspUseMemoryId == FALSE)
AND
- The user has defined a custom ALFID (AddressAndLengthFormatIDentifier) values, with more 
than four byte address (ECUC parameter: /Dcm/DcmConfigSet/DcmDsp/DcmDspMemory/
DcmDspMemoryAddressAndLengthFormatIdentifier/
DcmDspMemorySupportedAddressAndLengthFormatIdentifier has any values of the kind: 0x25, 
0x45 or any 0xX5). 
Note: The affected configuration is invalid and shall be rejected by a validation followed by a 
meaningful explanation.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Since the affected configuration is invalid i.e. without MID the maximum address size cannot 
exceed four bytes, either enable MID support or reduce the address size.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
271


Issue Report
ESCAN00097053
Compiler error: Empty struct 
DCM_DIDMGROPTYPEREADCONTEXTTYPE_TAG

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
9.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During Dcm.c compilation with VC compiler following error occurs:
error C2016: C requires that a struct or union has at least one member
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x22 (ReadDataByIdentifier) is active and handled by DCM
AND
- DCM is configured to support DIDs with multiple signals (in Dcm_Cfg.h: #define 
DCM_DIDMGR_MULTISIGNAL_ENABLED == STD_ON)
AND
- None of the multi signal DIDs support read operation (in Dcm_Cfg.h: #define 
DCM_DIDMGR_MSIG_OPTYPE_READ_ENABLED == STD_OFF)
AND 
- None of single signal DIDs does support paged read access (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPCLS_READ_PAGED_ENABLED == STD_OFF)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Split a DID with a read access having a single signal into two data signals.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
272


Issue Report
ESCAN00097056
Compiler error: 'Offset' : is not a member of 
'DCM_DIDMGROPTYPEREADCONTEXTTYPE_TAG'

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
9.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During Dcm.c compilation with VC compiler following error occurs:
error C2039: 'Offset' : is not a member of 'DCM_DIDMGROPTYPEREADCONTEXTTYPE_TAG'
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x22 (ReadDataByIdentifier) is active and handled by DCM
AND
- DCM is configured to support DIDs with multiple signals (in Dcm_Cfg.h: #define 
DCM_DIDMGR_MULTISIGNAL_ENABLED == STD_ON)
AND
- None of the multi signal DIDs support read operation (in Dcm_Cfg.h: #define 
DCM_DIDMGR_MSIG_OPTYPE_READ_ENABLED == STD_OFF)
AND 
- At least one of DIDs does support paged read access (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPCLS_READ_PAGED_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Split a DID with a read access having a single signal into two data signals.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
273


Issue Report
ESCAN00097073
Sub-chapter "ResponseOnEvent Specifics" seems to 
be part of chapter "Handling with DID Ranges"

Component@Subcomponent:
Diag_Asr4Dcm@Doc_TechRef
First affected version:
5.01.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Sub-chapter "ResponseOnEvent Specifics" seems to be part of chapter "Handling with DID 
Ranges". 
Actually there is missing the corresponding parent chapter "DCM AR Version Specific Features" the 
RoE specifics belongs to.
When does this happen:
-------------------------------------------------------------------
Reading the technical reference.
In which configuration does this happen:
-------------------------------------------------------------------
N/A
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Consider this chapter as a stand alone.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
274


Issue Report
ESCAN00097086
Compiler error: Undefined reference to 
`Com_GetTxFilterInitValueArrayBasedFilterInitValueLengthOfTxSigInfo'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
9.00.00
Fixed in versions:
14.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile error occurs in Function Com_TxSignal_EvaluateFilter:
Undefined reference to `Com_GetTxFilterInitValueArrayBasedFilterInitValueLengthOfTxSigInfo'
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This error will occur in configuration, where
- Rx UINT8_N Signal/ Group Signal with a Filter exists (NEVER || 
MASKED_NEW_DIFFERS_MASKED_OLD)
AND
- At least one Tx Signal /Group Signal with (Application Type != UINT8_N) with ( (Filter != 
ALWAYS) or (transferProperty == TRIGGERED_ON_CHANGE || 
TRIGGERED_ON_CHANGE_WITHOUT_REPETITION) ) exists
AND
- all Tx Signal /Group Signals with (Application Type == UINT8_N) are configured without any 
Filter and without any OnChange-TransferProperty
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
275


Issue Report
ESCAN00097087
Null pointer exception when a data element is 
missing

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.08.00
Fixed in versions:
4.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with a null pointer exception when a connection connects two ports with 
incompatible interfaces and when no port interface mapping is configured.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Rename the data element or configure a port interface mapping.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
276


Issue Report
ESCAN00097092
Compiler error: Identifier "sint"<X> is undefined
Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
11.00.00
Fixed in versions:
13.03.02, 14.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error may occur, if the platform (compiler and/or controller) does not support signed 
integer data types {sint8, sint16,sint32, sint64}, i.e. the corresponding data types are not 
available in Platform_Types.h}:
"Identifier "sint"<X> is undefined."
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration in combination with a compiler / compiler option which results in not supporting 
any of the above mention signed types.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
277


Issue Report
ESCAN00097096
Compiler error: incompatible pointer type / loss of 
volatile qualifier in pointer cast

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
5.02.00
Fixed in versions:
6.00.00, 5.07.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
loss of volatile qualifier by using VStdLib API VStdMemCpy().
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
MicroSar4 only: (not relevant for MSR3x)
and
CAN_FD_SUPPORT == CAN_FULL
and
CAN_RX_QUEUE == STD_ON
and
Compiler throw this as error ( some will throw this as warning )
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Deactivate RX_QUEUE
or
(reduce warning/error level of compiler / deactivate this check --> no real problem!)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
278


Issue Report
ESCAN00097143
WdgMLocalStateChangeCbk not created for all 
Supervised Entities

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
2.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After creating a LocalStatusChangeCbk for a Supervised Entity, this one doesn't appear as service 
Port under Service Components - Prot Prototypes.
When does this happen:
-------------------------------------------------------------------
If more than one Supervised Entity is created on the same Core and if they references different 
OsApplications. Only those LocalStatusChangeCbk are added to Service Components which have 
the same OsApplication referenced as referenced from corresponding "WdgMMode/
WdgMGlobalMemoryAppTaskRef".
In which configuration does this happen:
-------------------------------------------------------------------
All configuration with more than one SE on the same Core with different referenced OsApplication 
as referenced from corresponding "WdgMMode/WdgMGlobalMemoryAppTaskRef"
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
279


Issue Report
ESCAN00097148
WdgMGlobalStateChangeCbk / 
WdgMLocalStateChangeCbk function prototype 
generated with incompatible signature compared to 
RTE

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
2.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The WdgMGlobalStateChangeCbk / WdgMLocalStateChangeCbk function prototype gets generated 
by the WdgM generator (in WdgM_PBcfg.h) even if the Service Port is connected and the Server 
Runnable is created and the prototype is already generated by Rte (in Rte_WdgM_<Application 
name referenced from WdgMGlobalMemoryAppTaskRef>.h).
In addition the signature of the prototypes of WdgM does not match the prototypes defined by the 
Swc template. The Rte generates Std_ReturnType as return value, the WdgM void. This is because 
the swc-files contains the erroneous return value (E_NOT_OK) instead of no return value.
When does this happen:
-------------------------------------------------------------------
At compiling time.
In which configuration does this happen:
-------------------------------------------------------------------
When WdgMGlobalStateChangeCbk / WdgMLocalStateChangeCbk is configured and Rte is used 
(WdgMUseRte==true).
 
Resolution Description:
280


Issue Report
ESCAN00097148
WdgMGlobalStateChangeCbk / 
WdgMLocalStateChangeCbk function prototype 
generated with incompatible signature compared to 
RTE

Workaround:
-------------------------------------------------------------------
Follow the description of parameter /MICROSAR/WdgM/WdgMConfigSet/WdgMMode/
WdgMGlobalStateChangeCbk and /MICROSAR/WdgM/WdgMGeneral/WdgMSupervisedEntity/
WdgMLocalStateChangeCbk of BSWMD version 6.01.01.
The following description are in this version:
--------------------------------------
Callback function for notifying Watchdog Manager global status change.
Note:
If WdgMUseRte is configured as true and thus the receiver of the callback is an application above 
the RTE, the the user has to configure this parameter with the name of a C function which shall be 
called by WdgM. Within a separate file where this function is defined the user has to include the 
corresponding Rte application header file and call the Rte function. The Rte function is named 
according the following convention:
Rte_Call_WdgM_<OsApplicationName>_globalStateChangeCbk_Core<CoreAssignment>_GlobalStatusCallback
where OsApplicationName is entry in WdgMGlobalMemoryAppTaskRef
and CoreAssignment is the entry in WdgMModeCoreAssignment.
If WdgMGlobalMemoryAppTaskRef is not configured, the following pattern has to be applied:
Rte_Call_WdgM_globalStateChangeCbk_Core<CoreAssignment>_GlobalStatusCallback
where CoreAssignment is the entry in WdgMModeCoreAssignment.
Only if this naming convention is followed, the API of the RTE can be used within the callback.
--------------------------------------
Callback function for notifying the supervised entity's status change.
Note:
If WdgMUseRte is configured as true and thus the receiver of the callback is an application above 
the RTE, the the user has to configure this parameter with the name of a C function which shall be 
called by WdgM. Within a separate file where this function is defined the user has to include the 
corresponding Rte application header file and call the Rte function. The Rte function is named 
according the following convention:
Rte_Call_WdgM_<OsApplicationName>_localStateChangeCbk_<SupervisedEntityName>_LocalStatusCallback
where OsApplicationName is entry in WdgMGlobalMemoryAppTaskRef of the relating WdgMMode
and SupervisedEntityName is the entry in WdgMSupervisedEntity.
If WdgMAppTaskRef is not configured, the following pattern has to be applied:
Rte_Call_WdgM_localStateChangeCbk_<SupervisedEntityName>_LocalStatusCallback
where SupervisedEntityName is the entry in WdgMSupervisedEntity.
Only if this naming convention is followed, the API of the RTE can be used within the callback.
"
Resolution:
-------------------------------------------------------------------
281


Issue Report
ESCAN00097148
WdgMGlobalStateChangeCbk / 
WdgMLocalStateChangeCbk function prototype 
generated with incompatible signature compared to 
RTE

The described issue is corrected by modification of all affected work-products. 
For this ESCAN a STORYC was created. The implementation takes more time than a BugFix.
ESCAN00097151
Incomplete Mirror Data
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.09.00
Fixed in versions:
2.20.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Not all data bytes are provided to the gateway.
When does this happen:
-------------------------------------------------------------------
At runtime
In which configuration does this happen:
-------------------------------------------------------------------
Only for AutoSar 
AND using the Mirror Mode 
AND using CAN-FD with more than 12 data bytes.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
282


Issue Report
ESCAN00097168
EcuM debug data cannot be found in the map file
Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
1.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During A2L update several symbols of EcuM (that the EcuM generator actually registers through 
the CFG5 McData Service Interface) cannot be found in the map file.
EcuM_ExpiredWakeups
EcuM_PendingCheckWakeups
EcuM_PendingWakeups
When does this happen:
-------------------------------------------------------------------
After compilation when the A2L / calibration workflow is used to generate a complete A2L file with 
addresses of the target.
In which configuration does this happen:
-------------------------------------------------------------------
Whenever generation of Debug Data is enabled in DaVinci Configurator and EcuM is used.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
283


Issue Report
ESCAN00097174
WdgM_UpdateTickCount is declared not as "void" in 
SWC file

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
2.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Rte generates the prototype of function WdgM_UpdateTickCount as following:
 FUNC(Std_ReturnType, WdgM_<ApplicationName>_CODE) WdgM_UpdateTickCount(void);
In fact this function is a void-function has no return value. Therefore this can result in a compiler 
error / warning.
When does this happen:
-------------------------------------------------------------------
This issue happens if the the Rte is used and the timebase is configured as external tick source.
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/WdgM/WdgMGeneral/WdgMUseRte == true
AND
/MICROSAR/WdgM/WdgMGeneral/WdgMTimebaseSource == WDGM_EXTERNAL_TICK
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
284


Issue Report
ESCAN00097203
Compiler error: "conversion of data types, possible 
loss of data" in case of large buffers

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
1.03.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Following compiler errors might be reported:
Error: Dcm.c, line 36235: error C4244: '=' : conversion from 'Dcm_CfgNetBufferSizeMemType' to 
'Dcm_DidMgrDidLengthType', possible loss of data
Error: Dcm.c, line 13586: error C4244: '=' : conversion from 'const 
Dcm_CfgDidMgrOptimizedDidLengthType' to 'uint16', possible loss of data
Error: Dcm.c, line 25946: error C4244: '=' : conversion from 'const 
Dcm_CfgDidMgrOptimizedDidLengthType' to 'Dcm_DidMgrDidLengthType', possible loss of data 
In many cases (dependent on compiler option settings) this might be reported as warning.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- At least one DCM buffer is larger than 65535bytes ( ECUC parameter DcmDslBufferSize > 65535)
AND
 - Service 0x22 (ReadDataByIdentifier) is handled within DCM (in Dcm_Cfg.h #define 
DCM_SVC_22_SUPPORT_ENABLED == STD_ON)
 OR
 - Service 0x2A (ReadDataByPeriodicIdentifier) is handled within DCM (in Dcm_Cfg.h #define 
DCM_SVC_2A_SUPPORT_ENABLED == STD_ON)
 OR
 - Service 0x2C (DynamicallyDefineDataByIdentifier) is handled within DCM (in Dcm_Cfg.h #define 
DCM_SVC_2C_SUPPORT_ENABLED == STD_ON)
 OR
 - Service 0x2F (InputOutputControlByIdentifier) is handled within DCM (in Dcm_Cfg.h #define 
DCM_SVC_2F_SUPPORT_ENABLED == STD_ON)
Note: Such buffer sizes are typically used in case of Bootloader applications.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warning since no DID can have size of more than 16KB, since largest 
DcmDspDidDataPos can accept only up to 8KB and the largest DID signal can have only up to 8KB. 
So the largest DID can be a DID with a signal starting at position 8191 and having 8192 bytes. 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
285


Issue Report
ESCAN00097240
CanIf debug data cannot be found in the map file
Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
3.07.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
During A2L update some symbols of CanIf (that the CanIf generator actually registers through the 
CFG5 McData Service Interface) cannot be found in the map file.
CanIf_CtrlStates.CtrlModeOfCtrlStates
CanIf_CtrlStates.PduModeOfCtrlStates 
When does this happen:
-------------------------------------------------------------------
After compilation when the A2L / calibration workflow is used to generate a complete A2L file with 
addresses of the target.
In which configuration does this happen:
-------------------------------------------------------------------
Whenever generation of Debug Data is enabled in DaVinci Configurator and CanIf is used.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Fix the generated symbols in the A2L file manually before proceeding with the A2L workflow.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
286


Issue Report
ESCAN00097257
Compiler error: error C2065: 
'CanNm_CancelTransmit' : undeclared identifier

Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
1.00.00
Fixed in versions:
7.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following error is issued by the compile:
error C2065: 'CanNm_CancelTransmit' : undeclared identifier
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- /MICROSAR/PduR/PduRBswModules/PduRBswModuleRef is "CanNm"
AND
- /MICROSAR/PduR/PduRBswModules/PduRCancelTransmit is ON
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
- Provide a User Config file with following content:
extern Std_ReturnType CanNm_CancelTransmit(PduIdType TxPduId);
and add it's path to the following parameter in DaVinci Configurator 5
/MICROSAR/CanNm/CanNmGlobalConfig/CanNmUserConfigFile
- Generate CanNm component in DaVinci Configurator 5.
Provide the following code in an application file:
#include "CanNm.h"
Std_ReturnType CanNm_CancelTransmit(PduIdType TxPduId)
{
 return E_OK;
}
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
287


Issue Report
ESCAN00097274
Compiler error: Incompatible Rte_MemCpy 
prototypes

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.13.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because the prototype for Rte_MemCpy or Rte_MemCpy32 is incompatible to the 
prototype in the RTE implementation.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the platform does not define uint16_least and uint32_least to the same types 
and when the configuration contains a component with
sender-receiver communication or inter-runnable variables with arrays.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Typedef uint16_least and uint32_least to the same type.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
288


Issue Report
ESCAN00097291
Compiler error: Use of undeclared identifier 
Rte_Appl_AckFlags

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.02.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because a Rte_Feedback API accesses Rte_Appl_AckFlags that do not exist.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a signal is sent from a different partition than the partition that contains the 
COM and
when transmission acknowledgement is configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
289


Issue Report
ESCAN00097298
Mismatching data type Dem_DTCOriginType
Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
7.02.00
Fixed in versions:
9.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE validation issues the following message:
RTE12025 - Multiple enumeration constants defined with the same name.
 RTE12025 - Enumeration constant <DEM_DTC_ORIGIN_SECONDARY_MEMORY> of data type 
<Dem_DTCOriginType> already defined for data type <Dem_DTCOriginType>. Both are used 
within ComponentType <Name> but have difference values <5> and <4>.
Help:
- ensure uniqueness for all values of enumeration constants in the context of one ComponentType.
When does this happen:
-------------------------------------------------------------------
At RTE generation time.
In which configuration does this happen:
-------------------------------------------------------------------
- DEM Api Version according to ASR 4.3.0 is used (in DCM ECUC: "/Dcm/DcmConfigSet/
DcmGeneral/DcmDemApiVersion" == DCM_DEM_API_4_03_00);
AND
 - Sub-Service 0x1904 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_04_SUPPORT_ENABLED == STD_ON);
 OR
 - Sub-Service 0x1906 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_06_SUPPORT_ENABLED == STD_ON);
 OR
 - Sub-Service 0x1910 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_10_SUPPORT_ENABLED == STD_ON);
 OR
 - Sub-Service 0x1914 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_14_SUPPORT_ENABLED == STD_ON);
 OR
 - Sub-Service 0x1918 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_18_SUPPORT_ENABLED == STD_ON);
 OR
 - Sub-Service 0x1919 is supported (in Dcm_Cfg.h: #define 
DCM_SVC_19_19_SUPPORT_ENABLED == STD_ON);
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
290


Issue Report
ESCAN00097303
Compiler error: Call to job finished runnable misses 
parameters

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.08.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because a task calls a notify job finished runnable without arguments.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when an NvBlock SWC is configured and when the NvM_MainFunction and the job 
finished runnable are mapped to different tasks.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not map the job finished runnable to a task.
It will then be executed in the context of the task that schedules NvM_MainFunction.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
291


Issue Report
ESCAN00097341
Mode Transition Value of Mode Declaration Group 
WdgM_Mode is set to 255

Component@Subcomponent:
SysService_Asr4WdM@GenTool_GeneratorMsr
First affected version:
2.01.00
Fixed in versions:
2.01.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following error is raised by CFG5:
RTE13068 The Mode Transition Value of Mode Declaration Group <WdgM_Mode> is set to <255>.
This value can not be represented by <WdgMMode> data type.
Help:
- Use a value in range of <WdgMMode> data type.
- Map Mode Declaration Group to a sufficient data type.
When does this happen:
-------------------------------------------------------------------
This issue occurs during generation phase of the RTE generator only if Status Reporting 
Mechanism is set to WDGM_USE_MODE_SWITCH_PORTS.
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/WdgM/WdgMGeneral/WdgMStatusReportingMechanism == 
WDGM_USE_MODE_SWITCH_PORTS
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not use Status Reporting Mechanism WDGM_USE_MODE_SWITCH_PORTS.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
292


Issue Report
ESCAN00097355
Auto-Configuration Ecu State Handling: Self run 
request timeout value is not shown correct in case 
of 0

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
11.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The overview page of the Auto-configuration Ecu State handling does not show the correct value 
for the self run request timeout. Instead it shows the default value (0.1).
When does this happen:
-------------------------------------------------------------------
Always if the value is set to 0.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations with Auto-Configuration Ecu State Handling configured
AND 
Value of self run request timeout is set to 0.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
293


Issue Report
ESCAN00097457
Matrix dimensions are swapped for two dimensional 
arrays in A2L file

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A measurement tool displays rows as columns and columns as rows.
When does this happen:
-------------------------------------------------------------------
During measurement and calibration.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains arrays with two dimensions.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
294


Issue Report
ESCAN00097476
RTE01004 error during contract phase generation 
(Could not read back DVCfgRteGen data)

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.12.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation is incorrectly aborted with RTE01004 'Could not read back DVCfgRteGen data' 
error message.
When does this happen:
-------------------------------------------------------------------
During contract phase header generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens for all configuration when 'Contract phase header' is selected as 'Generation Mode' 
inside Cfg5 project settings.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Change Cfg5 project settings so that 'Template file and contract phase header' is selected as 
'Generation Mode'.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
295


Issue Report
ESCAN00097477
Code generation is not possible due to error 
RTE13068 - Insufficient data type to represent 
mode value

Component@Subcomponent:
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
9.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
DaVinci Configurator reports the following error
[Error] RTE13068 - Insufficient data type to represent mode value 
- The Mode Transition Value of Mode Declaration Group <ComMMode> is set to <3>.
This value can not be represented by <ComM_ModeType> data type.
When does this happen:
-------------------------------------------------------------------
The error is issued by the RTE generator during calculation phase.
In which configuration does this happen:
-------------------------------------------------------------------
This issue is reported as a preventive measure. We assume that the issue does not occur.
It was detected in a DaVinci Configurator Service Pack, which is not distributed anymore.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
296


Issue Report
ESCAN00097525
RTE49999 when transformers are not configured for 
all fan-out signals

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an RTE49999 error.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a data element is mapped to multiple signals and
when not all the signals are configured to use transformers.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
297


Issue Report
ESCAN00097531
a2l: In Variant use case only the first variant is 
generated for the bus specific a2l files

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The XCP Generator creates bus specific a2l fragments (e.g. CanXcp_....a2l). Those fragments shall 
be present for each channel and each variant. The current generator only generates the channels 
of the first variant. A2l files for additional variants are not generated.
As a result the a2l fragments for additional variants must be created manually.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When multiple variants are used.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
A2l files for additional variants can be created manually.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
298


Issue Report
ESCAN00097649
Compiler error: Rte_Write writes a variable that 
does not exist

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler states: undeclared identifier
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- LdCom is used with external Signal
- Write from non bsw partition
- Data transformation is disabled
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create another receiver port in the same component as the LdCom sender port and connect it the 
LdCom sender port.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
299


Issue Report
ESCAN00097683
A generated value is not in range of the specified 
datatype

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An error is reported in the configurator with following error message:
COM90500 The value 122040 with comment () is not in the range of the specified datatype 
UINT_16.
When does this happen:
-------------------------------------------------------------------
During generation of COM
In which configuration does this happen:
-------------------------------------------------------------------
In configurations in which any generated table has more than 65535 entries
AND
/PduR/PduRBswModules/PduRTransportProtocol for COM is set to FALSE
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
1) Use LdCom instead of COM for large PDUs
or
2) Enable /ActiveEcuC/PduR/Com[1:PduRTransportProtocol] and configure one Dummy TP PDU
or
3) set /MICROSAR/Com/ComConfig/ComIPdu/ComIPduSignalProcessing to IMMEDIATE for all 
PDUs which are greater than 65535.
Resolution:
-------------------------------------------------------------------
No modification of code as it would cause performance problems and use a lot of RAM, especially 
in Post-Build configurations.
300


Issue Report
ESCAN00097684
Warning RTE49999 when XcpEvent support is 
enabled

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator prints a warning RTE49999 AST property is undefined.
Compilation fails because a task calls the XcpEvent API with the undfined identifier UNDEFINED.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when XcpEvent support is enabled and when a task contain only server runnables as 
executable entities.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Map the server runnables to another task that also contains runnables with different trigger.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
301


Issue Report
ESCAN00097802
Activation reason data type uses bit access
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In the struct Rte_ActivatingEvent_<ComponentTypeName>_Type in Rte.c, an activating event for 
a runnable specifies a bit field length. This leads to a Misra Warning "The behavior of bit fields not 
of type int is undefined". 
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
It happens when all of the following conditions are fulfilled:
- a runnable has an activation reason AND
- the runnable is not triggered by "On Operation Called", "On Mode Entry", "On Mode Exit" or "On 
Transition" AND
- RTE's optimization mode equals MEMORY
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set Rte's optimization mode to RUNTIME.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00097876
Generated data streams toggle with each code 
generation if <MSN>ReduceDataByStreaming is 
enabled

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Generated Code has to be recompiled or added again to the Users CMS because
the order in streamed CONST arrays is not deterministic and changes by chance with each code 
generation.
When does this happen:
-------------------------------------------------------------------
At generation time.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where <MSN>ReduceDataByStreaming returns true.
 
Resolution Description:
302


Issue Report
ESCAN00097910
Dcm_Swc.arxml: Missing values of Mode-
Declarations in Mode-Declaration-Groups

Component@Subcomponent:
Diag_Asr4Dcm@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
7.01.01, 9.04.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE validation issues the following message:
RTE13077 - ModeDeclarationGroup <NameMDG> with explicit order does not specify a value for 
mode <NameMode>.
When does this happen:
-------------------------------------------------------------------
At RTE generation time.
In which configuration does this happen:
-------------------------------------------------------------------
- At least one "/Dcm/DcmConfigSet/DcmProcessingConditions/DcmModeRule" exists;
AND
- This ModeRule has at least one DcmArgumentRef to a "/Dcm/DcmConfigSet/
DcmProcessingConditions/DcmModeCondition";
AND
- This ModeCondition has configured DcmBswModeRef:
 - DcmContextModeDeclarationGroupPrototype is set to a DCM ModeDeclarationGroup prototype;
 AND
 - DcmTargetModeDeclaration is set to a valid ModeDeclaration;
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use a DaVinci Cfg5 version smaller than 5.14.8.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
303


Issue Report
ESCAN00097950
Compiler error: 'CanTp_GetRxSduCfgInd' undefined
Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
3.01.00
Fixed in versions:
3.03.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following errors are reported during compilation:
'CanTp_GetRxSduCfgInd' undefined; assuming extern returning int
'CanTp_GetRxSduCfgIndStartIdxOfRxPduMap' undefined; assuming extern returning int
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
The errors are reported in configurations fulfilling the following conditions:
- Configurations where no Rx N-SDU is present (not a single CanTp/CanTpConfig/CanTpChannel/
CanTpRxNSdu container is present)
AND
- Normal addressing is used (at least one CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/
CanTpTxAddressingFormat is set to CANTP_STANDARD) OR multiple addressing is used (at least 
two CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxAddressingFormat parameters are 
set to different values)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In order to compile, the missing functions could be defined as follows within a user config file 
(CanTp/CanTpGeneral/CanTpUserConfigFile):
#define CanTp_GetRxSduCfgInd(Index) 0
#define CanTp_GetRxSduCfgIndStartIdxOfRxPduMap(Index) 0
NOTE: The macros proposed in the workaround could trigger some warnings during compilation 
(e.g., potential divide by 0 in the function CanTp_RxTransmitFrame). If no Rx SDUs are 
configured, the lines where the warnings are issued won't ever be reached and ignoring those 
warnings would be safe.
Resolution:
-------------------------------------------------------------------
Not yet available.
304


Issue Report
ESCAN00097971
RTE49999: Mismatching constant values
Component@Subcomponent:
Rte_Asr4@Generator
First affected version:
4.07.00
Fixed in versions:
4.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an error message
RTE49999 Mismatching constant values: <cfull> and <celement>
although the elements use the same value.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains sender-receiver communication where a sender only 
receives a subset of the record elements of the sender.
The problem occurs when the receiving component does not have a port access to the receiver 
port.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure port accesses for the receivers.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
305


Issue Report
ESCAN00098057
Generated data streams toggle with each code 
generation if <MSN>ReduceDataByStreaming is 
enabled

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Generated Code has to be recompiled or added again to the Users CMS because
the order in streamed CONST arrays is not deterministic and changes by chance with each code 
generation.
When does this happen:
-------------------------------------------------------------------
At generation time.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where /ComReduceDataByStreaming returns true.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure ComReduceDataByStreaming to false if available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
306


Issue Report
ESCAN00098062
RTE49999: When InitializeImplicitBuffers is 
configured for implicit connections to NvBlock SWCs

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Generator aborts with a RTE49999 error.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when all of the following conditions are true:
- /MICROSAR/Rte/RteGeneration/RteInitializeImplicitBuffers is configured to true
- the access to the data elements is implicit
- the configuration contains a sender-receiver connection to a NvBlock SWC and the NvBlock has 
no RAM block init value
 or
 the nv port is not connected
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Connect all Nv ports with implicit accesses.
Configure RAM block init values for the NvBlocks.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
307


Issue Report
ESCAN00098068
Null pointer exception when a service dependency 
contains an invalid pim reference

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
4.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator aborts with a null pointer exception.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains incomplete service dependencies e.g.
 <ROLE-BASED-DATA-ASSIGNMENT>
 <ROLE>ramBlock</ROLE>
 <USED-DATA-ELEMENT/>
 </ROLE-BASED-DATA-ASSIGNMENT>
instead of
 <ROLE-BASED-DATA-ASSIGNMENT>
 <ROLE>ramBlock</ROLE>
 <USED-DATA-ELEMENT>
 <LOCAL-VARIABLE-REF DEST="VARIABLE-DATA-PROTOTYPE">/path/to/pim</LOCAL-VARIABLE-
REF>
 </USED-DATA-ELEMENT>
 </ROLE-BASED-DATA-ASSIGNMENT>
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure a valid reference.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
308


Issue Report
ESCAN00098104
RTE Analyzer reports false out of bound accesses
Component@Subcomponent:
GenTool_IRAnalyzer@Application
First affected version:
0.09.00
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator reports an out of bound access although all write accesses are within the bounds.
When does this happen:
-------------------------------------------------------------------
This happens during analysis of write accesses with multiple possible pointer targets.
This means write accesses to array elements or write accesses to e.g. function parameters
that get passed different values in different call sites.
This only happens when the write access does not write the entire object.
E.g. when an element in a structure is written.
This only happens when the write access is an assignment, not a memcpy or memset.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in all configurations.
See description above for the code structure of the analyzed code that leads to the ESCAN.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
309


Issue Report
ESCAN00098155
Inconsistencies of Technical Reference regarding 
Dem usage

Component@Subcomponent:
SysService_Asr4WdM@Doc_TechRef
First affected version:
1.02.00
Fixed in versions:
1.02.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The technical reference was updated. In an earlier version of the WdgM the Dem was not directly 
connected to the WdgM. A wrapper was needed to handle the Dem. Now the documentation was 
updated, because there was a description how to implement this wrapper on several passage.
This description confuses the customer and is fixed. 
When does this happen:
-------------------------------------------------------------------
Missing updated documentation after further development of the component.
In which configuration does this happen:
-------------------------------------------------------------------
Always
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
This is only an inconsistency in user documentation and therefore a workaround is not applicable. 
A "textual" workaround is that a wrapper is no more needed for Dem usage.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
310


Issue Report
ESCAN00098167
RTE01081 Model object </MICROSAR/
IoHwAb_swc/ComponentTypes/IoHwAb> of 
command line parameter -m is invalid.

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.00.00
Fixed in versions:
4.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE SWC Template generation in CFG5 aborts with an error message
RTE01081 Model object </MICROSAR/IoHwAb_swc/ComponentTypes/IoHwAb> of command line 
parameter -m is invalid.
When does this happen:
-------------------------------------------------------------------
During SWC template generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in configuration that contain the IoHwAb component.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
311


Issue Report
ESCAN00098187
RTE generator generates wrong compu method in 
case data type names are not unique

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator generates MEASUREMENT, CHARACTERISTIC or axis objects that reference invalid 
COMPU_METHOD objects.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple data types with the same name that 
reference different compu methods.
This is the case when the configuration contains an implementation data type and one or multiple 
application data types with the same name and when
the data types use different compu methods or no compu method at all.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use distinct data type names.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
312


Issue Report
ESCAN00098204
RTE01060: Could not read Rte_Needs.ecuc.arxml 
when exclusive areas with implementation method 
resource are accessed from multiple partitions

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an error message
RTE01060: Could not read Rte_Needs.ecuc.arxml when exclusive areas with implementation 
method resource are accessed from multiple partitions
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains exclusive areas with implementation method 
OS_RESOURCE
and when the exclusive area is accessed from multiple partitions, e.g. when it is accessed from 
unmapped server runnables
that are called from multiple partitions.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
313


Issue Report
ESCAN00098260
Erroneous validation message 
"CanIfMultipleBasicCANTxObjects is not required"

Component@Subcomponent:
If_AsrIfCan@GenTool_GeneratorMsr
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Erroneous validation message CANIF10027 (None CAN-channel has multiple BasicCAN Tx-objects. 
Hence the feature ""CanIfMultipleBasicCANTxObjects" is not required in current configuration and 
must be disabled.) shows up in CFG5 and cannot be solved.
When does this happen:
-------------------------------------------------------------------
During configuration.
In which configuration does this happen:
-------------------------------------------------------------------
Multiple CAN drivers are used
AND
There is at least one CAN channel with != 1 BasicCAN Tx-hardware object ("CanHardwareObject" 
with "CanHandleType" == BASIC and "CanObjectType" == TRANSMIT) for one of the drivers.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the parameter "CanIfMultipleBasicCANTxObjects" to user defined and keep it enabled.
[Error] CANIF10027 is then demoted to a warning that can be ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
314


Issue Report
ESCAN00098424
a2l: OPTIONAL_CMD GET_DAQ_EVENT_INFO 
generated unconditionally.

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The statement "OPTIONAL_CMD GET_DAQ_EVENT_INFO" is generated unconditionally in the file 
Xcp.a2l.
The Configuration Option XcpGetDAQEventInfo has no influence.
As a result the Master Tool tries to use this command event though the Option is inactive and the 
command is therefore not present. This will result in a negative response.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
All configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The generated Xcp.a2l can be modified manually to remove the generated OPTIONAL_CMD.
For CANape this is not required as CANape detects the missing command and removes this line 
automatically from the a2l after the first failed try.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
315


Issue Report
ESCAN00098469
Unused Interrupt enabled
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.09.00
Fixed in versions:
3.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Transmission Cancellation Finished Interrupt Enable (TCFE) is active but not used.
The interrupt is not handled by the driver, therefore, there are no unexpected consequences and 
the ECU will continue to function correctly.
When does this happen:
-------------------------------------------------------------------
At runtime, during initialization. 
In which configuration does this happen:
-------------------------------------------------------------------
TX Interrupt enabled, "CAN_TX_PROCESSING == CAN_INTERRUPT"
OR
Individual polling is configured, "CAN_INDIVIDUAL_PROCESSING == STD_ON"
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
316


Issue Report
ESCAN00098487
PDUR_EXCLUSIVE_AREA_1 is created by tool but 
not used in embedded code

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
2.00.00
Fixed in versions:
12.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
PDUR_EXCLUSIVE_AREA_1 is created by the tool, but never used in the embedded code of the 
PduR.
When does this happen:
-------------------------------------------------------------------
Always.
In which configuration does this happen:
-------------------------------------------------------------------
All configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore PDUR_EXCLUSIVE_AREA_1.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
317


Issue Report
ESCAN00098523
GeneralDiagnosticInfo interface is named 
"GeneralEventInfo" instead of "GeneralEvtInfo"

Component@Subcomponent:
Diag_Asr4Dem@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
13.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The port name of the GeneralDiagnosticInfo interface is named "GeneralEventInfo" instead of 
"GeneralEvtInfo".
This is visible when connecting this DEM provided port with an application port in the RTE, but has 
no implication on the functional operation of the modules.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
Parameter /Dem/DemGeneral/DemGeneralDiagnosticInfoSupport==TRUE enables the 
GeneralDiagnosticInfo Interface
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Connect the port named "GeneralEventInfo" instead of "GeneralEvtInfo" with the related 
application.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
318


Issue Report
ESCAN00098583
Generator Error Message ""XCP90110 Undefined 
DefinitionRef for Parameter." - misleading problem 
indication

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Generator Error Message:
"XCP90110 Undefined DefinitionRef for Parameter. Element def.: /MICROSAR/SoAd/SoAdConfig/
SoAdSocketConnectionGroup/SoAdSocketId Parent: SoAdSocketConnectionGroup_XY"
indicates a problem with the Bswmd Files whereas the solution is to use Socket Connections 
instead of Socket Connection Groups to configure the Xcp Ethernet Pdus in SoAd.
When does this happen:
-------------------------------------------------------------------
Xcp On Ethernet Tx Pdu configured in SoAd with a reference to a Socket Connection Group
In which configuration does this happen:
-------------------------------------------------------------------
Xcp On Ethernet Tx Pdu configured in SoAd with a reference to a Socket Connection Group instead 
of a reference to a socket connection.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Select connection instead of connection group
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
319


Issue Report
ESCAN00098584
NvM NVM01036 validation does not clearly describe 
the problem

Component@Subcomponent:
MemService_AsrNvM@GenTool_GeneratorMsr
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
DaVinci Cfg5 shows the NvM error NVM01036 NVM01036 "NvMCalcRamBlockCrc requires 
configured NvMBlockCrcType, NvMSelectBlockForReadAll, NvMRamBlockDataAddress and disabled" 
for NvMBlockDescriptors derived from NvBlockNeeds. Resolving the problem via provided solving 
action leads to other validation errors in e.g. RTE.
Since the NvMBlockDescriptor is derived from NvBlockNeeds, the error cannot be fixed within the 
DaVinci Cfg5.
When does this happen:
-------------------------------------------------------------------
NvMBlockDescriptor derived from NvBlockNeeds. For other blocks the error shall be clear and 
resolvable within the Cfg5.
In which configuration does this happen:
-------------------------------------------------------------------
NvBlockNeeds with calcRamBlockCrc true, reliability != NO and enabled explicit synchronization 
leads to NvMBlockDescriptor with NvMBlockUseCrc true, NvMBlockCrcType != NoCrc and 
NvMBlockUseSyncMechanism.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Correct the NvMBlockDescriptor preconditions directly within the DaVinci Developer -> ensure the 
configuration matches the preconditions described in error message NVM01036. Do not use the 
provided solving action!
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
320


Issue Report
ESCAN00098599
RTE49999 when a data element without init value is 
connected to a data element without port accesses

Component@Subcomponent:
Rte_Asr4@Generator
First affected version:
4.06.00
Fixed in versions:
4.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an RTE49999 error message.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the following conditions evaluate to true:
- a r-port data element of a nonqueued sender-receiver communication does not specify an initial 
value
- the connected p-port data element specifies a textual initial value
- the r-port data element uses a data type without compu method or with a compu method that 
does not contain an entry for the textual initial value
- the sender runnable does not have any port accesses to the data element
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add port accesses.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
321


Issue Report
ESCAN00098646
RTE generator creates NvMRomBlockDataAddress 
with ROM variables that do not exist

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation of NVM fails because its data structures reference a constant that does not exist.
The according parameter /MICROSAR/NvM/NvMBlockDescriptor/NvMRomBlockDataAddress 
with the wrong value is created by the RTE generator.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the online calibration method is DOUBLE_POINTERED and when
a PerInstanceMemory is mapped to a NV Block and uses a calibration parameter as ROM block 
default.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create the missing constant in the application or set the
parameter
/MICROSAR/NvM/NvMBlockDescriptor/NvMRomBlockDataAddress
to user defined and set it to the Rte_Calprm constant in Rte.c that is used to initialize 
RteParameterRefTab.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
322


Issue Report
ESCAN00098679
Compiler error: incompatible declaration of 
ComM_ConfigPtr

Component@Subcomponent:
Ccl_Asr4ComMCfg5@GenTool_GeneratorMsr
First affected version:
3.00.00
Fixed in versions:
9.00.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler reports an error in the following line
P2CONST(ComM_ConfigType, AUTOMATIC, COMM_INIT_DATA) ComM_ConfigPtr = NULL_PTR;
\external\BSW\ComM.c:
declaration is incompatible with "ComM_ConfigType const *ComM_ConfigPtr 
@ .OS_OsApplication_NonTrusted_VAR_NOINIT" declared at line 672 of gendata/
ComM_Private_Cfg.h
Note: the reason is that the variable ComM_ConfigPtr is mapped to two different memory sections 
COMM_START_SEC_VAR_ZERO_INIT_UNSPECIFIED (as defined in ComM.c) and 
COMM_START_SEC_VAR_NOINIT_UNSPECIFIED (as declared in ComM_Private_Cfg.h).
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
- Implementation Variant of ComM module is VARIANT-POST-BUILD-LOADABLE or Postbuild-
Selectable Support is enabled
AND
- ComM_ConfigPtr symbol is used: # define COMM_USE_INIT_POINTER STD_ON can be found in 
ComM_Cfg.h or ComM_PBcfg.h
AND
- Memory sections COMM_START_SEC_VAR_ZERO_INIT_UNSPECIFIED and 
COMM_START_SEC_VAR_NOINIT_UNSPECIFIED are mapped to different memory areas.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Map the memory section COMM_START_SEC_VAR_ZERO_INIT_UNSPECIFIED to the same memory 
area as COMM_START_SEC_VAR_NOINIT_UNSPECIFIED.
This has no side-effects because ComM_ConfigPtr is always assigned in ComM_Init().
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
323


Issue Report
ESCAN00098712
Linker error: 
DemTriggerEventDataChangedCallback==FALSE 
and 
DemTriggerEventStatusChangedCallback==FALSE 
will only suppress the creation/usage of SWC port 
interfaces, but not the underlying function calls

Component@Subcomponent:
Diag_Asr4Dem@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
13.00.00
Problem Description:
324


Issue Report
ESCAN00098712
Linker error: 
DemTriggerEventDataChangedCallback==FALSE 
and 
DemTriggerEventStatusChangedCallback==FALSE 
will only suppress the creation/usage of SWC port 
interfaces, but not the underlying function calls

What happens (symptoms):
-------------------------------------------------------------------
a) With (the Vector specific) configuration parameter 
DemTriggerEventDataChangedCallback==FALSE, the existence of /Dem/DemConfigSet/
DemEventParameter/DemCallbackEventDataChanged configuration containers shall be ignored, 
and the resulting callouts shall not be generated.
This option is typically used during development, when the related code in the application of the 
ECU is not available yet.
When using DemTriggerEventDataChangedCallback==FALSE, the DEM (correctly) does not call 
any such callout function.
Nevertheless the callout functions names are generated and therefore a linker error occurs, when 
you don't implement a dummy function stub for them.
The name of the callout function is defined in following way:
- If an additional parameter /Dem/DemConfigSet/DemEventParameter/
DemCallbackEventDataChanged/DemCallbackEventDataChangedFnc was configured, its value is 
the function name.
- Otherwise when using the RTE, the generated function name is Rte_Call_CBDataEvt_{shortname 
of DemEventParameter}_EventDataChanged,
 or when using no RTE, the generated function name is Appl_Dem_CBDataEvt_{shortname of 
DemEventParameter}_EventDataChanged.
b) A similar issue exists with the EventStatusChanged configuration:
With (the Vector specific) configuration parameter 
DemTriggerEventStatusChangedCallback==FALSE, the existence of /Dem/DemConfigSet/
DemEventParameter/DemCallbackEventStatusChanged configuration containers shall be ignored, 
and the resulting callouts shall not be generated.
This option is typically used during development, when the related code in the application of the 
ECU is not available yet.
When using DemTriggerEventStatusChangedCallback==FALSE, the DEM (correctly) does not call 
any such callout function.
Nevertheless the callout functions names are generated and therefore a linker error occurs, when 
you don't implement a dummy function stub for them.
The name of the callout function is defined in following way:
- If an additional parameter /Dem/DemConfigSet/DemEventParameter/
DemCallbackEventStatusChanged/DemCallbackEventStatusChangedFnc was configured, its value 
is the function name.
- Otherwise when using the RTE, the generated function name is 
Rte_Call_CBEventUdsStatusChanged_{shortname of DemEventParameter}_{shortname of 
DemCallbackEventStatusChanged}_CallbackEventUdsStatusChanged,
 or when using no RTE, the generated function name is 
Appl_Dem_CBEventUdsStatusChanged_{shortname of DemEventParameter}_{shortname of 
DemCallbackEventStatusChanged}_CallbackEventUdsStatusChanged.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
325


Issue Report
ESCAN00098712
Linker error: 
DemTriggerEventDataChangedCallback==FALSE 
and 
DemTriggerEventStatusChangedCallback==FALSE 
will only suppress the creation/usage of SWC port 
interfaces, but not the underlying function calls

In which configuration does this happen:
-------------------------------------------------------------------
Case a)
/Dem/DemGeneral/DemTriggerEventDataChangedCallback == FALSE
The name(s) of the function(s) are generated, when a /Dem/DemConfigSet/DemEventParameter/
DemCallbackEventDataChanged container exists and are derived from the parent 
DemEventParameter shortname.
This generated name is replaced by a user-defined function name, when the container has a sub-
parameter ~DemCallbackEventDataChanged/DemCallbackEventDataChangedFnc.
Case b)
/Dem/DemGeneral/DemTriggerEventStatusChangedCallback == FALSE
The name(s) of the function(s) are generated, when a /Dem/DemConfigSet/DemEventParameter/
DemCallbackEventStatusChanged container exists and are derived from the parent 
DemEventParameter and the DemCallbackEventStatusChanged shortname.
This generated name is replaced by a user-defined function name, when the container has a sub-
parameter ~DemCallbackEventStatusChanged/DemCallbackEventStatusChangedFnc.
The RTE support is controlled by /Dem/DemGeneral/DemUseRte.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Either delete the (currently unimplemented) callbacks from your configuration (containers 
DemEventParameter/DemCallbackEventDataChanged resp. DemEventParameter/
DemCallbackEventStatusChanged), and re-add them later again, when these functions are 
available.
Or delete the configuration parameters DemTriggerEventDataChangedCallback and 
DemTriggerEventStatusChangedCallback (or set them to TRUE)
AND
implement the missing functions (as stub routines).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
326


Issue Report
ESCAN00098820
RTE generator reports unexpected exit code
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.08.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator reports an error message RTE01002 Unexpected Exit Code.
MicrosarRteGen.exe crashes.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations when the RTE generator is executed on a system with 
Windows10 with latest patches.
The problem was reported to occur after applying KB4074592.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Sometimes the problem disappears after the restart of the computer.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
327


Issue Report
ESCAN00098822
RTE Generator reports unexpected exit code
Component@Subcomponent:
Rte_Analyzer@Application
First affected version:
0.05.00
Fixed in versions:
1.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generator reports an error message RTE01002 Unexpected Exit Code.
MicrosarRteAnalyzerCfgGen.exe or MicrosarRteAnalyzer.exe crashes.
When does this happen:
-------------------------------------------------------------------
During generation/analysis.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations when the RTE generator is executed on a system with 
Windows10 with latest patches.
The problem was reported to occur after applying KB4074592.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Sometime the problem disappears when the system is restarted.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
328


Issue Report
ESCAN00098865
RTE49999 when sender and receiver use different 
init value constants with the same values

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an RTE49999 error message.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains sender-receiver communication where sender and 
receiver
use different init values and when the receiver init value is also used on another location.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use distinct init values for all elements.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
329


Issue Report
ESCAN00098866
Service 0x3E: Misleading caution box regarding 
external service implementation

Component@Subcomponent:
Diag_Asr4Dcm@Doc_TechRef
First affected version:
5.00.00
Fixed in versions:
10.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
There is a misleading caution box in chapter "5.25.4 Configuration Aspects" stating
"This service is mandatory and therefore may not be missing in the configuration and 
cannot be overridden by an application implementation. "
But this service can be configured to be implemented by the application.
When does this happen:
-------------------------------------------------------------------
Reading the technical reference.
In which configuration does this happen:
-------------------------------------------------------------------
N/A
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Consider the service 0x3E to be implemented by the application as well.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
330


Issue Report
ESCAN00098883
/MICROSAR/Xcp/XcpGeneral/XcpTimestampTicks 
limited in range to uint8

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The parameter /MICROSAR/Xcp/XcpGeneral/XcpTimestampTicks has a range of uint16 in the 
bswmd/GUI but the generator treats this value as uint8.
As a result, code generation will fail with an exception should this parameter have a value > 255.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
All configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use a user.cfg file to set the resulting define manually, e.g.:
user.cfg:
#undef XCP_DAQ_TIMESTAMP_TICKS_PER_UNIT
#define XCP_DAQ_TIMESTAMP_TICKS_PER_UNIT 1000
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
331


Issue Report
ESCAN00098887
Wrong linker section used
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.09.00
Fixed in versions:
3.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The variable "mirrorData" is placed in the wrong linker section, the default segment (bss) is used 
erroneously.
When does this happen:
-------------------------------------------------------------------
At compile/link time.
In which configuration does this happen:
-------------------------------------------------------------------
For all configurations using the Mirror Mode (CAN_MIRROR_MODE == STD_ON).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
332


Issue Report
ESCAN00098893
Compiler error: Missing Rte_MemClr when 
activation reason is used in a system with OS 
applications

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.15.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because Rte_MemClr is missing.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration has configured activation reasons and when
no minimum start interval, mode disablings, update flags, never received flags, acknowledge flags, 
alive timeout
and dirty flags are configured.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure never received handling for a receiver port.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
333


Issue Report
ESCAN00098918
Compiler error: Duplicated implicit APIs in analyzer 
stubs when the same port access is declared twice

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.14.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Analysis with RTE Analyzer fails because TSC Rte_IWrite, Rte_IWriteRef or Rte_IRead stubs are 
duplicated.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when multiple implicit accesses for the same port and data element are configured 
for the same runnable.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Delete duplicated implicit accesses.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
334


Issue Report
ESCAN00098922
NmStateChangeCallback is not called if same states 
are passed in Nm_StateChangeNotification

Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
3.00.00
Fixed in versions:
6.03.01, 7.02.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Nm calls Det_ReportError with the following parameters:
ModuleId: 0x27
InstanceId: 0x00
ApiId: 0x16
ErrorId: 0x23 (NM_E_SAME_STATE)
If '/MICROSAR/Nm/NmGlobalConfig/NmGlobalProperties/NmDevErrorDetect' is ON.
In any case '/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/NmStateChangeIndCallback' is 
not called.
When does this happen:
-------------------------------------------------------------------
During runtime in case a channel is requested, released and requested again within 
'/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmRepeatMessageTime'
In which configuration does this happen:
-------------------------------------------------------------------
On channels with:
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/CanNmPnEnabled' = ON
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmChannelConfig/
CanNmPnHandleMultipleNetworkRequests' = ON
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmStateChangeIndEnabled' = ON
AND
- '/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/NmStateChangeIndEnabled' = ON 
AND
- '/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/NmStateChangeIndCallback' is 
implemented in application 
AND
- '/MICROSAR/Nm/NmGlobalConfig/NmGlobalProperties/NmDevErrorDetect' = ON
 
Resolution Description:
335


Issue Report
ESCAN00098922
NmStateChangeCallback is not called if same states 
are passed in Nm_StateChangeNotification

Workaround:
-------------------------------------------------------------------
Create a user configuration file with the following content:
#if defined CANNM_SOURCE
# undef Nm_StateChangeNotification
# define Nm_StateChangeNotification Appl_Nm_StateChangeNotification
#endif 
and add this file in Davinci Configurator '/MICROSAR/CanNm/CanNmGlobalConfig/
CanNmUserConfigFile' parameter.
Create or use an application file and add the following content:
#include "Nm_Cbk.h"
#if( NM_STATE_CHANGE_IND_ENABLED == STD_ON )
FUNC( void, NM_CODE ) Appl_Nm_StateChangeNotification( CONST( NetworkHandleType, 
AUTOMATIC ) nmChannelHandle,
 CONST( Nm_StateType, AUTOMATIC) nmPreviousState,
 CONST( Nm_StateType, AUTOMATIC ) nmCurrentState )
{
 if( nmPreviousState != nmCurrentState )
 {
 Nm_StateChangeNotification(nmChannelHandle, nmPreviousState, nmCurrentState);
 }
}
#endif
This workaround filters all calls of CanNm to Nm in case nmPreviousState and nmCurrentState 
have the same value.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
336


Issue Report
ESCAN00098939
RTE49999 when application data type with texttable 
compu method is mapped to float implementation 
data type

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an error RTE49999.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when an application data type with texttable compu method is mapped to a float 
data type and when the float data type
is on another data element that is mapped to a signal.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a separate type reference implementation data type and map it to the application data type.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
337


Issue Report
ESCAN00098955
RTE49999 when a compu method declared 
CompuScales that would result in the same symbol

Component@Subcomponent:
Rte_Asr4@Generator
First affected version:
4.00.00
Fixed in versions:
4.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with an RTE49999 error "key already exists"
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a texttable, bitfield texttable or scale linear and texttable compu method 
contains multiple compu scales that would result in the the same symbol in the code.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use different symbols for the compu scales.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
338


Issue Report
ESCAN00098966
Missing reference about the cluster index for the 
Nm Gateway Coordination Extension

Component@Subcomponent:
Nm_Asr4NmIf@Doc_TechRef
First affected version:
8.00.00
Fixed in versions:
11.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
It is not clear what index it is used for the Nm Gateway Coordination Extension when setting the 
remote filters and the PartEcu active Channels for a node Id.
An info box is needed in which it is clear that the "Nm Gateway Coordination Extension " uses 
cluster indexes. 
When does this happen:
-------------------------------------------------------------------
When reading the technical reference.
In which configuration does this happen:
-------------------------------------------------------------------
All configurations with SDLC Gateway handling.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use the description provided in this issue ticket.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
339


Issue Report
ESCAN00099018
NPE during generation with invalid 
ComRxDataTimeoutSubstitutionValue

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
15.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An NPE is raised:
COM90005 Exception in Com generator during Validation encountered: 
java.lang.NullPointerException 
 /ActiveEcuC/Com
When does this happen:
-------------------------------------------------------------------
During generation of a configuration
In which configuration does this happen:
-------------------------------------------------------------------
an invalid value is set to ComRxDataTimeoutSubstitutionValue (e.g. a string "test" instead of an 
integer value)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
set a valid value to ComRxDataTimeoutSubstitutionValue
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
340


Issue Report
ESCAN00099049
RTE49999: when task type is set to basic and cyclic 
trigger implementation is set to none

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.05.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with a RTE49999 error.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains a task with task type set to basic and when this task
contains a runnable entity that also is a schedulable entity and when the cyclic trigger 
implementation is set to none.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the cyclic trigger implementation to Auto and configure a software timer for the generated 
alarms.
When the APIs of the software timer are not called, the OS will not trigger the task and it can still 
be triggered with a schedule table.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
341


Issue Report
ESCAN00099057
EcuM Wakeup Source defines are generated 
multiple times with numerical postfix in case of 
variance

Component@Subcomponent:
SysService_Asr4EcuM@GenTool_GeneratorMsr
First affected version:
8.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Wakeup Source Defines are generated multiple times with an numerical postfix, but the same 
value.
#define ECUM_WKSOURCE_POWER (EcuM_WakeupSourceType)(1UL) 
#define ECUM_WKSOURCE_POWER_1 (EcuM_WakeupSourceType)(1UL) 
When does this happen:
-------------------------------------------------------------------
During generation of the code.
In which configuration does this happen:
-------------------------------------------------------------------
Only in variant configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The defines with the numerical postfix can be just ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
342


Issue Report
ESCAN00099105
Compiler error: Rte.c accesses Rte_ActivationVector 
variable that is declared static in Rte_<osappl>.c

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.15.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because a COM callback sets an activation reason in an Rte_ActivationVector 
variable that is declared in another file.
The declaration is static.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration uses memory protection or multiple cores and when 
activation reasons are configured for a runnable
that is triggered by a data reception, data reception error, or data send completion trigger of a 
COM signal or LDCOM PDU.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use distinct runnables instead of the activation reason feature.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
343


Issue Report
ESCAN00099156
Missing description of 
OS_VTH_FORCED_TERMINATION and 
OS_VTHP_THREAD_CLEANUP

Component@Subcomponent:
Os_CoreGen7@Doc_TechRef
First affected version:
1.00.01
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Missing description of OS_VTH_FORCED_TERMINATION and OS_VTHP_THREAD_CLEANUP
When does this happen:
-------------------------------------------------------------------
Always
In which configuration does this happen:
-------------------------------------------------------------------
All
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
344


Issue Report
ESCAN00099160
Patch action fails because file path is too long
Component@Subcomponent:
_3rdParty_McalIntegration_Helper@VectorIntegration
First affected version:
1.00.00
Fixed in versions:
2.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Performing patch actions on a SIP where the path and/or file names are too long avoid the 
execution of the patch action. The 3rd Party Integration Helper Tool reports an error in the GUI.
When does this happen:
-------------------------------------------------------------------
If files which have to be patched have a too long path or file name.
In which configuration does this happen:
-------------------------------------------------------------------
All with long path names (> 259 characters).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Copy the SIP into a directory with short path. If error still occurs try again with a shorter path. Try 
as long as path is so short that the error does not occur.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products:
- PatchFiles.PatchFileGeneric(...): 
--- redesign 
--- use LongPathFile.Open(...) to open files because this method can handle long paths 
- FileDirectoryExt.CopyFileLong(...): add log entry if file which have to be copied does not exist
- LongPathFile.CheckReadOnly(...): fix spelling error in 
Fixed in following RC:
Components.Mcal2:_3rdParty_McalIntegration_Helper@root[2.03.01.2] 
345


Issue Report
ESCAN00099169
Compiler error/warning: Unreferenced formal 
parameter watchdog in actX25519.c

Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
2.04.00
Fixed in versions:
2.09.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler error due to unreferences parameter can occure.
1> actX25519core.c
1>..\..\..\..\external\BSW\SecMod\actX25519.c(108): error C4100: 'watchdog' : unreferenced 
formal parameter
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
If ED25519 is used and compiled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
346


Issue Report
ESCAN00099179
Compiler error: MemMap_Common.h: Wrong 
pragma command / unknown memory section used

Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following error is reported during compilation:
MemMap_Common.h:1763: #error "MemMap_Common.h: Wrong pragma command / unknown 
memory section used. Please use only valid pragma commands and known memory sections."
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in configurations having more than 254 Tx SDUs or more than 254 Rx SDUs.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add the missing memory sections (CANTP_START_SEC_VAR_NOINIT_16BIT and 
CANTP_STOP_SEC_VAR_NOINIT_16BIT) to the MemMap.h file.
Resolution:
-------------------------------------------------------------------
Not yet available.
347


Issue Report
ESCAN00099186
Compiler error: Inconsistent setting for number of 
channels; with dynamic channel assignment, more 
SDUs than channels are expected

Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following error in issued by the preprocessor:
Inconsistent setting for number of channels; with dynamic channel assignment, more SDUs than 
channels are expected
When does this happen:
-------------------------------------------------------------------
fatal error C1189: #error : "Inconsistent setting for number of channels; with dynamic channel 
assignment, more SDUs than channels are expected"
In which configuration does this happen:
-------------------------------------------------------------------
This happens in configurations where all of the following conditions are fulfilled:
1. Only Rx SDUs have been configured (no CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu 
containers are present).
2. Dynamic Channel assignment is enabled (CanTp/CanTpGeneral/
CanTpDynamicChannelAssignment is set).
3. "Postbuild-Selectable" is enabled for the module or "POST-BUILD-LOADABLE" has been selected 
as the module's "Implementation Variant" (In any of the two cases the macro 
CANTP_USE_INIT_POINTER will be defined as STD_ON in the generated file CanTp_Cfg.h).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add a user config file to the CanTp with the following code:
#if (CANTP_USE_INIT_POINTER != STD_ON) && (CANTP_DYN_CHANNEL_ASSIGNMENT == 
STD_ON) && (CANTP_NUM_TX_SDUS == 0)
# undef CANTP_NUM_TX_CHANNELS
# define CANTP_NUM_TX_CHANNELS 0
#endif
Resolution:
-------------------------------------------------------------------
Not yet available.
348


Issue Report
ESCAN00099189
a2l: Calculation of CAN-FD parameter 
SECONDARY_SAMPLE_POINT in CanXcp.a2l is 
incorrect

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The generated fragment CanXcp.a2l contains an CAN-FD specific parameter named 
SECONDARY_SAMPLE_POINT. This parameter is calculated incorrectly. As a result CAN 
communication on CAN-FD networks might not work due to this incorrect parameter.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When CAN-FD is used for XCP communication.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The generated a2l file CanXcp.a2l is a textfile that is used outside of ECU software and can 
therefore be modified manually with a correct parameter for SECONDARY_SAMPLE_POINT
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
349


Issue Report
ESCAN00099274
Null pointer exception when data mapping exists in 
all variants but signal group does not

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.05.00
Fixed in versions:
4.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with a null pointer exception.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains complex data elements that are mapped to a 
system signal group in all variants and when a COM signal group does not exist 
for the system signal group in one of the variants.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a variation point for the data mapping.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00099313
Test case 109 of WdgM Verifier does not fail 
anymore

Component@Subcomponent:
SysService_Asr4WdM@root
First affected version:
2.01.00
Fixed in versions:
2.01.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In the Safety Manual one safety manual item (SMI-1578) describes, that a test case could fail 
under certain circumstances.
This test runs now always correct and must be passed during the test procedure.
When does this happen:
-------------------------------------------------------------------
 If a MICROSAR OS Gen 7 is used in combination with WdgM.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Test case 109 must be PASSED.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
350


Issue Report
ESCAN00099318
Test case 107 of WdgM Verifier is marked as NOT 
PASSED

Component@Subcomponent:
SysService_Asr4WdM@root
First affected version:
2.01.00
Fixed in versions:
2.01.03
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Test case 107 of WdgM Verifier could be marked as NOT PASSED erroneously.
When does this happen:
-------------------------------------------------------------------
Always if the WdgM Verifier is used and test case 107 is marked as NOT PASSED.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The user of MICROSAR Safe shall verify manually if 'WdgMTriggerTimeout' in instance(s) of 
WdgM_TriggerModeType (in WdgM_PBcfg.c) has a value greater than 0 if a 'WdgMWatchdogMode' 
other than WDGIF_OFF_MODE is configured. The WdgM Verifier cannot not verify this step 
currently.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
351


Issue Report
ESCAN00099345
Exception in Generator when XcpCalibration 
container is not present

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The XCP generator raises an exception during code generation when the container /MICROSAR/
Xcp/XcpCmdConfig/XcpCalibration is not present.
This container is used to enable/disable XCP write access depending on whether this container is 
present/deleted.
As a result of this issue write access can not be disabled by this configuration option but must be 
disabled by write access mechanism during runtime.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When /MICROSAR/Xcp/XcpCmdConfig/XcpCalibration is not present
AND
/MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim is present
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Add container /MICROSAR/Xcp/XcpCmdConfig/XcpCalibration and perform write access check 
during runtime in the call-back XcpAppl_CalibrationWrite.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
352


Issue Report
ESCAN00099398
Compiler error: Incorrect expansion of 
Com_ReceiveShadowSignal with 
COM_RECEIVE_SIGNAL_MACRO_API

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
8.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile error occurs if Com_ReceiveShadowSignal is used having 
COM_RECEIVE_SIGNAL_MACRO_API enabled:
 In file included from ..:
 src/Com.h:718:54: error: pasting "Com_Get" and "(" does not give a valid preprocessing token
 # define Com_ReceiveSignal(SignalId, SignalDataPtr) Com_Get##SignalId((SignalDataPtr)) 
 ^
 src/Com.h:739:66: note: in expansion of macro 'Com_ReceiveSignal'
 # define Com_ReceiveShadowSignal(SignalId, SignalDataPtr) (void) 
Com_ReceiveSignal((SignalId), (SignalDataPtr))
 ^
 test/test_all.c:519:3: note: in expansion of macro 'Com_ReceiveShadowSignal'
 Com_ReceiveShadowSignal(GrpSig_1, someBuffer)
 ^
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/Com/ComGeneral/ComReceiveSignalMacroAPI is enabled
AND
Com_ReceiveShadowSignal is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use Com_ReceiveSignal API instead of deprecated Com_ReceiveShadowSignal API
OR
Disable /MICROSAR/Com/ComGeneral/ComReceiveSignalMacroAPI
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
353


Issue Report
ESCAN00099413
Compiler error: Duplicated variable definition in 
case of N:M communication with external and 
internal receivers

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because the RTE declares multiple variables with the same name.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains multiple senders that send the same data element 
and when
the data element is mapped to a COM signal or a LDCOM PDU and is also sent to an additional 
internal receiver on the same ECU.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
354


Issue Report
ESCAN00099473
The value <X> is not in the range of the specified 
datatype UINT_16

Component@Subcomponent:
Il_AsrComCfg5@GenTool_GeneratorMsr
First affected version:
5.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RuntimeExeption "COM90500 The value <X> with comment () is not in the range of the specified 
datatype" is thrown during generation of the module.
When does this happen:
-------------------------------------------------------------------
The error occurs during generation of COM
In which configuration does this happen:
-------------------------------------------------------------------
COM has Rx I-PDUs configured with a /MICROSAR/EcuC/EcucPduCollection/Pdu/PduLength greater 
than UINT_16 and /MICROSAR/Com/ComConfig/ComIPdu/ComIPduSignalProcessing set to 
DEFERRED.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
set /MICROSAR/Com/ComConfig/ComIPdu/ComIPduSignalProcessing to IMMEDIATE
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
355


Issue Report
ESCAN00099474
a2l: Parameter XCP_MAX_ODT_ENTRY_SIZE fixed 
to 7

Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The a2l parameter XCP_MAX_ODT_ENTRY_SIZE is currently fixed to 7. This is correct for CAN but 
leads to warnings in the Tool should another bus system with a bigger payload should be used.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
On bus systems other than standard CAN.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Usually this issue does not lead to problems because the command GET_DAQ_RESOLUTION_INFO 
returns the correct value, overwriting the a2l file.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
356


Issue Report
ESCAN00099518
CanXcp.a2l not variant specific
Component@Subcomponent:
Cp_Asr4Xcp@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
3.00.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The generated file CanXcp.a2l is not variant specific. For multiple variants only one file with the 
same name is generated. As a result an exception is thrown and only the last variant is available 
as file.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
When variance is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The generated a2l file can be copied and manually adapted to cover the missing variant.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
357


Issue Report
ESCAN00099525
CanTpEnableSynchronousTransmit cannot be used 
with non MICROSAR Components

Component@Subcomponent:
Tp_Asr4TpCan@Doc_TechRef
First affected version:
3.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Add a warning box to chapter 3.1.2.8 and to the integration chapter that 
CanTpEnableSynchronousTransmit cannot be used with non MICROSAR components.
When does this happen:
-------------------------------------------------------------------
At runtime.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where CanTp/CanTpGeneral/CanTpEnableSynchronousTransmit is configured to 
true.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
Not yet available.
358


Issue Report
ESCAN00099526
CanTpEnableSynchronousTransmit cannot be used 
with non MICROSAR Components

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
5.00.00
Fixed in versions:
14.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The feature CanTpEnableSynchronousTransmit cannot be used with non MICROSAR components 
because the functionality is not specified by AUTOSAR.
When does this happen:
-------------------------------------------------------------------
At runtime.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where the PduR is used and suggests to set CanTpEnableSynchronousTransmit 
to true.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Set the CanTp/CanTpGeneral/CanTpEnableSynchronousTransmit to UserDefined and false.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
359


Issue Report
ESCAN00099539
RTE49999: N:1 Inter-Partition Client-Server 
Communication with IOCs

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.03.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE Generation aborts with an RTE49999 error.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
All of the following conditions have to be fulfilled:
- IOCs are used AND
- a server implemented by a runnable has at least three clients AND
- the server runnable is 
 a) either unmapped or 
 b) at least one client runnable is mapped to the same task and no other client runnables are 
mapped to other task in the server's OS application AND
- at least two other OS applications have client runnables with asynchronous or scheduled 
communication.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Assign the client runnable which shared the OS application with the server runnable to another OS 
application.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
360


Issue Report
ESCAN00099548
InitMonitorReason 
DEM_INIT_MONITOR_REENABLED is missing in 
callback description

Component@Subcomponent:
Diag_Asr4Dem@Doc_TechRef
First affected version:
3.00.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
In chapter 6.5.1.4 CBInitEvt_<EventName>(), the InitMonitorReason 
DEM_INIT_MONITOR_REENABLED is missing.
When does this happen:
-------------------------------------------------------------------
Always and immediately
In which configuration does this happen:
-------------------------------------------------------------------
all
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Possible parameter values for InitMonitorForEvent callback are the possible values for 
Dem_InitMonitorReasonType as specified e.g. in Document ID 019: 
AUTOSAR_SWS_DiagnosticEventManager, version 4.1.2. 
Add "DEM_INIT_MONITOR_REENABLED: Enable conditions fulfilled for event or Control DTC 
settings enabled." to chapter "6.5.1 Callouts -> 6.5.1.4 CBInitEvt_<EventName>()"
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
361


Issue Report
ESCAN00099553
State diagram of the EcuM with fixed state machine 
shows call of EcuM_AL_DriverRestart in the wrong 
transition.

Component@Subcomponent:
SysService_Asr4EcuM@Doc_TechRef
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
State diagram of the EcuM with fixed state machine shows call of EcuM_AL_DriverRestart in the 
transition from ECUM_STATE_GO_SLEEP to ECUM_STATE_WAKEUP_VALIDATION.
The call should be located in the transition from ECUM_STATE_SLEEP to 
ECUM_STATE_WAKEUP_VALIDATION. 
When does this happen:
-------------------------------------------------------------------
During reading of the TechRef.
In which configuration does this happen:
-------------------------------------------------------------------
Only in EcuM with fixed behavior configurations (EcuM/EcuMGeneral/EcuMEnableFixBehavior == 
true).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
362


Issue Report
ESCAN00099582
Compiler error: actAES.h:23 missing argument for 
macro P2FUNC

Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
2.00.00
Fixed in versions:
3.02.00, 2.10.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
actAES.h:23 23 missing argument for macro P2FUNC:23 23 missing argument for macro P2FUNC
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
If aes is used.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
363


Issue Report
ESCAN00099596
Compiler error: Missing dataSig variables
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.12.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because a Rte_COMCbk_ callback accesses a variable
dataSig<DataType> that is not declared.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a SystemSignal or ISignal references a compu method with factor and offset 
and when the signal
is mapped to a data element with float data type and when the receiver is mapped to a diferent 
partition than the BSW.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a proxy component that receives the data element and forward the converted
data to the original receiver.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
364


Issue Report
ESCAN00099599
Dem_SetOperationCycleState can not be called in 
the pre-initialized mode

Component@Subcomponent:
Diag_Asr4Dem@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
9.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The description of API Dem_SetOperationCycleState says that it can be called in preinitialized 
mode, but this results in DET and negative return value. 
When does this happen:
-------------------------------------------------------------------
Always
In which configuration does this happen:
-------------------------------------------------------------------
Always
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Rework chapter 6.2.6.6 Dem_SetOperationCycleState()->Functional Description:
Instead of 
"It is allowed to call this run in pre-initialized mode to start the operation cycle of BSW events 
before full initialization. "
write
"The API can not be used until Dem_MasterInit() has completed.".
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
365


Issue Report
ESCAN00099644
Compiler error: QOverflowType struct without 
declaration

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.02.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler states: QOverflowType expected a declaration
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
Inter-partition communication used in combination with array of variable size
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
There are two possible workarounds
1. Change the variable array to fixed if the length information is not needed or is sent through a 
different interface.
2. Replace the array data type in the data element with a record data type with two elements
- integer element (for the size)
- array element with the maximum array size
The application can then set and get the actual array size from the size element.
The record with integer size and array can then be directly passed to the RTE APIs.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
366


Issue Report
ESCAN00099667
Null pointer exception when no BswImplementation 
for LDCOM exists

Component@Subcomponent:
Rte_Asr4@GenTool_GeneratorMsr
First affected version:
4.04.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with a null pointer exception.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains a non Vector LDCOM module without BSW 
Implementation is configured.
e.g. when the AUTOSAR definition is used
 
Resolution Description:
367


Issue Report
ESCAN00099667
Null pointer exception when no BswImplementation 
for LDCOM exists

Workaround:
-------------------------------------------------------------------
Manually add a MODULE-DESCRIPTION-REF to the ECUC file
<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 
AUTOSAR_4-2-1.xsd">
 <AR-PACKAGES>
 <AR-PACKAGE>
 <SHORT-NAME>ActiveEcuC</SHORT-NAME>
 <ELEMENTS>
 <ECUC-MODULE-CONFIGURATION-VALUES UUID="f21af5ba-362f-40e2-be00-da66c2aaebda">
 <SHORT-NAME>LdCom</SHORT-NAME>
 <DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/LdCom</DEFINITION-REF>
 <IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-
VARIANT>
 <MODULE-DESCRIPTION-REF DEST="BSW-IMPLEMENTATION">/MICROSAR/LdCom_Impl</
MODULE-DESCRIPTION-REF>
And add an arxml file with the following content to the InternalBehavior directory of the 
configuration:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 
AUTOSAR_4-2-1.xsd">
 <AR-PACKAGES>
 <AR-PACKAGE UUID="ff55d029-386d-43a2-b3c2-dfef4c7a5e36">
 <SHORT-NAME>MICROSAR</SHORT-NAME>
 <ELEMENTS>
 <BSW-IMPLEMENTATION UUID="fb38aa70-5ae2-4fd0-8ecf-7d91f63bcc9c">
 <SHORT-NAME>LdCom_Impl</SHORT-NAME>
 <PROGRAMMING-LANGUAGE>C</PROGRAMMING-LANGUAGE>
 <SW-VERSION>2.00.00</SW-VERSION>
 <USED-CODE-GENERATOR>DaVinci Configurator</USED-CODE-GENERATOR>
 <VENDOR-ID>30</VENDOR-ID>
 <AR-RELEASE-VERSION>4.02.02</AR-RELEASE-VERSION>
 </BSW-IMPLEMENTATION>
 </ELEMENTS>
 <AR-PACKAGES>
 <AR-PACKAGE UUID="53f8d579-f844-4767-8c49-63a1009124f9">
 <SHORT-NAME>LdCom_ib_bswmd</SHORT-NAME>
 <AR-PACKAGES>
 <AR-PACKAGE UUID="706f5b57-21d1-4ddc-b79d-3f2a27e3fc54">
 <SHORT-NAME>BswModuleDescriptions</SHORT-NAME>
 <ELEMENTS>
 <BSW-MODULE-DESCRIPTION UUID="6c8dc0dd-d742-4f2d-a4b2-200794c35a12">
 <SHORT-NAME>LdCom</SHORT-NAME>
 <INTERNAL-BEHAVIORS>
 <BSW-INTERNAL-BEHAVIOR UUID="938e0732-4116-43de-a78b-52a578a001bc">
 <SHORT-NAME>LdComBehavior</SHORT-NAME>
 </BSW-INTERNAL-BEHAVIOR>
 </INTERNAL-BEHAVIORS>
 </BSW-MODULE-DESCRIPTION>
 </ELEMENTS>
 </AR-PACKAGE>
 <AR-PACKAGE UUID="d2868a86-65ca-4627-bb9a-03b09cc25d85">
368


Issue Report
ESCAN00099667
Null pointer exception when no BswImplementation 
for LDCOM exists

 <SHORT-NAME>XcpEvents</SHORT-NAME>
 </AR-PACKAGE>
 </AR-PACKAGES>
 </AR-PACKAGE>
 </AR-PACKAGES>
 </AR-PACKAGE>
 </AR-PACKAGES>
</AUTOSAR>
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00099693
Compiler error: Incompatible Declaration in 
Rte_Csm.h and Csm.h

Component@Subcomponent:
SysService_AsrCsm@Implementation
First affected version:
2.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
e.g.: declaration is incompatible with "Std_ReturnType Csm_SymEncryptStart( ..."
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
If the underyling Cry Driver includes Csm.h instead of Csm_Types.h
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Adding the following three lines in a global include file (e.g. Compiler_Cfg.h):
#ifdef CSM_CFG_SOURCE
#define _RTE_CSM_H
#endif 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
369


Issue Report
ESCAN00099714
Compiler error/warning: argument type of string of 
Ioc_Write does not match prototype for implicit 
write

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Typical compiler warning / error explanations may be:
"Rte\\Rte_*.c": argument type does not match prototype
for code of type
(void)IocWrite_Rte_<...>(*(&<DataElement>));
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
When an implicit write access for a byte array uses IOCs.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use explicit write.
 
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
370


Issue Report
ESCAN00099814
Wrong references to CanTp_Cfg.c exist
Component@Subcomponent:
Tp_Asr4TpCan@Doc_TechRef
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
CanTp_Cfg.c is mentioned as a generated file, but the file is actually not generated.
When does this happen:
-------------------------------------------------------------------
Always and Immediately.
In which configuration does this happen:
-------------------------------------------------------------------
All of them.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
Not yet available.
371


Issue Report
ESCAN00099816
Compiler error: Missing buffer definition within 
struct Rte_tsRB

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.07.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails because a task accesses a Rte_RB structure element that does not exist.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens if the config contains a component with multiple instantiations and implicit accesses 
and when one instance of the component
can access the data element without temporary buffer and one instance requires a temporary 
buffer.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Configure invalidation or never received handling.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
372


Issue Report
ESCAN00099948
Compiler error: Duplicated lower limit variable in 
RTE Analyzer stubs

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.14.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Analysis with RTE Analyzer fails.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when a component uses different implementation data types with the same name 
that are located in different AUTOSAR packages.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Remove duplicated data types.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
373


Issue Report
ESCAN00099951
Compiler error: CanNm_SetMsgRequest undefined
Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
6.02.00
Fixed in versions:
8.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A compiler warning similar to the following occurs:
"CanNm_SetMsgRequest' undefined; assuming extern returning int"
This also leads to a linker error:
"unresolved external symbol _CanNm_SetMsgRequest referenced in function 
_CanNm_SetSleepReadyBit"
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
IF
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmComUserDataSupport' is disabled
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmCoordinatorSyncSupport' is enabled
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmComUserDataSupport' in case User Data 
support AND '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmCoordinatorSyncSupport' is needed.
In case User Data support is not needed, '/MICROSAR/CanNm/CanNmGlobalConfig/
CanNmComUserDataSupport' must still be activated.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
374


Issue Report
ESCAN00099953
Compiler error: Too many struct initializers when 
InitializeImplicitBuffers is configured

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.09.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compilation fails, because the initializer for the implicit task buffer does not match the type of the 
variable.
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when InitializeImplicitBuffers is configured to true and when the configuration 
contains implicit read accesses that only receive a subset of the sent data.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a wrapper SWC that receives the full data element and only forwards the relevant data to 
the implicit receiver.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
375


Issue Report
ESCAN00099959
Compiler error: undefined reference to 
`CanTp_IsTxSduCfgIndUsedOfRxPduMap'

Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
2.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following errors are shown when trying to build the project:
CanTp.c:(.text.CanTp_RxIndication+0x30): error: undefined reference to 
`CanTp_IsTxSduCfgIndUsedOfRxPduMap'
CanTp.c:(.text.CanTp_RxIndication+0x3a): error: undefined reference to 
`CanTp_GetTxSduCfgIndStartIdxOfRxPduMap'
CanTp.c:(.text.CanTp_RxIndication+0x40): error: undefined reference to `CanTp_GetTxSduCfgInd'
CanTp.c:(.text.CanTp_RxIndication+0x436): error: undefined reference to 
`CanTp_IsTxSduCfgIndUsedOfRxPduMap'
When does this happen:
-------------------------------------------------------------------
The error is issued by the compiler during compilation of the code in case the configuration is as 
described below.
In which configuration does this happen:
-------------------------------------------------------------------
This happens in configurations fulfilling all of the following conditions:
- The CanTp is configured to support Postbuild-Selectable (the macro 
CANTP_POSTBUILD_VARIANT_SUPPORT in CanTp_Cfg.h is defined as STD_ON)
- The Implementation variant is set to VARIANT-PRE-COMPILE ( the macro 
CANTP_CONFIGURATION_VARIANT in CanTp_Cfg.h is defined as 
CANTP_CONFIGURATION_VARIANT_PRECOMPILE)
- No Tx SDUs are configured (the macro CANTP_NUM_TX_SDUS in CanTp_Cfg.h is defined as 0)
 
Resolution Description:
376


Issue Report
ESCAN00099959
Compiler error: undefined reference to 
`CanTp_IsTxSduCfgIndUsedOfRxPduMap'

Workaround:
-------------------------------------------------------------------
Add a user configuration file to the CanTp (CanTp/CanTpGeneral/CanTpUserConfigFile) with the 
following lines:
#if (CANTP_POSTBUILD_VARIANT_SUPPORT == STD_ON) && 
(CANTP_CONFIGURATION_VARIANT == CANTP_CONFIGURATION_VARIANT_PRECOMPILE) && 
(CANTP_NUM_TX_SDUS == 0)
# if !defined (CanTp_IsTxSduCfgUsedOfTxSduSnv2Hdl)
# define CanTp_IsTxSduCfgUsedOfTxSduSnv2Hdl(x) FALSE
# endif
# if !defined (CanTp_GetTxSduCfgIdxOfTxSduSnv2Hdl)
# define CanTp_GetTxSduCfgIdxOfTxSduSnv2Hdl(x)(PduIdType)0
# endif
# if !defined (CanTp_IsTxSduCfgUsedOfRxSduCfg)
# define CanTp_IsTxSduCfgUsedOfRxSduCfg(x) FALSE
# endif
# if !defined (CanTp_GetTxSduCfgIdxOfRxSduCfg)
# define CanTp_GetTxSduCfgIdxOfRxSduCfg(x) (PduIdType)0
# endif
# if !defined (CanTp_IsTxSduCfgIndUsedOfRxPduMap)
# define CanTp_IsTxSduCfgIndUsedOfRxPduMap(x) FALSE
# endif
#endif
Resolution:
-------------------------------------------------------------------
Not yet available.
377


Issue Report
ESCAN00099970
Wrong error message for ScheduleTable ExpiryPoint 
offset

Component@Subcomponent:
Os_CoreGen7@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
2.21.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The '/MICROSAR/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset' 
can not be configured to the value of '/MICROSAR/Os/OsCounter/OsCounterMinCycle' for the first 
ExpiryPoint (with the smallest offset) of a ScheduleTable.
If configured so, the DaVinci CFG5 shows the following error message (here with example values):
OS03430 OsScheduleTblExpPointOffset(value=200) must be greater than 200.
 Set OsScheduleTblExpPointOffset(value=200) to 201
 /ActiveEcuC/Os/SystemTimer[OsCounterMinCycle]
 /ActiveEcuC/Os/MyScheduleTable/OsScheduleTableExpiryPoint[OsScheduleTblExpPointOffset]
When does this happen:
-------------------------------------------------------------------
At configuration time.
In which configuration does this happen:
-------------------------------------------------------------------
If the '/MICROSAR/Os/OsScheduleTable/OsScheduleTableExpiryPoint/
OsScheduleTblExpPointOffset' of the first OsScheduleTableExpiryPoint is configured to the same 
value as '/MICROSAR/Os/OsCounter/OsCounterMinCycle' of the driving Counter of the 
ScheduleTable. Which is referenced in '/MICROSAR/Os/OsScheduleTable/
OsScheduleTableCounterRef'.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Either decrease '/MICROSAR/Os/OsCounter/OsCounterMinCycle' or increase '/MICROSAR/Os/
OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset'.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
378


Issue Report
ESCAN00099987
RTE49999: when union is used for N:1 connections 
or PR ports

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.14.00
Fixed in versions:
1.19.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
RTE generation aborts with a RTE49999 exception.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains union data types that are used for N:1 sender 
receiver connections or for PR ports.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
379


Issue Report
ESCAN00099988
Description: Lower Limit for parameter 
DemExtendedDataRecordNumber wrong

Component@Subcomponent:
Diag_Asr4Dem@Description
First affected version:
4.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
"Min Value" of /MICROSAR/Dem/DemGeneral/DemExtendedDataRecordClass/
DemExtendedDataRecordNumber can be configured to value 0 although this value is reserved (by 
UDS diagnostic specification and later AUTOSAR specifications).
No error of Configuration-Tool is given.
"Min. Value" should be 1.
When does this happen:
-------------------------------------------------------------------
At configuration time if creating Extended Data Record configuration.
In which configuration does this happen:
-------------------------------------------------------------------
In configurations supporting UDS service 0x19 with sub-function 0x06 
(reportDTCExtDataRecordByDTCNumber) or 0x10 
(reportMirrorMemoryDTCExtDataRecordByDTCNumber).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not use ExtendedDataRecordNumber with value 0.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
380


Issue Report
ESCAN00100169
Parameter description of 
CheckRemoteSleepIndication is incorrect

Component@Subcomponent:
Nm_Asr4NmCan@Doc_TechRef
First affected version:
1.00.00
Fixed in versions:
7.02.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The description of the input parameter 'nmRemoteSleepIndPtr' is incorrect.
The current chapter CanNm_CheckRemoteSleepIndication states:
'Pointer where PDU Data out of the most recently received NM message shall be copied to'
but should be:
'Pointer where current remote sleep state is copied to.'
When does this happen:
-------------------------------------------------------------------
-
In which configuration does this happen:
-------------------------------------------------------------------
-
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Parameter description for the CanNm_CheckRemoteSleepIndication API should be as follows:
'nmRemoteSleepIndPtr : Pointer where current remote sleep state is copied to.'
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
381


Issue Report
ESCAN00100193
Improve description
Component@Subcomponent:
AN-ISC-8-1184_Compiler_Warnings@Doc_ApplicationNote
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The application note can be misinterpreted how globally accepted compiler warnings are handled.
When does this happen:
-------------------------------------------------------------------
When reading the application note.
In which configuration does this happen:
-------------------------------------------------------------------
N/A
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Keep this ESCAN in mind when reading the application note
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
ESCAN00100240
RTE generator creates duplicated A2L group objects 
in case of PR Ports

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An invalid A2L measurement description file is generated that contains duplicated group objects.
When does this happen:
-------------------------------------------------------------------
During generation.
In which configuration does this happen:
-------------------------------------------------------------------
This happens when measurement is enabled for PR Ports.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Manually remove duplicated group entries from the A2L description.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
382


Issue Report
2.6 Compiler Warnings 
As a service we also provide the known compiler warnings. The occurrence of a compiler warning 
may depend on the used software module configuration and compiler settings.
Index
ESCAN00065890
Compiler warning: cast discards '__attribute__((noreturn))' qualifier from 
pointer target type
DrvCan_Mpc5700McanLl@Implementation
ESCAN00065891
Compiler warning: cast increases required alignment of target type
DrvCan_Mpc5700McanLl@Implementation
ESCAN00067159
Compiler warning: cast truncates constant value
MemService_AsrNvM@Implementation
ESCAN00068434
Compiler warning: conditional expression or part of it is always true/false
DrvCan__coreAsr@Implementation
ESCAN00068872
Compiler warning: the order of volatile accesses is undefined in this statement
DrvCan__coreAsr@Implementation
ESCAN00074793
Compiler warning: Condition is always constant
Diag_Asr4Dem@Implementation
ESCAN00086650
Compiler warning: pointless comparison of unsigned integer with zero
SysService_AsrCsm@Implementation
ESCAN00088061
BswM_Lcfg.c: warning: 'function' : conversion from 'const 
BswM_ImmediateUserStartIdxOfModeReqeustMappingType' to 
'BswM_SizeOfImmediateUserType', possible loss of data
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00089241
Compiler warning: multiple warnings
SysService_CryptoCv@Impl_actCLib
ESCAN00089425
Compiler warning: missing braces around initializer
SysService_CryptoCv@Impl_ESLib
ESCAN00089543
Compiler warning: dead assignment to "errorId" eliminated
Nm_Asr4NmIf@Implementation
ESCAN00089544
Compiler warning: conversion to 'uint8' from 'int' may alter its value
Nm_Asr4NmIf@Implementation
ESCAN00090114
Compiler Warning: Assignment in condition
SysService_CryptoCv@Impl_actCLib
ESCAN00090161
Compiler warning: condition evaluates always to true/false
Ccl_Asr4ComMCfg5@Implementation
ESCAN00090806
Compiler warning: C4310: cast truncates constant value
Gw_AsrPduRCfg5@Implementation
ESCAN00090831
Compiler warning: integer conversion resulted in a change of sign
Il_AsrComCfg5@Implementation
ESCAN00091295
Compiler warning: dead assignment / variable set but not used
Ccl_Asr4ComMCfg5@Implementation
ESCAN00091340
Compiler warning: cast truncates constant value
If_AsrIfCan@Implementation
ESCAN00091343
Compiler warning: warning C4310: cast truncates constant value
If_AsrIfCan@Implementation
ESCAN00091547
Compiler warning: condition is always false
Diag_Asr4Dem@Implementation
ESCAN00092315
Compiler warning: function "CanLL_WakeUpHandling" was declared but never 
referenced
DrvCan_Mpc5700McanLl@Implementation
ESCAN00092713
Preprocessor parse error
DrvCan_Mpc5700McanLl@Implementation
ESCAN00094232
Compiler warning: "conditional expression is constant"
Nm_Asr4NmCan@Implementation
383


Issue Report
Index
ESCAN00095299
Compiler warning: Mismatch between signature of function declarations and 
definitions
Diag_Asr4Dcm@Implementation
ESCAN00095459
Compiler warning: Crc.c: constant out of range
SysService_AsrCrc@Implementation
ESCAN00095486
Compiler warning: Function "Dcm_Svc14_XX_RepeaterProxySelectDTC" was 
declared but never referenced
Diag_Asr4Dcm@Implementation
ESCAN00095488
Datatype conversion for description routing, possible loss of Data
Il_AsrComCfg5@Implementation
ESCAN00095508
Compiler warning: Function "Dcm_MemMgrWriteMemory" was declared but 
never referenced
Diag_Asr4Dcm@Implementation
ESCAN00095513
Compiler warning: Function "Dcm_MemMgrReadMemory" was declared but 
never referenced
Diag_Asr4Dcm@Implementation
ESCAN00095530
Compiler warning: variable "lERecStoredIndex" was set but never used
Diag_Asr4Dem@Implementation
ESCAN00095542
Compiler warning: 'PduR_RmIf_SingleBufferHandling' declared 'static' but 
never defined
Gw_AsrPduRCfg5@Implementation
ESCAN00095907
Compiler warning: Com.c(4142): warning C4100: 'idxFilterInfo' : unreferenced 
formal parameter
Il_AsrComCfg5@Implementation
ESCAN00096038
Compiler warning: Passing of incompatible pointers
Rte_Core@Implementation
ESCAN00096133
Compiler warning: warning C4310: cast truncates constant value
Cp_Asr4Xcp@Implementation
ESCAN00096246
Compiler warning: C4100: 'CanId' : unreferenced formal parameter
If_AsrIfCan@Implementation
ESCAN00096376
Compiler warning: Unreachable code in ESLib_EdDSA.c
SysService_CryptoCv@Impl_ESLib
ESCAN00096911
Compiler warning: type qualifier is meaningless on cast type
Cp_Asr4Xcp@Implementation
ESCAN00096913
Compiler warning: Static function 
'Rte_QUnqueueElementCallbackSpecific<OsApplicationName>()' is not used 
within this translation unit
Rte_Core@Implementation
ESCAN00097289
Compiler warning: integer literal is too large to be represented in a signed 
integer type, interpreting as unsigned
Rte_Core@Implementation
ESCAN00097375
Compiler warning: 'lTxHdl' : local variable is initialized but not referenced
Tp_Asr4TpCan@Implementation
ESCAN00097692
Compiler warning: conversion from 'int' to 'Dcm_CfgNetBufferSizeOptType'
Diag_Asr4Dcm@Implementation
ESCAN00097790
Compiler warning: 'CanTpTxSduId' : unreferenced formal parameter
Tp_Asr4TpCan@Implementation
ESCAN00097980
Compiler warning: Unreferenced formal parameter due to reduction of rom 
data
Il_AsrComCfg5@Implementation
ESCAN00098038
Compiler warning: number of arguments don't match
Rte_Core@Implementation
ESCAN00098070
Compiler warning: NvM_Cfg.c: 'ServiceId' : unreferenced formal parameter
MemService_AsrNvM@GenTool_GeneratorMsr
384


Issue Report
Index
ESCAN00098195
Compiler warning: possible loss of data when least types are larger than the 
platform types
Rte_Core@Implementation
ESCAN00099190
Compiler warning: BswM_Lcfg.c(2990): warning C4100: 'handleId' : 
unreferenced formal parameter
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
ESCAN00099286
Compiler warning: unused parameter 'ipduGroupVector' and 'initialize' in 
function 'Com_IpduGroupControl'
Il_AsrComCfg5@Implementation
ESCAN00099287
Compiler warning: unused parameter 'deferredfctPtrCacheStrctPtr' in function 
'Com_RxProcessDeferredPDU'
Il_AsrComCfg5@Implementation
ESCAN00099291
Compiler warning: unused parameter 'PduInfoPtr' in function 
'Com_RxSignalProcessing'
Il_AsrComCfg5@Implementation
ESCAN00099292
Compiler warning: unused parameter 'idxTxSigInfo' in function 
'Com_SendSignal_WriteSignal'
Il_AsrComCfg5@Implementation
ESCAN00099981
Compiler warning: the order of volatile accesses is undefined
Cp_Asr4Xcp@Implementation
ESCAN00100176
Compiler warning: cast truncates constant value
If_AsrIfCan@Implementation
ESCAN00100182
Compiler warning: A value that cannot be used to initialize an entity with a 
function pointer type
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
385


Issue Report
ESCAN00065890
Compiler warning: cast discards 
'__attribute__((noreturn))' qualifier from pointer 
target type

Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler generates the following warning:
Compiling file: ../../../external/BSW/Can/Can.c
../../../external/BSW/Can/Can.c: In function 'CanBasicCanMsgReceived':
../../../external/BSW/Can/Can.c:1745:16: warning: cast discards '__attribute__((noreturn))' 
qualifier from pointer target type [-Wcast-qual]
../../../external/BSW/Can/Can.c:1750:10: warning: cast discards '__attribute__((noreturn))' 
qualifier from pointer target type [-Wcast-qual]
../../../external/BSW/Can/Can.c:1780:55: warning: cast discards '__attribute__((noreturn))' 
qualifier from pointer target type [-Wcast-qual]
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
GNU compiler and -Wcast-qual compiler option is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Omit gcc command option -Wcast-qual.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
386


Issue Report
ESCAN00065891
Compiler warning: cast increases required 
alignment of target type

Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler generates the following warning:
Compiling file: ../../../external/BSW/Can/Can.c
../../../external/BSW/Can/Can.c: In function 'CanBasicCanMsgReceived':
../../../external/BSW/Can/Can.c:1745:16: warning: cast increases required alignment of target 
type [-Wcast-align]
../../../external/BSW/Can/Can.c:1750:10: warning: cast increases required alignment of target 
type [-Wcast-align]
../../../external/BSW/Can/Can.c:1752:29: warning: cast increases required alignment of target 
type [-Wcast-align]
../../../external/BSW/Can/Can.c:1758:30: warning: cast increases required alignment of target 
type [-Wcast-align]
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
GNU compiler and -Wcast-align compiler option is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Omit gcc command option -Wcast-align
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
387


Issue Report
ESCAN00067159
Compiler warning: cast truncates constant value
Component@Subcomponent:
MemService_AsrNvM@Implementation
First affected version:
3.08.01
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
>..\..\bsw\nvm\nvm_crc.c(229) : warning C4310: cast truncates constant value
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
CANoeEmu + VS2008
It depends on definition of uint16_least: Warning occures only if uint16_least is not of type int.
 
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed, because the cast confirms and enforces this behavior (i.e. the 
value SHALL be truncated, if necessary).
Additionally: Why uint16_least is not (unsigned) int? -> this data type fulfills all requirements on a 
16 bit unsigned value...
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround necessary.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
388


Issue Report
ESCAN00068434
Compiler warning: conditional expression or part of 
it is always true/false

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
4.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
- Compiler warns for "condition is always true": This may happen depending on configuration, i.e. 
assert checks
in function Can_SetControllerMode following code is available
...
 transitionRequest = kCanRequested;
 
 CanMicroModeRestore();
 }
 if ( transitionRequest == CAN_NOT_OK ) /* PRQA S 3355,3356,3358,3359 */ /* MD_Can_13.7 */
 { /* PRQA S 3201 */ /* MD_Can_3201 */
 retval = CAN_NOT_OK;
 transitionDone = CAN_NOT_OK; /* at least one HW channel is not in new state (CAN_MSR40: poll 
later) */
 }
..
this issues following compiler warning:
 if ( transitionRequest == CAN_NOT_OK ) - warning (dcc:1606): conditional expression or part of 
it is always true/false
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
All configurations.
but not for all Platform implementations (hw always return OK for state transition)
 
Resolution Description:
Workaround:
--------------------------
Ignore warning
389


Issue Report
ESCAN00068872
Compiler warning: the order of volatile accesses is 
undefined in this statement

Component@Subcomponent:
DrvCan__coreAsr@Implementation
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
---------------------------------------------------------------
Compiler issues warning messages like this:
undefined behavior: the order of volatile accesses is undefined in this statement
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Rx Queue is enabled
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore Warning
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
390


Issue Report
ESCAN00074793
Compiler warning: Condition is always constant
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
4.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning 'Condition is always constant'
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Configurations without DTCs
AND
Precompile configuration
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The warning can be ignored
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
391


Issue Report
ESCAN00086650
Compiler warning: pointless comparison of unsigned 
integer with zero

Component@Subcomponent:
SysService_AsrCsm@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The generic range check may produce a compiler warning if the CSM_OFFSET_* of a specific 
service is zero as the range check will compare "uint16 >= 0" which is always TRUE.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Every configuration with some compiler.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00088061
BswM_Lcfg.c: warning: 'function' : conversion from 
'const 
BswM_ImmediateUserStartIdxOfModeReqeustMappingType' 
to 'BswM_SizeOfImmediateUserType', possible loss 
of data

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
7.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
BswM_Lcfg.c: warning: 'function' : conversion from 'const 
BswM_ImmediateUserStartIdxOfModeReqeustMappingType' to 'BswM_SizeOfImmediateUserType', 
possible loss of data
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
All
 
Resolution Description:
392


Issue Report
ESCAN00089241
Compiler warning: multiple warnings
Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
- Compiler warns for possible loss of data: Check if cast is missing and if there is really a data loss 
due to an implicit/explicit cast on the target platform
- Compiler warns for ambiguous code, parentheses recommended.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Always.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
393


Issue Report
ESCAN00089425
Compiler warning: missing braces around initializer
Component@Subcomponent:
SysService_CryptoCv@Impl_ESLib
First affected version:
1.01.01
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiling file: ../../../BSW/SecMod/ESLib_version.c
ctc W542: ["../../../BSW/SecMod/ESLib_version.c" 73/4] missing braces around initializer
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Since ESLib_version.c is only used for component testing, it can be excluded from the build for 
integration.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
394


Issue Report
ESCAN00089543
Compiler warning: dead assignment to "errorId" 
eliminated

Component@Subcomponent:
Nm_Asr4NmIf@Implementation
First affected version:
7.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A compiler warning similar to the following one occurs for the compilation of Nm.c:
dead assignment to "errorId" eliminated
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
'Dev Error Detect' (/MICROSAR/Nm/NmGlobalConfig/NmGlobalProperties/NmDevErrorDetect) in 
the NmGlobalProperties container is turned OFF in the 'Network Management General' / 'Basic 
Editor' in DaVinci Configurator (-> Nm_Cfg.h contains #define NM_DEV_ERROR_REPORT 
STD_OFF).
 
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed due to the API pattern that Vector has decided to use: each API 
that may report development errors shall always have an errorId variable on the stack to which 
assignments are made - regardless of whether the variable is actually used or not.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
395


Issue Report
ESCAN00089544
Compiler warning: conversion to 'uint8' from 'int' 
may alter its value

Component@Subcomponent:
Nm_Asr4NmIf@Implementation
First affected version:
9.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warnings similar to the following one occur for the compilation of Nm.c:
conversion to 'uint8' from 'int' may alter its value
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
'Coordinator Support Enabled' (/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/
NmCoordinatorSupportEnabled) is turned ON in the 'Network Management General' / 'Basic Editor' 
in DaVinci Configurator (-> Nm_Cfg.h contains #define NM_COORDINATOR_SUPPORT_ENABLED 
STD_ON)
AND
(
'Remote Sleep Ind Enabled' (/MICROSAR/Nm/NmGlobalConfig/NmGlobalFeatures/
NmRemoteSleepIndEnabled) is turned OFF in the 'Network Management General' / 'Basic Editor' in 
DaVinci Configurator (-> Nm_Cfg.h contains #define NM_REMOTE_SLEEP_IND_ENABLED 
STD_OFF)
OR
all coordinated channels have 'Channel Sleep Master' (/MICROSAR/Nm/NmChannelConfig/
NmChannelSleepMaster) turned ON in the 'Network Management General' / 'Basic Editor' in 
DaVinci Configurator (-> Nm_Cfg.h contains #define NM_OPTIMIZE_ALL_SLEEP_MASTER STD_ON)
OR
all coordinated channels have 'Synchronizing Network' (/MICROSAR/Nm/NmChannelConfig/
NmSynchronizingNetwork) turned ON in the 'Network Management General' / 'Basic Editor' in 
DaVinci Configurator (-> Nm_Cfg.h contains #define NM_OPTIMIZE_ALL_SYNC_CHANNEL 
STD_ON)
)
 
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed because there is no risk of an invalid conversion of value to uint8.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
396


Issue Report
ESCAN00090114
Compiler Warning: Assignment in condition
Component@Subcomponent:
SysService_CryptoCv@Impl_actCLib
First affected version:
1.00.00
Fixed in versions:
2.09.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiling file: ../../../BSW/SecMod/actBNReduce.c
../../../BSW/SecMod\actBNReduce.c(117): WARNING C5909: Assignment in condition
Compiling file: ../../../BSW/SecMod/actBigNum.c
../../../BSW/SecMod\actBigNum.c(234): WARNING C5909: Assignment in condition
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
in all configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
397


Issue Report
ESCAN00090161
Compiler warning: condition evaluates always to 
true/false

Component@Subcomponent:
Ccl_Asr4ComMCfg5@Implementation
First affected version:
7.00.01
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for conditional expression being constant
a) in the function ComM_Init() when checking the generated data. Compiler warns about condition 
being always false in the following conditions:
if (ComM_GetWakeupStateOfChannel(ComM_ChannelIndex) >= 
COMM_MAX_NUMBER_OF_STATES)
if (ComM_GetSizeOfChannel() != ComM_GetSizeOfChannelPb())
if (ComM_GetSizeOfPnc() != ComM_GetSizeOfPncPb())
As secondary effect compiler might warn about unreachable code/statement.
b) in the function ComM_PncProcessRxSignalEra() compiler warns about condition being always 
true in
if(ComM_IsSynchronizedOfPnc(pncIndex))
c) in the functions ComM_PncSetBitInSignal() and ComM_PncClearBitInSignal() when checking the 
generated data. Compiler warns about condition being always true in
if( signalByteIndex < ComM_GetSizeOfPncSignalValues() )
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
a) occurs when COMM_DEV_ERROR_DETECT == STD_ON
b) occurs when
- 'Pnc Support' is enabled in ComM (/MICROSAR/ComM/ComMGeneral/ComMPncSupport)
AND
- 'Pnc Gateway Enabled' is enabled in ComM (/MICROSAR/ComM/ComMGeneral/
ComMPncGatewayEnabled)
AND
- Only one PNC exists (COMM_ACTIVE_PNC == 1U, can be found in ComM_Cfg.h).
c) occurs when 'Pnc Support' is enabled in ComM (/MICROSAR/ComM/ComMGeneral/
ComMPncSupport)
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed because no simple remedy exist.
The warning is caused by an if-statement applied on external configuration data. Configuration 
data is const for the given compilation context but might be changed at post-build time.
 
Resolution Description:
398


Issue Report
ESCAN00090806
Compiler warning: C4310: cast truncates constant 
value

Component@Subcomponent:
Gw_AsrPduRCfg5@Implementation
First affected version:
7.00.00
Fixed in versions:
11.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for cast truncates constant value
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If the uint8_least is of type unsigned char
The Platform_Types.h contains the following define
typedef unsigned char uint8_least; /* At least 8 bit */
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed due to ensure that the init value is large enough. A cast to a 
smaller value is acceptable and has no impact on the application. 
#define PDUR_INVALID_VARARRAYIDX ((uint16)0xFFFF) is cast for unsigned char to 0xFF which is 
correct.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
ignore the warning
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
399


Issue Report
ESCAN00090831
Compiler warning: integer conversion resulted in a 
change of sign

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns that "integer conversion resulted in a change of sign".
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If the compiler WindRiver Diab is used. (found with version 5.9.4.2.)
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
400


Issue Report
ESCAN00091295
Compiler warning: dead assignment / variable set 
but not used

Component@Subcomponent:
Ccl_Asr4ComMCfg5@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns about an useless assignment to a local variable. Typically the warnings refer to 
local variables 'channel', 'errorId', 'Status' or 'User'.
Example compiler warning strings: 
"Useless assignment to variable 'abc'. Assigned value not used."
"Removed dead assignment"
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
EcuC Parameter 'Dummy Statement Kind' is set to 'SelfAssignment'. This can be detected in 
ComM_Cfg.c: #define COMM_DUMMY_STATEMENT(v) (v)=(v)
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed because no simple remedy exist.
If Dummy Statement is switched off, other compiler warnings might occur e.g. "Unused/
unreferenced variable".
 
Resolution Description:
401


Issue Report
ESCAN00091340
Compiler warning: cast truncates constant value
Component@Subcomponent:
If_AsrIfCan@Implementation
First affected version:
5.00.00
Fixed in versions:
6.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile warning occurs.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If partial network wakeup PDU filtering is active. 
(canifcfg.h: CANIF_PN_WU_TX_PDU_FILTER == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available. Issue is checked and not critical.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
402


Issue Report
ESCAN00091343
Compiler warning: warning C4310: cast truncates 
constant value

Component@Subcomponent:
If_AsrIfCan@Implementation
First affected version:
6.09.00
Fixed in versions:
6.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile warning occurs.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If transmit buffer is configured as FIFO and cancel API is supported.
(canifcfg.h: CANIF_TRANSMIT_BUFFER_FIFO == STD_ON && CANIF_CANCEL_SUPPORT_API == 
STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available. Warning was checked, not critical.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
403


Issue Report
ESCAN00091547
Compiler warning: condition is always false
Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
11.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for "condition is always true/false"
Some compiler will also warn because of dead code, resulting from the constant condition
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Dem/DemGeneral/DemSafeBswModeEnabled == TRUE
AND
EcuC/EcucGeneral/EcuCSafeBswChecks == TRUE or undefined
Depending on the configuration, optimization can change a configuration table into a constant 
macro. 
This can causes some run-time checks to check for equality of two constants.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The warning can be ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
404


Issue Report
ESCAN00092315
Compiler warning: function 
"CanLL_WakeUpHandling" was declared but never 
referenced

Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.00.00
Fixed in versions:
2.10.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning occurs: "function "CanLL_WakeUpHandling" was declared but never referenced"
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If "Sleep /Wake-up Functionality" is activated in the configuration (leading to the definition of 
C_ENABLE_SLEEP_WAKEUP).
 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
405


Issue Report
ESCAN00092713
Preprocessor parse error
Component@Subcomponent:
DrvCan_Mpc5700McanLl@Implementation
First affected version:
2.07.00
Fixed in versions:
2.10.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Preprocessor stops with parsing error.
When does this happen:
-------------------------------------------------------------------
At compilation time.
In which configuration does this happen:
-------------------------------------------------------------------
Only for CANbedded 
AND
Range Filtering is used (C_ENABLE_RANGE_x is defined).
 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
406


Issue Report
ESCAN00094232
Compiler warning: "conditional expression is 
constant"

Component@Subcomponent:
Nm_Asr4NmCan@Implementation
First affected version:
6.03.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
cannm.c(2649): warning C4127: conditional expression is constant
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- CanNm is only active on one ComM (System Channel)
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmApiOptimization' is ON
AND
- '/MICROSAR/CanNm/CanNmGlobalConfig/CanNmDevErrorDetect' is ON 
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed due to AN-ISC-8-1184_Compiler_Warnings.pdf
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
407


Issue Report
ESCAN00095299
Compiler warning: Mismatch between signature of 
function declarations and definitions

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns that a static declaration of a function follows a non-static declaration, for example
DCM_LOCAL_INLINE FUNC(Std_ReturnType, DCM_CODE) Dcm_Svc2EExecuteOp(...);
DCM_LOCAL FUNC(Std_ReturnType, DCM_CODE) Dcm_Svc2EExecuteOp(...) {...}
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x2E is supported (in Dcm_Cfg.h: DCM_SVC_2E_SUPPORT_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore compiler warning.
Resolution:
-------------------------------------------------------------------
Modify definition of function to match its declaration.
408


Issue Report
ESCAN00095459
Compiler warning: Crc.c: constant out of range
Component@Subcomponent:
SysService_AsrCrc@Implementation
First affected version:
5.04.00
Fixed in versions:
5.04.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Typical compiler warnings explanations may be:
Crc.c: constant out of range
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
The compiler warning is only relevant if CRC64 routine is used.
In which configuration does this happen:
-------------------------------------------------------------------
Only relevant if CRC64 algorithm is used and
if implementation of used compiler does not adhere to C99 standard: 0xFFFFFFFFFFFFFFFFuL is 
interpreted as 32bit literal by compiler due to incorrect suffix. 
According to C99 standard (ISO/IEC 9899:1999 Ch. 6.4.4.1) the suffix should not matter and the 
literal should be interpreted as 64bit.
Known compiler, which are affected by this issue and lead to incorrect CRC calculation: Wind River 
(v5.9.4.4)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
In Crc.c
#define CRC_FINAL_XOR_CRC64 (0xFFFFFFFFFFFFFFFFuL)
should be changed to
#define CRC_FINAL_XOR_CRC64 (0xFFFFFFFFFFFFFFFFuLL)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
409


Issue Report
ESCAN00095486
Compiler warning: Function 
"Dcm_Svc14_XX_RepeaterProxySelectDTC" was 
declared but never referenced

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
GreenHills embedded compiler warns that functions are declared but never referenced:
Dcm_Svc14_XX_RepeaterProxySelectDTC
Dcm_Svc14_XX_RepeaterProxyCheckSelectionResult
Dcm_Svc14_XX_RepeaterProxySelectDTC
Dcm_Svc14_XX_RepeaterProxyCheckSelectionResult
When does this happen:
-------------------------------------------------------------------
The warning is issued by the GreenHills embedded compiler during compilation of the code in case 
the configuration is as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x14 is supported (in Dcm_Cfg.h: DCM_SVC_14_SUPPORT_ENABLED == STD_ON)
AND
- DCM is configured to use DEM API versions other than 4.3.0 (in Dcm_Cfg.h: 
DCM_DEM_API_430_ENABLED == STD_OFF)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore compiler warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
410


Issue Report
ESCAN00095488
Datatype conversion for description routing, 
possible loss of Data

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
11.00.00
Fixed in versions:
13.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The Compiler warns for possible loss of data caused by DataType conversion
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
In configurations with description routing configured
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
411


Issue Report
ESCAN00095508
Compiler warning: Function 
"Dcm_MemMgrWriteMemory" was declared but 
never referenced

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
GreenHills embedded compiler warns that function Dcm_MemMgrWriteMemory is declared but 
never referenced.
-------------------------------------------------------------------
The warning is issued by the GreenHills embedded compiler during compilation of the code in case 
the configuration is as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x3D is not supported (in Dcm_Cfg.h: DCM_SVC_3D_SUPPORT_ENABLED == STD_OFF)
AND
- Direct memory access is supported (in Dcm_Cfg.h: DCM_MEMMGR_SUPPORT_ENABLED == 
STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
412


Issue Report
ESCAN00095513
Compiler warning: Function 
"Dcm_MemMgrReadMemory" was declared but 
never referenced

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
7.02.00
Fixed in versions:
8.03.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
GreenHills embedded compiler warns that function Dcm_MemMgrReadMemory is declared but 
never referenced.
-------------------------------------------------------------------
The warning is issued by the GreenHills embedded compiler during compilation of the code in case 
the configuration is as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x23 and 0x2C 0x02 are not supported (in Dcm_Cfg.h: 
DCM_SVC_23_SUPPORT_ENABLED == STD_OFF && DCM_SVC_2C_02_SUPPORT_ENABLED == 
STD_OFF)
AND
- Direct memory access is supported (in Dcm_Cfg.h: DCM_MEMMGR_SUPPORT_ENABLED == 
STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
413


Issue Report
ESCAN00095530
Compiler warning: variable "lERecStoredIndex" was 
set but never used

Component@Subcomponent:
Diag_Asr4Dem@Implementation
First affected version:
11.00.00
Fixed in versions:
12.01.04, 13.05.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler specific warning message: variable lERecStoredIndex is not used
This specific warning is caused by the unused variable 'lERecStoredIndex' in functions 
'Dem_Dcm_CopyERec() and Dem_Dcm_CopyERecs()'
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
All containers Dem/DemGeneral/DemExtendedDataRecordClass only reference 
Dem/DemGeneral/DemDataClass which have parameter Dem/DemGeneral/DemDataClass/
DemDataElementInternalData set
AND 
At least on Dem/DemConfigSet/DemEventParameter references a Dem/DemGeneral/
DemExtendedDataRecordClass
AND
The compiler used emits this specific warning.
Hint: in affected configurations, DEM_CFG_SUPPORT_USER_ERECS is generated to STD_OFF
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The warning can be ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
414


Issue Report
ESCAN00095542
Compiler warning: 
'PduR_RmIf_SingleBufferHandling' declared 'static' 
but never defined

Component@Subcomponent:
Gw_AsrPduRCfg5@Implementation
First affected version:
9.00.00
Fixed in versions:
10.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for 'PduR_RmIf_SingleBufferHandling' declared 'static' but never defined.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
If a Fifo queued communication interface routing is configured but no single buffer routing exits.
- any routing with 
/MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/PduRDestPdu/
PduRDestPduQueueDepth > 1
AND no routing with
/MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/PduRDestPdu/
PduRDestPduQueueDepth == 1
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
ignore the warning. Only a unnecessary function declaration.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
415


Issue Report
ESCAN00095907
Compiler warning: Com.c(4142): warning C4100: 
'idxFilterInfo' : unreferenced formal parameter

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
2.01.00
Fixed in versions:
13.03.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused define which is used in a special configuration: Can be accepted
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
In configurations with comstackLib optimizations enabled:
/MICROSAR/Com/ComGeneration/ComBoolDataInArrayOfStructStrategy : TRUE
/MICROSAR/Com/ComGeneration/ComDataDeduplicationStrategy: WITH_CAST
/MICROSAR/Com/ComGeneration/ComDeduplicateIndirectedData : Enabled
/MICROSAR/Com/ComGeneration/ComOutOfBoundsWriteProtectionStrategy : NONE
/MICROSAR/Com/ComGeneration/ComReduceBoolDataByNumericalOperandStrategy: 
WITH_ANY_VALUE
/MICROSAR/Com/ComGeneration/ComReduceConstantData2Define : Enabled
All comstackLib optimizations which are not mentioned above have following configuration:
Thresholds are set to 0 and all other comstackLib checks are disabled.
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
416


Issue Report
ESCAN00096038
Compiler warning: Passing of incompatible pointers
Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.00.00
Fixed in versions:
1.16.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warns that an incompatible pointer is passed to a server runnable.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains a client-server connection and when the client 
operation only uses a primitive out parameter
whereas the server operation uses an array.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use the same data types on both sides of the client-server connection.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00096133
Compiler warning: warning C4310: cast truncates 
constant value

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
1.00.01, 2.01.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following compiler warning is thrown:
"..\..\..\..\external\BSW\Xcp\Xcp.c(5699): warning C4310: cast truncates constant value"
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations where XCP_GET_SESSION_STATUS_API is enabled.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available beside disabling XCP_GET_SESSION_STATUS_API.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
417


Issue Report
ESCAN00096246
Compiler warning: C4100: 'CanId' : unreferenced 
formal parameter

Component@Subcomponent:
If_AsrIfCan@Implementation
First affected version:
6.13.00
Fixed in versions:
6.14.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning: C4100: 'CanId' : unreferenced formal parameter
-> Affected API: CanIf_HlIndicationSubULCall()
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- CANIF_SUPPORT_NMOSEK_INDICATION == STD_OFF [see file: CanIf_Cfg.h]
and
- CANIF_META_DATA_RX_SUPPORT == STD_ON [see file: CanIf_Cfg.h]
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The compiler warning is not critical and hence please ignore it.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
418


Issue Report
ESCAN00096376
Compiler warning: Unreachable code in 
ESLib_EdDSA.c

Component@Subcomponent:
SysService_CryptoCv@Impl_ESLib
First affected version:
2.05.00
Fixed in versions:
2.06.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The code of ESLib_EdDSA.c has statements which are not reachable. This can lead to an compiler 
warning on some compilers.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Elliptic Curve Digital Signature Algorithm is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
419


Issue Report
ESCAN00096911
Compiler warning: type qualifier is meaningless on 
cast type

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
3.00.00, 1.00.01
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler throws several warnings of the type:
"../Core/BSW/Xcp/Xcp.c", line 4844: warning #191-D: type qualifier is meaningless on cast type
 daqNumber = Xcp_GetVal16(&CmdPtr[XCP_CRO_ALLOC_ODT_ENTRY_DAQ]);
This warning warns about an unneccessary cast and can be ignored.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
all configurations 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
420


Issue Report
ESCAN00096913
Compiler warning: Static function 
'Rte_QUnqueueElementCallbackSpecific<OsApplicationName>()' 
is not used within this translation unit

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.04.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused function. 
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
On a partitioned or multicore system with fanin queued communication at least on one partition/
core and no queued communication on another partition/core. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
421


Issue Report
ESCAN00097289
Compiler warning: integer literal is too large to be 
represented in a signed integer type, interpreting as 
unsigned

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.05.00
Fixed in versions:
1.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler issues a warning: integer literal is too large to be represented in a signed integer type, 
interpreting as unsigned when
a lower limit define from the RTE is used.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains application data type that are mapped to signed 64-
bit integer types
and when the lower limit is configured to -9223372036854775808.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
422


Issue Report
ESCAN00097375
Compiler warning: 'lTxHdl' : local variable is 
initialized but not referenced

Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
3.02.00
Fixed in versions:
3.03.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following warning is issued during compilation:
'lTxHdl' : local variable is initialized but not referenced
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
This warning is issued in configurations where a single Tx SDU exists (i.e., the macro 
CANTP_NUM_TX_SDUS is defined as 1).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
423


Issue Report
ESCAN00097692
Compiler warning: conversion from 'int' to 
'Dcm_CfgNetBufferSizeOptType'

Component@Subcomponent:
Diag_Asr4Dcm@Implementation
First affected version:
4.01.00
Fixed in versions:
9.02.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for possible loss of data: Check if cast is missing and if there is really a data loss 
due to an implicit/explicit cast on the target platform
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
- Service 0x22 is supported and handled by DCM (in Dcm_Cfg.h: #define 
DCM_SVC_22_SUPPORT_ENABLED == STD_ON)
AND
- DCM is configured to support DIDs with multiple signals (in Dcm_Cfg.h: #define 
DCM_DIDMGR_MULTISIGNAL_ENABLED == STD_ON)
AND
- At least one DID supports read operation (in Dcm_Cfg.h: #define 
DCM_DIDMGR_OPTYPE_READ_ENABLED == STD_ON)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warnings, since there is no danger of data value truncation.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
424


Issue Report
ESCAN00097790
Compiler warning: 'CanTpTxSduId' : unreferenced 
formal parameter

Component@Subcomponent:
Tp_Asr4TpCan@Implementation
First affected version:
3.02.00
Fixed in versions:
3.03.02
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following warning is issued during compilation:
'CanTpTxSduId' : unreferenced formal parameter
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
The warning is issued in configurations fulfilling all of the following conditions:
1. The macro CANTP_DEV_ERROR_DETECT has been defined as STD_OFF.
2. The macro CANTP_CONFIGURATION_VARIANT has been defined as 
CANTP_CONFIGURATION_VARIANT_PRECOMPILE.
3. The macro CANTP_NUM_TX_SDUS has been defined as 1.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
425


Issue Report
ESCAN00097980
Compiler warning: Unreferenced formal parameter 
due to reduction of rom data

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning occurs: Unreferenced formal parameter 
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
/MICROSAR/Com/ComGeneration/ComReduceConstantData2Define is enabled
OR
/MICROSAR/Com/ComGeneral/ComOptimizeConstArrays2Define is enabled (in older releases).
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed due to existence of a sufficient workaround.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Disable 
/MICROSAR/Com/ComGeneration/ComReduceConstantData2Define (in newer releases)
OR
/MICROSAR/Com/ComGeneral/ComOptimizeConstArrays2Define (in older releases).
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
426


Issue Report
ESCAN00098038
Compiler warning: number of arguments don't 
match

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.13.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for a mismatch in number of arguments.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Two port prototypes use the same port interface AND
the transformer error handling flags differ for one data element prototype AND
the generated API is Rte_Write, Rte_Send, Rte_Invalidate, Rte_Read, Rte_DRead or Rte_Receive 
AND
the component needs a port data structure.
 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ensure that the error handling flags are the same for all interfaces in a port data structure.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
427


Issue Report
ESCAN00098070
Compiler warning: NvM_Cfg.c: 'ServiceId' : 
unreferenced formal parameter

Component@Subcomponent:
MemService_AsrNvM@GenTool_GeneratorMsr
First affected version:
3.01.02
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
1> NvM_Cfg.c
1>..\..\Appl\GenDataVtt\NvM_Cfg.c(588): warning C4100: 'ServiceId' : unreferenced formal 
parameter
with Visual Studio compiler
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration with disabled NvMMultiBlockCallback and 
NvMBswMMultiBlockJobStatusInformation
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
428


Issue Report
ESCAN00098195
Compiler warning: possible loss of data when least 
types are larger than the platform types

Component@Subcomponent:
Rte_Core@Implementation
First affected version:
1.11.00
Fixed in versions:
1.18.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns that casting <dt>_least to <dt> may result in a loss of data.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
This happens when the configuration contains varialble length arrays.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
ESCAN00099190
Compiler warning: BswM_Lcfg.c(2990): warning 
C4100: 'handleId' : unreferenced formal parameter

Component@Subcomponent:
SysService_Asr4BswMCfg5@GenTool_GeneratorMsr
First affected version:
6.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns about C4100: 'handleId' : unreferenced formal parameter in BswM_Lcfg.c.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations which use actions of type BswMTimerControl.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
429


Issue Report
ESCAN00099286
Compiler warning: unused parameter 
'ipduGroupVector' and 'initialize' in function 
'Com_IpduGroupControl'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
1.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused argument: Can be accepted - is usually because of a standardized 
API which doesn't respect unused parameters in special configurations
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where COM_ACTIVATABLERXCOMIPDUS and COM_ACTIVATABLETXCOMIPDUS is 
defined to STD_OFF.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
430


Issue Report
ESCAN00099287
Compiler warning: unused parameter 
'deferredfctPtrCacheStrctPtr' in function 
'Com_RxProcessDeferredPDU'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
10.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused argument: Can be accepted - is usually because of a standardized 
API which doesn't respect unused parameters in special configurations
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where
COM_EXISTS_DEFERRED_SIGNALPROCESSINGOFRXPDUINFO is defined to STD_ON
AND
COM_COM_RXSIGINFOENDIDXOFRXPDUINFO is defined to STD_OFF
AND
COM_RXSIGGRPINFOINDENDIDXOFRXPDUINFO is defined to STD_OFF.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
431


Issue Report
ESCAN00099291
Compiler warning: unused parameter 'PduInfoPtr' 
in function 'Com_RxSignalProcessing'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
12.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused argument: Can be accepted - is usually because of a standardized 
API which doesn't respect unused parameters in special configurations
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where
/MICROSAR/Com/ComConfig/ComSignal/ComBitSize is set to zero for all configured rx signals.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
432


Issue Report
ESCAN00099292
Compiler warning: unused parameter 'idxTxSigInfo' 
in function 'Com_SendSignal_WriteSignal'

Component@Subcomponent:
Il_AsrComCfg5@Implementation
First affected version:
9.00.00
Fixed in versions:
15.00.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for an unused argument: Can be accepted - is usually because of a standardized 
API which doesn't respect unused parameters in special configurations
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration where
1) /MICROSAR/Com/ComConfig/ComSignal/ComBitSize is set to zero for all signals
2) No signalGroups are configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
433


Issue Report
ESCAN00099981
Compiler warning: the order of volatile accesses is 
undefined

Component@Subcomponent:
Cp_Asr4Xcp@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler issues the following warning:
Xcp.c:
 if ( ((Xcp_ChannelInfo[XCP_CHANNEL_IDX].SendStatus & (uint8)XCP_SEND_PENDING) == 0u)
 ^
 "Xcp\Xcp.c",2166 Warning[Pa082]: undefined behavior: the order of volatile accesses is 
undefined in this statement
 (void)Xcp_CallTlFunction_3_Param( XCP_CHANNEL_IDX,
 ^
 "Xcp\Xcp.c",2174 Warning[Pa082]: undefined behavior: the order of volatile accesses is 
undefined in this statement
There is an access to two volatile variables in theses statements. The order of access is not 
guaranteed.
The variables are RAM only variables and not dependent on each other, so access can happen 
independently.
Therefore this warning does not cause an issue and can be accepted.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code.
The used compiler information is:
Version: IAR ANSI C/C++ Compiler V8.20.1.14183/W32 for ARM
VectorDefaultOptions: --cpu Cortex-M4 --fpu=none --cpu_mode=thumb --endian=little -On --
debug --header_context -e
VectorBuildEnvironmentOptions: -DBRS_DERIVATIVE_S32K144 -DBRS_OSC_CLK=8 -
DBRS_TIMEBASE_CLOCK=80 -DBRS_OS_USECASE_BRS -DBRS_EVA_BOARD_HSR_706 -
DBRS_PROGRAM_CODE_LOCATION_FLASH -DBRS_VECTOR_TABLE_LOCATION_FLASH -
DBRS_CPU_CORE_CORTEX_M4 -DBRS_STACK_SIZE=0x2500 -DBRS_PLATFORM_ARM -
DBRS_COMP_IAR -DBRS_INSTRUCTION_SET_THUMB -lc lst/.lst -oobj\.o
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
434


Issue Report
ESCAN00100176
Compiler warning: cast truncates constant value
Component@Subcomponent:
If_AsrIfCan@Implementation
First affected version:
5.00.00
Fixed in versions:
6.17.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warns for a truncation of a constant value due to cast.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
CANIF_WAKEUP_VALIDATION is enabled AND CANIF_WAKEUP_VALID_ALL_RX_MSGS is disabled 
AND CANIF_WAKEUP_VALID_ONLY_NM_RX_MSGS is enabled
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available. Warning was checked, not critical.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
435


Issue Report
ESCAN00100182
Compiler warning: A value that cannot be used to 
initialize an entity with a function pointer type

Component@Subcomponent:
Gw_AsrPduRCfg5@GenTool_GeneratorMsr
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for a value that cannot be used to initialize an entity with a function pointer type 
with MSN_CopyRxData, MSN_CopyTxData and MSN_StartOfReception.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration using a BSW or CDD adjacent to the PduR which has been implemented based 
on an AUTOSAR Specification that uses const in API parameters of MSN_CopyRxData, 
MSN_CopyTxData and MSN_StartOfReception.
The AUTOSAR Specifications have been changed multiple times between ASR 4.00.03 and today.
There is no common solution for all versions possible and you have to accept the compile warning 
until all components in the system have implemented the Com-Stack API harmonization 
introduced with ASR 4.03.00.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
 
436


Issue Report
3. New Issues for Information
Issues which should not have an effect on the usage of the license as the issues are relevant for 
use cases other than those defined in the questionnaire. The list contains issues that have been 
detected since the last report.
Issues listed in this section are not relevant for the use case that has been documented in the 
questionnaire provided to Vector. However, the issues may be relevant for other use cases.  Also 
issues that have been accepted or are tolerated by the OEM (as defined in the questionnaire) are 
reported here. 
No issue to be reported.
437



Issue Report
4. Report Legend
438


Issue Report
5. 3rd Party Software Issues
This issue report does not include issues of 3rd party software. If 3rd party software was included 
in the SIP, the documentation of the issue reporting process is included in the SIP: .\Doc
\DeliveryInformation\IssueHandling_<Name>.pdf. Please follow the given instructions.
439


Issue Report
6. Quality Management Contact
Quality Management 
Productline Embedded Software (PES)  
 
Vector Informatik GmbH  
Ingersheimer Str. 24  
D-70499 Stuttgart  
 
Phone: +49 711 80670-3700
Fax: +49 711 80670-399  
eMail: QualityPES@vector.com
440

Document Outline


1.3.35 - ProductInformation_2_MICROSAR4

MICROSAR 4

1.3.37 - ProductInformation_2_MICROSAR4s


 
 
 
 
 
 
 
 
 
 
 
 
MICROSAR 4 
Product Information 
 
  
Version 1.00.03 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
 
 
 
  
 
 


Product Information MICROSAR 4 
Contents 
1 
Introduction................................................................................................................... 4 
2 
General Information ...................................................................................................... 5 
2.1 

Compiler Warnings............................................................................................. 5 
2.2 
Delivery of Stub Modules ................................................................................... 5 
2.3 
Scope of Delivery ............................................................................................... 5 
2.3.1 

Test Report ........................................................................................ 5 
2.3.2 
MISRA ............................................................................................... 6 
2.4 
Test of External Hardware .................................................................................. 6 
2.5 
Test of 3rd Party Modules.................................................................................... 6 
2.6 
Usage of Features that are not Licensed ........................................................... 6 
2.7 
Issue Tracking .................................................................................................... 7 
2.7.1 

DaVinci Tools ..................................................................................... 7 
2.8 
Warranty ............................................................................................................ 7 
2.8.1 

3rd Party Modules ............................................................................... 7 
3 
Modules and Options ................................................................................................... 8 
3.1 

DBG ................................................................................................................... 8 
3.2 
DLT (XCP-based) ............................................................................................... 8 
3.3 
DLT (AUTOSAR) ................................................................................................ 8 
3.4 
Drivers (CAN, LIN, FR, ETH, MCAL) .................................................................. 8 
3.5 
FEE.................................................................................................................... 8 
3.6 
IDM - Variant Handling / Post-Build Selectable................................................... 9 
3.7 
MCAL Integration Package ................................................................................ 9 
3.8 
OS ................................................................................................................... 10 
3.8.1 

Option: Multi-Core ............................................................................ 10 
3.8.2 
Option: Schedule Table Synchronization .......................................... 10 
3.9 
PBL - Post-Build Loadable ............................................................................... 10 
3.10 
RTE ................................................................................................................. 11 
3.11 
WDGM ............................................................................................................. 11 
4 
SIP Extensions ............................................................................................................ 12 
4.1 

Customer Hardware ......................................................................................... 12 
4.2 
Start Application ............................................................................................... 12 
5 
Definition of SLP/HLP/SIP, Maintenance and Release Types ................................... 14 
5.1 

Software License Package (SLP) ..................................................................... 14 
5.2 
Hardware License Package (HLP) ................................................................... 14 
5.3 
Software Integration Package (SIP) ................................................................. 15 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
5.4 
Mini SIP ........................................................................................................... 15 
5.5 
SIP Types ........................................................................................................ 15 
5.5.1 

Beta ................................................................................................. 15 
5.5.2 
Production ........................................................................................ 16 
5.5.3 
Update ............................................................................................. 16 
5.5.4 
Prototype ......................................................................................... 16 
5.5.5 
Overview SIP Types ......................................................................... 16 
5.6 
Maintenance .................................................................................................... 17 
5.6.1 

SLP Maintenance ............................................................................. 17 
5.6.2 
HLP Maintenance............................................................................. 17 
5.6.3 
SIP Maintenance .............................................................................. 17 
5.6.4 
Differentiation of warranty versus maintenance ................................ 18 
5.7 
Release Types ................................................................................................. 18 
5.7.1 

QuickFix ........................................................................................... 18 
5.7.2 
Development .................................................................................... 19 
5.7.3 
Pre Production ................................................................................. 19 
5.7.4 
Production ........................................................................................ 19 
5.7.5 
Production (Safe) ............................................................................. 19 
 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
1  Introduction 
All modules and options are described in the general Product Information (please refer to 
the link “Product Descriptions”). 
In addition to the general Product Information, this document provides additional details to 
the offered items. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 



Product Information MICROSAR 4 
2  General Information 
 
 
Note 
This chapter provides important information that applies for using MICROSAR basic 
  software. 
 
 
2.1 
Compiler Warnings 
Due  to  the  use  of  standard  software  modules  for  a  huge  number  of  different  hardware 
platforms and different compilers it is not possible to avoid compiler warnings completely. 
Vector tries to keep its software free of warnings, but in some cases it is not possible or it 
may decrease performance. 
Vector provides a list of known compiler warnings with each delivery of a Production SIP. 
2.2 
Delivery of Stub Modules  
The delivery (SIP) may include implementations for BSW modules which are only sample 
code and only intended to illustrate an example of a possible BSW implementation (“Stub-
Modules”). 
>  Stub-Modules are not part of the ordered BSW modules and have been added by 
Vector voluntarily and free of charge solely in order to provide to the customer 
additional support by facilitating a preliminary assembly and test of the ordered BSW 
modules.  
>  Stub-Modules have not passed any quality control measures at Vector and are not 
intended for use in production.  
>  Stub-Modules may only be used as a starting point for an own implementation if  
>  the Stub-Modules are modified by the customer to the extent necessary; and  
>  the complete implementation, including the Stub-Modules and any other parts 
provided by Vector, are executed and tested by the customer with diligent care. 
>  Stub-Modules can be identified by the comment section “SAMPLE CODE ONLY” in the 
implementation files. The implementation of Stub-Modules can be found in 
BSW\<Msn>_Stub. Generated files are located in the generator “Source” folder using 
the naming convention <Msn>_Stub.c/h. 
2.3 
Scope of Delivery 
Each delivery contains the ordered software modules including their generators as well as 
the corresponding documentation. In addition there will be the following items included or 
available. 
2.3.1 
Test Report 
Each delivery of a Production SIP includes a report about executed tests and their results. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
Test  specifications  are  not  part  of  a  delivery,  but  they  can  be  reviewed  at  Vector  upon 
request. 
2.3.2 
MISRA 
The offered basic software modules will be checked for compliance with the MISRA rules 
(MISRA-C:2004, QAC 7.0) based on typical configurations.  On request  we will send you 
the list of exceptions. 
A test report based on the customer’s configuration has to be ordered explicitly. 
2.4 
Test of External Hardware 
Delivery  tests  are  able  to  incorporate  testing  of  external  hardware  such  as  EEPROM, 
watchdog or transceiver devices, which are connected to the micro controller e.g. through 
SPI or DIO pins. 
As DIO driver and SPI driver controlling the external devices are part of the MCAL, it is a 
prerequisite to order the SIP position “MCAL Integration” when external devices  shall be 
tested during delivery tests. 
2.5 
Test of 3rd Party Modules 
As part of  the  integration 3rd  party modules are  configured, compiled and linked with the 
test  and/or  demo  setup.  Runtime  integration  tests  focus  on  Vector’s  modules.  Therefore 
the  functionality  of  the  3rd  party  modules  is  only  tested  implicitly,  as  far  as  needed  for 
Vector’s modules to run properly. 
2.6 
Usage of Features that are not Licensed 
BSW features that are not explicitly listed in the order confirmation are not licensed. If the 
BSW configuration enables a feature that has not been licensed a warning message will 
be shown or the build or generation process will abort with an error. (e.g. issued at code 
generation time). 
In case of a warning message the feature remain fully functional. The license violation will 
be communicated in the format “License Violation” and an additional description that 
describes the kind of violation. 
If the build or generation process yields such a “License Violation” the feature may be 
used for evaluation purposes but must not be used for serial production as: 
>  the feature is not licensed for serial production purposes  
>  the feature may include code that is incomplete and/or only partly tested 
>  there will be no issue tracking, no remedy of defects and no liability for the feature  
To avoid the “License Violation” for serial production either: 
>  Contact Vector and request an update which includes the license for the feature. 
>  Modify the configuration in such a way that does not violate the license. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
2.7 
Issue Tracking 
As long as the SIP is under maintenance, Vector provides an active issue reporting for the 
delivered  BSW  modules  and  the  RTE  including  their  code  generators.  The  issue  report 
contains all open issues and is sent periodically to the provided email contacts. 
Vector’s maintenance does not include issue tracking for 3rd party modules. This has to be 
handled by the 3rd party. 
2.7.1 
DaVinci Tools 
Issues of the DaVinci tools are not part of the active issue reporting. The issue lists can be 
downloaded from our internet portal:  
DaVinci Developer Link 
DaVinci Configurator Link 
2.8 
Warranty 
Vector grants warranty for all modules, which have been licensed by Vector. These are the 
modules  developed  by  Vector.  For  modules  developed  by  3rd  party  vendors  reduced 
warranty is granted. Please see below for details. 
2.8.1 
3rd Party Modules 
Vector  does  not  provide  any  warranty,  liability  or  issue  tracking  for  3rd  party  modules. 
These topics have to be stipulated with the 3rd party supplier directly. 
If  the  3rd  party  modules  are  configured  using  DaVinci  Configurator,  warranty  and  issue 
tracking will be given only for the correct integration into the tool, i.e. correct mapping of 
GUI item to ECUC item and correct control of the generation process. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 



Product Information MICROSAR 4 
3  Modules and Options 
 
 
Note 
This chapter defines important constraints and limitations of MICROSAR BSW modules 
  and options that may have been offered or delivered. 
 
 
3.1 
DBG 
MICROSAR DBG (XCP based) uses XCP as communication protocol (unlike specified by 
AUTOSAR). This results in  a more  efficient  implementation and allows usage of existing 
XCP  standard  tools  such  as  CANoe.AMD  or  CANape.  To  make  use  of  all  features 
including Runtime Measurement (RTM), CANoe.AMD version 8.1 or higher is required. 
3.2 
DLT (XCP-based) 
MICROSAR DLT (XCP-based) uses XCP as communication protocol (unlike specified by 
AUTOSAR). This results in  a more  efficient  implementation and allows usage of existing 
XCP  standard  tools  such  as  CANoe.AMD  or  CANape.  To  make  use  of  all  features 
including Runtime Measurement (RTM), CANoe.AMD version 8.1 or higher is required. 
3.3 
DLT (AUTOSAR) 
MICROSAR  DLT  (AUTOSAR)  implements  the  AUTOSAR  DLT  protocol.  The  DLT 
communication interface supports PDU transmission and reception through SOAD. 
3.4 
Drivers (CAN, LIN, FR, ETH, MCAL) 
>  Support of Different Modes 
On those microcontrollers, which support different modes like user mode and 
privileged mode or supervisor mode, the driver’s implementation is designed to run in 
privileged or supervisor mode. Rationale: Full access to all registers assigned to the 
corresponding hardware unit controller is required. 
>  Support of FR Controllers 
Some platform derivatives include 2 FlexRay controllers. MICROSAR will explicitly 
support only one of the available FlexRay controllers, with up to 2 FlexRay channels. 
3.5 
FEE 
Caused  by  physical  restrictions  of  flash  memory  devices,  MICROSAR  FEE  offers  two 
alternative  implementation  concepts.  Each  has  distinct  advantages  and  drawbacks.  At 
configuration time one has to be chosen per memory block: 
>  Single Sector Usage 
This concept ensures robustness against a high number of reset events but requires a 
higher number of erase and write cycles on the flash memory device shortening its life 
time. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
>  Parallel Sector Usage 
This concept reduces the number of erase and write cycles but leaves a low risk of 
data loss. 
3.6 
IDM - Variant Handling / Post-Build Selectable 
By  default,  MICROSAR  supports  the  configuration  variant  Pre-Compile  without  variant 
handling. The option MICROSAR Identity Manager (IDM) implements post-build selectable 
which  allows  choosing  between  several  ECU  behaviors  at  startup  time.  Variants  are 
defined pre-compile time. 
If AUTOSAR  variant  handling  is  requested  the  option  IDM  lists  the  clusters  that  support 
variant handling. 
Please note the following constraints when using the option (IDM): 
>  IDM (COM): Transformers are excluded 
>  IDM (DIAG): DCM supports the communication side only. Variance of diagnostic 
services is modelled as a superset in the input files. Using DCM APIs it is possible to 
enabled/disable services at runtime. 
>  IDM (DIAG): DEM allows enabling/disabling of DTCs and selected features to be 
variant specific. 
>  It is assumed that all BSW modules are used in all variants. It is not possible to not 
use a module in one or more variants. 
To  ensure  that  the  required  use-cases  are  supported,  please  provide  your  use-cases  to 
Vector. 
3.7 
MCAL Integration Package  
An MCAL integration is only possible if 
>  the MCAL version is communicated to Vector as part of the answer to the 
Questionnaire Step II at the latest 6 weeks before the planned delivery date. 
>  the specified MCAL is available in general. 
On most HW platforms the MCAL integration will result in the delivery of two artefacts as 
part of the SIP: 
>  MCAL Integration Helper Tool: This tool allows placing a 3rd party MCAL into the SIP 
as self-service as well as MCAL specific maintenance activities such as derivative 
selection and supports the user in up-grading or down-grading the MCAL version. 
>  Included 3rd party MCAL: The Questionnaire Step II will contain an upload link where 
the customer can send MCAL files to Vector to proof ownership. If the customer sends 
the MCAL (which has to match the specified MCAL version from Questionnaire Step II 
and which must encompass all artefacts including implementation, tooling and license 
files) not later than 4 weeks before the planned delivery date, Vector will use these 
files during testing and also include them in the delivery. If the MCAL is not sent in 
time, the SIP will not contain an MCAL and the customer will have to include the MCAL 
using the MCAL Integration Helper Tool. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 

based on template version 6.0.1 


Product Information MICROSAR 4 
3.8 
OS 
3.8.1 
Option: Multi-Core 
MICROSAR  BSW  is  running  on  a  single  core  by  default.  Calls  to  other  cores  are  not 
supported. 
Additional Multi-core extensions for OS, BSW and RTE are available. If applicable, Multi-
core extensions for MICROSAR are listed explicitly in the quote. 
3.8.2 
Option: Schedule Table Synchronization 
Schedule table synchronization will be done with the accuracy of the system counter. If a 
better  precision  of  the  synchronization  is  required  the  operating  system  add-on  “High 
Resolution Timer & Synchronization” has to be ordered. 
3.9 
PBL - Post-Build Loadable 
By  default,  MICROSAR  supports  the  configuration  variant  Pre-Compile,  without  the 
possibility  to  update  the  ECU  configuration  at  post-build  time.  The  option  Post-Build 
Loadable (PBL) provides support for a post-build time update. 
If post-build loadable is requested the option PBL lists the clusters that support a post-build 
time update of the configuration. Post-build loadable allows changing aspects of the ECU’s 
communication matrix after the software has been downloaded to the ECU. The post-build 
time  update  process  does  not  require  the  usage  of  a  compiler.  Only  post-build 
configuration data (e.g. a dedicated flash page) are downloaded to the ECU. 
Deliveries  supporting  post-build  loadable  include  a  license  for  the  DaVinci  Configurator 
that  will allow the OEM to perform an update at post-build time without the need of own 
tool licenses. 
Please note the following constraints when using the option PBL: 
>  A check if the chosen compiler and compiler options are supported by the post-build 
time update process is performed as part of the Software Integration Package (SIP) 
>  PBL (COM): Transformers are excluded 
>  PBL (COM): Deleting signals at post-build time is only allows for signals that have 
been added in a previous post-build loadable update. 
>  PBL (ETH): Only selected features of SD and SOAD support PBL 
>  PBL (DIAG): DCM supports an update of communication aspects only. Diagnostic 
services are excluded 
>  PBL (DIAG): DEM allows enabling/disabling of DTCs and selected features at post-
build time 
>  The post-build loadable update of an ECU is typically performed by the OEM. As a 
prerequisite, the Tier1 needs to forward the MICROSAR SIP and his DaVinci ECU 
configuration project to the OEM. The forwarded SIP must not include any c-files which 
have to be deleted by the Tier1 in advance. 
>  With respect to the System Description the following limitations apply: 
>  ComIPdu 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
10 
based on template version 6.0.1 


Product Information MICROSAR 4 
>  Pdu.shortName has to unique 
>  The Pdu is referenced by only one PduToFrameMapping in a frame with only one 
triggering for each direction 
>  ComSignal, ComSignalGroup, ComGroupSignal: 
>  ISignalToIPduMapping.shortName has to be unique 
>  Only one triggering for each direction  
To  ensure  that  the  required  use-cases  are  supported,  please  provide  your  use-cases  to 
Vector. 
3.10  RTE 
The MICROSAR RTE uses the AUTOSAR 4.3 APIs Interrupt Source and Hardware 
Peripheral Access to allow hardware specific components to safely access peripherals. 
The MICROSAR OS provides this APIs. If a non MICROSAR OS is used, these APIs need 
to be provided either by the OS or by integrator code. 
3.11  WDGM 
The  default  implementation  of  the  WDGM  supports  only  “Alive  Supervision”.  In  case 
“Deadline  Supervision”  or  “Logical  Supervision”  (control  flow  monitoring)  functionality  is 
required  (e.g.  in  safety  projects  due  to  IEC  61508  or  ISO26262),  it  is  supported  by  the 
SafeWatchdog module. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
11 
based on template version 6.0.1 


Product Information MICROSAR 4 
4  SIP Extensions 
The following extensions are available as product services, carried out by Vector. 
4.1 
Customer Hardware 
Integration  and  test  of  the  Software  Integration  Package  (SIP)  is  done  on  the  customer 
specific  hardware  instead  of  an  evaluation  board.  Prerequisite  is  the  provision  of  the 
complete development environment: 
>  ECU or Customer Hardware  
>  Additionally required hardware, e.g. wiring harness, etc.  
>  IDE/compiler, linker and workbench incl. license (if not available at Vector) 
>  debugger (incl. license) & connector (if not available at Vector) 
It is the customer's responsibility to ensure that the hardware is running. This may require 
that necessary software has to be handed over to Vector. All required drivers to setup the 
hardware must be available for integration. In case the SIP includes generic drivers (e.g. 
Transceiver,  SBC,  etc.)  it  is  the  responsibility  of  the  customer  to  provide  the  concrete 
software implementation for such hardware. In case the software drivers are not available 
in time or do not work properly, Vector will not be able to setup the system and will not be 
able to perform the required tests. 
At project start, the detailed requirements will be clarified with the customer. 
After initial operation of the hardware has been achieved, the different software modules 
are integrated and the integration tests are performed. 
Please be aware that the SIP lead time is based on the following milestones: 
>  to provide the development environment within 2 weeks after purchase order 
>  to get the development environment running within 1 week. 
4.2 
Start Application 
The  initial  delivery  of  a  project  includes  a  free  of  charge  Start Application  (including  the 
complete build environment). The Start Application is based on the ECU specific input data 
for communication (e.g. ECU Extract) and diagnostics (e.g. ECUC). It demonstrates basic 
SIP functionality based on the ordered modules. Some examples are listed below. 
>  Communication: The SWCs included in the Start Application demonstrate the 
reception and transmission of one signal on runnable level. The BSW is configured in 
a way that the system gets initialized and communicates on all communication busses 
defined in the input data. 
>  Diagnostics: The SWCs included in the Start Application will be extended by a sample 
implementation of an RDBI/WDBI service on runnable level. Moreover it offers the 
possibility to trigger a DTC. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
12 
based on template version 6.0.1 


Product Information MICROSAR 4 
>  Memory: The SWCs included in the Start Application will be extended by a sample 
implementation to store data in a NV-Block. 
Preconditions 
A Start Application can be provided by Vector if the following preconditions are met: 
>  The order contains a complete MICROSAR Basic Software stack (incl. 3rd party MCAL 
& MICROSAR RTE) 
>  The customer provides the databases for communication & diagnostics prior to the 
project start. 
Deliverables 
>  
SIP Modules 
>  Start Application  
Test reports 
>  
Vector test reports 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
13 
based on template version 6.0.1 



Product Information MICROSAR 4 
5  Definition of SLP/HLP/SIP, Maintenance and Release Types 
 
 
Caution 
The programs are fully operative programs. However there are program parts 
  (features) not thoroughly tested yet (beta feature). 
These beta features are documented in chapter 2.4 of the issue report provided with 
the delivery. For each beta feature the issue report contains information how to handle 
(deactivate) this beta feature. 
With regard to the fact that the program includes features as beta-version, Vector´s 
liability shall be expressly excluded in cases of ordinary negligence, to the extent 
admissible by law or statute. 
 
 
5.1 
Software License Package (SLP) 
The SLP includes the license and usage rights (see quotation) for a hardware-independent 
module (e.g. a COM layer) based on a defined specification. 
Depending  on  the  type  of  module,  the  software  will  be  based  on  the  following  technical 
specifications: 
>  AUTOSAR, ASAM, OSEK/VDX, ISO, HIS, etc. 
>  OEM requirements (for OEM-specific deliveries) 
>  Customer-specific requirements (optional) 
The following work products are licensed by purchase of an SLP: 
>  The module as source code 
>  Detailed technical documentation 
>  Generator plug-in to generate ANSI C code 
>  Configuration files for convenient configuration with Vector configuration tools 
The module will be tested using a component test suite on a standard hardware platform 
(CANoe  Emulation).  Integration  testing  on  the  specific  µController  and  delivery  will  be 
performed when a SIP is purchased (see section 5.3). 
5.2 
Hardware License Package (HLP) 
The HLP includes the license and usage rights (see quotation) for a hardware-dependent 
module (e.g. CAN Driver) and is valid for a combination of compiler (version independent), 
microcontroller family and relevant hardware (e.g. CAN cell). 
 
Depending  on  the  type  of  module,  the  software  will  be  based  on  the  following  technical 
specifications: 
>  AUTOSAR, ASAM, OSEK, ISO, HIS, etc. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
14 
based on template version 6.0.1 


Product Information MICROSAR 4 
>  OEM requirements (for OEM-specific deliveries) 
>  Customer-specific requirements (optional) 
>  Specification of microcontroller and compiler 
The following work products are licensed by purchase of an HLP:  
>  The module as source code 
>  Detailed technical documentation 
>  Generator plug-in to generate ANSI C code 
>  Configuration files for convenient configuration with Vector configuration tools. 
The  module  will  be  tested  using  a  component  test  suite  on  a  derivative  of  the 
microcontroller  family  which  is  defined  by  Vector.  Integration  testing  on  the  specific 
µController and delivery will be performed when a SIP is purchased (see section 5.3). 
5.3 
Software Integration Package (SIP) 
The SIP includes integration, test, release and delivery of the modules that are licensed by 
an SLP and/or an HLP.  
To  perform  integration  and  closely  test  the  customer's  use  case,  the  following  must  be 
defined in accordance with the customer: 
>  Microcontroller derivative 
>  Compiler, compiler version, and compiler options 
>  Use case (e.g. number of CAN channels) 
>  Car manufacturer (regarding communication description, pre-configuration…) 
For  each  SIP,  all  delivered  work  products  will  be  added  to  a  configuration  management 
system, thus allowing redeliveries for a minimum of 10 years (excluding the Beta SIPs). 
5.4 
Mini SIP 
The Mini SIP includes the delivery of individual modules. The software is tested on module 
level. The delivery is not tested on the target hardware and compiler. But Vector provides 
remedy of defects if they are based on defined processor and compiler mentioned in the 
quote. 
5.5 
SIP Types 
5.5.1 
Beta 
A Beta SIP can only be ordered in combination with a Production SIP. Depending on the 
agreement  with  the  customer,  the  software  may  include  the  complete  or  reduced 
functionality. The software is only preliminary integrated and tested. The usage of a Beta 
SIP for  serial  production  is  prohibited. The Beta  SIP  software  may  only  be  used for  test 
purposes.  Vector  grants  no  warranty  and/or  liability  to  the  extent  permitted  by  law  or 
statute. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
15 
based on template version 6.0.1 


Product Information MICROSAR 4 
5.5.2 
Production 
A Production SIP is a package which includes the release for serial production. 
5.5.3 
Update  
An Update SIP is a package which replaces a previous Production SIP. An Update SIP is 
necessary if an additional delivery is needed because of modified requirements (compiler 
version,  options,  functionality,  etc.).  The  delivery  will  be  performed  according  to  the 
existing contractual agreement and must be scheduled with Vector. 
5.5.4 
Prototype 
A Prototype SIP is a special package which may only be purchased by a Tier 1. The use is 
limited  to  a  defined  application  area,  e.g.  prototyping.  The  software  is  only  preliminary 
integrated and tested. The SIP is only available for platforms which are already supported 
by Vector.  License packages (HLP,  SLP) are  not necessary. An upgrade to a Production 
SIP  is  only  possible  if  identical  technical features  are  used and  the  Prototype  SIP  is  not 
older  than one  year.  Vector  grants  no  warranty  and/or  liability  to  the  extent  permitted  by 
law or statute. 
5.5.5 
Overview SIP Types 
The following table lists the scope of services, deliverables and release types for each SIP 
Type 
SIP Type /  
 
on

Mini SIP 
i
 
t

p
 
uc
t
ty
eta
odr
otor
B
P
Upda
P
 
Integration and test of selected 
of 

modules
 
 
 
 

esc
 
i
opc erv Delivery 
  
 
 
 
S
S Remedy of defects 
 
 
 
 
Software (Source or object code 
 
es
dependent on the contractual 
 
 
 
 
l
agreement - NDA) 
erabvi
Documentation 
    1 
 
 
  1 
Del
Test report 
 
  4 
 
 
Demo application 
  2 
   2,4 
 
 

 
Quickfix 
 
 
 
 
3
as
s Development
e
 
 
 
 
 
pey Pre Production 
 
 
 
 
Rel
T Production 
 
 
 
 
 
Production (Safe) 
 
 
 
 
1 The documentation is not necessarily complete  
2  Depends on the OEM package  
3  Release Types are described in detail on page 6  
4  Not part of the Mini SIP 
 
Table 5-1   Overview SIP Types 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
16 
based on template version 6.0.1 



Product Information MICROSAR 4 
5.6 
Maintenance 
Maintenance  of  Vector  embedded  software  is  available  for  the  SLP,  HLP  and  SIP. 
Maintenance generally includes bug-fixing.  
 
 
Note 
Only the latest delivered version will be maintained. 
 
 
 
5.6.1 
SLP Maintenance 
The maintenance of the SLP includes the adaptation of the appropriate working products 
(components, documentation, generators …). The SLP Maintenance includes: 
>  Adaptations caused by “minor“ or “patch“-version modifications of the related 
AUTOSAR specification. In case of new functions, the extension of the licensed 
functionality has to be discussed with Vector. 
>  Adaptations caused by comparable changes of other specifications based on Vector’s 
assessment. 
>  Registered RfCs for the AUTOSAR Specification are included as far as they are 
required by the OEM. 
Deliveries are not included as part of SLP maintenance; they are part of SIP maintenance. 
The SLP maintenance period begins with the first delivery. 
5.6.2 
HLP Maintenance 
The  maintenance  of  the  HLP  includes  the  adaptation  of  the  appropriate  work  products 
(components, documentation, generators …). The HLP maintenance includes: 
>  Adaptations caused by “minor“ or “patch“-version modifications of the related 
AUTOSAR specification. In case of new functions, the extension of the licensed 
functionality has to be discussed with Vector. 
>  Adaptation caused by comparable changes of other specifications based on Vector’s 
assessment. 
>  Adaptation caused by minor hardware changes based on Vector’s assessment. 
>  The implementation of simple workarounds for hardware issues. 
Deliveries  are  not  included  as  part  of  HLP  maintenance;  they  are  part  of  the  SIP 
maintenance. 
The HLP maintenance period begins with the first delivery. 
5.6.3 
SIP Maintenance 
The SIP Standard Maintenance includes: 
>  Reporting about known issues (“Active Issue Reporting“). 
>  One delivery per year (Update SIP or update of a Beta SIP) 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
17 
based on template version 6.0.1 



Product Information MICROSAR 4 
 
 
Note 
This update will be delivered on customer request. 
 
 
 
>  If a bug-fix delivery is needed on short notice such a delivery will be performed without 
comprehensive tests. In this case the status of the delivery will be a Beta or Pre 
Production (see Release Types in chapter 5.7). 
A Production Release has to be scheduled with Vector separately. 
The  SIP  maintenance  period  starts  with  the  first  delivery  of  the  product  (Beta  SIP  or 
Production SIP). 
In addition to the SIP Standard Maintenance, Vector offers SIP Extended Maintenance and 
SIP Production Maintenance. 
SIP Extended Maintenance contains the same features as SIP Standard Maintenance. It 
includes one further delivery per year (Update SIP or Beta SIP). 
SIP  Production  Maintenance  only  includes  reporting  about  known  issues  (“Active  Issue 
Reporting“). But Vector provides remedy of defects in case of high or critical issues.  SIP 
Production  Maintenance  requires  Standard  or  Extended  Maintenance  for  more  than  2 
years. 
5.6.4 
Differentiation of warranty versus maintenance 
The  table  shows  the  scope  of  services  depending  on  validity  of  warranty  and/or 
maintenance:  
SIP Maintenance
SIP Maintenance 
 
 
running 
expired 
Bugfixing          
Bugfixing         
Warranty period running 
Issue reporting    
Issue reporting    
Bugfixing          
Bugfixing         
Warranty period expired 
Issue reporting    
Issue reporting    
Table 5-2   Scope of services  
5.7 
Release Types 
The release type gives information about the scope of function, quality and application field 
restrictions of the delivered software. The release type depends on the delivered Software 
Integration Package and is defined in the delivery description. 
5.7.1 
QuickFix 
A  QuickFix  delivery  is  an  immediate  reaction  on  customer  requests.  The  content  of  a 
QuickFix delivery is individually agreed with the customer. Only available as supplement to 
a development release. 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
18 
based on template version 6.0.1 



Product Information MICROSAR 4 
5.7.2 
Development 
The software includes operational standard functions. Feature extensions of the software 
are not verified finally and the development process is not fully implemented. The usage of 
the software is intended for development phase or prototyping. 
5.7.3 
Pre Production 
The  software  is  operational  but  verification  measures  have  not  been  completed.  The 
usage of the software is intended for development and preproduction phase.  
5.7.4 
Production 
For  all  features  included  in  the  software  planned  verification  measures  have  been 
completed  and  all  known  issues  are  documented.  The  usage  for  serial  production  is 
allowed if the documented issues are considered. 
5.7.5 
Production (Safe) 
For  all  features  included  in  the  software  planned  verification  measures  have  been 
completed and all known issues are documented. Modules needed in a defined ASIL have 
been  included.  The  usage  for  serial  production  is  allowed  if  the  documented  issues  are 
considered. Delivery includes Safety Case documentation.  
 
 
 
Note 
To reach this release type, the Safety Case has to be ordered separately. 
 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.00.03 
19 
based on template version 6.0.1 

Document Outline


1.3.38 - ProductInformation_2_MSR4-MICROSARSafe

MICROSAR Safe

1.3.40 - ProductInformation_2_MSR4-MICROSARSafes


 
 
 
 
 
 
 
 
 
 
 
 
MICROSAR Safe 
Product Information 
 
  
Version 1.5.0 
 
 
 
 
 
 
 
 
 
 
 
Authors 
Jonas Wolf 
Status 
Released 
 
 
 
 
 
 


Product Information MICROSAR Safe 
Document Information 
History 
Author 
Date 
Version 
Remarks 
Jonas Wolf 
2015-10-31 
1.0.0 
Initial creation. 
Jonas Wolf 
2015-11-13 
1.0.1 
Remove GPT safety feature, add COM 
constraints 
Jonas Wolf 
2015-11-26 
1.0.2 
Adapt release types 
Jonas Wolf 
2015-12-01 
1.0.3 
Review of TSRs finished 
Jonas Wolf 
2015-12-10 
1.0.4 
Review comments by visrn 
Jonas Wolf 
2015-12-17 
1.0.5 
Safety manager mail contact details 
changed 
Jonas Wolf 
2016-01-19 
1.1.0 
Review by vismoe; Partitioning details 
added. 
Jonas Wolf 
2016-01-19 
1.1.1 
Fix term for SafeWDG 
Jonas Wolf 
2016-01-26 
1.1.2 
Fix typos 
Jonas Wolf 
2016-01-29 
1.1.3 
Update information from safety manual 
Jonas Wolf 
2016-03-08 
1.2.0 
Update information from safety manual 
Update roadmap 
Update Safety Case delivery 
Update of format 
Update delivery process 
Jonas Wolf 
2016-06-28 
1.2.1 
Update of lead time for production delivery 
Jonas Wolf 
2016-08-08 
1.3.0 
Update of roadmap 
Jonas Wolf 
2016-08-08 
1.3.1 
Remove constraint of PDUR 
Jonas Wolf 
2016-09-05 
1.3.2 
Update of roadmap 
Jonas Wolf 
2016-10-26 
1.4.0 
Update on XCP and AMD cluster 
Update on Ethernet 
Update on lead time for Safety Case for 
ASIL A/B 
Update of document structure 
Jonas Wolf 
2016-12-12  
1.4.1 
Update on Ethernet availability 
Jonas Wolf 
2017-01-10 
1.5.0 
Availability information revised 
Moved TLS to Ethernet cluster 
Removed constraint on COM 
Reference Documents 
No. 
Source 
Title 
Version 
[1]   ISO 
ISO 26262 
2011/2012 
Road vehicles — Functional safety 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
Contents 
1 
Introduction................................................................................................................... 8 
1.1 

Purpose ............................................................................................................. 8 
1.2 
Scope ................................................................................................................ 8 
1.3 
Overview ............................................................................................................ 8 
2 
Safety Concept ............................................................................................................. 9 
2.1 

Overview ............................................................................................................ 9 
2.2 
Partitioning ......................................................................................................... 9 
2.3 
Assumptions .................................................................................................... 10 
2.3.1 

Technical Safety Requirements ........................................................ 10 
2.3.1.1 
Initialization .................................................................... 11 
2.3.1.2 
Self-test ......................................................................... 11 
2.3.1.3 
Data consistency ........................................................... 11 
2.3.1.4 
Reset of ECU ................................................................. 12 
2.3.1.5 
Non-volatile memory ...................................................... 12 
2.3.1.5.1 
Saving data ................................................ 13 
2.3.1.5.2 
Loading data .............................................. 13 
2.3.1.6 
Scheduling ..................................................................... 13 
2.3.1.6.1 

Deterministic, hard real-time scheduling .... 13 
2.3.1.7 
Partitioning ..................................................................... 14 
2.3.1.7.1 

Memory partitioning ................................... 14 
2.3.1.7.2 
Time partitioning ........................................ 14 
2.3.1.8 
Communication protection ............................................. 15 
2.3.1.8.1 

Inter ECU communication .......................... 15 
2.3.1.8.2 
Intra ECU communication .......................... 15 
2.3.1.9 
Watchdog services ......................................................... 17 
2.3.1.9.1 

Program flow monitoring ............................ 17 
2.3.1.9.2 
Alive monitoring ......................................... 17 
2.3.1.9.3 
Deadline monitoring ................................... 17 
2.3.2 
Environment ..................................................................................... 18 
2.3.2.1 

Safety Concept .............................................................. 18 
2.3.2.2 
Use of MICROSAR Safe Components ........................... 19 
2.3.2.3 
Partitioning ..................................................................... 20 
2.3.2.4 
Resources ..................................................................... 21 
2.3.3 
Process ............................................................................................ 21 
3 
Delivery Process ......................................................................................................... 24 
3.1 

Overview .......................................................................................................... 24 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
3.2 
Safety Manual .................................................................................................. 25 
3.3 
Safety Case ..................................................................................................... 25 
3.4 
Prerequisites .................................................................................................... 26 
4 
Components of MICROSAR Safe ............................................................................... 27 
4.1 

Operating System ............................................................................................ 27 
4.2 
Microcontroller Abstraction (MCAL) .................................................................. 27 
4.3 
External Components (EXT) ............................................................................ 33 
4.4 
System Services .............................................................................................. 35 
4.5 
Diagnostic Services ......................................................................................... 38 
4.6 
Memory Services ............................................................................................. 40 
4.7 
Communication ................................................................................................ 41 
4.8 
Advanced Measurement and Debug (AMD) ..................................................... 43 
4.9 
XCP ................................................................................................................. 44 
4.10 
CAN ................................................................................................................. 45 
4.11 
LIN ................................................................................................................... 47 
4.12 
FlexRay ........................................................................................................... 48 
4.13 
Ethernet ........................................................................................................... 50 
4.14 
Libraries (LIBS) ................................................................................................ 50 
4.15 
Audio/Video Bridging (AVB) ............................................................................. 51 
4.16 
V2G ................................................................................................................. 51 
4.17 
Input/Output (IO) .............................................................................................. 51 
4.18 
Runtime Environment (RTE) ............................................................................ 51 
5 
Safety Management .................................................................................................... 52 
6 
Issue Management ...................................................................................................... 53 
7 
Glossary and Abbreviations ...................................................................................... 54 
7.1 

Glossary .......................................................................................................... 54 
7.2 
Abbreviations ................................................................................................... 55 
8 
Contact ........................................................................................................................ 56 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
Illustrations 
Figure 1-1 
Structure of MICROSAR Safe ..................................................................... 8 
Figure 2-1 
BSW in “ASIL”-partition (left), BSW in “QM”-partition (right) 
(MICROSAR SafeWDG is not shown) ...................................................... 10 

Figure 3-1 
Overview of delivery process for safety projects ....................................... 24 
 
Tables 
Table 2-1  
Initialization ............................................................................................... 11 
Table 2-2  
Self-test .................................................................................................... 11 
Table 2-3  
Data consistency ...................................................................................... 11 
Table 2-4  
Reset of ECU ............................................................................................ 12 
Table 2-5  
Saving data .............................................................................................. 13 
Table 2-6  
Loading data ............................................................................................. 13 
Table 2-7  
Deterministic, hard real-time scheduling ................................................... 13 
Table 2-8  
Memory partitioning .................................................................................. 14 
Table 2-9  
Timing protection ...................................................................................... 14 
Table 2-10  
Killing of applications ................................................................................ 14 
Table 2-11  
Communication Protection ........................................................................ 15 
Table 2-12  
Protection by cryptographic algorithms ..................................................... 15 
Table 2-13  
Intra OS application communication ......................................................... 15 
Table 2-14  
Inter OS application communication ......................................................... 16 
Table 2-15  
Program flow monitoring ........................................................................... 17 
Table 2-16  
Alive monitoring ........................................................................................ 17 
Table 2-17  
Deadline monitoring .................................................................................. 17 
Table 4-1  
Component OS ......................................................................................... 27 
Table 4-2  
Component ADCDRV ............................................................................... 27 
Table 4-3  
Component CANDRV ............................................................................... 28 
Table 4-4  
Component LINDRV ................................................................................. 28 
Table 4-5  
Component FRDRV .................................................................................. 28 
Table 4-6  
Component ETHDRV ............................................................................... 28 
Table 4-7  
Component ETHSWTDRV ........................................................................ 29 
Table 4-8  
Component FLSDRV ................................................................................ 29 
Table 4-9  
Component EEPDRV ............................................................................... 29 
Table 4-10  
Component SPIDRV ................................................................................. 29 
Table 4-11  
Component FLSTST ................................................................................. 30 
Table 4-12  
Component IICDRV .................................................................................. 30 
Table 4-13  
Component CORTST ............................................................................... 30 
Table 4-14  
Component RAMTST ............................................................................... 30 
Table 4-15  
Component OCUDRV ............................................................................... 31 
Table 4-16  
Component ICUDRV ................................................................................ 31 
Table 4-17  
Component PWMDRV .............................................................................. 31 
Table 4-18  
Component SHEDRV ............................................................................... 31 
Table 4-19  
Component MCUDRV .............................................................................. 32 
Table 4-20  
Component GPTDRV ............................................................................... 32 
Table 4-21  
Component PORTDRV ............................................................................. 32 
Table 4-22  
Component DIODRV ................................................................................ 32 
Table 4-23  
Component WDGDRV .............................................................................. 33 
Table 4-24  
Component CANTRCV ............................................................................. 33 
Table 4-25  
Component FRTRCV ................................................................................ 33 
Table 4-26  
Component LINTRCV ............................................................................... 34 
Table 4-27  
Component SBC ....................................................................................... 34 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
Table 4-28  
Component DRVEXT ................................................................................ 34 
Table 4-29  
Component BSWM ................................................................................... 35 
Table 4-30  
Component COMM ................................................................................... 35 
Table 4-31  
Component DET ....................................................................................... 35 
Table 4-32  
Component ECUM.................................................................................... 36 
Table 4-33  
Component CSM ...................................................................................... 36 
Table 4-34  
Component CRY....................................................................................... 37 
Table 4-35  
Component STBM .................................................................................... 37 
Table 4-36  
Component TM ......................................................................................... 37 
Table 4-37  
Component WDGM .................................................................................. 37 
Table 4-38  
Component WDGIF .................................................................................. 38 
Table 4-39  
Component DCM ...................................................................................... 38 
Table 4-40  
Component DEM ...................................................................................... 39 
Table 4-41  
Component FIM ........................................................................................ 39 
Table 4-42  
Component J1939DCM ............................................................................ 39 
Table 4-43  
Component NVM ...................................................................................... 40 
Table 4-44  
Component MEMIF................................................................................... 40 
Table 4-45  
Component FEE ....................................................................................... 40 
Table 4-46  
Component EA ......................................................................................... 41 
Table 4-47  
Component COM ...................................................................................... 41 
Table 4-48  
Component IPDUM................................................................................... 41 
Table 4-49  
Component NM ........................................................................................ 41 
Table 4-50  
Component PDUR .................................................................................... 42 
Table 4-51  
Component COMXF ................................................................................. 42 
Table 4-52  
Component SOMEIPXF ............................................................................ 42 
Table 4-53  
Component E2EXF ................................................................................... 42 
Table 4-54  
Component SECOC ................................................................................. 43 
Table 4-55  
Component LDCOM ................................................................................. 43 
Table 4-56  
Component DBG ...................................................................................... 43 
Table 4-57  
Component DLT ....................................................................................... 44 
Table 4-58  
Component RTM ...................................................................................... 44 
Table 4-59  
Component XCP ....................................................................................... 44 
Table 4-60  
Component J1939TP ................................................................................ 45 
Table 4-61  
Component J1939NM ............................................................................... 45 
Table 4-62  
Component J1939RM ............................................................................... 45 
Table 4-63  
Component CANXCP ............................................................................... 45 
Table 4-64  
Component CANTSYN ............................................................................. 46 
Table 4-65  
Component CANTP .................................................................................. 46 
Table 4-66  
Component CANIF ................................................................................... 46 
Table 4-67  
Component CANNM ................................................................................. 46 
Table 4-68  
Component CANSM ................................................................................. 47 
Table 4-69  
Component LINXCP ................................................................................. 47 
Table 4-70  
Component LINTP and LINIF.................................................................... 47 
Table 4-71  
Component LINNM ................................................................................... 47 
Table 4-72  
Component LINSM ................................................................................... 48 
Table 4-73  
Component FRARTP ................................................................................ 48 
Table 4-74  
Component FRXCP .................................................................................. 48 
Table 4-75  
Component FRTSYN ................................................................................ 48 
Table 4-76  
Component FRTP ..................................................................................... 49 
Table 4-77  
Component FRIF ...................................................................................... 49 
Table 4-78  
Component FRNM .................................................................................... 49 
Table 4-79  
Component FRSM .................................................................................... 49 
Table 4-80  
Component CRC ...................................................................................... 50 
Table 4-81  
Component E2E ....................................................................................... 50 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
Table 4-82  
Component CAL/CPL ............................................................................... 50 
Table 4-83  
Component RTE ....................................................................................... 51 
Table 7-1  
Glossary ................................................................................................... 54 
Table 7-2  
Abbreviations ............................................................................................ 55 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 





Product Information MICROSAR Safe 
1  Introduction 
1.1 
Purpose 
This  document  provides  product  information  on  MICROSAR Safe.  MICROSAR Safe  are 
the ISO 26262-compliant parts of MICROSAR developed as Software Safety Element out 
of Context (SEooC). 
This  document  should  provide  the  reader  with  sufficient  information  to  decide  if 
MICROSAR Safe  is  an  option  for  a  specific  project. This  document  should  also  give  the 
reader a good impression of what to expect from MICROSAR Safe. 
1.2 
Scope 
MICROSAR Safe  comprises  SafeBSW  and  SafeRTE.  SafeBSW  comprises  further 
components, e.g. MICROSAR SafeOS and MICROSAR SafeWDG. 
MICROSAR Safe 
MICROSAR SafeBSW 
MICROSAR SafeRTE 
 
Figure 1-1  Structure of MICROSAR Safe 
This document only provides information for Vector’s MICROSAR product MICROSAR 4. 
The information in this document is only applicable to  MICROSAR Safe offers quoted by 
31.10.2015 and later. 
1.3 
Overview 
In  Section  2  the  safety  concept  is  summarized.  The  lists  of  assumed  requirements, 
components and constraints are detailed. 
In Section 3 the delivery process is described. 
In Section 4 the components of MICROSAR Safe and their availability is described. 
In Section 5 information on the safety management is provided. 
In Section 6 requirements for issue management are defined. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 


Product Information MICROSAR Safe 
2  Safety Concept 
2.1 
Overview 
The user of MICROSAR Safe is responsible for the overall safety concept. 
The  user  of  MICROSAR Safe  can  allocate  safety  requirements  up  to  ASIL  D  to  some 
MICROSAR Safe  components.  The  assumed  safety  requirements  and  the  components 
they affect are listed in the next section. 
The  user  of  MICROSAR Safe  can  use  all  components  of  MICROSAR Safe  within  the 
same  partition,  since  they  are  developed  according  to  the  same  ISO 26262-compliant 
process. 
MICROSAR Safe  is  configurable  software  to  serve  as  many  use-cases  as  possible. The 
user of MICROSAR Safe is responsible for the adequate configuration of the components 
of MICROSAR Safe in the context of an item development. 
A common safety concept involves the following set of components of MICROSAR Safe: 
>  MICROSAR SafeOS can be used to implement memory partitioning and achieve 
freedom from interference with respect to memory,  
>  MICROSAR SafeWDG can be used to implement deadline, alive and logic monitoring 
to achieve freedom from interference with respect to timing and execution,  
>  MICROSAR SafeE2E can be used to achieve freedom from interference with respect 
to exchange of information. 
The use of these components allows to effectively separate software components of 
different quality levels (QM, ASIL A-D). 
Additional components from MICROSAR SafeBSW can be used to optimize the number of 
partitions and thus minimize the number of partition switches or to allocate additional 
safety requirements to the BSW. 
Vector is open to discuss your safety concept to select the components of 
MICROSAR Safe that best fit your needs. 
2.2 
Partitioning 
There are two memory partitioning options available with MICROSAR Safe. 
The  first  option  is  to  run  the  BSW  in  a  “non-trusted”  or  ”QM”-partition.  This  requires  a 
MICROSAR SafeOS  with  Scalability  Class  3  or  4  (SC3  or  SC4)  and  a 
MICROSAR SafeWDG  for  timing  supervision.  This  option  is  suitable  if  only  a  very  small 
part  of  the  ECU  software  is  safety-related.  The  MICROSAR SafeWDG  is  then  put  in  a 
separate “ASIL”-partition. 
The second option is to run the BSW in the same partition as the rest of the safety-related 
software.  This  option  requires  that  all  BSW  components  are  used  as  MICROSAR Safe 
components. This  option  is  suitable  if  a  huge  part  of  the  ECU  software  is  safety-related 
and frequently interacts with the BSW. This option still allows application software with QM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 

based on template version 5.12.0 




Product Information MICROSAR Safe 
level  or  lower  ASIL.  The  parallel  use  of  lower  quality  application  software  requires  a 
MICROSAR SafeOS with Scalability Class 3 or 4 (SC3 or SC4) then. 
For the scope of this document BSW also includes MCAL and EXT components.  
MCAL  and  EXT  components  interfacing  with  the  BSW  (e.g.  DIO,  CANDRV  or 
CANTRCVDRV) need to be assigned in the same partition as the interfacing BSW. Other 
MCAL  and  EXT  components  not  interfacing  with  the  BSW  (e.g.  ADC  or  PWM)  can  be 
assigned to a different partition. 
 
 
 
Note 
The user of MICROSAR Safe should check with the MCAL provider if the MCAL is 
  available with the required ASIL as soon as possible. 
 
 
 
 
 
Figure 2-1  BSW in “ASIL”-partition (left), BSW in “QM”-partition (right) (MICROSAR SafeWDG is not shown) 
2.3 
Assumptions 
2.3.1 
Technical Safety Requirements 
These  are  the  assumed  technical  safety  requirements  on  the  Safety  Element  out  of 
Context MICROSAR Safe. These requirements are expected to match the requirements in 
the actual item development. 
All technical safety requirements are assigned an ASIL D to service as many projects as 
possible. 
No  fault  tolerant  time  intervals  are  given.  Timing  depends  on  the  used  hardware  and  its 
configuration. It is assumed that the user configures  MICROSAR Safe adequately for the 
intended use. 
No  safe  state  is  defined  since  MICROSAR Safe  allows  the  user  to  define  the  desired 
behavior in case of a detected fault. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
10 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.1 
Initialization 
ID 
TSR-1 
Requirements text 
The system shall initialize the CPU, MPU, watchdog, and operating 
system. 
Rationale 
Initialization of the hardware, e.g. clocks, memory protection, 
scheduling etc. is necessary to enable the other safety requirements. 
MICROSAR Safe 
The ECU State Manager (EcuM) is responsible for performing the 
Feature 
configured driver initialization. After initialization the EcuM starts the 
operating system. The EcuM distributes the post-built loadable 
configuration information within the ECU. 
The documentation of the operating system describes which parts of 
the CPU it initializes. 
The startup code and main function is in the responsibility of the user 
of MICROSAR Safe. 
Table 2-1   Initialization 
2.3.1.2 
Self-test 
ID 
TSR-2 
Requirements text 
The system shall perform self-tests based on the requirements of the 
system. 
Rationale 
It may be necessary to periodically test individual components of the 
system to detect latent faults. 
MICROSAR Safe 
The operating system provides a function to self-test the effectiveness 
Feature 
of the MPU settings. 
The ECU State Manager services callouts to user code that can 
check RAM consistency after wakeup. 
Other hardware self-tests are usually performed by MCAL 
components not developed by Vector. 
End-to-end protection of communication provides its own fault 
detection mechanisms. 
Table 2-2   Self-test 
2.3.1.3 
Data consistency 
ID 
TSR-101876 
Requirements text 
The system shall provide functions to ensure data consistency. 
Rationale 
Concurrent access, e.g. from task or interrupt level, must not lead to 
data inconsistencies. 
MICROSAR Safe 
MICROSAR Safe provides functions to enable or disable interrupts, 
Feature 
spin-locks, resources or abstractions (i.e. exclusive areas) to enable 
the user of MICROSAR Safe to ensure data consistency. This 
functionality is also used within MICROSAR Safe to ensure data 
consistency. 
Table 2-3   Data consistency 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
11 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.4 
Reset of ECU 
ID 
TSR-3 
Requirements text 
The system shall reset itself in case of a detected fault. 
Rationale 
Resetting the CPU of the ECU is in most cases an appropriate 
measure to achieve a safe state. 
It is assumed that the reset state of a microcontroller leads to the safe 
state of the ECU and system, since a reset may occur at any time due 
to e.g. EMC. 
MICROSAR Safe 
MICROSAR Safe does not reset the ECU on its own (there may be 
Feature 
exceptions for the operating system). 
Functionality from ECU State Manager (setting the shutdown target) 
can be used to reset the ECU instead, if this is the intended fault 
reaction. 
Table 2-4   Reset of ECU 
2.3.1.5 
Non-volatile memory 
The system must be designed in a way that in case of the absence of non‑volatile data it 
is still safe (e.g. safe state or degradation). 
It  cannot  be  assured  that  data  is  saved  completely  or  at  all  because  a  reset  or  loss  of 
energy might happen at any time, e.g. brown-out, black-out. 
This also implies that it is in general impossible to guarantee that the latest information is 
available in the non-volatile memory, e.g. the system is reset before memory stack is even 
notified to write data to non-volatile memory. 
Thus,  safety-related  functionality  may  not  rely  on  the  availability  of  data  in  non-volatile 
memory. 
Since the availability of data in non-volatile memory cannot be guaranteed in any case, the 
only sensible use-case is reading safety-related calibration data. 
Writing of data into non-volatile memory must be verified to assure that the information is 
available  in  non-volatile  memory.  Verification  can  only  be  done  manually  in  a  protected 
environment, e.g. at end of line, in a workshop, etc. 
ECU software cannot verify if data was written, since at any time a reset could occur and 
the information that had to be written is lost immediately. 
Reading of data does not modify data stored in non-volatile memory. Thus, reading can be 
used by safety-related functionality. The memory stack has to assure that the read data is 
identical to the data stored in non-volatile memory. 
The absence of data still has to be handled by the application. 
The availability may be increased by e.g. redundant storage. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
12 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.5.1 
Saving data 
ID 
TSR-4 
Requirements text 
The system shall save information in non-volatile memory. 
Rationale 
see text in Section 2.3.1.5. 
MICROSAR Safe 
The intended block is written with the information provided by the 
Feature 
application. 
Table 2-5   Saving data 
2.3.1.5.2 
Loading data 
ID 
TSR-5 
Requirements text 
The system shall retrieve the last stored information from non-volatile 
memory. 
Rationale 
see text in Section 2.3.1.5. 
MICROSAR Safe 
The intended block is read and the information is provided to the 
Feature 
application. 
The last or any previous completely stored block in non-volatile 
memory is returned by memory stack. 
If CRC or ECC protections do not match block data an error is 
returned. 
If data is stored redundantly, the redundant information is returned. 
If no completely stored block is found, an error is returned. 
Table 2-6   Loading data 
2.3.1.6 
Scheduling 
2.3.1.6.1 
Deterministic, hard real-time scheduling 
ID 
TSR-6 
Requirements text 
The system shall execute the specified functions within their 
respective hard timing limits. 
Rationale 
Hard real-time scheduling may be used for scheduling safety 
mechanisms implemented in software. 
This requirement is even more important for fail-operational systems, 
where one function may have to work, while another blocks the 
processor. 
MICROSAR Safe 
The immediate priority ceiling protocol specified by AUTOSAR is 
Feature 
capable of performing this task. The schedule tables specified by 
AUTOSAR may also be used on top of the scheduling algorithm. 
The operating system of MICROSAR Safe implements the scheduling 
algorithm according to the methods for ASIL D required by 
ISO 26262. 
Table 2-7   Deterministic, hard real-time scheduling 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
13 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.7 
Partitioning 
2.3.1.7.1 
Memory partitioning 
ID 
TSR-7 
Requirements text 
The system shall protect software applications from unspecified 
memory access. 
Rationale 
Partitioning in software is often introduced because of different quality 
levels of software and different responsibilities of software 
development on one ECU. 
Memory partitioning relies on the available MPU in hardware for the 
effectiveness of the mechanism. 
MICROSAR Safe 
Memory partitioning and context switching using AUTOSAR Operating 
Feature 
Feature System SC3 mechanisms is implemented according to the 
methods for ASIL D required by ISO 26262. 
Adequate configuration of the memory partitions is in the 
responsibility of the user of MICROSAR Safe. 
Table 2-8   Memory partitioning 
2.3.1.7.2 
Time partitioning 
1.1.1.1.1.1 Timing protection 
ID 
TSR-8 
Requirements text 
The system shall detect timing faults in the software. 
Rationale 
Relying on a watchdog for timing protection is sometimes not 
sufficiently robust or efficient. 
MICROSAR Safe 
The operating system of MICROSAR Safe implements the timing 
Feature 
protection functionality of SC4 according to the methods for ASIL D 
required by ISO 26262. 
Table 2-9   Timing protection 
1.1.1.1.2 
Killing of applications 
ID 
TSR-9 
Requirements text 
The system shall terminate software applications. 
Rationale 
In combination with the timing protection this allows the software to 
continue operation in case of a software fault. 
MICROSAR Safe 
The operating system of MICROSAR Safe implements the 
Feature 
termination of applications according to the methods for ASIL D 
required by ISO 26262. 
Table 2-10   Killing of applications 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
14 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.8 
Communication protection 
2.3.1.8.1 
Inter ECU communication 
1.1.1.1.3 
End-to-end protection 
ID 
TSR-10 
Requirements text 
The system shall protect communication between its elements. 
Rationale 
Communication has to be protected against corruption, unintended 
replay and masquerading. The loss of a message must be detected. 
This can be achieved using the end-to-end (E2E) protection 
mechanism defined by AUTOSAR. 
MICROSAR Safe 
MICROSAR Safe implements the E2E functionality according to the 
Feature 
methods for ASIL D required by ISO 26262. This also includes the 
CRC library functionality. 
Table 2-11   Communication Protection 
1.1.1.1.4 
Protection by cryptographic algorithms 
ID 
TSR-11 
Requirements text 
The system shall protect communication between its elements using 
cryptographic hash algorithms to detect accidental corruption of the 
communication. 
Rationale 
Cyclic redundancy codes (CRC) provide a specified hamming 
distance given a polynomial and data block size. 
Cryptographic hash functions provide a probabilistic statement on 
data corruption detection depending on the hash function, data block 
size and hash value size. 
MICROSAR Safe 
The Cryptographic Service Manager of MICROSAR Safe is 
Feature 
implemented according to the methods for ASIL D required by 
ISO 26262. 
The Cryptographic Service Manager services the main function and 
functions to calculate a cryptographic hash function according to 
AUTOSAR specification. 
Table 2-12   Protection by cryptographic algorithms 
2.3.1.8.2 
Intra ECU communication 
1.1.1.1.5 
Intra OS application communication 
ID 
TSR-16 
Requirements text 
The microcontroller software shall communicate within its 
applications. 
Rationale 
Software components need to communicate. 
Protection of the memory against random hardware faults is expected 
by the system (e.g. via ECC RAM and lock-step mode). 
MICROSAR Safe 
The RTE provides services to allow communication of software 
Feature 
components within OS applications (intra-partition communication). 
Table 2-13   Intra OS application communication 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
15 
based on template version 5.12.0 


Product Information MICROSAR Safe 
 
1.1.1.1.6 
Inter OS application communication 
ID 
TSR-12 
Requirements text 
The microcontroller software shall communicate between its 
applications. 
Rationale 
Multi-core systems may need to exchange safety-related information 
between applications. 
Protection of the memory against random hardware faults is expected 
by the system (e.g. via ECC RAM and lock-step mode). 
MICROSAR Safe 
The operating system of MICROSAR Safe implements the inter-OS 
Feature 
application (IOS) functionality according to the methods for ASIL D 
required by ISO 26262. 
The RTE provides services to allow communication between OS 
applications (inter-partition communication). 
Table 2-14   Inter OS application communication 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
16 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.1.9 
Watchdog services 
2.3.1.9.1 
Program flow monitoring 
ID 
TSR-13 
Requirements text 
The system shall provide a mechanism to detect faults in program 
flow. 
Rationale 
Program flow can be corrupted by random hardware faults or 
software faults. 
MICROSAR Safe 
MICROSAR Safe watchdog stack implements program flow 
Feature 
monitoring functionality according to the methods for ASIL D required 
by ISO 26262. 
Table 2-15   Program flow monitoring 
2.3.1.9.2 
Alive monitoring 
ID 
TSR-14 
Requirements text 
The system shall provide a mechanism to detect stuck software. 
Rationale 
Alive monitoring is used to reset the software or controller in case it is 
unresponsive. 
MICROSAR Safe 
MICROSAR Safe watchdog stack implements alive monitoring 
Feature 
functionality according to the methods for ASIL D required by 
ISO 26262. 
Table 2-16   Alive monitoring 
2.3.1.9.3 
Deadline monitoring 
ID 
TSR-15 
Requirements text 
The system shall provide a mechanism to detect deadline violations. 
Rationale 
Deadline monitoring using the watchdog stack can be used to 
implement timing monitoring. 
MICROSAR Safe 
MICROSAR Safe watchdog stack implements deadline monitoring 
Feature 
functionality according to the methods for ASIL D required by 
ISO 26262. 
Table 2-17   Deadline monitoring 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
17 
based on template version 5.12.0 


Product Information MICROSAR Safe 
2.3.2 
Environment 
2.3.2.1 
Safety Concept 
The user of MICROSAR Safe shall be responsible for the functional safety concept. 
The  overall  functional  safety  concept  is  in  the  responsibility  of  the  user  of  MICROSAR 
Safe.  MICROSAR  Safe  can  only  provide  parts  that  can  be  used  to  implement  the 
functional safety concept of the item. 
It is also the responsibility of the user of MICROSAR Safe to configure MICROSAR Safe 
as intended by the user's safety concept.  
The safety concept shall only rely on safety features explicitly described in this document. 
If a component from MICROSAR Safe does not explicitly describe safety features in this 
safety manual, this component has been developed according to the methods for ASIL D 
to provide coexistence with other ASIL components. 
>  Example: NvM provides safety features for writing and reading of data, the lower 
layers, i.e. MemIf, Ea, Fee and drivers, only provide the ASIL for coexistence. 
The safety concept shall not rely on functionality that is not explicitly described as safety 
feature in this document. This functionality may fail silently in case of a detected fault.  
>  Example: If a potential out-of-bounds memory access, e.g. due to invalid input or 
misconfiguration, is detected the requested function will not be performed. An error via 
DET is only reported if error reporting is enabled. 
The user of MICROSAR Safe shall adequately address hardware faults. 
The components of MICROSAR Safe can support in the detection and handling of some 
hardware faults (e.g. using watchdog). 
MICROSAR Safe does not provide redundant data storage. 
The user of  MICROSAR Safe especially has to address faults in volatile random access 
memory, non-volatile memory, e.g. flash or EEPROM, and the CPU. 
MICROSAR  Safe  relies  on  the  adequate  detection  of  faults  in  memory  and  the  CPU  by 
other  means,  e.g.  hardware.  Thus,  Vector  recommends  using  lock-step  CPUs  together 
with ECC memory. 
The user of MICROSAR Safe shall ensure that the reset or powerless state is a safe 
state of the system. 
Vector uses this assumption in its safety analyses and development process. 
The  user  of  MICROSAR Safe  shall  implement  a  timing  monitoring  using  e.g.  a 
watchdog. 
The  components  of  MICROSAR  Safe  do  not  provide  mechanisms  to  monitor  their  own 
timing behavior. 
The watchdog stack that is part of MICROSAR Safe can be used to fulfill this assumption. 
If the functional safety concept also requires a logic monitoring, The watchdog stack that is 
part of MICROSAR Safe can be used to implement it. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
18 
based on template version 5.12.0 


Product Information MICROSAR Safe 
The watchdog is one way to perform timing monitoring. Today the watchdog is the most 
common approach. In future there may be different approaches e.g. by monitoring using a 
different ECU. 
The  user  of  MICROSAR  Safe  shall  ensure  an  end-to-end  protection  for  safety-
relevant communication between ECUs. 
The communication components of MICROSAR Safe do not assume sending or receiving 
as a safety requirement, because considered faults can only be detected using additional 
information like a cycle counter. Vector always assumes that an end-to-end protection or 
equivalent mechanism is implemented on application level. 
Considered faults in communication are: 
>  Failure of communication peer  
>  Message masquerading  
>  Message corruption 
>  Unintended message repetition  
>  Insertion of messages  
>  Re-sequencing  
>  Message loss  
>  Message delay 
This requirement can be fulfilled by e.g. using the end-to-end protection wrapper for safety 
related communication. 
The user of MICROSAR Safe shall ensure data consistency for its application. 
Data consistency is not automatically provided when using MICROSAR Safe. MICROSAR 
Safe only provides services to support enforcement of data consistency. Their application 
is in the responsibility of the user of MICROSAR Safe. 
To  ensure  data  consistency  in  an  application,  critical  sections  need  to  be  identified  and 
protected. 
To identify critical sections in the code, e.g. review or static code analysis can be used. 
To protect critical sections, e.g. the services to disable and enable interrupts provided by 
the MICROSAR Safe operating system can be used. 
To verify correctly implemented protection, e.g. stress testing or review can be used. 
Note the AUTOSAR specification with respect to nesting and sequence of calls to interrupt 
enabling and disabling functions. 
2.3.2.2 
Use of MICROSAR Safe Components 
The  user  of  MICROSAR Safe  shall  adequately  select  the  type  definitions  to  reflect 
the hardware platform and compiler environment. 
The  user  of  MICROSAR Safe  is  responsible  for  selecting  the  correct  platform  types 
(PlatformTypes.h) and compiler abstraction (Compiler.h). Especially the size of the 
predefined types must match the target environment. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
19 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Example: A uint32 must be mapped to an unsigned integer type with a size of 32 bits. 
The user of MICROSAR Safe can use the platform types provided by Vector. Vector has 
created and verified the platform types mapping according to the information provided  by 
the user of MICROSAR Safe. 
The user of MICROSAR Safe shall initialize all components of MICROSAR Safe prior 
to using them. 
This constraint is required by AUTOSAR anyway. Vector uses this assumption in its safety 
analyses and development process. 
Correct initialization can be verified, e.g. during integration testing. 
The  user  of  MICROSAR Safe  shall  only  pass  valid  pointers  at  all  interfaces  to 
MICROSAR Safe components. 
Plausibility checks on pointers are performed by MICROSAR Safe (see also SMI-18), but 
they are limited. MICROSAR Safe components potentially use provided pointers to write to 
the location in memory. 
Also the length and pointer of a buffer provided to a MICROSAR Safe component need to 
be consistent. 
This assumption also applies to QM as well as ASIL components. 
This can e.g. be verified using static code analysis tools, reviews and integration testing. 
The  user  of  MICROSAR Safe  shall  enable  plausibility  checks  for  the 
MICROSAR Safe components. 
This setting is necessary to introduce defensive programming and increase robustness at 
the interfaces as required by ISO 26262. 
This setting does not enable error reporting to the DET component. 
This setting is enforced by an MSSV plug-in. 
2.3.2.3 
Partitioning 
The user of MICROSAR Safe shall ensure that for one AUTOSAR functional cluster 
(e.g.  System  Services,  Operating  System,  CAN,  COM,  etc.)  only  components  from 
Vector are used. 
This assumption is required because of dependencies within the development process of 
Vector. 
This assumption does not apply to the MCAL or the EXT cluster. 
Vector  may  have  requirements  on  MCAL  or  EXT  components  depending  on  the  upper 
layers  that  are  used  and  provided  by  Vector.  For  example,  the  watchdog  driver  is 
considered  to  have  safety  requirements  allocated  to  its  initialization  and  triggering 
services. Details are described in the component specific parts of this safety manual. 
This assumption does not apply to components that are not provided by Vector. 
In  case  the  partitioning  solution  is  used,  this  assumption  only  partially  applies  to  the 
System Services cluster. Only the Watchdog Manager and Watchdog Interface need to be 
used from  Vector  then,  because  the Watchdog  Manager  and Watchdog  Interface  will  be 
placed in separate memory partitions apart from the other System Services components. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
20 
based on template version 5.12.0 


Product Information MICROSAR Safe 
The user of MICROSAR Safe shall provide an argument for coexistence for software 
that resides in the same partition as components from MICROSAR Safe. 
Vector  considers  an  ISO 26262-compliant  development  process  for  the  software  as  an 
argument  for  coexistence  (see  [1]  Part  9  Clause  6).  Vector  assumes  that  especially 
freedom from interference with respect to memory is provided by an ISO 26262-compliant 
development process. 
Redundant  data  storage  as  the  only  measure  by  the  other  software  is  not  considered  a 
sufficient measure. 
If ASIL components provided by Vector are used, this requirement is fulfilled. 
The  user  of  MICROSAR  Safe  shall  verify  that  the  memory  mapping  is  consistent 
with the partitioning concept. 
The volatile data of every component shall be placed in the associated memory partition. 
This can be verified e.g. by review of the linker map file. 
The  memory  sections  for  each  component  placed  in  RAM  can  be  identified 
<MIP>_START_SEC_VAR[_<xxx>], where <MIP> is the Module Implementation Prefix of 
the component. 
2.3.2.4 
Resources 
The user of MICROSAR Safe shall provide sufficient resources in RAM, ROM, stack 
and CPU runtime for MICROSAR Safe. 
Selection  of  the  microcontroller  and  memory  capacities  as  well  as  dimensioning  of  the 
stacks is in the responsibility of the user of MICROSAR Safe. 
If MICROSAR Safe components have specific requirements, these are documented in the 
respective Technical Reference document. 
2.3.3 
Process 
The  user  of  MICROSAR Safe  shall  follow  the  instructions  of  the  corresponding 
Technical Reference of the components. 
Especially  deviations  from  AUTOSAR  specifications  are  described  in  the  Technical 
References. 
The  possible  implementations  of  exclusive  areas  are  described  in  the  Technical 
References. 
The user of MICROSAR Safe shall verify all code that is changed during integration 
of MICROSAR Safe. 
Code  that  is  typically  changed  by  the  user  of  MICROSAR Safe  during  integration 
comprises generated templates, hooks, callouts, or similar. 
This assumption also applies if interfaces between components are looped through user-
defined functions. 
Vector  assumes  that  this  verification  also  covers  ISO  26262:6-9.  Vector  assumes  that 
modified code that belongs to a Vector component, e.g. EcuM callouts or OS trace hooks 
can  at  least  coexist  with  this  component,  because  no  separation  in  memory  or  time  is 
implemented. 
Example: Callouts of the EcuM are executed in the context of the EcuM. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
21 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Non-trusted functions provided by the Vector operating system can be used to implement 
a separation in memory in code modified by the user of MICROSAR Safe. 
The user of MICROSAR Safe shall only modify source code of MICRSAR Safe that is 
explicitly allowed to be changed. 
Usually  no  source  code  of  MICROSAR Safe  is  allowed  to  be  changed  by  the  user  of 
MICROSAR Safe. 
The  user  of  MICROSAR Safe  can  check  if  the  source  code  was  modified  by  e.g, 
comparing it to the original delivery. 
The  user  of  MICROSAR Safe  shall  verify  generated  functions  according  to 
ISO 26262:6-9. 
Generated functions can be identified when searching through the generated code. 
An example of generated functions is the configured rules of the Basic Software Manager 
(BSWM). Their correctness can only be verified by the user of  MICROSAR Safe. Please 
note, however, that BSWM does not provide safety features. 
This requirement does not apply to MICROSAR SafeRTE. 
The  user  of  MICROSAR Safe  shall  execute  the  MICROSAR Safe  Silence  Verifier 
(MSSV). 
If  the  report  shows  “Overall  Check  Result:  Fail",  please  contact  the  Safety  Manager  at 
Vector. See Section 5 for contact details. 
The  user  of  MICROSAR Safe  shall  perform  the  integration  (ISO 26262:6-10)  and 
verification (ISO 26262:6-11) processes as required by ISO 26262. 
Especially the safety mechanisms must be verified in the final target ECU. 
Vector assumes that by performing the integration and verification processes as required 
by  ISO 26262  the  generated  configuration  data,  e.g.  data  tables,  task  priorities  or  PDU 
handles,  are  sufficiently  checked.  An  additional  review  of  the  configuration  data  is  then 
considered not necessary. 
Integration  does  not  apply  to  a  MICROSAR Safe  component  that  consists  of  several 
subcomponents.  This  integration  is  already  performed  by  Vector.  The  integration  of 
subcomponents  is  validated  during  creation  of  the  safety  case  by  Vector  based  on  the 
configuration handed in by the user of MICROSAR Safe. 
However,  integration  of  all  MICROSAR Safe  components  in  the  specific  use-case  of  the 
user of MICROSAR Safe is the responsibility of the user of MICROSAR Safe. 
The  user  of  MICROSAR Safe  shall  ensure  that  a  consistent  set  of  generated 
configuration is used for verification and production. 
Make sure that the same generated files are used for testing and production code, i.e. be 
aware that configuration can be changed without generating the code again. 
Make sure that all generated files have the same configuration basis, i.e. always generate 
the  MICROSAR Safe configuration for  all  components  for  a  relevant  release of  the  ECU 
software. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
22 
based on template version 5.12.0 


Product Information MICROSAR Safe 
The user of MICROSAR Safe shall verify the integrity of the delivery by Vector. 
Run the SIPModificationChecker.exe and verify that the source code, BSWMD and 
safety manual files are unchanged. 
The user of MICROSAR Safe shall verify the consistency of the binary downloaded 
into the ECU's flash memory. 
This  also  includes  re-programming  of  flash  memory  via  a  diagnostics  service.  The 
consistency of the downloaded binary can be checked by the bootloader or the application. 
MICROSAR Safe assumes a correct program image. 
The user of MICROSAR Safe shall evaluate all tools (incl. compiler) that are used by 
the user of MICROSAR Safe according to ISO 26262:8-11. 
Evaluation  especially  has  to  be  performed  for  the  compiler,  linker,  debugging  and  test 
tools. 
Vector provides a guideline for the evaluation of the Tool Confidence Level (TCL) for the 
tools provided by Vector (e.g. DaVinci Configurator PRO). 
Vector  has  evaluated  the  tools  exclusively  used  by  Vector  during  the  development  of 
MICROSAR Safe. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
23 
based on template version 5.12.0 




Product Information MICROSAR Safe 
3  Delivery Process 
3.1 
Overview 
Figure 3-1 provides an overview on the delivery process for safety projects. 
 
 
Figure 3-1  Overview of delivery process for safety projects 
The first delivery is provided in standard lead time. The release type of the first delivery is 
Pre-production. The Production SIP offer position is invoiced. 
The  Production  delivery  needs  to  be  explicitly  requested  from  Vector.  This  Production 
delivery is the basis for the Safety Case. It has a lead time of 26 weeks.  
Vector  recommends  requesting  a  Safety  Case  50  weeks  prior  to  its  necessity  in  the 
project.  This  assumes  a  12  week  integration  period  at  the  customer  for  the  Production 
delivery. 12 weeks are required by Vector to create the Safety Case. This period includes 
the necessary time if validation of the MICROSAR Safe component test indicates retesting 
at Vector. With the delivery of the Safety Case the corresponding offer position is invoiced. 
 
 
 
Attention 
Vector  requires  ordering  SIP  Maintenance  at  least  until  Start  of  Production  of 
  the project. 
 
 
 
There  may  be  additional  deliveries  with  release  type  Pre-production,  e.g.  to  update 
features. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
24 
based on template version 5.12.0 



Product Information MICROSAR Safe 
3.2 
Safety Manual 
The Safety  Manual  is provided  as  a  draft  starting  with  the first  delivery. The draft  Safety 
Manual may not comprise the parts of components that are currently under development 
or hardware-specific. 
The Safety Manual provided with the Production delivery has a final status. 
Prototype SIPs and Evaluation Bundles do not comprise the parts of the Safety Manual of 
components that are currently under development or hardware-specific. 
3.3 
Safety Case 
The  Safety  Case  confirms  to  the  user  of  MICROSAR Safe  that  all  activities  required  by 
ISO 26262 have been completed by Vector. 
The Safety Case is provided for a Production delivery with the Production (Safe) delivery. 
 
 
 
Attention 
For projects with the highest ASIL C or D, you are required to send the configuration of 
  the MICROSAR Safe components to Vector. The configuration is required 12 weeks 
before Vector can deliver a Safety Case. 
You will only receive a Safety Case if you provide the configuration of the 
MICROSAR Safe components to Vector. 
For projects with the highest ASIL A or B, the configuration does not need to be 
provided to Vector. The Safety Case can then be provided within 12 weeks after the 
Production delivery. 
The described timeline assumes that hardware and compiler (incl. options) are not 
changed after the production delivery. 
 
 
 
The  configuration  of  the  MICROSAR Safe  components  is  required  to  validate  the 
MICROSAR Safe component tests. 
A Safety Case is fixed for: 
>  Set of MICROSAR Safe components (incl. their version) 
>  Configuration of MICROSAR Safe components (for ASIL C/D) 
>  Microcontroller derivative 
>  External hardware units (e.g. external watchdogs or SBCs) 
>  Compiler (incl. version and options) 
>  Linker (incl. version and options) 
If  an  additional  Safety  Case  is  required,  e.g.  for  another  project,  the  safety  case  can be 
ordered again. 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
25 
based on template version 5.12.0 



Product Information MICROSAR Safe 
 
 
Attention 
Vector requires that the Production delivery for which a Safety Case is requested must 
  not be older than six month. This requirement results from the experience by Vector 
that there are software changes (e.g. issue fixes, additional feature implementations, 
changes in configuration) even in late phases of a project. Moreover, final version of 
(safety) manuals of used controllers and compilers are required. 
The Production delivery date as indicated in the offer defines the delivery date of the 
first Pre-production delivery (see Figure 3-1). 
 
 
 
3.4 
Prerequisites 
For  the  creation  of  the  Safety  Case  for  MICRSAR Safe  the  following  information  is 
required 20 weeks prior to the Production delivery: 
>  Final versions of the microcontroller manuals and microcontroller target specification, 
>  Final version of the safety manual of the microcontroller, 
>  Compiler version and options, 
>  Information about potential requirements and restrictions which are required by 3rd 
party safety software to all other software, e.g. provided by a safety manual. 
For the creation of the Safety Case for MICRSAR Safe the following information is 
required 12 weeks prior to Safety Case delivery 
>  Customer configuration of MICRSAR Safe is available (for ASIL C/D). 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
26 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4  Components of MICROSAR Safe 
This  section  comprises  details  on  safety  functionality,  constraints,  dependencies  and 
availability of MICROSAR Safe components. 
Please  note  the  availability  of  a  component  in  the  following  sections. Availability  of  HLP 
components depends on the specific hardware derivative. 
Features mentioned in Beta-ESCANS may not be used in safety-related projects. 
4.1 
Operating System 
Short Name 
Operating System 
Abbreviation 
OS 
Safety functionality 
>  Self-test the effectiveness of the MPU settings 
>  Schedule tables 
>  Immediate priority ceiling protocol and the scheduling algorithm 
>  Memory partitioning 
>  Timing protection 
>  Killing of applications 
>  Inter OS application communication 
And all safety features required by other MICROSAR Safe 
components. 
Availability 
HLP component; available for the major automotive microcontrollers 
Major constraints 
For SC3 and SC4 a Memory Protection Unit (MPU) in hardware is 
necessary. 
For SC2 and SC4 also a high-resolution timer in hardware is 
necessary. 
Dependencies to other  None 
components 
Table 4-1   Component OS 
4.2 
Microcontroller Abstraction (MCAL) 
Short Name 
Analog/Digital Conversion Driver 
Abbreviation 
ADCDRV 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-2   Component ADCDRV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
27 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
CAN Driver 
Abbreviation 
CANDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-3   Component CANDRV 
Short Name 
LIN Driver 
Abbreviation 
LINDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-4   Component LINDRV 
Short Name 
FlexRay Driver 
Abbreviation 
FRDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-5   Component FRDRV 
Short Name 
Ethernet Driver 
Abbreviation 
ETHDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-6   Component ETHDRV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
28 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Ethernet Switch Driver 
Abbreviation 
ETHSWTDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-7   Component ETHSWTDRV 
Short Name 
Flash Driver 
Abbreviation 
FLSDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-8   Component FLSDRV 
Short Name 
EEPROM Driver 
Abbreviation 
EEPDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-9   Component EEPDRV 
Short Name 
Serial Peripheral Interface (SPI) Driver 
Abbreviation 
SPIDRV 
Safety functionality 
>  Sending and receiving features if used with WDGEXT or SBC 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-10   Component SPIDRV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
29 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Flash Test 
Abbreviation 
FLSTST 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-11   Component FLSTST 
Short Name 
I²C Driver 
Abbreviation 
IICDRV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-12   Component IICDRV 
Short Name 
Core Test 
Abbreviation 
CORTST 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-13   Component CORTST 
Short Name 
RAM Test 
Abbreviation 
RAMTST 
Safety functionality 
n/a; Vector considers the RAM Test as specified by AUTOSAR as not 
sensible to use to increase diagnostic coverage. Thus, it is not part of 
MICROSAR Safe solution. 
Availability 
Not scheduled to be part of MICROSAR Safe. 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-14   Component RAMTST 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
30 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Output Capture Unit Driver 
Abbreviation 
OCUDRV 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-15   Component OCUDRV 
Short Name 
Input Capture Unit Driver 
Abbreviation 
ICUDRV 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-16   Component ICUDRV 
Short Name 
Pulse Width Modulation Driver 
Abbreviation 
PWMDRV 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-17   Component PWMDRV 
Short Name 
Hardware CRY Driver 
Abbreviation 
CRY (HW) 
Safety functionality 
>  Hardware accelerated encryption and decryption 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  n/a 
components 
Table 4-18   Component SHEDRV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
31 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Microcontroller Unit (MCU) Driver 
Abbreviation 
MCUDRV 
Safety functionality 
>  Has to provide reset functionality as safety feature 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-19   Component MCUDRV 
Short Name 
General Purpose Timer Driver 
Abbreviation 
GPTDRV 
Safety functionality 
n/a 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-20   Component GPTDRV 
Short Name 
Port Driver 
Abbreviation 
PORTDRV 
Safety functionality 
>  Has to provide port direction setting functionality as safety feature 
Availability 
Not provided by Vector 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-21   Component PORTDRV 
Short Name 
Digital Input/Output Driver 
Abbreviation 
DIODRV 
Safety functionality 
>  Has to provide I/O functionality as safety feature if used by 
WDGDRV. 
Availability 
HLP component 
Major constraints 
HW specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-22   Component DIODRV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
32 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Watchdog Driver 
Abbreviation 
WDGDRV 
Safety functionality 
>  Provides triggering and mode setting functionality as safety feature 
Availability 
HLP component 
Major constraints 
n/a 
Dependencies to other  >  Requires MICROSAR Safe WDGM and WDGIF. 
components 
Table 4-23   Component WDGDRV 
 
4.3 
External Components (EXT) 
Short Name 
CAN Transceiver 
Abbreviation 
CANTRCV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-24   Component CANTRCV 
Short Name 
FlexRay Transceiver 
Abbreviation 
FRTRCV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-25   Component FRTRCV 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
33 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
LIN Transceiver 
Abbreviation 
LINTRCV 
Safety functionality 
None 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-26   Component LINTRCV 
Short Name 
System Basis Chip Driver 
Abbreviation 
SBC 
Safety functionality 
>  Trigger watchdog 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  >  All interfacing BSW components must reside in the same partition. 
components 
>  If SPIDRV is used the sending and receiving features of the SBC 
driver must be provided as safety feature. 
>  If DIODRV is used the I/O functionality must be provided as safety 
feature. 
Table 4-27   Component SBC 
Short Name 
External Driver (includes EXTADC, EEPEXT, FLSEXT, ETHSWTEXT 
and WDGEXT) 
Abbreviation 
DRVEXT 
Safety functionality 
See corresponding MCAL driver 
Availability 
HLP component 
Major constraints 
Hardware specific 
Dependencies to other  See corresponding MCAL driver 
components 
Table 4-28   Component DRVEXT 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
34 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4.4 
System Services 
Short Name 
Basic Software Manager 
Abbreviation 
BSWM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-29   Component BSWM 
Short Name 
Communication Manager 
Abbreviation 
COMM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-30   Component COMM 
Short Name 
Development Error Tracer 
Abbreviation 
DET 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-31   Component DET 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
35 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
ECU State Manager 
Abbreviation 
ECUM 
Safety functionality 
>  Validation of all postbuild configurable BSW module configuration 
parameters. 
>  Set programmable interrupts during the startup phase. 
>  Initialize drivers prior the start of the OS. 
>  Determine the Postbuild configuration data. 
>  Initialize drivers prior Postbuild data is available. 
>  Reset the ECU. 
>  Generate a RAM Hash. 
>  Check the RAM Hash. 
>  Re-initialize drivers during a restart. 
>  Set the current shutdown target of the ECU. 
>  Initiate the ECU shutdown depending on the shutdown target. 
>  Notify Errors from the ECU management. 
>  Complete the ECU shutdown process. 
Availability 
Available 
Major constraints 
>  Defensive behavior is not available. 
Dependencies to other  >  All interfacing BSW components must reside in the same partition. 
components 
>  The Operating System has to provide the core ID retrieval service 
as safety feature. 
Table 4-32   Component ECUM 
Short Name 
Cryptographic Service Manager 
Abbreviation 
CSM 
Safety functionality 
>  Compute hash functions 
>  Compute MAC functions 
>  Verify MAC functions 
Availability 
Available 
Major constraints 
None 
Dependencies to other  >  All interfacing BSW components must reside in the same partition. 
components 
>  If safety functionality is used, the CRY component must provide the 
cryptographic algorithms as safety feature. 
Table 4-33   Component CSM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
36 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Cryptographic Primitive Library 
Abbreviation 
CRY (SW) 
Safety functionality 
>  Cryptographic algorithms 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  To be determined 
components 
Table 4-34   Component CRY 
Short Name 
Synchronized Time Base Manager 
Abbreviation 
STBM 
Safety functionality 
To be determined. 
Availability 
Not yet available 
Major constraints 
To be determined. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-35   Component STBM 
Short Name 
Time Service 
Abbreviation 
TM 
Safety functionality 
n/a 
Availability 
Not scheduled to be part of MICROSAR Safe. 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-36   Component TM 
Short Name 
Watchdog Manager 
Abbreviation 
WDGM 
Safety functionality 
>  Alive monitoring 
>  Deadline monitoring 
>  Logic monitoring 
Availability 
Available 
Major constraints 
Needs to be mapped to a partition with the highest ASIL of the ECU. 
Dependencies to other  WDGIF must be used with same ASIL from MICROSAR Safe. 
components 
Table 4-37   Component WDGM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
37 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Watchdog Interface 
Abbreviation 
WDGIF 
Safety functionality 
Based on WDGM 
Availability 
Available 
Major constraints 
Needs to be mapped to a partition with the highest ASIL of the ECU. 
Dependencies to other  >  WDGM must have same ASIL assigned. 
components 
>  Watchdog driver has to provide triggering and mode setting 
functionality as safety feature. 
>  Watchdog driver may be an internal or external watchdog or a 
system basis chip (SBC). 
Table 4-38   Component WDGIF 
4.5 
Diagnostic Services 
Short Name 
Diagnostic Communication Manager 
Abbreviation 
DCM 
Safety functionality 
None 
Availability 
Process not yet completely implemented, but argument that 
component fulfills freedom from interference can be provided. 
Major constraints 
DCM does only support the following features: 
>  DCM handles only the following diagnostic services internally: 
0x10, 0x3E, 0x28, 0x14, 0x19, 0x85 
>  Handling of multiple diagnostic clients is supported with pseudo 
parallel handling (NRC 0x21 on server busy). 
>  Request notification callbacks (OEM/SYS supplier 
indication/confirmation) are supported. 
Other diagnostic services are provided as a template that can be 
verified by the customer. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-39   Component DCM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
38 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Diagnostic Event Manager 
Abbreviation 
DEM 
Safety functionality 
None; Vector considers degradation via DEM and FIM for safety-
related functionality not sensible. 
Availability 
Process not yet completely implemented, but argument that 
component fulfills freedom from interference can be provided. 
Major constraints 
>  OBD-II features are not available 
>  WWH-OBD features are not available 
>  J1939 features are not available 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-40   Component DEM 
Short Name 
Function Inhibition Manager 
Abbreviation 
FIM 
Safety functionality 
None; Vector considers degradation via DEM and FIM for safety-
related functionality not sensible. 
Availability 
Available 
Major constraints 
>  No cyclic event evaluation 
>  No calibration support (except post-build loadable) 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-41   Component FIM 
Short Name 
J1939 Diagnostic Communication Manager 
Abbreviation 
J1939DCM 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  To be determined 
components 
Table 4-42   Component J1939DCM 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
39 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4.6 
Memory Services 
Short Name 
Non-volatile Memory Manager 
Abbreviation 
NVM 
Safety functionality 
>  Loading of data 
>  Storing of data 
see Section 2.3.1.5. 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-43   Component NVM 
Short Name 
Memory Interface 
Abbreviation 
MEMIF 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-44   Component MEMIF 
Short Name 
Flash EEPROM Emulation 
Abbreviation 
FEE 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-45   Component FEE 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
40 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
EEPROM Abstraction 
Abbreviation 
EA 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-46   Component EA 
4.7 
Communication 
Short Name 
COM 
Abbreviation 
COM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
>  Com TP Interface (Dynamic Length Signals) is not available 
>  Meta Data Support is not available 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-47   Component COM 
Short Name 
I-PDU Manager 
Abbreviation 
IPDUM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-48   Component IPDUM 
Short Name 
Network Manager 
Abbreviation 
NM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-49   Component NM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
41 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
PDU Router 
Abbreviation 
PDUR 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-50   Component PDUR 
Short Name 
COM Transformer 
Abbreviation 
COMXF 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-51   Component COMXF 
Short Name 
SOME/IP Transformer 
Abbreviation 
SOMEIPXF 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-52   Component SOMEIPXF 
Short Name 
End-to-End (E2E) Transformer 
Abbreviation 
E2EXF 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-53   Component E2EXF 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
42 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Secure On-board Communication 
Abbreviation 
SECOC 
Safety functionality 
None; Vector considers the usage of SECOC for end-to-end 
protection not sensible. 
Availability 
Not yet available 
Major constraints 
To be determined. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-54   Component SECOC 
Short Name 
Large Data COM 
Abbreviation 
LDCOM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-55   Component LDCOM 
4.8 
Advanced Measurement and Debug (AMD) 
Short Name 
Debug 
Abbreviation 
DBG 
Safety functionality 
None 
Availability 
Currently not planned to be part of MICROSAR Safe since not used in 
series production software. 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-56   Component DBG 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
43 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
Debug Log and Trace 
Abbreviation 
DLT 
Safety functionality 
None 
Availability 
Currently not planned to be part of MICROSAR Safe since not used in 
series production software. 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-57   Component DLT 
Short Name 
Runtime Measurement 
Abbreviation 
RTM 
Safety functionality 
Disabling of all module functionality. 
Availability 
Available 
Major constraints 
RTM must be disabled according to Safety Manual during normal 
operation. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-58   Component RTM 
 
4.9 
XCP 
Short Name 
Universal Calibration Protocol (XCP) 
Abbreviation 
XCP 
Safety functionality 
Disabling of all module functionality. 
Availability 
Available 
Major constraints 
XCP must be disabled according to Safety Manual during normal 
operation. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-59   Component XCP 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
44 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4.10  CAN 
Short Name 
J1939 Transport Protocol 
Abbreviation 
J1939TP 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  To be determined 
components 
Table 4-60   Component J1939TP 
Short Name 
J1939 Network Manager 
Abbreviation 
J1939NM 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  To be determined 
components 
Table 4-61   Component J1939NM 
Short Name 
J1939 Resource Manager 
Abbreviation 
J1939RM 
Safety functionality 
To be determined 
Availability 
Not yet available 
Major constraints 
To be determined 
Dependencies to other  To be determined 
components 
Table 4-62   Component J1939RM 
Short Name 
CAN Universal Calibration Protocol (XCP) 
Abbreviation 
CANXCP 
Safety functionality 
Disabling of all module functionality. 
Availability 
Available 
Major constraints 
XCP must be disabled according to Safety Manual during normal 
operation. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-63   Component CANXCP 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
45 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
CAN Time Synchronization 
Abbreviation 
CANTSYN 
Safety functionality 
To be determined. 
Availability 
Not yet available 
Major constraints 
To be determined. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-64   Component CANTSYN 
Short Name 
CAN Transport Protocol 
Abbreviation 
CANTP 
Safety functionality 
None 
Availability 
Available 
Major constraints 
>  No unidirectional configurations are supported, i.e. at least one Rx 
and one Tx SDU must be configured. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-65   Component CANTP 
Short Name 
CAN Interface 
Abbreviation 
CANIF 
Safety functionality 
None 
Availability 
Available 
Major constraints 
>  Single channel optimization is not available 
>  Only one CAN driver is supported 
>  J1939 dynamic address mapping is not available 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-66   Component CANIF 
Short Name 
CAN Network Manager 
Abbreviation 
CANNM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-67   Component CANNM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
46 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
CAN Station Manager 
Abbreviation 
CANSM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-68   Component CANSM 
4.11  LIN 
Short Name 
LIN Universal Calibration Protocol (XCP) 
Abbreviation 
LINXCP 
Safety functionality 
Disabling of all module functionality. 
Availability 
Available 
Major constraints 
XCP must be disabled according to Safety Manual during normal 
operation. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-69   Component LINXCP 
Short Name 
LIN Transport Protocol and LIN Interface 
Abbreviation 
LINTP and LINIF 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-70   Component LINTP and LINIF 
 
Short Name 
LIN Network Manager 
Abbreviation 
LINNM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-71   Component LINNM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
47 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
LIN Station Manager 
Abbreviation 
LINSM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-72   Component LINSM 
4.12  FlexRay 
Short Name 
FlexRay AUTOSAR TP 
Abbreviation 
FRARTP 
Safety functionality 
n/a 
Availability 
Not scheduled to be part of MICROSAR Safe. 
Major constraints 
n/a 
Dependencies to other  n/a 
components 
Table 4-73   Component FRARTP 
 
Short Name 
FlexRay Universal Calibration Protocol (XCP) 
Abbreviation 
FRXCP 
Safety functionality 
Disabling of all module functionality. 
Availability 
Available 
Major constraints 
XCP must be disabled according to Safety Manual during normal 
operation. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-74   Component FRXCP 
Short Name 
FlexRay Time Synchronization 
Abbreviation 
FRTSYN 
Safety functionality 
To be determined. 
Availability 
Not yet available 
Major constraints 
To be determined. 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-75   Component FRTSYN 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
48 
based on template version 5.12.0 


Product Information MICROSAR Safe 
Short Name 
FlexRay Transport Protocol 
Abbreviation 
FRTP 
Safety functionality 
None 
Availability 
Available 
Major constraints 
n/a 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-76   Component FRTP 
Short Name 
FlexRay Interface 
Abbreviation 
FRIF 
Safety functionality 
None 
Availability 
Available 
Major constraints 
>  Customized job list execution scheduling is not available 
>  Measurement of the delay/overlapping is not available 
>  Support of 3rd party drivers is not available 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-77   Component FRIF 
Short Name 
FlexRay Network Manager 
Abbreviation 
FRNM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
n/a 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-78   Component FRNM 
Short Name 
FlexRay Station Manager 
Abbreviation 
FRSM 
Safety functionality 
None 
Availability 
Available 
Major constraints 
n/a 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-79   Component FRSM 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
49 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4.13  Ethernet 
The components (ETHXCP, SOAD, TCPIP, ETHIF, ETHSM, DOIP, UDPNM, SD, TLS and 
ETHTSYN) of Ethernet are currently planned for MICROSAR Safe. Availability is provided 
upon request. 
There is no safety functionality planned for the Ethernet components. Major constraints are 
not yet determined. 
4.14  Libraries (LIBS) 
Short Name 
Cyclic Redundancy Check (CRC) Library 
Abbreviation 
CRC 
Safety functionality 
>  Calculate CRCs with different polynomials. 
Availability 
Available 
Major constraints 
None 
Dependencies to other  All interfacing BSW components must reside in the same partition. 
components 
Table 4-80   Component CRC 
Short Name 
End-to-end (E2E) Library 
Abbreviation 
E2E 
Safety functionality 
>  Create end-to-end protection for data and verify end-to-end 
protection information. 
Availability 
Available 
Major constraints 
None 
Dependencies to other  >  All interfacing BSW components must reside in the same partition. 
components 
>  The CRC library from MICROSAR Safe is required. 
Table 4-81   Component E2E 
Short Name 
Cryptographic Abstraction Layer / Cryptographic Primitives Library 
Abbreviation 
CAL/CPL 
Safety functionality 
To be determined. 
Availability 
Under development 
Major constraints 
To be determined. 
Dependencies to other  To be determined. 
components 
Table 4-82   Component CAL/CPL 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
50 
based on template version 5.12.0 


Product Information MICROSAR Safe 
4.15  Audio/Video Bridging (AVB) 
The  components  (AVTP,  BMCA  and  PTP)  of  AVB  are  currently  not  part  of 
MICROSAR Safe. 
4.16  V2G 
The components (DNS, EXI, HTTP, XML Security and SCC) of V2G are currently not part 
of MICROSAR Safe. 
4.17  Input/Output (IO) 
The  components  IOHWAB  and  DIOHWAB  are  template  code  only.  SENT  and  PSI5  are 
currently not part of MICROSAR Safe. 
4.18  Runtime Environment (RTE) 
Short Name 
Runtime Environment 
Abbreviation 
RTE 
Safety functionality 
To be determined. 
Availability 
R19 
Major constraints 
To be determined. 
Dependencies to other  The Operating System has to provide the following safety features: 
components 
>  Interrupt enabling and disabling 
>  Resource handling 
>  Task handling 
>  Alarm handling 
>  Core ID retrieval 
>  Spinlock handling 
>  Event handling 
>  Scheduling 
>  Schedule table handling 
>  IOC 
If the OS from MICROSAR Safe is used these dependencies are 
fulfilled 
If saving and loading safety-related data is required, the NVM has to 
provide saving and loading as safety feature. If the NVM from 
MICROSAR Safe is used, this dependency is fulfilled. 
Table 4-83   Component RTE 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
51 
based on template version 5.12.0 


Product Information MICROSAR Safe 
5  Safety Management 
Vector  has  performed  reference  functional  safety  assessments  together  with  an 
independent assessor for the MICROSAR Safe products. 
The  Vector-internal  quality  management  department  regularly  performs  functional  safety 
audits. 
If  you  are  interested  in  a  project  specific functional  safety  audit  and assessment, please 
contact the safety manager. 
Vector’s Safety Manager for the MICROSAR Safe solution is: 
>  Jonas Wolf 
>  SafetyManagerPES@vector.com 
For  reasons of  efficiency, ASIL A  and ASIL B  are  handled equally  at  Vector. Also ASIL C 
and ASIL D are handled equally. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
52 
based on template version 5.12.0 


Product Information MICROSAR Safe 
6  Issue Management 
The  user  of  MICROSAR Safe  is  required  to  provide  a  contact  to  Vector  that  will  receive 
notification  about  safety-related  issues. The  user  of  MICROSAR Safe  is  also  required  to 
notify  Vector  when  the  contact  changes.  The  contact  provided  by  the  user  of 
MICROSAR Safe has to be available even after Start of Production of the project for which 
the safety case is provided. 
Vector will notify safety-related issues for 15 years after the safety case is delivered. 
Vector recommends installing an email distribution box, e.g. standard-sw@customer.com. 
This  mail  box  has  to  be  checked  within  adequate  time  intervals  by  the  responsible 
persons. 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
53 
based on template version 5.12.0 


Product Information MICROSAR Safe 
7  Glossary and Abbreviations 
7.1 
Glossary 
Term 
Description 
Configuration data 
Data that is used to adapt the MICROSAR Safe component to the 
specific use-case of the user of MICROSAR Safe. Configuration data 
typically comprises among others: feature selection, routing tables, 
channel tables, task priorities, memory block descriptions. 
Critical section 
A section of code that needs to be protected from concurrent access. A 
critical section may be protected by using the AUTOSAR exclusive area 
concept. 
Generated code 
Source code that is generated as a result of the configuration in DaVinci 
Configurator Pro 
MICROSAR Safe 
MICROSAR Safe comprises MICROSAR SafeBSW and MICROSAR 
SafeRTE as Safety Element out of Context. MICROSAR SafeBSW is a 
set of components, that are developed according to ISO 26262 [1], and 
are provided by Vector in the context of this delivery. The list of 
MICROSAR Safe components in this delivery can be taken from the 
documentation of the delivery. 
Partition 
A set of memory regions that is accessible by tasks and ISRs. Synonym 
to OSApplication.  
Safety Case 
The Safety Case of MICROSAR Safe can be used as an argument that 
the safety requirements for an item are complete and satisfied by 
evidence compiled from work products of the safety activities during 
development. 
The Safety Case of MICROSAR Safe is progressively compiled by the 
work products that are generated during the safety lifecycle of the 
MICROSAR Safe lifecycle. 
The user of MICROSAR Safe is provided a Safety Case Report that 
confirms the requested ASIL for the delivered software to the user of 
MICROSAR Safe. 
Safety Manual 
The Safety Manual details the requirements for the user of 
MICROSAR Safe for integration of MICROSAR Safe into the item 
development. 
User of 
Integrator and user of components from MICROSAR Safe provided by 
MICROSAR Safe 
Vector. 
Table 7-1   Glossary 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
54 
based on template version 5.12.0 


Product Information MICROSAR Safe 
7.2 
Abbreviations 
Abbreviation 
Description 
API 
Application Programming Interface 
AUTOSAR 
Automotive Open System Architecture 
BSW 
Basis Software 
DEM 
Diagnostic Event Manager 
DET 
Development Error Tracer 
EAD 
Embedded Architecture Designer 
ECC 
Error Correcting Code 
ECU 
Electronic Control Unit 
EEPROM 
Eletronically Ereasable and Programmable Read-only Memory 
HIS 
Hersteller Initiative Software 
HLP 
Hardware License Package 
ISR 
Interrupt Service Routine 
MICROSAR 
Microcontroller Open System Architecture (the Vector AUTOSAR 
solution) 
PPORT 
Provide Port 
QM 
Quality Management 
RAM 
Random Access Memory 
RTE 
Runtime Environment 
RPORT 
Require Port 
SLP 
Software License Package 
SRS 
Software Requirement Specification 
SWC 
Software Component 
SWS 
Software Specification 
TCL 
Tool Confidence Level 
Table 7-2   Abbreviations 
 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
55 
based on template version 5.12.0 


Product Information MICROSAR Safe 
8  Contact 
Visit our website for more information on 
 
>  News 
>  Products 
>  Demo software 
>  Support 
>  Training data 
>  Addresses 
 
www.vector.com 
 
 
© 2017 Vector Informatik GmbH 
Version 1.5.0 
56 
based on template version 5.12.0 

Document Outline


1.3.41 - ProductInformation_2_MSR_Ford_SLP1

MICROSAR Ford SLP1

1.3.42 - ProductInformation_2_MSR_Ford_SLP1_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7

1.3.43 - ProductInformation_2_MSR_Ford_SLP1s


Product Information MICROSAR Ford SLP1 
1  Product Overview 
All program specific details are described in this data sheet as an extension to the general 
Product Information MICROSAR 4. This data sheet covers the following aspects:  
>  Software architecture and supported specifications 
>  Tool support and workflow 
1.1 
Supported Specifications 
The offered software modules are based on AUTOSAR 4.x specifications (we agreed with 
Ford to use the newest available versions). 
They cover the communication requirements based on the Ford specification “HS/MS-CAN 
CGEA  ECU  Level  Functional  Requirements  Specification”,  version  2014,  first  issued 
January 1, 2015. 
DCM  &  DEM  are  extended  to  support  the  Ford  specification  “Generic  Global  Diagnostic 
Specification  (GGDS)”,  issue  index  004,  volume  1,  document  no.  00.06.15.001  dated 
2013-05-02. 
The Ford security algorithm is based on “EESE Diagnostic Application Security Algorithm” 
document no. 00.06.15.151. 
The offered Ethernet / IP modules are based on AUTOSAR 4.2.1 specifications.    
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 



Product Information MICROSAR Ford SLP1 
1.2 
Software Architecture 
 
Figure 1-1  Software Architecture 
All modules for Ford AUTOSAR are colored green (FNOS Modules). Only the components 
needed for a specific ECU will be included in the requested package. Additional AUTOSAR 
components can be requested but are optional for a Ford ECU. 
1.3 
MICROSAR Ford SLP1 Specific Modules 
1.3.1 
Library Delivery of Security Algorithm 
The Ford-specific security algorithm is delivered as a library file. Please note that this file 
depends on the compiler options used for the delivery.  
A  change  of  the  compiler  or  compiler  options  later  in  the  project  might  result  in 
incompatibilities. 
Parts of the security algorithm are implemented as a SWC, which uses the BSW module 
CSM (CRY) and an additional module "CRY (SW-based) Ford" with Ford-specific content. 
1.3.2 
E2E Algorithm 
There is no common agreement within Ford which algorithm (profile) is used for end to end 
protection  (calculation  of  CRC  and  message  counter).  It  is  defined  within  a  project  and 
might even be different within one project from one PDU to the next PDU as it depends on 
the agreement involving all ECUs sending/receiving the specific PDU. 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 


Product Information MICROSAR Ford SLP1 
Vector  can  only  offer AUTOSAR-compliant  profiles,  they  can  be  mixed  within  one  ECU, 
please let us know which profile you need. Profile 1 and 2 is suitable for ECUs connected 
to CAN (CRC is 8 bit) and will be supported by the protection wrapper as well.  
If  the  algorithm  doesn’t  match  to  the  AUTOSAR  profiles  the  application  has  to  do  the 
implementation. 
1.3.3 
VSG for Diagnostics 
For  details  about  VSG  support  (Vehicle  System  Group,  Ford-internally  called 
dependencies) 
we 
provide 
an 
Application 
Note 
AN-ISC-8-
1189_Vehicle_System_Group_Support.  This  feature  can  be  used  to  support  different 
diagnostic requirements in one ECU software. 
1.3.4 
Ford Transparent Gateway 
A  complex  driver  is  available  for  ECUs  that  need  to  support  the  transparent  gateway 
according to GGDS004 Annex F. 
1.3.5 
Limitation DEM 
>  No integrated support of ISO 15031-5 / SAE J1979 (OBD services) 
>  No support for separate aging counter for testFailedSinceLastClear Bit versus 
confirmed DTC bit (typically only needed for ECM/TCM) 
>  All supported snapshot records must contain the same list of DIDs for a given DTC 
>  No integrated support for ISO 14229-1 service function $19 sub –function $17, $18 
and $19 
>  There are some additional requirements by Ford to implement OnDemand DTCs. This 
is not in the scope of the DEM. There is no support in the Ford SLP1 for this so the 
application has to implement it. 
1.3.6 
Limitation DCM 
Support for the following features is planned  
>  SID 0x2F with CEMR and bitmapped signals  R19 
>  SID 0x31 "RoutineInfo" and OBD2 routines  R17 (December 2016) 
1.3.7 
Integration Review 
An Integration review is required. It will be offered with the FNOS stack. It is scheduled by 
Ford.  
1.3.8 
Priority Inversion Avoidance (PIA) 
If PIA is required in your project please note the following (typically external PIA is not of 
interest to Ford). 
AUTOSAR defines Can driver features for implementing PIA: 
>  Multiplexed Tx for external PIA (multiple Tx mailboxes are used for BasicCAN 
transmission). 
>  Hardware (Transmit) Cancellation for internal PIA 
But not all hardware platforms support this, due to hardware limitations. So if this topic is 
important for your Ford project, please select  a hardware  platform without  limitations  wrt 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 


Product Information MICROSAR Ford SLP1 
PIA. Internal PIA can be fulfilled as well by putting all send PDUs into a FullCAN buffer, but 
this  solution  depends  on  the  available  mailboxes  and  on  the  communication  description 
distributed by Ford. 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 


Product Information MICROSAR Ford SLP1 
2  Tool Chain 
This  chapter  gives  an  overview  over  the  available  tool  chain,  which  supports  the 
configuration  of  the  Basic  Software  (BSW),  the  Runtime  Environment  (RTE),  Software 
Components (SWC) and, if available, of the boot loader. 
Please  refer  to  the  Vector  Knowledge  Base  for  a  list  of  supported  operating  systems  of 
each tool. 
2.1 
Configuration Tools 
The basic delivery set includes the following tools: 
 (mandated by Ford) 
>  DaVinci Configurator Pro Version 5:  
>  Recommended editor for MICROSAR BSW, MICROSAR OS 
>  Recommended configurator for MICROSAR RTE 
>  Generic Configuration editor (GCE) which allows the configuration of any software 
module which provides an AUTOSAR Basic Software Module Description (BSWMD). 
>  Use Case editors and validators 
2.2 
Additional Tools 
>  DaVinci Developer:  SWC editor. Basic features are  
>  Creation and configuration of atomic SWC and SWC compositions 
>  Support of several AUTOSAR versions when importing SWC descriptions that have 
been created by AUTOSAR-compliant tools 
>  CANdela Studio: This tool provides easy editing and creation of diagnostic 
configuration files (CDD) as used by the MICROSAR DCM and DEM. 
2.3 
Supported Interchange Formats 
>  CAN  
DBC, (AUTOSAR System Description 4.2.1 planned for future) 
>  LIN  
LDF 2.1 , (AUTOSAR System Description 4.2.1 planned for future) 
>  CDD 
CDD manufacturer type “Ford” required. 
 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 


Product Information MICROSAR Ford SLP1 
3  Workflow 
Input files provided by 
DBC
.xml
Ford
DaVinci Developer
LDF
Contains communication
Software Component 
information, needed
Description files
for the ECU
Embedded Coder
TargetLink
DaVinci Configurator Pro
Configuration of RTE + BSW
SystemDesc 
OEM Preconfig.
Conversion
BSW module 
.c
.h
configuration header 
.xml
Editing and
and code files
ECU Extract of 
Generation
RTE header and code 
System Description
files
SWC header files
Base ECUC 
.cdd
Generation
CANdela 
Diagnostic Data
.xml
Other AUTOSAR tools
ECU Configuration
Description
 
Figure 3-1  Workflow, of BSW configuration 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 


Product Information MICROSAR Ford SLP1 
4  Additional Information 
>  Legislative On Board Diagnostic (OBD) 
Legislative OBD2 support can be ordered as an optional extension to the MICROSAR 
DCM module. This add-on supports the OBD diagnostic services $01 to $0A according 
to AUTOSAR and SAE J1979 / ISO 15031. 
>  OTA (Over-the-air) Ford 
These modules allow for data collection and/or flashing in the background (while the 
vehicle is operated) using standard in-vehicle networks (CAN, CAN FD, Ethernet). The 
name comes from the fact that one ECU in the vehicle sends and receives these data 
over the air.  
>  OTA PARSED Server 
The OVTP PARSED server implements services that allow controlling PARSED data 
aggregation and transmission by activating/deactivating PARSED channels and by 
reporting the channel configuration to the backend.  
Channels, messages and data structures can be configured flexibly. Standardized 
data structures (DID push, UINT statistics, UINT histogram) for data aggregation and 
transmission are provided, additional (custom) data structures may optionally be 
added. This functionality requires the module OVTP. 
>  OTA Server 
The OTA server implements the Ford OTA protocol for software updates over the air 
from application context.  
It provides features such as end-to-end command authentication (cloud-to-ECU), 
download handling (erase and program flash), software consistency checks 
(“SWash”), A/B-Swap handling, and rollback handling.  
The OTA server requires an ECU-specific extension to facilitate hardware and 
software architecture-specific parts of the software update process.  
This functionality requires the module OVTP. 
>  OVTP  
The OVTP protocol handler allows request/response communication (client  server 
 client) and push messages (server  client) for one OVTP client and multiple 
OVTP server ECUs with one or more OVTP server applications each.  
OVTP provides buffer management, communication timeout supervision, session 
handling, message header validation and request dispatching.  
OVTP supports a CANbedded-type ISO-TP and AUTOSAR 4 PduR interface for 
communication. All connections and applications must be statically configured at 
compile time. 
© 2017 Vector Informatik GmbH 
Version 2.04.02 

based on template version 4.7.2 

Document Outline


1.3.44 - ReleaseNotes_3rdPartyMCAL_VectorIntegration

MICROSAR [BSW module]

1.3.45 - ReleaseNotes_3rdPartyMCAL_VectorIntegration_ind

Outline
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8

1.3.46 - ReleaseNotes_3rdPartyMCAL_VectorIntegrations


 
 
 
 
 
 
 
 
 
 
 
 
3rdParty MCAL Integration 
Release Notes 
 
Renesas RH850 P1M-C/P1H-C/P1H-CE 
Version 1.0.0 
 
 
 
 
 
 
 
 
 
 
 
Authors 
Andrej Gazvoda 
Status 
Released 
 
 
 
 
 
 


Release Notes 3rdParty MCAL Integration 
Document Information 
History 
Author 
Date 
Version  Remarks 
Andrej Gazvoda  2017-07-27  1.0.0 
Basic Integration of P1M-C Mcal 
Roland Suess 
2017-08-09   
Update regarding AUTOSAR_RH850_P1M-
C_MCAL_Ver4.02.01.D 
 
Reference Documents 
No. 
Source 
Title 
Version 
[1]  Vector 
TechnicalReference_3rdParty-MCAL-Integration.pdf 
see delivery 
 
Scope of the Document 
This  document  contains  information  about  the  integration  of  3rd  Party  MCAL  into  Vector 
software stack. 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 


Release Notes 3rdParty MCAL Integration 
Contents 
1 
MCAL Integration .......................................................................................................... 4 
1.1 

Type of Integration ............................................................................................. 4 
1.2 
MCAL Location within SIP .................................................................................. 4 
1.3 
Supported 3rd Party Products ............................................................................. 4 
1.4 
Configuration Tools ............................................................................................ 5 
2 
Vector Comment ........................................................................................................... 6 
2.1 

Known Issues .................................................................................................... 6 
2.1.1 

Spi module cannot be generated........................................................ 6 
3 
Glossary and Abbreviations ........................................................................................ 7 
3.1 

Glossary ............................................................................................................ 7 
3.2 
Abbreviations ..................................................................................................... 7 
4 
Contact .......................................................................................................................... 8 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 




Release Notes 3rdParty MCAL Integration 
1  MCAL Integration 
1.1 
Type of Integration 
 
Comfort Integration 
Vector tool DaVinci Configurator 5 is used for configuration 
 
>  as comfort editor for Mcu component (clock tree) 
>  as generic editor for other MCAL modules 
 
Recommended workflow:  
Generation and changes in configuration are done in DaVinci Configurator. 
1.2 
MCAL Location within SIP 
 
The  3rd  Party  MCAL  is  separated  from  the  Vector  parts  within  the  SIP.  Furthermore,  it 
might  not  be  part  of  the  delivery.  In  this  case  please  refer  to  chapter  ‘First  Steps’  in 
document TechnicalReference_3rdParty-MCAL-Integration.pdf [1]. 
 
1.3 
Supported 3rd Party Products 
This integration supports the following Renesas targets: 
 
  RH850P1M-C 
 
 
 
Note 
Please refer to the Release Notes of the 3rd Party Products for further 
  information, e.g. regarding supported versions, derivatives and compilers. 
 
 
 
 
 
 
Note 
Please be aware that only official 3rdParty-Vendor releases are part of this Vector 
  integration package. Therefore any customer-specific releases cannot be considered. 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 



Release Notes 3rdParty MCAL Integration 
 
 
Caution 
Please contact the 3rdPartyVendor to find out if there are further Hotfixes 

 
available for your Mcal package.  
It is essential to replace the affected MCAL parts in your original package 
before you start Script_MCAL_Prepare.bat
.  
 
 
 
1.4 
Configuration Tools 
>  DaVinci Configurator 5 
 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 


Release Notes 3rdParty MCAL Integration 
2  Vector Comment 
Please 
consider 
the 
attached 
TechnicalReference_3rdParty-MCAL-
Integration.pdf [1] for further information regarding Vector integration and setup of a 
project. 
 
2.1 
Known Issues 
The original MCAL package might contain errors. Necessary patches are provided via the 
SIP  folder  ThirdParty\  Mcal_Rh850P1xC\VectorIntegration\Patches\  (called 
'patch folder' in this chapter). 
 
2.1.1 
Spi module cannot be generated 
The reference destination of the configuration parameter SpiClockFrequencyRef is wrong 
in  the  Spi  module  description  file.  Therefore  no  valid  configuration  can  be  created  and 
generation is not possible. To allow generation the file Copy_SPI_bswmd.arxml in the SIP 
folder BSWMD has to be replaced against the corrected file in the patch folder. 
This issue has been reported to Renesas issue database with ARCAADA-613. 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 


Release Notes 3rdParty MCAL Integration 
3  Glossary and Abbreviations 
3.1 
Glossary 
Term 
Description 
3rd  party  components  BSW  modules  not  provided  by  Vector.  Vector  may  have  integrated  the 
/ MCAL 
software  within  the  SIP  but  does  not  take  over  any  responsibility 
regarding functionality of these modules. 
DaVinci Configurator   Configuration and generation tool for Vector MICROSAR components 
 
Table 3-1   Glossary 
 
 
3.2 
Abbreviations 
Abbreviation 
Description 
MCAL 
Microcontroller Abstraction Layer   
AUTOSAR 
Automotive Open System Architecture 
SIP  
Software Integration Package (as provided by Vector) 
Msn 
Module Short Name derived from AUTOSAR 
Table 3-2   Abbreviations 
 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 


Release Notes 3rdParty MCAL Integration 
4  Contact 
Visit our website for more information on 
 
>  News 
>  Products 
>  Demo software 
>  Support 
>  Training data 
>  Addresses 
 
www.vector.com 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.0.0 

based on template version 6.0.1 

Document Outline


1.3.47 - ReleaseNotes_DaVinciConfigurator

DaVinci Configurator Pro Release Notes

DaVinci Configurator Pro Release Notes

Copyright © 2017 by Vector Informatik GmbH

Table of contents

DaVinci Configurator Pro 5.15 (SP3)
DaVinci Configurator Pro 5.15 (SP2)
DaVinci Configurator Pro 5.15 (SP1)
DaVinci Configurator Pro 5.15
DaVinci Configurator Pro 5.14 (SP3)
DaVinci Configurator Pro 5.14 (SP2)
DaVinci Configurator Pro 5.14 (SP1)
DaVinci Configurator Pro 5.14
DaVinci Configurator Pro 5.13 (SP4)
DaVinci Configurator Pro 5.13 (SP3)
DaVinci Configurator Pro 5.13 (SP2)
DaVinci Configurator Pro 5.13 (SP1)
DaVinci Configurator Pro 5.13
DaVinci Configurator Pro 5.12 (SP3)
DaVinci Configurator Pro 5.12 (SP2)
DaVinci Configurator Pro 5.12 (SP1)
DaVinci Configurator Pro 5.12
DaVinci Configurator Pro 5.11 (SP5)
DaVinci Configurator Pro 5.11 (SP4)
DaVinci Configurator Pro 5.11 (SP3)
DaVinci Configurator Pro 5.11 (SP2)
DaVinci Configurator Pro 5.11 (SP1)
DaVinci Configurator Pro 5.11
DaVinci Configurator Pro 5.10 (SP9)
DaVinci Configurator Pro 5.10 (SP8)
DaVinci Configurator Pro 5.10 (SP7)
DaVinci Configurator Pro 5.10 (SP6)
DaVinci Configurator Pro 5.10 (SP5)
DaVinci Configurator Pro 5.10 (SP4)
DaVinci Configurator Pro 5.10 (SP3)
DaVinci Configurator Pro 5.10 (SP2)
DaVinci Configurator Pro 5.10 (SP1)
DaVinci Configurator Pro 5.10
DaVinci Configurator Pro 5.9 (SP6)
DaVinci Configurator Pro 5.9 (SP5)
DaVinci Configurator Pro 5.9 (SP4)
DaVinci Configurator Pro 5.9 (SP3)
DaVinci Configurator Pro 5.9 (SP2)
DaVinci Configurator Pro 5.9 (SP1)
DaVinci Configurator Pro 5.9
DaVinci Configurator Pro 5.8 (SP5)
DaVinci Configurator Pro 5.8 (SP4)
DaVinci Configurator Pro 5.8 (SP3)
DaVinci Configurator Pro 5.8 (SP2)
DaVinci Configurator Pro 5.8 (SP1)
DaVinci Configurator Pro 5.8
DaVinci Configurator Pro 5.7 (SP4)
DaVinci Configurator Pro 5.7 (SP3)
DaVinci Configurator Pro 5.7 (SP2)
DaVinci Configurator Pro 5.7 (SP1)
DaVinci Configurator Pro 5.7
DaVinci Configurator Pro 5.6 (SP11)
DaVinci Configurator Pro 5.6 (SP10)
DaVinci Configurator Pro 5.6 (SP9)
DaVinci Configurator Pro 5.6 (SP8)
DaVinci Configurator Pro 5.6 (SP7)
DaVinci Configurator Pro 5.6 (SP6)
DaVinci Configurator Pro 5.6 (SP5)
DaVinci Configurator Pro 5.6 (SP4)
DaVinci Configurator Pro 5.6 (SP3)
DaVinci Configurator Pro 5.6 (SP2)
DaVinci Configurator Pro 5.6 (SP1)
DaVinci Configurator Pro 5.6
DaVinci Configurator Pro 5.5 (SP9)
DaVinci Configurator Pro 5.5 (SP8)
DaVinci Configurator Pro 5.5 (SP7)
DaVinci Configurator Pro 5.5 (SP6)
DaVinci Configurator Pro 5.5 (SP5)
DaVinci Configurator Pro 5.5 (SP4)
DaVinci Configurator Pro 5.5 (SP3)
DaVinci Configurator Pro 5.5 (SP2)
DaVinci Configurator Pro 5.5 (SP1)
DaVinci Configurator Pro 5.5
DaVinci Configurator Pro 5.4 (SP7)
DaVinci Configurator Pro 5.4 (SP6)
DaVinci Configurator Pro 5.4 (SP5)
DaVinci Configurator Pro 5.4 (SP4)
DaVinci Configurator Pro 5.4 (SP3)
DaVinci Configurator Pro 5.4 (SP2)
DaVinci Configurator Pro 5.4 (SP1)
DaVinci Configurator Pro 5.4
DaVinci Configurator Pro 5.3
DaVinci Configurator Pro 5.2
DaVinci Configurator Pro 5.0 (SP1)
DaVinci Configurator Pro 5.0
Additional Information

(top)

DaVinci Configurator Pro 5.15 (SP3)

Extensions

Miscellaneous Tool Features

  • CAN Bustiming Dialog: improved performance and usability

Fixed Issues

  • Connector check for ApplicationDataTypes should not rely on ImplementationDataTypes
  • Derive CanNmVariant dependent of NmPassiveModeEnabled
  • Differences are not cleaned up before another import / compare is started
  • Validation View context menu is not resized correctly
  • Multiselection editing doesn't allow to set empty string
  • Consider the SignalGroup name for the DataMapping Assistant
  • SWC generation in AUTOSAR3 use case: SWC is out-of-synch after each project load
  • LdComApiType LDCOM_TP is never derived
  • Enhance the derivation of SecuredIPdu for PDU fan-out
  • The BSW Management Editor's tree shows elements of non-active variants
  • Long duration of generation when Custom-Workflow-Steps are configured

(top)

DaVinci Configurator Pro 5.15 (SP2)

Note

  • Ensure to install the latest External-Components Setup from: Vector Download Area
  • Extensions

    Miscellaneous Tool Features

    • Update pool license management to version 2.0 and to Flexnet version 11.13.03
    • Property view status tab shows preconfigured status with value relation
    • Provide Option to integrate SWC Templates into the generation
    • Improved automatic selection in "Edit variance" dialog
    • Improved CAN Acceptance Mask Configuration
    • Change default action of "Edit Variance" assistant to "Detailed configuration of variance" and remember last choice

    Fixed Issues

    • 'Connect to new port' doesn't fully validate new port names and runnable prefix/postfix
    • Cfg5 fails to refresh propertly, when a module is activated/deavtivated via the undo/redo operations
    • Change derivation of CanHardwareObject, CanIfHxhConfig container
    • 'Setup Event Memory Blocks' assistant changes the BlockId name unexpectedly
    • In a variant configuration Parameter is created without recommended/default value
    • New project assistant: Disable VTT settings if VTT is not enabled
    • Wrong order of actions in the context menu in communication users editor
    • IllegalStateException when there pre ext gen steps, post ext gen steps and ARXML to A2L conv is activated
    • Missing ComControllerRef in CanCommunicationConnector aborts the Update Workflow
    • Automap does not consider delegation ports as potential targets
    • Displaying the RTMMeasurementPoints grid in the BasicEditor takes too long
    • Status tab displays only location in properties view for non-existance parameter, display also Createable state
    • Derive only from TpConnections that are used by the ECU instance of the System Extract
    • The derivation of the SecOc Pdu and the contained AuthenticPdu is changed for the Gateway use case

    (top)

    DaVinci Configurator Pro 5.15 (SP1)

    Extensions

    Miscellaneous Tool Features

    • Diff&Merge of system description elements in variant projects

    Fixed Issues

    • ECU Software Components Editor: Unhandled Event Loop Exception when preselecting the child element in the Data Mapping Page
    • Combined Events: DTC id set for BSW Events cannot be cleared
    • Validation message "RTE51017 Port prototype inconsistent" shown for a port in a CompositionType
    • Create New Port Assistant: Two connections are created instead of one
    • For nested data mappings the channel and cluster is displayed as "Unmapped"
    • No error icons are shown within the ClockReferencePoints grid
    • ComMPncComSignal for ERIA Rx pdu missing
    • FrTpConnectionMapping - LA / RA Address consider correct communication direction
    • Allow the removal of the DT-VTT setting
    • BSW Management Editor: disable "Configure..." hyperlinks for disabled auto-configuration domains
    • "Create Parameter" operation is enabled in context menu of parameters with 0:0 multiplicity
    • User annotation for parameter is added to parent container
    • Grid of Task Mapping Editor disappears on switching the grouping mode
    • Hide "Copy value" entry in context menu for configuration elements without value
    • Change the derivation of CanTpRxTaType to ASR4.3
    • UUID validation does not consider variant input files
    • Derive the parameters ComGwDestinationDescription/ComUpdateBitPosition and ComGwSourceDescription/ComUpdateBitPosition
    • Performance issue during system description synchronization
    • Null Pointer Exception when choosing "Deselect All" in import assistant
    • The vertical size of the "Module Import" assistant is too small
    • Path length check of DaVinci Configurator launcher executables should include length of license DLLs
    • Error about multiple reference targets is reported when creating a logical expression
    • Execution order constraint: ComponentRef expects BaseComposition as context

    (top)

    DaVinci Configurator Pro 5.15

    Extensions

    Miscellaneous Tool Features

    • Support ASR4.3 Schema
    • Support DaVinci Developer 4.0
    • Improved vVIRTUALtarget configuration
    • Reworked and homogeneous context menues
    • Support of two Flexray communication controllers
    • Simplification of the Delete Module Assistant
    • Display CanTpNSa, CanTpNTa and CanTpNAe in Transport Protocol Editor
    • Postbuild-Selectable: Support of variance in Diagnostic Data Identifiers Editor
    • Performance: Optional deactivation of auto-solving actions to avoid GUI blocking time
    • Find View: Support of system description elements
    • Improved BSWM logical expression assistant for postbuild-selectable use cases
    • RTE configuration: support of execution order constraints and timing constraints
    • Support of description-based signal routing

    Fixed Issues

    • Exception is shown when using "- Show all -" after project close
    • Postbuild-Selectable: Variant specific renaming of container isn't possible
    • Configurable option of silent update of DaVinci Developer workspace
    • Unhandled Event Loop Exception when updating Properties View after disconnecting connectors in the ECU Software Components editor
    • Wrong derivation of PnFilterMask
    • Display error annotations in the grid of the Task Mapping Editor
    • Wrong row selected during refresh of application connectors grid after adding/removing connection
    • Support multi-selection of Standard Configuration Files in Input File Editor
    • Derive CanIfHrh container for NmRangePdus
    • Stop file supervision during project update
    • Derive parameter NmCoordinator only if the container NmCoordinator exists and refers to a NmNode
    • Derive ComFirstTimeout for AUTOSAR 4.3
    • Derive the parameter SecOCFreshnessValueId
    • Error annotations are displayed on unexpected mode ports
    • SoAdRxUpperLayerType and SoAdTxUpperLayerType as specified in AUTOSAR 4.3
    • Missing ComSignalLength for ComGwSourceDescription
    • Do not derive routed SecOc Tx and Rx Pdus
    • Derive CanIfRxPduUserRxIndicationUL and CanIfTxPduUserTxConfirmationUL for SecOc PDUs
    • Derive FrIfUserRxIndicationUL and FrIfUserTxUL for SecOc PDUs
    • Missing [Can/Fr]IfUserTxConfirmation and [Can/Fr]IfUserRxIndication for SecOc Pdus contained in ContainerIPdus
    • SWC template generation GUI does not support cancellation
    • Do not derive FrIf/FrIfConfig/FrIfCluster/FrIfController/FrIfCtrlIdx
    • Move up and move down buttons of generator steps are always disabled
    • Update of a variant project fails if criterion names and variant names don't match
    • Derive the parameters ComGwDestinationDescription/ComUpdateBitPosition and ComGwSourceDescription/ComUpdateBitPosition
    • SoAdRxUpperLayerType and SoAdTxUpperLayerType not derived correct for DcmIPdus

    (top)

    DaVinci Configurator Pro 5.14 (SP3)

    Fixed Issues

    • Selection changes are ignored in Memory Mapping assistant
    • Combined Events: DTC ID set for BSW Events cannot be cleared
    • OS Configuration Editor (Gen7 OS): OsApplication-Labels do not contain assigned core number anymore
    • Error about multiple reference targets is reported when creating a logical expression
    • Saving backup while removing a module doesn't work
    • ECU Software Components Editor: Allow multiselection when selecting target ports for manual connection creation
    • Task Mapping Editor: Scrolling to tree-selected mapped runnable in grid does not work anymore
    • Diff/Merge: Parameter is duplicated if it exists already without value
    • Change derivation of XNmComUserDataSupport parameter for CanNm, FrNm, UdpNm and Nm
    • Consistency message RT00002 is created for connector validation
    • For nested data mappings the channel and cluster is displayed as "Unmapped"
    • Automation Interface: solving action execution may cause an InvalidObjectException
    • Adjust FrTpConnection naming rule
    • ComMPncComSignal for EIRA Rx PDU missing
    • FrTpConnectionMapping - LA / RA Address consider correct communication direction
    • Link of unused global PDU should not be resolved into the PDUs Editor
    • Grid of Task Mapping Editor disappears on switching grouping mode
    • Derivation of PN Filter Masks do not consider only requestor PNC Mappings
    • Derive the parameters ComGwDestinationDescription/ComUpdateBitPosition and ComGwSourceDescription/ComUpdateBitPosition
    • Support concurrent local license access for multiple clients
    • Update workflow fails if project folder path ends with ".\"
    • Data Mapping: Automapper does not map root data elements of ArrayOfUint8 to non-dynamic-length signals
    • Path length check of DaVinci Configurator launcher executables should include length of license DLLs

    (top)

    DaVinci Configurator Pro 5.14 (SP2)

    Extensions

    Miscellaneous Tool Features

    • Support of two Flexray communication controllers

    Fixed Issues

    • Postbuild-Selectable: Variant specific renaming of container isn't possible
    • Enable state of a supervised entities individual supervision cycle in the Watchdogs editor
    • ″Element Usage″ command does not work in ″Memory Blocks″ editor
    • Correct ″Virtual target″ usage state within DaVinci Configurator GUI
    • Show recommended and preconfigured information for containers
    • Show the loading location of an element
    • PDUs editor shows "Com" section for NM CanIf PDU
    • Derive the parameter SecOCFreshnessValueId
    • Derive additional parameters for SecOC
    • Error annotations are displayed on unexpected mode ports
    • Input file preprocessing is not executed if the LegacyConverter is changed
    • "New Project" Assistant checks for existence of VTT tool even though the VTT target is not enabled in the project
    • Prevent creation of duplicate EcuC InitFunctions
    • Creating BswMModeConditions for BswMUserConditionRequests is not possible
    • Edit variance command is offered for conditions in non-post-build-selectable projects
    • Missing [Can/Fr]IfUserTxConfirmation and [Can/Fr]IfUserRxIndication for SecOc Pdus contained in ContainerIPdus
    • Swct-Generation GUI does not support cancelation
    • Duplicate DoIPConnection names might be generated
    • Wrong detected IPv4 broadcast address leads to multiple DoIPUdpVehicleAnnouncementConnections
    • A choice container can not be created with bswmdModel() in the automation interface
    • Do not derive FrIf/FrIfConfig/FrIfCluster/FrIfController/FrIfCtrlIdx
    • BSW management editor: newly created elements are not automatically selected in the tree
    • FrNmChannelIdentifiersMapping - consider correct FrNmCluster

    (top)

    DaVinci Configurator Pro 5.14 (SP1)

    Extensions

    Miscellaneous Tool Features

    • DaVinci Configurator Lib: no more UUIDs in generated EcuC

    Fixed Issues

    • Development Errors Editor throws exception, if DetGeneral container is not present
    • Do not derive routed SecOC Pdus
    • CreateMemBlockOnDefaultPartition throws an IllegalArgumentException.
    • Derive CanIfRxPduUserRxIndicationUL and CanIfTxPduUserTxConfirmationUL for SecOc PDUs
    • Derive FrIfUserRxIndicationUL and FrIfUserTxUL for SecOc PDUs
    • Missing ComIPduSignalGroupRef in ComIPdu
    • Missing ComSignalLength for ComGwSourceDescription

    (top)

    DaVinci Configurator Pro 5.14

    Note

  • Vector Knowledge Base extended with "Troubleshooting" section for the DaVinci tools
  • Extensions

    Automation Interface

    • Automation API for various purposes like editing EcuC values, access of validation results, execution of solving actions
    • Integrated scripting host for executing Groovy scripts
    • Selection of script files and script projects
    • Execution of script tasks via the GUI and via command line

    BSW Management Editor: improved editing of expressions

    • Drag and drop support
    • Reuse of expressions

    Miscellaneous Tool Features

    • Verify compatibility of vVIRTUALtarget basic version and DaVinci Configurator version
    • Support hex, binary, octal format for init values in system description
    • Allow export module configuration in read-only projects
    • Diagnostic extract processing: auto-connect of Dcm routine ports
    • Support of sender/receiver communication for Dem
    • Support of memory ranges from cdd file
    • Support 64-bit Signal Types for COM according to AUTOSAR 4.2.2
    • Support of CAN-FD request types within Transport Protocol Editor
    • Split the file preprocessing from the update workflow into an own workflow
    • Create separate EIRA TX IPDUGroups and EIRA RX/ERA RX IPDU Groups
    • Improve pool license handling within DaVinci Configurator
    • Support the replacement of variant module configurations
    • Provide new generation setting "Tresos performance optimization"

    Fixed Issues

    • Alt+Click doesn't work in grids in the IOHwAb editor
    • PDUs Editor: sub-nodes of a module (i.e. the possible types of module PDUs) shall be sorted alphabetically
    • Not all EIRA TX Signals are mapped as ComMPncSignal
    • ComMPncSignal for EIRA Tx signal refers to the wrong channel
    • Do not map a EraSignal to a ComMPnc if it is only assinged to one channel
    • Duplicate log entries in Update Workflow log
    • Commandline option -m (--modulesToGenerate) does not work with an empty argument ("")
    • Preferred solving action marker not displayed within Validation View context menu
    • Update workflow gets aborted for FrNm with missing FrCommunicationCluster reference
    • PDUs Editor: routing path form not displayed correctly when selecting multiple destination PDUs
    • Mapping rule for FrIfByteOrder does not use definition in IPduToFrameMapping.packingByteOrder
    • PduRRoutingPath created twice for EIRA TX PDU
    • The creation of new projects with invalid identifier names shall be rejected
    • Project Settings Editor: EcuC File Reference File is not shown after adding a file
    • Derive parameter ComSignalGroupArrayAccess
    • Derive XNmComUserDataSupport parameter for CanNm, FrNm and UdpNm
    • Diff/Merge: tooltip in tree does not show all differences
    • Derivation of reference EthTSyn/EthTSynGlobalTimeDomain/EthTSynPortConfig/EthTSynGlobalTimeEthIfRef
    • Change mapping rules for TcpIpLocalAddr and TcpIpAddrAssignment to allow multiple assignment methods
    • FrTp connection mappings gets aborted at TpConnections without receivers
    • Change Generate-Directory in CommandLine-Generation without dpa-File
    • Derive parameter UdpNmComUserDataSupport
    • Add SecuredIPdus to PduR

    (top)

    DaVinci Configurator Pro 5.13 (SP4)

    Fixed Issues

    • ECU Software Components Editor: "Connect to new port" doesn't fully validate new port names and runnable prefix/postfix
    • Workflow is cancelled if the schema validation of an Extract file fails during the update workflow
    • Update pool license management to version 2.0 and to Flexnet version 11.13.03
    • Create New Port Assistant: Two connections are created instead of one
    • Error message box is shown if the update workflow was cancelled
    • Signal groups with com-based transformers are not shown as serialized

    (top)

    DaVinci Configurator Pro 5.13 (SP3)

    Extensions

    Miscellaneous Tool Features

    • Simplifications in the "Delete Module Assistant"

    Fixed Issues

    • GPT Validators and RAMTST Validator shall only be active for MICROSAR definitions
    • Adding variance to a non-variant project leads to project update with UNDEFINED file set
    • Rounding error in Bustiming editor
    • SwcGeneration stays in sync even annotated variant derived-from-referrables change
    • Derive CanIfTxPduUserTxConfirmationULType and CanIfRxPduUserIndicationUL for GeneralPurposePdu with category "XCP"
    • Variant merger should support post-build-selectable variance in DiagnosticConnections
    • RTE59001 appears after execution of RTE59000
    • Missing DataTypeMappingSet after project creation
    • Changes in ProjectStandardConfiguration Input Files are not notified by the FileSupervision

    (top)

    DaVinci Configurator Pro 5.13 (SP2)

    Extensions

    Miscellaneous Tool Features

    • Support MICROSAR OS Gen7 in configuration editors
    • Allow module configuration export in read-only projects
    • Task Mapping Editor: add a link to create new tasks
    • Change mapping rules for TcpIpLocalAddr and TcpIpAddrAssignment to allow multiple assignment methods
    • Support dynamic IP multicast address configuration
    • Support of CAN-FD request types within Transport Protocol Editor

    Fixed Issues

    • Diff / Merge: Improve error message when project 'OTHER' is locked by another application
    • Duplicate log entries in Update Workflow log
    • Commandline option -m (--modulesToGenerane) does not work with an empty argument ("")
    • Exception is shown when closing a project while "Link with editor" is active
    • Derive XNmComUserDataSupport parameter for CanNm, FrNm and UdpNm
    • Derive parameter UdpNmComUserDataSupport
    • Persistency reload doesn't remove child objects of a removed subtree contained in several files

    (top)

    DaVinci Configurator Pro 5.13 (SP1)

    Extensions

    Diff & Merge

    • Introduction of 3-way-merge including an auto-merge functionality
    • Diff & merge for SystemDescription elements
    • Provide filter mechnism for Diff&Merge results

    Miscellaneous Tool Features

    • Support MICROSAR SafeWdgM in Watchdogs Editor
    • Task Mapping Editor: unmap functionality

    Fixed Issues

    • Alt+Click doesn't work in grids in the IOHwAb editor
    • DcmDslConnections incomplete for DoIp + CAN
    • Value of System Extract property SocketConnection.clientPortFromConnectionRequest is ignored
    • Changing selection of tree nodes in Input Files Editor freezes the application
    • Error annotation does not finish in acceptable time in ECU Components editor
    • NullPointerException when switching number format
    • Project Settings Editor: EcuC File Reference File is not shown after add
    • The creation of new projects with invalid identifier names shall be rejected
    • PduRRoutingPath created twice for EIRA TX PDU
    • Update Workflow gets aborted for FrNm with missing FrCommunicationCluster reference
    • Rename of symbolic name value containers is denied even if the symbolic name parameters have equal values

    (top)

    DaVinci Configurator Pro 5.13

    Extensions

    New editor: Task Mapping

    • Overview of all OS applications, tasks and the mapped runnables
    • Map the runnables by drag-and-drop
    • Group the RTE events by trigger type or by component

    BSW Management Editor improved

    • Hide auto-config-sub-nodes without content
    • Provide support for post-build variance in "Select Existing Action" assistant
    • Provide create commands in auto configuration groups

    Miscellaneous Tool Features

    • Global number format selection
    • Auto-connect Dcm ports with application SWCs based on mappings defined in diagnostic extract
    • Support Data Transformation for Dcm
    • Derivation of System Extract attributes for EthTSyn
    • Support of Bitfield data types for ServiceSWCs
    • UUID-based object identification during project update
    • Use CMS garbage collector to improve memory performance
    • Support of Windows 10

    Fixed Issues

    • DaVinci Configurator freezes when many elements are selected from the Validation View
    • Basic Editor performs several updates after executing a find query
    • Generation dialog scroll position changes if generation fails
    • Element Usage View: Show-In on Multi-Instance-Reference-Parameter does only show Basic Editor as target
    • Performance Improvement for multi selection case
    • Find view content isn't cleared on project close / open
    • Prevent that PNC EIRA Pdu is derived multiple times
    • CanNmRxPdus are missing
    • Error when loading a dpa-file from a location containing a #-character
    • Do not derive the ComSignal HandleId
    • Null Pointer Exception in validation view when filtering out acknowledged validation results
    • Shortname change isn't refelected in the editor tree
    • Acknowledging a validationresult that reports a missing module causes an IllegalArgumentException
    • Do not derive PduR routing paths and IPduM path ways for Gateway MultiplexedIPdus
    • OsIsr Service: a Cfg95301 error is not solvable in case of Mojito Os
    • Wrong DcmDslConnection derivation based on DBC DiagConnection attribute
    • Setup crashes if path length of the sip to update is to long
    • Derive EthSwtConfig from CouplingElements only for the selected ECU instance
    • Derive User Rx Indication also for ContainerIPdus
    • Unhandled Event loop exception when selecting a schedulable entity in the Events page in Internal Behavior Editor

    (top)

    DaVinci Configurator Pro 5.12 (SP3)

    Miscellaneous Tool Features

    • Detailed SIP license state information
    • Derive IpduM/IpduMGeneral/IpduMHeaderByteOrder
    • CanNmMsgRepeatMsgInd is now derived from NmEcu.nmRepeatMsgIndEnabled

    Fixed Issues

    • GPT Validators and RAMTST Validator shall only be active for MICROSAR definitions
    • Display errors in tooltips with long texts
    • Tool freezes when many elements are selected from the Validation View
    • Exception when selecting DemEventParameter in Basic Editor
    • Not all EIRA TX Signals are mapped as ComMPncSignal
    • Commandline generation does not detect missing system description synchronization (RTE59000)
    • 'V' - annotation at tree node labels does not reflect same state as editors
    • Enable the GUI to support correctly the Array mapping to primitive signals within a Record
    • Commandline update ends always with command error code 0
    • Unhandled event loop exception when starting update with a write protected "Log" folder
    • NullPointerException during FrTpMapping

    (top)

    DaVinci Configurator Pro 5.12 (SP2)

    Miscellaneous Tool Features

    • Support multi-selection in Differences View
    • Derive the parameters SoAdRxUpperLayerType and SoAdRxUpperLayerType
    • Inform user when configuration is updated in Generation - Calculation phase

    Fixed Issues

    • IronPython is not supported on 32 Bit systems
    • Naming collisions for ComIPdu, ComSignalGroup and global Pdus when there are distributed in several AR-PACKAGES
    • Allow usage of pool version license greater than current tool version
    • "Edit Project Settings" button is not disabled in read-only projects
    • Grids in Comfort Editors: Editing of boolean values works not as expected
    • Confirmation callbacks are not set for GeneralPurposePdu
    • Calculation of Ea- and FeeBlockNumber doesn't work any more

    (top)

    DaVinci Configurator Pro 5.12 (SP1)

    Extensions

    • MCAL update 4.0.7 for derivatives RH850 (D1x)
    • Ethernet: Derive remote IP address also when dynamic configuration is enabled

    Miscellaneous Tool Features

    • DataMapping-Validation and Assistant: Add check for ISignals/ISignalGroups not referenced by the System

    Fixed Issues

    • NullPointerException in validation view when filtering out acknowledged validation results
    • Error when loading a dpa-file from a location containing a #-character
    • Warning Cfg00024 "Missing reference target" occurs
    • FrNmPnEiraCalcEnabled derived with wrong value
    • Prevent that PNC EIRA Pdu is derived multiple times

    (top)

    DaVinci Configurator Pro 5.12

    Extensions

    • Introduction of DaVinci Configurator LTD
    • Validation result acknowledgment for warnings and information

    Miscellaneous Tool Features

    • Memory Block Editor: parameters re-arranged in form view and grid
    • Element usage view: support "Copy Path" to copy the AUTOSAR path to clipboard
    • EcucUpdater must be able to process containers/parameters without definition.
    • Support LDF Files according to J2602
    • Support of AUTOSAR schema validation for input files during project update workflow
    • Do not derive /MICROSAR/PduR/PduRBswModules to InitialEcuC
    • SoAdSocketRemoteAddress derivation according to ASR 4.2 upstream mapping rules
    • CompuScales as init values and conditions in BswM
    • Derivation of diagnostic connections out of system description / diagnostic extract

    Fixed Issues

    • Input Files Editor: 'Variant Merge' relevant folders should be displayed with relative path
    • Generation Dialog: Generation target should be saved
    • Editing existing annotation text is not possible
    • "Open in explorer" command opens wrong directory
    • Memory General Editor: Fls sectors do not show error icons
    • Menu entry "Switch configuration phase" onyl becomes active after saving the project
    • Exception when editing multiple boolean parameters in grid
    • PDU Editor: Channel node shows too many PDUs
    • New Project Assistant: Vtt-Project-Path and MC-Data show old values even though changed by user

    (top)

    DaVinci Configurator Pro 5.11 (SP5)

    Extensions

    Miscellaneous Tool Features

    • Provide possibility to import differences regarding derived Configuration Elements
    • Improve pool license handling within DaVinci Configurator

    Fixed Issues

    • User Annotations are not considered by diff and merge feature
    • SWC Generation creates non AR conform swCalibrationAccess-Properties for Type-References
    • Filtered validation view displays resuls twice and faulty
    • Commandline generator in Asr3 use case reports a SIP update warning
    • Postbuild Loadable should be defined during Project Setup (Diagnostic-Only support)
    • Differences Views don't display value for objects of type MIReferenceValue
    • Clicking on "+" does not expand the node in the DifferencesView
    • Instance reference cannot be edited on Japanese Windows systems

    (top)

    DaVinci Configurator Pro 5.11 (SP4)

    Extensions

    Diff & Merge

    • Introduction of 3-way-merge including an auto-merge functionality
    • Diff & merge for SystemDescription elements
    • Provide filter mechnism for Diff&Merge results

    Miscellaneous Tool Features

    • Improve Keyboard-Handling in "New module assistant"
    • Support list of "ApplicationComponents" folders
    • Support post build selectable variance in Issm editor
    • Use CMS garbage collector to improve memory performanc

    Fixed Issues

    • Inappropriate [V]-decoration in multi instance parameter control
    • "Show parent in" item in context menu of differences view fails
    • Exception after editing VFB trace function name
    • 'Memory General' editor overview page does not work correctly on multiple module configurations of 'Fls'
    • Remove derivation of parameter NmChannelId
    • Prevent the import of a module via Module Import if a module is imported by the standard configuration
    • Derive the parameters SoAdRxUpperLayerType and SoAdRxUpperLayerType
    • Bus Controller: Bus Timing page empty when CanBaudratePrescaler parameter is missing
    • Pdus are not multiplied if no PduToFrameMapping exists
    • Derive ComTransferProperty only for Tx ComSignals/ComGroupSignals
    • Do not start the update workflow if the EcuC file splitter are not reside within .\Config\EcuC
    • DaVinci Developer pool license is not recognized as .RTE option for DaVinci Configurator
    • Switching the projects configuration phase shall be denied if PostBuildLoadableSupport == false
    • Improve performance of ComponentType validation rule
    • Handling of empty System Extracts (with ECU instance only)
    • Bus Timing editor does not handle time values with non-terminating decimal expansion correctly

    (top)

    DaVinci Configurator Pro 5.11 (SP3)

    Extensions

    • Component Connection Assistant: Improve Automapping-Algorithm
    • VTT components are grouped in new domain "Virtual"
    • Provide a "Reset column order" command in Grid
    • DataMapping Assistant: display the cluster additional to the channel
    • Support MCAL for derivatives Rh850F1K
    • Support post build selectable variance in Issm editor

    Fixed Issues

    • ComSignalNaming Rule reports erroneously not unique shortname
    • BaseEcuc Mappings gets aborted due to missing Controller reference in CommunicationConnector
    • NullPointerException in PropertyView when closing variant project
    • NmChannelConfig and ComMChannel for Ethernet VLAN derived which does not contain any Nm configuration
    • Could not load ARXML files, which contains SHORT-NAME-FRAGMENTS from ASR4.2.2
    • Opening the context menu of validation result Cfg00024 results in a "NoSuchElement" exception
    • Switching the active variant results in an out-of-synch grid view

    (top)

    DaVinci Configurator Pro 5.11 (SP2)

    Extensions

    • MCAL update 4.0.6 for derivatives RH850_1407 and RH850_1404 (D1M)

    Performance

    • Reduce memory consumption during background validation.

    Fixed Issues

    • Correct calculation of IsoRscan, IsoRlin and IsoVi0pixclk within validation rules for RH850D1x.
    • The project last opened is not listed in the recent file list
    • Data Mapping Assistant assigns variation point of non-selected variant.
    • If the SIP defines no valid derivative, the 'Project New Assistant' sets the 'Virtual Target' option
    • Don't roll back the SIP migration of all modules in case of an error at a single module.

    (top)

    DaVinci Configurator Pro 5.11 (SP1)

    Note

    • Aladdin dongles used on 32-bit Windows systems are no longer supported. Please use Keyman-dongles instead (contact support).

    Extensions

    • Create report from find view result
    • "Element usage" view supports "Copy Path"

    Fixed Issues

    • License management: keyman dongle licenses are displayed duplicated within the overview
    • Element usage view breaks if an expanded root element is removed from the model
    • Do not derive the container DcmDslProtocolRow if all DcmConnections are routed
    • Validation for unmapped port should check the mapping in other Variants
    • DataMapping-Assistant: Automapped complex data elements are not expanded and not automapped
    • IoHwAb Comfort Editor shows the wrong IoHwAbInitValueType
    • SdServer-/SdClientTimers are not derived for SdEventHandlers and SdConsumedEventGroups
    • Project Standard Configuration input file can't be added to two different file sets
    • Support post-build-selectable-variance in PncMappings
    • Assistant for mapping of production errors to diagnostic events does not work
    • Do not derive the parameter HandleIDs for IpduM, LdCom, PduR and FrArTp
    • Derive UdpNmMsgCycleTime indepent from Nm Passive Mode
    • Wrong calculation of PnFilterMask for large values

    (top)

    DaVinci Configurator Pro 5.11

    Extensions

    PDUs Editor redesigned

    • Changed tree structure to display all kinds of PDUs
    • Improved overview of PduR routing paths
    • Routing Path Assistant to create new routing paths

    Miscellaneous Tool Features

    • Task Mapping Assistant: filters for easy identification of mapping candidates
    • BSW Management Editor: improved display of BswM rules
    • Diff/Merge: Filtering of difference results
    • Improved behavior of column filter dialog in grid views
    • Improved behavior of find view: tolerant search without keywords, harmonized keywords
    • Explicit enabling of postbuild support in the project settings
    • Postbuild-Selectable support for Project Standard Configurations
    • MCU comfort Integration for RH850D1x

    Fixed Issues

    • Module configuration import: values of references are not correctly displayed
    • Tree filter isn't updated when changing shortnames
    • "Add Modules" Assistant shows error text but no error has occurred
    • Alt+Click doesn't work in grids in the IOHwAb editor
    • Mapping of implementation data types to application data types is not considered for NvBlockDescriptors of NvBlock SWCs
    • Partial Networking Editor: tree update missing on module activation/deactivation
    • "Element usage" view breaks if an expanded root element is removed from the model
    • Endless loop in "Element usage view"
    • "Select all" toolbar button in "Remove ECUC File Reference..." assistant does not work
    • AsrVersion of split ecuc files do not match the version from the main ecuc file
    • Top-down service configuration: wrong activation state of NvM module determined
    • Error is reported when creating a new parameter in the multi-instance parameter control
    • Module Internal Behavior Editor: Overview page is not updated when creating a new internal behavior as first action
    • NullPointerException in PropertyView when closing variant project

    (top)

    DaVinci Configurator Pro 5.10 (SP9)

    Fixed Issues

    • Module import should notify if an according module does already exist
    • Update can't be started due to missing ECU instance
    • Improve pool license handling within DaVinci Configurator
    • Instance reference cannot be edited on Japanese Windows systems
    • A dongle option license incorrectly activates a DaVinci Configurator PRO license
    • Ctrl+Alt+Del is handled as delete in List Views

    (top)

    DaVinci Configurator Pro 5.10 (SP8)

    Fixed Issues

    • User Annotations are not considered by diff and merge feature
    • SWCGeneration creates non AR conform swCalibrationAccess-Properties for Type-References
    • Input Files Editor: List of found ECU instances is no longer sorted
    • Allow usage of pool version license greater than current tool version

    (top)

    DaVinci Configurator Pro 5.10 (SP7)

    Fixed Issues

    • Auto-Merge operation only works on current selection
    • DaVinci workspace merge doesn't start DaVinci Developer with correct projects
    • Cannot load project if application SWCs are not disjunct in Application Components folder and Developer workspace

    (top)

    DaVinci Configurator Pro 5.10 (SP6)

    Extensions

    Diff & Merge

    • Introduction of 3-way-merge including an auto-merge functionality
    • Diff & merge for SystemDescription elements

    Fixed Issues

    • Criterion value can not be removed
    • Prevent the import of a module via Module Import if a module is imported as Project Standard Configuration
    • Edit Variance Assistant throws NullPointerException
    • Invalid RTE51028 validation warning occurs
    • Project update: Missing error message and abort if EcuC split files are located outside of .\Config\EcuC

    (top)

    DaVinci Configurator Pro 5.10 (SP5)

    Fixed Issues

    • Within an ECU Extract of Systemdescription dangling references pointing into the AUTOSAR_Platform (PlatformTypes in PlatformTypes_AR4.arxml) should not removed during update

    (top)

    DaVinci Configurator Pro 5.10 (SP4)

    Usability Features

    • Task Mapping Editor:display function triggers separated by "Category" and "Condition"

    Miscellaneous

    • Validation Rules for RH850F1H, RH850F1X, RH850F1M, RH850F1L - MCAL-Update to 4.1.0
    • Difference Details View: Improved display of added and removed elements

    Fixed Issues

    • Compare and Merge: multiple instances of single-instance parameters created
    • Element usage view breaks if an expanded root element is removed from the model
    • Values of a variant signal are shown as "multiple" in the ComSignal grid
    • DataMapping-Assistant: Automapped complex data elements are not expanded and not automapped
    • If at least two NmTxPdus in different clusters / nodes refer an ISignal with the same name, only one ComSignal is created.
    • Update workflow aborts with invalid PduTriggering used by an Ethernet Cluster
    • IoHwAb Editor shows the wrong IoHwAbInitValueType
    • Support Request Package doesn't consider external file references
    • NmChannelConfig and ComMChannel for Ethernet VLAN derived which does not contain any Nm configuration
    • Update fails if path to ECU extract file is not relative to project directory or if it is not absolute
    • Implement new AR 4.2.1 mapping rule for SoAdPduHeaderEnable
    • Bsw Module Internal Behavior Editor: Renaming of schedulable entity leads to wrong RTE code generation

    (top)

    DaVinci Configurator Pro 5.10 (SP3)

    Usability Features

    • Diff & Merge: Improve filtering of differences
    • Improve grid quick filter definition

    Miscellaneous

    • Validation rules for RH850D1x
    • DataMappings derived from upstream system description are not read-only any more

    Fixed Issues

    • Acceptance filter optimization creates extended id filters for standard id channel
    • ComSignalNaming Validation Rule reports erroneously not unique shortname
    • External ECUC file reference is lost when performing an update
    • ClassCastException when expanding "Show referenced item in" sub menu in element usage view
    • Top down service config unnecessarily activates NvM module
    • Correction of BlockNumber calculation etc in 3rd-party-Fee/-Ea
    • VTT: Rename of Container in HW-Module will not be synchronized

    (top)

    DaVinci Configurator Pro 5.10 (SP2)

    Breaking Changes

    • Relevant for projects with RTE configuration: Projects saved with CFG PRO 5.10 (SP2) lead to error message "RTE01053 Invalid SwComponentInstance container" when being generated with an older version of CFG PRO 5.10

    Extensions

    Tool Features

    • Postbuild-Selectable support for project standard configurations
    • New 'Element Usage' view allows tracking references to configuration elements (see 'Element Usage' command within context menu of configuration elements)

    Usability Features

    • Activate multiple modules at once within project settings editors module page
    • Import Assistant: change default value from 'Replace' to 'Merge'
    • Decorate the name of PduRRoutingPaths with the direction
    • Input Files Editor: display absolute paths in diagnostic file set configuration dialog
    • Improve "Create New Service Port" assistant: detect modified DaVinci Developer workspace in advance

    Miscellaneous

    • Validation rules for RH850F1x - update for MCAL Ver4.01.06.001
    • Derive CanTp from CanTpConfig which refers to J1939Cluster
    • Derive SdInstanceUnicastRxPdu and SdInstanceMulticastRxPdu
    • Support the ServiceKind attribute instead of Admin-Data tag
    • New validation rule: set the FeeDeviceIndex of each FeeBlock
    • Remove EcuC split file directory when according module configuration is deleted
    • Automatic creation of schema-valid shortnames for new containers
    • A message dialog is shown when custom workflow step or SWC-T generation failed
    • DVCfgCmd.exe: command line switch to support a cdd file as input

    Fixed Issues

    • Top-down service configuration determines wrong activation state of NvM module
    • ECUC_BswM_00814: BswMLogicalExpressions with a single nested element must not have a BswMLogicalOperator
    • Tool exception when handling Soad socket connection group mapping
    • Update of FrTrcv internal behavior fails if BswModuleEntry already exists
    • File PlatformTypes.arxml is missing in support request package
    • Breadcrumb in basic editor isn't filtered for active variant
    • Prevent error message RTE49999 during software component template generation
    • Reference to VTT-project in .dpa file is lost during update workflow
    • "Select all" toolbar button in "File" > "Remove ECUC File Reference..." assistant does not work
    • Update workflow fails when diagnostic state description file is removed
    • UdpNm NmUserDataPdu missing in Com configuration
    • Incorrect derivation of the parameter NmRemoteSleepIndEnabled and NmBusSynchronizationEnabled
    • Packed NvBlockDataMappings are not displayed correctly in Ecu Software Components editor
    • Parameter which exists in two choices of a choice container doesn�t show multiple definitions in "properties view"
    • Exception when setting "Target type" in existing project from "" to "Real Target"
    • Removing the developer workspace path in the PSE breaks the update functionality
    • Fee Optimization Assistant: page not updated when back button was used before
    • Partial networking editor doesn�t update tree on module activation/deactivation

    (top)

    DaVinci Configurator Pro 5.10 (SP1)

    Extensions

    Tool Features

    • BSW Management Editor: Added general settings page
    • Global switch for editor specific number format switching
    • top down service config must parse RoleBasedPortAssignements of NvBlockNeeds at NvBlockDescriptors

    Miscellaneous

    • Validation Rules for RH850F1x - Update for MCAL Ver4.01.06.001
    • Do not derive parameter CanTpTxNSduId, PduRDestPduHandleId and PduRSourcePduHandleId in InitialEcuC
    • Support 3rd party modules within Project Standard Configuration
    • Set the UpperlayerPDU for CanIfXxPdus to PDUR for ContainerIPdus which are part of MultiplexedIPdus
    • Support of EiraRxPdus for passive NM nodes
    • Project Settings Editor: ECUC file references add and remove functionality
    • Command line generation module selection according .dpa selection
    • FeeDeviceIndex is set automatically for each FeeBlock
    • Do not derive the parameters PduRDestPduHandleId and PduRSourcePduHandleId in InitialEcuC
    • Insert Path Selection Button for "vtt project" in Project Settings Editor
    • Reuse manually created SwConnectorPrototypes in top down service config
    • Insert Path Selection Button for "vtt project" in Project Settings Editor

    Performance

    • Speed up closing projects even if they have a huge amount of validation results
    • Improved validation performance in the command line use case

    Fixed Issues

    • BaseEcucGenerator can fail when CommunicationConnector is not connected to a PhysicalChannel
    • Postbuild-Selectable: For variant NmUserDataPdus the global PDUs are derived invariant
    • Validation error AR-ECUC02008 occurs for IpduM Pdu without dynamic part
    • Reset to derived value is not working for multi instance reference parameter
    • CanNmRange is not completely derived
    • Null Pointer Exception in DataMappingValidationRule when determining signal direction for nested data mappings with invalid root mappings
    • Fix calculation for FrNmUserDataTxPdu length for AR 4.2.1 System Extracts
    • SignalTriggerings without Signal reference aborts the Update Workflow
    • Gateway PduMappings without source or target PduTriggering references aborts the Update Workflow
    • Console Application: The commandline arg --modulesToGenerate shall accept an empty "" string, like --extGenStepsToGenerate
    • Validation Error RTE59000 does not disappear after solving
    • Read-Only projects can't be opened due to a Null Pointer Exception
    • Null Pointer Exception in SocketConnection mapping
    • Update of diagnostic data fails when SIP is located within project folder
    • Report an error when Sip License cannot be found
    • Projects with .dev workspace cannot be loaded
    • Null Pointer Exception when deriving DcmDslProtocol for DcmDslConnections
    • Too many PNC EIRA/ERA Pdus are derived
    • Enabling FullCan on a variant message creates a non-variant hardware object
    • Null Pointer Exception when deleting an OsTask with previous opened FormPage with ResourceLocks
    • Automatically created string parameters have no value if the BSWMD specifies no default
    • Modules without MICROSAR or AUTOSAR definition reference should be displayed with their definition reference
    • Postbuild-Selectable: Shortnames of symbolic name value containers should be reused over variants
    • DataTypeMappingSet support for ParameterSoftwareComponents (Calibration) is missing
    • Tree filter isn't updated when changing shortnames
    • Incorrect derived SoAdPduRoutes and SoAdSocketRoute in AR 4.2.1 System Extracts
    • "Auto-resize columns" causes exceptions if columns are hidden in a GridView
    • SoAdSocketConnection(-Group)s not derivied if the SocketConnection(-Bundle) is defined as multicast connection
    • Internal Behavior-Editor: Refresh the module list automatically

    (top)

    DaVinci Configurator Pro 5.10

    Extensions

    Tool Features

    • New editor: Module Internal Behavior Editor
    • Support hyperlinks in text fields such as descriptions or annotations
    • Improved import of ECUC files (import mode "Replace")
    • Simplified access to the RTE SWC template generation
    • Configuration of the TCP/IP stack according to AR 4.2.1
    • ECU Software Components Editor: support of data prototype mapping
    • Bottom-up service port design and service mapping
    • Allow split ECUC files to be stored in individual folders
    • "Edit variance" supported for data mappings
    • Support for directory supervision as extension of the file change supervision
    • Support of different strategies for writing NV data in Nv Block SWCs
    • Conditional generation supported for external generation steps
    • Project Settings Editor: Mass selection/deselection of all external generation steps
    • BSW Management Editor: auto configuration GUI improvement
    • BSW Management Editor: support new types of mode request ports and new types of actions
    • Diagnostic Events Editor and Diagnostic Event Data Editor: support of WWH-OBD parameters
    • Bulk execution of specific solving actions (solving action groups)
    • Command line support for system description as input file
    • Grid views: status row showing current selection state and filter setting
    • Grid views: persistent grid settings (e.g. column width)
    • Updated support of Freescale i.MX6SLX
    • Generate Dialog displays the current target type (VIRTUAL, REAL)

    Fixed Issues

    • Validation error "Duplicate short names" does not display concerned configuration element
    • Editor tree filters in BSW Management Editor and Watchdogs Editor does not work for newly created items
    • For variant NmUserDataPdus the global PDUs are derived invariant
    • Invalid ComPncSignals can be derived in a variant project
    • Allow post-build-selectable configuration variant without evaluated variants for non-MICROSAR modules
    • Support ADMIN-DATA for UDS connection
    • Generation of BaseEcuC can fail when CommunicationConnector is not connected to a PhysicalChannel
    • Can't set manual reference target if no reference targets are available
    • CFG5 doesn't support the ECUC-MULTILINE-STRING-PARAM-DEF properly
    • Change of active variant causes exception in CAN bus timing configuration
    • ComM is not derived for J1939Cluster without ISignalIPdus
    • Commandline parser not working when -i option is used
    • The commandline arg --modulesToGenerate shall accept and empty "" string, like --extGenStepsToGenerate
    • Fixed calculation for FrNmUserDataTxPdu lenght for AR 4.2.1 System Extracts
    • Gateway PduMappings without source or target PduTriggering references aborts the Update Workflow
    • Null Pointer Exception when deriving DcmDslProtocol for DcmDslConnections
    • Set the upperlayer for CanIfXxPdus to PDUR for ContainerIPdus which are part of MultiplexedIPdus
    • Validation error AR-ECUC02008 occurs for IpduM Pdu without dynamic part

    (top)

    DaVinci Configurator Pro 5.9 (SP6)

    Miscellaneous

    • Extend the command line Exporter to combine post-build variant export with exporter IDs

    Fixed Issues

    • NullPointerException when SipLicense.lic is missing
    • AUTOSAR files merger incorrectly redirects references when automatically refactoring elements

    (top)

    DaVinci Configurator Pro 5.9 (SP5)

    Miscellaneous

    • Improve resolving of differences in Diff&Merge
    • Support of Hierarchical grid filter
    • Comfort Integration for RH850F1H - MCAL-Update to 4.1.0

    Fixed Issues

    • Module Configuration Import: Values of references are not correctly displayed
    • Validation rule RTE59000 appears but does not disappear after solve
    • Element usage view breaks if an expanded root element is removed from the model
    • Acceptance filter optimization creates extended id filters for standard id channel
    • External ECUC file reference is lost when perfomring an update
    • Difference decorations not shown in tree
    • SdServer-/SdClientTimers are not derived for SdEventHandlers and SdConsumedEventGroups
    • NmChannelConfig and ComMChannel for Ethernet VLAN derived which does not contain any Nm configuration

    (top)

    DaVinci Configurator Pro 5.9 (SP4)

    Miscellaneous

    • Filter inconsistent empty rows from task mapping pages (assistant and editor)
    • Support EIRA/ERA Pdus in a merged system extract and legacy extract use case
    • Support multi selection for "Edit Variance" command
    • Support merge of non-variant module configurations in variant projects

    Usability Improvements

    • Disclaimer dialog does not block loading of the project

    Fixed Issues

    • UdpNm UserData missing in Com
    • Module activation causes an OutOfBoundsException
    • Nm parameters not correctly derived for Ethernet-clusters with multiple Connectors
    • Incorrect handling of CanIdRanges defined in CanFrameTriggerings
    • CDD-file is duplicated after performing input data update workflow
    • Validation error PDUR07030 occurs for ComIPdu which is created instead of a IpduMXxPathway with only static part
    • Ecu-Extract elements are removed during DCF-Reload
    • AUTOSAR version of split EcuC files do not match the version of the main EcuC file
    • GenDataVtt, Variance, Pending-Update is missing in support request package
    • Reference to VTT-Project is lost during update workflow
    • "Align differences" multiplies the existing project standard configuration entries in the .dpa-file
    • CanNmUserData Pdu is missing when a CanNmRange is defined for the CanNmNode
    • Incorrect calculation of NmUserDataPdu length and ComSignal bit position
    • Variant merger creates conflicting variation point configuration

    (top)

    DaVinci Configurator Pro 5.9 (SP3)

    Miscellaneous

    • Validation Rules for RH850F1x - Update for MCAL Ver4.01.06.001
    • Do not derive parameter CanTpTxNSduId, PduRDestPduHandleId and PduRSourcePduHandleId in InitialEcuC
    • Support 3rd party modules within Project Standard Configuration
    • Set the UpperlayerPDU for CanIfXxPdus to PDUR for ContainerIPdus which are part of MultiplexedIPdus
    • Support of EiraRxPdus for passive NM nodes
    • Project Settings Editor: ECUC file references add and remove functionality
    • Command line generation module selection according .dpa selection

    Performance

    • Speed up closing projects even if they have a huge amount of validation results
    • Improved validation performance in the command line use case

    Fixed Issues

    • BaseEcucGenerator can fail when CommunicationConnector is not connected to a PhysicalChannel
    • Postbuild-Selectable: For variant NmUserDataPdus the global PDUs are derived invariant
    • Validation error AR-ECUC02008 occurs for IpduM Pdu without dynamic part
    • Reset to derived value is not working for multi instance reference parameter
    • CanNmRange is not completely derived
    • Null Pointer Exception in DataMappingValidationRule when determining signal direction for nested data mappings with invalid root mappings
    • Fix calculation for FrNmUserDataTxPdu length for AR 4.2.1 System Extracts
    • SignalTriggerings without Signal reference aborts the Update Workflow
    • Gateway PduMappings without source or target PduTriggering references aborts the Update Workflow
    • Console Application: The commandline arg --modulesToGenerate shall accept an empty "" string, like --extGenStepsToGenerate
    • Validation Error RTE59000 does not disappear after solving
    • Read-Only projects can't be opened due to a Null Pointer Exception
    • Null Pointer Exception in SocketConnection mapping
    • Update of diagnostic data fails when SIP is located within project folder
    • Report an error when Sip License cannot be found
    • Projects with .dev workspace cannot be loaded
    • Null Pointer Exception when deriving DcmDslProtocol for DcmDslConnections
    • Too many PNC EIRA/ERA Pdus are derived
    • Enabling FullCan on a variant message creates a non-variant hardware object
    • Null Pointer Exception when deleting an OsTask with previous opened FormPage with ResourceLocks
    • Automatically created string parameters have no value if the BSWMD specifies no default

    (top)

    DaVinci Configurator Pro 5.9 (SP2)

    Miscellaneous

    • Support of Pool-license model
    • Support Projects without communication
    • Support of Project Standard Configuration via command line
    • Automatic execution of custom workflow steps after code generation
    • Command line support for SystemDescription as input file

    Fixed Issues

    • Error Icons for MultiInstance Parameter are either shown in Basic Editor or Comfort Editor, not both
    • Removing data mappings for deleted Software Components via AutoSolve does not work
    • Persistency raises an error for duplicate content in 'SW-DATA-DEF-PROPS'

    (top)

    DaVinci Configurator Pro 5.9 (SP1)

    Miscellaneous

    • Derive new AR 4.2.1 parameter in IpVx module
    • Derive Pdu references for the Sd module
    • Quick enable/disable of external generator steps in generation sequence lists
    • Postbuild selectable variance assistant. Supporting the "Edit Variance..." command functionality

    Domain Runtime System

    • Editor for Data Prototype Mapping

    Fixed Issues

    • Expand generation sequence tree when using typing filter
    • Validator error CAN02012 occurs after update
    • Improve error message for project load errors during SIP update

    (top)

    DaVinci Configurator Pro 5.9

    Extensions

    Tool Features

    • Support references to EcuC file fragments
    • Scripting interface workflow integration
    • Comfort Integration RH850P1x-C
    • Support for multiple CAN driver
    • MultiSelection in ValidationView
    • Add CommandLine Option -x to exculde module configurations from generation
    • Support for Diagnostic configuration via ECUC standard configuration
    • Support CAN-FD Mode 2 for communication and diagnostics
    • Support of GeneralPurposeIPdu for Xcp
    • Support of Union Datatypes in the Rte
    • Support of J1939Rm
    • Optimized workflow between DaVinci DEV and DaVinci Configurator
    • TaskMapping Assistant: option to combine function triggers
    • Support making a non-variant project variant without using input files
    • Support enhanced configuration of service-oriented communication according to ASR 4.2.1

    Fixed Issues

    • External Generation Steps lost after close and reload of project
    • Rendering issues with [V] marker in grids in Postbuild-Selectable projects
    • Watchdogs editor doesn't show new instances if a new Wdg module instance is activated
    • ComSignals not created correct for bi-directional Signals
    • DPA file shall not automatically be saved during project load
    • Loading projects with missing folders (specified in dpa file) lead to a pop-up dialog
    • "Edit variance" is not displayed for elements with variation points in projects without postbuild selectable support
    • ECU management editor: EcuMWakeupSourceMask references are not set correctly
    • Slave-to-Slave LinIfFrame is not derived on Master Node
    • Property view should display if an object supports variance
    • CanIfRxPduRef not derived for Pdus with multiple FrameTriggerings
    • DaVinci Developer executable can't be selected in Project Settings Editor
    • J1939DcmIPdus with SA/DA 0xFE are not bound to J1939Dcm/J1939Rm

    (top)

    DaVinci Configurator Pro 5.8 (SP5)

    Fixed Issues

    • Difference decorations not shown in tree
    • Update via CommandLine: AdditionalBSWMD files are not supported for update with commandline
    • Read-Only projects can't be opened due to a NullPointerException
    • RTE59000 appears but does not disappear after solve
    • EcucUpdater does not consider the index attribute of a container

    (top)

    DaVinci Configurator Pro 5.8 (SP4)

    Extensions

    Tool Features

    • Provide an .ini-switch for CFG5.PRO floating licenses itself
    • Support of Project Standard Configuration via command line (option: --psc)

    Performance

    • Duplicating Dem Events allocates too much heap

    Fixed Issues

    • Missing Ethernet signal routings after project update
    • Incorrect derivation of ComSignalGroups created for MultiplexedPdus with multiple triggerings
    • Invalid short names generated when the System Extract contains elements ending with a underscore
    • Removing data mappings for deleted Software Components via AutoSolve does not work. RTE54002-Validation Errors appears in Validation view
    • RTE generator output doesn't reflect all model changes when re-generating a 2nd time
    • Incompatible CanTp and PduR due to different AR-versions in BSWMD- and InternalBehavior-files during SIP upgrade

    (top)

    DaVinci Configurator Pro 5.8 (SP3)

    Extensions

    Tool Features

    • BSW Management Editor: Support new mode request ports of type BswMLinScheduleEndNotification
    • Extended calculation for CanNmUserDataTxPdu lenght for AR 4.2.1 System Extracts
    • Comfort Integration RH850/F1H

    Performance

    • Decouple decoration calculation from validation view display for large configuration
    • Improve performance of grid base implementation
    • Improve performance when solving actions
    • Decrease memory allocation

    Fixed Issues

    • Unexpected RTE51001 Validation error in Cfg5 after syncing changes in DEV Workspace files
    • Generation Result Dialog filters out too many generators
    • CanIdRange is not derived correct for CanNm PDUs
    • Exception when opening context menu of multiselected lines in filtered Grids
    • False negative validation warning in base validation of bitfield texttable compu method
    • Solving Rte59000 fails with an IllegalArgumentException

    (top)

    DaVinci Configurator Pro 5.8 (SP2)

    Extensions

    Tool Features

    • Separate generation step for VTT generators
    • Postbuild-Loadable: Remove hash values as postfix from signal groups and group signals
    • Task Mapping Assistant: option to combine function triggers
    • Mcu Editor & validation: support update of RH850 P1x - new version E403
    • Mcu Editor & validation: support update of Mpc560xB - new version 1.0.1
    • Change algorithm for assigning synthetic user data ComIPdu derived from a NmPdu to a ComIPduGroup
    • New editor for VAB projects: Infrastructure Subset Manager Editor
    • Support of bitfield data types
    • Full schema support of AUTOSAR 4.2.1
    • Project Update: execution of workflow scripts for system extract modification

    Usability Enhancements

    • Validation View: multiselection of Preferred Solving Actions
    • Change detection and reload of DCF workspace

    Information

    • Tool title changed in case of OEM Post-Build Update SIP license: displayed as "DaVinci Configurator SIP.PB"

    Fixed Issues

    • Postbuild-Selectable: Rendering issues with [V] marker in grids
    • Runtime System Settings Editor: Missing OsHooks Container does not show "Container is missing..." Message
    • Wrong RTE51035 validation error about init values for enumerations
    • NullPointerException in Reference Selection Control in "Manual Only" mode
    • Widget-is-disposed error after undo
    • OsIsrUseSpecialFunctionName is greyed by OsIsrConfigurationService, even if not created by the service
    • ExtGen-Steps lost after close and reload of project
    • Display ComMChannel name instead of CanSMManagerNetwork name (added missing definitions).
    • NullPointerException when closing the "Configure Mode Request Ports" assistant two times
    • Duplicating entries in an action list shows an error dialog
    • BaseEcuC: CanNmRange is not derived if no CanNmRxPdu exists
    • DPA file always saved during project load
    • NullPointerException occurs for only LdCom projects
    • Validation Rules for Mpc560xp (Stm Variante) - Correct calculation for Mcu_CMU1_CLOCK - New Utils contain function to distinguish 'AUX1 supported' and 'AUX1 equals System Clock' - CMU1 Frequency calculation corrected
    • COM90034 occurs, ComGwMappings not derived correct for SignalGroup mappings

    (top)

    DaVinci Configurator Pro 5.8 (SP1)

    Features

    • Implement Resource change supervision: detailed action feedback
    • Derive ProtocolType for ISOBUS TPs
    • Comfort editor for Transport Protocol LIN
    • Support of project update with external file references within dpa and DaVinci Developer workspace
    • Basic schema support of AUTOSAR 4.2.1

    Fixed Issues

    • Tree-Tooltip: When children errors exist, own errors are not fully displayed in tooltip
    • Create only one DemEvent for variant DemEventParameterRefs
    • ECU extractor: extract ISignalIPdus of static and dynamic parts of extracted MultiplexedIPdus
    • RTE freeze file contains FIBEX-ELEMENT-REF-CONDITIONAL and UUID diffs
    • Multi instance parameter part: in place editing causes NullPointerException
    • Project new assistant uses incorrect VTT project extension
    • LIN Controller editor does not display "Channel Wakeup Support" parameter correctly
    • Modifications on DCF file are not reported to the user
    • Workflow Diagnostic Import: LegacyImportSignal flag is not correctly evaluated
    • RTE freeze checksum calculation differs for ignored objects
    • Validation Rules for Mpc560xp (Stm Variante) - Correct calculation for Mcu_CMU1_CLOCK
    • Inplace Editing does not work for Multi-Instance Callback Parameters
    • Link-Issues in Signals-Editor and PDUs-Editor
    • Show [V] within grid in status column instead of first column
    • Exception when creating new EcuMSleepModes using ECU Management editor
    • GUI issues in mode management domain editors
    • Wrong persistency export filter used for the RTE freeze file (comm contained)
    • Developer executable can't be selected in Project Settings
    • Validation Rule DET80000 is not enabled if non-MICROSAR Det module is activated
    • Communication Editor does not work without activated COM-Module
    • Name of parent truncated in reference parameter control
    • Tooltip in trees: When children errors exist, own errors are not fully displayed in tooltip
    • ExclusiveArea always shows EaBlockId
    • Multi-Editing Grid: Entering non-alphanumerical hides input field in multi-editing dialog
    • CFG5 can't create new projects on network shares
    • Modules are not considered by 'DetActivationCheck'
    • Displayed paths to definition files
    • Nondeterministic display of Non-Existent-Parameter Icon
    • Update Utility hides some update errors
    • Undo-Toolbar-Button is not updated after Configuration Phase switch
    • Invalid Connector Validation is ignored by consistency for PR-Ports
    • The --genArg parameter of DVCfgCmd overwrites previous values without warning
    • The --genArg parameter of DVCfgCmd doesn't report errors when argument&value are missing
    • Wrong order of Ref-Paramter after Cdd Update
    • Implement usage of new naming rule in Com mappings
    • 'ReadOnly' parameter can be deleted, however it cannot be created again.
    • ProjectStandardConfiguration: Adaptation of ComMChannel name
    • WakeUp triggers not filtered from "Create WakeUp source" dialog
    • Watchdogs editor doesn't show new instances if a new Wdg module instance is activated
    • Choice reference controls are not updated after changing reference target
    • Display of strange error if .dpa Derivative tag contains blanks/
    • ComSignals not created correct for bi-directional Signals
    • Wrong editor representation of more than one instance of 1:1 parameters
    • Gateway routing paths not derived for Ethernet Pdus
    • Properties view isn't updated if variance state of the currently selected element changes
    • CommunicationElements of nested complex data elements are not completely expanded even root is mapped to SignalGroup
    • Removing the last delegation port data mapping does not revalidate open delegation ports
    • Report generation overwrites existing reports without warning
    • Report can't be generated if SIP path contains special characters
    • Report generates .xml file as well
    • Unhandeld Event loop exception when deleting a ScheduleTable container in Os Configuration Editor
    • Mcu Comfort Editor for Mpc560xp platforms: enumeration values do not match definition
    • Initialization editor: provide possibility for creating InitFunctions for outdated or non-MICROSAR modules
    • Project update fails when using 'Ecu-C only' update option with existing project
    • State Description field is not grayed when specifying a CDD file
    • EcuMWakeupSourceMask references are not set correctly
    • BaseEcucGenerator ignores project standard configuration files if no System Extract is used
    • PDUs editor: configuration of a different value in each variant for a parameter is not possible
    • Commandline: Enable "OnlyEcuc" Update mode for cmdUpdate
    • Copy of files with space characters in path doesn't work correctly
    • Modifying the access rights of project file leads to corrupted user message
    • Update Workflow fails if input file is read-only and is used more then once per variant
    • Multi-Triggering: too much Global Pdus are derived for Pdus with multiple FrameTriggerings
    • Watchdogs editor's configuration tab tree control is not updated
    • Allow GUI thread access during workbench startup
    • MemoryLeak in UI Update-Workflow
    • Value change in post-build phase fails for PB-L/S parameter with variant-multiplicity == false
    • 'Make path relativ' operation doesn't work for files on other drives
    • Slave-to-Slave LinIfFrame is not derived on Master Node
    • SWCGeneration: All DEM Ports are removed after SIP-Update
    • Validation Error PDUR04001 occurs
    • Multi-Triggering: CanIfRxPduRef not derived for Pdus with multiple FrameTriggerings
    • Misleading error message during phase switch when a container definition is missing
    • Create new state description dialog displays the wrong file path
    • Assistants 'Create support request package' & 'Compare and Merge Project'
    • Link-Issues in Signals-Editor and PDUs-Editor

    Performance

    • Increase performance of validation rules of Base Services Domain in variant projects
    • Fixed slow performance during update
    • Improve model access performance of invariant projects
    • Improve performance of PostBuildSelectable data model handling
    • Improve scaling on large uuid updates

    (top)

    DaVinci Configurator Pro 5.8

    Postbuild-Selectable ECUs

    • Definition of variation criteria and variants
    • Configuration of several input file sets per variant
    • Pre-defined variant criteria for handling communication variants and diagnostic variants
    • Central selection of the variant to be displayed
    • Annotation of variance in the Basic Editor and Configuration Editors
    • Display of validation messages per variant

    Workflow

    • Ecu instance can be changed during update of input files
    • Update DEV workspace without user interaction
    • Project Standard Configuration: support of annoted system description references
    • Support of CAN FD input files

    Option VTT

    • Support of parallel configuration of real target MCAL and vVIRTUALtarget MCAL
    • Project setup for convenient generation of vVIRTUALtarget project
    • Installation of vVIRTUALtarget Basic via DaVinci Configurator External Components Setup

    Domain Mode Management

    • Initialization Editor: configuration of BswM init action list
    • ECU Management Editor: sleep/wakeup configuration integrated
    • BSW Managemet Editor: usability improvements

    Domain Runtime System

    • ECU Software Components Editor: display of service needs

    Domain Diagnostics

    • Diagnostic Data Identifiers Editor: new editor for displaying and editing the Dcm DIDs and data objects

    Miscellaneous

    • Project Settings Editor: modification of all project settings after project creation
    • Improved performance of report generator
    • Option MD: SDK for developing module plug-ins

    (top)

    DaVinci Configurator Pro 5.7 (SP4)

    Fixed Issues

    • Memory General Editor: Not existing Fls module leeds to an empty details part
    • NPE during project update when LdCom module is active
    • NoSuchElementException in case of dangling references in system description during update
    • Message dialog after project open shows allways unresolved file and directory
    • Multi instance parameter control: in place editing causes NullPointerException
    • Multiline text control doesn't accept line separators
    • NullPointerException when closing the "Configure Mode Request Ports" assistant two times
    • Watchdogs editor's configuration tab tree control is not updated

    (top)

    DaVinci Configurator Pro 5.7 (SP3)

    Miscellaneous

    • Do not change files if content is not changed
    • AUTOSAR standard module activation shall use BSW-implementation if available
    • Support file extension epd und bmd for BSWMD-Files

    (top)

    DaVinci Configurator Pro 5.7 (SP2)

    Miscellaneous

    • Support manufacturer specific legacy formats
    • Support change of project settings in DPA file

    Domain Base Services

    • Update Comfort Integration TC27xB
    • Comfort Integration TC26xBA
    • Comfort Integration Mpc560xp (Stm Variante)

    Fixed Issues

    • The switch --extGenStepsToGenerate "" does not disable all ExtGenSteps during generation
    • Mapping rule for FrTpConnection can cause a NPE
    • NullPointerException with Tx/Rx-PDU parameter twisty menu of TP editor
    • Provide a (Log) Message when .dpa directories are not valid
    • NullPointerException when opening TransportProtocolEditor

    (top)

    DaVinci Configurator Pro 5.7 (SP1)

    Miscellaneous

    • Performance improvements

    Domain Communication

    • Comfort Integration J1939

    Domain Runtime System

    • Support ServiceSWCs with non-ServicePorts

    Fixed Issues

    • PDUs Editor: "Full CAN" Parameter is not displayed/updated correctly
    • Cfg5 does not support display of Pdu when NmPdu is used instead of ISignalIPdu
    • No PduRRoutingPath is derived for PNC EIRA/ERA PDUs

    (top)

    DaVinci Configurator Pro 5.7

    Miscellaneous

    • Top-Down Service configuration

    Domain Communication

    • Comfort Integration Ethernet

    Domain Runtime System

    • Support Combined PR Ports
    • Support Service Needs

    (top)

    DaVinci Configurator Pro 5.6 (SP11)

    Extensions

    Tool Features

    • Mcu Editor & validation: support update of Mpc560xB
    • Support of SystemDescription as input file.

    Fixed Issued

    • Module Configuration Import: Values of references are not correctly displayed
    • The configurator pro deletes the active ECUC file when saving after using a duplicate shortname
    • Application cannot be launched when SIP folder './Doc/DeliveryInformation' contains a sub-directory

    (top)

    DaVinci Configurator Pro 5.6 (SP10)

    Features

    • Support for hierarchical grid filter
    • Improve grid quick filter definition
    • Filtering in Difference view

    Fixed Issues

    • Module Configuration Import: Values of references are not correctly displayed
    • Module Configuration Import: Modified elements shown after re-import"

    (top)

    DaVinci Configurator Pro 5.6 (SP9)

    Features

    • Improvements were done in the mapping rules of the Ethernet stack

    Fixed Issues

    • Executing a diff/merge action within the postbuild project phase results in errors when non-postbuild loadable parameters/containers are modified
    • Cannot activate modules with definition "/AUTOSAR_Os/..."
    • OS-Generator is called with incorrect AUTOSAR schema version after updating a project

    (top)

    DaVinci Configurator Pro 5.6 (SP8)

    Extensions

    Tool Features

    • Mcu Editor & validation: support update of Mpc560xB - new version 1.0.1

    Fixed Issued

    • AdditionalBSWMD files are not supported for update with commandline
    • Dcm sends unexpected service response on a valid request for routine control

    (top)

    DaVinci Configurator Pro 5.6 (SP7)

    Fixed Issued

    • Project Settings Editor: Code Generation CheckBox Inconsistency
    • Locked filters for CAN are changed
    • Acceptance Filter Editor shows wrong filter for PDU
    • Reporting: Parameter with multiple values is not displayed correctly
    • ECU instance not available when setting up a project with only legacy files
    • Validation Rules for MB91520 - Bugfix for check of SscgFrequency
    • Validation Rules & Comfort Editor for RH850F1x - Update for new MCAL-Version
    • Prevent endless loop in link calculation
    • Error message when leaving the Diff/Merge mode
    • Ethernet mappings could generate invalid short names
    • Derived short names in the Ecuc can exceed the maximum allowed length

    (top)

    DaVinci Configurator Pro 5.6 (SP6)

    Fixed Issued

    • EcucUpdater: Wrong order of Ref-Paramter after Cdd Update
    • CFG5 doesn't start on Windows 8.1
    • Null pointer exception in bsw management editor
    • Watchdogs editor's configuration tab tree control is not updated

    (top)

    DaVinci Configurator Pro 5.6 (SP5)

    Domain Base Services

    • Update Comfort Integration TC27xB
    • Comfort Integration TC26xBA
    • Update Comfort Integration R850F1x - MCAL-Update E4.13

    (top)

    DaVinci Configurator Pro 5.6 (SP4)

    Domain Runtime System

    • Support ServiceSWCs with non-ServicePorts

    Domain Base Services

    • Comfort Integration iMX6SLX
    • Comfort Integration MPC574xP - MCAL-Update (V0.91 HF2)

    (top)

    DaVinci Configurator Pro 5.6 (SP3)

    Domain Base Services

    • Comfort Integration iMX6SLX
    • Comfort Integration MPC574xP

    (top)

    DaVinci Configurator Pro 5.6 (SP2)

    Miscellaneous

    • Bug Fixes

    (top)

    DaVinci Configurator Pro 5.6 (SP1)

    Miscellaneous

    • Licensing: OEM PostBuild Update

    Domain Base Services

    • Comfort Integration RH850F1x
    • Comfort Integration RH850P1x
    • Comfort Integration Aurix EP

    (top)

    DaVinci Configurator Pro 5.6

    Project Update/Base EcuC Generation

    • EcuC as input files (project standard configuration)
    • System descriptions as input files (system extract generator)
    • Support of J1939 and ETH via AUTOSAR 4.1.2
    • Support of partial networks on ETH

    Domain Communication

    • Bus Controller Editor: baud rate calculation dialog improved

    Domain Network Management

    • Partial Networking Editor: support of UdpNm

    Domain Mode Management

    • Watchdogs Editor: support of SafeWdgM

    Domain Runtime System

    • Validation rules for data type compatibility
    • Enhanced validation rules for connector compatibility
    • Automatic setup of service SWC prototypes

    Miscellaneous

    • 64-bit variant of DaVinci Configurator Pro
    • Command line: new switch --extGenStepsToGenerate

    (top)

    DaVinci Configurator Pro 5.5 (SP9)

    Extensions

    Tool Features

    • Support of SystemDescription as input file
    • Ignore LinSlave EcuInstances in the input files editor.

    Fixed Issues

    • XML-Files can't be opened if the path contains special characters
    • Application cannot be launched when SIP folder './Doc/DeliveryInformation' contains a sub-directory.

    (top)

    DaVinci Configurator Pro 5.5 (SP8)

    Extensions

    Tool Features

    • Mcu Editor & validation: support update of Mpc560xB - new version 1.0.1

    (top)

    DaVinci Configurator Pro 5.5 (SP7)

    Fixed Issues

    • Multiline text control doesn't accept line separators.
    • Exception when restoring derived subcontainers.

    (top)

    DaVinci Configurator Pro 5.5 (SP6)

    Domain I/O

    • Ids (e.g. DioChannelId) need no longer be sorted in ascending order. An unique Id is sufficient now.

    (top)

    DaVinci Configurator Pro 5.5 (SP5)

    Fixed Issues

    • Error during Update of InputFiles in AUTOSAR3.2.2 and CommandLine enviroment

    (top)

    DaVinci Configurator Pro 5.5 (SP4)

    Fixed Issues

    • Error message when leaving the Diff/Merge mode
    • No automatic conversion from AUTOSAR module configurations during loading

    (top)

    DaVinci Configurator Pro 5.5 (SP3)

    Miscellaneous

    • Licensing: OEM PostBuild Update
    • Performance improvements

    Domain Base Services

    • Comfort Integration RH850F1x for new MCAL version

    (top)

    DaVinci Configurator Pro 5.5 (SP2)

    Miscellaneous

    • Support of Diff & Merge
    • Performance improvements

    Domain Base Services

    • Comfort Integration Aurix-HE (TC26x, TC27x, TC29x)

    (top)

    DaVinci Configurator Pro 5.5 (SP1)

    Support of Vector Virtual Integration Platform

    • Project setup: selection of target type real, virtual or real+virtual
    • Code generation: Option for generating VIP target

    Domain Base Services

    • Comfort Integration RH850F1X
    • Comfort Integration RH850P1X

    (top)

    DaVinci Configurator Pro 5.5

    User Annotations

    • Add textual annotations for each configuration element
    • Multiple annotation per configuration element possible
    • Each annotation has an own label
    • Support in FindView and Reporting

    Automatic Generator Validation

    • Validation messages of external generation steps are shown during configuration process

    BSWMD Update

    • Selection of new BSWMD if Short-Name of module definition is changed

    Domain IO

    • Comfort editor for IoHwAbstraction

    Domain Mode Management

    • BSW Management Editor: Automatic configuration of ECU state handling
    • BSW Management Editor: Automatic configuration of Module initialization

    (top)

    DaVinci Configurator Pro 5.4 (SP7)

    Miscellaneous

    • Diagnostic input file cannot be found with relative path
    • RTE checkum error: AutosarComparator does not sort non-referrables Objects in each case

    (top)

    DaVinci Configurator Pro 5.4 (SP6)

    Miscellaneous

    • Support an ECUExtract splitted in several Files
    • Performance improvements

    (top)

    DaVinci Configurator Pro 5.4 (SP5)

    Miscellaneous

    • Performance improvements
    • Support Floating licences

    (top)

    DaVinci Configurator Pro 5.4 (SP4)

    Domain Base Services

    • Comfort Integration MPC574xM
    • Comfort Integration MPC5606B

    Miscellaneous

    • Performance improvements

    (top)

    DaVinci Configurator Pro 5.4 (SP3)

    Domain Base Services

    • Comfort Integration TC27xx
    • Comfort Integration MPC564xC ( Bolero )

    (top)

    DaVinci Configurator Pro 5.4 (SP2)

    • Performance improvement: Launcher tool to start DaVinci Configurator executable with maximum available memorys

    (top)

    DaVinci Configurator Pro 5.4 (SP1)

    Domain Network Management

    • Partial Networking Editor: new editor for comfort configuration of partial networks

    (top)

    DaVinci Configurator Pro 5.4

    Post-build loadable ECUs

    • Project Setings Editor: Selection of module implementation variant
    • Properties View: display effective configuration class of a parameter
    • Project configuraton phase displayed in the status bar
    • Assistant for switching the project configuraton phase

    Domain Communication

    • Signals Editor: editing of signal gateway routings
    • Bus Controller Editor: Display the CAN ID of the PDUs passing an acceptance filter

    Domain Mode Management

    • BSW Management Editor: Separate definition of mode switch ports and mode request ports
    • BSW Management Editor: Logical expressions can be shared by several rules
    • BSW Management Editor: Integrated help text

    Domain Runtime System

    • Task Mapping Assistant: automatic calculation of position-in-task
    • Data Mapping Assistant: support of complex data types/signals groups
    • OS Configuration Editor: generic display of vendor parameters of tasks, alarms, etc.
    • OS Configuration Editor: Display of core assignment of OS applications

    Miscellaneous

    • New look-and-feel of grid-based editors: easier in-place editing, multi-operations, sorting, filtering
    • Reworked validation view, allows e.g. multi-line messages
    • Assistants renamed
    • File change detection: warning displayed if a file is changed outside DaVinci Configurator
    • Change of project settings after creation of the project (administrative info, path to DaVinci Developer)

    A2L generation based on McSupportData

    • Generation of McSupportData by the MSR generators
    • Conversion of the McSupportData to an A2L file

    Service Pack Update Utility Tool

    • Distribution of service packs via Vector Download Center
    • Update of existing SIPs with the new tool service pack

    (top)

    DaVinci Configurator Pro 5.3

    ECUC Import Function

    • Import of module configurations from ECUC files
    • AUTOSAR 4.0 and AUTOSAR 3.x format supported (without semantical conversion)

    Search Function

    • New view: Find View displays the search result
    • Simple search strings or complex search queries with logical expressions supported
    • Various syntax keywords for filtering object types or parameter states
    • Editing support and syntax highlighting of the search queries
    • Navigation from the Find View to the configuration editors

    Code Generation

    • Partial code generation by deselecting individual code generation steps
    • Generation Result View displays the status of the last code generation process

    Input Files Editor

    • Improved handling of input files (copy to project folder)
    • Support for defining relative paths with placeholders
    • Simplified workflow to update the diagnostic state description
    • Selectable diagnostic description patch file
    • Improved generation of Base EcuC file

    Project Assistant

    • Support of split EcuC projects

    GUI General

    • Display options for the number format of integer parameters
    • Display options for the physical units of parameters representing a memory, time or frequency value
    • Property View: display of parameter path
    • Copy-to-clipboard of parameter path
    • Context menu displayed in the editor tree
    • Editor address line (bread crumb) displays preview of next level in context tree
    • Window configuration restored when opening the tool

    Domain Communication

    • Bus Controller Editor: support of extended and mixed IDs in CAN acceptance filter configuration
    • Communication General Editor restructured
    • PDUs Editor: display of PDU gateway routing paths and internal routing paths
    • Signals Editor: display of signal gateway routing paths
    • Transport Protocol Editor: Support of CanTp connections
    • Gateway Routing Editor removed (content moved to PDUs Editor and Signals Editor)

    Domain Runtime System

    • ECU Components Editor: display of SWC port prototype list, including mapping information
    • Component Connection Assistant: improved algorithm for automatic service mapping
    • Runtime System General Editor: Display of StbM
    • Improved live validation of connectors for C/S ports

    Domain Diagnostics

    • OBDII support in Diagnostic Data Editor, Diagnostic Event Editor and Setup Diagnostic Memory Blocks Assistant
    • Schema validation of ODX files

    Domain Memory

    • Repair function for missing links between NvM and Fee blocks

    Miscellaneous

    • Product option .MD (Module Development)

    (top)

    DaVinci Configurator Pro 5.2

    AUTOSAR 4.0.3 support

    • Support of AUTOSAR 4.0.3 files (ECUC, BSWMD, SYSEX)
    • Adaptation of comfort editors to AUTOSR 4.0.3

    New Project Assistant

    • Workflow support for creation of new projects
    • Separation of project creation and project update

    Input Files Editor

    • Selection of system description files and diagnostic data files
    • Creation and update of diagnostic state descriptions
    • Creation of Base EcuC based on the input files
    • Project update after changes in the input files

    Project Settings Editor

    • Editor structure reworked
    • Configuration of custom workflow steps

    GUI General

    • Simplified navigation view: "Basic" tab obsolete, one Basic Editor for all modules
    • Context tree in comfort editors now initially displayed
    • Optional context tree in Basic Editor
    • "Show Details" mode for grid views with hidden context tree

    Domain Base Services

    • Editor re-organization: Development Errors, Microcontroller Unit, General Purpose Timer, RAM Test

    Domain Communication

    • Gateway Routing Editor: support of 1:n routings
    • Editor reorganization: Bus Controller, PDUs, Signals
    • Bus Controller Editor: support for bus timing configuration (hardware-specific)
    • PDUs Editor: support for handling of Full-CAN objects

    Domain Diagnostics

    • New comfort editors: Diagnostic Data, Diagnostic Events, Production Error Handling
    • New assistant: Setup Diagnostic Memory Blocks

    Domain Memory

    • Editor reorganization: Memory partition editing moved to Memory Blocks Editor

    Domain Mode Management

    • Editor rework to support AUTOSAR 4 EcuMFlex

    Domain Runtime System

    • Support of AUTOSAR 4 workflow (SYSEX with flattened ECUEX)
    • ECU Software Components Editor: Selection of service SWCs created by MICROSAR 4 generators
    • Task Mapping Assistant: display the current mapping status of the runnables
    • Runtime System General Editor: reworked structure
    • Basic validation of SYSEX and ECUEX content via automatic validation rules

    Reporting

    • Creation of HTML report of the configuration
    • Supported reports: complete configuration report, report of user-defined parameters

    Miscellaneous

    • License dialog with detailed display of tool license
    • Support of Vector Keyman USB dongle
    • Automation interface
    • Installer for external components available in Download Center

    (top)

    DaVinci Configurator Pro 5.0 SP1

    Domain Communication

    • Support of FlexRay in the comfort editors
    • Comfort editor FlexRay Job Lists
    • Comfort editor Transport Protocol

    Domain Mode Management

    • Comfort editor BSW Management
    • Comfort editor Initialization
    • Comfort editor Sleep and Wakeup
    • Comfort editor Watchdogs

    Domain Runtime System

    • Comfort editor Timing Protection

    (top)

    DaVinci Configurator Pro 5.0

    Eclipse-based tool

    • Re-implementation of DaVinci Configurator Pro based on the Eclipse platform
    • Parameter state management
    • Solving actions for validation errors
    • Auto-solving actions for automatic consistency

    Domain Base Services

    • Comfort editor Base Services General
    • Comfort editor Development Error Handling
    • Comfort editor General Purpose Timer
    • Comfort editor Mcu Clocks
    • Comfort editor Mcu Power Modes
    • Comfort editor RAM Test

    Domain Communication

    • Comfort editor Communication General
    • Comfort editor Communication Controller
    • Comfort editor Gateway Routing
    • Comfort editor PDU Groups
    • Comfort editor PDUs and Signals

    Domain Memory

    • Comfort editor Memory General
    • Comfort editor Memory Blocks
    • Comfort editor Memory Partitions

    Domain Mode Management

    • Comfort editor EcuM Users

    Domain Network Management

    • Comfort editor Network Management General
    • Comfort editor Communication Users
    • Comfort editor NM Coordinator

    Domain Runtime System

    • Comfort editor Runtime System General
    • Comfort editor OS Configuration

    (top)

    Additional Information

    Copyright

    © Vector Informatik GmbH

    Certified Quality Management System

    The Quality/Process Management of Vector Informatik GmbH is being certified according to DIN EN ISO 9001:2000-12 (formerly DIN EN ISO 9001:1994-08) throughout since 1998-08-19.

    Vector Informatik GmbH - Addresses

    Vector Informatik GmbH
    Ingersheimer Str. 24
    D-70499 Stuttgart, Germany
    Tel.: +49 (711) 80670-0
    Fax: +49 (711) 80670-100
    info@vector-informatik.de
    http://www.vector-informatik.com

    Subsidiaries

    Vector France SAS
    168, Boulevard Camélinat
    92240 Malakoff
    France
    Tel.: +33 1 4231 4000
    Fax: +33 1 4231 4009
    information@vector-france.com
    http://www.vector-france.com

    Vector Japan Co., Ltd.
    Seafort Square Center Bld.
    18F, 2-3-12,
    Higashi-shinagawa, Shinagawa-ku
    Tokyo 140-0002
    Japan
    Tel.: +81 3 5769 6970
    Fax: +81 3 5769 6975
    info@vector-japan.co.jp
    http://www.vector-japan.co.jp

    VecScan AB
    Theres Svenssons Gata 9
    417 55 Gothenburg
    Sweden
    Tel.: +46 (31) 76476 00
    Fax: +46 (31) 76476 19
    info@vecscan.com
    http://www.vecscan.com

    Vector CANtech, Inc.
    39500 Orchard Hill Place
    Suite 550
    Novi, Michigan 48375
    USA
    Tel.: +1 (248) 449-9290
    Fax: +1 (248) 449-9704
    info@vector-cantech.com
    http://www.vector-cantech.com

    Vector Korea IT Inc.
    Daerung Post Tower III, 508
    182-4 Guro-dong, Guro-gu
    Seoul 152-790
    Republic of Korea
    Tel.: +82(0)2 2028 0600
    Fax: +82(0)2 2028 0604
    info@vector-korea.com
    http://www.vector-korea.com

    Vector GB Ltd.
    Rhodium
    Central Boulevard
    Blythe Valley Park
    Solihull, Birmingham
    West Midlands B90 8AS
    United Kingdom
    Tel.: +44 (0) 7530 264701
    info@vector-gb.co.uk
    http://www.vector-gb.co.uk

    (top)

    1.3.48 - Safety_Manual_CBD1601056_D05

    Safety Manual

    1.3.50 - Safety_Manual_CBD1601056_D05s


     
     
     
     
     
     
     
     
     
     
    Safety Manual 
    CBD1601056 D05 
     
     
     
     
     
     
     
     
     
     
     
     
     
    ID 
    SPECDOC42381 
    Status 
    Draft 
    Generated on 
    2018-07-31 08:53 
     


    Safety Manual CBD1601056 D05 
    Contents 
    Safety Manual ..................................................................................................................... 10 
    1 General Part .................................................................................................................... 11 
    1.1 Introduction................................................................................................................ 11 
    1.1.1 Purpose ............................................................................................................. 11 
    1.1.2 Scope ................................................................................................................ 11 
    1.1.3 Definitions .......................................................................................................... 11 
    1.1.4 References ........................................................................................................ 12 
    1.1.5 Overview ............................................................................................................ 12 
    1.2 Concept ..................................................................................................................... 12 
    1.2.1 Technical Safety Requirements .......................................................................... 13 
    1.2.1.1 Initialization................................................................................................. 13 
    1.2.1.2 Self-test ...................................................................................................... 13 
    1.2.1.3 Reset of ECU ............................................................................................. 13 
    1.2.1.4 Data consistency ........................................................................................ 14 
    1.2.1.5 Non-volatile memory ................................................................................... 14 
    1.2.1.5.1 Saving data ......................................................................................... 14 
    1.2.1.5.2 Loading data ....................................................................................... 14 
    1.2.1.6 Scheduling.................................................................................................. 15 
    1.2.1.6.1 Deterministic, hard real-time scheduling .............................................. 15 
    1.2.1.7 Partitioning ................................................................................................. 15 
    1.2.1.7.1 Memory partitioning ............................................................................. 15 
    1.2.1.7.2 Time partitioning .................................................................................. 15 
    1.2.1.8 Communication protection .......................................................................... 16 
    1.2.1.8.1 Inter ECU communication ................................................................... 16 
    1.2.1.8.2 Intra ECU communication ................................................................... 16 
    1.2.1.9 Watchdog services ..................................................................................... 17 
    2018 Vector Informatik GmbH 
    1.0 
    2 / 103 


    Safety Manual CBD1601056 D05 
    1.2.1.9.1 Program flow monitoring ..................................................................... 17 
    1.2.1.9.2 Alive monitoring ................................................................................... 17 
    1.2.1.9.3 Deadline monitoring ............................................................................ 17 
    1.2.1.10 Peripheral in- and output .......................................................................... 17 
    1.2.1.10.1 Peripheral input ................................................................................. 17 
    1.2.1.10.2 Peripheral output ............................................................................... 17 
    1.2.2 Environment ....................................................................................................... 18 
    1.2.2.1 Safety Concept ........................................................................................... 18 
    1.2.2.2 Use of MICROSAR Safe Components ........................................................ 20 
    1.2.2.3 Partitioning ................................................................................................. 21 
    1.2.2.4 Resources .................................................................................................. 22 
    1.2.3 Process .............................................................................................................. 22 
    2 Safety Manual BswM ....................................................................................................... 25 
    2.1 Safety features .......................................................................................................... 25 
    2.2 Configuration constraints ........................................................................................... 25 
    2.3 Additional Verification measures ................................................................................ 25 
    2.4 Safety features required from other components ....................................................... 25 
    2.5 Dependencies to hardware ........................................................................................ 25 
    3 Safety Manual CanIf ........................................................................................................ 26 
    3.1 Safety features .......................................................................................................... 26 
    3.2 Configuration constraints ........................................................................................... 26 
    3.3 Additional verification measures ................................................................................ 26 
    3.4 Safety features required from other components ....................................................... 28 
    3.5 Dependencies to hardware ........................................................................................ 28 
    4 Safety Manual CanNm .................................................................................................... 29 
    4.1 Safety features .......................................................................................................... 29 
    4.2 Configuration constraints ........................................................................................... 29 
    4.3 Additional verification measures ................................................................................ 29 
    2018 Vector Informatik GmbH 
    1.0 
    3 / 103 


    Safety Manual CBD1601056 D05 
    4.4 Safety features required from other components ....................................................... 29 
    4.5 Dependencies to hardware ........................................................................................ 29 
    5 Safety Manual CanSM ..................................................................................................... 30 
    5.1 Safety features .......................................................................................................... 30 
    5.2 Configuration constraints ........................................................................................... 30 
    5.3 Additional verification measures ................................................................................ 30 
    5.4 Safety features required from other components ....................................................... 30 
    5.5 Dependencies to hardware ........................................................................................ 30 
    6 Safety Manual CanTp ...................................................................................................... 31 
    6.1 Safety features .......................................................................................................... 31 
    6.2 Configuration constraints ........................................................................................... 31 
    6.3 Additional verification measures ................................................................................ 31 
    6.4 Safety features required from other components ....................................................... 31 
    6.5 Dependencies to hardware ........................................................................................ 31 
    7 Safety Manual Com ......................................................................................................... 32 
    7.1 Safety features .......................................................................................................... 32 
    7.2 Configuration constraints ........................................................................................... 32 
    7.3 Additional verification measures ................................................................................ 32 
    7.4 Safety features required from other components ....................................................... 33 
    7.5 Dependencies to hardware ........................................................................................ 33 
    8 Safety Manual ComM ...................................................................................................... 34 
    8.1 Safety features .......................................................................................................... 34 
    8.2 Configuration constraints ........................................................................................... 34 
    8.3 Additional Verification measures ................................................................................ 34 
    8.4 Safety features required from other components ....................................................... 35 
    8.5 Dependencies to hardware ........................................................................................ 35 
    9 Safety Manual Crc ........................................................................................................... 36 
    9.1 Safety features .......................................................................................................... 36 
    2018 Vector Informatik GmbH 
    1.0 
    4 / 103 


    Safety Manual CBD1601056 D05 
    9.2 Configuration constraints ........................................................................................... 36 
    9.3 Additional verification measures ................................................................................ 36 
    9.4 Dependencies to other components .......................................................................... 36 
    9.4.1 Safety features required from other components ................................................ 36 
    9.4.2 Coexistence with other components ................................................................... 36 
    9.5 Dependencies to hardware ........................................................................................ 36 
    10 Safety Manual Csm ....................................................................................................... 37 
    10.1 Safety Features ....................................................................................................... 37 
    10.2 Configuration constraints ......................................................................................... 37 
    10.3 Additional verification measures .............................................................................. 37 
    10.4 Dependencies to other components ........................................................................ 37 
    10.4.1 Safety features required from other components .............................................. 37 
    10.5 Dependencies to hardware ...................................................................................... 38 
    11 Safety Manual Det ......................................................................................................... 39 
    11.1 Safety features......................................................................................................... 39 
    11.2 Configuration constraints ......................................................................................... 39 
    11.3 Additional Verification measures .............................................................................. 39 
    11.4 Safety features required from other components ..................................................... 39 
    11.5 Dependencies to hardware ...................................................................................... 39 
    12 Safety Manual EcuM ..................................................................................................... 40 
    12.1 Safety features ........................................................................................................ 40 
    12.2 Configuration constraints ......................................................................................... 42 
    12.3 Additional verification measures .............................................................................. 42 
    12.4 Safety features required from other components ..................................................... 43 
    12.5 Dependencies to hardware ...................................................................................... 44 
    13 Safety Manual Fee ......................................................................................................... 45 
    13.1 Safety features ........................................................................................................ 45 
    13.2 Configuration constraints ......................................................................................... 45 
    2018 Vector Informatik GmbH 
    1.0 
    5 / 103 


    Safety Manual CBD1601056 D05 
    13.3 Additional Verification measures .............................................................................. 45 
    13.4 Safety features required from other components ..................................................... 45 
    13.5 Dependencies to hardware ...................................................................................... 45 
    14 Safety Manual MemIf ..................................................................................................... 46 
    14.1 Safety features ........................................................................................................ 46 
    14.2 Configuration constraints ......................................................................................... 46 
    14.3 Additional verification measures .............................................................................. 46 
    14.4 Dependencies to other components ........................................................................ 46 
    14.4.1 Safety features required from other components .............................................. 46 
    14.4.2 Coexistence with other components ................................................................. 46 
    14.5 Dependencies to hardware ...................................................................................... 46 
    15 Safety Manual Nm ......................................................................................................... 47 
    15.1 Safety features ........................................................................................................ 47 
    15.2 Configuration constraints ......................................................................................... 47 
    15.3 Additional Verification measures .............................................................................. 47 
    15.4 Dependencies to other components ........................................................................ 47 
    15.4.1 Safety features required from other components .............................................. 47 
    15.4.2 Coexistence with other components ................................................................. 47 
    15.5 Dependencies to hardware ...................................................................................... 47 
    16 Safety Manual NvM ....................................................................................................... 48 
    16.1 Safety features ........................................................................................................ 48 
    16.2 Configuration constraints ......................................................................................... 48 
    16.3 Additional verification measures .............................................................................. 49 
    16.4 Safety features required from other components ..................................................... 49 
    16.5 Dependencies to hardware ...................................................................................... 49 
    17 Safety Manual OS .......................................................................................................... 50 
    17.1 Safety features ........................................................................................................ 50 
    17.2 Configuration constraints ......................................................................................... 55 
    2018 Vector Informatik GmbH 
    1.0 
    6 / 103 


    Safety Manual CBD1601056 D05 
    17.3 Additional verification measures .............................................................................. 56 
    17.3.1 Interrupt handling ............................................................................................. 56 
    17.3.2 Memory mapping and linking ........................................................................... 60 
    17.3.3 Stack ................................................................................................................ 61 
    17.3.4 Multicore systems with mixed diagnostic coverage capability ........................... 62 
    17.3.5 (Non-)Trusted Functions .................................................................................. 63 
    17.3.6 Miscellaneous .................................................................................................. 63 
    17.3.7 Tracing ............................................................................................................. 65 
    17.4 Safety features required from other components ..................................................... 65 
    17.5 Dependencies to hardware ...................................................................................... 66 
    18 Safety Manual OS (RH850) ........................................................................................... 67 
    18.1 Safety features ........................................................................................................ 67 
    18.2 Configuration constraints ......................................................................................... 67 
    18.3 Additional verification measures .............................................................................. 67 
    18.4 Safety features required from other components ..................................................... 68 
    18.5 Dependencies to hardware ...................................................................................... 68 
    19 Safety Manual PduR ...................................................................................................... 69 
    19.1 Safety features ........................................................................................................ 69 
    19.2 Configuration constraints ......................................................................................... 69 
    19.3 Additional verification measures .............................................................................. 69 
    19.4 Safety features required from other components ..................................................... 69 
    19.5 Dependencies to hardware ...................................................................................... 69 
    20 Safety Manual Rte ......................................................................................................... 70 
    20.1 Safety features ........................................................................................................ 70 
    20.2 Configuration constraints ......................................................................................... 72 
    20.3 Additional verification measures .............................................................................. 72 
    20.3.1 Guided integration testing ................................................................................ 73 
    20.3.1.1 BSW configuration .................................................................................... 73 
    2018 Vector Informatik GmbH 
    1.0 
    7 / 103 


    Safety Manual CBD1601056 D05 
    20.3.1.2 Executable Entity Scheduling ................................................................... 74 
    20.3.1.3 SWC Communication ............................................................................... 76 
    20.3.1.4 Usage of RTE Headers ............................................................................. 78 
    20.3.1.5 Usage of RTE APIs ................................................................................... 79 
    20.3.1.6 Configuration of RTE APIs ........................................................................ 80 
    20.4 Safety features required from other components ..................................................... 82 
    20.5 Dependencies to hardware ...................................................................................... 83 
    21 Safety Manual WdgIf ..................................................................................................... 84 
    21.1 Safety features ........................................................................................................ 84 
    21.2 Configuration constraints ......................................................................................... 84 
    21.3 Additional verification measures .............................................................................. 84 
    21.4 Safety features required from other components ..................................................... 88 
    21.5 Dependencies to hardware ...................................................................................... 89 
    22 Safety Manual WdgM .................................................................................................... 90 
    22.1 Safety features ........................................................................................................ 90 
    22.2 Configuration constraints ......................................................................................... 90 
    22.3 Additional verification measures .............................................................................. 91 
    22.3.1 Additional verification using WdgM Verifier ....................................................... 92 
    22.3.2 Additional verification of generator execution ................................................... 95 
    22.4 Safety features required from other components ..................................................... 98 
    22.5 Dependencies to hardware ...................................................................................... 98 
    23 Safety Manual XCP........................................................................................................ 99 
    23.1 Safety features ........................................................................................................ 99 
    23.2 Configuration constraints ......................................................................................... 99 
    23.3 Additional verification measures ............................................................................ 100 
    23.4 Safety features required from other components ................................................... 100 
    23.5 Dependencies to hardware .................................................................................... 100 
    24 Glossary and Abbreviations ....................................................................................... 101 
    2018 Vector Informatik GmbH 
    1.0 
    8 / 103 


    Safety Manual CBD1601056 D05 
    24.1 Glossary ................................................................................................................ 101 
    24.2 Abbreviations ......................................................................................................... 101 
    25 Contact ........................................................................................................................ 103 
     
      
     
    2018 Vector Informatik GmbH 
    1.0 
    9 / 103 


    Safety Manual CBD1601056 D05 
    Safety Manual 
    Version  Date 
    Author 
    Remarks 
    1.00.00  2015-11-
    Jonas Wolf 
    Initial creation 
    13 
    1.01.00  2015-12-
    Jonas Wolf 
    Information about ASIL added. 
    18 
    1.02.00  2016-01-
    Jonas Wolf 
    Improvements in formulation. 
    29 
    1.03.00  2016-02-
    Jonas Wolf 
    Improvements in formulation. 
    25 
    1.03.01  2016-03-
    Jonas Wolf 
    Review findings incorporated. 
    30 
    1.03.02  2016-05-
    Jonas Wolf 
    Added hint on hardware-software integration (SMI-4). 
    13 
    1.03.03  2016-07-
    Hartmut 
    Added SMI related to interrupt handling. 
    20 
    Hoerner 
    1.04.00  2016-09-
    Jonas Wolf 
    Added TSR-101876 for data consistency. 
    02 
    1.04.01  2016-09-
    Jonas Wolf 
    Clarifications on SMI-100 and SMI-19. 
    19 
    1.04.02  2016-12-
    Jonas Wolf 
    Version of referenced document fixed. 
    02 
    1.05.00  2017-02-
    Jonas Wolf 
    Modified SMI-18: checks need to be enabled per 
    24 
    component as well. 
     
    2018 Vector Informatik GmbH 
    1.0 
    10 / 103 


    Safety Manual CBD1601056 D05 
    1 General Part 
    1.1 Introduction 
    1.1.1 Purpose 

    This document describes the assumptions made by Vector during the development of 
    MICROSAR Safe as Software Safety Element out of Context (SEooC). This document 
    provides information on how to integrate MICROSAR Safe into your safety-related project. 
    This document is intended for the user of MICROSAR Safe. It shall be read by project 
    managers, safety managers, and engineers to allow proper integration of MICROSAR 
    Safe. 
    1.1.2 Scope 
    This document adds additional information to the components that are marked with an 
    ASIL in the delivery description provided by Vector. Neither QM Vector components, nor 
    components by other vendors are in the scope of this document. 
    Vector assumes that hardware and compiler manuals are correct and complete. 
    Vector uses the hardware reference manuals and compiler manuals for the development 
    of MICROSAR Safe. Vector has no means to verify correctness or completeness of the 
    hardware and compiler manuals. 
    Example information that may be critical from these manuals is the register assignment by 
    compiler. This information is used to built up the context that is saved and restored by the 
    operating system. 
    The compiler manual from the compiler version specified for the project is considered. The 
    considered hardware manuals are documented in the Technical Reference of the 
    hardware-specific component. 
    A general description of Vector's approach to ISO 26262 is described in [2]. This document 
    is available on request. 
    1.1.3 Definitions 
    The words shallshall notshouldcan in this document are to be interpreted as described 
    here: 
    1.  Shall means that the definition is an absolute requirement of the specification. 
    2.  Shall not means that the definition is an absolute prohibition of the specification. 
    3.  Should means that there may exist valid reasons in particular circumstances to ignore 
    a particular definition, but the full implications must be understood and carefully 
    weighed before choosing a different course. 
    4.  Can means that a definition is truly optional.  
    2018 Vector Informatik GmbH 
    1.0 
    11 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe can deviate from all constraints and requirements in this 
    Safety Manual in the responsibility of the user of MICROSAR Safe, if equivalent measures 
    are used. 
    If a measure is equivalent can be decided in the responsibility of the user of MICROSAR 
    Safe. 
    1.1.4 References 
    No.  Source 

    Title 
    Version 
    [1] 
    ISO 
    ISO 26262 Road vehicles — Functional safety (all parts) 
    2011/2012 
    [2] 
    Vector 
    ISO 26262 Compliance Document 
    1.2.1 
    [3] 
    Vector 
    MICROSAR Safe Product Information 
    1.4.0 
    [4] 
    Vector 
    MICROSAR Safe Silence Verifier Technical Reference 
    1.4 
     
    1.1.5 Overview 
    This document is automatically generated. The content of this document depends on the 
    components and microcontroller of your delivery. This document is thus valid only for the 
    delivery from Vector that it is included in. 
    The structure of this document comprises: 
    o  a general section that covers all assumptions and constraints that are always 
    applicable, and 
    o  a microcontroller specific section that covers all aspects of the selected 
    microcontroller (only if microcontroller specific components are part of the delivery), 
    and 
    o  a section for each component that covers its constraints and necessary verification 
    steps. 
    Vector's assumptions on the environment of the MICROSAR Safe components as well as 
    the integration process are described. 
    Vector developed MICROSAR Safe as Safety Element out of Context for projects 
    demanding ASIL D software. All requirements in this document apply independently from 
    the actual highest ASIL of the project.  
    1.2 Concept 
    MICROSAR Safe comprises a set of components developed according to ISO 26262. 
    These components can be combined - together with other measures - to build a safe 
    system according to ISO 26262. 
    Please read the Product Information MICROSAR Safe [3] first. 
    2018 Vector Informatik GmbH 
    1.0 
    12 / 103 


    Safety Manual CBD1601056 D05 
    1.2.1 Technical Safety Requirements 
    These are the assumed technical safety requirements on the Safety Element out of 
    Context MICROSAR Safe. These requirements are expected to match the requirements in 
    the actual item development. 
    All technical safety requirements are assigned an ASIL D to service as many projects as 
    possible. 
    No fault tolerant time intervals are given. Timing depends on the used hardware and its 
    configuration. It is assumed that the user configures MICROSAR Safe adequately for the 
    intended use. 
    No safe state is defined since MICROSAR Safe allows the user to define the desired 
    behavior in case of a detected fault. 
    1.2.1.1 Initialization 
    TSR-1 The system shall initialize the CPU, MPU, watchdog, and operating system.  
    Rationale: Initialization of the hardware, e.g. clocks, memory protection, scheduling etc. is 
    necessary to enable the other safety requirements. 
    MICROSAR Safe Feature: The ECU State Manager (EcuM) is responsible for performing 
    the configured driver initialization. After initialization the EcuM starts the operating system. 
    The EcuM distributes the post-built loadable configuration information within the ECU. 
    The documentation of the operating system describes which parts of the CPU it initializes. 
    The startup code and main function is in the responsibility of the user of MICROSAR Safe. 
    1.2.1.2 Self-test 
    TSR-2 The system shall perform self-tests based on the requirements of the system.  
    Rationale: It may be necessary to periodically test individual components of the system to 
    detect latent faults. 
    MICROSAR Safe Feature :The operating system provides a function to self-test the 
    effectiveness of the MPU settings. 
    The ECU State Manager services callouts to user code that can check RAM consistency 
    after wakeup. 
    Other hardware self-tests are usually performed by MCAL components not developed by 
    Vector. 
    End-to-end protection of communication provides its own fault detection mechanisms. 
    1.2.1.3 Reset of ECU 
    TSR-3 The system shall reset itself in case of a detected fault.  
    Rationale: Resetting the CPU of the ECU is in most cases an appropriate measure to 
    achieve a safe state. 
    It is assumed that the reset state of a microcontroller leads to the safe state of the ECU 
    and system, since a reset may occur at any time due to e.g. EMC. 
    MICROSAR Safe Feature: MICROSAR Safe does not reset the ECU on its own (there 
    may be exceptions for the operating system). 
    2018 Vector Informatik GmbH 
    1.0 
    13 / 103 


    Safety Manual CBD1601056 D05 
    Functionality from ECU State Manager (setting the shutdown target) can be used to reset 
    the ECU instead, if this is the intended fault reaction. 
    1.2.1.4 Data consistency 
    TSR-101876 The system shall provide functions to ensure data consistency.  
    Rationale: Concurrent access, e.g. from task or interrupt level, must not lead to data 
    inconsistencies. 
    MICROSAR Safe Feature: MICROSAR Safe provides functions to enable or disable 
    interrupts, spin-locks, resources or abstractions (i.e. exclusive areas) to enable the user of 
    MICROSAR Safe to ensure data consistency. This functionality is also used within 
    MICROSAR Safe to ensure data consistency. 
    1.2.1.5 Non-volatile memory 
    The system must be designed in a way that in case of the absence of non‑volatile data it 
    is still safe (e.g. safe state or degradation). 
    It cannot be assured that data is saved completely or at all because a reset or loss of 
    energy might happen at any time, e.g. brown-out, black-out. 
    This also implies that it is in general impossible to guarantee that the latest information is 
    available in the non-volatile memory, e.g. the system is reset before memory stack is even 
    notified to write data to non-volatile memory. 
    Thus, safety-related functionality may not rely on the availability of data in non-volatile 
    memory. 
    Since the availability of data in non-volatile memory cannot be guaranteed in any case, the 
    only sensible use-case is reading safety-related calibration data. 
    Writing of data into non-volatile memory must be verified to assure that the information is 
    available in non-volatile memory. Verification can only be done manually in a protected 
    environment, e.g. at end of line, in a workshop, etc.  
    ECU software cannot verify if data was written, since at any time a reset could occur and 
    the information that had to be written is lost immediately. 
    Reading of data does not modify data stored in non-volatile memory. Thus, reading can be 
    used by safety-related functionality. The memory stack has to assure that the read data is 
    identical to the data stored in non-volatile memory. 
    The absence of data still has to be handled by the application. 
    The availability may be increased by e.g. redundant storage. 
    1.2.1.5.1 Saving data 
    TSR-4 The system shall save information in non-volatile memory.  
    Rationale: see text above. 
    MICROSAR Safe Feature: The intended block is written with the information provided by 
    the application. 
    1.2.1.5.2 Loading data 
    TSR-5 The system shall retrieve the last stored information from non-volatile 
    memory.
      
    Rationale: see text in above. 
    MICROSAR Safe Feature: The intended block is read and the information is provided to 
    2018 Vector Informatik GmbH 
    1.0 
    14 / 103 


    Safety Manual CBD1601056 D05 
    the application. 
    The last or any previous completely stored block in non-volatile memory is returned by 
    memory stack. 
    If CRC or ECC protections do not match block data an error is returned. 
    If data is stored redundantly, the redundant information is returned. 
    If no completely stored block is found, an error is returned. 
    1.2.1.6 Scheduling 
    1.2.1.6.1 Deterministic, hard real-time scheduling 

    TSR-6 The system shall execute the specified functions within their respective hard 
    timing limits.
      
    Rationale: Hard real-time scheduling may be used for scheduling safety mechanisms 
    implemented in software. 
    This requirement is even more important for fail-operational systems, where one function 
    may have to work, while another blocks the processor. 
    MICROSAR Safe Feature: The immediate priority ceiling protocol specified by AUTOSAR 
    is capable of performing this task. The schedule tables specified by AUTOSAR may also 
    be used on top of the scheduling algorithm. 
    The operating system of MICROSAR Safe implements the scheduling algorithm according 
    to the methods for ASIL D required by ISO 26262. 
    1.2.1.7 Partitioning 
    1.2.1.7.1 Memory partitioning 

    TSR-7 The system shall protect software applications from unspecified memory 
    access.
      
    Rationale: Partitioning in software is often introduced because of different quality levels of 
    software and different responsibilities of software development on one ECU. 
    Memory partitioning relies on the available MPU in hardware for the effectiveness of the 
    mechanism. 
    MICROSAR Safe Feature: Memory partitioning and context switching using AUTOSAR 
    Operating Feature System SC3 mechanisms is implemented according to the methods for 
    ASIL D required by ISO 26262. 
    Adequate configuration of the memory partitions is in the responsibility of the user of 
    MICROSAR Safe. 
    1.2.1.7.2 Time partitioning 
    1.2.1.7.2.1 Timing protection 

    TSR-8 The system shall detect timing faults in the software.  
    Rationale: Relying on a watchdog for timing protection is sometimes not sufficiently robust 
    or efficient. 
    MICROSAR Safe Feature: The operating system of MICROSAR Safe implements the 
    timing protection functionality of SC4 according to the methods for ASIL D required by ISO 
    26262. 
    2018 Vector Informatik GmbH 
    1.0 
    15 / 103 


    Safety Manual CBD1601056 D05 
    1.2.1.7.2.2 Killing of applications 
    TSR-9 The system shall terminate software applications.  
    Rationale: In combination with the timing protection this allows the software to continue 
    operation in case of a software fault. 
    MICROSAR Safe Feature: The operating system of MICROSAR Safe implements the 
    termination of applications according to the methods for ASIL D required by ISO 26262. 
    1.2.1.8 Communication protection 
    1.2.1.8.1 Inter ECU communication 
    1.2.1.8.1.1 End-to-end protection 

    TSR-10 The system shall protect communication between its elements.  
    Rationale: Communication has to be protected against corruption, unintended replay and 
    masquerading. The loss of a message must be detected. 
    This can be achieved using the end-to-end (E2E) protection 
    mechanism defined by AUTOSAR. 
    MICROSAR Safe Feature: MICROSAR Safe implements the E2E functionality according 
    to 
    ISO 26262. This also includes the CRC library functionality. 
    1.2.1.8.1.2 Protection by cryptographic algorithms 
    TSR-11 The system shall protect communication between its elements using 
    cryptographic hash algorithms to detect accidental corruption of the 
    communication.
      
    Rationale: Cyclic redundancy codes (CRC) provide a specified hamming distance given a 
    polynomial and data block size. 
    Cryptographic hash functions provide a probabilistic statement on data corruption 
    detection depending on the hash function, data block size and hash value size. 
    MICROSAR Safe Feature: The Cryptographic Service Manager of MICROSAR Safe is 
    implemented according to the methods for ASIL D required by ISO 26262. 
    The Cryptographic Service Manager services the main function and functions to calculate 
    a cryptographic hash function according to AUTOSAR specification. 
    1.2.1.8.2 Intra ECU communication 
    1.2.1.8.2.1 Intra OS application communication 

    TSR-16 The microcontroller software shall communicate within its applications.  
    Rationale: Software components need to communicate. 
    Protection of the memory against random hardware faults is expected by the system (e.g. 
    via ECC RAM and lock-step mode). 
    MICROSAR Safe Feature: The RTE provides services to allow communication of software 
    components within OS applications (intra-partition communication). 
    1.2.1.8.2.2 Inter OS application communication 
    TSR-12 The microcontroller software shall communicate between its applications.  
    Rationale: Multi-core systems may need to exchange safety-related information between 
    2018 Vector Informatik GmbH 
    1.0 
    16 / 103 


    Safety Manual CBD1601056 D05 
    applications. 
    Protection of the memory against random hardware faults is expected by the system (e.g. 
    via ECC RAM and lock-step mode). 
    MICROSAR Safe Feature: The operating system of MICROSAR Safe implements the 
    inter-OS application (IOS) functionality according to the methods for ASIL D required by 
    ISO 26262. 
    The RTE provides services to allow communication between OS applications (inter-
    partition communication). 
    1.2.1.9 Watchdog services 
    1.2.1.9.1 Program flow monitoring 

    TSR-13 The system shall provide a mechanism to detect faults in program flow.  
    Rationale. Program flow can be corrupted by random hardware faults or software faults. 
    MICROSAR Safe Feature: MICROSAR Safe watchdog stack implements program flow 
    monitoring functionality according to the methods for ASIL D required by ISO 26262. 
    1.2.1.9.2 Alive monitoring 
    TSR-14 The system shall provide a mechanism to detect stuck software.  
    Rationale: Alive monitoring is used to reset the software or controller in case it is 
    unresponsive. 
    MICROSAR Safe Feature: MICROSAR Safe watchdog stack implements alive monitoring 
    functionality according to the methods for ASIL D required by ISO 26262. 
    1.2.1.9.3 Deadline monitoring 
    TSR-15 The system shall provide a mechanism to detect deadline violations.  
    Rationale: Deadline monitoring using the watchdog stack can be used to implement timing 
    monitoring. 
    MICROSAR Safe Feature: MICROSAR Safe watchdog stack implements deadline 
    monitoring functionality according to the methods for ASIL D required by ISO 26262. 
    1.2.1.10 Peripheral in- and output 
    1.2.1.10.1 Peripheral input 

    TSR-17 The system shall read input values from peripheral devices.  
    Rationale: In- and output is the most common use case for safety mechanisms. 
    Some MCAL manufacturers call this feature safe acquisition. 
    MICROSAR Safe Feature: MCAL components used for peripheral access are usually not 
    developed by Vector. DIO and SPI drivers provided by Vector support the input as safety 
    feature. 
    1.2.1.10.2 Peripheral output 
    TSR-18 The system shall write output values to peripheral devices.  
    Rationale: In- and output is the most common use case for safety mechanisms. 
    Some MCAL manufacturers call this feature safe actuation. 
    MICROSAR Safe Feature: MCAL components used for peripheral access are usually not 
    2018 Vector Informatik GmbH 
    1.0 
    17 / 103 


    Safety Manual CBD1601056 D05 
    developed by Vector. DIO and SPI drivers provided by Vector support the output as safety 
    feature (to trigger external watchdogs or switch actuation paths). 
    1.2.2 Environment 
    1.2.2.1 Safety Concept 

    SMI-14 
    The user of MICROSAR Safe shall be responsible for the functional safety concept. 
    The overall functional safety concept is in the responsibility of the user of MICROSAR 
    Safe. MICROSAR Safe can only provide parts that can be used to implement the 
    functional safety concept of the item. 
    It is also the responsibility of the user of MICROSAR Safe to configure MICROSAR Safe 
    as intended by the user's safety concept.  
    The safety concept shall only rely on safety features explicitly described in this safety 
    manual. If a component from MICROSAR Safe does not explicitly describe safety features 
    in this safety manual, this component has been developed according to the methods for 
    ASIL D to provide coexistence with other ASIL components.  
    o  Example: NvM provides safety features for writing and reading of data, the lower 
    layers, i.e. MemIf, Ea, Fee and drivers, only provide the ASIL for coexistence. 
    The safety concept shall not rely on functionality that is not explicitly described as safety 
    feature in this safety manual. This functionality may fail silently in case of a detected fault.  
    o  Example: If a potential out-of-bounds memory access, e.g. due to invalid input or 
    misconfiguration, is detected the requested function will not be performed. An error 
    via DET is only reported if error reporting is enabled. 
    SMI-1 
    The user of MICROSAR Safe shall adequately address hardware faults. 
    The components of MICROSAR Safe can support in the detection and handling of some 
    hardware faults (e.g. using watchdog). 
    MICROSAR Safe does not provide redundant data storage. 
    The user of MICROSAR Safe especially has to address faults in volatile random access 
    memory, non-volatile memory, e.g. flash or EEPROM, and the CPU. 
    MICROSAR Safe relies on the adequate detection of faults in memory and the CPU by 
    other means, e.g. hardware. Thus, Vector recommends using lock-step CPUs together 
    with ECC memory. 
    See also SMI-14. 
    SMI-10 
    The user of MICROSAR Safe shall ensure that the reset or powerless state is a safe 
    state of the system.
     
    This assumption is added to this Safety Manual, because it is used in Vector's safety 
    analyses and development process. 
    SMI-20 
    2018 Vector Informatik GmbH 
    1.0 
    18 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall implement a timing monitoring using e.g. a 
    watchdog.
     
    The components of MICROSAR Safe do not provide mechanisms to monitor their own 
    timing behavior. 
    The watchdog stack that is part of MICROSAR Safe can be used to fulfill this assumption. 
    If the functional safety concept also requires a logic monitoring, The watchdog stack that is 
    part of MICROSAR Safe can be used to implement it. 
    The watchdog is one way to perform timing monitoring. Today the watchdog is the most 
    common approach. In future there may be different approaches e.g. by monitoring using a 
    different ECU. 
    See also SMI-14. 
    SMI-98 
    The user of MICROSAR Safe shall ensure an end-to-end protection for safety-related 
    communication between ECUs.
     
    The communication components of MICROSAR Safe do not assume sending or receiving 
    as a safety requirement, because considered faults can only be detected using additional 
    information like a cycle counter. Vector always assumes that an end-to-end protection or 
    equivalent mechanism is implemented on application level. 
    Considered faults in communication are: 
    o  Failure of communication peer  
    o  Message masquerading  
    o  Message corruption 
    o  Unintended message repetition  
    o  Insertion of messages  
    o  Re-sequencing  
    o  Message loss  
    o  Message delay 
    This requirement can be fulfilled by e.g. using the end-to-end protection wrapper for safety 
    related communication. 
    SMI-11 
    The user of MICROSAR Safe shall ensure data consistency for its application. 
    Data consistency is not automatically provided when using MICROSAR Safe. MICROSAR 
    Safe only provides services to support enforcement of data consistency. Their application 
    is in the responsibility of the user of MICROSAR Safe. 
    To ensure data consistency in an application, critical sections need to be identified and 
    protected. 
    To identify critical sections in the code, e.g. review or static code analysis can be used. 
    2018 Vector Informatik GmbH 
    1.0 
    19 / 103 


    Safety Manual CBD1601056 D05 
    To protect critical sections, e.g. the services to disable and enable interrupts provided by 
    the MICROSAR Safe operating system can be used. 
    To verify correctly implemented protection, e.g. stress testing or review can be used. 
    Note the AUTOSAR specification with respect to nesting and sequence of calls to interrupt 
    enabling and disabling functions. 
    See also TSR-101876. 
    1.2.2.2 Use of MICROSAR Safe Components 
    SMI-2 
    The user of MICROSAR Safe shall adequately select the type definitions to reflect 
    the hardware platform and compiler environment.
     
    The user of MICROSAR Safe is responsible for selecting the correct platform types 
    (PlatformTypes.h) and compiler abstraction (Compiler.h). Especially the size of the 
    predefined types must match the target environment. 
    Example: A uint32 must be mapped to an unsigned integer type with a size of 32 bits. 
    The user of MICROSAR Safe can use the platform types provided by Vector. Vector has 
    created and verified the platform types mapping according to the information provided by 
    the user of MICROSAR Safe. 
    SMI-12 
    The user of MICROSAR Safe shall initialize all components of MICROSAR Safe prior 
    to using them.
     
    This constraint is required by AUTOSAR anyway. It is added to this Safety Manual, 
    because Vector assumes initialized components in its safety analyses and development 
    process. 
    Correct initialization can be verified, e.g. during integration testing. 
    SMI-16 
    The user of MICROSAR Safe shall only pass valid pointers at all interfaces to 
    MICROSAR Safe components.
     
    Plausibility checks on pointers are performed by MICROSAR Safe (see also SMI-18), but 
    they are limited. MICROSAR Safe components potentially use provided pointers to write to 
    the location in memory. 
    Also the length and pointer of a buffer provided to a MICROSAR Safe component need to 
    be consistent. 
    This assumption also applies to QM as well as ASIL components. 
    This can e.g. be verified using static code analysis tools, reviews and integration testing. 
    SMI-18 
    The user of MICROSAR Safe shall enable plausibility checks for the MICROSAR 
    Safe components.
     
    This setting is necessary to introduce defensive programming and increase robustness at 
    the interfaces as required by ISO 26262. 
    This setting has to be configured at /MICROSAR/EcuC/EcucGeneral/EcuCSafeBswChecks and 
    <Component-specific path>/<Ma>SafeBswChecks for all components that are intended to 
    2018 Vector Informatik GmbH 
    1.0 
    20 / 103 


    Safety Manual CBD1601056 D05 
    be ASIL. 
    Ma is the Module Abbreviation. 
    This setting is enforced by an MSSV plug-in. 
    This setting does not enable error reporting to the DET component. 
    SMI-1725 
    The user of MICROSAR Safe shall configure and use the interrupt system correctly. 
    The user of MICROSAR Safe is responsible for a correct and consistent configuration and 
    usage of the interrupt system. 
    Especially the following topics shall be verified: 
    o  Consistent configuration of interrupt category, level and priority in OS and MCAL 
    modules 
    o  Correct assignment of logical channels/instances to interrupt vectors in case of 
    MCAL modules with multiple channels/instances 
    o  The interrupt controller is configured in a mode which processes interrupts of the 
    same level sequentially to avoid unbounded interrupt nesting 
    1.2.2.3 Partitioning 
    SMI-9 
    The user of MICROSAR Safe shall ensure that for one AUTOSAR functional cluster 
    (e.g. System Services, Operating System, CAN, COM, etc.) only components from 
    Vector are used.
     
    This assumption is required because of dependencies within the development process of 
    Vector. 
    This assumption does not apply to the MCAL or the EXT cluster. 
    Vector may have requirements on MCAL or EXT components depending on the upper 
    layers that are used and provided by Vector. For example, the watchdog driver is 
    considered to have safety requirements allocated to its initialization and triggering 
    services. Details are described in the component specific parts of this safety manual. 
    This assumption does not apply to components that are not provided by Vector. 
    In case the partitioning solution is used, this assumption only partially applies to the 
    System Services cluster. Only the Watchdog Manager and Watchdog Interface need to be 
    used from Vector then, because the Watchdog Manager and Watchdog Interface will be 
    placed in separate memory partitions apart from the other System Services components. 
    SMI-32 
    The user of MICROSAR Safe shall provide an argument for coexistence for software 
    that resides in the same partition as components from MICROSAR Safe.
     
    Vector considers an ISO 26262-compliant development process for the software as an 
    argument for coexistence (see [1] Part 9 Clause 6). Vector assumes that especially 
    freedom from interference with respect to memory is provided by an ISO 26262-compliant 
    development process. 
    Redundant data storage as the only measure by the other software is not considered a 
    2018 Vector Informatik GmbH 
    1.0 
    21 / 103 


    Safety Manual CBD1601056 D05 
    sufficient measure. 
    If ASIL components provided by Vector are used, this requirement is fulfilled. 
    In general Vector components do not implement methods to interface with other software 
    (e.g. components, hooks, callouts) in other partitions. They assume that all interfacing 
    components reside in the same partition. Interfacing components are described in the 
    respective technical reference. 
    If an argument for coexistence cannot be provided, other means of separation have to be 
    implemented (e.g. trusted or non-trusted function calls). 
    SMI-99 
    The user of MICROSAR Safe shall verify that the memory mapping is consistent 
    with the partitioning concept.
      
    The volatile data of every component shall be placed in the associated memory partition. 
    This can be verified e.g. by review of the linker map file. 
    The memory sections for each component placed in RAM can be identified 
    <MIP>_START_SEC_VAR[_<xxx>], where <MIP> is the Module Implementation Prefix of 
    the component. 
    1.2.2.4 Resources 
    SMI-33 
    The user of MICROSAR Safe shall provide sufficient resources in RAM, ROM, stack 
    and CPU runtime for MICROSAR Safe.
     
    Selection of the microcontroller and memory capacities as well as dimensioning of the 
    stacks is in the responsibility of the user of MICROSAR Safe. 
    If MICROSAR Safe components have specific requirements, these are documented in the 
    respective Technical Reference document. 
    1.2.3 Process 
    SMI-15 
    The user of MICROSAR Safe shall follow the instructions of the corresponding 
    Technical Reference of the components.
     
    Especially deviations from AUTOSAR specifications are described in the Technical 
    References. 
    If there are constraints for the implementation of an exclusive area, these are described in 
    the Technical References. 
    SMI-5 
    The user of MICROSAR Safe shall verify all code that is modified during integration 
    of MICROSAR Safe.
     
    Code that is typically modified by the user of MICROSAR Safe during integration 
    comprises generated templates, hooks, callouts, or similar. 
    This assumption also applies if interfaces between components are looped through user-
    defined functions. 
    Vector assumes that this verification also covers ISO 26262:6-9. Vector assumes that 
    modified code that belongs to a Vector component, e.g. EcuM callouts or OS trace hooks 
    2018 Vector Informatik GmbH 
    1.0 
    22 / 103 


    Safety Manual CBD1601056 D05 
    can at least coexist with this component, because no separation in memory or time is 
    implemented. 
    Example: Callouts of the EcuM are executed in the context of the EcuM. 
    Non-trusted functions provided by the Vector operating system can be used to implement 
    a separation in memory in code modified by the user of MICROSAR Safe. 
    Support by Vector can be requested on a per-project basis. 
    SMI-30 
    The user of MICROSAR Safe shall only modify source code of MICRSAR Safe that is 
    explicitly allowed to be changed.
     
    Usually no source code of MICROSAR Safe is allowed to be changed by the user of 
    MICROSAR Safe. 
    The user of MICROSAR Safe can check if the source code was modified by e.g, 
    comparing it to the original delivery.  
    SMI-8 
    The user of MICROSAR Safe shall verify generated functions according to ISO 
    26262:6-9.
     
    Generated functions can be identified when searching through the generated code. 
    Support by Vector can be requested on a per-project basis. 
    An example of generated functions is the configured rules of the Basic Software Manager 
    (BSWM). Their correctness can only be verified by the user of MICROSAR Safe. Please 
    note, however, that BSWM does not provide safety features. 
    This requirement does not apply to MICROSAR SafeRTE. 
    SMI-19 
    The user of MICROSAR Safe shall execute the MICROSAR Safe Silence Verifier 
    (MSSV).
     
    MSSV is used to detect potential out-of-bounds accesses by Vector's basic software based 
    on inconsistent configuration. 
    Details on the required command line arguments and integration into the tool chain can be 
    found in [4]. 
    If the report shows “Overall Check Result: Fail", please contact the Safety Manager at 
    Vector. See the Product Information MICROSAR Safe for contact details. 
    SMI-4 
    The user of MICROSAR Safe shall perform the integration (ISO 26262:6-10) and 
    verification (ISO 26262:6-11) processes as required by ISO 26262.
     
    Especially the safety mechanisms must be verified in the final target ECU. 
    Vector assumes that by performing the integration and verification processes as required 
    by ISO 26262 the generated configuration data, e.g. data tables, task priorities or PDU 
    handles, are sufficiently checked. An additional review of the configuration data is then 
    considered not necessary. 
    Integration does not apply to a MICROSAR Safe component that consists of several 
    subcomponents. This integration is already performed by Vector. The integration of 
    subcomponents is validated during creation of the safety case by Vector based on the 
    2018 Vector Informatik GmbH 
    1.0 
    23 / 103 


    Safety Manual CBD1601056 D05 
    configuration handed in by the user of MICROSAR Safe. 
    However, integration of all MICROSAR Safe components in the specific use-case of the 
    user of MICROSAR Safe is the responsibility of the user of MICROSAR Safe. This also 
    includes the hardware-software integration in the context of the target ECU. 
    Support by Vector can be requested on a per-project basis. 
    SMI-100 
    The user of MICROSAR Safe shall ensure that a consistent set of generated 
    configuration is used for verification and production.
      
    Make sure that the same generated files are used for testing and production code, i.e. be 
    aware that configuration can be changed without generating the code again. 
    Make sure that all generated files have the same configuration basis, i.e. always generate 
    the MICROSAR Safe configuration for all components for a relevant release of the ECU 
    software. 
    The use of post build loadable is supported but not recommended by Vector. 
    SMI-176 
    The user of MICROSAR Safe shall verify the integrity of the delivery by Vector.  
    Run the SIPModificationChecker.exe and verify that the source code, BSWMD and safety 
    manual files are unchanged. 
    SMI-31 
    The user of MICROSAR Safe shall verify the consistency of the binary downloaded 
    into the ECU's flash memory.
     
    This also includes re-programming of flash memory via a diagnostics service. The 
    consistency of the downloaded binary can be checked by the bootloader or the application. 
    MICROSAR Safe assumes a correct program image.  
    SMI-3 
    The user of MICROSAR Safe shall evaluate all tools (incl. compiler) that are used by 
    the user of MICROSAR Safe according to ISO 26262:8-11.
     
    Evaluation especially has to be performed for the compiler, linker, debugging and test 
    tools. 
    Vector provides a guideline for the evaluation of the Tool Confidence Level (TCL) for the 
    tools provided by Vector (e.g. DaVinci Configurator). 
    Vector has evaluated the tools exclusively used by Vector during the development of 
    MICROSAR Safe. 
    2018 Vector Informatik GmbH 
    1.0 
    24 / 103 


    Safety Manual CBD1601056 D05 
    2 Safety Manual BswM 
    2.1 Safety features 
    This component does not provide safety features. 
    2.2 Configuration constraints 
    SMI-3528 
    The user of MICROSAR Safe shall configure the following attribute: 
    o  Set /MICROSAR/BswM/BswMGeneral/BswMEthIfEnabled to FALSE
    This setting is enforced by an MSSV plugin. 
    SMI-3529 
    The user of MICROSAR Safe shall assert the following preprocessor define: 
    o  BSWM_CC_POWER_SOURCES is not defined in BswM_Cfg.h
    This setting is enforced by an MSSV plugin. 
    2.3 Additional Verification measures 
    This component does not require additional verification measures. 
    2.4 Safety features required from other components 
    This component does not require safety features from other components. 
    2.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    25 / 103 


    Safety Manual CBD1601056 D05 
    3 Safety Manual CanIf 
    3.1 Safety features 
    This component does not provide safety features. 
    3.2 Configuration constraints 
    SMI-348 
    The user of MICROSAR Safe shall configure the following attributes: 
    o  Set /MICROSAR/CanIf/CanIfPrivateCfg/CanIfOptimizeOneController to FALSE. 
    o  Set /MICROSAR/CanIf/CanIfPublicCfg/CanIfJ1939DynAddrSupport to DISABLED. 
    These settings are enforced by a MSSV plugin. 
    3.3 Additional verification measures 
    SMI-349 
    The user of MICROSAR Safe shall verify for each entry of table 
    CanIf_RxIndicationFctList that the signature of the function referred by member 
    RxIndicationFct matches the expected signature that is selected the value of the member 
    RxIndicationLayout. 
    The table CanIf_RxIndicationFctList can be found in CanIf_Lcfg.c. 
    The following table lists the expected signatures. The placeholder <name> represents the 
    function's name: 
    Value of RxIndicationLayout 
    Signature of the function referred by 
    RxIndicationFct  

    CanIf_SimpleRxIndicationLayout 
    void <name>(PduIdType CanRxPduId, const 
    uint8* CanSduPtr) 
    CanIf_AdvancedRxIndicationLayout  void <name>(PduIdType CanRxPduId, const 
    PduInfoType* PduInfoPtr) 
    CanIf_NmOsekRxIndicationLayout 
    void <name>(PduIdType CanRxPduId, const 
    uint8* CanSduPtr, Can_IdType CanId) 
     
    SMI-350 
    The user of MICROSAR Safe shall verify for each entry of table 
    CanIf_TxConfirmationFctList that function referred by member TxConfirmationFctList 
    has the following signature (the placeholder <name> represents the function's name): 
    void <name>(PduIdType CanTxPduId) 
    The table CanIf_TxConfirmationList can be found in CanIf_Lcfg.c. 
    2018 Vector Informatik GmbH 
    1.0 
    26 / 103 


    Safety Manual CBD1601056 D05 
    SMI-746 
    The user of MICROSAR Safe shall verify for each callback function listed in the following 
    table that the signature of the function matches the expected signature. 
    All callback functions can be found in file CanIf_Lcfg.c. Please note that depending on 
    configuration you must verify only the provided ones. 
    Callback function 
    Expected signature of the function 
    CanIf_BusOffNotificationFctPtr 
    void <name> (uint8 
    ControllerId) 
    CanIf_CtrlModeIndicationFctPtr 
    void <name> (uint8 
    ControllerId, 
    CanIf_ControllerModeType 
    ControllerMode) 
    CanIf_TrcvModeIndicationFctPtr 
    void <name> (uint8 
    TransceiverId, 
    CanTrcv_TrcvModeType 
    TransceiverMode) 
    CanIf_ConfirmPnAvailabilityFctPtr 
    void <name> (uint8 
    TransceiverId) 
    CanIf_ClearTrcvWufFlagIndicationFctPtr 
    void <name> (uint8 
    TransceiverId) 
    CanIf_CheckTrcvWakeFlagIndicationFctPtr 
    void <name> (uint8 
    TransceiverId) 
    CanIf_WakeUpValidationFctPtr 
    void <name> 
    (EcuM_WakeupSourceType 
    CanWakeupEvents) 
    CanIf_RamCheckCorruptControllerIndFctPtr  void <name> (uint8 
    ControllerId) 
    CanIf_RamCheckCorruptMailboxIndFctPtr 
    void <name> (uint8 
    ControllerId, 
    CanIf_HwHandleType HwHandle) 
    CanIf_DataChecksumRxErrFctPtr 
    void <name> (PduIdType 
    CanIfRxPduId) 
     
    SMI-25089 
    The user of MICROSAR Safe shall ensure that any write access within the callout 
    CanIf_TransmitSubDataChecksumTxAppend to the array referenced by parameter 
    txPduDataWidthChecksumPtr is within its valid range. 
    This measure is only applicable if attribute 
    /MICROSAR/CanIf/CanIfPrivateCfg/CanIfDataChecksumTxSupport is configured to TRUE. 
    The size of the array is defined by CANIF_CFG_MAXTXDLC_PLUS_DATACHECKSUM which can be 
    found in file CanIf_Cfg.h. 
    This requirement is fulfilled if the implementation of 
    CanIf_TransmitSubDataChecksumTxAppend is provided by Vector. 
    2018 Vector Informatik GmbH 
    1.0 
    27 / 103 


    Safety Manual CBD1601056 D05 
    3.4 Safety features required from other components 
    This component does not require safety features from other components. 
    3.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    28 / 103 


    Safety Manual CBD1601056 D05 
    4 Safety Manual CanNm 
    4.1 Safety features 
    This component does not provide safety features. 
    4.2 Configuration constraints 
    This component does not have configuration constraints. 
    4.3 Additional verification measures 
    SMI-326 
    The user of MICROSAR Safe shall verify that the pointer (nmUserDataPtr) passed to the 
    function CanNm_GetUserData references a valid memory location and that the size of the 
    array referenced by parameter nmUserDataPtr is greater or equal to 
    CanNm_GetRxMessageData_UserDataLengthOfPbChannelConfig(channel)
    This function is called by the application via the Nm_GetUserData function of the Nm. This 
    interface only passes a pointer without a length. The length is statically configured in the 
    CanNm for each channel. 
    SMI-327 
    The user of MICROSAR Safe shall verify that the pointer (nmPduDataPtr) passed to the 
    function CanNm_GetPduData references a valid memory location and that the size of the 
    array referenced by parameter nmPduDataPtr is greater or equal to 
    CanNm_GetRxMessageDataLengthOfPbChannelConfig(channel)
    This function is called by the application via the Nm_GetPduData function of the Nm. This 
    interface only passes a pointer without a length. The length is statically configured in the 
    CanNm for each channel. 
    4.4 Safety features required from other components 
    This component does not require safety features from other components. 
    4.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    29 / 103 


    Safety Manual CBD1601056 D05 
    5 Safety Manual CanSM 
    5.1 Safety features 
    This component does not provide safety features. 
    5.2 Configuration constraints 
    This component does not have configuration constraints. 
    5.3 Additional verification measures 
    SMI-389 
    The user of MICROSAR Safe shall verify that only existing functions with the correct 
    prototype are referred by the following function pointers. 
    o  The following function pointer is generated only if the attribute 
    /MICROSAR/CanSM/CanSMGeneral/CanSMBusOffBegin is configured to an non-
    empty value: 
    - CanSM_BusOffBeginIndicationFctPtr 
    o  The following function pointer is generated only if 
    /MICROSAR/CanSM/CanSMGeneral/CanSMBusOffEnd is configured to an non-
    empty value: 
    - CanSM_BusOffEndIndicationFctPtr 
    o  The following function pointer is generated only if 
    /MICROSAR/CanSM/CanSMGeneral/CanSMTxTimeoutEnd is configured to an 
    non-empty value: 
    - CanSM_TxTimeoutExceptionEndIndicationFctPtr 
    The function pointers shall especially not contain NULL pointers nor numeric values of 
    memory addresses. 
    All function pointers can be found in CanSM_Lcfg.c. The function prototypes can be found 
    in CanSM_Cfg.h
    5.4 Safety features required from other components 
    This component does not require safety features from other components. 
    5.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    30 / 103 


    Safety Manual CBD1601056 D05 
    6 Safety Manual CanTp 
    6.1 Safety features 
    This component does not provide safety features. 
    6.2 Configuration constraints 
    SMI-2119 
    The user of MICROSAR Safe shall configure the following: 
    o  Set /MICROSAR/CanTp/CanTpGeneral/CanTpOptimizeSingleRxBuffer to FALSE. 
    o  At least one /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpRxNSdu 
    container 
    o  At least one /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu 
    container 
    These settings are enforced by an MSSV plugin. 
    6.3 Additional verification measures 
    This component does not require additional verification measures. 
    6.4 Safety features required from other components 
    This component does not require safety features from other components. 
    6.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    31 / 103 


    Safety Manual CBD1601056 D05 
    7 Safety Manual Com 
    7.1 Safety features 
    This component does not provide safety features. 
    7.2 Configuration constraints 
    SMI-314 
    The user of MICROSAR Safe shall configure the following parameters: 
    o  Set /MICROSAR/Com/ComGeneral/ComReceiveSignalMacroAPI to FALSE. 
    o  Set /MICROSAR/Com/ComGeneral/ComMetaDataSupport to FALSE. 
    o  Set /MICROSAR/Com/ComGeneral/ComDescriptionRoutingCodeGeneration to 
    FALSE. 
    This setting is enforced by a MSSV plugin. 
    SMI-315 
    The user of MICROSAR Safe shall configure the following: 
    A container in /MICROSAR/PduR/PduRBswModules with a reference 
    (/MICROSAR/PduR/PduRBswModules/PduRBswModuleRef) to /ActiveEcuC/Com and 
    shall set the following parameters: 
    o  /MICROSAR/PduR/PduRBswModules/PduRCommunicationInterface to TRUE 
    o  /MICROSAR/PduR/PduRBswModules/PduRTransportProtocol to FALSE  
    o  /MICROSAR/PduR/PduRBswModules/PduRCancelTransmit to FALSE 
    This setting is enforced by a MSSV plugin. 
    7.3 Additional verification measures 
    SMI-1104 
    The user of MICROSAR Safe shall verify that the SignalDataPtr passed to 
    Com_ReceiveSignal and Com_ReceiveShadowSignal points to a valid buffer which matches 
    the configured /MICROSAR/Com/ComConfig/ComSignal/ComSignalType or 
    /MICROSAR/Com/ComConfig/ComGroupSignal/ComSignalType. In case of the 
    ComSignalType UINT8_N the caller must ensure that the array size matches to the 
    configured /MICROSAR/Com/ComConfig/ComSignal/ComSignalLength or 
    /MICROSAR/Com/ComConfig/ComGroupSignal/ComSignalLength. 
    This can be verified by comparing the type of the pointer passed to SignalDataPtr to the 
    ApplType returned by Com_GetApplTypeOfRxAccessInfo(Index). 
    2018 Vector Informatik GmbH 
    1.0 
    32 / 103 


    Safety Manual CBD1601056 D05 
    If the ApplType is set to COM_UINT8_N_APPLTYPEOFRXACCESSINFO additionally verify that the 
    value of Com_GetRxSigBufferArrayBasedBufferLengthOfRxAccessInfo(Index) is less or 
    equal to the size (in bytes) of the array passed to SignalDataPtr. 
    The parameter of the macros Com_GetApplTypeOfRxAccessInfo(Index) and 
    Com_GetRxSigBufferArrayBasedBufferLengthOfRxAccessInfo(Index) is the SignalId and 
    can be found in the generated header files.  
    7.4 Safety features required from other components 
    This component does not require safety features from other components. 
    7.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    33 / 103 


    Safety Manual CBD1601056 D05 
    8 Safety Manual ComM 
    8.1 Safety features 
    This component does not provide safety features. 
    8.2 Configuration constraints 
    This component does not have configuration constraints. 
    8.3 Additional Verification measures 
    SMI-94 
    The user of MICROSAR Safe shall verify that the array size generated by ComM matches 
    to the array size in the type definition of RTE. The following procedure shall be applied to 
    each channel that has activated the ComM parameter 'Full Comm Request Notification 
    Enabled'. 
    1.  ComM_Cfg.h contains array size definition in the format 
    COMM_MAX_CR_<ShortNameOfChannel> 
    2.  rte_type.h contains the definition of the corresponding structure type in the format 
    ComM_UserHandleArrayType_<ShortNameOfChannel> 
    3.  Verify that the structure member 'handleArray' has the same size as the corresponding 
    define value of ComM in 1). 
    4.  Verify the content of the generated functions ComM_CurrentChannelRequestInit and 
    ComM_CurrentChannelRequestNotification to ensure that the proper define 
    COMM_MAX_CR_<ShortNameOfChannel> is used to limit the array index when 
    writing to ComM_UserHandleArrayType_<ShortNameOfChannel>.handleArray[]. 
    SMI-95 
    The user of MICROSAR Safe shall verify that the value of ComSignalLength (byte) in Com 
    module is smaller or equal to the value of COMM_PNC_SIGNAL_LENGTH (can be found 
    in ComM_Cfg.h). 
    This shall be verified for each ComPncSignal referenced by Partial Network Clusters and 
    having ComMPncComSignalDirection = RX. 
    SMI-1046 
    The user of MICROSAR Safe shall verify that each element of table 
    ComM_UserModeNotiFunc refers either a NULL_PTR or a function that has the following 
    signature (the placeholder <name> represents the function's name): 
    Std_ReturnType <name>(uint8 nextMode) 
    The table ComM_UserModeNotiFunc can be found in ComM_Lcfg.c. This measure is only 
    needed if at least one ComM user has enabled the parameter 'User Mode Notification'. 
    2018 Vector Informatik GmbH 
    1.0 
    34 / 103 


    Safety Manual CBD1601056 D05 
    8.4 Safety features required from other components 
    This component does not require safety features from other components. 
    8.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    35 / 103 


    Safety Manual CBD1601056 D05 
    9 Safety Manual Crc 
    9.1 Safety features 
    SMI-344 
    Crc provides the following safety features: 
    ID  
    Safety feature  
    CREQ-858  
    Crc shall provide a service to calculate 8-bit SAE-J1850 CRC. 
    CREQ-859  
    Crc shall provide a service to calculate 8-bit 0x2F CRC. 
    CREQ-860  
    Crc shall provide a service to calculate 16-bit CCITT CRC. 
    CREQ-861  
    Crc shall provide a service to calculate 32-bit IEEE-802.3 CRC. 
    CREQ-862  
    Crc shall provide a service to calculate 32-bit E2E Profile 4 CRC. 
    CREQ-117997  
    Crc shall provide a service to calculate 64-bit ECMA CRC. 
     
    9.2 Configuration constraints 
    This component has no configuration constraints. 
    9.3 Additional verification measures 
    SMI-49 
    The user of MICROSAR Safe shall verify that the CRC is calculated for the intended data. 
    This includes the intended buffer and its size (see also SMI-16), start value and if it is the 
    first call to the service. 
    Verification can be performed by the "magic check" (see AUTOSAR SWS Crc). 
    If Crc is used by a MICROSAR Safe component (e.g. E2E, NvM), this requirement is 
    fulfilled for the MICROSAR Safe component. 
    9.4 Dependencies to other components 
    9.4.1 Safety features required from other components 

    This component does not require safety features from other components. 
    9.4.2 Coexistence with other components 
    This component does not require coexistence with other components. 
    It is assumed that the user of Crc has the adequate ASIL. 
    9.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    36 / 103 


    Safety Manual CBD1601056 D05 
    10 Safety Manual Csm 
    10.1 Safety Features 
    SMI-47 
    Csm provides the following safety features: 
    ID  
    Safety feature  
    CREQ-330  
    Csm shall provide services to compute hash functions. 
    CREQ-331  
    Csm shall provide services to compute MAC functions. 
    CREQ-1252  
    Csm shall provide services to verify MAC functions. 
    Note: It is assumed that cryptographic algorithms yield different results for different input 
    parameters. 
    10.2 Configuration constraints 
    This component does not have configuration constraints. 
    10.3 Additional verification measures 
    SMI-46 
    The user of MICROSAR Safe shall verify that the intended callback functions is called 
    during integration testing. 
    This requirement only applies if callback functions are configured. 
    This requirement only applies if TSR-11 is considered a safety requirement. 
    SMI-45 
    The user of MICROSAR Safe shall verify that the intended Cry service is called during 
    integration testing. 
    This requirement only applies if TSR-11 is considered a safety requirement. 
    10.4 Dependencies to other components 
    This component does not require safety features from other components. 
    10.4.1 Safety features required from other components 
    SMI-44 
    The used Cry shall provide the services to compute hash functions, to compute MAC 
    functions, to verify MAC functions and to compute checksums over data as safety feature. 
    This requirement only applies if TSR-11 is considered a safety requirement. 
    2018 Vector Informatik GmbH 
    1.0 
    37 / 103 


    Safety Manual CBD1601056 D05 
    10.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    38 / 103 


    Safety Manual CBD1601056 D05 
    11 Safety Manual Det 
    11.1 Safety features 
    This component does not provide safety features. 
    11.2 Configuration constraints 
    This component does not have configuration constraints. 
    SMI-60 
    If the DET is used in series production the extended debug features shall be switched off, 
    because they are only relevant if a debugger is attached.  
    The user of MICROSAR Safe shall configure and verify the following attribute: 
    o  /MICROSAR/Det/DetGeneral/DetExtDebugSupport = False 
    11.3 Additional Verification measures 
    SMI-4671 
    The user of MICROSAR Safe shall verify that the enter and exit functions of the 
    DET’s exclusive area do not produce DET errors.
     
    Verification can e.g. be performed by review. If these functions are mapped to OS services 
    it has to be checked that from the ErrorHook of the OS no DET error reporting functions 
    are called if the ErrorHook has been called due to an error in the OS service used for the 
    DET's exclusive area. 
    11.4 Safety features required from other components 
    This component does not require safety features from other components. 
    11.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    39 / 103 


    Safety Manual CBD1601056 D05 
    12 Safety Manual EcuM 
    12.1 Safety features 
    SMI-34 
    EcuM Flex provides the following safety features: 
    ID  
    Safety feature  
    CREQ-
    EcuM shall provide a service to initialize the ECU management. 
    470  
    CREQ-
    EcuM shall provide ECU initialization on multiple cores. 
    454  
    CREQ-
    EcuM shall perform validation of all postbuild configurable BSW module configuration 
    543  
    parameters. 
    CREQ-
    EcuM shall provide a callout to set programmable interrupts during the startup phase. 
    375  
    CREQ-
    EcuM shall provide a callout to initialize driver prior the start of the OS. 
    525  
    CREQ-
    EcuM shall provide a callout to determine the Postbuild configuration data. 
    488  
    CREQ-
    EcuM shall provide a callout to initialize drivers prior Postbuild data is available. 
    505  
    CREQ-
    EcuM shall provide a callout to reset the ECU. 
    391  
    CREQ-
    EcuM shall provide a callout to generate a RAM Hash. 
    381  
    CREQ-
    EcuM shall provide a callout to check the RAM Hash. 
    440  
    CREQ-
    EcuM shall provide a callout to re-initialize drivers during a restart. 
    509  
    CREQ-
    EcuM shall provide a service to set the current shutdown target of the ECU. 
    445  
    CREQ-
    EcuM shall provide a service to get the shutdown target of the ECU. 
    483  
    CREQ-
    EcuM shall provide a service to initiate the ECU shutdown depending on the 
    372  
    shutdown target. 
    CREQ-
    EcuM shall provide a callout to notify Errors from the ECU management. 
    431  
    CREQ-
    EcuM shall provide a service to complete the ECU shutdown process. 
    421  
    CREQ-
    EcuM shall provide a service to initiate an ECU shutdown. 
    535  
    CREQ-
    EcuM shall indicate mode changes to the RTE. 
    699  
    CREQ-
    EcuM shall provide a service to request the run state. 
    2018 Vector Informatik GmbH 
    1.0 
    40 / 103 


    Safety Manual CBD1601056 D05 
    691  
    CREQ-
    EcuM shall provide a service to release the run state. 
    692  
    CREQ-
    EcuM shall provide a service to release the post run state. 
    693  
    CREQ-
    EcuM shall provide a service to request the post run state. 
    690  
    Note: RAM Hash generation and checking callouts are only available when sleep modes 
    are configured. 
    SMI-286 
    EcuM Fix provides the following safety features: 
    ID  
    Safety feature  
    CREQ-
    EcuM shall provide a service to initialize the ECU management. 
    470  
    CREQ-
    EcuM shall provide ECU initialization on multiple cores. 
    454  
    CREQ-
    EcuM shall perform validation of all postbuild configurable BSW module configuration 
    543  
    parameters. 
    CREQ-
    EcuM shall provide a callout to set programmable interrupts during the startup phase. 
    375  
    CREQ-
    EcuM shall provide a callout to initialize driver prior the start of the OS. 
    525  
    CREQ-
    EcuM shall provide a callout to determine the Postbuild configuration data. 
    488  
    CREQ-
    EcuM shall provide a callout to initialize drivers prior Postbuild data is available. 
    505  
    CREQ-
    EcuM shall provide a callout to reset the ECU. 
    391  
    CREQ-
    EcuM shall provide a callout to generate a RAM Hash. 
    381  
    CREQ-
    EcuM shall provide a callout to check the RAM Hash. 
    440  
    CREQ-
    EcuM shall provide a callout to re-initialize drivers during a restart. 
    509  
    CREQ-
    EcuM shall provide a service to set the current shutdown target of the ECU. 
    445  
    CREQ-
    EcuM shall provide a service to initiate the ECU shutdown depending on the 
    372  
    shutdown target. 
    CREQ-
    EcuM shall provide a callout to notify Errors from the ECU management. 
    431  
    CREQ-
    EcuM shall provide a service to complete the ECU shutdown process. 
    421  
    CREQ-
    EcuM shall indicate mode changes to the RTE. 
    699  
    2018 Vector Informatik GmbH 
    1.0 
    41 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-
    EcuM shall provide the ECU state machine. 
    703  
    CREQ-
    EcuM shall trigger the NvM write job in shutdown path. 
    707  
    CREQ-
    EcuM shall provide a callback which is called by the NvM to notify the end of the write 
    668  
    all job. 
    CREQ-
    EcuM shall provide a service to request the run state. 
    691  
    CREQ-
    EcuM shall provide a service to release the run state. 
    692  
    CREQ-
    EcuM shall provide a service to release the post run state. 
    693  
    CREQ-
    EcuM shall provide a service to request the post run state. 
    690  
    CREQ-
    EcuM shall provide a service to kill all post run requests. 
    694  
    CREQ-
    EcuM shall provide a service to kill all run requests. 
    695  
    Note: RAM Hash generation and checking callouts are only available when sleep modes 
    are configured. 
    SMI-38 
    If EcuM service to complete the shutdown process is called prior to initiate the shutdown 
    process, no shutdown will be performed. 
    12.2 Configuration constraints 
    SMI-36 
    The user of MICROSAR Safe shall configure the following attribute: 
    o  Set /MICROSAR/EcuM/EcuMFlexGeneral/EcuMEnableDefBehaviour to FALSE. 
    o  Do not configure any reference in 
    /MICROSAR/EcuM/EcuMConfiguration/EcuMCommonConfiguration/EcuMWakeup
    Source/EcuMComMPNCRef to a PNC for a wakeup source  
    These settings are enforced by MSSV plugins. 
    12.3 Additional verification measures 
    SMI-39 
    The user of MICROSAR Safe shall verify the intended initialization procedure during 
    integration testing.
     
    The user of MICROSAR Safe can verify the intended initialization procedure by performing 
    the following tests: 
    2018 Vector Informatik GmbH 
    1.0 
    42 / 103 


    Safety Manual CBD1601056 D05 
    o  Start the ECU and verify that the intended initalization routines are called. This 
    needs to be verified for each Postbuild-selectable configuration. 
    o  Corrupt the Postbuild data (but not corresponding CRC) in non-volatile memory and 
    start the ECU. Then verify that the corruption is detected by EcuM. 
    o  Start the ECU and verify that the intended Postbuild-selectable configuration is 
    used by the EcuM. This needs to be verified for each Postbuild-selectable 
    configuration. 
    A start of the ECU includes a "cold-start", reset as well as wake-up from sleep if 
    applicable. 
    This requirement only applies if TSR-1 is considered a safety requirement. 
    SMI-35 
    The user of MICROSAR Safe shall verify the intended shutdown procedure during 
    integration testing.
     
    The user of MICROSAR Safe can verify the intended shutdown procedure by shutting 
    down the ECU with all configured shutdown paths. A shutdown path is a call to the service 
    that sets the current shutdown target with a relevant (e.g. combination used to achieve 
    safe state) combination of its parameters. For each shutdown path the intended final state 
    of the ECU (e.g. sleep, shutdown, reset) and the method of reset (e.g. using MCU or 
    Watchdog) is used. 
    The user of MICROSAR Safe shall also consider the service to initiate the ECU shutdown 
    depending on the shutdown target as a possible shutdown path. 
    The user of MICROSAR Safe shall also verify the default shutdown target. 
    This requirement only applies if TSR-3 is considered as a safety requirement. 
    SMI-40 
    The user of MICROSAR Safe shall verify that the memory region used for RAM hash 
    generation and verification is as intended.
     
    Verification can be e.g. performed by review. 
    12.4 Safety features required from other components 
    SMI-42 
    The used operating system shall provide the service to get the core ID as safety feature. 
    If the operating system from MICROSAR Safe is used, this dependency is fulfilled. 
    This requirement only applies if TSR-1 is considered a safety requirement. 
    2018 Vector Informatik GmbH 
    1.0 
    43 / 103 


    Safety Manual CBD1601056 D05 
    12.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    44 / 103 


    Safety Manual CBD1601056 D05 
    13 Safety Manual Fee 
    13.1 Safety features 
    This component does not provide safety features. 
    13.2 Configuration constraints 
    This component does not have configuration constraints. 
    13.3 Additional Verification measures 
    SMI-1292 
    The user of MICROSAR Safe shall verify that valid notification routines are provided to 
    FEE via configuration. 
    'FeeNvmJobEndNotification' and 'FeeNvmJobErrorNotification' callbacks are called by 
    FEE using a function pointer. 
    13.4 Safety features required from other components 
    This component does not require safety features from other components. 
    SMI-1643 
    This component requires coexistence with MemIf, NvM, FlsDrv and Det components if the 
    interface for those components is configured. 
    13.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    45 / 103 


    Safety Manual CBD1601056 D05 
    14 Safety Manual MemIf 
    14.1 Safety features 
    This component does not provide safety features. 
    14.2 Configuration constraints 
    This component does not have configuration constraints. 
    14.3 Additional verification measures 
    This component does not require additional verification measures. 
    14.4 Dependencies to other components 
    14.4.1 Safety features required from other components 

    This component does not require safety features from other components. 
    14.4.2 Coexistence with other components 
    SMI-311 
    This component requires coexistence with NvM, Det, Fee, and Ea components if the 
    interface for those components is configured. 
    14.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    46 / 103 


    Safety Manual CBD1601056 D05 
    15 Safety Manual Nm 
    15.1 Safety features 
    This component does not provide safety features. 
    15.2 Configuration constraints 
    This component does not have configuration constraints. 
    15.3 Additional Verification measures 
    This component does not require additional verification measures. 
    15.4 Dependencies to other components 
    15.4.1 Safety features required from other components 

    This component does not require safety features from other components. 
    15.4.2 Coexistence with other components 
    SMI-149 
    This component requires coexistence with ComM, Com, BswM, Det, SchM/Rte, Rtm and 
    bus network manager components if the interface for those components is configured. 
    15.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    47 / 103 


    Safety Manual CBD1601056 D05 
    16 Safety Manual NvM 
    16.1 Safety features 
    SMI-21 
    This component provides the following safety features: 
    ID  
    Safety feature  
    CREQ-724  
    NvM shall provide a service to read a single NvM block from NVRAM. 
    CREQ-725  
    NvM shall provide a service to write a single NvM block to NVRAM. 
    CREQ-730  
    NvM shall provide a service to read all possbile NvM blocks from NVRAM. 
    CREQ-731  
    NvM shall provide a service to write all possible NvM blocks to NVRAM. 
    CREQ-746  
    NvM shall provide configurable callbacks to synchronize block data. 
    NvM can detect missing, corruption and masquerading (lower layers provide the wrong 
    block) of NvM blocks. 
    SMI-29 
    The user of MICROSAR Safe must design the system in a way that in case of the absence 
    of non‑volatile data it is still safe (e.g. safe state or degradation). It cannot be assured by 
    the memory stack that data is saved completely or at all because a reset or loss of energy 
    might happen at any time, e.g. brown-out, black-out. 
    This also implies that it is in general impossible to guarantee that the latest information is 
    available in the non-volatile memory, e.g. the system is reset before memory stack is even 
    notified to write data to non-volatile memory. 
    Thus, safety-related functionality may not rely on the availability of data in non-volatile 
    memory. 
    Since the availability of data in non-volatile memory cannot be guaranteed in any case, the 
    only sensible use-case is reading safety-related calibration data. 
    Writing of data into non-volatile memory must be verified to assure that the information is 
    available in non-volatile memory. Verification can only be done manually in a protected 
    environment, e.g. at end of line, in a workshop, etc. 
    ECU software cannot verify if data was written, since at any time a reset could occur and 
    the information that had to be written is lost immediately. 
    Reading of data does not modify data stored in non-volatile memory. Thus, reading can be 
    used by safety-related functionality. The memory stack assures that the read data is 
    identical to the data stored in non-volatile memory. 
    The availability may be increased by e.g. redundant storage. 
    16.2 Configuration constraints 
    SMI-25 
    The user of MICROSAR Safe shall configure and verify the following attributes for each 
    NvM block that contains safety-related data

    o  Set /MICROSAR/NvM/NvMBlockDescriptor/NvMBlockUseCrc to TRUE. 
    o  Set /MICROSAR/NvM/NvMBlockDescriptor/NvMBlockCrcType to NVM_CRC32. 
    2018 Vector Informatik GmbH 
    1.0 
    48 / 103 


    Safety Manual CBD1601056 D05 
    SMI-26 
    The user of MICROSAR Safe shall configure and verify the following attribute: 
    o  Set /MICROSAR/NvM/NvMCommon/NvMUseBlockIdCheck to TRUE. 
    16.3 Additional verification measures 
    SMI-22 
    The user of MICROSAR Safe shall pass the intended block ID for reading and writing of a 
    single NvM block. NvM cannot detect if an unintended block that is configured is provided 
    by the user.  
    Verification can be performed during integration testing. 
    SMI-23 
    The user of MICROSAR Safe shall verify that the buffer passed for reading and writing of a 
    single NvM block is valid and sufficiently large for the passed block ID. 
    Verification can be performed by a review of the generated configuration and the code 
    passing the pointer and block ID to the NvM. 
    SMI-48 
    The user of MICROSAR Safe shall verify the size of the internal NvM buffer. 
    The buffer has the symbol name NvM_InternalBuffer_au8. 
    The buffer is generated when at least one of the following features is used: 
    o  at least one block with explicit synchronization is configured 
    o  repair of redundant blocks is enabled 
    o  NvM internal CRC buffer is enabled 
    The buffer size shall be at least the size of the largest NVM block plus the size of the 
    configured CRC value. 
    Verification can be performed e.g. by review. 
    16.4 Safety features required from other components 
    SMI-28 
    The used Crc library shall provide the CRC calculation routines as safety feature. 
    If the Crc library from MICROSAR Safe is used, this dependency is fulfilled. 
    16.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    49 / 103 


    Safety Manual CBD1601056 D05 
    17 Safety Manual OS 
    17.1 Safety features 
    SMI-1259 
    This component provides the following safety features: 
    ID  
    Safety feature  
    CREQ-63  
    OS shall provide a service to start the OS.  
    CREQ-162   OS shall provide a service to initialize itself.  
    CREQ-51  
    OS shall automatically start a subset of alarms for an application mode.  
    CREQ-146   OS shall automatically start a subset of tasks for an application mode.  
    CREQ-72  
    OS shall automatically start a subset of schedule tables for an application mode.  
    CREQ-117   OS shall provide a service to get the current application mode.  
    CREQ-45  
    OS shall provide a global callback during OS startup.  
    CREQ-299   Os shall synchronize the startup in multicore systems.  
    CREQ-153   OS shall provide a service to shutdown the OS.  
    CREQ-95  
    OS shall provide a service to shutdown all cores synchronously.  
    CREQ-161   OS shall provide a global callback upon shutdown.  
    CREQ-71  
    OS shall provide a global callback directly before a task starts its execution.  
    CREQ-165   OS shall provide a global callback directly before a task finishes its execution.  
    CREQ-42  
    OS shall provide a service to activate a task.  
    CREQ-28  
    OS shall handle multiple activations of basic tasks.  
    CREQ-101   OS shall provide a service to terminate the calling task.  
    CREQ-121   OS shall provide a service to define the next activated task.  
    CREQ-126   OS shall provide a service to explicitly invoke the scheduler.  
    CREQ-80  
    OS shall provide a service to get the ID of the current task  
    CREQ-74  
    OS shall provide a service to get the state of a given task.  
    CREQ-135   OS shall provide a service to declare a task.  
    CREQ-115   OS shall provide a service to execute a callback in category 2 ISRs.  
    CREQ-16  
    OS shall provide a service to get the ID of the currently executing category 2 ISR.  
    CREQ-24  
    OS shall handle unconfigured interrupt sources.  
    CREQ-78  
    OS shall provide a service to determine the interrupt source of a non-configured 
    interrupt upon handling of such interrupt.  
    CREQ-154   OS shall provide a nestable service to disable all interrupts.  
    CREQ-98  
    OS shall provide a nestable service to enable all interrupts.  
    CREQ-151   OS shall provide a nestable service to disable all category 2 interrupts.  
    CREQ-82  
    OS shall provide a nestable service to enable all category 2 interrupts.  
    CREQ-111   OS shall provide a non nestable service to disable all interrupts.  
    CREQ-43  
    OS shall provide a non nestable service to enable all interrupts.  
    2018 Vector Informatik GmbH 
    1.0 
    50 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-
    OS shall provide a non nestable service to disable all interrupts callable from kernel 
    1257  
    mode  
    CREQ-
    OS shall provide a non nestable service to enable all interrupts callable from kernel 
    1259  
    mode  
    CREQ-
    OS shall provide a non nestable service to disable all interrupts callable from user 
    1256  
    mode  
    CREQ-
    OS shall provide a non nestable service to enable all interrupts callable from user 
    1258  
    mode  
    CREQ-
    OS shall provide a non nestable service to disable all interrupts callable from any 
    108741  
    mode.  
    CREQ-
    OS shall provide a non nestable service to enable all interrupts callable from any 
    108742  
    mode.  
    CREQ-
    OS shall provide a non nestable service to disable all category 2 interrupts callable 
    108744  
    from kernel mode.  
    CREQ-
    OS shall provide a non nestable service to enable all category 2 interrupts callable 
    108747  
    from kernel mode.  
    CREQ-
    OS shall provide a non nestable service to disable all category 2 interrupts callable 
    108743  
    from user mode.  
    CREQ-
    OS shall provide a non nestable service to enable all category 2 interrupts callable 
    108748  
    from user mode.  
    CREQ-
    OS shall provide a non nestable service to disable all category 2 interrupts callable 
    108745  
    from any mode.  
    CREQ-
    OS shall provide a non nestable service to enable all category 2 interrupts callable 
    108746  
    from any mode.  
    CREQ-
    OS shall provide a service to disable a specific interrupt source.  
    106181  
    CREQ-
    OS shall provide a service to enable a specific interrupt source.  
    106182  
    CREQ-
    OS shall provide a service to clear pending interrupts  
    106183  
    CREQ-
    OS shall provide a service to check whether or not the source of the given ISR is 
    114872  
    enabled  
    CREQ-
    OS shall provide a service to check whether or not the given ISR has been requested  
    114873  
    CREQ-68  
    OS shall provide a service to wait for the occurrence of events.  
    CREQ-155   OS shall provide a service to signal the occurrence of events to a task.  
    CREQ-53  
    OS shall provide a service to acknowledge the occurrence of events.  
    CREQ-129   OS shall provide a service to get the event states of a given task.  
    CREQ-133   OS shall provide a service to declare an event.  
    CREQ-22  
    OS shall provide a service to increment a counter.  
    CREQ-156   OS shall provide a service to get the current value of a counter.  
    CREQ-39  
    OS shall provide a service to get the difference between a given and the current 
    counter value.  
    CREQ-44  
    OS shall provide a service for each hardware counter to translate a given period of 
    2018 Vector Informatik GmbH 
    1.0 
    51 / 103 


    Safety Manual CBD1601056 D05 
    time into number of ticks.  
    CREQ-297   OS shall provide a service for each hardware counter to translate number of counter 
    ticks into a period of time.  
    CREQ-
    OS shall provide a service to get the maximum possible value of a counter  
    1260  
    CREQ-
    OS shall provide a service to get the number of underlying driver ticks required to 
    1261  
    reach a specific unit  
    CREQ-
    OS shall provide a service to get the minumum allowed number of ticks for a cyclic 
    1262  
    alarm of a counter  
    CREQ-116   OS shall provide a service to set a relative alarm.  
    CREQ-29  
    OS shall provide a service to set an absolute alarm.  
    CREQ-93  
    OS shall provide a service to get an alarm.  
    CREQ-164   OS shall provide a service to cancel an alarm.  
    CREQ-19  
    OS shall provide a service to get the alarm base.  
    CREQ-142   OS shall provide alarm callbacks.  
    CREQ-32  
    OS shall provide a service to declare an alarm.  
    CREQ-61  
    OS shall provide a service to start a schedule table at a relative value.  
    CREQ-136   OS shall provide a service to start a schedule table at an absolute value.  
    CREQ-96  
    OS shall provide a service to stop the processing of a schedule table.  
    CREQ-112   OS shall provide a service to switch the processing between different schedule 
    tables.  
    CREQ-100   OS shall provide a service to start an explicitly synchronized schedule table 
    synchronously.  
    CREQ-152   OS shall provide a service to synchronize a schedule table with a synchronization 
    counter.  
    CREQ-25  
    OS shall provide a service to stop synchronization of a schedule table.  
    CREQ-108   OS shall provide a service to query the state of a schedule table.  
    CREQ-36  
    OS shall provide a mechanism to coordinate concurrent access to shared resources.  
    CREQ-56  
    OS shall provide a service to acquire a resource.  
    CREQ-107   OS shall provide a service to release a resource.  
    CREQ-163   OS shall provide a service to declare a resource.  
    CREQ-17  
    OS shall provide a service to acquire a spinlock.  
    CREQ-139   OS shall provide a service to asynchronously acquire a spinlock.  
    CREQ-167   OS shall provide a service to release a spinlock.  
    CREQ-172   OS shall provide a service to determine the application ID to which the current 
    execution context was configured.  
    CREQ-60  
    OS shall provide a service to determine the application ID in which the current 
    execution context is executed.  
    CREQ-114   OS shall provide a service to make an application accessible.  
    CREQ-109   OS shall provide a service to identify accessibility of OS objects .  
    CREQ-18  
    OS shall provide a service to identify object ownership.  
    CREQ-110   OS shall provide a service to terminate an application.  
    2018 Vector Informatik GmbH 
    1.0 
    52 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-170   OS shall provide restart tasks.  
    CREQ-104   OS shall provide a service to get the state of a given application.  
    CREQ-34  
    OS shall provide a service to call exported services from trusted applications.  
    CREQ-
    OS shall allow usage of exported services from trusted applications before start of 
    115372  
    the OS.  
    CREQ-
    OS shall provide a service to call exported services from non-trusted applications.  
    105586  
    CREQ-
    OS shall allow usage of exported services from non-trusted applications before start 
    105587  
    of the OS.  
    CREQ-48  
    OS shall provide an application specific callback during OS startup.  
    CREQ-76  
    OS shall provide an application specific callback during OS shutdown.  
    CREQ-54  
    OS shall provide an application specific callback if an error occurs.  
    CREQ-73  
    OS shall provide a service to return the access rights of a memory access of a task.  
    CREQ-13  
    OS shall provide a service to return the access rights of a memory access of a 
    category 2 ISR.  
    CREQ-49  
    OS shall provide execution time protection.  
    CREQ-85  
    OS shall provide inter-arrival time protection.  
    CREQ-31  
    OS shall provide locking time protection.  
    CREQ-845   OS shall monitor execution times.  
    CREQ-846   OS shall monitor inter arrival time frames.  
    CREQ-847   OS shall monitor locking times.  
    CREQ-35  
    OS shall provide a service to modify a value in a peripheral region.  
    CREQ-79  
    OS shall provide a service to read a value from a peripheral region.  
    CREQ-145   OS shall provide a service to write a value in a peripheral region.  
    CREQ-
    OS shall allow usage of services for peripheral regions before start of the OS.  
    115373  
    CREQ-26  
    OS shall be able to call a global callback function if an error occurs.  
    CREQ-38  
    OS shall be able to call a global callback function if a fatal error occurs  
    CREQ-97  
    OS shall provide a service to all configured error callbacks, which return the 
    parameters of the system service which triggered error handling.  
    CREQ-23  
    OS shall provide a service to all configured error callbacks, which returns the service 
    identifier where the error has been risen.  
    CREQ-102   OS shall provide information to determine the service and the cause of a reported 
    error.  
    CREQ-
    OS shall provide a service, which writes the context of the thread to which the 
    129663  
    system returns after error handling.  
    CREQ-
    OS shall provide a service, which returns the context of the thread which triggered a 
    129664  
    fatal error.  
    CREQ-70  
    OS shall provide a service to forcibly terminate a task.  
    CREQ-21  
    OS shall provide a service to forcibly terminate a category 2 ISR.  
    CREQ-168   OS shall provide a service to select the idle mode action.  
    CREQ-150   OS shall provide a service to write data to an unqueued IOC channel.  
    2018 Vector Informatik GmbH 
    1.0 
    53 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-55  
    OS shall provide a service to read data from a unqueued IOC channel.  
    CREQ-91  
    OS shall provide a service to send data to a queued IOC channel.  
    CREQ-160   OS shall provide a service to receive data from a queued IOC channel.  
    CREQ-90  
    OS shall provide a service to write multiple data to an unqueued IOC channel.  
    CREQ-147   OS shall provide a service to read multiple data from an unqueued IOC channel.  
    CREQ-119   OS shall provide a service to send multiple data to a queued IOC channel.  
    CREQ-113   OS shall service a method to receive multiple data from a queued IOC channel.  
    CREQ-128   OS shall provide a service to clear all data from a queued IOC channel.  
    CREQ-141   OS shall be able to call a callback function upon IOC data reception.  
    CREQ-149   OS shall provide a service to identify the local core.  
    CREQ-148   OS shall provide a service to get the number of cores controlled by OS.  
    CREQ-37  
    OS shall provide a service to start a core for usage of AUTOSAR OS software.  
    CREQ-120   OS shall provide a service to start a core for usage of non AUTOSAR OS software.  
    CREQ-
    OS shall be able to initialize itself and the hareware on any of the available cores.  
    115996  
    CREQ-
    OS shall provide a callback for signalling a task activation.  
    115010  
    CREQ-
    OS shall provide a callback for signalling the setting of an event.  
    115028  
    CREQ-
    OS shall provide a callback for signalling a thread switch.  
    115029  
    CREQ-
    OS shall provide a callback for signalling forcible termination of a thread.  
    115030  
    CREQ-
    OS shall provide a callback for signalling the acquirement of a resource.  
    115031  
    CREQ-
    OS shall provide a callback for signalling the release of a resource.  
    115032  
    CREQ-
    OS shall provide a callback for signalling the attempt to acquire a spinlock.  
    115033  
    CREQ-
    OS shall provide a callback for signalling the acquirement of a spinlock  
    115034  
    CREQ-
    OS shall provide a callback for signalling the release of a spinlock.  
    115035  
    CREQ-
    OS shall provide a callback for signalling the attempt to internally acquire a spinlock.  
    115036  
    CREQ-
    OS shall provide a callback for signalling the internal acquirement of a spinlock  
    115037  
    CREQ-
    OS shall provide a callback for signalling the internal release of a spinlock.  
    115038  
    CREQ-
    OS shall provide a callback for signalling the locking of interrupts.  
    115039  
    CREQ-
    OS shall provide a callback for signalling the release of an interrupt lock.  
    115040  
    2018 Vector Informatik GmbH 
    1.0 
    54 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-
    OS shall provide a callback for signalling failed task activation because the number 
    140268  
    of activations exceeds the limit.  
    CREQ-
    OS shall provide a callback for signalling that event is already set when WaitEvent is 
    140269  
    called.  
     
    17.2 Configuration constraints 
    SMI-378 
    The user of MICROSAR Safe shall configure and verify the extended OS status of APIs. 
    The attribute /MICROSAR/Os_Core/Os/OsOs/OsStatus shall equal to EXTENDED
    The OS safety measures rely on the validity checks defined for EXTENDED status of OS 
    API calls. Without these checks invalid calls might destroy the system integrity and violate 
    safety requirements. Ensuring the validity of API calls and arguments in STANDARD 
    status for any caller (which e.g. might be QM software) is considered to be infeasible. 
    SMI-377 
    The user of MICROSAR Safe shall configure and verify the service protection. 
    The attribute /MICROSAR/Os_Core/Os/OsOs/OsServiceProtection shall equal to TRUE
    The OS safety measures rely on the validity checks defined for OsServiceProtection 
    enabled. Without these checks API invalid calls might destroy the system integrity and 
    violate safety requirements. Ensuring the validity of API calls with 
    OsServiceProtectiondisabled for any caller (which e.g. might be QM software) is 
    considered to be infeasible. 
    SMI-379 
    The user of MICROSAR Safe shall configure and verify the scalability class 3 or 4. 
    The attribute /MICROSAR/Os_Core/Os/OsOs/OsScalabilityClass shall equal to SC3 or 
    SC4
    The OS safety measures rely on memory protection and service protection provided by the 
    scalability classes SC3 and SC4. Without memory protection, all software parts (even QM 
    parts) would have to ensure freedom from interference regarding memory (including 
    absence of stack overflow). Without service protection, all software parts (even QM parts) 
    would have to ensure only calls with valid access rights. 
    SMI-385 
    The user of MICROSAR Safe shall not use ISRs of category 1 if timing protection is 
    configured. 
    If a thread is killed because of timing protection, ISRs of category 1 might be aborted. 
    A possible workaround is using ISRs of category 2 instead of category 1. 
    2018 Vector Informatik GmbH 
    1.0 
    55 / 103 


    Safety Manual CBD1601056 D05 
    17.3 Additional verification measures 
    SMI-380 
    The user of MICROSAR Safe shall ensure the correct usage of the OS regarding program 
    flow. The correct program flow is ensured only if all OS API functions are correctly used 
    according to the AUTOSAR OS specification, according to the technical reference and 
    according to the requirements of the user application. 
    SMI-3732 
    The user of MICROSAR Safe shall ensure the correct usage of the hardware. 
    It is assumed that user software uses the microcontroller exactly as specified in the 
    vendors hardware documentation. 
    SMI-383 
    The user of MICROSAR Safe shall not call OS hook functions. The OS hook functions 
    shall be called by the OS only. This applies to the following hook functions: 
    o  StartupHook 
    o  ShutdownHook 
    o  ProtectionHook 
    o  PreTaskHook 
    o  PostTaskHook 
    o  ErrorHook 
    The OS makes assumptions which are valid if these hook functions are called by the OS 
    (e.g. set a hook context). These assumptions might be violated if the hook functions are 
    called directly by the user. As a hook may expect, that it is called within a specific context, 
    hooks shall not be called from directly from user code. 
    SMI-1047 
    The user of MICROSAR Safe shall ensure that the context definition as described in the 
    Technical Reference is complete for his application. Only this context is preserved on 
    context switches. 
    SMI-100816 
    The user of MICROSAR Safe shall verify that the processor state bits controlled by the 
    user are correctly set. This especially applies in case of forcible termination. 
    17.3.1 Interrupt handling 
    SMI-381 
    The user of MICROSAR Safe shall ensure the correct usage of the OS regarding interrupt 
    disabling. Unintended disabling of interrupts may lead to timing inconsistency because 
    pending interrupts might be delayed.  
    2018 Vector Informatik GmbH 
    1.0 
    56 / 103 


    Safety Manual CBD1601056 D05 
    The following interrupt disabling API functions shall be used correct according to the 
    AUTOSAR OS specification and according to the requirements of the user application, 
    otherwise the correct functionality is not ensured: 
    o  DisableAllInterrupts 
    o  SuspendAllInterrupts 
    o  SuspendOSInterrupts 
    o  DisableLevel 
    SMI-382 
    The user of MICROSAR Safe shall ensure the correct usage of the OS regarding interrupt 
    enabling. Unintended enabling of interrupts may lead to timing inconsistency (because 
    interrupts might occur which should be disabled) and data inconsistency (see also SMI-
    11). The user shall ensure that timing inconsistencies are detected or avoided.  
    The following interrupt enabling API functions shall be used correct according to the 
    AUTOSAR OS specification and according to the requirements of the user application, 
    otherwise the correct functionality is not ensured: 
    o  EnableAllInterrupts 
    o  ResumeAllInterrupts 
    o  ResumeOSInterrupts 
    o  EnableLevel 
    SMI-482 
    The user of MICROSAR Safe shall verify that API functions DisableLevelEnableLevel
    DisableGlobal and EnableGlobal are never called in the following cases: 
    o  if interrupts are disabled 
    o  within critical sections 
    o  nested within other interrupt APIs 
    o  within interrupt resources 
    o  within interrupt locking spinlocks 
    o  within ISRs, Hook functions, non-trusted functions, trusted functions and alarm 
    callbacks 
    SMI-488 
    The user of MICROSAR Safe shall verify that the following API functions are called from 
    privileged mode only: 
    2018 Vector Informatik GmbH 
    1.0 
    57 / 103 


    Safety Manual CBD1601056 D05 
    o  DisableLevelKM 
    o  EnableLevelKM 
    o  DisableGlobalKM 
    o  EnableGlobalKM 
    SMI-489 
    The user of MICROSAR Safe shall verify that the API function EnableGlobal is called only 
    if interrupts are disabled before by call of DisableGlobal
    SMI-490 
    The user of MICROSAR Safe shall verify that the API function EnableLevel is called only if 
    interrupts are disabled before by call of DisableLevel.  
    SMI-44677 
    The user of MICROSAR Safe shall verify that all APIs called in ISRs of category 0 are 
    allowed to be called in this context by the AUTOSAR specification or technical reference. 
    ISRs of category 0 are transparent to the OS. Therefore the call context „inside category 0 
    ISR“ cannot be checked by the API functions. Erroneous calls are not detected. 
    SMI-590 
    The user of MICROSAR Safe shall verify that all APIs called in ISRs of category 1 are 
    allowed to be called in this context by the AUTOSAR specification or technical reference. 
    ISRs of category 1 are transparent to the OS. Therefore the call context „inside category 1 
    ISR“ cannot be checked by the API functions. Erroneous calls are not detected. 
    SMI-44676 
    The user of MICROSAR Safe shall verify that all ISRs of category 0 are implemented 
    transparent with respect to the processor state (including bits controlled by the user) for 
    the interrupted code. This includes core registers, MPU settings and the current interrupt 
    priority. 
    SMI-541 
    The user of MICROSAR Safe shall verify that all ISRs of category 1 are implemented 
    transparent with respect to the processor state (including bits controlled by the user) for 
    the interrupted code. This includes core registers, MPU settings and the current interrupt 
    priority. 
    SMI-491 
    The user of MICROSAR Safe shall verify the functionality of each configured ISR.  
    This includes the correct call of the ISR handler with the correct priority (level) as well as 
    enabling, disabling, reading the enable state, reading the pending state and clearing of the 
    pending information of the corresponding ISR sources. 
    SMI-44675 
    2018 Vector Informatik GmbH 
    1.0 
    58 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall be aware that category 0 ISRs can be interrupted by 
    the OS in case of ECC violations. 
    In case that ECC violations are handled by the MICROSAR OS, the ProtectionHook is 
    called for ECC violations. 
    The protection handling can be interrupted by a category 0 ISR. This also applies if the 
    protection handling was triggerd by the same category 0 ISR. 
    If the protection reaction is terminate Task, ISR or Application the category 0 ISR will be 
    terminated by the OS, as well. 
    SMI-44678 
    The user of MICROSAR Safe shall be aware that category 1 ISRs can be interrupted by 
    the OS in case of ECC violations. 
    In case that ECC violations are handled by the MICROSAR OS, the ProtectionHook is 
    called for ECC violations. 
    If the protection reaction is terminate Task, ISR or Application the category 1 ISR will be 
    terminated by the OS, as well. 
    SMI-44680 
    The user of MICROSAR Safe shall be aware that category 0 ISRs can be interrupted by 
    the OS in case of exceptions. 
    In case that unhandled or handled exceptions are managed by the MICROSAR OS, the 
    ProtectionHook is called. 
    The protection handling can be interrupted by a category 0 ISR. This also applies if the 
    protection handling was triggerd by the same category 0 ISR. 
    If the protection reaction is terminate Task, ISR or Application the category 0 ISR will be 
    terminated by the OS, as well. 
    SMI-44681 
    The user of MICROSAR Safe shall be aware that category 0 ISRs cannot be disabled or 
    suspended by the OS interrupt APIs. 
    The following APIs have no effect on category 0 ISRs: 
    o  DisableAllInterrupts 
    o  EnableAllInterrupts 
    o  SuspendAllInterrupts 
    o  ResumeAllInterrupts 
    o  SuspendOSInterrupts 
    o  ResumeOSInterrupts 
    o  Os_DisableLevelAM 
    o  Os_EnableLevelAM 
    o  Os_DisableLevelKM 
    o  Os_EnableLevelKM 
    2018 Vector Informatik GmbH 
    1.0 
    59 / 103 


    Safety Manual CBD1601056 D05 
    o  Os_DisableLevelUM 
    o  Os_EnableLevelUM 
    o  Os_DisableGlobalAM 
    o  Os_EnableGlobalAM 
    o  Os_DisableGlobalKM 
    o  Os_EnableGlobalKM 
    o  Os_DisableGlobalUM 
    o  Os_EnableGlobalUM 
    17.3.2 Memory mapping and linking 
    SMI-340 
    The user of MICROSAR Safe shall verify that the complete range specified by each 
    Os_PeripheralConfigType object in Os_Peripheral_Lcfg.c is either part of the writable 
    address space or that there are no write accesses to that region via the Peripheral API. 
    The first writable address is denoted as AddressStart and the last writable address is 
    denoted as AddressEnd
    If the addresses do not fit the intended/configured addresses, illegal write accesses would 
    be possible. 
    SMI-494 
    The user of MICROSAR Safe shall verify for IOC functions that the configured access 
    rights and linker configuration allow only valid callers to write the corresponding IOC data. 
    SMI-495 
    The user of MICROSAR Safe shall ensure by linkage for each optimized spinlock that only 
    intended tasks and ISRs have write access to the corresponding spinlock data (or at least 
    only tasks and ISRs of partitions with the same ASIL levels). 
    The user of MICROSAR Safe shall verify that no unintended task or ISR has access to 
    data of optimized spinlocks. 
    SMI-539 
    The user of MICROSAR Safe shall verify that none of the configured MPU regions allows 
    write access to OS variables from non-trusted software. 
    SMI-549 
    The user of MICROSAR Safe shall verify the linkage of stack sections and MPU 
    configuration that none of the configured MPU regions grants write access to any OS 
    stack. 
    The MPU setting for stacks is internally done by the OS and granting write access might 
    prevent from memory protection of stacks. 
    2018 Vector Informatik GmbH 
    1.0 
    60 / 103 


    Safety Manual CBD1601056 D05 
    SMI-1044 
    The user of MICROSAR Safe shall verify that additional configured MPU regions shall 
    never overlap with any OS stack sections. 
    Overlapping MPU regions might provide illegal write access to OS stack sections. By using 
    an OS generated linker command file (see technical reference) it is assured that the OS 
    stacks are linked consecutively into the RAM. 
    SMI-1045 
    The user of MICROSAR Safe shall verify that the linkage scheme includes a stack safety 
    gap linked adjacent to the stack section (in dependency of the stack growth direction, see 
    technical reference). No software parts shall have write access to the stack safety gap. 
    This measure enables to detect stack overflows by MPU even if the owner of the stack has 
    also write access to data linked adjacent to the stack section. 
    SMI-562 
    The user of MICROSAR Safe shall verify that all user data are linked into the intended 
    sections. 
    SMI-564 
    The user of MICROSAR Safe shall verify the configuration of access rights to sections. 
    Software with lower diagnostic coverage shall not be able to destroy data of software with 
    higher diagnostic coverage. This applies to memory access within one core as well as 
    memory access across cores. 
    See Technical Reference, chapter "Memory Protection" for details. 
    Note that OSApplications do not need access to other OS Applications memory. 
    SMI-109809 
    The user of MICROSAR Safe shall ensure that the whole OS code is linked within OS start 
    and end code labels. 
    17.3.3 Stack 
    SMI-565 
    The user of MICROSAR Safe shall ensure that sufficient stack is available for 
    call/execution of StartOS. 
    StartOS performs some initializations before switching to an internal stack and enabling 
    the memory protection. The active stack at call of StartOS shall provide sufficient space to 
    execute this code. Because the stack consumtion is depending on compiler and compiler 
    options it is recommended to switch to a stack provided by the OS before calling StartOS 
    and to use the stack usage measurement API of the OS to determine the necessary stack 
    size. 
    SMI-4452 
    If the attribute /MICROSAR/Os/OsOS/OsGenerateMemMap is equal to 
    USERCODE_AND_STACKS_GROUPED_PER_CORE, the user of MICROSAR Safe shall 
    2018 Vector Informatik GmbH 
    1.0 
    61 / 103 


    Safety Manual CBD1601056 D05 
    ensure that all configured stack sizes match the MPU granularity and alignment. Otherwise 
    stack protection cannot be ensured. 
    17.3.4 Multicore systems with mixed diagnostic coverage capability 
    SMI-592 
    The user of MICROSAR Safe shall verify that software with higher diagnostic coverage 
    does not rely on the results of APIs with lower diagnostic coverage. 
    Note that only APIs listed in section "Safety Features" provide functionality on ASIL level.  
    SMI-483 
    The user of MICROSAR Safe shall ensure that cross core API calls with high frequency 
    from cores with lower diagnostic coverage to cores with higher diagnostic coverage do not 
    interfere with the requirements. Excessive runtime consumption of cores with lower 
    diagnostic coverage shall not prevent cores with higher diagnostic coverage form keeping 
    the timing constraints.  
    One possible measure is using timing protection. 
    SMI-484 
    The user of MICROSAR Safe shall ensure that synchronous cross core API calls from a 
    core with higher diagnostic coverage to a core with lower diagnostic coverage do not 
    violate the safety goals if the API calls never return. 
    Synchronous calls block the caller until the return result is received. If for any reason a 
    core with lower diagnostic coverage does not return the result or does not return the result 
    in time, the caller has to deal with this situation. 
    SMI-485 
    The user of MICROSAR Safe shall call ShutdownAllCores only on cores with the highest 
    diagnostic coverage. 
    SMI-486 
    The user of MICROSAR Safe shall note that the ShutdownHook might not be called on 
    Shutdown for multicore systems with mixed diagnostic coverage capability. 
    Errors caused by cores of lower diagnostic coverage (data overwrite) might prevent the 
    call of ShutdownHook by cores with higher diagnostic coverage. 
    SMI-487 
    The user of MICROSAR Safe shall configure and verify that the core with the highest 
    diagnostic coverage initializes the peripheral moduls used by the OS (e.g. MPU, Interrupt 
    Controller). 
    The attribute /MICROSAR/Os/OsOS/OsHardwareInitCore shall be set to the core 
    reference with the highest diagnostic coverage. 
    The user of MICROSAR Safe shall ensure that if a core with lower diagnostic coverage 
    initializes peripherals or hardware components (like e.g. a system MPU), the core with 
    higher diagnostic coverage does not rely on this initialization. 
    SMI-493 
    2018 Vector Informatik GmbH 
    1.0 
    62 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall verify that the configuration of cross core API calls 
    prevents cores with lower diagnostic coverage from shutdown of cores with higher 
    diagnostic coverage. 
    SMI-25766 
    The user of MICROSAR Safe shall ensure that receiver core of cross core API calls is able 
    to handle unintended calls of APIs. This applies only to APIs which are allowed to be called 
    between two cores by configuration. 
    17.3.5 (Non-)Trusted Functions 
    SMI-497 
    The user of MICROSAR Safe shall verify that if a trusted or non-trusted function uses the 
    passed argument, the trusted function validates these data before usage to prevent from 
    any violation of safety goals. The caller of CallTrustedFunction or 
    Os_CallNonTrustedFunction and therefore the passed data might be non-trusted. 
    SMI-542 
    The user of MICROSAR Safe shall verify that each caller of a trusted or non-trusted 
    function is allowed to call the function, or the function validates the caller before performing 
    its functionality to prevent from any violation of safety goals. 
    SMI-95699 
    The user of MICROSAR Safe shall verify that the caller Task/ISR of each trusted or non-
    trusted function which is using FPU, is configured to use the FPU context. 
    17.3.6 Miscellaneous 
    SMI-480 
    The user of MICROSAR Safe shall not rely on the error parameter macros (starting with 
    Os_ErrorGetParameter_...). 
    They are not assumed as safety features by Vector. 
    SMI-481 
    The user of MICROSAR Safe shall notify that the PanicHook might not be called if the 
    active thread is not allowed to modify the interrupt enable/disable state.  
    Before calling the PanicHook the OS disables all interrupts. If this fails, the ProtectionHook 
    might be called, caused by the illegal access (depending on hardware platform). 
    SMI-492 
    The user of MICROSAR Safe shall verify for cross core API calls that for each pair of 
    sender/receiver cores at least one API call is tested and verified across these cores. 
    SMI-496 
    The user of MICROSAR Safe shall verify that calls of the optimized spinlock API don’t 
    violate any of the spinlock API constraints (e.g. the order of locking). The optimized 
    spinlock API skips any checks and therefore does not prevent from wrong calls. 
    SMI-538 
    2018 Vector Informatik GmbH 
    1.0 
    63 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall verify that the context described in the Hardware 
    Software Interface (HSI) of the used platform is sufficient for the requirements his 
    application. 
    SMI-591 
    The user of MICROSAR Safe shall verify the correct usage of IOC API functions. Some of 
    these functions don’t call the ErrorHook if the called function does not return a valid result. 
    It is recommended to check the return code of these functions:  
    o  IocSend/IocWrite 
    o  IocSendGroup/IocWriteGroup 
    o  IocReceive/IocRead 
    o  IocReceiveGroup/IocReadGroup 
    SMI-109842 
    The user of MICROSAR Safe shall be aware that if spinlocks are used by an IOC channel, 
    they are not released if the communicating task or ISR is terminated via protection hook. 
    The operating system does not guarantee that calls to the IOC API for channels that have 
    blocked spinlocks will return. 
    Spinlocks in IOC APIs are used e.g. if 
    o  An IOC channel is non-queued or 
    o  Multiple senders are configured for the same queued channel 
    SMI-540 
    The user of MICROSAR Safe shall verify that the user software does not contain system 
    call instructions. 
    Any system call instruction will result in an OS API or in an OS Error. If the user code 
    directly uses a system call instruction it is likely that the triggered OS API does not work as 
    expected. Instead, system calls shall only be used by using calls to OS APIs. 
    A possible verification method might be reviewing the code for (inline) assembler 
    statements, pragmas or intrinsic functions containing system call instructions. 
    SMI-2900 
    The user of MICROSAR Safe shall verify that the array OsCfg_CorePhysicalRefs contains 
    all physical cores. 
    For each existing physical hardware core identifier there shall be one corresponding entry 
    inside the array which is indexed by the physical hardware core identifier provided directly 
    by the hardware registers. 
    SMI-39288 
    The user of MICROSAR Safe shall verify that the array 
    OsCfg_Hal_Context_ExceptionContextRef contains all physical cores. 
    For each existing physical hardware core identifier, which is also an Autosar core, there 
    2018 Vector Informatik GmbH 
    1.0 
    64 / 103 


    Safety Manual CBD1601056 D05 
    shall be one corresponding entry (not NULL_PTR) inside the array which is indexed by the 
    physical hardware core identifier provided directly by the hardware registers. 
    SMI-44342 
    The user of MICROSAR Safe shall verify that peripheral APIs  
    o  Os_ReadPeripheral8Legacy 
    o  Os_ReadPeripheral16Legacy 
    o  Os_ReadPeripheral32Legacy 
    o  Os_WritePeripheral8Legacy 
    o  Os_WritePeripheral16Legacy 
    o  Os_WritePeripheral32Legacy 
    o  Os_ModifyPeripheral8Legacy 
    o  Os_ModifyPeripheral16Legacy 
    o  Os_ModifyPeripheral32Legacy 
    are not used on platforms with address width greater than 32 bits. 
    SMI-44679 
    The user shall ensure real time behavior of the system, even in case of delayed calls of 
    ProtectionHook
    ProtectionHook may be delayed by the execution of Cat 0 ISRs. 
    SMI-109810 
    The user of MICROSAR Safe shall be aware that in case that MICROSAR OS detects a 
    potentially internal inconsistency, MICROSAR OS enters the PanicHook. 
    17.3.7 Tracing 
    SMI-69754 
    The user of MICROSAR Safe shall be aware that user timing hook implementation 
    influences runtime behaviour of the system. 
    SMI-69755 
    The user of MICROSAR Safe shall not use any OS API within TimingHooks. 
    17.4 Safety features required from other components 
    This component does not require safety features from other components. 
    2018 Vector Informatik GmbH 
    1.0 
    65 / 103 


    Safety Manual CBD1601056 D05 
    17.5 Dependencies to hardware 
    The dependencies of this component to hardware is described in the platform specific part 
    of the Safety Manual. 
    2018 Vector Informatik GmbH 
    1.0 
    66 / 103 


    Safety Manual CBD1601056 D05 
    18 Safety Manual OS (RH850) 
    18.1 Safety features 
    No additional safety features are provided. 
    18.2 Configuration constraints 
    SMI-3167 
    The user of MICROSAR Safe shall enable software stack checks for RH850 derivatives 
    which are based on G3K core (e.g. RH850 F1L) in order to ensure stack protection also in 
    supervisor mode as monitoring by MPU in supervisor mode is not supported. 
    18.3 Additional verification measures 
    SMI-3310 
    The user of MICROSAR Safe shall verify the PIT timer configuration of type 
    Os_Hal_TimerPitConfigType in Os_Hal_Timer_Lcfg.c for its correctness. 
    If the OSTM unit <X> (0,1,2,3,5) is configured, the following attributes must be generated 
    as follows: 
    Timer Base Address = OS_HAL_TIMER_OSTM<X>_BASE 
    Timer Hardware Type = OS_HAL_TIMER_OSTM 
    Timer Channel Index = OS_HAL_TIMER_CH0 
    If the TAUJ unit <X> (0,1,2,3) channel <Y> (0,1,2,3) is configured, the following attributes 
    must be generated as follows: 
    Timer Base Address = OS_HAL_TIMER_TAUJ<X>_BASE 
    Timer Hardware Type = OS_HAL_TIMER_TAUJ 
    Timer Channel Index = OS_HAL_TIMER_CH<Y> 
    SMI-3311 
    The user of MICROSAR Safe shall verify the FRT timer configuration of type 
    Os_Hal_TimerFrtConfigType in Os_Hal_Timer_Lcfg.c for its correctness. 
    If the OSTM unit <X> (0,1,2,3,5) is configured, the following attributes must be generated 
    as follows: 
    Timer Base Address = OS_HAL_TIMER_OSTM<X>_BASE 
    Timer Hardware Type = OS_HAL_TIMER_OSTM 
    Timer Channel Index = OS_HAL_TIMER_CH0 
    Timer Unit Index = OS_HAL_TIMER_OSTM<X> 
    If the STM unit <X> (0,1) channel <Y> (1,2,3) is configured, the following attributes must 
    be generated as follows: 
    Timer Base Address = OS_HAL_TIMER_STM<X>_BASE 
    Timer Hardware Type = OS_HAL_TIMER_STM 
    Timer Channel Index = OS_HAL_TIMER_CH<Y> 
    Timer Unit Index = OS_HAL_TIMER_STM<X> 
    2018 Vector Informatik GmbH 
    1.0 
    67 / 103 


    Safety Manual CBD1601056 D05 
    18.4 Safety features required from other components 
    No additional safety features are required from other components. 
    18.5 Dependencies to hardware 
    The following Safety Applications Notes (SAN) have been taken into consideration: 
    o  RH850/P1M Safety Application Note R01AN2118EJ0300 Rev.3.00 Mar 29, 2017 
    o  RH850/F1L Safety Application Note R01AN2152EJ0211 Rev.2.11 October 17, 2016 
    o  RH850/F1H Safety Application Note R01AN2886EJ0110 Rev.1.10 July 27, 2016 
    o  RH850/F1K Safety Application Note R01AN3578EJ0100 Rev.1.00 Dec 22, 2016 
    o  RH850/D1L/D1M Safety Application Note LLWEB-10000950 Rev.2.00 Dec 1, 2016 
    This OS does not implement any recommended usage from safety application notes 
    except for the memory protecion unit (SAN-P1x-0405, SAN-F1L-2201, SAN-F1H-2201, 
    SAN-F1K2M-0190, SAN-D1x-1801). This implementation does not cover a software test 
    procedure at startup to confirm the operation of the MPU as described by SAN-F1L-2201, 
    SAN-F1H-2201, SAN-F1K2M-0190 and SAN-D1x-1801. 
    It is assumed that the recommended usage related to OS functionality are related to latent 
    faults only and ASIL D is still achievable without implementation of the recommended 
    usage by the OS. Such implementation would cause significant runtime overhead. 
    SMI-3168 
    The user of MICROSAR Safe has to consider DMA controller usage if the used RH850 
    derivative incorporates a DMA controller (DMAC). 
    The DMA controller has direct access to the data bus. Therefore DMA access to memory 
    is not controlled by MPU protection. 
    2018 Vector Informatik GmbH 
    1.0 
    68 / 103 


    Safety Manual CBD1601056 D05 
    19 Safety Manual PduR 
    19.1 Safety features 
    This component does not provide safety features. 
    19.2 Configuration constraints 
    The user of MICROSAR Safe shall configure the following parameters: 
    o  /MICROSAR/PduR/PduRGeneral/PduR_QueueOverflowNotification to FALSE 
    This setting is enforced by a MSSV plugin. 
    19.3 Additional verification measures 
    This component does not require additional verification measures. 
    19.4 Safety features required from other components 
    This component does not require safety features from other components. 
    19.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    69 / 103 


    Safety Manual CBD1601056 D05 
    20 Safety Manual Rte 
    20.1 Safety features 
    SMI-323 
    This component provides the following safety features: 
    ID  
    Safety feature  
    CREQ-
    Rte shall provide a service to initiate the transmission of data elements with last-is-best 
    1024  
    semantic for explicit S/R communication.  
    CREQ-
    Rte shall provide a service to copy the received data element to a buffer with last-is-
    1021  
    best semantic for explicit S/R communication.  
    CREQ-
    Rte shall provide a service to get the value of the received data element with last-is-
    1022  
    best semantic for explicit S/R communication.  
    CREQ-
    Rte shall provide a service to read a data element for implicit S/R communication.  
    1031  
    CREQ-
    Rte shall provide a service to write a data element for implicit S/R communication.  
    1029  
    CREQ-
    Rte shall provide a service to get the reference of a data element to be written for 
    1041  
    implicit S/R communication.  
    CREQ-
    Rte shall provide a service to get the status of a data element for implicit S/R 
    1037  
    communication.  
    CREQ-
    Rte shall provide a service to access the update flag for a data element for explicit S/R 
    1033  
    communication.  
    CREQ-
    Rte shall provide a "Never-received" status of a data element for S/R communication.  
    1036  
    CREQ-
    Rte shall provide a service to initiate the transmission of a data element with queued 
    1023  
    semantic for explicit S/R communication.  
    CREQ-
    Rte shall provide a service to initiate the reception of a data element with queued 
    1025  
    semantic for explicit S/R communication.  
    CREQ-
    Rte shall provide a service to initiate a client-server communication.  
    1042  
    CREQ-
    Rte shall provide a service to get the result of an asynchronous client-server call.  
    1043  
    CREQ-
    Rte shall provide mode management.  
    1109  
    CREQ-
    Rte shall provide a service to get the currently active mode.  
    1055  
    CREQ-
    Rte shall provide a service to get the currently active, previous and next mode.  
    1052  
    CREQ-
    Rte shall provide a service to initiate a mode switch.  
    1053  
    CREQ-
    Rte shall provide Nv data communication.  
    1299  
    CREQ-
    Rte shall provide a callback to copy data from a NVM buffer to RTE.  
    2018 Vector Informatik GmbH 
    1.0 
    70 / 103 


    Safety Manual CBD1601056 D05 
    1150  
    CREQ-
    Rte shall provide a callback to copy data from RTE to a NVM buffer.  
    1148  
    CREQ-
    Rte shall provide a callback to get notified about a finished NVM job.  
    1144  
    CREQ-
    Rte shall provide a callback to get notified about a requested mirror initialization.  
    1147  
    CREQ-
    Rte shall provide a service to read Inter-Runnable Variables with explicit behavior.  
    1046  
    CREQ-
    Rte shall provide a service to write Inter-Runnable Variables with explicit behavior.  
    1048  
    CREQ-
    Rte shall provide a service to read Inter-Runnable Variables with implicit behavior.  
    1047  
    CREQ-
    Rte shall provide a service to write Inter-Runnable Variables with implicit behavior.  
    1044  
    CREQ-
    Rte shall provide a service to access per-instance memory.  
    1045  
    CREQ-
    Rte shall provide a service to enter an exclusive area.  
    1051  
    CREQ-
    Rte shall provide a service to leave an exclusive area.  
    1050  
    CREQ-
    Rte's Basic Software Scheduler shall provide a service to enter an exclusive area of a 
    1056  
    BSW Module.  
    CREQ-
    Rte's Basic Software Scheduler shall provide a service to leave an exclusive area of a 
    1049  
    BSW Module.  
    CREQ-
    Rte shall provide a service to access internal calibration parameters.  
    1068  
    CREQ-
    Rte shall provide a service to access calibration parameters accessible via ports.  
    1075  
    CREQ-
    Rte shall provide a service to initialize itself.  
    1059  
    CREQ-
    Rte's Basic Software Scheduler shall provide a service to initialize itself.  
    1073  
    CREQ-
    Rte shall provide a service to trigger executable entities.  
    1161  
    CREQ-
    Rte shall use schedule points to invoke the scheduler of the OS.  
    1165  
    CREQ-
    Rte shall provide the event handling of TimingEvents to trigger a runnable.  
    1129  
    CREQ-
    Rte shall provide the event handling of SwcModeSwitchEvents to trigger a runnable.  
    1112  
    CREQ-
    Rte shall provide the event handling of AsynchronousServerCallReturnsEvents to 
    1124  
    trigger a runnable.  
    CREQ-
    Rte shall provide the event handling of OperationInvokedEvents to trigger a runnable.  
    1126  
    2018 Vector Informatik GmbH 
    1.0 
    71 / 103 


    Safety Manual CBD1601056 D05 
    CREQ-
    Rte shall provide the event handling of DataReceivedEvents to trigger a runnable.  
    1118  
    CREQ-
    Rte shall provide the event handling of ModeSwitchedAckEvents to trigger a runnable.  
    1132  
    CREQ-
    Rte shall provide the event handling of the InitEvents to trigger a runnable.  
    1114  
    CREQ-
    Rte shall provide the event handling of TimingEvents to trigger a schedulable entity.  
    1295  
    CREQ-
    Rte shall provide a "RTE_AND_SCHM_UNINIT" state.  
    1152  
    CREQ-
    Rte shall provide a "RTE_UNINT_SCHM_INIT" state.  
    1164  
    CREQ-
    Rte shall provide a "INIT" state.  
    1166  
     
    20.2 Configuration constraints 
    SMI-2066 
    The user of MICROSAR Safe shall disable online calibration and measurement 
    during series production.
     
    The RTE can be generated with online calibration and measurement enabled for series 
    production, but they shall be made inoperable for normal operation. Vector's XCP can e.g. 
    be disabled safely during runtime by ASIL software. 
    20.3 Additional verification measures 
    Please note that the RTE Generator and RTE Analyzer only implement measures to detect 
    systematic faults by the software. No measures are implemented to detect or mitigate 
    random faults on the computer used for generation. 
    SMI-322 
    The user of MICROSAR Safe shall execute the RTE Analyzer. 
    The RTE Analyzer performs checks to identify faults in the generated RTE. Especially out-
    of-bounds accesses within the RTE are detected. If RTE Analyzer reports a fault, the 
    generated RTE cannot be used. Moreover it provides the user of MICROSAR Safe with 
    feedback what was generated. This feedback shall be reviewed during integration testing 
    against the intended software design and its configuration. 
    Please see the Technical Reference of the RTE Analyzer how to execute it. 
    SMI-36067 
    The user of MICROSAR Safe shall ensure that the RTE Analyzer does not report 
    unsupported templates.
     
    2018 Vector Informatik GmbH 
    1.0 
    72 / 103 


    Safety Manual CBD1601056 D05 
    The generated RTE code is based on templates. The templates are instantiated by the 
    RTE Generator in different variants. The RTE Analyzer verifies that the analyzed template 
    variants have been tested during the development of the RTE Generator according to ISO 
    26262. 
    The last section of the RTE Analyzer configuration feedback report provides the 
    information about the template variants. 
    The report must show that no unsupported templates have been found. 
    20.3.1 Guided integration testing 
    Residual faults in the RTE Generator can only be found during integration testing. Vector 
    assumes that the user of MICROSAR Safe performs an integration testing and verification 
    of software safety requirements according to ISO 26262 Part 6 Clauses 10 and 11 (see 
    also SMI-4). To support this integration testing the RTE Analyzer produces a configuration 
    feedback report.  
    Please refer to the Technical Reference of the RTE Analyzer for a description of the 
    configuration feedback report. 
    The following subsections describe the requirements that must be fulfilled during 
    integration testing and verification of software safety requirements. 
    Each Safety Manual Item (SMI) is structured in the following way: 
    o  The requirement that must be fulfilled 
    o  Explanation of the requirement and a rationale 
    o  Recommended configuration constraints (optional) 
    o  Recommended means of complying with the requirement (optional) 
    o  Details on the information provided by the RTE Analyzer supporting this 
    requirement 
    20.3.1.1 BSW configuration 
    SMI-2124 
    The user of MICROSAR Safe shall ensure that the RTE and the operating system 
    assume the same scheduling properties.
     
    The scheduling properties of the RTE tasks depend on the configuration of the operating 
    system. The scheduling properties are e.g. preemptability, core assignment or task priority. 
    The RTE Analyzer lists the scheduling properties in the configuration feedback report to 
    assist in this integration step. The scheduling properties listed in the feedback report shall 
    be verified. 
    SMI-2129 
    2018 Vector Informatik GmbH 
    1.0 
    73 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall ensure that the assumptions of the operating 
    system and the RTE are the same with regards to the locking behavior of the 
    spinlocks.
     
    The RTE generator uses spinlocks from the operating system to protect inter-core 
    communication. Spinlocks must not be called concurrently on the same core. The 
    operating system optionally provides spinlocks that can prevent these concurrent 
    accesses on the same core. If this protection by the operating system is not used, the RTE 
    generator has to prevent concurrent calls to the spinlock APIs on the same core.  
    Verification can e.g. be performed by review of the configuration feedback report. 
    The RTE Analyzer lists spinlocks that are not protected by the RTE to assist in this 
    integration step. 
    SMI-684 
    The user of MICROSAR Safe shall ensure that the configuration of COM and RTE are 
    consistent.
     
    The interfaces to the COM that are used for signal reception use void pointers as 
    parameter. Inconsistencies between the configuration of the COM and the RTE might lead 
    to memory corruption by the COM. During integration the size assumptions between the 
    COM and the RTE shall be compared.  
    Verification can be performed by review of the generated configuration and/or static code 
    analysis. 
    The RTE Analyzer lists relevant calls to assist in this integration step. 
    The RTE Analyzer listing includes the number of written bytes for MICROSAR COM. 
    SMI-685 
    The user of MICROSAR Safe shall ensure that the configuration of NVM and RTE are 
    consistent.
     
    The interfaces to the NVM that are used to handle NV Block SWCs use void pointers as 
    parameters. Inconsistencies between the configuration of the NVM and the RTE might 
    lead to memory corruption by the RTE. During integration the size assumptions between 
    the NVM and the RTE shall be compared.  
    Verification can be performed by review of the generated configuration and/or static code 
    analysis. 
    The RTE Analyzer lists relevant calls to assist in this integration step. 
    20.3.1.2 Executable Entity Scheduling 
    SMI-2063 
    The user of MICROSAR Safe shall ensure that all safety-related executable entities 
    are triggered with their correct conditions.
     
    These conditions are: 
    2018 Vector Informatik GmbH 
    1.0 
    74 / 103 


    Safety Manual CBD1601056 D05 
    o  cylic triggers with cycle time and offset 
    o  init triggers 
    o  background triggers 
    o  triggers fired by RTE APIs 
    If triggers have a dependency on modes, the scheduling has to be verified for all modes. 
    Modes can be switched with the Rte_Switch API. 
    Triggers can be decoupled by the minimum start interval functionality and the data 
    reception filter functionality. 
    The scheduling of the executable entities also depends on the configuration of the 
    operating system, the used controller, other running tasks and interrupt service routines 
    and the resource usage of the entities that are implemented by the user. 
    Vector recommends not using the minimum start interval and the data reception filter 
    functionality for safety-related runnables. 
    Vector recommends not using background triggers for safety-related functionality. 
    Vector recommends using cyclic scheduling without mode dependencies and using of a 
    watchdog as safety mechanism for safety-related entities where possible. 
    Cyclic triggers are e.g. scheduled deterministically. Thus, an integration test verifying that 
    safety-related functionality is scheduled at the expected times may be sufficient. 
    The RTE Analyzer lists the executable entities of SWCs and the tasks in which they are 
    executed to assist in this integration step.  
    SMI-2128 
    The user of MICROSAR Safe shall ensure that reentrant runnables are reentrant. 
    Runnables can be called reentrantly from multiple tasks. Their implementation needs to 
    support this use case.  
    Verification can e.g. be performed by review, static code analysis and/or integration 
    testing. 
    The RTE Analyzer lists all runnables of SWCs that are called from concurrent tasks to 
    assist in this integration step. 
    Implicit exclusive areas and nonpreemptive tasks can be configured to prevent concurrent 
    execution. 
    SMI-2064 
    The user of MICROSAR Safe shall ensure that the timeouts configured for blocking 
    APIs that are used in safety-related executable entities are adequately addressed.
     
    If a timeout for a blocking API is used as a safety mechanism (E.g. no checkpoint with 
    deadline monitoring in the task), the user of MICROSAR Safe shall also ensure that the 
    timeout value is adequate. 
    Relevant timeouts are: 
    2018 Vector Informatik GmbH 
    1.0 
    75 / 103 


    Safety Manual CBD1601056 D05 
    o  timeouts of Rte_Call APIs 
    o  timeouts of Rte_Result APIs 
    o  timeouts of Rte_Receive APIs 
    o  timeouts of Rte_Feedback APIs 
    o  timeouts of Rte_SwitchAck APIs 
    The timeouts also depend on the configuration of the operating system, the used 
    controller, other running tasks and interrupt service routines and the resource usage of 
    entities that are implemented by the user. 
    Vector recommends not using blocking APIs in safety-related entities except for cross 
    partition client-/server communication. 
    Vector strongly recommends not using blocking APIs without timeout. 
    A review may be sufficient to verify that timeout handling is implemented properly by the 
    SWC. 
    If no other safety mechanism is in place, a test that the timeout is notified at the expected 
    time by the RTE can be used as means of verification. 
    The RTE Analyzer lists the blocking APIs of SWCs to assist in this integration step. 
    SMI-2122 
    The user of MICROSAR Safe shall ensure that the correct implementation method 
    has been chosen for every exclusive area.
     
    Exclusive areas can be used to ensure data consistency (see SMI-11). 
    The implementation depends on the requirements of the application and on other factors 
    like the expected duration of the exclusive area. Interrupt locks are typically faster than 
    resources but can only be used for short sequences due to the blocking of interrupts. 
    Operating system interrupts only block the interrupts of the operating system whereas all 
    interrupts blocks all interrupts. 
    Verification can e.g. be performed by review, static code analysis and/or integration 
    testing. 
    The RTE Analyzer lists the exclusive areas and their implementation method to assist in 
    this integration step. 
    20.3.1.3 SWC Communication 
    SMI-41492 
    The user of MICROSAR SafeBRE shall provide the RTE APIs for systems without 
    RTE.
     
    MICROSAR Basic Runtime Environment (BRE) only provides the BSW scheduler 
    functionality of the RTE and does not support application SWCs. The implementation of 
    the interface from the application to BSW modules must be developed according to ISO 
    2018 Vector Informatik GmbH 
    1.0 
    76 / 103 


    Safety Manual CBD1601056 D05 
    26262. The Technical References of the BSW modules as well as the AUTOSAR standard 
    define the semantics and APIs that will have to be implemented while integrating the BRE. 
    The RTE Analyzer does not assist in this integration step. 
    SMI-324, SMI-2065 and SMI-2123 do not apply to MICROSAR SafeBRE. 
    SMI-324 
    The user of MICROSAR Safe shall ensure that the connections between SWCs are 
    as intended.
     
    Many types of faults can lead to a mix of connections between SWCs. These are unlikely 
    and usually already addressed by straight forward integration testing. 
    The list of senders needs to be correct for every receiver and the subset of the received 
    data needs to be correct. 
    Vector recommends the following RTE subset for safety-related SWCs: 
    o  use only 1:1 or 1:N connections. 
    o  use the same datatype on both sides of a connection 
    o  avoid data conversion 
    Information that is used from non-safety-related SWCs has to be checked for plausibility. If 
    such a data path is found during integration this is an indicator that your safety analysis 
    has to be reconsidered. Please note that also other code in the same partition as the non-
    safety-related SWCs can corrupt the communication if freedom from interference with 
    regards to memory is not ensured. 
    Verification can be performed by review and/or an integration test testing the normal 
    operation. 
    The RTE Analyzer list the connections between SWCs to assist in this integration step. 
    SMI-2065 
    The user of MICROSAR Safe shall ensure that inter-ECU sender-/receiver and inter-
    ECU client-/server communication work as expected.
     
    This requires verification of: 
    o  data needs to be routed to the correct ECU by the underlying communication stack. 
    This includes 1:1, 1:N, N:1 and reception of partial signal data. 
    o  both ECUs need to use the same data representation (datatypes, endianness, 
    serialization) 
    Vector requires using E2E protection for safety-related signals. 
    Vector recommends using 1:1 connections. 
    Vector recommends always sending and receiving complete data elements. 
    2018 Vector Informatik GmbH 
    1.0 
    77 / 103 


    Safety Manual CBD1601056 D05 
    Integration testing on vehicle network level using fault-injection can be used. Vector 
    assumes that this is normally done to verify the effectiveness of the E2E protection. 
    The RTE Analyzer lists the APIs of SWCs with inter-ECU communication to assist in this 
    integration step. 
    SMI-2123 
    The user of MICROSAR Safe shall ensure that all connected SWCs expect the same 
    converted data.
     
    The RTE offers conversions that can be applied to specific connections. 
    Vector recommends not using data conversion for safety-related connections. 
    Verification can e.g. be performed by review or integration testing of all data conversions. 
    The RTE Analyzer lists all APIs of SWCs that perform data conversion to assist in this 
    integration step. 
    20.3.1.4 Usage of RTE Headers 
    SMI-2067 
    The user of MICROSAR Safe shall ensure that the defines and typedefs that are 
    generated by the RTE match the expectations of the SWCs that use them.
     
    Inconsistencies may lead to e.g, memory corruption when a runnable uses an RTE array 
    datatype within its implementation and writes beyond the bounds of this array. 
    Moreover, different SWCs may have different assumptions with regards to the meaning of 
    communicated values, e.g. if one SWC uses the symbolic name, another SWC the integral 
    value of an enumerated type. 
    The following code is provided: 
    o  Configured Application Error Defines for Client-/Server Communication 
    o  Configured AUTOSAR Datatypes 
    o  Configured Upper and Lower Limit Defines for Primitive Application Data Types 
    o  Configured Init Value Defines for Sender-/Receiver Communication 
    o  Configured InvalidValue Defines for Sender-/Receiver Communication 
    o  Configured Enumeration Defines for CompuMethods 
    o  Configured Mask Defines for CompuMethods 
    o  Configured Mode Defines for Mode Communication 
    o  Configured ActivationReasons 
    2018 Vector Informatik GmbH 
    1.0 
    78 / 103 


    Safety Manual CBD1601056 D05 
    The defines and typedefs are part of the Rte_Type.hRte_<SWC>.h and 
    Rte_<SWC>_Type.h headers. 
    Vector recommends using the headers generated by the RTE when a static code analysis 
    is performed on the application code. 
    Vector recommends only using the defines instead of the defined values in the code. 
    Vector recommends using the defines only when needed (Mode, Application Error 
    Defines). 
    Vector recommends reviewing the used defines for safety-related SWCs. 
    Vector recommends not using union types in the SWCs. 
    Verification for correct usage of datatypes may be performed by review and/or static code 
    analysis. Consistent usage of defines can be verified by review and/or integration testing 
    with all used values. 
    The RTE Analyzer verifies that all accesses within the RTE do not lead to memory 
    corruption. 
    SMI-2071 
    The user of MICROSAR Safe shall ensure that the indirect API is used consistently. 
    Indirect API functionality consists of the APIs: 
    o  Rte_Port 
    o  Rte_Ports 
    o  Rte_NPorts 
    The indirect API makes it possible to call different APIs through an array access. The 
    indirect API functionality can be enabled individually per port. 
    A wrong configuration switch can easily lead to a call outside of the array returned by the 
    Rte_Ports API. 
    Vector recommends not using the indirect API. 
    Verification can e.g. be performed by review that the intended APIs are returned. 
    The RTE Analyzer does not assist in this integration step. 
    20.3.1.5 Usage of RTE APIs 
    SMI-2072 
    The user of MICROSAR Safe shall ensure that the RTE and all of its users have the 
    same assumptions with regards to the sizes of the datatypes.
     
    The RTE supports the configuration of custom datatypes for its APIs. The RTE 
    specification mandates that arrays are passed as pointer to the array base type. 
    The RTE does not enforce that both sides of a connection use arrays of the same size. 
    2018 Vector Informatik GmbH 
    1.0 
    79 / 103 


    Safety Manual CBD1601056 D05 
    No NULL pointers or invalid pointers shall be passed to RTE APIs. 
    The object to which the pointer points needs to have at least the size of the pointer base 
    type. 
    Vector recommends using the headers generated by the RTE when static code analysis is 
    performed on the application code. 
    Vector recommends using the same datatypes on both sides of a connection. 
    Arrays and void pointers on interfaces where the called function writes to them are 
    considered especially relevant. 
    Verification can e.g. be performed by review and/or static code analysis. 
    The RTE Analyzer lists APIs and runnables that use such parameters to assist in this 
    integration step. 
    SMI-2073 
    The user of MICROSAR Safe shall ensure that RTE APIs are only called from their 
    configured contexts.
     
    Fast response times are crucial in embedded systems. Therefore, the RTE generator 
    analyzes the call contexts of all APIs in order to optimize away unneeded interrupt locks. 
    When the application calls the APIs from a different context than the RTE assumes, data 
    consistency problems may arise. 
    In systems with ASIL partitions, the RTE generator uses a conservative locking strategy. 
    Locks are only optimized away if all accesses are done within the same task. 
    Verification can e.g. be performed by review and/or static code analysis. 
    The RTE Analyzer lists the optimized APIs of SWCs to assist in this integration step. 
    The RTE Analyzer lists APIs that must not be called by the application because they are 
    considered unreachable due to the RTE configuration. 
    20.3.1.6 Configuration of RTE APIs 
    SMI-2074 
    The user of MICROSAR Safe shall ensure that the receivers can handle the initial 
    value provided by the RTE if no write or calibration occurred.
     
    For implicit accesses the user of MICROSAR Safe shall assure that the correct initial value 
    is sent when Rte_IWrite or Rte_IWriteRef were not called in the runnable. 
    Initial values can be configured for: 
    o  non-queued sender-/receiver communication 
    o  inter-runnable variables 
    o  mode ports  
    o  calibration parameters  
    2018 Vector Informatik GmbH 
    1.0 
    80 / 103 


    Safety Manual CBD1601056 D05 
    The initial value is returned when no sending API was called before the first read or no 
    calibration was performed before the first read. The initial values depend on the connected 
    components. 
    Vector recommends using the same initial value on all port data elements that are 
    connected with each other. 
    The RTE Analyzer lists all APIs of SWCs that may provide an initial value to assist in this 
    integration step. If possible, the RTE Analyzer reports the initial value generated by the 
    RTE into the configuration feedback report. 
    SMI-2075 
    The user of MICROSAR Safe shall ensure that the alive timeout by the COM is not 
    used for safety-related inter-ECU sender/receiver communication.
     
    Safety-related communication must be protected by E2E protection. The decision if new 
    data is available (alive) can only be made by the E2E mechanism. Data is not interpreted 
    by the COM. For example the sending ECU might repeat old data. This is only detected by 
    the cycle counter that is part of the E2E protection. 
    The RTE Analyzer lists the reading APIs that provide the alive timeout status to assist in 
    this integration step. 
    SMI-2126 
    The user of MICROSAR Safe shall ensure that SWCs handle the RTE_E_INVALID 
    return code properly.
     
    The RTE offers a functionality to invalidate signals. 
    Vector requires using end-to-end protection for safety-related inter-ECU communication. 
    Relying on the invalidation mechanism for safety-related signals is not an option. The user 
    of MICROSAR Safe shall not use invalidation for inter-ECU communication. 
    Verification can e.g. be performed by review and/or integration testing. 
    The RTE Analyzer lists RTE APIs that return the RTE_E_INVALID return code to assist in 
    this integration step. 
    SMI-2127 
    The user of MICROSAR Safe shall ensure that SWCs handle the 
    RTE_E_NEVER_RECEIVED
     return code properly. 
    The RTE offers a functionality to report if a signals was received after the ECU was 
    started. 
    Vector requires using end-to-end protection for safety-related signals. Relying on the never 
    received mechanism for safety-related signals is not an option. Especially, when using the 
    E2E transformer, its return value shall be evaluated. 
    Verification can e.g. be performed by review or integration testing. 
    2018 Vector Informatik GmbH 
    1.0 
    81 / 103 


    Safety Manual CBD1601056 D05 
    The RTE Analyzer lists RTE APIs that return the RTE_E_NEVER_RECEIVED return code 
    to assist in this integration step. 
    SMI-2125 
    The user of MICROSAR Safe shall ensure that the queue sizes that were chosen 
    during the configuration are sufficient for the integrated system.
     
    The RTE uses queues for mode communication, sender-/receiver communication and 
    mapped client-/server communication. The queue sizes depend on the scheduling of 
    entities and the call sequences of the APIs. 
    Vector recommends not using APIs with queues for safety-related functionality. 
    Verification can e.g. be performed by stress testing. 
    The RTE Analyzer lists the queue sizes to assist in this integration step. 
    SMI-36068 
    The user of MICROSAR Safe shall ensure that all connections with end-to-end (E2E) 
    protection are generated.
     
    The RTE Analyzer lists RTE APIs that read or write end-to-end protected data (see SMI-
    98). 
    20.4 Safety features required from other components 
    SMI-2121 
    RTE requires the following functionality as safety feature from the operating system: 
    o  Interrupt enabling/disabling 
    o  Resource handling 
    o  Inter OS Application Communicator (IOC) sending and receiving functionality 
    o  Spin-lock functionality 
    o  Alarm handling 
    o  Schedule table handling 
    o  Activation of tasks 
    o  Event handling 
    This requirement is fulfilled if an ASIL operating system by Vector is used. 
    SMI-2978 
    RTE requires the following functionality as safety feature from the NvM: 
    o  Reading blocks 
    2018 Vector Informatik GmbH 
    1.0 
    82 / 103 


    Safety Manual CBD1601056 D05 
    o  Writing blocks 
    This requirement is fulfilled if an ASIL NvM by Vector is used. 
    20.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    83 / 103 


    Safety Manual CBD1601056 D05 
    21 Safety Manual WdgIf 
    21.1 Safety features 
    SMI-519 
    This component provides the following safety features: 
    ID  
    Safety feature  
    CREQ-
    WdgIf shall provide a service to set the mode of a watchdog device 
    107414  
    CREQ-
    WdgIf shall provide a service to set the trigger condition for a watchdog device 
    107415  
    CREQ-
    WdgIf shall support a mechanism to combine statuses of different cores and handle 
    107416  
    one watchdog for different cores 
     
    21.2 Configuration constraints 
    SMI-522 
    If a state combiner is used, the user of MICROSAR Safe shall configure  
    o  WdgIfStateCombinerSpinlockID and 
    o  WdgIfStateCombinerStartUpSyncCycles 
    for each core that is used by the state combiner. 
    SMI-523 
    If a state combiner is used and WdgIfStateCombinerStartUpSyncCycles is set to a value s, 
    the user of MICROSAR Safe shall consider that for the first s SupervisionCycles of the 
    master, the master does not monitor the slave triggers. 
    However, reset requests from a slave within the first s SupervisionCycles, are escalated by 
    the master with the next call of the master’s WdgM_MainFunction()
    21.3 Additional verification measures 
    SMI-525 
    The user of MICROSAR Safe shall verify that the output path of the generator is empty 
    before the generator is started. 
    The output path can be defined by the command line argument OUTPUT-DIRECTORY
    SMI-526 
    The user of MICROSAR Safe shall inspect the messages of the generator execution. 
    If the generator aborts the generation process with an error message, the (partially) 
    generated output files shall not be used in the system. 
    If the generator detects an error, a message starting with "ERROR" is displayed on the 
    standard output. 
    If the generator shows a warning message starting with "WARNING", the user of 
    2018 Vector Informatik GmbH 
    1.0 
    84 / 103 


    Safety Manual CBD1601056 D05 
    MICROSAR Safe shall ensure that the cause of the warning does not invalidate the 
    generated output files. 
    SMI-527 
    The user of MICROSAR Safe shall verify that the following preprocessor directives are 
    defined with the correct value independent from whether a state combiner is configured or 
    not: 
    Preprocessor Directive  
    Value  
    WDGIF_VERSION_INFO_API 
    STD_ON if WdgIfVersionInfoApi is TRUE, otherwise 
    STD_OFF
    WDGIF_USE_AUTOSAR_DRV_API 
    STD_ON 
    WDGIF_DEV_ERROR_DETECT 
    STD_ON if WdgIfDevErrorDetect is TRUE, otherwise 
    STD_OFF
    WDGIF_INTERNAL_TICK_COUNTER  STD_OFF 
    WDGIF_USE_STATECOMBINER 
    STD_ON if WdgIfUseStateCombiner is TRUE, otherwise 
    STD_OFF
    The defines can be found in WdgIf_Cfg_Features.h
    SMI-528 
    The user of MICROSAR Safe shall verify that the following preprocessor directives are 
    defined with the correct value only if a state combiner is configured: 
    Preprocessor Directive  
    Value  
    WDGIF_STATECOMBINER_USE_OS_SPIN_LOCK  STD_ON if 
    WdgIfStateCombinerUseOsSpinlock is 
    TRUE, otherwise STD_OFF
    WDGIF_STATECOMBINER_MANUAL_MODE 
    STD_ON if 
    WdgIfStateCombinerUseManualMode is 
    TRUE, otherwise STD_OFF
    The defines can be found in WdgIf_Cfg_Features.h
    SMI-529 
    The user of MICROSAR Safe shall verify that the following preprocessor directives are 
    defined with the correct value independent from whether a state combiner is configured or 
    not: 
    Preprocessor Directive  
    Value  
    WDGIF_NUMBER_OF_WDGIFDEVICES 
    The number of configured WD Interface Devices. 
    The define can be found in WdgIf_LCfg.h
    SMI-530 
    The user of MICROSAR Safe shall verify that the following preprocessor directives are 
    defined with the correct value only if a state combiner is configured: 
    Preprocessor Directive  
    Value  
    WDGIF_NUMBER_OF_SLAVES  The configured number of slave cores. Cores that are not 
    attached to a State Combiner (i.e. they run independent from 
    2018 Vector Informatik GmbH 
    1.0 
    85 / 103 


    Safety Manual CBD1601056 D05 
    other cores) do not count as slave. 
    The define can be found in WdgIf_LCfg.h
    SMI-531 
    The user of MICROSAR Safe shall verify that the C-struct const WdgIf_InterfaceType 
    WdgIf_Interface
     is defined in WdgIf_LCfg.c
    WdgIf_Interface shall contain the following fields: 
    Field   Value  
    Description  
    1st  
    WDGIF_NUMBER_OF_WDGIFDEVICES  The number of WD Interface Devices. 
    2nd   WdgIf_FunctionsPerWdg 
    A reference to the list of WD Interface Devices. 
    If a state combiner is configured, WdgIf_Interface shall also contain the following fields:  
    Field   Value  
    Description  
    3rd  
    &wdgif_statecombiner_common_config  A reference to the state combiner data structure. 
    4th  
    wdgif_statecombiner_manual_config 
    In case of manual mode. 
     
    SMI-532 
    The user of MICROSAR Safe shall verify that the array static const 
    WdgIf_InterfaceFunctionsPerWdgDeviceType WdgIf_FunctionsPerWdg 
    [WDGIF_NUMBER_OF_WDGIFDEVICES] is defined in WdgIf_LCfg.c
    WdgIf_FunctionsPerWdg shall refer all – and only - the WD Interface Devices that are 
    configured in the EDF. 
    WdgIf_FunctionsPerWdg[i] shall refer the underlying WD Interface Device in the EDF with 
    WdgIfDeviceIndex = i
    The fields in an array element in WdgIf_FunctionsPerWdg shall be set as follows: 
    Field   Value  
    Description  
    1st  
    &device_functions  If the underlying WD Interface Device is directly linked to a WD driver 
    for device, then the field refers to the C-struct device_functions. 
    1st  
    NULL_PTR  
    If the underlying WD Interface Device shares the WD driver with other 
    WD Interface Devices using a state combiner, then the linked WD 
    device is referred in wdgif_statecombiner_common_config
    If a state combiner is configured, an array element in WdgIf_FunctionsPerWdg shall also 
    contain the following field:  
    Field   Value  
    Description  
    2nd   WdgInstance  A number that uniquely identifies the WD Interface Device instance for the 
    underlying platform. All instances on the same platform are numbered 
    consecutively starting with 0. Example: One platform has instances A and B, 
    another platform has instances C and D. Then A, B, C, and D have 
    WdgInstance set (in this order) as: 0,1,0,1. 
     
    SMI-533 
    2018 Vector Informatik GmbH 
    1.0 
    86 / 103 


    Safety Manual CBD1601056 D05 
    If a state combiner is configured, the user of MICROSAR Safe shall verify that the array 
    static const WdgIf_StateCombinerCommonConfigType 
    wdgif_statecombiner_common_config is defined in WdgIf_LCfg.c
    The fields in wdgif_statecombiner_common_config shall be set as follows: 
    Field   Value  
    Description  
    1st  
    WDGIF_NUMBER_OF_SLAVES 
    The number of configured slaves. 
    2nd   WdgIfStateCombinerSpinlockID 
    The value of field 
    WdgIfStateCombinerSpinlockID in the EDF. 
    3rd  
    WdgIfStateCombinerStartUpSyncCycles  The value of field 
    WdgIfStateCombinerStartUpSyncCycles in the 
    EDF. 
    4th  
    &device_functions 
    A reference to the WD driver API functions for 
    device. 
    5th  
    wdgif_statecombiner_shared_memory 
    A reference to the shared memory for the state 
    combiners of the Watchdog Interfaces. 
     
    SMI-534 
    If a state combiner is configured, the user of MICROSAR Safe shall verify that the array 
    WdgIf_StateCombinerSharedMemory wdgif_statecombiner_shared_memory 
    [WDGIF_NUMBER_OF_SLAVES] is defined in WdgIf_LCfg.c
    The WdgIf writes to this array, hence it is not const
    wdgif_statecombiner_shared_memory shall contain one array element for each configured 
    slave and the fields in the element shall be set as shown in the following table: 
    Field  
    Value  
    Description  
    1st  
    0u 
    Initial value for the slave’s WindowStart. 
    2nd  
    (uint16)~0u 
    Inverse initial value for the slave’s WindowStart. 
    3rd  
    0u 
    Initial value for the slave’s Timeout. 
    4th  
    (uint16)~0u 
    Inverse initial value for the slave’s Timeout. 
    5th  
    0u 
    Initial value for the slave’s counter. 
    6th  
    (uint16)~0u 
    Inverse initial value for the slave’s counter. 
     
    SMI-535 
    If the state combiner is configured in manual mode, the user of MICROSAR Safe shall 
    verify that the array static const WdgIf_StateCombinerManualConfigType* 
    wdgif_statecombiner_manual_config [WDGIF_NUMBER_OF_SLAVES] is defined in 
    WdgIf_LCfg.c
    wdgif_statecombiner_manual_config shall list the references to all configured slaves. 
    wdgif_statecombiner_manual_config[i] = &wdgif_statecombiner_config_slave<ID>, where 
    ID is the slave’s consecutive number starting with 1. 
    SMI-536 
    If the state combiner is configured in manual mode, the user of MICROSAR Safe shall 
    verify that for a configured slave with ID the C-struct static const 
    2018 Vector Informatik GmbH 
    1.0 
    87 / 103 


    Safety Manual CBD1601056 D05 
    WdgIf_StateCombinerManualConfigType wdgif_statecombiner_config_slave<ID> is 
    defined in WdgIf_LCfg.c
    wdgif_statecombiner_config_slave<ID> shall be set as follows: 
    Field   Value  
    Description  
    1st  
    WdgIfStateCombinerReferenceCycle 
    The value of field 
    WdgIfStateCombinerReferenceCycle in the 
    EDF. 
    2nd   WdgIfStateCombinerSlaveIncrementsMin  The value of field 
    WdgIfStateCombinerSlaveIncrementsMin in 
    the EDF. 
    3rd  
    WdgIfStateCombinerSlaveIncrementsMax  The value of field 
    WdgIfStateCombinerSlaveIncrementsMax in 
    the EDF. 
     
    SMI-537 
    The user of MICROSAR Safe shall verify that for each configured platform the C-struct 
    static const WdgIf_InterfaceFunctionsType <platform>_functions is defined in 
    WdgIf_LCfg.c. 
    The fields for each C-struct <platform>_functions shall be set as follows: 
    Field   Value  
    Description  
    1st  
    Wdg_<infix>_SetMode_  
    A reference to the WD driver’s API 
    function to set the mode of the device 
    referred to by infix. 
    2nd   Wdg_<infix>_SetTriggerWindow_ and 
    A reference to the WD driver’s API 
    Wdg_<infix>_SetTriggerCondition_  
    function to set the trigger window of the 
    device referred to by infix. 
     
    21.4 Safety features required from other components 
    SMI-520 
    This component requires the triggering of the watchdog and setting the triggering mode as 
    a safety feature from the watchdog driver. 
    This requirement is fulfilled if a watchdog driver by Vector is used. 
    SMI-3085 
    The WdgIf shall be used in order to call the services of underlying Watchdog driver(/s) to 
    set the mode and the trigger condition as expected by the drivers. 
    The user of MICROSAR Safe shall verify that the WdgIf services are only called by the 
    WdgM. 
    This requirement is fulfilled for all components of MICROSAR (if Vector's WdgM is used). 
    If e.g. the trigger condition is called by another component, this may lead to unintended 
    triggering of the watchdog. 
    If the watchdog stack is not properly set up, it may not provide the expected protection. 
    2018 Vector Informatik GmbH 
    1.0 
    88 / 103 


    Safety Manual CBD1601056 D05 
    21.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    89 / 103 


    Safety Manual CBD1601056 D05 
    22 Safety Manual WdgM 
    22.1 Safety features 
    SMI-373 
    This component provides the following safety features: 
    ID  
    Safety feature  
    CREQ-
    WdgM shall provide a mechanism for Alive Supervision. 
    102746  
    CREQ-
    WdgM shall provide a mechanism for Deadline Supervision. 
    102745  
    CREQ-
    WdgM shall provide a mechanism for Logical Supervision. 
    102744  
    CREQ-
    WdgM shall provide a service to trigger a checkpoint. 
    102749  
    CREQ-
    WdgM shall provide a service to initiate a reset triggered by the hardware 
    102752  
    watchdog. 
    CREQ-
    WdgM shall provide a service to activate the supervision of a Supervised Entity. 
    102754  
    CREQ-
    WdgM shall provide a service to deactivate the supervision of a Supervised Entity. 
    102755  
    CREQ-
    WdgM shall provide a service to cyclically update the global supervision status. 
    102763  
    CREQ-
    WdgM shall provide a service to set a new trigger mode. 
    102758  
     
    The watchdog manager is able to detect program flow violations, alive counter violations 
    and deadline violations. 
    The following types of faults can be detected: 
    o  omission of an operation (program flow, alive counter), 
    o  unrequested execution of an operation (program flow, alive counter), 
    o  operation executed too early (alive counter, deadline), 
    o  operation executed too late (alive counter, deadline), and 
    o  operations executed in the wrong sequence (program flow). 
    22.2 Configuration constraints 
    SMI-501 
    The user of MICROSAR Safe shall use the WdgM only on 32-bit microcontroller platforms. 
    2018 Vector Informatik GmbH 
    1.0 
    90 / 103 


    Safety Manual CBD1601056 D05 
    SMI-499 
    The user of MICROSAR Safe shall configure and verify alive supervision for a supervised 
    entity. 
    If no alive supervision is configured for a supervised entity, WdgM cannot detect if the 
    corresponding checkpoint is reached at least once. 
    Please note that for non-periodic supervised entities alive supervision is not possible. 
    A value of a pre-compile configuration parameter is valid for every core. A different value 
    cannot be set for the same pre-compile parameter and different cores. 
    SMI-498 
    The user of MICROSAR Safe shall set the value of WdgMTimebaseSource according to 
    the required source of time ticks: 
    WdgMTimebaseSource  
    Description  
    WDGM_INTERNAL_SOFTWARE_TICK   An internal time source for Deadline Monitoring is 
    selected. The tick counter is incremented each time the 
    WdgM_MainFunction() is invoked. 
    WDGM_OS_COUNTER_TICK  
    An OsCounter is selected for Deadline Monitoring as 
    timebase. The user of MICROSAR Safe is responsible 
    for configuring the OsCounter accurately. 
    WDGM_EXTERNAL_TICK  
    An external time source for Deadline Monitoring is 
    selected. The tick counter is incremented each time the 
    WdgM_UpdateTickCount() function is invoked. The 
    function is implemented in the WdgM. The user of 
    MICROSAR Safe is responsible for calling 
    WdgM_UpdateTickCount() accurately. 
     
    SMI-560 
    The user of MICROSAR Safe shall use the functions WdgM_ActivateSupervisionEntity() 
    and WdgM_DeactivateSupervisionEntity() to activate and deactivate the supervision of 
    supervised entities.  
    Activation and deactivation shall only be performed by a software component that is 
    developed according to the highest ASIL that is allocated to the ECU. 
    The functions are only available if WdgMEntityDeactivationEnabled is set to TRUE
    Vector recommends setting WdgMEntityDeactivationEnabled to FALSE to prevent that 
    faults are not detected. 
    22.3 Additional verification measures 
    SMI-3072 
    The user of MICROSAR Safe shall verify that the WdgM is initialized only at intended 
    points in time, e.g. during initialization. 
    Unintended re-initialization may lead to a incorrect monitoring. 
    SMI-502 
    2018 Vector Informatik GmbH 
    1.0 
    91 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall verify that the output path of the generator is empty 
    before the generator is started. 
    The output path can be defined by the command line argument OUTPUT-DIRECTORY
    SMI-524 
    The user of MICROSAR Safe shall inspect the messages of the generator execution. 
    If the generator aborts the generation process with an error message, the (partially) 
    generated output files shall not be used in the system. 
    If the generator detects an error, a message starting with "ERROR" is displayed on the 
    standard output. 
    If the generator shows a warning message starting with "WARNING", the user of 
    MICROSAR Safe shall ensure that the cause of the warning does not invalidate the 
    generated output files. 
    22.3.1 Additional verification using WdgM Verifier 
    SMI-503 
    The user of MICROSAR Safe shall execute the supplied WdgM Verifier. 
    Instructions can be found in the technical reference of WdgM on how to run the WdgM 
    Verifier. 
    SMI-504 
    The user of MICROSAR Safe shall verify that the report of the WdgM Verifier 
    o  comprises "All tests passed" in the last line. and 
    o  that all tests in the Summary of the report are marked with PASSED
    SMI-1578 
    If an AUTOSAR OS with a version higher than 4.0 is used the verification test with id '109' 
    is marked as "NOT PASSED". 
    The user of MICROSAR Safe shall verify whether the assigned core id to a WdgMMode is 
    generated correctly if an AUTOSAR OS with a version higher than 4.0 is used. The WdgM 
    Verifier cannot not verify this step due to an incompatible change of the Os's description 
    file. 
    SMI-512 
    The user of MICROSAR Safe shall verify the generated local transitions in 
    wdgm_verifier_info.c
    Generated local transitions are defined by the C-struct array with the name 
    local_transitions
    The array holds all local transitions of all supervised entities. 
    Each local transition lt contains the names of: 
    o  the source entity (SE) of lt, 
    o  the source checkpoint of lt, 
    o  the destination entity (SE) of lt and 
    2018 Vector Informatik GmbH 
    1.0 
    92 / 103 


    Safety Manual CBD1601056 D05 
    o  the destination checkpoint of lt. 
    Verification shall include that 
    o  each local transition is defined as stated in the System Specification, and 
    o  no local transition in the System Specification is missing. 
    SMI-513 
    The user of MICROSAR Safe shall verify the generated global transitions in 
    wdgm_verifier_info.c
    Generated global transitions are defined by the C-struct array with the name 
    global_transitions
    The array holds all global transitions of all supervised entities. 
    Each global transition gt contains the names of: 
    o  the source entity (SE) of gt, 
    o  the source checkpoint of gt, 
    o  the destination entity (SE) of gt, and  
    o  the destination checkpoint of gt. 
    Verification shall include that 
    o  each global transition is defined as stated in the System Specification, and 
    o  no global transition in the System Specification is missing. 
    SMI-514 
    The user of MICROSAR Safe shall verify the checkpoints in wdgm_verifier_info.c
    Supervised entities named se are defined by a C-struct array with the name 
    se_<se>_cp_list_. 
    The array se_<se>_cp_list_ holds information about all checkpoints configured for se. 
    Each array item contains information about one checkpoint cp of the supervised entity se: 
    o  the supervised entity's ID (for this cp of se), 
    o  the checkpoint's ID (for this cp of se), 
    o  the supervised entity name (for this cp of se), and 
    o  the checkpoint name (for this cp of se). 
    Verification shall include that 
    o  each checkpoint is configured as stated in the System Specification, and 
    o  no checkpoint for the actual supervised entity is missing. 
    2018 Vector Informatik GmbH 
    1.0 
    93 / 103 


    Safety Manual CBD1601056 D05 
    SMI-515 
    The user of MICROSAR Safe shall verify the supervised entities in wdgm_verifier_info.c
    Supervised entities named se are defined by a C-struct array with the name entities
    The array entities holds information about a onfigured supervised entity. 
    The fields in an array item for a supervised entity se shall have the following values (in this 
    order): 
    Value  
    Source Line Comment  
    The entity ID (of se).  
    enitity id  
    The entity name (of se).  
    entity name 
    The number of checkpoints configured for se.  
    number of checkpoints 
    A reference se_<se>_cp_list_, which refers to the list of CPs for se   this entity's checkpoints 
    A reference to the callback function for se as configured in 
    WdgMLocalStateChangeCbk 
    WdgMLocalStateChangeCbk (or NULL_PTR if no callback function 
    is configured).  
    false 
    autosar_3_1_x_compatibility 
    The application task for se as configured in field WdgMAppTaskRef  WdgMAppTaskRef 
    Verification shall include that 
    o  each supervised entity is configured as stated in the System Specification, and 
    o  no supervised entity is missing. 
    SMI-516 
    The user of MICROSAR Safe shall verify the deadline supervisions in 
    wdgm_verifier_info.c
    Deadline supervisions are defined by a C-struct array with the name 
    deadline_supervisions
    The array deadline_supervisions holds information about all transitions with deadline 
    supervision. 
    Each deadline supervision dl contains the following values: 
    o  the source entity name (SE) of dl, 
    o  the source checkpoint name of dl, 
    o  the destination entity name (SE) of dl, 
    o  the destination checkpoint name of dl, 
    o  the minimum deadline for dl (in seconds), and 
    o  the maximum deadline of dl (in seconds). 
    Verification shall include that 
    o  each deadline supervision is configured as stated in the System Specification, and 
    2018 Vector Informatik GmbH 
    1.0 
    94 / 103 


    Safety Manual CBD1601056 D05 
    o  no deadline supervision is missing. 
    SMI-517 
    The user of MICROSAR Safe shall verify the alive supervisions in wdgm_verifier_info.c
    Alive supervisions are defined by a C-struct array with the name alive_supervisions
    The array alive_supervisions holds information about all transitions with alive supervision. 
    Each alive supervision al contains the following values: 
    o  the supervised entity name (SE) of al, 
    o  the checkpoint name of that se of al, 
    o  the number of expected alive indications per reference cycle of al, 
    o  the minimum margin for alive indications of al, 
    o  the maximum margin for alive indications of al, and 
    o  the number of supervision reference cycle of al. 
    Verification shall include that 
    o  each alive supervision is configured as stated in the System Specification, and 
    o  no alive supervision is missing. 
    SMI-518 
    The user of MICROSAR Safe shall verify the configured cores in wdgm_verifier_info.c
    The configured cores are defined in the main() function. 
    For each configured core with ID, the following line shall be present: 
     
     
    result += verify (&WdgMConfig_Modem_core<ID>, &verifier_info); 
     
     
     
     
    where ID is the core ID and m is the ID of the WdgM mode. 
    Verification shall include that for each core there is a corresponding line in the file. 
    22.3.2 Additional verification of generator execution 
    SMI-506 
    The user of MICROSAR Safe shall verify that for the following arrays in WdgM_PBcfg.c
    the array length matches the number of items in the array: 
    2018 Vector Informatik GmbH 
    1.0 
    95 / 103 


    Safety Manual CBD1601056 D05 
    o  WdgMTransition 
    o  WdgMGlobalTransition 
    o  all arrays named StartsGlobalTransition<se>_<cp>_<i>_ (for a supervised entity se, 
    a checkpoint cp and an integer i) 
    o  WdgMCheckPoint 
    o  WdgMSupervisedEntity 
    o  all arrays named WdgMTriggerMode_core<ID> (for each core with ID) 
    o  WdgMWatchdogDevice<ID> (for each core with ID) 
    o  WdgMAllowedCallers 
    Some of these arrays have preprocessor defines for their size, e.g. WdgMCheckPoint 
    [WDGM_NR_OF_CHECKPOINTS]
    . These defines can be found in WdgM_PBcfg.h
    SMI-507 
    The user of MICROSAR Safe shall verify that each item in the array 
    WdgMSupervisedEntity follows this rules: 
    1. WdgMCheckpointRef has a value of the form &WdgMCheckPoint[i] with i < 
    _WDGM_NR_OF_CHECKPOINTS
    , and 
    2. _WdgMCheckpointLocInitialId has a value of 0. 
    The array can be found in WdgM_PBcfg.c
    SMI-27923 
    The user of MICROSAR Safe shall verify that each WdgM_StatusReportToRte member of 
    struct WdgM_ConfigType and each WdgM_StatusReportToRte member of struct 
    WdgM_SupervisedEntityType has a valid entry if 
    WDGM_STATUS_REPORTING_MECHANISM is set to 
    WDGM_USE_MODE_SWITCH_PORTS. 
    The functions must be implemented by the Rte and must have the following signature: 
    Std_ReturnType (*WdgM_StatusReportToRte) (WdgMMode). 
    Both structs can be found in WdgM_PBcfg.c. 
    SMI-508 
    The user of MICROSAR Safe shall verify that for each core with ID 
    WDGM_NR_OF_WATCHDOGS_CORE<ID> matches the actual number of configured 
    WD devices. 
    The define can be found in WdgM_PBcfg.h
    SMI-509 
    The user of MICROSAR Safe shall verify that for each core with ID 
    WDGM_NR_OF_TRIGGER_MODES_CORE<ID> matches the actual number of 
    configured Watchdog Manager Trigger Modes. 
    The define can be found in WdgM_PBcfg.h
    SMI-510 
    2018 Vector Informatik GmbH 
    1.0 
    96 / 103 


    Safety Manual CBD1601056 D05 
    The user of MICROSAR Safe shall verify that WDGM_NR_OF_ALLOWED_CALLERS 
    matches the number of modules that call function WdgM_SetMode()
    The define can be found in WdgM_PBcfg.h
    SMI-511 
    The user of MICROSAR Safe shall verify that in WdgMConfig_Mode<m>_core<ID> (for 
    each core with ID and every mode m), the field WdgMCallersRef points to 
    WdgMAllowedCallers and WdgMAllowedCallers is an array of type WdgM_CallersType 
    with a length of WDGM_NR_OF_ALLOWED_CALLERS
    The variable can be found in WdgM_PBCfg.h
    SMI-550 
    The user of MICROSAR Safe shall verify the types used by WdgM. 
    If the configuration parameter WDGM_USE_RTE is set to STD_ON, the types from 
    Rte_Type.h are used: 
    Type  
    Allowed Value  
    WdgM_SupervisedEntityIdType 
    uint16 
    WdgM_CheckpointIdType 
    uint16 
    WdgM_ModeType 
    uint8 
    WdgM_LocalStatusType 
    uint8 
    WdgM_GlobalStatusType 
    uint8 
    The WdgM includes WdgM_Rte_Includes.h if and only if WDGM_USE_RTE is set to 
    STD_ON
    If the configuration parameter WDGM_USE_RTE is set to STD_OFF, the types from 
    WdgM are used: 
    Type  
    Allowed Value  
    WdgM_SupervisedEntityIdType 
    uint16 
    WdgM_CheckpointIdType 
    uint16 
    WdgM_ModeType 
    uint8 
    WdgM_LocalStatusType 
    uint8 
    WdgM_GlobalStatusType 
    uint8 
     
    SMI-551 
    The user of MICROSAR Safe shall verify the definitions used by WdgM. 
    If the configuration parameter WDGM_USE_RTE is set to STD_ON, the definitions from 
    Rte_WdgM_Type.h are used. 
    If the configuration parameter WDGM_USE_RTE is set to STD_OFF, the definitions from 
    WdgM are used. 
    Definition  
    Value  
    WDGM_LOCAL_STATUS_OK 
    0  
    2018 Vector Informatik GmbH 
    1.0 
    97 / 103 


    Safety Manual CBD1601056 D05 
    WDGM_LOCAL_STATUS_FAILED 
    1  
    WDGM_LOCAL_STATUS_EXPIRED 
    2  
    WDGM_LOCAL_STATUS_DEACTIVATED 
    4  
    WDGM_GLOBAL_STATUS_OK 
    0  
    WDGM_GLOBAL_STATUS_FAILED 
    1  
    WDGM_GLOBAL_STATUS_EXPIRED 
    2  
    WDGM_GLOBAL_STATUS_STOPPED 
    3  
    WDGM_GLOBAL_STATUS_DEACTIVATED 
    4  
    The WdgM includes Rte_WdgM_Type.h if and only if WDGM_USE_RTE is set to 
    STD_ON
    22.4 Safety features required from other components 
    SMI-372 
    This component requires setting a trigger condition and setting the triggering mode as 
    safety features from WdgIf. 
    This requirement is fulfilled if the WdgIf by Vector is used. 
    SMI-3414 
    The user of MICROSAR Safe shall call the service to set the mode as expected by the 
    Wdg stack. 
    If the watchdog is not properly set up, it may not provide the expected protection. 
    22.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    98 / 103 


    Safety Manual CBD1601056 D05 
    23 Safety Manual XCP 
    23.1 Safety features 
    This component does not provide safety features. 
    SMI-178 
    This component is only partly developed according to ASIL development process. This part 
    includes the disabling of the Xcp. 
    The main part of this component is developed according to a QM development process.  
    Thus, this component shall only be enabled in an operating mode that do not impose risk 
    for the health of persons. 
    23.2 Configuration constraints 
    SMI-3412 
    The user of MICROSAR Safe shall configure the following: 
    o  Set /MICROSAR/Xcp/XcpGeneral/XcpControl to TRUE. 
    The user of MICROSAR Safe shall verify that the corresponding configuration switch is set 
    in the Xcp protocol layer and all used transport layers: 
    File  
    Define  
    STD_ON/STD_OFF  
    Xcp_Cfg.h  
    XCP_CONTROL  
    STD_ON  
    CanXcp_Cfg.h  
    CANXCP_ENABLE_CONTROL  
    STD_ON  
    FrXcp_Cfg.h  
    FRXCP_ENABLE_CONTROL  
    STD_ON  
    TcpIpXcp_Cfg.h  
    TCPIPXCP_ENABLE_CONTROL  
    STD_ON  
     
    SMI-179 
    The user of MICROSAR Safe shall use the macros XCP_ACTIVATE() and 
    XCP_DEACTIVATE() to activate and deactivate XCP protocol layer and transport layer 
    components.  
    Activation and deactivation shall only be performed by a software component that is 
    developed according to the highest ASIL that is allocated to the ECU. 
    XCP shall only be activated in an operating mode that does not impose risk for the health 
    of persons.  
    Note: XCP is active by default. 
    SMI-183 
    The user of MICROSAR Safe shall make the following memory sections read-only for the 
    XCP protocol layer and transport layer components as well as all other software with an 
    ASIL lower than the highest ASIL allocated to the ECU: 
    o  XCP_START_SEC_VAR_INIT_UNSPECIFIED_SAFE 
    2018 Vector Informatik GmbH 
    1.0 
    99 / 103 


    Safety Manual CBD1601056 D05 
    o  CANXCP_START_SEC_VAR_INIT_UNSPECIFIED_SAFE 
    o  FRXCP_START_SEC_VAR_INIT_UNSPECIFIED_SAFE 
    o  TCPIPXCP_START_SEC_VAR_INIT_UNSPECIFIED_SAFE 
    23.3 Additional verification measures 
    SMI-184 
    The user of MICROSAR Safe shall verify during integration testing that XCP is disabled 
    during normal operation. 
    23.4 Safety features required from other components 
    SMI-177 
    This component requires an operating system with enabled memory partitioning. 
    23.5 Dependencies to hardware 
    This component does not use a direct hardware interface. 
    2018 Vector Informatik GmbH 
    1.0 
    100 / 103 


    Safety Manual CBD1601056 D05 
    24 Glossary and Abbreviations 
    24.1 Glossary 
    Term 
    Definition 
    User of 
    Integrator and user of components from MICROSAR Safe provided by Vector. 
    MICROSAR 
    Safe 
    MICROSAR 
    MICROSAR Safe comprises MICROSAR SafeBSW and MICROSAR SafeRTE 
    Safe 
    as Safety Element out of Context. MICROSAR SafeBSW is a set of components, 
    that are developed according to ISO 26262 [1], and are provided by Vector in the 
    context of this delivery. The list of MICROSAR Safe components in this delivery 
    can be taken from the documentation of the delivery. 
    Critical section 
    A section of code that needs to be protected from concurrent access. A critical 
    section may be protected by using the AUTOSAR exclusive area concept. 
    Configuration 
    Data that is used to adapt the MICROSAR Safe component to the specific use-
    data 
    case of the user of MICROSAR Safe. Configuration data typically comprises 
    among others: feature selection, routing tables, channel tables, task priorities, 
    memory block descriptions. 
    Generated 
    Source code that is generated as a result of the configuration in DaVinci 
    code 
    Configurator Pro 
    Partition 
    A set of memory regions that is accessible by tasks and ISRs. Synonym to 
    OSApplication.  
     
    24.2 Abbreviations 
    Abbreviation 
    Description 
    ASIL 
    Automotive Safety Integrity Level 
    BSWMD 
    Basic Software Module Description 
    CPU 
    Central Processing Unit 
    CREQ 
    Component Requirement 
    EEPROM 
    Eletronically Ereasable and Programmable Read-only Memory 
    ECC 
    Error Correcting Code 
    ECU 
    Electronic Control Unit 
    EXT 
    Driver for an external hardware unit 
    ISO 
    International Standardization Organization 
    MCAL 
    Microcontroller Abstraction 
    MIP 
    Module Implementation Prefix 
    MSSV 
    MICROSAR Safe Silence Verifier 
    OS 
    Operating System 
    PDU 
    Protocol Data Unit 
    QM 
    Quality Management 
    2018 Vector Informatik GmbH 
    1.0 
    101 / 103 


    Safety Manual CBD1601056 D05 
    RAM 
    Random Access Memory 
    SMI 
    Safety Manual Item 
    TCL 
    Tool Confidence Level 
     
    2018 Vector Informatik GmbH 
    1.0 
    102 / 103 


    Safety Manual CBD1601056 D05 
    25 Contact 
    Visit our website for more information on 
    o  News 
    o  Products 
    o  Demo software 
    o  Support 
    o  Training data 
    o  Addresses 
    www.vector.com  
    2018 Vector Informatik GmbH 
    1.0 
    103 / 103 

    Document Outline


    1.3.51 - Startup_Ford_SLP1

    Startup with Ford SLP1

    1.3.52 - Startup_Ford_SLP1_ind

    Outline
    Page 1
    Page 2
    Page 3
    Page 4
    Page 5
    Page 6
    Page 7
    Page 8
    Page 9
    Page 10
    Page 11
    Page 12
    Page 13
    Page 14
    Page 15
    Page 16
    Page 17
    Page 18
    Page 19
    Page 20
    Page 21
    Page 22
    Page 23
    Page 24
    Page 25
    Page 26
    Page 27
    Page 28
    Page 29
    Page 30
    Page 31
    Page 32
    Page 33
    Page 34
    Page 35
    Page 36
    Page 37
    Page 38
    Page 39
    Page 40
    Page 41
    Page 42
    Page 43
    Page 44
    Page 45
    Page 46
    Page 47
    Page 48
    Page 49
    Page 50
    Page 51
    Page 52
    Page 53
    Page 54
    Page 55
    Page 56
    Page 57
    Page 58
    Page 59
    Page 60
    Page 61
    Page 62
    Page 63
    Page 64
    Page 65
    Page 66
    Page 67
    Page 68
    Page 69
    Page 70
    Page 71
    Page 72
    Page 73
    Page 74
    Page 75
    Page 76
    Page 77
    Page 78
    Page 79
    Page 80
    Page 81
    Page 82
    Page 83
    Page 84
    Page 85
    Page 86
    Page 87
    Page 88
    Page 89
    Page 90
    Page 91
    Page 92
    Page 93
    Page 94
    Page 95
    Page 96
    Page 97
    Page 98
    Page 99
    Page 100
    Page 101
    Page 102
    Page 103
    Page 104
    Page 105
    Page 106
    Page 107
    Page 108
    Page 109
    Page 110
    Page 111
    Page 112
    Page 113
    Page 114
    Page 115
    Page 116
    Page 117
    Page 118
    Page 119
    Page 120
    Page 121
    Page 122
    Page 123
    Page 124
    Page 125
    Page 126
    Page 127
    Page 128
    Page 129
    Page 130
    Page 131
    Page 132
    Page 133
    Page 134
    Page 135
    Page 136
    Page 137
    Page 138
    Page 139
    Page 140
    Page 141
    Page 142
    Page 143
    Page 144
    Page 145
    Page 146
    Page 147
    Page 148
    Page 149
    Page 150
    Page 151
    Page 152
    Page 153
    Page 154
    Page 155
    Page 156
    Page 157
    Page 158
    Page 159
    Page 160
    Page 161
    Page 162
    Page 163
    Page 164
    Page 165
    Page 166
    Page 167
    Page 168
    Page 169
    Page 170
    Page 171
    Page 172
    Page 173
    Page 174
    Page 175
    Page 176
    Page 177
    Page 178
    Page 179
    Page 180
    Page 181
    Page 182
    Page 183
    Page 184
    Page 185
    Page 186
    Page 187
    Page 188
    Page 189
    Page 190
    Page 191
    Page 192
    Page 193
    Page 194
    Page 195
    Page 196
    Page 197
    Page 198
    Page 199
    Page 200
    Page 201

    1.3.53 - Startup_Ford_SLP1s


    Startup with Ford SLP1
    Version 9.0.1 for MICROSAR 4 Release 18

    Content
    User Manual Startup with Ford SLP1
    Content
    About This Manual
    11
    1.1 History Information
    11
    1.2 Finding Information Quickly
    11
    1.3 Conventions
    11
    1.4 Certification
    12
    1.5 Warranty
    12
    1.6 Support
    13
    1.7 Registered Trademarks
    13
    1.8 Errata Sheet of Hardware Manufacturers
    14
    1.9 Example Code
    14
    1.10 What Do You Learn from This Manual
    14
    Basics
    16
    2.1 An Overall View
    16
    2.2 MICROSAR - Vector's AUTOSAR Solution
    17
    2.3 AUTOSAR Layer Model Ford
    17
    2.4 Configuration Workflow Ford SLP1
    18
    STEPbySTEP
    19
    STEP1 Setup Your Project
    20
    1.1 Situation after Installation
    20
    1.2 Setup Project via DaVinci Configurator Pro
    20
    1.2.1 General Settings
    21
    1.2.2 Target
    21
    1.2.3 Project Folder Structure
    21
    1.2.4 DaVinci Developer
    22
    1.3 Result Project Folder - Result of the Project Setup
    23
    1.3.1 Appl folder
    23
    1.3.2 Config folder
    23
    1.3.3 <ProjectName>.dpa
    24
    1.3.4 Log Folder
    24
    1.4 Start Menu - Result of the Project Setup
    25
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 2-

    Content
    User Manual Startup with Ford SLP1
    1.5 DaVinci Configurator Pro Project
    25
    STEP2 Define Project Settings
    26
    2.1 Add Input Files
    26
    2.1.1 Add System Description Files
    26
    2.1.2 Add Diagnostic Data Files
    27
    2.1.3 Add Standard Configuration Files
    29
    2.1.4 Update Configuration
    29
    2.2 Define External Generation Steps and SWC Templates and Contract Phase Headers
    30
    2.2.1 External Generation Steps
    30
    2.2.2 SWC Templates and Contract Phase Headers
    31
    2.3 Activate Your BSW Modules
    31
    2.4 Change Project Settings
    32
    2.4.1 Postbuild Support
    33
    STEP3 Validation
    34
    3.1 Start Solve All Mechanism
    34
    3.2 Live Validation - Solving Actions
    34
    STEP4 Start BSW Configuration
    36
    4.1 Start Configuration with Configuration Editors
    36
    4.2 Base Services
    36
    4.2.1 Development Errors
    36
    4.2.2 General Purpose Timer (GPT)
    36
    4.2.3 Microcontroller Unit
    36
    4.2.4 RAM Test
    37
    4.3 Communication
    37
    4.3.1 Communication General
    37
    4.3.2 Bus Controller
    37
    4.3.3 PDUs
    38
    4.3.4 Signals
    38
    4.3.5 Socket Adapter Users
    38
    4.3.6 Transparent Diagnostic Gateway
    38
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 3-

    Content
    User Manual Startup with Ford SLP1
    4.4 Diagnostics
    39
    4.4.1 Diagnostic Event Data
    39
    4.4.2 Diagnostic Events
    39
    4.4.3 Production Error Handling
    40
    4.4.4 Setup Event Memory Blocks
    40
    4.4.5 FNOS Version Numbers
    40
    4.4.6 Importing OBD Freeze Frame Data in DaVinci Configurator Pro
    41
    4.5 Memory
    41
    4.5.1 Memory General
    41
    4.5.2 Memory Blocks
    41
    4.5.3 Optimize Fee
    42
    4.6 Mode Management Editors
    42
    4.6.1 BSW Management
    42
    4.6.2 Activate Interrupts of Peripherals Devices
    44
    4.6.3 ECU Management
    46
    4.6.4 Initialization
    46
    4.6.5 Watchdogs
    47
    4.7 Network Management
    47
    4.7.1 Partial Networking
    48
    4.8 Runtime System
    48
    4.8.1 Runtime System General
    48
    4.8.2 ECU Software Components
    49
    4.8.3 OS Configuration
    49
    4.9 Go on with Basic Editor
    49
    4.10 Start Solving Actions
    50
    4.11 Start On-demand Validation
    50
    4.12 BSW Configuration finished
    51
    STEP5 Design Software Components
    52
    5.1 Switch to DaVinci Developer
    52
    5.2 Design Software Components
    52
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 4-

    Content
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    53
    6.1 Perform Data Mapping within DaVinci Developer or DaVinci Configurator?
    53
    6.2 Data Mapping within the DaVinci Developer
    53
    6.2.1 Data Mapping Automatically - DaVinci Developer
    53
    6.2.2 Data Mapping Manually - DaVinci Developer
    54
    6.2.3 DaVinci Developer - Save and close
    55
    6.3 Switch (back) to DaVinci Configurator
    56
    6.4 Synchronize System Description
    56
    6.5 Add Component Connection
    56
    6.6 Service Mapping
    56
    6.6.1 Service Mapping via Service Component
    56
    6.6.2 Service Mapping (overview)
    58
    6.7 Add Data Mapping
    58
    6.8 Add Memory Mapping
    60
    6.9 Add Task Mapping
    61
    6.9.1 Task Mapping Assistant
    61
    6.9.2 Task Mapping
    62
    STEP7 Code Generation
    64
    7.1 Generate SWC Templates and Contract Phase Headers
    64
    7.2 Start Code Generation
    64
    7.3 Generation Process finished!
    66
    STEP8 Add Runnable Code
    67
    8.1 Component Template
    67
    8.2 Implement Code
    68
    STEP9 Compile, Link and Test Your Project
    69
    9.1 Finish your project with compiling and linking
    69
    9.2 No error frames? Congratulations, that’s it!
    69
    II Concept
    71
    General Overview
    72
    1.1 Software Component
    75
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 5-

    Content
    User Manual Startup with Ford SLP1
    1.1.1 Atomic components
    75
    1.1.2 Compositions
    75
    1.2 Runnables
    75
    1.3 Ports
    76
    1.3.1 Application Port Interfaces
    76
    1.3.2 Service Port Interfaces
    76
    1.4 Data Element Types
    76
    1.5 Connections
    76
    1.6 RTE
    77
    1.7 BSW – Basic Software Modules
    77
    1.8 Software, Tools and Files
    77
    1.9 Structure of the SIP Folder
    79
    Set-Up New Project
    82
    2.1 DaVinci Configurator
    82
    2.1.1 The Main Window of DaVinci Configurator Pro
    82
    2.1.2 Editors and Assistants
    85
    Define Project Settings
    88
    3.1 Input files
    88
    3.1.1 System Description Files
    88
    3.1.2 SYSEX
    88
    3.1.3 ECUEX
    88
    3.1.4 Legacy Data Base files (DBC, LDF, FIBEX, …)
    88
    3.1.5 Diagnostic Data Files
    89
    3.1.6 CDD / ODX
    89
    3.1.7 State Description
    89
    3.1.8 Standard Configuration Files
    89
    3.2 External Generation Steps
    89
    3.3 Activate BSW
    90
    Validation
    91
    4.1 Validation Concept
    91
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 6-

    Content
    User Manual Startup with Ford SLP1
    BSW Configuration with Configuration Editors
    92
    5.1 DaVinci Configurator Pro Editors
    92
    Software Component (SWC) Design
    93
    6.1 Data Exchange between DaVinci Developer and DaVinci Configurator Pro
    93
    6.2 About Application Components, Ports, Connections, Runnables and More…
    93
    6.3 Application Components
    94
    6.3.1 The Library – Type and Package
    94
    6.3.2 New Application Components
    99
    6.3.3 Understand Types, Prototypes and Interfaces
    103
    6.4 Ports, Port Init Values and Data Elements
    103
    6.5 Configure Service Ports within your Application Components
    108
    6.6 Define your Runnables
    109
    6.7 Triggers for the Runnables
    110
    6.8 Port Access of the Runnables
    112
    Mappings
    114
    7.1 Data Mapping
    114
    7.2 Task Mapping
    115
    7.2.1 Information about Interaction between Runnable, Re-entrance and Task Mapping
    116
    7.3 Memory Mapping
    118
    7.4 Service Mapping
    119
    Generation
    121
    8.1 MICROSAR Rte Gen
    121
    Runnable Code
    122
    10 Compile and Link
    124
    10.1 Using your "real" hardware
    124
    III Additional Information
    125
    Update Input Files
    126
    1.1 System Description Files
    126
    1.2 Diagnostic Data Files
    126
    Update Project Settings
    127
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 7-

    Content
    User Manual Startup with Ford SLP1
    Support Request via DaVinci Configurator Pro
    128
    3.1 Result
    128
    Multiple User Concept
    130
    4.1 General
    130
    4.2 Split Files for Software Component and ECU Project Configuration
    131
    4.3 Configure Software Component Prototype
    133
    4.4 Configure ECU project
    133
    4.5 Split Files in DaVinci Developer
    134
    4.6 Split Files for BSW Configuration
    134
    Configuration Update
    136
    5.1 Release x-1 to Release x (necessary steps for any update)
    136
    5.2 Release 8 to Release 9
    138
    5.3 Release 7 to Release 8
    138
    Update DaVinci Tools
    140
    6.1 DaVinci Configurator Pro
    140
    6.2 DaVinci Developer
    140
    Non-Volatile Memory Block
    141
    7.1 Configure and use Non-Volatile Memory Block
    141
    7.2 Port Access of your Runnables
    144
    7.3 Memory Mapping in DaVinci Configurator Pro
    144
    7.4 Validate the RTE
    146
    Basic Software Modules
    147
    8.1 Generic BSW Modules
    147
    8.2 What is a BSW Module?
    147
    8.3 BSW Module Configuration
    148
    8.4 BSW Initialization
    149
    8.4.1 <Msn>_InitMemory()
    149
    8.4.2 <Msn>_Init()
    149
    8.5 BSW Module Version (xxx_GetVersionInfo)
    149
    8.6 Cyclic Calls
    149
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 8-

    Content
    User Manual Startup with Ford SLP1
    8.6.1 <Msn>_MainFunction()
    149
    8.7 Service Functions
    150
    8.8 Critical Sections - Exclusive Areas
    150
    8.8.1 Memory Section
    150
    8.8.2 Switch <MSN> Modules Off
    150
    Variant Handling
    151
    9.1 Define Criterion and Variants
    151
    9.2 Add and Assign Input Files to Variants
    153
    9.3 Define Variance for BSW Modules
    154
    9.4 Configure and Validate BSW
    155
    10 Add Module Stubs from AUTOSAR definition
    157
    11 SIP Update
    159
    12 Project Migration
    160
    12.1 Migration Steps from Release 17 SIP to Release 18
    160
    12.2 Migration Steps from Release 16 SIP to Release 17
    160
    IV Appendix
    161
    Frequently Asked Questions
    162
    1.1 Problems with using two different DaVinci Configurator Versions on the same PC
    162
    1.2 Annotations for any parameter
    162
    1.3 Find Reference Container
    164
    1.3.1 How to find references using the [Find] dialog
    164
    Release Notes
    165
    2.1 Release 18
    165
    2.1.1 Required AUTOSAR Tools
    171
    2.2 Release 17
    171
    2.2.1 Required AUTOSAR Tools
    179
    2.3 Release 16
    179
    2.3.1 Required AUTOSAR Tools
    185
    What’s New, What’s Changed
    186
    Glossary
    188
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 9-

    Content
    User Manual Startup with Ford SLP1
    Index
    200
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 10-



    Introduction
    User Manual Startup with Ford SLP1
    About This User Manual
    1 About This Manual
    1.1 History Information
    Cross Reference
    For detailed information about what's new, what's changed in current version, refer to sec-
    tion What's New, What's Changed? on page 186.
    1.2 Finding Information Quickly
    The user manual provides the following access help:
    You can see in the footer to which version the user manual refers,
    At the end of the user manual you will find an index to find information quickly,
    Also at the end of the user manual you will find a glossary of the used technical terms
    1.3 Conventions
    In the following two charts you will find the conventions used in the user manual regarding utilized
    spellings and symbols.
    Style
    Style Utilization
    bold
    Blocks, surface elements, window- and dialog names of the software. Accentuation
    of warnings and advices.
    [OK] Push buttons in brackets
    File|Save Notation for menus and menu entries
    MICROSAR
    Legally protected proper names and side notes.
    Source Code
    File name and source code.
    Hyperlink
    Hyperlinks and references.
    <CTRL>+<S>
    Notation for shortcuts.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 11-













    Introduction
    User Manual Startup with Ford SLP1
    About This User Manual
    Symbol
    Symbol Utilization
    Here you can obtain supplemental information.
    This symbol calls your attention to warnings.
    Here you can find additional information.
    Here is an example that has been prepared for you.
    Instructions on editing files are found at these points.
    This symbol warns you not to edit the specified file.
    This icon indicates multimedia files like e.g. video clips.
    This icon indicates an introduction into a specific topic.
    This icon indicates text areas containing basic knowledge.
    This icon indicates text areas containing expert knowledge.
    This icon indicates that something has changed.
    1.4 Certification
    Vector Informatik GmbH has ISO 9001:2008 certification. The ISO standard is a globally recognized
    standard.
    1.5 Warranty
    We reserve the right to modify the contents of the documentation or the software without notice.
    Vector disclaims all liabilities for the completeness or correctness of the contents and for damages
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 12-

























    Introduction
    User Manual Startup with Ford SLP1
    About This User Manual
    which may result from the use of this documentation.
    1.6 Support
    Germany
    And all other countries, not listed here.
    + 49 711 80670 3900
    support@de.vector.com
    BR
    CN
    Brazil, Argentina, Bolivia, Chile, Ecuador, Colombia,
    China
    Paraguay, Peru, Uruguay, Venezuela
    +55 11 5180 2350
    +86 21 6432 5353
    support@br.vector.com
    support@cn.vector.com
    FR
    IN
    France
    India
    +33 1 42 31 40 10
    +91 20 6673 6673
    support@fr.vector.com
    support@in.vector.com
    IT
    JP
    Italia
    Japan
    +39 2 678171 10
    TOKYO +81 3 5769 6972
    support@de.vector.com
    NAGOYA +81 52 238 5014
    support@jp.vector.com
    KR
    Scandinavia
    South Korea
    Sweden, Denmark, Finland, Iceland, Norway
    +82 2 807 0600
    +46 31 764 76 00
    support@kr.vector.com
    support@se.vector.com
    UK
    North America
    United Kingdom & Ireland
    USA, Canada, Mexico
    +44 121 7887 902
    +1 248 449 9290, Option 2
    support@uk.vector.com
    support@vectorcantech.zendesk.com
    1.7 Registered Trademarks
    All brand names in this documentation are either registered or non registered trademarks of their
    respective owners.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 13-





    Introduction
    User Manual Startup with Ford SLP1
    About This User Manual
    1.8 Errata Sheet of Hardware Manufacturers
    Caution! Vector only delivers software!
    Your hardware manufacturer will provide you with the necessary errata sheets concerning
    your used hardware. In case of errata dealing with CAN, please provide us with the rel-
    evant erratas and we will examine whether this hardware problem is already known to us
    or whether to get a possible workaround.
    Note
    Because of many NDAs with different hardware manufacturers or because we are not
    informed about them, we are not able to provide you with information concerning hardware
    errata of the hardware manufacturers.
    1.9 Example Code
    Caution!
    All application code in any of the Vector User Manuals is for training purposes only. They
    are slightly tested and designed only to understand the basic idea of using a certain com-
    ponent or set of components. Vector gives consent that you use it as a basis for developing
    your own code and modify it (Vector waives its copyright to forbid you the use), however,
    with regard to the fact that the code is designed for training purposes only and not for the
    use by you, usability of the code is not warranted and Vector’s liability shall be expressly
    excluded in cases of normal negligence, to the extent admissible by law or statute. Of
    course you have to test the software developed on the basis of the code with diligent care
    before using the software.
    1.10 What Do You Learn from This Manual
    Use this document to
    Set up your project in just a few steps
    Learn how to use the Vector tools
    Learn how to work with the AUTOSAR means like software components, runnables, etc.
    Work with the Vector AUTOSAR Solution on a basic level
    Get a feeling of what you have to do when you start working for your actual project
    The document is split in two parts, a STEPbySTEP description and an Expert Knowledge (Con-
    cepts) 
    section.
    > STEPbySTEP
    This section gives you a short overview how to set up your project in just a few steps. Use the step
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 14-


    Introduction
    User Manual Startup with Ford SLP1
    About This User Manual
    by step description to start up with basic information and get your project basically running.
    > Expert Knowledge
    This section gives you a detailed information about working with Vector AUTOSAR Solution. It con-
    tains expert knowledge based on STEPbySTEP description sections and information about tool use
    and general AUTOSAR concepts.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 15-




    Introduction
    User Manual Startup with Ford SLP1
    Basics
    2 Basics
    2.1 An Overall View
    What we are talking about is an ECU, a module to be built-in a vehicle . The ECUs have to com-
    municate with other ECUs and therefore almost every ECU participates in a bus system like e.g. CAN,
    FlexRay, LIN, MOST or IP. Any ECU within one bus system has to provide an identical interface to this
    bus system, because all ECUs have to share information via this bus system.
    The illustration below shows an example of a CAN network that connects the ECUs of a vehicle.
    All ECUs are built-up in a very similar way. There is a software part to perform the main job (applic-
    ation) of the ECU, e.g. to control the engine or a door. The other part handles the network com-
    munication and diagnostics.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 16-




    Introduction
    User Manual Startup with Ford SLP1
    Basics
    2.2 MICROSAR - Vector's AUTOSAR Solution
    The Vector MICROSAR Solution provides efficient and scalable basic software modules and an RTE for
    AUTOSAR ECUs.
    The individual AUTOSAR basic software modules are grouped into MICROSAR products that of related
    functions. The configuration of the MICROSAR basic software with DaVinci Configurator Pro is simple,
    user-friendly, and consistent. The included command-line-based generators create optimized code for
    your ECU based on the configuration.
    Cross Reference
    To get more information about the MICROSAR concept refer to General Overview on page
    72
    .
    2.3 AUTOSAR Layer Model Ford
    The following figure shows the AUTOSAR Layer model for Ford.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 17-



    Introduction
    User Manual Startup with Ford SLP1
    Basics
    2.4 Configuration Workflow Ford SLP1
    The following figure shows the configuration workflow for Ford SLP1:
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 18-


    STEP by STEP
    User Manual Startup with Ford SLP1
    STEPbySTEP
    I STEPbySTEP
    This section shows you the few steps that are necessary to set up your project. Use it to start with
    basic information and get your project basically running.
    STEP1 Setup Your Project
    STEP2 Define Project Settings
    STEP3 Validation
    STEP4 Start BSW Configuration
    STEP5 Design Software Components
    STEP6 Mappings
    STEP7 Code Generation
    STEP8 Add Runnable Code
    STEP9 Compile, Link and Test Your Project
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 19-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    1 STEP1 Setup Your Project
    This section includes all information for setting up a new project. It starts with the situation after
    installation and provides you with all information about relevant tools.
    Expert Knowledge
    You need to know more? See section New Project on page 82.
    1.1 Situation after Installation
    Before you start your first steps with Ford SLP1 check whether you have installed all necessary
    tools and software.
    Have you read the Installation Guide? Have you received and installed all the necessary tools
    mentioned there?
    Have you installed the MICROSAR SIP?
    NO? Then please read the installation guide carefully and follow the installation guidelines given there.
    Cross Reference
    You will find the installation guide document at the Vector Knowledge Base:
    https://vector.com/kbp/entry/640/
    YES? You are ready to continue and to start with your first steps with the Ford SLP1 solution.
    1.2 Setup Project via DaVinci Configurator Pro
    Start the DaVinci Configurator Pro to set up your project.
    Note
    The DaVinci Configurator is located in your SIP Folder:
    <SIPFolder>\DaVinciConfigurator\Core\DaVinciCFG.exe
    1. Open File|New.
    A set of four configuration windows will open;
    General Settings,
    Target,
    Project Folder Structure,
    Tools.
    2. Enter the necessary information for each window and click [Next>] to get to the next window.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 20-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    Note for No-Communication Projects
    For projects without communication modules like e.g. DEM only, just confirm the windows
    Target and Tools as this information is not relevant.
    Especially the Target window will show pull-down menus where (undefined) is preset and
    nothing else can be selected. This is not relevant for your use case and can be confirmed
    with [Next].
    1.2.1 General Settings
    The following settings are required for project setup.
    > SIP root path
    The SIP root path will be defined automatically based on the DaVinci Configurator Pro location and
    cannot be changed by the user!
    The DaVinci Configurator Pro is always located within the SIP.
    > Project Name
    The name of your project (e.g. MyECU). It will be used as name of the generated ECUC files and
    for the DaVinci Developer workspace.
    > Project Folder
    This is the root path of your project. Select an existing one or define a new one.
    > Create entries in the start menu
    The checkbox Create entries in the start menu is set as default. This is a comfortable feature
    that enables you to open your tools and project folder directly from the Windows start menu.
    1.2.2 Target
    Check DerivativeCompiler and Pin layout (automatically set, based on SIP information).
    If you want to use Postbuild-Loadable or Postbuild-Selectable for your project, activate the neces-
    sary support option.
    1.2.3 Project Folder Structure
    Define your output paths here. You can use the given defaults or change paths to fit your project’s
    needs.
    Note
    Default paths are based on the location of the defined project folder.
    ECUC File Granularity
    Additionally, you can specify whether the ECUC should be saved as one file (Single file) or is split into
    several files (One file per module).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 21-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    Note
    Split to several files is necessary to realize a multi user concept. Refer to Multiple User
    Concept.

    1.2.4 DaVinci Developer
    > DaVinci Developer Workspace
    If you have a RTE and you use the DaVinci Developer select the checkbox Create DaVinci
    Developer Workspace 
    and define the path to the DaVinci Developer executable the path to the
    workspace.
    > Automatic Update of DaVinci Developer Workspace
    Option used for updating the DaVinci Developer workspace during the project update process.
    Details see DaVinci Developer help.
    3. Click the button [Finish] to create your project.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 22-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    1.3 Result Project Folder - Result of the Project Setup
    The DaVinci Configurator Pro automatically creates and stores all relevant files to the project folder.
    The content of the folder looks like shown and described below.
    1.3.1 Appl folder
    The Appl folder contains the folders GenDataGenDataVtt and Source. In GenData the con-
    figuration tools generate their output files. If vVIRTUALtarget is used, the generated output will be
    stored in GenDataVtt. The Source folder is meant to carry your source code files.
    1.3.2 Config folder
    The Config folder contains the following folders:
    > ApplicationComponents
    This is a folder to put in additional SWC-Ts (Software Component Types). The DaVinci Configurator
    Pro reads in all *.arxml files of this folder.
    > Developer
    All relevant project data for DaVinci Developer is located in this folder.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 23-







    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    > ECUC
    This folder contains the created ECUC files. Before you add your input file(s), these files are only
    placeholders without content.
    File Name
    Description
    ECU Configuration Description
    <ProjectName>.ecuc.arxml
    Initial ECU Configuration Description for internal tool use
    <Pro-
    only.
    jectName>.ecuc.Initial.arxml
    > InternalBehavior
    This folder contains the bswmd files for all activated modules in the DaVinci Configurator.
    > McData
    Folder is used for storing measurement and calibration data.
    > ServiceComponents
    The DaVinci Configurator stores all generated Service Component Prototypes to this folder.
    Note
    After you have added your Input file(s) and updated the configuration in the DaVinci
    Configurator, the System folder will be added to the Config folder.
    > System
    The input file(s) and an additional created input file extract for communication use are stored to
    this folder.
    Do not edit manually!
    These files must not be modified manually!
    > VTT
    In case of activated Virtual Target option, the vVIRTUALtarget project file is located here.
    1.3.3 <ProjectName>.dpa
    Project File
    includes all relevant project data. Additionally the context menu
    of this file is the control center to open your tools with already loaded projects.
    1.3.4 Log Folder
    Folder for the generated log files.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 24-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP1 Setup Your Project
    1.4 Start Menu - Result of the Project Setup
    The DaVinci Configurator Pro creates a link to start the tools with already loaded configuration. You
    will find this link in Start | Programs | Vector AUTOSAR Projects | <ProjectName> if Create
    entries in the startmenu 
    was selected while project setup.
    Info
    You can also use the *.dpa file to start your project with already loaded configuration.
    Therefore right-click on your *.dpa file in the Windows Explorer and select Configure
    BSW 
    to open the DaVinci Configurator Pro with already loaded configuration or Configure
    SWCs 
    to open the DaVinci Developer for Software Design and Data Mapping.
    If the Virtual Target option is enabled in the project, then Open vVIRTUALtarget project
    is additionally available.
    1.5 DaVinci Configurator Pro Project
    After finishing project set-up, a new empty project is loaded within the DaVinci Configurator Pro.
    Note
    Editors to configure modules will be available after input file import (see Add Input Files on
    page 26) 
    or after module activation (see Activate Your BSW Modules on page 31).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 25-











    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    2 STEP2 Define Project Settings
    Before you start with the configuration it is necessary to define some project-specific data. This is
    the definition of project-specific data and the definition of all necessary input file(s) for com-
    munication and diagnostic purpose. Additional external generation steps and the activation of the
    necessary Basic Software Modules have to be done in the DaVinci Configurator Pro Project Settings
    view before.
    Expert Knowledge
    You need to know more? See section Project Settings on page 88.
    Note
    In case of OS only projects, skip the next sections Add Input FilesExternal Gen-
    eration Steps 
    and SWC Templates and Contract Phase Headers and go on with Activ-
    ate Your BSW Modules on page 31
    .
    2.1 Add Input Files
    Open Input Files editor via Project | Input Files or use the input file button
    of DaVinci
    Configurator Pro toolbar.
    Note
    Any change of the input files requires an update of the configuration. Add all relevant files
    before starting the update process.
    2.1.1 Add System Description Files
    Add your System Description File first. Therefore open the System Description Files view
    . First you have to decide if you add AUTOSAR Files (arxml)
    or Legacy
    Files (dbc, xml, ldf)
    .
    Note
    The following section describes the import of AUTOSAR files. If you use legacy file as input,
    you have to perform nearly the same steps, only for 1. Legacy Files button
    has to be
    selected.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 26-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    1. Use the AUTOSAR Files button
    to open the window where you can add your AUTOSAR files.
    2. Add your Input Files via [+]
    3. Go on with [Next] and select the ECU instance.
    4. Make your input file path relative to your project folder via Make Path Relative button
    2.1.2 Add Diagnostic Data Files
    Note - Diagnostic Extract as Input!
    If your diagnostic input file is a Diagnostic Extract, then add this file as if it was a Sys-
    tem Description file as described in the previous chapter.
    If diagnostic is used, you have to add a diagnostic data file. If not, you can skip this section. There are
    different use cases to import diagnostic data, decide if you import your data from a diagnostic data file
    or from an already existing configuration.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 27-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    Use Case 1: Import Diagnostic Data from ODX, PDX or CDD File
    Open your project in the DaVinci Configurator and go on with the following Steps to import your dia-
    gnostic data from a diagnostic data file.Open the Input Files editor via Project | Input Files or use
    the input file button
    of DaVinci Configurator Pro toolbar
    1. Open the Diagnostic Data Files view
    in the Input File editor
    2. Open the Diagnostic Fileset Configuration window via Add, remove or modify diagnostic data
    button
    3. Browse for the Diagnostic Description File (*.cdd/*.pdx/*.odx)
    4. Select ECU and Variant
    Use Case 2: Import Diagnostic Data From an Existing Configuration
    Open your project in the DaVinci Configurator and go on with the following steps to import your dia-
    gnostic data from an existing Configuration.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 28-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    1. Start Import Assistant via File | Import
    2. Add [+] ECUC File and go on with [Next]
    3. Select modules which should be imported and close the Modul Configuration Import dialog via
    [Finish].
    Make your input file path relative to your project folder via Make Path Relative button
    2.1.3 Add Standard Configuration Files
    In some cases an OEM-specific preconfiguration is necessary, therefore add the Standard Con-
    figuration File provided by your OEM. Add fragments of ECUC modules which will be used as project
    specific mandatory configuration.
    2.1.4 Update Configuration
    Any change of the input files lead to Pending Update state of the project, this requires an update of the
    configuration.
    Update the configuration via
    .
    What happens during the configuration update process?
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 29-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    The project file will be updated based on loaded input/diagnostic files.
    Note
    After the first update/import of data bases all required modules are automatically enabled.
    This information is derived from the data base. If further modules are required or some
    shall be removed please refer to section Activate Your BSW Modules on page 31.
    2.2 Define External Generation Steps and SWC Templates and Contract Phase Headers
    To define external generation steps/SWC templates and contract phase headers, open Project Set-
    tings Editor via Project | Project Settings or use the project settings icon
    of DaVinci
    Configurator Pro toolbar.
    2.2.1 External Generation Steps
    You have external software that needs to be started during the code generation of DaVinci
    Configurator? Or just before? Or afterwards?
    Then link your software to the External Generation Steps of DaVinci Configurator Pro.
    How? Follow these steps.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 30-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    1. Select Code Generation External Generation Steps
    2. Add [+] step
    3. Define
    Name,
    Command line executable,
    Execution Type and
    Working folder.
    2.2.2 SWC Templates and Contract Phase Headers
    To generate software component templates and/or contract phase headers perform the following
    steps:
    1. Select SWC Templates and Contract Headers | Settings and choose the generation mode
    2. Go to SWC Template and Contract Headers and tick the checkbox of the software components
    for which you want to generate SWC templates and/or contract phase headers
    Cross Reference
    For the generation of the SWC templates and contract phase headers please refer to STEP7
    Code Generation on page 64
    .
    2.3 Activate Your BSW Modules
    Before you start configuring your Basic Software, you have to activate all modules you need for your
    project. Therefore open Project Settings Editor via Project Project Settings or use project set-
    tings icon
    at DaVinci Configurator Pro toolbar.
    Select Modules to see all modules currently activated for your project.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 31-







    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    Info
    It depends on your Input File which modules are loaded initially.
    You need additional modules?
    1. Click [+] and select the source of the module definition.
    2. Select the module you would like to add to your configuration and confirm with [OK].
    Info
    Multiple selection is possible for activating or deactivating modules.
    Not all modules are needed?
    To delete not used modules, select the module and delete it via [x].
    Caution!
    It is not recommended to delete initially activated modules from project!
    You have a completely configured module and would use this for the current con-
    figuration?

    1. Make sure, that the module you would like to import and use it, is deactivated in your current pro-
    ject.
    2. Select File Import
    3. Add [+] ECUC file including the configured module
    4. Click [Next]
    5. Select the module configurations to be imported
    Note
    It is not allowed to import BSW modules which are currently activated.
    6. Click [Finish]
    2.4 Change Project Settings
    In some cases it is necessary to change project settings, which was defined while project setup. There-
    fore select Project Settings and activate editing via Edit Project settings icon
    .
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 32-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP2 Define Project Settings
    2.4.1 Postbuild Support
    Caution!
    These parameters should be changed for compelling reasons only. Parameter changes,
    require a lot of manual adjustment after project update!
    Note
    In case of project migration, the parameters will be set automatically.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 33-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP3 Validation
    3 STEP3 Validation
    Start initial validation process to solve the first warnings and errors.
    The DaVinci Configurator Pro provides validation routines that run in the background and are called
    Live Validation. At the beginning of the configuration, the project is incomplete and much inform-
    ation in the system is still missing. Therefore the DaVinci Configurator Pro offers a powerful solving
    algorithm.
    Expert Knowledge
    You need to know more? See section Validation on page 91.
    3.1 Start Solve All Mechanism
    First of all start solving mechanism via the Solve All button
    at the validation view of the DaVinci
    Configurator.
    Note
    Not all errors can be fixed with Solve All mechanism.
    Some errors might have two or more solutions, these errors cannot be fixed automatically
    and need your decision.
    3.2 Live Validation - Solving Actions
    The DaVinci Configurator Pro provides a live validation during project configuration. For some para-
    meter errors the live validation process offers possible solution(s) in the validation view of the DaVinci
    Configurator Pro. These errors are marked with a bulb.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 34-







    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP3 Validation
    Note 3rd Party Module Live Validation
    If Automatic Generation Validation is activated in Project Setting Editor, the con-
    figuration of 3rd party modules is also checked while live validation.
    Check if the suggested solving action is correct. Double click the error message to open the con-
    figuration window of the parameter.
    Solving Action is correct?
    Start the solving action via double click on the solving action entry in the validation window.
    Note
    If the solving action is not correct, you can additionally use the link in the solving action to
    navigate to the parameter and configure the changes manually.
    Cross Reference
    You find more information about the feature Acknowledgment in the help of the DaVinci
    Configurator Pro.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 35-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    4 STEP4 Start BSW Configuration
    Start the configuration of the BSW modules now. The target of this first description is a basically
    working configuration, using a minimal necessary configuration.
    Expert Knowledge
    You need to know more? See section Configuration with Configurator Editors on page 92.
    Note
    Changes in Configurator Editors could lead to errors during live validation!
    If these errors include solving actions, check and start solving action in the validation view
    4.1 Start Configuration with Configuration Editors
    The configuration editors are use case-oriented and optimized for displaying or configuring those parts
    of the ECU configuration, which are related to the use case.
    4.2 Base Services
    The Base Services domain contains configuration editors for the configuration of the development
    error reporting, general purpose timer channels, microcontroller units and RAM test algorithms.
    4.2.1 Development Errors
    Open Development Errors Enable or Disable Error Tracing and select necessary modules or
    domains to enable the development error tracing.
    4.2.2 General Purpose Timer (GPT)
    Use default settings.
    Note
    If the editor is deactivated (greyed out), you can activate the General Purpose Timer (GPT)
    module via click. The Modules Assistant opens to specify the short name of the module to
    be added. Click finish to add the module.
    4.2.3 Microcontroller Unit
    1. Open tab McuModuleConfiguration
    2. Create new configuration via [here].
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 36-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    3. Open Clock Config Sets McuClockSettingConfig McuClockReferencePoint, add [+] an
    McuClockReferencePoint and define Clock Reference Point Frequency
    4.2.4 RAM Test
    Some hardware-specific settings are necessary.
    Note
    If the editor is deactivated (greyed out), you can activate the RAM Test module via click.
    The Modules Assistant opens to specify the short name of the module to be added. Click fin-
    ish to add the module.
    4.3 Communication
    The Communication domain contains configuration editors for the configuration of general parameters
    of the communication related modules, ECU Bus Controllers, protocol data units, data signals and the
    transport protocol.
    Note
    The following setting description are meant for demonstration purposes only and can differ
    from the settings, that are necessary for your project.
    If there are modules describe, you do not have in your project, skip this chapter.
    4.3.1 Communication General
    Define central settings of the communication based modules.
    CAN
    1. Open CAN Miscellaneous
    2. Set […] parameter Counter Ref to SystemTimer.
    3. Set Interrupt Category to CATEGORY 2
    4. Set Interrupt Lock to DRIVER
    4.3.2 Bus Controller
    1. Open the CAN Controllers <CANController>
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 37-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    2. Define […] Controller Default Baudrate
    3. Define […] CPU Clock Ref
    Note
    If no CPU Clock Ref is available, add a new reference via [+] in the Select Reference Tar-
    get view.
    4.3.3 PDUs
    Configure the PDUs of the modules (depends on your project)
    CAN/LIN
    CANIF/LINIF
    CANTP/LINTP
    PDUR
    IPDUM
    COM
    4.3.4 Signals
    Configure the communication signals of the ECU.
    4.3.5 Socket Adapter Users
    Use default settings.
    Note
    If the editor is deactivated (greyed out), you can activate the SOAD module via click. The
    Modules Assistant opens to specify the short name of the module to be added. Click finish
    to add the module.
    4.3.6 Transparent Diagnostic Gateway
    For the configuration of the transparent diagnostic gateway feature, some additional manual con-
    figuration steps are necessary.
    This gateway functionality can be realized by the following two gateway routing methods
    > Range-routing gateway routing
    Used for routing of the diagnostic request and response messages, not addressed to the gateway-
    own diagnostic handler
    > Functional requests gateway routing
    Used for broadcasting of the functional diagnostic request messages addressed to ECUs including
    the gateway-own diagnostic handler
    The architecture of the transparent diagnostic gateway is visualized in the following figure.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 38-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Cross Reference
    The detailed step-by-step configuration description of the two gateway routing methods can
    be found in the PduR technical reference document (TechnicalReference_PduR.pdf):
    Use Case Configuration: Communication interface range gateway
    Use Case Configuration: Functional requests gateway routing
    Note
    As of November 2016, only standard IDs are used by Ford. The use of 29-bit IDs is planned.
    4.4 Diagnostics
    The Diagnostic domain contains comfort editors for the configuration of extended data records and
    snapshot records, diagnostic events and production error handling of the individual BSW modules and
    an automatic setup of the NV memory blocks.
    4.4.1 Diagnostic Event Data
    Use default settings as these have been derived from input files.
    4.4.2 Diagnostic Events
    If no configuration set is found, use the hyperlink here to create a valid configuration set.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 39-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    4.4.3 Production Error Handling
    Use default settings.
    4.4.4 Setup Event Memory Blocks
    The event memory block configuration needs to be updated. Start the Editor and confirm with
    [finish].
    Note
    The automatic setup of the NV memory blocks is required for diagnostic purpose.
    4.4.5 FNOS Version Numbers
    The version number of the FNOS software (aka package ID, DID F15F) and the NOS message database
    version number(s) (DID F166/ DID F167) have to be readable via diagnostics. The values of the dbc
    attributes
    > VersionDay,
    > VersionMonth,
    > VersionNumber,
    > VersionYear
    are generated as internal Rx signals such that the application can access those values using the RTE
    (or the Com). You can find the signals in Rx PDUs starting with FileVersion.
    Parts of the package ID (DID F15F = NOS Generation Tool Version Number) are also generated from
    the delivery ID, which can be found in the delivery description.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 40-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Note
    The delivery ID (10 Byte number) is set up in the following way
    17.00.00.01.40.04.12.00.00.00
    <xx.yy.zz><0><DeliverySubProjectNumber><DeliveryNumber><00.00>
    xx.yy.zz are the FNOS release version numbers:
    xx= major version,
    yy= minor version,
    zz= revision.
    The DeliverySubProjectNumber (aka CBD number) and the DeliveryNumber are part of the NOS Gen-
    eration Tool Version Number
    .
    Note
    The NOS Generation Tool Version Number is set up in the following way:
    08.09.00.01.40.04.12.00.00.00
    <08.09.00><0><DeliverySubProjectNumber><DeliveryNumber><00.00>
    These values are also generated as internal Rx signals. Their names start with Deliv-
    erySubProjectNumber/DeliveryNumber
    .
    4.4.6 Importing OBD Freeze Frame Data in DaVinci Configurator Pro
    In the diagnostic description file the OBD Freeze Frame PIDs are configured at service $19 05. If ser-
    vice $19 05 is active in the description file the Diagnostic Importer of Cfg5 will import the OBD freeze
    frame data and activate automatically the OBD services $01 and $02 for the DCM module.
    4.5 Memory
    The Memory domain contains comfort editors for the configuration of the general parameters of the
    memory related modules, the memory block in the non volatile memory blocks.
    4.5.1 Memory General
    If FEE is used, define
    > BSS Thresholder Reserved
    BSS - Background Sector Switch
    > FSS Thresholder Reserved
    FSS - Foreground Sector Switch
    4.5.2 Memory Blocks
    Open Memory Partitions PartitionConfiguration and define
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 41-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    > Partition Device
    Add the reference to their device of the partition
    Note
    If the editor is deactivated (greyed out), you can activate the EA/FEE module via click. The
    Modules Assistant opens to specify the short name of the module to be added. Click [fin-
    ish] 
    to add the module.
    4.5.3 Optimize Fee
    If Fee is used, start FEE Optimization. The number of chunk instances (parameter FeeNum-
    berOfChunkInstances) of the Fee blocks will be optimized. Please review the new value or select
    "skip" to leave the parameter.
    Note
    If the editor is deactivated (greyed out), you can activate the FEE module via click. The
    Modules Assistant opens to specify the short name of the module to be added. Click [finish]
    to add the module.
    4.6 Mode Management Editors
    The Mode Management domain contains comfort editors for the configuration of BSW Management,
    ECU Management, initialization and restart sequences of the BSW modules, sleep modes and wakeup
    sources, supervised entities and watchdog modes.
    4.6.1 BSW Management
    Auto Configuration: Ecu State Handling
    Open Auto Configuration: Ecu State Handling and configure Ecu State Handling settings via Configure
    Ecu State Handling hyperlink
    . The Configure Ecu State Handling dia-
    log opens.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 42-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Select the necessary use case definitions to create a state machine similar to the behavior of EcuM Fix
    in AUTOSAR3.
    Note
    If you select Ecu State Machine, you have to define the project-specific settings Self Run
    Request Timeout 
    and Number of Run Request User.
    Auto Configuration: Module Initialization
    Open Auto Configuration: Module Initialization and configure Module Initialization via Configure Mod-
    ule Initialization hyperlink
    . The Configure Module Initialization dia-
    log opens.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 43-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Make sure to set Enable Interrupts and Restore Default Sequence. For the latter setting you have
    to activate Initialize known modules.
    Select module to create the necessary callouts to initialize the modules.
    4.6.2 Activate Interrupts of Peripherals Devices
    Activate Enable Interrupts to get the callout BswM_AL_SetProgrammableInterrupts. Use this cal-
    lout to activate interrupts of the peripherial devices. Exceptions form this rule are explained in the
    technical reference of the drivers.
    Note
    Configure module initialization at initialization view.
    Note
    If Restore Default Sequence is activated, the lists will be sorted automatically, all new
    entries will be located at the end of the list.
    Auto Configuration: Communication Control
    Open Auto Configuration: Communication Control and configure Communication Control via Con-
    figure Communication Control hyperlink
    . The Configure Com-
    munication Control dialog opens.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 44-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Select the bus systems for which you would like to create standard communication rules.
    Custom Configuration
    If necessary you can define additional Custom BswM Configuration information.
    Note
    To create a rule, at least one logical expression and one action list is necessary. If they
    are not available, you can additionally configure them via Create Rule dialog.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 45-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    1. Open Custom Configuration, right click Rules and select Create Rule.
    2. Define Short Name
    3. Go on with [Next]
    4. Define a non-empty expression for the resulting condition
    5. Configure Action List True, therefore define actions to be executed if the rule's condition evaluates
    to true.
    6. Configure Action List False, therefore define actions to be executed if the rule's condition evaluates
    to false.
    Note
    If no actions are configured, no action list will be created.
    Note
    It is possible to create groups [+] subdivide the BSWM configuration into logical sections.
    The elements can be organized in groups using drag and drop in the editor tree.
    The groups are only for organization reason, functional usage is not possible. You can't
    move elements from auto configuration to the created BSWM Group.
    4.6.3 ECU Management
    1. Open EcuMCommonConfiguration and define the OS Resource which is used to bring the ECU
    into sleep mode.
    2. Open EcuMFlexConfiguration and define Mcu Mode Ref which is being restored after a sleep.
    4.6.4 Initialization
    Open Initialization to configure initialization and restart sequence of the basic software.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 46-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Pre-OS Initialization Sequence
    1. Open Initialization Sequences Pre-Os Driver Initialization and choose the Driver Init
    List that you want to configure.
    2. Open Driver Init List EcuMDriverInitItems. Each module in the list will be called for ini-
    tialization in the list order. Modify the processing order via drag and drop in the tree:
    3. Select all MCAL modules and the DET to call them on ECU startup.
    4. Select EcuMDriverInitItems and delete via the Delete containers button
    those modules
    from the list that shall not be initialized before the OS initialization.
    4.6.5 Watchdogs
    Use default settings.
    Note
    If the Editor is deactivated (greyed out), you can activate the Wdg module via click. The
    Modules Assistant opens to specify the short name of the module to be added. Click [fin-
    ish] 
    to add the module.
    4.7 Network Management
    The Network Management domain contains editors for the configuration of the general network man-
    agement parameters and users which are relevant for the ECU communication management.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 47-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Note
    Please make sure that within the dbc file the Network Attribute NmType is set to Ford-
    OSEK
    . Only one NM is allowed on one CAN bus and it has to be AUTOSAR NM.
    If a node doesn’t use NM make sure that the node attribute NmStationAddress is set to 0
    (default).
    4.7.1 Partial Networking
    Partial Networking isn't used by Ford.
    4.8 Runtime System
    The Runtime System domain contains comfort editor for the configuration of general RTE and OS para-
    meters, operating system and mapping assistants.
    4.8.1 Runtime System General
    OS
    1. Open Runtime System General OS and activate/deactivate the following settings if necessary.
    Stack Monitoring
    Use GetServiceId
    Use Parameter Access
    2. Define Scalability ClassCC and Schedule.
    3. Open OS Hook Routines and activate/deactivate the following settings if necessary.
    Startup Hook
    Error Hook
    Shutdown Hook
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 48-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Pre-Task Hook
    Post-Task Hook
    Protection Hook
    Note
    The Shutdown Hook is required for shutdown of the ECU to power off.
    The Error Hook is recommended to inform the application on any error events in the OS.
    4.8.2 ECU Software Components
    Service Components
    Open ECU Software Components Service Components and check if all Service Components are
    added to your project. If not create new component prototypes, based on component types created by
    the DaVinci Configurator Pro.
    Note
    The component types are stored in <ProjectFolder>\Config\ServiceComponents.
    4.8.3 OS Configuration
    Create Tasks
    Open OS Configuration Task. Add the following tasks, define Schedule, Priority and Type.
    Init_Task (Autostart has to be enabled!)
    Rte_Task
    Main_Task
    Note
    All events and alarms which are required are created by the RTE automatically.
    Derived from the settings for the runnables and their activation (triggers) some OS events
    an OS alarms will be created automatically for RTE by the DaVinci Developer. The names
    start with Rte_.
    4.9 Go on with Basic Editor
    Open the Basic Editor and configure additional settings, currently not supported by specific con-
    figuration editors.
    Note: Bottom Up Approach - from hardware-dependent to hardware-inde-
    pendent modules

    Start configuration with hardware dependent modules and continue with the hardware inde-
    pendent modules.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 49-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    4.10 Start Solving Actions
    Changes in Configurator Editors/Basic Editor could lead to errors during live validation!
    If these errors include solving actions, check and start solving action in the validation view.
    4.11 Start On-demand Validation
    The on-demand validation is performed in addition to the automatic validation before starting the code
    generation or on explicit user request. The on-demand validation calls the specific validation function
    of the code generators.
    1. Open On-demand Validation dialog via on-demand Validation button
    2. Deactivate RTE
    Note
    Currently the RTE is not configured completely, this causes errors while validation. The RTE
    configuration will be finished after SWC Design in the DaVinci Developer.
    3. Start the Validation via [Validate]
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 50-


    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP4 Start BSW Configuration
    Validation finished successfully?
    Validation finished NOT successfully?
    See error message in validation view and fix the configuration.
    4.12 BSW Configuration finished
    You have finished your BSW Configuration?
    Now it depends on your project, how to go on. You have created a Developer workspace while setting
    up the project? Then you have to go on with the STEP5 Design Software Components on page 52 using
    the DaVinci Developer. If you have no Developer workspace, you can skip the following chapter an go
    on with STEP6 Mappings on page 53.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 51-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP5 Design Software Components
    5 STEP5 Design Software Components
    Switch to the DaVinci Developer to create, configure or modify software components, create or add
    ports and data elements. Connect software components and define runnables and their activation
    and interfaces (data access).
    Expert Knowledge
    You need to know more? See section Software Component Design on page 93.
    5.1 Switch to DaVinci Developer
    You can start DaVinci Developer with already loaded project in two different ways:
    > Start Programs Vector AUTOSAR Projects <your project name> Configure SWCs
    (Only if Create entries in the start menu is selected)
    Right-click on your <projectname>.dpa and select DaVinci Project Assistant Configure
    SWCs
    5.2 Design Software Components
    If the software components are not delivered by the OEM, use the DaVinci Developer to design your
    software components. How to do this is described more detailed in the expert knowledge part of this
    manual. Use the link above.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 52-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    6 STEP6 Mappings
    Start project mappings via assistants offered by the DaVinci Configurator Pro. It is also possible to
    perform data mapping within the DaVinci Developer.
    Expert Knowledge
    You need to know more? See section Mappings on page 114.
    6.1 Perform Data Mapping within DaVinci Developer or DaVinci Configurator?
    Via the data mapping, you connect data elements with network signals. Network signals have been
    loaded via import of ECU Extract of System Description.
    Data Mapping can be done in DaVinci Developer or DaVinci Configurator Pro. Decide which tool should
    be used. In the following step, both variants are described.
    Note
    Data Mapping in DaVinci Developer has a higher priority than Data Mapping in the DaVinci
    Configurator Pro.
    Data Mapping performed in DaVinci Developer cannot be overwritten in DaVinci
    Configurator Pro.
    Cross Reference
    To perform data mapping within the DaVinci Configurator Pro, skip this section and go on
    with section Switch (back) to DaVinci Configurator on page 56.
    6.2 Data Mapping within the DaVinci Developer
    The DaVinci Developer offers two ways of data mapping - automatically OR manually.
    6.2.1 Data Mapping Automatically - DaVinci Developer
    Network signal oriented approach
    Select bus signals and let DaVinci Developer create all necessary data elements, ports and the map-
    ping of the signals to the data elements.
    Finally, you only have to drag’n’drop the port interfaces to your software components and create the
    connections. Here is how this works.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 53-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    1. Double-click Data Mapping from the ECU Projects view
    2. Select the Signal view mode
    3. Select signals to create Data Elements and Port(s)
    4. Right-Click selected signals and select Create Port Prototypes … to open the Create Port Prototypes
    window.
    5. Define prefixes and postfixes for the Port Prototype Name, Port Interface Name and Data Element
    Prototype Name.
    6. Select whether you want One Port Prototype per Signal or One Port Prototype for all selected Sig-
    nals.
    Note
    If you select One Port Prototype for all selected Signals, of course the signal must be of
    equal direction, only Tx signals or only Rx signals.
    7. Confirm your settings with [OK].
    8. You see that one Port Prototype, three Data Elements and one Application Port Interface are gen-
    erated. The pre- and postfixes help to easily find them in the list.
    9. Select the Software Design view and see the delegation port that has been also created.
    10. Now drag’n’drop the Application Port Interface form the library to your software component (same
    direction as the delegation port) and connect them.
    6.2.2 Data Mapping Manually - DaVinci Developer
    You can also connect the data elements with real bus signals manually.
    Note
    A prerequisite is that you have to create the necessary delegation ports before!
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 54-






    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    Select Data Mapping in the ECU Projects view and select e.g. the Data Element View Mode
    and
    see a list of data elements. The dash (-) on the right side below Network, Messages and Network Sig-
    nals shows that there is no assignment between data elements and messages/signals from the ECU
    Extract of System Description.
    Right-click the Data Element column and click Select Signal…. Select the suitable signal in the
    Select Signal window and confirm with [OK]. Repeat this until every signal is mapped.
    The result of the data mapping should look like this.
    6.2.3 DaVinci Developer - Save and close
    You have imported your Service Components, configured your Software Components and finished Data
    Mapping?
    Check
    your workspace. If there are no messages in the Output view, save your project and close
    the DaVinci Developer.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 55-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    6.3 Switch (back) to DaVinci Configurator
    Start the DaVinci Configurator Pro (again) with already loaded configuration using one of the two pos-
    sibilities.
    > Start Programs Vector AUTOSAR Projects <your project name> Configure BSW
    (Only if Create entries in the start menu is selected)
    Right-click on your <projectname>.dpa and select DaVinci Project Assistant Configure
    BSW
    6.4 Synchronize System Description
    Changes by the DaVinci Developer require a synchronization of the System Description in the DaVinci
    Configurator Pro.
    The necessity of a synchronization is detected by the validation process of DaVinci Configurator Pro
    and displayed in the Validation view. Start System Description synchronization via the validation
    message RTE59000 Synchronize the System Description.
    6.5 Add Component Connection
    Data elements can only be transported from one application component to another if their ports are
    connected via connectors. Create these connections using the Component Connection Assistant
    (below Runtime System).
    1. Start Assistant, select connector type and go on with [Next]
    Select Application Connector Prototypes to connect software components or Service Con-
    nector Prototypes 
    to connect service components
    2. Select a Component Prototype and go on with [Next]
    3. Select Port Prototypes and go on with [Next]
    4. If necessary select additional search option and go on with [Next]
    Initially the Component Connection Assistant will search matching port prototypes based on the
    port prototype name automatically
    5. Check mapping. All Connector Prototypes are mapped with the right ports? Confirm with [Finish]
    6.6 Service Mapping
    6.6.1 Service Mapping via Service Component
    If you have connected your service components via Add Component Connection in the previous
    step, the service mapping is basically done.
    To define additional mappings manually you have to configure it in the service component directly.
    Therefore open ECU Software Components Service Components and select the service com-
    ponent you want to map. Open service component and select Service Connectors.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 56-








    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    Now you can see all ports, the automatically matched connections and unmapped ports. Is manually
    service mapping necessary?

    Note
    Each client port
    should be mapped to a server port
    ! For all unconnected client
    ports the RTE will generate a dummy function returning RTE_E_UNCONNECTED.
    1. Select the service component port and use the connect button
    2. Assign the appropriate port prototype to the selected port of the service component
    3. Finish the mapping with OK
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 57-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    The appropriate port prototype not exists? You like to connect the port to a new port pro-
    totype?

    Therefore select the service component port and use the button
    to open the Connect To New Port
    Prototype Assistant.
    1. Select the Component to be connected with the selected port prototypes.
    Only those components are displayed which component type is part of the DaVinci Developer work-
    space.
    2. Define the name of the Port Prototype to be created. By default the same name is used. There-
    fore click in the Port Prototype to be created column.
    If a server port is selected, you can additionally select, if server runnables should created.
    3. Click Finish
    What happens?
    The DaVinci Developer will open in background, a new port prototype (Application and Service port pro-
    totypes are possible) will be created within selected application component. The workspace will be
    saved and the DaVinci Configurator project will be reloaded. The new created port is now available
    within the DaVinci Configurator project and will be mapped automatically to the service component.
    6.6.2 Service Mapping (overview)
    Here you can do the complete service mapping. Connect or disconnect services to applications, toggle
    between services view and application view or connect to new port.
    Here you also get a complete overview of all connections.
    6.7 Add Data Mapping
    You have already performed Data Mapping within the DaVinci Developer?
    Yes? Skip this section and go on with Add Memory Mapping on page 60.
    Cross Reference
    See section Perform Data Mapping within DaVinci Developer or DaVinci Configurator? on
    page 53

    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 58-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    No? Start Assistant via Add Data Mapping
    and select mapping direction, i.e.
    choose whether Signals or Data Elements should be mapped.
    Choose Find matching signals for the data elements to assign your signals based on a selected
    data element and go on with [Next]
    Now you can see a list of data elements. The empty row Mapped Signals shows that there is no
    assignment between data elements and messages/signals from the ECU Extract of System Descrip-
    tion.
    Select the Data element prototypes you want to map and go on with [Next].
    Now you can see if matched signals are found automatically. If there are no entry in row Signal to be
    mapped
    , you have to define the signal manually.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 59-





    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    1. Click <Select signal...> to open the Select reference target window.
    2. Select the signal you want to map.
    3. Confirm with [OK].
    Repeat these steps until all data elements you have selected for mapping are mapped to a signal.
    4. Close Data Mapping with [Finish].
    6.8 Add Memory Mapping
    You have to map all per-instance memory objects of the application components to NV memory
    blocks. Therefore use the Memory Mapping Assistant
    .
    Note
    A per-instance memory object is mappable if it is referenced by a service need object. The
    definition of per-instance memory objects or service needs is part of the component type
    definition and not yet editable by DaVinci Configurator Pro.
    1. Start Assistant, choose Use Case and go on with [Next]
    2. Select component prototype and go on with [Next]
    3. Select per-instance memory objects
    Choosing Use Case Find exisiting NV memory blocks?
    Go on with [Next], Check the memory mappings and confirm with [Finish]
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 60-







    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    Choosing Use Case Create new NV memory blocks?
    Confirm with [Finish]
    6.9 Add Task Mapping
    You have to map all runnable entities and schedulable entities (e.g. Main Functions of the BSW mod-
    ules) to a task. There are two ways to perform the task mapping.
    Where to activate the two ways of task mapping
    Either the Task Mapping Assistant
    or the Task Mapping view
    .
    Our advice is to use the assistant for the first mapping and then switch over to the Task Mapping view
    to do the fine tuning.
    Note
    A runnable has to be mapped to a task if it is not re-entrant but could be called re-entrantly
    during system operation.
    6.9.1 Task Mapping Assistant
    1. Start Assistant, select all Triggered Functions with Function Trigger On Init and go on with [Next]
    2. Select Init_Task and go on with [Next]
    3. Define the position in task for each triggered function and confirm with [Finish]
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 61-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    4. Repeat the steps and select all Main Functions of Service Components and Modules and map
    them to Main_Task.
    5. Repeat the steps and select all Runnables of your Application Components and map them to
    Rte_Task.
    Note
    Runnables with Function Trigger On Operation Invocation are normally not needed to be
    mapped to a task, as they result in direct function calls.
    6.9.2 Task Mapping
    The task mapping is one view where you can
    map runnable entities per drag and drop,
    move mapped runnable entities from one task to another,
    filter the list on the left side for mapped mandatory or unmapped runnable entities,
    get information of the mapped runnable entities concerning their triggers, etc.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 62-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP6 Mappings
    More details about the features of this dialog you find in the Online Help of the DaVinci Configurator
    Pro.
    Mappings finished? Validation successful? Then go on with project generation!
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 63-







    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP7 Code Generation
    7 STEP7 Code Generation
    Now you can go on with code generation.
    Expert Knowledge
    You need to know more? See section Generation on page 121.
    7.1 Generate SWC Templates and Contract Phase Headers
    Start the generation of the SWC templates and/or contract phase headers via
    from DaVinci
    Configurator Pro toolbar.
    Cross Reference
    How to select your settings for the generation of the software components templates and
    contract phase headers? See section STEP2 Define Project Settings on page 31.
    7.2 Start Code Generation
    1. Open the Generation dialog via Generate button
    Note
    The activated generation steps depend on the project settings. If you want to take over
    your selection to the project settings press [Change project settings].
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 64-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP7 Code Generation
    2. Start Generation Process via [Generate]
    If you select Start immediately the generation starts immediately after opening this dialog.
    Note
    Before the Generation process starts, Calculation and Validation has to be finished suc-
    cessfully.
    If code generation canceled because of calculation and validation errors, start solving
    actions at the validation window of the DaVinci Configurator Pro (see section STEP3 Val-
    idation on page 34
    ).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 65-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP7 Code Generation
    7.3 Generation Process finished!
    Generation Process finished and all generation steps are marked with Phase finished suc-
    cessfully
    ?
    Note
    The DaVinci Configurator Pro stores all generated *.c and *.h file in the modules files
    folder, given during project setup (the default is <ProjectFolder>\Appl\GenData).
    Go on with implementing your runnables using the runnable skeletons created during the generation
    process.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 66-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP8 Add Runnable Code
    8 STEP8 Add Runnable Code
    If configured, the DaVinci Configurator Pro code generator generates the skeletons for your run-
    nables into the software component template files. Now you have to implement your code to the run-
    nable skeletons.
    Expert Knowledge
    You need to know more? See section Runnable Code on page 122
    8.1 Component Template
    The software component templates contain all runnables of the according software components. The
    RTE Template Generator generates skeletons for the runnables. The structure of those skeletons looks
    as shown in the illustration below.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 67-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP8 Add Runnable Code
    8.2 Implement Code
    Implement your code using the runnable skeletons. Make sure to enter your code between the start
    and end comment. Only this section is protected against modification by a further generation process.
    All other sections like execution information or interfaces can be changed depending on your settings
    in the DaVinci Developer. If access to e.g. a port interface is missing, go back to the DaVinci
    Developer and adapt your configuration, regenerate and then you can use this port interface. There is
    no other way to do it properly.
    Info
    A backup (*.bak) file will be generated before a component template C file is modified to
    make sure that your previous version is not deleted in case of any generation problem
    caused by non-predictable reasons.
    And there is a backup section at the end of the template file to rescue the code of run-
    nables that have been deleted by the DaVinci Developer.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 68-




    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP9 Compile, Link and Test Your Project
    9 STEP9 Compile, Link And Test Your Project
    Now you can compile, link and test to get your executable for the download to your hardware.
    Expert Knowledge
    You need to know more? See section Compile and Link on page 124.
    9.1 Finish your project with compiling and linking
    1. Compile and Link your code.
    You can start compilation of your code from the vVIRTUALtarget tool. Enable the checkbox Build
    Software (DLL) in the VTT tool and select
    [Build]. You can also open the Visual Studio solu-
    tion and start the build process by Build Solution (F7).
    2. Test your code
    A proper compile and Link process is just the beginning. The final step is to test what you have
    done until now. The ideal tester would be CANoe from Vector Informatik.
    To test your application with CANoe, the following steps are necessary:
    Create a new CANoe configuration
    Import the communication matrix (e.g. *.dbc file)
    Right-click on the ECU to be simulated, and click on Configuration
    Open the Components tab, add another node layer DLL and select the *.dll file, you have created
    with the Microsoft Visual Studio solution in the previous steps.
    This completes the basic setup for testing your application. See CANoe references for further
    information.
    Start the simulation.
    Have a look at the trace window and observe bus communication on your virtual ECU.
    3. Debugging the application
    When the simulation in CANoe is started, switch to Microsoft Visual Studio and select Debug |
    Attach to process …
    . Select RuntimeKernel.exe and make sure that the code type (Attach to)
    is set to Native code. Now you can debug your code. For example, try to set a breakpoint in a cyc-
    lic runnable!
    9.2 No error frames? Congratulations, that’s it!
    The basic step is done, the Ford SLP1 software is basically working together with your application.
    That is the base you can start from to optimize your system. Refer to Technical References of the BSW
    modules for more detailed information.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 69-



    STEP by STEP
    User Manual Startup with Ford SLP1
    STEP9 Compile, Link and Test Your Project
    Cross Reference
    You need additional information? See section Additional Information on page 125.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 70-


    Concept Overview
    User Manual Startup with Ford SLP1
    II Concept
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 71-

    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    1 General Overview
    The following illustration shows the basic idea behind AUTOSAR and can be divided up into 3 parts,
    upper, middle and lower part, named as
    Creation of Software Components
    Software Components and ECUs
    Development of ONE ECU
    The upper part deals with software components, runnables, ports and connections. It is the design
    level of functions and applications.
    During the transition to the middle part, the software components are assigned to ECUs. Software com-
    ponents that are assigned to the same ECU can communicate internally, via so-called internal con-
    nections. Software components, that communicate with each other and that are mapped to different
    ECUs communicate via so-called external connection, i.e. via a real bus system.
    In the last transition towards the ECU sight, the BSW is put in-between the software components and
    the hardware. And this is the starting point for the ECU development.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 72-

    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 73-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 74-



    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    The following sub chapters explain all the means that belong to AUTOSAR and that make it work.
    1.1 Software Component
    Software Components are described by their SWC file - a file in XML format. By definition SWC files
    are independent from any ECU except for the sensor and actuator software components. Those soft-
    ware components are dependent on the sensors and actuators attached to a specific ECU.
    There are several kinds of software components
    1.1.1 Atomic components
    Application
    Sensor Actuator
    Calibration
    I/O Hardware Abstraction
    Complex Driver
    Application (End-to-end Protection)
    Non-Volatile Memory Block
    Service components
    1.1.2 Compositions
    Use compositions to group software components.
    1.2 Runnables
    A runnable entity, runnable for short, is a C function that carries your code. It depends on the con-
    figuration of the runnable when it is called and what data your code is allowed to access within the run-
    nable. Runnables are triggered by the RTE.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 75-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    1.3 Ports
    Via ports, a software component can communicate with its outside world. This outside world can be
    another software component within the same ECU or a software component within another ECU. There
    are several kinds of ports:
    1.3.1 Application Port Interfaces
    To communicate between different SWCs
    Sender port
    Receiver port
    Client port
    Server port
    Calibration port
    Mode port
    Interface to non-volatile data
    1.3.2 Service Port Interfaces
    To communicate between BSW and SWCs
    Sender port
    Receiver port
    Client port
    Server port
    Calibration port
    Mode port
    Interface to non-volatile data
    NV Data Interface
    1.4 Data Element Types
    Data elements types determine the kind of data that can pass a port. There are predefined data ele-
    ment types and you can define data elements on your own.
    1.5 Connections
    To define which software components communicate with each other, their ports have to be connected
    via so-called connectors. The connectors realize the sender/receiver and client/server communication
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 76-

    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    between the software components. A connector can only be drawn between two ports, if their port
    interfaces are compatible.
    1.6 RTE
    The RTE is the interface between the SWCs and the BSW. In essence the RTE
    controls the execution of the Runnables (your code),
    controls access of Runnables to the basic software modules,
    controls the access of Runnables to Services of the BSW,
    knows about external and internal transmission of data and
    provides data consistency
    1.7 BSW – Basic Software Modules
    The BSW contains configurable modules that offer services to the SWCs dealing with:
    Communication
    Diagnostics
    Mode management
    Memory management
    Network management
    1.8 Software, Tools and Files
    When setting up a new project using the DaVinci Configurator Pro, many things that are not necessary
    to know for your basic work with the tool happen in the background. But sometimes it might be neces-
    sary to know more. Then this part of the document is the place to get a deeper insight.
    This chapter gives you an overview what kind of files you need to set up a new project, where the files
    normally come from and how to work with the DaVinci Configurator Pro and, if necessary for software
    component design, with DaVinci Developer. Get familiar with what is installed where and how to work
    with it and to know, how to update if necessary.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 77-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    Starting point is the development of a single ECU. The focus is set on the MICROSAR Solution and
    where all the necessary software and files do come from.
    To build up a project according AUTOSAR with MICROSAR from Vector you need the following tool(s),
    software and files:
    > Software Components (SWC) and Runnables
    Software components are created by the OEM or the TIER1. A software component can be an SWC
    file, where you have to perform the task mapping and decide about runnables and the code they
    should contain. Or the software component is delivered ready-made, together with C and H files.
    Then you only have to map it to a task and compile and link the files together with your project.
    > DaVinci Developer (Vector Tool, has to be ordered separately - NOT included within
    the SIP)
    The DaVinci Developer is the Vector Tool to create and configure Software Components. Via a
    graphical view you can draw software components, add ports, draw connections, etc. DaVinci
    Developer and DaVinci Configurator Pro exchange information via the DaVinci Developer Work-
    space.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 78-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    > BSW and RTE (included in SIP)
    The BSW modules together with their BSWMD files (dependent on your order) and the RTE are part
    of the Vector delivery that is called SIP. SIP stands for Software Integration Package. A SIP is
    a ready-made software from Vector, already tailored and tested for your hardware, derivative,
    compiler, compiler version (as you filled-out the questionnaire) and can be put to work within a
    few steps (see step by step description).
    > DaVinci Configurator Pro (included in SIP)
    The DaVinci Configurator Pro is the Vector Tool to configure the BSW and the RTE. It is part of the
    SIP delivery. It contains a comfort editor to configure the BSW cluster-oriented, a powerful val-
    idation concept to check your settings against constraints and it also offers to directly edit
    AUTOSAR parameters.
    1.9 Structure of the SIP Folder
    The screenshot below shows the file structure that is created by installation of the SIP.
    > BSW
    Contains the code files (*.C and *.H) files for each Basic Software Module (BSW).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 79-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    > BSWMD
    Contains the BSWMD files for each Basic Software Module, which include necessary information for
    DaVinci Configurator Pro.
    > DaVinciConfigurator
    Contains the DaVinci Configurator Pro tool itself. This is also the place where your tool is updated
    when an update is available.
    > Doc
    Contains SIP relevant documentation e.g. Technical References, User Manuals, Startups (con-
    taining Release Notes) and Application Notes.
    > Generators
    Contains Generators and additional tools
    > Misc
    Contains SIP-specific additional data
    > ThirdParty
    Contains MCAL-specific data
    Note
    Each MCAL is listed within a separate folder (<MCAL Short Name>).
    This folder includes:
    > \Supply
    Location of the 3rd party MCAL delivery in its original structure
    > \VectorIntegration (optional)
    Location of scripts for the integration into the MICROSAR SIP
    Legal notes (optional)
    See TechnicalReference_3rdParty-MCAL-Integration.pdf for detailed information.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 80-


    General Overview Vector AUTOSAR Solution
    User Manual Startup with Ford SLP1
    Vector MICROSAR for AUTOSAR 4 now has one major tool – the DaVinci Configurator Pro. DaVinci
    Configurator Pro is the starting point, coming with the SIP. To start the tool, use the file DaVin-
    ciCFG.exe 
    located in the CORE folder of the DaVinci Configurator folder.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 81-


    New Project
    User Manual Startup with Ford SLP1
    2 Set-Up New Project
    DaVinci Configurator Pro offers a Project Assistant to set up that helps you setting up a new project file
    in just a view steps. The assistant guides you through several windows to enter necessary project
    information.
    The DaVinci Configurator Pro creates your new project to the defined folder. The project folder con-
    tains:
    > Appl folder for generated files and source files.
    > Config folder for software components, BSWMD files, ECUC files, System description and DaVinci
    Developer workspace
    > Backup folder to store older DaVinci Developer workspaces
    > Log folder
    Access to DaVinci Developer and DaVinci Configurator Pro via context menu on the *.dpa file.
    Your development project consists of a folder structure on your disk, where all the configuration files,
    template files, etc. are generated to and where you implement your runnables using the empty run-
    nable skeletons. Then you compile and link and get your executable that you can download to your
    hardware.
    The DaVinci project file (DPA) is the central file which references all the related folders and files. It
    also references the SIP, which is used for the project.
    2.1 DaVinci Configurator
    As already mentioned the DaVinci Configurator Pro is the major tool for Vector MICROSAR for
    AUTOSAR 4.
    2.1.1 The Main Window of DaVinci Configurator Pro
    The illustration below shows the main appearance of the DaVinci Configurator Pro. It consists of 3
    main areas or views. The positions of the views can be defined manually and depend on your habits in
    handling with tools.
    Navigation view
    Editor Area
    Validation, Output and Properties view
    Cross Reference
    For more information about simple tool handling and icons refer to the help of the DaVinci
    Configurator Pro.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 82-



    New Project
    User Manual Startup with Ford SLP1
    Navigation view
    The Navigation view displays all available editors and assistants sorted by domain. What you select in
    the Navigation view will be displayed in the Editor view.
    Editor area
    The Editor area is the place to configure the modules or whatever you have selected in the Navigation
    view.
    Validation view
    The Validation view displays the overall list of validation messages.The messages are grouped by their
    ID. You may expand such a group to display all message of the same ID. By expanding an individual
    message, the related items are displayed as well as the proposed solutions, the so-called solving
    actions.
    Using according commands in the shortcut menu you can navigate to the editors displaying the related
    items, or execute one of the proposed solutions for solving the problem.
    You can use the Validation view with the following buttons:
    > Solve All
    Calls the default solving action of all messages that provide a default solving action.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 83-




    New Project
    User Manual Startup with Ford SLP1
    > Clear On-Demand Validation Messages
    Deletes all validation messages issued by the external generators during the on-demand val-
    idation.
    > Link with Editor
    Filters the Validation View to display only messages related to the currently focused editor.
    Properties view
    The Properties view displays details of the object (parameter or container) selected in an editor. The
    view contains the following tabs:
    > Definition: Displays the definition of the selected object
    > Status: Displays information about the parameter state
    > Description: Displays the description of the parameter definition
    Project Settings
    This Overview shows all necessary project data and enables the configuration of customer workflow
    steps, the definition of external configuration steps and the activation of additional BSW modules.
    Code Generation: Configure the code gen-
    eration sequence
    Settings: The code generation settings can be
    changed within this section
    External Generation Steps: Define and
    execute a sequence of custom workflow step
    Customer Workflow: Configure and execute a
    sequence of custom workflow steps
    SWC Template and Contract Headers:Defin-
    ition of additional pathes to BSWMD files rel-
    evant for the project.
    Modules: Activate or deactivate modules
    Additional Definitions: Definition of addi-
    tional pathes to BSWMD files relevant for the
    project.
    Additional Definitions: Definition of addi-
    tional pathes to BSWMD relevant for this project
    ECUC File Reference: Include mechanism for
    external ECU configuration files from other pro-
    jects.
    Variants: Handling of Variants when used.
    Project Settings: The project settings can be
    changed within this section.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 84-




    New Project
    User Manual Startup with Ford SLP1
    2.1.2 Editors and Assistants
    Generally spoken there are two different configuration editor concepts in the DaVinci Configurator Pro.
    > Domain-specific configuration editors, which provide an optimized view on the ECUC
    > Basic Editor, which provides a native view on the ECUC
    Assistants
    An assistants guides you through special tasks like connections, data mapping, memory mapping or
    task mapping.
    Switch Between the Two Editors
    You can switch from the basic editor to the domain-specific comfort editor and back. Move to a setting
    or a value and click the little triangle to open the context menu. If there is a pendant in the other con-
    figuration editor, you can switch from one to the other via Show in.
    Set User Defined
    It is very important to understand that you are responsible for these modi-
    fications!!

    Move to a setting or a value and click the little triangle to open the context menu.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 85-






    New Project
    User Manual Startup with Ford SLP1
    With Set user defined you can change values even when they are grayed because their values are
    derived from the input files or locked by a configuration dependency.
    When you use Set user defined, the parameter will be marked with a little blue pin on the left side.
    In the example illustration below the upper check box is marked as user defined, the lower one is not.
    Note
    Set user defined will not work for pre-configured parameters. The setting in the context
    menu is grayed and cannot be used. The information about predefined or not can be seen
    in the Properties view. Select Status and look at Changeable or Deletable.
    Remove user defined
    To set back the user defined status, use the context menu and select Remove user defined.
    Note
    Every parameter set to user defined will provoke a warning during validation with the
    information, that this parameter was set to be user defined.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 86-


    New Project
    User Manual Startup with Ford SLP1
    Caution!
    The feature set user defined enables settings that might be terribly wrong. As soon as
    you use this feature, you have to be sure that you know what you do and you have the
    complete responsibility.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 87-

    Project Settings
    User Manual Startup with Ford SLP1
    3 Define Project Settings
    Your first steps after the new project is set up, are:
    Define Input files
    Define your specific workflow steps and external generation steps (if needed)
    Activate all necessary BSWs
    3.1 Input files
    The DaVinci Configurator Pro needs information about your system, the bus communication, etc. This
    information is stored in the SYSEX or when using legacy file formats dependent on the bus system, in
    the DBC,LDFor FIBEX files. One or more (e.g. for systems with multiple channels) of these files must
    be given to the DaVinci Configurator as input files.
    The necessary diagnostic information is stored in CDD or ODX files and is also needed by the DaVinci
    Configurator Pro.
    3.1.1 System Description Files
    You need one of the following description files:
    3.1.2 SYSEX
    ECU-specific extract of the System Description. This file is typically provided to the TIER1 by the OEM.
    It contains
    ECU composition
    Atomic SWCs
    Compositions
    Communication
    Data mapping
    typically NO service SWCs
    3.1.3 ECUEX
    Base for the ECU development is the ECU Extract of System Description, ECUEX for short. It is created
    from the SYSEX by flattening the SWC architecture. This means that SWC compositions have been
    removed, only the atomic SWCs are left. And they now communicate directly with each other. Addi-
    tionally to the SYSEX, the ECUEX contains:
    Service SWCs
    Service mapping, i.e. service connections between the ports of the SWCS and the ports of the ser-
    vice SWCs.
    3.1.4 Legacy Data Base files (DBC, LDF, FIBEX, …)
    The legacy data base files are normally not in ARXML format. They also contain information about
    EUCs, messages, signals, attributes, etc. Good AUTOSAR tools can read them and convert their inform-
    ation into AUTOSAR-conform notation. The missing information when using legacy file formats must
    be given to the configuration tool by the software developer.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 88-

    Project Settings
    User Manual Startup with Ford SLP1
    3.1.5 Diagnostic Data Files
    Your Project uses Diagnostic? Therefore you need one of the following diagnostic description files:
    3.1.6 CDD / ODX
    These files contain the diagnostic description for the ECU.
    > *.CDD
    The CANdelaStudio Document (*.cdd) format is specified by Vector for describing the diagnostic
    feature set of an ECU.
    > *.ODX/*.PDX
    ODX (Open Diagnostic Data Exchange) is an ASAM standard which defines a unique, open XML
    exchange format for diagnostic data. A packaged ODX file (*.PDX) comprises all files of an ODX
    project.
    3.1.7 State Description
    Diagnostic session and security level management is modeled as a state machine which describes the
    transitions between sessions and states triggered by the execution of diagnostic services.
    If a CANdela Document (*.CDD) is used as diagnostic description file, all diagnostic session and secur-
    ity level related information will be imported from the input file.
    If a Packaged ODX file (*.PDX) is used as diagnostic description file, it will depend on the used ODX
    version if an additional state description is required.
    > ODX 2.2.0
    For ODX 2.2.0, the state machines are defined within the ODX file, using the data model intended
    for this purpose.
    > ODX 2.0.1
    As ODX 2.0.1 does not provide means to explicitly model diagnostic sessions, security levels and
    their corresponding transitions, dedicated SDGs (special data groups) are used to annotate the
    ODX data with supplemental information about the diagnostic session behavior. This information is
    not sufficient in all cases and an additional state description will be mandatory to augment the ODX
    data with the required information during the import of the diagnostic description.
    A state description is a *.CSV (comma separated values) file which defines the transition matrices of
    the diagnostic session and security level state machines.
    3.1.8 Standard Configuration Files
    In some cases a OEM-specific preconfiguration is necessary, therefore additional Standard Con-
    figuration Files provided by your OEM are necessary. Add fragments of ECUC modules which will be
    used as project specific mandatory configuration.
    3.2 External Generation Steps
    In STEP7 Code Generation on page 64, after the configuration, DaVinci Configurator Pro generates
    code. You can additionally let DaVinci Configurator Pro call any external tool during this step in a free
    configurable order. If something is to be done before code generation, if you use some command line
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 89-

    Project Settings
    User Manual Startup with Ford SLP1
    tools or whatever, add these tools to the list and define the call order. With STEP7 Code Generation on
    page 64
    , all your mentioned tools will be also called.
    3.3 Activate BSW
    Which modules are activated and which are not depends on the information in the input files. Activate
    or deactivate the modules.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 90-




    Validation
    User Manual Startup with Ford SLP1
    4 Validation
    Nothing done but imported some files and already many mistakes in the configuration?
    Why is that?

    The DaVinci Configurator Pro provides powerful validation routines that run in the background named
    Live Validation. At start-up of your project, there is only the information from the input files of
    STEP2 Define Project Settings on page 26. The content of these input files normally has leaks, some-
    times errors or the information of the system is still missing and has to be accomplished during con-
    figuration. This all leads to a number of errors detected by the validator of DaVinci Configurator Pro.
    But with the powerful solving algorithms and assistants, it is very easy to solve off the first warnings
    and errors.
    4.1 Validation Concept
    The validation concept comprises:
    Detailed validation of the ECU configuration
    Comprehensive set of domain-specific validation rules
    Navigation from validation message to the editors
    Tool makes proposal for solving an error (solving actions)
    Automatic consistency (auto-solving action) after changing the configuration via Comfort Editors or
    via the Basic Editor
    Live Validation
    The Live Validation is performed in the background after loading a project or after changing the con-
    figuration. The Live Validation directly gives feedback after entering wrong values.
    On-Demand Validation
    This validation is performed when you start a generation process. You can start the validation via Pro-
    ject | on-demand validation
    . The on demand validation will also launch external generators or
    execute more complex validation tasks that cannot be executed live.
    Note
    The result of a validation is displayed in the Validation View.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 91-



    Configuration with Configurator Editors
    User Manual Startup with Ford SLP1
    5 BSW Configuration With Configuration Editors
    5.1 DaVinci Configurator Pro Editors
    To configure the BSW modules you can use the Basic Editor or the more comfortable and cluster-spe-
    cific Configuration Editors.
    Basic Editor
    The Basic Editor is a generic configuration editor (GCE) and includes the native view of the ECU con-
    figuration. It is based on the basic software module description (BSWMD) format and displays all mod-
    ules of the ECU configuration.
    Configuration Editors
    The Configuration Editors offer a use-case oriented view of the ECU configuration. They are optimized
    for displaying or configuring those parts of the ECU configuration, which are related to the use case.
    Use the Configuration Editor first. To get the necessary settings for your fist step in dependency of
    your OEM and its use cases refer to Start Configuration with Configuration Editors of the step by step
    description.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 92-



    Software Component Design
    User Manual Startup with Ford SLP1
    6 Software Component (SWC) Design
    6.1 Data Exchange between DaVinci Developer and DaVinci Configurator Pro
    The data exchange between DaVinci Developer and DaVinci Configurator Pro is done via the DaVinci
    Developer workspace, file with DCF format.
    DaVinci Developer uses this file to store the complete project information. It can read and write this
    file.
    DaVinci Configurator Pro only reads this file and only at tool start-up.
    Note
    Please re-open the DaVinci Configurator Pro if you have changed the DCF file via the
    DaVinci Developer to get the current data from the DCF file.
    Keep in mind that the DaVinci Configurator Pro is not able to write to DCF file.
    6.2 About Application Components, Ports, Connections, Runnables and More…
    Learn all about application components, ports, connection and runnables, how they work and how to
    exchange information between application components.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 93-



    Software Component Design
    User Manual Startup with Ford SLP1
    1. Application Components
    2. Ports, Port Init Values and Data Elements
    3. Connections
    4. Runnables
    5. Triggers
    6. Port Access
    7. Data Mapping
    Cross Reference
    To get basic tool handling information, refer to the online help of the DaVinci Developer.
    6.3 Application Components
    To create application components use the DaVinci Developer.
    6.3.1 The Library – Type and Package
    You find the Library of the DaVinci Developer (in standard configuration) below the ECU Projects.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 94-


    Software Component Design
    User Manual Startup with Ford SLP1
    Types or Package?
    The Library you use in the following steps can basically be used in two ways.
    Type-oriented
    Package-oriented
    The type-oriented workflow is shown in the following steps. But you can also choose the package-ori-
    ented one. This concept will now be described briefly.
    Packages
    With Packages you can pack elements together like:
    Application Component Types
    Service Component Types
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 95-


    Software Component Design
    User Manual Startup with Ford SLP1
    Data Types
    Constants
    Mode Declaration Groups
    Application Port Interfaces
    Service Port Interfaces
    It is like a kind of grouping with its own name space. A name of an object has to be unique within a
    package but can be used more than once within the project.
    These packages can be exported and imported for round-tripping with other tools also supporting the
    packages.
    Switch to package view
    At the bottom of the Library you can select Type view or Package view. Select the Package.
    You need a Root Package first. Create it via right-click in the empty Package view.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 96-


    Software Component Design
    User Manual Startup with Ford SLP1
    New Child Package…
    Then right-click the root (e.g. MyECU_PartA) and you will get to the context menu. Use New Child Pack-
    age to nest the packages or you put the objects plain below the root package.
    The context menu for the packages
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 97-


    Software Component Design
    User Manual Startup with Ford SLP1
    Add Objects
    Via Add Objects you open a window to select and add already existing object to your package.
    New …
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 98-



    Software Component Design
    User Manual Startup with Ford SLP1
    The section New… of the context menu comprises all available objects which you can also create via
    the Type view of the Library (explained in the following chapter).
    XML Eport…, DCF Export…
    Export your package as XML file or as DCF file.
    Object Usage…
    Shows dependencies between used objects in a tree-view.
    Object Locking
    Objects can be locked and unlocked. A locked object is displayed with a little lock. Locked objects can-
    not be deleted without being unlocked before.
    Define new Component Types in the Library
    Right-click on Application Component Types in the Library and select New Application Component
    Type.
    6.3.2 New Application Components
    Right-click on Application Component Types in the Library and select New Application Component
    Type.
    It is good to give a speaking name to see what kind of component it is. e.g. AP – Application, SA –
    Sensor / Actuator
    Enter a Name for the Application Component Type. Select Composition if the SWC should contain other
    SWC or select Atomic. Select its Type and confirm with [OK]. All application software component types
    are displayed in the library.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 99-


    Software Component Design
    User Manual Startup with Ford SLP1
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 100-




    Software Component Design
    User Manual Startup with Ford SLP1
    Note
    To get fast information about any element in the library just select one and see its Prop-
    erties, Port Prototypes (if available) and Description in the Properties view (bottom left).
    Component types become component prototypes by being used.
    Double-click Software Design in the ECU Projects view to open the Software Design view for your ECU
    project (e.g. MyECU).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 101-




    Software Component Design
    User Manual Startup with Ford SLP1
    Note
    In the graphical representation of an application component prototype you can change its
    size using the little squares shown at the angles and in the middle of the sides.
    An application component type becomes an application component prototype when it is used. It also
    needs a name. Using drag’n’drop, both names are the same. Open the properties window from the con-
    text menu for a component prototype to change the prototype name.
    Define and use as many application software components as you need for your ECU.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 102-



    Software Component Design
    User Manual Startup with Ford SLP1
    Note
    The notation of the software component starts with the software component prototype fol-
    lowed by the software component type.
    6.3.3 Understand Types, Prototypes and Interfaces
    This illustration will help you to understand working with the DaVinci Developer. You have to deal with
    Prototype
    Type
    Interface
    When is a software component a software component type, when a software component prototype?
    When is a port a port interface, when a port prototype?
    In the library, the software components are types, the ports are interfaces. As soon as you use them,
    they become prototypes.
    Port Interface used by a component type â Port Prototype
    Component Type in library used in software design view âComponent Prototype
    Runnables are always connected to the component type.
    6.4 Ports, Port Init Values and Data Elements
    To communicate and to exchange information the components need so-called ports (S/R ports).
    For communication between software component ports have to be defined.
    There are different kinds of application/service ports,
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 103-








    Software Component Design
    User Manual Startup with Ford SLP1
    > Sender Ports
    to provide information
    > Receiver Ports
    to receive information
    > Sender/Receiver Ports
    to provide and receive information within one port
    > Server Ports
    to provide services (operations)
    > Client Ports
    to use services (operations)
    The following ports are listed here for completeness.
    Calibration Ports to hand over calibration parameters
    Mode Ports to e.g. trigger or not trigger runnables within certain modes
    Before you can use application ports you have to define application port interfaces. To completely
    define the port interfaces you have to define data types first, if you don’t want to use the predefined
    ones.
    Predefined data types in library
    Just right-click and select from the list.
    Caution!
    You can handle application port interfaces like application component types. Define the
    application port interfaces in the library and then use them as application port prototypes
    for each application component. The same applies for data types and data elements.
    Create Port Interface
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 104-



    Software Component Design
    User Manual Startup with Ford SLP1
    To define a new application port interface, right-click the Application Port Interface in the library and
    select New S/R Port Interface….
    Then the window for the S/R Port Interface opens. Enter a name, select the tab Data Element Pro-
    totypes 
    and define the content of the port. In this case it is just one data element called OnOff with
    the Data Type Boolean, use the button […] to select Data Type.
    Note
    Data elements are the contents of ports.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 105-



    Software Component Design
    User Manual Startup with Ford SLP1
    Note
    A port interface can carry many data elements of different data types.
    Provide software components with ports
    You have created your application software components.
    You have created necessary application ports interfaces and their content (data element pro-
    totypes).
    Now you have to define which application component needs which application ports.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 106-






    Software Component Design
    User Manual Startup with Ford SLP1
    Add ports to the application components via drag’n’drop
    Select an application port interface from the library and place it onto the application component via
    drag’n’drop. This transfers a port interface into a port prototype.
    Note
    Press <Ctrl> while drag’n’drop to change between sender or receiver port.
    Interfaces
    The ports are added to the components as graphical element together with the name of the port.
    > Sender port
    > Receiver port
    Note
    Ports need Init Values.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 107-




    Software Component Design
    User Manual Startup with Ford SLP1
    Port Init Values
    You have to assign an initial value to every used application port.
    6.5 Configure Service Ports within your Application Components
    Your Service Components will be loaded automatically to the DaVinci Developer workspace .
    Note
    The DaVinci Configurator stores the service components within the folder <Project Folder-
    >\Config\ServiceComponents
    .
    The content of the service components are not part of the DaVinci Developer workspace.
    If you want to connect one of your Application Component to a Service Component, you have to define
    a Service Port Prototype based on a Service Port Interface.
    Service Port Interface name and content depend on the BSW configuration and version of the service
    component within the DaVinci Configurator, so it is not stable. An Application Component shall always
    define its own or a general Service Port Interface definition.
    The Service Port Interface definition from the loaded Service Component is always in read-only status.
    These Service Port Interfaces are marked with a read-only icon
    within the library.
    You have currently not defined your Service Port Interfaces?
    Then copy and paste the definition from the Service Component. Assign the definition to an own pack-
    age, so it is possible to use the same name as before. Therefore open the Service Port Interface,
    select Package tab and choose a package via [...].
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 108-






    Software Component Design
    User Manual Startup with Ford SLP1
    Assign your copied Service Port Interface to your Application Component. Therefore open your Applic-
    ation Component Prototype, select Port Prototype List
    , open Service Ports tab and add your
    Service Port via [New] From Port Interface. Now the Service Port used by your Application Com-
    ponent is independent from the Service Component description.
    Note
    If incompatible changes apply these will be reported by RTE checks.
    6.6 Define your Runnables
    Now configure runnables that will carry your code.
    There are four important topics for a runnable:
    > SYMBOL and NAME – what the runnable skeleton is called in the template file
    > TRIGGER – when is the runnable executed
    > PORT ACCESS – what data can the runnable access
    > MAPPING – in which task context does the runnables work?
    Caution!
    Runnables can only be defined for atomic application components types.
    Note
    The runnable skeletons are generated by the DaVinci Configurator Pro/the RTE and can then
    be accomplished with your code. Find more details follow in the next chapters.
    Check also later hints to template generation
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 109-

    Software Component Design
    User Manual Startup with Ford SLP1
    1. Open a software component via the library or the software design view.
    2. Click on the runnable icon [fx].
    3. Click [New] and select Runnable.
    4. Enter Name and Symbol for the new runnable on the Properties tab.
    If you leave the Symbol field empty, the runnables (functions) will be named according to the entry in
    the Name field.
    Minimum Start Interval
    Define the minimum time interval between the successive triggering of this runnable.
    Can Be Invoked Concurrently
    A runnable can be marked as Can be invoked concurrently if it can be executed while it is already
    running. In other words it can be safely executed concurrently (re-entrant). There are a few criteria
    for your implementation code:
    No static (or global) non-constant data
    No return of address to static (or global) non-constant data
    Only work on data provided by caller
    No modification of own code at runtime
    No call of non-re-entrant runnables
    6.7 Triggers for the Runnables
    The trigger decides when a runnable is executed.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 110-




    Software Component Design
    User Manual Startup with Ford SLP1
    Select the tab Trigger. On this tab you select when your runnable should be executed.
    Note
    A runnable can be triggered periodically or via an event.
    Periodical: Select the checkbox and enter the cycle time.
    On Data Reception: As soon as data is received at the appropriate port the runnable is
    activated. (Indication)
    The trigger On Operation Invocation belongs to service ports and will be explained later.
    The runnable of the demo application only needs to be called when the state of the doors is changed.
    This can be realized via a cyclic polling or directly by a trigger from the doors. In the demo, Peri-
    odical
    … is chosen.
    Note
    When experimenting with the demo, replace the cyclic trigger with two triggers On Data
    Reception…, one for the left and one for the right front door.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 111-


    Software Component Design
    User Manual Startup with Ford SLP1
    6.8 Port Access of the Runnables
    Define which port information each runnable should be able to read or write. Select the tab Port
    Access. You only get displayed accessible ports.
    You can define access to
    Read Data… and
    Write Data…
    and later when using client server port also to operations (Invoke Operations).
    Click e.g. Read Data… and the Port Access Definition:Read Data window will open.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 112-



    Software Component Design
    User Manual Startup with Ford SLP1
    Caution! Direct – Buffered
    Direct Write: as soon as you write the information to the data, it is changed immediately.
    Buffered Write: the data information is changed at the end of the runnable runtime just
    before leaving it.
    Direct Read: if you access to the data multiple time, it could be changed in the meantime.
    You always read the current information.
    Buffered Read: with the start of the runnable, the data is copied to a buffer. Every time
    you access the data, it has the same value until the runnable is left.
    Note
    In the header of the runnable’s skeleton that will be generated by the DaVinci Developer,
    you will find a list with all available API functions for this runnable. If any access is miss-
    ing, go back to the DaVinci Developer and check whether the Port Access is set correctly.
    Summary
    Summary of the settings for your runnable MySWC_Code:
    The runnable is called MySWC_Code
    Its functional representation is called: MySWC_Code.
    It is triggered periodically
    The runnable has access to the state of the left and right door and to the data of the front interior
    light. It also has access to the LightDimControl.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 113-


    Mappings
    User Manual Startup with Ford SLP1
    7 Mappings
    Generally spoken Mapping stands for assignment of one object to another. There are different map-
    pings in the context of AUTOSAR. What is meant here is:
    Data Mapping
    Task Mapping
    Service Mapping
    Memory Mapping
    7.1 Data Mapping
    Your ECU has to communicate with other ECUs, the external communication. Signals have to be sent
    and received via the connected bus system. The signals and the types of data transported via the sig-
    nals is defined in the data base like DBC, LDF, FIBEX, and also in the SYSEX.
    From the view of software components, communication information is exchanged via ports that carry
    so-called data elements. The definition of a port contains the assignment of data elements that can
    pass the port. Via the Data Mapping you define, which data element belongs to which signal. For short,
    you assign data element to bus signals. That’s called Data Mapping.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 114-



    Mappings
    User Manual Startup with Ford SLP1
    Note
    Data Mapping can also be done in DaVinci Configurator Pro!
    Data Mapping in DaVinci Developer has a higher priority than Data Mapping in the DaVinci
    Configurator Pro.
    Data Mappings done via DaVinci Developer cannot be overwritten by the ones done via
    DaVinci Configurator Pro.
    7.2 Task Mapping
    Tasks are means of the operating system. You can define as many tasks as you like and need. You
    define the name of the tasks, its priority and its type like AutoBasic or Extended. You can also
    define the task as non- or full preemptive.
    With Task Mapping, you have to map all runnables to tasks, expect On operation invocation
    triggered runnables. Those are normally called only from one task and have no problem with reen-
    trance.
    A runnable has to be mapped to a task if it is not re-entrant but could be called re-entrantly during sys-
    tem operation.
    What happens if you do not map a runnable that should be mapped?
    The Vector AUTOSAR Solution provides an intelligent RTE generator.The RTE generator checks neces-
    sary conditions and will warn you if there are unmapped runnables that have to be mapped.
    What happens if you map a runnable that does not have to be mapped?
    Nothing will happen. It will still work. But the code efficiency and RAM consumption could be less good.
    Is there a disadvantage of the RTE generator automatism?
    It could be less comfortable to figure out the call context of the runnables and the stack consumption
    could increase.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 115-



    Mappings
    User Manual Startup with Ford SLP1
    7.2.1 Information about Interaction between Runnable, Re-entrance and Task Mapping
    Your goal is a configuration of the system that results in a highly runtime-optimized and memory con-
    sumption-optimized code. Here is a little information to estimate what the RTE generator does.
    This illustration shows a software component with four runnables. Only runnable 3 is set to Can be
    invoked concurrently
    . On the right-hand side you see which runnable is mapped to which task and
    the result of this mapping for the generated code. Here is the details.
    Can be invoked concurrently is set and the runnable is not mapped to a task
    Example: Runnable 3
    Runnable 3 is called directly in the context of the calling BSW (DCM in this example – DCM_MainFunc-
    tion, TASK B).
    Caution
    Make sure that your runnable is really re-entrant (see section Can Be Invoked Con-
    currently
    ). If not, errors can occur that are difficult to debug.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 116-



    Mappings
    User Manual Startup with Ford SLP1
    Can be invoked concurrently is NOT set and the runnable is not mapped to a task
    Example Runnable 4
    If the RTE generator finds out that the runnable is not called multiple times in parallel, Run-
    nable 4 is called directly in the context of the caller BSW (DCM). Otherwise an error mes-
    sage will be shown.
    Can be invoked concurrently is NOT set and the runnable is mapped to a task different from
    the task where the main function of the caller (e.g. Dcm_MainFunction) is mapped.
    Example: Runnable 1
    When the caller BSW now wants to activate the runnable via the RTE call, an event is set
    and the temporary variables of the runnables are stored to RAM (context of calling BSW,
    e.g. Task B). When the point in time has come, the WaitEvent in Task A is triggered by the
    event and starts the Runnable1(A) and hands over the parameters previously stored to
    RAM.
    As you see, runtime is longer than using direct call and the RAM consumption is higher. E.g.
    for diagnostics: DCM runnables always have array types that are completely stored to RAM.
    For e.g. 100 DIDs à 4 bytes you need 400 bytes!
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 117-


    Mappings
    User Manual Startup with Ford SLP1
    7.3 Memory Mapping
    Within ECUs there is data that has to be persistent during power-off. Therefore this data cannot be
    stored simply to RAM, it must be stored to EEPROM or Flash, i.e. to non-volatile memory. As an
    example for this data, think of the DEM information.
    There are two possible ways how this non-volatile data will be used. Either your application always
    accesses a RAM copy of the NV data where the data is copied at start-up. Or data can be read/written
    directly from/to NV memory on request.
    The Memory Mapping assigns your defined PIM, per instance memory to the memory blocks of the
    NVM.
    A per-instance memory object is mappable if it is referenced by a service need object. The definition
    of per-instance memory objects or service needs is part of the component type definition and is not
    yet editable by DaVinci Configurator Pro.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 118-


    Mappings
    User Manual Startup with Ford SLP1
    7.4 Service Mapping
    The base for the service mapping is the theory about clients and servers. The client uses a service of
    the server. The server itself provides the operation to the client. The client server communication
    between your application software component and a service component is done via service ports – cli-
    ent ports and server ports. A server port provides services (one or more operations) and a client port
    uses these services.
    A service component can have server ports and client ports.
    > Service port of the service component is a server port
    The service is provided by the service component and your application software component just
    uses the operations (services, functions)
    > Service port of the service component is a client port
    Your application software component must be server and has to provide the operation (service,
    function). In this case, you have to program code, i.e. a runnable. This runnable must be created
    by you and it is triggered by the request of the service.
    Besides the sender and receiver ports, there are also client and server ports. Sender and
    receiver ports carry data elements. Via client ports you can access so-called operations
    (or functions) of the servers.

    Within one service port there could be n operations. Every single operation has to be assigned to a run-
    nable.
    The servers provide the runnables that contain the code. Here Runnable1, Runnable 2, Runnable 3 of
    the service component and Runnable 4 and Runnable 5 of application component.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 119-

    Mappings
    User Manual Startup with Ford SLP1
    When performing the service mapping, it is almost the same as the data mapping – but now you deal
    with services instead. To be able to access the services of a service component, you have to add this
    service component to your software component.
    Then you can use all services that are provided by the service component. In this case your application
    is the client and the service component is the server.
    But using a service component not only brings benefit – it also costs. Almost every service component
    does not only provide services – there can also be client ports on the service component side. And if
    you add this service component to your software component, you have to provide all the services
    where the software component provides a client port interface.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 120-


    Generation
    User Manual Startup with Ford SLP1
    8 Generation
    With the generation step DaVinci Configurator Pro generates the code for your project and also con-
    cerns your settings in STEP2 Define Project Settings on page 26. DaVinci Configurator Pro clings to
    your settings and works off the “to be generated” list.
    The DaVinci Configurator Pro provides an automation interface for remote-controlled validation and
    code generation.
    8.1 MICROSAR Rte Gen
    The RTE is generated by the MICROSAR Rte Gen. Its generation depends on many settings in the con-
    figuration tools and how runnables are mapped to tasks. The files start with Rte_ or SchM_.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 121-



    Runnable Code
    User Manual Startup with Ford SLP1
    9 Runnable Code
    Until now you don’t have written one line of C code. And that’s typical for the AUTOSAR concept of soft-
    ware development. There is much more configuring work with tools than programming or imple-
    menting as you are normally used to from previous ECU software projects with e.g. CANbedded.
    Example
    This is an example showing the runnable called MySWC_Code with the function name
    (Symbol) MySWC_Code
    This is the header of a runnable showing all necessary information about the runnable like:
    When it is triggered
    Input and output interfaces
    Service interfaces
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 122-


    Runnable Code
    User Manual Startup with Ford SLP1
    Note
    If some access is missing, go back to the DaVinci Developer, add the necessary port access
    for your runnable, go back to DaVinci Configurator Pro, synchronize the system description
    and generate the component templates again.
    Then the missing interface should be there and can be used.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 123-


    Compile and Link
    User Manual Startup with Ford SLP1
    10 Compile And Link
    10.1 Using your "real" hardware
    This step is highly dependent on your compiler / linker / project settings. Compile and link everything
    together and create a file that can be downloaded to your hardware.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 124-


    Additional Information
    User Manual Startup with Ford SLP1
    Overview
    III Additional Information
    This section includes additional information dealing with special topics like e.g. multiple user concept
    or support request package.
    Update Input File
    Update Project Settings
    Support Request via DaVinci Configurator
    Multiple User Concept
    Update Configuration
    Update DaVinci Tools
    Non-Volatile Memory Block
    Basic Software Modules
    Variant Handling
    Add Module Stubs from AUTOSAR definition
    Project Migration
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 125-









    Additional Information
    User Manual Startup with Ford SLP1
    Update Input File
    1 Update Input Files
    Open Input Files editor via Project Input Files or Input Files icon
    at DaVinci Configurator Pro
    toolbar.
    Note
    Any change of the input files requires an update of the configuration. Update configuration
    updates all input files, whether they are changed or not.
    1.1 System Description Files
    If necessary, replace your File at Input Files | System Description File.
    Select the Input File, click Replace button
    and choose the new Input File.
    Note
    Any change of the input files requires an update of the configuration. Update the con-
    figuration via Update Configuration icon
    .
    1.2 Diagnostic Data Files
    If necessary, update your Diagnostic Description file and select ECU and Variant.
    In case of ODX 2.0.1 as Diagnostic Description file, it is necessary to update the state description.
    Therefore click [Synchronize State Description…].
    Note
    Any change of the input files requires an update of the configuration. Update the con-
    figuration via Update Configuration icon
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 126-



    Additional Information
    User Manual Startup with Ford SLP1
    Update Project Settings
    2 Update Project Settings
    Open Project Settings Editor via Project Settings or Project Setting icon
    at DaVinci
    Configurator Pro toolbar. Select Project Settings to open the view.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 127-






    Additional Information
    User Manual Startup with Ford SLP1
    Support Request via DaVinci Configurator
    3 Support Request Via DaVinci Configurator Pro
    If you request support for Vector products, you have to provide project and environment information.
    Therefore, use the Support Request Package function of the DaVinci Configurator Pro.
    The Support Request Package compiles the necessary project and environment information in a
    ZIP-file. Send this file to the Vector Support via E-mail. Just follow the description below.
    Note
    The DaVinci Configurator Pro does not send any data automatically!
    1. Open the Support Request Editor via Help Create Support Request Package…
    Note
    The entry Create Support Request Package… is only enabled if a project is loaded.
    2. Add your First Name, Last Name and E-Mail address.
    3. Click [Next >]
    4. Select project information which has to be added to the support request ZIP-file.
    Note
    PC Info, Tool Version Info and SIP Info are default and can not be deselected.
    5. Click [Next >]
    6. Enter the path where the created ZIP-file has to be stored.
    7. Click [Finish]
    3.1 Result
    In addition to the Zip-File
    , the Project Assistant creates the following folders and
    files.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 128-





    Additional Information
    User Manual Startup with Ford SLP1
    Support Request via DaVinci Configurator
    Folder/File
    Description
    The Project folder includes all defined project files
    The file includes all necessary project and system inform-
    ation (e.g. version of tools)
    The file includes all necessary project and system inform-
    ation (e.g. version of tools)
    Send <Target Path>.zip via e-mail to the Vector Support Address embed-
    dedSupport@de.vector.com.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 129-



    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    4 Multiple User Concept
    This concept helps you to realize the configuration management of the design and configuration data
    on a fine-grained level in combination with a configuration management (CM) system. It is available
    for software components as well as for BSW configurations. Split files also help you in multi-user pro-
    jects: you can control the read/write access on fine-grained level. This helps you to prevent the users
    from making unwanted changes and therefore reduce the necessary diffs and merges.
    4.1 General
    The decision whether to use a single configuration file or split configuration files is done in the Project
    Assistant settings. The resulting split files are ideally managed through a central CM system. Each user
    needs the full set of split files to work with the project.
    The user has to obtain a writeable working copy to his local file system.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 130-






    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    The user has to obtain a read-only working copy to his local file system.
    Caution!
    After a SIP update, all configuration files may have to be updated. This requires all files to
    be writeable while loading the configuration with a new SIP for the first time.
    It is necessary to lock all files which will be edited during the configuration session. The DaVinci tools
    load all working copy files. The locked files are writeable; all other files are write-protected.
    Note
    If you prevent parallel editing e.g. by according settings in the CM system you can ensure
    that only one user can obtain a writeable copy at a time. If you allow parallel editing in the
    CM system, several users can get a writeable copy. When both users make changes, you
    can use the Project Merge function to merge the modifications.
    After finishing configuration, the locked files have to be checked in (commited) to the CM system.
    4.2 Split Files for Software Component and ECU Project Configuration
    The split of the DaVinci Developer workspace is necessary to enable working in parallel for soft-
    ware component configuration.
    Note
    Workspace splitting is only supported by the DCF workspace format. You chose this option
    during the project setup and you cannot change it afterwards.
    Result
    Additionally to the workflow file the Project Assistant creates multiple files for each Software Com-
    ponent Type and ECU Project in the Developer folder.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 131-











    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    File
    Description
    This file includes references to all single software component and
    ECU Project files.
    General software component file
    This file includes the binary part of the software component.
    This file includes the generic attributes of the software component.
    General ECU project file
    This file includes the binary part of the ECU Project.
    Project-specific ECUC file
    This file includes the generic attributes of the ECU Project.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 132-


    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    4.3 Configure Software Component Prototype
    To configure a software component prototype it is necessary to lock all files, specific for this software
    component. (<SWCNameA>.arxml<SWCNameA>.dcb and <SWCNameA>_gen_attr.xml).
    4.4 Configure ECU project
    To configure an ECU project it is necessary to lock all files, specific for this ECU project. (<ECUPro-
    jectA>.arxml
    < ECUProjectA >.dcb<ECUProjectA>_ecuc.arxml and <ECUProjectA>_
    gen_attr.xml
    ).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 133-





    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    4.5 Split Files in DaVinci Developer
    Note
    Parameters of write-protected files are greyed out in the DaVinci Developer.
    If Parameters of write-protected modules are changed because of module dependencies, the DaVinci
    Developer informs about the write-protection during the synchronization process.
    You have the possibility to make the file writeable and repeat the synchronization process.
    4.6 Split Files for BSW Configuration
    The split of the ECUC is necessary to enable working in parallel for BSW configuration (one file per
    module).
    Note
    Please note that further .arxml files are created when activating further modules.
    Result
    Additionally to the standard ECUC files and the AUTOSAR parameter definition file, the Project Assist-
    ant creates multiple ECUC files <ProjectName>_<Module>_ecuc.arxml to the ECUC folder.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 134-




    Additional Information
    User Manual Startup with Ford SLP1
    Multiple User Concept
    Note
    Additionally to the module ECUC files the Project Assistant creates a <ProjectName>_
    EcuC.ecuc.arxml 
    file, containing references to all module ECUC files. This file is used as
    project file for the DaVinci Developer and the DaVinci Configurator Pro.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 135-




    Additional Information
    User Manual Startup with Ford SLP1
    Update Configuration
    5 Configuration Update
    If you get a new delivery with Vector BSW Release x, it is necessary to update some parameter values
    of your configuration to the new release. There are some steps, that are necessary for most of the
    updates and there are special steps, that are only necessary for a certain update.
    First there are described the necessary steps for any update followed by the special update steps
    dependent on the release version.
    5.1 Release x-1 to Release x (necessary steps for any update)
    1. Install the latest DaVinci Developer
    2. Open your configuration with the DaVinci Configurator of the new SIP .\DaVin-
    ciConfigurator\Core\DaVinciCFG.exe and select the following option:
    Note
    The path within the *.DPA file will be updated to the new SIP.
    3. Change the path to the new DaVinci Developer if it was installed to a different location than the
    former DaVinci Developer version.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 136-




    Additional Information
    User Manual Startup with Ford SLP1
    Update Configuration
    Note
    C:\Program Files (x86)\Vector DaVinci Developer <version>\Bin\DaVinciDEV.exe
    4. Handle remaining errors and warning. The following might occur for any update
    Errors Invalide/Incorrect Definitions
    AR-ECUC02008 Invalid multiplicity
    AR-ECUC03019 Incorrect definition of configuration element
    Solution
    Delete parameter in ECUC file not existing in BSWMD file any more.
    Example
    Some parameters has been replaced. E.g.
    /MICROSAR/Dem/DemGeneral/DemEventStorageTrigger has been
    replaced by /MICROSAR/Dem/DemGen-
    eral/DemEventMemoryEntryStorageTrigger

    Errors Inconsistent Connector Prototypes
    RTE51027 Connector prototype inconsistent. (1 message)
    RTE51031 Connector prototype inconsistent. (1 message)
    Solution
    Due to changes within the Service Components the ports can be become incom-
    patible Application Software Components. Adapt your Application Software Com-
    ponents with the DaVinci Developer to match the new port definitions.
    The changes are normally resulting from
    Correction (the old definition was wrong)
    Changed implementation based on AUTOSAR Bugzilla entries / RfC
    Changed implementation due to support of newer AUTOSAR Version (e.g.
    AUTOSAR 4.0.3 to AUTOSAR 4.1.2)
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 137-




    Additional Information
    User Manual Startup with Ford SLP1
    Update Configuration
    5. Process all further Errors and Warnings given within the Validation View of the DaVinci
    Configurator
    6. Check for updating of the input data base files.
    Even though they might not have changed, the deriving of parameters might have improved. Thus
    an update now would reduce the changes when receiving changed input data base files.
    Cross Reference
    Additional information about necessary configuration update steps are described within the
    Release Notes (Category: Change).
    The following describes what to do when updating especially from one release to another.
    5.2 Release 8 to Release 9
    Errors Invalid Baud Rate
    CAN02012 An invalid baud rate value is configured
    CAN02012 invalid baudrate settings:
    [MANUAL ACTION]: change clock or baudrate.
    /ActiveEcuC/Can/CanConfigSet/CT_CAN_e98c47e6/CanControllerBaudrateConfig
    Solution
    The tool now checks the values of the baud rate configuration, they might
    have been wrong before.
    Check valid settings of McuClockReferencePointFrequency referenced by
    /MICROSAR/Can_Cano-
    eemuCanoe/Can/CanConfigSet/CanController/CanCpuClockRef
    Then select one of the offered baud rate configurations by clicking on ‘pos-
    sible configurations’.
    5.3 Release 7 to Release 8
    If you get a new delivery with Vector BSW Release 8, it is necessary to update some parameter values
    of your configuration to the new release.
    After you have updated your project with the new SIP the following steps are necessary:
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 138-



    Additional Information
    User Manual Startup with Ford SLP1
    Update Configuration
    1. Select ECUC parameter which is not defined by a BSWMD Parameter definition.
    (Error number AR-ECUC03019)
    2. Check whether additional parameters exist.
    (Parameters without value definition or with default value)
    3. Define value of the new parameter with value from the existing parameter
    4. Delete existing parameter
    Use the same steps for container updates.
    Note
    Select all VectorCommonData containers, which are marked with an error, use multi-
    selection in the DaVinci Configurator Basic Editor and delete them via Delete Container.
    All Use RTE switches and Production Error Detection switches can be deleted without
    check.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 139-





    Additional Information
    User Manual Startup with Ford SLP1
    Update DaVinci Tools
    6 Update DaVinci Tools
    Cross Reference
    The DaVinci service packs are located at the Vector Download Center.
    https://vector.com/vi_downloadcenter_en.html
    The Update of the DaVinci Tools is described within the installation guide.
    Cross Reference
    You will find the installation guide document at the Vector Knowledge Base:
    https://vector.com/kbp/entry/640/
    6.1 DaVinci Configurator Pro
    If necessary , update DaVinci Configurator Pro service packs,therefore you have to download them
    from the Vector Download Center and install them via DaVinci Configuration Service Pack Installer.
    Select the installed SIPs which should be updated.
    6.2 DaVinci Developer
    Service Packs of DaVinci Developer are also available in the Vector Download Center. The service
    packs include an installer to update your DaVinci Developer installation.
    Note
    Please note that compatibility is only granted for service packs provided for the same
    major and minor version.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 140-




    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    7 Non-Volatile Memory Block
    This is a description how to handle data that has to be stored to non-volatile memory like FLASH or
    EEPROM.
    The illustration below shows briefly the concept behind. Data is defined in a Non-Volatile Memory
    Block. The application SWC has access to this data via the RTE. The data is stored and addressed in
    RAM. At configuration time you can define which data in which format you need and when and how this
    data is written to and read from the non-volatile memory. You can also trigger the immediate writing
    of this data to the FLS or EEPROM.
    7.1 Configure and use Non-Volatile Memory Block
    The following description shows, how the Non-Volatile Memory Block is configured and used.
    In the Library of DaVinci Developer, add a New Application Component Type, select Non-Volatile
    Memory Block 
    as type and give a Name to this new component type. Double-click the new Non-
    Volative Memory Block in the Library and select NV Block Descriptors
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 141-




    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    Use [New] to define a new NV Block Descriptor. On the Properties tab define the data you want to
    store to non-volatile memory and its type. This can be a single variable like integer or boolean. Also
    complex data types like records or arrays can be defined.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 142-




    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    Select the tab NV Block Need and define, when and how your data should be finally written to NV
    memory (FLS or EEPROM).
    Now add New NV Data Interface… to define a port to access the data defined before. Select suitable
    Data Element Prototypes.
    Add the NV component type to your Software Design (drag’n’drop from Library), assign the NV Data
    Interface to the NV component prototype and another NV Data Interface to your application SWC.
    Draw the necessary connectors by hand. Define the Init Values of all ports.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 143-




    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    Double-click NV component prototype and perform the internal mapping on the NV Block Data Mapping
    tab (right-click to open context menu).
    7.2 Port Access of your Runnables
    What is left now – the access of your application runnable to the NV Data Interface(s). Open your
    application software component, select a runnable and then the tab Port Access. Use the [New] but-
    ton to add a read or write data access to the Non-Volatile Memory Block.
    Save your project and switch to DaVinci Configurator Pro.
    7.3 Memory Mapping in DaVinci Configurator Pro
    Synchronize the system using the synchronization message in the Validation area.
    Open Runtime System. Click Add Memory Mapping.
    1. Select Create new NV memory blocks for the memory objects.
    2. Select the block created before in the DaVinci Developer
    3. Get information about unmapped blocks and click [Finish].
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 144-



    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 145-





    Additional Information
    User Manual Startup with Ford SLP1
    Non-Volatile_Memory_Block
    7.4 Validate the RTE
    1. Open the validation window via
    2. Deactivate all boxes via
    3. Select RTE and click [Validate].
    When implementing you runnable code, you can now access the defined variables by using RTE read
    and write macros.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 146-



    Additional Information
    User Manual Startup with Ford SLP1
    Basic Software Modules
    8 Basic Software Modules
    This chapter deals with BSW modules, Basic Software Modules. First they are introduced theoretically
    then configured with the DaVinci Configurator Pro.
    8.1 Generic BSW Modules
    Before you start to configure the BSW module with DaVinci Configurator Pro you have to know some-
    thing about BSW modules.
    This chapter introduces to you a generic BSW module and wants you to get a basic understanding of it:
    How it looks like
    Of what it is formed
    How it is configured
    How it works
    What is fix
    What is generated and
    some special topics like
    Memory sections and
    Exclusive areas
    Cross Reference
    Find the detailed description of the BSW module in the folder Doc|TechnicalReferences
    of your delivery.
    8.2 What is a BSW Module?
    A Basis Software Module (BSW module) consists of:
    Static BSW files (algorithms and functions)
    Generated files (data and sometime algorithms and functions)
    To get it to work it has to be
    Included
    Initialized
    Its main function has to be called cyclically (in most of the cases)
    The mapping of its code and variables can be configured as well as their exclusive areas, to protect the
    module’s internal data.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 147-





    Additional Information
    User Manual Startup with Ford SLP1
    Basic Software Modules
    Memory Mapping
    Exclusive Areas
    Example
    Examples for the short names: Dem, Dcm, EcuM, etc.
    8.3 BSW Module Configuration
    The amount and properties of configurable parameters is defined within the <Msn>.bswmd file.
    BSWMD stands for Basic Software Module Description file. This file is read by the BSW configuration
    tool (DaVinci Configurator Pro) and used to create the Basic Editor. The Basic Editor is the tool expres-
    sion of all configurable parameters of the BSW module, displayed in a generic way.
    Note
    In addition to the Basic Editor, the Vector BSW configuration tool DaVinci Configurator Pro
    provides comfortable views that make configuration of BSW modules very comfortable.
    The DaVinci Configurator Pro generates the configuration files for every used BSW module. These are
    files like
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 148-




    Additional Information
    User Manual Startup with Ford SLP1
    Basic Software Modules
    <Msn>_cfg.c/h,
    <Msn>_Lcfg.c/h,
    <Msn>_PBcfg.c/h
    8.4 BSW Initialization
    8.4.1 <Msn>_InitMemory()
    Most BSW module needs variables that have to be initialized before the call of <Msn>_Init(). This can
    be global or static variables. According AUTSOAR concept, all necessary variables will be initialized by
    the start-up code. Where this is not done or not possible the function <MSN>_InitMemory has to be
    called as an alternative.
    8.4.2 <Msn>_Init()
    Every BSW module has to be initialized at start-up. This is done with the start-up of the ECUM. The
    function to initialize a BSW module is called: <Msn>_Init()
    Note
    Our modules and functions are protected against multiple initializations.
    8.5 BSW Module Version (xxx_GetVersionInfo)
    Each BSW module provides an API <MSN>_GetVersionInfo.This API returns the BSW published
    information
    BSW version
    Module ID
    Vendor ID
    The BSW versions are BCD-coded. The availability of this API can be individually configured for each
    module.
    8.6 Cyclic Calls
    8.6.1 <Msn>_MainFunction()
    To run and to work, most of the BSW modules (except for those, that are triggered by interrupt), have
    to be called cyclically with a configured call cycle. The module derives its time base from those cyclic
    calls. This cyclically called function is called main function and its name is formed like: <MSN>_
    MainFunction()
    Note
    In most of the cases it is mapped to a cyclic task that is called cyclically triggered by an
    Alarm of the Operating System.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 149-






    Additional Information
    User Manual Startup with Ford SLP1
    Basic Software Modules
    8.7 Service Functions
    Cross Reference
    For information about Client Server Theory, refer to Data Mapping (section Service Map-
    ping).
    8.8 Critical Sections - Exclusive Areas
    BSW modules use so-called exclusive areas to protect their resources (module internal data) from con-
    currency. Each module defines its own exclusive areas, up to 5 can be defined per AUTOSAR definition.
    Whether a critical section needs to be handled or not depends on the possibility of a concurrent access
    onto a given resource of the BSW. It therefore depends on e.g. OS or hardware configuration con-
    straints. If a critical section needs to be handled, different measurements are possible, ranging from a
    global interrupt lock to the usage of OS semaphores.
    Example
    As an example, a definition of an exclusive area could look like:
    SchM_Enter_Com_COM_EXCLUSIVE_AREA_2();
    com_TxModeHdlr_DelayTimeCnt[i]--; /* Protected object */
    SchM_Exit_Com_COM_EXCLUSIVE_AREA_2();
    There are different locks available i.e. different interrupt sources could be locked. Global interrupt,
    peripheral interrupt like CAN or no lock at all.
    Cross Reference
    Refer to the technical reference document of the BSW module to get information how
    exclusive areas are defined and used.
    8.8.1 Memory Section
    Every generated code and variable of the <MSN> modules is enclosed by #defines. Via the template
    file compiler_memMap.h you can define the mapping of each single section of a <MSN> module.
    Cross Reference
    See more about the memory mapping via memMap.h in the technical references of each
    <MSN> module.
    8.8.2 Switch <MSN> Modules Off
    Most of the modules can be switched off via: <Msn>_Shutdown
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 150-





    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    9 Variant Handling
    9.1 Define Criterion and Variants
    If you use variant handling within your project you have to define your variants first.
    After you setup your project, open the Project Settings Editor via settings icon
    and select Vari-
    ants.
    Select the Edit Variance icon
    to add criterion, define criterion values and map criterion values to
    variants.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 151-




    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    1. Add [+] new Criterion.
    Note
    The DaVinci Configurator Pro is currently limited to a single criterion. This criterion can be
    used for diagnostic and communication variance.
    2. Add [+] one criterion value for each variant.
    3. Go on with [Next >]
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 152-






    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    4. Add [+] your Variants
    5. Define Criteria Value for your Variants
    6. Go on with [Next>] to see a summary of your definitions or [Finish] to come back to Variants
    view.
    After finishing variant definition, the tool enters to PENDING UPDATE project state.
    Note
    The DaVinci Configurator Pro is currently limited to a single criterion. This criterion can be
    used for diagnostic and communication variance.
    9.2 Add and Assign Input Files to Variants
    Open Input Files editor via Project | Input Files or use the input file button
    of DaVinci
    Configurator Pro toolbar.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 153-








    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    Select System Description Files and add your Input Files via Add File Sets icon
    . The Add File
    Set Assistant opens.
    Note
    The following step is necessary for each variant.
    Select the Post-Build Criterion Value (Variant) your input file will be valid and go on with [Next
    >]
    . Add [+] your input file(s), select your ECU Instance and confirm with [Finish].
    After adding and assigning your input files our project is still in PENDING UPDATE state.
    Select Update the configuration now to commit the project modifications to start update pro-
    cess.
    Cross Reference
    What happens while Update Process? See section STEP2 Define Project Settings on page
    29
    .
    9.3 Define Variance for BSW Modules
    Open Project Settings Editor via Project Project Settings or use project settings icon
    at
    DaVinci Configurator Pro toolbar.
    Select Modules to see all modules currently activated for your project.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 154-







    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    For each BSW module define if it supports variance or not. Therefore choose Implementation Vari-
    ant
    .
    > VARIANT-POST-BUILD-SELECTABLE
    No post-build loadable update of the configuration at post-build time. All variants are configured at
    pre-compile time.
    > VARIANT-POST-BUILD-LOADABLE-SELECTABLE
    post-build loadable update of the configuration data is supported using MICROSAR Post-Build Load-
    able. This feature required dedicated licensing.
    Note
    Multi selection is possible within module view of the DaVinci Configurator Pro, this enables
    you to set variance for several BSW modules at the same time.
    9.4 Configure and Validate BSW
    The DaVinci Configurator Pro highlights variant parameter and container using a brown
    . When chan-
    ging the configuration it has to be considered whether the change shall be applied to all variants or if
    the change shall be done only for one variant.
    Note
    You can select your Active Variant at the DaVinci Configurator toolbar.
    To define a value for a single variant only, right-click on parameter, select Edit variance and define
    variant (Value).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 155-





    Additional Information
    User Manual Startup with Ford SLP1
    Variant Handling
    Note
    The validation view includes views for each variant.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 156-



    Additional Information
    User Manual Startup with Ford SLP1
    Add Module Stubs from AUTOSAR definition
    10 Add Module Stubs From AUTOSAR Definition
    In some cases it is necessary to add a module, which is not delivered within your SIP, e.g. a delivered
    module (DCM) needs references and interfaces to a not delivered module (NVM), otherwise the val-
    idation fails.
    To avoid validation and generation errors you have to add the required module according to AUTOSAR
    standard definition. Therefore open Project Settings Editor, select Modules and open Modules
    Assistant via add [+].
    Choose Select from AUTOSAR Standard Definition and go on with [Next], select the required
    module and confirm with [Finish].
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 157-


    Additional Information
    User Manual Startup with Ford SLP1
    Add Module Stubs from AUTOSAR definition
    Now the module is available at the Basic Editor. The module based on AUTOSAR Standard definition
    needs to be configured basically with all necessary definitions required by the MICROSAR modules
    within your project.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 158-



    Additional Information
    User Manual Startup with Ford SLP1
    SIP Update
    11 SIP Update
    You received a newer version of your SIP. This requires an update of your current project. Therefore
    open the project with the new version of the DaVinci Configurator Pro. The DaVinciCFG.exe is loc-
    ated within the folder <UpdateSIP>\DaVinciConfigurator\Core.
    The DaVinci Configurator Pro identifies that the project was created with an older SIP and displays the
    following message. Select Update the project by opening the project within the SIP of this
    DaVinci Configurator instance 
    and click OK.
    The update will performed. Wait until the DaVinci Developer project opens. Click [Accept] when the
    warning message appears. Click [Import] in the next dialog.
    The Signal Import Mode dialog opens, select Use import mode for all remaining objects and click
    [OK]. The dialog proposing to Save and close now opens, confirm with [Yes].
    The DaVinci Developer project is closed and the update of the DaVinci Configurator Pro project con-
    tinues. Once the update finishes click [Ok].
    The project is now migrated to the new SIP.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 159-




    Additional Information
    User Manual Startup with Ford SLP1
    Project Migration
    12 Project Migration
    12.1 Migration Steps from Release 17 SIP to Release 18
    Open your existing configuration with the new SIP environment, i.e. Configurator 5.15.xx and execute
    [SolveAll]
    . After that, solve the remaining validation messages according to your knowledge and
    make sure all unmapped schedulable entities are mapped (RTE01055).
    12.2 Migration Steps from Release 16 SIP to Release 17
    Open your existing configuration with the new SIP environment, i.e. Configurator 5.14.xx and execute
    [SolveAll]
    . After that, solve the remaining validation messages according to your knowledge.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 160-


    Appendix
    User Manual Startup with Ford SLP1
    Overview
    IV Appendix
    FAQ
    Release Notes
    Whats new, whats changed
    Glossary
    Index
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 161-




    Appendix
    User Manual Startup with Ford SLP1
    FAQ
    1 Frequently Asked Questions
    You have a certain question? You just want to know how to do e.g. a certain setting without
    reading the whole document again? Then go on reading the following list and use the links
    to get at the place in the document where your question will be answered. This chapter will
    be extended continuously.
    1.1 Problems with using two different DaVinci Configurator Versions on the same PC
    You get problems with using DaVinci Configurator versions 5.10.xx and DaVinci Con-
    fiugrator version 5.11.xx on the same PC?

    Start your project with command line option -clean for solving Eclipse caching problems when DaVinci
    Configurator versions 5.10.xx and older are used on the same PC with DaVinci Configurator version
    5.11.xx and younger.
    1.2 Annotations for any parameter
    How to append an annotation to a parameter
    For almost any parameter you can add individual annotations regardless whether you are in the Basic
    Editor or in the Configuration Editor. Open the context menu of a parameter by clicking the little right-
    pointing arrow and click Add annotation.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 162-





    Appendix
    User Manual Startup with Ford SLP1
    FAQ
    The annotation editor will open. You can enter one or more annotations each with a headline and float-
    ing text.
    Via Edit annotations you can open and edit an already written annotation.
    To read you annotations you can either open it via the editor or just by touching the little letter icon
    with the mouse, its content will be displayed like shown below as an example.
    Via a report (Project|Report...) it is possible to see all your annotations. Make sure to activate the
    checkbox Include annotations in report
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 163-


    Appendix
    User Manual Startup with Ford SLP1
    FAQ
    1.3 Find Reference Container
    1.3.1 How to find references using the [Find] dialog
    Open the Find dialog, type in value=="" and give a container name between the quotes.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 164-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    2 Release Notes
    This section gives an overview of the changes which have been made on the MICROSAR Basic Soft-
    ware Modules (BSW) within the last releases.
    Listed changes are new features or the extension of existing functionality. Please note that this doc-
    ument does not provide a list of fixed issues. Open issues are documented in the issue report doc-
    ument IssueReport_<CBD-Number>.pdf, which is part of the deliveries documentation.
    This section refers to Vector internal tracking numbers (ESCAN, DAVID tickets and Feature List num-
    bers) which uniquely identify the changes.
    Please refer also to the Technical References for more information on the changes, modifications or
    extensions.
    Changes to DaVinci Configurator Pro and DaVinci Developer are documented in Release Notes
    provided along with the tools.
    2.1 Release 18
    Breaking Changes
    Modification of existing functionality or APIs that can have an impact on existing applications (such as
    SWCs, CDDs …).
    Change ID
    Affected Modules
    Description
    FEAT-1824
    AllBswModules
    The checks required for SafeBSW use-cases are
    now configured in each component individually
    using the switch <Ma>SafeBswChecks.
    Impact to existing projects:
    SafeBSW projects: Ensure that this switch is
    enabled for all BSW modules that are ASIL
    relevant
    Non- SafeBSW projects: This switch should
    be disabled by default. No changes are expec-
    ted.
    FEAT-1861
    CRY
    Introduction of the AR4.3 compliant crypto stack
    including CSM, CRYIF, SECOC and selected
    CRYIF
    CRYPTO drivers.
    CSM
    Please note that OEM and project dependent
    SECOC
    either the new (AR4.3 based) or the old (AR4.2
    based) crypto stack is delivered.
    Impact on existing projects:
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 165-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    If the old crypto stack is included (no CryIf)
    no change
    If the new crypto stack is delivered for the
    first time the crypto stack integration must
    be redone due to changed APIs and archi-
    tecture
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1939
    DET
    The DET implementation has been realized
    according to AR4.3 specification.
    Impact to existing projects:
    If the DET S-SWC interface is used the DET
    integration has to be reworked due to
    changed SWC APIs.
    Please refer to the DET technical reference
    for migration and compatibility mode hints.
    FEAT-2231
    COM
    The semantics of the attribute ComTxRe-
    petitionCnt has been changed in AR4.2.2. It now
    defines the number of repetitions excluding the
    initial send request.
    In previous specification versions the initial
    transmission was included.
    Impact to existing projects:
    Number of transmissions may change. An update
    of the ECU configuration or the upstream input
    files may be required.
    FEAT-2331
    FLS (Stub)
    The generic WDG and FLS drivers now use the
    API Infix to allow better coexistence with other
    WDG (Stub)
    drivers.
    Impact to existing projects:
    - Due to the API rename the integration of these
    modules may be reworked (replace API calls -
    no change in API semantics).
    FEAT-2364
    WDGM
    The existing WDGM that was used in non-
    SafeBSW projects is replaced by the WDGM that
    was only used for SafeBSW and multi-core pro-
    jects in the past.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 166-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    Thus there is a single WDGM implementation
    for all use-cases
    The WDGM provides options for flow control
    monitoring, SafeBSW and multi-core
    The WDGM also supports mode ports
    The WDGM initialization is configured auto-
    matically for single core projects. Multi-core
    initialization still requires a manual ini-
    tialization sequence.
    Impact on existing projects
    Affected are only projects that did not use
    SafeWDG Stack in the past.
    The configuration of the old WDG stack is
    copied to the new WDG implementation.
    Some additional parameters may have to be
    configured.
    Verify the configuration after the SIP update
    and fill in missing parameters.
    Configure the WdgM Service Connector Map-
    ping as it cannot be taken over
    No changes to the embedded integration
    required if the same feature set are used
    Extension
    New APIs have been introduced or functionality has been added. There is no influence on existing
    implementations.
    Change ID
    Affected Modules
    Description
    FEAT-1520
    COMXF
    Transformer error handling for explicit S/R com-
    munication is now supported.
    DaVinci Configurator Pro 5
    DaVinci Developer
    E2EXF
    RTE
    SOMEIPXF
    FEAT-1989
    vMIRROR
    Mirroring between two CAN channels (CAN to
    CAN) is supported.
    Beta Implementation. This feature shall
    not be used for production.

    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 167-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-2072
    IPDUM
    IPDUM now provides a distinct Rx and Tx path-
    way main function. By appropriate scheduling
    this allows reducing latency of e.g. gateway use-
    cases.
    FEAT-2127
    RTE
    The RTE is now able to run SWCs with trans-
    formers in one partition and the BSW (esp. COM-
    Stack) in a separate partition.
    FEAT-2151
    ETH
    Provision of Ethernet bus diagnostics inform-
    ation:
    ETHIF
    Discarded ARP Entries
    ETHTRCV
    Duplicate DHCP Addresses
    TCPIP
    IP Configuration
    DHCP Status
    Rx & Tx Statistics
    FEAT-2161
    LIN (S32)
    LIN and LINIF now support microcontrollers with
    multiple LIN drivers for different LIN peripheral
    LINIF
    interfaces such as UART and a dedicated LIN con-
    troller or external LIN controller.
    FEAT-2194
    WDGM
    WDGM now supports the usage of OS counters
    for deadline monitoring.
    FEAT-2229
    SECOC
    A dedicated Rx and Tx path MainFunction is now
    provided by the SecOC module.
    FEAT-2234
    ETH
    Link Quality Monitoring of Automotive Ethernet
    (100BASE-T1) is now supported by specific Eth-
    ETHTRCV
    ernet transceiver drivers:
    API to retrieve the monitored values
    API to reset the stored values
    FEAT-2252
    COMXF
    Support of AUTOSAR E2E profile 7 for large data
    using transformers.
    CRC
    DaVinci Developer
    E2E Library
    E2EXF
    RTE
    SOMEIPXF
    FEAT-2263
    LINIF
    Support fast schedule table changes not aligned
    to schedule table slot definitions by allowing
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 168-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    schedule tables to be changed directly after any
    frame transmission.
    FEAT-2289
    FR
    Using the optional callout ApplFr_WriteCcReg() it
    becomes possible for the user to modify the
    PLatestTx settings of the FlexRay controller.
    Use-case: Number of the last minislot in which a
    frame transmission can start in the dynamic seg-
    ment shall be configurable dynamically during
    startup or runtime.
    The feature can be enabled by defining the
    switch FR_OVERWRITE_REGISTER manually in
    the build environment or the use-configuration
    file.
    Please Note: This is a hardware specific feature
    that may not available with all FR imple-
    mentations.
    FEAT-2307
    DCM
    I/O control is able to use S/R communication for
    struct data types containing atomic and byte
    vDIAGXF
    aligned data types.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-2333
    COM
    Tx Timeout for cyclic messages is now sup-
    ported.
    FEAT-2338
    Diagnostic Data Model
    Extended the Autosar Diagnostic Extract based
    workflow to support boolean data types. These
    data types are marked with the CANdelaStudio
    attribute "ASREncoding" set to "boolean".
    FEAT-2340
    TCPIP
    Transmission of gratious ARP packages are now
    supported to accelerate start up of Internet Pro-
    tocol based communication (i.e. TCP or UDP).
    FEAT-2373
    WDGIF
    The APIs towards WDG are now configurable to
    support hook and wrapper use-cases.
    FEAT-2724
    DaVinci Configurator Pro 5
    The FlexRay stack now supports configurations
    with multiple FlexRay controllers that operate
    DaVinci Developer
    each on a distinct cluster.
    FR
    Beta Implementation. This feature shall
    FRIF
    not be used for production.
    FRNM
    FRSM
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 169-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-2764
    MEMIF
    It is now possible to use driver specific APIs
    using the optional container
    MemIfMemHwA/MemIfMemHwAAPI. If the con-
    tainer is present each FEE/EA API and the
    required header can be defined individually.
    The feature shall simplify the integration of 3rd
    party components that do not follow the stand-
    ards naming convention.
    FEAT-2778
    DOIP
    Enhance data blocks to up to 128k for diagnostics
    and flashing over Ethernet (previous limit was
    SOAD
    64k). Thus the data type of DoIPTar-
    getMaxPduSize and DoIPTargetMaxBufSize was
    enlarged to 16 bits.
    FEAT-936
    DCM
    DCM now supports variance as defined by the
    Vehicle System Group (VSG) mechanism of Ford
    Diagnostic Data Model
    CDD files.
    VSG Complex Driver
    Information
    The internal behavior of the BSW has been improved without any change in the API. Only for inform-
    ation purpose.
    Change ID
    Affected Modules
    Description
    FEAT-1918
    ADC (VTT)
    The configuration process of the "VTT-only" use-
    case was improved. Apart from the very few
    CAN (VTT)
    VTT-specific parameters, parameters of VTT
    DaVinci Configurator Pro 5
    modules and corresponding hardware stub mod-
    ules are now synchronized. Affected VTT mod-
    EEP (VTT)
    ules: Can, Port, Gpt, Fls, Eep, Adc
    FLS (VTT)
    GPT (VTT)
    PORT (VTT)
    FEAT-2336
    J1939TP
    Production release of fast-packet protocol for the
    transport of GPS data according to NMEA 2000.
    FEAT-2346
    Legacy DB Converter
    TP connections for diagnostics are now con-
    figured explicitly as half-duplex as defined by
    Ford GGDS 004.
    FEAT-2351
    OS
    The MICROSAR guest OS allows realizing a clas-
    sic AUTOSAR Stack on top of a POSIX compatible
    OS by providing AUTOSAR compliant OS APIs
    (SC1) and configuration elements.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 170-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    Due to the usage of POSIX APIs the guest OS is
    hardware independent.
    FEAT-2355
    General
    Several files have been removed from the SIP as
    the old DaVinci Configurator 4 framework has
    been removed:
    Major parts of the .\Generators\Components
    Folder have been removed. BSWMD files are
    now only located in the .\BSWMD folder.
    .\Generators\MicrosarGen removed
    FEAT-2737
    ETHIF
    A static firewall for Ethernet communication is
    now available as prototype.
    vETHFW (Firewall ETH)
    Beta Implementation. This feature shall
    not be used for production.

    2.1.1 Required AUTOSAR Tools
    This MICROSAR release requires the usage of the following tools:
    Tool
    Version
    DaVinci
    3.13 (SP3)
    Developer
    Please use the latest service pack available from the Vector download center
    DaVinci
    The latest service pack version is delivered as part of the SIP. Upcoming service
    Configurator
    packs can be retrieved from the Vector download center
    Pro
    2.2 Release 17
    Breaking Changes
    Modification of existing functionality or APIs that can have an impact on existing applications (such as
    SWCs, CDDs …).
    Change ID
    Affected Modules
    Description
    FEAT-2097
    SPI (VTT)
    Spi_GetHWUnitStatus() now returns SPI_BUSY
    when a transmission is pending. In the past SPI_
    IDLE was returned.
    Impact to existing projects:
    Evaluation of the return value may have to be
    updated.
    FEAT-784
    DEM
    DEM now uses available data alignment and size
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 171-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    ECUC
    information configured in the ECUC module
    (EcuC/EcucGeneral) to estimate the NVM block
    size.
    Impact on existing projects:
    The alignment attributes (EcuC/EcucGeneral)
    shall match the linker settings.
    For missing attributes the DEM substitutes
    default values.
    DEM reports the result of its estimation to
    the user, as well as substitutions for missing
    attributes.
    Due to missing values and substitutions, the
    estimated buffer size might differ from the
    actual size, so estimation is just reported
    and the buffer size value in NVM is not
    changed automatically. When the user knows
    the exact size (e.g. if the block size is extrac-
    ted from the MAP file), DEM's recom-
    mendation can safely be ignored.
    Extension
    New APIs have been introduced or functionality has been added. There is no influence on existing
    implementations.
    Change ID
    Affected Modules
    Description
    FEAT-1350
    J1939TP
    The ISOBUS and NMEA Fast Packet Transport Pro-
    tocol (FPTP) has been implemented.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1445
    DCM
    WWH-OBD has been released and extended:
    DEM
    NODI removal added
    Diagnostic Data Model
    FEAT-1454
    BSWM
    Support Partial Network Cluster specific Ethernet
    switch port handling.
    COMM
    Beta Implementation. This feature shall
    ECUM
    not be used for production.
    ETHIF
    ETHSM
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 172-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    UDPNM
    FEAT-1509
    TCPIP
    Support of TCP Keep Alive mechanism according
    to IETF RFC 1122.
    FEAT-1611
    BSWM
    Additional OVTP gateway features available:
    PDUR
    Extended PduR switching support
    FEAT-1666
    DOIP
    Now, there is only one DoIPChannel required for
    each target ECU even if the target ECUs' DoIP
    logical address differs between request and
    response (simplified configuration).
    FEAT-1706
    DOIP
    Support of OEM-specific DoIP payload type hand-
    ling.
    FEAT-1783
    RTM
    A script was developed to automatically determ-
    ine runnable names, insert their Vfb Hook func-
    tions, add measurement points and generate a
    template implementation for the Vfb Hook func-
    tions.
    The script uses the Automation Interface of
    DaVinci Configurator and can be executed by
    using the context menu (right-click) of the RTM
    module in the Basic Editor.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1816
    DOIP
    The MainFunctions of TCPIP and SOAD can now
    be split into an Rx and a Tx MainFunction.
    SOAD
    This is in order to reduce latency of gateway rout-
    TCPIP
    ings. To do so, use the following sequence:
    Rx MainFunctions of communication stack
    Gateway MainFunctions (if required)
    Tx MainFunctions of communication stack
    FEAT-1841
    DCM
    Support of Routing Info Byte (SID 0x31
    "RoutineInfo") in Dcm.
    FEAT-1842
    EEP (VTT)
    VTT is now able to also simulate drivers of
    external devices for
    FLS (VTT)
    FLS
    WDG (VTT)
    EEP
    WDG
    Precondition is that these devices are configured
    as AUTOSAR modules in DaVinci Configurator
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 173-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    Pro.
    FEAT-1862
    Crypto Algorithm Library
    The following algorithms have been added:
    Symmetric algorithms:
    ChaCha2020
    ChaCha2012
    Cipher Modes: CTR, GCM, OFB, CFB, XTS
    Asymmetric algorithms:
    RSA with 3072 bit key length
    Elliptic Curve 25519
    Hash functions:
    SHA3
    Symmetric signatures:
    GMAC
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1890
    COM
    The COM description based routing for signals
    allows a more efficient way to route signals
    between messages with similar layout compared
    to an ordinary signal routing.
    The description routing is now able to also
    handle
    signals with update bits
    signals that are placed at differing locations
    in the destination PDU.
    FEAT-1900
    DaVinci Configurator Pro 5
    Supporting S/R communication in the Dem applic-
    ation SWC interface.
    DEM
    Diagnostic Data Model
    FEAT-1901
    DCM
    Support of I/O control using S/R communication
    as defined by AUTOSAR RfC68881.
    Beta Implementation. This feature shall
    not be used for production.

    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 174-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-1924
    DCM
    Memory ranges will be exported for diagnostic
    services ReadMemoryByAddress (0x23) and
    WriteMemoryByAddress (0x3D). The memory
    range must be defined in CANdelaStudio as a ser-
    vice 0x23 or 0x3D using one of the following pro-
    tocols:
    0x23 ALFID Memory-Start-Address
    0x3D ALFID Memory-Start-Address
    Please consider:
    The Address-and-Length-Format-Identifier
    (ALFID) must be of constant value, e.g.
    0x24.
    The memory-start-address must be a vari-
    able parameter.
    The memory-size must be defined by a ser-
    vice attribute of the name "Memory Area
    Size", e.g. "0x1000".
    FEAT-1941
    COM
    It is now possible to route signals between mes-
    sages that are transmitted or received by TP
    PDUs (such as J1939 messages).
    FEAT-1953
    SCC
    TCPIP now supports transmission requests of
    PDUs with a data length unknown at the point of
    SOAD
    the transmission request. The final length is
    TCPIP
    provided by each subsequent call of CopyTxData.
    FEAT-1955
    PDUR
    The TP buffer handling became more flexible by
    allowing buffers to be assigned to routing rela-
    tions.
    TP routing relations can now refer to ded-
    icated buffer(s) using the PduRDestTxBuffer-
    Ref.
    The buffer pool is now configured in the
    TxBufferTable list and no longer in the
    TpBufferTable.
    Buffers that are referred by routing relations
    are used by these routing relations in a pre-
    ferred way.
    If all assigned buffers are used (or none
    assigned) globally available buffers are used
    (i.e. these are buffers that are not ref-
    erenced by a routing relation).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 175-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    Tx Buffers can be shared between different
    routings as they can be referred to by mul-
    tiple routing relations.
    Impact to existing configurations:
    A migration script will automatically transfer the
    buffers from TpBufferTable to TxBufferTable.
    FEAT-1980
    XCP
    Multi- Connection support has been added. It is
    now possible that multiple client tools connect to
    XCP On CAN
    the ECU on the same or over different networks
    XCP On TCPIP
    at the same point in time.
    FEAT-1995
    CRY
    It is now possible to use hardware and software
    based CRYs in the same project.
    CSM
    FEAT-1996
    TLS
    TLS Heartbeat Extension (as defined by IETF RFC
    6520)
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1998
    ETH Switch Driver
    Hardware time stamping for switches is now sup-
    (Bcm8953x)
    ported.
    ETHIF
    Note: In a first step this feature is only sup-
    ported for BCM8953x aka Leo.
    ETHSW
    TSYNC ETH
    FEAT-2001
    SECOC
    AR4.3 SecOC RfCs have been implemented:
    RfC 71785 - [SecOC] - Send authentication
    data in a separate message
    RfC 71787 - [SecOC] - Linking of split authen-
    tication data / authentic PDU
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-2002
    Base EcuC Converter
    Support 64 Bit Signal Types according to AR
    4.2.2
    COM
    Common Files
    COMXF
    DaVinci Configurator Pro 5
    DaVinci Developer
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 176-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    IPDUM
    RTE
    FEAT-2005
    TLS
    Support of cipher suite TLS_RSA_WITH_AES_
    128_CBC_SHA256
    FEAT-2024
    CANIF
    By a CANIF extension it is now possible to route
    a CAN PDU using the PDU Interface Layer Gate-
    way and the TP Layer Gateway at once.
    Use-case if a routing from CAN to CAN (low
    level) and DOIP (high level) routing.
    Note: This feature requires dedicated licensing.
    FEAT-2039
    BSWM
    If the application triggers a ModeLimitation to
    NoCom it is now possible to reset the ECU. This
    COMM
    is realized by a optional notification to the BSWM
    that can trigger any action based on this mode
    indication.
    FEAT-2051
    CRY
    VTT now provides a VTT MCAL that simulates a
    hardware based CRY driver.
    FEAT-2055
    RTM
    RTM can be disabled at runtime in a safe way.
    This allows the module to be shipped as part of
    safety-related ECUs.
    Once RTM is enabled at runtime the module must
    be considered as QM software.
    Note: This feature requires dedicated licensing
    of RTM.
    FEAT-2058
    SECOC
    SecOC now supports post-build selectable for
    variant handling.
    Note. This feature requires the licensing of
    MICROSAR IDM (Identity Manager).
    FEAT-2068
    AVTP (IEEE1722)
    Finalization and release of SRP Client.
    SysService_Srp8021Q
    FEAT-2076
    CANIF
    A passive wakeup of ECUs is now sped up (i.e.
    application messages are send earlier) as the
    PnTxfilter is no longer considered in such scen-
    arios.
    The PnTxFilter remains relevant for NM PDU fil-
    tering during a wake-up that was triggered from
    the network.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 177-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-2082
    PDUR
    PduR is now able to call a Tx queue specific over-
    run notification to signal loss of data to the applic-
    ation.
    FEAT-2086
    UDPNM
    UdpNM now supports the immediate trans-
    mission feature (as known from CanNm). See
    also AUTOSAR 4.3 RFC 70837.
    FEAT-2087
    CANNM
    Implementation of AUTOSAR 4.3 RfC72701
    UDPNM
    Coordinator should send NM message when
    Sleep Ready Bit is set.
    FEAT-2088
    XCP
    Using the new API Xcp_ModifyProtectionStatus it
    is now possible to disable (or enable) the
    seed&key protection at runtime. By default the
    protection is enabled (as in past versions).
    FEAT-2136
    TCPIP
    Storage of IPv4 link-local (AutoIP) addresses in
    NvM is now possible.
    FEAT-972
    SOAD
    Support of SoAd PDU fan-out with a reduced num-
    ber of buffers (memory and runtime optim-
    ization).
    Information
    The internal behavior of the BSW has been improved without any change in the API. Only for inform-
    ation purpose.
    Change ID
    Affected Modules
    Description
    FEAT-1340
    IPDUM
    The container PDU feature has been released.
    Hint: This feature is typically used in com-
    bination with CAN-FD.
    FEAT-1583
    CRYPTO
    Support of concurrent TLS and CSM usage.
    FEAT-1656
    Bus Mirroring Complex
    MICROSAR offers now a mirroring module that
    Driver
    allows mapping the complete network com-
    munication of a selected network to another net-
    CAN
    work.
    SOAD
    The following mirroring scenarios are currently
    supported:
    CAN->ETH
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1779
    SECOC
    Release of SECOC module.
    FEAT-1784
    DCM
    Additional validations were implemented that
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 178-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    check the configured DCM buffer size against the
    minimum required size for the particular con-
    figuration. In this way most of the major runtime
    problems caused by a too small buffer (such as
    disrupted request reception, permanent negative
    responses etc.) are avoided.
    FEAT-1879
    RTP
    Real-Time Transport Protocol (RTP,
    https://tools.ietf.org/html/rfc3550) is now avail-
    able as BSW module.
    Note: This module requires dedicated licensing.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1963
    DCM
    Release of variant diagnostic data handling of
    DCM using post-build selectable.
    Note: This feature requires MICROSAR IDM to be
    licensed.
    FEAT-2004
    CAN
    Release of FEAT-912: Support of several CAN
    Drivers in one ECU configuration.
    CANIF
    FEAT-2239
    CRY (Renesas RH850)
    Hardware CRY for Renesas RH850 (IcuS) avail-
    able.
    Beta Implementation. This feature shall
    not be used for production.

    2.2.1 Required AUTOSAR Tools
    This MICROSAR release requires the usage of the following tools:
    Tool
    Version
    DaVinci
    3.13 (SP2)
    Developer
    Please use the latest service pack available from the Vector download center
    DaVinci
    The latest service pack version is delivered as part of the SIP. Upcoming service
    Configurator
    packs can be retrieved from the Vector download center
    Pro
    2.3 Release 16
    Breaking Changes
    Modification of existing functionality or APIs that can have an impact on existing applications (such as
    SWCs, CDDs …).
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 179-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-1915
    WDGM
    A new feature for checkpoint generation has
    been added in this release of the WDGM. With
    the switch "WdgMGen-
    erateCPIdAsPortDefinedArgument" it can be influ-
    enced if the checkpoint ID shall be generated as
    a port-defined argument or a single port per
    supervised entity is generated. Please note: To
    be compatible to older versions of the WDGM
    you need to enable this option. However, an
    AUTOSAR compliant behavior is achieved by dis-
    abling this functionality. By default this feature is
    disabled.
    FEAT-1964
    DEM
    Removed post-build selectable from EnableCondi-
    tionGroup and StorageConditionGroup. Variable
    groups of those types need to get duplicated and
    referenced by the events of a variant.
    Extension
    New APIs have been introduced or functionality has been added. There is no influence on existing
    implementations.
    Change ID
    Affected Modules
    Description
    FEAT-1327
    J1939DCM
    The J1939DCM DM1 transmission is now ISOBUS
    compliant (cyclically only if active instead of cyc-
    lic)
    FEAT-1413
    SOAD
    Service oriented communication for Linux (BSD
    socket API enhancements for SOME/IP and Ser-
    vice Discovery).
    FEAT-1498
    DaVinci Configurator Pro 5
    It is now possible to mark TcpIp (IPv6) address
    prefixes as on-link during configuration time.
    TCPIP
    FEAT-1516
    TCPIP
    It is now possible to assign a static IPv4 address
    in addition to an address assigned by DHCP (pri-
    ority based).
    Limitations:
    one assignment method of each type per
    address
    one IPv4 address per logical controller
    (VLAN, physical controller)
    Beta Implementation. This feature shall
    not be used for production.

    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 180-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-1574
    CAL
    New SECOC functionality:
    CPL
    Generic Freshness value interface
    CRY
    Provision of SecOC_VerifyStatusOverride API
    SECOC
    SecOCAuthInfoTxLength and SecOCFresh-
    nessValueTxLength can have an arbitrary
    size but must result in a full byte length
    FEAT-1641
    SD
    The following AUTOSAR 4.3 features are now sup-
    ported:
    [Issue 68746] Impact of configuration
    options on service matching algorithm is
    unspecified
    [Issue 68823] Switching of EventHandler
    from Unicast to Multicast
    FEAT-1678
    FLS (VTT)
    VTT memory stack now supports the AURIX Fee
    in case of dual target projects.
    VTT Control Layer
    FEAT-1723
    DEM
    Support for OBD major monitors.
    Please note: This feature need to be licensed sep-
    arately. OBD major monitors require a project
    specific analysis of the requirements to the basic
    software.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1724
    DCM
    Support for DTR (Diag Test Results) for OBD pro-
    jects.
    DEM
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1726
    DaVinci Configurator Pro 5
    RTE Nv ports can now be connected to S/R ports.
    DaVinci Developer
    Beta Implementation. This feature shall
    not be used for production.

    RTE
    FEAT-1738
    ETHIF
    Allow concatenated receive buffers that can be
    smaller than max frame size.
    FEAT-1770
    DEM
    Up to 255 Enable- and Storage-Conditions are
    now supported.
    FEAT-1791
    RTE
    Support autonomous error responses from trans-
    formers based on AUTOSAR 4.2.2 for SOMEIPXF.
    SOMEIPXF
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 181-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-1807
    CFG5 (DCM ARXML
    DCM diagnostic data now can be variant in con-
    Converter)
    figurations that use the MICROSAR Identity Man-
    ager.
    CFG5 (DEM ARXML
    Converter)
    Beta Implementation. This feature shall
    not be used for production.

    DCM
    Diagnostic Data Model
    FEAT-1818
    COM
    Support the configuration switch minimum delay
    time for cyclic transmission (Parameter "ComEn-
    ableMDTForCyclicTransmission").
    FEAT-1820
    Base EcuC Converter
    Improved Vehicle Announcement Handling for
    DoIP based on AUTOSAR [Issue 67021].
    DOIP
    FEAT-1846
    RTM
    RTM measurements can now be controlled
    via CAPL without using the test feature set
    UI. This allows integrating RTM into complex
    test environments.
    Net runtime measurement support on multi-
    core ECUs (Beta)
    Response time measurement on multi core
    ECUs (Beta)
    FEAT-1864
    DRM
    Release of DRM (Diagnostic Request Manager)
    (CDDDRM)
    FEAT-1889
    CAN (VTT)
    VTT now supports the MICROSAR Identity Man-
    ager and PB-Loadable for CAN and LIN.
    LIN (VTT)
    The PB-Loadable update process is not supported
    VTT Control Layer
    in VTT.
    VTT TechnicalReference
    Note: FlexRay is also supported (since Release
    15).
    Note: This feature requires an IDM / PB-Load-
    able license.
    FEAT-1896
    IPDUM
    The nPduToFrame mapping as used to pack sev-
    eral COM I-PDUs into one CAN-FD frame has
    been extended:
    Last is best semantics for Tx PDUs
    Runtime optimization: Rx pathway only
    handles PDUs that are actually required by
    the ECU
    Beta Implementation. This feature shall
    not be used for production.

    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 182-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    FEAT-1899
    DaVinci Configurator Pro 5
    Introduction of DIAGXF module to support S/R
    interaction with DCM.
    DaVinci Developer
    This feature mandates a MICROSAR RTE.
    DCM
    Beta Implementation. This feature shall
    DIAGXF
    not be used for production.
    RTE
    FEAT-1908
    All-MCALs
    Access to interrupt controller register has been
    updated to better support safety use-cases.
    BSWM
    Per driver it is now possible to configure two
    CAN
    options via the parameter UseOsInterruptControl
    FR
    LIN
    OS is in charge of the interrupt control
    register. This new functionality mandates the
    WDG
    latest MICROSAR OS. The module no longer
    initialized the interrupt control register by
    itself but informs the OS. Register values are
    derived through OS APIs. This setting is
    recommended for SafeBSW projects.
    Same behavior as today: Depending on the
    driver implementation (see its technical ref-
    erence) a driver may perform the ini-
    tialization of the interrupt control register
    and accesses the relevant registers directly.
    FEAT-1912
    ETH Switch Driver
    The switch driver has been extended to support
    (Bcm8953x)
    the AUTOSAR 4.2.1 frame mirroring and for-
    warding extensions.
    CFP Rules for VLAN-filtering (mirroring)
    Reserved MAC multicast packets shall be for-
    warded by the switch
    Mirroring VLAN double-tagging
    Enabling/disabling mirroring during runtime
    Mirroring filters
    Please note that these features may not be avail-
    able for each switch hardware.
    FEAT-1922
    DCM
    Support for OBD2 Mode 0x09 with variable
    length as required by primary OBD nodes with
    multiple secondary nodes.
    FEAT-1938
    CRY
    Software CRY now supports the CMAC AES-128
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 183-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    algorithm.
    FEAT-1987
    TSYNC ETH
    The IEEE 802.AS Pdelay message configuration
    is more flexible and allows the following options:
    Dynamic Pdelay protocol for time master and
    slave
    Optimized Pdelay configuration by time slave
    Pdelay_Req. Time master answers with
    Pdelay_Res and Pdelay_res_Follow_Up.
    Optionally a static Pdelay configuration can
    cause Pdelay requests to be ignored.
    FEAT-451
    DaVinci Configurator Pro 5
    The RTE implements automatic scaling (offset
    and factor) between a FixedPoint and Float.
    DaVinci Developer
    Use-Case: network representation is FixedPoint
    RTE
    (with factor and offset) while the internal pro-
    cessing is Float based.
    Information
    The internal behavior of the BSW has been improved without any change in the API. Only for inform-
    ation purpose.
    Change ID
    Affected Modules
    Description
    FEAT-1506
    ETH Switch Driver
    The Ethernet switch configuration has been
    (Bcm8953x)
    improved. Thus only used ports have to be con-
    figured and pre-configured ports can be mapped
    to any used port.
    Beta Implementation. This feature shall
    not be used for production.

    FEAT-1513
    CAN
    Release of CAN-FD functionality.
    CANIF
    XCP On CAN
    FEAT-1640
    COM
    Runtime improvement in the COM Rx signal noti-
    fication handling:
    COM Rx signal notifications are now always
    called with the interrupt not being locked by
    the COM module
    The Rx signal notifications are called after a
    configured amount of notifications has to be
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 184-


    Appendix
    User Manual Startup with Ford SLP1
    Release Notes
    Change ID
    Affected Modules
    Description
    called.
    An ISR lock threshold is configurable per tim-
    ing domain.
    FEAT-1701
    FEE
    The API ForceSectorSwitch now always causes
    the sector to be switched. This shall result in a
    more robust FEE in case of errors.
    FEAT-1779
    SECOC
    Release of SECOC module.
    FEAT-1839
    FEE (Small Sector Flash)
    An alternative FEE implementation is now avail-
    able that is specifically designed to support
    devices with very small flash sectors. On such
    devices (currently RH850) this implementation is
    more robust and has less overhead.
    FEAT-1886
    IPDUM
    Feature Release: 16bit IPDUM selector field val-
    ues are now supported for production projects
    FEAT-1888
    NVM
    The problem that RTE invokes the DET during
    NvM ReadAll (ESCAN00087644) is now solved.
    FEAT-1910
    SOAD
    Release of BSD-Socket API for series production
    FEAT-1948
    OSEKNM
    Release of OSEK-NM implementation.
    2.3.1 Required AUTOSAR Tools
    This MICROSAR release requires the usage of the following tools:
    Tool
    Version
    DaVinci
    3.13.0
    Developer
    Please use the latest service pack available from the Vector download center
    DaVinci
    The latest service pack version is delivered as part of the SIP. Upcoming service
    Configurator
    packs can be retrieved from the Vector download center
    Pro
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 185-


    Appendix
    User Manual Startup with Ford SLP1
    What's New, What's Changed?
    3 What’s New, What’s Changed
    What’s new and what’s changed?
    This section explains the changes within this document from the previous version to the one men-
    tioned in the headline.
    Version 9.x.x
    Author
    Date
    Monika Sturm
    2017-03-28
    What’s new?
    Migration steps from Release 17 to Release 18
    What’s changed?
    AUTOSAR Layer models updated
    Minor changes, screenshots, typos, etc.
    Topic Command Line Parameters of the DaVinci Configurator removed (please refer to the DaVinci
    Configurator help)
    Version 8.x.x
    Author
    Date
    Klaus Emmert
    2016-11-22
    Monika Sturm
    What’s new?
    Migration steps from Release 16 to Release 17
    What’s changed?
    Minor changed, screenshots, typos, etc.
    Version 7.x.x
    Author
    Date
    Klaus Emmert
    2016-07-27
    What’s new?
    BswM: activation of peripheral interrupt devices via callout 04_ConfigureBSW.htm.
    New view for comfortable task mapping 06_Mapping.htm
    Migration steps from Release 15 to Release 16
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 186-


    Appendix
    User Manual Startup with Ford SLP1
    What's New, What's Changed?
    What’s changed?
    New symbols in the chapter 00_About This User Manual.htm
    Topics concerning older releases deleted
    Minor changed, screenshots, typos, etc.
    Workflow illustration now visible
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 187-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    4 Glossary
    Adc
    (Analog Digital Converter Driver) The ADC driver abstracts hardware access to the analog-
    digital converter. For every input, the conversion parameters are configured (e.g. resolution,
    trigger source and trigger conditions).
    AVTP
    (Audio/Video Transport Protocol) The Audio/Video Transport Protocol is specified in IEEE
    1722/1722a. In AVB networks it is responsible for the transport of audio/video data, including
    the Presentation Time.
    Bfx
    (Bitfield functions for fixed point) Library for bit handling in fixed point arithmetic functions
    BMCA
    (Best Master Clock Algorithm) The Best Master Clock Algorithm is specified in IEEE 802.1AS
    and is used to detect the device with the most precise time unit in an AVB network. After find-
    ing the device with the most precise time unit, it is used as the time base for the entire sys-
    tem.
    BswM
    (BSW Mode Manager) The BswM module contains vehicle mode management and application
    mode management. It processes mode requests from SWCs or other BSW modules, and it per-
    forms actions based on the arbitration, such as control of deadline monitoring, switching sched-
    ule tables, and handling of IPDU groups. In conjunction with the EcuM, the BswM module is
    responsible for starting up and shutting down the ECU. The BswM also coordinates the multi-
    core partitions.
    Cal (Cpl)
    (Crypto Abstraction Library) The Cal library offers SWCs and other BSW modules access to
    basic cryptographic functions. The individual cryptographic functions are implemented in soft-
    ware via the Cpl module.
    Can
    (CAN Driver) The CAN Driver abstracts access to the CAN hardware for sending and receiving
    messages and for switching between controller states (sleep, stop, etc.)
    CanIf
    (CAN Interface) The CAN Interface offers abstracted (PDU-based) access to the CAN Driver. It
    controls the CAN Driver (( Can) as well as the transceiver driver (( CanTrcv).
    CanNm
    (CAN Network Management) Within a CAN network, CAN Network Management is responsible
    for coordinated transitions between the wake up and sleep state.
    CanSM
    (CAN State Manager) The CAN State Manager is responsible for the bus-specific error hand-
    ling.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 188-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    CanTp
    (CAN Transport Layer) The CanTp module conforms to ISO standard 15765-2. As the transport
    protocol for CAN, it is responsible for segmenting the data in the Tx direction, collecting data in
    the Rx direction and monitoring the data stream.
    CanTrcv
    (CAN Transceiver Driver) This driver is responsible for controlling the operating states of an
    external CAN transceiver. It contains control of wake up and sleep functions.
    CanTSyn
    (Time Sync Over CAN) This module realizes the CAN specific time synchronization protocol. An
    access to the synchronized time base by the SWCs requires the Synchronized Time-Base Man-
    ager (( StbM).
    CanXcp / XCPonCan
    (CAN XCP-Module) The CanXcp module contains CAN-specific contents of the XCP module (( 
    Xcp).
    CDD
    (Complex Drivers) The Complex Drivers are software modules that are not standardized by
    AUTOSAR. They have access to other BSW modules, the RTE and direct hardware access. For
    example, these modules are not standardized communication drivers for SPI or legacy soft-
    ware.
    Com
    (Communication) The Com module provides a signal-based data interface for the RTE. It
    places signals in messages and sends them according to the defined send type. The module
    contains various notification mechanisms for receiving signals. It also manages initial values,
    update bits and timeouts on the signal level. In multi-channel ECUs, the integrated signal gate-
    way offers the ability to route signals between the communication buses.
    ComM
    (Communication Manager) The ComM module coordinates the communication channels and
    Partial Network Cluster with the communication requirements of the application.
    ComXf
    (COM Based Transformer) The COM based transformer optimizes for signal groups the inter-
    action between RTE and the COM module, because you can avoid the shadow buffer in the COM
    module. It de-/serializes the data identical to the COM module.
    CorTst
    (Core Test Driver) The CorTst module contains configuration and control of the test capabilities
    included in the microcontroller core. In addition, it offers a framework for extending these test
    capabilities. Specifically for safety-related software, the CorTst module tests critical units such
    as the ALU and the registers.
    Crc
    (CRC Routines) The Cyclic Redundancy Check library calculates CRC checksums.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 189-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    Csm (Cry)
    (Crypto Service Manager) The Csm module offers SWCs access to basic cryptographic func-
    tions. The individual cryptographic functions are implemented by the Cry module in software
    or hardware (access via ( She).
    Dbg
    (Debugging) The debugging module enables external access to internal information of the
    basic software. It is also possible to modify memory data.
    Dcm
    (Diagnostic Communication Manager ) The Dcm module implements diagnostic communication
    according to ISO 14229-1:2006 (UDS). Some diagnostic requests are processed directly in the
    Dcm (management of diagnostic sessions, reading of error codes, EcuReset, etc.) and some
    are routed to the SWCs via port interfaces (reading, writing and controlling of data elements
    within a data identifier, execution of routines, etc.). Legal requirements of OBDII / SAE J1979
    are also supported.
    Dem
    (Diagnostic Event Manager ) The Dem module implements a fault memory. The standardized
    interface for "DiagnosticMonitors" enables uniform development of manufacturer-independent
    SWCs. The Dem module is responsible for administering the DiagnosticTroubleCode states,
    environmental data, and for storing the data in NVRAM. The legal requirements of OBDII / SAE
    J1979 are also supported.
    Det
    (Development Error Tracer ) The Det module supports error debugging during software devel-
    opment. It provides an interface for error notification, which is called by the individual BSW
    modules in case of error.
    Dio
    (Digital Input Output Driver) The Digital Input Output Driver provides read and write services
    for the DIO channels (pins), DIO ports and DIO channel groups.
    Dlt
    (Diagnostic Log and Trace) The Dlt module provides generic “Logging and Tracing” func-
    tionality for SWCs and for the BSW modules ( Rte, ( Det and ( Dem.
    DNS
    (Domain Name System) The DNS module contains a DNS resolver. It is responsible for resolv-
    ing a domain, e.g. vector.com, into a valid IP address.
    DoIP
    (Diagnostics over IP) Since AR 4.1.1 the DoIP module contains diagnostic functionality accord-
    ing to ISO 13400-2 like vehicle discovery. Up to and including AR 4.0.3, this functionality is
    part of the Socket Adaptor (( SoAd).
    DrvExt
    (External Driver) Upon request, you can obtain the implementation of drivers for externally
    connected components. They are already available for plenty of external devices, e.g. for driv-
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 190-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    ing certain EEPROMs (EEPEXT), flash chips (FLSEXT), watchdogs (WDGEXT), analog-digital con-
    verters (ADCEXT) and communication controllers (CANEXT, LINEXT, ETHSWTEXT).
    E2E
    (End-to-End Communication Protection Library) Library for secure data exchange according to
    ISO 26262 for safety-related ECUs. It is responsible for calculating the checksum and provid-
    ing the message counter.
    E2EPW
    (End-to-End Protection Wrapper) The E2E Protection Wrapper extends the RTE by adding veri-
    fication of safety-related signals.
    E2EXf
    (E2E Transformer) With the E2E Transformer, you integrate the protection of safety-relevant
    signals according to ISO 26262 in the RTE interface. In contrast to the E2E protection wrapper,
    the standard interfaces of the RTE are used.
    Ea
    (EEPROM Abstraction ) The Ea module offers a hardware-independent interface for accessing
    EEPROM data and uses an EEPROM driver (( Eep) for this. In addition to reading, writing and
    clearing data, the Ea module also distributes write accesses to different areas of the EEPROM,
    so that all EEPROM cells are uniformly stressed, which increases their life-time.
    EcuM
    (ECU State Manager) The ECU State Manager is responsible for starting up and shutting down
    the ECU as well as waking it up. It is available in two variants: flexible and fixed. The EcuM Fix
    manages a number of defined, fixed operating states. Using the EcuM Flex, the user defines all
    operating states flexibly in the ( BswM module. This lets you implement special energy-saving
    states and various types of startup. In a multi-core system, the EcuM coordinates the various
    cores.
    Eep
    (EEPROM Driver) The EEPROM driver enables hardware-independent access to EEPROM
    memory. It provides services for reading, writing and comparing data.
    Efx
    (Extended Fixed Point Routines) Library with extended mathematical functions for fixed-point
    values
    Eth
    (Ethernet Driver) The Ethernet Driver abstracts access to the Ethernet hardware for sending
    and receiving data and for switching between controller states.
    EthIf
    (Ethernet Interface) The Ethernet Interface enables bus-independent control of the Ethernet
    driver (( Eth) and Ethernet transceiver driver (( EthTrcv). Since AR 4.1, this module is also
    responsible for VLAN handling.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 191-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    EthSM
    (Ethernet State Manager) The Ethernet State Manager provides the Communication Manager (( 
    ComM) with an abstract interface for starting up or shutting down communications in Ethernet
    clusters. EthSM accesses the Ethernet hardware via ( EthIf.
    EthSwt
    (Ethernet Switch Driver) The module EthSwt provides a uniform and hardware independent
    interface for controlling and configuring Ethernet switches. It also coordinates the MAC learn-
    ing when using multiple identical ECUs like cameras for the surround view.
    EthTrcv
    (Ethernet Transceiver Driver) EthTrcv offers a uniform and hardware-independent interface
    for driving multiple transceivers of the same kind. Configuration of EthTrcv is transceiver-spe-
    cific and considers the properties of the physical network that is used.
    EthTSyn
    (Time Sync Over Ethernet) This module realizes the Ethernet specific time synchronization pro-
    tocol and references to IEEE Standard 802.1AS (( PTP). An access to the synchronized time
    base by the SWCs requires the Synchronized Time-Base Manager (( StbM).
    EthXcp/ XCPonEth
    (Ethernet XCP-Module) The EthXcp module contains Ethernet-specific contents of the XCP mod-
    ule (( Xcp).
    EXI
    (Efficient XML Interchange) The EXI module is used to interpret XML document and to convert
    them to a binary format. This makes it more efficient to process the files and to transmit
    them, in order to economize on communication bandwidth. It is used in the Vehicle2Grid envir-
    onment.
    Fee
    (Flash EEPROM Emulation) The Fee module offers a hardware-independent interface for access-
    ing flash data and uses a flash driver (( Fls) for this. In addition to reading, writing and clear-
    ing data, the Fee module also distributes write accesses to different areas of flash memory, so
    that all flash cells are uniformly stressed, which increases their life-time.
    FiM
    (Function Inhibition Manager ) Based on the active errors managed by the ( Dem module, the
    FiM offers the ability to prevent execution of functionalities in SWCs.
    Fls
    (Flash Driver) The flash driver enables hardware-independent and uniform access to flash
    memory. It provides services for reading, writing and comparing data, and for deleting blocks
    (sectors).
    FlsTst
    (Flash Test) The Flash Test module offers algorithms for testing nonvolatile memory such as
    data or program flash, SRAM and protected cache.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 192-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    Fr
    (FlexRay Driver ) The FlexRay Driver abstracts access to the FlexRay hardware for sending
    and receiving data and for switching between controller states.
    FrArTp
    (FlexRay AUTOSAR Transport Layer ) FrArTp is a FlexRay transport protocol. Based on ISO
    15765-2 (( CanTp), it contains a frame compatibility with the CAN bus.
    FrIf
    (FlexRay Interface) The FlexRay Interface offers abstracted (PDU-based) access to the
    FlexRay hardware. In addition, it offers support for synchronization with the global FlexRay
    time.
    FrNm
    (FlexRay Network Management ) This module is responsible for network management in
    FlexRay. It synchronizes the transition to the bus sleep state.
    FrSM
    (FlexRay State Manager) The FlexRay State Manager controls and monitors the wake up and
    startup of nodes in the FlexRay cluster.
    FrTp
    (FlexRay ISO Transport Layer) FrTp is a FlexRay transport protocol and is based on the ISO
    10681-2 standard.
    FrTrcv
    (FlexRay Transceiver Driver ) The driver for an external FlexRay transceiver is responsible for
    switching the transceiver on and off.
    FrTSyn
    (Time Sync Over FlexRay) This module realizes the FlexRay specific time synchronization pro-
    tocol. An access to the synchronized time base by the SWCs requires the Synchronized Time-
    Base Manager (( StbM).
    FrXcp/ XCPonFr
    (FlexRay XCP-Module) The FrXcp module contains FlexRay-specific contents of the XCP module
    (( Xcp).
    Gpt
    (General Purpose Timer Driver ) The General Purpose Timer Driver provides an interface for
    accessing internal timers of the microcontroller. It is used for controlling periodic and singular
    events, for example.
    HTTP
    (Hypertext Transfer Protocol) The Hypertext Transfer Protocol, for instance, routes browser
    requests to a server. The module contains a HTTP client. It is used in the Vehicle2Grid envir-
    onment.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 193-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    Icu
    (Input Capture Unit Driver ) The Icu driver provides services for edge detection, measurement
    of periodic signals, assignment of edge time stamps and control of wake up interrupts.
    Ifl
    (Interpolation Floating Point) Library with interpolation functions for floating point values
    Ifx
    (Interpolation Fixed Point) Library with interpolation functions for fixed point values
    IicDrv
    (I²C Driver) The I²C Driver provides services for communication with external I2C chips.
    IoHwAb
    (I/O Hardware Abstraction ) The I/O Hardware Abstraction represents the connection between
    the RTE and the ECU's I/O channels. It encapsulates access to the I/O drivers such as ( Adc, ( 
    Dio or ( Pwm and thereby makes the I/O signals of the ECU available to the SWCs.
    IpduM
    (I-PDU Multiplexer) This module is responsible for multiple use of fixed PDUs with different
    data contents.
    J1939Dcm
    (SAE J1939 Diagnostic Communication Manager) The module implements Diagnostic Messages
    of the SAE J1939-73 protocol, e.g. for reading out the fault memory.
    J1939Nm
    (SAE J1939 Network Management) J1939 supports adding ECUs to networks on-the-fly. The
    J1939Nm module is responsible for negotiating a unique ECU address ("AddressClaim") and
    unlike other NM modules for handling the wake-up or going to sleep of the bus.
    J1939Rm
    (SAE J1939 Request Manager) The J1939Rm module implements requesting of data via
    Request Handling that is defined in the SAE J1939 protocol.
    J1939Tp
    (SAE J1939 Transport Layer) The J1939TP module contains the transport protocols BAM (Broad-
    cast Announce Message) and CMDT (Connection Mode Data Transfer) of the SAE J1939 stand-
    ard.
    LdCom
    (Large Data COM) The LdCom module is optimized for routing large signals. Thereby it avoids
    an unnecessary copying of data. The LdCom is typically used together with (SomeIpXf as a seri-
    alization transformer.
    Lin
    (LIN Driver) The LIN Driver provides services for initiating frame transmission (header,
    response, sleep-mode and wake up), and for receiving responses, checking the current state
    and validating wake up events.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 194-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    LinIf
    (LIN Interface ) The LIN Interface offers abstracted (PDU-based) access to the LIN hardware.
    It also handles schedule table processing and contains the LIN transport protocol (( LinTp).
    LinNm
    (LIN Network Management) The LinNm module contains a hardware-independent protocol,
    which coordinates the transition between normal operation and the bus sleep mode of the LIN
    network.
    LinSM
    (LIN State Manager) The LIN State Manager switches between schedule tables and PDU groups
    in the ( Com module and services the LIN interface with regard to sleep and wake up.
    LinTp
    (LIN Transport Layer) The LIN transport protocol is responsible for segmenting data in the Tx
    direction, collecting data in the Rx direction and monitoring the data stream. According to the
    AUTOSAR specification, LinTp is part of ( LinIf.
    LinTrcv
    (LIN Transceiver Driver ) The module for an external LIN transceiver is responsible for mon-
    itoring and driving the wake up and sleep functions.
    LinXcp
    (LIN XCP-Module) The LinXcp module contains LIN-specific contents of the XCP module (( Xcp).
    Mcu
    (Micro Controller Unit Driver) The MCU driver provides the services for: - A microcontroller
    reset triggered by software - Selecting microcontroller states (STOP, SLEEP, HALT, etc.) - Con-
    figuring wake up behavior - Managing the internal PLL clock unit - Initializing RAM areas with
    predefined values.
    MemIf
    (Memory Abstraction Interface ) This module provides uniform access to the services of ( Ea
    and ( Fee. This lets you use multiple instances of these modules.
    Mfl
    (Mathematical Floating Point) Library with arithmetic functions for floating point values
    Mfx
    (Mathematical Fixed Point) Library with arithmetic functions for fixed point values
    Nm
    (Generic Network Management Interface ) The Nm module offers a general and network-inde-
    pendent interface for accessing the bus-dependent network management modules (( CanNm,
    (LinNm, ( UdpNm and ( FrNm). In addition, the module handles synchronous, inter-network
    shutdown of the communication system in coordination with the other ECUs.
    NvM
    (Non Volatile RAM Manager ) The NvM module manages, reads and writes data to a nonvolatile
    memory (( Ea or ( Fee). At system start and at shutdown, it synchronizes the data in the RAM
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 195-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    areas of the application. The module provides services such as saving of redundant blocks for
    a higher level of data protection. Since AR 4.0.3, the ( RTE also provides a simpler and more
    flexible interface to Nv data (NvDataInterfaces).
    Ocu
    (Output Compare Unit Driver) The OCU driver standardizes initialization and access to the Out-
    put Compare Unit.
    Os
    (Operating System) This module is the operating system of an AUTOSAR ECU. It is actually an
    extended OSEK operating system. Extensions are divided into so-called Scalability Classes
    (SC1-SC4). They cover the following functionalities: - SC1: schedule tables - SC2: timing pro-
    tection + schedule tables - SC3: memory protection + schedule tables - SC4: memory pro-
    tection + timing protection + schedule tables In safety-related ECUs, the OS is one of the
    safety-related modules. The operating system also supports multi-core microcontrollers.
    PduR
    (PDU Router ) The PDU Router handles distribution of the communication packets (PDUs)
    between the bus systems and the various BSW modules. In addition it offers gateway mech-
    anisms for routing PDUs (FIFO) and TP-PDUs (on-the-fly) between the bus systems.
    Port
    (Port Driver ) This module is responsible for initialization of the entire port structure of the
    microcontroller.
    PTP
    (Precision Time Protocol) The PTP module is used to distribute a precise system time to all
    devices participating in an AVB network. It is implemented according to IEEE 802.1AS. The
    implementation consists of microprocessor-dependent and independent parts.
    Pwm
    (Pulse Width Modulation Driver ) The Pwm driver provides services for initialization and con-
    trol of the PWM (pulse-width modulation) channels of the microcontroller.
    RamTst
    (Ram Test) This module tests internal microcontroller RAM cells. A complete test is triggered
    during startup and shutdown of the ECU or by a diagnostic command. During normal operation,
    a periodic test is performed (block-by-block or cell-by-cell).
    Rte
    (Runtime Environment ) The RTE implements the Virtual Functional Bus and the execution of
    the SWCs. It also ensures consistent data exchange between the SWCs themselves and
    between the SWCs and the basic software. The execution of the basic software is realized by
    the integrated ( SchM. The RTE also supports communication beyond partition boundaries
    (multi-core/trusted/untrusted). In addition, it offers simplified access to NVRAM data and cal-
    ibration data. In safety-related ECUs, the RTE is one of the safety-related modules.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 196-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    Rtm
    (Runtime Measurement) You use the Rtm module to determine the runtime and CPU load of
    BSW modules and of application code. The module is typically used during development.
    SCC
    (Smart Charge Communication) This module is responsible for smart charge communication
    according to ISO 15118 or DIN 70121 and contains the V2GTP transport protocol that is used
    for this protocol. It supports DC and AC charging and the associated profiles Plug-and-Charge
    (PnC) and External Identification Means (EIM).
    SchM
    (BSW Scheduler) The SchM module is integrated in the ( RTE, calls the periodic “main” function
    of the individual BSW modules, and provides functions for critical sections. For the distribution
    of the BSW (master satellite concept) via partitions and core boundaries, the SchM provides
    nearly identical communication interfaces like the ( RTE.
    Sd
    (Service Discovery) Service Discovery was first specified in AR 4.1.1. An ECU communicates
    the availability of its services to communication partners via the publish-subscribe protocol
    implemented in this module. In addition, ECUs can register to receive automatic notifications,
    e.g. on a signal update.
    SecOC
    (Secure Onboard Communication) The SecOC is used to send or receive authenticated mes-
    sages. Unauthorized, repeated or manipulated messages are detected. The SecOC is part of
    the AUTOSAR security solution.
    She
    (Secure Hardware Extension) The She driver implements the cryptographic hardware func-
    tions of a Hardware Security Module (HSM). This functionality is used by the ( Csm module, for
    instance.
    SoAd
    (Socket Adaptor) The socket adaptor converts the communication via PDUs as it is defined in
    AUTOSAR into a socket-based communication. In AR 4.0, the SoAd also contains the diagnostic
    functionality defined in ISO 13400-2 ((DoIP). Since AR 4.1, this plug-in is removed and spe-
    cified as a stand-alone module (( DoIP).
    SomeIpXf
    (SOME/IP Transformer) The module SOME/IP Transformer is an RPC and serialization protocol.
    It is used to call methods on other ECUs, which for example were made known in the system
    beforehand via Service Discovery (( Sd).
    Spi
    (SPI Handler/ Driver) The SPI Driver handles data exchange over the SPI interface. It is
    primarily used in conjunction with external hardware such as EEPROM, Watchdog, etc.
    StbM
    (Synchronized Time-Base Manager) The Synchronized Time-Base Manager enables time syn-
    chronization. Since AR 4.2 a time base prescribed by the Time Master can be synchronized
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 197-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    with other ECUs via bus systems.
    TcpIp
    (TCP/IP Stack) This module contains all protocols for UDP and TCP-based communication. It
    supports the versions IPv4 and IPv6 as well as parallel operation of IPv4 and IPv6 in one ECU.
    It contains the following protocols: - IPv4, ICMPv4 and ARP - IPv6, ICMPv6 and NDP - UDP,
    TCP, DHCPv4 (client) and DHCPv6 (client)
    TLS
    (Transport Layer Security) This module contains a Transport Layer Security client. The TCP-
    based communication is encrypted with TLS. The encryption algorithm used can be selected.
    Tm
    (Time Services) The Tm module is used for such tasks as measuring execution times and func-
    tions and implementing active waiting. It offers a resolution from 1µs to 4.9 days.
    Ttcan
    (TTCAN Driver) The TTCAN Driver offers the same functionality for a TTCAN controller (ISO
    11898-4) as the CAN Driver (( Can) does for a CAN controller.
    TtcanIf
    (TTCAN Interface) The TTCAN Interface offers the same functionality for a TTCAN controller
    (ISO 11898-4) as the CAN Interface (( CanIf) does for a CAN controller.
    UdpNm
    (UDP Network Management) You use network management over UDP to implement syn-
    chronous transition to sleep mode for Ethernet ECUs.
    Wdg
    (Watchdog Driver) This module provides services for controlling and triggering the watchdog
    hardware. The trigger routine is called by the Watchdog Manager (( WdgM). For safety-related
    ECUs, the Wdg module must be developed according to ISO 26262.
    WdgIf
    (Watchdog Interface) This module enables uniform access to services of the Watchdog Driver
    (( Wdg), such as mode switching and triggering. For safety-related ECUs, the WdgIf module
    must be developed according to ISO 26262.
    WdgM
    (Watchdog Manager ) The Watchdog Manager monitors the reliability and functional safety of
    the applications in an ECU. This includes monitoring for correct execution of SWCs and BSW
    modules and triggering of the watchdogs at the required time intervals. The WdgM module
    reacts to potential faulty behavior with multiple escalation stages. An important fact for
    safety-related functions according to ISO 26262 is the monitoring of correct flow sequences of
    critical tasks (logical supervision). For safety-related ECUs, the WdgM must be developed
    according to ISO 26262.
    Xcp
    (Universal Measurement and Calibration Protocol) XCP is a protocol for communication
    between a master (PC tool) and a slave (ECU). It is standardized by ASAM and is used
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 198-


    Appendix
    User Manual Startup with Ford SLP1
    Glossary
    primarily for measuring, calibrating, flashing and testing ECUs. XCP supports the bus systems
    CAN (( CanXcp), FlexRay (( FrXcp), Ethernet (( EthXcp) and LIN (( LinXcp).
    XML Security
    (XML Security) You use this module to generate and validate XML signatures to EXI-encoded
    data based on the W3C XML security standard. It is used in the Vehicle2Grid environment.
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 199-


    Appendix
    User Manual Startup with Ford SLP1
    Index
    5 Index
    E
    ECU Instance 154
    A
    Event 39
    Alarm 149
    I
    Assistant
    Installation Guide 20
    Component Connection Assistant 56
    Data Mapping Assistant 58
    P
    Project Assistant 52, 56, 82, 128, 130
    Project folder 129
    Task Mapping Assistant 61
    R
    B
    Runnables 62, 75, 93144
    Basic Editor 4991-92, 139148158162,
    173
    S
    BSW Modules
    Start Menu 25
    CANIF 38, 177
    T
    C
    Task 4961114
    Configuration Editors 36, 92
    Base Services 36
    Communication 21, 37, 77, 88
    Diagnostics 3977
    Memory 4075, 114, 125, 141, 147175
    Mode Management 42
    Network Management 47
    Runtime System 4856144
    D
    DaVinci Configurator
    Input Files 26126, 153
    On-demand Validation 50
    Project Settings 19, 26, 8488125127,
    151, 157
    © Vector Informatik GmbH
    Version 9.0.1 for Release 18
    - 200-


    Get more Information!
    Visit our Website for:
    News
    Products
    Demo Software
    Support
    Training Classes
    Addresses
    www.vector.com

    Document Outline


    1.3.54 - TechnicalReference_3rdParty-MCAL-Integration

    MCAL Integration Package

    1.3.56 - TechnicalReference_3rdParty-MCAL-Integrations


     
     
     
     
     
     
     
     
     
     
     
     
    MCAL Integration Package 
    Technical Reference 
     
    Basics and workflows 
    Version 1.04.00 
     
     
     
     
     
     
     
     
     
     
    Authors 
    Andrej  Gazvoda,  Günther  Piehler,  Roland  Süß,  Ingo 
    Wuttke 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MCAL Integration Package 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Roland Süß ; Ingo Wuttke 
    2015-02-27 
    1.00.00 
    Initial Ideas, usage as 
    Application Note; Porting to 
    Technical Reference 
    template; adding detailed 
    description about 3rd party 
    tools etc. 
    Günther Piehler 
    2015-04-24 
    1.00.01 
    Review; small changes to 
    increase understandability; 
    Known Issue for missing 
    config items added  
    released 
    Andrej Gazvoda; Roland Süß 
    2015-06-30 
    1.00.02 
    7.3 / 7.4 - Added known 
    issues regarding EB tresos™ 
    tool 
    Günther Piehler 
    2015-07-17 
    1.01.00 
    2.3 - Introduction of Mixed 
    AUTOSAR use case 
    ff - Extend description of 
    MCAL preparation 
    (prerequisites) 
    - hint about recommended 
    workflow added 
    Günther Piehler 
    2015-10-26 
    1.01.01 
    3.2.2 / 3.2.3 - parameter 
    corrected 
    – added hint for MCAL 
    Integration video 
    Günther Piehler 
    2016-01-26 
    1.02.00 
    4.2 - added hint for “round 
    trip” ability 
    general - new CI applied 
    Günther Piehler 
    2016-07-05 
    1.03.00 
    Page 3 - Added further useful 
    documents as reference 
     
    Günther Piehler 
    2016-09-27 
    1.04.00 
    – completely new 
    Reference to QuickStart 
    document deleted (replaced 
    within this document); 
    Reference to ScreenCase 
    and ReleaseNote added 
    Hints for AUTOSAR3 <-> 
    AUTOSAR4 differentiation 
    added 
    3.2.2 – non-interactive mode 
    introduced 
    3.2.3 – reference to Release 
    Notes added for further info 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
    – completely new 
    – issue for “MCAL and SIP 
    storage location” removed 
    – hint to “generate all” 
    added 
    Reference Documents 
    No. 
    Source  Title 
    Version 
    [1]   
    Vector 
    Product Information MICROSAR Vector SLP4 
    1.03.02 
    [2]   
    Vector 
    Catalog – Product Information MICROSAR – Chapter MCAL 
    V1.3 – 
    2015-02 
    [3]   
    Vector 
    Application Note “AN-ISC-8-1153_ThirdPartyModules.pdf” 
    Latest 
    (e.g. 1.0) 
    [4]   
    Vector 
    Application Note “AN-ISC-8-1171_Tresos_LicenseHandling.pdf” 
    Latest 
    (e.g. 
    1.00.01) 
    [5]   
    Vector 
    Application Note “AN-ISC-8-1180_MCAL-Integration-Variants.pdf”  Latest 
    (e.g. 0.9) 
    [6]   
    Vector 
    Release Note 
    As 
    “ReleaseNotes_3rdPartyMCAL_VectorIntegration.pdf” 
    provided 
    within 
    your SIP 
    [7]   
    Vector 
    ScreenCast_McalIntegration_Tresos.pdf 
    As 
    provided 
    within 
    your SIP 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
     
    questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    Contents 
    1 
    Purpose of the document ............................................................................................. 7 
    2 
    Introduction................................................................................................................... 8 
    2.1 

    Responsibility ..................................................................................................... 8 
    2.2 
    Support requests................................................................................................ 9 
    2.3 
    Mix between AUTOSAR specification versions .................................................. 9 
    3 
    First Steps ................................................................................................................... 10 
    3.1 

    Delivery structure ............................................................................................. 10 
    3.2 
    Starting up ....................................................................................................... 11 
    3.2.1 

    MCAL delivered within Vector SIP .................................................... 11 
    3.2.2 
    MCAL not contained within Vector SIP ............................................. 11 
    3.2.3 
    MCAL Update needed ...................................................................... 13 
    4 
    Workflow ..................................................................................................................... 14 
    4.1 

    Single configuration tool usage ........................................................................ 14 
    4.2 
    Mixed configuration tool usage......................................................................... 15 
    4.3 
    Split configuration tool usage ........................................................................... 17 
    5 
    Configuration tools ..................................................................................................... 19 
    5.1 

    Vector DaVinci Configurator ............................................................................. 19 
    5.2 
    EB tresos™ ...................................................................................................... 19 
    5.2.1 

    Setting up a new Configuration Project ............................................ 19 
    5.2.2 
    Project Details .................................................................................. 20 
    5.2.3 
    Selection of components .................................................................. 21 
    5.2.4 
    Creation of importers and exporters ................................................. 22 
    5.2.5 
    Configure the MCAL components .................................................... 23 
    5.2.6 
    Generation of the 3rd party MCAL .................................................... 23 
    5.3 
    Configuration hints for parallel usage of DaVinci Configurator and EB 
    tresos™ ........................................................................................................... 23 
    5.3.1 

    Vector DaVinci Configurator 5 .......................................................... 23 
    5.3.2 
    EB tresos™ ...................................................................................... 24 
    6 
    Restrictions ................................................................................................................. 25 
    6.1 

    UNC path usage .............................................................................................. 25 
    7 
    Known Issues ............................................................................................................. 26 
    7.1 

    Long path names ............................................................................................. 26 
    7.2 
    Missing configuration items within imported configuration ................................ 26 
    7.3 
    Configuration Export with EB tresos™ Version 13.0.0 ...................................... 26 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    7.4 
    Error messages regarding CommonPublishedInformation with EB tresos™ .... 27 
    8 
    Frequently Asked Questions ..................................................................................... 28 
    9 
    Glossary and Abbreviations ...................................................................................... 30 
    9.1 

    Glossary .......................................................................................................... 30 
    9.2 
    Abbreviations ................................................................................................... 30 
    10  Contact ........................................................................................................................ 31 
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    Illustrations 
    Figure 4-1 
    Configuration workflow – Mixed configuration tool usage .......................... 16 
    Figure 5-1 
    New Configuration Project ........................................................................ 20 
    Figure 5-2 
    Configuration Project Data ........................................................................ 21 
    Figure 5-3 
    Component Configurations ....................................................................... 22 
    Figure 5-4 
    Create an exporter (step 1) ....................................................................... 22 
    Figure 5-5 
    Create an exporter (step 2 – AUTOSAR options) ...................................... 22 
    Figure 5-6 
    Generate Button ....................................................................................... 23 
    Figure 5-7 
    DEM Path using DaVinci Configurator 5 ................................................... 23 
    Figure 5-8 
    Settings within DaVinci Configurator 5 Pro................................................ 23 
    Figure 5-9 
    DEM-Path in the Outline window of tresos™ ............................................ 24 
    Figure 5-10 
    DEM-Path within tresos™ ......................................................................... 24 
    Figure 5-11 
    Settings for DEM within tresos™ .............................................................. 24 
     
    Tables 
    Table 4-1  
    Guidance for single configuration tool usage ............................................ 15 
    Table 4-2  
    Guidance for mixed configuration tool mode ............................................. 17 
    Table 4-3  
    Guidance for split configuration tool usage ............................................... 18 
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    1  Purpose of the document 
    This  document  supports  the  user  by  launching  the  delivery,  setting  up  a  project  and 
    serving  the  tooling-  and  configuration-based  interfaces  between  the  Vector  MICROSAR 
    BSW and the 3rd party MCAL. 
    The term “tooling” means Vector DaVinci Configurator on the one hand and a third party 
    configuration and generation framework (EB  tresos™,  KPIT ECU Spectrum™ …) on the 
    other. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
    2  Introduction 
    The  MICROSAR  MCAL  Integration  Package  covers  the  integration  of  a  3rd  party  MCAL 
    package into the Vector MICROSAR BSW stack. As part of this, Vector performs a setup 
    of  the  MCAL  provided  by  the  customer or  the  semiconductor  vendor  and  supplements  it 
    with items needed for the integration with the MICROSAR BSW. 
    Typically  the  semiconductor  vendor  delivers  the  MCAL  with  its  own  configuration  and 
    generation  tool  chain.  Vector  provides  solutions  to  deal  with  the  dependencies  and 
    interfaces on embedded and on configuration level between the AUTOSAR BSW and the 
    MCAL  components  (with  AUTOSAR4.0.3  these  configuration  level  based  interfaces  are 
    about 10 parameters). 
    The  following  use  cases  and  corresponding  workflows  are  explained  and  illustrated  in 
    detail later on: 
    1.  Single configuration tool usage: Usage of the Vector DaVinci Configurator as exclusive 
    configuration tool for both the MICROSAR BSW and the 3rd party MCAL. 
    2.  Mixed configuration tool usage: Parallel and synchronized usage of the DaVinci 
    Configurator and a 3rd party MCAL configuration tool. 
    3.  Split configuration tool usage: Split configuration and code generation using DaVinci 
    Configurator for the configuration/generation of the MICROSAR BSW and the 3rd 
    party tool for configuration/generation of the MCAL. 
    In principal all three use cases are supported and the decision which one is used depends 
    on  user  requirements  as  well  as  on  the  capabilities  of  the  integrated  MCAL.  Detailed 
    decision guidance and hints will be given in this document. 
     
     
     
    Note 
    Many items described within this document are AUTOSAR release independent. 
      Wherever necessary we will add a hint when there is a deviation within the workflow or 
    any other topic from AUTOSAR4 to AUTOSAR3. 
     
     
     
     
    2.1 
    Responsibility 
    Vector does not take over any responsibility for the usage and functionality of the 
    integrated 3rd party components. The MCAL integration into the MICROSAR SIP does not 
    include a full functional test for the 3rd party components. It remains the responsibility of 
    the customer to ensure freeness of defect and shortcomings as well as functional 
    completeness of the 3rd party components. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
    2.2 
    Support requests 
    Vector will support you in all aspects of the MCAL integration into your MICROSAR SIP. In 
    case of questions or problems please get in touch with your MICROSAR contact (e.g. as 
    defined in the delivery description that is part of your SIP). 
    Since Vector is not the vendor of the integrated 3rd party components such support 
    requests shall be directed to the 3rd party software vendor as they can provide you with 
    first-hand information and support. 
    2.3 
    Mix between AUTOSAR specification versions 
    Sometimes it is necessary that there is a mixture of components released for different 
    AUTOSAR versions. Most common case of mixture is the use of AUTOSAR 3.x related 
    BSW (because OEMs have fixed their platform SW) with AUTOSAR4.0.x related MCALs. 
    This is based on the fact that there are continuously new HW platforms available through 
    the semiconductor vendors but not all devices will be supported with ASR4- as well as 
    ASR3-based MCALs. In future there will be also the situation of mixture of AUTOSAR4.x 
    based BSW with AUTOSAR3.x based MCALs (or also AUTOSAR4.x with AUTOSAR4.0.x 
    MCAL to BSW or vice versa). This is due to some OEM decisions to start with 
    AUTOSAR4.x but willing to use some older microcontroller devices. 
    AUTOSAR3.x and AUTOSAR4.x based SW in general is not directly compatible. 
    Nevertheless Vector supports you to be able to mix those components. There are several 
    measures to take and Vector provides a solution for this with the term MCAL Integration 
    Package (mixed ASR)
    . There are some wrappers (on embedded as well as on 
    configuration side) that are part of your SIP. 
     
     
     
    Note 
    Currently Vector supports mixing of AUTOSAR3.x related BSW with MCALs up to 
      AUTOSAR4.0.3 but no higher releases. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 

    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
    3  First Steps 
    During MCAL integration at Vector several supplements have been created and integrated 
    into your delivery. A short overview of contributed parts shall be given. 
    3.1 
    Delivery structure 
     
     
     
    Note 
    The delivery structure may vary in few elements. The following description is meant to 
      be a general one. Single artefacts may be located slightly different. This depends on 
    evolving our MICROSAR BSW product as well as differentiation between used tooling 
    (with AUTOSAR3 DaVinci Configurator 4 is used which relies on bit different folders as 
    DaVinci Configurator 5 Vectors solution for AUTOSAR4 based product). 
    Further details, e.g. about delivery structure, can be seen in [5]. 
     
     
     
     
    The following parts of the delivery (MICROSAR SIP) are relevant for the successful MCAL 
    integration (based on an AUTOSAR4 BSW SIP)

    >  BSW\<MCAL_µC>:  Contains the makefiles (AUTOSAR makefiles) for all 3rd party 
    MCAL components (typically all MCAL components are merged into 1 file). 
    >  BSWMD\<MCAL_µC>:  Contains configuration items for integration into the DaVinci 
    Configurator. After execution of steps described under 3.2 the basic software definition 
    files (VSMD) 
    >  DaVinciConfigurator\Generator\<MCAL_µC>:   Contains configuration items 
    for integration into the DaVinci Configurator e.g. XML-preparation files as well as files 
    containing the commands for execution of the 3rd party code generator plus optional 
    convenience features like registration of Init-APIs towards the ECUM component 
    recommended configurations etc. 
    >  ThirdParty\<MCAL_µC>\Supply:  Contains or currently must contain 3rd party 
    MCAL and the tooling provided along with. The structure is defined by the MCAL 
    supplier. Typically the supply folder contains: 
    >  MCAL implementation (C- and H files) 
    >  BSWMD description files according to AUTOSAR  
    >  Tooling for MCAL configuration and generation 
    >  MCAL related documentation 
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    10 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
     
     
    Caution 
    Your delivery (SIP) may not finally contain the integrated MCAL because of several 
      reasons (license etc.). Currently it is recommended that the MCAL and its generation 
    tooling, to be used with Vectors SIP, is directly installed into this above mentioned 
    folder ThirdParty\<MCAL_µC>\Supply with exactly the default name of your 
    MCALs supplier! 
     
     
     
     
     
    Note 
    Depending on the deployment of your MCAL supplier (keyword: 1 package for the 
      whole MCAL, several packages for single functionalities like basic IO, memory, 
    communication) you will have to install 1 or more packages into the Supply folder of 
    your SIP. 
    Example with MCAL from 3rd party MCAL of Infineon: 
    ThirdParty\<MCAL_µC>\Supply 
    .\MC-ISAR_AS4XX_AURIX_TC27X_CA_PB_BASE_V100 
    .\MC-ISAR_AS4XX_AURIX_TC27X_CA_PB_MEM_V100 
    .\Tresos 
     
     
     
    >  ThirdParty\<MCAL_µC>\VectorIntegration:  Contains tools which supports 
    the user during project setup (refer to 3.2) 
    3.2 
    Starting up 
    There are 3 possible scenarios for your SIP which will be explained in detail. 
    3.2.1 
    MCAL delivered within Vector SIP 
    To  figure  out  if  this  scenario  is  applied  with  your  SIP  just  have  a  look  into  the  above 
    mentioned folders. When they are  existent  and contain  the needed files (e.g.  embedded 
    source code, AUTOSAR description files etc.) you do not have to do any other preparation. 
    3.2.2 
    MCAL not contained within Vector SIP 
    With this scenario you have to do some preparations, e.g. install the MCAL etc. 
     
     
     
    Caution 
    In order to activate the MCAL and to use the workflows described later on some 
      adaptions have to be made on MCAL packages. 
    To ease this procedure Vector provides a tool to execute these steps automatically. 
    This feature also supports the user during MCAL package updates received from the 
    MCAL manufacturer 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    11 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
     
     
     
     
    Note 
    Please consider that the different semiconductor vendors may provide several 
      packages. Sometimes it might be necessary to perform merge actions by hand before 
    above mentioned tool can be performed. For specific information please refer to the 
    document [6]. 
     
     
     
     
     
     
    Practical Procedure 
    Please start the batch file located here: 
      ThirdParty\<MCAL_µC>\VectorIntegration\Script_MCAL_Prepare.bat 
    with the option --prepare. 
    If you are facing problems please refer to chapter 6 
     
     
     
     
     
     
    Note 
    For compatibility reasons the Script_MCAL_Prepare.bat is taken over but currently 
      does nothing else than calling a GUI tooling named 3rd party MCAL Integration Helper
    This tooling asks you for some details like the location the MCAL is currently installed 
    in. It also double checks existence of the MCAL (e.g. for update use case etc.). 
     
     
     
    The tooling processes the following principal steps: 
    >  Prepare MCAL configuration tool by copying of plugins or similar steps 
    >  Delete/Rename MCAL specifics like Compiler_cfg.h and MemMap.h within include 
    paths (as those files are already contained within the Vector SIP) 
    >  Copy (maybe rename of) BSWMD files from a location within the 3rd party folder 
    structure for one specific derivative to the location the Vector tooling is expecting it. If 
    needed you will be asked which derivative shall be taken. 
    >  Adaptions on certain artefacts created and delivered by Vector to integrate the MCAL 
    on several levels (e.g. Makefiles, Tooling-interfaces) 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    12 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
     
     
    Expert Knowledge 
    The user may have the requirement to process all within an automated testsuite, which 
      results in a so called non-interactive mode of the GUI tooling. Non-interactive means 
    that the tooling does not require user inputs whilst showing up the GUI. 
    This requires that the GUI inputs are handed over via the command line interface. 
    Detailed description is included within the Script_MCAL_Prepare.bat. 
     
     
     
     
    3.2.3 
    MCAL Update needed 
    Usually  within  your  development  phase  there  will  be  updates  of  your  3rd  party  MCAL. 
    Vector  supports  you  for  this  use  case  and  does  some  preparations  within  the  MCAL 
    Integration Package phase. 
    When you are receiving an update of the MCAL please clean up the MCAL Integration. 
     
     
     
    Practical Procedure 
    Execute the Script_MCAL_Prepare.bat with the option --undo. 
      Install the Update of the MCAL and execute the Script_MCAL_Prepare.bat with 
    option --prepare again. 
     
     
     
     
     
     
    Caution 
    Due to the fact that the update process is quite supplier specific please refer to your 
      provided [6]. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    13 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
    4  Workflow 
    As  mentioned  in  the  introduction  there  are  three  reasonable  workflows  the  user  can 
    choose  from.  Which  one  leads  to  the  highest  benefit-cost  ratio  depends  on  user 
    requirements / preference on the one hand and on the level auf AUTOSAR conformance 
    of  the  MCAL  on  the  other  hand.  In  the  following  all  three  workflows  are  introduced  and 
    their corresponding prerequisites and advantages/disadvantages are listed for guidance. 
     
     
     
    Note 
    Your SIP contains a Release Note [6] which describes the recommended / supported 
      workflow. 
     
     
     
     
     
    Multimedia Link 
    For the case that semiconductor supplies MCAL with EB tresos studio there is a video 
      available which shows the MCAL integration as well as an exemplary workflow. We 
    highly recommend having a look into this video for better understanding necessary 
    inputs as well as interaction. 
    Just have a look at [7]. 
    When you are not able to watch this video please get in contact with Vector delivery 
    engineer to provide you an offline-version. 
     
     
     
     
     
    Note 
    Due to the fact that following chapters only mention the term DaVinci Configurator 
      some words upfront. 
    You will (have to) use DaVinci Configurator 4 for AUTOSAR3 based MICROSAR 
    product. With AUTOSAR4 based MICROSAR product you will have to use DaVinci 
    Configurator 5. 
    For some special reasons you will get DaVinci Configurator 5 even if your delivery is 
    based on MICROSAR3 but this is not driven by topic MCAL but on some others and 
    therefore not explained in further details. 
     
     
     
    4.1 
    Single configuration tool usage 
    After  execution  of  the first  steps  described  in  3.2  the  user  is  able  to  use  Vector  DaVinci 
    Configurator as the exclusive configuration tool for both the MICROSAR BSW as well as 
    the 3rd party MCAL. The configuration of the 3rd party components is based on the MCAL 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    14 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    AUTOSAR  component  definition  files  (BSWMD)  which  are  (have  to  be)  included  in  the 
    original semiconductor vendor packages. 
    You can activate/add the 3rd party components to your configuration in the same way you 
    would activate/add the MICROSAR BSW components. 
    Vector has integrated the commands for the external code generators  so that you will be 
    able to start the MCAL code generation within the Configurator GUI by using this workflow. 
    DaVinci  Configurator  is  used  to  call  the  MCAL  generator  and  also  displays  warnings, 
    errors, and other information.  
     
    Prerequisite 
    AUTOSAR component definition files provided by MCAL manufacturer must be completely 
    AUTOSAR conform and consistent to possibly used proprietary file formats (used internally by 
    the 3rd party tool). 
    Advantages 
    Disadvantages 
    Only one configuration tool and one 
    No usage of convenience features which are 
    configuration file to be used / no redundant data  possibly provided by MCAL manufacturer but 
    not transferred/modeled within the AUTOSAR 
    component definition files 
    All dependencies between BSW and MCAL 
     
    components can be solved easily 
    Table 4-1   Guidance for single configuration tool usage 
    4.2 
    Mixed configuration tool usage 
    The  configuration  tooling  respectively  the  internal  (proprietary)  description  files  of  some 
    3rd party MCAL contains internal logic which supports the user during configuration steps. 
    Examples are 
    >  Parameter A is only needed if Parameter B is set to value “X” 
    >  Parameter C is calculated automatically based on A and B 
    >  During component instantiation a list of containers is created automatically with 
    reasonable and different values 
    These  mechanisms  are  not  completely  specified  by  the  AUTOSAR  standard  and  not 
    always  modeled  correctly  within  the AUTOSAR  component  definition  files  provided.  The 
    fact is that they are not feasible useable outside the original MCAL configuration tool. As a 
    result and depending on the level of feature convenience of the MCAL tool it is advisable 
    to at least use it for the project setup as it will speed up the process in this phase.  
    By doing so the user has to deal with two different tools during ECUC setup. But in a later 
    phase  it  will  be  easier  to  use  a  one  tool  solution  as described  in  4.1. Thus  the user  will 
    have to deal with a tool transition. To ease this procedure Vector has introduced some tool 
    features. 
    The diagram below shows a workflow to use both the features of the MCAL tool and the 
    convenience of a solution which is based on a single tool. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    15 
    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
     
    Figure 4-1  Configuration workflow – Mixed configuration tool usage 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    16 
    based on template version 5.2.0 




    Technical Reference MCAL Integration Package 
    Prerequisite 
    AUTOSAR component definition files provided by MCAL manufacturer must be completely 
    AUTOSAR conform and as consistent as possible to used proprietary files 
    Advantages 
    Disadvantages 
    Usage of convenience features of both tools 
    Additional tool knowledge is needed 
    Dependencies between BSW and MCAL 
    Overhead due to export/import workflow  
    components can be solved by data 
    synchronization (export/import) 
    Switch to single configuration tool and 
     
    configuration file possible 
    Table 4-2   Guidance for mixed configuration tool mode 
     
     
    Practical Procedure (startup) 

    1.  Create a DaVinci project 
     
    2.  Activate BSW components needed, but no MCAL components 
    3.  Create a project within the 3rd party configuration tool (see 5.2) 
    4.  Configure all MCAL components needed within the 3rd party configuration 
    tool 
    5.  Export all MCAL components from the 3rd party tool to an AUTOSAR 
    conform ECUC file  
    6.  Import this file in DaVinci Configurator 
     
     
     
     
     
     
    Note 
    As marked in figure above, the loop or sometimes mentioned as round trip is generally 
      supported. Precondition for a successful round trip is DaVinci Configurator 5.10 and 
    above (this implies that with AUTOSAR3 based BSW and DaVinci Configurator 4 this 
    scenario is not fully supported). 
    Round trip workflow has been evaluated with several semiconductor vendors MCALs 
    and in principal is working. 
    Based on the semiconductors AUTOSAR compatibility there may raise some warnings 
    or sometimes even single parameters may be reconfigured, based on insufficient 
    importer functionality. 
     
     
     
     
    4.3 
    Split configuration tool usage 
    This workflow is required if the third party configuration tool is not completely AUTOSAR 
    compliant  as  it  e.g.  violates  the  AUTOSAR  standard  parameter  definition  or  does  not 
    support a lossless ECUC roundtrip with DaVinci Configurator or other AUTOSAR tools. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    17 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    As  the  number  of  interfaces  respectively  the  number  of  exchanged  parameters  between 
    the AUTOSAR  BSW and the  MCAL  components is  comparatively  small it may also be a 
    solution  to  use  both  tools  permanently  in  parallel.  The  implication  is  that  the  code 
    generation will be triggered from the tool in which the configuration has been made. 
    In  order  to  integrate  both  parts  on  embedded  side  there  is  still  the  need  to  share  some 
    parameters  between  both  configuration  tools.  This  can  either  be  achieved  by  manual 
    replication  (using  configuration  stubs,  e.g.  DEM  stub  of  3rd  party  MCAL,  MCU  stub  of 
    Vector) or by using the import export mechanisms introduced in 4.2. 
    Prerequisite 
    AUTOSAR component definition files provided by MCAL manufacturer must be available but 
    must be matching to proprietary formats only partly (at interfaces between BSW and MCAL). 
    Advantages 
    Disadvantages 
    Relatively tolerant workflow in case that 
    Dependencies between BSW and MCAL 
    AUTOSAR component definition files and/or 3rd  components must be solved manually 
    party tools are not completely AUTOSAR 
    conform 
     
    Additional tool knowledge is needed 
     
    Overhead due to 2 tool workflow and 
    redundant configuration data  manual 
    synchronization needed 
    Table 4-3   Guidance for split configuration tool usage 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    18 
    based on template version 5.2.0 




    Technical Reference MCAL Integration Package 
    5  Configuration tools 
    In this chapter some hints for the configuration tools included in your package are given. 
     
     
     
    Note 
    Most common tooling used by 3rd party MCAL supplier is EB tresos™ therefore the 
      usage is explained extensively. 
     
     
     
    5.1 
    Vector DaVinci Configurator 
    Use DaVinci Configurator to configure your MICROSAR BSW using a DPA project. 
    Please  refer  to  the  startup  manual  included  in  the  delivery.  In  addition  the  DaVinci 
    Configurator provides user support via the help menu. 
    5.2 
    EB tresos™ 
     
     
     
    Reference
     
    Additional and useful information can be found here [7]. 
      With questions about tooling license (applicable until EB tresos 16) additional 
    information can be found there [4]. 
     
     
     
     
    The program itself is located in the folder beneath: ThirdParty\<MCAL_µC>\Supply\ 
    To  start  the  tool  the  user  must  execute  tresos_gui.exe  which  can  be  found  usually 
    beneath  Tresos\bin.  Just  to  note,  some  3rd  party  MCAL  suppliers  also  provide  64bit 
    versions of EB tresos™. 
    A useful documentation when you are struggling with a task can be found within the tresos 
    folder structure by searching for a document named “Studio_documentation_users_guide”. 
    5.2.1 
    Setting up a new Configuration Project 
    >  To create a new project the Project Wizard must be started by to selecting File  New 
     Configuration Project. 
    >  The project name as well as the workspace location plus the relevant AUTOSAR 
    Release Version can now be chosen. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    19 
    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
     
    Figure 5-1  New Configuration Project 
    >  Hint: The workspace location can be chosen freely the path for code generation output 
    can be set in the next step. 
    5.2.2 
    Project Details 
    In the next step the wizard request the following data: 
    >  ECU ID: fill in a symbolic name 
    >  Target: Select your microcontroller target 
    >  Generation Path: please choose the settings according to the settings within the 
    DaVinci Configurator to keep consistency and avoid problems regarding make process 
    >  The remaining choices can be selected such as in the figure below 
    >  We recommend to activate the check box to ‘Automatically add the minimum number 
    of child elements in lists’ 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    20 
    based on template version 5.2.0 



    Technical Reference MCAL Integration Package 
     
    Figure 5-2  Configuration Project Data 
    >  Hint: Several project settings can be changed after creation of the project by editing 
    the file preferences.xdm located within the created workspace folder; e.g. adapt the 
    generation path by changing the default value ‘output’ to a relative or absolute path 
    (<d:var name=”GenerationPath” value=”output”/>) 
    5.2.3 
    Selection of components 
    Now  choose  the  components,  which  should  be  added  to  the  project.  In  general,  every 
    MCAL component should be selected. In that case, use STRG + A to select all and click on 
    the tagged button. 
    Attention:  Some  additional  “dummy”  components  (stubs)  might  be  necessary  in  order  to 
    configure the MCAL components e.g. Base, Resource, Dem or EcuM. Those components 
    are  only  used  to  provide  parameters  and  references  needed  by  the  MCAL  components 
    such as Dem Events and EcuM run modes, please refer to 5.3. 
    The window should now be similar to this: 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    21 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
     
    Figure 5-3  Component Configurations 
    5.2.4 
    Creation of importers and exporters 
    Now  the  user  has  the  possibility  to  create  importer  and/or  exporter  to  create  a 
    configuration  file  in  an  AUTOSAR  standardized  format  out  of  the  proprietary  tresos™ 
    configuration  files.  This  functionality  is  needed  to  enable  the  workflows  described  in 
    chapter 4.2 and 0.  
    Please Click on + to add an Im-/Exporter and use the following settings: 
         
     
    Figure 5-4  Create an exporter (step 1) 
    Figure 5-5  Create an exporter (step 2 – AUTOSAR options) 
    The importer can be configured in a similar manner. 
    If you don’t create the im-/exporters during setup you can do this later by using the context 
    menu on the corresponding project. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    22 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
    5.2.5 
    Configure the MCAL components 
    Now the wizard is finished and the MCAL itself can be configured. 
    5.2.6 
      Generation of the 3rd party MCAL 
    If everything is configured, click on the generation button. Tresos will now generate your 
    project (note: there will be a validation phase triggered before to ensure that configuration 
    is formal correct). 
     
    Figure 5-6  Generate Button 
    5.3 
    Configuration hints for parallel usage of DaVinci Configurator and EB 
    tresos™ 

    One  important  thing  to  consider  is  that  the  configurations  for  Dem  and  EcuM  must  be 
    consistent  between  DaVinci  Configurator  and  tresos  as  these  are  interface  components 
    provided by Vector that also have impact on the 3rd party software. Affected configuration 
    entities 
    are 
    Dem/DemConfigSet/DemEventParameter 
    and 
    EcuM/EcuMConfiguration/EcuMCommonConfiguration/EcuMWakeupSource. 
    The following chapters handle the  configuration  direction from upper layer to lower layer 
    like mentioned above, but please are aware that the direction might also be inverse, i.e. for 
    configuration  of  Dio  Ports,  Mcu  ConfigSets,  Mcu  ClockReferences  or  Fee  Blocks.  If  you 
    use the workflows described in 0 and 4.2 this is done by export and import features. 
    5.3.1 
    Vector DaVinci Configurator 5 
    You can find the configuration of e.g. DemEventParameter in the Basic Editor. 
     
     
    Figure 5-7  DEM Path using DaVinci Configurator 5 
     
    Figure 5-8  Settings within DaVinci Configurator 5 Pro 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    23 
    based on template version 5.2.0 





    Technical Reference MCAL Integration Package 
    5.3.2 
    EB tresos™ 
    >  One fast way to change the configuration for DEM in tresos™ is with the Outline 
    window.  
    >  To do so you, double-click on DEM. Now, if you have Outline opened, you will see the 
    folder structure of DEM.  
    >  Navigate to DemEventParameter_0, select the same Event ID and Event Kind 
    as in the DaVinci Configurator Pro. 
     
     
     
    Figure 5-10  DEM-Path within tresos™       
     
     
    Figure 5-9  DEM-Path in the Outline 
    window of tresos™ 
     
     
    Figure 5-11  Settings for DEM within tresos™ 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    24 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    6  Restrictions 
    6.1 
    UNC path usage 
    3rd party MCAL Integration Helper tool does not support calling it via UNC path. There is 
    no workaround etc. available. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    25 
    based on template version 5.2.0 




    Technical Reference MCAL Integration Package 
    7  Known Issues 
    This chapter describes known issues which are related to MCAL integration package but 
    are not fixable by Vector without support of  3rd parties. Vector is working on solutions in 
    coordination with the other involved parties. 
    7.1 
    Long path names 
     
     
     
    Caution 
    The 3rd party deliverables are currently stored / copied into the Vector delivery 
      structure and may use very long path names. The Vector delivery structure itself 
    usually resides some folders below the root directory. It may happen that some 
    Microsoft Windows™ tools are not able to access those files anymore due to resulting 
    path names which are too long.  
     
     
     
    Currently Vector is working on a solution for this problem. 
    As long as there is no final fix we recommend to install the Vector SIP as well as the 3rd 
    party MCAL as near to the root-directory as possible (e.g. D:\<ECU-Acronym> like 
    D:\BCM) 
     
    7.2 
    Missing configuration items within imported configuration 
    Sometimes  it  happens  that  3rd  party  tools  do  not  export  all  configuration  items  / 
    information into AUTOSAR standard format of ECUC. 
    Currently  there  is  no  workaround  available  for  this. The  user  will  be  informed  within  the 
    import process into DaVinci Configurator. After importing there must be manual editing of 
    the configuration to add all of those “missed information” (Note: mainly these are not used 
    by 3rd party tooling but relevant for consistent configuration with components BSWMDs). 
     
     
     
    Note 
    Due to the fact that 3rd party supply must be AUTOSAR conform please ask your 
      MCAL vendor to provide an update of the corresponding artefacts. 
     
     
    7.3 
    Configuration Export with EB tresos™ Version 13.0.0 
    After  you  have  exported  the  EB  tresos™  configuration,  you  have  to  close  the  project 
    before you proceed the export the next time. If not, the export will be faulty and will cause 
    problems during import into DaVinci Configurator. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    26 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    7.4 
    Error messages regarding CommonPublishedInformation with EB tresos™ 
    After  setting  up  a  MCAL  project  with  EB  tresos™  error  messages  might  occur  for  each 
    parameter of container CommonPublishedInformation like follows: 
    Invalid value for node “/AUTOSAR/TOP-LEVEL-
    PACKAGES/Wdg/ELEMENTS/Wdg/CommonPublishedInformation/VendorId
    ”: Value “” is no number 
    Closing EB tresos™ tool once and opening again resolves the problem. This issue affects 
    all MCAL modules. 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    27 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    8  Frequently Asked Questions 
    Q:  My  delivery  is  a  mixed  version  of  BSW  regarding AUTOSAR3  and  MCAL  regarding 
    AUTOSAR4, what do I have to care for? 
    A: When you ordered a SIP from Vector with “MCAL Integration package (mixed ASR)” we 
    already have cared about  this and also  provide  you some embedded software  wrappers 
    (e.g.  for  Watchdog  driver).  The  “integration  process”  at  Vectors  side  has  done  all 
    necessary topics like extensions of makefiles etc. that you as the user do not have to care 
    about it. 
     
    Q: I have got a DaVinci Configurator 5 but my delivery is AUTOSAR3 based, are there any 
    consequences or tasks I have to care about? 
    A: In regard of MCAL integration for AUTOSAR3 based products the DaVinci Configurator 
    5 does not care! As a hint: There may be some AUTOSAR4-based components which use 
    DaVinci  Configurator  5  framework  or  definitely  have  to  be  configured  using  DaVinci 
    Configurator 5 but this will be explained in details with the respective components. But as 
    mentioned before, this is not relevant for MCAL configuration / generation purpose. 
     
    Q: The MCAL will be generated component by component and takes a while. Is there any 
    option to increase or speed up this generation? 
    A: Based on EB tresos as generation tooling there is the possibility to call the generation 
    with  an  option  to  generate  all  MCAL  components  contained  in  the  ECUC  file.  The  user 
    therefore has to add a so called external generation step (applies to DaVinci Configurator 
    5 naming but is also possible with DaVinci Configurator 4). For details about how to create 
    an external generation step please use DaVinci tooling help. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    28 
    based on template version 5.2.0 




    Technical Reference MCAL Integration Package 
     
     
    Example 
    External generation step needs a command line parameter as follows: 
      tresos_cmd.bat -Dtarget=PA -Dderivate=MPC574XG legacy generate 
    D:\BCM\XSL_Output.arxml@asc:4.0.3 -o D:\BCM\Gendata -n Adc -n 
    Dio –n EcuM -n Fls -n Gpt -n Icu -n Mcl -n Mcu -n Port -n Pwm -n 
    Spi -n Wdg -n Resource -n Dem -g Adc_TS_T2D35M10I1R0 -g 
    Dio_TS_T2D35M10I1R0 -g Fls_TS_T2D35M10I1R0 -g 
    Gpt_TS_T2D35M10I1R0 -g Icu_TS_T2D35M10I1R0 -g 
    Mcl_TS_T2D35M10I1R0 -g Mcu_TS_T2D35M10I1R0 -g 
    Port_TS_T2D35M10I1R0 -g Pwm_TS_T2D35M10I1R0 -g 
    Spi_TS_T2D35M10I1R0 -g Wdg_TS_T2D35M10I1R0 -g 
    Base_TS_T2D35M10I1R0 
    Please refer to EB tresos studio documentation about all needed details (e.g. 
    derivative, component list etc.). Please watch out that there may be a “generate all” 
    option. Please do not use this because then also Dem, EcuM or other components 
    (maybe other COM components) will also be generated. This will definitely create 
    conflicts for the build process later on! 
     
     
     
     
     
     
    Caution 
    Based on EB tresos internal behavior and plug-in management the ECUC which is 
      handed over for generation reasons has to comply from naming perspective to the 
    registered plugins. 
    This results in the fact that ECUC file must not contain any other component then 
    registered (e.g. NvM, OS etc.) and shortname / AR-package name has to fit to the 
    registered one (Dem, EcuM). 
    Vector does this during its integration of the MCAL via XSL-transformation file but only 
    on component level and not for “generate all” purpose. So the user would have to 
    create such a XSL-transformation file by its own if this use case (generate all) should 
    be applied. 
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    29 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    9  Glossary and Abbreviations 
    9.1 
    Glossary 
    Term 
    Description 
    3rd party components  BSW components that have been provided by a company other than 
    / MCAL 
    Vector. Vector may have integrated the software within the SIP but does 
    not take over any responsibility with regard to the functionality of these 
    components. 
    3rd party MCAL 
    Windows based tooling providing a GUI to support the user to integrate a 
    Integration Helper 
    3rd party MCAL into the Vector SIP. 
    DaVinci Configurator   Vectors configuration and generation tool of the MICROSAR components 
     
     
    9.2 
    Abbreviations 
    Abbreviation 
    Description 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basic Software 
    BSWMD 
    Basic Software Module Description; AUTOSAR standard file 
    DEM 
    Diagnostic Event Manager; AUTOSAR BSW component 
    DPA 
    DaVinci Project Assistant 
    ECU 
    Electronic Control Unit 
    ECUC 
    ECU Configuration; configuration of all BSW as well as MCAL 
    components (Note: AUTOSAR also supports ECUC splits containing just 
    a subset of components with its configuration) 
    ECUM 
    ECU State Manager; AUTOSAR BSW component 
    (G)UI 
    (graphical) User Interface 
    MCAL 
    Microcontroller Abstraction layer  
    MICROSAR 
    Vectors solution / brand for AUTOSAR BSW 
    SIP 
    Software Integration Package (as provided by Vector); MICROSAR 
    delivery containing customers’ selection of MICROSAR BSW 
    components including all parts of MCAL Integration
    StMD 
    Standard Module Definition also known as BSWMD 
    VSMD 
    Vendor Specific Module Definition (within AUTOSAR methodology it is 
    derived from StMD) 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    30 
    based on template version 5.2.0 


    Technical Reference MCAL Integration Package 
    10  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    © 2016 Vector Informatik GmbH 
    Version 1.04.00 
    31 
    based on template version 5.2.0 

    Document Outline


    1.3.57 - TechnicalReference_Asr_Can_RH850_MCAN

    Microsar CAN Driver

    1.3.59 - TechnicalReference_Asr_Can_RH850_MCANs


     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CAN Driver 
    Technical Reference 
     
    Renesas 
    RH850/P1x-C 
    MCAN 
     
    Version 1.02.00 
     
     
     
     
     
     
     
     
     
    Authors 
    Cengiz Ünver, Peter Herrmann 
    Status 
    Released 
     
     
     
     
     
     
     
     


    Technical Reference Microsar CAN Driver 
    Document Information 
    History Core 
    Author 
    Date 
    Version 
    Remarks 
    Holger Birke 
    2006-06-21 
    1.0 
    Initial version 
    Holger Birke 
    2006-06-28 
    1.1 
    Review modifications 
    Holger Birke 
    2006-10-26 
    1.2 
    New feature Tx polling, FullCAN Tx and 
    support DEM 
    Holger Birke 
    2007-01-22 
    1.3 
    New feature Bus Off Polling 
    Holger Birke 
    2007-02-15 
    1.4 
    Minor Changes 
    Holger Birke 
    2007-07-10 
    1.5 
    ASR2.1 
    Holger Birke 
    2007-08-24 
    1.6 
    Renaming MICROSAR 
    Holger Birke 
    2007-08-28 
    1.7 
    Remove Driver version 
    Holger Birke 
    2007-08-29 
    1.8 
    Driver version also removed from Chapter 

    Holger Birke 
    2007-11-13 
    1.9 
    Changed API Can_Init(), add API 
    Can_InitStruct(), add init structure 
    description (HL2.22) 
    Holger Birke 
    2007-12-03 
    1.10 
    Improve Interrupt description 
    Holger Birke 
    2008-02-20 
    1.11 
    ASR3 
    Holger Birke 
    2008-04-18 
    1.12 
    Review Reworks (Sh2 review and by 
    visem) 
    Holger Birke 
    2008-07-21 
    1.13 
    Review Reworks (TMS320) 
    Holger Birke 
    2008-08-13 
    1.14 
    Core 3.3 
    Optimization for runtime, ROM and RAM 
    Holger Birke 
    2008-08-13 
    1.15 
    Core 3.5 
    rename INTERRUPT & POLLING 
    Update Tool configuration description 
    Add Remote Frame rejection description 
    Holger Birke 
    2008-10-23 
    1.16 
    Core 3.6 
    add new API handle “Hardware Loop 
    Check” by application 
    + beautifying 
    Holger Birke 
    2009-02-06 
    1.17 
    Core 3.7 
    Add individual polling 
    Holger Birke 
    2009-05-19 
    1.18 
    Improve “Generic Precopy” description 
    (extended ID bit) 
    Add Compiler and Memory abstraction, 
    Add possibility to report CAN_E_TIMEOUT 
    as DET. 
    Holger Birke 
    2009-07-15 
    1.18.01 
    Core 3.09 
    Remove Compiler abstraction CAN_ISR. 
    Change “Hardware Loop Check” naming. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Holger Birke 
    2009-07-28 
    1.18.02 
    Review reworks 
    Holger Birke 
    2009-10-01 
    1.18.03 
    Core 3.10 
    Add RxQueue (high-end) and Generic 
    Confirmation 
    Holger Birke 
    2010-02-04 
    1.19 
    Core 3.11 
    Add “Multiple BasicCAN”, “Support Mixed 
    ID”, “Optimize for one controller”, “Dynamic 
    FullCAN Tx ID” and “Size of Hw 
    HandleType”. 
    Rename “Hardware Cancellation” 
    Correct “Services used by CAN” 
    Holger Birke 
    2010-04-01 
    1.20 
    Core 3.12 
    Add Critical Section description 
    Add “Common CAN” 
    Add Hardware assertion (DET) description 
    Add Can_GetStatus() + Interrupt category 
    configuration. 
    Add ApplCanInterruptDisable/Restore() 
    Holger Birke 
    2010-11-24 
    2.00 
    Core 4.00 
    Update to MICROSAR4 
    Add “Overrun notification” 
    Add “RAM check” 
    Holger Birke 
    2011-04-18 
    2.00.01 
    Review reworks (VJ) 
    Holger Birke 
    2011-06-28 
    2.00.02 
    Rework (add missing config settings to 
    GENy GUI description) 
    Add MicroSar – AUTOSAR deviations 
    Holger Birke 
    2011-07-29 
    2.01 
    Core 4.01 
    Add “GenericPreTransmit” 
    Holger Birke 
    2012-01-13 
    2.01.01 
    Improve description for “Nested Interrupts” 
    and “Identical ID cancellation” 
    Holger Birke 
    2012-04-02 
    2.02.00 
    Core 4.02 
    Add Platform, CANCell and Manufacturer 
    as First Page Information 
    Add Void-Void ISR configuration, support 
    ASR3.2.1 Identical ID cancellation 
    Holger Birke 
    2012-04-02 
    2.03.00 
    Partial Network part of configuration (no 
    more preconfig) 
    Holger Birke 
    2012-06-29 
    2.04.00 
    Core 4.03 
    Support AR4-R5 (ASR4.0.3) – New API 
    added 
    Improve Hardware Loop description 
    Holger Birke 
    2012-11-07 
    2.05.00 
    Core 4.04 
    Add Re-initialization description 
    Instance ID of DET is always 0 
    Holger Birke 
    2012-11-07 
    2.05.01 
    Improve Hardware Loop description 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Holger Birke 
    2013-10-11 
    2.06.00 
    Add CAN FD description 
    (Can_SetBaudrate() API) 
     
    History Platforms 
    Author 
    Date 
    Version 
    Remarks 
    C. Ünver 
    2015-04-27 
    1.00.00 
    Initial version 
    P. Herrmann 
    2016-01-28 
    1.01.00 
    Added MCAN Rev. 3.1.0 changes.  
    Additional description concerning the 
    Bosch  MCAN Errata Sheet. 
    P. Herrmann 
    2016-10-06 
    1.02.00 
    Additional description concerning the 
    Bosch  MCAN Errata Sheet. 
     
    Reference Documents 
    No. 
    Title 
    Version 
    [1]   AUTOSAR_SWS_CAN_DRIVER.pdf 
    2.4.6 +  
    3.0.0 + 
    4.0.0 
    [2]   AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [3]   AUTOSAR_SWS BSW Scheduler 
    V1.1.0 
    [4]   AUTOSAR_SWS_CAN_Interface.pdf 
    3.2.7 +  
    4.0.0 + 
    5.0.0 
    [5]   AN-ISC-8-1118 MICROSAR BSW Compatibility Check 
    V1.0.0 
    [6]   M_CAN Controller Area Network Errata Sheet  
    REL2015 0701 
     
    1.1 
    Scope of the Document 
    This document describes the functionality, API and configuration of the MICROSAR CAN 
    driver  as  specified  in  [1].  The  CAN  driver  is  a  hardware  abstraction  layer  with  a 
    standardized interface to the CAN Interface layer. 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Contents 
    1.1 
    Scope of the Document...................................................................................... 4 
    2 
    Hardware Overview ...................................................................................................... 8 
    3 
    Introduction................................................................................................................... 9 
    3.1 
    Architecture Overview ...................................................................................... 10 
    4 
    Functional Description ............................................................................................... 12 
    4.1 

    Features .......................................................................................................... 12 
    4.2 
    Initialization ...................................................................................................... 15 
    4.3 
    Communication ................................................................................................ 16 
    4.4 
    States / Modes ................................................................................................. 18 
    4.5 
    Re-Initialization ................................................................................................ 19 
    4.6 
    CAN Interrupt Locking ...................................................................................... 19 
    4.7 
    Main Functions ................................................................................................ 19 
    4.8 
    Error Handling .................................................................................................. 20 
    4.9 
    Common CAN .................................................................................................. 24 
    5 
    Integration ................................................................................................................... 27 
    5.1 

    Scope of Delivery ............................................................................................. 27 
    5.2 
    Include Structure .............................................................................................. 28 
    5.3 
    Critical Sections ............................................................................................... 28 
    5.4 
    Compiler Abstraction and Memory Mapping ..................................................... 30 
    6 
    Hardware Specific Hints ............................................................................................. 32 
    7 
    API Description ........................................................................................................... 35 
    7.1 

    Interrupt Service Routines provided by CAN .................................................... 35 
    7.2 
    Services provided by CAN ............................................................................... 36 
    7.3 
    Services used by CAN ..................................................................................... 60 
    8 
    Configuration .............................................................................................................. 62 
    8.1 

    Pre-Compile Parameters .................................................................................. 62 
    8.2 
    Link-Time Parameters ...................................................................................... 63 
    8.3 
    Post-Build Parameters ..................................................................................... 63 
    8.4 
    Configuration with da DaVinci Configurator ...................................................... 64 
    9 
    AUTOSAR Standard Compliance............................................................................... 65 
    9.1 

    Limitations / Restrictions .................................................................................. 65 
    9.2 
    Hardware Limitations ....................................................................................... 65 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    9.3 
    Vector Extensions ............................................................................................ 67 
    10  Glossary and Abbreviations ...................................................................................... 68 
    10.1 
    Glossary .......................................................................................................... 68 
    10.2 
    Abbreviations ................................................................................................... 68 
    11  Contact ........................................................................................................................ 69 
     
    Illustrations 
    Figure 3-1 
    AUTOSAR 3.x Architecture Overview ....................................................... 10 
    Figure 3-2 
    AUTOSAR architecture ............................................................................. 11 
    Figure 3-3 
    Interfaces to adjacent modules of the CAN ............................................... 11 
    Figure 5-1 
    Include Structure (AUTOSAR) .................................................................. 28 
    Figure 7-1 
    Select OS Type ......................................................................................... 35 
     
    Tables 
    Table 2-1  
    Supported Hardware Overview ................................................................... 8 
    Table 4-1  
    Supported features ................................................................................... 15 
    Table 4-2  
    Hardware mailbox layout .......................................................................... 17 
    Table 4-3  
    Errors reported to DET ............................................................................. 20 
    Table 4-4 
    API from which the Errors are reported ..................................................... 21 
    Table 4-5  
    Errors reported to DEM ............................................................................. 22 
    Table 4-6  
    Hardware Loop Check .............................................................................. 24 
    Table 5-1  
    Static files ................................................................................................. 27 
    Table 5-2  
    Generated files ......................................................................................... 27 
    Table 5-3  
    Critical Section Codes .............................................................................. 30 
    Table 5-4  
    Compiler abstraction and memory mapping .............................................. 31 
    Table 7-1  
    MCAN CanIsr_<x>.................................................................................... 36 
    Table 7-2  
    Can_InitMemory ....................................................................................... 37 
    Table 7-3  
    Can_InitController ..................................................................................... 38 
    Table 7-4  
    Can_InitController ..................................................................................... 39 
    Table 7-5  
    Can_ChangeBaudrate .............................................................................. 39 
    Table 7-6  
    Can_CheckBaudrate ................................................................................ 40 
    Table 7-7  
    Can_SetBaudrate ..................................................................................... 41 
    Table 7-8  
    Can_InitStruct ........................................................................................... 41 
    Table 7-9  
    Can_GetVersionInfo ................................................................................. 42 
    Table 7-10  
    Can_GetStatus ......................................................................................... 43 
    Table 7-11  
    Can_SetControllerMode ........................................................................... 44 
    Table 7-12  
    Can_ResetBusOffStart ............................................................................. 44 
    Table 7-13  
    Can_ResetBusOffEnd .............................................................................. 45 
    Table 7-14  
    Can_Write................................................................................................. 46 
    Table 7-15  
    Can_CancelTx .......................................................................................... 46 
    Table 7-16  
    Can_CheckWakeup .................................................................................. 47 
    Table 7-17  
    Can_DisableControllerInterrupts ............................................................... 47 
    Table 7-18  
    Can_EnableControllerInterrupts................................................................ 48 
    Table 7-19  
    Can_MainFunction_Write ......................................................................... 48 
    Table 7-20  
    Can_MainFunction_Read ......................................................................... 49 
    Table 7-21  
    Can_MainFunction_BusOff ....................................................................... 50 
    Table 7-22  
    Can_MainFunction_Wakeup ..................................................................... 50 
    Table 7-23  
    Can_MainFunction_Mode ......................................................................... 51 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Table 7-24  
    Appl_GenericPrecopy ............................................................................... 51 
    Table 7-25  
    Appl_GenericConfirmation ........................................................................ 52 
    Table 7-26  
    Appl_GenericConfirmation ........................................................................ 53 
    Table 7-27  
    Appl_GenericPreTransmit ......................................................................... 53 
    Table 7-28  
    ApplCanTimerStart ................................................................................... 54 
    Table 7-29  
    ApplCanTimerLoop ................................................................................... 55 
    Table 7-30  
    ApplCanTimerEnd .................................................................................... 55 
    Table 7-31  
    ApplCanInterruptDisable ........................................................................... 56 
    Table 7-32  
    ApplCanInterruptRestore .......................................................................... 57 
    Table 7-33  
    Appl_CanOverrun ..................................................................................... 57 
    Table 7-34  
    Appl_CanFullCanOverrun ......................................................................... 58 
    Table 7-35  
    Appl_CanCorruptMailbox .......................................................................... 59 
    Table 7-36  
    Appl_CanRamCheckFailed ....................................................................... 59 
    Table 7-37  
    ApplCanInitPostProcessing ...................................................................... 60 
    Table 7-38  
    Services used by the CAN ........................................................................ 61 
    Table 10-1  
    Glossary ................................................................................................... 68 
    Table 10-2  
    Abbreviations ............................................................................................ 68 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    2  Hardware Overview 
    The  following  table  summarizes  information  about  the  CAN  Driver.  It  gives  you  detailed 
    information  about  the  derivatives  and  compilers.  As  very  important  information  the 
    documentations of the hardware manufacturers are listed. The CAN Driver is based upon 
    these documents in the given version.  
     
    Derivative 
    Compiler 
    Hardware Manufacturer Document 
    Version 
    R7F701325A 
    Document Number: RH850/P1x-C Group  
    Rev. 0.60,      
    R7F701327 
    Rev. 0.60, 09/2014 
    Sep. 2014 
    R7F701328 
     
     
    R7F701329 
    RH850/P1x-C Group Rev.0.10 , Nov. 2014 
    Nov, 2014 
     
     
    Rev.0.10 
    R7F701370A 
    GHS 
     
     
    R7F701370B 
    Compiler  RH850/P1x-C Group User’s Manual: 
    Jan, 2016 
    R7F701371 
    Release  Hardware Renesas microcontroller RH850 
    Rev.1.00 
    R7F701372 
    v2015.1.7  Family 
    R7F701372A 
    R7F701373 
    R7F701373A 
    R7F701374 
    R7F701374A 
    Table 2-1   Supported Hardware Overview 
    Derivative: This can be a single information or a list of derivatives, the CAN Driver can be used on. 
    Compiler: List of Compilers the CAN Driver is working with 
    Hardware Manufacturer Document Name: List of hardware documentation the CAN Driver is based on.  
    Version: To be able to reference to this hardware documentation its version is very important. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    3  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CAN as specified in [1].  
    Since each hardware platform has its own behavior based on the CAN specifications, the 
    main goal of the CAN driver is to give a standardized interface to support communication 
    over the CAN bus for each platform in the same way. The CAN driver works closely 
    together with the higher layer CAN interface. 
     
    Supported AUTOSAR Release*: 
    3 and 4 
    Supported Configuration Variants: 
    Pre-Compile, 
    (Supported AUTOSAR Standard 
    Link-Time, 
    Conform Features) 
    Post-Build Loadable, 
    Post-Build Selectable (MICROSAR Identity Manager) 
     
     
    Vendor ID: 
    CAN_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CAN_MODULE_ID   
    80 decimal 
    (according to ref. [2]) 
    AR Version: 
    CAN_AR_RELEASE_MAJO
    AUTOSAR     Release 
    R_VERSION 
    Version                
    CAN_AR_RELEASE_MINOR BCD coded 
    _VERSION 
    CAN_AR_RELEASE_REVISI
    ON_VERSION 
    SW Version: 
    CAN_SW_MAJOR_VERSIO
    MICROSAR         CAN 

    module Version                
    CAN_SW_MINOR_VERSION  BCD coded 
    CAN_SW_PATCH_VERSION 
    * For the precise AUTOSAR Release 3.x and 4.x please see the release specific documentation.  
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 

    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    3.1 
    Architecture Overview 
    The following figure shows where the CAN is located in the AUTOSAR architecture. 
     
    Figure 3-1  AUTOSAR 3.x Architecture Overview  
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    10 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Figure 3-2  AUTOSAR architecture 
     
     
    The next figure shows the interfaces to adjacent modules of the CAN. These interfaces are 
    described in chapter 7.  
    CAN Interface
    EcuM
    DET
    DEM
    CAN Driver
    ... CAN X
     
    Figure 3-3  Interfaces to adjacent modules of the CAN 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    11 
    based on template version 3.2 





    Technical Reference Microsar CAN Driver 
    4  Functional Description 
    4.1 
    Features 
    The features listed in this chapter cover the complete functionality specified in [1]. 
    The  "supported"  and  "not  supported"  features  are  presented  in  the  following  table.  For 
    further information of not supported features also see chapter 9. 
     
    Feature Naming 
    Short Description 
    CFG5 
    Initialization 
     
     
    General driver initialization function 
       Driver 
     
    Can_Init() 
    Controller specific initialization function 
       Controller 
     
    Can_InitController(). 
    Communication 
     
     
       Transmission 
    Transmitting CAN frames. 
     
       Transmit confirmation 
    Callback for successful Transmission. 
     
       Reception 
    Receiving CAN frames. 
     
       Receive indication 
    Callback for receiving Frame. 
     
    Controller Modes 
     
     
    Controller support sleep mode (power 
       Sleep mode 
     
    saving). 
       Wakeup over CAN 
    Controller support wakeup over CAN. 
     
    Controller support stop mode (passive to 
       Stop mode 
     
    CAN bus). 
       Bus Off detection 
    Callback for Bus Off event. 
     
    Polling Modes 
     
     
    Support polling mode for Transmit 
       Tx confirmation 
     
    confirmation. 
       Reception 
    Support polling mode for Reception. 
     
       Wakeup 
    Support polling mode for Wakeup event. 
     
       Bus Off 
    Support polling mode for Bus Off event. 
     
    MICROSAR4x only: Support polling 
       Mode 
     
    mode for mode transition. 
     
     
     
    Mailbox objects 
     
     
    Standard mailbox to send CAN frames 
       Tx BasicCAN 
     
    (Used by CAN Interface data queue). 
    Using 3 mailboxes for Tx BasicCAN 
       Multiplexed Tx 
    mailbox (external priority inversion 
     
    avoided). 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    12 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Separate mailbox for special Tx message 
       Tx FullCAN 
     
    used. 
          Maximum amount 
    Available amount of mailboxes. 
    32 
    Separate mailbox for special Rx 
       Rx FullCAN 
     
    message used. 
          Maximum amount 
    Available amount of mailboxes. 
    64 
    Standard mailbox to receive CAN frame 
       Rx BasicCAN 
    (depending on hardware, FIFO or 
     
    shadow buffer supported). 
    Available amount of BasicCAN objects. 
    By default there is one FIFO(0) 
          Maximum amount
    supported with a max. amount of 64 
     
    2*64 
    entries. In case of “Multiple BasicCAN” 
    (see below) support an additional second 
    FIFO(1) with 64 entries is supported. 
    Others 
     
     
       DEM
    Support Diagnostic Event Manager (error 
     
     
    notification). 
    Support Development Error Detection 
       DET 
     
    (error notification). 
       Version API 
    API to read out component version. 
     
       Maximum supported 
    Maximum amount of supported 

    Controllers 
    controllers (hardware channels). 
    Support of Tx Cancellation (out of 
       Cancellation of Tx objects  hardware). Avoid internal priority 
     
    inversion. 
       Identical ID cancellation 
    Tx Cancellation also for identical IDs.  
     
    Standard Identifier supported (Tx and 
       Standard ID types 
     
    Rx). 
    Extended Identifier supported (Tx and 
       Extended ID types 
     
    Rx). 
    Standard and Extended Identifier 
       Mixed ID types 
     
    supported (Tx and Rx). 
    FD frames with baudrate switch 
       CAN FD Mode1 

    supported (Tx and Rx). 
    FD frames up to 64 data bytes supported 
       CAN FD Mode2 
    **** 
    (Tx and Rx). 
       Hardware Loop Check 
    To avoid possible endless loops (occur 
     
         (Timeout monitoring) 
    by hardware issue). 
    AutoSar extensions 
     
     
    Support individual polling mode 
       Individual Polling 
    (selectable for each mailbox separate). 
    * 
     
       Multiple Rx Basic CAN 
    Support Multiple BasicCAN objects.  
    * 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    13 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    This gives the possibility to use 
    additionally Fifo-1 with 64 additional 
    elements. By optimizing the   acceptance 
    filtering overruns can be avoided . 
    Support Multiple Tx BasicCAN objects. 
    Used to send different Tx groups over 
       Multiple Tx Basic CAN 
    separate mailboxes with different 
    * 
    buffering behavior (see Can Interface). 
     
     
     
    Support Rx Queue. This offers the 
    possibility to buffer received data in 
       Rx Queue 
    * 
    interrupt context but handle it later 
    asynchronous in the polling task. 
    Special hardware buffer used to 
       Secure Rx Buffer used 
     
    temporary save received data.  
    “Hardware Loop Check”  can be defined 
       Hardware Loop Check by  to be done by application (special API 
     
    Application 
    available) 
       Configurable “Nested CAN  Nested CAN interrupts allowed, and can 
     
    Interrupts” 
    be also switched to none-nested. 
    Report CAN_E_TIMEOUT (Hardware 
       Report CAN_E_TIMEOUT  Loop Check / Timeout monitoring) to DET 
     
    DEM   as DET 
    instead of DEM. 
    Force CAN driver to handle Mixed ID 
    (standard and extended ID) at pre
       Support Mixed ID
    -
     
     
    compile-time to expand the ID type later 
    on. 
    Activate this for 1 controller systems 
    when you never will expand to multi
       Optimize for one controller
    -
     
     
    controller. So that the CAN driver works 
    more efficient  
    Always write FullCAN Tx ID within 
       Dynamic FullCAN Tx ID 
    CanWrite() API function. Deactivate this 
     
    (***) 
    to optimize code when you do not use 
    FullCAN Tx objects dynamically. 
       Size of Hw HandleType
    Support 8-bit or 16-bit Hardware Handles 
     
     
    depending on the hardware usage. 
    Support a callback function for receiving 
       Generic PreCopy 
    any CAN message (following callbacks 
     
    could be suppressed) 
    Support a callback function for successful 
    transmission of any CAN message 
       Generic Confirmation 
     
    (following callbacks could be 
    suppressed) 
    Support a API to get hardware status 
       Get Hardware Status 
     
    Information (see Can_GetStatus()) 
       Interrupt Category 
    Support Category 1 or Category 2 
     
    selection 
    Interrupt Service Routines for OS  
       Common CAN
    Support merge of 2 controllers in 
     
     
    hardware to get more Rx FullCAN 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    14 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    objects 
    Support DET or Application notification 
    caused by overrun (overwrite) of an Rx 
    message. 
    Please note that ‘Overrun’ is supported 
    for BasicCAN objects but is not available 
    for FullCAN objects.  
    While not processed  a Message ID Filter 
    Element referencing a specific FullCAN 
    object will not match, causing the 
       Overrun Notification 
    acceptance filtering to continue. 
     
    Subsequent Message ID Filter Elements 
    may cause the received message to be 
    stored into  
    - another FullCAN object, or 
    - a BasicCAN object, or 
    - the message may be rejected, 
    depending on the filter configuration. 
     
       RAM check 
    Support CAN mailbox RAM check 
     
    The feature Multiple ECU is usually used 
       Multiple ECU 
    for nodes that exist more than once in a 
     
    configurations (***) 
    car. At power up the application decides 
    which node should be realized. 
    Support a callback function with pointer 
    to Data, right before this data will be 
       Generic PreTransmit 
    written in Hardware mailbox buffer to 
     
    send. (Use this to change data or cancel 
    transmission) 
    Table 4-1   Supported features 
      Feature is supported 
      Feature is not supported 
    *     HighEnd Licence only 
    **   Project specific (may not be available) 
    ***  Not supported or cannot be configured for AutoSar version 4 
    **** Only available for MicroSar 4 
     
    4.2 
    Initialization 
    Can_Init() has to be called to initialize the CAN driver at power on and sets controller 
    independent init values. This function has to be called before Can_InitController(). 
    MicroSar3 only: Use Can_InitStruct() to change the used baud rate and filter settings 
    like  given  in  the  Initialization  structure  from  the  Tool.  The  used  default  set  by 
    Can_InitMemory()  is  the  first  structure.  This  API  has  to  be  called  before 
    Can_InitController() but after Can_InitMemory(). 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    15 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    MICROSAR401 only: baud rate settings given by Can_InitController parameter. 
    Can_InitController()  initializes  the  controller,  given  as  parameter,  and  can  also  be 
    used to reinitialize. After this call the controller stays in stop-mode until the CAN Interface 
    changes to start-mode. 
    Can_InitMemory()  is  an  additional  service  function  to  reinitialize  the  memory  to  bring 
    the  driver  back  to  a  pre-power-on  state  (not  initialized).  Afterwards  Can_Init()  and 
    Can_InitController() have to be called again. It is recommended to use this function 
    before calling Can_Init() to secure that no startup-code specific pre-initialized variables 
    affect the driver startup behavior. 
    4.3 
    Communication 
    Can_Write()  is  used  to  send  a  message  over  the  mailbox  object  given  as  "Hth".  The 
    data,  DLC and ID is copied into the hardware  mailbox object  and a send request  is set. 
    After  sending  the  message  the  CAN  Interface  CanIf_TxConfirmation()  function  is 
    called.  Right  before  the  data  is  copied  in  mailbox  buffer  the  ID,  DLC  and  data  may  be 
    changed by Appl_GenericPreTransmit() callback. 
    When  “Generic  Confirmation“  is  activated  the  callback  Appl_GenericConfirmation()  
    will be called before CanIf_TxConfirmation() and the call to this can be suppressed 
    by Appl_GenericConfirmation()  return value. 
    For Tx  messages  the  ID  will  be  copied.  (Exception:  feature  “Dynamic  FullCAN Tx  ID”  is 
    deactivated, then the FullCAN Tx messages will be only set while initialization) 
    If the mailbox is currently sending the status busy will be returned. Then the message may 
    be queued in the CAN interface (if feature is active). 
    If  cancellation  in  hardware  is  supported  the  lowest  priority  ID  inside  currently  sending 
    object is canceled, and therefore re-queued in the CAN Interface. 
    Appl_GenericPreCopy()  (if  activated)  is  called  and  depend  on  return  value  also 
    CanIf_RxIndication()  as  a  CAN  Interface  callback,  is  called  when  a  message  is 
    received. The receive information like ID, DLC and data are given as parameter. 
    When Rx Queue is activated the received messages (polling or interrupt  context) will be 
    queued  (same  queue  over  all  channels).  The  Rx  Queue  will  be  read  by  calling 
    Can_Mainfunction_Read  ()  and  the  Rx  Indication  (like  CanIf_RxIndication())  will 
    be  called  out  of  this  context.  Rx  Queue  is  used  for  Interrupt  systems  to  keep  Interrupt 
    latency time short. 
     
    4.3.1 
    Mailbox Layout 
    The  generation  tool  supports  a  flexible  allocation  of  message  buffers.  In  the  following 
    tables the possible mailbox layout is shown (the range for each mailbox type depends on 
    the used mailboxes). 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    16 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Hardware 
    Hardware  Amount of 
    object 
    object 
    hardware 
    Description 
    number 
    type 
    objects 
    0 … 31 max.   These objects are used to transmit specific message IDs. 
    The user must define statically in the generation tool 
    Tx 
    (0 … 29 in 
    0… N 
    which CAN message IDs are located in Tx FullCAN 
    FullCAN
    case of 
     
    multiplexed 
    objects. The generation tool assigns the message IDs to 
    transmission) 
    the FullCAN hardware objects. 
    1 or 3          (3  All other CAN message IDs are transmitted via the Tx 
    (N+1)  
    Tx 
    in case of 
    Basic object. If the transmit message object is busy, the 
    … M 
    BasicCAN 
    multiplexed 
    transmit requests are stored in the CAN Interface queue 
    transmission) 
    (if activated). 
    These objects are not used. It depends on the 
    (M+1) 
     
     
    Unused
    configuration of receive and transmit objects how many 
     … O
     
    0 … 95 
     
     
    unused objects are available. 
    These objects are used to receive specific CAN  
    messages. The user defines statically (Generation Tool) 
    Rx 
     
    O…P 
    0 … 64
    that a CAN message should be received in a FullCAN 
    FullCAN
     
     
     
    message object. The Generation Tool distributes the  
    messages to the FullCAN objects. 
    All CAN message IDs, depending on the acceptance filter   
    match, are received via the Rx BasicCAN message object   
    through Rx FIFO 0. 
    Each Rx Basic message object consists of 64 message   
    FIFO-0 with    buffers.    
    96
    Rx 
     
    max. 64
    128 acceptance filters are available for standard IDs and  
    BasicCAN
     
     
     
    entries   
    64   acceptance filters are available for extended IDs.    
    In case of mixed ID mode 128+64 = 192 filters are   
    available.   
    Please note that this maximum amount of filters is also   
    used for FIFO-1 if available.    
    All CAN message IDs, depending on the acceptance filter   
    match,  are received via the Rx BasicCAN message   
    objects through Rx FIFO 1.   
    Each Rx Basic message object consists of 64 message   
    FIFO-1 with    buffers.    
    97
    Rx 
     
    max. 64  
    128 acceptance filters are available for standard IDs and  
    BasicCAN
     
     
     
    entries 
    64   acceptance filters are available for extended IDs.    
    In case of mixed ID mode 128+64 = 192 filters are   
    available.   
    Please note that this maximum amount of filters is also   
    used for FIFO-0. 
    Table 4-2   Hardware mailbox layout 
     
    The  “CanObjectId”  (ECUc  parameter)  numbering  is  done  in following  order: Tx  FullCAN, 
    Tx  BasicCAN,  Unused,  Rx  BasicCAN  (like  shown  above).  “CanObjectId’s”  for  next 
    controller begin at end of last controller. Gaps in “CanObjectId” for unused mailboxes may 
    occur.  
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    17 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    4.3.2 
    Mailbox Processing Order 
    The hardware mailbox will be processed in following order:  
    Object Type 
    Order / priority to send or receive 
    Tx FullCAN 
    Object ID Low to High 
    Tx BasicCAN 
    Object ID Low to High 
    Rx FullCAN 
    Object ID Low to High 
    Rx BasicCAN 
    FIFO 
     
    In Case of Interrupt Rx FullCANs will be processed before Rx BasicCANs. 
    In Case of Polling Rx FullCANs will be processed before Rx BasicCANs. 
    The order between Rx and Tx mailboxes depends on the call order of the polling tasks or 
    the interrupt context and cannot be guaranteed. 
    The Rx Queue will work like a FIFO filled with the above mentioned method. 
     
     
    4.3.3 
    Acceptance Filter for BasicCAN 
    For  each  CAN  channel  a  maximum  amount  of  128  filters  for  standard  and  64  
    filters  for extended  ID  configurations  is  available.  Thus  192  filters  are  available  for  
    mixed  ID configurations.  
     
    For  acceptance  filtering  each  list  of  filters  is  executed  from  element  #0  until  the  
    first matching  element.  Acceptance  filtering  stops  at  the  first  matching  element.  Each  
    filter  element  decides  if  the  received  message  is  stored  within  FIFO-0  (or  FIFO-1  if 
    available).  
     
    If  no  message  should  be  received,  select  the  “Multiple  Basic  CAN”  feature  and  set  
    the amount  to  0.  Otherwise  the  filter  should  be  set  to  “close”.  Use  feature  “Rx  
    BasicCAN Support” to deactivate unused code (for optimization). 
     
    4.3.4 
    Remote Frames 
    The CAN driver initializes the CAN controller not to receive remote frames. Therefore no  
    additional action is required during runtime by the  CAN driver for remote frame filtering.  
    Remote  frames  will  not  have  any  influence  on  communication  because  they  are  not  
    received by the CAN hardware. 
    4.4 
    States / Modes 
    You  can  change  the  CAN  cell  mode  via  Can_SetControllerMode().  The  last  requested 
    transition will be executed. The Upper layer has to take care about valid transitions. 
    The following modes changes are supported: 
    CAN_T_START 
    CAN_T_STOP 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    18 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
      
    MICROSAR4 only: Notification of mode change may occur asynchronous by notification 
    CanIf_ControllerModeIndication() 
    4.4.1 
    Start Mode (Normal Running Mode) 
    This  is  the  mode  where  communication  is  possible.  This  mode  has  to  be  set  after  
    Initialization because Controller is first in stop-mode.  
      
    The  Bit  Stream  Processor  synchronizes  itself  to  the  data  transfer  on  the  CAN  bus  
    by waiting  for  the  occurrence  of  a  sequence  of  11  consecutive  recessive  bits  (=  
    Bus_Idle) before it can take part in bus activities and start the message transfer. 
     
    4.4.2 
    Stop Mode 
    If stop mode is requested, either by software or by going BusOff, then the CAN module is  
    switched  into  INIT  mode.  In  this  mode  message  transfer  from  and  to  the  CAN  bus  
    is stopped, the status of the CAN bus transmit output is recessive (HIGH).   
    Going to stop mode does not change any configuration register. 
     
    4.4.3 
    Bus Off 
    CanIf_ControllerBusOff() is called when the controller detects a Bus Off event. The 
    mode  is  automatically  changed  to  stop  mode.  The  upper  layers  have  to  care  about 
    returning to normal running mode by calling start mode 
    4.5 
    Re-Initialization 
    A call to Can_InitController() cause a re-initialization of a dedicated CAN controller.  
    Pending  messages  may  be  processed  before  the  transition  will  be  finished.  A  re- 
    initialization is only possible out of Stop Mode and does not change to another Mode.  
    After re-initialization all CAN communication relevant registers are set to initial conditions. 
    4.6 
    CAN Interrupt Locking 
    Can_DisableControllerInterrupts() and 
    Can_EnableControllerInterrupts() are used to disable and enable the controller 
    specific Interrupt, Rx, Tx, Wakeup and Bus Off (/ Status) together. These functions can be 
    called nested. 
    4.7 
    Main Functions 
    Can_MainFunction_Write(), Can_MainFunction_Read(), 
    Can_MainFunction_BusOff() and Can_MainFunction_Wakeup() are called by 
    upper layers to poll the events if the specific polling mode is activated. Otherwise these 
    functions return without any action and the events will be handled in interrupt context. 
    When individual polling is activated only mailboxes that are configured as to be polled will 
    be polled in the main functions “Can_MainFunction_Write()” and 
    “Can_MainFunction_Read()”, all others are handled in interrupt context. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    19 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    If the Rx Queue feature is activated then the queue is filled in interrupt or polling context, 
    like configured. But the processing (indications) will be done in 
    “Can_MainFunction_Read()” context. 
    MICROSAR4 only: Can_MainFunction_Mode() can be called by upper layers to poll 
    asynchronous mode transition notifications. 
    4.8 
    Error Handling 
    4.8.1 
    Development Error Reporting 
    Development  errors  are  reported  to  DET  using  the  service  Det_ReportError(),  if  the 
    pre-compile parameter CAN_DEV_ERROR_DETECT == STD_ON. 
    The tables below, shows the API ID and Error ID given as parameter for calling the DET. 
    Instance ID is always 0 because no multiple Instances are supported. 
    Errors reported to DET: 
    Error ID 
    Short Description 
    CAN_E_PARAM_POINTER 
    API gets an illegal pointer as parameter. 
    CAN_E_PARAM_HANDLE 
    API gets an illegal handle as parameter 
    CAN_E_PARAM_DLC 
    API gets an illegal DLC as parameter 
    CAN_E_PARAM_CONTROLLER 
    API gets an illegal controller as parameter 
    CAN_E_UNINIT 
    Driver API is used but not initialized 
    CAN_E_TRANSITION 
    Transition for mode change is illegal 
    CAN_E_DATALOST 
    Rx overrun (overwrite) detected 
    (value: 0x07, AutoSar extension) 
    CAN_E_PARAM_BAUDRATE 
    Selected Baudrate is not valid 
    (value: 0x08, AutoSar extension) 
    Rx Queue overrun  
    CAN_E_RXQUEUE 
    (Last received message is lost and will not be received.  
    (value: 0x10, AutoSar extension) 
    Avoid this by increasing the queue size) 
    CAN_E_TIMEOUT_DET 
    Same as CAN_E_TIMEOUT for DEM but this is notified to DET 
    due to switch “CAN_DEV_TIMEOUT_DETECT” is set to 
    (value: 0x11, AutoSar extension) 
    STD_ON (see configuration options) 
     
     
    Table 4-3   Errors reported to DET 
     
    API from which the errors are reported to DET: 
    API ID 
    Functions using that ID 
    CAN_VERSION_ID 
    Can_GetVersionInfo() 
    CAN_INIT_ID 
    Can_Init() 
    CAN_INITCTR_ID 
    Can_InitController() 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    20 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    CAN_SETCTR_ID 
    Can_SetControllerMode() 
    CAN_DIINT_ID 
    Can_DisableControllerInterrupts() 
    CAN_ENINT_ID 
    Can_EnableControllerInterrupts() 
    CAN_WRITE_ID 
    Can_Write(), Can_CancelTx() 
    CAN_TXCNF_ID 
    CanHL_TxConfirmation() 
    CAN_RXINDI_ID 
    CanBasicCanMsgReceived(), CanFullCanMsgReceived() 
    CAN_CTRBUSOFF_ID 
    CanHL_ErrorHandling() 
    CAN_CKWAKEUP_ID 
    CanHL_WakeUpHandling(), Can_Cbk_CheckWakeup() 
    CAN_MAINFCT_WRITE_ID 
    Can_MainFunction_Write() 
    CAN_MAINFCT_READ_ID 
    Can_MainFunction_Read() 
    CAN_MAINFCT_BO_ID 
    Can_MainFunction_BusOff() 
    CAN_MAINFCT_WU_ID 
    Can_MainFunction_Wakeup() 
    CAN_MAINFCT_MODE_ID 
    Can_MainFunction_Mode() 
    CAN_CHANGE_BR_ID 
    Can_ChangeBaudrate() 
    CAN_CHECK_BR_ID 
    Can_CheckBaudrate() 
    CAN_SET_BR_ID 
    Can_SetBaudrate() 
    CAN_HW_ACCESS_ID 
    Used when hardware is accessed (call context is unknown) 
    (value: 0x20, AUTOSAR extension) 
    Table 4-4 
    API from which the Errors are reported 
    4.8.1.1 
    Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters (Refer to [1]). 
    These  checks  are  for  development  error  reporting  and  can  be  enabled  and  disabled 
    separately. Refer to the configuration chapter where the enabling/disabling of the checks is 
    described.  Enabling/disabling  of  single  checks  is  an  addition  to  the AUTOSAR  standard 
    which  requires  enable/disable  the  complete  parameter  checking  via  the  parameter 
    CAN_DEV_ERROR_DETECT. 
     
    4.8.1.2 
    Overrun/Overwrite Notification 
    As AUTOSAR extension the overrun detection may be activated by configuration tool. The 
    notification can be configured to issue a DET call (MICROSAR 4.x) or an Application call 
    (Appl_CanOverrun()). 
     
    4.8.2 
    Production Code Error Reporting 
    Production  code  related  errors  are  reported  to  DEM  using  the  service 
    Dem_ReportErrorStatus(), if the pre-compile parameter CAN_PROD_ERROR_DETECT 
    == STD_ON. 
    The table below shows the Event ID and Event Status given as parameter for calling the 
    DEM. This callout may occur in the context of different API calls (see Chapter “4.8.2.1”)
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    21 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Event ID 
    Event Status 
    Short Description 
    CAN_E_TIMEOUT 
    DEM_EVENT_STATUS_FAILED 
    Timeout in “Hardware Loop Check” 
    occurred, hardware has to be checked 
     
    or timeout is too short. 
     
     
     
    Table 4-5   Errors reported to DEM 
    4.8.2.1 
    Hardware Loop Check / Timeout Monitoring 
    The feature “Hardware Loop Check” is used to break endless loops  caused by hardware 
    issue. This feature is configurable see Chapter 7 and also Timeout Duration description. 
    The  Hardware  Loop  Check  will  be  handled  by  CAN  driver  internal  except  when  setting 
    “Hardware Loop Check by Application” is activated. 
    Loop Name / 
    Short Description 
    source 
    kCanLoopInit  
    This channel dependent loop is called in Can_InitController  
    and is processed as long as the CAN cell does not enter  
    resp. leave the configuration mode.   
    While entering the configuration mode, message transfer from  
    and to the CAN bus is stopped, the status of the CAN bus  
    transmit output is recessive.   
    There is a delay from writing to a command register until  
    the update of the related status register bits due to clock  
    domain crossing (Host and CAN clock). Therefore the  
    programmer has to assure that the previous value written to  
    INIT has been accepted.  
    Due to the high precision clocking requirements of the CAN  
    Core, a separate clock without any modulation has to be  
    provided as CAN clock. The CAN Core should be programmed to  
    have at least 8 clocks per bit time (e.g.: at least 8 MHz  
    CAN clock at 1 Mbaud CAN speed). In order to achieve a  
    stable function of the M_CAN, the Host clock must always be  
    faster than or equal to the CAN clock.   
    If the loop cancels, try to reinitialize the controller  
    again or reset the hardware.  
    After leaving the configuration mode the Bit Stream  
    Processor synchronizes itself to the data transfer on the  
    CAN bus by waiting for the occurrence of a sequence of 11  
    consecutive recessive bits (= Bus_Idle) before it can take  
    part in bus activities and start the message transfer. 
    kCanLoopStart 
    MICROSAR3: 
    - Used while transition in mode ‘START’. 
    - Call context: Can_SetControllerMode() 
    - There is a delay from writing to a command register until 
    the update of the related status register bits due to clock 
    domain crossing (Host and CAN clock). Therefore the 
    programmer has to assure that the previous value written to 
    INIT has been accepted. 
    - If the loop cancels try to recall Can_SetControllerMode(). 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    22 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Loop Name / 
    Short Description 
    source 
      
    MICROSAR4: 
    Used for short time mode transition blocking (short 
    synchronous timeout). Same value for kCanLoopStart, 
    kCanLoopStop, kCanLoopSleep and kCanLoopWakeup.  
    No Issue when timeout occurs. 
    kCanLoopStop 
     MICROSAR3: 
    - Used while transition in mode ‘STOP’. 
    - Call context: Can_SetControllerMode() 
    - There is a delay from writing to a command register until 
    the update of the related status register bits due to clock 
    domain crossing (Host and CAN clock). Therefore the 
    programmer has to assure that the previous value written to 
    INIT has been accepted. 
    - If the loop cancels try to recall Can_SetControllerMode(). 
     
    MICROSAR4: 
    Used for short time mode transition blocking (short 
    synchronous timeout). Same value for kCanLoopStart, 
    kCanLoopStop, kCanLoopSleep and kCanLoopWakeup.  
    No Issue when timeout occurs. 
    kCanLoopSleep 
    MICROSAR3: 
    - Used while transition in mode ‘SLEEP’. 
    - Call context: Can_SetControllerMode() 
    - When all pending transmission requests have completed, the 
    M_CAN waits until bus idle state is detected. 
    - If the loop cancels try to recall Can_SetControllerMode. 
     
    MICROSAR4: 
    Used for short time mode transition blocking (short 
    synchronous timeout). Same value for kCanLoopStart, 
    kCanLoopStop, kCanLoopSleep and kCanLoopWakeup.  
    No Issue when timeout occurs. 
    kCanLoopWakeup 
    MICROSAR3: 
    - Used while transition in mode ‘WAKEUP’. 
    - Call context: Can_SetControllerMode() 
    - Once the M_CAN is initialized it synchronizes itself to the 
    CAN bus and is ready for communication.  
    - If the loop cancels try to recall Can_SetControllerMode. 
     
    MICROSAR4: 
    Used for short time mode transition blocking (short 
    synchronous timeout). Same value for kCanLoopStart, 
    kCanLoopStop, kCanLoopSleep and kCanLoopWakeup.  
    No Issue when timeout occurs. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    23 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    kCanLoopClock 
    When Clock Stop is requested then all pending transfer 
    Stop 
    requests are completed first.  
    When the CAN bus reached idle then Clock Stop will be 
    acknowledged. 
    kCanLoopRxFifo   
    This channel dependent loop is called in CanInterruptRxFifo  
     
    and is processed  until the Rx FIFO becomes empty. The loop 
    is delayed if the controller receives  a burst of messages. 
    The maximum expected duration is the time needed until   
    all  messages  in  the  reception  FIFO  are  confirmed.  If   
    the  loop  cancels, reinitialize the Controller. 
    Table 4-6   Hardware Loop Check 
    4.8.3 
    CAN RAM Check 
    The CAN driver supports a check of the CAN controller’s mailboxes. The CAN controller 
    RAM  check  is  called  internally  every  time  a  power  on  is  executed  within  function 
    Can_InitController(), or a Bus-Wakeup event happen. The CAN driver verifies that no used 
    mailboxes are corrupt. A mailbox is considered corrupt if a predefined pattern is written to 
    the  appropriate  mailbox  registers  and  the  read  operation  does  not  return  the  expected 
    pattern. If a corrupt mailbox is found the function Appl_CanCorruptMailbox() is called. This 
    function tells the application which mailbox is corrupt.  
    After  the  check  of  all  mailboxes  the  CAN  driver  calls  the  call  back  function 
    Appl_CanRamCheckFailed()  if  at  least  one  corrupt  mailbox  was  found.  The  application 
    must  decide  if  the  CAN  driver  disables  communication  or  not  by  means  of  the  call  back 
    function’s return value. If the application has decided to disable the communication there is 
    no possibility to enable the communication again until the next call to Can_Init(). 
    The CAN RAM check functionality itself can be activated via Generation Tool. 
    4.9 
    Common CAN 
    Common  CAN  connect  2  hardware  CAN  channels  to  one  logical  controller.  This  allows 
    configuring  more  FullCAN  mailboxes.  The  second  hardware  channel  is  used  for  Rx 
    FullCAN mailboxes. 
    The  filter  mask  of  the  BasicCAN  should  exclude  the  message  received  by  the  FullCAN 
    messages of the second CAN Controller. This means each message ID must be received 
    on  one  CAN  hardware  channel  only.  The  filter  optimization  takes  care  about  this  when 
    common CAN is activated. 
    For configuration of Common CAN specific settings in generation tool see chapter ‎7.6.2. 
     
     
    Caution 
    Only one Transceiver (Driver) has to be used for this two Common CAN hardware 
      channels (connect TX and RX lines). 
    Reason: Upper layers only know one Controller for this 2 hardware channel Common 
    CAN and therefore only one Transceiver can be handled. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    24 
    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    4.9.1 
    Error Interrupt  
    The  MCAN  error  interrupt  source  is  used  only  partially  by  the  CAN  driver.  Only  
    BusOff events are handled and reported to the upper layers by the CAN driver.  
      
    Not reported errors are:  
    Stuff Error                          More than 5 equal bits in a sequence occurred  
    Format Error                        A fixed format part of a received frame has the wrong format  
    Acknowledge Error              A  transmitted  message  was  not  acknowledged  by  another 
    node  
    Bit Error                              Device    wanted    to    send    a    recessive/dominant    level,    but  
    the monitored level was dominant/recessive  
    CRC Error                         Received CRC did not match the calculated CRC  
    Watchdog Interrupt             Message RAM Watchdog event due to missing READY  
    Warning Status                   Error_Warning status changed  
    Error Passive                      Error_Passive status changed  
    Error Logging Overflow       Overflow of CAN Error Logging Counter occurred  
    Bit Error Uncorrected          Message RAM bit error detected, uncorrected.  
    Bit Error Corrected              Message RAM bit error detected and corrected.   
    Timeout Occurred               Timeout reached  
    Timestamp                          Wraparound Timestamp counter wrapped around  
    Rx FIFO 0 Full                    Rx FIFO 0 Full  
    Rx FIFO 0 Watermark         Reached fill level watermark  
    Rx FIFO 1 Full                    Rx FIFO 1 Full 
    Rx FIFO 1 Watermark         Reached fill level watermark  
     
    Please note 
    The BusOff recovery sequence cannot be shortened (e.g. by initializing the CAN 
    device). If the device goes BusOff, it will enter the INIT mode by its own, stopping all 
     
    bus activities.  
    When leaving the INIT mode the device will wait for 129 occurrences of Bus Idle (129 x 
    11 consecutive recessive bits) before resuming normal operation.  
     
    Please note 
    The Timeout Counter is used for CAN driver internal purposes (supervision of possible 
    transmit confirmations arriving delayed after a cancellation was requested). Thus the 
     
    “Timeout Occurred” interrupt may occur occasionally. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    25 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    4.9.2 
    Not supported  
    Neither the Tx Event FIFO nor the Tx Queue is used. All available 32 transmit message  
    buffers  per  CAN  channel  are  used  as  dedicated  buffers  and  can  be  used  either  as  
    BasicCAN or FullCAN objects (see 4.3.1).  
     
    The filtering of High Priority messages is not supported.  
     
    No Range Filters are supported. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    26 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    5  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  CAN into 
    an application environment of an ECU. 
    5.1 
    Scope of Delivery 
    The delivery of the CAN contains the files, which are described in the chapter’s 5.1.1 and 
    5.1.2: 
    Dependent on library or source code delivery the marked (+) files may not be delivered. 
    5.1.1 
    Static Files 
    File Name 
    Description 
    (+) Can_Local.h  This is an internal header file which should not be included outside this 
    module 
    (+) Can.c 
    This is the source file of the CAN. It contains the implementation of CAN 
    module functionality. 
    (+) Can.(lib) 
    This is the library build out of Can.c, Can.h and Can_Local.h 
    Can.h 
    This is the header file of the CAN module (include API declaration) 
    Can_Hooks.h 
    This is the header file to define the Hook-functions or macros. (this is a project 
    specific file and may not exist) 
    Can_Irq.c 
    This is the interrupt declaration and callout file (supports interrupt 
    configuration as link time settings) 
    Table 5-1   Static files 
    5.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool [GENy]. 
     
    File Name 
    Description 
    Can_Cfg.h 
    Generated header file, contains some type, 
    prototype and pre-compile settings 
    Can_Lcfg.c 
    Generated file contains link time settings. 
    Can_PBcfg.c 
    Generated file contains post build settings. 
    Can_DrvGeneralTypes.h 
    Generated file contains CAN driver part of 
    Can_GeneralTypes.h (supported by 
    Integrator) 
    Table 5-2   Generated files 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    27 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    5.2 
    Include Structure 
     
    Figure 5-1  Include Structure (AUTOSAR) 
    Deviation from AUTOSAR specification: 
      Additionally the EcuM_Cbk.h is included by Can_Cfg.h (needed for wakeup notification 
    API). 
      ComStack_Types.h included by Can_Cfg.h, because the specified types have to be 
    known in generated data as well. 
      MICROSAR4x only: Os.h will be included by Can_Cfg.h because of used data-types 
      Spi.h is not yet used. 
      Additionally the file Can_Hooks.h may be included by Can.h. 
      MICROSAR403 only: Can_GeneralTypes.h will be included by Can_Cfg.h not by Can.h 
    direct. 
     
    5.3 
    Critical Sections 
    The AUTOSAR standard provides with the BSW Scheduler a BSW module, which handles 
    entering and leaving critical sections.  
    For  more  information  about  the  BSW  Scheduler  please  refer  to  [3].  When  the  BSW 
    Scheduler is used the CAN Driver provides critical section codes that have to be mapped 
    by the BSW Scheduler to following mechanism: 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    28 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Critical Section Define 
    Description 
    CAN_EXCLUSIVE_AREA_0 
    CanNestedGlobalInterruptDisable/Restore() is used within   
    Can_MainFunction_Write() to assure that transmit confirmations do not  
    conflict with further transmit requests.  
    >  Duration is short.  
    >  No API call of other BSW inside. 
    CAN_EXCLUSIVE_AREA_1 
    Using inside Can_DisableControllerInterrupts() and  
    Can_EnableControllerInterrupts() to secure Interrupt counters for nested  
    calls.  
    >  Duration is short.  
    >  No API call of other BSW inside.  
    >  Disable global interrupts – or – Empty in case 
    Can_Disable/EnableControllerInterrupts() are called within context 
    with lower or equal priority than CAN interrupt. 
    CAN_EXCLUSIVE_AREA_2 
    Using inside Can_Write() to secure software states of transmit objects. 
    >  Only when no Vector CAN Interface is used. 
    >  Duration is medium 
    >  No API call of other BSW inside. 
    >  Disable global interrupts - or - Disable CAN interrupts and do not call 
    function Can_Write() reentrant. 
    CAN_EXCLUSIVE_AREA_3 
    Using inside Tx confirmation to secure state of transmit object in case of 
    cancellation (Only used when Vector Interface Version smaller 4.10 
    used). 
    >  Duration is medium  
    >  Call to CanIf_CancelTxConfirmation() inside (no more calls in CanIf). 
    >  Disable global interrupts - or - Disable CAN interrupts and do not call 
    function Can_Write() within. 
    CAN_EXCLUSIVE_AREA_4 
    Using inside received data handling (Rx Queue treatment) to secure Rx 
    Queue counter and data. 
    >  Duration is short  
    >  No API call of other BSW inside. 
    >  Disable Global Interrupts - or - Disable all CAN interrupts. 
    CAN_EXCLUSIVE_AREA_5 
    Using inside wakeup handling to secure state transition. (Only in wakeup 
    polling mode) 
    >  Duration is short  
    >  Call to DET inside. 
    >  Disable global interrupts   (do not use CAN interrupt locks here) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    29 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    CAN_EXCLUSIVE_AREA_6 
    Using inside Can_SetControllerMode() and BusOff to avoid nested state 
    transition requests. 
     
    >  Duration is medium  
    >  No API call of other BSW inside. 
    >  Use CAN interrupt locks here, in case the above mentioned APIs are 
    only called within same tasklevel and CAN interrupt context (no 
    nesting - like BusOff-handling in interrupt has to be blocked). 
    or 
    Disable global interrupts 
    Table 5-3   Critical Section Codes 
    5.4 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions  defined  for  the  CAN  Interface  and  illustrates  their  assignment  among  each 
    other. 
     
    Compiler Abstraction 
    Definitions 
     
     

    E
    G
    F
    L
     
     
    C
    E
    A
     

    E
    S
    OD
    B
    T I
    C
    T
    A
     
    R
     
    C
    P
    N

    N
      
    T I
    A
    D
    OD
    ON
    A
     

    OI
    _
    C
    C
    V
    C
    T
    T_
    NI
    TR
    C
    X
    _
    _
    _
     
    E
    S
    S
    N
    TI
    _
    _
    G_
    T_
    L
    L
    L
    OD
    A
    ON
    ON
    R
    R
    T_C
    E
    X
    P
    P
    P
    Memory Mapping
    T
    A
    P
    P
    P
     
    C
    A
    N
     
    C
    C
    V
    A
    A
    A
    _
    _S
     _
     _
    V_
     _
     I_
     R_
     R_
     _
     _
     _
    Sections
    N
    N
    N
    N
    N
    N
    N
    N
    N
    N
    N
    N
     
    A
    A
    A
    A
    A
    A
    A
    A
    A
    A
    A
    A
    C
    C
    C
    C
    C
    C
    C
    C
    C
    C
    C
    C
    CAN_START_SEC_CODE 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CODE 
    CAN_START_SEC_STATIC_CODE 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_STATIC_CODE 
    CAN_START_SEC_CONST_8BIT 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CONST_8BIT 
    CAN_START_SEC_CONST_16BIT 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CONST_16BIT 
    CAN_START_SEC_CONST_32BIT 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CONST_32BIT 
    CAN_START_SEC_CONST_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CONST_UNSPECIFIED 
    CAN_START_SEC_PBCFG 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_PBCFG 
    CAN_START_SEC_PBCFG_ROOT 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_PBCFG_ROOT 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    30 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    CAN_START_SEC_VAR_NOINIT_UNSPECIFIED   
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    CAN_START_SEC_VAR_INIT_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_VAR_INIT_UNSPECIFIED 
    CAN_START_SEC_CODE_APPL 
     
     
     
     
     
     
     
     
     
     
     
     
    CAN_STOP_SEC_CODE_APPL 
    Table 5-4   Compiler abstraction and memory mapping 
    The  Compiler Abstraction  Definitions  CAN_  APPL_CODE,  CAN_  APPL_VAR  and  CAN_ 
    APPL_CONST are used to address code, variables and constants which are declared by 
    other modules and used by the CAN driver. 
    These definitions are not mapped by the CAN driver but by the memory mapping realized 
    in the CAN Interface or direct by application. 
    CAN_ CODE: used for CAN module code. 
    CAN_ STATIC_CODE: used for CAN module local code. 
    CAN_ CONST: used for CAN module constants. 
    CAN_ CONST_PBCFG: used for CAN module constants in Post-Build section. 
    CAN_ VAR_*: used for CAN module variables. 
    CAN_ INT_CTRL: is used to access the CAN interrupt controls. 
    CAN_ REG_CANCELL: is used to access the CAN cell itself. 
    CAN_ RX_TX_DATA: access to CAN Data buffers.  
    CAN_ APPL_*: access to higher layers. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    31 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    6  Hardware Specific Hints 
    6.1.1 
    Usage of interrupt functions  
    According to the current implementation of MCAN generator there is a fix assignment of  
    interrupt  functions  to  the  CAN  Controller.  The  postfix  of  the  interrupt  function  name  
    equates the controller number. The following table shows the corresponding assignment  
    for the derivative RH850 P1X-C.   
       
    Critical Section Define 
    Description 
    MCAN_0,  BaseAddress:  0xFFEF0000  CanIsr_1  
    CanIsr_1  
    MCAN_1,  BaseAddress:  0xFFD31000  CanIsr_2  
    CanIsr_2  
    MCAN_2,  BaseAddress:  0xFFEF1000  CanIsr_3  
    CanIsr_3  
    Table 5-5   Hardware Controller – Interrupt Functions  
     
    CanIsr_0 is used for MTT_CAN0 of the RH850 P1X-C. 
     
    6.1.2 
    MCAN Errata  
    The following Errata (please see [6] for further details) are considered by the CAN Driver. 
    By  default  all  erratas  which  are  appropriate  for  the  configured  MCAN  Revision  are 
    enabled. If a specific erratum shall be disabled or enabled beyond that it can be configured 
    via a user configuration file. 
     Errata  Title 
    MCAN 
    No. 
    Rev. 
    affected 

    Change of CAN operation mode during start of transmission. 
    2.9.5, 
    Only activated if “
    2.9.6, 
    CAN_BOSCH_ERRATUM_006“ is defined as STD_ON. 
    3.0.0, 
    3.0.1 

    Problem  with  frame  transmission  after  recovery  from  Restricted  2.9.5, 
    Operation Mode. 
    2.9.6, 
    Only activated if “
    3.0.0, 
    CAN_BOSCH_ERRATUM_007“ is defined as STD_ON. 
    3.0.1 

    Setting / resetting CCCR.INIT during frame reception. 
    2.9.5, 
    Only activated if “
    2.9.6, 
    CAN_BOSCH_ERRATUM_008“ is defined as STD_ON. 
    3.0.0, 
    3.0.1 
    10 
    Setting CCCR.CCE while a Tx scan is ongoing. 
    2.9.5, 
    Only activated if “
    2.9.6,  
    CAN_BOSCH_ERRATUM_010“ is defined as STD_ON. 
    3.0.0, 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    32 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    3.0.1 
    11 
    Needless activation of interrupt IR.MRAF. 
    2.9.5, 
    Only activated if “
    2.9.6, 
    CAN_BOSCH_ERRATUM_011“ is defined as STD_ON. 
    3.0.0, 
    3.0.1, 
    3.1.0 
    12 
    Return  of  receiver  from  Bus  Integration  state  after  Protocol  Exception  2.9.6, 
    Event. 
    3.0.0, 
    Only activated if “
    3.0.1, 
    CAN_BOSCH_ERRATUM_012“ is defined as STD_ON. 
    3.1.0 
    13  
    Message RAM / RAM Arbiter not responding in time. 
    2.9.6, 
    When  the  M_CAN  wants  to  store  a  received  frame  and  the  Message  3.0.0, 
    RAM / RAM Arbiter does not respond in time, this message cannot be  3.0.1, 
    stored  completely  and  it  is  discarded  with  the  reception  of  the  next  3.1.0, 
    message.  Interrupt  flag  IR.MRAF  is  set.  It  may  happen  that  the  next  3.2.0 
    received message is stored incomplete.  
    In  this  case,  the  respective  Rx  Buffer  or  Rx  FIFO  element  holds 
    inconsistent data. 
     
     
    When the M_CAN has been integrated correctly (the Host and  the 
    CAN clock must be fast enough to handle a worst case 
      configuration containing the maximum of MCAN Message RAM 
    elements), this behaviour  can only occur in case of a problem with 
    the Message RAM itself or the RAM Arbiter.  
    The application must assure that the clocking of Host and CAN is 
    appropriate. The CAN Driver does not care about these   
    configuration aspects.  
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    33 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    14 
    Data  loss  (payload)  in  case  storage  of  a  received  frame  has  not  2.9.6, 
    completed until end of EOF field is reached. 
    3.0.0, 
    The  time  needed  for  acceptance  filtering  and  storage  of  a  received  3.0.1, 
    message depends on the 
    3.1.0, 
     
    3.2.0 
    -  Host clock frequency,  
    -  the number of M_CANs connected to a single Message RAM,  
    -  the Message RAM arbitration scheme, and  
    -  the number of configured filter elements. 
    In case storage of a received message has not completed until end of 
    the  received  frame  then  corrupted  data  can  be  contained  in  the 
    Message RAM.  
    Interrupt flag IR.MRAF is not set. 
     
     
    If storage of messages cannot be completed the application is 
    responsible for reducing the maximum number of configured filter 
      elements for the M_CANs attached to the Message RAM until the 
    calculated clock frequency is below the Host clock frequency used 
    with the actual device. 
     
     
     
     
    1-5 
    These  errata  are  in  the  responsibility  of  the  application  and  are  not  2.0.0, 
    considered by the CAN Driver. 
    2.9.5, 
    2.9.6, 
    3.0.0, 
    3.0.1 

    Frame transmission in DAR mode. 
    2.9.5, 
    Not considered by the CAN Driver, frame transmission in DAR mode is  2.9.6, 
    not supported.
    3.0.0, 
     
    3.0.1 
    15 
    Edge filtering causes mis-synchronization when falling edge at Rx input  3.1.0, 
    pin coincides with end of integration phase. 
    3.2.0, 
    Not considered by the CAN Driver, Edge Filtering is not supported.
    3.2.1 
     
    16 
    Configuration of NBTP.NTSEG2 = ’0’ not allowed. 
    3.1.0, 
    Not considered by the CAN Driver, the user is responsible to care about  3.2.0, 
    the according bit timing configuration.
    3.2.1 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    34 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    7  API Description 
    7.1 
    Interrupt Service Routines provided by CAN 
    Depend  on  the  settings  in  Tools  component  Hw_Mpc5700Cpu,  the  interrupt  routine  is 
    given by the driver or by Operating System. (Selection below, not MICROSAR403) 
     
    Figure 7-1  Select OS Type 
    There  is  the  possibility  to  choose  OS  Type.  Please  select  “None”  for  using  no  OS, 
    “Autosar” for AUTOSAR OS or “OSEK” for OSEK OS systems. 
    7.1.1 
    OSEK (OS) 
    This means to include osek.h.  
    Switch: V_OSTYPE_OSEK 
    7.1.2 
    AutoSar (OS) 
    Os.h header file is used. 
    Switch: V_OSTYPE_AUTOSAR 
    7.1.3 
    None (OS) 
    Choose “None” for OS Type, to include no Os header files and have no category 2 
    interrupt. 
    Switch: V_OSTYPE_NONE 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    35 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    7.1.4 
    Type of Interrupt Function 
    -  Category 2 (only for OSEK OS or AUTOSAR OS):  
    A macro “ISR(CanIsr_x)” will be used to declare ISR function call. The name given 
    as parameter for interrupt naming (x = Physical CAN Channel number). For macro 
    definition see OS specification. The OS has full control of the ISR. 
    switch: C_ENABLE_OSEK_OS_INTCAT2 
    -  Category 1: 
    Using OS with category 1 interrupts need an Interface layer handling these 
    interrupts in task context like defined in BSW00326 (AUTOSAR_SRS_General). 
    switch: C_DISABLE_OSEK_OS_INTCAT2 
    -  Void-Void Interrupt Function: 
    Like in Category 1 the Interrupt is not handled by OS and the ISR is declared as 
    void ISR(void) and has to be called by interrupt controller in case of an CAN 
    interrupt. 
    switch: C_ENABLE_ISRVOID 
     
     
    7.1.5 
    CAN ISR API 
    Prototype 
    void CanIsr_<x>(void); 
    Parameter 
    --- 
    --- 
    Return code 
    --- 
    --- 
    Functional Description 
    Handles interrupts of hardware channel <x> for Rx, Tx, BusOff events. 
    Particularities and Limitations 
    >  Number of available functions depends on used MCU derivative. 
    >  The functions are not designated as interrupt functions. If it is necessary to save/restore all general 
    purpose registers and to use a different “return from interrupt” instruction the application code has to 
    implement the compiler specific pragma (e.g. for Wind River™ DIAB™: #pragma interrupt CanIsr_x). 
    Table 7-1   MCAN CanIsr_<x> 
    7.2 
    Services provided by CAN 
    The CAN API consists of services, which are realized by function calls. 
     
    7.2.1 
    Can_InitMemory 
    Prototype 
    void Can_InitMemory (void) 
    Parameter 
    -  
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    36 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Return code 
    void 

    Functional Description 
    Service initializes module global variables, which cannot be initialized in the startup code.  
    Use this to re-run the system without performing a new start from power on.  
    (E.g.: used to support an ongoing debug session without a complete re-initialization.)  
    Must be followed by a call to “Can_Init()”. 
    Particularities and Limitations 
    Called by Application. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Should be called while power on initialization before „Can_Init()“ on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-2   Can_InitMemory 
     
    7.2.2 
    Can_Init 
    Prototype 
    void Can_Init( const Can_ConfigType *Config ) 

    Parameter 
    Pointer to the structure including configuration data. 
    Config 
    In case of Multiple ECU configuration feature is used, for each Identity one 
    “Config” structure exists and has to be chosen here 
    Return code 


    Functional Description 
    This function initializes global CAN driver variables during ECU start-up. 
    Particularities and Limitations 
    >  
    Has to be called during start-up before CAN communication. 
    >  Must be called before calling Can_InitController(). 
    >  Mulitple ECU configuration pointer for “Config” does only work with none Post-Build variants 
    >  Can_InitMemory() has to be called before. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    37 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    7.2.3 
    Can_InitController 
    Prototype 
    void Can_InitController (uint8 Controller, Can_ControllerBaudrateConfigPtrType 
    Config) 
    Parameter 
    Controller [in] 
    Number of controller 
    Config [in] 
    Pointer to baud rate configuration structure 
    Return code 
    Void 

    Functional Description 
    Initialization of controller specific CAN hardware.  
    The CAN driver registers and variables are initialized.  
    The CAN controller is fully initialized and left back within the state “Stop Mode”, ready to change to 
    “Running Mode”. 
    Particularities and Limitations 
    Called by CanInterface. 
    Disabled Interrupts.  
    Call context 
    >  Must be called during the startup sequence before CAN communication takes place but after calling 
    „Can_Init()“.  
    >  Must not be called while in „Sleep Mode“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR401 only 
    Table 7-3   Can_InitController 
     
    7.2.4 
    Can_InitController 
    Prototype 
    void Can_InitController (uint8 Controller, Can_ControllerConfigPtrType 
    ControllerConfigPtr) 
    Parameter 
    Controller [in] 
    Number of controller 
    Config [in] 
    Pointer to the configuration data structure. 
    Return code 
    Void 

    Functional Description 
    Initialization of controller specific CAN hardware.  
    The CAN driver registers and variables are initialized.  
    The CAN controller is fully initialized and left back within the state “stop mode”, ready to change to “Running 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    38 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Mode”. 
    Particularities and Limitations 
    Called by CanInterface. 
    Disabled Interrupts 
    Call context 
    >  Must be called during the startup sequence before CAN communication takes place but after calling 
    „Can_Init()“.  
    >  Must not be called while in „Sleep Mode“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR3 only 
    Table 7-4   Can_InitController 
     
    7.2.5 
    Can_ChangeBaudrate 
    Prototype 
    Std_ReturnType Can_ChangeBaudrate (uint8 Controller, const uint16 Baudrate) 
    Parameter 
    Controller [in] 
    Number of controller to be changed 
    Baudrate [in] 
    Baud rate to be set 
    Return code 
    Std_ReturnType 
    >  E_NOT_OK Baud rate is not set  
    >  E_OK Baud rate is set 
    Functional Description 
    This service shall change the baud rate and reinitialize the CAN controller.  
    Particularities and Limitations 
    Called by Application. 
    The CAN controller must be in “Stop Mode”. 
    Call context 
    >  Must be called during the startup sequence before CAN communication takes place but after calling 
    „Can_Init()“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR403 only & if „CanChangeBaudrateApi“ is activated or „CanSetBaudrateApi“ is 
    de-activated. 
    Table 7-5   Can_ChangeBaudrate 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    39 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    7.2.6 
    Can_CheckBaudrate 
    Prototype 
    Std_ReturnType Can_CheckBaudrate (uint8 Controller, const uint16 Baudrate) 
    Parameter 
    Controller [in] 
    Number of controller to be checked 
    Baudrate [in] 
    Baud rate to be checked 
    Return code 
    Std_ReturnType 
    >  E_NOT_OK Baud rate is not available  
    >  E_OK Baud rate is available 
    Functional Description 
    This service shall check if the given baud rate is supported of the CAN controller.  
    Particularities and Limitations 
    Called by Application. 
    The CAN controller must be initialized.  
    Call context 
    >  Must not be called nested.  
    >  Only available if „CanChangeBaudrateApi“ is activated. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR403 only & „CanChangeBaudrateApi“ is activated 
    („CAN_CHANGE_BAUDRATE_SUPPORT == STD_ON“) 
    Table 7-6   Can_CheckBaudrate 
     
    7.2.7 
    Can_SetBaudrate 
    Prototype 
    Std_ReturnType Can_SetBaudrate (uint8 Controller, uint16 BaudRateConfigID) 
    Parameter 
    Controller [in] 
    Number of controller to be set 
    BaudRateConfigID [in] 
    Identity of the configured baud rate (available as Symbolic Name) 
    Return code 
    Std_ReturnType 
    >  E_NOT_OK Baud rate is not set  
    >  E_OK Baud rate is set 
    Functional Description 
    This service shall change the baud rate and reinitialize the CAN controller.  
    (Similar to “Can_ChangeBaudrate()” but used when identical baud rates are used for different CAN FD 
    settings).  
    Particularities and Limitations 
    Called by Application. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    40 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Call context 
    >  Must not be called nested.  
    >  Only available if „CanSetBaudrateApi“ is activated. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR403 only & „CanSetBaudrateApi“ is activated („CAN_SET_BAUDRATE_API == 
    STD_ON“) 
    Table 7-7   Can_SetBaudrate 
     
    7.2.8 
    Can_InitStruct 
    Prototype 
    void Can_InitStruct (uint8 Controller, uint8 Index) 
    Parameter 
    Controller [in] 
    Number of the controller to be changed 
    Index [in] 
    Index of the initialization structure to be used for baud rate and mask settings 
    Return code 
    void 

    Functional Description 
    Set content of the initialization structure (before calling “Can_InitController()”).  
    Service function to change the initialization structure setup left behind by the Generation Tool.  
    The structure contains information about baud rate and filter settings.  
    Subsequent “Can_InitController()” must be called to activate these settings.  
    Particularities and Limitations 
    Called by Application. 
    “Can_Init” was called.  
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Call this function between calling „Can_Init()“ and „Can_InitController()“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR3 only 
    Table 7-8   Can_InitStruct 
     
    7.2.9 
    Can_GetVersionInfo 
    Prototype 
    void Can_GetVersionInfo (Can_VersionInfoPtrType VersionInfo) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    41 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Parameter 
    VersionInfo [out] 
    Pointer to where to store the version information of the CAN driver.  
    typedef struct {  
    uint16 vendorID;  
    uint16 moduleID;  
    MICROSAR3 only: uint8 instanceID;  
    uint8 sw_major_version; (MICROSAR3 only: BCD coded)  
    uint8 sw_minor_version; (MICROSAR3 only: BCD coded)  
    uint8 sw_patch_version; (MICROSAR3 only: BCD coded)  
    } Std_VersionInfoType; 
    Return code 
    void 

    Functional Description 
    Get the version information of the CAN driver.  
    Particularities and Limitations 
    Called by Application. 
    Call context 
    >  Only available if „CanVersionInfoApi“ is activated. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    >  Availability: „CanVersionInfoApi“ is activated („CAN_VERSION_INFO_API == STD_ON“) 
    Table 7-9   Can_GetVersionInfo 
     
    7.2.10  Can_GetStatus 
    Prototype 
    uint8 Can_GetStatus (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller requested for status information 
    Return code 
    uint8 
    >  CAN_STATUS_STOP (Bit coded status information)  
    >  CAN_STATUS_INIT  
    >  CAN_STATUS_INCONSISTENT, CAN_DEACTIVATE_CONTROLLER 
    (only with „CanRamCheck“ active) 
    >  CAN_STATUS_WARNING  
    >  CAN_STATUS_PASSIVE  
    >  CAN_STATUS_BUSOFF  
    >  CAN_STATUS_SLEEP 
    Functional Description 
    Delivers the status of the hardware.  
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    42 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Only one of the status bits CAN_STATUS_SLEEP/STOP/BUSOFF/PASSIVE/WARNING is set.  
    The CAN_STATUS_INIT bit is always set if a controller is initialized.  
    CAN_STATUS_SLEEP has the highest and CAN_STATUS_WARNING the lowest priority.  
    CAN_STATUS_INCONSISTENT will be set if one Common CAN channel. Is not “Stop” or “Sleep”.  
    CAN_DEACTIVATE_CONTROLLER is set in case the “CanRamCheck” detected an Issue.  
    “status” can be analyzed using the provided API macros:  
    CAN_HW_IS_OK(status): return “true” in case no warning, passive or bus off occurred.  
    CAN_HW_IS_WARNING(status): return “true” in case of waning status.  
    CAN_HW_IS_PASSIVE(status): return “true” in case of passive status.  
    CAN_HW_IS_BUSOFF(status): return “true” in case of bus off status (may be already false in Notification).  
    CAN_HW_IS_WAKEUP(status): return “true” in case of not in sleep mode.  
    CAN_HW_IS_SLEEP(status): return “true” in case of sleep mode.  
    CAN_HW_IS_STOP(status): return “true” in case of stop mode.  
    CAN_HW_IS_START(status): return “true” in case of not in stop mode.  
    CAN_HW_IS_INCONSISTENT(status): return “true” in case of an inconsistency between two common CAN 
    channels.  
    Particularities and Limitations 
    Called by network management or Application. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanGetStatus“ is activated („CAN_GET_STATUS == STD_ON“) 
    Table 7-10   Can_GetStatus 
     
    7.2.11  Can_SetControllerMode 
    Prototype 
    Can_ReturnType Can_SetControllerMode (uint8 Controller, Can_StateTransitionType 
    Transition) 
    Parameter 
    Controller [in] 
    Number of the controller to be set 
    Transition [in] 
    Requested transition to destination mode 
    Return code 
    Can_ReturnType 
    >  CAN_NOT_OK mode change unsuccessful  
    >  CAN_OK mode change successful 
    Functional Description 
    Change the controller mode to the following possible destination values:  
    CAN_T_START,  
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    43 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    CAN_T_STOP,  
    CAN_T_SLEEP,  
    CAN_T_WAKEUP.  
    Particularities and Limitations 
    Called by CanInterface. 
    Interrupts locked by CanInterface 
    Call context 
    >  Must not be called within CAN driver context like RX, TX or Bus Off callouts. 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-11   Can_SetControllerMode 
     
    7.2.12  Can_ResetBusOffStart 
    Prototype 
    void Can_ResetBusOffStart (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller 
    Return code 
    void 

    Functional Description 
    This is a compatibility function (for a CANbedded protocol stack) used during the start of the  
    Bus Off handling to remove the Bus Off state.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called while BusOff event handling (Polling or Interrupt context). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-12   Can_ResetBusOffStart 
     
    7.2.13  Can_ResetBusOffEnd 
    Prototype 
    void Can_ResetBusOffEnd (uint8 Controller) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    44 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Parameter 
    Controller [in] 
    Number of the controller 
    Return code 
    void 

    Functional Description 
    This is a compatibility function (for a CANbedded protocol stack) used during the end of the  
    Bus Off handling to remove the Bus Off state.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called inside „Can_SetControllerMode()“ while Start transition. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-13   Can_ResetBusOffEnd 
     
    7.2.14  Can_Write 
    Prototype 
    Can_ReturnType Can_Write (Can_HwHandleType Hth, Can_PduInfoPtrType PduInfo) 
    Parameter 
    Hth [in] 
    Handle of the mailbox intended to send the message 
    PduInfo [in] 
    Information about the outgoing message (ID, dataLength, data) 
    Return code 
    Can_ReturnType 
    >  CAN_NOT_OK transmit unsuccessful  
    >  CAN_OK transmit successful  
    >  CAN_BUSY transmit could not be accomplished due to controller is busy. 
    Functional Description 
    Send a CAN message over CAN.  
    Particularities and Limitations 
    Called by CanInterface. 
    CAN Interrupt locked.  
    Call context 
    >  Called by the CanInterface with at least disabled CAN interrupts.  
    >  (Due to data security reasons the CanInterface should accomplish this and thus it is not needed  further 
    more in the CAN Driver.) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    45 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-14   Can_Write 
     
    7.2.15  Can_CancelTx 
    Prototype 
    void Can_CancelTx (Can_HwHandleType Hth, PduIdType PduId) 
    Parameter 
    Hth [in] 
    Handle of the mailbox intended to be cancelled. 
    PduId [in] 
    Pdu identifier 
    Return code 
    void 

    Functional Description 
    Cancel the TX message in the hardware buffer (if possible) or mark the message as not to be confirmed  
    in case of the cancellation is unsuccessful.  
    Particularities and Limitations 
    Called by CanTp or Application. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called by CanTp or Application. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-15   Can_CancelTx 
     
    7.2.16  Can_CheckWakeup 
    Prototype 
    Std_ReturnType Can_CheckWakeup (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller to be checked for Wake Up events. 
    Return code 
    Std_ReturnType 
    >  E_OK the given controller caused a Wake Up before.  
    >  E_NOT_OK the given controller caused no Wake Up before. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    46 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Functional Description 
    Service function to check the occurrence of Wake Up events for the given controller  
    (used as Wake Up callback for higher layers).  
    Particularities and Limitations 
    Called by CanInterface. 
    Call context 
    >  Called while Wakeup validation phase. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: In AR4.x named „Can_CheckWakeup“, in AR3.x named „Can_Cbk_CheckWakeup“ (Name 
    mapped by define) 
    Table 7-16   Can_CheckWakeup 
     
    7.2.17  Can_DisableControllerInterrupts 
    Prototype 
    void Can_DisableControllerInterrupts (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the CAN controller to disable interrupts for. 
    Return code 
    void 

    Functional Description 
    Service function to disable the CAN interrupt for the given controller (e.g. due to data security reasons).  
    Particularities and Limitations 
    Called by SchM. 
    Must not be called while CAN controller is in sleep mode.  
    Call context 
    >  Called within Critical Area handling or out of Application code. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-17   Can_DisableControllerInterrupts 
     
    7.2.18  Can_EnableControllerInterrupts 
    Prototype 
    void Can_EnableControllerInterrupts (uint8 Controller) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    47 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Parameter 
    Controller [in] 
    Number of the CAN controller to disable interrupts for. 
    Return code 
    void 

    Functional Description 
    Service function to (re-)enable the CAN interrupt for the given controller (e.g. due to data security reasons).  
    Particularities and Limitations 
    Called by SchM. 
    Must not be called while CAN controller is in sleep mode.  
    Call context 
    >  Called within Critical Area handling or out of Application code. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-18   Can_EnableControllerInterrupts 
     
    7.2.19  Can_MainFunction_Write 
    Prototype 
    void Can_MainFunction_Write (void) 
    Parameter 
    -  
     
    Return code 
    void 

    Functional Description 
    Service function to poll TX events (confirmation, cancellation) for all controllers and all TX mailboxes  
    to accomplish the TX confirmation handling (like CanInterface notification).  
    Particularities and Limitations 
    Called by SchM. 
    Must not interrupt the call of “Can_Write()”. 
    Call context 
    >  Called within cyclic TX task. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-19   Can_MainFunction_Write 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    48 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    7.2.20  Can_MainFunction_Read 
    Prototype 
    void Can_MainFunction_Read (void) 
    Parameter 
    -  
     
    Return code 
    void 

    Functional Description 
    Service function to poll RX events for all controllers and all RX mailboxes to accomplish the  
    RX indication handling (like CanInterface notification).  
    Also used for a delayed read (from task level) of the RX Queue messages which were queued from 
    interrupt context.  
    Particularities and Limitations 
    Called by SchM. 
    Call context 
    >  Called within cyclic RX task. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-20   Can_MainFunction_Read 
     
    7.2.21  Can_MainFunction_BusOff 
    Prototype 
    void Can_MainFunction_BusOff (void) 
    Parameter 
    -  
     
    Return code 
    void 

    Functional Description 
    Polling of Bus Off events to accomplish the Bus Off handling. Service function to poll Bus Off events for all 
    controllers to accomplish the Bus Off handling  
    (like calling of “CanIf_ControllerBusOff()” in case of Bus Off occurrence).  
    Particularities and Limitations 
    Called by SchM. 
    Call context 
    >  Called within cyclic BusOff task. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    49 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    >  Availability: Always 
    Table 7-21   Can_MainFunction_BusOff 
     
    7.2.22  Can_MainFunction_Wakeup 
    Prototype 
    void Can_MainFunction_Wakeup (void) 
    Parameter 
    -  
     
    Return code 
    void 

    Functional Description 
    Service function to poll Wake Up events for all controllers to accomplish the Wake Up handling  
    (like calling of “CanIf_SetWakeupEvent()” in case of Wake Up occurrence).  
    Particularities and Limitations 
    Called by SchM. 
    Call context 
    >  Called within cyclic Wakeup task. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Always 
    Table 7-22   Can_MainFunction_Wakeup 
     
    7.2.23  Can_MainFunction_Mode 
    Prototype 
    void Can_MainFunction_Mode (void) 
    Parameter 
    -  
     
    Return code 
    void 

    Functional Description 
    Service function to poll Mode changes over all controllers.  
    (This is handled asynchronous if not accomplished in “Can_SetControllerMode()”). 
    Particularities and Limitations 
    Called by SchM. 
    Call context 
    >  Called within cyclic mode change task. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    50 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: MICROSAR4x only 
    Table 7-23   Can_MainFunction_Mode 
     
    7.2.24  Appl_GenericPrecopy 
    Prototype 
    Can_ReturnType Appl_GenericPrecopy (uint8 Controller, Can_IdType ID, uint8 
    DataLength, Can_DataPtrType DataPtr) 
    Parameter 
    Controller [in] 
    Controller which received the message 
    ID [in] 
    ID of the received message.  
    In case of extended or mixed ID systems the highest bit (bit 31) is set to mark 
    an extended ID.  
    FD-bit will not be set at all. 
    DataLength [in] 
    Data length of the received message. 
    pData [in] 
    Pointer to the data of the received message. 
    Return code 
    Can_ReturnType 
    >  CAN_OK if the indication of the message should be called afterwards 
    (notification to higher layer),  
    >  CAN_NOT_OK in case of stopping furthermore reception. 
    Functional Description 
    Application callback function which informs about all incoming RX messages including the contained data.  
    Particularities and Limitations 
    Called by CAN driver. 
    “pData” is read only and must not be accessed for further write operations.  
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within CAN message reception context (Polling or Interrupt). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanGenericPrecopy“ is activated („CAN_GENERIC_PRECOPY == STD_ON“). 
    Table 7-24   Appl_GenericPrecopy 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    51 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    7.2.25  Appl_GenericConfirmation 
    Prototype 
    Can_ReturnType Appl_GenericConfirmation (PduIdType PduId) 
    Parameter 
    PduId [in] 
    Handle of the PDU specifying the message. 
    Return code 
    Can_ReturnType 
    >  CAN_OK Higher layer (CanInterface) confirmation will be called.  
    >  CAN_NOT_OK No further higher layer (CanInterface) confirmation will be 
    called. 
    Functional Description 
    Application callback function which informs about TX messages being sent to the CAN bus.  
    Particularities and Limitations 
    Called by CAN driver. 
    “PduId” is read only and must not be accessed for further write operations.  
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within CAN message transmission finished context (Polling or Interrupt). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanGenericConfirmation“ is activated („CAN_GENERIC_CONFIRMATION == STD_ON“) & 
    „CanIfTransmitBuffer“ activated (in CanInterface). 
    Table 7-25   Appl_GenericConfirmation 
     
    7.2.26  Appl_GenericConfirmation 
    Prototype 
    Can_ReturnType Appl_GenericConfirmation (uint8 Controller, Can_PduInfoPtrType 
    DataPtr) 
    Parameter 
    Controller [in] 
    Number of the causing controller. 
    DataPtr [in] 
     
    Return code 
    Can_ReturnType 
    CAN_OK Higher layer (CanInterface) confirmation will be called. 
    CAN_NOT_OK No further higher layer (CanInterface) confirmation will be 
    called. 
    Functional Description 
    Application callback function which informs about TX messages being sent to the CAN bus.  
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    52 
    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    Particularities and Limitations 
    Called by CAN driver. 
    If “Generic Confirmation” and “Transmit Buffer” (both set in CanInterface) are active, then the switch  
    “Cancel Support Api” is also needed (also set in CanIf), otherwise a compiler error occurs.  
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within CAN message transmission finished context (Polling or Interrupt). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: If "CanGenericConfirmation" ("CAN_GENERIC_CONFIRMATION == STD_ON") and 
    "CanIfTransmitBuffer" (in CanInterface) is activated. 
    Table 7-26   Appl_GenericConfirmation 
     
    7.2.27  Appl_GenericPreTransmit 
    Prototype 
    void Appl_GenericPreTransmit (uint8 Controller, Can_PduInfoPtrType_var DataPtr) 
    Parameter 
    Controller [in] 
    Number of the controller on which the hardware observation takes place. 
    DataPtr [in] 
    Pointer to a Can_PduType structure including ID, DataLength, Pdu and data 
    pointer. 
    Return code 
    void 

    Functional Description 
    Application callback function allowing the modification of the data to be transmitted (e.g.: add CRC).  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within „Can_Write()“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanGenericPretransmit“ is activated („CAN_GENERIC_PRETRANSMIT == STD_ON“). 
    Table 7-27   Appl_GenericPreTransmit 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    53 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    7.2.28  ApplCanTimerStart 
    Prototype 
    void ApplCanTimerStart (CanChannelHandle Controller, uint8 source) 
    Parameter 
    Controller [in] 
    Number of the controller on which the hardware observation takes place.  
    (only if not using “Optimize for one controller”) 
    source [in] 
    Source for the hardware observation (see chapter Hardware Loop Check / 
    Timeout Monitoring). 
    Return code 
    void 

    Functional Description 
    Service function to start an observation timer (see chapter Hardware Loop Check / Timeout Monitoring).  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  For context information please refer to chapter „Hardware Loop Check“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanHardwareCancelByAppl“ is activated („CAN_HW_LOOP_SUPPORT_API == 
    STD_ON“). 
    Table 7-28   ApplCanTimerStart 
     
    7.2.29  ApplCanTimerLoop 
    Prototype 
    Can_ReturnType ApplCanTimerLoop (CanChannelHandle Controller, uint8 source) 
    Parameter 
    Controller [in] 
    Number of the controller on which the hardware observation takes place.  
    (only if not using “Optimize for one controller”) 
    source [in] 
    Source for the hardware observation (see chapter Hardware Loop Check / 
    Timeout Monitoring). 
    Return code 
    Can_ReturnType 
    >  CAN_NOT_OK when loop shall be broken (observation stops)  
    >  CAN_NOT_OK should only be used in case of a timeout occurs due to a 
    hardware issue.  
    >  After this an appropriate error handling is needed (see chapter Hardware 
    Loop Check / Timeout Monitoring).  
    >  CAN_OK when loop shall be continued (observation continues) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    54 
    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    Functional Description 
    Service function to check (against generated max loop value) whether a hardware loop shall be continued 
    or broken.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  For context information please refer to chapter „Hardware Loop Check“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanHardwareCancelByAppl“ is activated („CAN_HW_LOOP_SUPPORT_API == 
    STD_ON“). 
    Table 7-29   ApplCanTimerLoop 
     
    7.2.30  ApplCanTimerEnd 
    Prototype 
    void ApplCanTimerEnd (CanChannelHandle Controller, uint8 source) 
    Parameter 
    Controller [in] 
    Number of the controller on which the hardware observation takes place.  
    (only if not using “Optimize for one controller”) 
    source [in] 
    Source for the hardware observation (see chapter Hardware Loop Check / 
    Timeout Monitoring). 
    Return code 
    void 

    Functional Description 
    Service function to to end an observation timer (see chapter Hardware Loop Check / Timeout Monitoring).  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  For context information please refer to chapter „Hardware Loop Check“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanHardwareCancelByAppl“ is activated („CAN_HW_LOOP_SUPPORT_API == 
    STD_ON“). 
    Table 7-30   ApplCanTimerEnd 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    55 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    7.2.31  ApplCanInterruptDisable 
    Prototype 
    void ApplCanInterruptDisable (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller for the CAN interrupt lock. 
    Return code 
    void 

    Functional Description 
    Service function to support the disabling of CAN Interrupts by the application.  
    E.g.: the CAN driver itself should not access the common Interrupt Controller due to application  
    specific restrictions (like security level etc.). Or the application like to be informed because of  
    an CAN interrupt lock.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called by the CAN Driver within „Can_DisableControllerInterrupts()“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: "CanInterruptLock" is set to APPL or BOTH ("CAN_INTLOCK == CAN_APPL" or 
    "CAN_INTLOCK == CAN_BOTH").  
    Table 7-31   ApplCanInterruptDisable 
     
    7.2.32  ApplCanInterruptRestore 
    Prototype 
    void ApplCanInterruptRestore (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller for the CAN interrupt unlock. 
    Return code 
    void 

    Functional Description 
    Service function to support the enabling of CAN Interrupts by the application.  
    E.g.: the CAN driver itself should not access the common Interrupt Controller due to application  
    specific restrictions (like security level etc.). Or the application like to be informed because of  
    an CAN interrupt lock.  
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    56 
    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called by the CAN Driver within „Can_EnableControllerInterrupts()“. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanInterruptLock“ is set to APPL or BOTH („CAN_INTLOCK == CAN_APPL“ or 
    „CAN_INTLOCK == CAN_BOTH“). 
    Table 7-32   ApplCanInterruptRestore 
     
    7.2.33  Appl_CanOverrun 
    Prototype 
    void Appl_CanOverrun (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller for which the overrun was detected. 
    Return code 
    void 

    Functional Description 
    This function will be called when an overrun is detected for a BasicCAN mailbox.  
    Alternatively a DET call can be selected instead of (“CanOverrunNotification” is set to “DET”). 
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within CAN message reception or error detection context (Polling or Interrupt). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanOverrunNotification“ set to APPL („CAN_OVERRUN_NOTIFICATION == CAN_APPL“). 
    Table 7-33   Appl_CanOverrun 
     
    7.2.34  Appl_CanFullCanOverrun 
    Prototype 
    void Appl_CanFullCanOverrun (uint8 Controller) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    57 
    based on template version 3.2 




    Technical Reference Microsar CAN Driver 
    Parameter 
    Controller [in] 
    Number of the controller for which the overrun was detected. 
    Return code 
    void 

    Functional Description 
    This function will be called when an overrun is detected for a FullCAN mailbox.  
    Alternatively a DET call can be selected instead of (“CanOverrunNotification” is set to “DET”). 
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Called within CAN message reception or error detection context (Polling or Interrupt). 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanOverrunNotification“ set to APPL („CAN_OVERRUN_NOTIFICATION == CAN_APPL“). 
    Table 7-34   Appl_CanFullCanOverrun 
     
    7.2.35  Appl_CanCorruptMailbox 
    Prototype 
    void Appl_CanCorruptMailbox (uint8 Controller, Can_HwHandleType hwObjHandle) 
    Parameter 
    Controller [in] 
    Number of the controller for which the check failed. 
    hwObjHandle [in] 
    Hardware handle of the defect mailbox. 
    Return code 
    void 

    Functional Description 
    This function will notify the application (during “Can_InitController()”) about a defect mailbox within the CAN 
    cell.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Call within controller initialization. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    58 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    >  Availability: „CanRamCheck“ set to „MailboxNotifiation“ („CAN_RAM_CHECK == 
    CAN_NOTIFY_MAILBOX“). 
    Table 7-35   Appl_CanCorruptMailbox 
     
    7.2.36  Appl_CanRamCheckFailed 
    Prototype 
    uint8 Appl_CanRamCheckFailed (uint8 Controller) 
    Parameter 
    Controller [in] 
    Number of the controller for which the check failed 
    Return code 
    uint8 
    >  action With this „action“ the application can decide how to proceed with the 
    initialization.  
    >  CAN_DEACTIVATE_CONTROLLER – deactivate the controller  
    >  CAN_ACTIVATE_CONTROLLER – activate the controller 
    Functional Description 
    This function will notify the application (during “Can_InitController()”) about a defect CAN controller  
    due to a previous failed mailbox check.  
    Particularities and Limitations 
    Called by CAN driver. 
    Caution 
    None AUTOSAR API 
     
    Call context 
    >  Call within controller initialization. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: „CanRamCheck“ set to „Active“ or „MailboxNotifiation“ („CAN_RAM_CHECK != 
    CAN_NONE“). 
    Table 7-36   Appl_CanRamCheckFailed 
     
    7.2.37  ApplCanInitPostProcessing 
    Prototype 
    void ApplCanInitPostProcessing (CAN_HW_CHANNEL_CANTYPE_ONLY) 
    Parameter 
    Controller [in] 
    Number of the controller for which the check failed 
    Return code 
    void 
    none 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    59 
    based on template version 3.2 



    Technical Reference Microsar CAN Driver 
    Functional Description 
    Service function to overwrite the previously set initialization values for the bit timing, taken from the 
    generated data,  
    with customer specific values.  
    For your convenience the following access function is supported:  
    - CanBtpReg(controller): - the BTP register of the specified CAN channel can be set according to the 
    register definition  
    as specified in the Hardware Manufacturer Document ((see ch. 2).  
    Example: CanBtpReg(Controller) = 0x00070F70u;  
    or CanBtpReg(0) = 0x00070F70u; (when using ‘Optimize for one controller’).  
    Particularities and Limitations 
    Called by CAN driver. 
    None 
    Caution 
    None AUTOSAR API  
     
    It is the responsibility of the application to assure that the register values are consistent with the 
    release of the underlying derivative. 
    Call context 
    >  Called within controller initialization. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    >  Availability: Only available if ‚C_ENABLE_INIT_POST_PROCESS‘ is defined via a user-config file. 
    Table 7-37   ApplCanInitPostProcessing 
     
     
    7.3 
    Services used by CAN 
    In the following table services provided by other components, which are used by the CAN 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
     
    Component 
    API 
    DET 
    Det_ReportError 
    (see “Development Error Reporting”) 
    DEM 
    Dem_ReportErrorStatus 
    (see “Production Code Error Reporting”) 
    EcuM 
    EcuM_CheckWakeup 
    This function is called when Wakeup over CAN bus occur. 
    EcuM_GeneratorCompatibilityError 
    This function is called during the initialization, of the CAN Driver if 
    the Generator Version Check or the CRC Check fails. (see [5]) 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    60 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Component 
    API 
    Application (optional non AUTOSAR)  Appl_GenericPrecopy 
    Appl_GenericConfirmation 
    Appl_GenericPreTransmit 
    ApplCanTimerStart/Loop/End 
    Appl_CanRamCheckFailed, Appl_CanCorruptMailbox 
    ApplCanInterruptDisable/Restore 
    Appl_CanOverrun, 
    For detailed description see Chapter 7.2 
    CANIF 
    CanIf_CancelTxNotification (non AUTOSAR) 
    A special Software cancellation callback only used within Vector 
    CAN driver CAN Interface bundle. 
    CanIf_TxConfirmation 
    Notification for a successful transmission. (see [4]) 
    CanIf_CancelTxConfirmation 
    Notification for a successful Tx cancellation. (see [4]) 
    CanIf_RxIndication 
    Notification for a message reception. (see [4]) 
    CanIf_ControllerBusOff 
    Bus Off notification function. (see [4]) 
    CanIf_ControllerModeIndication 
    MICROSAR4x only: Notification for mode sucessfully changed. 
    Os (MICROSAR4x) 
    OS_TICKS2MS_<counterShortName>() 
    Os macro to get timebased ticks from counter. 
    GetElapsedValue 
    Get elapsed tick count. 
    GetCounterValue 
    Get tick count start. 
    Table 7-38   Services used by the CAN 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    61 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    8  Configuration 
    For CAN driver the attributes can be configured with configuration Tool “CFG5” 
    The CAN driver supports pre-compile, link-time and post-build configuration. 
    For  post-build  systems,  re-flashing  the  generated  data  can  change  some  configuration 
    settings. 
    For post-build and link-time configurations pre-compile settings are configured at compile 
    time and therefore unchangeable at link or post-build time. 
    The  following  parameters  are  set  by  CFG5  configuration  (see  Chapter  “DaVinci 
    Configurator”). 
    8.1 
    Pre-Compile Parameters 
    Some settings have to be available before compilation: 
    >  MCAN Core Release 
    #define C_ENABLE_MPC5700_MCAN_MAJOR_CREL           1/2/3/… 
    >  MCAN Step of Core Release 
    #define C_ENABLE_MPC5700_MCAN_MAJOR_CREL_STEP    0/1/2/3/… 
    >  MCAN Sub Step of Core Release 
    #define C_ENABLE_MPC5700_MCAN_MAJOR_CREL_SSTEP  0/1/2/3/… 
    >  Non ISO Operation 
    #define CAN_FD_NISO     0 = ISO 11898-1:2015 / 1 = Bosch CAN FD Spec. V1.0 
    >  >  Version API (Can_GetVersionInfo() activation) 
    #define CAN_VERSION_INFO_API   STD_ON/STD_OFF 
    >  DET (development error detection) 
    #define CAN_DEV_ERROR_DETECT   STD_ON/STD_OFF 
    >  Hardware Loop Check (timeout monitoring) 
    #define CAN_HARDWARE_CANCELLATION   STD_ON/STD_OFF 
    >  Polling modes: Tx confirmation, Reception, Wakeup, BusOff 
    #define CAN_TX_PROCESSING       CAN_INTERRUPT/ CAN_POLLING 
    #define CAN_RX_PROCESSING       CAN_INTERRUPT/ CAN_POLLING 
    #define CAN_BUSOFF_PROCESSING   CAN_INTERRUPT/ CAN_POLLING 
    #define CAN_WAKEUP_PROCESSING   CAN_INTERRUPT/ CAN_POLLING 
    #define CAN_INDIVIDUAL_PROCESSING   STD_ON/STD_OFF 
    >  Multiplexed Tx (external PIA – by usage of multiple Tx mailboxes) 
    #define CAN_MULTIPLEXED_TRANSMISSION   STD_ON/STD_OFF 
    >  Configuration Variant (define the configuration type when using post build variant) 
    #define CAN_ENABLE_SELECTABLE_PB 
    >  Use Generic Precopy Function (None AUTOSAR feature) 
    #define CAN_GENERIC_PRECOPY   STD_ON/STD_OFF 
    >  Use Generic Confirmation Function (None AUTOSAR feature) 
    #define CAN_GENERIC_CONFIRMATION   STD_ON/STD_OFF 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    62 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    >  Use Rx Queue Function (None AUTOSAR feature) 
    #define CAN_RX_QUEUE   STD_ON/STD_OFF 
    >  Used ID type (standard/extended or mixed ID format) 
    #define CAN_EXTENDED_ID   STD_ON/STD_OFF 
    #define CAN_MIXED_ID      STD_ON/STD_OFF 
    >  Usage of Rx and Tx Full and BasicCAN objects (deactivate only when not using and to save ROM and 
    runtime consumption) 
    #define CAN_RX_FULLCAN_OBJECTS    STD_ON/STD_OFF 
    #define CAN_TX_FULLCAN_OBJECTS     STD_ON/STD_OFF 
    #define CAN_RX_BASICCAN_OBJECTS   STD_ON/STD_OFF 
    >  Use Multiple BasicCAN objects 
    #define CAN_MULTIPLE_BASICCAN    STD_ON/STD_OFF 
    >  Optimizations 
    #define CAN_ONE_CONTROLLER_OPTIMIZATION    STD_ON/STD_OFF 
    #define CAN_DYNAMIC_FULLCAN_ID     STD_ON/STD_OFF 
    >  Usage of nested CAN interrupts 
    #define CAN_NESTED_INTERRUPTS     STD_ON/STD_OFF 
    >  Use Multiple ECU configurations 
    #define CAN_MULTI_ECU_CONFIG     STD_ON/STD_OFF 
    >  Use RAM Check (verify mailbox buffers) 
    #define CAN_RAM_CHECK          CAN_NONE/CAN_NOTIFY_ISSUE/CAN_NOTIFY_MAILBOX 
    >  Use Overrun detection 
    #define CAN_OVERRUN_NOTIFICATION       CAN_NONE/ CAN_DET/ CAN_APPL 
    >  Select MicroSar version 
    #define CAN_MICROSAR_VERSION         CAN_MSR30/ CAN_MSR40/ CAN_MSR403 
    >  Tx Cancellation of Identical IDs 
    #define CAN_IDENTICAL_ID_CANCELLATION     STD_ON/STD_OFF 
    8.2 
    Link-Time Parameters 
    The library version of the CAN driver uses the following generated settings: 
    >  Maximum amount of used controllers and Tx mailboxes (has to be set for post-build 
    variants at link-time) 
    >  Rx Queue size 
    >  Controller mapping (mapping of logical channel to hardware node). 
    >  CAN hardware base address. 
    8.3 
    Post-Build Parameters 
    Following settings are post-build data that can be changed for re-flashing: 
    >  Amount and usage of FullCAN Rx and Tx mailboxes 
    >  Used database (message information like ID, DLC) 
    >  Filters for BasicCAN Rx mailbox 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    63 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    >  Baud-rate settings 
    >  Module Start Address (only for post-build systems: The memory location for re-
    flashed data has to be defined) 
    >  Configuration ID (only for post-build systems: This number is used to identify the 
    post-build data 
    >  CAN hardware Fifo depth  
    >  CAN hardware clock and bit timing settings 
    8.4 
    Configuration with da DaVinci Configurator 
    See Online help within DaVinci Configurator and BSWMD file for parameter settings. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    64 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    9  AUTOSAR Standard Compliance 
    9.1 
    Limitations / Restrictions 
    Category 
    Description 
    Version 
    Functional  No multiple AUTOSAR CAN driver allowed in the system 
    3.0.6  
    Functional  No support for L-PDU callout (AUTOSAR 3.2.1), but support ‘Generic  3.2.1 
    Precopy’ instead 
    Functional  No support for multiple read and write period configuration 
    3.2.1 
    API 
    “Symbolic Name Values” may change their values after precompile 
    3.0.6 
    phase so do not use it for Link Time or Post Build variants. 
    It’s recommended that higher layer generator use Values (ObjectIDs) 
    from EcuC file. Vector CAN Interface does so. 
     
    For the acceptance filtering a maximum of 64 filters per CAN channel   
    is supported in case of GENy is used as Generation Tool. 
     
    9.2 
    Hardware Limitations  
    8.2.1  Tx side  
    MCAN Tx Event FIFO is not supported.  
    MCAN Tx Queue is not supported.  
    All available buffers per CAN (32) are configured as dedicated Tx buffers.  
    8.2.2  Rx side  
    SREQ00014271 “message reception shall use overwrite mode” is not fulfilled for FullCAN  
    messages due to hardware behaviour.  
    8.2.3  Used resources  
    Please  note  that  the  theoretical  possible  maximum  configuration  for  the  RH850P1xC  
    derivative  requires  more  RAM  space  in  the  Shared  Message  RAM  than  there  is   
    actual available.  
    For each CAN channel the following elements can be configured. If the required size for a  
    distinct  configuration  exceeds  the  maximum  available  RAM  space  in  hardware  then  
    the configuration tool issues an error during generation time and you are requested totailor  
    down your configuration until it fits into the available Shared Message RAM.   
    Resource usage for one CAN channel: 
    Area 
    Address range 
    Max  size  
    Max.  number  of  
    (byte) 
    elements 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    65 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    Std Filter 
    0x0000 – 0x01FF 
    512   
    128 
    Ext Filter 
    0x0200 – 0x03FF 
    512 
    64 
    Rx FIFO 0 
    0x0400 – 0x07FF 
    1024 
    64 
    Rx FIFO 1 
    0x0800 – 0x0BFF 
    1024   
    64 
    Rx Buffer 
    0x0C00 – 0x0FFF 
    1024   
    64 
    TxEvt FIFO 
    0x1000 – 0x10FF 
    256 
    32 
    Tx buffer   
    0x1100 – 0x12FF 
    512 
    32 
                                       0x1300                       4864 bytes total 
     
    Thus a maximum of “4864 * NumberOfChannels” can theoretically be configured but less 
    RAM is physically available. You are requested to reduce the areas according to your 
    needs.  
    Please note that the “Tx Buffer region” and the “TTCAN region” (for channels with TTCAN  
    support) for each channel is restricted to a dedicated address.   
    This is not consistent for all hardware releases, please refer to your hardware  
    manufacturer documentation (see ch. 2 “Hardware Overview”). 
     
    9.2.1 
    Initialization of the CAN Message RAM  
    The internal SRAM features Error Correcting Code (ECC). Because these ECC bits can  
    contain random data after the device is turned on, all SRAM locations must be initialized  
    before being read by application code. Initialization is done by executing 64-bit writes to  
    the  entire  SRAM  block.  The  value  written  does  not  matter  at  this  point,  so  the   
    Store Multiple Word instruction will be used to write 16 general-purpose registers with  
    each loop iteration.  
     
    By default the CAN driver tries to accomplish this initialization. Due to the need of using 
    assembler  code  notation  it  might  happen  that  specific  options  for  a  distinct  compiler 
    (assembler) are not appropriate. If so, you can feel free to disable the CAN driver internal 
    initialization (see below on how to) and use your own initialization instead of.   
     
    To  disable  the  CAN  driver  internal  initialization  use  a  “User  Config  File”  containing  
    the following preprocessor definition:  
     
    #define CAN_ECC_INIT      STD_OFF  
     
    Put your initialization into execution just before calling Can_Init(). The MCAN clock must  
    be available at this point of time.  
     
    Please  refer  to  your  hardware  manufacturer  documentation  (see  ch. 2 “Hardware  
    Overview”) for the address layout. 
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    66 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
     
     
     
     
    9.3 
    Vector Extensions 
    Refer to Chapter 4.1 “Features” listed under “AUTOSAR extensions” 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    67 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    10  Glossary and Abbreviations 
    10.1  Glossary 
     
    Term 
    Description 
    GENy 
    Generation tool for CANbedded and MICROSAR components 
    High End (license) 
    Product license to support an extended feature set (see Feature table) 
    Table 10-1   Glossary 
     
    10.2  Abbreviations 
     
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR solution) 
    3,3x = AUTOSAR version 3 
    401 = AUTOSAR version 4.0.1 
    403 = AUTOSAR version 4.0.3 
    4x = AUTOSAR version 4.x.x 
    SWS 
    Software Specification 
    Common CAN 
    Connect two physical peripheral channels to one CAN bus (to increase 
    the amount of FullCAN) 
    Hardware Loop 
    Timeout monitoring for possible endless loops. 
    Check 
    Table 10-2   Abbreviations 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    68 
    based on template version 3.2 


    Technical Reference Microsar CAN Driver 
    11  Contact 
    Visit our website for more information on 
     
    >   News 
    >   Products 
    >   Demo software 
    >   Support 
    >   Training data 
    >   Addresses 
     
    www.vector.com 
     
    © 2016 Vector Informatik GmbH 
    Version 1.02.00 
    69 
    based on template version 3.2 

    Document Outline


    1.3.60 - TechnicalReference_Asr_MemoryMapping

    MICROSAR Memory Mapping

    1.3.62 - TechnicalReference_Asr_MemoryMappings


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Memory Mapping 
    Technical Reference 
     
      
    Version 1.2.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Eugen Stripling 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR Memory Mapping 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Eugen Stripling 
    2013-04-12 
    1.00.00 
    Creation - ESCAN00064655 
    Eugen Stripling 
    2013-05-29 
    1.00.01 
    Some typos corrected 
    Eugen Stripling 
    2016-09-27 
    1.01.00 
    FEATC-317 / FEAT-2002: 64-bit memory 
    section keywords added 
    Eugen Stripling 
    2017-01-16 
    1.02.00 
    ESCAN00093572: 2.1.4 chapter added 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_MemoryMapping.pdf 
    1.4.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_CompilerAbstraction.pdf 
    3.2.0 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    Contents 
    1 
    Introduction ........................................................................................................................5 
    2 
    Functional Description .....................................................................................................6 
    2.1 

    Memory section keywords .....................................................................................6 
    2.1.1 
    Declaration of code and data segments in AUTOSAR .........................7 
    2.1.2 
    Mapping of code and data segments to a dedicated memory area .....7 
    2.1.3 
    Example: Mapping of data to a post-build memory section ..................8 
    2.1.4 
    Usage of AUTOSAR 4.2.2 BSW module ............................................. 11 
    3 
    Appendix ..........................................................................................................................12 
    3.1 

    Sub-keywords used in the memory section and compiler specific keywords .....12 
    3.2 
    Memory section keywords ...................................................................................12 
    3.2.1 
    Memory section keywords for code .....................................................13 
    3.2.2 
    Memory section keywords for constants .............................................13 
    3.2.3 
    Memory section keywords for variables ..............................................14 
    3.3 
    Compiler specific keywords .................................................................................17 
    4 
    Glossary and Abbreviations ...........................................................................................19 
    4.1 

    Glossary ...............................................................................................................19 
    4.2 
    Abbreviations ........................................................................................................19 
    5 
    Contact .............................................................................................................................20 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    Illustrations 
    Figure 2-1 
     Files MemMap.h and Compiler_Cfg.h ...........................................................6 
     
    Tables 
    Table 3-1  
    Explanation of sub-keywords used in the memory section and compiler 
    specific keywords ..........................................................................................12 

    Table 3-2  
    Memory sections for code ............................................................................13 
    Table 3-3  
    Memory sections for constants .....................................................................13 
    Table 3-4  
    Change of memory section keywords for constants in ASR 4.0.3 ...............14 
    Table 3-5  
    Memory sections for variables ......................................................................15 
    Table 3-6 
    Change of memory section keywords for variables in ASR 4.0.3 ................17 
    Table 3-7  
    Compiler specific keywords and the related memory sections they used 
    for ..................................................................................................................18 

    Table 4-1  
    Glossary ........................................................................................................19 
    Table 4-2  
    Abbreviations ................................................................................................19 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    1  Introduction 
    This document gives an overview about the functionality of memory mapping as specified 
    by AUTOSAR according to the Vector specific implementation (MICROSAR). 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    2  Functional Description 
    In the following chapters the following two expressions are used: 
      memory section keyword 
    and  
      memory area
    A  memory  section  keyword  describes  a  memory  section  according  to  AUTOSAR 
    symbolically.  All  available  corresponding  keywords  are  described  in  chapter  3.2.  By 
    memory area a memory section in hardware at all is meant. 
    By using of expression build-toolchain the functionality covered by a compiler, linker and  
    locator is meant. 
    2.1 
    Memory section keywords 
    The  keywords  of  memory  sections  of  all  BSW-modules  are  collected  and  located  in  file 
    MemMap.h. 
    The  file  Compiler_Cfg.h  contains  additional  compiler  specific  keywords.  These 
    keywords are used to describe the memory location of variables, constants and pointers. 
    In  case  of  pointers  additional  keywords  are  defined  to  describe  the  memory  location  the 
    pointer points to. 
    Both files are provided as templates and are named _MemMap.h and _Compiler_Cfg.h 
    initially. Before using both files have to be renamed to  MemMap.h and Compiler_Cfg.h 
    respectively. 
    class Feature
    contains #pragma 
    contains compiler 
    commands for memory 
    specific keywords for 
    allocation
    description of location 
    of variables, costants 
    and pointers
    MemMap.h
    Compiler_Cfg.h
     
    Figure 2-1   Files MemMap.h and Compiler_Cfg.h 
     
    Each BSW-module has its own set of compiler specific and memory section keywords with 
    the pre-fix <MSN>. By default all the memory section keywords are mapped to the same 
    default memory section keyword defined in MemMap.h. If required the default mapping can 
    be modified by the BSW integrator. Detailed information concerning the provided memory 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 



    Technical Reference MICROSAR Memory Mapping 
    section  keywords  can  be  found  in  the  chapter  3.2.  For  detailed  information  about  the 
    compiler specific keywords please see the chapter 3.3. 
     
    2.1.1 
    Declaration of code and data segments in AUTOSAR 
    The declaration of all kinds of variables including constants, pointers and the code itself is 
    performed in the following way. 
    1.  Opening of the memory section: The memory section where e.g. a variable shall 
    be stored in is opened by defining of the corresponding memory section keyword 
    (s. chapter 3.2).  
    2.  Including of file MemMap.h : In this step the previously defined BSW-module 
    specific memory section keyword is redefined to the default keyword of the 
    corresponding memory section. Additionally if specified the corresponding 
    #pragma-command is activated. This command tells the build-toolchain to put the 
    following data or code segments to intended memory area. 
    3.  Declaration of data and code segments: In this step any kind of data or code 
    itself is declared. 
    4.  Closing of the memory section: In the last step the previously opened memory 
    section is closed by defining of the STOP-keyword of the corresponding memory 
    section keyword and by including of file MemMap.h once again. By this step the 
    build-toolchain shall be told to switch back to the default memory section. 
    The following example shall clarify the mentioned steps. 
     
     
    Example 
    … 
      <MSN>_START_SEC_CONST_8BIT 
    #include “MemMap.h” 
     
    CONST(uint8, <MSN>_CONST) <Msn>_Constant = 0xFAu; 
     
    <MSN>_STOP_SEC_CONST_8BIT 
    #include “MemMap.h 
    … 
     
     
    2.1.2 
    Mapping of code and data segments to a dedicated memory area 
    In order to map a code segment or a data segment to a dedicated memory area you need 
    to follow the following four steps: 
    1.  Selection of memory section keywords: In this step the keywords of memory 
    sections which are intended to be mapped to a dedicated memory area have to be 
    picked out. All available memory section keywords are mentioned in chapter 3.2. 
    2.  Adaption of the linker / locator command file: In this step the memory areas which 
    are intended to be used for certain segments of code or data have to be defined in the 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 




    Technical Reference MICROSAR Memory Mapping 
    linker / locator command file. By this way the defined memory areas are labeled with 
    unique keywords. These keywords in combination with a #pragma-command can be 
    used later to tell the build-toolchain to put code or data segments to a specific memory 
    area. 
    3.  Adding of #pragma-commands to selected memory section keywords: In this 
    step #pragma-commands together with memory area keywords defined in step 2 are 
    added to the corresponding memory section keywords picked out in step 1. The 
    adaptions are performed in file MemMap.h directly. 
    4.  Adaption of compiler specific keywords: This step is optional. The applying or not 
    applying of this step depends on the used compiler and the memory model of used 
    hardware. If required, in this step the compiler specific keywords which are required for 
    correct access of code and data have to be adapted according to the corresponding 
    memory mapping (steps: 1 till 3).  For more information see chapter 3.3. 
     
     
    Caution 
    In case of using a #pragma-command at any START_SEC-keyword ensure that 
      at the corresponding STOP_SEC-keyword the #pragma-command is defined 
    which switches back to the default memory section. Otherwise the once opened 
    memory section won’t be closed and all data segments which follow the 
    #pragma-command will be mapped to the still opened memory section 
    unintentionally.   
     
     
    Note 
    This depends on the used compiler e.g. a DiabData-compiler does not 
      need any #pragma-command at the STOP_SEC-keyword to switch  
    back to the default memory section. Therefrom please check the  
    technical reference of used compiler. 
     
     
     
     
     
    For an example please see the following chapter. 
     
    2.1.3 
    Example: Mapping of data to a post-build memory section 
    There are three post-build sections: two for ROM and one for RAM. The related keywords 
    are: 
      START_SEC_PBCFG_GLOBALROOT and START_SEC_CONST_PBCFG (ROM) 
      START_SEC_VAR_PBCFG (RAM) 
    The corresponding STOP-sections are 
      STOP_SEC_CONST (ROM) 
      STOP_SEC_VAR (RAM) 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    At the position of mentioned keywords in file MemMap.h the appropriate compiler specific 
    #pragma-commands have to be added in order to tell the compiler to put the related data 
    segments to the intended memory area. In case of platform V850 and GHS compiler see 
    the following example. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.6.0 



    Technical Reference MICROSAR Memory Mapping 
     
     
     
    Example 
    The following example applies on platform V850 and GHS-compiler. 
     
     
    1.  Labels for memory areas which are intended to be used are defined in the 
    linker / locator command file: 
    … 
       $(ECHO) "  .pb_ecum_global_root 0x001C0000  :>.     /* Start post-build ROM area  */             " >> $@; \ 
       $(ECHO) "  .pb_tscpb_data align(4)                      :>.     /* post-build ROM area */                       " >> $@; \ 
       $(ECHO) "  .pb_ram               0xfedfa000             :>.     /*  post-build RAM area */                       " >> $@; \ 
    … 
    2.  The defined labels can now be used for the #pragma-commands at the 
    corresponding memory section keywords in file MemMap.h: 
    …  
    #ifdef START_SEC_PBCFG_GLOBALROOT               
        #define CONST_SEC_OPEN 
    /* Enter here a #pragma command for opening the specified section */ 
    #pragma ghs section rodata=".pb_ecum_global_root" 
        #undef START_SEC_PBCFG_GLOBALROOT 
        #undef MEMMAP_ERROR 
    #endif 
     
     
    #ifdef START_SEC_CONST_PBCFG                    
        #define CONST_SEC_OPEN 
    /* Enter here a #pragma command for opening the specified section */ 
    #pragma ghs section rodata=".pb_tscpb_data" 
        #undef START_SEC_CONST_PBCFG 
        #undef MEMMAP_ERROR 
    #endif 
     
    … 
    #ifdef STOP_SEC_CONST 
        #undef CONST_SEC_OPEN 
    /* Enter here a #pragma command for closing the specified section */ 
    /* This should switch back to the default section */ 
    #pragma ghs section rodata=default 
        #undef STOP_SEC_CONST 
        #undef MEMMAP_ERROR 
    #endif 
    … 
    #ifdef START_SEC_VAR_PBCFG                      
        #define VAR_SEC_OPEN 
    /* Enter here a #pragma command for opening the specified section */ 
    #pragma ghs section bss=".pb_ram" 
        #undef START_SEC_VAR_PBCFG 
        #undef MEMMAP_ERROR 
    #endif 
    … 
    #ifdef STOP_SEC_VAR 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    10 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
        #undef VAR_SEC_OPEN 
    /* Enter here a #pragma command for closing the specified section */ 
    /* This should switch back to the default section */ 
    #pragma ghs section bss=default 
        #undef STOP_SEC_VAR 
        #undef MEMMAP_ERROR 
    #endif 
    … 
     
     
     
     
    2.1.4 
    Usage of AUTOSAR 4.2.2 BSW module  
    The  Vector  specific  implementation  of  memory  mapping  (MICROSAR)  complies  with 
    AUTOSAR version 4.0.3. Due to fact that the AUTOSAR version 4.2.2 of memory mapping 
    defines  that  each  BSW  module  must  include  an  own  memory  mapping  header  file 
    (SWS_MemMap_00032)  some  manual  adaptions  are  required  for  BSW  modules  which 
    are  implemented  according  to  AUTOSAR  4.2.2.  The  required  adaptions  are  described 
    below. 
     
    1)  Rename the BSW module specific memory mapping header file e.g. 
    <Mip>_MemMap.h to _<Mip>_MemMap.h 
    2)  Include the renamed header file (see step 1)) within the provided file MemMap.h 
    directly after the comment /* Package Merger: Start Section 
    MemMapModuleList */ e.g: 
    /* Package Merger: Start Section MemMapModuleList */ 
    #include “_<Mip>_MemMap.h” 
    3)  Create a new header file <Mip>_MemMap.h just with content: 
    #include “MemMap.h” 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    11 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    3  Appendix 
    3.1 
    Sub-keywords used in the memory section and compiler specific keywords 
    The memory section and compiler specific keywords  mentioned in the following chapters 
    3.2  and  3.3  generally  have  self-explanatory  names.  Despite  this  fact  the  following  table 
    explains the sub-keywords which are found within. 
     
    Sub-keyword 
    Kind of memory section which is meant 
    CODE 
    Memory section for code (ROM) 
    CONST 
    Memory section for constant data (ROM) 
    VAR 
    Memory section for variables (RAM) 
    FAST 
    Memory section with fast read and write accesses (ROM / 
    RAM) 
    ISR 
    Memory section for interrupt service routines (generally ROM) 
    8BIT (since ASR 4.0.3: 8) 
    Memory section for one byte data (ROM / RAM) 
    16BIT (since ASR 4.0.3: 16) 
    Memory section for  two bytes data (ROM / RAM) 
    32BIT (since ASR 4.0.3: 32) 
    Memory section for four bytes data (ROM / RAM) 
    64BIT (since ASR 4.0.3: 64) 
    Memory section for eight bytes data (ROM / RAM) 
    UNSPECIFIED 
    Memory section for data (ROM / RAM) which type is variable, 
    depends on configuration and is determined only at compile 
    time (e.g. enumeration, boolean, structure) 
    PBCFG_GLOBALROOT 
    The top of the memory section for post-build ROM data. Only 
    the table EcuM_GlobalConfigRoot shall be placed into this 
    section.  
    (CONST_)PBCFG 
    Memory section for post-build ROM data.  
    NOTE: The data which resides in this section may change at 
    post-build time. 
    INIT 
    Memory section for pre-initialized variables (RAM) e.g. by the 
    start-up code  
    NOINIT (since ASR 4.0.3: NO_INIT) 
    Memory section for not pre-initialized variables (RAM) 
    ZERO_INIT (since ASR 4.0.3: CLEARED)  Memory section for pre-initialized variables with zeros 
    VAR_PBCFG 
    Memory section for post-build RAM variables 
    NOTE: The allocation of this memory area can change at 
    post-build time. 
    Table 3-1   Explanation of sub-keywords used in the memory section and compiler specific keywords 
    3.2 
    Memory section keywords 
    The  following  tables  listed  below  give  an  overview  about  pre-defined  memory  section 
    keywords used by the BSW-modules. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    12 
    based on template version 5.6.0 




    Technical Reference MICROSAR Memory Mapping 
     
     
    Note 
    The memory section keywords listed below are the default ones. Apart from 
      these ones if required each BSW-module may define further own ones. Please 
    see file MemMap.h included in your delivery. 
     
     
    3.2.1 
    Memory section keywords for code 
     
    BSW specific memory section keyword 
    Default memory section keyword 
    <MSN>_START_SEC_CODE 
    START_SEC_CODE 
    <MSN>_START_SEC_CODE_FAST 
    START_SEC_CODE_FAST 
    <MSN>_START_SEC_CODE_ISR 
    START_SEC_CODE_ISR 
    Table 3-2   Memory sections for code 
     
     
     
    Note 
    For  each  START-section  keyword  a  corresponding  STOP-section  keyword  is 
      defined  e.g.  <MSN>_STOP_SEC_CODE.  By  default  all  these  STOP-section 
    keywords  are  mapped  to  the  same  keyword  STOP_SEC_CODE.  Hence  use  a 
    #pragma command to switch back to the default section for code. 
     
     
     
     
    3.2.2 
    Memory section keywords for constants 
     
    BSW specific memory section keyword 
    Default memory section keyword 
    <MSN>_START_SEC_CONST_8BIT 
    START_SEC_CONST_8BIT 
    <MSN>_START_SEC_CONST_16BIT 
    START_SEC_CONST_16BIT 
    <MSN>_START_SEC_CONST_32BIT 
    START_SEC_CONST_32BIT 
    <MSN>_START_SEC_CONST_64BIT 
    START_SEC_CONST_64BIT 
    <MSN>_START_SEC_CONST_UNSPECIFIED 
    START_SEC_CONST_UNSPECIFIED 
    <MSN>_START_SEC_FAST_CONST_8BIT 
    START_SEC_FAST_CONST_8BIT 
    <MSN>_START_SEC_FAST_CONST_16BIT 
    START_SEC_FAST_CONST_16BIT 
    <MSN>_START_SEC_FAST_CONST_32BIT 
    START_SEC_FAST_CONST_32BIT 
    <MSN>_START_SEC_FAST_CONST_64BIT 
    START_SEC_FAST_CONST_64BIT 
    <MSN>_START_SEC_FAST_CONST_UNSPECIFIED 
    START_SEC_FAST_CONST_UNSPECIFIED 
    <MSN>_START_SEC_PBCFG_GLOBALROOT 
    START_SEC_PBCFG_GLOBALROOT 
    <MSN>_START_SEC_PBCFG 
    START_SEC_CONST_PBCFG 
    Table 3-3   Memory sections for constants 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    13 
    based on template version 5.6.0 




    Technical Reference MICROSAR Memory Mapping 
     
     
     
    Note 
    For  each  START-section  keyword  a  corresponding  STOP-section  keyword  is 
      defined  e.g.  <MSN>_STOP_SEC_CONST_32BIT.  By  default  all  these 
    STOP-section keywords are mapped  to the same keyword  STOP_SEC_CONST. 
    Hence  use  a  #pragma  command  to  switch  back  to  the  default  section  for 
    constants. 
     
     
     
     
    The  mentioned  BSW-module  specific  keywords  conform  to AUTOSAR  releases  3.x.x  till 
    4.0.1.  Since  release  4.0.3  the  naming  convention  of  some  keywords  has  changed.  The 
    following table shows the related changes. 
     
    Keyword in AUTOSAR 3.x.x till 4.0.1 
    Keyword in AUTOSAR 4.0.3 
    <MSN>_START_SEC_CONST_8BIT 
    <MSN>_START_SEC_CONST_8 
    <MSN>_START_SEC_CONST_16BIT 
    <MSN>_START_SEC_CONST_16 
    <MSN>_START_SEC_CONST_32BIT 
    <MSN>_START_SEC_CONST_32 
    <MSN>_START_SEC_CONST_64BIT 
    <MSN>_START_SEC_CONST_64 
    <MSN>_START_SEC_FAST_CONST_8BIT 
    <MSN>_START_SEC_FAST_CONST_8 
    <MSN>_START_SEC_FAST_CONST_16BIT 
    <MSN>_START_SEC_FAST_CONST_16 
    <MSN>_START_SEC_FAST_CONST_32BIT 
    <MSN>_START_SEC_FAST_CONST_32 
    <MSN>_START_SEC_FAST_CONST_64BIT 
    <MSN>_START_SEC_FAST_CONST_64 
    Table 3-4   Change of memory section keywords for constants in ASR 4.0.3 
     
     
    Note 
    Although names of some keywords have changed most of ASR 
      4.0.3-BSW-modules provided by Vector Informatik GmbH still use the old 
    naming convention of memory section keywords. The BSW-module MemMap 
    provided by Vector Informatik GmbH accepts both naming conventions. 
     
     
     
    3.2.3 
    Memory section keywords for variables 
     
    BSW specific memory section keyword 
    Default memory section keyword 
    <MSN>_START_SEC_VAR_INIT_8BIT 
    START_SEC_VAR_INIT_8BIT 
    <MSN>_START_SEC_VAR_INIT_16BIT 
    START_SEC_VAR_INIT_16BIT 
    <MSN>_START_SEC_VAR_INIT_32BIT 
    START_SEC_VAR_INIT_32BIT 
    <MSN>_START_SEC_VAR_INIT_64BIT 
    START_SEC_VAR_INIT_64BIT 
    <MSN>_START_SEC_VAR_INIT_UNSPECIFIED 
    START_SEC_VAR_INIT_UNSPECIFIED 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    14 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    BSW specific memory section keyword 
    Default memory section keyword 
    <MSN>_START_SEC_VAR_NOINIT_8BIT 
    START_SEC_VAR_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_NOINIT_16BIT 
    START_SEC_VAR_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_NOINIT_32BIT 
    START_SEC_VAR_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_NOINIT_64BIT 
    START_SEC_VAR_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_NOINIT_UNSPECIFIED 
    START_SEC_VAR_NOINIT_UNSPECIFIED 
    <MSN>_START_SEC_VAR_PBCFG 
    START_SEC_VAR_PBCFG 
    <MSN>_START_SEC_VAR_ZERO_INIT_8BIT 
    START_SEC_VAR_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_16BIT 
    START_SEC_VAR_ZERO_INIT_16BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_32BIT 
    START_SEC_VAR_ZERO_INIT_32BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_64BIT 
    START_SEC_VAR_ZERO_INIT_64BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_UNSPECIFIED  START_SEC_VAR_ZERO_INIT_UNSPECIFIED 
    <MSN>_START_SEC_VAR_FAST_INIT_8BIT 
    START_SEC_VAR_FAST_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_16BIT 
    START_SEC_VAR_FAST_INIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_32BIT 
    START_SEC_VAR_FAST_INIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_64BIT 
    START_SEC_VAR_FAST_INIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_UNSPECIFIED  START_SEC_VAR_FAST_INIT_UNSPECIFIED 
    <MSN>_START_SEC_VAR_FAST_NOINIT_8BIT 
    START_SEC_VAR_FAST_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_16BIT 
    START_SEC_VAR_FAST_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_32BIT 
    START_SEC_VAR_FAST_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_64BIT 
    START_SEC_VAR_FAST_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_UNSPECIFI START_SEC_VAR_FAST_NOINIT_UNSPECIFIE
    ED 

    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_8BIT 
    START_SEC_VAR_FAST_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_16BIT  START_SEC_VAR_FAST_ZERO_INIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_32BIT  START_SEC_VAR_FAST_ZERO_INIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_64BIT  START_SEC_VAR_FAST_ZERO_INIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_UNSPEC START_SEC_VAR_FAST_ZERO_INIT_UNSPECI
    IFIED 
    FIED 
    Table 3-5   Memory sections for variables 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    15 
    based on template version 5.6.0 



    Technical Reference MICROSAR Memory Mapping 
     
     
     
    Note 
    For  each  START-section  keyword  a  corresponding  STOP-section  keyword  is 
      defined  e.g.  <MSN>_STOP_SEC_VAR_INIT_32BIT.  By  default  all  these 
    STOP-section  keywords  are  mapped  to  the  same  keyword  STOP_SEC_VAR. 
    Hence  use  a  #pragma  command  to  switch  back  to  the  default  section  for 
    variables. 
     
     
     
     
    The  mentioned  BSW-module  specific  keywords  conform  to AUTOSAR  releases  3.x.x  till 
    4.0.1.  Since  release  4.0.3  the  naming  convention  of  some  keywords  has  changed.  The 
    following table shows the related changes. 
     
    Keyword in AUTOSAR 3.x.x till 4.0.1 
    Keyword in AUTOSAR 4.0.3 
    <MSN>_START_SEC_VAR_INIT_8BIT 
    <MSN>_START_SEC_VAR_INIT_8 
    <MSN>_START_SEC_VAR_INIT_16BIT 
    <MSN>_START_SEC_VAR_INIT_16 
    <MSN>_START_SEC_VAR_INIT_32BIT 
    <MSN>_START_SEC_VAR_INIT_32 
    <MSN>_START_SEC_VAR_INIT_64BIT 
    <MSN>_START_SEC_VAR_INIT_64 
    <MSN>_START_SEC_VAR_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_NO_INIT_8 
    <MSN>_START_SEC_VAR_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_NO_INIT_16 
    <MSN>_START_SEC_VAR_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_NO_INIT_32 
    <MSN>_START_SEC_VAR_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_NO_INIT_64 
    <MSN>_START_SEC_VAR_NOINIT_UNSPECIFIED 
    <MSN>_START_SEC_VAR_NO_INIT_UNSPECIF
    IED 
    <MSN>_START_SEC_VAR_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_CLEARED_8 
    <MSN>_START_SEC_VAR_ZERO_INIT_16BIT 
    <MSN>_START_SEC_VAR_CLEARED_16 
    <MSN>_START_SEC_VAR_ZERO_INIT_32BIT 
    <MSN>_START_SEC_VAR_CLEARED_32 
    <MSN>_START_SEC_VAR_ZERO_INIT_64BIT 
    <MSN>_START_SEC_VAR_CLEARED_64 
    <MSN>_START_SEC_VAR_ZERO_INIT_UNSPECIFIED  <MSN>_START_SEC_VAR_CLEARED_UNSPECIF
    IED 
    <MSN>_START_SEC_VAR_FAST_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_8 
    <MSN>_START_SEC_VAR_FAST_INIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_16 
    <MSN>_START_SEC_VAR_FAST_INIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_32 
    <MSN>_START_SEC_VAR_FAST_INIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_64 
    <MSN>_START_SEC_VAR_FAST_INIT_UNSPECIFIED  <MSN>_START_SEC_VAR_FAST_INIT_UNSPEC
    IFIED 
    <MSN>_START_SEC_VAR_FAST_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_NO_INIT_8 
    <MSN>_START_SEC_VAR_FAST_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_NO_INIT_16 
    <MSN>_START_SEC_VAR_FAST_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_NO_INIT_32 
    <MSN>_START_SEC_VAR_FAST_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_NO_INIT_64 
    <MSN>_START_SEC_VAR_FAST_NOINIT_UNSPECIFI <MSN>_START_SEC_VAR_FAST_NO_INIT_UNS
    ED 
    PECIFIED 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    16 
    based on template version 5.6.0 




    Technical Reference MICROSAR Memory Mapping 
    Keyword in AUTOSAR 3.x.x till 4.0.1 
    Keyword in AUTOSAR 4.0.3 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_ CLEARED_8 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_16BIT  <MSN>_START_SEC_VAR_FAST_CLEARED_16 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_32BIT  <MSN>_START_SEC_VAR_FAST_CLEARED_32 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_64BIT  <MSN>_START_SEC_VAR_FAST_CLEARED_64 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_UNSPEC <MSN>_START_SEC_VAR_FAST_CLEARED_UNS
    IFIED 
    PECIFIED 
    Table 3-6  Change of memory section keywords for variables in ASR 4.0.3 
     
     
    Note 
    Although names of some keywords have changed most of AUTOSAR 
      4.0.3-BSW-modules provided by Vector Informatik GmbH still use the old 
    naming convention of memory section keywords. The BSW-module MemMap 
    provided by Vector Informatik GmbH accepts both naming conventions. 
     
     
    3.3 
    Compiler specific keywords 
    The following table gives an overview about available compiler specific keywords. These 
    keywords are required to tell the compiler the memory location of the corresponding code 
    and  data  segments.  This  information  allows  the  compiler  to  create  correct  access 
    instructions  for  corresponding  data  and  code  segments.      The  need  of  usage  of  these 
    keywords depends on the used compiler and the memory model of used hardware.  
     
     
    Note 
    The compiler specific keywords listed below are the default ones. Apart from 
      these ones if required each BSW-module may define further own ones. Please 
    see file Compiler_Cfg.h included in your delivery. 
     
     
    Compiler specific keyword 
    Memory section the compiler specific keyword used for 
    <MSN>_CODE 
    <MSN>_START_SEC_CODE 
    <MSN>_CODE_FAST 
    <MSN>_START_SEC_CODE_FAST 
    <MSN>_CODE_ISR 
    <MSN>_START_SEC_CODE_ISR 
    <MSN>_CONST 
    <MSN>_START_SEC_CONST_8BIT 
    <MSN>_START_SEC_CONST_16BIT 
    <MSN>_START_SEC_CONST_32BIT 
    <MSN>_START_SEC_CONST_64BIT 
    <MSN>_START_SEC_CONST_UNSPECIFIED 
    <MSN>_CONST_FAST 
    <MSN>_START_SEC_FAST_CONST_8BIT 
    <MSN>_START_SEC_FAST_CONST_16BIT 
    <MSN>_START_SEC_FAST_CONST_32BIT 
    <MSN>_START_SEC_FAST_CONST_64BIT 
    <MSN>_START_SEC_FAST_CONST_UNSPECIFIED 
    <MSN>_PBCFG 
    <MSN>_START_SEC_PBCFG_GLOBALROOT 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    17 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    <MSN>_START_SEC_CONST_PBCFG 
    <MSN>_VAR_PBCFG 
    <MSN>_START_SEC_VAR_PBCFG 
    <MSN>_VAR_INIT 
    <MSN>_START_SEC_VAR_INIT_8BIT 
    <MSN>_START_SEC_VAR_INIT_16BIT 
    <MSN>_START_SEC_VAR_INIT_32BIT 
    <MSN>_START_SEC_VAR_INIT_64BIT 
    <MSN>_START_SEC_VAR_INIT_UNSPECIFIED 
    <MSN>_VAR_NOINIT 
    <MSN>_START_SEC_VAR_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_NOINIT_UNSPECIFIED 
    <MSN>_VAR_ZERO_INIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_16BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_32BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_64BIT 
    <MSN>_START_SEC_VAR_ZERO_INIT_UNSPECIFIED 
    <MSN>_VAR_INIT_FAST 
    <MSN>_START_SEC_VAR_FAST_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_INIT_UNSPECIFIED 
    <MSN>_VAR_NOINIT_FAST 
    <MSN>_START_SEC_VAR_FAST_NOINIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED 
    <MSN>_VAR_ZERO_INIT_FAST 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_8BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_16BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_32BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_64BIT 
    <MSN>_START_SEC_VAR_FAST_ZERO_INIT_UNSPECIFIED 
    Table 3-7   Compiler specific keywords and the related memory sections they used for 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    18 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    4  Glossary and Abbreviations 
    4.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator 5 
    Configuration and generation tool for MICROSAR software 
    components 
    Table 4-1   Glossary 
    4.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    ASR 
    AUTOSAR 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    ECU 
    Electronic Control Unit 
    GHS 
    Greenhills 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RAM 
    Random Access Memory 
    ROM 
    Read Only Memory 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 4-2   Abbreviations 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    19 
    based on template version 5.6.0 


    Technical Reference MICROSAR Memory Mapping 
    5  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    20 
    based on template version 5.6.0 

    Document Outline


    1.3.63 - TechnicalReference_BswM

    Basic Software Mode Manager

    1.3.65 - TechnicalReference_BswMs


     
     
     
     
     
     
     
     
     
     
     
    MICROSAR BswM  
    Technical Reference 
     
     
    Version 7.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Leticia  Garcia  Herrera,  Thomas  Kuhl,  Philipp  Ritter, 
    Jochen Vorreiter 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference Basic Software Mode Manager 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Leticia Garcia, Thomas Kuhl 
    2012-08-02 
    1.00.00 
    Creation of document.  
    Leticia Garcia, Thomas Kuhl 
    2012-09-27 
    1.01.00 
    Addition of feature, support of 
    EthSM . Chapters 3.1, 4.1, 
    5.2and 6.3. 
    Leticia Garcia, Thomas Kuhl 
    2013-01-31 
    1.02.00 
    Addition of feature, support of 
    NvM. Chapter 3.1, 4.1, 5.2 
    and 5.3. 
    Leticia Garcia, Thomas Kuhl 
    2012-03-26 
    1.03.00 
    Support of Post-build variant. 
    Chapters 4.1, 4.2, 5.1and 5.2. 
     
    Deviation from AUTOSAR. 
    Header included:  
    Com_Types.h. Chapter 6.1 
    Leticia Garcia 
    2013-10-21 
    2.00.00 
    Addition of extension in 
    chapter 6.2.  
    Deletion of limitations in 
    chapter 6.3.  
    DET errors added in chapter 
    3.6.1.  
    Dynamic files added in 
    chapter 4.1.2.  
    Chapter 4.2 was changed. 
    Chapter 4.3 was added. 
    Leticia Garcia 
    2013-12-04 
    2.00.01 
    Chapter 3.3 was extended. 
    Chapter  3.4.2 was added. 
    Chapter 3.6.1 error code 
    added.  
    Chapter 4.5 was extended 
    Chapter 6.2 was extended. 
    Leticia Garcia 
    2013-02-18 
    2.01.00 
    Extended chapters: 3.1, 3.1.2, 
    3.6.1, 4.1.1, 5.2.15, 5.2.16, 
    5.2.33, 5.2.34, 5.2.35, 5.2.36 
    5.3 and 6.2.1. 
    Added chapters: 4.3.3, 5.6, 
    and 6.2.2. Removed deviation 
    about 
    Com_IpduGroupControl 
    usage. 
    Philipp Ritter 
    2014-06-13 
    3.00.00 
    Extended chapters: 3.1.2, 3.5, 
    5.6.1, 6.2.1, 6.2.8 
    Added chapters: 5.2.37, 
    6.2.10, 6.2.11 
    Updated Figures: Figure 3-2, 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Figure 3-3 
    Philipp Ritter 
    2014-10-22 
    4.00.00 
    Extended Chapters: 3.1, 
    3.6.1, 4.1.1, 4.3.3, 5.2.4 
    Added chapters: 5.2.38 
    Philipp Ritter 
    2015-02-02 
    5.00.00 
    Extended chapters: 3.6.1, 
    4.3.3, 6.3.3, 6.3.4 
    Added chapters: 5.2.19 
    Removed: Limitation for 
    multiple configurations 
    Philipp Ritter 
    2015-07-29 
    6.00.00 
    Extended chapters: 3.1, 3.1.2, 
    3.6.1, 4.3.3, 5.3 
    Added chapters:  4.3.4, 
    5.2.23, 5.2.27, 5.2.28, 5.2.29, 
    5.2.30, 
    5.2.31, 5.2.32 
    Philipp Ritter 
    2015-12-10 
    6.00.01 
    Updated Figure 4-6 
    Jochen Vorreiter 
    2016-11-15 
    7.00.00 
    Added chapters: 5.2.8 and 
    5.2.12 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]    AUTOSAR 
    AUTOSAR_SWS_BSWModeManager.pdf 
    1.4.0 
    [2]    AUTOSAR 
    AUTOSAR_EXP_ModemanagementGuide 
    2.1.0 
    [3]    AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [4]    AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [5]    AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [6]    Vector 
    TechnicalReference_Rte.pdf 
    see delivery 
    [7]    Vector 
    TechnicalReference_PostBuildLoadable.pdf 
    see delivery 
    [8]    Vector 
    TechnicalReference_Com.pdf 
    see delivery 
    [9]    Vector 
    TechnicalReference_IdentityManager.pdf 
    see delivery 
     
     
     
     
     
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
    Scope of the Document 
    This  technical  reference  describes  the  general  use  of  the  AUTOSAR  Basic  Software 
    module BSW Mode Manager (BswM). 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Contents 
    1 
    Component History .................................................................................................... 10 
    2 
    Introduction................................................................................................................. 11 
    2.1 

    Architecture Overview ...................................................................................... 11 
    3 
    Functional Description ............................................................................................... 13 
    3.1 

    Features .......................................................................................................... 13 
    3.1.1 
    Deviations ........................................................................................ 14 
    3.1.2 
    Additions/ Extensions ....................................................................... 14 
    3.2 
    Initialization ...................................................................................................... 14 
    3.3 
    States .............................................................................................................. 14 
    3.4 
    Mode Management .......................................................................................... 16 
    3.4.1 
    Immediate Mode Handling ............................................................... 17 
    3.4.2 
    Forced Immediate Mode Handling ................................................... 17 
    3.4.3 
    Deferred Mode Handling .................................................................. 17 
    3.5 
    Execution of Action Lists .................................................................................. 20 
    3.6 
    Error Handling .................................................................................................. 20 
    3.6.1 

    Development Error Reporting ........................................................... 20 
    3.6.2 
    Production Code Error Reporting ..................................................... 22 
    4 
    Integration ................................................................................................................... 23 
    4.1 

    Scope of Delivery ............................................................................................. 23 
    4.1.1 

    Static Files ....................................................................................... 23 
    4.1.2 
    Dynamic Files .................................................................................. 24 
    4.2 
    Initialization of Other Software Modules ........................................................... 24 
    4.2.1 

    Using the Basic Editor ...................................................................... 24 
    4.2.2 
    Using the Comfort View.................................................................... 26 
    4.3 
    Support of Preconfigured State Machines (Auto-Configuration) ....................... 26 
    4.3.1 
    Initialization ...................................................................................... 27 
    4.3.2 
    ECU State Handling ......................................................................... 29 
    4.3.3 
    Communication Control .................................................................... 31 
    4.3.4 
    Service Discovery Control ................................................................ 33 
    4.4 
    Critical Sections ............................................................................................... 33 
    4.5 
    Cyclic Task ....................................................................................................... 33 
    4.6 
    NvM – BswM configuration .............................................................................. 33 
    5 
    API Description ........................................................................................................... 34 
    5.1 

    Type Definitions ............................................................................................... 34 
    5.2 
    Services Provided by BswM ............................................................................. 35 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.1 
    BswM_InitMemory ........................................................................... 35 
    5.2.2 
    BswM_Init ........................................................................................ 35 
    5.2.3 
    BswM_Deinit .................................................................................... 36 
    5.2.4 
    BswM_GetVersionInfo ...................................................................... 36 
    5.2.5 
    BswM_RequestMode ....................................................................... 37 
    5.2.6 
    BswM_ComM_CurrentMode ............................................................ 37 
    5.2.7 
    BswM_ComM_CurrentPNCMode ..................................................... 38 
    5.2.8 
    BswM_ComM_InitiateReset ............................................................. 38 
    5.2.9 
    BswM_Dcm_ApplicationUpdated ..................................................... 39 
    5.2.10 
    BswM_Dcm_CommunicationMode_CurrentState ............................ 39 
    5.2.11 
    BswM_CanSM_CurrentState ........................................................... 40 
    5.2.12 
    BswM_EthIf_PortGroupLinkStateChg .............................................. 40 
    5.2.13 
    BswM_EthSM_CurrentState ............................................................ 41 
    5.2.14 
    BswM_FrSM_CurrentState .............................................................. 41 
    5.2.15 
    BswM_J1939DcmBroadcastStatus .................................................. 42 
    5.2.16 
    BswM_J1939Nm_StateChangeNotification ...................................... 42 
    5.2.17 
    BswM_LinSM_CurrentState ............................................................. 43 
    5.2.18 
    BswM_LinSM_CurrentSchedule....................................................... 43 
    5.2.19 
    BswM_LinSM_ScheduleEndNotification........................................... 44 
    5.2.20 
    BswM_LinTp_RequestMode ............................................................ 44 
    5.2.21 
    BswM_EcuM_CurrentState .............................................................. 45 
    5.2.22 
    BswM_EcuM_CurrentWakeup ......................................................... 45 
    5.2.23 
    BswM_EcuM_RequestedState ......................................................... 46 
    5.2.24 
    BswM_MainFunction ........................................................................ 46 
    5.2.25 
    BswM_NvM_CurrentBlockMode....................................................... 47 
    5.2.26 
    BswM_NvM_CurrentJobMode ......................................................... 47 
    5.2.27 
    BswM_PduR_RxIndication ............................................................... 48 
    5.2.28 
    BswM_PduR_TpRxIndication ........................................................... 48 
    5.2.29 
    BswM_PduR_TpStartOfReception ................................................... 49 
    5.2.30 
    BswM_PduR_TpTxConfirmation ...................................................... 49 
    5.2.31 
    BswM_PduR_Transmit ..................................................................... 50 
    5.2.32 
    BswM_PduR_TxConfirmation .......................................................... 50 
    5.2.33 
    BswM_Sd_EventHandlerCurrentState ............................................. 51 
    5.2.34 
    BswM_Sd_ClientServiceCurrentState .............................................. 51 
    5.2.35 
    BswM_Sd_ConsumedEventGroupCurrentState ............................... 52 
    5.2.36 
    BswM_Nm_StateChangeNotification ............................................... 53 
    5.2.37 
    BswM_RuleControl .......................................................................... 54 
    5.2.38 
    BswM_WdgM_RequestPartitionReset ............................................. 54 
    5.3 
    Services Used by BswM .................................................................................. 55 
    5.4 
    Callback Functions ........................................................................................... 56 
    5.5 
    Configurable Interfaces .................................................................................... 56 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.5.1 
    Callout Functions ............................................................................. 56 
    5.6 
    Service Ports ................................................................................................... 57 
    5.6.1 

    BswMSwcModeRequest (R-Port) ..................................................... 57 
    5.6.2 
    BswMSwcModeNotification (R- Port) ............................................... 57 
    5.6.3 
    BswMSwitchPort (P- Port) ................................................................ 58 
    5.6.4 
    BswMRteModeRequestPort (P-Ports) .............................................. 58 
    5.6.5 
    BswMModeDeclaration .................................................................... 58 
    6 
    AUTOSAR Standard Compliance............................................................................... 59 
    6.1 

    Deviations ........................................................................................................ 59 
    6.1.1 

    Inclusion of the header Com_Types.h .............................................. 59 
    6.1.2 
    Port Names ...................................................................................... 59 
    6.2 
    Additions/ Extensions ....................................................................................... 59 
    6.2.1 

    Optional Interfaces ........................................................................... 59 
    6.2.2 
    Nm Indication ................................................................................... 60 
    6.2.3 
    User Condition Functions ................................................................. 60 
    6.2.4 
    Creation of Mode Declarations ......................................................... 61 
    6.2.5 
    Timers .............................................................................................. 61 
    6.2.6 
    Generic Symbolic Values ................................................................. 61 
    6.2.7 
    Generic Actions ................................................................................ 61 
    6.2.8 
    Immediate request in BswM_Init() .................................................... 61 
    6.2.9 
    Mode Handling Forced Immediate ................................................... 61 
    6.2.10 
    Rule Control ..................................................................................... 61 
    6.2.11 
    Support of Com ASR3 IPduGroup APIs............................................ 62 
    6.3 
    Limitations........................................................................................................ 62 
    6.3.1 

    Configurable interfaces that are not supported ................................. 62 
    6.3.1.1 

    EcuM Indication for EcuM Flex ...................................... 62 
    6.3.2 
    Optional Interfaces ........................................................................... 62 
    6.3.3 
    Configuration Variants ...................................................................... 63 
    6.3.4 
    BSW Modules .................................................................................. 63 
    7 
    Glossary and Abbreviations ...................................................................................... 64 
    7.1 

    Glossary .......................................................................................................... 64 
    7.2 
    Abbreviations ................................................................................................... 64 
    8 
    Contact ........................................................................................................................ 66 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Illustrations 
    Figure 2-1 
    AUTOSAR Architecture............................................................................. 11 
    Figure 2-2 
    Interfaces to adjacent modules of the BswM ............................................. 12 
    Figure 3-1 
    States of the BswM ................................................................................... 16 
    Figure 3-2 
    Sequence Immediate Processing ............................................................. 18 
    Figure 3-3 
    Sequence Deferred Mode ......................................................................... 19 
    Figure 4-1 
    Auto-configured state machines................................................................ 27 
    Figure 4-2 
    Configure module initialization .................................................................. 28 
    Figure 4-3 
    Edit initialization order ............................................................................... 29 
    Figure 4-4 
    Restore default sequence ......................................................................... 29 
    Figure 4-5 
    Configuration of the features for ECU State Handling ............................... 30 
    Figure 4-6 
    State Machine of the ECU State Handling ................................................ 31 
    Figure 5-1 
    Existing callout functions .......................................................................... 56 
    Figure 5-2 
    Generate prototype of callout functions..................................................... 56 
     
    Tables 
    Table 1-1 
    Component history.................................................................................... 10 
    Table 3-1 
    Supported AUTOSAR Standard Conform Features .................................. 13 
    Table 3-2 
    Not Supported AUTOSAR Standard Conform Features ............................ 14 
    Table 3-3 
    Features Provided Beyond the AUTOSAR Standard ................................ 14 
    Table 3-4  
    Service IDs ............................................................................................... 21 
    Table 3-5 
    Errors reported to DET ............................................................................. 22 
    Table 4-1 
    Static Files ................................................................................................ 24 
    Table 4-2 
    Dynamic Files ........................................................................................... 24 
    Table 5-1 
    Type definitions ......................................................................................... 34 
    Table 5-2  
    BswM_InitMemory .................................................................................... 35 
    Table 5-3  
    BswM_Init ................................................................................................. 35 
    Table 5-4  
    BswM_Deinit............................................................................................. 36 
    Table 5-5  
    BswM_GetVersionInfo .............................................................................. 36 
    Table 5-6  
    BswM_RequestMode ................................................................................ 37 
    Table 5-7  
    BswM_ComM_CurrentMode ..................................................................... 37 
    Table 5-8  
    BswM_ComM_CurrentPNCMode ............................................................. 38 
    Table 5-9  
    BswM_ComM_InitiateReset ...................................................................... 38 
    Table 5-10  
    BswM_Dcm_ApplicationUpdated .............................................................. 39 
    Table 5-11  
    BswM_Dcm_CommunicationMode_CurrentState ..................................... 39 
    Table 5-12  
    BswM_CanSM_CurrentState .................................................................... 40 
    Table 5-13  
    BswM_EthIf_PortGroupLinkStateChg ....................................................... 40 
    Table 5-14  
    BswM_EthSM_CurrentState ..................................................................... 41 
    Table 5-15  
    BswM_FrSM_CurrentState ....................................................................... 41 
    Table 5-16  
    BswM_J1939DcmBroadcastStatus ........................................................... 42 
    Table 5-17  
    BswM_J1939Nm_StateChangeNotification .............................................. 42 
    Table 5-18  
    BswM_LinSM_CurrentState ...................................................................... 43 
    Table 5-19  
    BswM_LinSM_CurrentSchedule ............................................................... 43 
    Table 5-20  
    BswM_LinSM_ScheduleEndNotification ................................................... 44 
    Table 5-21  
    BswM_LinTp_RequestMode ..................................................................... 44 
    Table 5-22  
    BswM_EcuM_CurrentState ....................................................................... 45 
    Table 5-23  
    BswM_EcuM_CurrentWakeup .................................................................. 45 
    Table 5-24  
    BswM_EcuM_RequestedState ................................................................. 46 
    Table 5-25  
    BswM_MainFunction ................................................................................ 46 
    Table 5-26  
    BswM_NvM_CurrentBlockMode ............................................................... 47 
    Table 5-27  
    BswM_NvM_CurrentJobMode .................................................................. 48 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Table 5-28  
    BswM_PduR_RxIndication ....................................................................... 48 
    Table 5-29  
    BswM_PduR_TpRxIndication ................................................................... 48 
    Table 5-30  
    BswM_PduR_TpStartOfReception ............................................................ 49 
    Table 5-31  
    BswM_PduR_TpTxConfirmation ............................................................... 50 
    Table 5-32  
    BswM_PduR_Transmit ............................................................................. 50 
    Table 5-33  
    BswM_PduR_TxConfirmation ................................................................... 50 
    Table 5-34  
    BswM_Sd_EventHandlerCurrentState ...................................................... 51 
    Table 5-35  
    BswM_Sd_ClientServiceCurrentState ...................................................... 52 
    Table 5-36  
    BswM_Sd_ConsumedEventGroupCurrentState ....................................... 52 
    Table 5-37  
    BswM_Nm_StateChangeNotification ........................................................ 53 
    Table 5-38  
    BswM_RuleControl ................................................................................... 54 
    Table 5-39  
    BswM_WdgM_RequestPartitionReset ...................................................... 54 
    Table 5-40  
    Services used by the BswM ...................................................................... 55 
    Table 5-41 
    User Callout .............................................................................................. 57 
    Table 7-1 
    Abbreviations ............................................................................................ 65 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 

    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component. 
     
    Component Version  New Features 
    1.00.00 
    Creation  
    1.01.00 
    Support of Ethernet components was added 
    1.02.00 
    Support to NvM.  
    1.03.00 
    Post-Build loadable support. SWC mode requests support 
    2.00.00 
    Support of timers and user conditions as request ports 
    Generic modes handling extended. 
    Initialization automation and preconfigured state machine to emulate the 
    behavior of EcuM in ASR 3. 
    2.00.01 
    Forced Immediate mode handling was added. 
    2.01.00 
    Support for NM, J1939Nm, J1939Dcm and Service Discovery (Sd), R 
    Request Port of type SwcModeRequest, SwcModeNotification support 
    immediate request processing and Support of P-Ports 
    (BswMRteModeRequestPort). 
    3.00.00 
    Mode Arbitration algorithm changed (first arbitrate all rules, execute action 
    lists afterwards), disabling of rules (Rule Control), support of Com ASR3 
    IPduGroup APIs, prioritization of action list execution order. 
    4.00.00 
    Support for Post-Build selectable and WdgMPartitionReset. 
    5.00.00 
    Support of LinScheduleEndNotification 
    6.00.00 
    Support of BswM_EcuM_RequestedState, BswM_PduR_RxIndication, 
    BswM_PduR_TpRxIndication, 
    BswM_PduR_TpStartOfReception, 
    BswM_PduR_TpTxConfirmation, 
    BswM_PduR_Transmit, 
    BswM_PduR_TxConfirmation 

    7.00.00 
    Support of BswM_ComM_InitiateReset and 
    BswM_EthIf_PortGroupLinkStateChg 
    Table 1-1 
    Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    10 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module BswM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile, post-build, post-build-selectable 
    Vendor ID: 
    BSWM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    BSWM_MODULE_ID   
    42 decimal 
    (according to ref.[4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The  BSW  Mode  Manager  is  the  module  that  implements  the  part  of  the  Vehicle  Mode 
    Management and Application Mode Management concept that resides in the BSW.  
    Its responsibility is to arbitrate mode requests from application layer SW-Cs or other  
    BSW modules based on simple rules, and perform actions based on the arbitration result. 
    2.1 
    Architecture Overview 
    The following figure shows where the BswM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR Architecture 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    11 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
     
     
    The next figure shows the interfaces to adjacent modules of the BswM. These interfaces 
    are described in chapter 5. 
     
     class Architecture
    Com
    Det
    J1939Rm
    Dem
    J1939Dcm
    Nm
    ComM
    Bsw M
    Application
    SchM
    RTE
    CanSM
    Nv M
    EcuM
    PduR
    EthIf
    J1939Nm
    LinSm
    EthSm
    LinIf
    Dcm
    FrSm
    Sd
     
    Figure 2-2  Interfaces to adjacent modules of the BswM 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    12 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    3  Functional Description 
    This chapter describes the general function of the BswM. 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    BswM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1]. The  corresponding  features  are 
    listed in the tables: 
    >  Table 3-1 Supported AUTOSAR Standard Conform Features 
    >  Table 3-2 Not Supported AUTOSAR Standard Conform Features 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    CanSM mode arbitration 
    ComM mode arbitration 
    Dcm mode arbitration 
    EcuM mode arbitration 
    EthSM mode arbitration 
    FrSM mode arbitration 
    J1939Dcm mode arbitration 
    J1939Nm mode arbitration 
    LinSM mode arbitration 
    LinTp mode arbitration 
    NvM mode arbitration 
    Sd mode arbitration 
    Application mode arbitration 
    I-PDU Group handling (activation/deactivation/deadline monitoring) 
    Action to handle PduR routing path groups 
    Nested rule execution 
    Rte Mode Notification and Switches 
    Rte Mode Request Interfaces and Ports 
    Watchdog Manager 
    Post-Build Loadable 
    MICROSAR Identity Manager using Post-Build Selectable [9] 
    Table 3-1 
    Supported AUTOSAR Standard Conform Features 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    13 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    3.1.1 
    Deviations 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Available Action: BswM_TriggerStartUpPhase2 
    Available Actions: BswM_TriggerSlaveRTEStop  
    Table 3-2 
    Not Supported AUTOSAR Standard Conform Features 
    See Chapter 6.1 for detailed information about other deviations. 
     
    3.1.2 
    Additions/ Extensions 
    Features Provided Beyond the AUTOSAR Standard 
    Timers as mode request ports 
    Nm as mode request port 
    User conditions as mode request ports 
    Generic mode switch as available action 
    Timer control as available action 
    Creation of user callouts in BswM_Callout_Stubs.c 
    Preconfigured State Machines (Communication, Initialization, Service Discovery and ECU State 
    Handling) 
    Arbitration of rules on initialization values of immediate mode request ports 
    Rule Control (deactivation of rules during runtime)  
    Prioritization of Action List Execution Order 
    Support of ASR3 IPduGroup APIS 
    PduR mode request ports 
    EthIf mode arbitration 
    Table 3-3 
    Features Provided Beyond the AUTOSAR Standard 
    3.2 
    Initialization 
    The  BswM  is  initialized  via  the  service  function  BswM_Init  (refer  to  chapter  5.2.2).On 
    platforms  in  which  the  Random  Access  Memory  (RAM)  is  not  initialized  to  zero  by  the 
    start-up  code  the  function  BswM_InitMemory  has  to  be  called  first  and  then  a  call  to 
    BswM_Init can be realized. All available modes are set to the configured initialization 
    state, which can either be undefined or set to a specific value. If the initialization state is 
    undefined the mode is not arbitrated until the mode request/indication function occurs for 
    the first time. 
    3.3 
    States 
    The state machine diagram in Figure 3-1 shows the general handling of the BswM. Each 
    state is described as follows: 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    14 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    >  BSWM_INIT 
    The BswM is initialized and ready for immediate mode arbitration requests. Deferred mode 
    arbitration is done within the cyclically called function BswM_MainFunction. 
     
    >  BSWM_WAIT_IMMEDIATE_REQUEST 
    In this state the BswM waits for a mode arbitration request. The state is left if immediate 
    mode arbitration is requested or when BswM_MainFunction is called. 
     
    >  BSWM_MAIN_FUNCTION 
    This  state  is  entered  when  the  BswM_MainFunction  is  called.  Within 
    BswM_MainFunction the deferred mode arbitration is done. Immediate mode arbitration 
    requests which occur during the execution of BswM_MainFunction are queued and will 
    be executed at the end of BswM_MainFunction, when all deferred mode arbitration and 
    control  is  finished.  Mode  arbitration  requests  of  type  “forced  immediate”  are  not  queued 
    and interrupt the deferred mode arbitration. 
     
    >  BSWM_MODE_ARBITRATION_AND_CONTROL 
    In this state the configured mode rule arbitration is done and the true-/false-action lists are 
    executed.  New  mode  arbitration  requests  of  type  “immediate”  are  queued,  arbitration 
    requests of type “forced immediate” are arbitrated immediately. 
     
    >  BSWM_EMPTY_QUEUE 
    In this state the queued mode arbitration requests are executed.  
     
    >  BSWM_DEINIT 
    This  state  is  entered  when  the  function  BswM_Deinit  is  called.  No  mode  arbitration 
    requests are accepted and no mode processing is done. This state can only be left when 
    function BswM_Init is called. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    15 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    stm State_Machine
    Initial
    [BswM_Init]
    BSWM_INIT
    EntryPoint
    BSWM_WAIT_IMMEDIATE_REQUEST
    [queue is empty]
    [immediate request]
    [immediate request]
    /queue request
    BSWM_MODE_ARBITRATION_AND_CONTROL
    BSWM_EMPTY_QUEUE
    [queued immediate request]
    [BswM_MainFunction]
    [Immediate request]
    [Immediate finished]
    /queue request
    [Deferred Request]
    [deferred finished]
    BSWM_MAIN_FUNCTION
    [queued main fct call]
    [MainFunctionEnd]
    [Immediate Request]
    /queue request
    [BswM_Deinit]
    [BswM_Init]
    /stop any mode request arbitration
    BSWM_DEINIT
    [immediate request] /ignore
    [BswM_MainFunction]
    /no deferred mode request arbitration
     
    Figure 3-1  States of the BswM 
    3.4 
    Mode Management 
    The  BswM  manages  user  defined  modes,  whose  behavior  is  completely  defined  by  its 
    configuration. A mode consists of the following parts: 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    16 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    >  Mode Source: this is the trigger for the mode arbitration, a trigger can either be an 
    application  indication/request  function  or  a  BSW  indication/request  function  or  the 
    BswM_MainFunction(). 
    >  Mode Arbitration: when the mode source trigger occurs the BswM will arbitrate a 
    mode 
    specific 
    rule 
    either 
    immediately 
    or 
    deferred 
    within 
    the 
    BswM_MainFunction().  The  mode  arbitration  types  are  described  in  detail  in 
    chapters 3.4.1 and 3.4.3. 
    >  Mode  Rule:  a  rule  is  a  logical  Boolean  expression  which  consists  of  specific 
    conditions which use different operators. The rule is arbitrated by the  BswM to be 
    either  true  or  false.  Dependent  on  the  evaluation  result  the  BswM  executes  the 
    configured mode action(s) (true-action(s) or false-action(s)). 
    >  Mode  Actions:  these  are  either  BSW  service  function  calls,  user  callout  function 
    calls  or calls to nested  rules or  action  lists which  are  executed by the BswM after 
    the Mode Arbitration. 
     
    3.4.1 
    Immediate Mode Handling 
    The  immediate  mode  arbitration  is  done  directly  upon  the  mode  request/indication 
    function.  If  another  mode  request/indication  occurs  during  mode  arbitration  the  BswM 
    queues  this  mode  arbitration  request.  The  mode  request  queue  is  emptied  when  the 
    current  mode  arbitration  is  finished.  The  sequence  diagram  in  Figure  3-2  shows  this 
    procedure. 
     
    3.4.2 
    Forced Immediate Mode Handling 
    The forced immediate mode arbitration is done directly upon the mode request/indication 
    function.  The  forced  immediate  request  triggers  immediate  mode  arbitration,  interrupting 
    any  other  immediate  mode  arbitration  or  deferred  rule  processing  in  the  main  function. 
    This type of mode handling is not queued.  
     
    3.4.3 
    Deferred Mode Handling 
    The  deferred  mode  arbitration  is  done  cyclically  within  the  execution  of  the 
    BswM_MainFunction().  If  another  mode  request/indication  occurs  during  mode 
    arbitration  the  BswM  queues  this  mode  arbitration  request.  The  mode  request  queue  is 
    emptied at the end of the BswM_MainFunction(). The sequence diagram in Figure 3-3 
    shows this procedure. 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    17 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Module
    Module
    BswM
    BSW/SWC
    Mode Request()
    Store Mode Value()
    alt 
    [deferred request]
    Nothing to do for deferred request. Depending rules will be 
    arbitrated in BswM_MainFunction
    [immediate request and locked semaphore]
    Queue Request()
    [unlocked sempahore or forced immediate]
    After locking semaphore, all new 
    Lock Semaphore()
    immediate requests will be queued
    loop ov er all rules w hich depend on the requested mode
    Aribtrate rule and mark resulting action list for execution()
    loop ov er marked actionlists
    Execute Action Lists()
    loop ov er all actions of action list
    Call Action()
    opt 
    Mode Request()
    Reentrant mode request call - Will be processed in same way
    opt 
    [sempahore was locked above]
    loop as long as queued request present
    Process  Queued Request()
    Unlock Semaphore()
    After unlocking semaphore, new 
    immediate requests will be processed in 
    mode request context
     
    Figure 3-2  Sequence Immediate Processing 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    18 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Module
    Module
    Module
    SchM
    BswM
    BSW/SWC
    After locking semaphore, all new 
    immediate requests will be queued
    BswM_MainFunction()
    Lock Semaphore()
    loop ov er all rules w hich depend on a deferred request port
    Aribtrate rule and mark resulting action list for execution()
    loop ov er marked actionlists
    Execute Action Lists()
    loop ov er all actions of action list
    Call Action()
    opt 
    Mode Request()
    
    Deferred Request will be arbitrated in next BswM_MainFunction
    
    Immediate Request will be queued
    
    Forced Immediate Request will be processed immediately
    opt 
    [sempahore was locked above]
    loop as long as queued request present
    Process  Queued Request()
    Unlock Semaphore()
    After unlocking semaphore, new 
    immediate requests will be processed in 
    mode request context
     
    Figure 3-3  Sequence Deferred Mode 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    19 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    3.5 
    Execution of Action Lists 
    The  execution  of  actions  is  done  after  the  rule  arbitration  phase.  Whether  an  action  list 
    shall be executed depends on the arbitration result (true or false). There are two ways to 
    execute an action list based on evaluation of rules: either it is executed every time the rule 
    is evaluated with the corresponding result (so called  conditional execution), or only when 
    the  evaluation  result  has  changed  from  the  previous  evaluation  (so  called  triggered 
    execution
    ). This execution type is defined via configuration. If arbitration of a rule leads to 
    the  execution  of  an  action  list,  this  action  list  is  marked  for  execution. All  marked  action 
    lists are executed by their prioritization after the rules have been arbitrated. 
    3.6 
    Error Handling 
    3.6.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [3],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter BSWM_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported BswM ID is 42. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  chapter  5.2.  Table 
    3-4 
    presents the service IDs and the related services. 
    Service ID 
    Service 
    BSWM_INITMEMORY_ID 
    (0x80) 
    BswM_InitMemory() 
    BSWM_INIT_ID 
    (0x00) 
    BswM_Init() 
    BSWM_GETVERSIONINFO_ID 
    (0x01) 
    BswM_GetVersionInfo() 
    BSWM_REQUESTMODE_ID 
    (0x02) 
    BswM_RequestMode() 
    BSWM_MAINFUNCTION_ID 
    (0x03) 
    BswM_MainFunction() 
    BSWM_DEINIT_ID 
    (0x04) 
    BswM_Deinit() 
    BSWM_CANSM_CURRENTSTATE_ID 
    (0x05) 
    BswM_CanSM_CurrentState() 
    BSWM_DCM_COMMUNICATION_STATE_ID  (0x06) 
    BswM_Dcm_CommunicationMode_CurrentState() 
    BSWM_LINSM_CURRENTSTATE_ID 
    (0x09) 
    BswM_LinSM_CurrentState() 
    BSWM_LINSM_CURRENTSCHEDULE_ID 
    (0x0A) 
    BswM_LinSM_CurrentSchedule() 
    BSWM_LINTP_REQUESTMODE_ID 
    (0x0B) 
    BswM_LinTp_RequestMode() 
    BSWM_FRSM_CURRENTSTATE_ID 
    (0x0C) 
    BswM_FrSM_CurrentState() 
    BSWM_ETHSM_CURRENTMODE_ID 
    (0x0D) 
    BswM_EthSM_CurrentState() 
    BSWM_COMM_CURRENTMODE_ID 
    (0x0E) 
    BswM_ComM_CurrentMode() 
    BSWM_ECUM_CURRENTSTATE_ID 
    (0x0F) 
    BswM_EcuM_CurrentState() 
    BSWM_ECUM_CURRENTWAKEUP_ID 
    (0x10) 
    BswM_EcuM_CurrentWakeup() 
    BSWM_WDGM_REQUESTPARTITIONRESET_ID 
    BswM_WdgM_RequestPartitionReset() 
     
    (0x11) 
    BSWM_DCM_APPLICATION_UPDATED_ID  (0x14) 
    BswM_Dcm_ApplicationUpdated() 
    BSWM_COMM_PNC_CURRENTMODE_ID  (0x15) 
    BswM_ComM_CurrentPNCMode() 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    20 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Service ID 
    Service 
    BSWM_NVM_CURRENTBLOCKMODE_ID 
    (0x16) 
    BswM_NvM_CurrentBlockMode() 
    BSWM_NVM_CURRENTJOBMODE_ID  
    (0x17) 
    BswM_NvM_CurrentJobMode() 
    BSWM_J1939NM_STATE_ID 
    (0x18) 
    BswM_J1939Nm_StateChangeNotification() 
    BSWM_J1939DCM_BROADCASTSTATUS_ID (0x1b) 
    BswM_J1939DcmBroadcastStatus() 
    BSWM_SD_CLIENTSERVICE_CURRENT_ID (0x1f) 
    BswM_Sd_ClientServiceCurrentState() 
    BSWM_SD_EVENTHANDLER_CURRENT_ID (0x20) 
    BswM_Sd_EventHandlerCurrentState() 
    BSWM_SD_CONSUMEDEVENTGROUP_ID  (0x21) 
    BswM_Sd_ConsumedEventGroupCurrentState() 
    BSWM_COMM_INITIATERESET_ID 
    (0x22) 
    BswM_ComM_InitiateReset() 
    BSWM_ECUM_REQUESTEDSTATE_ID 
    (0x23) 
    BswM_EcuM_RequestedState() 
    BSWM_NM_STATE_CHANGE_ID 
    (0x81) 
    BswM_Nm_StateChangeNotification() 
    BSWM_SWCNOTIFICATION_ID 
    (0x82) 
    BswM_Notification_<SWC Notification Name> 
    BSWM_SWCREQUESTMODE_ID 
    (0x83) 
    BswM_Read_<SWC Mode Request Name> 
    BSWM_SETRULESTATE_ID 
    (0x84) 
    BswM_RuleControl() 
    BSWM_LINSM_SCHEDULEENDNOTIFICATION_ID
    BswM_LinSM_ScheduleEndNotification() 
     
    (0x85) 
    BSWM_PDUR_RXINDICATION_ID 
    (0x86) 
    BswM_PduR_RxIndication() 
    BSWM_PDUR_TPRXINDICATION_ID 
    (0x87) 
    BswM_PduR_TpRxIndication() 
    BSWM_PDUR_TPSTARTOFRECEPTION_ID  (0x88) 
    BswM_PduR_TpStartOfReception() 
    BSWM_PDUR_TPTXCONFIRMATION_ID 
    (0x89) 
    BswM_PduR_TpTxConfirmation() 
    BSWM_PDUR_TRANSMIT_ID 
    (0x8A) 
    BswM_PduR_Transmit() 
    BSWM_PDUR_TXCONFIRMATION_ID 
    (0x8B) 
    BswM_PduR_TxConfirmation() 
    BSWM_ETHIF_PORTGROUPLINKSTATECHANGE_ID 
    BswM_EthIf_PortGroupLinkStateChg() 
     
    (0x8C) 
    Table 3-4   Service IDs  
     
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01 
    BSWM_E_NO_INIT 
    Service function is called while BswM is not initialized. 
    0x02 
    BSWM_E_NULL_POINTER 
    Service function is called with a null pointer as an 
    argument. 
    0x03 
    BSWM_E_PARAM_INVALID 
    The given parameter is invalid. 
    0x04 
    BSWM_E_REQ_USER_OUT_OF_RANGE 
    A requesting user is out of range. 
    0x05 
    BSWM_E_REQ_MODE_OUT_OF_RANGE  A requested mode is out of range. 
    0x06 
    BSWM_E_PARAM_CONFIG 
    The provided configuration is inconsistent. 
    0xA0 
    BSWM_E_ALREADY_QUEUED 
    An immediate request was made before the last 
    request of the same port was processed. 
    In most cases this error occurs due to an incorrect 
    configuration, i.e. port shall be arbitrated on its 
    initialization value of port but initialization value of rule 
    is incorrect. If configuration is correct and loss of the 
    earlier mode request is acceptable, this error can be 
    ignored for this port. Otherwise, processing of port 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    21 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Error Code 
    Description 
    can be changed to BSWM_FORCED_IMMEDIATE. 
    Table 3-5 
    Errors reported to DET 
    3.6.2 
    Production Code Error Reporting 
    By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
    Dem_ReportErrorStatus() as specified in [5]. 
     
    The module BswM does not report any DEM error itself. However, it can be configured that 
    an action member of an action list reports a DEM error when it fails.  
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    22 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR BswM into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The  delivery  of  the  BswM  contains  the  files  which  are  described  in  chapters  4.1.1  and 
    4.1.2: 
     
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    BswM.c 
    This is the source file of the BswM. It contains the 
    initialization function, the deinitialization function, the 
     
     
    cyclic main function and all the BSW mode indication 
    functions. 
    BswM.h 
    This is the header file of the BswM. It contains the 
     
     
    interfaces to the BswM API functions. 
    BswM_CanSM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the CAN State Manager. 
    BswM_ComM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Communication Manager. 
    BswM_Dcm.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Diagnostic Communication Manager. 
    BswM_EcuM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Electronic Control Unit State Manager. 
    BswM_EthSm.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Ethernet State Manager. 
    BswM_FrSM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the FlexRay State Manager. 
    BswM_J1939Dc
    This header file contains the prototypes of the callback 

    m.h
     
     
     
    functions of the J1939Dcm module. 
    BswM_J1939Nm
    This header file contains the prototypes of the callback 

    .h
     
     
     
    functions of the J1939Nm module. 
    BswM_LinSM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the LIN State Manager. 
    BswM_LinTp.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the LIN Transport Protocol. 
    BswM_Nm.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Network Manager. 
    BswM_NvM.h 

    This header file contains the prototypes of the callback 
     
     
    functions of the Non Volatile Random-access memory 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    23 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    Manager. 
    BswM_PduR.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Pdu Router module. 
    BswM_Sd.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Service Discovery module. 
    BswM_WdgM.h 
    This header file contains the prototypes of the callback 
     
     
    functions of the Watchdog Manager module. 
    Table 4-1 
    Static Files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool. 
    File Name 
    Description 
    BswM_Lcfg.c 
    This file contains the configuration parameters for pre-compile and for post-
    build variant.  
    BswM_Cfg.h 
    This header file contains general and configuration definitions for pre-compile 
    and post-build variant. 
    BswM_Private_ This file contains the necessary includes and the declarations of libraries and 
    Cfg.h 
    variables used by the BswM. 
    BswM_PBcfg.c  This file contains the variables used for mode arbitration in post-build variant. 
    BswM_Callout_ This file contains the definitions of the call back functions which were 
    Stubs.c 
    configured to be created. 
    Table 4-2 
    Dynamic Files 
    4.2 
    Initialization of Other Software Modules 
    The  BswM  is  able  to  initialize  software  components  through  User  Callout  functions. The 
    BswM can realize the initialization after the EcuM has finished its “post OS sequence”, in 
    which it initializes the operating system, the Schedule Manager and the BswM.  
    4.2.1 
    Using the Basic Editor 
    In order to configure the BswM to initialize other modules: 
      Create “Actions” of type “User Callout” which contain the initialization functions. 
      Create an “Action List” which contains the before mentioned “User Callout” actions. 
      Click on the container “BswMModeControl”, to make the “Init Action List Reference” 
    visible. 
      Add a reference to the action list that contains the initialization callouts of the other 
    modules. 
      These actions will be called at the end of BswM_Init. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    24 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
     
     
    Caution 
    It  is  important  that  the  execution  of  the  initialization  is  not  interrupted  by  any 
      other  main function. The  initialization  of  all the  configured  modules  should be 
    concluded before any other function is called.  
     
     
     
    Illustratively, a list of initialization functions is listed below, as exemplified in the Guide to 
    Mode  Management  [2]  (This  guide  can  be  also  consulted for  further  Mode  management 
    information).  Note  that  this  list  is  not  complete  and  depends  on  the  BSW  modules  you 
    have in your delivery. 
     
     
    Initialization of basic drivers to access the NVRAM: 
     Spi_Init(NULL_PTR); 
     Eep_Init(NULL_PTR); 
     Fls_Init(NULL_PTR); 
     NvM_Init(NULL_PTR); 
     NvM_ReadAll(); 
     
    After  the  NvM_ReadAll()  job  is finished  the  initialization  of  the  remaining modules  can 
    continue: 
     Can_Init(NULL_PTR); 
     CanIf_Init(NULL_PTR); 
     CanSM_Init(NULL_PTR); 
     CanTp_Init(NULL_PTR); 
     Lin_Init(NULL_PTR); 
     LinIf_Init(NULL_PTR); 
     LinSM_Init(NULL_PTR); 
     LinTp_Init(NULL_PTR); 
     Fr_Init(NULL_PTR); 
     FrIf_Init(NULL_PTR); 
     FrSm_Init(NULL_PTR); 
     FrTp_Init(NULL_PTR); 
     StbM_Init(); 
     PduR_Init(NULL_PTR); 
     CanNm_Init(NULL_PTR); 
     LinNM_Init(NULL_PTR); 
     FrNm_Init(NULL_PTR); 
     Nm_Init(NULL_PTR); 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    25 
    based on template version 4.11.3 




    Technical Reference Basic Software Mode Manager 
     IpduM_Init(NULL_PTR); 
     Com_Init(NULL_PTR); 
     ComM_Init(NULL_PTR); 
     Dcm_Init(NULL_PTR); 
     Dem_Init(NULL_PTR); 
     RteStart(); 
     
    Note  that  when  in  Post-Build  variant,  the  previous  initialization  functions  could  contain 
    post-build specific parameters. For detailed information  see document  [7],  chapter:  BSW 
    Module Initialization, which summarizes the steps required to initialize post-build loadable 
    BSW modules. 
     
     
    Caution 
    Note that the parameters of the initialization functions used in the example may differ 
      from the actual expected parameters of the corresponding modules depending on the 
    configuration. Please refer to the Technical Reference of each module for the proper 
    initialization call. 
     
     
    4.2.2 
    Using the Comfort View 
    In  order  to  facilitate  the  configuration  of  the  initialization  of  other  modules,  the  “Auto 
    Configuration: Module Initialization” can be used. For further information see chapters 4.3 
    and 4.3.1. 
    4.3 
    Support of Preconfigured State Machines (Auto-Configuration) 
    The BswM supports preconfigured state machines. The content of these state machines is 
    based on the currrent configuration. The state machines can be activated and modified by 
    the user. They can be found in the “Mode Management” view of the DaVinci Configurator 5 
    Pro. To make use of the auto configured state machines: 
    1.  In the configuration editor click on “Mode Management”. 
    2.  Open “BSW Management” window. 
    3.  Click on “Auto Configuration: <Name of the State Machine>”.   
    4.  Click on the link “Configure Module Initialization” to start configuring. 
     
     
     
    Caution 
    Created Rules, Actions, Conditions, etc. are only an advice and may be edited by the 
      integrator. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    26 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
     
    Figure 4-1  Auto-configured state machines 
    4.3.1 
    Initialization 
    The BswM has knowledge of how to initialize several modules: which function to call, with 
    which  parameters  and  which  header  to  include. These  modules  are  listed  in  the  “known 
    modules” list. However, the preconfigured initialization functions and include headers can 
    be changed/adapted by the integrator. 
     
    The  “foreign  modules”  list  contains  modules  unknown  to  the  BswM.  An  initialization 
    function  and  an  include  header  are  suggested,  but  it  is  necessary  to  assure  the 
    correctness of the preconfigured parameters and adapt them in case it is necessary. The 
    foreign modules will be initialized after the known modules by default. 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    27 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
     
    Figure 4-2  Configure module initialization 
    The  list  of  modules  shows  them  in  alphabetical  order.  But  the  initialization  function  calls 
    are  generated  according  to the  internal  logic  of  the  generator.  In order  to  see  the  actual 
    order  in  which  the  functions  will  be  generated,  click  on  Auto  Configuration:  Module 
    Initialization -> Action Lists-> INIT_AL_Initialize. 
    A list of items is shown in the order in which they are generated. The order of the items 
    can be changed manually. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    28 
    based on template version 4.11.3 




    Technical Reference Basic Software Mode Manager 
     
    Figure 4-3  Edit initialization order 
    If the module initialization is edited with the configuration window again, the default order 
    of the items will be restored and the changes previously made in the action list items order 
    will be lost. 
     
    To  avoid  changing  the  already  edited  action  list  items  order,  it  is  necessary  to  clear  the 
    “Restore Default Sequence” checkbox when configuring again.   
     
     
    Figure 4-4  Restore default sequence 
    4.3.2 
    ECU State Handling 
    The  BswM  is  able  to  create  rules  and  actions  which  take  care  of  starting  and  shutting 
    down the ECU. This behavior is similar to EcuM in ASR 3. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    29 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
     
    Figure 4-5  Configuration of the features for ECU State Handling 
    The  following  features  can  be  activated:  DEM  initialization  and  shut-down  generation, 
    enabling and disabling of ComM communication, activation of NvM handling, notifications 
    of the RTE about mode changes and transition call outs are enabled. 
     
    Furthermore, the number of users that request run request and post-run request and the 
    period of time that the state machine spends in the run mode state can be configured.  
     
    The state machine of the ECU state Handling is illustrated in Figure 4-6  State  Machine  of 
    the ECU State Handling. 
    The rectangular states are notified to the RTE if synchronisation 
    is enabled. 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    30 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Initial
    [No Nv M indication pending,
    RUN
    STARTUP
    Nv M_CancelWriteAllTimer is expired]
    /Allow  communication

    Init
    Dem_Init
    Run
    Start Self Run Request Timer
    [Run requested or v alid
    [No run request and no
    w ake-up ev ent or
    communication in all channels]
    pending communication
    /Disallow  Communication
    request]
    EcuM_ClearValidatedWakeupEv ent
    /Allow  communication
    WAKEUP
    POSTRUN
    WakeUp
    PostRun
    [postrun request ==  released]
    /Dem_Shutdow n()

    SHUTDOWN
    [NO Wakeup w as v alid]
    Prepare Shutdown
    [Valid w akeup ev ent]
    /Stop WriteAllTimer
    Start CancelWriteAllTimer
    Nv M_CancelWriteAll

    [RTE mode notification]
    Sleep - "Virtual"
    Wait for NvM
    /Nv M w rite All
    Start Nv M_WriteAllTimer

    [No Nv M indication pending or
    the Nv M_WriteAllTimer is
    expired]
    /EcuM_GoPoll
    EcuM_GoHalt

    Shutdown "virtual"
    [No Nv M indication pending or the Nv M_WriteAllTimer is expired]
    /WriteAllTimer_Stop
    EcuM_GoDow n

     
    Figure 4-6  State Machine of the ECU State Handling 
     
    4.3.3 
    Communication Control 
    The BswM is able to create rules and actions which take care of starting and stopping the 
    communication of an ECU.  
    The features supported by the auto configuration of the Communication Control are: 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    31 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    >  Configuration I-PDU groups switching of CAN, ETH, LIN, FR and J1939 as long as 
    the I-PDUs belong to only one channel.  
      In case the I-PDU Group has I-PDUs from different channels, it will be listed 
    as “Not available” and the configuration has to be realized manually. 
    >  Reinitialization of transmission (TX) and reception (RX) I-PDUs is possible.  
      In  case  of  CAN,  the  reinitialization  will  only  be  performed  in  the  Bus  State 
    transition from NO_COM to FULL _COM, in case of BUS_OFF or SILENT no 
    reinitialization will be performed. 
    >  Enabling and disabling of the NM for CAN, ETH and FlexRay bus, if NM is present 
    in that channel.  
    >  Consideration  of  the  DCM  Modes  when  switching  I-PDU  Groups  that  belong  to 
    CAN, ETH or to FlexRay bus. 
    >  Consideration of selected Nm States when switching TX I-PDU Groups that belong 
    to a CAN bus. 
    >  Configuration of Partial Networking (PNC) is supported for CAN, ETH and FlexRay 
    bus. 
      If a I-PDU Group can be assigned to a PNC, the I-PDU Group is listed as a 
    sub feature of the corresponding PNC and it is switched on or off depending 
    on the PNC Status.  
      Consider  that  the  PCN  can  only  be  determined  if  there  are  PNC-Mapping 
    entries in the System-Description. 
    >  Configuration of the J1939 module. 
      Standard rules will be configured which  consider the state of the J1939Nm 
    for the rule condition. As action lists the states of the modules J1939Dcm and 
    J1939Rm are set. 
       The  I-PDU  Groups  which  contains  only  I-PDUs  of  the  same  Node  will  be 
    switched on or off depending on the Node status. 
      The  I-PDU  Groups  which  are  determined  as  broadcast  groups  will  be 
    switched on or off depending on the Dcm broadcast status. 
      Enabling and disabling of Routing-Pathes in PduR depending on the channel 
    and node state. 
     
    >  Switching of LIN I-PDU groups.  
      The I-PDU Groups which contains only I-PDUs of the same Schedule will be 
    switched on or off depending on the schedule status. 
      Setting a start schedule table. 
      
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    32 
    based on template version 4.11.3 



    Technical Reference Basic Software Mode Manager 
    4.3.4 
    Service Discovery Control 
    The  BswM  is  able  to  create  the  necessary  ports  to  control  the  Service  Discovery  by 
    application. 
    The  auto  configuration,  which  is  only  available  if  the  Sd  module  is  in  the  current 
    configuration, supports the following features: 
    >  Creation  of  a  BswMSwitchPort  (P-  Port)  for  each  selected  SdClientService, 
    SdEventHandler or SdConsumedEventGroup to provide its state to the application. 
    >  Creation  of  a  BswMSwcModeRequest  (R-Port)  for  each  selected  SdClientService, 
    SdServerService or SdConsumedEventGroup to catch the request from application 
    and forward it to the Sd. 
    4.4 
    Critical Sections 
    The BswM has code sections which must not be interrupted by incoming mode requests. 
    Therefore the BswM uses one exclusive area which requires a global interrupt lock: 
    BSWM_EXCLUSIVE_AREA_0 
    The  main  functions  of  the  BSW  modules  that  use  BswM  to  provide  mode  indications 
    should not interrupt each other.  
     
     
     
    Note 
    Refer to [6] for details about exclusive areas. 
     
     
     
     
    4.5 
    Cyclic Task 
    The  BswM  has  one  cyclic  main  function  BswM_MainFunction()  which  must  be  called 
    cyclically  if  either  a  deferred  mode  request  port  exists,  a  timer  is  used  or  a  RTE  mode 
    switch action is configured. The cyclic time is up to the user  but  must  be considered for 
    deferred mode handling. 
     
    4.6 
    NvM – BswM configuration 
    When configuring NvM request ports in BswM it is necessary that the general configuration 
    of the NvM has the necessary boxes checked. 
     
    In NvMCommon check the box: “Multiblock Job status Information” 
    In NVMConfigBlock check the box “Block status information” 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    33 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the BswM are described in this chapter. 
    Type Name 
    C-Type 
    Description 
    Value Range 
    BswM_ConfigType 
    struct  
    Used for the pointers of 
     
     
    post-build configurations 
    during the initialization of 
    the BswM. 
    In pre-compile, it is not 
    used. 
    BswM_ModeType 
    uint16 
    Data type that identifies 
    0 … 65535  
    the modes that can be 
    Used if the total number of 
    requested by BswM 
    modes is greater than 255. 
    Users 
    BswM_UserType 
    uint16 
    Data type that identifies a  0 … 65535  
    BswM User that makes 
    Used if the total number of 
    mode requests to the 
    users is greater than 255. 
    BswM. 
    BswM_HandleType 
    uint8 / uint16  Data type which is used 
    0 … 65535  
    for action list and rule IDs.  Depends on number of action 
    lists and rules. 
    Table 5-1 
    Type definitions 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    34 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2 
    Services Provided by BswM 
    5.2.1 
    BswM_InitMemory 
    Prototype 
    void BswM_InitMemory (void) 
    Parameter 
    None 

    Return code 
    void 

    Functional Description 
    Initializes the BSW Mode Manager module variables in case an initializing startup code is not used. This 
    function sets the BswM into an uninitialized state. 
    Particularities and Limitations 
    >  If this function is used it shall be called before any other BSWM function after startup. 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call Context 
    >  This function can be called from task context. 
    Table 5-2   BswM_InitMemory 
    5.2.2 
    BswM_Init 
    Prototype 
    void BswM_Init (const BswM_ConfigType *ConfigPtr) 
    Parameter 
    ConfigPtr 
    Pointer to post-build configuration data. For the pre-compile case a NULL 
    pointer shall be used. 
    Return code 
    void 

    Functional Description 
    Initializes the BSW Mode Manager. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call Context 
    >  This function can be called from task context. 
    Table 5-3   BswM_Init 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    35 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.3 
    BswM_Deinit 
    Prototype 
    void BswM_Deinit (void) 
    Parameter 
    None 

    Return code 
    void 

    Functional Description 
    Deinitializes the BSW Mode Manager. All pending requests are cleared and no further mode requests are 
    accepted by the BswM. This state can only be left by calling the function BswM_Init(). 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call Context 
    >  This function can be called from task context. 
    Table 5-4   BswM_Deinit 
    5.2.4 
    BswM_GetVersionInfo 
    Prototype 
    void BswM_GetVersionInfo (Std_VersionInfoType *VersionInfo) 
    Parameter 
    VersionInfo 
    Pointer to address where the version information shall be copied to. 
    Return code 
    void 
    None 
    Functional Description 
    Returns the version information of this module.  
    The versions are BCD-coded. 
    Particularities and Limitations 
    >  The caller must ensure to allocate a variable of the type Std_VersionInfoType before the function call. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-5   BswM_GetVersionInfo 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    36 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.5 
    BswM_RequestMode 
    Prototype 
    void BswM_RequestMode (BswM_UserType requesting_user, 
     
    BswM_ModeType requested_mode) 
    Parameter 
    requesting_user 
    The user that requests the mode. 
    requested_mode 
    The requested mode. 
    Return code 
    void 

    Functional Description 
    Generic function call to request modes. This function shall only be used by other BSW modules that do not 
    have a specific mode request interface and/or for generic mode requests. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different users. 
    >  This function is only allowed to be used by applications for generic mode requests. Otherwise, 
    applications must not use this function. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-6   BswM_RequestMode 
    5.2.6 
    BswM_ComM_CurrentMode 
    Prototype 
    void BswM_ComM_CurrentMode 
    NetworkHandleType Network, 
     
    ComM_ModeType RequestedMode) 
    Parameter 
    Network 
    The ComM communication channel that the indicated state corresponds to. 
    RequestedMode 
    The current state of the ComM communication channel 
    Return code 
    void 

    Functional Description 
    Function called by ComM to indicate the current communication mode of a ComM channel. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  Must only be called by the ComM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-7   BswM_ComM_CurrentMode 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    37 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.7 
    BswM_ComM_CurrentPNCMode 
    Prototype 
    void BswM_ComM_CurrentPNCMode 
    PNCHandleType PNC, 
     
    ComM_PncModeType RequestedMode) 
    Parameter 
    PNC 
    The handle of the PNC for which the current state is reported. 
    RequestedMode 
    The current mode of the PNC. 
    Return code 
    void 

    Functional Description 
    Function called by ComM to indicate the current mode of the PNC. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different PNCs. 
    >  Must only be called by the ComM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-8   BswM_ComM_CurrentPNCMode 
    5.2.8 
    BswM_ComM_InitiateReset 
    Prototype 
    void BswM_ComM_InitiateReset (void) 
    Parameter 
    void 

    Return code 
    void 

    Functional Description 
    Function called by ComM to request a ECU reset. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  Must only be called by the ComM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-9   BswM_ComM_InitiateReset 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    38 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.9 
    BswM_Dcm_ApplicationUpdated 
    Prototype 
    void BswM_Dcm_ApplicationUpdated (void) 
    Parameter 
    None 

    Return code 
    void 

    Functional Description 
    Function called by DCM to inform the BswM that the application has being updated. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  Must only be called by the Dcm. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-10   BswM_Dcm_ApplicationUpdated 
    5.2.10  BswM_Dcm_CommunicationMode_CurrentState 
    Prototype 
    void BswM_Dcm_CommunicationMode_CurrentState 
    (NetworkHandleType Network, Dcm_CommunicationModeType RequestedMode) 
    Parameter 
    Network 
    The communication channel that the diagnostic mode corresponds to. 
    RequestedMode 
    The requested diagnostic communication mode. 
    Return code 
    void 

    Functional Description 
    Function called by DCM to inform the BswM about the current state of the communication mode. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  Must only be called by the Dcm. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-11   BswM_Dcm_CommunicationMode_CurrentState 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    39 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.11  BswM_CanSM_CurrentState 
    Prototype 
    void BswM_CanSM_CurrentState ( NetworkHandleType Network, 
     
    CanSM_BswMCurrentStateType CurrentState) 
    Parameter 
    Network 
    The CAN channel that the indicated state corresponds to. 
    CurrentState 
    The current state of the CAN channel. 
    Return code 
    void 

    Functional Description 
    Function called by CanSM to indicate its current state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  Must only be called by the CanSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-12   BswM_CanSM_CurrentState 
    5.2.12  BswM_EthIf_PortGroupLinkStateChg 
    Prototype 
    void BswM_EthIf_PortGroupLinkStateChg (  EthIf_SwitchPortGroupIdxType 
    PortGroupIdx,  
    EthTrcv_LinkStateType PortGroupState) 
    Parameter 
    PortGroupIdx 
    The port group index in the context of the Ethernet Interface. 
    PortGroupState 
    The current state of the port group. 
    Return code 
    void 

    Functional Description 
    Function called by EthIf to indicate the link state change of a certain ethernet switch port group. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different ethernet port groups. 
    >  Must only be called by the EthIf. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-13   BswM_EthIf_PortGroupLinkStateChg 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    40 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.13  BswM_EthSM_CurrentState 
    Prototype 
    void BswM_EthSM_CurrentState ( NetworkHandleType Network, 
     
    EthSM_NetworkModeStateType CurrentState) 
    Parameter 
    Network 
    The Ethernet channel that the indicated state corresponds to. 
    CurrentState 
    The current state of the Ethernet channel. 
    Return code 
    void 

    Functional Description 
    Function called by EthSM to indicate its current state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  Must only be called by the EthSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-14   BswM_EthSM_CurrentState 
    5.2.14  BswM_FrSM_CurrentState 
    Prototype 
    void BswM_FrSM_CurrentState ( NetworkHandleType Network, 
     
    FrSM_BswM_StateType CurrentState) 
    Parameter 
    Network 
    The FlexRay cluster that the indicated state corresponds to. 
    CurrentState 
    The current state of the FlexRay cluster. 
    Return code 
    void 

    Functional Description 
    Function called by FrSM to indicate its current state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by the FrSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-15   BswM_FrSM_CurrentState 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    41 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.15  BswM_J1939DcmBroadcastStatus 
    Prototype 
    void BswM_J1939DcmBroadcastStatus ( uint16 NetworkMask) 
    Parameter 
    NetworkMask 
    Mask  containing  one  bit  for  each  available  network.  1:Network enabled  
    0: Network disabled. 
    Return code 
    void 

    Functional Description 
    This  API  tells  the  BswM  the  desired  communication  status  of  the  available networks. The status will 
    typically be activated via COM I-PDU group switches. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function must only be called by the J1939Dcm. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-16   BswM_J1939DcmBroadcastStatus 
    5.2.16  BswM_J1939Nm_StateChangeNotification 
    Prototype 
    void BswM_J1939Nm_StateChangeNotification ( NetworkHandleType Network, 
     
    uint8 Node, Nm_StateType NmState) 
    Parameter 
    Network 
    Identification of the J1939 channel. 
    Node 
    Identification of the J1939 node 
    NmState 
    Current (new) state of the J1939 node 
    Return code 
    void 

    Functional Description 
    Notification of current J1939Nm state after state changes. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different combinations of network and node. 
    >  This function must only be called by the J1939Nm. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-17   BswM_J1939Nm_StateChangeNotification 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    42 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.17  BswM_LinSM_CurrentState 
    Prototype 
    void BswM_LinSM_CurrentState ( NetworkHandleType Network, 
     
    LinSM_ModeType CurrentState) 
    Parameter 
    Network 
    The LIN channel that the indicated state corresponds to. 
    CurrentState 
    The current state of the LIN channel. 
    Return code 
    void 

    Functional Description 
    Function called by LinSM to indicate its current state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by the LinSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-18   BswM_LinSM_CurrentState 
    5.2.18  BswM_LinSM_CurrentSchedule 
    Prototype 
    void BswM_LinSM_CurrentSchedule ( NetworkHandleType Network, 
     
    LinIf_SchHandleType CurrentSchedule) 
    Parameter 
    Network 
    The LIN channel that the indicated schedule corresponds to. 
    CurrentSchedule 
    The currently active schedule table of the LIN channel. 
    Return code 
    void 

    Functional Description 
    Function called by LinSM to indicate its current schedule. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by the LinSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-19   BswM_LinSM_CurrentSchedule 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    43 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.19  BswM_LinSM_ScheduleEndNotification 
    Prototype 
    void BswM_LinSM_ScheduleEndNotification (NetworkHandleType Network, 
     
    LinIf_SchHandleType Schedule) 
    Parameter 
    Network 
    The LIN channel that the indicated schedule corresponds to. 
    Schedule 
    The schedule table of the LIN channel wich has ended. 
    Return code 
    void 

    Functional Description 
    Function called by LinSM to notify the end of a schedule. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by the LinSM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-20   BswM_LinSM_ScheduleEndNotification 
    5.2.20  BswM_LinTp_RequestMode 
    Prototype 
    void BswM_LinTp_RequestMode ( NetworkHandleType Network, 
     
    LinTp_Mode LinTpRequestedMode) 
    Parameter 
    Network 
    The LIN channel that the LIN TP mode request corresponds to. 
    LinTpRequestedMode 
    The requested LIN TP mode. 
    Return code 
    void 

    Functional Description 
    Function called by LinTp to request a mode for the corresponding LIN channel. The LinTp_Mode mainly 
    correlates to the LIN schedule table that should be used. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by the LinTp. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-21   BswM_LinTp_RequestMode 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    44 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.21  BswM_EcuM_CurrentState 
    Prototype 
    void BswM_EcuM_CurrentState (EcuM_StateType CurrentState) 
    Parameter 
    CurrentState 
    The requested ECU Operation Mode 
    Return code 
    void 

    Functional Description 
    Function called by EcuM to indicate the current ECU Operation Mode. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  Must only be called by the EcuM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-22   BswM_EcuM_CurrentState 
    5.2.22  BswM_EcuM_CurrentWakeup 
    Prototype 
    void BswM_EcuM_CurrentWakeup ( EcuM_WakeupSourceType source, 
     
    EcuM_WakeupStateType state) 
    Parameter 
    source 
    Wakeup source(s) that changed state. 
    state 
    The new state of the wakeup source(s). 
    Return code 
    void 

    Functional Description 
    Function called by EcuM to indicate the current state of a wakeup source. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different sources. 
    >  Must only be called by the EcuM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-23   BswM_EcuM_CurrentWakeup 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    45 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.23  BswM_EcuM_RequestedState 
    Prototype 
    void BswM_ EcuM_RequestedState ( EcuM_StateType State, 
     
    EcuM_RunStatusType CurrentStatus) 
    Parameter 
    State 
    The requested state by EcuMFlex. 
    CurrentStatus 
    The new result of the Run Request Protocol. 
    Return code 
    void 

    Functional Description 
    Function called by EcuM to indicate the request of a run request protocol state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different states. 
    >  Must only be called by the EcuM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-24   BswM_EcuM_RequestedState 
    5.2.24  BswM_MainFunction 
    Prototype 
    void BswM_MainFunction (void) 
    Parameter 
    None 

    Return code 
    void 

    Functional Description 
    Main function of the BswM. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function must be called with the configured cycle time by the SchM [6]. 
    Call Context 
    >  This function can be called from task context. 
    Table 5-25   BswM_MainFunction 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    46 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.25  BswM_NvM_CurrentBlockMode 
    Prototype 
    void BswM_NvM_CurrentBlockMode(NvM_BlockIdType Block, 
     
    NvM_RequestResultType CurrentBlockMode) 
    Parameter 
    Block 
    The Block that the new NvM Mode corresponds to. 
    CurrentBlockMode 
    The current block mode of the NvM block. 
    Return code 
    void 

    Functional Description 
    Function  called  by  NvM  to  indicate  the  current  block  mode  of  an  NvM  block. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different blocks. 
    >  This function must only be called by NvM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-26   BswM_NvM_CurrentBlockMode 
    5.2.26  BswM_NvM_CurrentJobMode 
    Prototype 
    void BswM_NvM_CurrentJobMode(uint8 ServiceId, 
     
    NvM_RequestResultType CurrentJobMode) 
    Parameter 
    ServiceId 
    Indicates  whether  the  callback  refers  to  multi  block  services  
    NvM_ReadAll or NvM_WriteAll. 
    CurrentJobMode 
    Current  state  of  the  multi  block  job  indicated  by  parameter  
    ServiceId. 
    Return code 
    void 

    Functional Description 
    Function called by NvM to inform the BswM about the current state of a multi block job. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different services. 
    >  This function must only be called by NvM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    47 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Table 5-27   BswM_NvM_CurrentJobMode 
    5.2.27  BswM_PduR_RxIndication 
    Prototype 
    void BswM_PduR_RxIndication(PduIdType RxPduId, 
     
    const PduInfoType *PduInfoPtr) 
    Parameter 
    RxPduId 
    The PduR ID of received PDU. 
    PduInfoPtr 
    Pointer which stores all informations about the PDU. Not used by current 
    implementation. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about a received PDU. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for a RxPduId which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-28   BswM_PduR_RxIndication 
    5.2.28  BswM_PduR_TpRxIndication 
    Prototype 
    void BswM_PduR_TpRxIndication(PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    The PduR ID of received PDU. 
    result 
    Result of the reception. Not used by current implementation. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about a received TP PDU. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for an id which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-29   BswM_PduR_TpRxIndication 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    48 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.29  BswM_PduR_TpStartOfReception 
    Prototype 
    void BswM_PduR_TpStartOfReception ( PduIdType id, PduInfoType *info, 
     
    PduLengthType TpSduLength,PduLengthType *bufferSizePtr) 
    Parameter 
    id 
    The PduR ID of received PDU. 
     
    info 
    Pointer which stores all informations about the PDU. Not used by current 
    implementation. 
    TpSduLength 
    Total length of the I-PDU to be received. Not used by current implementation. 
    bufferSizePtr 
    Pointer to the receive buffer. Not used by current implementation. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about the start of TP PDU Reception. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for an id which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-30   BswM_PduR_TpStartOfReception 
    5.2.30  BswM_PduR_TpTxConfirmation 
    Prototype 
    void BswM_PduR_TpTxConfirmation(PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    The PduR ID of sent TP PDU. 
    result 
    Result of the transmission. Not used by current implementation. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about a sent TP PDU. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for an id which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    49 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Table 5-31   BswM_PduR_TpTxConfirmation 
    5.2.31  BswM_PduR_Transmit 
    Prototype 
    void BswM_PduR_Transmit( PduIdType id, const PduInfoType *PduInfoPtr) 
    Parameter 
    id 
    The PduR ID of PDU to transmit. 
    PduInfoPtr 
    Pointer which stores all informations about the PDU. Not used by current 
    implementation. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about a PDU Transmit Event 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for an id which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-32   BswM_PduR_Transmit 
    5.2.32  BswM_PduR_TxConfirmation 
    Prototype 
    void BswM_PduR_TxConfirmation( PduIdType TxPduId ) 
    Parameter 
    TxPduId 
    The PduR ID of sent PDU. 
    Return code 
    void 

    Functional Description 
    Function called by PduR to inform the BswM about a sent PDU. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for a TxPduId which does not belong to the same configured port. 
    >  This function must only be called by the PduR. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-33   BswM_PduR_TxConfirmation 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    50 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.33  BswM_Sd_EventHandlerCurrentState 
    Prototype 
    void BswM_Sd_EventHandlerCurrentState(uint16 SdEventHandlerHandleId, 
     
    Sd_EventHandlerCurrentStateType EventHandlerStatus ) 
    Parameter 
    SdEventHandlerHandleId  HandleId to identify the EventHandler 
    EventHandlerStatus 
    Status of the EventHandler 
    Return code 
    void 

    Functional Description 
    Function  called  by  Service  Discovery  to  indicate  current  status  of  the EventHandler 
    (requested/released). 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different handles. 
    >  This function must only be called by Sd. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-34   BswM_Sd_EventHandlerCurrentState 
     
    5.2.34  BswM_Sd_ClientServiceCurrentState 
    Prototype 
    void BswM_Sd_ClientServiceCurrentState(uint16 SdClientServiceHandleId, 
     
    Sd_ClientServiceCurrentStateType CurrentClientState) 
    Parameter 
    SdClientServiceHandleId  HandleId to identify the ClientService. 
    CurrentClientState 
    Current state of the ClientService. 
    Return code 
    void 

    Functional Description 
    Function called by Service Discovery to indicate current state of the Client Service (available/down). 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different handles. 
    >  This function must only be called by Sd. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    51 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Table 5-35   BswM_Sd_ClientServiceCurrentState 
    5.2.35  BswM_Sd_ConsumedEventGroupCurrentState 
    Prototype 
    void BswM_Sd_ConsumedEventGroupCurrentState
     
    uint16 SdConsumedEventGroupHandleId, 
     
    Sd_ConsumedEventGroupCurrentStateType ConsumedEventGroupState) 
    Parameter 
    SdConsumedEventGroupHandleId  HandleId  to  identify  the  Consumed Eventgroup. 
    ConsumedEventGroupState 
    Status of the Consumed Eventgroup. 
    Return code 
    void 

    Functional Description 
    Function called by Service Discovery to indicate current status of the Consumed Eventgroup 
    (available/down). 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different handles. 
    >  This function must only be called by Sd. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-36   BswM_Sd_ConsumedEventGroupCurrentState 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    52 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.36  BswM_Nm_StateChangeNotification 
    Prototype 
    void BswM_Nm_StateChangeNotification(NetworkHandleType nmNetworkHandle, 
     
    Nm_StateType nmPreviousState, 
     
    Nm_StateType nmCurrentState) 
    Parameter 
    nmNetworkHandle 
    Identification of the NM-channel 
    nmPreviousState 
    Previous state of the NM-channel (Parameter not used) 
    nmCurrentState 
    Current (new) state of the NM-channel 
    Return code 
    void 

    Functional Description 
    Function called by Nm to inform the BswM about its current state. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different networks. 
    >  This function must only be called by Nm. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-37   BswM_Nm_StateChangeNotification 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    53 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.2.37  BswM_RuleControl 
    Prototype 
    void BswM_RuleControl (BswM_HandleType ruleId, uint8 state) 
    Parameter 
    ruleId 
    The external ID of the rule which shall be changed. Symbolic Name Define 
    shall be used. 
    state 
    The new rule state. Following values are valid: 
    Disable Rule: BSWM_DEACTIVATED 
    Enable Rule:  BSWM_UNDEFINED, BSWM_TRUE or BSWM_FALSE 
    Return code 
    void 

    Functional Description 
    Sets a new state to a given rule whereby rule can be enabled or disabled. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant for different rules. 
    >  This function should be called by an action of BswM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-38   BswM_RuleControl 
    5.2.38  BswM_WdgM_RequestPartitionReset 
    Prototype 
    void BswM_WdgM_RequestPartitionReset (ApplicationType Application) 
    Parameter 
    Application 
    The Block that the new NvM Mode corresponds to. 
    Return code 
    void 

    Functional Description 
    Function called  by  WdgM  to request a reset of the corresponding partition of given application. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function must only be called by WdgM. 
    Call Context 
    >  This function can be called from task and interrupt context. 
    Table 5-39   BswM_WdgM_RequestPartitionReset 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    54 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    5.3 
    Services Used by BswM 
    In the following table services provided by other components, which are used by the BswM 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    ComM 
    ComM_CommunicationAllowed 
    ComM 
    ComM_LimitChannelToNoComMode 
    ComM 
    ComM_RequestComMode 
    Com 
    Com_IpduGroupControl 
    Com 
    Com_ReceptionDMControl 
    Com 
    Com_SetIpduGroup 
    Com 
    Com_SwitchIpduTxMode 
    Com 
    Com_TriggerIPDUSend 
    DEM 
    Dem_Init 
    DEM 
    Dem_Shutdown 
    DET 
    Det_ReportError 
    EcuM 
    EcuM_GoDown 
    EcuM 
    EcuM_GoHalt 
    EcuM 
    EcuM_GoPoll 
    EcuM 
    EcuM_SelectShutdownTarget 
    EcuM 
    EcuM_SetState 
    EcuM 
    EcuM_ClearValidatedWakeupEvent 
    J1939Dcm 
    J1939Dcm_SetState 
    J1939Rm 
    J1939Rm_SetState 
    LinSM 
    LinSM_ScheduleRequest 
    Nm 
    Nm_DisableCommunication 
    Nm 
    Nm_EnableCommunication 
    NvM 
    NvM_WriteAll 
    NvM 
    NvM_CancelWriteAll 
    PduR 
    PduR_EnableRouting 
    PduR 
    PduR_DisableRouting 
    RTE 
    Rte mode switch. The API name is configurable.  
    SchM 
    SchM_Enter_BswM_BSWM_EXCLUSIVE_AREA_0 
    SchM 
    SchM_Exit_BswM_BSWM_EXCLUSIVE_AREA_0 
    Sd 
    Sd_ConsumedEventGroupSetState 
    Sd 
    Sd_ClientServiceSetState 
    Sd 
    Sd_ServerServiceSetState 
    Table 5-40   Services used by the BswM 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    55 
    based on template version 4.11.3 




    Technical Reference Basic Software Mode Manager 
    5.4 
    Callback Functions 
    There are no callback functions in the BswM. 
    5.5 
    Configurable Interfaces 
     
    5.5.1 
    Callout Functions 
    A User Callout Function can be used as an item of an Action List. If the declaration of the 
    callout  function  already  exists,  the  integrator  must  provide  an  extern  declaration  of  the 
    function via a user include file.  
     
     
    Figure 5-1  Existing callout functions 
     
    If the BswM is to generate the user callout prototype: the checkbox “Create Callout” should 
    be set and the parameter prototypes should be defined in the given field as list separated 
    with semicolons. The function prototype is generated in “BswM_Callout_Stubs.c” 
     
    Figure 5-2  Generate prototype of callout functions 
    The BswM callout function declaration is described in the following table: 
    Prototype 
    void [Callout Function Name] ( <parameters> ) 
    Parameter 


    Return code 


    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    56 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    Functional Description 
    If a User Callout is configured as an item of an Action List the BswM calls this function in the context of the 
    appropriate rule. 
    Particularities and Limitations 

    Call context 
    >  Interrupt or task context, depends on the mode/rule configuration in which the callout is used. 
    Table 5-41  User Callout 
    5.6 
    Service Ports 
    The BswM has a service component which depends on the following containers: 
    >  BswMSwcModeRequest  
    >  BswMSwcModeNotification 
    >  BswMSwitchPort 
    >  BswMModeDeclaration 
    These containers are described in the following chapters. 
     
    5.6.1 
    BswMSwcModeRequest (R-Port) 
    BswM is able to receive modes by Sender-Receiver mode ports (Require Port). This can 
    be done by using BswMSwcModeRequest. 
    The BswMSwcModeRequest has a reference to a Mode-Declaration-Group-Prototype and 
    an Instance-Reference to a VARIABLE-DATA-PROTOTYPE. If the reference to the Mode-
    Declaration-Group-Prototype is configured, it is not possible to determine a relationship to 
    a Sender-Receiver-Interface. Therefore, it is necessary to create a new  Sender-Receiver-
    Interface.  The  given  BswMModeRequestDataElementPrototypeName  will  be  used  as 
    DataElement name.  
    Sender-Receiver-Interfaces are named  
    >  BswM_SRI_{  Mode-Switch-Interface  Name}_{  Mode-Declaration-Group-Prototype 
    Name} 
    If the Instance-Reference to a VARIABLE-DATA-PROTOTYPE is used, BswM reuses the 
    existing Sender-Receiver interface. 
    In both cases, created Ports are named: 
    >  Receive_{Name of BswMSwcModeRequest} 
     
    5.6.2 
    BswMSwcModeNotification (R- Port) 
    BswM is able to receive modes by Mode-Switch mode ports (Require Port). This can be 
    done by using BswMSwcModeNotification. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    57 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    The BswM has a reference to a Mode-Declaration-Group-Prototype. From this prototype it 
    is possible to determine a Mode-Switch-Interface which will be reused for the created port.  
    Created ports are named: 
    >  Notification_{ BswMSwcModeNotification Name } 
     
    5.6.3 
    BswMSwitchPort (P- Port) 
    BswM  is  able  to  switch  modes  by  Mode-Switch  mode  ports  (Provide  Port).  This  can  be 
    done  by  using  a  BswMSwitchPort.  The  BswM  has  a  reference  to  a  Mode  Declaration 
    Group Prototype. From this prototype it is possible to determine a Mode-Switch-Interface 
    which will be reused for the created port.  
    Created ports are named: 
    >  Switch_{ BswMSwitchPort Name } 
     
    5.6.4 
    BswMRteModeRequestPort (P-Ports) 
    BswM is able to send modes by Sender-Receiver mode ports (Require Port). This can be 
    done  by  using  a  port  of  type  BswMRteModeRequestPort  in  a  BswMRteModeRequest 
    action.  The  BswM  uses  an  Instance-Reference  to  a  VARIABLE-DATA-PROTOTYPE, 
    which represents the DataElement of an already existing Sender-Receiver-Interface. This 
    interface is used by the created P-Port. 
    Created ports are named: 
    >  Provide_{ BswMRteModeRequestPort Name } 
     
    5.6.5 
    BswMModeDeclaration  
    To facilitate SWC ModeRequest Handling, the BswM is able to provide Mode-Declarations 
    by itself. To use this, a BswMModeDeclaration container with corresponding modes can be 
    created.  The  BswM  SWC  Validation  creates  automatically  a  Mode-Declaration,  the 
    corresponding  Implementation-Type  and  a  Mode-Switch-Interface  with  a  Mode-
    Declaration-Group-Prototype.  
    The Mode-Switch-Interface is named: 
    >  BswM_MSI_{Name of BswMModeDeclaration} 
    The corresponding Mode-Declaration-Group-Prototype is named: 
    >  BswM_MDGP_{Name of BswmModeDeclaration} 
    The Implementation-Type is named: 
    >  BswM_{Name of BswMModeDeclaration} 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    58 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    6  AUTOSAR Standard Compliance 
    6.1 
    Deviations 
     
    6.1.1 
    Inclusion of the header Com_Types.h 
    A  non-AUTOSAR  header  is  used  within  the  code.  The  source  file  BswM_Cfg.h  includes 
    Com_Types.h.  This  header  has  been  included  because  it  defines  the  type 
    Com_IpduGroupIdType. 
    In case the project in use does not contain a MICROSAR Com module, it is necessary to 
    add  a  header  file  with  the  name  “Com_Types.h”,  which  defines  the  type 
    “Com_IpduGroupIdType”.  
     
    6.1.2 
    Port Names 
    Notice that in the BswM AUTOSAR SWS the name of the ports is specified as: 
    modeNotificationPort_{Name} 
    modeRequestPort_{Name} 
    modeSwitchPort_{Name} 
     
    However, the structure of the name port is as follows: 
    Notification_{Name} 
    Request_{Name} 
    Switch_{Name} 
     
    Furthermore, BswMRteModeRequestPort are named: 
    Provide_{Name} 
    6.2 
    Additions/ Extensions 
    6.2.1 
    Optional Interfaces 
    The BswM supports the following “Optional Interfaces” defined in [1] [BswM0008]:  
    >  ComM_LimitChannelToNoComMode 
    >  ComM_RequestComMode 
    >  Com_ClearIpduGroupVector  
    >  Com_IpduGroupControl 
    >  Com_ReceptionDMControl 
    >  Com_SetIpduGroup 
    >  Com_IpduGroupStart 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    59 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    >  Com_IpduGroupStop 
    >  Com_EnableReceptionDM 
    >  Com_DisableReceptionDM 
    >  Com_SwitchIpduTxMode 
    >  Det_ReportError 
    >  EcuM_GoDown 
    >  EcuM_GoHall 
    >  EcuM_GoPoll 
    >  EcuM_SelectShutdownTarget 
    >  J1939Dcm_SetState 
    >  J1939Rm_SetState 
    >  LinSM_ScheduleRequest 
    >  Nm_DisableCommunication 
    >  Nm_EnableCommunication 
    >  Sd_ClientServiceSetState 
    >  Sd_ConsumedEventGroupSetState 
    >  Sd_ServerServiceSetState 
     
     
    6.2.2 
    Nm Indication 
    BswM supports the NM indication by using the API “BswM_Nm_StateChangeNotification”. 
    The mode request source is of type “BswMNMIndication”. In order to use this feature the 
    Nm module must be configured as follows: 
    >  NmStateChangeIndEnabled must be set to true 
    >  NmStateChangeIndCallback must be set to “BswM_Nm_StateChangeNotification” 
    >  NmCallbacksPrototypeHeader  must  be  set  to  “BswM_Nm.h”  (or  any  other  header 
    which includes BswM_Nm.h) 
     
    6.2.3 
    User Condition Functions 
    A User Condition Function can be used in a Rule Condition. The  integrator must provide 
    an extern declaration of the function via an application header file.  
    In  the  same  manner,  with  the  request  port  of  type  “User  Condition”,  it  is  possible  to 
    compare any variable. 
    The integrator must make sure that the return value of the function is compatible with the 
    value to compare with. 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    60 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    6.2.4 
    Creation of Mode Declarations 
    The  BswM  is  able  to  provide  Mode  Declarations  by  itself  in  order  to  facilitate  the  SWC 
    Mode Request Handling. For further information see 5.6.5. 
     
    6.2.5 
    Timers 
    A  Timer  offers  the  possibility  to  execute  action  time  dependently.  Therefore,  a  Mode 
    Request Port of type BswMTimer must be created. This port represents a timer which can 
    be started and stopped by a BswMTimerControl Action. The value for the timer start can 
    be set in the TimerControlAction.  
    The timer should be a multiple of the BswMMainFunctionPeriod (timer is decreased in the 
    MainFunction).  In  case  the  timer  is  not  multiple  of  the  main  function  period,  it  will  be 
    rounded up.  The timer must be used in a condition to trigger the corresponding actions. 
    The state of a timer can be STARTED, STOPPED or EXPIRED. 
     
    6.2.6 
    Generic Symbolic Values 
    Generic ports offer the possibility to define Symbolic Values. In order to realize this, create 
    a BswMGenericRequestMode inside the BswMGenericRequest container. These Symbolic 
    Values are necessary for the Generic Actions (see chapter 6.2.7). 
     
    6.2.7 
    Generic Actions 
    BswM  supports  setting  a  generic  mode  by  an  action.  In  order  to  configure  it,  a 
    BswMGenericModeSwitch  action  must  be  created.  Here,  the  generic  mode  and  the 
    corresponding value can be chosen. 
     
    6.2.8 
     Immediate request in BswM_Init() 
    All  configured  immediate  request  are  processed  once  within  the  function  BswM_Init,  in 
    order  to  arbitrate  the  initial  states.  This  behavior  can  be  changed  for  each  port  in  the 
    configuration. 
     
    6.2.9 
    Mode Handling Forced Immediate 
    The  additional  mode  handling  type  “Forced  Immediate”  allows  mode  requests  to  be 
    executed immediately interrupting other requests. For more information see chapter 3.4.2. 
     
    6.2.10  Rule Control 
    If Rule Control is used, rules can be activated or deactivated during runtime. Furthermore, 
    rules  can  be  deactivated  in  configuration  by  using  BSWM_DEACTIVATED  as  initialization 
    value. For further information see 5.2.37. 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    61 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    6.2.11  Support of Com ASR3 IPduGroup APIs 
    If Microsar Com is used and Com is configured to use ASR3 IPduGroup APIs, BswM will 
    use the following APIs in its IPduGroup actions instead of the ASR4 APIs: 
    >  Com_IpduGroupStart 
    >  Com_IpduGroupStop 
    >  Com_EnableReceptionDM 
    >  Com_DisableReceptionDM 
    For further information see [8]. 
    6.3 
    Limitations 
    6.3.1 
    Configurable interfaces that are not supported  
    6.3.1.1 
    EcuM Indication for EcuM Flex 
    The ModeRequestPort of type EcuMIndication is not supported for MICROSAR EcuM Flex 
    without  enabled  ModeHandling.  This  is  due  to  the  fact,  that  BswM  calls  most  of  EcuM 
    Function itself. So, the notifications from EcuM to BswM will be done in the context of the 
    BswM and this leads to a queued processing of mode changes. 
    If EcuM notifies more than one mode change, previously notified mode changes get lost 
    and Rules which should be triggered to this mode will be skipped. As this is not the desired 
    behavior, the EcuM Indication is no longer supported during configuration of the module. 
     
    6.3.2 
    Optional Interfaces 
    Within  the  predefined  actions,  the  BswM  does  not  support  the  following  “Optional 
    Interfaces” defined by [1] [BswM0008]:  
    >  ComM_GetCurrentComMode  
    >  ComM_GetInhibitionStatus  
    >  ComM_GetMaxComMode 
    >  ComM_GetRequestedComMode 
    >  ComM_GetStatus 
    >  ComM_GetVersionInfo 
    >  ComM_LimitECUToNoComMode 
    >  ComM_MainFunction_<Channel_Id> 
    >  ComM_PreventWakeUp 
    >  ComM_ReadInhibitCounter 
    >  ComM_ResetInhibitCounter 
    >  ComM_SetECUGroupClassification 
    >  ControlIdle 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    62 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    6.3.3 
    Configuration Variants 
    Configuration variant Link-Time is not supported. 
     
    6.3.4 
    BSW Modules 
    Only  these  BSW  Modules  are  supported  for  mode  indications  and  arbitrations:  CanSM, 
    ComM, Dcm, EcuM, EthIf, EthSm, FrSM, J1939Dcm, J1939Nm, LinSM, LinTp, Nm, NvM , 
    Sd, WdgM and RTE. 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    63 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator  Generation tool for MICROSAR components 
     
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CAN 
    Controller Area Network 
    Com 
    Communication (AUTOSAR BSW) 
    ComM 
    Communication Manager 
    CanSM 
    CAN State Manager 
    DCM 
    Diagnostic Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    ECUM 
    ECU Manager 
    EthIf 
    Ethernet Interface 
    EthSM 
    Ethernet State Management 
    Fr 
    FlexRay 
    FrSM 
    FlexRay State Manager 
    HIS 
    Hersteller Initiative Software 
    I-PDU 
    Interaction Layer Protocol Data Unit 
    ISR 
    Interrupt Service Routine 
    J1939Dcm 
    J1939 Diagnostic Communication Manager 
    J1939Nm 
    J1939 Network Manager 
    J1939Rm 
    J1939 Request Manager 
    LIN 
    Local Interconnect Network 
    LinIf 
    LIN Interface 
    LinSM 
    LIN State Manager 
    LinTp 
    LIN Transport Protocol 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    Nm 
    Network Manager 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    64 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    NvM 
    Non-Volatile RAM Manager 
    PduR 
    Protocol Data Unit Router 
    PNC 
    Partial Networking Cluster 
    RAM 
    Random Access Memory 
    RTE 
    Runtime Environment 
    Sd 
    Service Discovery 
    SchM 
    Schedule Manager 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 7-1 
    Abbreviations 
     
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    65 
    based on template version 4.11.3 


    Technical Reference Basic Software Mode Manager 
    8  Contact 
    Visit our website for more information on 
     
      News 
      Products 
      Demo Software 
      Support 
      Training data 
      Addresses 
     
    www.vector.com 
    © 2016 Vector Informatik GmbH 
    Version 7.00.00 
    66 
    based on template version 4.11.3 

    Document Outline


    1.3.66 - TechnicalReference_CanIf

    CAN Interface

    1.3.68 - TechnicalReference_CanIfs


     
      
     
     
     
     
     
     
     
     
     
     
    CAN Interface 
    Technical Reference 
     
     
      
    Version 6.10.00 
     
     
     
     
     
     
     
     
     
     
    Authors 
    Rüdiger Naas, Eugen Stripling 
    Versions: 
    6.10.00 
    Status: 
    Released 
     
     
     
     
     
     


    Technical Reference CAN Interface  
    1  Document Information 
    1.1 
    History 
    Author 
    Date 
    Version  Remarks 
    Eugen Stripling 
    2012-07-17 
    5.00 
    ASR R4.0 Rev 3 
    Rüdiger Naas 
    Eugen Stripling 
    2013-04-03 
    5.01.00  ESCAN00065368 
    ESCAN00066338 
    ESCAN00066340 
    Adapted according to 
    ESCAN00066285 
    Adapted according to 
    ESCAN00065289 
    ESCAN00066396 
    Adapted according to 
    ESCAN00064304 
    Rüdiger Naas 
    2013-07-24 
    5.01.01  ESCAN00066794 
    Eugen Stripling 
    2013-09-27 
    6.00.00  Adapted due to: 
    AR4-307: J1939 support 
    AR4-438: Dynamic address lookup 
    table 
    AR4-397: CAN FD support 
    Eugen Stripling 
    2014-05-19 
    6.01.00  CAN FD support extended: Rx-FD 
    and Rx- and Tx-PDUs with up to 
    64 bytes payload 
    Rüdiger Naas 
    2014-07-10 
    6.02.00  Multiple CAN driver support 
    Eugen Stripling 
    2014-08-25 
    6.02.00  ESCAN00077304, Restriction 
    concerning the handling of 
    FD/Not-FD FullCAN-Rx-PDUs 
    added 
    Eugen Stripling 
    2014-09-22 
    6.02.00  ESCAN00078524, CanTSyn added, 
    Post-build selectable 
    Eugen Stripling 
    2014-11-25 
    6.03.00  Channel specific J1939 dynamic 
    address  
    Eugen Stripling 
    2015-01-26 
    6.04.00  Chapter 3.8 adapted to changed 
    implementation 
    Eugen Stripling 
    2015-05-18 
    6.05.00  Adapted due to FEAT-366 
    Eugen Stripling 
    2015-11-20 
    6.06.00  Adapted due to FEAT-1429 
    Eugen Stripling 
    2016-01-09 
    6.06.00  ESCAN00087340 
    Eugen Stripling 
    2016-02-22 
    6.07.00  Feature Extended RAM-check 
    added, ESCAN00087587 
    Eugen Stripling 
    2016-06-24 
    6.08.00  Feature: Data checksum added 
    Eugen Stripling 
    2016-09-14 
    6.09.00  Adapted due to FEAT-2076: 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 



    Technical Reference CAN Interface  
    Behavior of Tx-PDU filter extended 
    Eugen Stripling 
    2016-09-26 
    6.09.00  Adapted due to FEAT-2024: Set 
    reception mode 
    Eugen Stripling 
    2017-01-09 
    6.10.00  Improved due to ESCAN00093454 
    Eugen Stripling 
    2017-02-13 
     
    Adapted due to: FEAT-2140: TMC 
    Checksum - Release feature FEAT-
    1914 
    Eugen Stripling 
    2017-02-28 
     
    ESCAN00094196, deviation from 
    AUTOSAR documented by 
    ESCAN00094121 added 
    Table 1-1   History of the Document 
    1.2 
    Reference Documents 
    No. 
    Title 
    Version 
    5.0.0 
    [1]   AUTOSAR_SWS_CANInterface.pdf 
    6.0.0 
    [2]   AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR_SRS_BSWGeneral.pdf 
    3.2.0 
    Table 1-2   References Documents 
     
    Please note 
    We have configured the programs in accordance with your specifications in the 
     
    questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Contents 
    1 
    Document Information ......................................................................................................2 
    1.1 

    History ....................................................................................................................2 
    1.2 
    Reference Documents ...........................................................................................3 
    2 
    Introduction ........................................................................................................................9 
    2.1 

    Architecture Overview ............................................................................................9 
    3 
    Functional Description ................................................................................................... 11 
    3.1 

    Deviations regarding AUTOSAR standard .......................................................... 11 
    3.2 
    Feature List........................................................................................................... 11 
    3.3 
    Initialization ...........................................................................................................12 
    3.4 
    Transmission ........................................................................................................13 
    3.4.1 
    Dynamic transmission .........................................................................14 
    3.4.2 
    Transmit-buffer .....................................................................................14 
    3.4.3 
    Multiple Transmit-buffers .....................................................................15 
    3.4.4 
    Tx confirmation polling support ...........................................................16 
    3.4.5 
    Data checksum Tx ...............................................................................17 
    3.5 
    Reception .............................................................................................................17 
    3.5.1 
    Ranges .................................................................................................18 
    3.5.2 
    DLC check ...........................................................................................19 
    3.5.3 
    Data checksum Rx...............................................................................19 
    3.5.4 
    Control of reception mode of a Rx-PDU..............................................20 
    3.6 
    Communication Modes ........................................................................................21 
    3.6.1 

    Controller Mode ...................................................................................21 
    3.6.2 
    PDU Mode ...........................................................................................21 
    3.7 
    Polling ...................................................................................................................22 
    3.8 
    CAN FD ................................................................................................................23 
    3.9 
    Meta data Rx- / Tx-support ..................................................................................23 
    3.10 
    J1939 dynamic address support ..........................................................................23 
    3.11 
    Error Notification...................................................................................................24 
    3.12 
    Transceiver handling ............................................................................................30 
    3.13 
    Sleep / WakeUp....................................................................................................31 
    3.14 
    Bus Off ..................................................................................................................33 
    3.15 
    Version Info...........................................................................................................34 
    3.16 
    Partial Networking ................................................................................................35 
    3.17 
    Services used by the CAN Interface ....................................................................36 
    3.18 
    Multiple CAN drivers ............................................................................................36 
    3.19 
    Extended RAM-check ..........................................................................................38 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 


    Technical Reference CAN Interface  
    3.20 
    Critical Sections ....................................................................................................39 
    4 
    Integration ........................................................................................................................41 
    4.1 

    Files and include structure ...................................................................................41 
    4.1.1 

    Static Files ...........................................................................................41 
    4.1.2 
    Dynamic Files ......................................................................................41 
    4.2 
    Include Structure ..................................................................................................42 
    4.3 
    Compiler Abstraction and Memory Mapping ........................................................43 
    5 
    Configuration ...................................................................................................................44 
    5.1 

    Configuration of Post-Build ..................................................................................44 
    6 
    API Description ................................................................................................................45 
    6.1 

    Services provided by the CAN Interface ..............................................................45 
    6.1.1 

    CanIf_GetVersionInfo ..........................................................................45 
    6.1.2 
    CanIf_Init ..............................................................................................45 
    6.1.3 
    CanIf_SetControllerMode ....................................................................46 
    6.1.4 
    CanIf_GetControllerMode....................................................................46 
    6.1.5 
    CanIf_Transmit ....................................................................................47 
    6.1.6 
    CanIf_TxConfirmation ..........................................................................47 
    6.1.7 
    CanIf_RxIndication ..............................................................................48 
    6.1.8 
    CanIf_ControllerBusOff .......................................................................48 
    6.1.9 
    CanIf_SetPduMode .............................................................................49 
    6.1.10 
    CanIf_GetPduMode .............................................................................49 
    6.1.11 
    CanIf_InitMemory ................................................................................50 
    6.1.12 
    CanIf_CancelTxConfirmation ..............................................................50 
    6.1.13 
    CanIf_SetTrcvMode .............................................................................51 
    6.1.14 
    CanIf_GetTrcvMode ............................................................................51 
    6.1.15 
    CanIf_GetTrcvWakeupReason ............................................................52 
    6.1.16 
    CanIf_SetTrcvWakeupMode................................................................52 
    6.1.17 
    CanIf_CheckWakeup ...........................................................................53 
    6.1.18 
    CanIf_CheckValidation ........................................................................53 
    6.1.19 
    CanIf_CancelTransmit .........................................................................54 
    6.1.20 
    CanIf_CancelTxNotification .................................................................54 
    6.1.21 
    CanIf_SetDynamicTxId ........................................................................55 
    6.1.22 
    CanIf_ControllerModeIndication ..........................................................55 
    6.1.23 
    CanIf_TrcvModeIndication ...................................................................56 
    6.1.24 
    CanIf_ConfirmPnAvailability ................................................................56 
    6.1.25 
    CanIf_ClearTrcvWufFlagIndication .....................................................57 
    6.1.26 
    CanIf_CheckTrcvWakeFlagIndication .................................................57 
    6.1.27 
    CanIf_SetBaudrate ..............................................................................58 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.28 
    CanIf_ChangeBaudrate .......................................................................58 
    6.1.29 
    CanIf_ChangeBaudrate .......................................................................59 
    6.1.30 
    CanIf_GetTxConfirmationState ...........................................................59 
    6.1.31 
    CanIf_SetAddressTableEntry ..............................................................60 
    6.1.32 
    CanIf_ResetAddressTableEntry ..........................................................60 
    6.1.33 
    CanIf_RamCheckExecute ...................................................................61 
    6.1.34 
    CanIf_RamCheckEnableMailbox ........................................................61 
    6.1.35 
    CanIf_RamCheckEnableController .....................................................62 
    6.1.36 
    CanIf_RamCheckCorruptMailbox........................................................62 
    6.1.37 
    CanIf_RamCheckCorruptController ....................................................63 
    6.1.38 
    CanIf_SetPduReceptionMode .............................................................63 
    6.2 
    Callout Functions..................................................................................................64 
    6.2.1 

    EcuM_BswErrorHook ..........................................................................64 
    6.2.2 
    CanIf_RxIndicationSubDataChecksumRxVerify .................................64 
    6.2.3 
    CanIf_TransmitSubDataChecksumTxAppend ....................................65 
    7 
    AUTOSAR Standard Compliance ..................................................................................66 
    7.1 

    Not supported AUTOSAR features ......................................................................66 
    7.1.1 

    Tx notification status ............................................................................66 
    7.1.2 
    Rx notification status............................................................................66 
    7.1.3 
    Rx buffer...............................................................................................66 
    7.2 
    Deviations .............................................................................................................66 
    7.2.1 

    Tx buffer ...............................................................................................66 
    7.2.2 
    Partial networking ................................................................................66 
    7.2.3 
    AUTOSAR version check ....................................................................66 
    7.2.4 
    Check wakeup .....................................................................................66 
    7.3 
    Limitations ............................................................................................................67 
    8 
    Glossary and Abbreviations ...........................................................................................68 
    8.1 

    Glossary ...............................................................................................................68 
    8.2 
    Abbreviations ........................................................................................................68 
    9 
    Contact .............................................................................................................................70 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Illustrations 
    Figure 2-1 
    AUTOSAR layer model ...................................................................................9 
    Figure 2-2 
    Interfaces to adjacent modules of the CAN Interface (* optional) ...............10 
    Figure 3 
    Configuration of multiple Transmit-buffers ...................................................16 
    Figure 3-4 
    Wake up sequence (No validation) ..............................................................32 
    Figure 3-5 
    Wake up sequence (Wakeup validation) ......................................................33 
    Figure 4-1 
    Include structure ...........................................................................................42 
     
    Tables 
    Table 1-1  
    History of the Document .................................................................................3 
    Table 1-2  
    References Documents ..................................................................................3 
    Table 3-1  
    List of supported features .............................................................................12 
    Table 3-2  
    Mapping of service IDs to services ..............................................................25 
    Table 3-3  
    Errors reported to DET .................................................................................30 
    Table 3-4 
    Sub-features of feature Partial Networking ..................................................35 
    Table 3-5  
    API functions used by the CAN Interface .....................................................36 
    Table 3-6  
    Adapted CAN driver APIs (* optional) ..........................................................37 
    Table 3-7  
    APIs of CAN Interface which have to be used in multiple CAN driver 
    configurations................................................................................................37 

    Table 3-8  
    Critical Section Codes ..................................................................................40 
    Table 3-9  
    Restrictions for the different lock areas ........................................................40 
    Table 4-1  
    Static files ......................................................................................................41 
    Table 4-2  
    Generated files .............................................................................................41 
    Table 4-3  
    Compiler abstraction and memory mapping ................................................43 
    Table 6-1 
    API CanIf_GetVersionInfo ............................................................................45 
    Table 6-2  
    API CanIf_Init ................................................................................................45 
    Table 6-3  
    API CanIf_SetControllerMode ......................................................................46 
    Table 6-4  
    API CanIf_GetControllerMode ......................................................................46 
    Table 6-5  
    API CanIf_Transmit ......................................................................................47 
    Table 6-6  
    API CanIf_TxConfirmation ............................................................................47 
    Table 6-7  
    API CanIf_RxIndication ................................................................................48 
    Table 6-8  
    API CanIf_ControllerBusOff..........................................................................48 
    Table 6-9  
    API CanIf_SetPduMode ...............................................................................49 
    Table 6-10  
    API CanIf_GetPduMode ...............................................................................49 
    Table 6-11  
    API CanIf_InitMemory ..................................................................................50 
    Table 6-12  
    API CanIf_CancelTxConfirmation ................................................................50 
    Table 6-13  
    API CanIf_SetTrcvMode ...............................................................................51 
    Table 6-14  
    API CanIf_GetTrcvMode...............................................................................51 
    Table 6-15  
    API CanIf_GetTrcvWakeupReason ..............................................................52 
    Table 6-16  
    API CanIf_SetTrcvWakeupMode ..................................................................52 
    Table 6-17  
    API CanIf_CheckWakeup .............................................................................53 
    Table 6-18  
    API CanIf_CheckValidation ..........................................................................53 
    Table 6-19  
    API CanIf_CancelTransmit ...........................................................................54 
    Table 6-20  
    API CanIf_CancelTxNotification ...................................................................54 
    Table 6-21  
    API CanIf_SetDynamicTxId ..........................................................................55 
    Table 6-22  
    API CanIf_ControllerModeIndication ............................................................55 
    Table 6-23  
    API CanIf_TrcvModeIndication .....................................................................56 
    Table 6-24  
    API CanIf_ConfirmPnAvailability ..................................................................56 
    Table 6-25  
    API CanIf_ClearTrcvWufFlagIndication ........................................................57 
    Table 6-26  
    API CanIf_CheckTrcvWakeFlagIndication ...................................................57 
    Table 6-27  
    API CanIf_SetBaudrate ................................................................................58 
    Table 6-28  
    API CanIf_ChangeBaudrate .........................................................................58 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Table 6-29  
    API CanIf_ChangeBaudrate .........................................................................59 
    Table 6-30  
    API CanIf_GetTxConfirmationState .............................................................59 
    Table 6-31  
    API CanIf_SetAddressTableEntry ................................................................60 
    Table 6-32  
    API CanIf_ResetAddressTableEntry ............................................................60 
    Table 6-33  
    API CanIf_RamCheckExecute .....................................................................61 
    Table 6-34  
    API CanIf_RamCheckEnableMailbox ..........................................................61 
    Table 6-35  
    API CanIf_RamCheckEnableController .......................................................62 
    Table 6-36  
    API CanIf_RamCheckCorruptMailbox ..........................................................62 
    Table 6-37  
    API CanIf_RamCheckCorruptController ......................................................63 
    Table 6-38  
    API CanIf_SetPduReceptionMode ...............................................................63 
    Table 6-39  
    EcuM_BswErrorHook ...................................................................................64 
    Table 8-1  
    Glossary ........................................................................................................68 
    Table 8-2  
    Abbreviations ................................................................................................69 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 



    Technical Reference CAN Interface  
    2  Introduction 
    This document describes the functionality, API and configuration of the AUTOSAR CAN 
    Interface as specified in [1]. It is based on the AUTOSAR specification release 4.0.3. The 
    CAN Interface is a hardware independent layer with a standardized interface to the CAN 
    Driver and CAN Transceiver Driver layer and upper layers like PDU Router, 
    Communication Manager and the Network Management. 
     
    Supported AUTOSAR Release: 
    4.0.3 
    Supported Configuration Variants: 
    Pre-compile, Link-time, Post-build-loadable 
     
     
    Vendor ID: 
    CANIF_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CANIF_MODULE_ID   
    60 
    (according to ref.[3]) 
     
    2.1 
    Architecture Overview 
    The following figure shows where the CAN Interface is located in the AUTOSAR 
    architecture. 
     
     
    Figure 2-1  AUTOSAR layer model 
     
    The CAN Interface provides a standardized interface for all upper layers which require 
    CAN communication. Therefore these upper layers have to communicate with the CAN 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 

    based on template version 2.10.0 




    Technical Reference CAN Interface  
    Interface which is responsible for the CAN communication. This includes the transmission 
    and the reception of messages and the state handling of the CAN controllers as well. 
     
     
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  CAN  Interface.  These 
    interfaces are described in chapter 6. 
     
    P CO
    duR M
    DCM
    CanNM
    DCM
    CanSM
    DCM
    CanTP
    DCM
    EcuM
    CAN Interface
    CAN DRV 0
    CAN DRV 1*
    TR F
    C R 
    V DRV 0
    TRC F
    VR 
     DRV 1*
     
    Figure 2-2  Interfaces to adjacent modules of the CAN Interface (* optional1) 
     
     
                                                
    1 NOTE: Multiple CAN driver and TRCV driver are supported optional 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    10 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    3  Functional Description 
    3.1 
    Deviations regarding AUTOSAR standard 
    Please note that the CAN Interface is tailored by Vector Informatik according to customer 
    requirements before delivery. As a result not all features listed below might be supported 
    by a delivered module.  
    For deviations and extensions regarding the AUTOSAR standard [1], please see chapter 
    7. 
    3.2 
    Feature List 
    Available Features For This BSW Module: 
    Feature Naming 
    Supported 
    Short Description 
    Initialization 
     
     
    Generic Initialization 
     
    General initialization of the CAN Interface (CanIf_Init()) 
    Communication 
     
     
    Transmission 
     
    Transmission of PDUs 
    Dynamic transmission 
     
    Transmission of PDUs with changeable CAN IDs 
    Buffering (send request and data) of Tx-PDUs mapped to 
    a Tx
    Transmit
    -buffer in the CAN Interface. Two handling types of 
    -buffer 
     
    Tx-buffer are supported: FIFO and prioritized by CAN 
    identifier. 
    Per CAN channel multiple Tx
    Multiple Tx
    -BasicCAN hardware 
    -BasicCAN hardware 

    objects may be configured. This feature can only be used 
    objects
     
     
    if the underlying CAN driver supports this feature as well. 
    Per CAN channel multiple independent transmit-buffers 
    may be configured with different handling types: FIFO or 
    Multiple transmit-buffers per CAN 

    prioritization by CAN identifier. This feature can only be 
    channel
     
     
    used in combination with above mentioned feature 
    “Multiple Tx-BasicCAN hardware objects”. 
    Cancellation of PDUs and requeueing. (Feature to avoid 
    Cancellation of Tx-PDUs 
     
    inner priority inversion) 
    Transmit confirmation 
     
    Call back for successful transmission 
    Reception 
     
    Reception of  PDUs 
    Receive indication 
     
    Call back for reception of PDUs  
    Control of reception mode of a 
    This feature provides the ability to control the reception 

    Rx
     
    -PDU 
    mode of a Rx-PDU individually at runtime. 
    DLC check 
     
    Check DLC of received PDUs against predefined values 
    CAN FD support 
     
    CAN with flexible data-rate 
    Support for dynamic CAN identifier handling by using of 
    Meta data Rx- / Tx-support 
     
    SDU meta data 
    Translating of addresses according to J1939 by using of 
    J1939 Dynamic Address Support 
     
    dynamic address lookup tables which are maintained by 
    J1939Nm. 
    Data checksum Rx  
     
    Verification of checksum of Rx-PDUs 
    Data checksum Tx  
     
    Appending of checksum to Tx-PDUs 
    Controller Modes 
     
     
    Sleep mode 
     
    Support sleep mode 
    External wake up (CAN) 
     
    Support external wake up by CAN Driver 
    External wake up (Transceiver) 
     
    Support external wake up by Transceiver Driver 
    Wake up validation 
     
    Support wake up validation for external wake up events 
    Internal wake up 
     
    Internal wake up by calling CanIf_SetControllerMode() 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    11 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Stop mode 
     
    Support stop mode 
    BusOff detection 
     
    Handling of bus off notifications 
    Error Reporting 
     
     
    DET 
     
    Support Development Error Detection (error notification) 
    Mailbox objects 
     
     
    Standard mailbox to send CAN frames (Used by CAN 
    Tx BasicCAN 
     
    Interface data queue) 
    Tx FullCAN 
     
    Separate mailbox for special Tx message used 
    Standard mailbox to receive CAN frames (depending on 
    Rx BasicCAN 
     
    hardware, FIFO or shadow buffer supported) 
    Rx FullCAN 
     
    Separate mailbox for special Rx message used 
    Miscellaneous 
     
     
    API for upper layers to set and read transceiver states; 
    Transceiver handling
     
     
     
    Interface to the Transceiver Driver 
    Version API 
     
    API to read out component version 
    Supported ID types 
     
     

    Standard Identifiers 
     
    Support of CAN Standard (11 bits) identifiers 

    Extended Identifiers 
     
    Support of CAN Extended (29 bits) identifiers 

    Mixed Identifiers 
     
    Support standard as well as extended identifiers 
    Each CAN network has to be connected to exactly one 
    Multiple CAN networks 
     
    controller 
    Multiple CAN driver 
     
    Supports multiple CAN driver 
    Handling of partial networking transceiver
    Partial Networking
     
     
     
    Tx-PDU filter during wake-up 
    This service provides the information on whether any Tx 
    Tx Confirmation Polling Support 
     
    confirmation has occurred for a CAN channel since the 
    last start of that CAN channel at all. 
    Post-build loadable allows the re-configuration of an ECU 
    Post-build loadable 
     
    at Post-build time 
    Post-build selectable 
     
    MICROSAR identity manager using Post-build selectable 
    This service provides the ability in order to request an 
    underlying CAN-channel to execute a check of 
    Extended RAM-check 
     
    CAN-controller-HW-registers. The usage of this feature 
    requires a corresponding license. 
    Table 3-1   List of supported features 
     
    3.3 
    Initialization 
    Several functions are available to initialize the CAN Interface. The following code example 
    shows  which  functions  have  to  be  called  to  initialize  the  CAN  Interface  and  to  allow 
    transmission and reception. 
     
    CanIf_InitMemory(); 
       
    /* Mandatory call which reinitializes global variables to 
    set the CAN Interface back to uninitialized 
    state. */ 
    CanTrcv_xxx_InitMemory() and CanTrcv_xxx_Init() 
      /* have to be called to initialize the CAN Transceiver Driver 
    and set the CAN Transceiver to the preconfigured 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    12 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    state. For some CAN Controllers it is necessary 
    to have a recessive signal on the Rx Pin to be 
    able to initialize the CAN Controller. This 
    means the transceiver has to be set to “normal 
    mode” before CanIf_Init() is called. */ 
    Can_InitMemory() and Can_Init();  
      /* have to be called before CanIf_Init is called. */ 
    CanIf_Init(<PtrToCanIfConfiguration>);  
      /* Global initialization of the CAN Interface: all available CAN 
    Interface channels are initialized within this 
    call. If postbuild-selectable configuration is 
    active a valid configuration has to be passed to 
    CanIf_Init. In other cases the parameter is 
    ignored and a NULL pointer can be used */ 
    CanIf_SetControllerMode(0, CANIF_CS_STARTED); 
      /* The controller mode of CAN-channel 0 is set to started mode. 
    This means the CAN controller is initialized and 
    ready to communicate (acknowledge of the CAN 
    controller is activated). Communication is not 
    yet possible because the CAN Interface will 
    neither pass Tx PDUs from higher layers to the 
    CAN Driver nor accept Rx PDUs from the CAN 
    Driver. */ 
    CanIf_SetPduMode(0, CANIF_SET_ONLINE); 
      /* The PDU mode in the CAN Interface of the CAN-channel 0 is 
    switched to online mode. After initialization 
    this mode remains in the state CANIF_GET_OFFLINE 
    until the CanIf_SetPduMode function is called. 
    Now transmission requests will be passed from 
    the upper layer to the CAN Driver and Rx PDUs 
    are forwarded from the CAN Driver to the 
    corresponding higher layer. */ 
     
    3.4 
    Transmission 
    The  transmission  of  PDUs  is  only  possible  after  the  CAN  Interface  and  CAN  Driver  are 
    initialized  and  the  CAN  Interface  resides  in  the  CANIF_CS_STARTED  / 
    CANIF_GET_ONLINE or CANIF_CS_STARTED / CANIF_GET_TX_ONLINE mode.  In all 
    other states the Tx requests are rejected by the CAN Interface. 
    The Tx request has to be initiated by a call to the function: 
    CanIf_Transmit(<TxPduId>, <PduInfoPtr>); 
    The  CAN  Interface  uses  the  PDU  ID  (<TxPduId>)  to  acquire  more  information  from  the 
    generated data to be able to transmit the message. This data is used to call the function 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    13 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Can_Write  of  the  CAN  Driver  which  needs  information  about  the  PDU  like  the 
    CAN identifier,  length  of  data,  data  by  itself  and  the  hardware  transmit  handle  which 
    represents the mailbox used for transmission of the PDU. 
     
    After a successful transmission of the message on the bus a confirmation function is called 
    by the CAN Driver either from interrupt context or in case of Tx polling from task context. 
    This  confirmation  is  dispatched  in  the  CAN  Interface  to  notify  the  corresponding  higher 
    layer  about  the  transmission  of  the  PDU.  For  this  purpose  for  each  PDU  a  call  back 
    function has to be specified at configuration time. 
    The transmission request is rejected by returning E_NOT_OK in the following cases: 
    -  The CAN Interface is not in the controller state CANIF_CS_STARTED 
    -  The  CAN  Interface  is  not  in  the  PDU  mode  CANIF_GET_ONLINE  or 
    CANIF_GET_TX_ONLINE 
    -  The  transmit  buffer  is  not  active  and  the  corresponding  mailbox  used  for 
    transmission is occupied (BasicCAN Tx messages only). 
    -  An error occurred during transmission (DET will be informed) 
    3.4.1 
    Dynamic transmission 
    The feature is activated by the parameter “Dynamic Tx Objects”. 
    The adjustments for the dynamic objects are the same as for the static with the exception 
    that the CAN ID and the attribute whether extended or standard CAN ID can be selected 
    manually.  
    By  default  the  dynamic  object  has  the  CAN  ID  parameterized  during  configuration  time 
    until it is changed by the call of the API CanIf_SetDynamicTxId(). In order to set  an 
    extended CAN ID the most significant bit of its value passed to the API shall be set.  
    The  PDU  IDs  of  the  dynamic  objects  are  represented  as  symbolic  handles  in  the  file 
    CanIf_Cfg.h.  
    3.4.2 
    Transmit-buffer 
    The  CAN  Interface  provides  a  mechanism  to  buffer  Tx-PDUs  (including  data)  which  are 
    mapped to a Tx-buffer. This means if the Tx-hardware-object of such Tx-PDU is occupied 
    the  Tx-PDU-instance  is  stored  within  the  CAN  Interface  until  the  Tx-hardware-object 
    becomes free. Two handling types of a transmit-buffer are supported: 
    1.  FIFO 
    2.  Prioritization by CAN-identifier 
    The  handling  type  defines  in  which  manner  the  Tx-PDUs  stored  within  the Tx-buffer  are 
    transmitted in case of the underlying Tx-hardware-object becomes free.  
    FIFO:  The  stored  Tx-PDUs  are  transmitted  in  manner  First-In-First-Out.  Each 
    Tx-PDU-instance is stored. If the FIFO is full then NO Tx-PDUs are stored until the FIFO 
    becomes free. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    14 
    based on template version 2.10.0 




    Technical Reference CAN Interface  
     
     
    Caution 
    In case of transmit-buffer of handling type FIFO only one instance of a Tx-PDU (the last 
      one stored within the FIFO) can be and is cancelled from the FIFO via usage of API 
    CanIf_CancelTransmit! (Feature: “Cancellation of Tx-PDUs”, see chapter 
    6.1.19). 
     
     
     
    Prioritization by CAN-identifier: The stored Tx-PDUs are transmitted in manner: Tx-PDU 
    with  high  priority  is  sent  before  those  one  with  lower  priority. The  priority  is  given  by  the 
    CAN-identifier of the Tx-PDU. A Tx-PDU with a low CAN-identifier has higher priority than 
    a one with greater CAN-identifier. The priority of a Tx-PDU is static and is determined from 
    values of parameters CanIfTxPduCanId and CanIfTxPduCanIdType. Please consider 
    this  aspect  in  case  of  configuration  of  Tx-PDUs  with  dynamic  CAN-identifier.  Only  one 
    instance  of each Tx-PDU is stored  within such Tx-buffer: If a Tx-PDU is requested to be 
    transmitted and the Tx-buffer of this Tx-PDU is already in use the already stored data of 
    this Tx-PDU is overwritten in order to ensure the transmission of most newest data. 
    This  handling  type  can  be  used  to  avoid  inner  priority  inversion.  This  means  if  the 
    CAN Interface passes a transmit request to the CAN Driver while all Tx-hardware-objects 
    are occupied and at least one hardware object is occupied by a CAN message with lower 
    priority than the message used for the current transmit request the CAN Driver initiates the 
    cancellation of the message with the lowest priority. The cancelled CAN-message is stored 
    in the Tx-buffer of the CAN Interface if the corresponding Tx-buffer is free. Otherwise it is 
    discarded  to  ensure  the  transmission  of  most  newest  data.  By  this  way  a  Tx-hardware 
    message  object  becomes  free  and  allows  the  CAN  Interface  to  pass  the  CAN-message 
    with the highest priority to the CAN Driver.  
     
     
     
     
    Caution 
    The described: “inner priority inversion” is only supported if at most only one Tx-buffer 
      of handling type: Prioritization by CAN-identifier is configured per CAN-channel! 
     
     
     
     
    At  all  the  Tx-PDUs  stored  within  a  Tx-buffer  are  processed  either  in  context  of  the 
    Tx-confirmation interrupt or in context of CAN Driver’s Tx-main-function in case of polling 
    mode.  
    The configuration of multiple transmit-buffers is described in chapter 3.4.3. 
     
     
    3.4.3 
    Multiple Transmit-buffers 
    This feature can only be used if the underlying CAN driver supports the feature “Multiple 
    Tx-BasicCAN hardware objects”. The Figure 3 shows the objects which are needed to be 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    15 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    configured within the EcuC-configuration and the relationship among themselves. For each 
    Transmit-buffer  a  triple  of  objects:  CanHardwareObject,  CanIfHthCfg  and 
    CanIfBufferCfg  must  be  configured  and  linked  with  each  other  and  to  corresponding 
    CAN-channel (objects: CanController and CanIfCtrlCfg). 
     class Tx buffer configuration (EcuC)
    CanDrv
    CanIf
    Container
    Container
    CanIfCtrlCfg
    «point to»
    CanController
    Container
    CanIfTxPduCfg
    1:n
    «point to»
    Triple required for multiple Tx-BasicCANs / Tx-buffers
    1:1
    «point to»
    «point to»
    Container
    CanIfBufferCfg
    1:1
    «point to»
    Container
    Container
    1:1
    CanHardwareObject
    «point to»
    CanIfHthCfg
     
    Figure 3 
    Configuration of multiple Transmit-buffers 
    After 
    this 
    step 
    you 
    can 
    map 
    Tx-PDUs 
    to 
    configured 
    Transmit-buffer 
    (object: CanIfBufferCfg).  The  described  handling  type  of  a  transmit-buffer  (see 
    chapter 3.4.2) can be configured via the parameter CanIfTxBufferHandlingType. For 
    further information about configuration of a Transmit-buffer please refer to the help which 
    can be found in the GUI of the DaVinci Configurator 5 and to the descriptions of attributes 
    of container CanIfBufferCfg. 
    3.4.4 
    Tx confirmation polling support 
    The CAN Interface supports a service which provides the information on whether any Tx 
    confirmation has occurred for a CAN  channel since the last start of that CAN channel at 
    all. This feature can be enabled via the parameter 
    CanIfPublicTxConfirmPollingSupport. If enabled the API 
    CanIf_GetTxConfirmation() is provided and can be used for this service. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    16 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    3.4.5 
    Data checksum Tx  
    This feature can be used to append a checksum to data of a Tx-PDU. The configuration of 
    such 
    Tx-PDU 
    can 
    be 
    done 
    individually 
    via 
    the 
    parameter 
    CanIfTxPduDataChecksumPdu. The appending of checksum is application specific and 
    must be implemented within the API CanIf_TransmitSubDataChecksumTxAppend(). 
    For  further  information  please  see  the  description  of  the  prototype  of  this API  in  chapter 
    6.2.3. 
    For  further  information  about  configuration  of  this  feature  at  all  please  refer  to  the  help 
    which  can  be  found  in  the  GUI  of  the  DaVinci Configurator 5  and  to  the  description  of 
    mentioned parameters. 
     
    3.5 
    Reception 
    Reception of PDUs is only possible in the states  
      CANIF_CS_STARTED and CANIF_GET_ONLINE  
    or  
      CANIF_CS_STARTED and CANIF_GET_RX_ONLINE.  
    In all other states the PDUs received by the CAN Driver are discarded by the CAN 
    Interface without notification to the upper layers. 
    The  CAN  Interface  supports  reception  of  FullCAN-  as  well  as  BasicCAN-messages. The 
    upper layers do not notice any differences between these two reception types as in both 
    cases  a  call  back  function  is  called  which  was  configured  for  the  specified  PDU  in  the 
    generation tool. 
    The  upper  layer  is  notified  about  the  PDU  ID  given  by  the  corresponding  upper  layer  at 
    configuration time, the received data and depending on the used indication function about 
    the length of the received data.  
    In case of BasicCAN reception the CAN Interface has to search through a list of all known 
    Rx messages and compare the received CAN ID with the CAN ID in the Rx message list.  
    The CAN Interface offers three different search algorithms: 
      Linear search: The list of all Rx PDUs is searched from high priority (Low CAN 
    Identifier) to low priority (High CAN Identifier). This algorithm is efficient for a small 
    amount of Rx messages. 
      Double Hash search: The Rx PDU is calculated via two special hash functions. The 
    algorithm is very efficient for a high amount of Rx messages and always takes the 
    same time.  
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    17 
    based on template version 2.10.0 




    Technical Reference CAN Interface  
     
     
      Note 
    The Double Hash search algorithm uses the mathematical operation 
     
    modulo. 
     
     
     
      Binary search: The list of Rx PDUs is split in two equal sized parts and the search is 
    continued recursively on a list of PDUs which contains half the messages. This search 
    algorithm terminates faster for big amounts of Rx messages than the linear search. 
    Caution 
    The binary search algorithm cannot be used for mixed ID systems. 
     
     
    3.5.1 
    Ranges 
    The  BasicCAN  message  object  can  be  used  to  receive  groups  of  CAN  messages  called 
    ranges. A range can be defined either by an upper and a lower CAN identifier or by a mask 
    and a code.  
    The  definition  of  a  range  by  an  upper  and  a  lower  CAN  identifier  is  performed  by  the 
    following parameters: 
      CanIfRxPduCanIdRangeLowerCanId and  
      CanIfRxPduCanIdRangeUpperCanId.  
    A mask-code-range is defined by parameters: 
      CanIfRxPduCanId (code) and  
      CanIfRxPduCanIdMask (mask).  
    In case of a mask-code-range each CAN identifier which fulfills the following equation pass 
    the range and the reception of the corresponding Rx PDU is reported to the upper layer. 
      <CAN identifier> & <mask> == <code> & <mask> 
    One  PDU  ID  is  assigned  to  all  messages  which  pass  the  configured  range.  Hence  the 
    upper  layer  is  not  able  to  get  additional  message  properties  like  the  CAN  identifier.  For 
    each range an indication function can be assigned in the generation tool in order to notify 
    the higher layer about the reception of a message.  
    A  range  defined  by  an  upper  and  a  lower  CAN  identifier  can  be  converted  into  a 
    mask-code-range. Therefor please see the following example. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    18 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
     
     

    Example: How to convert a lower CAN ID and an upper CAN ID into mask and 
    code? 
     
      Lower CAN ID: 0x400 
    Upper CAN ID: 0x43F 
    The code is same as the lower CAN ID: 
    code = 0x400 
     
    You need the count which is upper CAN ID – lower CAN ID  0x43F – 0x400 = 0x3F 
    The count 0x3F is 000 0011 1111b in 11-bit binary format. For a range with extended 
    CAN IDs the count needs to be 29-bit wide.  
      
    The mask is calculated out of negated count and a 11-bit mask: 
    mask = ~0x3F & 0x7FF = 0x7C0 
    For extended IDs you need a 29-bit mask: 
    mask = ~0x3F & 0x1FFF FFFF = 0x1FFF FFC0 
     
    Note: 
    If for count the first set bit is followed by unset bits on lower significant positions for the 
    calculation of the mask these bits need to be set. For example a count of 0xA3 (1010 
    0011b) you need to calculate with the count 0xFF (1111 1111b). The consequence is 
    that more CAN IDs are received as intended. 
     
     
    3.5.2 
    DLC check 
    The DLC check is executed for all received messages after they pass the search algorithm 
    (PDU is in Rx list) or if they are defined to be received in FullCAN message objects. The 
    feature DLC check can be  activated only at Pre-compile time at all. If activated the DLC 
    check  can  be  configured  for  each  Rx-PDU  individually  and  can  be  reconfigured  in  the 
    Post-build-loadable configuration phase.  
    The DLC check verifies if the received DLC is greater or equal to the DLC specified during 
    configuration time. If the DLC is less than the configured one a DET error is raised and the 
    reception of the PDU is abandoned. 
     
    3.5.3 
    Data checksum Rx 
    This feature can  be used to verify the validity of a Rx-PDU after reception. The Rx-PDU 
    which  shall  be  verified  can  be  configured  individually  via  the  parameter 
    CanIfRxPduDataChecksumPdu.  The  verification  is  application  specific  and  must  be 
    implemented  within  the  API  CanIf_RxIndicationSubDataChecksumRxVerify(). 
    For  further  information  please  see  the  description  of  the  prototype  of  this API  in  chapter 
    6.2.2.  
    In  addition  an  indication  function  may  be  configured  which  signals  about  invalidity  of  a 
    Rx-PDU.  This  indication  function  can  be  configured  via  the  parameter 
    CanIfDispatchDataChecksumRxErrorIndicationName.  The  call  of  this  indication 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    19 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    function  is  application  specific  too  and  if  required  must  be  invoked  within  the 
    implementation of CanIf_RxIndicationSubDataChecksumRxVerify(). 
    The prototype of the indication function must match following signature: 
      void My_DataChecksumRxErrFct (PduIdType CanIfRxPduId) 
    and can be accessed via the macro: CanIf_GetDataChecksumRxErrFctPtr() (see 
    file CanIf_Cfg.h) 
    It  is  recommended  to  call  this  indication  function  with  the  identifier  of  affected  Rx-PDU. 
    Therefor the value of parameter  CanIfRxPduId should be used which is passed by call 
    of CanIf_RxIndicationSubDataChecksumRxVerify(). The value of this parameter 
    is a CAN interface internal identifier which corresponds to value of configuration parameter 
    CanIfRxPduId.  Corresponding  macros  are  generated  per  Rx-PDU  into  file 
    CanIf_Cfg.h. These ones can be used by application (s. example below).  
     
    /******************************************************************************* 
      \def  AUTOSAR Rx PDU handles 
    *******************************************************************************/ 
     
    #define CanIfConf_CanIfRxPduCfg_RxRange2_0                                    0U 
    #define CanIfConf_CanIfRxPduCfg_RxRange1_0                                    1U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG00000711_0                               2U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG95555311_0                               3U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG00000511_0                               4U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG91111151_0                               5U 
     
    For  further  information  about  configuration  of  this  feature  at  all  please  refer  to  the  help 
    which  can  be  found  in  the  GUI  of  the  DaVinci Configurator 5  and  to  the  description  of 
    mentioned parameters. 
     
    3.5.4 
    Control of reception mode of a Rx-PDU 
    This feature provides the ability to control the reception mode of a Rx-PDU at runtime. The 
    reception  mode  can  be  set  per  Rx-PDU  individually  at  runtime  via  the  API: 
    CanIf_SetPduReceptionMode().  In  order  to  address  a  Rx-PDU  you  can  use  the 
    corresponding symbolic name value which can be found in file CanIf_Cfg.h (s. example 
    below). 
    /******************************************************************************* 
      \def  AUTOSAR Rx PDU handles 
    *******************************************************************************/ 
     
    #define CanIfConf_CanIfRxPduCfg_RxRange2_0                                    0U 
    #define CanIfConf_CanIfRxPduCfg_RxRange1_0                                    1U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG00000711_0                               2U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG95555311_0                               3U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG00000511_0                               4U 
    #define CanIfConf_CanIfRxPduCfg_RxMSG91111151_0                               5U 
    For further information about this API please see chapter 6.1.38. This feature can be used 
    for e.g. either to receive a CAN-message as a Rx-PDU with an explicit CAN-identifier or as 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    20 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    a  Rx-range-PDU.  In  case  of  the  configured  CAN-identifier  of  a  Rx-PDU  fits  the  range  of 
    CAN-identifiers  of  a  Rx-range-PDU  on  the  same  CAN-channel  as  well.  In  case  of  a 
    FullCAN-Rx-PDU the reception can be controlled at runtime at all. 
    This feature can be enabled via the parameter CanIfSetPduReceptionModeSupport. 
    In addition Rx-PDUs whose reception mode is  intended to be controlled  at runtime  must 
    be configured accordingly via the parameter CanIfRxPduSetReceptionModePdu. 
    For  further  information  about  configuration  of  this  feature  at  all  please  refer  to  the  help 
    which  can  be  found  in  the  GUI  of  the  DaVinci Configurator 5  and  to  the  description  of 
    mentioned parameters. 
     
    3.6 
    Communication Modes 
    The CAN Interface knows two main types of communication modes.  
    3.6.1 
    Controller Mode 
    The  controller  mode  represents  the  physical  state  of  the  CAN  controller.  The  following 
    modes are available: 
      CANIF_CS_STOPPED 
      CANIF_CS_STARTED 
      CANIF_CS_SLEEP 
      CANIF_CS_UNINIT 
    There  is  no  state  called  bus  off.  Bus  off  is  treated  as  a  transition  from  STARTED  to 
    STOPPED  mode.  All  transitions  have  to  be  initiated  using  the  API  function 
    CanIf_SetControllerMode().  The  controller  mode  can  be  switched  for  each 
    controller independent of the state of other controllers in the system. 
    The state CANIF_CS_UNINIT is left after CanIf_InitController() is called and can 
    only be entered by a reset of the ECU. 
    The  modes  CANIF_CS_SLEEP  and  CANIF_CS_STARTED  can  only  be  entered  from 
    CANIF_CS_STOPPED. This means a transition from STARTED to SLEEP and vice versa is 
    not possible without requesting the STOPPED mode first. 
    It  is  always  possible  to  request  the  current  active  controller  mode  by  calling  the  API 
    CanIf_GetControllerMode(). 
     
    3.6.2 
    PDU Mode 
    The other type of communication mode is completely processed by software (it does not 
    represent any state of the hardware). Transitions of the PDU mode are only possible if the 
    controller mode is set to CANIF_CS_STARTED.  
    The following PDU modes are available: 
      CANIF_GET_OFFLINE 
     
     
    Rx and Tx path are switched offline 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    21 
    based on template version 2.10.0 




    Technical Reference CAN Interface  
      CANIF_GET_RX_ONLINE 
     
     
    Rx path online, Tx path offline 
      CANIF_GET_TX_ONLINE 
              Rx path offline, Tx path online 
      CANIF_GET_ONLINE 
     
    Rx and Tx path are switched online 
      CANIF_GET_OFFLINE_ACTIVE 
     
    Rx and Tx path offline, confirmation is emulated by the CAN Interface 
      CANIF_GET_OFFLINE_ACTIVE_RX_ONLINE 
     
    Rx path online, Tx path offline, confirmation is emulated by the CAN Interface 
    If  parameter  CanIfPnWakeupTxPduFilterSupport  (s.  chapter  3.16)  is  enabled  then 
    the following two further modes are available: 
    -  CANIF_GET_TX_ONLINE_WAKF 
      Rx path offline, tx path online 
    -  CANIF_GET_ONLINE_WAKF 
      Rx and Tx path are switched online 
    The  difference  to  the  modes  CANIF_GET_ONLINE  and  CANIF_GET_TX_ONLINE  is  that 
    the  Tx-PDU  filter  is  activated  if  the  PDU  mode  is  changed  to  one  of  these  two  modes. 
    (s. chapter 3.16). 
     
    Caution 
    If one of the modes CANIF_GET_TX_ONLINE_WAKF  or CANIF_GET_ONLINE_WAKF is 
     
    left by calling of CanIf_SetPduMode()with parameter PduModeRequest which 
    equals CANIF_SET_OFFLINE or CANIF_SET_TX_OFFLINE or 
    CANIF_SET_TX_OFFLINE_ACTIVE or CANIF_SET_ONLINE or 
    CANIF_SET_TX_ONLINE then the Tx-PDU Filter is deactivated! 
     
    The PDU modes can be set via the function CanIf_SetPduMode() and can be retrieved 
    via the function CanIf_GetPduMode(). 
    3.7 
    Polling 
    The  CAN  Interface  can  process  events  in  polling  and  interrupt  mode.  As  the  polling  of 
    events is executed by other layers (e.g. CAN Driver, Transceiver Driver) the CAN Interface 
    is notified by call back functions which are called in the corresponding context.  
     
    Info 
    There  is  no  need  for  changes  in  the  configuration  to  run  the  CAN  Interface  in 
     
    polling mode. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    22 
    based on template version 2.10.0 




    Technical Reference CAN Interface  
     
    3.8 
    CAN FD 
    The  CAN  Interface  supports  CAN  FD.  The  configuration  can  be  performed  both  for 
    Rx-  and  Tx-PDUs.  Therefor  please  configure  the  attribute  CanIfRxPduCanIdType 
    (Rx-PDU)  and  CanIfTxPduCanIdType  (Tx-PDU)  accordingly  as  required  by  your 
    application. In case of Rx-PDUs the message type (e.g. FD or not-FD) is evaluated during 
    the Rx-search algorithm. Hence it is possible to handle two messages with the same CAN 
    identifier, at which one is configured as FD and one as not-FD and to map them to different 
    Rx-PDUs. 
     
     
    Expert Knowledge 
    If you intend to switch the baudrate of the CAN hardware at runtime it is suggested to 
      use the API CanIf_SetBaudrate instead of CanIf_ChangeBaudrate.  
     
     
    Rx- and Tx-FD-PDUs with up to 64 bytes payload are supported. 
     
     
    Basic Knowledge 
    If you intend to configure BasicCAN-FD-Tx-PDUs  and the Tx-buffer is enabled in your 
      configuration please ensure that attribute CanIfStaticFdTxBufferSupport is 
    enabled. 
     
     
    3.9 
    Meta data Rx- / Tx-support 
    If  this  feature  is  enabled  the  CAN  Interface  supports  the  handling  of  dynamic 
    CAN-identifiers  by  using  of  SDU  meta  data.  Such  dynamic  PDU  can  be  configured  by 
    parameter  MetaDataLength.  This  parameter  can  be  found  in  the  container  of 
    corresponding global PDU. 
    In case of configuration variant Link-time or Post-build loadable please enable this feature 
    by setting of parameter CanIfMetaDataSupport to true. In case of configuration variant 
    Pre-compile the activation/deactivation of this feature is determined from the configuration 
    of  Rx-  and  Tx-PDUs.  If  there  is  any  PDU  which  has  configured  the  parameter 
    MetaDataLength then this feature is enabled else disabled.  
    3.10  J1939 dynamic address support 
    If  this  feature  is  enabled  the  CAN  Interface  translates  the  addresses  (CAN  identifiers)  of 
    Rx- and Tx-PDUs according to J1939 by  using of dynamic  address lookup tables. These 
    tables are maintained by J1939Nm by using of following APIs: 
    >  CanIf_SetAddressTableEntry and 
    >  CanIf_ResetAddressTableEntry.  
    This  feature  has  to  be  configured  for  each  CAN  channel  individually  by  the  parameter 
    CanIfCtrlJ1939DynAddrSupport.  Please  consider  that  in  case  of  configuration 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    23 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
    variant  Post-build loadable  and  configuration  phase  Post-build  the  value  which  you  can 
    select 
    by 
    CanIfCtrlJ1939DynAddrSupport 
    is 
    limited 
    by 
    value 
    of 
    CanIfJ1939DynAddrSupport  which  was  set  at  configuration  phase  Pre-compile. 
    Therefore  in  case  of  configuration  variant  Post-build loadable  please  first  enable  this 
    feature  as  far  as  you  need  at  all  by  the  parameter  CanIfJ1939DynAddrSupport  and 
    then  configure  the  channel  specific  parameter  of  this  feature.  In  case  of  configuration 
    variant Pre-compile it is only possible to configure the channel specific parameter. 
     
     
    Caution 
    The feature J1939 dynamic address support works only if all Rx-PDUs of the 
      CAN channel at which this feature is enabled are configured as BasicCANs and if all 
    the corresponding hardware filters are opened completely! 
     
     
    3.11  Error Notification 
    AUTOSAR  specifies  two  mechanisms  of  error  notification  and  reporting.  Only  DET 
    reporting  is  supported  by  the  CAN  Interface  and  can  be  activated  at  configuration  time 
    (Pre-compile configuration). 
    Development  errors  are  reported  to  DET  using  the  service  Det_ReportError().This 
    feature  is  normally  activated  during  the  development  phase  to  detect  fatal  errors  in 
    configuration and integration of the CAN Interface with other layers. 
    The reported CAN Interface ID is 60. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  chapter  6.  The 
    following table presents the service IDs and the related services: 
    Service ID 
    Service 

    CanIf_Init 

    CanIf_InitController 

    CanIf_SetControllerMode 

    CanIf_GetControllerMode 

    CanIf_Transmit 

    CanIf_ReadRxPduData 

    CanIf_SetPduMode 
    10 
    CanIf_GetPduMode 
    11 
    CanIf_GetVersionInfo 
    12 
    CanIf_SetDynamicTxId 
    13 
    CanIf_SetTrcvMode 
    14 
    CanIf_GetTrcvMode 
    15 
    CanIf_GetTrcvWakeupReason 
    16 
    CanIf_SetTrcvWakeupMode 
    17 
    CanIf_CheckWakeup 
    18 
    CanIf_CheckValidation 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    24 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Service ID 
    Service 
    19 
    CanIf_TxConfirmation 
    20 
    CanIf_RxIndication 
    21 
    CanIf_CancelTxConfirmation 
    22 
    CanIf_ControllerBusoff 
    23 
    CanIf_ControllerModeIndication 
    24 
    CanIf_TrcvModeIndication 
    25 
    CanIf_GetTxConfirmationState 
    26 
    CanIf_ConfirmPnAvailability 
    27 
    CanIf_ChangeBaudrate 
    28 
    CanIf_CheckBaudrate 
    30 
    CanIf_ClearTrcvWufFlag 
    31 
    CanIf_CheckTrcvWakeFlag 
    32 
    CanIf_ClearTrcvWufFlagIndication 
    33 
     
    CanIf_CheckTrcvWakeFlagIndication 
    39 
    CanIf_SetBaudrate 
    246 
    CanIf_SetPduReceptionMode 
    247 
    CanIf_RamCheckEnableController 
    248 
    CanIf_RamCheckEnableMailbox 
    249 
    CanIf_RamCheckExecute 
    250 
    CanIf_CancelTransmit 
    251 
    CanIf_CancelTxNotification 
    252 
    CanIf_SetAddressTableEntry 
    253 
    CanIf_ResetAddressTableEntry 
    Table 3-2   Mapping of service IDs to services 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    10 
    CANIF_E_PARAM_CANID 
    Used in context of following functions if an invalid 
    CAN identifier is passed: 

    CanIf_RxIndication 

    CanIf_SetDynamicTxId 
    11 
    CANIF_E_PARAM_DLC 
    Used in context of following functions if a PDU with 
    invalid data length is passed: 

    CanIf_RxIndication 

    CanIf_Transmit 

    CanIf_CancelTxConfirmation 
    12 
    CANIF_E_PARAM_HRH 
    Used in context of following function if an invalid 
    hardware receive handle is passed: 

    CanIf_RxIndication 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    25 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Error Code 
    Description 
    13 
    CANIF_E_PARAM_LPDU 
    Used in context of following functions if an invalid 
    Tx-PDU is passed: 

    CanIf_TxConfirmation 

    CanIf_CancelTxConfirmation 

    CanIf_CancelTxNotification 
    14 
    CANIF_E_PARAM_CONTROLLER 
    Used in context of following functions if an invalid 
    CAN channel is passed: 

    CanIf_ControllerBusOff 

    CanIf_ControllerModeIndication 

    CanIf_GetTxConfirmationState 

    CanIf_SetTrcvMode 

    CanIf_GetTrcvMode 

    CanIf_GetTrcvWakeupReason 

    CanIf_SetTrcvWakeupMode 

    CanIf_TrcvModeIndication 

    CanIf_ConfirmPnAvailability 

    CanIf_ClearTrcvWufFlag 

    CanIf_ClearTrcvWufFlagIndication 

    CanIf_CheckTrcvWakeFlag 

    CanIf_CheckTrcvWakeFlagIndication 
    15 
    CANIF_E_PARAM_CONTROLLERID  Used in context of following functions if an invalid 
    CAN channel is passed: 

    CanIf_SetControllerMode 

    CanIf_GetControllerMode 

    CanIf_SetPduMode 

    CanIf_GetPduMode 

    CanIf_CheckBaudrate 

    CanIf_ChangeBaudrate 

    CanIf_SetBaudrate 

    CanIf_SetAddressTableEntry 

    CanIf_ResetAddressTableEntry 

    CanIf_Transmit 

    CanIf_TxConfirmation 

    CanIf_CancelTxConfirmation 

    CanIf_CancelTransmit 

    CanIf_CheckWakeup 

    CanIf_RamCheckExecute 

    CanIf_RamCheckEnableMailbox 

    CanIf_RamCheckEnableController 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    26 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Error Code 
    Description 
    16 
    CANIF_E_PARAM_WAKEUPSOURCE  Used in context of following functions if an invalid 
    wakeup source is passed: 

    CanIf_CheckValidation 

    CanIf_CheckWakeup 
    17 
    CANIF_E_PARAM_TRCV 
    Used in context of following functions if an invalid 
    transceiver channel is passed: 

    CanIf_TrcvModeIndication 

    CanIf_GetTrcvWakeupReason 

    CanIf_GetTrcvMode 

    CanIf_SetTrcvMode 

    CanIf_SetTrcvWakeupMode 

    CanIf_ConfirmPnAvailability 

    CanIf_ClearTrcvWufFlagIndication 

    CanIf_CheckTrcvWakeFlagIndication 

    CanIf_ClearTrcvWufFlag 

    CanIf_CheckTrcvWakeFlag 

    CanIf_CheckWakeup 
    18 
    CANIF_E_PARAM_TRCVMODE 
    Used in context of following function if an invalid 
    transceiver mode is passed: 

    CanIf_SetTrcvMode 
    19 
    CANIF_E_PARAM_TRCVWAKEUPMO
    Used in context of following function if an invalid 
    DE 
    transceiver wakeup mode is passed: 

    CanIf_SetTrcvWakeupMode 
    20 
    CANIF_E_PARAM_POINTER 
    Used in context of following functions if an invalid 
    pointer is passed: 

    CanIf_Init 

    CanIf_GetControllerMode 

    CanIf_Transmit 

    CanIf_RxIndication 

    CanIf_GetPduMode 

    CanIf_GetVersionInfo 

    CanIf_GetTrcvWakeupReason 

    CanIf_GetTrcvMode 

    CanIf_CancelTxConfirmation 
    21 
    CANIF_E_PARAM_CTRLMODE 
    Used in context of following function if an invalid CAN 
    controller mode is passed: 

    CanIf_SetControllerMode 
    30 
    CANIF_E_UNINIT 
    Used in context of following functions if called before 
    the CAN Interface is initialized: 

    CanIf_InitController 

    CanIf_Transmit 

    CanIf_TxConfirmation 

    CanIf_RxIndication 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    27 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Error Code 
    Description 

    CanIf_ControllerBusOff 

    CanIf_SetPduMode 

    CanIf_GetPduMode 

    CanIf_CancelTxConfirmation 

    CanIf_CheckWakeup 

    CanIf_CheckValidation 

    CanIf_GetTrcvWakeupReason 

    CanIf_SetTrcvWakeupMode 

    CanIf_ControllerModeIndication 

    CanIf_SetDynamicTxId 

    CanIf_TrcvModeIndication 

    CanIf_SetControllerMode 

    CanIf_GetControllerMode 

    CanIf_CancelTxNotification 

    CanIf_SetTrcvMode 

    CanIf_GetTrcvMode 

    CanIf_CancelTransmit 

    CanIf_ConfirmPnAvailability 

    CanIf_ClearTrcvWufFlagIndication 

    CanIf_CheckTrcvWakeFlagIndication 

    CanIf_ClearTrcvWufFlag 

    CanIf_CheckTrcvWakeFlag 

    CanIf_GetTxConfirmationState 

    CanIf_CheckBaudrate 

    CanIf_ChangeBaudrate 

    CanIf_SetBaudrate 

    CanIf_SetPduReceptionMode 

    CanIf_SetAddressTableEntry 

    CanIf_ResetAddressTableEntry 

    CanIf_RamCheckExecute 

    CanIf_RamCheckEnableMailbox 

    CanIf_RamCheckEnableController 

    CanIf_SetPduReceptionMode 
    40 
    CANIF_E_NOK_NOSUPPORT 
    Not used. 
    44 
    CANIF_E_INVALID_PDURECEPTI
    Used in context of following function if an invalid 
    ONMODE 
    reception mode is passed: 

    CanIf_SetPduReceptionMode 
    50 
    CANIF_E_INVALID_TXPDUID 
    Used in context of following functions if an invalid 
    Tx-PDU is passed: 

    CanIf_CancelTransmit 

    CanIf_SetDynamicTxId 

    CanIf_Transmit 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    28 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    Error Code 
    Description 

    CanIf_TxConfirmation 
    60 
    CANIF_E_INVALID_RXPDUID 
    Used in context of following function if an invalid 
    Rx-PDU is passed: 

    CanIf_SetPduReceptionMode 
    61 
    CANIF_E_INVALID_DLC 
    Used in context of following function if the length of 
    received PDU is invalid (smaller than the configured 
    one): 

    CanIf_HlIndication 
    70 
    CANIF_E_STOPPED 
    Used in context of following function if it is called 
    while either the controller mode is STOPPED or the 
    PDU mode is OFFLINE: 

    CanIf_Transmit  
    71 
    CANIF_E_NOT_SLEEP 
    Used in context of following function if it is called 
    while the CAN controller mode is neither in SLEEP 
    nor in STOPPED. 

    CanIf_CheckWakeup  
    Additionally defined error codes (not AUTOSAR compliant) 
    45 
    CANIF_E_CONFIG                        
    Used  to  det  
    ect  inconsistent  data  in  the  generated 
    files due to misconfiguration.  
    Used in context of following functions: 
    -  CanIf_RxIndication 
    -  CanIf_Transmit 
    46 
    CANIF_E_FATAL 
    Used to detect either an invalid (out of bounce) write 
    access  to  a  variable  or  an  invalid  read  access  to 
    function pointer  tables  in order  to prevent undefined 
    behaviour at runtime. 
    Used in context of following functions: 

    CanIf_Init 

    CanIf_Transmit 

    CanIf_CancelTxConfirmation 

    CanIf_CancelTransmit 

    CanIf_CancelTxNotification 

    CanIf_TxConfirmation 
    47 
    CANIF_E_INVALID_SA 
    Used  in  context  of  following  functions  if  an  invalid 
    J1939 source address (SA) is determined: 

    CanIf_Transmit 

    CanIf_RxIndication 
    48 
    CANIF_E_INVALID_DA 
    Used  in  context  of  following  functions  if  an  invalid 
    J1939 destination address (DA) is determined: 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    29 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
    Error Code 
    Description 

    CanIf_Transmit 

    CanIf_RxIndication 
    49 
    CANIF_E_INVALID_CANIDTYPES
    Used  in  context  of  following  function  if  the  size 
    IZE 
    [bytes]  of    type  Can_IdType  is  inconsistent 
    between static and generated code: 

    CanIf_Init 
    50 
    CANIF_E_INVALID_DLC_METADA
    Used in context of following function  if a Rx-PDU of 
    TA 
    type: meta data is received with invalid length 

    CanIf_RxIndication 
    51 
    CANIF_E_FULL_TX_BUFFER_FIF
    Used  to  inform  that  the  transmit-buffer  of  handling 

    type FIFO is full and that no further Tx-PDUs can be 
    buffered. 
    Used in context of following function: 

    CanIf_Transmit 
    52 
    CANIF_E_INVALID_DOUBLEHASH
    Used in context of following function if the calculated 
    _CALC 
    match  via  the  double  hash  algorithm  for  a  received 
    CAN message is not in valid range: 

    CanIf_RxIndication 
     
    Table 3-3   Errors reported to DET 
    Caution 
    If the development error detection is disabled not only the reporting of the errors is 
     
    suppressed but also the detection i.e. the verification of valid function parameters. 
     
    3.12  Transceiver handling 
    The CAN Interface provides APIs and call back functions to control as many transceivers 
    as  CAN  controllers  are  available  in  the  system.  The  transceiver  handling  has  to  be 
    activated at pre-compile time. 
    The CAN Interface provides the following functions for higher layers to control the behavior 
    of the transceiver.  
      CanIf_SetTrcvMode() 
      CanIf_TrcvModeIndication() 
      CanIf_GetTrcvMode() 
      CanIf_GetTrcvWakeupReason() 
      CanIf_SetTrcvWakeupMode() 
    Additionally the following APIs are provided in order to control a partial networking CAN 
    transceiver. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    30 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
      CanIf_CheckTrcvWakeFlag() 
      CanIf_CheckTrcvWakeFlagIndication() 
      CanIf_ClearTrcvWufFlag() 
      CanIf_ClearTrcvWufFlagIndication() 
      CanIf_ConfirmPnAvailability() 
     
    The initialization of the transceiver driver itself is not executed by the CAN Interface. This 
    means the calling layer has to make sure the transceiver driver is initialized before using 
    the listed API functions. 
    If  more  than  one  different  transceiver  driver  is  used  in  the  system  the  CAN  Interface 
    provides a mapping to address the correct transceiver driver with the correct parameters. 
    The  parameter  CanIfTransceiverMapping  has  to  be  activated  to  control  more  than 
    one transceiver driver.  
    It  is  also  allowed  to  activate  the  parameter  CanIfTransceiverMapping  if  only  one 
    transceiver driver is used in the system. Because of additional runtime it is suggested to 
    deactivate this feature in this use case. 
    The CAN Interface supports the detection of wake up events raised by a transceiver. The 
    feature “Wakeup Support” has to be activated and a wakeup source has to be configured 
    for the corresponding transceiver channel. 
    Within the API CanIf_CheckWakeup() the CAN Interface analyses the passed wakeup 
    source parameter and decides whether a CAN Controller or a CAN Transceiver has to be 
    requested for a pending wake up event. 
    For more details refer to the chapter 3.13 Sleep / WakeUp. 
    3.13  Sleep / WakeUp 
    The CAN Interface controls the modes of the underlying CAN driver and transceiver driver.  
    The API CanIf_SetControllerMode() has to be used to change the mode of the CAN 
    controller  while  the  CAN  transceiver  can  be  controlled  with  the  API 
    CanIf_SetTrcvMode(). 
     
     
    Caution 
    The CAN Interface itself does not perform any checks whether the CAN controller and 
    the CAN transceiver are set to sleep consistently and in the correct sequence. It is up to 
     
    the higher layer to call CanIf_SetControllerMode() and CanIf_SetTrcvMode() 
    in the correct sequence.  
     
    Wake up events can be raised either by the CAN controller or by the CAN transceiver. In 
    both cases the CAN Interface is not directly informed about state changes. This means the 
    higher  layers  (normally  the  EcuM)  has  to  call  the  API  CanIf_CheckWakeup()with  the 
    wakeup sources configured for CAN transceiver or CAN controller (1). 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    31 
    based on template version 2.10.0 










    Technical Reference CAN Interface  
    The  CAN  Interface  decides  by  analyzing  the  passed  wakeup  source  whether  the  CAN 
    controller or the CAN transceiver driver has to be checked for a pending wakeup (2 or 2’).  
    The following figure illustrates the described wake up sequence: 
    EcuM 
    1. CanIf_CheckWakeup  
    3. Returns E_OK/E_NOT_OK  
          (wakeupsource) 
          
    CanIf 
    2. Can_CheckWakeup 
    2’. CanTrcv_CheckWakeup 
           (controller) 
          (transceiver) 
     
    Can Driver 
    Can 
    Transceiver 
     
     
    Figure 3-4  Wake up sequence (No validation) 
    If  the  parameter  “CanIfPublicWakeupCheckValidSupport”  is  enabled  the  following  figure 
    shows the sequence which has to be executed for a valid wake up. Steps 1 to 3 take place 
    as described above. 
    After the call of EcuM_SetWakeupEvent() the CAN Interface has to be set to the state 
    CANIF_CS_STARTED to be able to receive messages. These messages won’t be passed 
    to upper layers by the CAN Interface because the PDU-mode is still set to OFFLINE. The 
    state change which sets the CAN Interface to the mode STARTED has to be realized by the 
    call of the API CanIf_SetControllerMode() with mode CANIF_CS_STARTED (5) from 
    the  function  EcuM_StartWakeupSources()  (4).  If  the  wake  up  was  detected  by  the 
    transceiver  the  CAN  controller  has  to  be  woken  up  internally.  This  means  the  call 
    CanIf_SetControllerMode()  with  mode  CANIF_CS_STOPPED  is  necessary  in  (5) 
    before the transition to mode STARTED is executed. 
    If the wake up is initiated by the CAN controller the corresponding transceiver channel has 
    to be set to mode NORMAL and the CAN controller has to be set to mode STARTED. 
    If the wake up is initiated by a transceiver channel the CAN controller has to be woken up 
    internally.  This  means  an  additional  call  of  CanIf_SetControllerMode()  with  mode 
    CANIF_CS_STOPPED  has  to  be  executed  to  wake  up  the  CAN  controller  before  the 
    transition to mode STARTED is initiated. (Depending on the behavior of the transceiver the 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    32 
    based on template version 2.10.0 











    Technical Reference CAN Interface  
    CAN controller and the configuration itself it is possible to wake up both the CAN controller 
    and the transceiver channel externally.) 
    Next  the  EcuM  starts  a  time  out  for  the  wake  up  validation. This  means  if  a  message  is 
    received within this timeout (6) the call of CanIf_CheckValidation() executed by the 
    EcuM (7) will result in a successful validation. The CAN Interface checks for a recent Rx 
    event  (6)  which  occurred  after  the  wake  up  and  notifies  the  EcuM  by  calling  of 
    EcuM_ValidationWakeupEvent(). 
    If there is no message reception after (5) the function  CanIf_CheckValidation() has 
    been called no successful wake up validation won’t be notified  and the EcuM will run into 
    a timeout. In this case the EcuM calls  EcuM_StopWakeupSources() (8’) and the  CAN 
    Driver and CAN transceiver have to be set to mode SLEEP again. 
     
    8’. EcuM_StopWakeupSources(wakeupsource) 
     CanIf_SetControllerMode(controller, 
    4.  
    EcuM 
    CANIF_CS_STOPPED) 
    EcuM_StartWakeupSources
    CanIf_SetControllerMode(controller, 
    (wakeupsource) 
    CANIF_CS_SLEEP) 
     CanIf_SetTrcvMode(transceiver, 
    CANTRCV_TRCV_MODE_STANDBY) 
    7. 
    8. 
    CanIf_CheckValidation       
    EcuM_ValidateWakeupEvent 
    (wakeupsource) 
         (wakeupsource) 
    5.   
     CanIf_SetTrcvMode (transceiver, 
    CANTRCV_TRCV_MODE_NORMAL) 
    CanIf 
    [   CanIf_SetControllerMode (controller, 
    CANIF_CS_STOPPED)    ] 
     CanIf_SetControllerMode (controller, 
    CANIF_CS_STARTED) 
     
    6. Rx message received 
    (not passed to upper layers yet) 
    CanIf_RxIndication(…) 
    Can Driver 
     
    Figure 3-5  Wake up sequence (Wakeup validation) 
    During the wake up sequence as well as during the transition to mode SLEEP, the higher 
    layers  have  to  take  care  about  the  sequence  of  the  state  transitions  affecting  the  CAN 
    controller (CAN driver) and the Transceiver driver. 
    Since ASR4.0R3 it is configurable on whether only a received CanNm-message is able to 
    do the validation. 
     
    3.14  Bus Off 
    The CAN Interface handles bus off events notified by the CAN Driver in interrupt driven or 
    polling systems. If a bus off event is raised the CAN Driver forwards it to the CAN Interface 
    by calling the function CanIf_ControllerBusOff(). 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    33 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    The CAN Interface switches its internal controller state from STARTED to STOPPED and the 
    PDU mode is set to OFFLINE. 
    In  this  state  no  reception  and  no  transmission  is  possible  until  the  CAN  Interface’s 
    controller state and as a result the CAN Controller’s bus off state is recovered by the call of 
    the  function  CanIf_SetControllerMode()  for  the  affected  channel  by  the  higher 
    layer. 
    After  the  controller  state  is  switched  the  bus  off  state  is  recovered.  For  successful 
    reception and transmission the PDU mode has to be switched to RX_ONLINE, TX_ONLINE 
    or ONLINE by the higher layer. 
     
    3.15  Version Info 
    The version of the CAN Interface module can be acquired in three different ways. The first 
    possibility is by calling of the function CanIf_GetVersionInfo(). This function returns 
    the  module’s  version  in  the  structure  Std_VersionInfoType  which  includes  the 
    VendorID and the ModuleID additionally.  
    The second possibility is the access of version defines which are specified in the header 
    file CanIf.h. 
    The following defines can be evaluated to access different versions: 
      AUTOSAR version: 
      CANIF_AR_RELEASE_MAJOR_VERSION 
      CANIF_AR_RELEASE_MINOR_VERSION 
      CANIF_AR_RELEASE_PATCH_VERSION 
      Module version: 
      CANIF_SW_MAJOR_VERSION 
      CANIF_SW_MINOR_VERSION 
      CANIF_SW_PATCH_VERSION 
      Module ID: 
      CANIF_MODULE_ID 
      Vendor ID: 
      CANIF_VENDOR_ID 
     
    There is a third possibility to at least acquire the SW version by accessing globally visible 
    constants: 
      CanIf_MainVersion  
      CanIf_SubVersion 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    34 
    based on template version 2.10.0 




    Technical Reference CAN Interface  
      CanIf_ReleaseVersion 
     
    Info 
    The API CanIf_GetVersionInfo() is only available if enabled at Pre-compile 
     
    time. The definitions can be accessed independent of the configuration. 
     
    3.16  Partial Networking 
    This feature consists of two sub-features: 
      Wakeup Tx-PDU filter (parameter: CanIfPnWakeupTxPduFilterSupport) 
      Handling of a partial networking transceiver (parameter: 
    CanIfPnTrcvHandlingSupport) 
    The  mentioned  sub-features  can  be  used  only  if  the  attribute  CanIfPublicPnSupport 
    is enabled. See the following table for more information about mentioned sub-features. 
    Feature 
    Description 
    CanIfPnWakeupTxPduFilterSupport  Tx-PDU  filter  which  is  activated  if  the  PDU 
    mode 
    is 
    changed 
    either 
    to 
    CANIF_SET_ONLINE_WU_FILTER 
    or 
    to 
    CANIF_SET_TX_ONLINE_WU_FILTER. 
    This 
    filter  is  active  until  the  first  Tx-confirmation  / 
    Rx-indication  of  the  corresponding  CAN 
    channel  arrives.  Only  certain  Tx-PDUs  which 
    are  labeled  as  Tx  wakeup  filter  PDUs  (s. 
    parameter  CanIfTxPduPnFilterPdu)  can 
    pass the filter. All Tx-requests of other Tx-PDUs 
    are  refused  by  CAN  Interface  until  the  filter  is 
    disabled. 
    CanIfPnTrcvHandlingSupport 
    Handling of a partial networking transceiver  
    Table 3-4 
    Sub-features of feature Partial Networking 
    The parameter CanIfPnTrcvHandlingSupport is enabled automatically if at least one 
    underlying  transceiver  driver  supports  partial  networking.  In  case  of  using  the  feature 
    CanIfPnWakeupTxPduFilterSupport the Tx-PDUs which are allowed to pass the filter 
    have to be configured accordingly. This kind of configuration can be performed individually 
    for every Tx-PDU via the parameter CanIfTxPduPnFilterPdu.  
     
     
    Note 
    Please consider that the filter of a certain CAN channel is only active if at least 
      one 
    Tx-PDU 
    of 
    this 
    CAN 
    channel 
    has 
    the 
    parameter 
    CanIfTxPduPnFilterPdu enabled.  
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    35 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    The  feature  CanIfPnWakeupTxPduFilterSupport  is  configurable  in  all  three 
    configuration variants: 
      Pre-compile 
      Link-time  
      Post-build-loadable 
    Except the restriction that this feature has to be enabled  at Pre-compile time  at all there 
    are no any further restrictions concerning the reconfiguration of this feature in accordance 
    with the Tx-PDUs which may pass the filter in case of a Link-time or a Post-build-loadable 
    configuration variant. 
     
    3.17  Services used by the CAN Interface 
    In the following table services provided by other components which are used by the CAN 
    Interface are listed. For details about prototype and functionality refer to the documentation 
    of the corresponding component. 
    Component 
    API 
    DET 
    Det_ReportError 
    CanDrv 
    Can_SetControllerMode 
    Can_Write 
     
    PduR, CanNm, CanTp, CDD 
    User_TxConfirmation (*) 
    User_RxIndication (*) 
    CanNm, EcuM, CDD 
    User_ControllerBusOff (*) 
    User_ValidationWakeupEvent (*) 
    SchM 
    SchM_Enter_CanIf_##area 
    SchM_Exit_CanIf_##area 
    CanTrcv 
    CanTrcv_SetOpMode 
    CanTrcv_GetOpMode 
    CanTrcv_GetBusWuReason 
    CanTrcv_SetWakeupMode 
    CanTrcv_CheckWakeup 
    MICROSAR extension (optional) 
    EcuM_BswErrorHook 
    Table 3-5   API functions used by the CAN Interface 
    * Names of the call back functions can be configured freely. 
    3.18  Multiple CAN drivers 
    The  CAN  Interface  supports  multiple  CAN  drivers  which  are  implemented  according  to 
    AUTOSAR specification 4.1.1. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    36 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
    Different  CAN  drivers  are  addressed  by  using  the  values  of  attributes  "VendorId"  and 
    "VendorApiInfix" defined in BSWMD file of corresponding CAN driver. 
    In order to ensure compatibility with this CAN Interface the following naming convention of 
    APIs of CAN driver need to be provided.  
     
       
    <Bsw>_<VendorId>_<VendorApiInfix>_<ApiName> 
     
    The APIs of used CAN driver has to be named as follows: 
     
    Basic CAN Driver APIs 
    Can_<VendorId>_<VendorApiInfix>_SetControllerMode 
    Can_<VendorId>_<VendorApiInfix>_Write 
    Can_<VendorId>_<VendorApiInfix>_CancelTx(*) 
    Can_<VendorId>_<VendorApiInfix>_CheckWakeup(*) 
    Can_<VendorId>_<VendorApiInfix>_CheckBaudrate(*) 
    Can_<VendorId>_<VendorApiInfix>_ChangeBaudrate(*) 
    Can_<VendorId>_<VendorApiInfix>_SetBaudrate(*) 
    Table 3-6   Adapted CAN driver APIs (* optional) 
    The following table lists APIs of CAN Interface which have to be called by a CAN driver in 
    case of multiple CAN drivers are configured. 
     
    Basic CAN Driver APIs 
    CanIf_<VendorId>_<VendorApiInfix>_RxIndication 
    CanIf_<VendorId>_<VendorApiInfix>_TxConfirmation 
    CanIf_<VendorId>_<VendorApiInfix>_ControllerBusOff 
    CanIf_<VendorId>_<VendorApiInfix>_ControllerModeIndication 
    CanIf_<VendorId>_<VendorApiInfix>_CancelTxNotification 
    CanIf_<VendorId>_<VendorApiInfix>_CancelTxConfirmation 
    Table 3-7   APIs of CAN Interface which have to be used in multiple CAN driver configurations 
     
     
     
    Caution 
    In  case  of  using  of  a  CAN  driver  which  is  not  provided  by  Vector  Informatik 
      please pay attention to chapter 7.2.4. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    37 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    3.19  Extended RAM-check 
    This  feature  is  configured  via  the  parameter  CanIfExtendedRamCheckSupport.  For 
    further information about configuration of this feature please refer to the help which can be 
    found  in  the  GUI  of  the  DaVinci Configurator 5  and  to  the  description  of  mentioned 
    parameter.   
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    38 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    3.20  Critical Sections 
    The AUTOSAR standard provides with the BSW Scheduler a BSW module, which handles 
    entering and leaving critical sections.  
    For  more  information  about  the  BSW  Scheduler  please  refer  to  [3].  When  the  BSW 
    Scheduler  is  used  the  CAN  Interface  provides  critical  section  codes  that  have  to  be 
    mapped by the BSW Scheduler to following mechanism: 
    Critical Section Define 
    Description 
    CANIF_EXCLUSIVE_AREA_0  Usage inside CanIf_SetControllerMode() 
    >  Duration is short (< 10 instructions) 
    >  Call to Can_SetControllerMode()  
    CANIF_EXCLUSIVE_AREA_1  Usage inside CanIf_CancelTxConfirmation(), 
    CanIf_CancelTransmit(), CanIf_ClearQueue() 
    >  Duration is short (< 10 instructions). 
    >  No calls inside 
    CANIF_EXCLUSIVE_AREA_2  Usage inside CanIf_TxConfirmation() and 
    CanIf_CancelTxConfirmation() 
    >  Duration is medium (< 50 instructions). 
    >  Call to CanIf_TxQueueTreatment(), 
    CanIf_TxQueueTransmit(), Can_Write(), . 
    CANIF_EXCLUSIVE_AREA_3  Usage inside CanIf_SetPduMode() 
    >  Duration is short (< 10 instructions). 
    >  Call to CanIf_ClearQueue() 
    CANIF_EXCLUSIVE_AREA_4  Usage inside CanIf_Transmit() 
    >  Duration is medium (< 50 instructions). 
    >  Call to Can_Write() 
    CANIF_EXCLUSIVE_AREA_5  Usage inside CanIf_SetDynamicTxId() 
    >  Duration is short (< 10 instructions). 
    >  Setting of dynamic CAN identifier 
    CANIF_EXCLUSIVE_AREA_6  Usage inside CanIf_SetAddressTableEntry() and 
    CanIf_ResetAddressTableEntry() 
    >  Duration is short (< 10 instructions). 
    >  Setting of J1939 Rx- and Tx-address 
    >  No calls inside 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    39 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    CANIF_EXCLUSIVE_AREA_7  Usage inside CanIf_RxIndication()  
    >  Duration is short (< 10 instructions). 
    >  Consistent reading from J1939 Rx-address table 
    >  No calls inside 
    Table 3-8   Critical Section Codes 
     
    If  the  exclusive  areas  are  entered  the  upper  layer  needs  to  make  sure  that  the  CAN 
    interrupts  are  disabled.  Additionally  the  following  table  describes  which  API  of  the  CAN 
    Interface must not be called during the corresponding area is entered. The CAN Interface 
    API  CanIf_CancelTxNotification()  /  CanIf_CancelTxConfirmation()is 
    entered  mostly  via  the  CAN  interrupt.  In  case  of  a  platform  which  confirmation  for  a 
    transmit  cancellation  needs  to  be  polled  the  corresponding  API  (for  example 
    Can_MainFunction_Write())  must  not  be  called  if  the  corresponding  lock  area  is 
    entered. 
     
    CANIF_EXCLUSI CANIF_EXCLUSIVCANIF_EXCLUSIVCANIF_EXCLUSI CANIF_EXCLUSI CANIF_EXCLUSI CANIF_EXCLUSI CANIF_EXCLUSI
    VE_ AREA_0 
    E_ AREA_1 
    E_ AREA_2 
    VE_ AREA_3 
    VE_ AREA_4 
    VE_ AREA_5 
    VE_ AREA_6 
    VE_ AREA_7 
    CanIf_Init 
     
     
     
     
     
     
     
     
    CanIf_InitMemory 
     
     
     
     
     
     
     
     
    CanIf_Transmit 
     
     
     
     
     
     
     
     
    CanIf_CancelTransmit 
     
     
     
     
     
     
     
     
    CanIf_SetControllerMode 
     
     
     
     
     
     
     
     
    CanIf_CancelTxNotification/ 
     
     
     
     
     
     
     
     
    CanIf_CancelTxConfirmation 
    CanIf_SetPduMode 
     
     
     
     
     
     
     
     
    CanIf_TxConfirmation 
     
     
     
     
     
     
     
     
    CanIf_ControllerBusOff 
     
     
     
     
     
     
     
     
    CanIf_RxIndication 
     
     
     
     
     
     
     
     
    CanIf_SetAddressTableEntry 
     
     
     
     
     
     
     
     
    CanIf_ResetAddressTableEntry 
     
     
     
     
     
     
     
     
    Table 3-9   Restrictions for the different lock areas 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    40 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  CAN 
    Interface into an application environment of an ECU. 
    4.1 
    Files and include structure 
    The CAN Interface consists of the following files: 
    The  delivery  of  the  CAN  Interface  contains  the  files  which  are  described  in  the  chapters 
    4.1.1 and 4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    CanIf.c 
    Implementation 
    CanIf.h 
    Header file, has to be included by higher layers to access the API 
    CanIf_Cbk.h 
    Header file, has to be included by underlying layers to access call 
    back functions provided by the CAN Interface 
    CanIf_Types.h 
    Definition of types provided by the CAN Interface which have to be 
    used by other layers. This file is included automatically if either 
    CanIf.h or CanIf_Cbk.h is included. 
    CanIf_Hooks.h 
    This header file is included by CanIf.c and defines so called hook-
    macros. Every API of the CAN interface has an own pair of hook-
    macro. One of them is called at the beginning of each API and the 
    other one at the end. The intention of these hook-macros is the 
    ability to measure the execution time of an API. The hook-macros 
    are defined to nothing by default. So they do not influence the 
    execution of code by default.     
    CanIf_GeneralTypes.h  This header file is included by Can_GeneralTypes.h and 
    contains the public types of the CAN Interface. 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool. 
    File Name 
    Description 
    CanIf_Cfg.h 
    Generated header file (included automatically by CanIf.h and 
    CanIf_Cbk.h) 
     
    CanIf_Lcfg.c 
    Contains link time configuration data. Contains data in case of 
    Pre-compile, Link-time and Post-build configuration variant. 
    CanIf_PBcfg.c 
    Contains post build configuration data. In case of Link-time variant is 
    used, this file is empty. 
    CanIf_CanTrcv.h  Generated header file which includes the necessary header files of the 
    transceiver drivers used in the system. 
    Table 4-2   Generated files 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    41 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    4.2 
    Include Structure 
     composite structure Include structure
    CanIf.c
    CanIf_DataChecksum.c
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    SchM_CanIf.h
    CanIf_Cbk.h
    Det.h
    CanIf.h
    CanIf_CanTrcv.h
    «include»
    «include»
    «include»
    Can_Cfg.h
    «include»
    MemMap.h
    «include»
    CanIf_Lcfg.c
    «include»
    «include»
    «include»
    «include»
    CanIf_Cfg.h
    «include»
    Can.h
    «include»
    CanIf_Types.h
    EcuM_Cbk.h
    «include»
    «include»
    Can_GeneralTypes.h
    «include»
    «include»
    ComStack_Types.h
    «include»
    CanSM_Cbk.h
    «include»
    «include»
    «include»
    «include»
    PduR_Cfg.h
    «include»
    CanTp_Cfg.h
    Std_Types.h
    «include»
    «include»
    «include»
    «include»
    CanIf_PBcfg.c
    «include»
    CanNm_Cfg.h
    Platform_Types.h
    Compiler.h
    «include»
    «include»
    CanXcp.h
    «include»
    «include»
    «include»
    J1939Tp_Cfg.h
    «include»
    Compiler_Cfg.h
    J1939Tp_Cbk.h
    «include»
    «include»
    «include»
    J1939Nm_Cfg.h
    «include»
    «include»
    J1939Nm_Cbk.h
    «include»
    CanTSyn_Cbk.h
    «include»
    «include»
     
    Figure 4-1  Include structure 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    42 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions  defined  for  the  CAN  Interface  and  illustrates  their  assignment  among  each 
    other. 
     
    Compiler Abstraction 
     
     
     
    G
     
    G
    Definitions
     
     
    CF
    ROINIT
     
    NIT
    R
    CF
     
    A
    B
    B
     
    E
    NIT

    G
     
    CODE
    V
    P
    _
    _
    _
    L
    L
    L
     
    R_Z
    R_I
    R_NOI
    CF
    P
    P
    P
    R_P
    A
    A
    A
    B
    P
    P
    P
    A
    Memory Mapping 
    V
    V
    V
    CONS
    P
    CODE
    A
    A
    A
    V
    _
    _
    _
    _
    _
    _
    _
    _
    _
    _
    Sections 
    NIF
    NIF
    NIF
    NIF
    NIF
    NIF
    NIF
    NIF
    NIF
    NIF
    CA
    CA
    CA
    CA
    CA
    CA
    CA
    CA
    CA
    CA
    CANIF_START_SEC_CODE 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_CODE 
    CANIF_START_SEC_PBCFG 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_PBCFG 
    CANIF_START_SEC_CONST_8BIT 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_CONST_8BIT 
    CANIF_START_SEC_CONST_32BIT 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_CONST_32BIT 
    CANIF_START_SEC_CONST_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_CONST_UNSPECIFIED 
    CANIF_START_SEC_VAR_NOINIT_UNSPECIFIED 
     
     
      
     
     
     
     
     
     
     
    CANIF_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    CANIF_START_SEC_VAR_ZERO_INIT_UNSPECIFIED 
     
     
      
     
     
     
     
     
     
     
    CANIF_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED 
    CANIF_START_SEC_VAR_INIT_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_VAR_INIT_UNSPECIFIED 
    CANIF_START_SEC_VAR_PBCFG 
     
     
     
     
     
     
     
     
     
     
    CANIF_STOP_SEC_VAR_PBCFG 
    Table 4-3   Compiler abstraction and memory mapping 
    The  Compiler  Abstraction  Definitions  CANIF_APPL_CODE,  CANIF_APPL_VAR  and 
    CANIF_APPL_PBCFG  are  used  to  address  code,  variables  and  constants  which  are 
    declared by other modules and used by the CAN Interface. 
    These  definitions  are  not  mapped  by  the  CAN  Interface  but  by  the  memory  mapping 
    realized in the CAN Driver, CAN Transceiver Driver, PDU Router, Network management, 
    Transport Protocol Layer, ECU State Manager and the CAN State manager. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    43 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    5  Configuration 
    The CAN Interface is configured with DaVinci Configurator 5. Please refer to the help 
    which can be found in the GUI of the configurator and to the descriptions of attributes in 
    BSWMD file of CAN Interface. 
    5.1 
    Configuration of Post-Build 
    The configuration of post-build loadable is described in 
    TechnicalReference_PostBuildLoadable.pdf. 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    44 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6  API Description 
    6.1 
    Services provided by the CAN Interface 
    6.1.1 
    CanIf_GetVersionInfo 
    Prototype 
    void CanIf_GetVersionInfo( Std_VersionInfoType *VersionInfo ); 
    Parameter 
    VersionInfo  
    Pointer to the structure including the version information. 
    Return code 


    Functional Description 
    CanIf_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of the component.  
    The versions are BCD-coded. 
    Particularities and Limitations 
    The function is only available if enabled at Pre-compile time (CANIF_VERSION_INFO_API = STD_ON) 
    Table 6-1 
    API CanIf_GetVersionInfo 
     
    6.1.2 
    CanIf_Init  
    Prototype 
    void CanIf_Init( const CanIf_ConfigType *ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to the structure including configuration data. 
    Return code 


    Functional Description 
    This function initializes global CAN Interface variables during ECU start-up. 
    Particularities and Limitations 
    This API has to be called during start-up before any CAN communication. Can_Init() has to be executed 
    successfully. 
    Table 6-2   API CanIf_Init 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    45 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.3 
    CanIf_SetControllerMode 
    Prototype 
    Std_ReturnType CanIf_SetControllerMode(uint8 ControllerId, 
    CanIf_ControllerModeType ControllerMode) 
    Parameter 
    ControllerId  
    The Controller to change mode. 
    ControllerMode 
    Mode request. 
    Return code 
    Std_ReturnType 
    Returns whether the state transition was successful. 
    Functional Description 
    Request the mode of the specified channel. Supported modes: CANIF_CS_SLEEP, CANIF_CS_STOPPED, 
    CANIF_CS_STARTED. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-3   API CanIf_SetControllerMode 
     
    6.1.4 
    CanIf_GetControllerMode 
    Prototype 
    Std_ReturnType CanIf_GetControllerMode(uint8 ControllerId, 
    CanIf_ControllerModeType  *ControllerModePtr) 
    Parameter 
    ControllerId  
    Request mode of specified Controller. 
    ControllerModePtr  
    Pointer to data type the information is stored in. 
    Return code 
    Std_ReturnType 
    Returns whether the state request was successful or not. 
    Functional Description 
    Acquire the current controller mode of the specified channel 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-4   API CanIf_GetControllerMode 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    46 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.5 
    CanIf_Transmit 
    Prototype 
    Std_ReturnType CanIf_Transmit(PduIdType CanTxPduId, const PduInfoType 
    *PduInfoPtr) 
    Parameter 
    CanTxPduId 
    Handle of the Tx PDU which will be transmitted. 
    PduIndoPtr 
    Pointer to a struct containing the properties of the Tx PDU. 
    Return code 
    Std_ReturnType 
    Returns if the transmit request was accepted. 
    Functional Description 
    Requests the transmission of the specified Tx PDU. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-5   API CanIf_Transmit 
     
    6.1.6 
    CanIf_TxConfirmation 
    Prototype 
    void CanIf_TxConfirmation(PduIdType CanTxPduId) 
    Parameter 
    CanTxPduId 
    ID of the successfully transmitted PDU. 
    Return code 

    -  
    Functional Description 
    Confirms the successful transmission of a Tx PDU  
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-6   API CanIf_TxConfirmation 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    47 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.7 
    CanIf_RxIndication 
    Prototype 
    void CanIf_RxIndication(CanIf_HwHandleType Hrh, Can_IdType CanId, uint8 CanDlc, 
    const uint8 *CanSduPtr) 
    Parameter 
    Hrh 
    Hardware handle the PDU was received in. 
    CanId 
    CAN identifier of the received PDU. 
    CanDlc 
    Data length code of the received PDU. 
    CanSduPtr 
    Pointer to hardware or temporary buffer containing the data of the received 
    PDU. 
    Return code 

    -  
    Functional Description 
    The CAN Driver notifies the CAN Interface about a received Rx PDU. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-7   API CanIf_RxIndication 
     
    6.1.8 
    CanIf_ControllerBusOff 
    Prototype 
    void CanIf_ControllerBusOff(uint8 Controller) 
    Parameter 
    Controller 
    Affected controller. 
    Return code 

    -  
    Functional Description 
    Indicates a BusOff for the specified controller to the CAN Interface.  
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-8   API CanIf_ControllerBusOff 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    48 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.9 
    CanIf_SetPduMode 
    Prototype 
    Std_ReturnType CanIf_SetPduMode(uint8 ControllerId, CanIf_PduSetModeType 
    PduModeRequest) 
    Parameter 
    ControllerId  
    Controller which will be affected by the new Pdu mode. 
    PduModeRequest 
    Requested Pdu mode 
    Return code 
    Std_ReturnType 
    Returns whether the state request was successful.  
    Functional Description 
    Change mode for specified controller. Possible states are:   
      CANIF_SET_OFFLINE, 
      CANIF_SET_RX_OFFLINE, 
      CANIF_SET_RX_ONLINE, 
      CANIF_SET_TX_OFFLINE, 
      CANIF_SET_TX_ONLINE, 
      CANIF_SET_ONLINE, 
      CANIF_SET_TX_OFFLINE_ACTIVE 
    Particularities and Limitations 
    CAN Interface has to be initialized. Controller has to be in state CANIF_CS_STARTED. 
    Table 6-9   API CanIf_SetPduMode 
     
    6.1.10  CanIf_GetPduMode 
    Prototype 
    Std_ReturnType CanIf_GetPduMode(uint8 ControllerId, CanIf_PduGetModeType  * 
    PduModePtr) 
    Parameter 
    ControllerId  
    Request mode of the specified Controller. 
    PduModePtr 
    Pointer to a data buffer the current mode will be stored in. 
    Return code 
    Std_ReturnType 
    Returns whether the request of the current state was successful.  
    Functional Description 
    Request the current mode of the specified controller. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-10   API CanIf_GetPduMode 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    49 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.11  CanIf_InitMemory 
    Prototype 
    void CanIf_InitMemory(void) 
    Parameter 


    Return code 

    -  
    Functional Description 
    Initializes global RAM variables, which have to be available before any call to the CanIf API. 
    Particularities and Limitations 
    May only be called once before CanIf_Init(). 
    Table 6-11   API CanIf_InitMemory 
     
    6.1.12  CanIf_CancelTxConfirmation 
    Prototype 
    void CanIf_CancelTxconfirmation(PduIdType CanTxPduId, const Can_PduType 
    *PduInfoPtr) 
    Parameter 
    CanTxPduId 
    Handle of the Tx PDU which was cancelled. 
    PduInfoPtr 
    Contains information about cancelled PDU 
    Return code 

    -  
    Functional Description 
    Called by the CAN Driver to notify the CAN Interface about a cancelled PDU which has to be re-queued. 
    Particularities and Limitations 
    Only available if CANIF_TRANSMIT_CANCELLATION = STD_ON is set. 
    Table 6-12   API CanIf_CancelTxConfirmation 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    50 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.13  CanIf_SetTrcvMode 
    Prototype 
    StdReturnType CanIf_SetTrcvMode(uint8 TransceiverId, CanTrcv_TrcvModeType 
    TransceiverMode) 
    Parameter 
    TransceiverId  
    Address the transceiver by a transceiver index. 
    TransceiverMode 
    Requested mode transition 
    Return code 
    Std_ReturnType 
    Returns whether the state transition was successful. 
    Functional Description 
    Called by an upper layer to set the transceiver to another mode. 
    Particularities and Limitations 
     
    Only available if transceiver handling is activated at configuration time. 
    (CANIF_TRCV_HANDLING = STD_ON) 
    Table 6-13   API CanIf_SetTrcvMode 
     
    6.1.14  CanIf_GetTrcvMode 
    Prototype 
    StdReturnType CanIf_GetTrcvMode(CanTrcv_TrcvModeType *TransceiverModePtr, uint8 
    TransceiverId) 
    Parameter 
    TransceiverId  
    Address the transceiver by a transceiver index. 
    TransceiverModePtr 
    Pointer to a buffer where current transceiver mode can be stored in. 
    Return code 
    Std_ReturnType 
    Returns whether the request of the current transceiver mode was 
    successful. 
    Functional Description 
    Called by an upper layer to request the current mode of the transceiver. 
    Particularities and Limitations 
    Only 
    available 
    if 
    transceiver 
    handling 
    is 
    activated 
    at 
    configuration 
    time. 
    (CANIF_TRCV_HANDLING = STD_ON) 
    Table 6-14   API CanIf_GetTrcvMode 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    51 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.15  CanIf_GetTrcvWakeupReason 
    Prototype 
    StdReturnType CanIf_GetTrcvWakeupReason(uint8 TransceiverId, 
    CanIf_TrcvWakeupReasonType *TrcvWuReasonPtr) 
    Parameter 
    TransceiverId  
    Address the transceiver by a transceiver index. 
    TrcvWuReasonPtr 
    Pointer to a buffer where the transceiver’s wake up reason can be stored 
    in. 
    Return code 
    Std_ReturnType 
    Returns whether the request of the wake up reason was successful. 
    Functional Description 
    Called by an upper layer to request the wake up reason stored in the transceiver. 
    Particularities and Limitations 
    Only available if transceiver handling is activated at configuration time. 
    (CANIF_TRCV_HANDLING = STD_ON) 
    Table 6-15   API CanIf_GetTrcvWakeupReason 
     
    6.1.16  CanIf_SetTrcvWakeupMode 
    Prototype 
    StdReturnType CanIf_SetTrcvWakeupMode(uint8 TransceiverId, 
    CanTrcv_TrcvWakeupModeType TrcvWakeupMode) 
    Parameter 
    TransceiverId  
    Address the transceiver by a transceiver index. 
    TrcvWakeupMode 
    Enable, disable or clear notification for wake up events. 
    Return code 
    Std_ReturnType 
    Returns whether the requested mode was set successfully. 
    Functional Description 
    Called by an upper layer to enable, disable or clear the wake up event notification of the transceiver. 
    Particularities and Limitations 
    Only available if transceiver handling is activated at configuration time. 
    (CANIF_TRCV_HANDLING = STD_ON) 
    Table 6-16   API CanIf_SetTrcvWakeupMode 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    52 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.17  CanIf_CheckWakeup 
    Prototype 
    Std_ReturnType CanIf_CheckWakeup(EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    Wakeup source which identifies the possible wakeup source (Transceiver / 
    CAN Controller) 
    Return code 
    Std_ReturnType 
    Returns whether the request to the Transceiver/ CAN Controller was 
    successful.  
    Functional Description 
    Called by an upper layer to check if a transceiver or CAN controller recently raised a wakeup. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-17   API CanIf_CheckWakeup 
     
    6.1.18  CanIf_CheckValidation 
    Prototype 
    Std_ReturnType CanIf_CheckValidation(EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    Wakeup source which identifies the possible wakeup source (Transceiver / 
    CAN Controller) 
    Return code 
    Std_ReturnType 
    Returns whether the requested mode was set successfully.  
    Functional Description 
    Called by an upper layer to check if a Rx message was received after a wake up occurred from one of the 
    supported sources. 
    If a message was received between the call of CanIf_CheckWakeup and CanIf_CheckValidation the 
    configurable EcuM call back function EcuM_ValidationWakeupEvent is called from the context of 
    this function. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    CanIf_CheckWakeup has to be called before and a wake up event has to be detected. 
    CAN Interface has to be set to CANIF_CS_STARTED mode before a validation is possible. 
    Table 6-18   API CanIf_CheckValidation 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    53 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.19  CanIf_CancelTransmit 
    Prototype 
    void CanIf_CancelTransmit (PduIdType CanTxPduId) 
    Parameter 
    CanTxPduId  
    PduId of the message which has to be cancelled 
    Return code 

    -  
    Functional Description 
    Initiates the cancellation / suppression of the confirmation of a Tx message. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    AUTOSAR only defines a dummy function. For MICROSAR this function has the functionality to cancel an 
    ordered Tx PDU. This API is provided only in case of CANIF_CANCEL_SUPPORT_API = STD_ON. 
    Table 6-19   API CanIf_CancelTransmit 
     
    6.1.20  CanIf_CancelTxNotification 
    Prototype 
    void CanIf_CancelTxNotification (PduIdType PduId, CanIf_CancelResultType 
    IsCancelled) 
    Parameter 
    PduId  
    Id of the Tx message which was cancelled 
    IsCancelled 
    Parameter currently not evaluated. 
    Return code 

    -  
    Functional Description 
    Called by the CAN Driver to notify about a cancelled message. No confirmation is raised for this message. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Non-AUTOSAR compliant API function which is enabled in case of 
    CANIF_CANCEL_SUPPORT_API = STD_ON. 
    Table 6-20   API CanIf_CancelTxNotification 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    54 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.21  CanIf_SetDynamicTxId 
    Prototype 
    void CanIf_SetDynamicTxId(PduIdType CanTxPduId, Can_IdType CanId) 
    Parameter 
    CanTxPduId 
    PDU ID of the Tx message 
    CanId 
    CAN ID of the messageParameter  
    Return code 

    -  
    Functional Description 
    Called by the application to set the CAN Id of the corresponding Tx PDU. 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Shall not be interrupted by a call of CanIf_Transmit() for the same Tx PDU. 
    Table 6-21   API CanIf_SetDynamicTxId 
     
    6.1.22  CanIf_ControllerModeIndication 
    Prototype 
    void CanIf_ControllerModeIndication(uint8 Controller, CanIf_ControllerModeType 
    ControllerMode) 
    Parameter 
    Controller 
    Channel where the mode transition happened 
    ControllerMode 
    Controller mode to which the CAN controller transitioned  
    Return code 

    -  
    Functional Description 
    Called by the CAN driver to notify about successful controller mode transition 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-22   API CanIf_ControllerModeIndication 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    55 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.23  CanIf_TrcvModeIndication 
    Prototype 
    void CanIf_TrcvModeIndication(uint8 TransceiverId, CanTrcv_TrcvModeType 
    TransceiverMode) 
    Parameter 
    TransceiverId 
    Transceiver where the mode transition happened 
    TransceiverMode 
    Transceiver mode to which the transceiver  transitioned  
    Return code 

    -  
    Functional Description 
    Called by the transceiver driver to notify about successful transceiver mode transition 
    Particularities and Limitations 
    CAN Interface has to be initialized. 
    Table 6-23   API CanIf_TrcvModeIndication 
    6.1.24  CanIf_ConfirmPnAvailability 
    Prototype 
    void CanIf_ConfirmPnAvailability(uint8 TransceiverId) 
    Parameter 
    TransceiverId 
    CAN transceiver, which was checked for PN availability 
     
    Return code 

    -  
    Functional Description 
    This service indicates that the transceiver is running in PN communication mode 
    Particularities and Limitations 
    This API is only available in case of CANIF_PN_TRCV_HANDLING = STD_ON. 
    Table 6-24   API CanIf_ConfirmPnAvailability 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    56 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.25  CanIf_ClearTrcvWufFlagIndication 
    Prototype 
    void CanIf_ClearTrcvWufFlagIndication(uint8 TransceiverId) 
    Parameter 
    TransceiverId 
    CAN transceiver, for which the API was called 
     
    Return code 

    -  
    Functional Description 
    This service indicates that the transceiver has cleared the WufFlag. 
    Particularities and Limitations 
    CanIf_Init() has already been called and all transceiver driver have been initialized. 
    This API is only available in case of CANIF_PN_TRCV_HANDLING = STD_ON. 
    Table 6-25   API CanIf_ClearTrcvWufFlagIndication 
     
    6.1.26  CanIf_CheckTrcvWakeFlagIndication 
    Prototype 
    void CanIf_CheckTrcvWakeFlagIndication(uint8 TransceiverId) 
    Parameter 
    TransceiverId 
    CAN transceiver, for which the API was called 
     
    Return code 

    -  
    Functional Description 
    This service indicates the reason for the wake up that the CAN transceiver has detected 
     
    CanIf_Init() has already been called and all transceiver driver have been initialized. 
    This API is only available in case of CANIF_PN_TRCV_HANDLING = STD_ON. 
    Table 6-26   API CanIf_CheckTrcvWakeFlagIndication 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    57 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.27  CanIf_SetBaudrate 
    Prototype 
    Std_ReturnType CanIf_SetBaudrate(uint8 ControllerId, uint16 BaudRateConfigID) 
    Parameter 
    ControllerId 
    Abstracted CanIf ControllerId which is assigned to a CAN 
    BaudRateConfigID 
    References a baud rate configuration by ID 
    Return code 
    E_OK 
    Service request accepted, baudrate change started. 
    E_NOT_OK 
    Service request not accepted. 
    Functional Description 
    This service shall set the baud rate configuration of the CAN controller. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_SET_BAUDRATE_API = STD_ON. 
    Table 6-27   API CanIf_SetBaudrate 
     
    6.1.28  CanIf_ChangeBaudrate 
    Prototype 
    Std_ReturnType CanIf_ChangeBaudrate(uint8 ControllerId, const uint16 Baudrate) 
    Parameter 
    ControllerId 
    The Controller the Baudrate shall be changed for 
    Baudrate 
    Baudrate to which shall be changed 
    Return code 
    E_OK 
    Service request accepted, change started  
    E_NOT_OK 
    Service request not accepted 
    Functional Description 
    This service changes the baudrate of the CAN controller 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of 
    CANIF_CHANGE_BAUDRATE_SUPPORT = STD_ON. 
    Table 6-28   API CanIf_ChangeBaudrate 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    58 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.29  CanIf_ChangeBaudrate 
    Prototype 
    Std_ReturnType CanIf_ChangeBaudrate(uint8 ControllerId, const uint16 Baudrate) 
    Parameter 
    ControllerId 
    The Controller the Baudrate shall be changed for 
    Baudrate 
    Baudrate to which shall be changed 
    Return code 
    E_OK 
    Service request accepted, change started  
    E_NOT_OK 
    Service request not accepted 
    Functional Description 
    This service changes the baudrate of the CAN controller 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of 
    CANIF_CHANGE_BAUDRATE_SUPPORT = STD_ON. 
    Table 6-29   API CanIf_ChangeBaudrate 
     
    6.1.30  CanIf_GetTxConfirmationState 
    Prototype 
    CanIf_NotifStatusType CanIf_GetTxConfirmationState (uint8 ControllerId) 
    Parameter 
    ControllerId  
    Controller to be checked 
    Return code 
    CANIF_NO_NOTIFICATION 
    No transmit event occurred for requested CAN Controller 
    CANIF_TX_RX_NOTIFICATION 
    The CAN Controller has successfully transmitted any message 
    Functional Description 
    This service reports, if any TX confirmation has been done for the whole CAN controller since the last CAN 
    controller start. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of 
    CANIF_PUBLIC_TX_CONFIRM_POLLING_SUPPORT = STD_ON. 
    Table 6-30   API CanIf_GetTxConfirmationState 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    59 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.31  CanIf_SetAddressTableEntry 
    Prototype 
    void CanIf_SetAddressTableEntry (uint8 ControllerId, uint8 intAddr, uint8 
    busAddr) 
    Parameter 
    ControllerId 
    The channel at which a J1939 address shall be set. 
    intAddr  
    J1939 internal address. 
    busAddr 
    J1939 bus address. 
    Return code 


    Functional Description 
    The service will be called to describe the relation between internal and external ID. Only used in J1939 
    environment. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_J1939_DYN_ADDR_SUPPORT != CANIF_J1939_DYN_ADDR_DISABLED. 
    Table 6-31   API CanIf_SetAddressTableEntry 
     
    6.1.32  CanIf_ResetAddressTableEntry 
    Prototype 
    void CanIf_ResetAddressTableEntry (uint8 ControllerId, uint8 intAddr) 
    Parameter 
    ControllerId 
    The channel at which a J1939 internal address shall be reset. 
    intAddr 
    J1939 internal address. 
    Return code 


    Functional Description 
    The service will be called to reset the relation between internal and external ID. Only used in J1939 
    environment. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_J1939_DYN_ADDR_SUPPORT != CANIF_J1939_DYN_ADDR_DISABLED. 
    Table 6-32   API CanIf_ResetAddressTableEntry 
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    60 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.33  CanIf_RamCheckExecute 
    Prototype 
    void CanIf_RamCheckExecute (uint8 ControllerId) 
    Parameter 
    ControllerId 
    The CAN-channel for which the RAM-check shall be executed. 
    Return code 


    Functional Description 
    This service requests an underlying CAN-channel to execute the RAM-check of CAN-controller-
    HW-registers. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_EXTENDED_RAM_CHECK_SUPPORT == STD_ON. 
    Table 6-33   API CanIf_RamCheckExecute 
     
    6.1.34  CanIf_RamCheckEnableMailbox 
    Prototype 
    void CanIf_RamCheckEnableMailbox (uint8 ControllerId, CanIf_HwHandleType 
    HwHandle) 
    Parameter 
    ControllerId 
    The CAN-channel to which the mailbox (<HwHandle>) belongs to. 
    HwHandle 
    The mailbox which shall be enabled. 
    Return code 


    Functional Description 
    This service requests an underlying CAN-channel to enable a mailbox. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_EXTENDED_RAM_CHECK_SUPPORT == STD_ON. 
    Table 6-34   API CanIf_RamCheckEnableMailbox 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    61 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.35  CanIf_RamCheckEnableController 
    Prototype 
    void CanIf_RamCheckEnableController (uint8 ControllerId) 
    Parameter 
    ControllerId 
    The CAN-channel which shall be enabled. 
    Return code 


    Functional Description 
    This service requests to enable an underlying CAN-channel. 
    Particularities and Limitations 
    CAN Interface has to be initialized. This API is provided in case of  
    CANIF_EXTENDED_RAM_CHECK_SUPPORT == STD_ON. 
    Table 6-35   API CanIf_RamCheckEnableController 
     
    6.1.36  CanIf_RamCheckCorruptMailbox 
    Prototype 
    void CanIf_RamCheckCorruptMailbox (uint8 ControllerId, CanIf_HwHandleType 
    HwHandle) 
    Parameter 
    ControllerId 
    The CAN-channel to which the corrupt mailbox (<HwHandle>) belongs to. 
    HwHandle 
    The corrupt mailbox. 
    Return code 


    Functional Description 
    This service indicates about a corrupt mailbox. 
    Particularities and Limitations 
    This service may be used also if CAN Interface is NOT initialized. This API is provided in case of  
    CANIF_EXTENDED_RAM_CHECK_SUPPORT == STD_ON. 
    Table 6-36   API CanIf_RamCheckCorruptMailbox 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    62 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.1.37  CanIf_RamCheckCorruptController 
    Prototype 
    void CanIf_RamCheckCorruptController (uint8 ControllerId) 
    Parameter 
    ControllerId 
    The corrupt CAN-channel. 
    Return code 


    Functional Description 
    This service indicates about a corrupt CAN-channel. 
    Particularities and Limitations 
    This service may be used also if CAN Interface is NOT initialized. This API is provided in case of  
    CANIF_EXTENDED_RAM_CHECK_SUPPORT == STD_ON. 
    Table 6-37   API CanIf_RamCheckCorruptController 
     
    6.1.38  CanIf_SetPduReceptionMode 
    Prototype 
    Std_ReturnType CanIf_SetPduReceptionMode (PduIdType id, CanIf_ReceptionModeType 
    mode) 
    Parameter 
    id 
    The handle of Rx-PDU whose reception mode shall be changed. 
    mode 
    The reception mode which shall be set. Following reception modes are 
    possible: 
    1) CANIF_RMT_IGNORE_CONTINUE: In case of a match the received 
    Rx-PDU is not forwarded to configured upper layer and the search for a 
    potential match continues. 
    2) CANIF_RMT_RECEIVE_STOP: In case of a match the received 
    Rx-PDU is forwarded to configured upper layer. 
    Return code 
    E_OK 
    Service request accepted, reception mode was changed  
    E_NOT_OK 
    Service request not accepted, reception mode was not changed 
    Functional Description 
    Via this API the reception mode of a Rx-PDU can be set. 
    Particularities and Limitations 
    CAN Interface has to be initialized. During the initialization the reception mode of all affected Rx-PDUs is set 
    to CANIF_RMT_RECEIVE_STOP. This API is provided in case of  
    CANIF_SET_PDU_RECEPTION_MODE_SUPPORT == STD_ON. 
    Table 6-38   API CanIf_SetPduReceptionMode 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    63 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    6.2 
    Callout Functions 
    6.2.1 
    EcuM_BswErrorHook 
    Prototype 
    void EcuM_BswErrorHook(uint16 CanIfModuleId, uint8 CanIfInstanceId) 
    Parameter 
    CanIfModuleId 
    Contains the CANIF_MODULE_ID (60) as defined by AUTOSAR. 
    CanIfInstanceId 
    For the CanIf only one instance is available, so this value is always zero. 
    Return code 
    None 
     
    Functional Description 
    Called once by the CanIf during the initialization phase to indicate one of the following possible errors: 

    Abort initialization as generator is not compatible 
    Particularities and Limitations 
    None 
    Call Context 
    This function is called in context of CanIf_Init(). 
    Table 6-39   EcuM_BswErrorHook 
    6.2.2 
    CanIf_RxIndicationSubDataChecksumRxVerify 
    Prototype 
    Std_ReturnType CanIf_RxIndicationSubDataChecksumRxVerify (PduIdType 
    CanIfRxPduId, Can_IdType CanId, uint8 CanDlc, const uint8 *CanSduPtr) 
    Parameter 
    CanIfRxPduId 
    CanIf-internal unique handle ID of Rx-PDU 
    CanId 
    CAN identifier of received Rx-PDU 
    CanDlc 
    Data length of received Rx-PDU 
    CanSduPtr 
    Pointer to data of received Rx-PDU 
    Return code 
    E_OK 
    Verification of checksum passed. In this case the Rx-PDU is forwarded to upper layer. 
    E_NOT_OK 
    Verification of checksum failed. In this case the Rx-PDU is discarded and NOT 
    forwarded to upper layer. 
    Functional Description 
    API called by CanIf in case of a data checksum PDU was received in order to verify its correctness. 
    Particularities and Limitations 
    This API is called only if CANIF_DATA_CHECKSUM_RX_SUPPORT == STD_ON. 
    Call Context 
    This function is called in context of CanIf_RxIndication().  
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    64 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
     
    6.2.3 
    CanIf_TransmitSubDataChecksumTxAppend 
    Prototype 
    void CanIf_TransmitSubDataChecksumTxAppend (const Can_PduType 
    *txPduInfoPtr, uint8 *txPduDataWithChecksumPtr) 
    Parameter 
    txPduInfoPtr 
    Pointer to Tx-PDU-parameters: CAN identifier, data length, data. 
    txPduDataWithChecksu Pointer to data buffer where the data of Tx-PDU incl. the checksum shall be 
    mPtr 
    stored in. The data checksum PDU is transmitted with data stored in this 
    buffer. 
    Note: Parameter "txPduDataWithChecksumPtr" may only be written with index 
    >= 0 and < CANIF_CFG_MAXTXDLC_PLUS_DATACHECKSUM (see file 
    CanIf_Cfg.h). The length of data can not be changed hence the checksum 
    must only be added within valid data-length of the Tx-PDU which is given by 
    range: 0 - (txPduInfoPtr->length - 1). 
    Return code 
    None 
     
    Functional Description 
    API called by CanIf before transmission of a data checksum Tx-PDU in order to add a checksum to its 
    data. 
    Particularities and Limitations 
    This API is called only if CANIF_DATA_CHECKSUM_TX_SUPPORT == STD_ON. 
    Call Context 
    This function is called in context of CanIf_Transmit(). 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    65 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    7  AUTOSAR Standard Compliance 
    Following restrictions apply to the current CAN Interface implementation. 
    7.1 
    Not supported AUTOSAR features 
    The following features which are specified by the AUTOSAR CAN Interface SWS ([1]) are 
    not supported. 
    7.1.1 
    Tx notification status 
    This  feature  is  specified  by  the  requirements:  CANIF202,  CANIF393,  CANIF472, 
    CANIF331, CANIF391, CANIF334, CANIF335, CANIF609_Conf and CANIF589_Conf. 
    7.1.2 
    Rx notification status 
    This  feature  is  specified  by  the  requirements:  CANIF230,  CANIF336,  CANIF339, 
    CANIF340, CANIF392, CANIF394, CANIF473, CANIF595_Conf and CANIF608_Conf. 
    7.1.3 
    Rx buffer 
    This  feature  is  specified  by  the  requirements:  CANIF194,  CANIF198,  CANIF199, 
    CANIF324,  CANIF325,  CANIF326,  CANIF330,  CANIF329,  CANIF600_Conf  and 
    CANIF607_Conf. 
     
    7.2 
    Deviations 
    7.2.1 
    Tx buffer 
    At  least  and  at  most  one Tx  buffer  is  supported  per  each  BasicCAN-Tx-PDU.  Hence  no 
    configuration  can  be  performed  by  the  user  as  intended  by  the  attribute 
    CanIfBufferSize. 
    7.2.2 
    Partial networking 
    Against  the  requirement  CANIF749  the  Partial  Networking  Wakeup  Tx  Pdu  Filter  is 
    enabled  only  if  the  PDU  mode  of  CAN  Interface  is  set  either  to  mode 
    CANIF_GET_TX_ONLINE_WU_FILTER or to mode CANIF_GET_ONLINE_WU_FILTER. 
    7.2.3 
    AUTOSAR version check 
    The CAN Interface does not perform AUTOSAR release version check in accordance with 
    other modules because the version check is not specified by AUTOSAR clearly. 
    7.2.4 
    Check wakeup 
    According to AUTOSAR the API Can_CheckWakeup must have the following signature: 
    >  Can_ReturnType Can_CheckWakeup(uint8 Controller)2 
    and must return the values CAN_OK or CAN_NOT_OK. 
    However the CAN Interface supports only the following signature: 
    >  Std_ReturnType Can_CheckWakeup(uint8 Controller) 
                                                
    2 Defined by requirement CAN360. 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    66 
    based on template version 2.10.0 



    Technical Reference CAN Interface  
    and supports only the return values E_OK and E_NOT_OK to be returned by this API. 
    Affected requirements are: CANIF720, CANIF678. 
     
     
     
    Note 
    Please ignore this deviation if you use a CAN driver provided by Vector Informatik. In 
      this case both CAN driver and CAN interface are compatible and there is no 
    malfunction in this regard.  
    Furthermore you may ignore this deviation and you will not have any malfunction too if: 
    1)  you use a CAN driver which is not provided by Vector Informatik but the value of 
    CAN_OK equals to E_OK  
    or 
    2)  you do not evaluate the return value of API CanIf_CheckWakeup in your 
    application at all. 
     
     
    7.3 
    Limitations 
    The priority of a dynamic Tx-PDU is determined from the initial configured CAN identifier 
    and not from the CAN identifier set by using the API CanIf_SetDynamicTxId(). 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    67 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator 5  Configuration and generation tool for MICROSAR software components 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CanNm 
    CAN Network Manager 
    CanSM 
    CAN State Manager 
    CanTp 
    CAN Transport Protocol 
    CanTrcv 
    CAN Transceiver 
    CCMSM 
    CAN Interface Controller Mode State Machine (for one controller) 
    CDD 
    Complex Device Driver 
    ComM 
    Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DLC 
    Data Length Code 
    ECU 
    Electronic Control Unit 
    EcuM 
    ECU State Manager 
    FD 
    Flexible Data-rate 
    FIFO 
    First In First Out 
    HRH 
    Hardware Receive Handle 
    HTH 
    Hardware Transmit Handle 
    HW 
    Hardware 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PDU 
    Protocol Data Unit 
    PduR 
    PDU Router 
    SchM 
    Schedule Manager 
    SDU 
    Service Data Unit 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    68 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    SWS 
    Software Specification 
    Table 8-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    69 
    based on template version 2.10.0 


    Technical Reference CAN Interface  
    9  Contact 
    Visit our website for more information on 
     
    >   News 
    >   Products 
    >   Demo software 
    >   Support 
    >   Training data 
    >   Addresses 
     
    www.vector-informatik.com 
     
     

    © 2017 Vector Informatik GmbH 
    Version 6.10.00 
    70 
    based on template version 2.10.0 

    Document Outline


    1.3.69 - TechnicalReference_CanNm

    MICROSAR CAN Network Management

    1.3.71 - TechnicalReference_CanNms


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CAN Network Management 
    Technical Reference 
     
    Nm_Asr4NmCan 
    Version 6.02.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Schuster 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR CAN Network Management 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Markus Schuster 
    2012-08-08 
    1.00.00 
    ESCAN00058396 Creation 
    Markus Drescher 
    2013-05-10 
    1.01.00 
    ESCAN00063144 Updated Architecture 
    Overview 
    ESCAN00064972 Support of Variant Post-
    Build-Loadable 
    ESCAN00065301 Improved send behavior 
    descriptions in chapter 3.6.3 and 
    Immediate Nm Transmission feature 
    descriptions in chapters 3.15 and 3.16 
    ESCAN00065574 Extended chapter 3.13 
    ESCAN00067271 Merged chapter 
    ‘AUTOSAR Standard Compliance’ with 
    chapter 3, removed ‘Compiler Abstraction 
    and Memory Mapping’ chapter, various 
    improvements 
    ESCAN00067277 Adapted chapter 5.3.1.1 
    ESCAN00067278 Replaced 
    Nm_PrepareBusSleep by 
    Nm_PrepareBusSleepMode 
    Markus Drescher 
    2013-10-01 
    2.00.00 
    ESCAN00067700 Added Runtime 
    Measurement Support to ‘Features Beyond 
    the AUTOSAR Standard’ 
    ESCAN00070810 Updated Architecture 
    Overview 
    Markus Drescher 
    2014-02-24 
    2.01.00 
    ESCAN00072375 Adapted condition for 
    usage of CanSM_TxTimeoutException in 
    chapter 5.4 
    ESCAN00073874 Updated Architecture 
    Overview 
    Markus Schuster 
    2014-05-12 
    3.00.00 
    ESCAN00075248 Add description of 
    dependency of Bus Load Reduction and 
    Partial Networking feature on the same 
    channel in chapter 3.6.4 
    Markus Schuster 
    2014-10-09 
    4.00.00 
    ESCAN00076763 Added description in 
    chapter 1, 3.1.2 and 5.3.1.1. Removed 
    chapter 5.2 ‘Type Definitions’ 
    ESCAN00078817 Added description in 
    chapter 3.1.1 
    Markus Schuster 
    2015-06-03 
    5.00.00 
    ESCAN00082408 Updated Table 3-1 and 
    Table 3-3, Table 3-7 
    Markus Schuster 
    2016-03-02 
    6.00.00 
    ESCAN00086897 Adapted chapter 3.4 
    ESCAN00087953 Adapted chapter 3.8 
    ESCAN00087415 Adapted chapter 3.1.1 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    Markus Schuster 
    2016-05-09 
    6.01.00 
    ESCAN00089821 Adapted chapter 3.1 
    ESCAN00090105 Adapted chapter 3.18.3 
    ESCAN00090927 Added chapter 3.5.2.1 
    Markus Schuster 
    2016-11-17 
    6.02.00 
    FEATC-58 Adapted chapter 3.11 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SRS_NetworkManagement.pdf 
    3.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_CANInterface.pdf 
    5.0.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_CANNetworkManagement.pdf 
    3.3.0 
    [4]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [6]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [7]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    3.2.0 
    [8]   Vector 
    Technical Reference MICROSAR PDU Router 
    See 
    delivery 
    Table 1-1   Reference Documents 
    Scope of the Document  
    This technical reference describes the specific use of the CAN Network Management 
    basic software. 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Contents 
    1.  Component History ...................................................................................................... 10 
    2.  Introduction .................................................................................................................. 11 
    2.1  Naming Conventions .............................................................................................. 11 
    2.2  Architecture Overview ............................................................................................ 12 
    2.2.1 
    Architecture of AUTOSAR Network Management .......................................... 12 
    3.  Functional Description ................................................................................................ 14 
    3.1  Features ................................................................................................................. 14 
    3.1.1 
    Deviations Against AUTOSAR ....................................................................... 15 
    3.1.1.1 
    RAM Initialization .................................................................................... 15 
    3.1.1.2 
    Additional Configuration Dependencies .................................................. 15 
    3.1.1.3 
    Variant Post-Build ................................................................................... 15 
    3.1.2 
    Additions/ Extensions .................................................................................... 15 
    3.1.2.1 
    Single Channel Optimization .................................................................. 16 
    3.1.2.2 
    Memory Initialization ............................................................................... 16 
    3.1.2.3 
    Disable Transmission Error Reporting .................................................... 16 
    3.1.2.4 
    Calling CanNm_PassiveStartUp in Prepare Bus Sleep ........................... 16 
    3.1.2.5 
    Additional Development Error Codes ...................................................... 16 
    3.1.2.6 
    Variable DLC Support ............................................................................. 16 
    3.1.2.7 
    Changeability of Additional Parameters During the Post-Build Phase ..... 17 
    3.1.3 
    Limitations ..................................................................................................... 17 
    3.1.3.1 
    Ranges of Timers ................................................................................... 17 
    3.1.3.2 
    Effects of CanNm_DisableCommunication ............................................. 17 
    3.1.3.3 
    CANNM_E_NET_START_IND Development Error ................................. 17 
    3.2  Network Management Mechanism ......................................................................... 17 
    3.3  Initialization ............................................................................................................ 19 
    3.4  Passive Mode ......................................................................................................... 19 
    3.5  Operation Modes and States .................................................................................. 19 

    3.5.1 
    Network Mode ............................................................................................... 20 
    3.5.1.1 
    Repeat Message State ........................................................................... 21 
    3.5.1.2 
    Normal Operation State .......................................................................... 21 
    3.5.1.3 
    Ready Sleep State ................................................................................. 21 
    3.5.2 
    Prepare Bus-Sleep Mode .............................................................................. 21 
    3.5.2.1 
    Wait Bus Sleep Extensions ..................................................................... 22 
    3.5.3 
    Bus-Sleep Mode ............................................................................................ 23 
    3.5.4 
    Wake-up Registration .................................................................................... 23 
    3.5.5 
    User Data Handling ....................................................................................... 23 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    3.6  Network Management Message Transmission and Reception ............................... 24 
    3.6.1 
    AUTOSAR CAN Interface.............................................................................. 24 
    3.6.2 
    PDU Message Layout ................................................................................... 24 
    3.6.3 
    Message Transmissions ................................................................................ 25 
    3.6.4 
    Bus Load Reduction ...................................................................................... 26 
    3.6.5 
    Support for RX PDUs with Different Lengths ................................................. 26 
    3.7  Node Detection ...................................................................................................... 27 
    3.8  NM PDU Receive Indication ................................................................................... 28 
    3.9  Communication Control .......................................................................................... 28 
    3.10  Gateway Functionality ............................................................................................ 28 

    3.10.1  Remote Sleep Indication and Cancellation .................................................... 28 
    3.10.2  Bus Synchronization ..................................................................................... 29 
    3.11  Coordinator Synchronization Support ..................................................................... 29 
    3.12  Error Handling ........................................................................................................ 29 

    3.12.1  Development Error Detection ........................................................................ 29 
    3.12.1.1  Det_ReportError ..................................................................................... 30 
    3.12.1.2  Parameter Checking ............................................................................... 31 
    3.12.2  Production Code Error Reporting .................................................................. 32 
    3.13  Com User Data Support ......................................................................................... 32 
    3.13.1  Configuration Preconditions in an AUTOSAR ECU Configuration .................. 33 
    3.14  Active Wake-up Handling ....................................................................................... 34 
    3.15  Immediate Nm Transmissions ................................................................................ 34 
    3.16  Immediate Restart Enabled .................................................................................... 36 
    3.17  Car Wake-up .......................................................................................................... 37 
    3.17.1  Rx-Path ......................................................................................................... 37 
    3.17.2  Tx-Path ......................................................................................................... 37 

    3.18  Partial Networking .................................................................................................. 37 
    3.18.1  Availability of Partial Network Request Information ....................................... 38 
    3.18.2  Transmission of the CRI Bit in the NM User Data .......................................... 38 
    3.18.3  Filter Algorithm for Received NM Messages .................................................. 38 
    3.18.4  Aggregation of Requested Partial Networks .................................................. 38 
    3.18.5  Spontaneous Sending of NM Messages........................................................ 39 
    3.18.5.1  Using Com Transmission on Change Mechanism .................................. 39 
    3.18.5.2  Using NM Request and Immediate Nm Transmission ............................. 39 

    4.  Integration .................................................................................................................... 40 
    4.1  Scope of Delivery ................................................................................................... 40 
    4.1.1 
    Static Files .................................................................................................... 40 
    4.1.2 
    Dynamic Files ............................................................................................... 40 
    4.2  Include Structure .................................................................................................... 41 
    4.3  Main Functions ....................................................................................................... 42 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    4.4  Critical Sections ..................................................................................................... 42 
    4.5  Critical Section Codes ............................................................................................ 42 

    5.  API Description ............................................................................................................ 44 
    5.1  Data Types ............................................................................................................. 44 
    5.2  Global Constants .................................................................................................... 44 

    5.2.1 
    AUTOSAR Specification Version ................................................................... 44 
    5.2.2 
    Component Versions ..................................................................................... 44 
    5.2.3 
    Vendor and Module ID ................................................................................... 44 
    5.3  Services Provided by CANNM ................................................................................ 46 
    5.3.1 
    Administrative Functions ............................................................................... 46 
    5.3.1.1 
    CanNm_Init: Initialization of CAN NM ..................................................... 46 
    5.3.1.2 
    CanNm_MainFunction: Main Function for All Channel Instances ............ 46 
    5.3.1.3 
    CanNm_InitMemory: Memory Initialization ............................................. 47 
    5.3.2 
    Service Functions .......................................................................................... 47 
    5.3.2.1 
    CanNm_GetVersionInfo: Version Information API ................................... 47 
    5.3.2.2 
    CanNm_GetState: Get the State of the Network Management ............... 48 
    5.3.2.3 
    CanNm_PassiveStartUp: Wake up the Network Management................ 49 
    5.3.2.4 
    Wake-up Registration ............................................................................. 49 
    5.3.2.4.1  CanNm_NetworkRequest: Request the Network ............................. 49 
    5.3.2.4.2  CanNm_NetworkRelease: Release the Network .............................. 50 
    5.3.2.5 
    User Data Handling ................................................................................ 50 
    5.3.2.5.1  CanNm_SetUserData: Set User Data .............................................. 50 
    5.3.2.5.2  CanNm_GetUserData: Get User Data ............................................. 51 
    5.3.2.5.3  CanNm_GetPduData: Get NM PDU Data ........................................ 51 

    5.3.2.6 
    Node Detection....................................................................................... 52 
    5.3.2.6.1  CanNm_RepeatMessageRequest: Set Repeat Message 
    Request Bit ...................................................................................... 52 
    5.3.2.6.2  CanNm_GetNodeIdentifier: Get Node Identifier ............................... 53 
    5.3.2.6.3  CanNm_GetLocalNodeIdentifier: Get Local Node Identifier ............. 53 

    5.3.2.7 
    Bus Synchronization ............................................................................... 54 
    5.3.2.7.1  CanNm_RequestBusSynchronization: Synchronization of 
    Networks ......................................................................................... 54 
    5.3.2.8 
    Remote Sleep Indication ........................................................................ 54 
    5.3.2.8.1  CanNm_CheckRemoteSleepIndication: Check for Remote 
    Sleep Indication ............................................................................... 54 
    5.3.2.9 
    NM Message Transmission Request ...................................................... 55 
    5.3.2.9.1  CanNm_Transmit: Spontaneous NM Message Transmission .......... 55 
    5.3.2.10  Communication Control Service ............................................................. 56 
    5.3.2.10.1  CanNm_DisableCommunication: Disable NM Message 
    Transmission ................................................................................... 56 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.3.2.10.2  CanNm_EnableCommunication: Enabled NM Message 
    Transmission ................................................................................... 56 
    5.3.2.11  Coordinator Synchronization Support ..................................................... 57 
    5.3.2.11.1  CanNm_SetSleepReadyBit: Set Sleep Ready Bit in the CBV .......... 57 
    5.4  Services Used by CANNM ..................................................................................... 58 
    5.5  Callback Functions ................................................................................................. 59 
    5.5.1 
    Callback Functions from CAN Interface ......................................................... 59 
    5.5.1.1 
    CanNm_TxConfirmation: NM Message Confirmation Function ............... 59 
    5.5.1.2 
    CanNm_RxIndication: NM Message Indication ....................................... 59 
    5.5.2 
    Callback Function from CAN State Manager ................................................. 60 
    5.5.2.1 
    CanNm_ConfirmPnAvailability: Notification for Activating the PN Filter 
    Functionality ........................................................................................... 60 

    6.  Glossary and Abbreviations ........................................................................................ 61 
    6.1  Glossary ................................................................................................................. 61 
    6.2  Abbreviations ......................................................................................................... 61 

    7.  Contact.......................................................................................................................... 63 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 12 
    Figure 2-2 
    Interfaces to adjacent modules of the CANNM ......................................... 13 
    Figure 3-1 
    State Diagram of CAN NM from SWS CAN NM [3] ................................... 18 
    Figure 3-2 
    Usual Behavior of NM Transmissions when Repeat Message is entered .. 25 
    Figure 3-3 
    Immediate Transmission due to Signal Change inside User Data I-PDU .. 33 
    Figure 3-4 
    Immediate Nm Transmissions ................................................................... 35 
    Figure 3-5 
    Behavior for NM Transmissions if Immediate Restart Enabled is ON ........ 36 
    Figure 4-1 
    Include structure ....................................................................................... 41 
     
    Tables 
    Table 1-1  
    Reference Documents ................................................................................ 3 
    Table 1-1  
    Component history.................................................................................... 10 
    Table 2-1  
    Naming Conventions ................................................................................ 11 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 15 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 15 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 16 
    Table 3-4  
    PDU NM Message Layout ........................................................................ 24 
    Table 3-5  
    Control Bit Vector ...................................................................................... 25 
    Table 3-6  
    Service IDs ............................................................................................... 30 
    Table 3-7  
    Errors reported to DET ............................................................................. 31 
    Table 3-8  
    Development Error Reporting: Assignment of checks to services ............. 32 
    Table 3-9  
    Errors reported to DEM ............................................................................. 32 
    Table 3-10  
    Configuration Precondition Overview for AUTOSAR ECU Configurations . 34 
    Table 4-1  
    Static files ................................................................................................. 40 
    Table 4-2  
    Generated files ......................................................................................... 40 
    Table 4-3  
    Critical Section Codes .............................................................................. 43 
    Table 5-1  
    Specification Version API Data ................................................................. 44 
    Table 5-2  
    Component Version API Data ................................................................... 44 
    Table 5-3  
    Vendor/Module ID ..................................................................................... 45 
    Table 5-4  
    CanNm_Init .............................................................................................. 46 
    Table 5-5  
    CanNm_MainFunction .............................................................................. 47 
    Table 5-6  
    CanNm_InitMemory .................................................................................. 47 
    Table 5-7  
    CanNm_GetVersionInfo ............................................................................ 48 
    Table 5-8  
    CanNm_GetState ..................................................................................... 48 
    Table 5-9  
    CanNm_PassiveStartUp ........................................................................... 49 
    Table 5-10  
    CanNm_NetworkRequest ......................................................................... 50 
    Table 5-11  
    CanNm_NetworkRelease ......................................................................... 50 
    Table 5-12  
    CanNm_SetUserData ............................................................................... 51 
    Table 5-13  
    CanNm_GetUserData ............................................................................... 51 
    Table 5-14  
    CanNm_GetPduData ................................................................................ 52 
    Table 5-15  
    CanNm_RepeatMessageRequest ............................................................ 52 
    Table 5-16  
    CanNm_GetNodeIdentifier........................................................................ 53 
    Table 5-17  
    CanNm_GetLocalNodeIdentifier ............................................................... 54 
    Table 5-18  
    CanNm_RequestBusSynchronization ....................................................... 54 
    Table 5-19  
    CanNm_CheckRemoteSleepIndication ..................................................... 55 
    Table 5-20  
    CanNm_Transmit ...................................................................................... 56 
    Table 5-21  
    CanNm_DisableCommunication ............................................................... 56 
    Table 5-22  
    CanNm_EnableCommunication ................................................................ 57 
    Table 5-23  
    CanNm_SetSleepReadyBit ....................................................................... 57 
    Table 5-24  
    Services used by the CANNM .................................................................. 58 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Table 5-25  
    CanNm_TxConfirmation ........................................................................... 59 
    Table 5-26  
    CanNm_RxIndication ................................................................................ 60 
    Table 5-27  
    CanNm_ConfirmPnAvailability .................................................................. 60 
    Table 6-1  
    Glossary ................................................................................................... 61 
    Table 6-2  
    Abbreviations ............................................................................................ 62 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    1.  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Adaption to AUTOSAR Release 4 
    1.02.00 
    Support Variant Post-Build-Loadable 
    2.00.00 
    Added Runtime Measurement Support 
    3.00.00 
    Support Variant Post-Build-Selectable 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    10 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    2.  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module  CANNM  as  specified  in  [1]  and  [3].  Also  the  integration  of  the  Network 
    Management into the AUTOSAR stack is covered by this document. 
    The  FlexRay  Network  Management,  LIN  Network  Management  and  the  UDP  Network 
    Management are not covered by this document. 
     
    Please  note  that  in  this  document  the  term  Application  is  not  used  strictly  for  the  user 
    software  but  also  for  any  higher  software  layer,  like  e.g.  the  Communication  Manager 
    (ComM). Therefore, Application refers to any of the software components using the  CAN 
    NM. 
     
    For further information please also refer to the AUTOSAR SWS specifications, referenced 
    at the beginning of this document in Table: ‘Reference Documents’. 
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile, post-build-loadable, post-build-selectable 
    Vendor ID: 
    CANNM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CANNM_MODULE_ID   
    31 decimal 
    (According to ref.[6]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    2.1 
    Naming Conventions 
    The  names  of  the  service  functions  provided  by  the  NM  Interface  and  CAN  NM  always 
    start with a prefix that denominates the module where the service is located. E.g. a service 
    that starts with ‘CanNm_’ is implemented within the CAN NM. 
     
    Naming conventions 
    Nm_ 
    Services of NM Interface. 
    CanNm_ 
    Services of CAN NM. 
    Det_ 
    Services of Development Error Tracer. 
    Dem_ 
    Services of Diagnostic Event Manager. 
    Table 2-1   Naming Conventions 
    Nodes  which  are  configured  to  be  passive  will  be  also  referred  to  as  passive  nodes. 
    Accordingly nodes that are not passive will be termed as active nodes. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    11 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    2.2 
    Architecture Overview 
    The following figure shows where the CANNM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    2.2.1 
    Architecture of AUTOSAR Network Management 
    In  the  current  AUTOSAR  Release  the  standard  AUTOSAR  Network  Management  may 
    consist of up to five modules: 
    >  NM Interface1 
    >  CAN NM 
    >  FlexRay NM1 
    >  LIN NM1 
    >  UDP NM1 
    The  NM  Interface  schedules function  calls from  the  application  to  the  respective  module 
    for  each  channel,  e.g.  for  a  CAN  channel  the  corresponding  CAN  NM  function  will  be 
    called. CAN NM exclusively interacts with the NM Interface. 
    The  communication  bus  specific  functionality  is  incorporated  in  the  corresponding  bus-
    specific NM. The CAN-specific part implements the network management algorithm and is 
                                                
    1 Not covered by this document. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    12 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    responsible for the transmission of NM messages on the communication bus by interacting 
    with the AUTOSAR CAN Interface. 
     
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  CAN  NM.  These 
    interfaces are described in chapter 5 ‘API Description’
     cmp Interfaces
    Nm::Nm
    PduR::PduR
    P
    N
    d
    m
    u
    _
    R
    C
    _
    b
    C
    k
    a
    n
    N
    m
    m
    N
    n
    a
    C
    CanNm_ConfirmPnAvailability
    CanNm::CanNm
    CanSM::CanSM
    CanSM_TxTimeoutException
    Det_ReportError
    Det::Det
    SchM::SchM
    SchM_CanNm
    C
    a
    n
    N
    m
    _
    C
    b
    k
    If
    n
    a
    C
    CanIf::CanIf
     
    Figure 2-2  Interfaces to adjacent modules of the CANNM 
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. Since the CAN NM has no service ports, 
    the CAN NM cannot be accessed via RTE by the application. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    3.  Functional Description 
    3.1 
    Features 
    The Network Management is a network comprehensive protocol that provides services for 
    the organization of the network. It is a decentralized and direct network management. That 
    means  that  every  ECU  transmits  a  special  network  management  message,  which  is 
    reserved for the network management only. 
    The features listed in the following tables cover the complete functionality specified for the 
    CanNm. 
    The AUTOSAR  standard  functionality  is  specified  in  [3],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features 
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector  Informatik  provides  further  CanNm  functionality  beyond  the AUTOSAR  standard. 
    The corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [3] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Controlled transition of all ECU’s to bus-sleep mode and vice versa. 
    User Data Handling 
    Node Detection 
    Remote Sleep Indication 
    Coordinator Synchronization Support 
    Bus Synchronization 
    Bus Load Reduction 
    Immediate Tx Confirmation 
    Passive Mode Support 
    Immediate Restart 
    Pdu Rx Indication 
    State Change Indication 
    Repeat Message Indication 
    Com User Data Support 
    Active Wake-up Bit 
    Immediate Nm Transmissions 
    Car Wake-up 
    Partial Networking 
    Post-Build Loadable 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    14 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Supported AUTOSAR Standard Conform Features 
    MICROSAR Identity Manager using Post-Build Selectable 

    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations Against AUTOSAR  
    The following features specified in [3] are not supported: 
    Category 
    Description 
    ASR 
    Version 

    Functional 
    Communication Scheduling ch. 7.6: The CanNmMsgCycleOffset is  4.0.3 
    not applied when all NM messages have been transmitted with 
    CanNmImmediateNmCycleTime.[CANNM335] 
    Functional 
    Initialization ch. 7.4. A call of CanNm_PassiveStartUp() in 
    4.0.3 
    PrepareBusSleep leads to a transition to Repeat Message state. 
    [CANNM147] 
    Functional/Co Error Notification ch. 7.16. CANNM_E_NETWORK_TIMEOUT is 
    >4.0.3 
    nfig 
    only reported if configuration switch 
    CANNM_DISABLE_TX_ERROR_REPORT is 
    enabled[CANNM193][CANNM194] 
    Functional 
    Debugging Concept ch. 7.18.3 Debugging is supported in 
    4.0.3 
    MICROSAR, but not as described in this chapter.[CANNM287]-
    [CANNM290] 
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.1.1 
    RAM Initialization 
    If RAM is not implicitly initialized at start-up, the function CanNm_InitMemory has to be 
    called. 
    3.1.1.2 
    Additional Configuration Dependencies 
    Following additional dependencies between configuration parameters are added to avoid 
    bad configurations:  
    >  Com Control Enabled must be disabled for passive nodes. 
    >  Node Detection Enabled must be disabled for passive nodes. 
    3.1.1.3 
    Variant Post-Build 
    Instead  of  the  Configuration  Variant  Post-Build,  the  Variant  Post-Build-Loadable  is 
    supported. 
    3.1.2 
    Additions/ Extensions 
    The following extensions of the CAN NM software specifications ([3]) are available within 
    the  Network  Management  embedded  software  components.  If  required,  the  extensions 
    have to be enabled during configuration. 
    Features Provided Beyond The AUTOSAR Standard 
    Single Channel Optimization 
    Memory Initialization 

    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    15 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    Features Provided Beyond The AUTOSAR Standard 
    Disable Transmission Error Reporting 
    Calling CanNm_PassiveStartUp in Prepare Bus Sleep 
    Additional Development Error Codes 
    Variable DLC Support 
    Changeability of Additional Parameters During the Post-Build Phase 
    Runtime Measurement Support 
    Table 3-3   Features provided beyond the AUTOSAR standard 
     
     
     
    Note 
    Some additional non-AUTOSAR features are only available if they are explicitly 
      ordered by the customer. 
     
     
     
    3.1.2.1 
    Single Channel Optimization 
    For single channel systems it is possible to optimize the source code for saving precious 
    resources  (ROM,  RAM  and  CPU  load).  This  optimization  is  only  possible  when  source 
    code is available. 
    Please  note  that  single  channel  optimization  can  only  be  enabled  in  pre-compile 
    configurations.  
    3.1.2.2 
    Memory Initialization 
    AUTOSAR  expects  the  startup  code  to  automatically  initialize  RAM.  Not  every  startup 
    code of embedded targets reinitializes all variables correctly it is possible that the state of 
    a variable may not be initialized, as expected. To avoid this problem the Vector AUTOSAR 
    NM provides additional functions to initialize the relevant variables of the CAN NM. 
    Refer also to chapter 5.3.1.3 ‘CanNm_InitMemory’. 
    3.1.2.3 
    Disable Transmission Error Reporting 
    The error reporting for the following transmission errors can be disabled: 
    >  CANNM_E_DEV_NETWORK_TIMEOUT 
    3.1.2.4 
    Calling CanNm_PassiveStartUp in Prepare Bus Sleep 
    Calling CanNm_PassiveStartUp in Prepare Bus Sleep Mode has the same effects as if it 
    was called in Bus Sleep Mode. This has been done to support the Synchronous Wake-up 
    Feature in ComM. 
    3.1.2.5 
    Additional Development Error Codes 
    There  are  additional  Development  Error  Codes  provided  as  Vector  extension.  Refer  to 
    chapter 3.12.1.1 for details. 
    3.1.2.6 
    Variable DLC Support 
    CanNm supports multiple DLCs for CAN NM messages. Refer to chapter 3.6.5 for details. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    16 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    3.1.2.7 
    Changeability of Additional Parameters During the Post-Build Phase 
    In the Variant  Post-Build-Loadable, the configuration parameters ‘Node Id’, ‘Rx Pdu Ref’, 
    ‘Tx User Data Pdu Ref’, ‘Pn Filter Mask Byte Index’ and ‘Pn Filter Mask Byte Value’  are 
    also  changeable  during  the  post-build  phase  as  addition  to  the  post-build-changeable 
    parameters according to [3]. 
    3.1.3 
    Limitations 
    3.1.3.1 
    Ranges of Timers 
    The range for the following timer is limited concerning the specified range: 
    >  Remote Sleep Indication Timer: 0.001..65.535 s (if remote sleep indication is enabled) 
    All timers should be multiples of the main functions cycle time. 
    3.1.3.2 
    Effects of CanNm_DisableCommunication 
    If CanNm_DisableCommunication was called, CanNm_NetworkRelease has the same 
    effects as if CanNm_DisableCommunication was not called (contradicts to CANNM294 
    of [3]). This was done to provide a more robust implementation. 
    3.1.3.3 
    CANNM_E_NET_START_IND Development Error 
    The  CANNM_E_NET_START_IND  development  error  code  (CANNM336  of  [3])  is  not 
    reported to the Det if an NM message has been received in Bus Sleep Mode. 
     
    The following provides a detailed description of the functional scope. 
    3.2 
    Network Management Mechanism 
    As  described  above  the AUTOSAR  NM  is  a  decentralized  direct  network  management. 
    This  means  that  every  network  node  has  the  same  functionality  and  performs  state  and 
    operation  mode  changes  self-sufficient  depending  on  the  internal  state  and  whether 
    network management messages are still received. 
    The network management mechanism is quite simple: 
    >  Every network node transmits its NM messages only as long as it needs to 
    communicate with other network nodes. Normally bus-communication is required as 
    long as clamp15 (ignition is turned on) is set or during follow-up. 
    >  If there is no more network node in the whole network that need to communicate with 
    other network nodes, any node transmits no more NM messages. 
    >  Each network node performs a transition to bus-sleep mode a certain time after the 
    last NM message has been transmitted by any node. Therefore all nodes will go to 
    bus-sleep mode together. 
    >  If any network node requires bus-communication at any time it can wake up the whole 
    network by transmitting NM messages. 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    17 
    based on template version 5.2.0 




    Technical Reference MICROSAR CAN Network Management 
     
     
    Caution 
    The transmission of application messages, e.g. transmitted by the Com, does not stop 
      immediately after the last NM message has been transmitted. 
     
     
     
     
     
    FAQ 
    The application is in charge of the decision whether the bus communication is required 
      or not. 
     
     
     
    The following figure shows the state diagram of the CAN NM. The events are calls of CAN 
    NM functions by the application or data link layer or the timeout of internal timers. 
     stm State Machine
    Nm Message received or transmitted
    /Restart NM Timeout Timer
    Netw ork Mode
    Ready Sleep
    Repeat Message Timer expires [Network released]
    /Stop Transmission of NM
    NM Timeout Timer expires
    /Start NM Timeout Timer
    Notify NetworkTimeout
    Repeat Message Request or
    Repeat Msg Bit Indication
    Repeat Message
    /Start Transmission of NM
    Network released
    /Stop
    Transmission of
    NM
    Network requested
    Repeat Message Timer
    /Start
    expires [Network requested]
    Transmission of
    NM
    NM Timeout Timer
    expires
    Repeat Message Request or
    /Notify
    Repeat Msg Bit Indication
    Normal Operation
    PrepareBus-SleepMode
    /Start Transmission of NM
    Network requested or
    PassiveStartUp
    /Start NM Timeout Timer
    Notify NetworkMode
    Network requested/PassiveStartUp/Rx Nm Msg
    Start Transmission of NM
    /Start NM Timeout Timer
    messages
    Notify NetworkMode
    Start Transmission of NM messages
    NM Timeout Timer expires
    Can_TriggerTransmission (immediate restart +
    /Start NM Timeout Timer
    Nw Req only)
    Notify NetworkTimeout
    Bus-Sleep Mode
    Prepare-Bus-Sleep Mode
    /Initialize NM
    Power On
    Wait Bus Sleep Timer expires
    /Notify Nm_BusSleep Mode
    Power Off
    Nm Msg received
    /Notify NetworkStart
    Indication
     
    Figure 3-1  State Diagram of CAN NM from SWS CAN NM [3] 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    18 
    based on template version 5.2.0 




    Technical Reference MICROSAR CAN Network Management 
    3.3  Initialization 
    Before the CAN NM can be used it has to be initialized by the application. The initialization 
    has  to  be  carried  out  before  any  other  functionality  of  the  CAN  NM  is  executed.  It  shall 
    take  place  after  initialization  of  the  CAN  Interface  and  prior  to  initialization  of  the  NM 
    Interface. 
    Also refer to chapter 5.3.1.1 ‘CanNm_Init: Initialization of CAN NM’. 
     
     
     
    Caution 
    The CAN NM assumes that some variables are initialized with zero at start-up. If the 
      embedded target does not initialize RAM within the start-up code the function 
    ‘CanNm_InitMemory’ has to be called during start-up and before the initialization is 
    performed. Refer also to chapter 3.1.2.2 ‘Memory Initialization’
     
     
     
     
     
    Note 
    In an AUTOSAR environment where the ECU Manager Fixed is used, the initialization 
      is performed within the ECU Manager. If the ECU Manager Flex is used, the 
    initialization is usually carried out by the BswM. 
     
     
     
    3.4 
    Passive Mode 
    Nodes in passive mode cannot transmit NM messages and therefore they do not actively 
    participate in the network. Due to that, passive nodes cannot request the network. 
    This  mode  can  be  used  for  nodes  that  do  not  need  to  keep  the  bus  awake  to  save 
    resources. 
    By  setting  'Repeat  Message  Time'  to  a  value  equal  to  0,  the  Repeat  Message  state  is 
    skipped. The state does not make sense for passive nodes, since the node is only able to 
    receive  NM  messages,  not  to  send  any.  Usually,  there  is  another  node  that  sends  NM 
    messages  in  Repeat  Message  so  there  is  no  need  for  'Repeat  Message  Time'  being 
    greater than 0 for passive nodes. 
    Nevertheless,  if  'Repeat  Message  Time'  is  configured  to  a  value  greater  than  0  and 
    ‘Timeout  Time’  is  greater  than  ‘Repeat  Message  Time’  and  if  'Passive  Mode  Enabled'  is 
    turned ON, the transition from Repeat Message to Prepare Bus Sleep only depends on the 
    reception of NM messages. If there is no recently received NM message, the transition to 
    Prepare Bus Sleep occurs after Timeout Time has elapsed. 
    In  case  ‘Repeat  Message  Time’  is  greater  than  ‘Timeout  Time’  and  no  NM  message  is 
    received  a  DET  error  will  occur  at  least  once  when  the  Timeout  Timer  elapses  within 
    Repeat  Message  State. The  transition  to  Prepare  Bus  Sleep  occurs  ‘Timeout Time’  after 
    the last DET error call. 
    3.5 
    Operation Modes and States 
    The AUTOSAR NM consists of three operation modes: 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    19 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    >  Network Mode 
    >  Prepare Bus-Sleep Mode 
    >  Bus-Sleep Mode 
    The NM Interface is notified about changes of the operation mode by calling the following 
    functions: 
    Entering Bus-Sleep Mode: 
    Nm_BusSleepMode() 
    (5.4) 
    Entering Network Mode: 
    Nm_NetworkMode() 
    (5.4) 
    Leaving Network Mode: 
    Nm_PrepareBusSleepMode() 
    (5.4) 
    Information  about  the  current  state  and  the  current  mode  is  provided  by  the  service  call 
    CanNm_GetState (chapter 5.3.2.2). 
    The  CAN  NM  notifies  changes  of  the  current  state  to  the  NM  Interface  by  calling  the 
    optional function 
    Nm_StateChangeNotification() 
    (5.4) 
    3.5.1 
    Network Mode 
    The Network Mode comprises three states: 
    >  Repeat Message 
    >  Normal Operation 
    >  Ready Sleep 
    This  is  the  mode  in  that  the  ECU  is  ‘online’  and  participates  in  the  network.  The 
    participation in the network is active or passive depending on the state: 
    >  Active participation: a node keeps the network awake (Repeat message State and 
    Normal Operation State). 
    >  Passive participation: a node is ready for sleep (Ready Sleep State) and any other 
    node keeps the network alive. 
    The application is notified about entering the Network Mode by a call of the function: 
    Nm_NetworkMode() 
    (5.4) 
    The  NM  Interface  notifies  leaving  the  Network  Mode  to  the  application  by  a  call  of  the 
    function: 
    Nm_PrepareBusSleepMode() 
    (5.4) 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    20 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    Info 
    The Com is active during Network Mode. It is started upon entry and stopped upon exit 
     
    of Network Mode. I.e. application messages are transmitted and received within Network 
    Mode! 
    3.5.1.1  Repeat Message State 
    The Repeat Message State is entered: 
    >  If a NM message has been received in Prepare Bus-Sleep Mode. 
    >  If the network has been requested by a call of CanNm_NetworkRequest() in Bus-
    Sleep or Prepare Bus-Sleep Mode. 
    >  If the network is woken up from Bus-Sleep Mode or from Prepare Bus-Sleep Mode by 
    a call of CanNm_PassiveStartUp(). 
    >  If any network node (including itself) has requested node detection in Ready Sleep or 
    Normal Operation State. 
    In Repeat Message State the NM messages are transmitted cyclically regardless whether 
    bus load reduction is enabled or disabled. 
    The Repeat Message State is left after a certain customizable time. 
    Depending on the bus-communication need of the application Normal Operation State or 
    Ready Sleep State is entered upon exit of Repeat Message State. 
    3.5.1.2  Normal Operation State 
    The network management stays in Normal Operation State until the bus-communication is 
    released.  The  local  bus-communication  request  of  the  application  is  distributed  in  the 
    network by the transmission of NM messages. 
    3.5.1.3  Ready Sleep State 
    The network management stays in Ready Sleep State as long as the application does not 
    request  bus-communication  and  the  application  of  any  other  node  still  requests  bus-
    communication (by transmitting NM messages). 
    A certain customizable time after the last network node has released bus-communication a 
    transition to Prepare Bus-Sleep Mode is performed (i.e. Network Mode is left). 
    3.5.2 
    Prepare Bus-Sleep Mode 
    The  transmission  of  application  messages  is  stopped  when  entering  Prepare  Bus-Sleep 
    Mode.  The  bus  activity  is  calmed  down  (pending  message  are  still  transmitted)  in  this 
    mode and finally there is no more activity on the bus. 
    After the ‘wait bus sleep time’ the drop out of Prepare Bus-Sleep Mode to Bus-Sleep Mode 
    the NM Interface is notified by the service call: 
    Nm_BusSleepMode() 
    (5.4) 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    21 
    based on template version 5.2.0 





    Technical Reference MICROSAR CAN Network Management 
     
     
    Caution 
    When entering Bus-Sleep Mode the physical bus interface has to be put into sleep 
      mode. 
    On CAN channels the transceiver and the CAN-Controller have to be put in sleep 
    mode. This information is forwarded by this callback to the ComM. 
     
     
     
     
     
     
    Note 
    If both NmOsek and CanNm are used on the same channel, CanNm is aware of the 
      prolonged shutdown of the NmOsek in case of a Limphome condition if the Wait Bus 
    Sleep Extensions feature is turned ON. For details see the following chapter 3.5.2.1. 
     
     
     
     
    The Prepare Bus-Sleep Mode is left to Network Mode upon successful reception of a NM 
    message or if the network has been requested by a call of  CanNm_NetworkRequest() 
    or if the network has been woken up by a call of CanNm_PassiveStartUp(). 
    3.5.2.1 
    Wait Bus Sleep Extensions 
    If  both  NmOsek  and  CanNm  are  coordinated  on  the  same  channel,  the  internal  state  of 
    NmOsek influences the shutdown behavior of the CanNm. 
     
    >  NmOsek transitions from state NmNormal to NmWaitBusSleep 
    In this case the CanNm applies its normal shutdown time by using the CanNm’s “wait bus 
    sleep time”. 
    >  NmOsek transitions from state NmLimpHome to NmWaitBusSleep 
    In  this  case  the  CanNm  applies  a  longer  shutdown  time  by  using  “TErrorWaitBusSleep” 
    configured in NmOsek. 
     
     
     
     
    Note 
    This feature is automatically enabled when NmOsek and CanNm are configured 
      on  the  same  channel  and  “Wait  Bus  Sleep  Extensions”  feature  is  enabled  in 
    NmOsek. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    22 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    3.5.3 
    Bus-Sleep Mode 
    All network nodes perform a transition to bus-sleep mode at almost the same  time, if no 
    NM message is lost and there hasn’t been a wake-up by any node. 
    The bus-sleep mode is left (wake-up) by a call of 
    CanNm_PassiveStartUp() 
    (5.3.2.3) 
    or if the network has been requested by a call of 
    CanNm_NetworkRequest() 
    (5.3.2.4.1) 
    In both cases Repeat Message State will be entered (see Chapter 3.5.1.1 ‘Repeat 
    Message State’)

    If a NM message is received in Bus-Sleep Mode the service 
    Nm_NetworkStartIndication() 
    (5.4) 
    is called by CAN NM. 
    3.5.4 
    Wake-up Registration 
    The  network  management  needs  to  know  whether  the  application  requires  bus 
    communication. Per default the network management does not actively participate in the 
    network. The active participation in the network is requested by the service 
    CanNm_NetworkRequest() 
     (5.3.2.4.1) 
    Calling  this  function  in  Bus-Sleep  Mode  starts  the  network  and  leads  to  a  transition  to 
    Repeat Message State (see Chapter 3.5.3 ‘Bus-Sleep Mode’)
    If bus communication is not required anymore it can be released with the service 
    CanNm_NetworkRelease() 
    (5.3.2.4.2) 
     
     
     
    Caution 
    When the communication control service is used the bus-communication shall not be 
      released as long as the NM message transmission ability is disabled. 
     
     
     
    Note that a bus-communication request is handled within the next task. Nevertheless it is 
    ensured that a communication request always leads to start-up even if the communication 
    is  released  before  the  next  task  is  executed.  Within  Network  Mode  a  fast  toggling  (i.e. 
    without  task  execution  in  between)  of  the  communication  status  does  not  lead  to  any 
    action. 
    3.5.5 
    User Data Handling 
    The user data for the NM message transmitted next on the bus can be set by the service: 
    CanNm_SetUserData() 
    (5.3.2.5.1) 
    The service  
    CanNm_GetUserData() 
    (5.3.2.5.2) 
    allows reading the user data of the last received message on the bus. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    23 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    As the NM PDU layout is completely configurable, the user data placement depends on 
    the given configuration.  
    The PDU layout and the content of the user data itself are OEM specific and therefore 
    provided by the OEM. 
    Note that for setting of NM user data a second possibility can be configured. Refer to 
    chapter 3.13 ‘Com User Data Support’ for more information. If the feature ‘Com User Data 
    Support’ is used the API CanNm_SetUserData() is not available. 
    3.6 
    Network Management Message Transmission and Reception 
    3.6.1 
    AUTOSAR CAN Interface 
    The  network  management  requests  the  transmission  of  NM  messages  by  calling  the 
    service  CanIf_Transmit  [2].  The  application  has  to  take  care  of  the  user  data.  For 
    details refer to chapter 3.5.5 ‘User Data Handling’. 
    The successful transmission of every network management message is confirmed by the 
    CAN Interface with the service 
    CanNm_TxConfirmation() 
    (5.5.1.1) 
    The CAN Interface indicates the reception of NM message by calling the service  
    CanNm_RxIndication() 
    (5.5.1.2) 
    3.6.2 
    PDU Message Layout 
    The default PDU Message Layout is described in the following table: 
     
    Bit 7 
    Bit 6 
    Bit 5 
    Bit 4 
    Bit 3 
    Bit 2 
    Bit 1 
    Bit 0 
    Byte 7 
    User data 5 
    Byte 6 
    User data 4 
    Byte 5 
    User data 3 
    Byte 4 
    User data 2 
    Byte 3 
    User data 1 
    Byte 2 
    User data 0 
    Byte 1 
    Control Bit Vector 
    Byte 0 
    Source Node Identifier 
    Table 3-4   PDU NM Message Layout 
    The  number  of  User  Data  Bytes  as  well  as  the  positions  of  the  Control  Bit  Vector  and 
    Source  Node  Identifier  can  be  configured  arbitrarily  but  depend  on  the availability  of  the 
    corresponding features (User Data Support / Node Detection Enabled / Node Identifier).  
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
     
    Bit 7 
    Bit 6 
    Bit 5 
    Bit 4 
    Bit 3 
    Bit 2 
    Bit 1 
    Bit 0 
    Byte 1 
    Reserved  Cluster 
    Reserved  Active 
    NM 
    Reserved  Reserved  Repeat 
    (default) 
    Request 
    Wake-up 
    Coordina
    Message 
    Information 
    Bit 
    tor Sleep 
    Request 
    Bit2 
    Ready 
    Table 3-5   Control Bit Vector 
    The  Repeat  Message  Request  Bit  is  only  used  if  the  ‘Node  Detection’  feature  is  active. 
    Refer to chapter 3.7 for more information. 
    The  NM  Coordinator  Sleep  Ready  Bit  is  only  used  if  the  ‘Coordinator  Synchronization 
    Support’
     is active. See chapter 3.11 for more details. 
    The Active Wake-up Bit is used for the ‘Active Wake-up Handling’ (chapter 3.14). 
    The Cluster Request Information Bit is used for ‘Partial Networking’ (chapter 3.18). 
    All bits inside the Control Bit Vector are optionally used and depend on the setting of these 
    features. If the feature is not used, the bit value is 0. 
    3.6.3 
    Message Transmissions 
    A standard sequence for NM message transmissions when Repeat Message is entered is 
    depicted in Figure 3-2. 
    Usual behavior without immediate transmissions
    Bus Sleep or
    Repeat Message
    t
    Prepare Bus Sleep
    0
    CanNm_PassiveStartUp or
    CanNm_NetworkRequest
    ...
    Msg Cycle Offset
    Msg Cycle Time
    Msg Cycle Time
    NM Message Transmissions
     
    Figure 3-2  Usual Behavior of NM Transmissions when Repeat Message is entered 
    The first NM message is transmitted when ‘Msg Cycle Offset’ ms has been elapsed after 
    Repeat Message has been entered. The next NM message will be transmitted after Msg 
    Cycle Time has been elapsed. The configuration settings that influence this behavior are: 
    >  ‘Msg Cycle Offset’: time before the transmission of the first NM message 
    >  ‘Msg Cycle Time’: time between each message transmission 
    >  ‘Immediate Restart Enabled’: if enabled, an additional NM message will be sent 
    immediately upon an active request (CanNm_NetworkRequest was called) from 
    Prepare Bus Sleep to Repeat Message (see also chapter 3.16) in case ‘Msg Cycle 
    Offset’ is greater than zero 
                                                
    2 This bit is also called ‘Partial Network Information Bit’ 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    25 
    based on template version 5.2.0 




    Technical Reference MICROSAR CAN Network Management 
    >  ‘Immediate Nm Transmissions’: if this setting is greater than zero, an immediate NM 
    message will be sent when Repeat Message is entered due to an active request. The 
    interval between NM messages will be different for the next (‘Immediate Nm 
    Transmissions’ - 1) NM messages to be sent. Refer to chapter 3.15 for more details. 
    >  ‘Repeat Message Time’: this setting determines for how long CanNm shall keep the 
    Repeat Message state. If the node has been requested passively, the next state will be 
    Ready Sleep. 
    Note that the NM message is sent as long as the NM state is ‘Repeat Message’ or ‘Normal 
    Operation’. For details about these states, see also chapter 3.5.1. 
     
     
     
    Note 
    The lower layer (e.g. CAN Interface) may reject the send request if Network Mode has 
      just been entered. 
    CanNm usually does not retry to issue the send request of the NM message. There are 
    features, which may enable retries in certain conditions: 
    If ‘Immediate Nm Transmissions’ are greater than zero, the rejected send request is not 
    considered as ‘Immediate Transmission’ (see chapter 3.15). 
     
     
     
     
    3.6.4 
    Bus Load Reduction 
    The bus load reduction is started automatically if enabled and when Normal Operation 
    state is entered. When Normal Operation state is left, bus load reduction algorithm is 
    stopped. For more information refer to chapter 7.7 of [3]. 
     
     
     
    Note 
    Bus Load Reduction cannot be used on the channel if Partial Networking is used on the 
      same channel and vice versa. However setups like Bus Load Reduction is active on 
    the one channel and Partial Networking is active on the other channel is allowed. 
     
     
     
    3.6.5 
    Support for RX PDUs with Different Lengths 
    The  CAN  NM  supports  messages  with  different  lengths  (DLCs).  This  support  can  be 
    enabled  by  disabling  the  ‘CanIf  Range  Config  DLC  Check’  setting  in  the  module 
    configuration. 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    26 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
     
     
    Note 
    The setting is enabled, if a macro definition of 
      CANNM_CANIF_RANGE_CONFIG_DLC_CHECK can be found in CanNm_Cfg.h. 
     
     
     
    In  case  the  ‘CanIf  Range  Config  DLC  Check’  setting  is  disabled,  it  is  assumed  that  the 
    CanIf  module  accepts  NM  messages  with  different  DLCs.  The  minimum  DLC  for  NM 
    messages  may  be  configured  in  the  CanIf  module,  messages  with  a  DLC  less  than  the 
    configured  value  for  the  DLC  check  will  be  discarded.  Messages  with  the  same  DLC  or 
    greater DLC will be received and forwarded to CanNm. 
    However,  the maximum number of bytes that  is evaluated from the received message is 
    equal  to  the  ‘Pdu  Length’  setting  of  the  corresponding  channel.  For  messages  with  a 
    length  n  smaller  than  ‘Pdu  Length’,  the  bytes  n  …  (‘Pdu  Length’  -  1)  are  considered  as 
    being zero. 
    Examples: 
    The length of a received message is 8, ‘Pdu Length’ is configured to 6. In this case, the 
    last two user data bytes are not further processed by CanNm (e.g. CanNm_GetUserData 
    does not return data for these two bytes). 
    The length of a received message is 4, ‘Pdu Length’ is configured to 6. In this case, bytes 
    4  and  5  are  considered  as  being  zero  (e.g.  CanNm_GetUserData  returns  0  for  these 
    bytes). 
    The  minimum  required  number  of  bytes  for  a  received  NM  message  that  should  be 
    processed by CanNm may be configured by using the CanIf DLC Check feature [2]. 
    If  the  ‘CanIf  Range  Config  DLC  Check’  setting  is  enabled,  either  the  CanIf  DLC  feature 
    must  be  enabled  to  accept  only  NM  messages  with  a  DLC  greater  than  or  equal  to  the 
    ‘Pdu Length’ setting or there must not be any ECU that sends NM messages with a DLC 
    less than the ‘Pdu Length’ setting. Otherwise, the behavior of the CanNm will be arbitrary. 
    3.7 
    Node Detection 
    In  order  to  detect  which  nodes  are  currently  present  within  the network,  this mechanism 
    can be used. If a network node requests node detection, the requesting node performs a 
    transition to Repeat Message State and sets the Repeat Message Bit within the NM PDU. 
    Upon  reception  of  the  Repeat  Message  Bit  all  network  nodes  perform  a  transition  to 
    Repeat  Message  State.  This  allows  the  requesting  node  to  collect  all  source  node 
    identifiers from active nodes. 
    The local source node identifier can be retrieved by the service 
    CanNm_GetLocalNodeIdentifier() 
    (5.3.2.6.3) 
    The source node identifier from the last received message can be retrieved by the service 
    CanNm_GetNodeIdentifier() 
    (5.3.2.6.2) 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    27 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    3.8 
    NM PDU Receive Indication 
    The  NM  Interface  is  notified  about  the  reception  of  an  NM  message  by  the  optional 
    function 
    Nm_PduRxIndication() 
    (5.4) 
    In  case  more  than  one  BusNm  is  configured  on  the  same  channel,  a  BusNm  specific 
    reception notification is called. 
    Nm_CanNm_PduRxIndication() 
    (5.4) 
    The  CAN  NM  notifies  the  callback directly  to  the  NM  Interface  in  context  of  the function 
    CanNm_RxIndication (see chapter 5.5.1.2). 
    3.9 
    Communication Control 
    In  order  to  support  ISO  14229  Communication  Control  Service  $28  the  network 
    management  has  a  message  transmission  control  status,  which  allows  disabling  the 
    transmission  of  NM  messages  while  bus-communication  is  requested.  Therefore  the 
    function 
    CanNm_DisableCommunication() 
    (5.3.2.10.1) 
    can be called. The transmission of NM messages will be stopped within the next CAN NM 
    main function call. 
    The NM PDU transmission ability is enabled again by the service 
    CanNm_EnableCommunication() 
    (5.3.2.10.2) 
     
     
     
    Caution 
    An ECU shall not shut down if the NM PDU transmission ability is disabled. 
     
     
     
     
    3.10  Gateway Functionality 
    3.10.1  Remote Sleep Indication and Cancellation 
    In  order  to  synchronize  networks  it  might  be  necessary  to  get  an  indication  whether  no 
    more  network  nodes  require  bus-communication.  This  is  the  so-called  ‘Remote  Sleep 
    Indication’. The start of the remote sleep indication is indicated by 
    Nm_RemoteSleepIndication() 
    (5.4) 
    If any NM message is received during Normal Operation State or Ready Sleep State after 
    the remote sleep indication the service ‘Remote Sleep Cancellation’ is called: 
    Nm_RemoteSleepCancellation() 
    (5.4) 
    It is also possible to retrieve the current remote sleep state by calling the service: 
    CanNm_CheckRemoteSleepIndication() 
    (5.3.2.8.1) 
    Remote sleep indication can only be checked in Ready Sleep state and Normal Operation 
    state. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    28 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    3.10.2  Bus Synchronization 
    In  order  to  synchronize  networks  for  a  synchronized  shutdown  it  might  be  necessary  to 
    transmit an asynchronous NM message to reset the network timers. This can be done by 
    calling the service:  
    CanNm_RequestBusSynchronization() 
    (5.3.2.7.1) 
    However this service shall only be called within Network Mode. 
    3.11  Coordinator Synchronization Support 
    For  supporting  the  NM  Interface  Coordinator  Synchronization  with  more  than  one 
    coordinator connected to the same channel it is necessary to provide one additional bit in 
    the CBV. Therefore the service call 
    CanNm_SetSleepReadyBit() 
    (5.3.2.11.1) 
    allows to set and clear the Nm Coordinator Sleep Ready Bit (see chapter 3.6.2 for further 
    information). Each call of this API triggers the immediate transmission of an NM message 
    can be sent according to the current state in the CanNm State Machine (see Figure 3-1) in 
    order to propagate the change of the Sleep Ready Bit as soon as possible. 
     
     
     
    Caution 
    The ‘Coordinator Synchronization Support’ requires the Control Bit Vector. 
      Therefore this feature has to be enabled if the Coordination Synchronization Support is 
    used. 
     
     
     
    3.12  Error Handling 
    3.12.1  Development Error Detection 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [5],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter CANNM_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported CANNM ID is 31. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.3  and  5.5.  The 
    following table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    CanNm_Init 
    0x01 
    CanNm_PassiveStartUp 
    0x02 
    CanNm_NetworkRequest 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    29 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Service ID 
    Service 
    0x03 
    CanNm_NetworkRelease 
    0x04 
    CanNm_SetUserData 
    0x05 
    CanNm_GetUserData 
    0x06 
    CanNm_GetNodeIdentifier 
    0x07 
    CanNm_GetLocalNodeIdentifier 
    0x08 
    CanNm_RepeatMessageRequest 
    0x0A 
    CanNm_GetPduData 
    0x0B 
    CanNm_GetState 
    0x0C 
    CanNm_DisableCommunication 
    0x0D 
    CanNm_EnableCommunication 
    0x13 
    CanNm_MainFunction 
    0x14 
    CanNm_Transmit 
    0x16 
    CanNm_ConfirmPnAvailability 
    0x17 
    CanNm_SetSleepReadyBit 
    0x40 
    CanNm_TxConfirmation 
    0x42 
    CanNm_RxIndication 
    0xC0 
    CanNm_RequestBusSynchronization 
    0xD0 
    CanNm_CheckRemoteSleepIndication 
    0xF1 
    CanNm_GetVersionInfo 
    Table 3-6   Service IDs 
    3.12.1.1  Det_ReportError 
    Development errors are reported by the service 
    Det_ReportError() 
    (5.4) 
    Please  refer  to  the  documentation  of  the  development  error  tracer  [5]  for  further 
    information and a detailed description of the API. The module Id, API Ids and error Ids can 
    be found within the software components’ header file. 
    The errors reported to DET are described in the following table: 
    Error  Code 
    Description 
    0x01  CANNM_E_NO_INIT 
    API service used without module initialization. 
    0x02  CANNM_E_INVALID_CHANNEL 
    API service used with wrong channel handle. 
    0x03  CANNM_E_INVALID_PDUID 
    API service used with wrong PDU ID 
    0x04  CANNM_E_NET_START_IND 
    Reception of NM Message in Bus Sleep Mode 
    0x05  CANNM_E_INIT_FAILED 
    CAN NM initialization has failed. 
    0x11  CANNM_E_NETWORK_TIMEOUT 
    NM-Timeout Timer has abnormally expired 
    outside of the Ready Sleep State. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    30 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Error  Code 
    Description 
    0x12  CANNM_E_PARAM_POINTER3 
    Null pointer has been passed as an argument. 
    0x20  CANNM_E_RXINDICATION_DLC_ERROR4  DLC of received NM message does not match 
    with configured PDU Length. 
    0x21  CANNM_E_PDUR_TRIGGERTX_ERROR4 
    Call of function PduR_TriggerTransmit failed. 
    0x22  CANNM_E_ALREADY_INITIALIZED 
    CAN NM initialization done more than once. 
    0x33  CANNM_E_INVALID_GENDATA 
    Invalid write access due to wrong 
    configuration data. 
    Table 3-7   Errors reported to DET 
    3.12.1.2  Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters. The checks in 
    Table  3-8  are  internal  parameter  checks  of  the  API  functions.  These  checks  are  for 
    development error reporting. The error reporting of CANNM_E_NETWORK_TIMEOUT can be 
    en-/disabled separately by the configuration switch ‘Disable Tx Err Report’. The Parameter 
    CANNM_DEV_ERROR_DETECT  dis-/  enables  the  call  of  Det_ReportError()  for  all  checks 
    globally. 
    The following table shows which parameter checks are performed on which services: 
    Check 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Service 
    CANNM_E_NO_INIT
    CANNM_E_INVALID_CHANNEL
    CANNM_E_NULL_POINTER
    CANNM_E_INVALID_PDUID
    CANNM_E_NET_START_IND
    CANNM_E_INIT_FAILED
    CANNM_E_NETWORK_TIMEOUT
    CANNM_E_RXINDICATION_DLC_
    ERROR
    CANNM_E_PDUR_TRIGGERTX_ER
    ROR
    CanNm_Init 
     
     
     
     
     
    5 
     
     
     
    CanNm_PassiveStartUp 
     
    6 
     
     
     
     
     
     
     
    CanNm_NetworkRequest 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_NetworkRelease 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_SetUserData 
    7 
    6,7 
    7 
     
     
     
     
     
     
    CanNm_GetUserData 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_GetPduData 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_RepeatMessageRequest 
    5,7  6,7 
     
     
     
     
     
     
     
    CanNm_GetNodeIdentifier 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_GetLocalNodeIdentifier 
     
    6,7 
     
     
     
     
     
     
     
                                                
    3 Error does not apply to the function CanNm_Init. 
    4 Vector extension 
    5 Only checked if CANNM_DEV_ERROR_DETECT is STD_ON 
    6 Only checked if CANNM_OPTIMIZE_CHANNEL_ENABLED is not defined (‘Api Optimization’ is OFF) 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    31 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Check 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Service 
    CANNM_E_NO_INIT
    CANNM_E_INVALID_CHANNEL
    CANNM_E_NULL_POINTER
    CANNM_E_INVALID_PDUID
    CANNM_E_NET_START_IND
    CANNM_E_INIT_FAILED
    CANNM_E_NETWORK_TIMEOUT
    CANNM_E_RXINDICATION_DLC_
    ERROR
    CANNM_E_PDUR_TRIGGERTX_ER
    ROR
    CanNm_RequestBusSynchronization 
    7 
    6,7 
     
     
     
     
     
     
     
    CanNm_CheckRemoteSleepIndication 
    7 
    6,7 
    7 
     
     
     
     
     
     
    CanNm_GetState 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_GetVersionInfo 
     
     
    5 
     
     
     
     
     
     
    CanNm_Transmit 
    7 
     
    7 
    5,7 
     
     
     
     
     
    CanNm_EnableCommunication 
    7  6,7,7 
     
     
     
     
     
     
     
    CanNm_DisableCommunication 
    7 
    6,7 
     
     
     
     
     
     
     
    CanNm_ConfirmPnAvailability 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_SetSleepReadyBit 
     
    6,7 
     
     
     
     
     
     
     
    CanNm_RxIndication 
     
     
     
    5 
     
     
     
    5 
     
    CanNm_MainFunction 
     
    6,7 
     
     
     
     
    5 
     
    5 
    CanNm_TxConfirmation 
    7 
     
     
    5,7 
     
     
     
     
     
    Table 3-8   Development Error Reporting: Assignment of checks to services 
    3.12.2  Production Code Error Reporting 
    By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
    Dem_ReportErrorStatus() as specified in [4], if production error reporting is enabled. 
    If  another  module  is  used  for  production  code  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Dem_ReportErrorStatus(). 
    The errors reported to DEM are described in the following table: 
    Error Code 
    Description 
    N/A 
    Currently no DEM errors are specified 
    Table 3-9   Errors reported to DEM 
    3.13  Com User Data Support 
    The CAN NM supports the possibility to write the NM user data via Com signals. Therefore 
    the signals have to be provided within an additional I-PDU in the configuration. The CAN 
                                                
    7 Only checked if CANNM_PASSIVE_MODE_ENABLED is STD_OFF 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    32 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    NM  updates  its  transmission  buffer  each  time  before  sending  a  NM  message  with  the 
    current data. Therefore it calls the function: 
    PduR_CanNmTriggerTransmit() 
    (5.4) 
    When the NM message has been successfully transmitted the confirmation is forwarded to 
    PduR by calling the function: 
    PduR_CanNmTxConfirmation() 
    (5.4) 
    Depending on the signal and I-PDU configuration a signal change can lead to a request for 
    an immediate NM message transmission by calling the function 
    CanNm_Transmit() 
    (5.3.2.9.1) 
    The  CAN  NM  then  transmits  the  changed  data  in  the  next  main  function  when  the 
    transmission of NM messages is allowed. Afterwards the message cycle timer is restarted, 
    i.e. the cyclic message transmission raster changes. 
    The  spontaneous  transmission  through  CanNm_Transmit  is  allowed  in  the  NM  states 
    Repeat Message and Normal Operation if and only if 
    >  ‘Pn Enabled’ is ON and ‘Pn Handle Multiple Network Requests’ is OFF AND/OR 
    >  ‘Car Wake Up Rx Enabled’ is ON. 
    Behavior with CanNm_Transmit usage
    ...
    Repeat Message
    Normal Operation
    t
    0
    CanNm_Transmit
    CanNm_Transmit
    ...
    Msg Cycle Offset
    Msg Cycle Time
    Msg Cycle Time
    Msg Cycle Time
    NM Message Transmissions
     
    Figure 3-3  Immediate Transmission due to Signal Change inside User Data I-PDU 
    The  following  chapters  describe  more  detailed  the  configuration  preconditions  of  this 
    feature. 
    Note that some additional configuration for this feature has to be done in the PDU Router. 
    Refer to [10] for details. 
    3.13.1  Configuration Preconditions in an AUTOSAR ECU Configuration 
    For  using  the  feature  ‘Com  User  Data  Support’  some  additional  configuration  content 
    within  the AUTOSAR system description  / ECU  Extract  is necessary. The following table 
    provides an overview of the items that have to be added to the system description. 
    Configuration Element 
    Description 
    Signal I-PDU 
    For each NM message one signal I-PDU must be configured. An 
    appropriate signal mapping to the I-Signals has to be defined here. I-
    PDUs are defined in the ECU-specific part. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Configuration Element 
    Description 
    I-Signal 
    Multiple system signals can be defined for each NM message. At 
    least one signal is required. I-Signals are defined in the ECU-specific 
    part and refer to a system signal. 
    System Signal 
    For each I-Signal a corresponding system signal is necessary which 
    defines length, data type and init value. 
    I-PDU Port 
    For each I-PDU an I-PDU port with the communication direction 
    ‘OUT’ is required. 
    Signal Port 
    For each signal a signal port with the communication direction ‘OUT’ 
    is required. 
    I-PDU Triggering 
    For each I-PDU an I-PDU triggering is required that references to the 
    corresponding I-PDU port and the signal I-PDU. 
    Signal Triggering 
    For each I-Signal a signal triggering is required that references to the 
    corresponding signal port and I-Signal. 
    Table 3-10   Configuration Precondition Overview for AUTOSAR ECU Configurations 
    Additionally, a reference from the NM PDU to the related I-PDU with the signals must be 
    established  by  adding  ‘ISignalToIPduMappings’  to  the  NM  PDU.  The  following  example 
    demonstrates how this should be done: 
    <NM-PDU> 
      <SHORT-NAME>NM_PDU</SHORT-NAME> 
      <LENGTH>8</LENGTH> 
      <I-SIGNAL-TO-I-PDU-MAPPINGS> 
       
    <I-SIGNAL-TO-I-PDU-MAPPING> 
       
     
    <SHORT-NAME>NM_USR_DT </SHORT-NAME> 
       
     
    <I-SIGNAL-REF DEST="I-
    SIGNAL">/ISignal/NM_USR_DT_SIGNAL</I-SIGNAL-REF> 
       
     
    <PACKING-BYTE-ORDER>MOST-SIGNIFICANT-BYTE-LAST</PACKING-
    BYTE-ORDER> 
       
     
    <START-POSITION>32</START-POSITION> 
       
    </I-SIGNAL-TO-I-PDU-MAPPING> 
      </I-SIGNAL-TO-I-PDU-MAPPINGS> 
    </NM-PDU> 
    3.14  Active Wake-up Handling 
    The  mode  change  from  Bus-Sleep  Mode  or  Prepare  Bus-Sleep  Mode  to  Network  Mode 
    triggered by CanNm_NetworkRequest() is specified as “Active Wake-up”. Upon an Active 
    Wake-up  the  CAN  NM  sets  the  active  wake-up  bit  within  the  Control  Bit  Vector  at  bit 
    position 4. 
    This feature is optional and has to be configured. 
    3.15  Immediate Nm Transmissions 
    If an Active Wake-up occurs the CAN NM transmits the first NM message immediately (the 
    NM  message offset  time  is  ignored)  when entering  Repeat  Message  State.  For  the  next 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    34 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    NM  messages  CAN  NM  uses  a  faster  NM  message  cycle  time.  Afterwards  it  uses  the 
    normal NM message cycle time. This behavior is illustrated in Figure 3-4. 
    Behavior with n := Immediate Nm Transmissions > 0
    Any state except
    Repeat Message
    t
    Repeat Message
    0
    CanNm_NetworkRequest
    1st
    2nd
    ...
    3rd
    (n-1)th
    nth
    ...
    Immediate Nm
    Immediate Nm
    Immediate Nm
    Msg Cycle Time
    CycleTime
    CycleTime
    CycleTime
    NM Message Transmissions
     
    Figure 3-4  Immediate Nm Transmissions 
    The  number  of  ‘Immediate  Nm  Transmissions’  is  the  number  that  is  configured  for  this 
    parameter. As it can be seen in Figure 3-4, after the first Immediate Nm Transmission the 
    interval between the NM messages is ‘Immediate Nm CycleTime’ for (n-1) times. Then, the 
    usual interval ‘Msg Cycle Time’ is used again. 
    Note  that  “Any  state  except  Repeat  Message”  in  Figure  3-4  refers  to  ‘Bus  Sleep’  and 
    ‘Prepare  Bus  Sleep’.  If  the  setting  ‘Pn  Handle  Multiple  Network  Requests’  is  ON,  it  also 
    refers to ‘Ready Sleep’ and ‘Normal Operation’. 
    This  feature  is  optional  and  has  to  be  enabled  in  the  configuration.  The  amount  of 
    messages  that  are  transmitted  faster  (‘Immediate  Nm  Transmissions’)  and  the  fast 
    message cycle time (‘Immediate Nm Cycle Time’) can also be configured. 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    35 
    based on template version 5.2.0 




    Technical Reference MICROSAR CAN Network Management 
     
     
    Note 
    This feature should not be confused with the possibility for an immediate transmission if 
      the ‘Com User Data Support’ feature is on (chapter 3.13) and should also not be 
    confused with the ‘Immediate Restart Enabled’ feature described in the following 
    chapter. 
     
     
     
     
    Note 
    If the send request of an ‘immediate transmission’ is rejected by the lower layer (e.g. 
      CanIf), the rejected send request is not considered as ‘immediate transmission’. That 
    means that the counter that counts the number of ‘immediate transmissions’ 
    ImmediateNmMsgCount is not decremented. 
    Example: Let ‘Immediate Nm Transmissions’ := 2. The initial counter value of 
    ImmediateNmMsgCount is 1. 
    1.  When Repeat Message has just been entered, the first transmission request 
    TReqA is rejected. ImmediateNmMsgCount is not decremented. 
    2.  CanNm waits ‘Immediate Msg CycleTime’ (first interval tint1st). 
    3.  CanNm sends the NM message successfully. ImmediateNmMsgCount is 
    decremented to 0. 
    4.  CanNm waits ‘Immediate Msg CycleTime’ again (second interval tint2nd). 
    5.  CanNm sends the next NM message successfully. 
    6.  Then ‘Msg Cycle Time’ is waited until the next NM message is sent because 
    ImmediateNmMsgCount is already 0. 
    If the first NM transmission request TReqA was successful (step 1), the second interval 
    time tint2nd would be ‘Msg Cycle Time’ instead of ‘Immediate Msg CycleTime’. 
     
     
    3.16  Immediate Restart Enabled 
    This feature enables the possibility to send an additional NM message upon the transition 
    from Prepare Bus Sleep to Repeat Message if and only if the network is requested actively 
    (e.g. there is a request for Full Communication in ComM). 
    Behavior with Immediate Restart Enabled
    Prepare Bus Sleep
    Repeat Message
    t
    0
    CanNm_NetworkRequest
    ...
    Msg Cycle Offset
    Msg Cycle Time
    Msg Cycle Time
    NM Message Transmissions
     
    Figure 3-5  Behavior for NM Transmissions if Immediate Restart Enabled is ON 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    36 
    based on template version 5.2.0 




    Technical Reference MICROSAR CAN Network Management 
    This  behavior  is  depicted  in  Figure  3-5.  Note  that  the  only  difference  to  the  standard 
    transmission  behavior  (i.e.  ‘Immediate  Restart  Enabled’  would  be  OFF,  for  the  behavior 
    see  also  chapter  3.6.3)  is  the  additional  NM  message  right  after  Repeat  Message  has 
    been entered. 
     
     
    Note 
    The additional NM message is only sent if the ‘Msg Cycle Offset’ setting is greater than 
      0 and if ‘Immediate Nm Transmissions’ = 0 (refer to chapter 3.15 for details). 
     
     
     
    3.17  Car Wake-up 
    Every  ECU  shall  be  able  to  wake  up  all  other  ECUs  of  the  car.  This  wake-up  request 
    information  is  contained  in  the  NM  message  user  data  of  an  ECU.  The  central  gateway 
    ECU  evaluates  the  Car  Wake-up  request  information  and  wakes  up  all  connected 
    communication channels. 
    This feature is optional and has to be configured. 
    3.17.1  Rx-Path 
    If  the  CAN  NM  receives  a  NM  message  it  evaluates  the  user  data  content.  If  the  Car 
    Wake-up Bit is set and the Node ID passes a filter (if Node ID filter is enabled) the CAN 
    NM notifies the NM via the following callback function: 
    Nm_CarWakeUpIndication() 
    (5.4) 
     
    3.17.2  Tx-Path 
    For the transmission of the Car Wake-up Bit it has to be set at the corresponding location 
    within  the  NM  user  data.  If  the  feature  ‘Com  User  Data  Support’  is  used  and  the 
    corresponding signal and I-PDU are configured for directly transmitting a changed signal 
    the information is sent immediately. Refer also to chapter 3.13 ‘Com User Data Support’. 
     
     
     
    Info 
    It is recommended to use the feature ‘Com User Data Support’ for the transmission 
      path. 
     
     
     
    3.18  Partial Networking 
    To  reduce  the  power  consumption  of  ECUs  it  shall  be  possible  to  switch  off  the 
    communication  stack  during  active  bus  communication.  To  control  the  shutdown  and 
    wake-up of such ECUs the CAN NM provides an additional algorithm. The NM message 
    user  data  contains  the  information  which  partial  networks  (PN)  are  requested.  This 
    information is evaluated by the CAN NM and provided to the upper layer in an aggregated 
    form by updating the content of additional I-PDUs in the Com. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    37 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Algorithm details are described in the following sub-chapters. 
    This feature and all of its sub-features are optional and have to be configured 
    3.18.1  Availability of Partial Network Request Information 
    To distinguish between NM messages containing PN cluster request information (CRI) and 
    NM messages without CRI a special bit in the control bit vector (bit 6) is used. Only if this 
    bit is set the NM message contains PN information and will be processed by the algorithm. 
    3.18.2  Transmission of the CRI Bit in the NM User Data 
    The  CAN  NM  sets  the  CRI  Bit  at  bit  position  6  in  the  Control  Bit  Vector  to  1  for  each 
    channel if the Partial Networking feature is enabled on the corresponding channel. 
    3.18.3  Filter Algorithm for Received NM Messages 
    NM messages that are not relevant for an ECU with PN must be dropped. Therefore the 
    content of received NM messages is evaluated after the filter algorithm described in  this 
    section has been activated. Otherwise the usual way of receiving messages is being used. 
    The filter is disabled after the initialization of the CAN NM module. The message reception 
    filter  is  being  activated  after  a  call  of  CanNm_ConfirmPnAvailability  (refer  to  chapter 
    5.5.2.1  ‘CanNm_ConfirmPnAvailability:  Notification  for  Activating  the  PN  Filter 
    Functionality’
     for further details). The filter is disabled in case the channel is started again, 
    by either an internal or external event and ‘CanNm_ConfirmPnAvailability’ was not called. 
    The filter algorithm works as follows: 
    If the CRI bit is cleared the NM message is not relevant for the ECU. 
    If  the  CRI  bit  is  set  the  CAN  NM  evaluates  the  CRI  content  of  the  NM  message.  The 
    location and the length of the CRI in the NM user data can be configured. Each bit within 
    the  CRI  content  represents  one  cluster.  The  corresponding  cluster  is  being  requested  if 
    and only if the bit that belongs to the cluster is set. Because not every cluster is relevant 
    for the ECU a configurable PN filter mask is applied to the CRI content. Irrelevant cluster 
    requests can be ignored by setting the corresponding bit in the filter to 0. If at least one bit 
    within  the  received  PN  information  matches  with  a  bit  in  the  PN  filter  mask  the  NM 
    message is relevant for the ECU, otherwise the NM message is not relevant for the ECU. 
    If a NM message is not relevant and the configuration parameter ’All Nm Messages Keep 
    Awake’  is  true  the  standard  NM  message  reception  handling  is  done,  otherwise  the  NM 
    message is ignored. 
    If a NM message is relevant the CAN NM performs the standard NM message reception 
    and  additionally  the  filtered  PN  content  of  this  message  is  used  for  the  further  PN 
    algorithm. 
    3.18.4  Aggregation of Requested Partial Networks 
    The  CAN  NM  aggregates  requested  PN  information  by  two  slightly  different  algorithms. 
    First  the  external  (received)  and  internal  (sent)  PN  requests  are  aggregated  over  all 
    networks  (channels)  to  a  combined  state  called  External  Internal  Requests  Aggregated 
    (EIRA). Second only the external (received) PN requests are aggregated for each network 
    to  the  so  called  External  Requests  Aggregated  (ERA)  state.  Both  algorithms  can  be 
    activated independently in the configuration.  
    For the EIRA algorithm every received or sent NM message on any network is evaluated 
    and  the  relevant  PN  information  (according  to  the  PN  filter  mask  and  the  CRI  bit)  is 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    38 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    combined  to  one  aggregated  state.  Therefore  this  state  contains  the  information  which 
    partial networks are active on the whole ECU. 
    The ERA algorithm performs the evaluation of the received NM messages and storage of 
    the relevant PN information (according to the PN filter mask and the CRI bit) per network. 
    Therefore the ERA state contains for each network the information which partial networks 
    are requested by other ECUs and have to be active due to external needs. 
    Whenever a cluster is requested the first time (i.e. a bit is set the first time within this PN 
    information) the new request is stored and a timer is started. When the request is repeated 
    before  the  timer  elapses  the  timer  is  restarted.  When  the  timer  elapses  the  request  is 
    deleted. 
    Any change (storing or deleting a request) within the EIRA  or ERA leads to an update of 
    the  content  of  the  EIRA  or  ERA  I-PDU  in  the  Com.  Therefore  the  following  function  is 
    called with the corresponding EIRA or ERA PDU handle: 
    PduR_CanNmRxIndication() 
    (5.4) 
    Note that one ERA I-PDU exists for each network. 
    3.18.5  Spontaneous Sending of NM Messages 
    When  a  new  PN  is  internally  requested  the  corresponding  bit  in  the  NM  message  user 
    data  will  be  set.  This  request  must  be  immediately  visible  on  the  bus  by  sending  the 
    updated user data content as fast as possible. Therefore two mechanisms can be used. 
    3.18.5.1  Using Com Transmission on Change Mechanism 
    When  the  NM  user  data  is  set  via  Com  the  signals  can  be  configured  for  immediate 
    transmission  on  change.  This  would  lead  to  one  additional  NM  message  transmission 
    whenever the content of the signal changes. Refer also to chapter  3.13 ‘Com User Data 
    Support’

    To  enable  this  behavior,  the  setting  ‘Pn  Handle  Multiple  Network  Requests’  has  to  be 
    turned OFF. 
    3.18.5.2  Using NM Request and Immediate Nm Transmission 
    When CAN NM is in Network Mode and the upper layer requests network again by calling 
    the  function  ‘CanNm_NetworkRequest’  (see  chapter  5.3.2.4.1‘CanNm_NetworkRequest: 
    Request  the  Network’  
    for  details)  the  CAN  NM  performs  a  state  transition  to  Repeat 
    Message.  This  leads  to  an  immediate  transmission  of  the  NM  message  followed  by 
    several transmissions with a faster cycle time. 
     
     
     
    Caution 
    Note that the feature ‘Immediate Nm Transmission’ (refer to chapter 3.15 ‘Immediate 
      Nm Transmissions’) must be enabled when using this mechanism for spontaneous 
    sending of NM messages. 
     
     
     
    Note that this mechanism will only be active if PN feature is enabled. 
    To  enable  this  behavior,  the  setting  ‘Pn  Handle  Multiple  Network  Requests’  has  to  be 
    turned ON. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    39 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    4.  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  CANNM 
    into an application environment of an ECU. 
    4.1  Scope of Delivery 
    The  delivery  of  the  CANNM  contains  the  files  which  are  described  in  the  chapters  4.1.1 
    and 4.1.2:
     
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    CanNm.c 
    Source code of CAN NM.

     
     
     
    The user must not change this file! 
    CanNm.h 
    API of CAN NM.

     
     
     
    The user must not change this file! 
    CanNm_Cbk.h 
    API of CAN NM callback functions.

     
     
     
    The user must not change this file! 
    Table 4-1   Static files 
     
     
    Do not edit manually 
    The static files listed above must not be edited by the user! 
     
     
     
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    CanNm_Cfg.c 
    Pre-compile variant configuration source file. 
    The user must not change this file! 
    CanNm_Cfg.h 
    Configuration header file for CAN NM. 
    The user must not change this file! 
    CanNm_Lcfg.c 
    Link-time variant Configuration source file. 
    The user must not change this file! 
    CanNm_Pbcfg.c 
    Post-build variant Configuration source file. 
    The user must not change this file! 
    Table 4-2   Generated files 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    40 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
     
     
    Do not edit manually 
    The dynamic files listed above must not be edited by the user! They should be 
      generated with the configuration tool to guarantee valid parameters. 
     
     
     
    4.2  Include Structure 
     class IncludeStructure
    CanSM_TxTimeOutException.h
    SchM_CanNm.h
    CanNm_Cbk.h
    «include»
    «include»
    «include»
    «include»
    CanNm_Cfg.h
    PduR_CanNm.h
    CanNm.c
    «include»
    «include»
    «include»
    CanNm.h
    «include»
    «include»
    «include»
    «include»
    CanIf.h
    Nm_Cbk.h
    CanNm_Lcfg.c
    CanNm_PBcfg.c
    «include»
    ComM_Types.h
    ComM_Nm.h
    «include»
     
    Figure 4-1  Include structure 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    41 
    based on template version 5.2.0 



    Technical Reference MICROSAR CAN Network Management 
    4.3 
    Main Functions 
    The CAN NM contains one main function that has to be called cyclically on task level. The 
    default timing value is 10 milliseconds. The call cycle time value for the main function has 
    to be set in the configuration settings (Setting: ‘Main Function Period’). 
     
     
     
    Note 
    In an AUTOSAR environment where the BSW Scheduler (SchM) is used the main 
      functions are called by the SchM and must not be called by the application. 
     
     
     
    4.4 
    Critical Sections 
    Critical  Sections  are  handled  by  the  RTE  [7].  They  are  automatically  configured  by  the 
    DaVinci Configurator. User interaction is only necessary by updating the internal behavior 
    using  the  solving  action  in  DaVinci  Configurator.  It  is  signaled  as  a  Warning  in  the 
    Validation tab. 
    The CAN NM calls the following function when entering a critical section: 
    SchM_Enter_CanNm_CANNM_EXCLUSIVE_AREA_i() 
    (5.4) 
    When the critical section is left the following function is called by the CAN NM: 
    SchM_Enter_CanNm_CANNM_EXCLUSIVE_AREA_i() 
    (5.4) 
    Details which section needs what kind of interrupt lock are provided in chapter 4.5 ‘Critical 
    Section Codes’.
     
    4.5 
    Critical Section Codes 
    The  CAN  NM  provides  several  critical  section  codes  which  must  lead  to  corresponding 
    interrupt locks, described in the following table: 
    Critical Section Define 
    Interrupt Lock 
    CANNM_EXCLUSIVE_AREA_0  No interruption by any interrupt is allowed. Therefore this section 
    must always lock global interrupts. 
    CANNM_EXCLUSIVE_AREA_1  No interruption of CanNm_MainFunction by CanNm_SetUserData 
    or CanNm_SetSleepReadyBit allowed. 
    This means that global interrupts have to be used for this section 
    only if CanNm_MainFunction can be interrupted by one of the 
    following functions: 
    >  CanNm_SetUserData 
    >  CanNm_SetSleepReadyBit 
    Otherwise no interrupt locks are necessary. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    42 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    CANNM_EXCLUSIVE_AREA_2  No interruption of CanNm_SetUserData by CanNm_MainFunction 
    allowed. 
    This means that global interrupts must be locked if 
    CanNm_SetUserData can be interrupted by the following functions: 
    >  CanNm_MainFunction 
    Otherwise no interrupt locks are necessary. 
    CANNM_EXCLUSIVE_AREA_3  No interruption of CanNm_SetSleepReadyBit by 
    CanNm_MainFunction allowed 
    This means that global interrupts must be locked if 
    CanNm_SetSleepReadyBit can be interrupted by the following 
    functions: 
    >  CanNm_MainFunction 
    Otherwise no interrupt locks are necessary. 
    CANNM_EXCLUSIVE_AREA_4  No interruption of CanNm_RxIndication by CanNm_GetUserData or 
    CanNm_GetPduData allowed 
    This means that global interrupts must be locked if 
    CanNm_RxIndication can be interrupted by the following functions: 
    >  CanNm_GetUserData 
    >  CanNm_GetPduData 
    Otherwise no interrupt locks are necessary. 
    CANNM_EXCLUSIVE_AREA_5  No interruption of CanNm_GetUserData or CanNm_GetPduData by 
    CanNm_RxIndication allowed 
    This means that global interrupts must be locked if 
    CanNm_GetUserData or CanNm_GetPduData can be interrupted 
    by the following functions: 
    >  CanNm_RxIndication 
    Otherwise no interrupt locks are necessary. 
    Table 4-3   Critical Section Codes 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    43 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Data Types 
    The software module CAN NM uses the standard AUTOSAR data types that are defined 
    within  Std_Types.h  and  the  platform  specific  data  types  that  are  defined  within 
    Platform_Types.h 
    and  the  Communication  Stack  Types  defined  within 
    ComStack_Types.h.  Furthermore  the  standard  AUTOSAR  NM  Stack  Types  defined 
    within NmStack_Types.h are used. 
    CAN NM also uses the Communication Stack Types defined within ComStack_Types.h. 
    5.2 
    Global Constants 
    5.2.1 
    AUTOSAR Specification Version 
    The version of AUTOSAR specification on which the appropriate implementation is based 
    on is provided by three BCD coded defines: 
     
    Name 
    Type  Description 
    CANNM_AR_RELEASE_MAJOR_VERSION 
    BCD  Contains the major specification version 
    number. 
    CANNM_AR_RELEASE_MINOR_VERSION 
    BCD  Contains the minor specification version 
    number. 
    CANNM_AR_RELEASE_REVISION_VERSION  BCD  Contains the patch level specification 
    version number. 
    Table 5-1   Specification Version API Data 
    5.2.2 
    Component Versions 
    The  source  code  versions  of  CAN  NM  are  provided  by  three  BCD  coded  macros  (and 
    additionally as constants): 
    Name 
    Type  Description 
    CANNM_SW_MAJOR_VERSION 
    BCD  Contains the major component version number. 
    (CanNm_MainVersion) 
    CANNM_SW_MINOR_VERSION 
    BCD  Contains the minor component version number. 
    (CanNm_SubVersion) 
    CANNM_SW_PATCH_VERSION 
    BCD  Contains the patch level component version number. 
    (CanNm_ReleaseVersion) 
    Table 5-2   Component Version API Data 
    These constants are declared as external and can be read by the application at any time. 
    5.2.3 
    Vendor and Module ID 
    CAN NM provides the vendor identifier according to AUTOSAR as defines: 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Name 
    Type  Description 
    Value 
    CANNM_VENDOR_ID 

    Vendor ID according to AUTOSAR. 
    30 
    CANNM_MODULE_ID 

    Module ID according to AUTOSAR. 
    31 
    Table 5-3   Vendor/Module ID 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    45 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.3  Services Provided by CANNM 
    5.3.1 
    Administrative Functions 
    5.3.1.1 
    CanNm_Init: Initialization of CAN NM 
    Prototype 
    void CanNm_Init (const CanNm_ConfigType * const cannmConfigPtr) 
    Parameter 
    cannmConfigPtr 
    Configuration structure for initializing the module 
    Return code 


    Functional Description 
    Initialization of the CAN Network Management (CANNM041) and its internal state machine. By default the 
    NM starts in the Bus-Sleep Mode. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  The function CanNm_Init() has to be called before any other CanNm service function is called 
    (except CanNm_InitMemory()). 
    >  During the execution of the function CanNm_Init(), it has to be ensured that the execution is 
    not interrupted by any other function of the CanNm module. This can for instance be 
    accomplished by 
    >  global interrupt locks OR 
    >  CAN interrupt locks. 
    >  In Variant post-build-selectable and post-build-loadable a valid configuration pointer has to be 
    passed in the CanNm_Init function call. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  Task level 
    Table 5-4   CanNm_Init 
    5.3.1.2 
    CanNm_MainFunction: Main Function for All Channel Instances 
    Prototype 
    void CanNm_MainFunction (void) 
    Parameter 


    Return code 


    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    46 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Functional Description 
    Main function of the CanNm which processes the NM algorithm. This function is responsible to handle all 
    CanNm instances. (CANNM234). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called by SchM. 
    Expected Caller Context 
    >  Task level 
    Table 5-5   CanNm_MainFunction 
    5.3.1.3 
    CanNm_InitMemory: Memory Initialization 
    Prototype 
    void CanNm_InitMemory (void) 
    Parameter 


    Return code 


    Functional Description 
    Initialize Memory, so that expected start values are set. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called by the Application. 
    Expected Caller Context 
    >  System startup 
    Table 5-6   CanNm_InitMemory 
    5.3.2 
    Service Functions 
    5.3.2.1 
    CanNm_GetVersionInfo: Version Information API 
    Prototype 
    void CanNm_GetVersionInfo (Std_VersionInfoType *versioninfo) 
    Parameter 
    versioninfo 
    Pointer to where to store the version information of this module 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    47 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Return code 


    Functional Description 
    CanNm_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of the 
    component. 
    The versions are BCD-coded. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is available if CANNM_VERSION_INFO_API is STD_ON 
    Expected Caller Context 
    >  Task level 
    Table 5-7   CanNm_GetVersionInfo 
    5.3.2.2 
    CanNm_GetState: Get the State of the Network Management 
    Prototype 
    Std_ReturnType CanNm_GetState ( const NetworkHandleType  nmChannelHandle, 
     
    Nm_StateType *  const  
    nmStatePtr, 
     
    Nm_ModeType *   const  
    nmModePtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmStatePtr 
    Pointer where the state of the Network Management shall be copied to 
    nmModePtr 
    Pointer where the mode of the Network Management shall be copied to 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Getting the NM state has failed 
    Functional Description 
    Return current state and mode of the network management (CANNM223). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called by NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-8   CanNm_GetState 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    48 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.3.2.3 
    CanNm_PassiveStartUp: Wake up the Network Management 
    Prototype 
    Std_ReturnType CanNm_PassiveStartUp (const NetworkHandleType nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Start of network management has failed 
    Functional Description 
    Starts the NM from the Bus Sleep Mode and triggers a transition to the Network Mode (Repeat Message 
    State) (CANNM211). This service has no effect if the current state is not equal to Bus Sleep Mode or 
    Prepare Bus Sleep Mode. In that case E_NOT_OK is returned. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called by NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-9   CanNm_PassiveStartUp 
    5.3.2.4 
    Wake-up Registration 
    5.3.2.4.1 
    CanNm_NetworkRequest: Request the Network 
    Prototype 
    Std_ReturnType CanNm_NetworkRequest (const NetworkHandleType nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Requesting bus-communication has failed 
    Functional Description 
    Request the network, since ECU needs to communicate on the bus (CANNM213). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called by NM Interface. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    49 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-10   CanNm_NetworkRequest 
    5.3.2.4.2 
    CanNm_NetworkRelease: Release the Network 
    Prototype 
    Std_ReturnType CanNm_NetworkRelease (const NetworkHandleType nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Releasing bus-communication has failed 
    Functional Description 
    Release the network, since ECU doesn't have to communicate on the bus (CANNM214). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called by NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-11   CanNm_NetworkRelease 
    5.3.2.5 
    User Data Handling 
    5.3.2.5.1 
    CanNm_SetUserData: Set User Data 
    Prototype 
    Std_ReturnType CanNm_SetUserData ( const NetworkHandleType  nmChannelHandle, 
     
    const uint8 * const  
    nmUserDataPtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmUserDataPtr 
    Pointer to User data for the next transmitted NM message shall be copied 
    from 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Setting of user data has failed 
    Functional Description 
    Set user data for NM messages transmitted next on the bus (CANNM217). 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    50 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-12   CanNm_SetUserData 
    5.3.2.5.2 
    CanNm_GetUserData: Get User Data 
    Prototype 
    Std_ReturnType CanNm_GetUserData ( const NetworkHandleType  nmChannelHandle, 
     
    uint8 * const  
    nmUserDataPtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmUserDataPtr 
    Pointer where user data out of the last received NM message shall be copied 
    to 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Getting of user data has failed 
    Functional Description 
    Get user data out of the last NM messages received from the bus (CANNM218). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-13   CanNm_GetUserData 
    5.3.2.5.3 
    CanNm_GetPduData: Get NM PDU Data 
    Prototype 
    Std_ReturnType CanNm_GetPduData ( const NetworkHandleType  
    nmChannelHandle, 
     
    uint8 * const  
    nmPduDataPtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmPduDataPtr 
    Pointer where PDU Data out of the most recently received NM message shall 
    be copied to 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    51 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Getting the PDU data has failed 
    Functional Description 
    Get the whole PDU data out of the last NM message received from the bus (CANNM138). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called from NM Interface. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-14   CanNm_GetPduData 
    5.3.2.6  Node Detection 
    5.3.2.6.1 
    CanNm_RepeatMessageRequest: Set Repeat Message Request Bit 
    Prototype 
    Std_ReturnType CanNm_RepeatMessageRequest ( 
    const NetworkHandleType 
     
    nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Repeat Message Request has failed 
    Functional Description 
    Request state change to Repeat Message State (CANNM221). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-15   CanNm_RepeatMessageRequest 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    52 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.3.2.6.2 
    CanNm_GetNodeIdentifier: Get Node Identifier 
    Prototype 
    Std_ReturnType CanNm_GetNodeIdentifier ( const NetworkHandleType 
     
    nmChannelHandle, 
     
    uint8 * const nmNodeIdPtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmNodeIdPtr 
    Pointer where node identifier from the last received NM message shall be 
    copied to 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Getting of node identifier has failed 
    Functional Description 
    Get node identifier of the last received NM message (CANNM219). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-16   CanNm_GetNodeIdentifier 
    5.3.2.6.3 
    CanNm_GetLocalNodeIdentifier: Get Local Node Identifier 
    Prototype 
    Std_ReturnType CanNm_GetLocalNodeIdentifier ( const NetworkHandleType 
     
    nmChannelHandle, 
     
    uint8 * const nmNodeIdPtr) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmNodeIdPtr 
    Pointer where node identifier of the local node shall be copied to 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Getting of local node identifier has failed 
    Functional Description 
    Get node identifier configured for the local node (CANNM220). 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    53 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-17   CanNm_GetLocalNodeIdentifier 
    5.3.2.7 
    Bus Synchronization 
    5.3.2.7.1 
    CanNm_RequestBusSynchronization: Synchronization of Networks 
    Prototype 
    Std_ReturnType CanNm_RequestBusSynchronization ( const NetworkHandleType 
     
    nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Requesting bus synchronization has failed 
    Functional Description 
    Request bus synchronization (CANNM226) (Transmission of an asynchronous NM message to support 
    coordination of coupled networks). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task level 
    Table 5-18   CanNm_RequestBusSynchronization 
    5.3.2.8 
    Remote Sleep Indication 
    5.3.2.8.1 
    CanNm_CheckRemoteSleepIndication: Check for Remote Sleep 
    Indication 

    Prototype 
    Std_ReturnType CanNm_CheckRemoteSleepIndication (  const NetworkHandleType 
     
    nmChannelHandle, 
     
    boolean * const 
     
    nmRemoteSleepIndPtr) 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    54 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmRemoteSleepIndPtr  Pointer where PDU Data out of the most recently received NM message shall 
    be copied to 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Checking remote sleep indication has failed 
    Functional Description 
    Check if remote sleep was indicated or not (CANNM227). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-19   CanNm_CheckRemoteSleepIndication 
    5.3.2.9 
    NM Message Transmission Request 
    5.3.2.9.1 
    CanNm_Transmit: Spontaneous NM Message Transmission 
    Prototype 
    Std_ReturnType CanNm_Transmit ( PduIdType CanNmTxPduId, 
     
    const PduInfoType *PduInfoPtr) 
    Parameter 
    CanNmTxPduId 
    L-PDU handle of CAN L-PDU to be transmitted. This handle specifies the 
    corresponding CAN LPDU ID and implicitly the CAN Driver instance as well as 
    the corresponding CAN controller device. 
    PduInfoPtr 
    Pointer to a structure with CAN L-PDU related data: DLC and pointer to CAN 
    L-SDU buffer. 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  transmit request has not been accepted due to wrong state 
    Functional Description 
    This function is used by the PduR to trigger a spontaneous transmission of an NM message with the 
    provided NM User Data (CANM331). 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    55 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called from PduR 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-20   CanNm_Transmit 
    5.3.2.10  Communication Control Service 
    5.3.2.10.1  CanNm_DisableCommunication: Disable NM Message Transmission 
    Prototype 
    Std_ReturnType CanNm_DisableCommunication ( 
    const NetworkHandleType 
     
    nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Disable NM Message transmission control status has failed 
    Functional Description 
    Disable NM message transmission control status (CANNM215). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-21   CanNm_DisableCommunication 
    5.3.2.10.2  CanNm_EnableCommunication: Enabled NM Message Transmission 
    Prototype 
    Std_ReturnType CanNm_EnableCommunication ( const NetworkHandleType 
     
    nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    56 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Enabling NM Message transmission control status has failed 
    Functional Description 
    Enable NM message transmission control status (CANNM216). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-22   CanNm_EnableCommunication 
    5.3.2.11  Coordinator Synchronization Support 
    5.3.2.11.1  CanNm_SetSleepReadyBit: Set Sleep Ready Bit in the CBV 
    Prototype 
    Std_ReturnType CanNm_SetSleepReadyBit ( const NetworkHandleType 
     
    nmChannelHandle, 
     
    const boolean nmSleepReadyBit) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    nmSleepReadyBit 
    Value written to Ready Sleep Bit in CBV 
    Return code 
    Std_ReturnType 
    E_OK 
    -  No error 
    E_NOT_OK  -  Writing of Sleep Ready Bit has failed 
    Functional Description 
    Set the NM Coordinator Sleep Ready bit in the Control Bit Vector (CANNM338). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called from NM Interface 
    Expected Caller Context 
    >  Task level 
    Table 5-23   CanNm_SetSleepReadyBit 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    57 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.4  Services Used by CANNM 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CANNM are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    CanIf 
    CanIf_Transmit8 
    CanSM 
    CanSM_TxTimeoutException9 
    DET 
    Det_ReportError10 
    NM 
    Nm_CarWakeUpIndication11 
    Nm_BusSleepMode 
    Nm_CoordReadyToSleepIndication12 
    Nm_CoordReadyToSleepCancellation12 
    Nm_NetworkMode 
    Nm_NetworkStartIndication 
    Nm_PduRxIndication13 
    Nm_CanNm_PduRxIndication14 
    Nm_PrepareBusSleepMode 
    Nm_RemoteSleepCancellation15 
    Nm_RemoteSleepIndication15 
    Nm_RepeatMessageIndication16 
    Nm_StateChangeNotification17 
    Nm_TxTimeoutException8,18 
    PduR 
    PduR_CanNmTriggerTransmit8,19 
    PduR_CanNmTxConfirmation8,19,20 
    PduR_CanNmRxIndication21 
    SchM 
    SchM_Enter_CanNm_CANNM_EXCLUSIVE_AREA_i 
    SchM_Exit_CanNm_CANNM_EXCLUSIVE_AREA_i 
    for i=0,…,5 
    Table 5-24   Services used by the CANNM 
                                                
    8 Service only used if the feature ‘Passive Mode’ is disabled 
    9 Service only used if ‘Immediate Tx Conf Enabled’ is disabled and ‘Pn Enabled’ is enabled and if CanSM 
    provides this function 
    10 Service only used if the feature ‘Dev Error Detect’ is enabled 
    11 Service only used if the feature ‘Car Wake Up Rx Enabled’ is enabled. 
    12 Service only used if the feature ‘Coordinator Sync Support’ is enabled. 
    13 Service only used if the feature ‘Pdu Rx Indication Enabled’ is enabled. 
    14 Service only used if the feature ‘Bus Nm Specific Pdu Rx Indication Enabled‘ is enabled in NmIf. 
    15 Service only used if the feature ‘Remote Sleep Ind Enabled’ is enabled. 
    16 Service only used if the feature ‘Repeat Msg Ind Enabled’ is enabled. 
    17 Service only used if the feature ‘State Change Ind Enabled’ is enabled. 
    18 Service only used if the feature ‘Immediate Tx Conf Enabled’ is enabled. 
    19 Service only used if the feature ‘Com User Data Support’ is enabled. 
    20 Service only used if the feature ‘Immediate Txconf Enabled’ is disabled. 
    21 Service only used if the features ‘Pn Eira Calc Enabled’ or ‘Pn Era Calc Enabled’ is enabled. 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    58 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    5.5 
    Callback Functions 
    5.5.1 
    Callback Functions from CAN Interface 
    5.5.1.1 
    CanNm_TxConfirmation: NM Message Confirmation Function 
    Prototype 
    void CanNm_TxConfirmation (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    ID of CAN NM PDU that has been transmitted 
    Return code 


    Functional Description 
    This function is called by the CAN Interface after a CAN NM PDU has been successfully transmitted 
    (CANNM228). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  This function is called from data link layer 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-25   CanNm_TxConfirmation 
    5.5.1.2 
    CanNm_RxIndication: NM Message Indication 
    Prototype 
    void CanNm_RxIndication (PduIdType RxPduId, const PduInfoType *PduInfoPtr) 
    Parameter 
    RxPduId 
    ID of CAN NM PDU that has been received 
    PduInfoPtr 
    Pointer to a PduInfoType containing the received CAN NM SDU and its length 
    Return code 


    Functional Description 
    This function is called by the CAN Interface after a CAN L-PDU has been received (CANNM231). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This function is called from data link layer 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    59 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-26   CanNm_RxIndication 
    5.5.2 
    Callback Function from CAN State Manager 
    5.5.2.1 
    CanNm_ConfirmPnAvailability: Notification for Activating the PN Filter 
    Functionality 

    Prototype 
    void CanNm_ConfirmPnAvailability (const NetworkHandleType nmChannelHandle) 
    Parameter 
    nmChannelHandle 
    Index of the network channel 
    Return code 


    Functional Description 
    Enables the PN filter functionality on the indicated NM channel (CANM344). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is called by CanSM 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-27   CanNm_ConfirmPnAvailability 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    60 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    6.  Glossary and Abbreviations 
    6.1 
    Glossary 
    Term 
    Description 
    Confirmation 
    Notification by the data link layer on asynchronous successful 
    transmission of a CAN message 
    Identifier 
    Identifies a CAN message 
    Indication 
    Notification by the data link layer on asynchronous reception of a CAN 
    message 
    Message 
    One or more signals are assigned to each message. 
    Signal 
    Signals describe the significance of the individual data segments within a 
    message. Typically  bits, bytes or  words  are  used for  data segments  but 
    individual bit combinations are also possible. In the CAN database, each 
    data segment is assigned a symbolic name, a value range, a conversion 
    formula and a physical unit, as well as a list of receiving nodes. 
    Table 6-1   Glossary 
     
     
    6.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BswM 
    Basic Software Mode Manager 
    CAN 
    Controller Area Network 
    CanIf 
    Can Interface 
    CCL 
    Communication Control Layer 
    ComM 
    Communication Manager 
    CRI 
    Partial Network Cluster Request Information 
    DET 
    Development Error Tracer 
    DEM 
    Diagnostic Event Manager 
    DLC 
    Data Length Code (Number of data bytes of a CAN message) 
    DLL 
    Data link layer 
    ECU 
    Electronic Control Unit 
    EIRA 
    External Internal Requests Aggregated 
    ERA 
    External Requests Aggregated 
    FIBEX 
    Field Bus Exchange 
    ID 
    Identifier (of a CAN message) 
    IL 
    Interaction Layer 
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    61 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    I-PDU 
    Interaction Layer Protocol Data Unit 
    ISR 
    Interrupt Service Routine 
    LIN 
    Local Interconnect Network 
    MISRA 
    Motor Industry Software Reliability Association 
    NM 
    Network Management  
    PDU 
    Protocol Data Unit 
    PN 
    Partial Network / Partial Networking 
    RAM 
    Random Access Memory 
    RI 
    Reference Implementation 
    (Reference Implementation of the CAN-Driver High Level part) 
    ROM 
    Read Only Memory 
    SchM 
    Schedule Manager (BSW Scheduler) 
    SRS 
    System Requirements Specification (used for AUTOSAR documents) 
    SWS 
    Software Specification (used for AUTOSAR documents) 
    UDP 
    User Datagram Protocol 
    Table 6-2   Abbreviations 
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    62 
    based on template version 5.2.0 


    Technical Reference MICROSAR CAN Network Management 
    7.  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.02.00 
    63 
    based on template version 5.2.0 

    Document Outline


    1.3.72 - TechnicalReference_CanSM

    YourTopic

    1.3.74 - TechnicalReference_CanSMs


     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CAN State Manager 
    Technical Reference 
     
     
    Version 2.10.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Mark A. Fingerle 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR CAN State Manager 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Mark A. Fingerle 
    2012-08-08 
    2.0.0 
    Creation from scratch 
    Mark A. Fingerle 
    2012-10-23 
    2.1.0 
    ESCAN00062053 Interface to provide 
    internal bus-off recovery level 3.8, Table 
    3-4, 
    5.1, 5.2.13 
    ESCAN00062050 Instruction order for 
    transition to no communication Figure 3-3 
    Figure 3-5 
    Update state machine pictures Figure 3-1, 
    Figure 3-2, Figure 3-4 
    Mark A. Fingerle 
    2013-05-03 
    2.2.0 
    ESCAN00065274 Trigger CanIf PduMode 
    wake up filter in PN use case 6.2.6 
    Remove chapter “4.2 Include Structure” 
    and “4.3 Compiler Abstraction and Memory 
    Mapping” 
    Mark A. Fingerle 
    2013-06-13 
    2.3.0 
    ESCAN00068036 SetEcuPassive 0, 
    5.2.14, 6.2.7 ESCAN00068039 
    PreventBusSleepAtStartUp 3.13, 5.2.15, 
    6.2.8 
    Mark A. Fingerle 
    2013-08-13 
    2.4.0 
    ESCAN00069109 3.11 Baud Rate 
    Adaption 
    ESCAN00068797 3.14 BusOff Recovery 
    Notifications  

    Mark A. Fingerle 
    2014-10-13 
    2.5.0 
    ESCAN00076768 Post-Build Selectable 
    (Identity Manager) support 6.2.9 
    ESCAN00076224 Add APIs to Assist EcuM 
    Wakeup Validation 
    3.15, 5.2.11, 5.2.12 
    ESCAN00079340 Description BCD-coded 
    return-value of GetVersionInfo() 
    AUTOSAR deviation 6.1 
    Mark A. Fingerle 
    2015-11-13 
    2.6.0 
    ESCAN00086062 3.10 Swift Tx Timeout 
    Exception 

    Mark A. Fingerle 
    2016-01-13 
    2.7.0 
    ESCAN00088643 Extended RAM Check 
    5.2.2, 5.2.16, 5.2.17, 5.4.8, 5.4.9, 5.5.1, 
    5.5.2, 
    5.5.3, 5.5.4 
    Mark A. Fingerle 
    2016-05-13 
    2.8.0 
    ESCAN00090185 Wakeup validation fail 
    (Start/Stop wakeup sources); Wakeup 
    validation must not be used with 
    asynchronous Trcv (SPI) 5.2.11 5.2.12 
    ESCAN00090829 Improve description how 
    to redirect  "Error Reporting APIs" 3.17.1, 
    3.17.2 
    Mark A. Fingerle 
    2016-08-01 
    2.9.0 
    ESCAN00091303 6.2.13 Expanded Tx 
    Timeout Exception Handling 

    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
    Mark A. Fingerle 
    2016-12-01 
    2.10.0 
    FEATC-570 Mode Request Repetition Max 
    is available as Runtime Error (DEM) (see 
    3.3.1, 3.17.2, 6.1.2) 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    Specification of CAN State Manager 
    2.2.0 
    [2]   AUTOSAR 
    Specification of Development Error Tracer 
    3.2.0 
    [3]   AUTOSAR 
    Specification of Diagnostics Event Manager 
    4.2.0 
    [4]   AUTOSAR 
    List of Basic Software Modules 
    1.6.0 
    [5]   AUTOSAR 
    Specification of CAN Interface 
    5.0.0 
    [6]   AUTOSAR 
    Specification of Communication Manager 
    4.0.0 
    [7]   AUTOSAR 
    Specification of Basic Software Mode Manager 
    1.2.0 
    Scope of the Document 
    This  technical  reference  describes  the  general  use  of  the  CAN  State  Manager  basis 
    software.  All  aspects  which  are  CAN  controller  specific  are  described  in  the  technical 
    reference of the CAN Interface, which is also part of the delivery. 
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Contents 
    1 
    Component History ...................................................................................................... 9 
    2 
    Introduction................................................................................................................. 10 
    2.1 

    Architecture Overview ...................................................................................... 10 
    3 
    Functional Description ............................................................................................... 12 
    3.1 

    Features .......................................................................................................... 12 
    3.2 
    Initialization ...................................................................................................... 13 
    3.3 
    State Machine .................................................................................................. 13 
    3.3.1 
    Mode Request Indication and Repetition .......................................... 14 
    3.3.2 
    Communication Mode Request Change (During Pending Mode 
    Indication or Running Bus-Off Recovery) ......................................... 14 

    3.3.3 
    CANSM_NO_COMMUNICATION to 
    CANSM_FULL_COMMUNICATION ................................................. 15 

    3.3.4 
    CANSM_FULL_COMMUNICATION to 
    CANSM_SILENT_COMMUNICATION ............................................. 16 

    3.3.5 
    CANSM_SILENT_COMMUNICATION ............................................. 16 
    3.3.6 
    CANSM_SILENT_COMMUNICATION to 
    CANSM_FULL_COMMUNICATION ................................................. 16 

    3.3.7 
    Transition to CANSM_NO_COMMUNICATION ................................ 17 
    3.4 
    Bus-Off Recovery ............................................................................................. 18 
    3.5 
    Main Function .................................................................................................. 19 
    3.6 
    Communication Modes .................................................................................... 19 
    3.7 
    Communication Mode Polling........................................................................... 19 
    3.8 
    Bus-off Level Polling ........................................................................................ 19 
    3.9 
    Partial Networking ............................................................................................ 19 
    3.10 
    Tx Timeout Exception ...................................................................................... 21 
    3.11 
    Baud Rate Adaption ......................................................................................... 21 
    3.12 
    ECU Passive Mode .......................................................................................... 22 
    3.13 
    PreventBusSleepAtStartUp .............................................................................. 22 
    3.14 
    BusOff Recovery Notifications Extension of Tx Offline Duration ....................... 23 
    3.15 
    Wake-up Validation Assistance ........................................................................ 23 
    3.16 
    Start/Stop Wake-up Sources ............................................................................ 23 
    3.16.1 

    Normal Behavior .............................................................................. 23 
    3.16.2 
    Usage .............................................................................................. 24 
    3.16.3 
    Exceptional Behavior ....................................................................... 24 
    3.16.4 
    Potential Effect ................................................................................. 24 
    3.16.4.1 

    Start of the Wakeup Sources Fail ................................... 24 
    3.16.4.2 
    Stop of the Wakeup Sources Fail ................................... 24 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    3.16.5 
    Countermeasures ............................................................................ 25 
    3.17 
    Error Handling .................................................................................................. 26 
    3.17.1 

    Development Error Reporting ........................................................... 26 
    3.17.2 
    Production Code Error Reporting ..................................................... 27 
    4 
    Integration ................................................................................................................... 29 
    4.1 

    Scope of Delivery ............................................................................................. 29 
    4.1.1 

    Static Files ....................................................................................... 29 
    4.1.2 
    Dynamic Files .................................................................................. 29 
    4.2 
    Critical Sections ............................................................................................... 30 
    5 
    API Description ........................................................................................................... 32 
    5.1 

    Type Definitions ............................................................................................... 32 
    5.2 
    Services Provided by CanSM........................................................................... 32 
    5.2.1 

    CanSM_InitMemory ......................................................................... 32 
    5.2.2 
    CanSM_PreInit ................................................................................. 33 
    5.2.3 
    CanSM_Init ...................................................................................... 33 
    5.2.4 
    CanSM_MainFunction ...................................................................... 34 
    5.2.5 
    CanSM_RequestComMode ............................................................. 34 
    5.2.6 
    CanSM_GetCurrentComMode ......................................................... 35 
    5.2.7 
    CanSM_GetVersionInfo ................................................................... 35 
    5.2.8 
    CanSM_CheckBaudrate .................................................................. 36 
    5.2.9 
    CanSM_ChangeBaudrate ................................................................ 36 
    5.2.10 
    CanSM_SetBaudrate ....................................................................... 37 
    5.2.11 
    CanSM_StartWakeupSources .......................................................... 38 
    5.2.12 
    CanSM_StopWakeupSources .......................................................... 38 
    5.2.13 
    CanSM_CheckBorLevel ................................................................... 39 
    5.2.14 
    CanSM_SetEcuPassive ................................................................... 39 
    5.2.15 
    CanSM_PreventBusSleepAtStartUp ................................................ 40 
    5.2.16 
    CanSM_RamCheckStatus ............................................................... 40 
    5.2.17 
    CanSM_RamCheckEnableMailbox .................................................. 41 
    5.3 
    Services Used by CanSM ................................................................................ 41 
    5.4 
    Callback Functions ........................................................................................... 42 
    5.4.1 

    CanSM_ControllerBusOff ................................................................. 42 
    5.4.2 
    CanSM_ControllerModeIndication .................................................... 43 
    5.4.3 
    CanSM_TransceiverModeIndication ................................................. 43 
    5.4.4 
    CanSM_ClearTrcvWufFlagIndication ............................................... 44 
    5.4.5 
    CanSM_CheckTransceiverWakeFlagIndication ................................ 44 
    5.4.6 
    CanSM_ConfirmPnAvailability.......................................................... 45 
    5.4.7 
    CanSM_TxTimeoutException ........................................................... 45 
    5.4.8 
    CanSM_RamCheckCorruptMailbox ................................................. 46 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    5.4.9 
    CanSM_RamCheckCorruptController .............................................. 46 
    5.5 
    Callout Functions ............................................................................................. 47 
    5.5.1 

    Appl_CanSM_RamCheckStart ......................................................... 47 
    5.5.2 
    Appl_CanSM_RamCheckCorruptController ..................................... 47 
    5.5.3 
    Appl_CanSM_RamCheckCorruptMailbox ........................................ 48 
    5.5.4 
    Appl_CanSM_RamCheckFinished ................................................... 48 
    6 
    AUTOSAR Standard Compliance............................................................................... 50 
    6.1 

    Deviations ........................................................................................................ 50 
    6.1.1 

    Communication mode requests are acceped if possible ................... 50 
    6.1.2 
    Mode Request Timeout is available as Runtime Error (DEM) ........... 50 
    6.2 
    Additions/ Extensions ....................................................................................... 50 
    6.2.1 

    API CanSM_InitMemory() ................................................................ 50 
    6.2.2 
    No Mode Notification During CanSM_Init ......................................... 50 
    6.2.3 
    Configuration Options ...................................................................... 50 
    6.2.4 
    Additional Bus-Off Recovery in State Silent...................................... 50 
    6.2.5 
    API CanSM_CheckBorLevel() .......................................................... 50 
    6.2.6 
    Partial Network Wake Up Filter ........................................................ 50 
    6.2.7 
    ECU Passive Mode .......................................................................... 50 
    6.2.8 
    PreventBusSleepAtStartUp .............................................................. 50 
    6.2.9 
    Post-Build Selectable (Identity Manager) ......................................... 51 
    6.2.10 
    APIs to Assist EcuM Wakeup Validation ........................................... 51 
    6.2.11 
    Swift or Large Tx Timeout Exception handling .................................. 51 
    6.2.12 
    Extended RAM Check ...................................................................... 51 
    6.2.13 
    Expanded Tx Timeout Exception Handling ....................................... 51 
    6.3 
    Limitations........................................................................................................ 51 
    6.3.1 

    Controllers ....................................................................................... 51 
    6.3.2 
    Configuration Class .......................................................................... 51 
    7 
    Glossary and Abbreviations ...................................................................................... 52 
    7.1 

    Glossary .......................................................................................................... 52 
    7.2 
    Abbreviations ................................................................................................... 52 
    8 
    Contact ........................................................................................................................ 53 
     
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Illustration List 
    Figure 2-1 
    AUTOSAR architecture ............................................................................. 10 
    Figure 2-2 
    Interfaces to adjacent modules of the CanSM ........................................... 11 
    Figure 3-1 
    CanSM state machine .............................................................................. 14 
    Figure 3-2 
    Sub state transition to CANSM_FULL_COMMUNICATION ...................... 15 
    Figure 3-3 
    Sub state transition to CANSM_NO_COMMUNICATION .......................... 17 
    Figure 3-4 
    CanSM sub-state bus-off recovery ............................................................ 18 
    Figure 3-5 
    Sub state Partial Network transition to CANSM_NO_COMMUNICATION . 20 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 9 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 12 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 12 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 13 
    Table 3-4  
    Service IDs ............................................................................................... 27 
    Table 3-5  
    Errors reported to DET ............................................................................. 27 
    Table 3-6  
    Errors reported to DEM ............................................................................. 28 
    Table 4-1  
    Static files ................................................................................................. 29 
    Table 4-2  
    Generated files ......................................................................................... 30 
    Table 5-1  
    Type definitions ......................................................................................... 32 
    Table 5-2  
    CanSM_InitMemory .................................................................................. 33 
    Table 5-3  
    CanSM_PreInit ......................................................................................... 33 
    Table 5-4 
    CanSM_Init ............................................................................................... 34 
    Table 5-5 
    CanSM_MainFunction .............................................................................. 34 
    Table 5-6 
    CanSM_RequestComMode ...................................................................... 35 
    Table 5-7 
    CanSM_GetCurrentComMode .................................................................. 35 
    Table 5-8 
    CanSM_GetVersionInfo ............................................................................ 36 
    Table 5-9 
    CanSM_CheckBaudrate ........................................................................... 36 
    Table 5-10 
    CanSM_ChangeBaudrate ......................................................................... 37 
    Table 5-11 
    CanSM_SetBaudrate ................................................................................ 37 
    Table 5-12 
    CanSM_StartWakeupSources .................................................................. 38 
    Table 5-13 
    CanSM_StopWakeupSources .................................................................. 39 
    Table 5-14 
    CanSM_CheckBorLevel ........................................................................... 39 
    Table 5-15 
    CanSM_SetEcuPassive ............................................................................ 40 
    Table 5-16 
    CanSM_PreventBusSleepAtStartUp ......................................................... 40 
    Table 5-17  
    CanSM_RamCheckStatus ........................................................................ 41 
    Table 5-18  
    CanSM_RamCheckEnableMailbox ........................................................... 41 
    Table 5-19  
    Services used by the CanSM .................................................................... 42 
    Table 5-20 
    CanSM_ControllerBusOff ......................................................................... 43 
    Table 5-21 
    CanSM_ControllerModeIndication ............................................................ 43 
    Table 5-22 
    CanSM_TransceiverModeIndication ......................................................... 44 
    Table 5-23 
    CanSM_ClearTrcvWufFlagIndication ........................................................ 44 
    Table 5-24 
    CanSM_CheckTransceiverWakeFlagIndication ........................................ 45 
    Table 5-25 
    CanSM_ConfirmPnAvailability .................................................................. 45 
    Table 5-26 
    CanSM_TxTimeoutException ................................................................... 46 
    Table 5-27 
    CanSM_RamCheckCorruptMailbox .......................................................... 46 
    Table 5-28  
    CanSM_RamCheckCorruptController ....................................................... 47 
    Table 5-29  
    Appl_CanSM_RamCheckStart ................................................................. 47 
    Table 5-30  
    Appl_CanSM_RamCheckCorruptController .............................................. 48 
    Table 5-31  
    Appl_CanSM_RamCheckCorruptMailbox ................................................. 48 
    Table 5-32  
    Appl_CanSM_RamCheckFinished ............................................................ 49 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Table 7-1  
    Glossary ................................................................................................... 52 
    Table 7-2  
    Abbreviations ............................................................................................ 52 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    2.0.0 
    Creation according to AUTOSAR 4.0.3 
    5.1.0 
    Extended RAM Check 
    Table 1-1   Component history 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 

    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CanSM as specified in [1]. 
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile, Post-Build Selectable 
    Vendor ID: 
    CANSM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CANSM_MODULE_ID   
    140 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation. 
     
    The CAN State Manager (CanSM) realizes a software layer between the Communication 
    Manager  (ComM)  and  the  CAN  Interface  (CanIf).  The  CanSM  handles  the  startup  and 
    shutdown  of  the  communication  of  a  CAN  network.  The  CAN  State  Manager  maps  the 
    CAN State Manager states to the states of the ComM and causes the necessary actions to 
    change the CAN State Manager state to those requested by the ComM. The main function 
    of the CAN State Manager is called cyclically by the Schedule Manager (SchM). 
    2.1 
    Architecture Overview 
    The following figure shows where the CanSM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR architecture 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    10 
    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
    The next figure shows the interfaces to adjacent modules of the CanSM. These interfaces 
    are described in chapter 5.  
     
    Figure 2-2  Interfaces to adjacent modules of the CanSM 
    Applications do not access the services of the BSW modules directly. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    11 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CanSM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 6. 
    Vector  Informatik  provides  further  CanSM  functionality  beyond  the AUTOSAR  standard. 
    The corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Translation of network communication mode requests 
    Output of current network communication modes (Polling and Callback) 
    Control of peripherals (CAN Transceivers, CAN Controllers) 
    Control of PDU mode 
    Handle the network mode via a separate state machine per network 
    Bus error management: Bus-off recovery via a separate state machine per network 
    Change Baud Rate handling 
    Tx Timeout Exception handling 
    Error classification, detection and notification 
    Enable and disable development and production error detection 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Category 
    Description 
    ASR 
    Version 

    Functional 
    Several controllers per network. 
    4.0.3 
    Config 
    Change networks and controllers via Post-build configuration. 
    4.0.3 
    Config 
    Configuration variants “link-time”. 
    4.0.3 
    Table 3-2   Not supported AUTOSAR standard conform features 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    12 
    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Deactivate the DEM at pre-compile time, like DET. 
    Changes of the communication mode are possible even during a pending mode indication. 
    Handling of bus-off events which occurs after CANSM_FULL_COMMUNNICATION has been left. 
    Interface to provide internal bus-off recovery level; CanSM_CheckBorLevel() 
    PduMode wake up filter in PN use case 
    Execute transition from SILENT to FULL within RequestComMode 
    ECU active/passive mode functionality 
    Prevent the bus sleep state of the CanIf, CanDrv and CanTrcv at CanSM initialization for the 
    given CAN network handle 
    MICROSAR Identity Manager using Post-Build Selectable 
    Extended RAM Check 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.2 
    Initialization 
    Some  embedded  targets  do  not  initialize  RAM  to  zero  during  start-up.  Therefore  some 
    variables  have  to  be  initialized  explicitly  if  they  need  a  specific  value  before  the 
    initialization  function  CanSM_Init  is  called.  This  is  done  by  the  function 
    CanSM_InitMemory. The  function  initializes  the  CanSM  variables  and  sets  the  state  to 
    ‘not initialized’. The function has to be called before the initialization function CanSM_Init. 
    After that, the initialization CanSM_Init has to be triggered and the CAN State Manager 
    will set the internal used variables to their start values to ensure a deterministic behavior of 
    the state machines. 
     
    Info 
    The CanSM initializes the CAN channel into the state NO COMMUNICATION. This 
      means, the CAN modules (CanIf, CanDrv and CanTrcv) are set into the corresponding 
    state for NO COMMUNCIATION (bus sleep). During this transition, detected wake-up 
    reasons, inside the CAN modules, are cleared. 
    This leads to the behavior that wake-up events, which are triggered by the CAN bus, 
    cannot be detected and/or validated during the initialization phase. 
    If the detection/validation of the wake up information is necessary for the ECU then the 
    CanSM API CanSM_PreventBusSleepAtStartUp() can be used to prevent the bus 
    sleep mode at start up for the above listed CAN modules. 
     
    3.3 
    State Machine 
    The CanSM functionality cannot be used before the API function  CanSM_Init has been 
    called.  If  the  CanSM_Init  function  is  executed  successfully  the  CanSM  starts  the 
    transition to the state CANSM_NO_COMMUNNICATION. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    13 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    stm CANSM_BSM
    CANSM_BSM_S_FULLCOM
    T_NO_COM_MODE_REQUEST,
    T_SILENT_COM_MODE_REQUEST
    /E_FULL_TO_SILENT_COM
    T_FULL_COM_MODE_REQUEST
    /E_SILENT_TO_FULL_COM
    /E_FULLCOM
    CANSM_BSM_S_SILENTCOM
    A
    CANSM_BSM_S_PRE_FULLCOM
    T_NO_COM_MODE_REQUEST
    /E_PRE_NO_COM
    T_NO_COM_MODE_REQUEST
    T_FULL_COM_MODE_REQUEST
    CANSM_BSM_S_PRE_NOCOM
    T_FULL_COM_MODE_REQUEST
    CanSM_Init
    /E_NOCOM
    PowerOn
    /E_PRE_NO_COM
    PowerOff
    CANSM_BSM_S_NOT_INITIALIZED
    CANSM_BSM_S_NOCOM
     
    Figure 3-1  CanSM state machine 
    3.3.1 
    Mode Request Indication and Repetition 
    If  the  CanSM  triggers  the  transceiver  or  the  controller,  the  CanSM  waits  for  the 
    corresponding  indication  that  the  requested  mode  is  reached.  If  the  function  call  returns 
    E_NOT_OK and the corresponding indication is missing, the CanSM repeats the request 
    in  the next  main cycle. The CanSM repeats a controller/transceiver mode  request  also if 
    the 
    correct 
    mode 
    indication 
    is 
    not 
    received 
    within 
    the 
    CanSMModeRequestRepetitionTime. 
    Each  repetition  of  any  of  the  CanIf API  call is  counted.  If  the  amount  exceeds  the  value 
    CanSMModeRequestRepetitionMax 
    the 
    CanSM 
    initiate 
    the 
    transition 
    to 
    CANSM_BSM_S_NOCOM.  Also  the  Det  (E_MODE_REQUEST_TIMEOUT)  or  Dem  will  be 
    informed.  This  error  indication  can  be  configured.  The  Dem  is  dominant  if  both  are 
    enabled.  The  repetition  counter  is  also  reset  if  the  desired  final  state  is  reached  or 
    maximum  repetition  couter  value  is  reached  (T_REPEAT_MAX)  and  the  according 
    transition is triggered. 
    3.3.2 
    Communication Mode Request Change (During Pending Mode Indication or 
    Running Bus-Off Recovery) 

    If the state machine reachs a sub state and a changed mode request is present, the state 
    machine changes immediately the “current direction” to reach the desired communication 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    14 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    mode. The CanSM ensures that the controller and transceiver are set to the corresponding 
    mode.  Therefore  the  CanSM  performs  always  the  whole  sub-state  machine,  so  if  e.g.  a 
    startup is skipped by a NoCom request the CanSM changes the controller mode, too, even 
    if it has not been changed and it is still STOPPED. 
    Exception: 
    COMM_SILENT_COMMUNICATION request can NOT be requested if 
      The transition (from SILENT or after initialization) to CANSM_NO_COMMUNNICATION has 
    been started 
      The CanSM is in state CANSM_SILENT_COMMUNNICATION 
      The CanSM is in state CANSM_NO_COMMUNNICATION 
    3.3.3 
    CANSM_NO_COMMUNICATION to CANSM_FULL_COMMUNICATION 
    stm CANSM_BSM_S_PRE_FULLCOM
    CANSM_BSM_S_PRE_FULLCOM
    S_TRCV_NORMAL
    +  do / DO_SET_TRCV_MODE_NORMAL 
    EntryPoint
    T_REPEAT_MAX
    [G_TRCV_NORMAL_E_OK]
    T_TRCV_NORMAL_TIMEOUT
    S_TRCV_NORMAL_WAIT
    T_ T
    T _
    R T
    C R
    V C
    _ V
    N _
    O N
    RO
    MR
    AM
    L A
    _I L_
    N I
    D N
    I D
    C I
    A C
    T A
    E T
    D ED
    S_CC_STOPPED
    T_REPEAT_MAX
    +  do / DO_SET_CC_MODE_STOPPED
    [G_CC_STOPPED_E_OK]
    T_CC_STOPPED_TIMEOUT
    S_CC_STOPPED_WAIT
    T_ T
    C _
    C C
    _ C
    S _
    T S
    O T
    P O
    P P
    E P
    D E
    _ID_
    N I
    D N
    I D
    C I
    A C
    T A
    E T
    D ED
    ExitPoint
    T_REPEAT_MAX
    S_CC_STARTED
    +  do / DO_SET_CC_MODE_STARTED
    ExitPoint
    To
    [G_CC_STARTED_E_OK]
    FULLCOM
    T_CC_STARTED_TIMEOUT
    T_CC_STARTED_INDICATED
    S_CC_STARTED_WAIT
    T_CC_STARTED_INDICATED
     
    Figure 3-2  Sub state transition to CANSM_FULL_COMMUNICATION 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    15 
    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
    In this state there is no communication on the CAN channel. When full communication is 
    requested  the  CanSM  sets  the  transceiver  mode  to  NORMAL  and  the  controller  mode  to 
    STARTED (via STOPPED). In case of a successful transition the CanSM sets the Rx and Tx 
    Pdu Mode to ONLINE, informs the ComM (see [6]) and the BswM (see [7]) about the new 
    communication  state  and  starts  the  “ensure  timer”.  If  the  CanSMBorTimeTxEnsured 
    lapse without a bus-off indication the CanSM informs the Dem that no bus-off is present. 
    Alternatively to the “ensure timer” the CanSM may poll the TxState to decide that no bus-
    off is present if CanSMBorTxConfirmationPolling is activated. 
     
     
    Caution 
    This chapter describes only the normal shutdown. In case a partial network is activated 
      the CanSM performs an alternative sequence which is described in chapter 3.9. 
     
     
    3.3.4 
    CANSM_FULL_COMMUNICATION to CANSM_SILENT_COMMUNICATION 
    As long as full communication is requested the CanSM stays in this state, otherwise  the 
    CanSM  switches  to  silent  mode  and  stops  the  Tx  PDU  mode.  In  case  of  a  successful 
    transition 
    the 
    CanSM 
    notifies 
    the 
    ComM 
    and 
    BswM 
    about 
    the 
    CANSM_SILENT_COMMUNICATION communication state. 
    3.3.5 
    CANSM_SILENT_COMMUNICATION 
    The state represents the prepare bus sleep phase of the network. The node is still able to 
    receive CAN messages but does not transmit them. 
    3.3.6 
    CANSM_SILENT_COMMUNICATION to CANSM_FULL_COMMUNICATION 
    According  to  the  requested  communication  mode  the  CanSM  switches  back  to 
    CANSM_FULL_COMMUNNICATION,  starts  the  Tx  PDU  mode  and  notifies  the  ComM  and 
    BswM about the new communication state. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    16 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    3.3.7 
    Transition to CANSM_NO_COMMUNICATION 
    stm CANSM_BSM_DeinitPnNotSupported
    CANSM_BSM_DeinitPnNotSupported
    CANSM_BSM_DeinitPnNotSupportedProceed
    S_CC_STOPPED
    +  do / DO_SET_CC_MODE_STOPPED
    EntryPoint
    [CANSM_BSM_G_CC_STOPPED_E_OK]
    T_REPEAT_MAX
    T_CC_STOPPED_TIMEOUT
    T_CC_STOPPED_INDICATED
    S_CC_STOPPED_WAIT
    T_CC_STOPPED_INDICATED
    S_CC_SLEEP
    +  do / DO_SET_CC_MODE_SLEEP
    [G_CC_SLEEP_E_OK]
    T_CC_SLEEP_INDICATED
    T_CC_SLEEP_TIMEOUT
    S_CC_SLEEP_WAIT
    T_CC_SLEEP_INDICATED
    S_TRCV_NORMAL
    +  do / DO_SET_TRCV_MODE_NORMAL
    [G_TRCV_NORMAL_E_OK]
    T_TRCV_NORMAL_INDICATED
    T_TRCV_NORMAL_TIMEOUT
    S_TRCV_NORMAL_WAIT
    T_TRCV_NORMAL_INDICATED
    S_TRCV_STANDBY
    +  do / DO_SET_TRCV_MODE_STANDBY
    [G_TRCV_STANDBY_E_OK]
    T_TRCV_STANDBY_INDICATED
    CANSM_BSM_T_TRCV_STANDBY_TIMOUT
    S_TRCV_STANDBY_WAIT
    T_TRCV_STANDBY_INDICATED
    ExitPoint
     
    Figure 3-3  Sub state transition to CANSM_NO_COMMUNICATION 
    The  CanSM  informs  the  BswM  about  the  communication  CANSM_NO_COMMUNICATION 
    immediately  if  the  transition  shutdown  process  has  been  started.  According  to  the 
    requested  communication  mode  the  CanSM  switches  to  CANSM_NO_COMMUNICATION. 
    Then  the  CanSM  sets  the  controller  to  SLEEP  (via  STOPPED)  and  the  transceiver  to 
    STANDBY (via NORMAL). In case of a successful transition the CanSM informs the ComM 
    about  the  new  communication  state  (if  this  transition  is  executed  in  the  call  context  of 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    17 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    CanSM_Init the ComM and BswM functions are not called because these modules will 
    be initialized after the CanSM). 
    3.4 
    Bus-Off Recovery 
    stm CANSM_BSM_S_FULLCOM
    CANSM_BSM_S_FULLCOM
    S_TX_OFF
    [G_TX_ON]
    /E_TX_ON
    S_BUS_OFF_CHECK, 
    T_RESTART_CC_INDICATED
    S_NO_BUS_OFF
    /E_TX_OFF
    CANSM_BSM_S_RESTART_CC_WAIT
    T_BUS_OFF
    /E_BUS_OFF
    T_RESTART_CC_TIMEOUT
    [G_BUS_OFF_PASSIVE]
    /E_BUS_OFF_PASSIVE
    [G_RESTART_CC_E_OK]
    S_RESTART_CC
    EntryPoint
    +  do / DO_SET_CC_MODE_STARTED
    T_REPEAT_MAX
    [ComModeRequest
    NoCom or Silent]
    ExitPoint
     
    Figure 3-4  CanSM sub-state bus-off recovery 
    In  case  bus-off  is  indicated  the  CanSM  informs  the  Dem  (E_BUSOFF  and 
    EVENT_STATUS_PREFAILED),  the  ComM  (SILENT)  and  BswM  (BUSOFF).  In  the  next 
    step the CanSM restarts the controller to STARTED mode. If the according mode indication 
    is received the CanSM sets the Rx Pdu Mode to ONLINE and Tx Pdu Mode to OFFLINE 
    and starts the bus-off timer. If the CanSMBorTimeL1 (or CanSMBorTimeL2 if the bus-off 
    count is equal or greater than CanSMBorCounterL1ToL2) elapse CanSM reactivates the 
    Tx path of the channel again, informs the ComM (FULL) and BswM (FULL) and starts the 
    “ensure  timer”.  If  the  CanSMBorTimeTxEnsured  timer  has  elapsed  without  a  bus-off 
    indication the CanSM informs the Dem, otherwise  the next  bus-off recovery sequence is 
    started.  The  “ensure  timer”  can  also  substituted  by  polling  the  TxState  if 
    CanSMBorTxConfirmationPolling is activated as mentioned above. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    18 
    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
     
     
    Note 
    The indicated Dem event does not instantly lead to a DTC due to the EventStatus pre-
      failed. The mechanism to qualify the event as failed has to be configured within the 
    DEM [3]. 
     
     
    3.5 
    Main Function 
    The  CanSM  has  one  main  function  which  has  to  be  called  cyclically  by  the  SchM.  The 
    main function triggers a state transition in case of a received mode indication or if a timer 
    elapses. 
    3.6 
    Communication Modes 
    The  ComM  collects  the  communication  requests  from  the  SWC  and  from  the  network. 
    Accordingly the ComM calculates the needed communication mode and requests this from 
    the CAN State Manager via the function CanSM_RequestComMode. 
    3.7 
    Communication Mode Polling 
    The  ComM  is  informed  about  every  mode  change  by  the  CAN  State  Manager  via  the 
    callback function ComM_BusSM_ModeIndication. 
    Additional  the  ComM may  request  the  communication mode  which  is  currently  active  by 
    calling  the  API  function  CanSM_GetCurrentComMode.  The  CAN  State  Manager  will 
    deliver the communication mode to the pointer passed as a function parameter. 
    3.8 
    Bus-off Level Polling 
    The  current  bus-off  level  can  be  determinate  by  calling  the  API  function 
    CanSM_CheckBorLevel.  The  CanSM  will  deliver  the  bus-off  level  (CANSM_BOR_NONE, 
    CANSM_BOR_LEVEL1  or  CANSM_BOR_LEVEL2)  to  the  pointer  passed  as  a  function 
    parameter. 
    3.9 
    Partial Networking 
    If  Partial  Networking  for  a  CAN  channel  is  activated  the  CAN  transceiver  can  only  be 
    woken  up  by  a  specified  CAN  Message. Also  the  Network  Management  will  ignore  NM 
    messages  which  do  not  belong  to  the  Partial  Network  and  the  CanSM  will  perform  an 
    alternative shutdown sequence. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    19 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    stm CANSM_BSM_DeinitPnSupported
    CANSM_BSM_DeinitPnSupported
    CANSM_BSM_DeinitPnSupportedProceed
    S_PN_CLEAR_WUF
    +  do / DO_CLEAR_TRCV_WUF
    [G_PN_CLEAR_WUF_E_OK]
    T_CLEAR_WUF_TIMEOUT
    T_CLEAR_WUF_INDICATED
    S_PN_CLEAR_WUF_WAIT
    T_CLEAR_WUF_INDICATED
    S_PN_CC_STOPPED
    +  do / DO_SET_CC_MODE_STOPPED
    T_CC_STOPPED_TIMEOUT
    [G_CC_STOPPED_E_OK]
    S_CC_STOPPED_WAIT
    T_CC_STOPPED_INDICATED
    T_CC_STOPPED_INDICATED
    S_TRCV_NORMAL
    +  do / DO_SET_TRCV_MODE_NORMAL
    [G_TRCV_NORMAL_E_OK]
    T_TRCV_NORMAL_TIMEOUT
    T_TRCV_NORMAL_INDICATED
    S_TRCV_NORMAL_WAIT
    T_TRCV_NORMAL_INDICATED
    S_TRCV_STANDBY
    +  do / DO_SET_TRCV_MODE_STANDBY
    T_TRCV_STANDBY_TIMOUT
    [G_TRCV_STANDBY_E_OK]
    S_TRCV_STANDBY_WAIT
    T_TRCV_STANDBY_INDICATED
    T_TRCV_STANDBY_INDICATED
    S_CC_SLEEP
    +  do / DO_SET_CC_MODE_SLEEP
    T_CHECK_WFLAG_INDICATED
    [G_CC_SLEEP_E_OK]
    S_CC_SLEEP_WAIT
    T_CC_SLEEP_INDICATED
    CANSM_BSM_T_CC_SLEEP_TIMEOUT
    T_CC_SLEEP_INDICATED
    S_CHECK_WFLAG_IN_NOT_CC_SLEEP
    S_CHECK_WFLAG_IN_CC_SLEEP
    +  do / DO_CHECK_WFLAG
    +  do / DO_CHECK_WFLAG
    [G_CHECK_WFLAG_E_OK] [G_CHECK_WFLAG_E_OK]
    T_CHECK_WFLAG_TIMEOUT
    T_CHECK_WFLAG_TIMEOUT
    S_CHECK_WUF_IN_CC_SLEEP_WAIT
    S_CHECK_WUF_IN_NOT_CC_SLEEP_WAIT
    T_CHECK_WFLAG_INDICATED
    T_CHECK_WFLAG_INDICATED Junction
    T_CHECK_WFLAG_INDICATED
    T_REPEAT_MAX
    EntryPoint
    ExitPoint
     
    Figure 3-5  Sub state Partial Network transition to CANSM_NO_COMMUNICATION 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    20 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    If the feature has been enabled globally (at pre-compile time) and on the desired channel, 
    the CanSM first resets the current available wake-up information in the transceiver, before 
    the transceiver is set to STANDBY and the controller to SLEEP. If this is done, the CanSM 
    triggers the function CanIf_CheckTrcvWakeFlag to handle a wake-up which might have 
    occurred during the shutdown. If an API call does not deliver the expected reaction it will 
    called  again  as  described  in  chapter  3.3,  subchapter  “Mode  Request  Indication  and 
    Repetition”
    .  But  the  absence  of  the  controller  STOPPED  indication  has  an  exceptional 
    nature  and  does  not  lead  to  a  repetition.  Instead  of  the  repetition  the 
    CheckTrcvWakeFlag  will  be  triggered  and  the  whole  shutdown  sequence  will  be 
    repeated  from  start  after  the  CanSM_CheckTransceiverWakeFlagIndication  has 
    been received. 
    3.10  Tx Timeout Exception 
    If  the  CanSM  gets  the  CanSM_TxTimeoutException  notification  the  CanSM  performs 
    the  transition  to  CANSM_NO_COMMUNICATION,  except  bus-off  is  active.  In  this  case  the 
    CanSM_TxTimeoutException  notification  will  be  ignored  because  it  is  quite  likely  a 
    “false report” due to the TxOffline phase and the communication will work again after that 
    and if not, the “Tx Timeout Exception” will be indicated by the CanNm again anyway. 
    If  a  “Tx  Timeout  Exception”  handling  is  running  any  incoming  communication  mode 
    request will be postponed until CANSM_NO_COMMUNICATION has been reached. After that 
    the  transition  to  CANSM_FULL_COMMUNICATION  will  be  started  if  the  last  requested 
    communication 
    mode 
    was 
    COMM_FULL_COMMUNICATION 
    or 
    COMM_SILENT_COMMUNICATION. 
    In  addition  the  CanSM  provides  an  abbreviated  recovery  mechanism.  If  the  feature 
    CanSMSwiftTxTimeoutRecovery is activated, only the conroller is set to STOPPED and back 
    to STARTED, instead of executing the entire shutdown and start up sequence. If it was not 
    successful to set the controller back to STARTED within the first try the CanSM indicates 
    COMM_SILENT_COMMUNICATION to the ComM and CANSM_BSWM_NO_COMMUNICATION to the BswM 
    and executes the stanard repetition mechanism to reach the needed controller mode. 
    3.11  Baud Rate Adaption 
    The adaption of the baud rate is started by calling the function CanSM_SetBaudrate (or 
    CanSM_ChangeBaudrate). A Baud Rate Change is only possible if the communication 
    state is COMM_FULL_COMMUNICATION and no bus-off is present (validated by “Tx ensured 
    time” or “Tx Confirmation”). 
    When  the  Baud  Rate  Change  has  been  accepted  the  CanSM  informs  the  BswM 
    (CHANGE_BAUDRATE),  set  the  PDU  mode  to  OFFLINE  and  the  controller  mode  to 
    STOPPED. After  the  controller  mode  STOPPED  is  reached  the  CanSM  informs  the  ComM 
    (NoCom) and lead the driver to set the new baud rate. Then the controller mode will be set 
    back to STARTED. After the controller mode STARTED is reached the CanSM set the PDU 
    mode to ONLINE. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    21 
    based on template version 5.0.0 




    Technical Reference MICROSAR CAN State Manager 
     
     
    Note 
    The feature is intended to be used by the Dcm module. 
     
     
     
     
     
    Caution 
    The CanSM_ChangeBaudrate API is deprecated. So it is recommended to use the 
      CanSM_SetBaudrate API instead. 
    CanSM_SetBaudrate API and CanSM_ChangeBaudrate API cannot be 
    provided simultaneously. 
     
     
    If CanSM_ChangeBaudrate API is used nevertheless the desired baud rate has to be 
    validated via the function CanSM_CheckBaudrate before the function 
    CanSM_ChangeBaudrate will be called. 
    3.12  ECU Passive Mode 
    After the initialization of the CanSM the ECU mode is active per default. The ECU mode is 
    the same for each CAN channel.  
    The  CanSM  can  be  instructed  to  handle  the  passive  or  active  mode,  globally  for  all 
    channels  via  the  API  CanSM_SetEcuPassive().  The  mode  stays  until  a  new  request  is 
    issued or a (re-)initialization of the CanSM happens. 
    In  passive  mode  the  CanSM  sets  the  Tx  PDU  mode  to  OFFLINE_ACTIVE  instead  to 
    ONLINE  (3.3.6,  3.3.3).  If  the  ECU  mode  switches  from  passive  to  active  the  CanSM 
    switches the Tx PDU modes which are in OFFLINE_ACTIVE to ONLINE. 
    During a bus-off recovery phase the modification of the Tx PDU mode is postponed until 
    the bus-off recovery phase has been finished (Ch 3.4, Figure 3-4 E_TX_ON). 
    3.13  PreventBusSleepAtStartUp 
    If 
    the 
    feature 
    is 
    enabled 
    within 
    the 
    configuration 
    tool 
    the 
    function 
    CanSM_PreventBusSleepAtStartUp() becomes available. The function, if called before the 
    initialization, causes the CanSM to skip the initial transition of the according CAN channel. 
    Usually the CanSM sets the controller to sleep mode and the transceiver to standby during 
    the initialization. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    22 
    based on template version 5.0.0 




    Technical Reference MICROSAR CAN State Manager 
     
     
    Note 
    The CanSM expects that a FULL_COMMUNICATION request follows after the function 
      has been used and so the CanSM performs no further actions. 
     
     
     
     
    Caution 
    If CanSM_PreventBusSleepAtStartUp() is used the CanDrv and CanTrcv stay in their 
      initial state and so usually no CAN wake-ups are possible. 
     
     
    3.14  BusOff Recovery Notifications Extension of Tx Offline Duration 
    The feature gives the application the possibility to react on an active bus-off. If the feature 
    is activated the CanSM triggers the “bus-off begin indication function” immediately, each 
    time the CanSM is informed about a bus-off. The second parameter of the function can be 
    used to extend the “bus-off recovery time” (TxOffline) (from 0 up to 153ms which is the 
    maximum value needed by the J1939Nm). 
    When  the  CanSM  enters  the  state  S_BUS_OFF_CHECK,  the  Tx  path  is  restarted.  The 
    communication should work again and the CanSM informs the application via the “bus-off 
    end indication function”. The according channel can be identified via the network handle, 
    which is the first parameter of both functions.  
    The  name  of  the  indication  functions  can  be  set  within  the  configuration  tool.  If  the 
    indication  function  is  not  needed  delete  the  function  name  (empty  string)  or  delete  the 
    parameter. Both functions can be (de)activated separately. 
    If  J1939Nm  is  used,  both  the  begin  (J1939Nm_GetBusOffDelay)  and  end 
    (J1939Nm_BusOffEnd) indications are required. 
    3.15  Wake-up Validation Assistance 
    3.16  Start/Stop Wake-up Sources 
    With the new APIs (5.2.11, 5.2.12) the CanSM can be used, to start and stop the wake-up 
    sources, to enable the wake-up validation. Thus it can be avoided that the EcuM callout 
    starts the wake-up sources while the CanSM performs the transition to no communication 
    or the EcuM callout stops the wake-up sources while the CanSM performs the transition to 
    full communication. 
    3.16.1  Normal Behavior 
    Usually  the  CanSM  is  informed  about  the  start  of  the  wake-up  validation  sequence  (via 
    5.2.11)  within  the  state  CANSM_NO_COMMUNICATION.  In  this  case  the  CanSM  sets  the 
    CAN  controller  to  STARTED  and  the  CAN  transceiver  to  NORMAL.  If  the  validation  is 
    successful it will be finished by a full communication request, then the Pdu mode is set to 
    ONLINE  and  the  ComM  and  the  BswM  are  notified  with  the  corresponding  full 
    communication indication. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    23 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    The validation is also finished if the wake-up has not been determined as valid within the 
    specified validation time. Then the CanSM is informed by the according API (5.2.12) and 
    the CanSM switches the controller back to SLEEP and the CAN transceiver to STANDBY. 
    If  a  validation  sequence  is  started  while  the  CanSM  performs  a  transition  to 
    CANSM_NO_COMMUNICATION,  the  current  transition  to  CANSM_NO_COMMUNICATION  will 
    be canceled. 
    3.16.2  Usage 
    To use the wake-up validation assistance of the CanSM, remove the “set controller mode” 
    and  “set  transceiver  mode”  functions  from  the  EcuM  wake-up  sources  callouts,  call 
    CanSM_StartWakeupSources 
    instead 
    within 
    the 
    EcuM 
    callout 
    EcuM_StartWakeupSources  and  the  CanSM_StopWakeupSources  within  the  EcuM 
    callout EcuM_StopWakeupSources. Pay also attention to 4.2. 
    3.16.3  Exceptional Behavior 
    The change of the CAN HW mode could be disturbed and is not possible within the HW 
    loop  timeout.  Especially  the  change  of  the  controller  mode  may  fail  due  to  message 
    reception, dominant voltage level or electromagnetic interference. 
    If any transceiver or controller mode change returns E_NOT_OK any further actions will be 
    omitted  and  the  CanSM  will  return  E_NOT_OK  too;  except  if  the  set  controller  mode  to 
    SLEEP is answered with E_NOT_OK. In this case CanSM triggers a new wake-up by the 
    EcuM,  which  will  start  a  new  wake-up  validation  sequence.  So  no  further  exceptional 
    actions are necessary and the CanSM StopWakeupSources returns E_OK. 
    In case the CanSM returns an E_NOT_OK the CanTrcv/CanDrv are in “undefined” state so 
    it is most likely not possible to react on any event on the CAN bus respectively no Rx, no 
    Tx  or  no  wake-up  is  possible  which  can  lead  to  the  effects  described  in  the  following 
    chapter. 
    3.16.4  Potential Effect 
    3.16.4.1  Start of the Wakeup Sources Fail 
    Because  of  the  disturbance  during  the  mode  change  the  CAN  HW  (controller  and/or 
    transceiver) might be in an undefined state and is probably not able to react on incoming 
    messages.  Messages  on  the  bus  are  lost,  until  a  new  wake-up  is  possible,  after  the 
    validation timeout elapses and a successful call of StopWakeupSources. 
    3.16.4.2  Stop of the Wakeup Sources Fail 
    Because  of  the  disturbance  during  the  mode  change  the  CAN  HW  (controller  and/or 
    transceiver) might be in an undefined state. Probably the CAN wake-up will not work and 
    the ECU is not able to react on Rx messages on the affected CAN bus. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    24 
    based on template version 5.0.0 





    Technical Reference MICROSAR CAN State Manager 
     
     
    Caution 
    The EcuM may perform a state change to stop/sleep in the same 
      EcuM_MainFunction() cycle where EcuM_StopWakeupSources() is called. So it 
    is possible that the ECU stays in low power mode and cannot be woken up again 
    (internal/external wake-up or wake-up by CAN). 
     
     
    3.16.5  Countermeasures 
    >  A short disturbance can probably be resolved by calling Start-/StopWakeupSources() 
    within the current call context again. 
    >  As a second approach the return value of StartWakeupSources could be ignored. As a 
    result the validation time elapses, the wake-up sources are stopped and a new wake-
    up interrupt triggers the validation again, if the CAN communication is still running. As 
    a drawback, the ECU cannot participate in the CAN communication during this period 
    and therefore is not recommended for time critical systems. 
    >  Furthermore, the validation procedure can be bypassed altogether. Instead of calling 
    CanIf_CheckValidation(), the wake-up can be validated "manually" by calling 
    EcuM_ValidateWakeupEvent() directly. As a result, normal CAN communication is 
    started on the channel. 
    Note: This may also lead to a wake-up of other ECUs on the affected CAN channel, 
    due to the electromagnetic interference, because of inhibited wake-up validation. 
    >  If the StopWakeupSources() fails the validation sequence could be restarted again 
    “manually” via EcuM_SetWakeupEvent() call. The ECU can react faster to a 
    potential running CAN communication, under the assumption that the 
    StartWakeupSources() will be executed successfully. Alternatively it is possible to 
    initiate an ECU reset. The whole CAN stack becomes reinitialized by the BSW 
    modules from scratch. 
     
     
    Note 
    The appropriate solution depends highly on the type of the ECU and on the 
      requirements which have to be fulfilled by the ECU. 
     
     
     
     
    Caution 
    If any one of the functions CanSM_StartWakeupSources() 5.2.11 or 
      CanSM_StopWakeupSources 5.2.12 returns a failure (i.e. returns E_NOT_OK) the 
    application has to perform an ECU dependent error handling. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    25 
    based on template version 5.0.0 



    Technical Reference MICROSAR CAN State Manager 
     
     
    Note 
    Wakeup validation does not work with asynchronous hardware e.g. partial network 
      transceiver. 
     
     
     
    3.17  Error Handling 
    3.17.1  Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter CANSM_DEV_ERROR_DETECT == STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). The redirection of the function name has to be done 
    via “User Config File”. 
    The reported CanSM ID is 140. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID  Service 
    0x00 
    CanSM_Init 
    0x01 
    CanSM_GetVersionInfo 
    0x02 
    CanSM_RequestComMode 
    0x03 
    CanSM_GetCurrentComMode 
    0x04 
    CanSM_ControllerBusOff 
    0x05 
    CanSM_MainFunction 
    0x06 
    CanSM_ConfirmPnAvailability 
    0x07 
    CanSM_ControllerModeIndication 
    0x08 
    CanSM_ClearTrcvWufFlagIndication 
    0x09 
    CanSM_TransceiverModeIndication 
    0x0A 
    CanSM_CheckTransceiverWakeFlagIndication 
    0x0B 
    CanSM_TxTimeoutException 
    0x0C 
    CanSM_CheckBaudrate 
    0x0E 
    CanSM_ChangeBaudrate 
    0x0D 
    CanSM_SetBaudrate 
    0x0F 
    CanSM_CheckBorLevel 
    0x40 
    CanSM_PreventBusSleepAtStartUp 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    26 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Service ID  Service 
    0x20u 
    CanSM_StartWakeupSources 
    0x21u 
    CanSM_StopWakeupSources 
    Table 3-4   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01  CANSM_E_UNINIT 
    API  service  used  without  having  called 
    the initialization function. 
    0x02  CANSM_E_PARAM_POINTER 
    API service called with invalid pointer in 
    parameter list 
    0x03  CANSM_E_INVALID_NETWORK_HANDLE  API  service  called  with  wrong  network 
    handle  parameter,  which  is  not 
    configured in the CanSM configuration. 
    0x04  CANSM_E_PARAM_CONTROLLER 
    API service called with wrong  controller 
    index. 
    0x05  CANSM_E_PARAM_TRANSCEIVER 
    API 
    service 
    called 
    with 
    wrong 
    transceiver index. 
    0x06  CANSM_E_BUSOFF_RECOVERY_ACTIVE  API network mode request called during 
    not finished bus-off recovery 
    0x07  CANSM_E_WAIT_MODE_INDICATION 
    API network mode request called during 
    pending indication 
    0x08  CANSM_E_INVALID_COMM_REQUEST 
    API  network  mode  request  called  with 
    invalid  communication  mode  request 
    e.g. SILENT requested in state NoCom. 
    0x09  CANSM_E_PARAM_INVALID_BAUDRATE  API change baud rate called with invalid 
    baud rate i.e. the requested baud rate is 
    not  equal  to  the  remembered,  valid 
    baud 
    rate 
    of 
    the 
    last 
    CanSM_CheckBaudrate call. 
    0x0A  CANSM_E_MODE_REQUEST_TIMEOUT 
    API  set  transceiver/controller  mode 
    request  for  a  network  failed  more  often 
    as allowed by configuration. 
    0x0B  CANSM_E_INITIALIZED 
    API  service  used  after  the  initialization 
    function. 
    Table 3-5   Errors reported to DET 
    3.17.2  Production Code Error Reporting 
    By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
    Dem_ReportErrorStatus() as specified in [3], if the according production error of the 
    CAN channel is configured. 
    If  another  module  is  used  for  production  code  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    27 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    as the service Dem_ReportErrorStatus(). The redirection of the function name has to 
    be done via “User Config File”. 
     
    The errors reported to DEM are described in the following table: 
    Error Code 
    Description 
    CANSM_E_BUS_OFF 
    The error code ist used to inform the Dem about the 
    bus-off handling. 
    CANSM_E_MODE_REQUEST_TIMEOUT  The CanIf API calls has been triggered more often than 
    configured without getting the supposed mode 
    indication callbacks. 
    The DEM indication will substitute the DET. 
    Table 3-6   Errors reported to DEM 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    28 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  CanSM 
    into an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the CanSM contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    CanSM.c 
    This is the source file of the CanSM. It contains the 
     
     
    implementation of the main functionality (not available 
    if libraries are delivered). 
    CanSM.h 
    This is the main header file of the CAN State Manager 
     
     
    which provides the “defines”, function prototypes and 
    types of the CAN State Manager. 
    CanSM_BswM.h 
    This header exports the 
     
     
    CanSM_BswMCurrentStateType, which is dedicated to 
    the BswM module. 
    CanSM_Cbk.h 
    This is the callback header file that declares the 
     
     
    notification functions which inform the CanSM about 
    the transceiver or controller changes. 
    CanSM_ComM.h 
    This is a header file of the CAN State Manager which 
     
     
    is the specific interface for the ComM to the services of 
    the CAN State Manager. 
    CanSM_Dcm.h 
    This header exports the Set/Check/ChangeBaudrate 
     
     
    interfaces, which are dedicated to the Dcm module. 
    CanSM_EcuM.h 
    This header exports the Init/InitMemory interfaces, 
     
     
    which are used to (pre)initialize the CAN state 
    manager. 
    CanSM_TxTime
    The header provide the callback function 
    outException.h 
     
     
    CanSM_TxTimeoutException as optional interface (if 
    PN is active) to the CanNm. 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    CanSM_Cfg.h 
    Configuration header file which is generated. It contains pre-compile switches, 
    which enable/disable features, type definitions and constant values. 
    CanSM_Lcfg.c 
    Configuration source file. It contains configuration parameter which may be 
    changed at link time. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    29 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    File Name 
    Description 
    CanSM_PBcfg.c  Configuration source file. It contains for example timer variable values or 
    channel configuration parameter. It contains configuration parameter which 
    may be changed after link time. 
    Table 4-2   Generated files 
    4.2 
    Critical Sections 
    Critical sections are handled by the BSW Scheduler. The intention of the following critical 
    sections is to block the interrupt of CanSM functions (with a higher priority). 
    >  The CANSM_EXCLUSIVE_AREA_1 has to be used if it is possible that the function 
    CanSM_MainFunction() may be interrupted by any of the functions  
    >  CanSM_RequestComMode() 
    >  CanSM_ControllerBusOff() 
    >  CanSM_TxTimeoutException() 
    >  CanSM_SetEcuPassive() 
    >  CanSM_StopWakeupSources() 
    >  CanSM_StartWakeupSources(). 
    >  The CANSM_EXCLUSIVE_AREA_2 has to be used if it is possible that the function 
    CanSM_RequestComMode() may be interrupted by any of the functions  
    >  CanSM_MainFunction() 
    >  CanSM_ControllerModeIndication() 
    >  CanSM_TransceiverModeIndication() 
    >  CanSM_ClearTrcvWufFlagIndication() 
    >  CanSM_CheckTransceiverWakeFlagIndication() 
    >  CanSM_TxTimeoutException() 
    >  CanSM_SetEcuPassive() 
    >  CanSM_StopWakeupSources() 
    >  CanSM_StartWakeupSources(). 
    >  The CANSM_EXCLUSIVE_AREA_3 has to be used if it is possible that the function 
    CanSM_ControllerBusOff() may be interrupted by any of the functions  
    >  CanSM_RequestComMode() 
    >  CanSM_ControllerBusOff() 
    >  CanSM_TxTimeoutException(). 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    30 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    The intention of the following critical sections is to avoid a change of the CAN controller or 
    transceiver mode during shutdown of the CAN communication when the CanSM performs 
    the transition to from Silent Communication to No Communication. 
    >  The CANSM_EXCLUSIVE_AREA_4 has to be used if it is possible that one of functions 
    CanSM_MainFunction() or CanSM_RequestComMode() may be interrupted by a 
    CAN event. 
    1.  By CAN Wake Up Interrupt 
    2.  By CAN Wake Up Polling 
    3.  By CAN Bus-Off (Can error) 
    >  The CANSM_EXCLUSIVE_AREA_5 has to be used if it is possible that one of the 
    functions CanSM_SetEcuPassive() or CanSM_StartWakeupSources() or 
    CanSM_StopWakeupSources() may be interrupted by any of the functions  
    >  CanSM_RequestComMode() 
    >  CanSM_MainFunction(). 
    >  Or it is possible that the function CanSM_ControllerModeIndication() may be 
    interrupted by the function 
    >  CanSM_SetEcuPassive(). 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    31 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the CanSM are described in this chapter. 
    Type Name 
    C-Type 
    Description 
    Value Range 
    CanSM_BswMCurre uint8 
    CAN specific 
    CANSM_BSWM_NO_COMMUNICATION 
    ntStateType 
    communication 
    CANSM_BSWM_SILENT_COMMUNICATION 
    modes / states 
    notified to the BswM  CANSM_BSWM_FULL_COMMUNICATION 
    module. 
    CANSM_BSWM_BUS_OFF 
    CANSM_BSWM_CHANGE_BAUDRATE 
    Pointer to the 
    CanSM_Channel
    structure which 
    pointer  contains the 
     
    ConfigPtrType 
    configuration data 
    of a CAN channel. 
    Structure which 
    CanSM_Channel
    struct 
    contains the 
     
    ConfigType 
    configuration data 
    of a CAN channel. 
    CanSM_ConfigT
    Structure which 
    struct 
    contains the global   
    ype 
    configuration data. 
    Structure contains 
     
    CanSM_Channel
    struct 
    the variable values 
    VarRecordType 
    of a specific CAN 
    channel. 
    CanSM_BorStat
    uint8 
    Can specific bus-off  CANSM_BOR_NONE 
    eType 
    level. 
    CANSM_BOR_LEVEL1 
    CANSM_BOR_LEVEL2 
    Table 5-1   Type definitions 
    5.2 
    Services Provided by CanSM 
    5.2.1 
    CanSM_InitMemory 
    Prototype 
    void CanSM_InitMemory( void ) 
    Parameter 


    Return code 


    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    32 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    This function initializes the CanSM memory and sets the variable CanSM_IsInitialized to FALSE 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    Called once at start-up before the initialization function. 
    Expected Caller Context 
      Function is called once before CanSM_Init 
     Table 5-2   CanSM_InitMemory 
    5.2.2 
    CanSM_PreInit 
    Prototype 
    void CanSM_PreInit (const CanSM_ConfigType *const ConfigPtr) 
    Parameter 
    ConfigPtr [in] 
    Pointer to configuration structure 
    Return code 
    void 
    none 
    Functional Description 
    Initializes the configuration data component. 
    Particularities and Limitations 
    CanSM_InitMemory has been called if CANSM_PREVENT_BUSSLEEP_AT_STARTUP is activated unless 
    CanSM_EnableSetBusSleep[] is initialized by start up code. 
    The API is only needed in case of extended RAM check. Otherwise use CanSM_Init without 
    CanSM_PreInit. 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  TASK 
    >  This function is Reentrant 
    Table 5-3   CanSM_PreInit 
    5.2.3 
    CanSM_Init 
    Prototype 
    void CanSM_Init( const CanSM_ConfigType* const ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to the configuration structure that shall be used for the post-build 
    parameters. 
    Return code 


    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    33 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    Service for CAN State Manager initialization. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    Non Reentrant 
    Expected Caller Context 
      Called once after startup 
    Table 5-4 
    CanSM_Init 
    5.2.4 
    CanSM_MainFunction 
    Prototype 
    void CanSM_MainFunction( void ) 
    Parameter 


    Return code 


    Functional Description 
    The main function of the CanSM executes asynchron transitions of each network, which is configured for 
    the CanSM. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. Function has to be called cyclically. The cycle time is set in the 
    configuration tool. 
     
    Non Reentrant 
    Expected Caller Context 
      Cyclic on task level 
    Table 5-5 
    CanSM_MainFunction 
    5.2.5 
    CanSM_RequestComMode 
    Prototype 
    Std_ReturnType CanSM_RequestComMode( NetworkHandleType NetworkHandle, 
    ComM_ModeType CanSM_RequestedComMMode ) 
    Parameter 
    NetworkHandle 
    The communication network number belonging to the request. 
    CanSM_RequestedComMM New desired value of the communication mode. 
    ode 
    Return code 
    ReturnType 
    Returns whether function parameter are valid or not. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    34 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    The function stores the requested communication mode for the network handle and executes the 
    corresponding network mode state machine. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN networks, not reentrant for the same CAN network 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-6 
    CanSM_RequestComMode 
    5.2.6 
    CanSM_GetCurrentComMode 
    Prototype 
    Std_ReturnType CanSM_GetCurrentComMode( NetworkHandleType 
    NetworkHandle, ComM_ModeType* CanSM_ComMModePtr ) 
    Parameter 
    NetworkHandle 
    Index of the network channel. 
    CanSM_ComMModePtr 
    Pointer where the communication mode information is copied to. 
    Return code 
    ReturnType 
    Returns whether function parameter are valid or not. 
    Functional Description 
    This service delivers the current communication mode of a CAN network. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-7 
    CanSM_GetCurrentComMode 
    5.2.7 
    CanSM_GetVersionInfo 
    Prototype 
    void CanSM_GetVersionInfo( Std_VersionInfoType * VersionInfo ) 
    Parameter 
    VersionInfo 
    Pointer, where to store the version data of the CanSM. 
    Return code 


    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    35 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    This service returns the version information of this module. The version information includes: 
     - Module Id 
     - Vendor Id 
     - Vendor specific version numbers (The versions are BCD-coded). 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    The function is only available if enabled at compile time (CANSM_VERSION_INFO_API = 
    STD_ON) 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-8 
    CanSM_GetVersionInfo 
    5.2.8 
    CanSM_CheckBaudrate 
    Prototype 
    Std_ReturnType CanSM_CheckBaudrate( NetworkHandleType 
    CanSM_NetworkHandle, uint16 CanSM_Baudrate ) 
    Parameter 
    CanSM_NetworkHandle 
    The communication network number belonging to the request. 
    CanSM_Baudrate 
    New desired baud rate. 
    Return code 
    ReturnType 
    E_OK: Baudrate supported by all configured CAN controllers of the network  
    E_NOT_OK: Baudrate not supported / invalid network 
    Functional Description 
    This service check, if a certain baud rate is supported by the configured CAN controller of a CAN network. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN networks, not reentrant for the same CAN network 
     
    Please note that this API is deprecated and is kept only for backward compatibility reasons 
    (Substituted by CanSM_SetBaudrate). 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-9 
    CanSM_CheckBaudrate 
    5.2.9 
    CanSM_ChangeBaudrate 
    Prototype 
    Std_ReturnType CanSM_ChangeBaudrate( NetworkHandleType 
    CanSM_NetworkHandle, uin16 CanSM_Baudrate ) 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    36 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Parameter 
    CanSM_NetworkHandle 
    The communication network number belonging to the request. 
    CanSM_Baudrate 
    New desired baud rate. 
    Return code 
    ReturnType 
    Returns whether function parameter are valid or not. 
    Functional Description 
    This service starts a process to change the baud rate for the configured CAN controllers of a certain CAN 
    network 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    CanSM_CheckBaudrate has to be called first successfully. 
     
    Reentrant for different CAN networks, not reentrant for the same CAN network 
     
    Please note that this API  is deprecated  and  is kept  only for  backward compatibility  reasons 
    (Substituted by CanSM_SetBaudrate). 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-10  CanSM_ChangeBaudrate 
    5.2.10  CanSM_SetBaudrate 
    Prototype 
    Std_ReturnType CanSM_SetBaudrate( NetworkHandleType 
    CanSM_NetworkHandle, uin16 BaudRateConfigID ) 
    Parameter 
    CanSM_NetworkHandle 
    The communication network number belonging to the request. 
    BaudRateConfigID 
    References a baud rate configuration by ID (see 
    CanControllerBaudRateConfigID) 
    Return code 
    ReturnType 
    E_OK: Service request accepted, setting of (new) baud rate started  
    E_NOT_OK: Service request not accepted 
    Functional Description 
    This service starts a process to change the baud rate for the configured CAN controller of a CAN network. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs' 
     
    CanSM has to be initialized 
     
    Reentrant for different CAN networks, not reentrant for the same CAN network 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-11  CanSM_SetBaudrate 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    37 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    5.2.11  CanSM_StartWakeupSources 
    Prototype 
    Std_ReturnType CanSM_StartWakeupSources( NetworkHandleType 
    CanSM_NetworkHandle ) 
    Parameter 
    NetworkHandle 
    Network handle of the wake-up source which should be started 
    Return code 
    E_OK 
    The CanSM has set the CanTrcv and CanDrv in the required states 
    E_NOT_OK 
    It was not possible to set the CanTrcv or CanDrv to the required state to 
    perform the wake-up validation, e.g. because of dominant level on Rx pin. At 
    this point the CanTrcv or CanDrv are in an “undefined” state. The CanSM itself 
    does not execute any retry. The application has to perform an ECU dependent 
    error handling. 
    Functional Description 
    This function notifies the CanSM module that the EcuM has received a wake-up event which has to be 
    validated. 
    Particularities and Limitations 
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN networks 
     
    Transceiver which work asynchronous must not be used (i.e. Partial network Trcv, SPI Trcv, 
    Trcv within SBC) 
    Expected Caller Context 
      Function can be called in task context. 
    Table 5-12  CanSM_StartWakeupSources 
    5.2.12  CanSM_StopWakeupSources 
    Prototype 
    Std_ReturnType CanSM_StopWakeupSources( NetworkHandleType 
    CanSM_NetworkHandle, EcuM_WakeupSourceType WakeupSource ) 
    Parameter 
    NetworkHandle 
    The communication network number belonging to the request. 
    WakeupSource 
    The wake-up source handle of the CAN channel which should be stopped 
    Return code 
    E_OK 
    The CanSM has set the CanTrcv and CanDrv in the required states or started 
    a new wakeup. 
    E_NOT_OK 
    It was not possible to set the CanTrcv or CanDrv to the required state, e.g. 
    because of dominant level on Rx pin. At this point the CanTrcv or CanDrv are 
    in an “undefined” state. The CanSM itself does not execute any retry. The 
    application has to perform an ECU dependent error handling. 
    Functional Description 
    This function notifies the CanSM module that the wake-up has not been determined as valid within the 
    specified validation time 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    38 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Particularities and Limitations 
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN networks  
     
    Transceiver which work asynchronous must not be used (i.e. Partial network Trcv, SPI Trcv, 
    Trcv within SBC) 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-13  CanSM_StopWakeupSources 
    5.2.13  CanSM_CheckBorLevel 
    Prototype 
    Std_ReturnType CanSM_CheckBorLevel( const NetworkHandleType 
    NetworkHandle, const CanSM_BorStateType* CanSM_BorStatePtr) 
    Parameter 
    NetworkHandle 
    Index of the network channel. 
    CanSM_BorStatePtr 
    Pointer to target variable, which shall be used for the output of the bus-off 
    recovery level. 
    Return code 
    ReturnType 
    E_OK: API request accepted 
    E_NOT_OK: API request rejected 
    Functional Description 
    This service delivers the current bus-off level of a CAN network. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-14  CanSM_CheckBorLevel 
    5.2.14  CanSM_SetEcuPassive 
    Prototype 
    void CanSM_SetEcuPassive( boolean CanSM_EcuPassiveMode ) 
    Parameter 
    CanSM_EcuPassiveMode  Boolean parameter which switches the ECU mode between active and 
    passive mode 
    Return code 


    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    39 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    The function stores the requested ECU mode until it’s modified by the next call of this function. In passive 
    mode the CanSM sets the Tx PDU mode to OFFLINE_ACTIVE instead to ONLINE. 
    Particularities and Limitations 
      CanSM has to be initialized. 
      Non Reentrant 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-15  CanSM_SetEcuPassive 
    5.2.15  CanSM_PreventBusSleepAtStartUp 
    Prototype 
    Std_ReturnType CanSM_PreventBusSleepAtStartUp( NetworkHandleType 
    CanSM_NetworkHandle ) 
    Parameter 
    CanSM_NetworkHandle 
    communication network handle 
    Return code 
    Std_ReturnType 
    Returns whether the network handle is valid and if the function has been 
    called before or after the initialization. 
    Functional Description 
    The function can be used to prevent the bus sleep state of the CanIf, CanDrv and CanTrcv at start up for 
    the given CAN network handle. 
    The CanIf, CanDrv and CanTrcv leaves in the corresponding module initialization state. 
    Particularities and Limitations 
      Called at start-up before the CanSM initialization function 
      The function must not be used with PostBuildSelecabel configuarions 
    Expected Caller Context 
      Function has to be called before CanSM_Init 
    Table 5-16  CanSM_PreventBusSleepAtStartUp 
    5.2.16  CanSM_RamCheckStatus 
    Prototype 
    Std_ReturnType CanSM_RamCheckStatus (NetworkHandleType CanSM_NetworkHandle) 
    Parameter 
    CanSM_NetworkHandle 
    Network handle 
    [in] 
    Return code 
    Std_ReturnType 
    CANSM_APPL_RAMCHECK_ENABLE Everything is E_OK 
    CANSM_APPL_RAMCHECK_DISABLE Communication shall be disabled 
    CANSM_APPL_RAMCHECK_ENABLE_REPEAT Communication shall be 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    40 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    enabled and the RAM check repeated 
    CANSM_APPL_RAMCHECK_DISABLE_REPEAT Communication shall be 
    disabled and the RAM check repeated 
    E_NOT_OK wrong Parameter 
    Functional Description 
    Reports the RAM check status to the ComM. 
    Particularities and Limitations 
    Reports the last RAM check status 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-17   CanSM_RamCheckStatus 
    5.2.17  CanSM_RamCheckEnableMailbox 
    Prototype 
    void CanSM_RamCheckEnableMailbox (NetworkHandleType Network, Can_HwHandleType 
    MailBox) 
    Parameter 
    Network [in] 
    network handle 
    MailBox [in] 
    HW mail box identifier 
    Return code 
    void 
    none 
    Functional Description 
    Forwards enable mail box. 
    Particularities and Limitations 
    If a mail box shall be enabled the information from the application is passed through to the CanDrv via 
    CanIf. 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-18   CanSM_RamCheckEnableMailbox 
     
    5.3 
    Services Used by CanSM 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CanSM are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    41 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Component 
    API 
    Application 
    Appl_CanSM_RamCheckCorruptController 
    Application 
    Appl_CanSM_RamCheckCorruptMailbox 
    Application 
    Appl_CanSM_RamCheckFinished 
    Application 
    Appl_CanSM_RamCheckStart 
    BswM 
    BswM_CanSM_CurrentState 
    CanIf 
    CanIf_SetControllerMode 
    CanIf 
    CanIf_SetTrcvMode 
    CanIf 
    CanIf_ChangeBaudrate 
    CanIf 
    CanIf_SetPduMode 
    CanIf 
    CanIf_CheckTrcvWakeFlag 
    CanIf 
    CanIf_ClearTrcvWufFlag 
    CanIf 
    CanIf_GetTxConfirmationState 
    CanIf 
    CanIf_RamCheckEnableController 
    CanIf 
    CanIf_RamCheckEnableMailbox 
    CanIf 
    CanIf_RamCheckExecute 
    CanNm 
    CanNm_ConfirmPnAvailability 
    DEM 
    Dem_ReportErrorStatus 
    DET 
    Det_ReportError 
    ComM 
    ComM_BusSM_ModeIndication 
    SchM 
    SchM_Enter_CanSM_CANSM_EXCLUSIVE_AREA_i 
    for i=1,2,3,4,5 
    SchM 
    SchM_Exit_CanSM_CANSM_EXCLUSIVE_AREA_i 
    for i=1,2,3,4,5 
    Table 5-19   Services used by the CanSM 
    5.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the CanSM and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file CanSM_Cbk.h by the CanSM. 
    5.4.1 
    CanSM_ControllerBusOff 
    Prototype 
    void CanSM_ControllerBusOff( uint8 CanSM_ControllerId ) 
    Parameter 
    CanSM_ControllerId 
    Index of the CAN controller, which detected a bus-off event 
    Return code 


    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    42 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    The CanSM is notified about a bus-off event on a certain CAN controller with this callback function. The 
    CanSM uses this information to execute the bus-off recovery for the corresponding controller. 
    Particularities and Limitations 
      CanSM has to be initialized. 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-20  CanSM_ControllerBusOff 
    5.4.2 
    CanSM_ControllerModeIndication 
    Prototype 
    void CanSM_ControllerModeIndication(uint8 CanSM_ControllerId, 
    CanIf_ControllerModeType CanSM_ControllerMode ) 
    Parameter 
    CanSM_ControllerId 
    Index of the CAN controller, which detected a bus-off event 
    CanSM_ControllerMode  Notified CAN controller mode 
    Return code 


    Functional Description 
    This callback shall notify the CanSM module about a CAN controller mode change. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-21  CanSM_ControllerModeIndication 
    5.4.3 
    CanSM_TransceiverModeIndication 
    Prototype 
    void CanSM_TransceiverModeIndication( uint8 CanSM_TransceiverId, 
    CanIf_TrcvModeType CanSM_TransceiverMode ) 
    Parameter 
    CanSM_TransceiverId 
    Index of the CAN controller, which detected a bus-off event 
    CanSM_TransceiverMode  Notified CAN transceiver mode 
    Return code 


    Functional Description 
    This callback shall notify the CanSM module about a CAN transceiver mode change. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    43 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-22  CanSM_TransceiverModeIndication 
    5.4.4 
    CanSM_ClearTrcvWufFlagIndication 
    Prototype 
    void CanSM_ClearTrcvWufFlagIndication ( uint8 CanSM_TransceiverId ) 
    Parameter 
    CanSM_TransceiverId 
    The transceiver ID number belonging to the request. 
    Return code 


    Functional Description 
    This call-back function indicates the CanIf_ClearTrcvWufFlag API process end for the notified CAN 
    Transceiver. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN transceivers 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-23  CanSM_ClearTrcvWufFlagIndication 
    5.4.5 
    CanSM_CheckTransceiverWakeFlagIndication 
    Prototype 
    void CanSM_CheckTransceiverWakeFlagIndication ( uint8 
    CanSM_TransceiverId ) 
    Parameter 
    CanSM_TransceiverId 
    The transceiver ID number belonging to the request. 
    Return code 


    Functional Description 
    This call-back function indicates the CheckTransceiverWakeFlag API process end for the notified CAN 
    Transceiver. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    44 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN transceivers 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-24  CanSM_CheckTransceiverWakeFlagIndication 
     
    5.4.6 
    CanSM_ConfirmPnAvailability 
    Prototype 
    void CanSM_ConfirmPnAvailability ( uint8 CanSM_TransceiverId ) 
    Parameter 
    CanSM_TransceiverId 
    The transceiver ID number belonging to the request. 
    Return code 


    Functional Description 
    This call-back function indicates that the transceiver is running in PN communication mode. In this case the 
    CanNm will be informed by calling CanNm_ConfirmPnAvailability. 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN transceivers 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-25  CanSM_ConfirmPnAvailability 
    5.4.7 
    CanSM_TxTimeoutException 
    Prototype 
    void CanSM_TxTimeoutException ( NetworkHandleType CanSM_NetworkHandle ) 
    Parameter 
    CanSM_NetworkHandle 
    The communication network number belonging to the request. 
    Return code 


    Functional Description 
    This function notifies the CanSM module that the Com has detected a Tx timeout exception, which shall be 
    recovered by the CanSM module by a re-initialization of the CAN controller. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    45 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Particularities and Limitations 
     
    Service ID: see table 'Service IDs'  
     
    CanSM has to be initialized. 
     
    Reentrant for different CAN networks 
    Expected Caller Context 
      Function can be called in task and interrupt context. 
    Table 5-26  CanSM_TxTimeoutException  
    5.4.8 
    CanSM_RamCheckCorruptMailbox 
    Prototype 
    void CanSM_RamCheckCorruptMailbox (uint8 CanSM_ControllerId, Can_HwHandleType 
    MailBox) 
    Parameter 
    CanSM_ControllerId [in] 
    CAN controller index 
    MailBox [in] 
    Mail box identifier 
    Return code 
    void 
    none 
    Functional Description 
    Handles the indication of a RAM check error. 
    Particularities and Limitations 
    Gets information about RAM check errors. Forwards the information to the application and evaluates HW 
    register failures 
    Configuration Variant(s): - 
    Call context 
    >  ANY 
    >  This function is Reentrant 
    Table 5-27  CanSM_RamCheckCorruptMailbox 
    5.4.9 
    CanSM_RamCheckCorruptController 
    Prototype 
    void CanSM_RamCheckCorruptController (uint8 CanSM_ControllerId) 
    Parameter 
    CanSM_ControllerId [in] 
    CAN controller index 
    Return code 
    void 
    none 
    Functional Description 
    Handles the indication of a RAM check error. 
    Particularities and Limitations 
    Gets information about RAM check errors. Forwards the information to the application and evaluates HW 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    46 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    register failures 
    Configuration Variant(s): - 
    Call context 
    >  ANY 
    >  This function is Reentrant 
    Table 5-28   CanSM_RamCheckCorruptController 
    5.5 
    Callout Functions 
    5.5.1 
    Appl_CanSM_RamCheckStart 
    Prototype 
    void Appl_CanSM_RamCheckStart (NetworkHandleType CanSM_NetworkHandle) 
    Parameter 
    CanSM_NetworkHandle 
    network handle 
    [in] 
    Return code 
    void 
    none 
    Functional Description 
    Indicates the start of the RAM check. 
    Particularities and Limitations 
    Indicates the start of the RAM check. 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-29   Appl_CanSM_RamCheckStart 
    5.5.2 
    Appl_CanSM_RamCheckCorruptController 
    Prototype 
    void Appl_CanSM_RamCheckCorruptController (NetworkHandleType 
    CanSM_NetworkHandle) 
    Parameter 
    CanSM_NetworkHandle 
    network handle 
    [in] 
    Return code 
    void 
    none 
    Functional Description 
    Forwards register RAM failures. 
    Particularities and Limitations 
    If register RAM failures occurs the information from the CanDrv is passed through the Application. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    47 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-30   Appl_CanSM_RamCheckCorruptController 
    5.5.3 
    Appl_CanSM_RamCheckCorruptMailbox 
    Prototype 
    void Appl_CanSM_RamCheckCorruptMailbox (NetworkHandleType CanSM_NetworkHandle, 
    Can_HwHandleType MailBox) 
    Parameter 
    CanSM_NetworkHandle 
    Network handle 
    [in] 
    Can_HwHandleType [in] 
    HW mail box identifier 
    Return code 
    void 
    none 
    Functional Description 
    Forwards message box RAM failures. 
    Particularities and Limitations 
    If a message box RAM failure occurs the information from the CanDrv is passed through the Application. 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-31   Appl_CanSM_RamCheckCorruptMailbox 
    5.5.4 
    Appl_CanSM_RamCheckFinished 
    Prototype 
    Std_ReturnType Appl_CanSM_RamCheckFinished (NetworkHandleType 
    CanSM_NetworkHandle) 
    Parameter 
    CanSM_NetworkHandle 
    Network handle 
    [in] 
    Return code 
    Std_ReturnType 
    CANSM_APPL_RAMCHECK_ENABLE Everything is E_OK 
    CANSM_APPL_RAMCHECK_DISABLE Communication shall be disabled 
    CANSM_APPL_RAMCHECK_ENABLE_REPEAT Communication shall be 
    enabled and the RAM check repeated 
    CANSM_APPL_RAMCHECK_DISABLE_REPEAT Communication shall be 
    disabled and the RAM check repeated 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    48 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    Functional Description 
    Indicates the end of the RAM check. 
    Particularities and Limitations 
    The CanDrv has finished the extended RAM check. All potential errors have been reported. The Application 
    has to specify further actions via return value. 
    Configuration Variant(s): CANSM_EXTENDED_RAM_CHECK 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-32   Appl_CanSM_RamCheckFinished 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    49 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    6  AUTOSAR Standard Compliance 
    6.1 
    Deviations 
    6.1.1 
    Communication mode requests are acceped if possible 
    The module accepts the communication mode requests even if there is a pending mode 
    indication.  E.g.  the  CanSM  is  in  state  S_CC_STARTED_WAIT  (3.3.3)  and  gets  a 
    NO_COMMUNICATION request the deinitialization (3.3.7) becomes started. 
    Det_ReportError with the ErrorId parameter CANSM_E_WAIT_MODE_INDICATION is not 
    used. 
    6.1.2 
    Mode Request Timeout is available as Runtime Error (DEM) 
    The Det error CANSM_E_MODE_REQUEST_TIMEOUT can be substituted by a Dem Error. 
    6.2 
    Additions/ Extensions 
    6.2.1 
    API CanSM_InitMemory() 
    This service function was added to be called at “Power On” or after reset to set the global 
    CanSM state. Afterwards the CanSM can be initialized correctly. 
    6.2.2 
    No Mode Notification During CanSM_Init 
    The ComM_BusSM_ModeIndication and BswM_CanSM_CurrentState are not called 
    during the transition from CANSM_INIT to CANSM_NO_COMMUNNICATION because the 
    ComM and BswM become initialized after the CanSM. 
    6.2.3 
    Configuration Options 
    It’s possible to (de)activate the DEM at pre-compile time, like DET. 
    6.2.4 
    Additional Bus-Off Recovery in State Silent 
    If bus-off occurs outside the state FULL_COMMUNICATION, the CanSM handles bus-off 
    and sets the CAN controller mode to STARTED once. 
    6.2.5 
    API CanSM_CheckBorLevel() 
    This service function delivers the current bus-off level of a CAN network. 
    6.2.6 
    Partial Network Wake Up Filter 
    For the partial network use case it has to be ensured that that the first message on the bus 
    is a wake up message. Therefore the CanSM triggers the PDU Mode 
    CANIF_SET_ONLINE_WAKF instead CANIF_SET_ONLINE. The CanSM feature is automatically 
    active if the feature is active in the CanIf. 
    6.2.7 
    ECU Passive Mode 
    The  passive  mode  deactivates  the  Tx  part  during  full  communication.  The  ECU  listens 
    “passively” on all CAN busses. 
    6.2.8 
    PreventBusSleepAtStartUp 
    The additional API CanSM_PreventBusSleepAtStartUp() allows to skip the initial transition 
    for the selected channel(s). 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    50 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    6.2.9 
    Post-Build Selectable (Identity Manager) 
    The code generator and the static code supports post build selectable configuration. 
    6.2.10  APIs to Assist EcuM Wakeup Validation 
    The APIs can be used to ensure that the CAN HW is started/online during running wakeup  
    Validation (chapters 3.15, 3.17.1, 4.2, 5.2.11, 5.2.12). 
    6.2.11  Swift or Large Tx Timeout Exception handling 
    The CanSM provides two different versions of Tx Timeout Exception handling. The desired 
    one can be configured. The new swift version sets the controller to stopped and back to 
    started instead executing the whole shut down sequence to NoCom. 
    6.2.12  Extended RAM Check 
    The CanSM triggers the DrvCan to execute CanSelfDiag (Extended RAM Check).  
    6.2.13  Expanded Tx Timeout Exception Handling 
    The CanSM provides the option to configure a callout function which is called at the end of 
    the timeout exception handling. If a valid function name is configured the CanSM activates 
    the "expanded" time out exception handling. The "expanded" time out exception handling 
    is equal to the CanSMSwiftTxTimeoutRecovery followed by the configured end indication. 
    In addition the CanSM executes the handling also if the Tx timeout exception is indicated 
    in the states "SILENTCOM" or "BUS_OFF_CHECK". 
    6.3 
    Limitations 
    6.3.1 
    Controllers 
    The CanSM supports only one controller per channel. 
    6.3.2 
    Configuration Class 
    Only VARIANT-PRE-COMPILE and POST-BUILD-SELECTABLE is supported. 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    51 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator  Generation tool for MICROSAR components 
    Table 7-1   Glossary 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    BswM 
    Basic Software Mode Manager 
    CAN 
    Controller Area Network 
    CanDrv 
    CAN Driver 
    CanIf 
    CAN Interface 
    CanNm 
    CAN Network Management 
    CanSM 
    CAN State Manager 
    CanTrcv 
    CAN Transceiver 
    Cbk 
    Call-back / call-out notification (functions) 
    Cfg 
    Configuration 
    ComM 
    Communication Manager 
    DEM, Dem 
    Diagnostic Event Manager 
    DET, Det 
    Development Error Tracer 
    DTC 
    Diagnostic Trouble Code 
    ECU 
    Electronic Control Unit 
    EcuM 
    ECU State Manager 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PDU 
    Protocol Data Unit 
    PN 
    Partial Networking 
    RAM 
    Random Access Memory 
    SBC 
    System Basis Chip 
    SchM 
    BSW Scheduler 
    SPI 
    Serial Peripheral Interface 
    SWC 
    Software Component 
    Table 7-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    52 
    based on template version 5.0.0 


    Technical Reference MICROSAR CAN State Manager 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    © 2017 Vector Informatik GmbH 
    Version 2.10.00 
    53 
    based on template version 5.0.0 

    Document Outline


    1.3.75 - TechnicalReference_CanTp

    MICROSAR CAN Transport Layer

    1.3.77 - TechnicalReference_CanTps


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CAN Transport Layer 
    Technical Reference 
     
      
    Version 3.01.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Thomas Dedler, Anthony Thomas 
    Status 
    Released 
     
     
     
     
     
     
     


    Technical Reference MICROSAR CAN Transport Layer 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Thomas Dedler 
    2012-07-11 
    1.00.00 
    Initial version 
    Thomas Dedler 
    2012-11-26 
    1.01.00 
    Synchronous transmission feature removed  
    Thomas Dedler 
    2013-04-15 
    1.02.00 
    >  Configuration Hint chapter added 
    >  Description of Post-Build Loadable 
    Thomas Dedler 
    2013-08-26 
    1.03.00 
    >  Limitations of Single Channel Optimization 
    added 
    >  Limitation of data length parameter added 
    >  Dcm OnRequestDetection feature removed 
    Thomas Dedler 
    2014-04-10 
    1.04.00 
    >  Synchronous / Asynchronous Transmission 
    >  AR4.1.2 PduR API support 
    Thomas Dedler 
    2014-08-22 
    2.00.00 
    >  SingleChannel optimization removed 
    >  Support of CAN-FD added 
    >  Application callbacks changed 
    >  Postbuild-Build Selectable 
    Thomas Dedler 
    2015-01-12 
    2.01.00 
    >  Missing description of CanTp_InitMemory() 
    added 
    >  Reentrancy of CanTp_GetVersionInfo() 
    corrected 
    >  Minor clarifications in regarding CAN-FD 
    Thomas Dedler 
    2015-07-01 
    2.02.00 
    >  Separation Time by Application 
    >  Dynamic BS feature description adapted 
    according to latest ISO specification 
    Thomas Dedler 
    2015-12-11 
    3.00.00 
    >  Obsolete features removed: 
    >  Notification of Failed Cancellations 
    >  Ignore FC with invalid flow status 
    >  Ignore FC with reserved STmin 
    >  Ignore CF with wrong sequence number 
    >  Clarification of performance parameter 
    configuration 
    >  Rework of Critical Section chapter 
    >  Hint for DET configuration added 
    Anthony Thomas 
    2016-08-05 
    3.00.01 
    >  Updated document template 
    >  Documented features, deviations and 
    extensions properly. 
    Anthony Thomas 
    2017-03-24 
    3.01.00 
    >  Mixed11 address extension forwarding 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]    AUTOSAR  AUTOSAR_SWS_CANTransportLayer.pdf 
    4.0.0 
    [2]    AUTOSAR  AUTOSAR_SWS_CANInterface.pdf 
    5.0.0 
    [3]    AUTOSAR  AUTOSAR_SWS_PDURouter.pdf 
    3.2.0 
    [4]    ISO 
    /ISO/TF2/: ISO FDIS 15765-2; Road vehicles —  
    2015 
    Diagnostics on CAN — Part 2: Network layer services  
    [5]    AUTOSAR  AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [6]    Vector 
    TechnicalReference_Asr_Dbg.pdf  
    1.0.0 
    [7]    Vector 
    TechnicalReference_PostBuildLoadable.pdf 
    1.2.0 
    [8]    Vector 
    TechnicalReference_IdentityManager.pdf 
    1.0.0 
    [9]    Vector 
    TechnicalReference_Det.pdf 
    2.0.4 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 




    Technical Reference MICROSAR CAN Transport Layer 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
     
     
    Caution 
    This symbol calls your attention to warnings. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    Contents 
    1 
    Component History ...................................................................................................... 9 
    2 
    Introduction................................................................................................................. 10 
    2.1 
    Architecture Overview ...................................................................................... 11 
    3 
    Functional Description ............................................................................................... 13 
    3.1 

    Features .......................................................................................................... 13 
    3.1.1 

    Deviations ........................................................................................ 13 
    3.1.2 
    Additions/ Extensions ....................................................................... 14 
    3.1.2.1 

    Split CanTp_MainFunction ............................................. 14 
    3.1.2.2 
    Notification of Failed Buffer Request .............................. 14 
    3.1.2.3 
    Handling of FC Frames with a Reserved STmin ............ 14 
    3.1.2.4 
    Dynamic and Static BlockSize and STmin ..................... 15 
    3.1.2.5 
    Dynamic Channel Assignment ....................................... 15 
    3.1.2.6 
    Single Buffer Optimization .............................................. 15 
    3.1.2.7 
    Transmit Queue ............................................................. 16 
    3.1.2.8 
    Asynchronous and Synchronous behavior of 
    CanTp_Transmit ............................................................ 17 

    3.1.2.9 
    Support of PduR Interface according to AUTOSAR 
    4.1.2 .............................................................................. 17 

    3.1.2.10 
    CAN-FD Support ............................................................ 18 
    3.1.2.10.1  CAN Messages with more than 8 Byte ....... 18 
    3.1.2.10.2  CAN-FD Frame Padding ............................ 19 
    3.1.2.10.3  Segmented Messages with more than 

    4095 Byte .................................................. 19 
    3.1.2.11 
    Separation Time by Application ...................................... 20 
    3.1.2.12 
    Mixed11 address extension forwarding .......................... 21 
    3.2 
    Limitations........................................................................................................ 21 
    3.2.1 

    Memory Optimization ....................................................................... 21 
    3.2.2 
    Channel Assignment ........................................................................ 21 
    3.2.3 
    Channel Addressing ......................................................................... 22 
    3.2.4 
    Data Length Parameter .................................................................... 22 
    3.3 
    Initialization ...................................................................................................... 22 
    3.4 
    States .............................................................................................................. 22 
    3.5 
    Main Functions ................................................................................................ 23 
    3.6 
    Error Handling .................................................................................................. 24 
    3.6.1 

    Development Error Reporting ........................................................... 24 
    3.6.1.1 
    Parameter Checking ...................................................... 27 
    3.6.2 
    Production Code Error Reporting ..................................................... 27 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.7 
    Channel Mode ................................................................................................. 28 
    3.8 
    Connection Channels ....................................................................................... 28 
    3.9 
    Connection Timings ......................................................................................... 29 
    3.9.1 

    Timing Parameters ........................................................................... 29 
    3.9.2 
    Timing Considerations and Jitter ...................................................... 30 
    3.9.2.1 

    Jitter ............................................................................... 30 
    3.9.2.2 
    Separation Time ............................................................. 30 
    3.9.2.3 
    Implementation of N_Br ................................................. 31 
    4 
    Integration ................................................................................................................... 32 
    4.1 

    Scope of Delivery ............................................................................................. 32 
    4.1.1 

    Static Files ....................................................................................... 32 
    4.1.2 
    Dynamic Files .................................................................................. 32 
    4.2 
    Include Structure .............................................................................................. 33 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 34 
    4.3.1 

    Memory mapping rules ..................................................................... 34 
    4.4 
    Critical Sections ............................................................................................... 35 
    4.5 
    Buffer Configuration ......................................................................................... 35 
    4.5.1 

    Constant Block Size ......................................................................... 35 
    4.5.2 
    Zero Block Size ................................................................................ 36 
    4.5.3 
    Zero WFTmax .................................................................................. 36 
    4.5.4 
    Zero STmin ...................................................................................... 36 
    5 
    API Description ........................................................................................................... 37 
    5.1 

    Services provided by CanTp ............................................................................ 37 
    5.1.1 

    CanTp_InitMemory........................................................................... 37 
    5.1.2 
    CanTp_Init() ..................................................................................... 38 
    5.1.3 
    CanTp_Shutdown() .......................................................................... 38 
    5.1.4 
    CanTp_MainFunction() .................................................................... 39 
    5.1.5 
    CanTp_MainFunctionRx() ................................................................ 39 
    5.1.6 
    CanTp_MainFunctionTx() ................................................................ 40 
    5.1.7 
    CanTp_GetVersionInfo() .................................................................. 40 
    5.1.8 
    CanTp_Transmit() ............................................................................ 41 
    5.1.9 
    CanTp_CancelReceive() .................................................................. 42 
    5.1.10 
    CanTp_CancelTransmit() ................................................................. 43 
    5.1.11 
    CanTp_ChangeParameter() ............................................................. 44 
    5.1.12 
    CanTp_ReadParameter() ................................................................. 45 
    5.2 
    Services used by CanTp .................................................................................. 46 
    5.3 
    Callback Functions ........................................................................................... 47 
    5.3.1 

    CanTp_RxIndication() ...................................................................... 47 
    5.3.2 
    CanTp_TxConfirmation() .................................................................. 47 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.3.3 
    CanTp_StopSeparationTime() .......................................................... 48 
    5.4 
    Configurable Interfaces .................................................................................... 48 
    5.4.1 

    Appl_StartSeparationTime() ............................................................. 48 
    5.4.2 
    Notification Functions ....................................................................... 49 
    5.4.2.1 

    Appl_CanTpRxSFIndication() ........................................ 49 
    5.4.2.2 
    Appl_CanTpRxFFIndication() ......................................... 49 
    5.4.2.3 
    Appl_CanTpRxCFIndication() ........................................ 50 
    5.4.2.4 
    Appl_CanTpFrameTransmission () ................................ 50 
    5.4.2.5 
    Appl_CanTpFrameTxConfirmation () ............................. 51 
    6 
    Configuration .............................................................................................................. 52 
    6.1 

    Configuration Variants ...................................................................................... 52 
    6.2 
    Configuration of Post-Build .............................................................................. 52 
    6.3 
    Additional Configuration Hints .......................................................................... 53 
    6.3.1 

    CanIf Tx Buffering ............................................................................ 53 
    6.3.2 
    ISO Performance Requirements ...................................................... 53 
    7 
    Glossary and Abbreviations ...................................................................................... 54 
    7.1 

    Glossary .......................................................................................................... 54 
    7.2 
    Abbreviations ................................................................................................... 56 
    8 
    Contact ........................................................................................................................ 58 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 11 
    Figure 2-2 
    Interfaces to adjacent modules of the CanTp ............................................ 12 
    Figure 3-1 
    Sequence Diagram: Asynchronous Transmission ..................................... 17 
    Figure 3-2 
    Sequence Diagram: Synchronous Transmission ....................................... 17 
    Figure 3-3 
    Separation Time by Application ................................................................. 20 
    Figure 3-4 
    Channel Assignment for N-SDUs and N-PDUs ......................................... 22 
    Figure 3-5 
    CanTp internal states ................................................................................ 23 
    Figure 3-6 
    Connection Timing .................................................................................... 29 
    Figure 4-1 
    Include structure ....................................................................................... 33 
     
    Tables 
    Table 1-1  
    Component History ..................................................................................... 9 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 13 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 13 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 14 
    Table 3-4  
    PduR API changes between AR4.0.3 and 4.1.2 ........................................ 18 
    Table 3-5  
    Service IDs ............................................................................................... 24 
    Table 3-6  
    Errors reported to DET ............................................................................. 25 
    Table 3-7  
    Development Error Reporting: Assignment of checks to services ............. 27 
    Table 3-8  
    Connection Timing Parameters ................................................................. 29 
    Table 3-9  
    Examples for requested and observed separation times ........................... 31 
    Table 4-1  
    Static files ................................................................................................. 32 
    Table 4-2  
    Generated files ......................................................................................... 32 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 34 
    Table 5-1  
    CanTp_InitMemory ................................................................................... 37 
    Table 5-2  
    CanTp_Init().............................................................................................. 38 
    Table 5-3  
    CanTp_Shutdown()................................................................................... 38 
    Table 5-4  
    CanTp_MainFunction() ............................................................................. 39 
    Table 5-5  
    CanTp_MainFunctionRx() ......................................................................... 39 
    Table 5-6  
    CanTp_MainFunctionTx() ......................................................................... 40 
    Table 5-7  
    CanTp_GetVersionInfo() ........................................................................... 40 
    Table 5-8  
    CanTp_Transmit() ..................................................................................... 41 
    Table 5-9  
    CanTp_CancelReceive() .......................................................................... 42 
    Table 5-10  
    CanTp_CancelTransmit() .......................................................................... 43 
    Table 5-11  
    CanTp_ChangeParameter() ..................................................................... 44 
    Table 5-12  
    CanTp_ReadParameter() ......................................................................... 45 
    Table 5-13  
    Services used by the CanTp ..................................................................... 46 
    Table 5-14  
    CanTp_RxIndication() ............................................................................... 47 
    Table 5-15  
    CanTp_TxConfirmation() .......................................................................... 47 
    Table 5-16  
    CanTp_StopSeparationTime() .................................................................. 48 
    Table 5-17  
    Appl_StartSeparationTime()...................................................................... 48 
    Table 5-18  
    Appl_CanTpRxSFIndication() ................................................................... 49 
    Table 5-19  
    Appl_CanTpRxFFIndication() ................................................................... 49 
    Table 5-20  
    Appl_CanTpRxCFIndication() ................................................................... 50 
    Table 5-21  
    Appl_CanTpFrameTransmission () ........................................................... 50 
    Table 5-22  
    Appl_CanTpFrameTransmission () ........................................................... 51 
    Table 6-1  
    Example for typical timing parameter specification.................................... 53 
    Table 7-1  
    Glossary ................................................................................................... 56 
    Table 7-2  
    Abbreviations ............................................................................................ 57 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
    Initial implementation of CanTp according to AR4.0.3 
    1.01 
    Synchronous transmission feature removed due to PduR compatibility 
    1.02 
    Debugging Concept 
    Post-Build Loadable 
    2.00 
    Generator changed to Java7 
    2.01 
    Generator framework supports AR4.1.2 schema 
    2.02 
    Synchronous transmission re-introduced (now supported by PduR) 
    Support for AR4.1.2 PduR APIs 
    3.00 
    Post-Build Selectable 
    CAN-FD support 
    3.01 
    SafeBSW Step I 
    3.02 
    SafeBSW Step II 
    Separation Time by Application 
    4.00 
    SafeBSW Step III 
    4.01 
    SafeBSW Step IV 
    4.02 
    First SafeBSW release 
    4.03 
    Mixed11 address extension forwarding 
    Table 1-1   Component History 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CanTp as specified in [1].  
     
    Supported AUTOSAR Release: 

    Supported Configuration Variants: 
    pre-compile, post-build-loadable, post-build-selectable 
    Vendor ID: 
    CANTP_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CANTP_MODULE_ID   
    35 decimal 
    (according to ref. [1]) 
     
     
    According to AUTOSAR basic software architecture, CanTp provides services for 
    >  Segmentation of data in transmit direction 
    >  Reassembly of data in receive direction 
    >  Control of data flow 
    >  Detection of errors in segmentation sessions 
     
    AUTOSAR  module  specifications  are  based  on  existing  standards.  Thus  this AUTOSAR 
    CAN Transport Layer specification is based on the international standard ISO 15765 which 
    is the most widespread standard in the automotive domain. 
    ISO  15765  contains  four  sections  and  describes  two  applicable  CAN  Transport  Layer 
    specifications: ISO 15765-2 for OEM enhanced diagnostics (see [4]) and ISO 15765-4 for 
    OBD diagnostics. Concerning the transport layer, ISO 15765-4 (the section of ISO 15765 
    which  also  covers  the  data  link  layer  and  the  physical  layer)  is  in  accordance  with  ISO 
    15765-2 with some restrictions/additions. In order that there is no incompatibility problem 
    between ISO 15765-2 and ISO 15765-4, differences will be solved by the CAN Transport 
    Layer configuration. 
    Although the CAN transport protocol is mainly used for vehicle diagnostic systems, its 
    design also incorporates requirements from other CAN based systems employing 
    transport layer protocols. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    10 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    2.1 
    Architecture Overview 
    The following figure shows where the CanTp is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    11 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    The next figure shows the interfaces to adjacent modules of the CanTp. These interfaces 
    are described in chapter 5.  
     cmp Interfaces Ov erv iew
    SchM
    PduR
    n
    n
    n
    ta
    tio
    ta
    tio
    tio
    a
    p
    p
    p
    a
    a
    Dcm
    T
    T
    ica
    ce
    xD
    xD
    n
    n
    d
    a
    a
    firm
    e
    n
    yT
    n
    yR
    C
    C
    fR
    p
    xI
    o
    p
    o
    o
    r
    r_
    t_
    R
    C
    xi
    p
    xC
    rtO
    C
    te
    te
    p
    r
    p
    it
    E
    T
    T
    n
    ta
    e
    T
    T
    te
    _
    n
    p
    E
    S
    n
    m
    n
    e
    sm
    ive
    a
    T
    n
    _
    M
    p
    a
    a
    ra
    n
    C
    n
    io
    T
    m
    M
    C
    C
    a
    ce
    ch
    _
    a
    n
    _
    ra
    ra
    e
    ct
    S
    R
    C
    _
    ch
    a
    it
    P
    R
    a
    lT
    R
    e
    lR
    u
    _
    te
    S
    C
    u
    P
    u
    g
    e
    d
    R
    _
    d
    sm
    d
    ce
    d
    n
    ce
    P
    u
    D
    R
    n
    P
    a
    n
    P
    a
    n
    d
    st
    u
    e
    a
    ra
    h
    a
    P
    e
    d
    T
    R
    C
    C
    C
    u
    P
    _
    _
    _
    _
    _
    q
    p
    p
    p
    p
    p
    e
    T
    T
    T
    T
    T
    n
    n
    n
    R
    n
    n
    a
    a
    a
    n
    a
    a
    C
    C
    C
    C
    C
    O
    _
    cm
    D
    CanTp
    CanTp_Init / CanTp_Shutdown
    CanTp_GetVersionInfo
    CanTp_MainFunction
    r
    n
    n
    rro
    tio
    tio
    rtE
    a
    o
    p
    ica
    e
    d
    firm
    it
    n
    n
    R
    xI
    o
    sm
    t_
    n
    e
    R
    _
    xC
    D
    ra
    p
    T
    it
    T
    _
    lT
    n
    p
    sm
    ce
    a
    T
    n
    n
    n
    C
    a
    a
    ra
    EcuM
    C
    C
    T
    Det
    If_
    If_
    n
    n
    a
    a
    C
    C
    CanIf
     
    Figure 2-2  Interfaces to adjacent modules of the CanTp 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    12 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CanTp. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 

    Table 3-1   Supported AUTOSAR standard conform features 

    Table 3-2   Not supported AUTOSAR standard conform features 
    Vector  Informatik  provides  further  CanTp  functionality  beyond  the  AUTOSAR  standard. 
    The corresponding features are listed in the table 

    Table 3-3   Features provided beyond the AUTOSAR standard 
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Segmented and unsegmented data transmission 
    Segmented and unsegmented data reception 
    Control of data flow 
    Supervision of timeouts 
    Detection of errors during segemented communication 
    Transmission cancellation 
    Reception cancellation 
    Post-Build Loadable 
    MICROSAR Identity Manager using Post-Build Selectable 

    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations 
    The following features specified in [1] are not or only partly supported: 
    Category 
    Description 
    ASR 
    Version 

    Functional  8.3.4  CanTp_Transmit: For robustness reasons (e.g. in case of delayed 
    4.0.3 
    buffer provision), the CanTp internally stores the frames to be transmitted. 
    API 
    8.3.2    CanTp_ GetVersionInfo: The function  is  always  implemented  as  a  4.0.3 
    regular function. 
    Table 3-2   Not supported AUTOSAR standard conform features 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    13 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Split MainFunction 
    Notification of Failed Buffer Request  
    Handling of FC Frames with a Reserved STmin 
    Dynamic Channel Assignment 
    Single Buffer Optimization  
    Transmit Queue 
    Synchronous Transmission 
    CAN-FD Support 
    Separation Time by Application 
    Mixed11 address extension forwarding 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.1.2.1 
    Split CanTp_MainFunction 
    In extension to the CanTp SWS [1] the Vector CanTp supports two additional API functions 
    (CanTp_MainFunctionRx and CanTp_MainFunctionTx) in case a split main function 
    is  configured.  These  additional  functions  can  be  used  instead  of  the  original AUTOSAR 
    CanTp_MainFunction API (which is still supported) to optimize the calling sequence of 
    incoming requests and their responses. 
    Configuration attribute: CanTpEnableSplitMainFunction 
     
     
    3.1.2.2 
    Notification of Failed Buffer Request 
    If  the  call  to  CanTpStartOfReception  returns  BUFREQ_E_NOT_OK  or 
    BUFREQ_E_OVFL,  according  to  AUTOSAR  the  connection  shall  be  terminated. 
    Additionally each terminated reception shall be notified to the upper layer. However, in the 
    mentioned  case  the  upper  layer  already  rejected  the  reception  by  returning  an  invalid 
    buffer status. Therefore no additional notification by the CanTp may be required. 
    In  the  Vector  CanTp,  this  behavior  is  configurable.  If  the  related  switch  is  activated,  the 
    notification  is  only  performed  if  at  least  one  valid  buffer  (BUFREQ_OK  or 
    BUFREQ_E_BUSY) have been provided. 
    Configuration attribute: CanTpOnlyNotifyInformedAppl 
     
     
    3.1.2.3 
    Handling of FC Frames with a Reserved STmin 
    When  using  the  standard  implementation  according  to  ISO  157675-2,  the  CanTp  must 
    accept  reserved  STmin  values  (0x80  ...  0xF0,  0xFA  ...  0xFF);  the  connection  is  then 
    processed with the slowest value for STmin (127msec). 
    In the CanTp, it can be configured to cancel the transmission instead. 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    14 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    Configuration attribute:  CanTpRejectFcWithReservedStMin 
     
    3.1.2.4 
    Dynamic and Static BlockSize and STmin 
    In AUTOSAR 4 and in older ISO specifications, the block size and the STmin values of the 
    first Flow Control shall be used throughout the whole connection (CANTP067). 
    ISO 15765-2:20215 ([4]) supports both dynamic and static flow control parameters. In the 
    CanTp, the desired behavior can be configured as follows: 
    >  For Rx connections, the block size can be configured to be constant until the end of 
    the reception. It is then calculated once after receiving the FF, based on the configured 
    maximum block size and the available buffer (default). When using the alternative 
    behavior, the block size is re-calculated whenever a Flow Control have to be 
    transmitted. For STmin, always the configured value is used. 
    Configuration attribute: CanTpEnableConstantBS 
    >  For Tx connections it can be configured if the CanTp shall either evaluate only the first 
    or all Flow Control frames. 
    Configuration attribute: CanTpUseOnlyFirstFc 
     
    3.1.2.5 
    Dynamic Channel Assignment 
    According  to  AUTOSAR,  each  N-SDU  shall  be  assigned  statically  to  one  connection 
    channel.  Since not  always  all  N-SDUs  need  to be processed  simultaneously,  the  CanTp 
    provides the possibility to limit the number of channels that can be used in parallel. In this 
    case,  N-SDUs  are  dynamically  assigned  to  a  channel  during  runtime.  If  no  channel  is 
    available, the reception / transmission is rejected. 
    This  reduces  resource  consumption,  as  the  memory  needed  to  handle  reception  or 
    transmission  is  shared  between  multiple  N-SDUs.  However,  it  adds  a  little  runtime 
    overhead for channel management. 
    Configuration attribute: CanTpDynamicChannelAssignment 
     
    3.1.2.6 
    Single Buffer Optimization 
    According  to  AUTOSAR,  the  CanTp  must  include  a  handling  for  segmented  receive 
    buffers,  i.e.  it  is  allowed  that  CanTpStartOfReception  returns  a  smaller  buffer  than 
    overall data length specified in the first frame. The  CanTp will then request an additional 
    buffer during reception. 
    For  diagnostic  applications,  often  only  one  buffer  is  provided  at  the  beginning  where  its 
    size  is  sufficient  to  store  the  complete  message.  Therefore  no  additional  buffer  must  be 
    requested by the CanTp. 
    If  it  can  be  ensured  that  always  only  one  single  buffer  is  used,  the  CanTp  provides  a 
    configuration switch to remove the code to handle segmented buffers. This will reduce size 
    and runtime. 
    Configuration attributes:  CanTpOptimizeSingleRxBuffer  
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    15 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    3.1.2.7 
    Transmit Queue 
    If an N-PDU is used by different connections and more than one connection requests the 
    CanIf to transmit this N-PDU at the same time, the subsequent TxConfirmation cannot be 
    uniquely assigned to the correct connection. 
    There may be two reasons why an N-PDU is used by different connections: 
    >  A channel is configured as full duplex: the conflict occurs here if the Rx connection 
    tries to transmit an FC while the Tx connection is transmitting SF, FF or CFs. 
    >  extended or mixed11 addressing is used: then one N-PDU can be used by multiple 
    channels, as the addressing information is part of the protocol data. However, this 
    protocol data is not available when the TxConfirmation is processed. 
    Currently AUTOSAR does not describe how to handle these cases. By default the CanTp 
    tracks for each N-PDU if a transmission is in progress or not. If a channel tries to transmit 
    an  N-PDU  that  is  in  use  by  another  N-SDU,  the  request  is  rejected  and  the  respective 
    channel will retry transmission on task level. 
    However,  the  more  often  such  conflicts  occur  (e.g.  if  many  N-SDUs  with  extended 
    addressing  use  the  same  N-PDU),  the  higher  is  the  risk  of  sporadically  unexpected 
    behavior  like  connection  timeouts  due  to  the  delay  caused  by  the  retry  on  task  level. To 
    eliminate  this  risk  and  to  optimize  the  throughput  performance,  the  CanTp  can  be 
    configured  to  queue  the  transmit  requests  to  the  CanIf.  Entries  in  the  queue  are 
    transmitted as soon as the transmission of the previous N-PDU is completed. 
    The main drawback of this feature is increased memory consumption. 
    Configuration attributes: CanTpEnableTransmitQueue 
     
     
     
    Note 
    The default transmit queue size is 4. To set a different queue size, the following line 
      must be added to a user config file: 
    #define CANTP_TX_QUEUE_SIZE <new size> 
    Please note that due to implementation reasons, only queue sizes with a power of two 
    are allowed (2, 4, 8, 16…). 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    16 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.1.2.8 
    Asynchronous and Synchronous behavior of CanTp_Transmit 
    By default, the API CanTp_Transmit is asynchronous. This means it only prepares the 
    connection, while the request for the payload data to the upper layer and the transmission 
    of the first CAN frame will be done during the next task cycle. 
    CanIf
    CanTp
    PduR
    CanTp_Transmit()
    PduR_CanTpCopyTxData()
    CanIf_Transmit()
     
    Figure 3-1  Sequence Diagram: Asynchronous Transmission 
    The CanTp can be configured to make CanTp_Transmit synchronous. Then the payload 
    request to the upper layer and the transmit request to the CanIf are done in the context of 
    CanTp_Transmit. This will slightly improve transmission speed, but requires also that the 
    upper layer is able to handle calls to the CopyTxData function before CanTp_Transmit 
    returns. 
    CanIf
    CanTp
    PduR
    CanTp_Transmit()
    PduR_CanTpCopyTxData()
    CanIf_Transmit()
     
    Figure 3-2  Sequence Diagram: Synchronous Transmission 
    Configuration attributes: CanTpEnableSynchronousTransmit 
     
    3.1.2.9 
    Support of PduR Interface according to AUTOSAR 4.1.2 
    Although the CanTp is not yet fully compliant with AUTOSAR 4.1.2, it already supports the 
    PduR API signatures according to the updated revision. 
    The following changes have been made by AUTOSAR in the interface between CanTp 
    and PduR: 
    >  PduR_CanTpStartOfReception: pointer to PduInfoType as additional parameter 
    added for meta data support (currently not supported by CanTp; will be set to NULL) 
    >  PduR_CanTpRxIndication, PduR_CanTpTxConfirmation: type of the Result 
    parameter changed from NotifResultType to Std_ReturnType 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    17 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    PduR API Changes 
    AUTOSAR 4.0.3 
    BufReq_ReturnType PduR_CanTpStartOfReception( PduIdType id,  
                                                  PduLengthType TpSduLength, 
                                                  PduLengthType* bufferSizePtr ); 
    void PduR_CanTpRxIndication( PduIdType CanTpRxPduId,  
                                 NotifResultType Result ); 
    void PduR_CanTpTxConfirmation( PduIdType CanTpTxPduId,  
                                   NotifResultType Result ); 
    AUTOSAR 4.1.2 
    BufReq_ReturnType PduR_CanTpStartOfReception( PduIdType id,  
                                                  PduInfoType * PduInfoPtr, 
                                                  PduLengthType TpSduLength, 
                                                  PduLengthType* bufferSizePtr ); 
    void PduR_CanTpRxIndication( PduIdType CanTpRxPduId,  
                                 Std_ReturnType Result ); 
    void PduR_CanTpTxConfirmation(PduIdType CanTpTxPduId,  
                                  Std_ReturnType Result ); 
    Table 3-4   PduR API changes between AR4.0.3 and 4.1.2 
    With a Vector PduR, the DaVinci Configurator Pro 5 will automatically detect the PduR 
    version and activate the appropriate API signature. 
    With a Non-Vector PduR in the stack, the AUTOSAR version must be set by providing one 
    of the following definitions (e.g. via compiler config): 
    AUTOSAR 4.0.3: #define MSR_PDUR_API_AR_VERSION    0x403 
    AUTOSAR 4.1.2: #define MSR_PDUR_API_AR_VERSION    0x412 
     
    3.1.2.10  CAN-FD Support 
    The CanTp supports the ISO 15765-2:2015, which not only introduces CAN-FD frames 
    with more than 8 byte payload, but also supports segmented transfers with more than 
    4095 byte. 
     
    3.1.2.10.1  CAN Messages with more than 8 Byte 
    CAN-FD  frames  support  a  higher  bit  rate  in  the  data field  of a  CAN  frame,  as  well  as  a 
    maximum length of up to 64 byte per frame. For the CanTp behavior, only the data length 
    is  relevant,  CAN-FD  frames  with  only  8  byte  are  treated  the  same  way  as  classic  CAN 
    frames.  
    The maximum possible  CAN DLC is  configured by  the PduLength parameter of  a global 
    PDU in the ECUC: 
     
    /EcuC/EcucPduCollection/Pdu/PduLength 
    To use CAN-FD for an N-SDU, all of the following configuration settings are required: 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    18 
    based on template version 5.7.1 




    Technical Reference MICROSAR CAN Transport Layer 
    >  CanTpRxNPduRef / CanTpTxNPduRef must reference a global PDU with a 
    PduLength > 8 
    >  CanTpRxTaType / CanTpTxTaType must be set to CANTP_CANFD_FUNCTIONAL or 
    CANTP_CANFD_PHYSICAL 
    >  The global switch CanTpFlexibleDataRateSupport must be enabled 
    The  flow  control  N-PDU  references  are  not  taken  into  account,  as  these  frames  always 
    need less than 8 byte. It does not affect the CanTp behavior whether if they are configured 
    in the CanIf as CAN-FD or as classic CAN. 
     
     
    Reference
     
    For restrictions of the N-PDU usage on a channel, please also refer to chapter 3.2.2. 
     
     
     
    3.1.2.10.2  CAN-FD Frame Padding 
    With CAN-FD, not all DLCs between 8 and 64 are valid. A  CanTp frame must always be 
    padded to the next valid DLC. The byte value which is used to fill up the frame is either 
    random or user defined, depending on the following configuration parameters: 
     
    CanTp/CanTpGeneral/CanTpHavePaddingByte 
     
    CanTp/CanTpGeneral/CanTpPaddingByte 
    The PaddingActivation setting, which can be configured globally and N-SDU specific, only 
    applies for frames which require a DLC less than 8 byte. 
     
     
     
    Example 

      
    If a CanTp CAN-FD frame (PCI + payload) needs 6 byte, it is padded to 8 byte if 
    padding is active, but left at 6 byte if padding is disabled. 
    >  If a CanTp CAN-FD frame (PCI + payload) needs 21 byte, it is always extended to 
    24 byte, which is the next valid CAN-FD length 
     
     
     
    3.1.2.10.3  Segmented Messages with more than 4095 Byte 
    ISO15765-2:2015  also  introduced  an  extended  first  frame  definition  (in  the  following 
    referred  to  as  “long  first  frame”; LFF),  which  uses  a  data  length of  32  bit.  For  backward 
    compatibility,  LFFs  are  only  used  if  the  overall  message  length  is  above  4095  byte. 
    Otherwise, the standard first frame format with 12 bit data length is used. 
    As the LFF does not depend on the length of the used N-PDUs, it can also be used with 
    classic  CAN  frames.  However,  for  ISO  compatibility  it  is  recommended  to  enable  this 
    functionality when using CAN-FD. 
    Configuration attribute: CanTpSupportLongFirstFrames 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    19 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
     
     
    Caution 
    In the ECUC module, the type of the global PduLength can be configured: 
        /EcuC/EcucPduCollection/PduLengthTypeEnum 
    To use the full 32 bit data length of the LFF, it must be set to UINT32. 
    If set to UINT16, the maximum data length will be limited to 65535 byte and the CanTp 
    will reject received LFFs with a longer data length.  
    For transmission requests, an overrun can’t be detected by the CanTp as the compiler 
    will already truncate the data length passed to CanTp_Transmit. 
     
     
     
    3.1.2.11  Separation Time by Application 
    The accuracy of the STmin calculated by  the CanTp depends on its task cycle. If STmin 
    values are required which are in the range or below the CanTp task cycle time, this may 
    not be acceptable. 
    One solution may be to reduce the task cycle time. However, this is usually not  satisfying 
    since it produces too high CPU load. An external timer (like in the OS or in hardware) can 
    be an alternative. 
    For this, the CanTp provides an optional call-out which notifies the application whenever 
    STmin need to be started.  By the return value of the notification function, the application 
    can indicate whether to do STmin handling by itself, or leave it to the CanTp. 
    If the application  accepts  to handle  the separation time,  it has to set  up a timer and call 
    CanTp_StopSeparationTime()  when  the  timer  expired.  This  will  trigger  the 
    transmission of the next CF. 
    It  is  allowed  to  call  CanTp_StopSeparationTime()  anytime  between  the  call  to 
    Appl_StartSeparationTime() and before the end of the configured N_Cs time. Only 
    if N_Cs expires and the call-back has not been called yet, the CanTp will send the next CF 
    by  itself  to  fulfill  the  ISO15765-2  performance  requirement  (see  3.9.2.2).  Calling 
    CanTp_StopSeparationTime() afterwards has no effect. 
     
    Figure 3-3  Separation Time by Application 
    To activate the feature, the call-out function name must be specified in the config tool: 
     
    CanTp/CanTpGeneral/CanTpApplSTminStartFunction 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    20 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    3.1.2.12  Mixed11 address extension forwarding 
    If  this  feature  is  enabled,  the  address  extension  (N_AE)  of  each  first  frame  and  single 
    frame received by the CanTp is forwarded to the Dcm. The forwarding is done using the 
    call-out function 
    Dcm_OnRequestDetection(PduIdType CanTpRxPduId, uint8 N_AE) 
    where  CanTpRxPduId  is  the  Id  of  the  received  Rx  N-PDU  and  N_AE  is  the  address 
    extension.  The  prototype  of  this  function  is  expected  to  be  provided  in  the  Dcm_Cbk.h 
    header file. 
    Configuration attribute: CanTpEnableDcmRequestDetect 
     
     
    Note 
    The forwarding is done for all the first frames and single frames configured with 
      mixed11 addressing. Even the N_AE of frames discarded by the CanTp (because of an 
    unrecognized N_AE) will be forwarded. 
     
     
    3.2 
    Limitations 
    3.2.1 
    Memory Optimization 
    Memory optimization by the linker via data scattering: 
    Some  linkers  allow  filling  the  “holes”  caused  by  padding  with  some  “foreign”  data.  Since 
    the  generation  tool  cannot  be  aware  of  “foreign”  data,  such  optimizations  must  be 
    disabled. 
     
    3.2.2 
    Channel Assignment 
    In the Vector CanTp, a channel always consists of at most one Rx N-SDU and one Tx N-
    SDU.  Furthermore,  to  each  channel  at  most  one  Rx  N-PDU  and  one  Tx  N-PDU  is 
    assigned. These N-PDUs are shared between the two N-SDUs as shown in Figure 3-4. 
    As  with  CAN-FD  an  N-PDU  can  either  be  CAN2.0  or  CAN-FD  but  not  both,  this  implies 
    that  you  have  to  use  a  CAN-FD  Flow  Control  if  the  SFs  /  FFs  /  CFs  of  the  opposite 
    direction use CAN-FD. Otherwise  you will need separate channels for the Rx and Tx N-
    SDUs. 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    21 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
     
    Figure 3-4  Channel Assignment for N-SDUs and N-PDUs 
    While each N-SDU represents a CanTp connection, the N-PDUs identify the CAN frames 
    that are transmitted and received via the CanIf.  
    With  Standard  addressing,  each  N-PDU  can  only  be  assigned  to  one  channel.  With 
    extended and mixed11 addressing, an N-PDU may be used on multiple channels, but only 
    with different address information (N_TA / N_AE). 
    3.2.3 
    Channel Addressing 
    Usage of different addressing within the same channel is not allowed. 
    The addressing format – CANTP_STANDARD, CANTP_EXTENDED or CANTP_MIXED11 
    – must be identical for each pair of Rx/Tx N-SDUs assigned to the same channel. 
     
    3.2.4 
    Data Length Parameter 
    According  to  the  AUTOSAR  BSWMD  specification,  each  N-SDU  has  a  Data  Length 
    parameter (CanTpRxDl, CanTpTxDl). However, it is not clearly specified if this data length 
    applies  to  the  N-SDU  (complete  message  length)  or  to  the  N-PDU  (CAN  message  data 
    length).  As  furthermore  the  parameters  are  anyway  deprecated  in  AR  4.1.1  (see  also 
    AUTOSAR RFC 53101), they are no longer evaluated by the CanTp.  
    For compatibility reasons, the parameters are part of the ECUC file, but their values have 
    no effect. 
    3.3 
    Initialization 
    The API  function  CanTp_Init()  uses  the  given  configuration  set  to  initialize  all  global 
    variables of the CAN Transport Layer and brings it to the state Idle, where reception and 
    transmission tasks can be started. 
    3.4 
    States 
    The CanTp module has two internal states, CANTP_OFF and CANTP_ON. After power up, 
    the  CanTp  is  in  the  CANTP_OFF  state.  In  this  state  no  communication  tasks  can  be 
    performed. 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    22 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    The  CanTp  changes  to  the  internal  state  CANTP_ON  when  it  has  been  successfully 
    initialized. Segmentation and reassembly tasks are only performed when the module is in 
    this  state.  After  initialization,  all  transport  protocol  connections  are  in  a  sub-state  of 
    CANTP_ON,  in  which  neither  transmission  nor  reception  is  in  progress  (CANTP_RX_IDLE 
    and CANTP_TX_IDLE). 
    If  called  when  the  CanTp  module  is  in  the  global  state  CANTP_ON,  the  function 
    CanTp_Init returns the module to state Idle and all current connections are terminated. 
    The  function  CanTp_Shutdown  stops  the  CanTp  module  properly  and  sets  the  global 
    state to CANTP_OFF. 
    stm CanTp
    CANTP_OFF
    PowerUp
    PowerDown
    PowerDown
    CanTp_Init
    CanTp_Shutdown
    CANTP_ON
    [Rx Connection Channel]
    CANTP_RX_IDLE
    CANTP_RX_PROCESSING
    [Receive NPdu]
    [Reception finished]
    Init
    [Tx Connection Channel]
    CANTP_TX_IDLE
    CANTP_TX_PROCESSING
    [Transmit NSdu]
    [Transmission finished]
    Init
     
    Figure 3-5  CanTp internal states 
    3.5 
    Main Functions 
    The  CanTp_MainFunction  controls  the  timing  behavior  of  the  CanTp  and  performs  all 
    tasks that have to be done cyclically. 
    Especially for the calculation of the different timings (delays, timeouts) it is important to call 
    the  main  function  periodically  with  the  time  interval  that  have  been  configured  with  the 
    ‘CanTpMainFunctionPeriod’ parameter in the generation tool. 
    It  is  also  possible  to  separate  the  main  function  into  Rx  and  Tx,  e.g.  to  optimize  the 
    throughput (see chapter 3.1.2.1 for details). 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    23 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
     
    3.6 
    Error Handling 
    3.6.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [5],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter CANTP_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported CanTp ID is 35. 
    The reported service IDs identifies the services which are described in 5.1. The following 
    table presents the service IDs and the related services. Services marked with an asterisk 
    (*) are internal service IDs: 
    Service ID 
    Service 
    0x01 
    CanTp_Init 
    0x02 
    CanTp_Shutdown 
    0x03 
    CanTp_Transmit 
    0x04 
    CanTp_RxIndication 
    0x05 
    CanTp_TxConfirmation 
    0x06 
    CanTp_MainFunction 
    0x07 
    CanTp_GetVersionInfo 
    0x08 
    CanTp_CancelTransmit 
    0x09 
    CanTp_CancelReceive 
    0x0A 
    CanTp_ChangeParameter 
    0x0B 
    CanTp_ReadParameter 
    0x20* 
    CanTp_MainFunctionRx 
    0x21* 
    CanTp_MainFunctionTx 
    0x30* 
    CanTp_RxGetBuffer 
    0x31* 
    CanTp_TxGetBuffer 
    0x32* 
    CanTp_RxTransmitFrame 
    0x33* 
    CanTp_TxTransmitFrame 
    0x34* 
    CanTp_RxInit 
    0x35* 
    CanTp_TxInit 
    0x36* 
    CanTp_StopSeparationTimer 
    Table 3-5   Service IDs 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    24 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    The  errors  reported  to  DET  are  described  in  the  following  table.  Errors  marked  with  an 
    asterisk (*) are Vector specific: 
    Error Code 
    Description 
    0x01  CANTP_E_PARAM_CONFIG  
    API called with wrong parameters 
    0x02  CANTP_E_PARAM_ID  
    API called with wrong parameters 
    0x03  CANTP_E_PARAM_POINTER 
    API called with wrong parameters 
    0x20  CANTP_E_UNINIT 
    API service used without module initialization 
    0x30  CANTP_E_INVALID_TX_ID  
    Invalid Transmit N-PDU identifier 
    0x40  CANTP_E_INVALID_RX_ID  
    Invalid Receive N-PDU identifier 
    0x50  CANTP_E_INVALID_TX_BUFFER  
    Invalid Transmit buffer provided 
    0x60  CANTP_E_INVALID_RX_BUFFER  
    Invalid Receive buffer provided 
    0x70  CANTP_E_INVALID_TX_LENGTH  
    Invalid data length of the transmit N-PDU 
    0x80  CANTP_E_INVALID_RX_LENGTH  
    Invalid data length of the receive N-PDU 
    0x90  CANTP_E_INVALID_TA_TYPE 
    Functional FF received, or transmission request for 
    a functional N-SDU with SF data length 
    0xA0  CANTP_E_OPER_NOT_SUPPORTED  Requested operation is currently not available (e.g. 
    cancel a transmission that is not in progress) 
    0xB0  CANTP_E_COM  
    Implementation specific error 
    0xB1  CANTP_E_INVALID_RX_STATE* 
    Rx state machine is in an invalid state 
    0xB2  CANTP_E_INVALID_TX_STATE* 
    Tx state machine is in an invalid state 
    0xB3  CANTP_E_INVALID_FRAME_TYPE* 
    An invalid frame type occurred 
    0xC0  CANTP_E_RX_COM 
    General reception error 
    0xC1  CANTP_E_RX_TIMEOUT_AR* 
    N_Ar timeout occurred 
    0xC2  CANTP_E_RX_TIMEOUT_BR* 
    N_Br timeout occurred 
    0xC3  CANTP_E_RX_TIMEOUT_CR* 
    N_Cr timeout occurred 
    0xC4  CANTP_E_RX_INVALID_SN* 
    CF with invalid sequence number received 
    0xC5  CANTP_E_RX_WFTMAX* 
    Max. number of wait frames transmitted 
    0xC6  CANTP_E_RX_RESTART* 
    Connection terminate due to new SF/FF reception 
    0xC7  CANTP_E_RX_TRANSMIT_ERROR* 
    Transmission of a flow control frame failed 
    0xD0  CANTP_E_TX_COM 
    General transmission error 
    0xD1  CANTP_E_TX_TIMEOUT_AS* 
    N_As timeout occurred 
    0xD2  CANTP_E_TX_TIMEOUT_BS* 
    N_Bs timeout occurred 
    0xD3  CANTP_E_TX_TIMEOUT_CS* 
    N_Cs timeout occurred 
    0xD4  CANTP_E_TX_FC_OVFL* 
    FC.OVFL received 
    0xD5  CANTP_E_TX_INVALID_FS* 
    FC with invalid flow status received 
    0xD6  CANTP_E_TX_RES_STMIN* 
    FC with reserved STmin received, but not allowed 
    0xD7  CANTP_E_TX_TRANSMIT_ERROR* 
    Transmission of a frame failed 
    Table 3-6   Errors reported to DET 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    25 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
     
     
     
    FAQ: How to avoid DET errors for failed CanTp communication? 

      AUTOSAR specifies that the CanTp shall not only report a DET for typical integration 
    errors, but also for communication errors like timeouts. Although sometimes helpful, in 
    most cases this is not desired. 
    To suppress reporting a DET error for all erroneously terminated connections, filters 
    with the following parameters have to be configured in the DET module: 
    >  moduleId   = 0x23 
    >  instanceId  = 0x00   
    >  apiId       = 0x34 and 0x35 
    >  errorId     = 0xFF  
    Please note that the filtering mechanism is a Vector specific feature, which is described 
    in more detail in the Vector DET Technical Reference. 
    When using other DET implementations, these errors can be filtered in a DET callout 
    which abandons further DET processing and continues the CanTp code. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    26 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.6.1.1 
    Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters. The checks in 
    Table  3-7  are  internal  parameter  checks  of  the  API  functions.  These  checks  are  for 
    development  error  reporting  and  can  be  en-/disabled  via  the  configuration  parameter 
    CanTp_DEV_ERROR_DETECT. 
    The  following  table  shows  the  parameter  checks  performed  by  the  CanTp  services.  For 
    parameter checks marked with an asterisk (*), only the error reporting can be deactivated. 
    The check will also be performed if development error reporting is disabled. 
    Check 
    tr 
     
    d I
    d I
    d I

    uP
    I
    d
     
     
    du
    du
    S
    du
    P
    S
    P
    du
    nfoI
     
    P
    Rx
    p
    T
    oni
    Service
    fTx

     
     
     
    alv
    ers
    CanTpRx
    CanTpTx
    CanTpRx
    CanI
    pCan
    pDat
    Pid
    P
    pV
    CanTp_RxIndication 
     
     
     
     
     
     
     
     
     
    CanTp_CancelReceive 
    * 
     
     
     
     
     
     
     
     
    CanTp_ChangeParameter 
    * 
     
     
     
     
     
    * 
    * 
     
    CanTp_ReadParameter 
    * 
     
     
     
     
     
    * 
    * 
     
    CanTp_Transmit 
     
    * 
     
     
     
     
     
     
     
    CanTp_CancelTransmit 
     
    * 
     
     
     
     
     
     
     
    CanTp_TxConfirmation 
     
     
     
     
     
     
     
     
     
    CanTp_GetVersionInfo 
     
     
     
     
     
     
     
     
     
    CanTp_StopSeparationTime 
     
    * 
     
     
     
     
     
     
     
    Table 3-7   Development Error Reporting: Assignment of checks to services 
     
    3.6.2 
    Production Code Error Reporting 
    In AR4, the CanTp reports no production errors to the Diagnostic Event Manager. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    27 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.7 
    Channel Mode 
    In the configuration tool, two connections can be grouped to one logical channel (see also 
    3.2.2).  
    For each of these logical channels it can be configured if the channel is half or full duplex. 
    >  Half Duplex: only the Rx or the Tx N-SDU of a channel can be active at a time. A 
    connection which is started while the opposite direction is being processed will be 
    rejected. 
    >  Full Duplex:  bidirectional communication is possible at any time. 
    When only one N-SDU is configured for a channel, the channel mode parameter has no 
    effect. 
     
    3.8 
    Connection Channels 
    A  connection  channel  represents  an  internal  path  for  transmission  or  reception  of  an  N-
    SDU  during  runtime.  It  uses  its  own  resources  such  as  internal  buffer,  timer  or  state 
    machine.  Therefore,  each  connection  channel  is  independent  from  the  others.  The 
    connection channels are only for CanTp internal use and not accessible externally.  
    By default, each N-SDU is statically linked to one connection channel (exception: dynamic 
    channel assignment is used; see 3.1.2.5)
     
    The  CanTp  is  able  to  manage  several  connections  for  different  N-SDUs  simultaneously. 
    However it is not possible to handle two receptions or two transmissions with the same N-
    SDU identifier in parallel. 
    If a new FF / SF is received for an already active N-SDU, the connection is terminated and 
    restarted. 
    If a new transmission request is started for an already active N-SDU, the request is 
    rejected. If it is required to start a new transmission before the previous one is finished, the 
    active connection must first be terminated by using the transmit cancellation function (see 
    5.1.10 CanTp_CancelTransmit())
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    28 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    3.9 
    Connection Timings 
    3.9.1 
    Timing Parameters 
    The ISO specifies several protocol timing parameters for receiver and transmitter side. The 
    following figure shall give an overview which timeouts exist and when they are applied. 
     
    Figure 3-6  Connection Timing 
    Timeout 
    Description 
    Transmission 
    N_As 
    Timeout when waiting for the TxConfirmation of a transmitted SF, FF, or CF 
    N_Bs 
    Timeout when waiting for a Flow Control 
    N_Cs 
    Time until next CF has to be transmitted, or timeout when waiting a buffer 
    Reception 
    N_Ar 
    Timeout when waiting for the TxConfirmation of a transmitted FC 
    N_Br 
    Time before the transmission of the next FC (see 3.9.2.3)  
    or Timeout when waiting after SF reception for a buffer 
    N_Cr 
    Timeout when waiting for next CF 
    Table 3-8   Connection Timing Parameters 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    29 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    3.9.2 
    Timing Considerations and Jitter 
    3.9.2.1 
    Jitter 
    The  time  base  for  all  timeout  parameters  is  the  main  function  period  of  the  CanTp. 
    Because the starting point of each timeout  may be located  sometime  between two main 
    function calls, a jitter of up to one task cycle can occur and must be taken into account. 
    The CanTp tries to compensate this by adding one task cycle to the configured timings, so 
    the observed timings can be longer, but will never be shorter than configured.  
     
    3.9.2.2 
    Separation Time 
    ISO  15765-2  specifies  two  timing  parameters  which  determine  the  time  between  the 
    transmissions of two consecutive frames.  
    STmin is the minimum separation time, which is provided by the receiver. If the transmitter 
    sends  the  CFs  faster  than  requested,  there  is  no  guarantee  that  the  receiver  of  the 
    segmented  data  transmission  will  correctly  receive  and  process  all  frames.  Another 
    purpose of STmin is to reduce the bus load produced by CanTp communication. 
    N_Cs is the maximum separation time, after which the transmission of the next CF has to 
    be started. If the delay is longer than N_Cs, the receiver side may detect an N_Cr timeout. 
     
     
    Caution 
    In case of a conflict between the configured N_Cs and the requested STmin (N_Cs < 
      STmin), the CanTp will transmit the next CF after the end of N_Cs and therefore violate 
    STmin. 
     
     
     
    Basically, for STmin the same provisions regarding jitter are made as for all other timings 
    (see 3.9.2.1). However, some STmin specific characteristics apply here: 
    >  in burst mode (STmin = 0) the CFs are sent as fast as possible, i.e. from the context of 
    the TxConfirmaton of the previous CF. The observed separation time then only 
    depends on the bus load. 
    >  when a microsecond STmin is requested (0xF1…0xF9) the CF is always sent on the 
    next task. No additional task cycle is added. Therefore if the bus load is very high and 
    the TxConfirmation is delayed too long, the observed separation time might 
    sporadically be above the given value. 
    >  when STmin supervision is done not internally but by the application (see 3.1.2.11), 
    the CanTp only transmits the CF by itself in case N_Cs expires. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    30 
    based on template version 5.7.1 




    Technical Reference MICROSAR CAN Transport Layer 
     
     
    FAQ: Why is the observed STmin so much longer than the requested STmin? 

      Because of the jitter, the CanTp always adds one task cycle to the requested STmin in 
    order to guarantee that the time between two CFs is never below STmin. When the 
    task cycle time is higher than STmin, this may lead to unexpected high separation 
    times (see Table 3-9). 
     
     
     
    Requested STmin  Observed ST (5ms cyle time) 
    Observed ST (10ms cyle time) 
    0ms (burst) 
    as fast as possible  
    as fast as possible 
    100µs 
    < 5ms 
    < 10ms 
    1ms 
    5…10ms 
    10…20ms 
    5ms 
    5…10ms 
    10…20ms 
    6ms 
    10…15ms 
    10…20ms 
    10ms 
    10…15ms 
    10…20ms 
    11ms 
    15…20ms 
    20…30ms 
    Table 3-9   Examples for requested and observed separation times 
    3.9.2.3 
    Implementation of N_Br 
    The ISO 157675-2 defines the parameter N_Br as follows:  
    N_Br: Time until transmission of the next Flow Control N_PDU 
    Since N_Br is only a performance parameter and no timeout that must be applied in case 
    of erroneous behavior, it can be seen as the maximum time after which a Flow Control has 
    to  be  transmitted.  Considering  this,  the  following  behavior  has  been  implemented  in  the 
    CanTp: 
    >  After the reception of a First Frame, the first Flow Control is transmitted immediately 
    (N_Br = 0ms). 
    >  After the reception of the last Consecutive Frame in a block, the next Flow Control is 
    transmitted immediately (N_Br = 0ms). 
    >  After FC.WAIT, the subsequent FC.CTS is transmitted as soon as sufficient buffer is 
    provided. If no buffer is provided, the next FC.WAIT is transmitted after N_Br. 
     
     
    Note 
    The flow status (CTS, WAIT, OVFL) depends on the result of the buffer provision.  
      FC.WAIT is sent if the buffer is temporarily unavailable or too small. In this case the 
    receiver will continue to send FC.WAIT until the buffer status changes or the maximum 
    number of wait frames (configuration parameter WFTmax) is reached. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    31 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR CanTp into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the CanTp contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery 
    Delivery 
    CanTp.c 
     
     
    Source file of the CanTp 
    CanTp.h 
     
     
    Header file of the CanTp 
    CanTp_Cbk.h 
     
     
    Header file with CanTp callback function prototypes 
    CanTp_Types.h 
     
     
    Header file with global CanTp type definitions. 
    CanTp_Priv.h 
     
     
    Header file with internal CanTp definitions. 
    CanTp.lib 
     
     
    Library of the CanTp 
    Table 4-1   Static files 
     
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration. 
    File Name 
    Description 
    CanTp_Cfg.h 
    This is the generated header file of CanTp containing pre-compile switches 
    and providing symbolic defines. 
    CanTp_Cfg.c 
    This is the generated source file of CanTp containing pre-compile-time 
    configurable parameters 
    CanTp_Lcfg.h 
    This is the generated header file of CanTp containing link-time configurable 
    symbols 
    CanTp_Lcfg.c 
    This is the generated source file of CanTp containing link-time configurable 
    parameters 
    CanTp_PBcfg.c 
    This is the generated source file of CanTp containing post-build-time 
    configurable parameters 
    CanTp_PBcfg.c 
    This is the generated source file of CanTp containing post-build-time 
    configurable parameters 
    Table 4-2   Generated files 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    32 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    4.2 
    Include Structure 
    MemMap.h
    CANTP
    «include»
    SchM_CanTp.h
    CanTp_Priv.h
    «include»
    «include»
    CanTp.c
    «include»
    «include»
    CanIf.h
    CanTp_Cbk.h
    «include»
    «include»
    PduR_CanTp.h
    «include»
    «include»
    CanTp_Lcfg.c
    CanTp_Lcfg.h
    «include»
    EcuM_Error.h
    «include»
    «include»
    CanTp_PBcfg.c
    CanTp_PBcfg.h
    CanTp.h
    Det.h
    «include»
    «include»
    «include»
    «include»
    CanTp_Cfg.c
    CanTp_Cfg.h
    CanTp_Types.h
    «include»
    «include»
    «include»
    «include»
    ComStackTypes.h
      
    Figure 4-1  Include structure 
     
     
    Note 
    The only files that need to be included by other modules and software components are 
      CanTp.h and CanTp_Cbk.h. These files contain all definitions and inclusions required 
    to use the CanTp. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    33 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of the CanTp and illustrates their assignment among each other. 
    Compiler Abstraction 
     
     
     
    Definitions 
    A
    G
    T
    A
    INIT
     
    CF
     
     
     
    D
    NIT
    B

    E
    NO
    G
    P
    S
     
    D
    L_
    P
    R_
    R_I
    CF
    R_
    N
    P
    B
     
    A
    A
    A
    _CO
    _A
    _V
    _V
    _P
    _V
    _CO
    Memory Mapping 
    P
    P
    P
    P
    P
    P
    P
    Sections
    NT
    NT
    NT
    NT
    NT
    NT
    NT
     
    CA
    CA
    CA
    CA
    CA
    CA
    CA
    CANTP_START_SEC_CODE 
       
     
     
     
     
     
    CANTP_STOP_SEC_CODE 
    CANTP_START_SEC_VAR_NOINIT_8BIT 
     
     
     
     
     
     
     
    CANTP_START_SEC_VAR_NOINIT_8BIT 
    CANTP_START_SEC_VAR_INIT_UNSPECIFIED 
     
     
     
     
     
     
     
    CANTP_STOP_SEC_VAR_INIT_UNSPECIFIED 
    CANTP_START_SEC_PBCFG  
     
     
     
     
     
     
     
    CANTP_STOP_SEC_PBCFG 
    CANTP_START_SEC_VAR_PBCFG  
     
     
     
     
     
     
     
    CANTP_STOP_SEC_VAR_PBCFG 
    CANTP_START_SEC_CONST_16BIT 
     
     
     
     
     
     
     
    CANTP_STOP_SEC_CONST_16BIT 
    Table 4-3   Compiler abstraction and memory mapping 
    4.3.1 
    Memory mapping rules 
    Due  to  reuse  of  existing  code,  some  pointers  in  the  CanTp  may  point  to  variables  of 
    different  memory  classes.  Therefore  it  must  be  ensured  that  the  following  compiler 
    abstraction definitions are mapped to compatible memory sections: 
    >  CANTP_VAR_PBCFG and CANTP_APPL_DATA 
    >  CANTP_VAR_PBCFG and PDUR_APPL_DATA 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    34 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    4.4 
    Critical Sections 
    The synchronization mechanism defined by AUTOSAR covers the entering and leaving of 
    so  called  critical  sections.  Different  critical  sections  can  be  handled  by  using  different  so 
    called “Exclusive Areas”. 
    CanTp  supports  only  one  exclusive  area  (CANTP_EXCLUSIVE_AREA_0),  which  can  be 
    entered from task and interrupt level. It protects all internal state data against unintended 
    modification due to concurrent access and is entered from the following APIs: 
    >  CanTp_RxIndication 
    >  CanTp_TxConfirmation 
    >  CanTp_Transmit 
    >  CanTp_ChangeParameter 
    >  CanTp_CancelReceive 
    >  CanTp_CancelTransmit 
    >  CanTp_StopSeparationTime 
    >  CanTp_MainFunction 
    The exclusive area must lock the interrupts from all bus systems which may affect CanTp 
    operation. So while in CAN-only systems, locking the CAN interrupts is sufficent, e.g. in an 
    ECU which does CAN-FlexRay routing, also the FlexRay interrupts have to be locked. 
     
    4.5 
    Buffer Configuration 
    The  CanTp  is  able  to  work  with  segmented  reception  buffers,  i.e.  usually  it  is  not 
    necessary to provide a buffer with size of the complete message to be received. 
    Basically it is sufficient to provide a buffer which is large enough to store the payload of all 
    CFs within a block. The CanTp will adjust the block size and flow status parameters in the 
    FC frames according to the currently available buffer to control the reception data flow. A 
    new buffer is requested before the start of a new block, i.e. when an FC.CTS is sent. 
    However, some configuration options limit the reception control capabilities of the CanTp. 
    This must be taken into account  during configuration of  the buffer size in  an upper layer 
    module (e.g. in the PduR when using high level routing). 
     
    4.5.1 
    Constant Block Size 
    If the  CanTp  is not allowed to change the block size during reception (see also  3.1.2.4), 
    the buffer size which is reported to the CanTp upon request at the end of a block should 
    also  not  change  after  the  first  FC.CTS  has  been  transmitted.  Otherwise  the  CanTp  will 
    transmit  an  FC.WAIT  until  enough  buffer  is  available,  which  will  unnecessarily  delay  the 
    reception. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    35 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    4.5.2 
    Zero Block Size 
    If the Block Size is configured as zero, an FC is only allowed after FF reception. If once a 
    FC.CTS  is  transmitted,  the  CanTp  has  no  possibility  to  delay  the  reception  if  the  upper 
    layer  runs  out  of  buffer.  The  CanTp  will  try  to  get  more  buffer  between  two  CFs  while 
    waiting for STmin, but for better robustness it is recommended to use BS = 0 only if a full 
    buffer is available. Otherwise the connection will be terminated with an error if the  CanTp 
    is still waiting for a buffer when the next CF is received. 
     
    4.5.3 
    Zero WFTmax  
    A WFTmax value of zero does suppress the transmission of FC.WAIT, i.e. the CanTp is not 
    allowed  to  delay  reception.  If  nevertheless  a  situation  occurs  where  an  FC.WAIT  is 
    needed,  the  connection  will  be  terminated.  Therefore,  similar  to  the  case  with  constant 
    block  size,  it  is  important  to  provide  always  enough  buffer  for  one  complete  block  or  (if 
    block size is not constant) for at least one CF. 
     
    4.5.4 
    Zero STmin 
    With  a  STmin  of  zero,  each  CF  is  transmitted  immediately  after  the  previous  CF.  This 
    eliminates the possibility of a buffer request between two CFs in case of BS = 0. If such a 
    situation nevertheless occurs, the connection will be erroneously terminated on reception 
    of the next CF. 
    Therefore it is highly recommended to provide always a full buffer when BS = 0 and STmin 
    = 0 are used. 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    36 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
     
    5.1 
    Services provided by CanTp 
    5.1.1 
    CanTp_InitMemory 
    Prototype 
    void CanTp_InitMemory ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Void 
    N/A 
    Functional Description 
    Service to initialize module global variables at power up. This function initializes the variables in *_INIT_* 
    sections and should be used in case they are not initialized by the startup code. 
    Particularities and Limitations 
    >  This function must be called prior to CanTp_Init 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    Table 5-1   CanTp_InitMemory 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    37 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.2 
    CanTp_Init() 
    Prototype 
    void CanTp_Init ( const CanTp_ConfigType*  CfgPtr ) 
    Parameter 
     CfgPtr 
    Pointer to the CanTp post-build configuration data. 
    In configurations supporting multiple variants or post-build, a #define with a 
    config pointer for each available configuration set is generated. 
    In simple precompile configurations, the parameter is not used by the CanTp 
    and can be set to NULL. 
    Return code 
    Void 
    N/A 
    Functional Description 
    This function initializes the CanTp module. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    Table 5-2   CanTp_Init() 
     
    5.1.3 
    CanTp_Shutdown() 
    Prototype 
    void CanTp_Shutdown ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Void 
    N/A 
    Functional Description 
    This function is called to shut down the CanTp module. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    Table 5-3   CanTp_Shutdown() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    38 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.4 
    CanTp_MainFunction() 
    Prototype 
    void CanTp_MainFunction ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    The main function for scheduling the CanTp. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    Table 5-4   CanTp_MainFunction() 
     
    5.1.5 
    CanTp_MainFunctionRx() 
    Prototype 
    void CanTp_MainFunctionRx ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    The main function for scheduling the receive channels of the CanTp. This function is only available if the 
    split MainFunction feature is activated 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated (see 3.1.2.1) 
    Compiler switch: CANTP_RXTX_MAINFUNCTION_API 
    Configuration attribute: CanTpEnableSplitMainFunction 
    Table 5-5   CanTp_MainFunctionRx() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    39 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.6 
    CanTp_MainFunctionTx() 
    Prototype 
    void CanTp_MainFunctionTx ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    The main function for scheduling the transmit channels of the CanTp. This function is only available if the 
    split MainFunction feature is activated 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated (see 3.1.2.1) 
    Compiler switch: CANTP_RXTX_MAINFUNCTION_API 
    Configuration attribute: CanTpEnableSplitMainFunction 
    Table 5-6   CanTp_MainFunctionTx() 
     
    5.1.7 
    CanTp_GetVersionInfo() 
    Prototype 
    void CanTp_GetVersionInfo ( Std_VersionInfoType* versioninfo ) 
    Parameter 
    versioninfo 
    reference to a variable where to store the version information of the CanTp 
    Return code 
    void 
    N/A 
    Functional Description 
    This function returns the version information of the CanTp module. 
    The version information includes: Module Id, Vendor Id and Vendor specific version numbers.   
    The version numbers are BCD-coded. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated 
    Compiler switch: CANTP_VERSION_INFO_API 
    Configuration attribute: CanTpVersionInfoApi 
    Table 5-7   CanTp_GetVersionInfo() 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    40 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.8 
    CanTp_Transmit() 
    Prototype 
    Std_ReturnType CanTp_Transmit ( PduIdType CanTpTxSduId, const PduInfoType* 
    CanTpTxInfoPtr ) 
    Parameter 
    CanTpTxSduId 
    Unique CanTp identifier of the N-SDU to be transmitted. 
    Range: 0..(maximum number of Tx N-SDU IDs ) - 1 
    CanTpTxInfoPtr 
    This reference to a PduInfoType structure contains the length to be 
    transmitted (SduLength) and a data pointer (SduDataPointer). Only the 
    SduLength is used by CanTp_Transmit. The data to be transmitted is 
    requested separately by the CanTp. Thereto the function 
    PduR_CanTpCopyTxData is used. 
    Return code 
    Std_ReturnType 
    E_OK: The transmit request has been started successfully 
    E_NOT_OK: The request cannot be started (e.g. a transmit request is in 
    progress with the same N-SDU identifier) 
     
    Functional Description 
    This service is used to request the transfer of segmented data. 
     
    If data length is less than 7 or 6, depending on the addressing format (standard, extended. mixed11), a SF 
    N-PDU is sent. Otherwise, if data length is greater than 7 or 6, a multiple frame transmission session is 
    initiated.  
    When the transmit request has been completed, the CanTp notifies the upper layer by calling the 
    PduR_CanTpTxConfirmation callback function.   
    Also, if an error occurred (overflow, timeout etc.), the transmit request is aborted and the 
    PduR_CanTpTxConfirmation callback is called with the appropriate error result value.  
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function can be configured to be synchronous or asynchronous (see 0)
    Table 5-8   CanTp_Transmit() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    41 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.9 
    CanTp_CancelReceive() 
    Prototype 
    Std_ReturnType CanTp_CancelReceive ( PduIdType CanTpRxSduId ) 
    Parameter 
    CanTpRxSduId 
    Identifier of the Rx N-SDU, for which a reception shall be cancelled. 
    Range: 0..(maximum number of Rx N-SDU IDs) - 1 
    Return code 
    Std_ReturnType 
    E_OK: Cancellation request of the specified N-SDU is accepted. 
    E_NOT_OK: Cancellation request is rejected; the reason can be that the 
    request is issued for an N-SDU that is not segmented or that is not in the 
    reception process. 
    Functional Description 
    This service is used to cancel the ongoing reception of an N-SDU. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated 
    Compiler switch: CANTP_RC 
    Configuration attribute: CanTpRc 
    Table 5-9   CanTp_CancelReceive() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    42 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.10  CanTp_CancelTransmit() 
    Prototype 
    Std_ReturnType CanTp_CancelTransmit ( PduIdType CanTpTxSduId ) 
    Parameter 
    CanTpTxSduId 
    Identifier of the Tx N-SDU, for which a transmission shall be cancelled. 
    Range: 0..(maximum number of Tx N-SDU IDs) - 1 
    Return code 
    Std_ReturnType 
    E_OK: Cancellation request of the specified N-SDU is accepted. 
    E_NOT_OK: Cancellation request is rejected; the reason can be that request 
    is issued for an N-SDU that is not segmented, request is issued after the last 
    CF has been requested for transmission or cancellation is not possible for the 
    related N-SDU due to configuration. 
    Functional Description 
    This service is used to cancel the ongoing transmission of an N-SDU. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated 
    Compiler switch: CANTP_TC 
    Configuration attribute: CanTpTc 
    Table 5-10   CanTp_CancelTransmit() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    43 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.11  CanTp_ChangeParameter() 
    Prototype 
    Std_ReturnType CanTp_ChangeParameter ( PduIdType id, TPParameterType parameter, 
    uint16 value ) 
    Parameter 
    id 
    Identifier of the Rx N-SDU, for which a parameter shall be changed. 
    Range: 0..(maximum number of Rx N-SDU IDs) - 1 
    parameter 
    Parameter type of which the value has to be changes (TP_BS or TP_STMIN). 
    value 
    The new value of the parameter. 
    Return code 
    Std_ReturnType 
    E_OK: request is accepted. 
    E_NOT_OK: request is not accepted. 
    Functional Description 
    This service is used to request the change of reception parameters BS and STmin for a specified N-SDU. 
    Modification of parameters is only allowed if currently no reception for the respective N-SDU is in progress. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated 
    Compiler switch: CANTP_ENABLE_CHANGE_PARAM 
    Configuration attribute: CanTpChangeParameterApi 
    Table 5-11   CanTp_ChangeParameter() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    44 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.1.12  CanTp_ReadParameter() 
    Prototype 
    Std_ReturnType CanTp_ReadParameter ( PduIdType id, TPParameterType parameter, 
    uint16* value ) 
    Parameter 
    id 
    Identifier of the Rx N-SDU, for which a flow control parameter shall be read. 
    Range: 0..(maximum number of Rx N-SDU IDs) - 1 
    parameter 
    Parameter type of which the value has to be read (TP_BS or TP_STMIN). 
    value 
    Pointer where the parameter value will be stored. 
    Return code 
    Std_ReturnType 
    E_OK: request is accepted. 
    E_NOT_OK: request is not accepted. 
    Functional Description 
    This service is used to read the current value of reception parameters BS and STmin for a specified N-
    SDU. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is non-reentrant. 
    >  This function is synchronous. 
    >  This API is optional and can be deactivated 
    Compiler switch: CANTP_ENABLE_READ_PARAM 
    Configuration attribute: CanTpReadParameterApi 
    Table 5-12   CanTp_ReadParameter() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    45 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.2 
    Services used by CanTp 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CanTp are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    CanIf 
    CanIf_Transmit 
    CanIf_CancelTransmit  
    Dcm 
    Dcm_OnRequestDetection 
    Det 
    Det_ReportError 
    EcuM 
    EcuM_BswErrorHook 
    PduR 
    PduR_CanTpCopyRxData 
    PduR_CanTpCopyTxData 
    PduR_CanTpRxIndication 
    PduR_CanTpStartOfReception 
    PduR_CanTpTxConfirmation 
    PduR_CanTpChangeParameterConfirmation 
    SchM 
    SchM_Enter_CanTp_* 
    SchM_Exit_CanTp_* 
    Table 5-13   Services used by the CanTp 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    46 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.3 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the CanTp and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file CanTp_Cbk.h by the CanTp. 
    5.3.1 
    CanTp_RxIndication() 
    Prototype 
    void CanTp_RxIndication ( PduIdType CanTpRxPduId, const PduInfoType* 
    CanTpRxPduPtr ) 
    Parameter 
    CanTpRxPduId 
    Identifier of the Rx N-PDU that have been received. 
    Range: 0..(maximum number of Rx N-PDU IDs) - 1 
    CanTpRxPduPtr 
    Reference to structure with the size of the received N-PDU (SduLength) and 
    to the payload data (SduDataPointer) 
    Return code 
    void 
    N/A 
    Functional Description 
    This function is called by the CAN Interface after a successful reception of an N-PDU. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 5-14   CanTp_RxIndication() 
    5.3.2 
    CanTp_TxConfirmation() 
    Prototype 
    void CanTp_TxConfirmation ( PduIdType TxPduId ) 
    Parameter 
    TxPduId 
    Identifier of the Tx N-PDU that have been transmitted successfully. 
    Range: 0..(maximum number of Tx N-PDU IDs) - 1 
    Return code 
    void 
    N/A 
    Functional Description 
    This function is called by the CAN Interface to confirm the successful transmission of an N-PDU. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 5-15   CanTp_TxConfirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    47 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.3.3 
    CanTp_StopSeparationTime() 
    Prototype 
    void CanTp_StopSeparationTime(PduIdType CanTpTxSduId) 
    Parameter 
    CanTpTxSduId 
    Symbolic name value of the Tx connection 
    Note: this is the same ID as it has been passed to the application in the 
    StartSeparationTime call-out. 
    Return code 


    Functional Description 
    Called by the application to trigger transmission of the next CF when its separation timer expired. 
    Particularities and Limitations 
    >  Feature „STmin by Application“ must be active (see 3.1.2.11) 
    >  The request to do the separation time handling must have been accepted by the application (see 5.4.1)
    If CanTp_StopSeparationTime() is called before Appl_StartSeparationTime returns (e.g. in case of a fast 
    timer interrupt), the CanTp assumes a positive result and accepts the function call. 
    >  In the context of this function, the CanTp will request the CF payload from its upper layer and transmit 
    the next CF 
    Table 5-16   CanTp_StopSeparationTime() 
    5.4 
    Configurable Interfaces 
    5.4.1 
    Appl_StartSeparationTime() 
    Prototype 
    boolean Appl_StartSeparationTime(PduIdType CanTpTxSduId, uint8 STmin) 
    Parameter 
    CanTpTxSduId 
    Symbolic name value of the Tx connection. 
    STmin 
    STmin value from the flow control (encoding according to ISO). 
    Return code 
    TRUE 
    request to handle Separation Time is accepted by the application 
    FALSE 
    request to handle Separation Time is rejected and will be done by CanTp 
    Functional Description 
    Called by the CanTp to notify the application that a separation timer need to be started. 
    Particularities and Limitations 
    >  The function is called from the TxConfirmation context 
    >  The actual name of the function is configured by the parameter 
    ‘CanTp/CanTpGeneral/CanTpApplSTminStartFunction’ 
    Table 5-17   Appl_StartSeparationTime() 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    48 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.4.2 
    Notification Functions 
    Additional notification callouts can be defined to notify the application about the reception 
    or  transmission  of  CanTp  frames.  This  may  be  used  for  project  specific  extensions  or 
    workarounds.  The  function  declarations  are  provided  in  CanTp_Cbk.h.  To  activate  a 
    callout, an according compiler switch must be defined to STD_ON in a user config file. 
    5.4.2.1 
    Appl_CanTpRxSFIndication() 
    Prototype 
    void Appl_CanTpRxSFIndication (PduIdType          PduRRxPduId,  
                                   const PduInfoType* PduInfoPtr); 
    Parameter 
    PduRRxPduId 
    PduId of the connection, which is defined by the PduR; the same Id is passed 
    to PduR in PduR_CanTpRxIndication(). 
    PduInfoPtr 
    Reference to structure with the size (SduLength) and the CAN frame content 
    (SduDataPointer) of the single frame. 
    Return code 


    Functional Description 
    Function is called upon successful reception of a single frame N-PDU before the call of 
    PduR_CanTpStartOfReception(). 
    Particularities and Limitations 
    >  To activate the callout, CANTP_APPL_RX_SF_INDICATION must be defined to STD_ON 
    Table 5-18   Appl_CanTpRxSFIndication() 
    5.4.2.2 
    Appl_CanTpRxFFIndication() 
    Prototype 
    void Appl_CanTpRxFFIndication (PduIdType          PduRRxPduId,  
                                   const PduInfoType* PduInfoPtr); 
    Parameter 
    PduRRxPduId 
    PduId of the connection, which is defined by the PduR; the same Id is passed 
    to PduR in PduR_CanTpRxIndication(). 
    PduInfoPtr 
    Reference to structure with the size (SduLength) and the CAN frame content 
    (SduDataPointer) of the first frame. 
    Return code 


    Functional Description 
    Function is called upon successful reception of a first frame N-PDU before the call of 
    PduR_CanTpStartOfReception(). 
    Particularities and Limitations 
    >  To activate the callout, CANTP_APPL_RX_FF_INDICATION must be defined to STD_ON 
    Table 5-19   Appl_CanTpRxFFIndication() 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    49 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.4.2.3 
    Appl_CanTpRxCFIndication() 
    Prototype 
    void Appl_CanTpRxCFIndication (PduIdType          PduRRxPduId,  
                                   const PduInfoType* PduInfoPtr); 
    Parameter 
    PduRRxPduId 
    PduId of the connection, which is defined by the PduR; the same Id is passed 
    to PduR in PduR_CanTpRxIndication(). 
    PduInfoPtr 
    Reference to structure with the size (SduLength) and the CAN frame content 
    (SduDataPointer) of the consecutive frame. 
    Return code 


    Functional Description 
    Function is called upon successful reception of a consecutive frame N-PDU before the call of 
    PduR_CanTpCopyRxData(). 
    Particularities and Limitations 
    >  To activate the callout, CANTP_APPL_RX_CF_INDICATION must be defined to STD_ON 
    Table 5-20   Appl_CanTpRxCFIndication() 
    5.4.2.4 
    Appl_CanTpFrameTransmission () 
    Prototype 
    void Appl_CanTFrameTransmission (PduIdType          CanIfTxPduId,  
                                     const PduInfoType* PduInfoPtr); 
    Parameter 
    CanIfTxPduId 
    PduId of the transmitted CAN message, which is defined by the CanIf; the 
    same Id is passed to CanIf_Transmit(). 
    PduInfoPtr 
    Reference to structure with the size (SduLength) and the content 
    (SduDataPointer) of the transmitted CAN frame. 
    Return code 


    Functional Description 
    Function is called if transmission of a CanTp N-PDU has successfully been started (CanIf_Transmit() has 
    been called and returned E_OK). 
    Particularities and Limitations 
    >  To activate the callout, CANTP_APPL_FRAME_TRANSMISSION must be defined to STD_ON 
    Table 5-21   Appl_CanTpFrameTransmission () 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    50 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    5.4.2.5 
    Appl_CanTpFrameTxConfirmation () 
    Prototype 
    void Appl_CanTFrameTxConfirmation (PduIdType CanIfTxPduId); 
    Parameter 
    CanIfTxPduId 
    PduId of the transmitted CAN message, which is defined by the CanIf; the 
    same Id is passed to CanIf_Transmit(). 
    Return code 


    Functional Description 
    Function is called if a CanTp N-PDU has successfully been transmitted (at the beginning of 
    CanTp_TxConfirmation). 
    Particularities and Limitations 
    >  To activate the callout, CANTP_APPL_FRAME_CONFIRMATION must be defined to STD_ON 
    Table 5-22   Appl_CanTpFrameTransmission () 
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    51 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    6  Configuration 
    The CanTp attributes can be configured with the following tool: 
    >  Configuration in DaVinci Configurator Pro 5 
     
    6.1 
    Configuration Variants 
    The CanTp supports the configuration variant 
    >  VARIANT-PRE-COMPILE 
    >  VARIANT-POST-BUILD-LOADABLE 
    >  VARIANT-POST-BUILD-SELECTABLE 
    The configuration classes of the CanTp parameters depend on the supported configuration 
    variants. For their definitions please see the CanTp_bswmd.arxml file. 
     
    6.2 
     Configuration of Post-Build 
    The configuration of post-build loadable is described in [7]. 
    In the CanTp, the following configuration changes are possible at post-build time:  
    >  Modify timing parameters of existing N-SDUs 
    >  Activate or disable N-PDU padding of existing N-SDUs (padding must have been 
    globally enabled at pre-compile time) 
    >  Modify flow control parameters of existing Rx N-SDUs (STmin, Block Size, WFTmax) 
    >  Change number of channels (dynamic channel assignment must have been enabled 
    at pre-compile time, see 3.1.2.5) 
    >  Add new N-SDUs 
    Existing references to N-PDUs can’t be changed at post-build time. However, when adding 
    new N-SDUs, N-PDUs configured at pre-compile time can be referenced. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    52 
    based on template version 5.7.1 



    Technical Reference MICROSAR CAN Transport Layer 
    6.3 
    Additional Configuration Hints 
    6.3.1 
    CanIf Tx Buffering 
    The CanTp does not implement a retry mechanism in case the CanIf is not able to transmit 
    a TP message. If a call to CanIf_Transmit failed, the connection is terminated. 
    To avoid unpredictable interruption  of active CanTp connections, the Tx buffering feature 
    must be enabled in the CanIf for systems where high bus load and failed transmissions are 
    expected. 
     
    6.3.2 
    ISO Performance Requirements 
    ISO15765-2 defines performance requirements for N_Br and N_Cs (see also 3.9.1), which 
    frequently leads to confusion. The reason for this is that there is usually no clear distinction 
    between configured timeouts and the actual timing observed on the bus. 
    For example, a typical OEM specification may look like that: 
    Timing Parameter  Value 
    N_As 
    1000ms 
    N_Ar 
    1000ms 
    N_Bs 
    1000ms 
    N_Br 
    (N_Br + N_Ar) < (0,9*N_Bs) 
    N_Cs 
    (N_Cs + N_As) < (0,9*N_Cr) 
    N_Cr 
    1000ms 
    Table 6-1   Example for typical timing parameter specification 
    Interpreting all timings as configurable parameters would mean, that only a negative value 
    can fulfill the specified equation for N_Br and N_Cs. 
    However, the intent of the requirement is not to specify a concrete value, but to provide a 
    test criterion for a black box test where e.g. N_Br and N_Ar can’t be measured separately. 
    So it should be interpreted as follows: 
     
    (actual measured time for N_Br + N_Ar) < (0,9 * configured N_Bs timeout) 
     
     
     
    FAQ: Which values should be used for the config parameters N_Cs and N_Br? 

      The CanTp tries to send out frames as fast as possible. N_Cs and N_Br are mainly 
    used to abort/complete an operation before it is obvious that the performance time can 
    no longer be fulfilled (see also 3.9.2.2 for N_Cs and 3.9.2.3 for N_Br).  
    So assuming a typical bus delay far below 100ms, for the example above a good 
    choice for N_Cs and N_Br would be around 800ms. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    53 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    Buffer 
    A buffer in a memory area normally in the RAM. It is an area that the 
    application has reserved for data storage. 
    Callback function 
    This is a function provided by an application. E.g. the CAN Driver calls a 
    callback function to allow the application to control some action, to make 
    decisions at runtime and to influence the work of the driver. 
    CAN Driver 
    The CAN Driver encapsulates a specific CAN controller handling. It 
    consists of algorithms for hardware initialization, CAN message 
    transmission and reception. The application interface supports both event 
    and polling notification and WR/RD access to the message buffers. 
    CAN message 
    Frame which is composed of the start-of-frame, arbitration, control, data, 
    CRC, acknowledge and end-of-frame bit fields. 
    Channel 
    A channel defines the assignment (1:1) between a physical communication 
    interface and a physical layer on which different modules are connected to 
    (either CAN or LIN). 1 channel consists of 1 ... X network(s). 
    Communication 
    The communication stack consists of the communication configuration and 
    stack 
    the communication kernel, a number of adaptive software components that 
    cover the basic communication requirements in distributed automotive 
    applications. 
    Component 
    CAN Driver, Network Management ... are software COMPONENTS in 
    contrast to the expression module, which describes an ECU. 
    Confirmation 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'confirmation' a service provider informs a service 
    user about the result of a preceding service request of the service user. 
    Notification by the CAN Driver on asynchronous successful transmission of 
    a CAN message. 
    Critical section 
    A critical section is a sequence of instructions where mutual exclusion must 
    be ensured. Such a section is called 'critical' because shared data is 
    modified within it. 
    Data consistency 
    Data consistency means that the content of a given application message 
    correlates unambiguously to the operation performed onto the message by 
    the application. This means that no unforeseen sequence of operations 
    may alter the content of a message hence rendering a message 
    inconsistent with respect to its allowed and expected value. 
    Data link layer 
    The communication layer which provides services for the transfer of data 
    link messages. The data link layer consists of the communication hardware 
    and the communication driver software. 
    DaVinci 
    Configuration and code generation tool for MICROSAR components 
    Configurator Pro 5 
    Deadlock 
    A state in which tasks block one another so that further processing of the 
    tasks concerned is no longer possible. A deadlock between two tasks 
    occurs, e.g. if both tasks wait for the reception of a message which is to be 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    54 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    sent by the other task before sending its own message. 
    Electronic Control 
    Also known as ECU. Small embedded computer system consisting of at 
    Unit 
    least one CPU and corresponding periphery which is placed in one 
    housing. 
    Event 
    An exclusive signal which is assigned to a certain extended task. An event 
    can be used to send binary information to an extended task. The meaning 
    of events is defined by the application. Any task can set an event for an 
    extended task. The event can only be cleared by the task which is 
    assigned to the event. 
    Gateway 
    A gateway is designed to enable communication between different bus 
    systems, e.g. from CAN to LIN. 
    Indication 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'indication' a service provider informs a service 
    user about the occurrence of either an internal event or a service request 
    issued by another service user. Notification of application in case of events 
    in the Vector software components, e.g. an asynchronous reception of a 
    CAN message. 
    Interrupt 
    Processor-specific event which can interrupt the execution of a current 
    program section. 
    Interrupt level 
    Processing level provided for time-critical activities. To keep the interrupt 
    latency brief, only absolutely indispensable actions should be effected in 
    the interrupt service routine, which ensures reception of the interrupt and 
    trigger its (post) processing within a task. Other processing levels are: 
    Operating system level and task level. 
    Network 
    A network defines the assignment (1:N) between a logical communication 
    grouping and a physical layer on which different modules are connected to 
    (either CAN or LIN). One network consists of one channel, Y networks 
    consists of 1 ... Z channel(s). We say network if we talk about more than 
    one bus. 
    Physical layer 
    An electrical circuit that connects an ECU to a communication media. 
    Platform 
    The sum of micro controller derivative, communication controller 
    implementation and compiler is called platform. 
    Post-build 
    This type of configuration is possible after building the software module or 
    the ECU software. The software may either receive parameters of its 
    configuration during the download of the complete ECU software resulting 
    from the linkage of the code, or it may receive its configuration file that can 
    be downloaded to the ECU separately, avoiding a re-compilation and re-
    build of the ECU software modules. In order to make the post-build time re-
    configuration possible, the re-configurable parameters shall be stored at a 
    known memory location of ECU storage area. 
    Segmented data 
    See segmented communication 
    transfer 
    Software 
    A software architecture is the structure or structures of a system, which 
    architecture 
    comprises software components, the external visible properties of these 
    components and the relationships among them. 
    Transport Protocol 
    Some information that must be transferred over the CAN/LIN bus does not 
    fit into individual message frames because the data length exceeds the 
    maximum of 8 bytes. In this case, the sender must divide up the data into a 
    number of messages. Additional information is necessary for the receiver 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    55 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    to put the data together again. 
    Table 7-1   Glossary 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    AE 
    Address Extension 
    API 
    Application Programming Interface   
    AR 
    AUTOSAR 
    AUTOSAR 
    Automotive Open System Architecture 
    BS 
    Block Size 
    BSW 
    Basis Software 
    BSWMD 
    Basic Software Module Description 
    CAN 
    Controller Area Network protocol 
    CAN-FD 
    CAN with Flexible Data Rate 
    CANTP 
    CAN Transport Layer 
    CF 
    Consecutive Frame 
    COM 
    Communication 
    CTS 
    Clear To Send 
    DCM 
    Diagnostic Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DL 
    Data Length 
    DLC 
    Data Length Code, Number of data bytes of a CAN message 
    ECU 
    Electronic Control Unit 
    FC 
    Flow Control 
    FF 
    First Frame 
    FS 
    Flow Status Control 
    HIS 
    Hersteller Initiative Software 
    ID 
    Identifier 
    ISO 
    International Standardization Organization 
    LFF 
    Long First Frame (extended first frame with escape sequence) 
    LSF 
    Long Single Frame (extended single frame with escape sequence) 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 

    Network Layer (used as prefix; e.g. N-PDU or N-SDU) 
    OBD 
    Undefined 
    OEM 
    Original Equipment Manufacturer 
    OS 
    Operating System 
    OVFLW 
    Overflow 
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    56 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    PB 
    Post-Build 
    PDU 
    Protocol Data Unit 
    PDUR 
    PDU Router 
    ROM 
    Read-Only Memory 
    RFC 
    Request For Comment 
    RTE 
    Runtime Environment 
    SA 
    Source Address 
    SDU 
    Service Data Unit 
    SF 
    Single Frame 
    SN 
    Sequence Number 
    SRS 
    Software Requirement Specification 
    ST 
    Separation Time 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    TA 
    Target Address 
    TP 
    Transport Protocol 
    TPCI 
    Transport Protocol Control Information 
    WT 
    Wait 
    Table 7-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    57 
    based on template version 5.7.1 


    Technical Reference MICROSAR CAN Transport Layer 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.01.00 
    58 
    based on template version 5.7.1 

    Document Outline


    1.3.78 - TechnicalReference_CanTrcv_Tja1043dio

    MICROSAR CAN Transceiver driver

    1.3.80 - TechnicalReference_CanTrcv_Tja1043dios


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CAN Transceiver driver 
    Technical Reference 
     
    Tja1043 
    Version 4.2.1 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Timo Vanoni, Eugen Stripling, Andreas Weinrauch, Jan 
    Hammer 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    1  Document Information 
    1.1 
    History of template 
    Author 
    Date 
    Version 
    Remarks 
    Timo Vanoni 
    2010-04-21 
    1.00.00 
    Creation 
    Table 1-1   History of the template 
    1.2 
    History of document 
    Author 
    Date 
    Version 
    Remarks 
    Timo Vanoni 
    2010-05-10 
    1.00.00 
    First implementation 
    Timo Vanoni 
    2011-05-02 
    1.01.00 
    Add support for multiple 
    identity configuration 
    Eugen Stripling 
    2011-08-03 
    2.00.00 
    Implementation according to 
    ASR3.2.1 
    Eugen Stripling 
    2012-01-23 
    2.01.00 
    Adapted according to R13 
    changes: New used service 
    CanIf_TrcvWakeupIndication 
    Eugen Stripling 
    2013-02-06 
    3.00.00 
    Add support for ASR3.2.2 
    Add support for ASR4.0.3 
    Eugen Stripling 
    2014-10-31 
    4.00.00 
    AUTOSAR3 removed, 
    Post-build selectable 
    Eugen Stripling 
    2015-07-29 
    4.00.01 
    ESCAN00081501 
    Eugen Stripling 
    2015-12-14 
    4.01.00 
    Chapter 8.3.3 added, chapter 
    3.2 adapted 
    Andreas Weinrauch 
    2016-12-06 
    4.02.00 
    Update to new CI template 
    Jan Hammer 
    2017-07-12 
    4.02.01 
    Add support for TCAN1043x-
    Q1  
    Add support for TJA1902A 
    CAN2 
    Table 1-2   History of the document 
    1.3 
    Reference Documents 
    No. 
    Title 
    Version 
    [1]   
    AUTOSAR_SWS_CAN_TransceiverDriver.pdf 
    3.0.0 
    [2]   
    AUTOSAR_SWS_DET.pdf 
    2.2.1 
    [3]   
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [4]   
    TJA1043.pdf 
    Rev. 5 - 23 May 2016 
    [5]   
    TCAN1043-Q1 datasheet.pdf 
    SLLSEV0 –JULY 2016 
    [6]   
    TJA1902A_Datasheet.pdf 
    Rev. 1.00 — 2 September 
    2016 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 



    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    Table 1-3   Reference documents 
    1.4 
    Scope of the Document  
    This  technical  reference  describes  the  specific  use  of  the  CAN  transceiver  driver 
    CanTrcv_30_Tja1043.  
    Please note 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    Contents 
    1 
    Document Information ................................................................................................. 2 
    1.1 

    History of template ............................................................................................. 2 
    1.2 
    History of document ........................................................................................... 2 
    1.3 
    Reference Documents ....................................................................................... 2 
    1.4 
    Scope of the Document...................................................................................... 3 
    2 
    Introduction................................................................................................................... 7 
    2.1 

    Supported Hardware .......................................................................................... 7 
    2.2 
    Pinning Information ............................................................................................ 7 
    3 
    Functional Description ................................................................................................. 8 
    3.1 

    Features ............................................................................................................ 8 
    3.2 
    Initialization ........................................................................................................ 8 
    3.3 
    Set operation mode ............................................................................................ 9 
    3.4 
    Get operation mode ........................................................................................... 9 
    3.5 
    Get version info .................................................................................................. 9 
    3.6 
    Wakeup by bus event detection ....................................................................... 10 
    3.6.1 

    Get bus wakeup reason ................................................................... 10 
    3.6.2 
    Set wakeup mode ............................................................................ 10 
    3.6.3 
    Development Error Reporting ........................................................... 10 
    4 
    Integration ................................................................................................................... 12 
    4.1 

    Scope of Delivery ............................................................................................. 12 
    4.1.1 

    Static Files ....................................................................................... 12 
    4.1.2 
    Dynamic Files .................................................................................. 12 
    4.2 
    Compiler Abstraction and Memory Mapping ..................................................... 13 
    4.3 
    Data consistency.............................................................................................. 13 
    4.4 
    Exclusive Areas ............................................................................................... 14 
    4.4.1 

    CANTRCV_EXCLUSIVE_AREA_0 .................................................. 14 
    5 
    Dependencies to other components ......................................................................... 15 
    5.1 

    Dio driver ......................................................................................................... 15 
    5.2 
    Icu driver .......................................................................................................... 15 
    5.2.1 
    ICU configuration ............................................................................. 16 
    5.2.2 
    Implementation of the signal notification function ............................. 17 
    6 
    API Description ........................................................................................................... 18 
    6.1 

    Services provided by CANTRCV ...................................................................... 18 
    6.1.1 

    CanTrcv_30_Tja1043_InitMemory ................................................... 18 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.2 
    CanTrcv_30_Tja1043_Init ................................................................ 19 
    6.1.3 
    CanTrcv_30_Tja1043_SetOpMode .................................................. 20 
    6.1.4 
    CanTrcv_30_Tja1043_GetOpMode .................................................. 21 
    6.1.5 
    CanTrcv_30_Tja1043_GetBusWuReason ........................................ 22 
    6.1.6 
    CanTrcv_30_Tja1043_SetWakeupMode .......................................... 23 
    6.1.7 
    CanTrcv_30_Tja1043_GetVersionInfo ............................................. 24 
    6.1.8 
    CanTrcv_30_Tja1043_CheckWakeup .............................................. 25 
    6.1.9 
    CanTrcv_30_Tja1043_MainFunction ................................................ 26 
    6.2 
    Services used by CANTRCV ........................................................................... 26 
    7 
    Configuration .............................................................................................................. 27 
    7.1 

    Configuration with DaVinci Configurator 5 ........................................................ 27 
    8 
    AUTOSAR Standard Compliance............................................................................... 28 
    8.1 

    Additions/ Extensions ....................................................................................... 28 
    8.1.1 

    Memory initialization ......................................................................... 28 
    8.2 
    Limitations........................................................................................................ 28 
    8.2.1 

    Support of SPI .................................................................................. 28 
    8.3 
    Deviations ........................................................................................................ 28 
    8.3.1 

    Notification functions ........................................................................ 28 
    8.3.2 
    Unused BSWMD parameters ........................................................... 28 
    8.3.3 
    Initialization of operating mode ......................................................... 29 
    9 
    Glossary and Abbreviations ...................................................................................... 30 
    9.1 

    Glossary .......................................................................................................... 30 
    9.2 
    Abbreviations ................................................................................................... 30 
    10  Contact ........................................................................................................................ 31 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    Illustrations 
    Figure 5-1 
    Add an ICU channel .................................................................................. 16 
    Figure 5-2 
    ICU channel configuration for wakeup via transceiver ............................... 16 
    Figure 5-3 
    ICU wakeup capability .............................................................................. 17 
     
    Tables 
    Table 1-1  
    History of the template ................................................................................ 2 
    Table 1-2  
    History of the document .............................................................................. 2 
    Table 1-3  
    Reference documents ................................................................................. 3 
    Table 2-1 

    Table 3-1  
    Supported SWS features ............................................................................ 8 
    Table 3-2  
    Additional supported MICROSAR features ................................................. 8 
    Table 3-3  
    Not supported SWS features ...................................................................... 8 
    Table 3-4  
    Mapping of service IDs to services ........................................................... 11 
    Table 3-5  
    Errors reported to DET ............................................................................. 11 
    Table 4-1  
    Static files ................................................................................................. 12 
    Table 4-2  
    Generated files ......................................................................................... 12 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 13 
    Table 6-1  
    CanTrcv_30_Tja1043_InitMemory ............................................................ 18 
    Table 6-2  
    CanTrcv_30_Tja1043_Init ......................................................................... 19 
    Table 6-3  
    CanTrcv_30_Tja1043_SetOpMode ........................................................... 20 
    Table 6-4  
    CanTrcv_30_Tja1043_GetOpMode .......................................................... 21 
    Table 6-5  
    CanTrcv_30_Tja1043_GetBusWuReason ................................................ 22 
    Table 6-6  
    CanTrcv_30_Tja1043_SetWakeupMode .................................................. 23 
    Table 6-7  
    CanTrcv_30_Tja1043_GetVersionInfo ...................................................... 24 
    Table 6-8  
    CanTrcv_30_Tja1043_CheckWakeup ....................................................... 25 
    Table 6-9 
    CanTrcv_30_Tja1043_MainFunction ........................................................ 26 
    Table 6-10  
    Services used by the CANTRCV .............................................................. 26 
    Table 8-1 
    Deviation of APIs used by CanTrcv ........................................................... 28 
    Table 9-1  
    Glossary ................................................................................................... 30 
    Table 9-2  
    Abbreviations ............................................................................................ 30 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 



    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CANTRCV as specified in [1]. The CAN transceiver driver provides an abstraction 
    layer for the used CAN transceiver hardware. It offers a hardware independent interface to 
    the upper layer components. 
     
    Supported 
    AUTOSAR  4.0.3 
    Release: 
    Supported 

    Configuration  Pre-compile, Post-build selectable 
    Variants: 
     
     
    Vendor ID: 
    CANTRCV_30_TJA1043_VENDOR_ID 
    30 decimal 
    (=  Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CANTRCV_30_TJA1043_MODULE_ID 
    [ModuleID] 
    (according to ref[3]) 
    Instance ID: 
    CANTRCV_30_TJA1043_INSTANCE_ID  Specified  as  pre- 
    compile  parameter 
    in  the  Generation 
    Tool. 
    2.1 
    Supported Hardware 
    Although the API includes the infix “Tja1043” this component supports several kinds of 
    hardware: 
      NXP Tja1043/T/TK 
      TI TCAN1043x-Q1 
      NXP Tja1902A  [Only CAN2 of this Multi-Chip Module can be controlled by this driver] 
    Please note 
    The TJA1902A contains three fully independent transceivers in a single Multi-Chip  
      Module (MCM), with this driver only one of them is supported (CAN2).  
    2.2 
    Pinning Information 
    The following table shows the relationship between the names of the DIO-pins modelled in 
    the ECUC-configuration and the corresponding ones mentioned in the datasheet. 
    ECUC 
    NXP Tja1043/T/TK 
    TI TCAN1043x-Q1 
    NXP Tja1902A [CAN2] 
    PinEN 
    EN 
    EN 
    C2_EN 
    PinSTB 
    STB_N 
    nSTB 
    C2_STB_N 
    PinERR 
    ERR_N 
    nFAULT 
    C2_ERR_N 
    Table 2-1    
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    3  Functional Description 
    3.1 
    Features 
    The features listed in this chapter cover the complete functionality specified in [1]. 
    The supported and not supported features are presented in the following two tables.  
     
    Supported features 
    CAN Transceiver initialization. 
    CAN Transceiver control via DIO. 
    Detection of wakeup. 
    Getting and setting operation mode of CAN transceiver. 
    Table 3-1   Supported SWS features 
     
    Additional supported MICROSAR features 
    MICROSAR Identity Manager using Post-build selectable. 
    Table 3-2   Additional supported MICROSAR features 
     
    Not supported features 
    CAN Transceiver control via SPI. 
    CAN Transceiver self diagnostics. 
    Table 3-3   Not supported SWS features 
    The CAN transceiver driver provides service functions for initialization, operation mode 
    change and operation mode detection of the used CAN transceiver hardware. Optional 
    service functions and callback functions are provided to detect wakeup by bus events and 
    report them to the upper layer components. 
     
    3.2 
    Initialization 
    After power on the CAN transceiver hardware has to be initialized. Therefore the CAN 
    transceiver driver provides two service functions. 
    The function CanTrcv_30_Tja1043_InitMemory initializes all necessary values for the 
    transceiver driver. This function has to be called first after a power-on or reset. 
    The function CanTrcv_30_Tja1043_Init initializes all CAN transceiver channels which 
    are selected by the generation tool. Each CAN transceiver channel is switched into the 
    operating mode: NORMAL. Note that CanTrcv_30_Tja1043_InitMemory has to be 
    called before the function CanTrcv_30_Tja1043_Init is called. 
    If a wakeup event was pending before the initialization, the CAN transceiver driver does 
    store this event and notifies it by calling of EcuM_SetWakeupEvent function. 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    3.3 
    Set operation mode 
    The operation mode of the CAN transceiver hardware is changed by service function 
    CanTrcv_30_Tja1043_SetOpMode. It can be switched from normal into standby mode, 
    from standby into sleep mode and from standby or sleep mode into normal mode. Mode 
    change from normal into sleep mode or from sleep into standby mode is not supported by 
    this function corresponding to the specification. 
     
    If the function is called with the same operation mode as already set, no mode change 
    occurs and E_OK is returned.  
    3.4 
    Get operation mode 
    To retrieve the current operation mode of a specified CAN transceiver hardware, the 
    service function CanTrcv_30_Tja1043_GetOpMode has to be called.  
     
    3.5 
    Get version info 
    The service function CanTrcv_30_Tja1043_GetVersionInfo can be called to get the 
    version info of the software module. This function must be enabled in the configuration tool 
    by setting the checkbox Version Info Api
    The version of the CAN transceiver driver module can be acquired in two different ways. 
    Calling the function CanTrcv_30_Tja1043_GetVersionInfo will return the version of 
    the  module  in  the  structure  Std_VersionInfoType  which  additionally  includes  the 
    VendorID  and  the  ModuleID.  Accessing  the  version  defines  which  are  specified  in  the 
    header file CanTrcv_30_Tja1043.h: 
     
    Autosar Revision: 
    CANTRCV_30_TJA1043_AR_RELEASE_MAJOR_VERSION 
    CANTRCV_30_TJA1043_AR_RELEASE_MINOR_VERSION 
    CANTRCV_30_TJA1043_AR_RELEASE_PATCH_VERSION 
     
    Module Version: 
    CANTRCV_30_TJA1043_SW_MAJOR_VERSION 
    CANTRCV_30_TJA1043_SW_MINOR_VERSION 
    CANTRCV_30_TJA1043_SW_PATCH_VERSION 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 

    based on template version 3.1 



    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    3.6 
    Wakeup by bus event detection 
     
    If wakeup by bus detection is enabled in the configuration tool the callback function 
    CanTrcv_30_Tja1043_CheckWakeup has to be called by the lower layer in case of a 
    wakeup. This function checks the specified CAN transceiver channel. If the transceiver 
    hardware is in sleep or standby mode and a wakeup by bus event is detected the function 
    returns E_OK, otherwise E_NOT_OK. 
     
     
     
    Caution 
    For determination whether a wakeup event occurred or not the flag “Wake” of the 
      transceiver is evaluated. If the “Wake” flag is set then the reason for the wakeup event 
    may be one of the following:  

    local wakeup via WAKE-pin,  

    remote wakeup by bus or  

    power-on.  
    The CAN transceiver driver does not distinguish between them. Hence the API 
    CanTrcv_30_Tja1043_GetBusWakeupReason returns only 
    CANTRCV_30_TJA1043_WU_BY_BUS in case of occurrence of a wakeup event. 
     
    This behavior applies for the following hardware: 
      NXP Tja1043/T/TK (see [4] chapter 7.2.4 Wake flag) 
      TI TCAN1043x-Q1 (see [5] chapter 9.3.3 Wake-Up Request Flag) 
      NXP Tja1902A (see [6] chapter 7.2.2.4 Wake flag) 
     
     
     
     
    3.6.1 
    Get bus wakeup reason 
    The service function CanTrcv_30_Tja1043_GetBusWakeupReason returns the reason 
    which caused the wakeup. Please pay attention to caution mentioned in 
    chapter 3.6 Wakeup by bus event detection. 
     
    3.6.2 
    Set wakeup mode 
    The service function CanTrcv_30_Tja1043_SetWakeupMode sets the wakeup mode 
    which is required by the CAN interface. 
     
    3.6.3 
    Development Error Reporting 
    Development errors are reported to DET using the service Det_ReportError, if the pre-
    compile parameter CANTRCV_30_TJA1043_DEV_ERROR_DETECT == STD_ON. 
    The  reported  CANTRCV  instance  ID  has  to  be  specified  in  the  configuration  tool.  For 
    details please refer to chapter 7.1 Configuration with DaVinci Configurator 5. 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    10 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    The  reported  service  IDs  identify  the  services  which  are  described  in  6.1.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    CanTrcv_30_Tja1043_Init 
    0x01 
    CanTrcv_30_Tja1043_SetOpMode 
    0x02 
    CanTrcv_30_Tja1043_GetOpMode 
    0x03 
    CanTrcv_30_Tja1043_GetBusWuReason 
    0x05 
    CanTrcv_30_Tja1043_SetWakeupMode 
    0x07 
    CanTrcv_30_Tja1043_CheckWakeup 
    0x04 
    CanTrcv_30_Tja1043_GetVersionInfo 
    0x06 
    CanTrcv_30_Tja1043_MainFunction 
    Table 3-4   Mapping of service IDs to services 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01 
    CANTRCV_30_TJA1043_E_ Invalid channel index is used in function argument list. 
    INVALID_TRANSCEIVER 
    0x02 
    CANTRCV_30_TJA1043_E_ Invalid pointer NULL_PTR is used in function argument 
    PARAM_POINTER 
    list. 
    0x11 
    CANTRCV_30_TJA1043_E_ CAN transceiver hardware is not initialized. 
    UNINIT 
    0x21 
    CANTRCV_30_TJA1043_E_ CAN transceiver hardware is not in standby mode. 
    TRCV_NOT_STANDBY 
    0x22 
    CANTRCV_30_TJA1043_E_ CAN transceiver hardware is not in normal operation 
    TRCV_NOT_NORMAL 
    mode. 
    0x23 
    CANTRCV_30_TJA1043_E_ The requested wakeup mode is not valid. 
    PARAM_TRCV_WAKEUP_
    MODE 
    0x24 
    CANTRCV_30_TJA1043_E_ The requested operating mode is not supported by the 
    PARAM_TRCV_OPMODE 
    underlying transceiver hardware. 
    0x40 
    CANTRCV_30_TJA1043_E_ If the CAN transceiver is not under control, which means 
    NO_TRCV_CONTROL  
    the transceiver does remain in an invalid state, this 
    production error is raised. 
    Table 3-5   Errors reported to DET 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    11 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR CANTRCV 
    into  an  application  environment  of  an  ECU.  This  component  is  only  applicable  on  CAN 
    transceiver hardware NXP Tja1043. 
    4.1 
    Scope of Delivery 
    The delivery of the CANTRCV contains the files which are described in the chapters 4.1.1 
    and 4.1.2:
     
    4.1.1 
    Static Files 
    File Name 
    Description 
    CanTrcv_30_Tja1043.h 
    Header file which has to be included by higher layers. 
    CanTrcv_30_Tja1043.c 
    Implementation 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool [config tool]. 
    File Name 
    Description 
    CanTrcv_30_Tja1043_Cfg.h  Header file contains type definitions and external data 
    declarations. It is included by CanTrcv_30_Tja1043.h. 
    CanTrcv_30_Tja1043_Cfg.c  Contains the configuration data. 
    CanTrcv_GeneralTypes.h 
    Header file with all CAN Transceiver types specified by SWS. 
    This file can be included by Can_GeneralTypes.h. 
    Table 4-2   Generated files 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    12 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    4.2 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions defined for the CANTRCV and illustrates their assignment among each other. 
    Compiler Abstraction 
    Definitions 
     
     
     
     
    R
    DE
     
    A
    V

     
    CO
     
     
    L_
    L_
    R
    P
    NS
    DE
    P
     
    A
    P
    P
    V
    A
    CO
    CO
    A
     
    _
    _
    _
    _
    _
    3
    3
    3
    3
    3
    4
    4
    4
    4
    4
     
    10
    10
    10
    10
    10
    Memory Mapping
    A
    A
    A
    A
    A
     
    J
    J
    J
    J
    J
    Sections
    _T
    _T
    _T
    _T
    _T
     
    30
    30
    30
    30
    30
    _
    _
    _
    _
    _
    V
    V
    V
    V
    V
    RC
    RC
    RC
    RC
    RC
    NT
    NT
    NT
    NT
    NT
    CA
    CA
    CA
    CA
    CA
    CANTRCV_30_TJA1043_START_SEC_CODE 
     
     
     
     
     
    CANTRCV_30_TJA1043_STOP_SEC_CODE 
    CANTRCV_30_TJA1043_START_SEC_CONST_UNSPECI
    FIED 
     
     
     
     
     
    CANTRCV_30_TJA1043_STOP_SEC_CONST_ 
    UNSPECIFIED 
    CANTRCV_30_TJA1043_START_SEC_VAR_NOINIT_ 
    UNSPECIFIED 
     
     
     
     
     
    CANTRCV_30_TJA1043_STOP_SEC_VAR_NOINIT_ 
    UNSPECIFIED 
    Table 4-3   Compiler abstraction and memory mapping 
    4.3 
     Data consistency 
    The  CAN  transceiver  driver  calls  service  functions  of  upper  layers  in  order  to  prevent 
    interruption when accessing the CAN transceiver pins.  
    These  service  functions  have  to  be  provided  by  the  components  VStdLib,  Schedule 
    Manager  or  OSEK  OS  depending  on  which  of  these  components  is  used  for  interrupt 
    disable / restore handling. The component for interrupt control handling has to be selected 
    in the configuration tool. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    13 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    4.4 
    Exclusive Areas 
    The transceiver driver uses the following exclusive areas. 
     
    4.4.1 
    CANTRCV_EXCLUSIVE_AREA_0 
    This section ensures consistent handling of CanTrcv hardware via the DIO interface. 
    >  Protects: atomic / consistent reading of DIO-pins and setting of them. 
    >  Used in: CanTrcv_30_Tja1043_Init(), 
    CanTrcv_30_Tja1043_SetOpMode(), CanTrcv_30_Tja1043_GetOpMode(), 
    CanTrcv_30_Tja1043_CheckWakeup() and 
    CanTrcv_30_Tja1043_MainFunction(). 
    >  Exclude call of CanTrcv driver APIs: CanTrcv_30_Tja1043_Init(), 
    CanTrcv_30_Tja1043_SetOpMode(), CanTrcv_30_Tja1043_GetOpMode(), 
    CanTrcv_30_Tja1043_CheckWakeup() and 
    CanTrcv_30_Tja1043_MainFunction() 
    AND 
    In fact the instructions within the exclusive area must be executed atomic without any 
    interruption / delay in between. 
    >  Duration: Used in calls to DIO module – SHORT duration 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    14 
    based on template version 3.1 



    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    5  Dependencies to other components 
    5.1 
    Dio driver 
    The CAN transceiver driver performs hardware access by calling service functions of the 
    lower layer component Dio driver: 
    >  Function Dio_WriteChannel is used to set the logical level of the channel pins the 
    CAN transceiver hardware is connected to. 
    >  Function Dio_ReadChannel is used to get the logical level of the channel pins the 
    CAN transceiver hardware is connected to. 
    >  The Dio driver has to provide the pin assignment for the CAN transceiver hardware 
    pins EN, STB and ERR. These pins are referred by the CAN transceiver driver using 
    the symbolic names specified in the configuration tool. 
    5.2 
    Icu driver 
    The CAN transceiver driver performs hardware access by calling service functions of the 
    lower layer component Icu driver: 
    >  Function Icu_DisableNotification() is used by the transceiver driver to disable 
    the ICU notification after wakeup event notification. 
    >  Function Icu_EnableNotification() is used by the transceiver driver to enable 
    the ICU notification during the transition into the STANDBY mode. 
     
    Please note 
    The following chapter applies only to this use case: 
      - the used CAN controller does not support the feature "wakeup by CAN bus", i.e. the 
    CAN controller can not detect incoming CAN messages and generate a so-called 
    wakeup-interrupt 
    - the ECU shall wake up and start its own communication due to detected 
    communication on the CAN bus 
     
    The proposal described in this chapter enables the user to support the use-case by using 
    an additional µC I/O port to generate the wakeup information via the ICU driver. This I/ O 
    port  is  connected  either  parallel  to  the  CAN  Rx  port  or  is  directly  attached  to  the  CAN 
    transceivers ERR port (depending on the used CAN transceiver). The following steps have 
    to be done for every CAN channel that shall be able to wake up via the CAN bus: 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    15 
    based on template version 3.1 




    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    5.2.1 
    ICU configuration 
    Add an ICU channel 
     
    Figure 5-1  Add an ICU channel 
    The user has to configure the ICU channel and to add a signal notification function. 
    Additionally the wakeup source for the CAN channel which shall be handled via this ICU 
    channel have to be chosen. 
    In  dependency  of  the  provided  ICU  configuration  options  it  is  possible  to  configure  the 
    “IcuDefaultStartEdge”. This option should be configured to ICU_FALLING_EDGE, because 
    the wakeup event is provided by the Rx pin and/ or the ERR pin via a level change from 
    recessive to dominant. 
     
    Figure 5-2  ICU channel configuration for wakeup via transceiver 
    If  the  transceiver  shall  also  wake  up  the  ECU  and  not  only  the  CAN  channel  then  it  is 
    necessary to activate the “Wakeup Capability” for this ICU channel. 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    16 
    based on template version 3.1 




    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
     
    Figure 5-3  ICU wakeup capability 
    5.2.2 
    Implementation of the signal notification function 
    The  user  has  to  implement  the  signal  notification  function  as  shown  in  the  following 
    example: 
    Example 
     
    void Icu_TrcvWakeUpNotification_0(void) 

     
      /* inform the EcuM about the wakeup event, the parameter  
       * is the configured transceiver wakeup source */ 
      EcuM_CheckWakeup(ECUM_WKSOURCE_CAN0); 

     
    Please note 
    If no wakeup validation is used for the configured wakeup source, then it is possible to 
      call EcuM_SetWakeupEvent() instead of EcuM_CheckWakeup(). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    17 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6  API Description 
    6.1 
    Services provided by CANTRCV 
    The CANTRCV API consists of services, which are realized by function calls. 
     
    6.1.1 
    CanTrcv_30_Tja1043_InitMemory  
    Prototype 
    void CanTrcv_30_Tja1043_InitMemory ( void ) 
    Parameter 


    Return code 
    void 
    none 
    Functional Description 
    This function initializes the memory and needed values of the CAN transceiver driver. 
    Particularities and Limitations 
    >  This function must be called before any other functionality of the CAN transceiver driver. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function must be called from task level and is not reentrant. 
    Table 6-1   CanTrcv_30_Tja1043_InitMemory 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    18 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.2 
    CanTrcv_30_Tja1043_Init  
    Prototype 
    void CanTrcv_30_Tja1043_Init (CanTrcv_30_Tja1043_ConfigType* ConfigPtr) 
    Parameter 
    ConfigPtr[in] 
    Pointer to the CanTrcv_30_Tja1043_Config struct. If multiple 
    configurations are available, the active configuration can be selected by using 
    the related CanTrcv_30_Tja143_Config_<IdentityName> 
    structure. 
    Return code 
    void 
    none 
    Functional Description 
    This function initializes all channels of the CAN Transceiver driver which are configured in the configuration 
    tool. This function has the service id 0x00. 
    Particularities and Limitations 
    >  The function CanTrcv_30_Tja1043_InitMemory must be called before the function 
    CanTrcv_30_Tja1043_Init can be called. 
    >  This function must be called before any other service functionality of the Transceiver driver. 
    >  The DIO driver must be initialized. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function must be called from task level and is not reentrant. 
    Table 6-2   CanTrcv_30_Tja1043_Init 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    19 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.3 
    CanTrcv_30_Tja1043_SetOpMode 
    Prototype 
    Std_ReturnType CanTrcv_30_Tja1043_SetOpMode (uint8 CanTrcvIndex, 
    CanTrcv_TrcvModeType OpMode ) 
    Parameter 
    CanTrcvIndex[in] 
    Index of the selected transceiver channel to which API call has to be applied. 
    OpMode[in] 
    Requested mode to which the transceiver state has to be changed. 
    Return code 
    E_OK / E_NOT_OK 
    E_OK: is returned if the transceiver has accepted the request to change to the 
    requested mode. 
    E_NOT_OK: is returned if the transceiver state cannot be accepted or the 
    parameter is out of the allowed range. The previous state has not been 
    changed. 
    Functional Description 
    Sets the CAN transceiver to the requested operation mode. These operation modes are: 
    >  CANTRCV_TRCVMODE_NORMAL 
    >  CANTRCV_TRCVMODE_STANDBY 
    >  CANTRCV_TRCVMODE_SLEEP 
    If return code is E_OK the notification function CanIf_30_Tja1043_TrcvModeIndication will be 
    called if mode change is completed. Note that the notification will occur in context of 
    CanTrcv_30_Tja1043_SetOpMode. 
    This function has the service id 0x01. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  Not each transition from one mode in any other is allowed. For these limitations please refer to chapter 
    Set operation mode. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function can called from task or interrupt level and is not reentrant. 
    Table 6-3   CanTrcv_30_Tja1043_SetOpMode 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    20 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.4 
    CanTrcv_30_Tja1043_GetOpMode 
    Prototype 
    Std_ReturnType CanTrcv_30_Tja1043_GetOpMode ( uint8 CanTrcvIndex, 
    CanTrcv_TrcvModeType *OpMode ) 
    Parameter 
    CanTrcvIndex[in] 
    Index of the selected transceiver channel to which API call has to be applied. 
    OpMode[out] 
    Pointer to buffer where the current operation mode is stored. 
    Return code 
    E_OK / E_NOT_OK 
    E_OK: is returned if the operation mode was detected. 
    E_NOT_OK: is returned if transceiver operation mode is not initialized. 
    Functional Description 
    Stores the current operation mode of the selected CAN transceiver to OpMode. These operation modes 
    are: 
    >  CANTRCV_CANTRCV_NORMAL 
    >  CANTRCV_CANTRCV_STANDBY 
    >  CANTRCV_CANTRCV_SLEEP 
    The mode is determined from status of PINs of the transceiver hardware. 
    This function has the service id 0x02. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  If a mode change was requested before, the reported operation mode may not be valid until the mode 
    change is completed and CanIf_30_Tja1043_TrcvModeIndication was called. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function can be called from task or interrupt level and is not reentrant. 
    Table 6-4   CanTrcv_30_Tja1043_GetOpMode 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    21 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.5 
    CanTrcv_30_Tja1043_GetBusWuReason 
    Prototype 
    Std_ReturnType CanTrcv_30_Tja1043_GetBusWuReason (uint8 CanTrcvIndex, 
    CanTrcv_TrcvWakeupReasonType *Reason ) 
    Parameter 
    CanTrcvIndex[in] 
    Index of the selected transceiver channel to which API call has to be applied. 
    Reason[out] 
    Pointer to buffer where the bus wake-up reason is stored. 
    Return code 
    E_OK / E_NOT_OK 
    E_OK: is returned if the wake up reason was detected. 
    E_NOT_OK: is returned if bus wake-up reason is not detected or feature is not 
    supported. 
    Functional Description 
    Stores the last wakeup reason for the channel CanTrcvIndex to Reason. These wakeup reasons are: 
    >  CANTRCV_WU_INTERNALLY: The wakeup was caused by setting the CAN transceiver in operation   
    mode via CanTrcv_30_Tja1043_SetOpMode. 
    >  CANTRCV_WU_ERROR: No wakeup was detected by the transceiver and no reason is stored. The 
    function returns E_NOT_OK. 
    >  CANTRCV_WU_NOT_SUPPORTED: No wakeup detection supported by this CAN transceiver. The 
    function returns E_NOT_OK. 
    >  CANTRCV_WU_BY_BUS: The wakeup was caused by an external bus wakeup. 
    >  CANTRCV_WU_RESET: The wakeup was detected after a reset. 
    The wake-up reason is read from state variable. No access to transceiver hardware is performed. 
    This function has the service id 0x03. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  The wakeup reason represents always the last detected wakeup reason. If there was more than one 
    wakeup detected only the last one will be reported. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function can be called from task or interrupt level and is not reentrant. 
    Table 6-5   CanTrcv_30_Tja1043_GetBusWuReason 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    22 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.6 
    CanTrcv_30_Tja1043_SetWakeupMode 
    Prototype 
    Std_ReturnType CanTrcv_30_Tja1043_SetWakeupMode (uint8 CanTrcvIndex, 
    CanTrcv_TrcvWakeupModeType TrcvWakeupMode ) 
    Parameter 
    CanTrcvIndex[in] 
    Index of the selected transceiver channel to which API call has to be applied. 
    TrcvWakeupMode[in]  Requested wake-up mode for the transceiver channel (CanTrcvIndex). 
    Return code 
    E_OK / E_NOT_OK 
    E_OK: is returned, if the wakeup state has been changed to the requested 
    mode. 
    E_NOT_OK: is returned, if the wakeup state change has failed or the 
    parameter is out of the allowed range. The previous state has not been 
    changed. 
    Functional Description 
    Enables and disables the reporting from wakeup events on the channel CanTrcvIndex. 
    >  CANTRCV_WUMODE_ENABLE: Report wakeup events to upper layer. 
    >  CANTRCV_WUMODE_DISABLE: Do not report wakeup events to upper layer. 
    >  CANTRCV_WUMODE_CLEAR: Clear a pending wakeup event. 
    This function has the service id 0x05. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  If wakeup handling is not enabled in configuration tool the function always return E_NOT_OK. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function is called from task or interrupt level and not reentrant. 
    Table 6-6   CanTrcv_30_Tja1043_SetWakeupMode 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    23 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
     
    6.1.7 
    CanTrcv_30_Tja1043_GetVersionInfo 
    Prototype 
    void CanTrcv_30_Tja1043_GetVersionInfo (Std_VersionInfoType 
    *VersionInfo) 
    Parameter 
    VersionInfo[out] 
    Structure pointer to version information of this module. 
    Return code 
    void 
    none 
    Functional Description 
    Get the version info of the module and store it into the structure pointed by VersionInfo.  
    This function has the service id 0x04. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  Configuration Variant(s): CANTRCV_30_TJA1043_GET_VERSION_INFO == STD_ON 
    Expected Caller Context 
    This function can be called from task or interrupt level and is not reentrant. 
    Table 6-7   CanTrcv_30_Tja1043_GetVersionInfo 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    24 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.8 
    CanTrcv_30_Tja1043_CheckWakeup 
    Prototype 
    Std_ReturnType CanTrcv_30_Tja1043_CheckWakeup ( uint8 CanTrcvIndex ) 
    Parameter 
    CanTrcvIndex[in] 
    Index of the selected transceiver channel to which API call has to be applied. 
    Return code 
    E_OK / E_NOT_OK 
    E_OK a wakeup-by-bus event was detected. 
    E_NOT_OK no wakeup was detected or an error occurred. 
    Functional Description 
    This function requests the CAN transceiver driver to check for wakeups and to report them. If a wakeup 
    was detected, the CAN Transceiver reports it by calling of EcuM_SetWakeupEvent. 
    This function has the service id 0x07. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  Do not use the return value E_OK for wakeup detection. A wakeup can be considered as valid only if 
    EcuM_SetWakeupEvent was called for the corresponding wakeup source. 
    >  Configuration Variant(s): - 
    Call context 
    This function can be called from task or interrupt level and is not reentrant. 
    Table 6-8   CanTrcv_30_Tja1043_CheckWakeup 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    25 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    6.1.9 
    CanTrcv_30_Tja1043_MainFunction 
    Prototype 
    void CanTrcv_30_Tja1043_MainFunction (void) 
    Parameter 


    Return code 
    void 
    none 
    Functional Description 
    This service can be called from task level and periodically checks if a wakeup was detected by the 
    underlying transceiver hardware.  
    This function has the service id 0x06. 
    Particularities and Limitations 
    >  The CAN transceiver driver must be initialized. 
    >  This service only has effect if Wakeup support is set to polling. 
    >  Configuration Variant(s): - 
    Expected Caller Context 
    This function can be called from task context and is not reentrant. 
    Table 6-9 
    CanTrcv_30_Tja1043_MainFunction 
     
     
     
    6.2 
    Services used by CANTRCV 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CANTRCV  are  listed.  For  details  about  prototype  and  functionality  refer  to  the 
    documentation of the providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    DIO 
    Dio_WriteChannel 
    DIO 
    Dio_ReadChannel 
    CANIF 
    CanIf_TrcvModeIndication 
    ICU 
    Icu_EnableNotification 
    ICU 
    Icu_DisableNotification 
    Table 6-10   Services used by the CANTRCV 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    26 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    7  Configuration 
    7.1 
    Configuration with DaVinci Configurator 5 
    Refer to the integrated online help and parameter descriptions of Configurator 5. 
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    27 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    8  AUTOSAR Standard Compliance 
    8.1 
    Additions/ Extensions 
    8.1.1 
    Memory initialization 
    To have an independent memory initialization for this BSW module the additional function  
    CanTrcv_30_Tja1043_InitMemory was added. 
    8.2 
    Limitations 
    8.2.1 
    Support of SPI 
    This  CAN  Transceiver  driver  does  not  support  the  connection  to  a  CAN  transceiver  via 
    SPI. 
    8.3 
    Deviations 
    While the driver is implemented according [1], some requirements could not be fulfilled in 
    order to ensure proper functionality. The following chapter lists these deviations. 
    8.3.1 
    Notification functions 
    According to SWS [1] the transceiver shall call notification functions in CanIf. As the given 
    CanTrcvChannelId is valid only for one transceiver driver instance, it was decided to call 
    the following notification functions instead: 
     
    SWS API 
    Used API 
    CanIf_TrcvModeIndication 
    CanIf_30_Tja1043_TrcvModeIndication 
    Table 8-1 
    Deviation of APIs used by CanTrcv 
    Within these functions recalculation of the given CanTrcvIndex has to be performed so 
    that the local index of the driver matches the global index of the CanIf. 
    Affected requirements: CanTrcv086, CanTrcv222, CanTrcv239, CanTrcv238 
     
    8.3.2 
    Unused BSWMD parameters 
    According 
    to 
    SWS 
    [1], 
    the 
    parameters 
    CanTrcvSPICommRetries 
    and 
    CanTrcvSPICommTimeout  shall  have  the  multiplicity  1. As  the  SWS  does  not  describe 
    where to use these values, it was decided to set multiplicity to 0..1 so they do not have to 
    be used. 
    Affected requirements: CanTrcv172, CanTrcv171 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    28 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    8.3.3 
    Initialization of operating mode 
    According to SWS [1] each CAN transceiver channel shall be initialized to operating mode 
    which  is  configured  by  parameter  CanTrcvInitState.  Independent  of  configuration 
    each CAN transceiver channel is initialized into operating mode NORMAL. 
    Affected requirements: CanTrcv100, CanTrcv148. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    29 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    9  Glossary and Abbreviations 
    9.1 
    Glossary 
    Term 
    Description 
    Cfg5 
    DaVinci Configurator 5 
    Table 9-1   Glossary 
     
    9.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CANIF 
    CAN Interface 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    ECUC 
    Electronic Control Unit Configuration 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 9-2   Abbreviations 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    30 
    based on template version 3.1 


    Technical Reference MICROSAR CAN Transceiver driver Tja1043 
    10  Contact 
    Visit our website for more information on 
     
    >   News 
    >   Products 
    >   Demo software 
    >   Support 
    >   Training data 
    >   Addresses 
     
    www.vector-informatik.com 
     
    © 2017 Vector Informatik GmbH 
    Version 4.2.1 
    31 
    based on template version 3.1 

    Document Outline


    1.3.81 - TechnicalReference_CanXcp

    XCP on CAN

    1.3.83 - TechnicalReference_CanXcps


    Technical Reference XCP on CAN 
     
     
     
     
     
     
     
     
     
     
     
     
    XCP on CAN 
    Technical Reference 
     
    XCP on CAN Transport Layer for MICROSAR CanIf 
    Version 1.10.00 
     
     
     
     
     
     
     
     
     
     
    Status 
    Released 
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    Document Information 
    History 
    Date 
    Version 
    Remarks 
    2007-01-26 
    1.00.00  ESCAN00017890: Creation of Cp_XcpOnCanAsr based on 
    Cp_XcpOnCan 
    2008-08-05 
    1.01.00  Adaptations to AUTOSAR R3 
    2009-12-17 
    1.02.00  Support of a2l export. 
    2010-01-14 
    1.03.00  ESCAN00040120: Support MultiChannel 
    Removed Section 3.3 
    2010-03-30 
    1.04.00  ESCAN00041935: Add feature to disable XcpOnCanAsr in serial 
    production ECUs 
    ESCAN00043225: Missing limitation for Multiple Identity with 
    several CAN channels 
    2011-01-04 
    1.05.00  ESCAN00046305: AR3-297 AR3-894: Support PduInfoType instead 
    of the DataPtr 
    2011-03-22 
    1.06.00  ESCAN00049434: Support Monitoring Hooks for AUTOSAR 4 
    2012-04-10 
    1.06.01  ESCAN00052061: Added InitMemory function to chapter 8.2 
    Added Option for AMD Runtime Measurement 
    2013-03-25 
    1.06.02  ESCAN00063622: Remove PduInfoType from TechRef 
    2013-05-27 
    1.07.00  ESCAN00066189: Change API CanXcp_Transmit to CanXcp_Send 
    ESCAN00070335: Remove Monitoring Hooks defined in ASR4 
    ESCAN00069044: Critical Section Description is missing 
    2014-08-15 
    1.07.01  ESCAN00077233: AR3-2679: Description BCD-coded return-value 
    of CanXcp_GetVersionInfo() in TechRef 
    2016-02-10 
    1.08.00  ESCAN00082594: CAN-FD: Document support of mode 2 
    2016-09-07 
    1.09.00  ESCAN00091770: FEAT-1980: Add Multi Client / Multi Connection 
    support 
    2016-10-28 
    1.10.00  Editorial changes 
    Reference Documents 
    No. 
    Title 
    [1] 
    ASAM_XCP_Part1-Overview_V1-1-0.pdf 
    [2] 
    ASAM_AE_MCD-1-XCP_AS_CAN-Transport-Layer_V1-2-0.pdf 
    [3] 
    Technical Reference XCP Protocol Layer, Version 2.04.00 
    [4] 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf V3.0.0 
    Abbreviations 
    Abbreviations 
    Complete expression 
    A2L 
    File Extension for an ASAM 2MC Language File 
    AML 
    ASAM 2 Meta Language 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    API 
    Application Programming Interface 
    ASAM 
    Association for Standardization of Automation and Measuring Systems 
    CAN 
    Controller Area Network 
    CANape 
    Calibration and Measurement Data Acquisition for Electronic Control 
    Systems 
    CMD 
    Command 
    CTO 
    Command Transfer Object 
    DAQ 
    Synchronous Data Acquisition 
    DLC 
    Data Length Code ( Number of data bytes of a CAN message ) 
    DLL 
    Data link layer 
    DTO 
    Data Transfer Object 
    ECU 
    Electronic Control Unit 
    ID 
    Identifier (of a CAN message) 
    Identifier 
    Identifies a CAN message 
    ISR 
    Interrupt Service Routine 
    MCS 
    Master Calibration System 
    Message 
    One or more signals are assigned to each message. 
    MRB 
    Multi receive buffer 
    MRC 
    Multi receive channel 
    OEM 
    Original equipment manufacturer (vehicle manufacturer) 
    RES 
    Command Response Packet 
    SRB 
    Single receive buffer 
    SERV 
    Service Request Packet 
    STIM 
    Stimulation 
    XCP 
    Universal Measurement and Calibration Protocol 
    VI 
    Vector Informatik GmbH 
     
     
    Naming Conventions 
    The names of the access functions provided by the CanXcp always start with a prefix that 
    includes  the  characters  ‘CanXcp’.  The  characters  ‘CanXcp’  are  surrounded  by  an 
    abbreviation which refers to the service or to the layer which requests a XCP service. The 
    designation of the main services is listed below: 
    Naming conventions 
    CanXcp… 
    It is mandatory to use all functions beginning with Xcp… 
    These services are called by either the data link layer, XCP Protocol Layer or 
    the application. 
    They are e.g. used for the transmission of messages. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 



    Technical Reference XCP on CAN 
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
     
    questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    Contents 
    1 
    Overview ....................................................................................................................... 8 
    2 
    Functional Description ................................................................................................. 9 
    2.1 

    Overview of the Functional Scope ...................................................................... 9 
    2.2 
    Reception and Transmission of XCP Packets .................................................... 9 
    3 
    Integration into the Application ................................................................................. 10 
    3.1 

    Files ................................................................................................................. 10 
    3.2 
    Version Changes.............................................................................................. 10 
    3.3 
    MainFunction ................................................................................................... 11 
    3.4 
    Critical Sections / Exclusive Areas ................................................................... 11 
    3.4.1 

    CANXCP_EXCLUSIVE_AREA_0..................................................... 11 
    3.5 
    Activation and Deactivation .............................................................................. 11 
    4 
    Description of the API ................................................................................................ 12 
    4.1 

    Version of the Source Code ............................................................................. 12 
    4.2 
    XCP on CAN Transport Layer services called by the Protocol Layer ................ 12 
    4.2.1 

    CanXcp_Send: Transmission of XCP Packets ................................. 12 
    4.2.2 
    CanXcp_MainFunction: Main Function of XCP on CAN Transport 
    Layer ................................................................................................ 13 

    4.3 
    XCP Transport Layer for CAN services called by the CAN Interface ................ 14 
    4.3.1 

    Xcp_CanIfRxIndication: XCP Message Indication Function .............. 14 
    4.3.2 
    Xcp_CanIfTxConfirmation: XCP Message Confirmation ................... 14 
    4.4 
    XCP Protocol Layer services called by the XCP on CAN Transport Layer ........ 15 
    4.5 
    XCP on CAN Transport Layer services called by other layers .......................... 15 
    4.5.1 

    CanXcp_Init: Initialization of XCP on CAN Transport Layer .............. 15 
    4.5.2 
    CanXcp_GetVersionInfo: Request version information of XCP on 
    CAN Transport Layer ....................................................................... 15 

    4.5.3 
    CanXcp_SetPduMode: set Transmission mode ............................... 16 
    4.6 
    Macros ............................................................................................................. 16 
    4.6.1 

    XCP_ACTIVATE: Enable the Protocol and Transport Layer ............. 16 
    4.6.2 
    XCP_DEACTIVATE: Disable the Protocol and Transport Layer ........ 17 
    4.6.3 
    A2L File ............................................................................................ 18 
    5 
    Limitations .................................................................................................................. 19 
    5.1.1 
    Assignment of CAN identifiers to DAQ Lists is not supported ........... 19 
    5.1.2 
    Detection of all XCP Slaves within a Network ................................... 19 
    5.1.3 
    Multiple Identity only supported for single channel configuration ...... 19 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    6 
    FAQ .............................................................................................................................. 20 
    6.1 

    Transmit Queue of CAN Interface is Disabled .................................................. 20 
    6.2 
    Additions & Extension ...................................................................................... 20 
    6.2.1 

    CanXcp_InitMemory ......................................................................... 20 
    7 
    Contact ........................................................................................................................ 21 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
      
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    1  Overview 
    This document  describes  the features, API,  configuration  and  integration  of the  CanXcp. 
    The XCP Protocol Layer, which is already described within a separate document [3], is not 
    covered by this document. 
    Please  also  refer  to  “The  Universal  Measurement  and  Calibration  Protocol  Family” 
    specification by ASAM e.V. 
    XCP on CAN is a hardware independent protocol that can be ported to almost any CAN 
    controller.  Due  to  there  are  numerous  combinations  of  micro  controllers,  compilers  and 
    memory  models  it  cannot  be  guaranteed  that  it  will  run  properly  on  any  of  the  above 
    mentioned combinations. 
    Please  note  that  in  this  document  the  term  Application  is  not  used  strictly  for  the  user 
    software but also for any higher software layer. Therefore, Application refers to any of the 
    software components using XCP on CAN. 
    The API of the functions is described in a separate chapter at the end of this document. 
    Referred functions are always shown in the single channel mode. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    2  Functional Description 
    2.1 
    Overview of the Functional Scope 
    The transmission and reception of XCP Packets is managed by the XCP Transport Layers. 
    These use the AUTOSAR CanIf for the transmission and reception of XCP Packets.  
     
    The message length depends on the PDU size and can be 8  Bytes on CAN or up to 64 
    Bytes on CAN-FD (Mode 2). 
    2.2 
    Reception and Transmission of XCP Packets 
    Upon reception of any XCP message the function 
    void Xcp_CanIfRxIndication ( PduIdType CanCanXcpRxPduId,  
    const PduInfoType *CanSduPtr ) 
    (4.3.1) 
    is called by the CAN Interface and the XCP Packet is passed to the XCP Protocol Layer. 
    After the command has been processed by the Protocol Layer the XCP Response Packet 
    is passed to the Transport Layer by the service 
    void CanXcp_Send (uint8 Xcp_Channel, uint8 len, MEMORY_ROM 
    BYTEPTR msg ) 
    (4.2.1) 
    The XCP message is transmitted via the CAN Interface’s service 
    uint8 CanIf_Send ( PduIdType CanTxPduId,  
    const PduInfoType *PduInfoPtr ) 
    The successful transmission is confirmed by the CAN Interface by a call of 
    void Xcp_CanIfTxConfirmation ( PduIdType CanTxPduId ) 
    (4.3.2) 
    The confirmation is passed from the XCP on Can Transport Layer to the Protocol Layer by 
    the XcpSendCallback. 
    Asynchronous XCP Packet transmission like e.g. SERV, EV and DAQ are also transmitted 
    and confirmed by the above described sequence. 
    Please  note  that  after  Initialization  the  XCP  is  in  PDU  Mode  CANXCP_SET_OFFLINE. 
    Normally it is enabled by the CAN State Manager. If the State Manager is not present or a 
    State Manager from another vendor is used this has to be enabled manually by using the 
    following API with CANXCP_SET_ONLINE: 
    void CanXcp_SetPduMode ( NetworkHandleType XcpNwH, 
    CanXcp_PduSetModeType PduMode ) 
    (4.5.3) 
    If this is not done, the XCP will not send anything! 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 

    based on template version 5.1.0 








    Technical Reference XCP on CAN 
    3  Integration into the Application 
    This chapter describes the steps for  the integration of the XCP on CAN Transport Layer 
    into an application environment of an ECU. 
    3.1 
    Files 
    The XCP on CAN Transport Layer consists of the following files: 
    Files of the XCP on CAN Transport Layer 
    CanXcp.c 
    XCP on CAN Transport Layer. 
    This file must not be changed by the user! 
     
    CanXcp.h 
    API of the XCP on CAN Transport Layer. 
    This file must not be changed by the application! 
     
    This file has to be included prior to XcpProf.h. 
    CanXcp_Types.h  Type definitions of the XCP on CAN Transport Layer. 
    This file must not be changed by the application! 
     
    This file is handled internally and must not be included 
    separately. 
     
     
     
     
    Additionally the following files are generated by the generation tool GENy. 
    Files generated by GENy 
    CanXcp_Cfg.h 
    Configuration file for XCP on CAN. 
    External declarations for the parameters. 
     
    CanXcp_Lcfg.c 
    Link time parameter definition for the XCP on CAN. 
     
    CanXcp_PBcfg.c  Post build parameter definition for the XCP on CAN. 
     
     
     
     
     
    Note  that  all files  of  XCP  on  CAN must  not be  changed manually  except  if  not  GENy  is 
    used for he configuration of the AUTOSAR CAN Interface. In this case only the generated 
    files CanXcp_Cfg.h, CanXcp_Lcfg.c and CanXcp_PBcfg.c are relevant. 
     
    3.2 
    Version Changes 
    Changes and the release versions of the XCP on CAN Transport Layer are  listed at  the 
    beginning of the header and source code. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    10 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    3.3 
    MainFunction 
    Normally the CanXcp_MainFunction is called cyclically by the Schedule Manager (SchM). 
    If  no  SchM  is  present  or  a  3rd  party  SchM  is  used  the  CanXcp_MainFunction  must  be 
    called  cyclically  by  the  application.  The  purpose  of  the  MainFunction  is  to  send  queued 
    messages that failed to be sent immediately. Therefore the call cycle is not very critical. A 
    call cycle of 5 or 10ms is sufficient in most cases. 
    3.4 
    Critical Sections / Exclusive Areas 
    The XCP makes use of interrupt locking to guarantee atomic operation of critical sections. 
    For this purpose one exclusive area is defined 
      CANXCP_EXCLUSIVE_AREA_0 
    The exclusive area must be mapped to interrupt lock and unlock functions which can be 
    called nested. The exclusive areas are used in the following cases: 
     
    3.4.1 
    CANXCP_EXCLUSIVE_AREA_0 
    This area is used whenever the services Xcp_Event, Xcp_SendCallBack, 
    Xcp_MainFunction  and  Xcp_Command can interrupt each other. 
    Please read the Technical Reference XCP Protocol Layer [3] for further information. 
    3.5 
    Activation and Deactivation 
    The XCP provides functionality to disable the component during runtime. This is useful if 
    the component shall remain in series production ECUs where XCP is disabled by default 
    and can be enabled by, e.g. a Diagnosis service. 
    By  default  XCP  is  enabled.  The  functionality  of  the  XCP  can  be  disabled  by  calling  the 
    Macro: 
    XCP_DEACTIVATE() 
    (4.6.2) 
    It can be enabled again by calling the respective Macro: 
      XCP_ACTIVATE()                                                                     (4.6.1) 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    11 
    based on template version 5.1.0 



    Technical Reference XCP on CAN 
    4  Description of the API 
    The API of XCP on CAN consists of services, which are realized by function calls. These 
    services are called wherever they are required. They transfer information to- or take over 
    information  from  XCP  on  CAN.  This  information  is  stored  in  XCP  on  CAN  until  it  is  not 
    required anymore, respectively until it is changed by other operations. 
    Examples for calling the services  of XCP on CAN can be found in the description of the 
    services. 
    4.1 
    Version of the Source Code 
    The  source  code  version  of  the  XCP  on  CAN Transportation  Layer  is  provided  by  three 
    BCD coded constants: 
     
    CONST(uint8, CANXCP_CONST) kXcpOnCanAsrMainVersion    = 
    (uint8)(CP_XCPONCANASR_VERSION >> 8); 
    CONST(uint8, CANXCP_CONST) kXcpOnCanSubAsrVersion     = 
    (uint8)(CP_XCPONCANASR_VERSION & 0x00ff); 
    CONST(uint8, CANXCP_CONST) kXcpOnCanAsrReleaseVersion = 
    (uint8)(CP_XCPONCANASR_RELEASE_VERSION);  
     
    Example 
    Version 1.00.00 is registered as: 
     
    kXcpOnCanAsrMainVersion = 0x01; 
    kXcpOnCanAsrSubVersion = 0x00; 
    kXcpOnCanAsrReleaseVersion = 0x00; 
     
    These constants are declared as external and can be read by the application at any time. 
     
    4.2 
    XCP on CAN Transport Layer services called by the Protocol Layer 
    The following XCP on CAN Transport Layer functions are called by the Protocol Layer.   
    The API of these functions can be found in the header of the XCP on CAN component. 
     
    4.2.1 
    CanXcp_Send: Transmission of XCP Packets 
    CanXcp_Send 
    Prototype 
    void CanXcp_Send ( uint8 Xcp_Channel, uint8 len, const uint8* msg ) 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    12 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    Parameter 
    Xcp_Channel 
    Logical channel of the protocol layer. Depending whether Multi Client is 
    enabled this parameter will always be 0 (Multi Client disabled) or reflect the 
    logical Xcp channel (Multi Client enabled). 
    len 
    Length of the XCP Packet that has to be transmitted. 
    (with len = 1 ... 8 on CAN and 1..64 on CAN-FD) 
    msg 
    Pointer to the XCP Packet data. 
    Return code 


    Functional Description 
    Request for the transmission of a DTO or CTO message. 
     
    Particularities and Limitations 
      Not re-entrant 
      Call context of: XcpEvent, XcpBackground and context of CAN Interface 
     
    4.2.2 
    CanXcp_MainFunction: Main Function of XCP on CAN Transport Layer 
    CanXcp_MainFunction 
    Prototype 
    void CanXcp_MainFunction ( void ) 
    Parameter 


    Return code 


    Functional Description 
    Main function of XCP on CAN Transport Layer. 
     
    Particularities and Limitations 
      Not re-entrant 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    13 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    4.3 
    XCP Transport Layer for CAN services called by the CAN Interface 
    The following  XCP  on  CAN Transport  Layer  functions  are  called by  the AUTOSAR  CAN 
    Interface. The API  of  these functions  can be  found  in  the  header  of  the  CAN  Interface’s 
    parameter file. 
     
    4.3.1 
    Xcp_CanIfRxIndication: XCP Message Indication Function  
    Xcp_CanIfRxIndication 
    Prototype 
    void Xcp_CanIfRxIndication ( PduIdType CanCanXcpRxPduId, const 
    PduInfoType * PduInfoPtr) 
    Parameter 
    CanCanXcpRxPduId 
    Target PDU ID of CAN L-PDU that has been received 
    PduInfoPtr 
    Contains pointer and length to received XCP L-SDU 
    Return code 


    Functional Description 
    Rx Indication for reception of CTO and DTO Packets. 
    This function is configured in the generation tool.  
    Particularities and Limitations 
      Not re-entrant 
      Call context of CAN Interface 
     
    4.3.2 
    Xcp_CanIfTxConfirmation: XCP Message Confirmation 
     
    Xcp_CanIfTxConfirmation 
    Prototype 
    void Xcp_CanIfTxConfirmation ( PduIdType CanTxPduId ) 
    Parameter 
    CanTxPduId 
    PDU ID of CAN L-PDU transmitted successfully 
    Return code 


    Functional Description 
    Tx Confirmation for successful transmission of CTO and DTO Packets. 
    This function is configured in the generation tool. 
    Particularities and Limitations 
      Not re-entrant 
      Call context of CAN Interface 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    14 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    4.4 
    XCP Protocol Layer services called by the XCP on CAN Transport Layer 
    The following XCP Protocol Layer services are called by the XCP on CAN Transport Layer: 

    void Xcp_Command( uint8 Xcp_Channel, const uint32* pCommand ) 

    void Xcp_SendCallBack( uint8 Xcp_Channel ) 

    void Xcp_SetActiveTl( uint8 Xcp_Channel, uint8 Tl ) 

    uint8 Xcp_GetActiveTl( uiont8 Xcp_Channel ) 

    uint8 Xcp_GetSessionStatus( uint8 Xcp_Channel ) 
     
    For  a  description  of  the API  and  the  functionality  of  these  functions  please  refer  to  the 
    Technical Reference XCP Protocol Layer [3]. 
     
    4.5 
    XCP on CAN Transport Layer services called by other layers 
    The following XCP on CAN Transport Layer functions have to be called from other layers. 
    4.5.1 
    CanXcp_Init: Initialization of XCP on CAN Transport Layer 
    CanXcp_Init 
    Prototype 
    void CanXcp_Init (const CanXcp_ConfigType * ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to the post build configuration 
    Return code 


    Functional Description 
    Initialization of the XCP on Transport Layer.  
     
    Particularities and Limitations 
      Must be called during system initialization 
      Not re-entrant 
      Parameter ‘ConfigPtr’ is only evaluated for post build configurations. 
     
    4.5.2 
    CanXcp_GetVersionInfo: Request version information of XCP on CAN 
    Transport Layer 

    CanXcp_Init 
    Prototype 
    void CanXcp_GetVersionInfo (Std_VersionInfoType * Versioninfo ) 
    Parameter 
    Versioninfo 
    Pointer to store the version information 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    15 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    Return code 


    Functional Description 
    CanXcp_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of the 
    component. The versions are BCD-coded. 
    Particularities and Limitations 
      none 
     
    4.5.3 
    CanXcp_SetPduMode: set Transmission mode 
    CanXcp_SetPduMode 
    Prototype 
    void CanXcp_SetPduMode( NetworkHandleType XcpNwH, CanXcp_PduSetModeType PduMode 
    ); 
    Parameters [in/out/both] 
    XcpNwH [in] 
    The Network Handle which is usually 0 
    PduMode 
    This is the new state. It can either be 
     
    CANXCP_SET_ONLINE 
     
    CANXCP_SET_OFFLINE 
    Return code 


    Service ID 
    Service ID 

    Functional Description 
    With this service it is possible to prevent transmission of XCP frames, e.g. when the bus is offline. The 
    frames are not lost but stored in the Send Queue until overrun occurs or transmission is enabled again. 
    Preconditions 

    Postconditions 

    Particularities and Limitations 
     
    Call context: task level 
     
    Not re-entrant 
     
    Synchronous 
     
    4.6 
    Macros 
    4.6.1 
    XCP_ACTIVATE: Enable the Protocol and Transport Layer 
    XCP_ACTIVATE 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    16 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    Prototype 
    XCP_ACTIVATE(); 
    Parameters [in/out/both] 
    Command [in] 

    Return code 


    Service ID 
    Service ID 

    Functional Description 
    With this service it is possible to enable all functionality of the XCP Protocol and Transport Layer during 
    runtime to prevent erroneous execution.  
    Preconditions 

    Postconditions 

    Particularities and Limitations 
     
    Call context: task level 
     
    Not re-entrant 
     
    Synchronous 
     
    4.6.2 
    XCP_DEACTIVATE: Disable the Protocol and Transport Layer 
    XCP_DEACTIVATE 
    Prototype 
    XCP_DEACTIVATE(); 
    Parameters [in/out/both] 
    Command [in] 

    Return code 


    Service ID 
    Service ID 

    Functional Description 
    With this service it is possible to lock all functionality of the XCP Protocol and Transport Layer during runtime 
    to prevent erroneous execution.  
    Preconditions 

    Postconditions 

    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    17 
    based on template version 5.1.0 



    Technical Reference XCP on CAN 
    Particularities and Limitations 
     
    Call context: task level 
     
    Not re-entrant 
     
    Synchronous 
     
    4.6.3 
    A2L File 
    GENy exports an a2l file for easier configuration of the XCP Master (e.g.  CANape). This 
    file is called CanXCPAsr.a2l and contains the XCP_ON_CAN IF_DATA section which can 
    be included by a master template a2l file. 
    Hint! 
     The following abstract can be used to include the generated a2l: 
     
      /begin IF_DATA XCP 
        …….. 
        /include "CanXCPAsr.a2l" 
      /end IF_DATA 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    18 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    5  Limitations 
    5.1.1 
    Assignment of CAN identifiers to DAQ Lists is not supported 
    The assignment of CAN identifiers to DAQ lists is not supported. There is only one CAN 
    identifier  for  CMD/STIM  and  one  CAN  identifier  for  RES/EV/DAQ.  The  command 
    GET/SET_DAQ_ID is not supported. 
    5.1.2 
    Detection of all XCP Slaves within a Network 
    The detection of all XCP slaves within a network with the command GET_SLAVE_ID is not 
    supported. 
    5.1.3 
    Multiple Identity only supported for single channel configuration  
    Multiple Identities for AUTOSAR XCP on CAN is only available for a single CAN channel 
    configuration. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    19 
    based on template version 5.1.0 



    Technical Reference XCP on CAN 
    6  FAQ 
    6.1 
    Transmit Queue of CAN Interface is Disabled 
     
    FAQ 
    How to operate XCP on CAN if the transmit queue of CanIf is disabled. 
     
     
    If the transmit queue of CanIf is disabled, at any time it might not be possible to transmit 
    the  XCP  Slave  message  due  to  an  on-going  message  transmission.  Therefore  the 
    message transmission might have to be requested several times. 
    This  is  done  with  the  service  CanXcp_MainFunction().  This  service  has  to  be  called 
    cyclically  with  a  recommended  call  cycle  of  1ms.  The  faster  it  gets  called  the  faster  the 
    XCP Slave message will participate in the arbitration on the bus. 
    6.2 
    Additions & Extension 
    6.2.1 
    CanXcp_InitMemory 
    The function CanXcp_InitMemory is an extension to AUTOSAR and must be used when 
    the memory is not initialized by the startup code. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    20 
    based on template version 5.1.0 


    Technical Reference XCP on CAN 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    © 2016 Vector Informatik GmbH 
    Version 1.10.00 
    21 
    based on template version 5.1.0 

    Document Outline


    1.3.84 - TechnicalReference_Cdd_Asr4DiagVsg

    MICROSAR Vsg

    1.3.86 - TechnicalReference_Cdd_Asr4DiagVsgs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Vsg 
    Technical Reference 
     
     
    Version 3.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Savas Ates 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR Vsg 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    S. Ates 
    2014-05-08 
    1.0.0 
    Document creation 
    S. Ates 
    2015-09-22 
    2.0.0 
    Rework of initialization concept 
    S. Ates 
    2017-03-12 
    3.0.0 
    VSG support Dcm 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_DET.pdf 
    V4.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DEM.pdf 
    V4.2.0 
    [3]   AUTOSAR 
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [4]   Vector 
    TechnicalReference_Dem.pdf 
    V7.0.0 
    [5]   Vector 
    TechnicalReference_Dcm.pdf 
    V7.2.0 
    [6]   Vector 
    TechnicalReference_CANdesc 
    V3.7.0 
    Scope of the Document:  
    This technical reference describes the general use of the Cdd_Vsg software. 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 

    How to read this document ................................................................................ 7 
    2.2 
    Architecture Overview ........................................................................................ 7 
    3 
    Functional Description ................................................................................................. 9 
    3.1 

    VSG ................................................................................................................... 9 
    3.2 
    Features ............................................................................................................ 9 
    3.3 
    Initialization ...................................................................................................... 10 
    3.4 
    Error Handling .................................................................................................. 10 
    3.4.1 

    Development Error Reporting ........................................................... 10 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Shutdown ......................................................................................................... 11 
    4.2 
    Scope of Delivery ............................................................................................. 11 
    4.2.1 

    Static Files ....................................................................................... 11 
    4.2.2 
    Dynamic Files .................................................................................. 11 
    4.3 
    Include Structure .............................................................................................. 12 
    4.4 
    Compiler Abstraction and Memory Mapping ..................................................... 12 
    4.5 
    Critical Sections ............................................................................................... 13 
    5 
    API Description ........................................................................................................... 14 
    5.1 

    Type Definitions ............................................................................................... 14 
    5.2 
    Services provided by Cdd_Vsg ........................................................................ 14 
    5.2.1 

    Vsg_EnableVsg() ............................................................................. 14 
    5.2.2 
    Vsg_DisableVsg() ............................................................................ 15 
    5.2.3 
    Vsg_EnableVsgMultiple() ................................................................. 16 
    5.2.4 
    Vsg_DisableVsgMultiple() ................................................................ 16 
    5.2.5 
    Vsg_IsVsgActive() ............................................................................ 17 
    5.2.6 
    Vsg_IsAnyVsgActive() ...................................................................... 18 
    5.2.7 
    Vsg_Finalize() .................................................................................. 18 
    5.2.8 
    Vsg_GetVersionInfo() ....................................................................... 19 
    5.2.9 
    Vsg_Init() ......................................................................................... 19 
    5.2.10 
    Vsg_InitMemory() ............................................................................. 19 
    5.2.11 
    Vsg_Shutdown() .............................................................................. 20 
    5.3 
    Services used by Cdd_Vsg .............................................................................. 20 
    5.4 
    Callback Functions ........................................................................................... 21 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    6 
    Configuration .............................................................................................................. 22 
    6.1 

    Configuration Variants ...................................................................................... 22 
    6.2 
    Configuration Attributes .................................................................................... 22 
    7 
    Glossary and Abbreviations ...................................................................................... 23 
    7.1 

    Abbreviations ................................................................................................... 23 
    8 
    Contact ........................................................................................................................ 24 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    Illustrations 
    Figure 2-1 
    AUTOSAR  Architecture Overview .............................................................. 7 
    Figure 2-2 
    Interfaces to adjacent modules of the Cdd_Vsg .......................................... 8 
    Figure 4-1 
    Include structure ....................................................................................... 12 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 3-1  
    Supported features ..................................................................................... 9 
    Table 3-2  
    Service IDs ............................................................................................... 10 
    Table 3-3  
    Errors reported to DET ............................................................................. 10 
    Table 4-1  
    Generated files ......................................................................................... 11 
    Table 4-2  
    Compiler abstraction and memory mapping .............................................. 13 
    Table 5-1  
    Type definitions ......................................................................................... 14 
    Table 5-2  
    Vsg_EnableVsg() ...................................................................................... 15 
    Table 5-3  
    Vsg_DisableVsg() ..................................................................................... 15 
    Table 5-4  
    Vsg_EnableVsgMultiple() ......................................................................... 16 
    Table 5-5  
    Vsg_DisableVsgMultiple() ......................................................................... 17 
    Table 5-6  
    Vsg_IsVsgActive() .................................................................................... 17 
    Table 5-7  
    Vsg_IsAnyVsgActive() .............................................................................. 18 
    Table 5-8  
    Vsg_Finalize() ........................................................................................... 18 
    Table 5-9  
    Vsg_GetVersionInfo() ............................................................................... 19 
    Table 5-10  
    Vsg_Init() .................................................................................................. 19 
    Table 5-11  
    Vsg_InitMemory() ..................................................................................... 20 
    Table 5-12  
    Vsg_Shutdown ......................................................................................... 20 
    Table 5-13  
    Services used by the Cdd_Vsg ................................................................. 20 
    Table 7-1  
    Abbreviations ............................................................................................ 23 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Initial Version 
    2.00.00 
    Rework Initialization Concept 
    3.00.00 
    Breaking change in Data model of DaVinci Configurator 
    4.00.00 
    VSG support Dcm 
    Table 1-1   Component history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 



    Technical Reference MICROSAR Vsg 
    2  Introduction 
    This document describes the functionality, API and configuration of the  MICROSAR BSW 
    module Cdd_Vsg.  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    VSG_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    VSG_MODULE_ID   
    255 decimal 
    (according to ref. [3]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    The Vsg is a module to support different diagnostic configurations in a car. VSGs are also 
    called “dependencies”. 
    2.1 
    How to read this document 
    In  this documentation the  MICROSAR  Vsg  module  will  be  called Cdd_Vsg. Thus  should 
    make it easy to distinguish linguistically between the MICROSAR Vsg module and VSG as 
    Vehicle System Group. 
    2.2 
    Architecture Overview 
    The following figure shows where the Cdd_Vsg is located in the AUTOSAR architecture. 
     
      
     Figure 2-1  AUTOSAR  Architecture Overview   
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
     
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  Cdd_Vsg.  These 
    interfaces are described in chapter 5.  
     
     cmp Architecture ov erv iew
    Dem
    Cdd_Vsg
    Det
    Dcm
     
    Figure 2-2  Interfaces to adjacent modules of the Cdd_Vsg 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    3  Functional Description 
    3.1 
    VSG 
    A VSG provides the possibility to group a set of diagnostic objects. The availability of these 
    diagnostic objects can be changed by enabling or disabling the associated VSG. 
     
    The APIs  Vsg_EnableVsg()and  Vsg_DisableVsg()allow  to  enable/disable  individual 
    required VSGs and the associated diagnostic objects during runtime after the initialization 
    of the Cdd_Vsg.  
    Enabling a VSG sets the status of a VSG to active if all associated diagnostic objects are 
    enabled successfully. If enabling of at least one diagnostic object fails the status of VSG is 
    set to undefined. Status of VSG is not changed if no diagnostic object is enabled. 
    Disabling a VSG sets the status of  a VSG  to inactive  if  all associated diagnostic objects 
    are  enabled  successfully.  If  disabling  of  at  least  one  diagnostic  object  fails  the  status  of 
    VSG is set to undefined. Status of VSG is not changed if no diagnostic object is disabled. 
     
    During initialization the status of each VSG is set to undefined. Therefore after initialization 
    it is recommended to enable required VSGs and use the API Vsg_Finalize() to disable 
    all VSGs with undefined status along with their associated diagnostic objects. 
     
    Undefined VSGs will be disabled during shutdown of the Cdd_Vsg. 
    3.2 
    Features 
    The features listed in the following table cover the complete functionality specified for the 
    Cdd_Vsg: 
     
    Supported Features 
    Enable VSG 
    Enabling a single VSG using the service Vsg_EnableVsg(). 
    Enabling multiple VSGs using the service Vsg_EnableVsgMultiple(). 
    Disable VSG 
    Disabling a single VSG using the service Vsg_DisableVsg(). 
    Disabling multiple VSGs using the service Vsg_DisableVsgMultiple(). 
    Query VSG status 
    Query VSG status using the service  Vsg_IsVsgActive() or  Vsg_IsAnyVsgActive(). 
    Finalize VSGs 
    Disabling all VSGs with status undefined using the service Vsg_Finalize(). 
    Table 3-1   Supported features 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    3.3 
    Initialization 
    The interface Vsg_Init() sets the status of each VSG to undefined.  
     
    3.4 
    Error Handling 
    3.4.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [1],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter VSG_DEV_ERROR_DETECT==STD_ON). 
    The reported module ID for the module Cdd_Vsg is 255 (Complex Device Driver). 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Vsg_GetVersionInfo 
    0x02 
    Vsg_EnableVsg 
    0x03 
    Vsg_DisableVsg 
    0x04 
    Vsg_Finalize 
    0x05 
    Vsg_IsVsgActive 
    0x06 
    Vsg_IsAnyVsgActive 
    0x07 
    Vsg_EnableVsgMultiple 
    0x08 
    Vsg_DisableVsgMultiple 
    0x20 
    Vsg_SetVsgMultiple (Internal Function) 
    0x30 
    Vsg_Shutdown 
    Table 3-2   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    VSG_E_PARAM_POINTER  Service called with an invalid NULL pointer argument. 
    VSG_E_PARAM_DATA 
    Service was called with invalid parameter value. 
    VSG_E_UNINIT 
    Service called in uninitialized state. 
    Table 3-3   Errors reported to DET 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    10 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  Cdd_Vsg 
    into an application environment of an ECU. 
    VSGs in the diagnostic kernel have to be handled separately. For reference see [6]. 
    4.1 
    Shutdown 
    The interface Vsg_Shutdown() has to be called before the shutdown of the Dem module 
    (see [4]). Otherwise configured diagnostic events that are associated to a VSG will not be 
    disabled at shutdown. 
    4.2 
    Scope of Delivery 
    The delivery of the Cdd_Vsg contains the files which are described in the chapters  4.2.1 
    and 4.2.2:
     
     
    4.2.1 
    Static Files 
    The delivery of the Cdd_Vsg does not contain static files. 
     
    4.2.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator Pro. 
    File Name 
    Description 
    Vsg.h 
    This header file provides the Cdd_Vsg API functions for BSW modules and the 
    application. This file is supposed to be included by client modules. 
    Vsg.c 
    This is the source file of the Cdd_Vsg. It contains all functionality of the 
    Cdd_Vsg. 
    Table 4-1   Generated files 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    11 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    4.3 
    Include Structure 
     class IncludeStructure
    Std_types.h
    VSG
    «include»
    Dem.h
    Vsg.h
    «include»
    «include»
    Dcm.h
    «include»
    Vsg.c
    Det.h
    «include»
     
    Figure 4-1  Include structure 
    4.4 
    Compiler Abstraction and Memory Mapping 
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of the Cdd_Vsg and illustrates their assignment among each other. 
     
    Compiler Abstraction 
     
    Definitions
     
     
    A
     
    INIT
    T
     
     

    _DA
     
    DE
    NS
    L
    R_INIT
    R_NO
    P
    Memory Mapping 
    A
    A
    P
    CO
    CO
    V
    V
    A
    _
    _
    _
    _
    _
    Sections 
    G
    G
    G
    S
    S
    S
    VSG
     
    VSG
     
    V
     
    V  
    V
    VSG_START_SEC_CODE 
     
     
     
     
     
    VSG_STOP_SEC_CODE 
    VSG_START_SEC_CONST_<size> 
     
     
     
     
     
    VSG_STOP_SEC_CONST_<size> 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    12 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    VSG_START_SEC_VAR_INIT_<size> 
     
     
     
     
     
    VSG_STOP_SEC_VAR_INIT_<size> 
    VSG_START_SEC_VAR_NOINIT_UNSPECIFIED
     
     
     
     
     
     
    VSG_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    Application buffer used in API 
     
     
     
     
     
    Table 4-2   Compiler abstraction and memory mapping 
     
     
     
    4.5 
    Critical Sections   
    There are no critical sections defined for the Cdd_Vsg. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    13 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    5  API Description 
    For an interface overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the Cdd_Vsg are described in Table 5-1. 
    Type Name 
    C-
    Description 
    Value Range 
    Type 
    Vsg_VsgItemIdType 
    uint16  Unique identification of a 
    0..65535 
    VSG  
    Vsg_VsgItemIdSizeType  uint16  Number of VSGs 
    0..65535 
    Vsg_VsgStateType 
    uint8 
    VSG status type 
    VSG_VSGENABLED 
    VSG status is active 
    VSG_VSGDISABLED 
    VSG status is inactive 
     
    Table 5-1   Type definitions  
     
     
    5.2 
    Services provided by Cdd_Vsg 
    5.2.1 
    Vsg_EnableVsg() 
    Prototype 
    Std_ReturnType  Vsg_EnableVsg(Vsg_VsgItemIdType VsgItemId) 
    Parameter 
    VsgItemId 
    Unique identification of a VSG (Vehicle System Group). 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful, VSG status is now active. 
    E_NOT_OK: one or more diagnostic objects could not be enabled. VSG status 
    is undefined if at least one diagnostic object is enabled, otherwise VSG status 
    is not modified. 
    Functional Description 
    API to enable a single Vehicle System Group. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    14 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant (for different VsgItemIds). 
    >  This function is not reentrant with other Services provided by Cdd_Vsg. 
    >  This function is synchronous. 
    Table 5-2   Vsg_EnableVsg()  
     
    5.2.2 
    Vsg_DisableVsg() 
    Prototype 
    Std_ReturnType  Vsg_DisableVsg(Vsg_VsgItemIdType VsgItemId) 
    Parameter 
    VsgItemId 
    Unique identification of a VSG (Vehicle System Group). 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful, VSG status is now inactive. 
    E_NOT_OK: one or more diagnostic objects could not be disabled. VSG 
    status is undefined if at least one diagnostic object is disabled, otherwise VSG 
    status is not modified. 
    Functional Description 
    API to disable a single Vehicle System Group. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant (for different VsgItemIds). 
    >  This function is not reentrant with other Services provided by Cdd_Vsg. 
    >  This function is synchronous. 
    Table 5-3   Vsg_DisableVsg() 
     
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    15 
    based on template version 5.7.1 



    Technical Reference MICROSAR Vsg 
    5.2.3 
    Vsg_EnableVsgMultiple() 
    Prototype 
    Std_ReturnType  Vsg_EnableVsgMultiple(Vsg_VsgItemIdType* VsgItemList, 
    Vsg_VsgItemIdSizeType NumOfVsgItems) 
    Parameter 
    VsgItemList 
    Pointer to a list of VSGs (Vehicle System Groups). 
    NumOfVsgItems 
    Number of VSGs in VsgItemList. 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful. 
    E_NOT_OK: one or more VSGs could not be enabled. 
    Functional Description 
    API to enable multiple Vehicle System Groups. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant (for different VsgItemIds). 
    >  This function is not reentrant with other Services provided by Cdd_Vsg. 
    >  This function is synchronous. 
    Table 5-4   Vsg_EnableVsgMultiple()  
     
     
     
    Caution 
    Vehicle System Groups that reference a DCM object shall only exist once in the passed 
      VsgItemList. Otherwise a buffer overflow can occur. This error will be reported if 
    DET is used (see 3.4 Error Handling). 
     
     
     
     
     
    5.2.4 
    Vsg_DisableVsgMultiple() 
    Prototype 
    Std_ReturnType  Vsg_DisableVsgMultiple(Vsg_VsgItemIdType* VsgItemList, 
    Vsg_VsgItemIdSizeType NumOfVsgItems) 
    Parameter 
    VsgItemList 
    Pointer to a list of VSGs (Vehicle System Groups). 
    NumOfVsgItems 
    Number of VSGs in VsgItemList. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    16 
    based on template version 5.7.1 



    Technical Reference MICROSAR Vsg 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful. 
    E_NOT_OK: one or more VSGs could not be disabled. 
    Functional Description 
    API to disable multiple Vehicle System Groups. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant (for different VsgItemIds). 
    >  This function is not reentrant with other Services provided by Cdd_Vsg. 
    >  This function is synchronous. 
    Table 5-5   Vsg_DisableVsgMultiple()  
     
     
    Caution 
    Vehicle System Groups that reference a DCM object shall only exist once in the passed 
      VsgItemList. Otherwise a buffer overflow can occur. This error will be reported if 
    DET is used (see 3.4 Error Handling). 
     
     
     
    5.2.5 
    Vsg_IsVsgActive() 
    Prototype 
    Std_ReturnType Vsg_IsVsgActive(Vsg_VsgItemIdType VsgItemId, Vsg_VsgStateType* 
    IsActive) 
    Parameter 
    VsgItemId 
    Unique identification of a VSG (Vehicle System Group). 
    IsActive 
    Provides the status of VSG if return code is E_OK. 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful. 
    E_NOT_OK: operation failed. 
    Functional Description 
    API to query current status of a single VSG. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 5-6   Vsg_IsVsgActive() 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    17 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    5.2.6 
    Vsg_IsAnyVsgActive() 
    Prototype 
    Std_ReturnType Vsg_IsAnyVsgActive(Vsg_VsgItemIdType* VsgItemList, 
    Vsg_VsgItemIdSizeType NumOfVsgItems, Vsg_VsgStateType* IsActive) 
    Parameter 
    VsgItemList 
    Pointer to a list of VSGs (Vehicle System Groups). 
    NumOfVsgItems 
    Number of VSGs in VsgItemList. 
    IsActive 
    If return code is E_OK parameter IsActive provides the status 
    VSG_VSGENABLED if at least one VSG is active and VSG_VSGDISABLED 
    otherwise. 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful. 
    E_NOT_OK: operation failed. 
    Functional Description 
    API to query if status of at least one VSG in a list of VSGs is active. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 5-7   Vsg_IsAnyVsgActive() 
    5.2.7 
    Vsg_Finalize() 
    Prototype 
    Std_ReturnType Vsg_Finalize(void) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: operation was successful. 
    E_NOT_OK: one or more VSGs could not be disabled successfully. 
    Functional Description 
    All VSGs with undefined status are disabled. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 5-8   Vsg_Finalize() 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    18 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    5.2.8 
    Vsg_GetVersionInfo() 
    Prototype 
    void  Vsg_GetVersionInfo (Std_VersionInfoType* versioninfo) 
    Parameter 
    versioninfo 
    Pointer to where to store the version information of this module. 
    Return code 
    void 
    N/A 
    Functional Description 
    Returns the version information of this module. 
     
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 5-9   Vsg_GetVersionInfo() 
    5.2.9 
    Vsg_Init() 
    Prototype 
    void  Vsg_Init(void) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Status of all VSGs is set to undefined. 
     
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 5-10   Vsg_Init() 
    5.2.10  Vsg_InitMemory() 
    Prototype 
    void  Vsg_InitMemory(void) 
    Parameter 
    N/A 
    N/A 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    19 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    Return code 
    void 
    N/A 
    Functional Description 
    Use this function to initialize RAM variables in case the start-up code is not used to initialize RAM. 
     
    Particularities and Limitations 
    >  This function may not interrupt any other APIs. 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 5-11   Vsg_InitMemory() 
    5.2.11  Vsg_Shutdown() 
    Prototype 
    void  Vsg_Shutdown(void) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Shutdown Cdd_Vsg functionality. 
    All VSGs with undefined status are disabled. 
    Particularities and Limitations 
    >  This function can be called from any context. 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 5-12   Vsg_Shutdown 
    5.3 
    Services used by Cdd_Vsg 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    Cdd_Vsg  are  listed.  For  details  about  prototype  and  functionality  refer  to  the 
    documentation of the providing component. 
    Component 
    API 
    Dem 
    Dem_SetEventAvailable 
    Dcm 
    Dcm_VsgSetSingle 
    Dcm_VsgSetMultiple 
    Dcm_VsgIsActive 
    Table 5-13   Services used by the Cdd_Vsg 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    20 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    5.4 
    Callback Functions 
    There are no callback functions implemented by the Cdd_Vsg. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    21 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    6  Configuration  
    The  Cdd_Vsg  module  is  configured  with  the  help  of  the  configuration  tool  DaVinci 
    Configurator Pro. 
    6.1 
    Configuration Variants 
    The Cdd_Vsg supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The  configuration  classes  of  the  Cdd_Vsg  parameters  depend  on  the  supported 
    configuration variants. For their definitions please see the Vsg_bswmd.arxml file. 
    6.2 
    Configuration Attributes 
    The description of each configurable option is described within the Vsg_bswmd.arxml file. 
    You  can  use  the  online  help  of  DaVinci  Configurator  Pro  to  access  these  parameter 
    descriptions comfortably. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    7  Glossary and Abbreviations 
    7.1 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    SWC 
    Software Component 
    VSG 
    Vehicle System Group 
    Table 7-1   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    23 
    based on template version 5.7.1 


    Technical Reference MICROSAR Vsg 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    24 
    based on template version 5.7.1 

    Document Outline


    1.3.87 - TechnicalReference_Cdd_Communication

    MICROSAR Complex Device Driver

    1.3.89 - TechnicalReference_Cdd_Communications


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Complex Device Driver 
    Technical Reference 
     
    DaVinci Configurator 
    Version 2.04.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Safiulla Shakir, Gunnar Meiss, Markus Bart 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR Complex Device Driver 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Safiulla Shakir 
    2012-03-23 
    1.00.00 
    Initial Version 
    Gunnar Meiss 
    2012-08-08 
    2.00.00 
    Support AUTOSAR 4 
    Gunnar Meiss 
    2013-05-13 
    2.00.01 
    performed review rework 
    Markus Bart 
    2014-02-05 
    2.01.00 
    Support J1939Rm Contribution 
    Markus Bart 
    2014-02-28 
    2.02.00 
    Support the StartOfReception API with the 
    PduInfoType according to ASR4.1.2 
    Gunnar Meiss 
    2014-05-07 
    2.02.00 
    AR4-769: ESCAN00075414 
    AR4-744: Cdd shall support 
    CddSoAdUpperLayerContribution as an 
    extension to AR 4.0.3 (schema shall 
    remain at AR 4.0.3) 
    Gunnar Meiss 
    2016-02-24 
    2.03.00 
    FEAT-1631: Trigger Transmit API with 
    SduLength In/Out according to ASR4.2.2 
    Gunnar Meiss 
    2017-01-09 
    2.04.00 
    Rename TechnicalReference_Cdd.pdf to 
    TechnicalReference_Cdd_Communication.
    pdf 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_TPS_ECUConfiguration.pdf 
    3.2.0 
    [2]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
     
     
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 



    Technical Reference MICROSAR Complex Device Driver 
     
     
    Caution 
    This symbol calls your attention to warnings. 
     
     
     
     
     
    Contents 
    1 
    Component History ...................................................................................................... 7 
    2 
    Introduction................................................................................................................... 8 
    2.1 
    Architecture Overview ........................................................................................ 9 
    3 
    Functional Description ............................................................................................... 10 
    3.1 

    Features .......................................................................................................... 10 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Scope of Delivery ............................................................................................. 11 
    4.1.1 

    Static Files ....................................................................................... 11 
    4.1.2 
    Dynamic Files .................................................................................. 11 
    4.2 
    Compiler Abstraction and Memory Mapping ..................................................... 11 
    5 
    API Description CddPduRUpperLayerContribution as IF ........................................ 12 
    5.1 

    Services used by <CDD> ................................................................................. 12 
    5.2 
    Callback Functions ........................................................................................... 12 
    5.2.1 

    <CDD>_RxIndication ....................................................................... 12 
    5.2.2 
    <CDD>_TxConfirmation ................................................................... 13 
    5.2.3 
    <CDD>_TriggerTransmit .................................................................. 13 
    6 
    API Description CddPduRUpperLayerContribution as TP ....................................... 15 
    6.1 

    Services used by <CDD> ................................................................................. 15 
    6.2 
    Callback Functions ........................................................................................... 15 
    6.2.1 

    <CDD>_StartOfReception ................................................................ 15 
    6.2.2 
    <CDD>_CopyRxData ....................................................................... 16 
    6.2.3 
    <CDD>_TpRxIndication ................................................................... 17 
    6.2.4 
    <CDD>_CopyTxData ....................................................................... 18 
    6.2.5 
    <CDD>_TpTxConfirmation ............................................................... 19 
    7 
    API Description CddPduRLowerLayerContribution as IF ........................................ 20 
    7.1 

    Services provided by <CDD> ........................................................................... 20 
    7.1.1 

    <CDD>_Transmit ............................................................................. 20 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    7.1.2 
    <CDD>_CancelTransmit .................................................................. 21 
    7.2 
    Services used by <CDD> ................................................................................. 21 
    8 
    API Description CddPduRLowerLayerContribution as TP ...................................... 22 
    8.1 

    Services provided by <CDD> ........................................................................... 22 
    8.1.1 

    <CDD>_Transmit ............................................................................. 22 
    8.1.2 
    <CDD>_CancelTransmit .................................................................. 23 
    8.1.3 
    <CDD>_CancelReceive ................................................................... 24 
    8.1.4 
    <CDD>_ChangeParameter .............................................................. 25 
    8.2 
    Services used by <CDD> ................................................................................. 25 
    9 
    API Description CddComIfUpperLayerContribution ................................................ 26 
    9.1 

    Services used by <CDD> ................................................................................. 26 
    9.2 
    Callback Functions ........................................................................................... 26 
    9.2.1 
    <CDD>_RxIndication ....................................................................... 27 
    9.2.2 
    <CDD>_TxConfirmation ................................................................... 27 
    9.2.3 
    <CDD>_TriggerTransmit .................................................................. 28 
    10  API Description CddJ1939RmContribution .............................................................. 29 
    10.1 
    Services used by <CDD> ................................................................................. 29 
    10.2 
    Callback Functions ........................................................................................... 29 
    10.2.1 
    <CDD>_RequestIndication............................................................... 30 
    10.2.2 
    <CDD>_AckIndication ...................................................................... 30 
    10.2.3 
    <CDD>_RequestTimeoutIndication .................................................. 31 
    11  API Description CddSoAdUpperLayerContribution ................................................. 32 
    11.1 
    Services used by <CDD> ................................................................................. 32 
    11.2 
    Communication Interface Callback Functions .................................................. 33 
    11.2.1 

    <CDD>_[SoAd][If]RxIndication ......................................................... 33 
    11.2.2 
    <CDD>_[SoAd][If]TxConfirmation .................................................... 34 
    11.2.3 
    <CDD>_[SoAd][If]TriggerTransmit .................................................... 35 
    11.3 
    Transport Protocol Callback Functions ............................................................. 36 
    11.3.1 

    <CDD>_[SoAd][Tp]StartOfReception ............................................... 36 
    11.3.2 
    <CDD>_[SoAd][Tp]CopyRxData ...................................................... 37 
    11.3.3 
    <CDD>_[SoAd][Tp]RxIndication ....................................................... 38 
    11.3.4 
    <CDD>_[SoAd][Tp]CopyTxData....................................................... 39 
    11.3.5 
    <CDD>_[SoAd][Tp]TxConfirmation .................................................. 40 
    12  Configuration .............................................................................................................. 41 
    12.1 
    Configuration Variants ...................................................................................... 41 
    13  AUTOSAR Standard Compliance............................................................................... 42 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    13.1 
    Deviations ........................................................................................................ 42 
    13.2 
    Additions/ Extensions ....................................................................................... 42 
    13.3 
    Limitations........................................................................................................ 42 
    14  Glossary and Abbreviations ...................................................................................... 43 
    14.1 
    Glossary .......................................................................................................... 43 
    14.2 
    Abbreviations ................................................................................................... 44 
    15  Contact ........................................................................................................................ 45 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.1 Architecture Overview ......................................................... 9 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 7 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 10 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 10 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 10 
    Table 4-1  
    Generated files ......................................................................................... 11 
    Table 5-1  
    Services used by the <CDD> .................................................................... 12 
    Table 5-2  
    <CDD>_RxIndication ................................................................................ 12 
    Table 5-3  
    <CDD>_TxConfirmation ........................................................................... 13 
    Table 5-4  
    <CDD>_TriggerTransmit ........................................................................... 14 
    Table 6-1  
    Services used by the <CDD> .................................................................... 15 
    Table 6-2  
    <CDD>_StartOfReception ........................................................................ 16 
    Table 6-3  
    <CDD>_CopyRxData ............................................................................... 16 
    Table 6-4  
    <CDD>_TpRxIndication ............................................................................ 17 
    Table 6-5  
    <CDD>_CopyTxData ................................................................................ 18 
    Table 6-6  
    <CDD>_TpTxConfirmation ....................................................................... 19 
    Table 7-1  
    <CDD>_Transmit ...................................................................................... 20 
    Table 7-2  
    <CDD>_CancelTransmit ........................................................................... 21 
    Table 7-3  
    Services used by the <CDD> .................................................................... 21 
    Table 8-1  
    <CDD>_Transmit ...................................................................................... 22 
    Table 8-2  
    <CDD>_CancelTransmit ........................................................................... 23 
    Table 8-3  
    <CDD>_CancelReceive ............................................................................ 24 
    Table 8-4  
    <CDD>_ChangeParameter ....................................................................... 25 
    Table 8-5  
    Services used by the <CDD> .................................................................... 25 
    Table 9-1  
    Services used by the <CDD> .................................................................... 26 
    Table 9-2  
    <CDD>_RxIndication ................................................................................ 27 
    Table 9-3  
    <CDD>_RxIndication ................................................................................ 27 
    Table 9-4  
    <CDD>_TriggerTransmit ........................................................................... 28 
    Table 10-1  
    Services used by the <CDD> .................................................................... 29 
    Table 10-2  
    <CDD>_RequestIndication ....................................................................... 30 
    Table 10-3  
    <CDD>_AckIndication .............................................................................. 31 
    Table 10-4  
    <CDD>_RequestTimeoutIndication ........................................................... 31 
    Table 11-1  
    Services used by the <CDD> .................................................................... 32 
    Table 11-2  
    <CDD>_[SoAd][If]RxIndication ................................................................. 33 
    Table 11-3  
    <CDD>_[SoAd][If]TxConfirmation ............................................................. 34 
    Table 11-4  
    <CDD>_[SoAd][If]TriggerTransmit ............................................................ 35 
    Table 11-5  
    <CDD>_[SoAd][Tp]StartOfReception ........................................................ 36 
    Table 11-6  
    <CDD>_[SoAd][Tp]CopyRxData ............................................................... 37 
    Table 11-7  
    <CDD>_[SoAd][Tp]RxIndication ............................................................... 38 
    Table 11-8  
    <CDD>_[SoAd][Tp]CopyTxData ............................................................... 39 
    Table 11-9  
    <CDD>_[SoAd][Tp]TxConfirmation ........................................................... 40 
    Table 14-1  
    Glossary ................................................................................................... 43 
    Table 14-2  
    Abbreviations ............................................................................................ 44 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    First DaVinci Configurator AUTOSAR 3 Version  
    2.00.00 
    Added support of AUTOSAR 4 
    3.00.00 
    Added support for Java 7 & SoAd & DoIp 
    3.01.00 
    Added support for J1939Rm 
    3.02.00 
    Added support for StartOfReception with the PduInfoType according to 
    ASR4.1.2 
    AR4-769: Support Cdd API-SERVICE-PREFIX Parameter as APIs and 
    SNV Prefix 
    AR4-744: Cdd shall support CddSoAdUpperLayerContribution as an 
    extension to AR 4.0.3 (schema shall remain at AR 4.0.3) 
    Table 1-1   Component history 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module <CDD> as specified in [1].  
     
    Supported AUTOSAR Release*: 
    4.x 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    <CDD>_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    <CDD>_MODULE_ID   
    255 decimal 
    (according to ref. [2]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    Any  software  module  which  is  a  part  of  the  standard  AUTOSAR  architecture  but  not  a 
    basic software module can be implemented and treated as a Complex Device Driver. This 
    technical reference describes the configurator for complex device driver configuration. 
    In the AUTOSAR COM stack upper and lower layer Complex Device Drivers are allowed 
    to access the PDUs. The PDUs that are exchanged between the CDD and the PDU router 
    (in  case  the  CDD  is  upper  layer  or  lower  layer  for  the  PduR)  or  between  the  CDD  and 
    communication hardware abstraction layer modules (in case the CDD is lower layer) shall 
    be configured.  The contribution of the Complex Device Driver implies a reference to the 
    global  PDU  and  the  definition  of  a  HandleId.  Figure  2  -  1  shows  an  example  of  a 
    Complex Device Driver to the CANIF (lower layer) and one Complex Device Driver (upper 
    layer) above the PDUR. 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 



    Technical Reference MICROSAR Complex Device Driver 
    2.1  Architecture Overview 
    The following figure shows where the <CDD> is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.1 Architecture Overview  
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    <CDD>. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 13. 
    Vector  Informatik  provides  further  <CDD>  functionality  beyond  the AUTOSAR  standard. 
    The corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    CddComIfUpperLayerContribution 
    CddPduRLowerLayerContribution 
    CddPduRUpperLayerContribution 
    CddSoAdUpperLayerContribution 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    CddEcucPartitionInteraction 
    CddComMLowerLayerContribution 
    CddGenericNmLowerLayerContribution 
    Table 3-2   Not supported AUTOSAR standard conform features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    CddJ1939RmContribution 
    Table 3-3   Features provided beyond the AUTOSAR standard 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    10 
    based on template version 5.2.0 




    Technical Reference MICROSAR Complex Device Driver 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  <CDD> 
    into an application environment of an ECU.  
     
     
     
    Note 
    The MSN is derived from the short name of the module configuration and not from the 
      API-SERVICE-PREFIX of the VSMD file. 
     
     
    4.1  Scope of Delivery 
    The delivery of the <CDD> contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    The <CDD> implementation has no static files. 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool CFG5. 
    File Name 
    Description 
    Cdd_Cbk.h 
    This file is generated if the <CDD> is configured as a 
    CddPduRUpperLayerContribution or CddComIfUpperLayerContribution. 
    Cdd.h 
    This file is generated if the <CDD> is configured as a 
    CddPduRLowerLayerContribution 
    Table 4-1   Generated files 
    4.2 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
     
     
    Edit 
    Update for each <CDD> instance the templates _MemMap.h and _Compiler_Cfg.h and 
      replace “_CDD” with your <CDD> name. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    11 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    5  API Description CddPduRUpperLayerContribution as IF 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as upper layer communication interface for the PduR. 
    5.1  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    PduR 
    PduR_<CDD>Transmit 
    Table 5-1   Services used by the <CDD> 
    5.2  Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
    5.2.1 
    <CDD>_RxIndication 
    Prototype 
    void <CDD>_RxIndication (PduIdType RxPduId, PduInfoType* PduInfoPtr) 
    Parameter 
    RxPduId 
    id of the CddPduRUpperLayerRxPdu. 
    PduInfoPtr 
    Payload information of the received I-PDU (pointer to data and data length). 
    Return code 
    void 
     
    Functional Description 
    The function is called to indicate the complete reception of a RX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_RxIndication call for the same RxPduId. 
    Table 5-2   <CDD>_RxIndication 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    12 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    5.2.2 
    <CDD>_TxConfirmation 
    Prototype 
    void <CDD>_TxConfirmation (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    id of the CddPduRUpperLayerTxPdu. 
    Return code 
    void 
     
    Functional Description 
    The function is called to confirm the transmission of an I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TxConfirmation call for the same TxPduId. 
    Table 5-3   <CDD>_TxConfirmation 
     
    5.2.3 
    <CDD>_TriggerTransmit 
    Prototype 
    Std_ReturnType <CDD>_TriggerTransmit (PduIdType TxPduId, PduInfoType 
    PduInfoPtr) 
    Parameter 
    TxPduId 
    id of the CddPduRUpperLayerTxPdu. 
    PduInfoPtr 
    Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall be 
    copied, and the available buffer size in SduLengh. On return, the service will 
    indicate the length of the copied SDU data in SduLength. 
    Return code 
    Std_ReturnType 
    E_OK       SDU has been copied and SduLength indicates the number of 
    copied bytes. 
    E_NOT_OK  No data has been copied, because Cdd is not initialized or 
    TxPduId is not valid or PduInfoPtr is NULL_PTR or SduDataPtr is NULL_PTR 
    or SduLength is too small. 
    Functional Description 
    The function is called to request the I-PDU for transmission. 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TriggerTransmit call for the same TxPduId. 
    Table 5-4   <CDD>_TriggerTransmit 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    14 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    6  API Description CddPduRUpperLayerContribution as TP 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as upper layer transport protocol for the PduR. 
    6.1  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    PduR 
    PduR_<CDD>Transmit 
    PduR 
    PduR_<CDD>ChangeParameter 
    PduR 
    PduR_<CDD>CancelReceive 
    Table 6-1   Services used by the <CDD> 
    6.2  Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
    6.2.1 
    <CDD>_StartOfReception 
    Prototype 
    BufReq_ReturnType <CDD>_StartOfReception (PduIdType id, PduInfoType* info, 
    PduLengthType TpSduLength, PduLengthType* bufferSizePtr) 
    Parameter 
    id 
    id of the CddPduRUpperLayerRxPdu. 
    info 
    Pointer to a PduInfoType structure containing the payload data (without 
    protocol information) and payload length of the first frame or single frame of a 
    transport protocol I-PDU reception. Depending on the global parameter 
    MetaDataLength, additional bytes containing MetaData (e.g. the CAN ID) are 
    appended after the payload data. 
    TpSduLength 
    Length of the entire TP SDU which will be received. 
    bufferSizePtr 
    Length of the available receive buffer in the <CDD>. 
    This parameter is used e.g. in CanTp to calculate the Block Size (BS). 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    The function call indicates the reception start of a segmented PDU. 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    15 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_StartOfReception call for the same id. 
    Table 6-2   <CDD>_StartOfReception 
    6.2.2 
    <CDD>_CopyRxData 
    Prototype 
    BufReq_ReturnType <CDD>_CopyRxData (PduIdType id, PduInfoType* info, 
    PduLengthType* bufferSizePtr) 
    Parameter 
    id 
    id of the CddPduRUpperLayerRxPdu. 
    info 
    a PduInfoType pointing to the data to be copied in the <CDD> data buffer. 
    bufferSizePtr 
    available receive buffer after data has been copied. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    This function is called to trigger the copy process of a segmented PDU. The function can be called several 
    times and each call to this function copies parts of the received data. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CopyRxData call for the same id. 
    Table 6-3   <CDD>_CopyRxData 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    16 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    6.2.3 
    <CDD>_TpRxIndication 
    Prototype 
    void <CDD>_TpRxIndication (PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    id of the CddPduRUpperLayerRxPdu. 
    result 
    a Std_ReturnType to indicate the result of the reception. 
    Return code 
    void 
     
    Functional Description 
    The function is called to indicate the complete reception of a <CDD> TP SDU or to report an error that 
    occurred during reception. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TpRxIndication call for the same id. 
    Table 6-4   <CDD>_TpRxIndication 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    17 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    6.2.4 
    <CDD>_CopyTxData 
    Prototype 
    void <CDD>_CopyTxData (PduIdType id, PduInfoType* info, RetryInfoType retry, 
    PduLengthType* availableDataPtr) 
    Parameter 
    id 
    id of the CddPduRUpperLayerTxPdu. 
    info 
    a PduInfoType pointing to the destination buffer. 
    retry 
    NULL_PTR to indicate a successful copy process or a RetryInfoType 
    containing a TpDataStateType constant of ComStackTypes.h. 
    availableDataPtr 
    Indicates the remaining number of bytes that are available in the TX buffer. 
    availableDataPtr can be used by TP modules that support dynamic payload 
    lengths (e.g. Iso FrTp) to determine the size of the following CFs. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    This function is called to request transmit data of a TP CddPduRUpperLayerTxPdu. The function can be 
    called several times and each call to this function copies the next part of the data to be transmitted. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CopyTxData call for the same id. 
    Table 6-5   <CDD>_CopyTxData 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    18 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    6.2.5 
    <CDD>_TpTxConfirmation 
    Prototype 
    void <CDD>_TpTxConfirmation (PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    id of the CddPduRUpperLayerTxPdu. 
    result 
    a Std_ReturnType to indicate the result of the transmission. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    The function is called to confirm a successful transmission of a TP CddPduRUpperLayerTxPdu or to report 
    an error that occurred during transmission. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TpTxConfirmation call for the same id. 
    Table 6-6   <CDD>_TpTxConfirmation 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    19 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    7  API Description CddPduRLowerLayerContribution as IF 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as lower layer communication interface for the PduR. 
    7.1  Services provided by <CDD> 
    7.1.1 
    <CDD>_Transmit 
    Prototype 
    Std_ReturnType <CDD>_Transmit (PduIdType TxPduId, PduInfoType* PduInfoPtr) 
    Parameter 
    TxPduId 
    id of the IF CddPduRLowerLayerTxPdu. 
    PduInfoPtr 
    a PduInfoType pointing to the transmit buffer. 
    Return code 
    Std_ReturnType 
    E_OK       the transmission request has been accepted. 
    E_NOT_OK  the transmission request has NOT been accepted. 
    Functional Description 
    The function is called to initiate a transmission request of a TX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_Transmit call for the same TxPduId. 
    Table 7-1   <CDD>_Transmit 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    20 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    7.1.2 
    <CDD>_CancelTransmit 
    Prototype 
    Std_ReturnType <CDD>_CancelTransmit (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    id of the IF CddPduRLowerLayerTxPdu. 
    Return code 
    Std_ReturnType 
    E_OK       the transmission cancellation has been processed successful. 
    E_NOT_OK  the transmission cancellation has NOT been processed 
    successful. 
    Functional Description 
    The function is called to cancel a transmission request of a TX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CancelTransmit call for the same TxPduId. 
    Table 7-2   <CDD>_CancelTransmit 
    7.2  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    PduR 
    PduR_<CDD>RxIndication 
    PduR 
    PduR_<CDD>TxConfirmation 
    PduR 
    PduR_<CDD>TriggerTransmit 
    Table 7-3   Services used by the <CDD> 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    21 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    8  API Description CddPduRLowerLayerContribution as TP 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as lower layer transport protocol for the PduR. 
    8.1  Services provided by <CDD> 
    8.1.1 
    <CDD>_Transmit 
    Prototype 
    Std_ReturnType <CDD>_Transmit (PduIdType TxPduId, PduInfoType* PduInfoPtr) 
    Parameter 
    TxPduId 
    id of the IF CddPduRLowerLayerTxPdu. 
    PduInfoPtr 
    a PduInfoType pointing to the transmit buffer. 
    Return code 
    Std_ReturnType 
    E_OK       the transmission request has been accepted. 
    E_NOT_OK  the transmission request has NOT been accepted. 
    Functional Description 
    The function is called to initiate a transmission request of a TX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_Transmit call for the same TxPduId. 
    Table 8-1   <CDD>_Transmit 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    22 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    8.1.2 
    <CDD>_CancelTransmit 
    Prototype 
    Std_ReturnType <CDD>_CancelTransmit (PduIdType id) 
    Parameter 
    id 
    id of the IF CddPduRLowerLayerTxPdu. 
    Return code 
    Std_ReturnType 
    E_OK       the transmission cancellation has been processed successful. 
    E_NOT_OK  the transmission cancellation has NOT been processed 
    successful. 
    Functional Description 
    The function is called to cancel a transmission request of a TX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CancelTransmit call for the same id. 
    Table 8-2   <CDD>_CancelTransmit 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    23 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    8.1.3 
    <CDD>_CancelReceive 
    Prototype 
    Std_ReturnType <CDD>_CancelReceive (PduIdType id) 
    Parameter 
    id 
    id of the TP CddPduRLowerLayerRxPdu. 
    Return code 
    Std_ReturnType 
    E_OK       the reception cancellation has been processed successful. 
    E_NOT_OK  the reception cancellation has NOT been processed successful. 
    Functional Description 
    The function is called to cancel a reception of a RX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CancelReceive call for the same id. 
    Table 8-3   <CDD>_CancelReceive 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    8.1.4 
    <CDD>_ChangeParameter 
    Prototype 
    Std_ReturnType <CDD>_ChangeParameter (PduIdType id, TPParameterType parameter, 
    uint16 value) 
    Parameter 
    id 
    id of the TP CddPduRLowerLayerRxPdu. 
    parameter 
    a TPParameterType enumeration of ComStackTypes.h. 
    value 
    the new value of the parameter 
    Return code 
    Std_ReturnType 
    E_OK       the parameter change has been processed successful. 
    E_NOT_OK  the parameter change has NOT been processed successful. 
    Functional Description 
    The function is called to change a transport protocol parameter (e.g. block size) of a RX I-PDU 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_CancelParameter call for the same id. 
    Table 8-4   <CDD>_ChangeParameter 
    8.2  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    PduR 
    PduR_<CDD>StartOfReception 
    PduR 
    PduR_<CDD>CopyRxData 
    PduR 
    PduR_<CDD>RxIndication 
    PduR 
    PduR_<CDD>CopyTxData 
    PduR 
    PduR_<CDD>TxConfirmation  
    Table 8-5   Services used by the <CDD> 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    25 
    based on template version 5.2.0 



    Technical Reference MICROSAR Complex Device Driver 
    9  API Description CddComIfUpperLayerContribution 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as upper layer communication interface for a communication hardware abstraction layer. 
    9.1  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    CanIf, LinIf, FrIf 
    CanIf_Transmit, LinIf_Transmit, FrIf_Transmit 
    Table 9-1   Services used by the <CDD> 
    9.2  Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
     
     
     
    Note 
    The names of the callbacks can be defined completely in the communication hardware 
      abstraction layer. The postfix _RxIndication, _TxConfirmation and _TriggerTransmit is 
    used in this chapter to eplain the usage of the function. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    26 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    9.2.1 
    <CDD>_RxIndication 
    Prototype 
    void <CDD>_RxIndication (PduIdType RxPduId, PduInfoType* PduInfoPtr) 
    Parameter 
    RxPduId 
    id of the CddComIfUpperLayerRxPdu. 
    PduInfoPtr 
    Payload information of the received I-PDU (pointer to data and data length). 
    Return code 
    void 
     
    Functional Description 
    The function is called to indicate the complete reception of a RX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by a communication hardware abstraction layer. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_RxIndication call for the same RxPduId. 
    Table 9-2   <CDD>_RxIndication 
    9.2.2 
    <CDD>_TxConfirmation 
    Prototype 
    void <CDD>_TxConfirmation (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    id of the CddComIfUpperLayerTxPdu. 
    Return code 
    void 
     
    Functional Description 
    The function is called to confirm the transmission of an I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by a communication hardware abstraction layer. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TxConfirmation call for the same TxPduId. 
    Table 9-3   <CDD>_RxIndication 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    27 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    9.2.3 
    <CDD>_TriggerTransmit 
    Prototype 
    Std_ReturnType <CDD>_TriggerTransmit (PduIdType TxPduId, PduInfoType 
    PduInfoPtr) 
    Parameter 
    TxPduId 
    id of the CddComIfUpperLayerTxPdu. 
    PduInfoPtr 
    Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall be 
    copied, and the available buffer size in SduLengh. On return, the service will 
    indicate the length of the copied SDU data in SduLength. 
    Return code 
    Std_ReturnType 
    E_OK       SDU has been copied and SduLength indicates the number of 
    copied bytes. 
    E_NOT_OK  No data has been copied, because Cdd is not initialized or 
    TxPduId is not valid or PduInfoPtr is NULL_PTR or SduDataPtr is NULL_PTR 
    or SduLength is too small. 
    Functional Description 
    The function is called to request the I-PDU for transmission. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the PduR. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_TriggerTransmit call for the same TxPduId. 
    Table 9-4   <CDD>_TriggerTransmit 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    28 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    10  API Description CddJ1939RmContribution 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as upper layer of the J1939Rm module. 
    10.1  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
     
     
    Table 10-1   Services used by the <CDD> 
    10.2  Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    29 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    10.2.1  <CDD>_RequestIndication 
    Prototype 
    void <CDD>_RequestIndication (uint8 node, NetworkHandleType channel, uint32 
    requestedPgn, uint8 sourceAddress, uint8 destAddress, uint8 priority) 
    Parameter 
    node 
    Node by which the request was received. 
    channel 
    Channel on which the request was received. 
    requestedPgn 
    PGN of the requested PG. 
    sourceAddress 
    Address of the node that sent the Request PG. 
    destAddress 
    Address of this node or 0xFF for broadcast. 
    priority 
    Priority of the Request PG. 
    Return code 
    void 
     
    Functional Description 
    The RequestIndication provides information about a received J1939 RQST message which affects a 
    J1939Rm user that references this CDD. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_RequestIndication call for the same node. 
    Table 10-2   <CDD>_RequestIndication 
    10.2.2  <CDD>_AckIndication 
    Prototype 
    void <CDD>_AckIndication (uint8 node, NetworkHandleType channel, uint32 ackPgn, 
    uint8 ackCode, uint8 ackAddress, uint8 sourceAddress, uint8 priority) 
    Parameter 
    node 
    Node by which the acknowledgement was received. 
    channel 
    Channel on which the acknowledgement was received. 
    ackPgn 
    Acknowledged PGN. 
    ackCode 
    Type of acknowledgement, see definition of J1939Rm_AckCode for available 
    codes. 
    ackAddress 
    Address of this node. 
    sourceAddress 
    Address of the node that sent the Acknowledgement PG. 
    priority 
    Priority of the Acknowledgement PG. 
    Return code 
    void 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    30 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    Functional Description 
    The AckIndication provides information about a received J1939 ACKM message which affects a J1939Rm 
    user that references this CDD. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_AckIndication call for the same node. 
    Table 10-3   <CDD>_AckIndication 
    10.2.3  <CDD>_RequestTimeoutIndication 
    Prototype 
    void <CDD>_RequestTimeoutIndication (uint8 node, NetworkHandleType channel, 
    uint32 requestedPgn, uint8 destAddress) 
    Parameter 
    node 
    Node by which the request was sent. 
    channel 
    Channel on which the request was sent. 
    requestedPgn 
    PGN of the requested PG. 
    destAddress 
    Address of the destination node or 0xFF for broadcast. 
    Return code 
    void 
     
    Functional Description 
    The RequestTimeoutIndication is called after time out of a transmitted J1939 RQST message. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_RequestTimeoutIndication call for the same node. 
    Table 10-4   <CDD>_RequestTimeoutIndication 
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    31 
    based on template version 5.2.0 



    Technical Reference MICROSAR Complex Device Driver 
    11  API Description CddSoAdUpperLayerContribution 
    This chapter describes APIs to be implemented by the <CDD> if the <CDD> is configured 
    as upper layer interface in the SoAd. 
     
     
     
    Note 
    The caller and type infixes of the APIs are configurable in the SoAdBswModules. 
     
     
     
    11.1  Services used by <CDD> 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    <CDD> are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    SoAd 
    SoAd_IfTransmit 
    SoAd 
    SoAd_TpTransmit 
    SoAd 
    SoAd_TpChangeParameter 
    SoAd 
    SoAd_TpCancelReceive 
    SoAd 
    SoAd_TpCancelTransmit 
    Table 11-1   Services used by the <CDD> 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    32 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.2  Communication Interface Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
    11.2.1  <CDD>_[SoAd][If]RxIndication 
    Prototype 
    void <CDD>_[SoAd][If]RxIndication (PduIdType RxPduId, PduInfoType* PduInfoPtr) 
    Parameter 
    RxPduId 
    id of the CddSoAdUpperLayerRxPdu. 
    PduInfoPtr 
    Payload information of the received I-PDU (pointer to data and data length). 
    Return code 
    void 
     
    Functional Description 
    The function is called to indicate the complete reception of a RX I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAD. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][If]RxIndication call for the same RxPduId. 
    Table 11-2   <CDD>_[SoAd][If]RxIndication 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.2.2  <CDD>_[SoAd][If]TxConfirmation 
    Prototype 
    void <CDD>_[SoAd][If]TxConfirmation (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    id of the CddSoAdUpperLayerTxPdu. 
    Return code 
    void 
     
    Functional Description 
    The function is called to confirm the transmission of an I-PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][If]TxConfirmation call for the same TxPduId. 
    Table 11-3   <CDD>_[SoAd][If]TxConfirmation 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    34 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.2.3  <CDD>_[SoAd][If]TriggerTransmit 
    Prototype 
    Std_ReturnType <CDD>_[SoAd][If]TriggerTransmit (PduIdType TxPduId, PduInfoType 
    PduInfoPtr) 
    Parameter 
    TxPduId 
    id of the CddSoAdUpperLayerTxPdu. 
    PduInfoPtr 
    Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall be 
    copied, and the available buffer size in SduLengh. On return, the service will 
    indicate the length of the copied SDU data in SduLength. 
    Return code 
    Std_ReturnType 
    E_OK       SDU has been copied and SduLength indicates the number of 
    copied bytes. 
    E_NOT_OK  No data has been copied, because Cdd is not initialized or 
    TxPduId is not valid or PduInfoPtr is NULL_PTR or SduDataPtr is NULL_PTR 
    or SduLength is too small. 
    Functional Description 
    The function is called to request the I-PDU for transmission. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][If]TriggerTransmit call for the same TxPduId. 
    Table 11-4   <CDD>_[SoAd][If]TriggerTransmit 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    35 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.3  Transport Protocol Callback Functions 
    This chapter describes the callback functions that are implemented by the <CDD> and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file <CDD>_Cbk.h by the <CDD>. 
    11.3.1  <CDD>_[SoAd][Tp]StartOfReception 
    Prototype 
    BufReq_ReturnType <CDD>_[SoAd][Tp]StartOfReception (PduIdType id, PduInfoType* 
    info, PduLengthType TpSduLength, PduLengthType* bufferSizePtr) 
    Parameter 
    id 
    id of the CddSoAdUpperLayerRxPdu. 
    info 
    Pointer to a PduInfoType structure containing the payload data (without 
    protocol information) and payload length of the first frame or single frame of a 
    transport protocol I-PDU reception. Depending on the global parameter 
    MetaDataLength, additional bytes containing MetaData (e.g. the CAN ID) are 
    appended after the payload data. 
    TpSduLength 
    Length of the entire TP SDU which will be received. 
    bufferSizePtr 
    Length of the available receive buffer in the <CDD>. 
    This parameter is used e.g. in CanTp to calculate the Block Size (BS). 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    The function call indicates the reception start of a segmented PDU. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][Tp]StartOfReception call for the same id. 
    Table 11-5   <CDD>_[SoAd][Tp]StartOfReception 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    36 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.3.2  <CDD>_[SoAd][Tp]CopyRxData 
    Prototype 
    BufReq_ReturnType <CDD>_[SoAd][Tp]CopyRxData (PduIdType id, PduInfoType* info, 
    PduLengthType* bufferSizePtr) 
    Parameter 
    id 
    id of the CddSoAdUpperLayerRxPdu. 
    info 
    a PduInfoType pointing to the data to be copied in the <CDD> data buffer. 
    bufferSizePtr 
    available receive buffer after data has been copied. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    This function is called to trigger the copy process of a segmented PDU. The function can be called several 
    times and each call to this function copies parts of the received data. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][Tp]CopyRxData call for the same id. 
    Table 11-6   <CDD>_[SoAd][Tp]CopyRxData 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    37 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.3.3  <CDD>_[SoAd][Tp]RxIndication 
    Prototype 
    void <CDD>_[SoAd][Tp]RxIndication (PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    id of the CddSoAdUpperLayerRxPdu. 
    result 
    a Std_ReturnType to indicate the result of the reception. 
    Return code 
    void 
     
    Functional Description 
    The function is called to indicate the complete reception of a <CDD> TP SDU or to report an error that 
    occurred during reception. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][Tp]RxIndication call for the same id. 
    Table 11-7   <CDD>_[SoAd][Tp]RxIndication 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    38 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.3.4  <CDD>_[SoAd][Tp]CopyTxData 
    Prototype 
    void <CDD>_[SoAd][Tp]CopyTxData (PduIdType id, PduInfoType* info, RetryInfoType 
    retry, PduLengthType* availableDataPtr) 
    Parameter 
    id 
    id of the CddSoAdUpperLayerTxPdu. 
    info 
    a PduInfoType pointing to the destination buffer. 
    retry 
    NULL_PTR to indicate a successful copy process or a RetryInfoType 
    containing a TpDataStateType constant of ComStackTypes.h. 
    availableDataPtr 
    Indicates the remaining number of bytes that are available in the TX buffer. 
    availableDataPtr can be used by TP modules that support dynamic payload 
    lengths (e.g. Iso FrTp) to determine the size of the following CFs. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    This function is called to request transmit data of a TP CddSoAdUpperLayerTxPdu. The function can be 
    called several times and each call to this function copies the next part of the data to be transmitted. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][Tp]CopyTxData call for the same id. 
    Table 11-8   <CDD>_[SoAd][Tp]CopyTxData 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    39 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    11.3.5  <CDD>_[SoAd][Tp]TxConfirmation 
    Prototype 
    void <CDD>_[SoAd][Tp]TxConfirmation (PduIdType id, Std_ReturnType result) 
    Parameter 
    id 
    id of the CddSoAdUpperLayerTxPdu. 
    result 
    a Std_ReturnType to indicate the result of the transmission. 
    Return code 
    BufReq_ReturnType 
    a BufReq_ReturnType constant of ComStackTypes.h. 
    Functional Description 
    The function is called to confirm a successful transmission of a TP CddSoAdUpperLayerTxPdu or to report 
    an error that occurred during transmission. 
    Particularities and Limitations 
    >  Service ID: N.a. 
    >  The <CDD> is initialized and active. 
    >  The function is called by the SoAd. 
    Expected Caller Context 
    >  The function can be called in interrupt and on task level and should not be interrupted by 
    another <CDD>_[SoAd][Tp]TxConfirmation call for the same id. 
    Table 11-9   <CDD>_[SoAd][Tp]TxConfirmation 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    40 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    12  Configuration 
    12.1  Configuration Variants 
    The <CDD> supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The  configuration  classes  of  the  <CDD>  parameters  depend  on  the  supported 
    configuration  variants.  For  their  definitions  please  see  the  [BSW_specific]_bswmd.arxml 
    file. 
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    41 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    13  AUTOSAR Standard Compliance 
    13.1  Deviations 
    No deviations. 
    13.2  Additions/ Extensions 
    See Table 3-3  Features provided beyond the AUTOSAR standard. 
    13.3  Limitations 
    See Table 3-2  Not supported AUTOSAR standard conform features. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    42 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    14  Glossary and Abbreviations 
    14.1  Glossary 
    Term 
    Description 
    BSWMD 
    The BSWMD is a formal notation of all information belonging to a certain 
    BSW artifact (BSW module or BSW cluster) in addition to the 
    implementation of that artifact. 
    Buffer 
    A buffer in a memory area normally in the RAM. It is an area, that the 
    application has reserved for data storage. 
    CANbedded 
    … is the trademark of the Vector communication stack. 
    CFG5 
     
    Generation tool for CANbedded and MICROSAR components 
    Component 
    CAN Driver, Network Management ... are software COMPONENTS in 
    contrast to the expression module, which describes an ECU. 
    Confirmation 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'confirmation' a service provider informs a 
    service user about the result of a preceding service request of the service 
    user. Notification by the CAN Driver on asynchronous successful 
    transmission of a CAN message. 
    Electronic Control 
    Also known as ECU. Small embedded computer system consisting of at 
    Unit 
    least one CPU and corresponding periphery which is placed in one 
    housing. 
    Indication 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'indication' a service provider informs a service 
    user about the occurrence of either an internal event or a service request 
    issued by another service user. Notification of application in case of 
    events in the Vector software components, e.g. an asynchronous 
    reception of a CAN message. 
    Interrupt 
    Processor-specific event which can interrupt the execution of a current 
    program section. 
    Interrupt service 
    The function used for direct processing of an interrupt. 
    routine 
    Network 
    A network defines the assignment (1:N) between a logical communication 
    grouping and a physical layer on which different modules are connected 
    to (either CAN or LIN). One network consists of one channel, Y networks 
    consists of 1..Z channel(s). We say network if we talk about more than 
    one bus. 
    Transport Protocol 
    Some information that must be transferred over the CAN/LIN bus does 
    not fit into individual message frames because the data length exceeds 
    the maximum of 8 bytes. In this case, the sender must divide up the data 
    into a number of messages. Additional information is necessary for the 
    receiver to put the data together again. 
    Table 14-1   Glossary 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    43 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    14.2  Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CAN 
    Controller Area Network protocol originally defined for use as a 
    communication network for control applications in vehicles. 
    CANIF 
    Controller Area Network Interface 
    CDD  
    Complex Device Driver, Complex Drivers 
    COM 
    Communication 
    ECU 
    Electronic Control Unit 
    FRIF 
    Flexray Interface 
    HIS 
    Hersteller Initiative Software 
    ID 
    Identifier (e.g. Identifier of a CAN message) 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    MSN 
    Module Short Name 
    PDU 
    Protocol Data Unit 
    SDU 
    Service Data Unit 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    TP 
    Transport Protocol 
    VSMD 
    Vendor Specific Module Description 
    Table 14-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR Complex Device Driver 
    15  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.04.00 
    45 
    based on template version 5.2.0 

    Document Outline


    1.3.90 - TechnicalReference_Com

    MICROSAR COM

    1.3.92 - TechnicalReference_ComM

    MICROSAR Communication Manager

    1.3.94 - TechnicalReference_ComMs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Communication Manager 
    Technical Reference 
     
     
    Version 8.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Michael Schligerski 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR Communication Manager 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Michael Schligerski  2012-08-07  1.00.00  Initial creation 
    Michael Schligerski  2013-01-31  1.01.00  >  Updated AUTOSAR Architecture, chapter 2.1 
    >  Updated description of 
    ComM_CurrentChannelRequest, chapter 6.1.3.1 
    Michael Schligerski  2013-05-15  1.02.00  >  Added configuration variant Post-Build Loadable, 
    chapter 3.1.2.2 (ESCAN00064954) 
    >  Information from chapter ‘AUTOSAR Standard 
    Compliance’ is moved to chapter ‘Features’ 
    >  Updated chapter ‘Critical Sections’ 
    >  Removed chapter ‘Compiler Abstraction and 
    Memory Mapping’ 
    >  Updated chapter ‘Partial Network States’ 
    Michael Schligerski  2013-09-27  2.00.00  >  Updated chapter ‘Partial Network States’ 
    (ESCAN00069988) 
    >  Updated chapters ‘Mode Limitation’, 
    ‘ComM_PreventWakeUp’, 
    ‘ComM_LimitChannelToNoComMode’
    ‘ComM_LimitECUToNoComMode’ 
    (ESCAN00068896 , ESCAN00068902) 
    >  Support EthSM as lower layer of COMM, see 
    chapters 3.3 and 5.3 (ESCAN00069043) 
    >  Updated description of Sender Receiver 
    Interface ‘ComM_CurrentMode’ 
    (ESCAN00070321). 
    >  Added notes for usage of LIN NM and J1939 NM 
    in chapters 3.5.1 and 3.5.3 (ESCAN00071341). 
    >  Updated Include Structure to reflect Post Build 
    Loadable (ESCAN00064954). 
    >  Added a Caution box to chapter 3.4 regarding 
    Partial Network TX EIRA signals 
    (ESCAN00071527). 
    Michael Schligerski  2014-02-07  2.01.00  >  ESCAN00072763 Added DET error 
    COMM_E_DIAGNOSTIC_NOT_SUPPORTED in 
    chapters 3.6.1, 5.4.4 and 5.4.5 
    >  ESCAN00074243 Table 3-5 sorted by ID, 
    description of the Port Interface 
    ComM_CurrentMode moved to chapter 6.1.2 
    ‘Mode Switch Interface’.
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Michael Schligerski  2014-06-04  3.00.00  >  Improved description of 
    ComM_CurrentChannelRequest 
    (ESCAN00075361). 
    >  Improved description of 
    ComMPncPrepareSleepTimer in chapter 3.4 
    (ESCAN00075422). 
    >  Added chapter 3.1.3.2 (ESCAN00076076). 
    >  Adapted chapter 6.1.1.1.3 (ESCAN00074321). 
    Michael Schligerski  2014-10-02  3.01.00  >  Added support of Bus Type INTERNAL, refer to 
    chapter 3.5 (ESCAN00076859) 
    >  Added Timer-based shutdown synchronization 
    via Silent state, refer to chapter 3.1.2.3 and 
    Figure 3-1  COMM channel state machine 
    (ESCAN00076774) 
    >  Updated include structure in 4.2 
    (ESCAN00078688) 
    >  Extended Partial Network Cluster ID support, 
    refer to chapter 3.1.2 (ESCAN00076852) 
    >  NvM support made optional, refer to chapter 
    3.1.2 (ESCAN000772069) 
    >  Added internal function service IDs 
    (ESCAN00076325) 
    Michael Schligerski  2015-03-25  4.00.00  >  Support of channel-specific Minimum Full Com 
    Mode timer, chapters 3.1.2.4 and 3.3  
    (ESCAN00082062) 
    Michael Schligerski  2015-08-12  5.00.00  >  ‘Post-Build Loadable’ is used as standard 
    MICROSAR feature name, chapter 3.1.2.2 
    >  Service Port names do not contain ComM user 
    and channel identifiers anymore, see chapter 6 
    (ESCAN00084462) 
    >  Added Pnc to Channel Routing Limitation, see 
    chapter 3.1.2.5 (ESCAN00083603) 
    Michael Schligerski  2016-01-12  6.00.00  >  Improved description of 3.1.1 Deviations 
    (ESCAN00087416) 
    Michael Schligerski  2016-02-26  7.00.00  >  Added support of Extended RAM Check, see 
    chapter 3.1.2.6 (ESCAN00089104) 
    >  Improved description of 4.3 Critical Sections 
    (ESCAN00088182) 
    Michael Schligerski  2016-05-24  7.00.01  >  Added API description of 
    ComM_Nm_StateChangeNotification and 
    ComM_ComCbk_<SignalName> 
    (ESCAN00090164) 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Michael Schligerski  2016-08-15  7.01.00  >  Added APIs ComM_GetDcmRequestStatus and 
    ComM_GetMinFullComModeTimerStatus 
    (ESCAN00091481) 
    >  Provided more details on Nm Variant PASSIVE 
    in chapters 3.1.2 and 3.5.1 
    Michael Schligerski  2016-11-09  8.00.00  >  Added Reset after Forcing NO_COM 
    functionality in chapter 3.5.2.1 
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_COMManager.pdf 
    V4.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    V3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.6.0 
    [4]   AUTOSAR 
    AUTOSAR_SWS_EthernetStateManager 
    V2.0.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_UDPNetworkManagement 
    V3.0.0 
    [6]   Vector 
    TechnicalReference_LinNm.pdf 
    see delivery 
     
     
     
     
     

    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Contents 
    1  Component History ...................................................................................................... 11 
    2  Introduction .................................................................................................................. 12 
    2.1  Architecture Overview ............................................................................................ 13 
    3  Functional Description ................................................................................................ 15 
    3.1  Features ................................................................................................................. 15 
    3.1.1 
    Deviations ..................................................................................................... 16 
    3.1.1.1 
    Variant Post-Build ................................................................................... 16 
    3.1.2 
    Additions/ Extensions .................................................................................... 16 
    3.1.2.1 
    Memory Initialization ............................................................................... 17 
    3.1.2.2 
    Post-Build Loadable ............................................................................... 17 
    3.1.2.3 
    Timer-based Shutdown Synchronization via Silent State ........................ 17 
    3.1.2.4 
    Channel-specific Minimum Full Com Mode Timer ................................... 17 
    3.1.2.5 
    Pnc to Channel Routing Limitation.......................................................... 18 
    3.1.2.6 
    Extended RAM Check ............................................................................ 20 
    3.1.3 
    Limitations ..................................................................................................... 21 
    3.1.3.1 
    Non-volatile Data Handling ..................................................................... 21 
    3.1.3.2 
    Assignment of Users to Channels and PNCs ......................................... 21 
    3.2  Initialization ............................................................................................................ 21 
    3.3  States ..................................................................................................................... 21 
    3.4  Partial Network States ............................................................................................ 25 
    3.5  Main Functions ....................................................................................................... 28 
    3.5.1 
    Communication Control Handling .................................................................. 28 
    3.5.2 
    Mode Limitation ............................................................................................. 29 
    3.5.2.1 
    Mode Limitation to NO_COM .................................................................. 29 
    3.5.2.2 
    Prevent Wake-Up ................................................................................... 30 
    3.5.3 
    Synchronous Wake-Up.................................................................................. 30 
    3.6  Error Handling ........................................................................................................ 31 
    3.6.1 
    Development Error Reporting ........................................................................ 31 
    3.6.1.1 
    Parameter Checking ............................................................................... 32 
    3.6.2 
    Production Code Error Reporting .................................................................. 34 
    4  Integration .................................................................................................................... 35 
    4.1  Scope of Delivery ................................................................................................... 35 
    4.1.1 
    Static Files .................................................................................................... 35 
    4.1.2 
    Dynamic Files ............................................................................................... 35 
    4.2  Include Structure .................................................................................................... 36 
    4.3  Critical Sections ..................................................................................................... 37 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    4.4  Handling of non-volatile Data ................................................................................. 37 
    5  API Description ............................................................................................................ 39 
    5.1  Type Definitions ...................................................................................................... 39 
    5.2  Services provided by COMM .................................................................................. 41 
    5.2.1 
    ComM_InitMemory ........................................................................................ 41 
    5.2.2 
    ComM_Init ..................................................................................................... 41 
    5.2.3 
    ComM_DeInit ................................................................................................ 42 
    5.2.4 
    ComM_GetStatus .......................................................................................... 42 
    5.2.5 
    ComM_GetInhibitionStatus ........................................................................... 43 
    5.2.6 
    ComM_RequestComMode ............................................................................ 44 
    5.2.7 
    ComM_GetMaxComMode ............................................................................. 44 
    5.2.8 
    ComM_GetRequestedComMode .................................................................. 45 
    5.2.9 
    ComM_GetCurrentComMode ........................................................................ 45 
    5.2.10  ComM_PreventWakeUp ................................................................................ 46 
    5.2.11  ComM_LimitChannelToNoComMode ............................................................ 47 
    5.2.12  ComM_LimitECUToNoComMode .................................................................. 48 
    5.2.13  ComM_ReadInhibitCounter ........................................................................... 48 
    5.2.14  ComM_ResetInhibitCounter .......................................................................... 49 
    5.2.15  ComM_SetECUGroupClassification .............................................................. 49 
    5.2.16  ComM_GetVersionInfo .................................................................................. 50 
    5.2.17  ComM_MainFunction .................................................................................... 50 
    5.2.18  ComM_GetState ........................................................................................... 51 
    5.2.19  ComM_LimitPncToChannelRouting ............................................................... 52 
    5.2.20  ComM_GetDcmRequestStatus ..................................................................... 52 
    5.2.21  ComM_GetMinFullComModeTimerStatus ..................................................... 53 
    5.3  Services used by COMM ........................................................................................ 54 
    5.4  Callback Functions ................................................................................................. 54 

    5.4.1 
    ComM_CommunicationAllowed .................................................................... 54 
    5.4.2 
    ComM_EcuM_WakeUpIndication .................................................................. 55 
    5.4.3 
    ComM_BusSM_ModeIndication .................................................................... 56 
    5.4.4 
    ComM_DCM_ActiveDiagnostic ..................................................................... 56 
    5.4.5 
    ComM_DCM_InactiveDiagnostic ................................................................... 57 
    5.4.6 
    ComM_Nm_NetworkStartIndication .............................................................. 57 
    5.4.7 
    ComM_Nm_NetworkMode ............................................................................ 58 
    5.4.8 
    ComM_Nm_PrepareBusSleep ...................................................................... 58 
    5.4.9 
    ComM_Nm_BusSleepMode .......................................................................... 59 
    5.4.10  ComM_Nm_RestartIndication ....................................................................... 60 
    5.4.11  ComM_Nm_StateChangeNotification ............................................................ 60 
    5.4.12  ComM_ComCbk_<SignalName> .................................................................. 61 
    5.5  Configurable Interfaces .......................................................................................... 61 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.5.1 
    Notifications .................................................................................................. 61 
    5.5.1.1 
    Dcm_ComM_FullComModeEntered ....................................................... 61 
    5.5.1.2 
    Dcm_ComM_SilentComModeEntered .................................................... 62 
    5.5.1.3 
    Dcm_ComM_NoComModeEntered ........................................................ 62 
    5.5.1.4 
    BswM_ComM_CurrentMode .................................................................. 63 
    5.5.1.5 
    BswM_ComM_CurrentPNCMode ........................................................... 63 
    5.5.1.6 
    BswM_ComM_InitiateReset ................................................................... 64 
    5.5.1.7 
    Rte_Switch_ComM_<UserName>_currentMode .................................... 64 
    6  Service Ports ................................................................................................................ 65 
    6.1.1 
    Client Server Interface ................................................................................... 65 
    6.1.1.1 
    Provide Ports on COMM Side ................................................................. 65 
    6.1.1.1.1  ComM_UserRequest ....................................................................... 65 
    6.1.1.1.2  ComM_ECUModeLimitation ............................................................ 65 
    6.1.1.1.3  ComM_ChannelWakeUp ................................................................. 65 
    6.1.1.1.4  ComM_ChannelLimitation ............................................................... 66 
    6.1.1.2 
    Require Ports on COMM Side ................................................................ 66 
    6.1.2 
    Mode Switch Interface ................................................................................... 66 
    6.1.2.1 
    ComM_CurrentMode .............................................................................. 66 
    6.1.3 
    Sender Receiver Interface ............................................................................. 67 
    6.1.3.1 
    ComM_CurrentChannelRequest ............................................................ 67 
    7  Abbreviations ............................................................................................................... 69 
    7.1  Abbreviations ......................................................................................................... 69 
    8  Contact.......................................................................................................................... 70 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 13 
    Figure 2-2 
    Interfaces to adjacent modules of the COMM ........................................... 14 
    Figure 3-1 
    COMM channel state machine .................................................................. 22 
    Figure 3-2 
    COMM Partial Network Cluster state machine .......................................... 25 
    Figure 4-1 
    Include structure ....................................................................................... 36 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 11 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 15 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 16 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 16 
    Table 3-4  
    States of Routing Limitation on a channel ................................................. 18 
    Table 3-5  
    Service IDs ............................................................................................... 32 
    Table 3-6  
    Errors reported to DET ............................................................................. 32 
    Table 3-7  
    Development Error Reporting: Assignment of checks to services ............. 34 
    Table 4-1  
    Static files ................................................................................................. 35 
    Table 4-2  
    Generated files ......................................................................................... 36 
    Table 5-1  
    Type definitions ......................................................................................... 40 
    Table 5-2  
    ComM_InhibitionType ............................................................................... 40 
    Table 5-3  
    ComM_UserHandleArrayType .................................................................. 41 
    Table 5-4  
    ComM_InitMemory ................................................................................... 41 
    Table 5-5  
    ComM_Init ................................................................................................ 42 
    Table 5-6  
    ComM_DeInit ............................................................................................ 42 
    Table 5-7  
    ComM_GetStatus ..................................................................................... 43 
    Table 5-8  
    ComM_GetInhibitionStatus ....................................................................... 43 
    Table 5-9  
    ComM_RequestComMode ....................................................................... 44 
    Table 5-10  
    ComM_GetMaxComMode ........................................................................ 45 
    Table 5-11  
    ComM_GetRequestedComMode .............................................................. 45 
    Table 5-12  
    ComM_GetCurrentComMode ................................................................... 46 
    Table 5-13  
    ComM_PreventWakeUp ........................................................................... 47 
    Table 5-14  
    ComM_LimitChannelToNoComMode ........................................................ 47 
    Table 5-15  
    ComM_LimitECUToNoComMode ............................................................. 48 
    Table 5-16  
    ComM_ReadInhibitCounter ...................................................................... 49 
    Table 5-17  
    ComM_ResetInhibitCounter ...................................................................... 49 
    Table 5-18  
    ComM_SetECUGroupClassification ......................................................... 50 
    Table 5-19  
    ComM_GetVersionInfo ............................................................................. 50 
    Table 5-20  
    ComM_MainFunction ................................................................................ 51 
    Table 5-21  
    ComM_GetState ....................................................................................... 51 
    Table 5-22 
    ComM_LimitPncToChannelRouting .......................................................... 52 
    Table 5-23  
    ComM_GetDcmRequestStatus ................................................................. 53 
    Table 5-24  
    ComM_GetMinFullComModeTimerStatus ................................................. 54 
    Table 5-25  
    Services used by the COMM .................................................................... 54 
    Table 5-26  
    ComM_CommunicationAllowed ................................................................ 55 
    Table 5-27  
    ComM_EcuM_WakeUpIndication ............................................................. 55 
    Table 5-28  
    ComM_BusSM_ModeIndication................................................................ 56 
    Table 5-29  
    ComM_DCM_ActiveDiagnostic ................................................................. 57 
    Table 5-30  
    ComM_DCM_InactiveDiagnostic .............................................................. 57 
    Table 5-31  
    ComM_Nm_NetworkStartIndication .......................................................... 58 
    Table 5-32  
    ComM_Nm_NetworkMode ........................................................................ 58 
    Table 5-33  
    ComM_Nm_PrepareBusSleep .................................................................. 59 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 

    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Table 5-34  
    ComM_Nm_BusSleepMode ..................................................................... 59 
    Table 5-35  
    ComM_Nm_RestartIndication ................................................................... 60 
    Table 5-36  
    ComM_Nm_StateChangeNotification ....................................................... 61 
    Table 5-37  
    ComM_ComCbk_<SignalName> .............................................................. 61 
    Table 5-38  
    Dcm_ComM_FullComModeEntered ......................................................... 62 
    Table 5-39  
    Dcm_ComM_SilentComModeEntered ...................................................... 62 
    Table 5-40  
    Dcm_ComM_NoComModeEntered .......................................................... 63 
    Table 5-41  
    BswM_ComM_CurrentMode ..................................................................... 63 
    Table 5-42  
    BswM_ComM_CurrentPNCMode ............................................................. 63 
    Table 5-43  
    BswM_ComM_InitiateReset ...................................................................... 64 
    Table 5-44  
    Rte_Switch_ComM_<UserName>_currentMode ...................................... 64 
    Table 6-1  
    ComM_UserRequest ................................................................................ 65 
    Table 6-2  
    ComM_ECUModeLimitation ..................................................................... 65 
    Table 6-3  
    ComM_ChannelWakeUp .......................................................................... 65 
    Table 6-4  
    ComM_ChannelLimitation......................................................................... 66 
    Table 6-5  
    ComM_CurrentMode ................................................................................ 66 
    Table 6-6  
    ComM_CurrentChannelRequest ............................................................... 67 
    Table 7-1  
    Abbreviations ............................................................................................ 69 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    10 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Implementation according to AUTOSAR release 4.0.3 
    1.03.00 
    Support of Post-Build Loadable 
    2.00.00 
    Support of Bus Type Ethernet, support of J1939 NM 
    3.01.00 
    MICROSAR Identity Manager using Post-Build Selectable, support of Bus 
    Type INTERNAL 
    4.00.00 
    Support of channel-specific Minimum Full Com Mode timer 
    5.00.00 
    Pnc to Channel Routing Limitation 
    7.00.00 
    Extended RAM Check 
    8.00.00 
    Reset after Forcing NO_COM functionality 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    11 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module COMM as specified in [1]. 
     
    Supported AUTOSAR Release: 

    Supported Configuration Variants: 
    pre-compile, post-build-loadable 
    Vendor ID: 
    COMM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    COMM_MODULE_ID 
    12 decimal 
    (according to ref. [3]) 
     
     
    The  Communication  Manager  is  a  resource  manager,  which  encapsulates  the  control  of 
    the underlying communication services. 
    The purpose of the COMM module is: 
    >  Coordinating different wake-up events independent of the used bus system. 
    >  Providing the concept of user to request Communication Modes. Coordinating 
    requests of multiple independent users. 
    >  Controlling of more than one communication bus channel of an ECU by implementing 
    a channel state machine for every channel. 
    >  Simplifying the resource management by allocating all resources which are necessary 
    to start or shutdown communication. 
    >  Simplifying the handling of the underlying communication stack (e.g. network 
    management handling). 
    >  Providing mode inhibition functionality to limit the communication capabilities of the 
    ECU. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    12 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    2.1 
    Architecture Overview 
    The following figure shows where the COMM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
      
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    The next figure shows the interfaces to adjacent modules of the COMM. These interfaces 
    are described in chapter 4. 
     
    class Architecture
    Nm
    Dcm
    Com
    Rte
    ComM
    EcuM
    Bsw M
    Det
    Nv M
    CanSM
    EthSm
    FrSm
    LinSm
     
    Figure 2-2  Interfaces to adjacent modules of the COMM 
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. The service ports provided by the 
    COMM are listed in chapter 6 and are defined in [1].  
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    14 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    COMM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features 
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Refer to the chapter 3.1.1 for further information on not supported features. 
    Vector  Informatik  provides  further  COMM  functionality  beyond  the  AUTOSAR  standard. 
    The corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Communication Control Handling  
    Synchronous wake up of channels 
    NM Variant Handling: FULL 
    NM Variant Handling: LIGHT 
    NM Variant Handling: NONE 
    NM Variant Handling: PASSIVE 
    Mode Limitation No Communication 
    Bus Wake-up Inhibition 
    Service Port: ComM_UserRequest 
    Service Port: ComM_ECUModeLimitation 
    Service Port: ComM_ChannelWakeUp 
    Service Port: ComM_ChannelLimitation 
    Service Port: ComM_CurrentMode 
    Service Port: ComM_CurrentChannelRequest 
    Storage of non-volatile values 
    Partial Network Cluster Management 
    Detection and notification of development errors to DET 
    COMM bus type INTERNAL 
    Reset after Forcing NO_COM functionality, see chapter 3.5.2.1 
    Table 3-1   Supported AUTOSAR standard conform features 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    15 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    3.1.1 
    Deviations 
    The following features specified in [1] are not supported: 
    Category 
    Description 
    ASR 
    Version 

    Config 
    ComMDirectUserMapping 
    4.0.3 
    Config 
    ComMUserEcucPartitionRef 
    4.0.3 
    Config 
    ComMUserPerPnc (COMM does not support PNCs without user assigned  4.0.3 
    to it) 
    Functional  Version checking (COMM does not perform Inter Module version checks)  4.0.3 
    < 4.1.2 
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.1.1 
    Variant Post-Build 
    Instead  of  the  Configuration  Variant  Post-Build,  the  Variant  Post-Build-Loadable  is 
    supported. 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Enabling or disabling of User Mode Notification per COMM user (ComMUserModeNotification) 
    Optional inclusion of a user configuration file (ComMUserConfigurationFile) 
    Development Error Reporting is extended by COMM_E_NOSUPPORTED_MODECHANGE, 
    COMM_E_ERROR_IN_PROV_SERVICE, COMM_E_DIAGNOSTIC_NOT_SUPPORTED 
    Memory Initialization 
    Post-Build Loadable, see chapter 3.1.2.2 
    As a compatibility feature, the Client-Server-Interface ComM_ChannelWakeUp can omit the 
    operation GetInhibitionStatus, see chapter 6.1.1.1.3 
    Possibility to assign COMM users to COMM channels with Nm variant PASSIVE. Communication 
    Requests of such users will be ignored. A possible use case is triggering a runnable via RTE 
    mode switch interface ComM_CurrentMode. 
    Timer-based shutdown synchronization via Silent state, see chapter 3.1.2.3 
    Partial Network Cluster ID counting is supported accordingly to Autosar version 4.0.x and 4.1.x 
    as well. Refer to the description of parameter ‘Pnc Id Counting’ for more information. 
    NvM support is optional when using Mode Limitation. Refer to the description of parameter 
    ‘Global NvM Block Descriptor’ for more information. 
    MICROSAR Identity Manager using Post-Build Selectable 
    Support of channel-specific Minimum Full Com Mode timer, see chapter 3.1.2.4 
    Pnc to Channel Routing Limitation 
    Extended RAM Check, see chapter 3.1.2.6 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    16 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    3.1.2.1 
    Memory Initialization 
    Not every start-up code of embedded targets and neither CANoe provide initialized RAM. 
    It thus may happen that the state of a variable that needs initialized RAM may not be set to 
    the  expected  initial  value.  Therefore  an  explicit  initialization  of  such  variables  has  to  be 
    provided at start-up by calling the additional function ComM_InitMemory. 
    For more information refer to chapter 3.2 ‘Initialization’. 
    3.1.2.2 
    Post-Build Loadable 
    In  the  Variant  Post-Build-Loadable,  the  configuration  parameters  ‘ComMChannelPerPnc’ 
    and  ‘ComMUserPerPnc’  are  also  changeable  during  the  post-build  phase  as  addition  to 
    the post-build-changeable parameter ComMPncEnabled required by [1]. 
    The following use cases are supported in post-build phase in addition to [1]: 
    >  Assign a non-coordinated PNC to another channel on an ECU with multiple channels. 
    >  Assign a coordinated PNC to other channels.  
    >  Remove or add one or more users to a PNC. It is allowed that a user is not assigned 
    to any PNC anymore. 
    There are following limitations to be taken into account: 
    >  Coordination type of PNCs cannot be changed in post-build phase. If a PNC was 
    coordinated in pre-compile phase it shall remain coordinated in post-build phase and 
    vice versa. 
    >  If changing the assignment of PNC to channels, the PNC signal configuration made in 
    pre-compile phase (parameter ‘ComMPncComSignal’) must reference the channels, 
    which are added in post-build phase.  
    >  PNCs cannot be added or removed in post-build phase. 
    >  Each PNC shall be assigned to at least one channel and to at least one user. 
    >  If a COMM user was assigned to one or more channels in pre-compile phase, it cannot 
    be assigned to PNCs in post-build phase and vice versa. 
    >  COMM users cannot be created or deleted in post-build phase. 
    3.1.2.3 
    Timer-based Shutdown Synchronization via Silent State 
    ‘Nm  Light  Silent  Timeout’  timer  specifies  the  time  duration  spent  in  the  state 
    COMM_SILENT_COMMUNICATION  after  leaving  COMM_FULL_COM_READY_SLEEP 
    state  and  before  entering  COMM_NO_COMMUNICATION  state.  This  is  similar  to  the 
    Prepare Bus Sleep Phase when Network Management is used. This timer is only available 
    for channels with Bus Type CAN and Nm Variant LIGHT. 
    3.1.2.4 
    Channel-specific Minimum Full Com Mode Timer 
    The  optional  channel-specific  parameter  ‘TMin  Full  Com  Mode  Duration  Of  Channel’  is 
    used to initialize the Minimum Full Com Mode timer of a channel. It specifies the minimum 
    time 
    duration, 
    spent 
    in 
    the 
    COMM_FULL_COMMUNICATION 
    sub-state 
    COMM_FULL_COM_NETWORK_REQUESTED.  The  parameter  is  only  available  for 
    channels with Nm Variants LIGHT and FULL. 
    If the channel has Nm Variant LIGHT: 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    17 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    >  This parameter is used instead of the global ‘TMin Full Com Mode Duration’. 
    >  The Minimum Full Com Mode timer is started when entering the state 
    COMM_FULL_COMMUNICATION. 
    >  The Minimum Full Com Mode timer is cancelled if a user or Dcm requests 
    communication. 
    If the channel has Nm Variant FULL: 
    >  It is recommended to use this parameter if the corresponding BusNm does not support 
    the Repeat Message Time functionality (e.g. NmOsek). 
    >  It is not recommended to use this parameter if the corresponding BusNm supports the 
    Repeat Message Time functionality (e.g. CanNm, FrNm or UdpNm). 
    >  The Minimum Full Com Mode timer is started when entering the state 
    COMM_FULL_COMMUNICATION. 
    >  The Minimum Full Com Mode timer cannot be cancelled. 
    3.1.2.5 
    Pnc to Channel Routing Limitation 
    This feature allows a selective limitation of Partial Network Routing at runtime. 
    The  feature  is  de-activated  per  default.  In  this  case  ComM  will  route  Partial  Network 
    requests  to  all  channels  mapped  to  the  Partial  Network  according  to  AUTOSAR 
    specification [1]. 
    If the feature is activated, it is possible to limit the routing of Partial Network requests on 
    particular  channels  using  the  API  ComM_LimitPncToChannelRouting().  The  Routing 
    Limitation can be applied to channels with both active and passive gateway (coordination) 
    types. There are three states of Routing Limitation on a channel that are described in the 
    Table 3-4. 
    State of Partial Network Routing Limitation 
    GW routes 
    GW keeps 
    on the channel 
    PNC requests  the channel 
    to the channel  awake  

    Disabled in one of the following cases: 
    >  Disabled temporarily as long as a ComM user mapped to the 
    channel (not to PNC) requests FULL_COM or 
    >  Disabled temporarily as long as ERA signal containing a PNC 
     
     
    request is received on the channel or 
    >  A PNC is requested by a ComM user or by another ECU and 
    the routing of this PNC to the channel is not limited. 
    Partly disabled if  
    >  None of above applies and  

    >  As long as Network Management is in state ‘Repeat Message’ 
     
     
    on the channel (e.g. after receiving Nm message in state 
    ‘Prepare Bus Sleep’). 
    Enabled if none of the above applies. 
     
     
    Table 3-4   States of Routing Limitation on a channel 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    18 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    The  states  of  Routing  Limitation  determine  whether  the  GW  routes  PNC  requests  to  a 
    particular channel and whether the GW keeps the channel awake by sending its own Nm 
    message. The basic rule is that the PNC requests are to be routed to a channel if the GW 
    sends its Nm message on it. 
    The Routing Limitation states are exclusive and have the following meaning: 
    >  If Routing Limitation is disabled on a channel, ComM will keep the channel awake and 
    route the request to it. Nm will set the corresponding bits to 1 within PNC vector in the 
    Nm message sent by the GW. 
    >  Otherwise if Routing Limitation is partly disabled on a channel, ComM will not keep 
    the channel awake but will route the request to it. Nm will set the corresponding bits to 
    1 within PNC vector in the Nm message sent by the GW. 
    >  Otherwise if Routing Limitation is enabled on a channel, ComM will not keep the 
    channel awake and there is no Nm messages sent by the GW. 
    The  feature  introduces  an  additional  condition  for  a  PNC  to  enter  the  state 
    PNC_REQUESTED. If a ComM user mapped to the PNC requests FULL_COM, the PNC 
    is allowed to enter PNC_REQUESTED if at least one channel mapped to the PNC has the 
    Routing Limitation disabled or partly disabled. If all channels have the Routing Limitation 
    enabled, the request is stored but inhibited. 
    The following use cases are aimed to illustrate the rules described above: 
    >  PNC user requests FULL_COM, but Routing Limitation is enabled on all channels 
    mapped to the PNC. The request is stored but not granted. 
    >  PNC user requests FULL_COM and there is at least one channel mapped to the PNC 
    having Routing Limitation disabled or partly disabled. ComM will execute the request 
    and PNC will enter PNC_REQUESTED state. ComM will notify BswM. 
    >  Requests via ERA=1 are always granted because Routing Limitation is disabled 
    temporarily on the channel where ERA was received as long as the value of ERA is 1. 
    >  Routing Limitation on a channel can be disabled or partly disabled while the channel 
    is mapped to a PNC which is in state PNC_REQUESTED. Nm will set corresponding 
    bits to 1 within PNC vector of the Nm message sent by the GW. 
    >  Routing Limitation on a channel can be enabled while the channel is mapped to a 
    PNC which is in state PNC_REQUESTED. GW will stop sending the Nm message on 
    the channel. Other ECU’s on the channel will release the PNC due to timeout of ‘Pn 
    Reset Time’ in Nm. 
    >  If a PNC is in state PNC_REQUESTED because a user requests FULL_COM and 
    Routing Limitation is enabled on all channels, the PNC will enter 
    PNC_READY_SLEEP state. 
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    19 
    based on template version 5.2.0 




    Technical Reference MICROSAR Communication Manager 
     
     
    Caution 
    It is ensured that the content of PNC vector is consistent among all Nm messages that 
      GW sends on particular channels. The content of PNC vector considers the mapping of 
    Partial Networks to channels defined in the configuration. Therefore the content of PNC 
    vector can differ on channels if there are PNCs that are not mapped to all channels. 
     
     
     
     
    Caution 
    The State Change Indication callback must be configured within Nm Interface and the 
      related BusNm modules: 
    >  ‘State Change Ind Enabled’ functionality must be activated in each related BusNm. 
    >  ‘Callbacks Prototype Header’ of Nm Interface must be set to ‘ComM_Nm.h’. 
    >  ‘State Change Indication Callback’ of Nm Interface must be set to 
    ComM_Nm_StateChangeNotification. 
     
     
     
    3.1.2.6 
    Extended RAM Check 
    ComM  supports  Extended  RAM  check  of  the  CAN  registers  and  Message  Boxes.  If  the 
    feature is activated, ComM evaluates RAM Check status before starting communication on 
    a  CAN  channel.  If  Extended  RAM  Check  fails  on  a  CAN  channel  communication  is  not 
    started. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    20 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    3.1.3 
    Limitations 
    3.1.3.1 
    Non-volatile Data Handling 
    COMM uses only the NVM global block descriptor to handle the COMM non-volatile data. 
    3.1.3.2 
    Assignment of Users to Channels and PNCs 
    COMM does not support assigning a COMM user to Channel(s) and PNC(s) at the same 
    time.  Instead,  it  is  recommended  to  create  two  COMM  users  in  this  case,  assigning  the 
    first one to Channel(s) and the second one to PNC(s). 
    3.2 
    Initialization 
    Before  calling  any  other  functionality  of  the  COMM  module  the  initialization  function 
    ComM_Init()  has  to  be  called  by  the  application. The  initialization  call  shall  take  place 
    after initializing the BusSM and Nm modules. 
    For API details refer to chapter 5.2.2 ‘ComM_Init’
    The  COMM  module  assumes  that  some  variables  are  initialized  with  certain  values  at 
    start-up. As not all embedded targets support the initialization of RAM within the start-up 
    code the COMM module provides the function ComM_InitMemory(). This function has to 
    be called during start-up and before ComM_Init() is called. Refer also to chapter 3.1.2.1. 
    For API details refer to chapter 5.2.1 ‘ComM_InitMemory’’. 
    3.3 
    States 
    Figure  3-1  shows  the  COMM  state  machine,  which  consists  of  three  main  states 
    representing  abstracted  status  of  communication  capabilities  per  channel.  These  states 
    correspond to the Communication Modes, which are in focus of the users’ interests: 
    >  COMM_NO_COMMUNICATION, 
    >  COMM_SILENT_COMMUNICATION, 
    >  COMM_FULL_COMMUNICATION. 
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    21 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
     stm ComM Main States
    COMM_FULL_COMMUNICATION
    Full Communication requested Minimum FullCom Mode
    [Nm Variant LIGHT]
    Timer running [Nm
    /cancel Minimum FullCom
    Variant LIGHT or FULL]
    No Communication requested and Minimum
    Mode Timer
    FullCom Mode Timer expired [Nm Variant FULL]
    Active
    COMM_FULL_COM_NETWORK_REQUESTED
    No Communication requested [Nm Variant PASSIVE]
    COMM_FULL_COM_READY_SLEEP
    Diagnostic
    Minimum FullCom Mode Timer expired [Nm Variant LIGHT]
    Full Comunication requested [Nm Variant LIGHT or FULL]
    Active Diagnostic indication [Nm Variant LIGHT or FULL]
    Network mode
    Prepare Bus Sleep Mode
    Full Communication
    indication
    indication [Nm Variant
    Nm Light Timeout expired
    requested
    FULL or PASSIVE]
    [Nm Variant LIGHT]
    COMM_SILENT_COMMUNICATION
    [CommunicationAllowed == TRUE]
    Nm Light Silent Timeout
    Bus Sleep Mode indication
    expired [Nm Variant LIGHT]
    [Nm Variant FULL or PASSIVE]
    COMM_NO_COMMUNICATION
    [CommunicationAllowed == FALSE]
    FullCom requested [Mode Limitation is deactivated]
    COMM_NO_COM_REQUEST_PENDING
    Active Diagnostic Indication
    COMM_NO_COM_NO_PENDING_REQUEST
    Passive Wake-up indication
    Pending FullCom request canceled
    Inactive Diagnostic indication
    ComM_Init()
    Request NoCom
    Start-up code or
    ComM_InitMemory()
    COMM_UNINIT
    Power Off
      
    Figure 3-1  COMM channel state machine 
    The sub-states described below represent intermediate states, which perform activities to 
    support  a  synchronized  transition  with  external  partners  and  managing  protocols  (e.g. 
    Nm). The state machine is implemented for each communication channel independently.  
    COMM_UNINIT 
    Before  the  COMM  is  initialized  it  stays  in  this  state.  The  COMM  functionality  cannot  be 
    used. 
    COMM_NO_COMMUNICATION 
    The  state  COMM_NO_COMMUNICATION  represents  the  lowest  state  of  the  COMM. 
    Inside this state no communication capability is available. The state consists of two sub-
    states described below. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    22 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    COMM_NO_COM_NO_PENDING_REQUEST 
    This state is the default state after the initialization of the COMM. 
    The  COMM  resides  in  this  state  until  the  state  COMM_FULL_COMMUNCIATION  is 
    requested. There are different triggers to start communication: 
    >  A user request COMM_FULL_COMMUNCIATION and no Mode Inhibition is active or 
    >  DCM notification of an active diagnostic session or 
    >  A Passive Wake-up indication from ECUM or NM. If Synchronous Wake-up is enabled, 
    the indication is propagated to all channels, which are not already in 
    COMM_FULL_COMMUNCIATION state. 
    COMM_NO_COM_REQUEST_PENDING 
    The  COMM  resides  in  this  state  until  the  communication  will  be  allowed  on  the  channel 
    with  means  of  the  ComM_CommunicationAllowed(TRUE)  indication  or  the  requests  for 
    COMM_FULL_COMMUNCIATION 
    are 
    rejected, 
    i.e. 
    COMM 
    user 
    requests 
    COMM_NO_COMMUNICATION or DCM indicates an inactive diagnostic session. 
    COMM_SILENT_COMMUNICATION 
    The COMM uses this state to support the sleep process of the network management. The 
    state  represents  the  prepare  bus  sleep  phase  of  the  network.  The  COMM  changes  into 
    this  state  if  the  network  management  triggers  the  sleep  process  and  changes  into  the 
    prepare bus sleep mode.  
     
     
    Note
     
      
    Users cannot request this state directly. 
    >  This state is available for Nm Variants FULL and PASSIVE with bus types 
    CAN and Ethernet only. For other bus types, it is skipped. 
    >  This state is available for Nm Variant LIGHT and bus type CAN if Nm Light 
    Silent Timeout is configured. 
    >  Note that Ethernet State Manager ignores requests for 
    COMM_SILENT_COMMUNICATION mode, see [4]. COMM requests it for 
    the sake of consistency when UDP Network Management indicates prepare 
    bus sleep mode, see [5].  
     
     
    The COMM resides in this state until: 
    >  The Network Management indicates a restart after receiving a NM message or 
    >  The Network Management indicates bus sleep mode or 
    >  A user requests COMM_FULL_COMMUNICATION again or 
    >  DCM indicates an active diagnostic session. 
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    23 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    COMM_FULL_COMMUNICATION 
    The  state  COMM_FULL_COMMUNICATION  represents  the  highest  state  of  the  COMM. 
    Inside this state the communication capability is available. The state consists of two sub-
    states described below. 
    COMM_FULL_COM_NETWORK_REQUESTED 
    The activity in this state depends on the configured COMM NM Variant: 
    >  NM Variant FULL 
    >  The network management is set into the “Normal Operation” state. 
    >  COMM resides in this state until the following conditions are fulfilled: 
    >  All users request No Communication and DCM indicated no active diagnostic 
    session. 
    >  The optional channel-specific Minimum Full Com Mode timer is expired, refer to 
    chapter 3.1.2.4. 
    >  NM Variant PASSIVE 
    >  COMM enters COMM_FULL_COM_READY_SLEEP state directly. 
    >  NM Variant LIGHT 
    >  Case 1: transition from COMM_NO_COM_REQUEST_PENDING to 
    COMM_FULL_COM_NETWORK_REQUESTED is triggered by a Passive Wake-up 
    event. All users request No Communication and DCM indicates no active session. 
    >  COMM starts the “Minimum Full Communication Mode Timer”, 
    >  COMM resides in this state until “Minimum Full Communication Mode Time” is 
    expired. 
    >  Case 2: a user requests Full Communication or DCM indicates an active diagnostic 
    session 
    >  COMM cancels the “Minimum Full Communication Mode Timer” if the timer is 
    started. 
    >  COMM resides in this state until all users request No Communication and DCM 
    indicated no active diagnostic session. 
    >  NM Variant NONE 
    >  COMM resides in this state. Shutdown of communication is done by an ECU reset or 
    power off. 
    COMM_FULL_COM_READY_SLEEP 
    The activity inside this state depends on the configured COMM NM Variant: 
    >  NM Variant FULL and PASSIVE 
    >  The network management is set into the Ready Sleep state. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    >  COMM resides in this state until the NM triggers the sleep process or a user requests 
    Full Communication again or DCM indicates an active diagnostic session. 
    >  NM Variant LIGHT 
    >  COMM starts the Nm Light Timeout timer if the value configured is greater than 0s. 
    >  It resides in this state until the Nm Light Timeout timer expires or a user requests Full 
    Communication or DCM indicates an active diagnostic session. 
    >  If the optional Nm Light Silent Timeout is configured greater than 0s, COMM enters 
    COMM_SILENT_COMMUNICATION. Otherwise the next state is 
    COMM_NO_COM_NO_PENDING_REQUEST. 
    >  If Nm Light Timeout timer is configured to 0s, COMM omits the state and enters the 
    next state directly. 
    >  NM Variant NONE 
    >  This state is not available for this NM variant. 
    3.4 
    Partial Network States 
    stm ComM PNC State Machine
    PNC_FULL_COMMUNICATION
    ComM_RequestComMode() OR ComM_COMCbk()
    PNC_REQUESTED
    [ComMUser = FullCom OR (PNC bit within ERAn = 1
    AND ComMPncGatewayEnabled = TRUE) ]
    /BswM_ComM_CurrentPncState()
    Com_SendSignal()
    Channel Full Communication Request()
    Stop ComMPncPrepareSleepTimer
    ComM_RequestComMode() OR ComM_COMCbk()
    ComM_RequestComMode() OR ComM_COMCbk()
    [ComMUser = NoCom AND (NOT (PNC bit within
    [ComMUser = FullCom OR (PNC bit within ERAn = 1
    ERAn = 1 AND ComMPncGatewayEnabled = TRUE))]
    AND ComMPncGatewayEnabled = TRUE) ]
    /BswM_ComM_CurrentPncState()
    /BswM_ComM_CurrentPncState()
    Com_SendSignal()
    Com_SendSignal()
    Channel Full Communication Request()
    ComM_COMCbk() [PNC bit within EIRA = 0]
    PNC_READY_SLEEP
    /BswM_ComM_CurrentPncState()
    PNC_PREPARE_SLEEP
    Start ComMPncPrepareSleepTimer
    ComM_COMCbk() [PNC bit within EIRA = 1]
    /BswM_ComM_CurrentPncState()
    Stop ComMPncPrepareSleepTimer
    ComM_RequestComMode() OR ComM_COMCbk()
    [ComMUser = FullCom OR (PNC bit within ERAn = 1
    AND ComMPncGatewayEnabled = TRUE) ]
    ComM_EcuM_WakeUpIndication()
    ComMPncPrepareSleepTimer
    ComM_COMCbk() [PNC bit within EIRA = 1]
    /BswM_ComM_CurrentPncState()
    [ComMSynchronousWakeUp = TRUE]
    [expired]
    /BswM_ComM_CurrentPncState()
    Com_SendSignal()
    /BswM_ComM_CurrentPncState()
    /BswM_ComM_CurrentPncState()
    Channel Full Communication Request()
    Start ComMPncPrepareSleepTimer
    PNC_NO_COMMUNICATION
    PowerOff
     
    Figure 3-2  COMM Partial Network Cluster state machine 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    25 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    As shown in Figure 3-2   the  COMM  partial  network  state  machine  consists  of  two  main 
    states  representing  the  abstract  status  of  the  partial  network  cluster  (PNC).  The  state 
    machine exists per partial network. 
    COMM  uses  two  types  of  bit  vector  named  EIRA  and  ERA  to  exchange  PNC  status 
    information with other ECUs. Note that ERA is only evaluated if PNC Gateway feature is 
    enabled and only for PNCs which are coordinated, i.e. assigned to more than one COMM 
    channel. Each PNC uses the same bit position within the bit vectors, which is defined by 
    the PNC ID. The status of a PNC within a bit vector (signal) can be 
    >  active if the bit position of the PNC is 1 or 
    >  inactive if the bit position of the PNC is 0. 
     
    PNC_NO_COMMUNICATION 
    This state is the default state after the initialization of the COMM.  
    The partial network leaves this state if one of the following events occurs: 
    >  A user requests the state Full Communication for a partial network or  
    >  EcuM or NM inform COMM about an external wake-up event and  
    ComMPncPrepareSleepTimer is configured with a value > 0 and ‘Synchronous Wake-
    Up’ feature is enabled or 
    >  COMM receives an EIRA or ERA signal which signalized the activation of the partial 
    network. 
     
    PNC_FULL_COMMUNICATION 
    The state consists of three sub-states described below. 
    PNC_REQUESTED 
    The partial network reaches this state if one of the following events occurs: 
    >  COMM user requests COMM_FULL_COMMUNICATION for this partial network or 
    >  An ERA signal with partial network = active is received and the partial network is 
    coordinated. 
    The  state  will  be  left  if  all  COMM  users  for  the  corresponding  partial  network  request 
    COMM_NO_COMMUNICATION  and  the  ERA  signals  for  the  corresponding  partial 
    network are received with status inactive. 
    PNC_READY_SLEEP 
    The partial network reaches this state if the following events occurred: 
    >  All COMM users for the partial network request COMM_NO_COMMUNICATION and 
    >  An EIRA signal is received with partial network = active and 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    26 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    >  All ERA signals are received with partial network = inactive and the partial network is 
    coordinated. 
    The state will be left if a COMM user for PNC requests COMM_FULL_COMMUNCIATION 
    or EIRA is received with partial network = inactive or ERA is received with partial network = 
    active. 
    PNC_PREPARE_SLEEP 
    The partial network reaches this state if one of the following events occurs: 
    >  An EIRA signal is received with partial network = inactive or 
    >  EcuM notified a passive wake-up event and ‘Synchronous Wake-Up’ feature is 
    enabled and ComMPncPrepareSleepTimer is configured with a value > 0. 
    The state will be left if a COMM user for PNC requests COMM_FULL_COMMUNCIATION 
    or  EIRA/ERA  signals  are  received  with  partial  network  =  active  or  the 
    ComMPncPrepareSleepTimer is expired. 
    If ComMPncPrepareSleepTimer is configured with 0, the state PNC_PREPARE_SLEEP is 
    omitted when de-activating the partial network but it is still notified to BswM for the sake of 
    completeness. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    27 
    based on template version 5.2.0 




    Technical Reference MICROSAR Communication Manager 
     
     
    Caution 
    PNC Prepare Sleep Timer shall expire before Network Management leaves Ready 
      Sleep state when shutting down the communication. 
    The crucial time is the time between indication of EIRA signal with PNC status = 
    inactive and indication of Prepare Bus Sleep on CAN or Bus Sleep on FlexRay. The 
    calculation of the exact time value depends on the bus type. 
     
    >  On CAN: 
    CanNm Timeout Time (lowest of all CAN channels) – CanNm PNC Reset Time 
     
    >  On FlexRay: 
    ((Ready Sleep Count+1)*Repetition Cycle*<Duration of FlexRay Cycles>) – FrNm PNC 
    Reset Time 
     
    >  On Ethernet: 
    UdpNm Timeout Time (lowest of all Ethernet channels) – UdpNm PNC Reset Time 
     
    Calculate the lowest BusNm specific Timeout Time according to the rules given above. 
    Then choose the PNC Prepare Sleep Timer to be less than (lowest BusNm specific 
    Timeout Time) – (COMM Main Function Period of Channel with ID 0). 
     
     
     
     
    Caution 
    Only the COMM module is allowed to write the TX EIRA signals. The application must 
      not write the TX EIRA signals by its own. 
     
     
    3.5 
    Main Functions 
    This chapter describes how the Communication Manager features are to be used by upper 
    software layers or application software and shows the interaction with other modules. 
    3.5.1 
    Communication Control Handling 
    The  communication  control  handling  is  the  main  functionality  of  the  communication 
    manager. This functionality contains the following parts: 
    >  Collection of the network wake-up events, means bus wake-up, user and DCM 
    communication requests 
    >  Verification of the network wake-up events and start of the corresponding network with 
    regarding of the used NM variant. 
    The COMM supports the following NM variants: 
    >  FULL, AUTOSAR NM is used. Also it is designed to support LIN NM and J1939 NM. 
    >  PASSIVE, AUTOSAR NM is used, but the ECU is not allowed to keep the network 
    awake. COMM ignores communication requests from users and DCM on this channel; 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    28 
    based on template version 5.2.0 




    Technical Reference MICROSAR Communication Manager 
    refer to chapters 3.1.2, 5.4.4 and 5.4.5. The parameter ComMNoCom has to be set to 
    true. 
    >  LIGHT, no AUTOSAR NM is used, but the shutdown is synchronized via timeout, 
    which is configured with the parameter ComMNmLightTimeout. 
    >  NONE, no AUTOSAR NM is used and no shutdown synchronization is available. I.e. 
    once a channel reached the COMM_FULL_COMMUNICATION mode, it will never 
    leave it. Stop of communication is done via power off or reset. COMM ignores user 
    requests of COMM_NO_COMMUNICATION mode and requests for No 
    Communication Mode Limitation; refer to chapters 5.2.11 and 5.2.12. 
     
     
    Caution 
    If LIN NM is used on a COMM channel, its NM Variant shall be ‘FULL’. 
      LIN NM does not trigger communication shutdown after COMM called 
    Nm_PassiveStartUp. This can prevent the ECU from entering the sleep state. To 
    avoid this, apply one of the workarounds described in the Technical Reference of 
    MICROSAR LIN Network Management [6]. 
     
     
     
     
    Caution 
    If J1939 NM is used on a COMM  channel, its NM Variant shall be ‘FULL’. 
      J1939 NM does not provide Nm_PassiveStartUp API. Therefore channels with 
    J1939 NM cannot be woken up externally. Ensure that parameter ‘Synchronous Wake 
    Up’ is disabled in the COMM module configuration (see chapter 3.5.3)
     
     
    COMM_BUS_TYPE_INTERNAL  shall  be  configured  if  a  channel  is  used  for  internal 
    communication only. Such channels have no corresponding bus interface. Only NM Variant 
    LIGHT is supported for channels with COMM_BUS_TYPE_INTERNAL. 
    3.5.2 
    Mode Limitation 
    Mode  limitation  is a  mechanism  to  restrict  the  actions  of  the  COMM  user,  especially  the 
    requesting  of  communication  modes.  The  COMM  supports  2  different  mode  limitation 
    mechanisms: 
    >  No Communication mode limitation and 
    >  Prevent Wake-up. 
    The  mode  limitation  mechanism  can  be  used  to  restrict  the  communication  requests  of 
    ECUs which wrongly keep the bus awake. 
    3.5.2.1 
    Mode Limitation to NO_COM 
    This mechanism can be used to force COMM channel(s) into the sleep mode although one 
    or  more  COMM  user  requests  COMM_FULL_COMMUNICATION.  Note  that  this  is  not 
    supported for Nm Variant NONE. 
    The limitation can be activated/deactivated via  ComM_LimitChannelToNoComMode(), for 
    a specific channel, or via ComM_LimitECUToNoComMode() for the whole ECU. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    29 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    If Mode Limitation is active, COMM ignores new COMM_FULL_COMMUNICATION mode 
    requests and triggers communication shutdown on the channel. 
    When  a  channel  switches  to  NO_COM  mode  due  to  an  active  Mode  Limitation,  COMM 
    clears  all  COMM_FULL_COMMUNICATION  requests  of  users  that  are  mapped  to  the 
    channel  directly  or  via  PNC.  New  COMM_FULL_COMMUNICATION  mode  requests  are 
    stored but not performed as long as Mode Limitation is active. The requests are performed 
    if Mode Limitation is deactivated. 
    Reset after Forcing NO_COM functionality 
    When a channel switches to NO_COM mode due to an active Mode Limitation (i.e. BusSM 
    indicates NO_COM), COMM requests an ECU reset by calling BswM_ComM_InitiateReset 
    if the following conditions are fulfilled: 
    1.  Reset after Forcing NO_COM functionality is enabled and  
    2.  BusSM indicated NO_COM for all channels and 
    3.  All channels are in NO_COM mode. Possible bus wake-ups are ignored in order to 
    trigger a reset as soon as possible. 
    Notes: 
    >  The purpose of conditions 2 and 3 is to ensure a controlled reset, i.e. to avoid that a 
    reset is performed during active bus communication. 
    >  Conditions 2 and 3 are not applicable for channels with Nm Variant NONE. 
    3.5.2.2 
    Prevent Wake-Up 
    Prevent  Wake-Up  is  the  second  mode  limitation  mechanism;  it  avoids  that  COMM 
    channels can be woken up via a COMM_FULL_COMMUNICATION request  by a COMM 
    user. Prevent wake-up can be activated/deactivated via ComM_PreventWakeUp() but the 
    limitation  is  only  performed  if  the  current  state  of  the  COMM  channel  is 
    COMM_NO_COMMUNCIATION  or  COMM_SILENT_COMMUNCIATION.  User  requests 
    for  COMM_FULL_COMMUNCIATION  are  stored  but  not  performed.  The  requests  are 
    performed if Prevent Wake-up is deactivated. 
     
     
    Note 
    The prevent wake-up state is stored in the non-volatile memory. 
     
     
     
    3.5.3 
    Synchronous Wake-Up 
    Synchronous wake-up means, that the COMM triggers a wake-up of all COMM busses as 
    soon as one COMM bus notifies an external wake–up, e.g. via ECUM wake-up notification 
    or via the notification of the configured NM. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    30 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
     
     
    Caution 
    Synchronous wake-up does only trigger the wake-up but is not responsible to keep all 
      busses awake or responsible for a synchronous shutdown of these busses. 
    Synchronous shutdown of multiple channels is the responsibility of Nm coordinator. 
    If J1939 NM is used on a channel, Synchronous wake-up must be disabled in the 
    COMM module configuration, consider the notes in chapter 3.5.1. 
     
     
    3.6 
    Error Handling 
    3.6.1 
    Development Error Reporting 
    Development errors are reported to the DET using the service  Det_ReportError() as 
    specified  in  [2],  if  development  error  reporting  is  enabled  (i.e.  pre-compile  parameter 
    COMM_DEV_ERROR_DETECT==STD_ON). 
    The reported COMM ID is 12 decimal. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  Table  3-5.  The 
    following table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x01 
    ComM_Init 
    0x02 
    ComM_DeInit 
    0x03 
    ComM_GetStatus 
    0x04 
    ComM_GetInhibitionStatus 
    0x05 
    ComM_RequestComMode 
    0x06 
    ComM_GetMaxComMode 
    0x07 
    ComM_GetRequestedComMode 
    0x08 
    ComM_GetCurrentComMode 
    0x09 
    ComM_PreventWakeUp 
    0x0b 
    ComM_LimitChannelToNoComMode 
    0x0c 
    ComM_LimitECUToNoComMode 
    0x0d 
    ComM_ReadInhibitCounter 
    0x0e 
    ComM_ResetInhibitCounter 
    0x0f 
    ComM_SetECUGroupClassification 
    0x10 
    ComM_GetVersionInfo 
    0x15 
    ComM_Nm_NetworkStartIndication 
    0x18 
    ComM_Nm_NetworkMode 
    0x19 
    ComM_Nm_PrepareBusSleepMode 
    0x1a 
    ComM_Nm_BusSleepMode 
    0x1b 
    ComM_Nm_RestartIndication 
    0x1f 
    ComM_DCM_ActiveDiagnostic 
    0x20 
    ComM_DCM_InactiveDiagnostic 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    31 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Service ID 
    Service 
    0x2a 
    ComM_EcuM_WakeUpIndication 
    0x33 
    ComM_BusSM_ModeIndication 
    0x34 
    ComM_GetState 
    0x35 
    ComM_CommunicationAllowed 
    0x36 
    ComM_LimitPncToChannelRouting 
    0x60 
    ComM_MainFunction 
    0x37 
    ComM_GetDcmRequestStatus 
    0x38 
    ComM_GetMinFullComModeTimerStatus 
    Table 3-5   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01  COMM_E_NOT_INITED 
    API service used without module 
    initialization 
    0x02  COMM_E_WRONG_PARAMETERS 
    API service used with wrong parameters 
    0x03  COMM_E_ERROR_IN_PROV_SERVICE 
    Provided API service of other modules 
    returned with an error 
    0x04  COMM_E_NOSUPPORTED_MODECHANGE  COMM tries to perform a not allowed 
    state change 
    0x05  COMM_E_DIAGNOSTIC_NOT_SUPPORTED  Diagnostic communication is requested 
    or released on a channel where 
    diagnostic is not supported. This happens 
    when Nm Variant PASSIVE is configured 
    on the channel. 
    0x06  COMM_E_ALREADY_INITIALIZED 
    The service ComM_Init is called while the 
    module is already initialized 
    Table 3-6   Errors reported to DET 
    3.6.1.1 
    Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters. The checks in 
    Table  3-7  are  internal  parameter  checks  of  the  API  functions.  These  checks  are  for 
    development  error  reporting  and  can  be  enabled  or  disabled  via  the  parameter 
    COMM_DEV_ERROR_DETECT. 
     
    The following table shows which parameter checks are performed on which services: 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    32 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
     
    Check
     
     
    E
     
    CE
    D
     
    I
    E
    V
    NG
    T
    R
    R
     
    E
    HA
    C
    O
    P
     
     
    P
    RS
    D_S
    DE
    U
    Service 
    E
    T
    IDE
    MO
    _S
    V
    T
    ME
    O
    D_
    A
    R
    E
    NO
     
    T
    D
    R
    P
    A
    R
    IC_
    P
    O
    T
    _
    IN_
    P
    S
    INITE
    R_
    UP
    _
    NG
    S
    NO
    T
    G
    RO
    T
    RRO
    A
    W
    E
    _NO
    _
    _
    _NO
    _DI
    E
    E
    E
    E
    E
    _
    _
    _
    _
    _
    MM
    MM
    MM
    MM
    MM
    CO
    CO
    CO
    CO
    CO
    ComM_Init 
     
     
     
     
     
    ComM_DeInit 
     
     
     
     
     
    ComM_GetStatus 
     
     
     
     
     
    ComM_GetState 
     
     
     
     
     
    ComM_GetInhibitionStatus 
     
     
     
     
     
    ComM_RequestComMode 
     
     
     
     
     
    ComM_GetMaxComMode 
     
     
     
     
     
    ComM_GetRequestedComMode 
     
     
     
     
     
    ComM_GetCurrentComMode 
     
     
     
     
     
    ComM_PreventWakeUp 
     
     
     
     
     
    ComM_LimitChannelToNoComMode   
     
     
     
     
    ComM_LimitECUToNoComMode 
     
     
     
     
     
    ComM_ReadInhibitCounter 
     
     
     
     
     
    ComM_ResetInhibitCounter 
     
     
     
     
     
    ComM_SetECUGroupClassification 
     
     
     
     
     
    ComM_GetVersionInfo 
     
     
     
     
     
    ComM_MainFunction 
     
     
     
     
     
    ComM_CommunicationAllowed 
     
     
     
     
     
    ComM_Nm_NetworkStartIndication 
     
     
     
     
     
    ComM_Nm_NetworkMode 
     
     
     
     
     
    ComM_Nm_PrepareBusSleepMode 
     
     
     
     
     
    ComM_Nm_BusSleepMode 
     
     
     
     
     
    ComM_Nm_RestartIndication 
     
     
     
     
     
    ComM_DCM_ActiveDiagnostic 
     
     
     
     
     
    ComM_DCM_InactiveDiagnostic 
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
     
    Check
     
     
    E
     
    CE
    D
     
    I
    E
    V
    NG
    T
    R
    R
     
    E
    HA
    C
    O
    P
     
     
    P
    RS
    D_S
    DE
    U
    Service 
    E
    T
    IDE
    MO
    _S
    V
    T
    ME
    O
    D_
    A
    R
    E
    NO
     
    T
    D
    R
    P
    A
    R
    IC_
    P
    O
    T
    _
    IN_
    P
    S
    INITE
    R_
    UP
    _
    NG
    S
    NO
    T
    G
    RO
    T
    RRO
    A
    W
    E
    _NO
    _
    _
    _NO
    _DI
    E
    E
    E
    E
    E
    _
    _
    _
    _
    _
    MM
    MM
    MM
    MM
    MM
    CO
    CO
    CO
    CO
    CO
    ComM_EcuM_WakeUpIndication 
     
     
     
     
     
    ComM_BusSM_ModeIndication 
     
     
     
     
     
    ComM_TF_NoCom_NetReq 
     
     
     
     
     
    ComM_TF_ReadyS_NetReq 
     
     
     
     
     
    ComM_TF_NetReq_ReadyS 
     
     
     
     
     
    Table 3-7   Development Error Reporting: Assignment of checks to services 
    3.6.2 
    Production Code Error Reporting 
    COMM does not report any production errors. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    34 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR COMM into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the COMM contains the files which are described in the following chapters. 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    ComM.c  
    This is the source file of the COMM. It contains the 
     
     
    implementation of the main functionality. 
    ComM.h 
    This is the header file of the COMM, which is the 
     
     
    interface for upper layers to the services of the 
    COMM. 
    ComM_Types.h  
    Header File which includes COMM specific data 
     
     
    types. 
    ComM_BusSM.h 
    Header File which includes the external 
     
     
    declarations of the Bus State Manager callback 
    functions. 
    ComM_EcuMBswM.h 
    Header File which includes the external 
     
     
    declarations of the EcuM and BswM callback 
    functions. 
    ComM_Nm.h 
    Header File which includes the external 
     
     
    declarations of the Nm callback functions. 
    ComM_Dcm.h 
    Header File which includes the external 
     
     
    declarations of the Dcm callback functions. 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator 5. 
    File Name 
    Description 
    ComM_Lcfg.c  
    This is the link time configuration source file. It contains all link time 
    configuration settings. 
    ComM_Lcfg.h  
    This is the link time configuration header file. 
    ComM_Cfg.h 
    This is the COMM configuration header file. 
    ComM_GenTypes.h 
    This file contains the generated type definitions of the COMM. 
    ComM_PBcfg.h 
    Post-build variant configuration header file. 
    ComM_PBcfg.c 
    Post-build variant configuration source file. 
    ComM_Private_Cfg.h  This file contains generated types, macros, and #includes which are 
    needed by COMM implementation but not exposed through ComM.h 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    35 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Table 4-2   Generated files 
    4.2 
    Include Structure 
      
     class IncludeStructure
    NvM.h
    SchM_ComM.h
    ComM_Nm.h
    Nm.h
    Det.h
    CanSM_ComM.h
    Dcm_Cbk.h
    «include»
    «include»
    «include» «include» «include»
    «include»
    «include»
    CanSM.h
    «include»
    ComM_Dcm.h
    «include»
    «include»
    ComM.c
    ComM_Lcfg.c
    «include»
    «include»
    EthSM.h
    ComM_BusSM.h
    «include»
    «include»
    «include»
    «include»
    «include» «include»
    ComM_Private_Cfg.h
    «include»
    «include»
    ComM_EcuMBswM.h
    FrSM.h
    «include»
    EcuM_Error.h
    BswM_ComM.h
    Rte_ComM.h
    LinSM.h
    ComM.h
    If Configuration Variant 
    is Post Build Loadable
    «include»
    «include»
    «include»
    ComM_PBcfg.c
    ComM_PBcfg.h
    ComM_Lcfg.h
    Rte_ComM_Type.h
    «include»
    «include»
    «include»
    «include»
    Com.h
    ComM_Cfg.h
    «include»
    ComM_GenTypes.h
    «include»
    Appl_Cbk.h
    «include»
    «include»
    If ComMPncSupport 
    is true
    ComM_Types.h
    ComStack_Types.h
    «include»
     
    Figure 4-1  Include structure 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    36 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    4.3 
    Critical Sections 
    COMM requires the following critical code sections: 
    COMM_EXCLUSIVE_AREA_0 
    >  Configuration: This critical section must lock task interrupts and interrupt sources. 
    >  Purpose: This critical section protects the channel state and user request status. 
    >  This critical section covers calls to several sub-functions and can have a long run-time. 
    COMM_EXCLUSIVE_AREA_1 
    >  Configuration: This critical section must lock task interrupts if ComM_MainFunction() 
    can be interrupted by one of the following BSW Module tasks. Otherwise no interrupt 
    lock is necessary. 
    >  Nm_MainFunction() 
    >  BusNm_MainFunction(), e.g. CanNm_MainFunction() 
    >  BusSM_MainFunction(), e.g. CanSM_MainFunction() 
    >  If ‘Pnc Support’ is enabled in the module configuration, it must be ensured that 
    ComM_MainFunction() is not interrupted by ComM_RequestComMode(). If an 
    interruption is possible, the section requires global interrupt lock. 
    >  Purpose: This critical section protects the channel state. 
    >  This critical section covers calls to several sub-functions and can have a long run-time. 
     
     
     
    Note 
    It is recommended to use OS Resources for these exclusive areas to prevent priority 
      inversions and deadlocks. 
    Using OS Resources for COMM_EXCLUSIVE_AREA_0 is not possible if ‘Pnc Support’ 
    is enabled in the module configuration. 
     
     
     
    4.4 
    Handling of non-volatile Data 
    The non-volatile data is handled via the AUTOSAR NvRAM Manager. The COMM uses the 
    following NvRAM Manager API: 
    >  NvM_GetErrorStatus(..) The non-volatile data must be loaded and stored in the 
    below listed variable before the COMM is initialized via ComM_Init(). The COMM 
    checks with the function NvM_GetErrorStatus(..) if the COMM data is loaded or not. If 
    not then the COMM works with the configured values of the ECU Group Classification 
    and prevent wake-up state. Additionally the COMM resets the inhibition counter to 0. 
    >  NvM_SetRamBlockStatus(..) This function is used to trigger the storage of the 
    non-volatile data. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    37 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
    The  non-volatile  data  of  the  COMM  are  grouped  inside  the  structure  called 
    ComM_Inhibition.  The  structure  contains  the  following  elements  (order  of  elements 
    equal to the structure element order): 
    >  ComM_ECUGroupClassification 
    >  size: 1 Byte 
    >  stores the ECU Group classification 
    >  ComM_InhibitCnt 
    >  size: 2 Byte 
    >  stores the inhibition counter 
    >  ComM_InhibitionStatus[<COMM_ACTIVE_CHANNEL>] 
    >  size: 1 Byte per COMM channel 
    >  stores the prevent wake up state 
     
     
     
    Caution 
    The COMM non-volatile data must be loaded and stored inside the above listed 
      variables before the COMM is initialized via ComM_Init(). If not, COMM will use the 
    configured values.  
    The non-volatile data handling is only necessary if at least one of the COMM 
    configuration options Mode Limitation or Wake-up Inhibition is enabled. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    38 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the COMM are described in this chapter. 
    Type Name 
    C-
    Description 
    Value Range 
    Type 
    ComM_InitStatusType 
    uint8  Initialization 
    COMM_UNINIT 
    status of 
    COMM is not initialized 
    COMM. 
    COMM_INIT 
    COMM is initialized and usable 
    ComM_InhibitionStatusType  uint8  Inhibition 
    Bit 0 (LSB): 
    status of 
    0 - Wake-up Inhibition is not active 
    COMM 
    1 - Wake-up Inhibition is active 
    Bit 1: 
    0 - Mode Limitation is not active 
    1 - Mode Limitation is active 
    ComM_UserHandleType 
    uint8  Handle to 
    0..255 
    identify a 
    Note: ID 255 is reserved 
    COMM user 
    ComM_BusType 
    uint8  Configured 
    COMM_BUS_TYPE_CAN 
    Bus Type of a  The channel is a CAN Channel 
    COMM 
    COMM_BUS_TYPE_FR 
    Channel 
    The channel is a FlexRay channel 
    COMM_BUS_TYPE_LIN 
    The channel is a LIN channel 
    COMM_BUS_TYPE_ETH 
    The channel is an Ethernet channel 
    COMM_BUS_TYPE_INTERNAL 
    The channel is an INTERNAL channel 
    ComM_ModeType 
    uint8  Current 
    COMM_NO_COMMUNICATION   
    COMM mode  COMM is in the state No Communication 
    (main state of  COMM_SILENT_COMMUNICATION 
    the state 
    machine)
    COMM is in state Silent Communication
     
     
    COMM_FULL_COMMUNICATION 
    COMM is in state Full Communication 
    ComM_PncModeType 
    uint8  Current mode  COMM_PNC_NO_COMMUNICATION  
    of a PNC 
    PNC is in the state No Communication 
    COMM_PNC_PREPARE_SLEEP 
    PNC is in state Prepare Sleep 
    COMM_PNC_READY_SLEEP 
    PNC is in state Ready Sleep 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    39 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Type Name 
    C-
    Description 
    Value Range 
    Type 
    COMM_PNC_REQUESTED 
    PNC is in state Requested 
    ComM_StateType 
    uint8  State and 
    COMM_NO_COM_NO_PENDING_REQUEST 
    sub-state of 
    COMM_NO_COM_REQUEST_PENDING 
    COMM state 
    machine
    COMM_FULL_COM_NETWORK_REQUESTED 
     
    COMM_FULL_COM_READY_SLEEP 
    COMM_SILENT_COM 
    ComM_ConfigType 
    struct  Post-build 

    configuration 
    structure 
    Table 5-1   Type definitions 
    ComM_InhibitionType 
    This structure contains current inhibition status. It is stored non-volatile. 
     
    Struct Element Name 
    C-
    Description 
    Value Range 
    Type 
    ComM_ECUGroupClassification  uint8 
    Current ECU 

    group 
    ECU is not affected by mode 
    classification 
    inhibition 

    ECU is affected by Wake-up 
    Inhibition only 

    ECU is affected by Mode Limitation 
    only 

    ECU is affected by both inhibition 
    types 
    ComM_InhibitCnt 
    uint16  Inhibition 
    0..65535 
    counter 
    ComM_InhibitionStatus 
    uint8[]  Inhibition status  0..3 
    per COMM 
    Refer to description of 
    channel 
    ComM_InhibitionStatusType 
    Table 5-2   ComM_InhibitionType 
    ComM_UserHandleArrayType 
    This structure contains the set of COMM users requesting Full Communication for a channel. 
     
    Struct Element Name  C-Type 
    Description 
    Value Range 
    numberOfRequesters  uint8 
    Number of valid user handles in the 
    0..254 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    40 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Struct Element Name  C-Type 
    Description 
    Value Range 
    handleArray member. The value is 
    zero if no user keeps the channel 
    requested. 
    handleArray 
    ComM_UserHan User handles of the users which keep   
    dleType[] 
    the channel requested (if any), 
    starting in its first entries. The size of 
    the array is the number of users 
    configured on the channel. 
    Table 5-3   ComM_UserHandleArrayType 
    5.2 
    Services provided by COMM 
    5.2.1 
    ComM_InitMemory 
    Prototype 
    void ComM_InitMemory ( void ) 
    Parameter 


    Return code 


    Functional Description 
    If RAM is not automatically initialized at start-up, this function must be called from start-up code to ensure 
    that variables which must be initialized with a certain value (e.g. initialization status with COMM_UNINIT 
    value) are set to those values. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is a Vector Extension. 
    Expected Caller Context 
    >  This function has to be called once during start-up and before ComM_Init() is called. 
    Table 5-4   ComM_InitMemory 
    5.2.2 
    ComM_Init 
    Prototype 
    void ComM_Init ( void ) 
    void ComM_Init ( ComM_ConfigType* ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Configuration pointer is needed if MICROSAR Identity Manager Post-Build 
    Selectable or Post-Build Loadable is used. Otherwise the function has no 
    parameter. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    41 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Return code 


    Functional Description 
    This function initializes the COMM. All variables are set to default values. The COMM initialization state is 
    set to COMM_INIT and the COMM main state is set to COMM_NO_COM_NO_PENDING_REQUEST. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  If Mode Limitation or Wake-up Inhibition is enabled, the non-volatile values must be loaded 
    and stored before this function is called (refer to chapter ‘Handling of non-volatile Data’). 
    Expected Caller Context 
    >  This function is to be called once during start-up after ComM_InitMemory() is called. 
    Table 5-5   ComM_Init 
    5.2.3 
    ComM_DeInit 
    Prototype 
    void ComM_DeInit ( void ) 
    Parameter 


    Return code 


    Functional Description 
    This function de-initializes COMM and sets the initialization status to COMM_UNINIT. It stores non-volatile 
    values in NVRAM (refer to chapter ‘Handling of non-volatile Data’). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is executed if all COMM channels are in state 
    COMM_NO_COM_NO_PENDING_REQUEST. Otherwise calling the function has no effect. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context  
    Table 5-6   ComM_DeInit 
    5.2.4 
    ComM_GetStatus 
    Prototype 
    Std_ReturnType ComM_GetStatus ( ComM_InitStatusType* Status ) 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    42 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Parameter 
    Status 
    Pointer where the COMM initialization status shall be stored 
    Return code 
    E_OK 
    ComM_GetStatus has performed 
    E_NOT_OK 
    Invalid parameter 
    Functional Description 
    This function gets the initialization status of the COMM. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-7   ComM_GetStatus 
    5.2.5 
    ComM_GetInhibitionStatus 
    Prototype 
    Std_ReturnType ComM_GetInhibitionStatus ( NetworkHandleType Channel, 
    ComM_InihibitionStatusType* Status ) 
    Parameter 
    Channel 
    Index of the system channel 
    Status 
    Pointer where the COMM inhibition status shall be stored 
    Return code 
    E_OK 
    Successfully returned Inhibition Status 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function gets the current COMM inhibition status of the given channel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-8   ComM_GetInhibitionStatus 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    43 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.2.6 
    ComM_RequestComMode 
    Prototype 
    Std_ReturnType ComM_RequestComMode ( ComM_UserHandleType User, ComM_ModeType 
    ComMode ) 
    Parameter 
    User 
    Index of the User, the user handles are generated and can be found in the 
    ComM_Lcfg.h file 
    ComMode 
    The requested communication mode: 
    COMM_FULL_COMMUNICATION 
    COMM_NO_COMMUNICATION 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    COMM_E_MODE_LIMITATI Requested was successful but mode cannot be granted because of mode 
    ON 
    inhibition 
    Functional Description 
    This function is used by upper layer modules or application to request the given communication mode. The 
    communication mode request is stored and will be processed in the ComM_MainFunction(). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is asynchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-9   ComM_RequestComMode 
    5.2.7 
    ComM_GetMaxComMode 
    Prototype 
    Std_ReturnType ComM_GetMaxComMode ( ComM_UserHandleType User, ComM_ModeType* 
    ComMode ) 
    Parameter 
    User 
    Index of the User, the user handles are generated and can be found in the 
    ComM_Lcfg.h file 
    ComMode 
    Pointer where the maximal communication mode of the given user shall be 
    stored 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Functional Description 
    This function queries the maximum allowed communication mode of the corresponding user. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-10   ComM_GetMaxComMode 
    5.2.8 
    ComM_GetRequestedComMode 
    Prototype 
    Std_ReturnType ComM_GetRequestedComMode ( ComM_UserHandleType User, 
    ComM_ModeType* ComMode ) 
    Parameter 
    User 
    Index of the User, the user handles are generated and can be found in the 
    ComM_Lcfg.h file 
    ComMode 
    Pointer where the requested communication mode of the given user shall be 
    stored 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function queries the requested communication mode of the corresponding user. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-11   ComM_GetRequestedComMode 
    5.2.9 
    ComM_GetCurrentComMode 
    Prototype 
    Std_ReturnType ComM_GetCurrentComMode ( ComM_UserHandleType User, 
    ComM_ModeType* ComMode ) 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    45 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Parameter 
    User 
    Index of the User, the user handles are generated and can be found in the 
    ComM_Lcfg.h file 
    ComMode 
    Pointer where the current communication mode of the given user shall be 
    stored 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function queries the current communication mode of the corresponding user. If the user is assigned to 
    more than one communication channel, then always the lowest communication mode is returned. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-12   ComM_GetCurrentComMode 
    5.2.10  ComM_PreventWakeUp 
    Prototype 
    Std_ReturnType ComM_PreventWakeUp ( NetworkHandleType Channel, boolean Status ) 
    Parameter 
    Channel 
    Index of the system channel 
    Status 
    TRUE: Wake Up Inhibition is switched on 
    FALSE: Wake Up Inhibition is switched off 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Request is ignored if one of the following occurs 
    >  Channel parameter is invalid or 
    >  'Wake-Up Inhibition Enabled‘ is de-activated in the module configuration or 
    >  ‘ECU Group Classification’ does not support Prevent Wake-Up (refer to 
    chapter 5.2.15). 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function changes the inhibition status ComMNoWakeUp of the COMM for the given channel. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    46 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Particularities and Limitations 
    >  A proper ECU Group Classification shall be set before using this API (refer to chapter 5.2.15). 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-13   ComM_PreventWakeUp 
    5.2.11  ComM_LimitChannelToNoComMode 
    Prototype 
    Std_ReturnType ComM_LimitChannelToNoComMode ( NetworkHandleType Channel, 
    boolean Status ) 
    Parameter 
    Channel 
    Index of the system channel 
    Status 
    TRUE: limitation to COMM_NO_COMMUNCIATION is ON 
    FALSE: limitation to COMM_NO_COMMUNCIATION is OFF 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Request is ignored if one of the following occurs 
    >  Channel parameter is invalid or 
    >  'Mode Limitation Enabled‘ is de-activated in the module configuration or 
    >  ‘ECU Group Classification’ does not support Mode Limitation (refer to 
    chapter 5.2.15) or 
    >  The current state of the COMM channel is not 
    COMM_FULL_COM_NETWORK_REQUESTED or 
    >  Nm Variant NONE is configured on the channel. 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function changes the inhibition status ComMNoCom of the COMM for the given channel. 
    Particularities and Limitations 
    >  A proper ECU Group Classification shall be set before using this API (refer to chapter 5.2.15). 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-14   ComM_LimitChannelToNoComMode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    47 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.2.12  ComM_LimitECUToNoComMode 
    Prototype 
    Std_ReturnType ComM_LimitECUToNoComMode ( boolean Status ) 
    Parameter 
    Status 
    TRUE: limitation to COMM_NO_COMMUNCIATION is ON 
    FALSE: limitation to COMM_NO_COMMUNCIATION is OFF 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Request is ignored if one of the following occurs 
    >  'Mode Limitation Enabled‘ is de-activated in the module configuration or 
    >  ‘ECU Group Classification’ does not support Mode Limitation (refer to 
    chapter 5.2.15) or 
    >  The API ComM_LimitChannelToNoComMode returned E_NOT_OK for at 
    least one channel. 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function changes the inhibition status ComMNoCom of the COMM for all channels. 
    Particularities and Limitations 
    >  A proper ECU Group Classification shall be set before using this API (refer to chapter 5.2.15)
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-15   ComM_LimitECUToNoComMode 
    5.2.13  ComM_ReadInhibitCounter 
    Prototype 
    Std_ReturnType ComM_ReadInhibitCounter ( uint16* CounterValue ) 
    Parameter 
    CounterValue 
    Pointer where the value of the COMM mode inhibition counter shall be stored 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function returns the amount of rejected Full Communication user requests. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    48 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-16   ComM_ReadInhibitCounter 
    5.2.14  ComM_ResetInhibitCounter 
    Prototype 
    Std_ReturnType ComM_ReadInhibitCounter ( void ) 
    Parameter 


    Return code 
    E_OK 
    Request is accepted 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function resets the counter of rejected Full Communication user requests. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-17   ComM_ResetInhibitCounter 
    5.2.15  ComM_SetECUGroupClassification 
    Prototype 
    Std_ReturnType ComM_SetECUGroupClassification ( ComM_InhibitionStatusType 
    Status ) 
    Parameter 
    Status 
    Defines Mode Inhibition types the ECU is affected by: 
    0 - ECU is not affected by mode inhibition 
    1 - ECU is affected by Wake-up Inhibition only 
    2 - ECU is affected by Mode Limitation only 
    3 - ECU is affected by both inhibition types 
    Return code 
    E_OK 
    Request is accepted 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    49 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function changes the ECU group classification status during runtime. The value is stored non-volatile. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-18   ComM_SetECUGroupClassification 
    5.2.16  ComM_GetVersionInfo 
    Prototype 
    void ComM_GetVersionInfo ( Std_versionInfoType* versioninfo ) 
    Parameter 
    versioninfo 
    Pointer where the version information shall be stored. 
    Return code 


    Functional Description 
    This function is called to get the version information of the COMM. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The Function is only available if it is enabled during pre-compile time 
    (COMM_VERSION_INFO_API == STD_ON) 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-19   ComM_GetVersionInfo 
    5.2.17  ComM_MainFunction 
    Prototype 
    void ComM_MainFunction_<Channel_ID> ( void ) 
    (Channel_ID 0..255) 
    Parameter 


    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    50 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Return code 


    Functional Description 
    This function must be called cyclically with the configured COMM cycle time. Within this function COMM 
    performs the channel specific state transitions and state change notifications to users and BswM. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Function must be called in task context and not in a reentrant way 
    Table 5-20   ComM_MainFunction 
    5.2.18  ComM_GetState 
    Prototype 
    Std_ReturnType ComM_GetState ( NetworkHandleType Channel, ComM_StateType* State 

    Parameter 
    Channel 
    Index of the system channel 
    State 
    Pointer where the current COMM state shall be stored 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    This function queries the current communication state of the corresponding channel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-21   ComM_GetState 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    51 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.2.19  ComM_LimitPncToChannelRouting 
    Prototype 
    Std_ReturnType ComM_LimitPncToChannelRouting( PNCHandleType Pnc, 
    NetworkHandleType Channel, boolean Status ) 
    Parameter 
    Pnc 
    Handle of the PNC to set the limitation status for. Handles can be found in 
    ComM_Lcfg.h file. 
    Channel 
    Handle of the system channel to set the limitation status for. Handles can be 
    found in ComM_Lcfg.h file. 
    Status 
    TRUE: activate the Routing Limitation of the PNC on the channel. 
    FALSE: de-activate the Routing Limitation of the PNC on the channel. This is 
    the default status set after initialization of ComM module. 
    Return code 
    E_OK 
    The Routing Limitation status is accepted, parameters are correct and ComM 
    module is initialized. 
    E_NOT_OK 
    The Routing Limitation status is not accepted if one of following occurs: 
    >  ComM module is not initialized or 
    >  One of the parameters is out of range or 
    >  The ‘Pnc Gateway Type’ of the system channel provided is 
    COMM_GATEWAY_TYPE_NONE. 
    Functional Description 
    The function stores the limitation status for the given PNC and Channel. The status will be used in 
    combination with some other conditions (current Nm state, receiving of ERA signal) to decide whether the 
    routing of PNC information on the channel is active or not. The decision and corresponding actions are 
    taken in the next ComM_MainFunction() 
    Particularities and Limitations 
    >  COMM must be initialized. 
    Call context 
    >  Function can be called in task and interrupt context 
    Table 5-22  ComM_LimitPncToChannelRouting 
    5.2.20  ComM_GetDcmRequestStatus 
    Prototype 
    Std_ReturnType ComM_GetDcmRequestStatus (NetworkHandleType Channel, boolean 
    *Status) 
    Parameter 
    Channel [in] 
    Valid channel identifier (network handle) 
    Status [out] 
    Valid pointer where the request status shall be stored 
    TRUE: DCM indicated active diagnostic 
    FALSE: otherwise 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    52 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    Queries the status of DCM active diagnostic request of the corresponding channel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The function is only available if DCM module is present (COMM_DCM_INDICATION == 
    STD_ON) 
    Call context 
    >  Function can be called in task and interrupt context 
    Table 5-23   ComM_GetDcmRequestStatus 
    5.2.21  ComM_GetMinFullComModeTimerStatus 
    Prototype 
    Std_ReturnType ComM_GetMinFullComModeTimerStatus (NetworkHandleType Channel, 
    boolean *Status) 
    Parameter 
    Channel [in] 
    Valid channel identifier (network handle) 
    Status [out] 
    Valid pointer where the timer status shall be stored 
    TRUE: Min Full Com Mode Timer is running 
    FALSE: otherwise 
    Return code 
    E_OK 
    Request is accepted 
    E_NOT_OK 
    Invalid parameter 
    COMM_E_UNINIT 
    COMM is not initialized 
    Functional Description 
    Queries the status of Min Full Com Mode Timer of the corresponding channel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The function is only available if at least one channel has Min Full Com Mode Timer 
    (COMM_MINFULLCOMTIMEOFCHANNEL == STD_ON) 
    Call context 
    >  Function can be called in task and interrupt context 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    53 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Table 5-24   ComM_GetMinFullComModeTimerStatus 
    5.3 
    Services used by COMM 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    COMM are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    CanSM 
    CanSM_RequestComMode  
    CanSM 
    CanSM_GetCurrentComMode 
    LinSM 
    LinSM_RequestComMode  
    LinSM 
    LinSM_GetCurrentComMode 
    FrSM 
    FrSM_RequestComMode  
    FrSM 
    FrSM_GetCurrentComMode 
    EthSM 
    EthSM_RequestComMode 
    EthSM 
    EthSM_GetCurrentComMode 
    NvM 
    NvM_GetErrorStatus 
    NvM 
    NvM_SetRamBlockStatus 
    Nm 
    Nm_PassiveStartUp 
    Nm 
    Nm_NetworkRequest 
    Nm 
    Nm_NetworkRelease 
    BswM 
    BswM_ComM_CurrentMode 
    BswM 
    BswM_ComM_CurrentPNCMode 
    BswM 
    BswM_ComM_InitiateReset 
    SchM 
    SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_0 
    SchM 
    SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_0 
    SchM 
    SchM_Enter_ComM_COMM_EXCLUSIVE_AREA_1 
    SchM 
    SchM_Exit_ComM_COMM_EXCLUSIVE_AREA_1 
    COM 
    Com_SendSignal 
    COM 
    Com_ReceiveSignal 
    Table 5-25   Services used by the COMM 
    5.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the COMM and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header files ComM_BusSM.h, ComM_Dcm.h, ComM_EcuMBswM.h and ComM_Nm.h. 
    5.4.1 
    ComM_CommunicationAllowed 
    Prototype 
    void ComM_CommunicationAllowed ( NetworkHandleType Channel, boolean Allowed ) 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    54 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Parameter 
    Channel 
    Index of the system channel 
    Allowed 
    TRUE: Communication is allowed 
    FALSE: Communication is not allowed (default after COMM initialization) 
    Return code 


    Functional Description 
    The function indicates to COMM when communication is allowed. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  COMM must be initialized 
    >  The communication allowed state is only evaluated in the COMM state 
    COMM_NO_COM_REQUEST_PENDING 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-26   ComM_CommunicationAllowed 
    5.4.2 
    ComM_EcuM_WakeUpIndication 
    Prototype 
    void ComM_EcuM_WakeUpIndication ( const NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This function notifies the COMM about a valid bus wake-up event. The COMM stores this event and start 
    up the corresponding channel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-27   ComM_EcuM_WakeUpIndication  
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    55 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.4.3 
    ComM_BusSM_ModeIndication 
    Prototype 
    void ComM_BusSM_ModeIndication ( const NetworkHandleType Channel, 
    ComM_ModeType* ComM_Mode ) 
    Parameter 
    Channel 
    Index of the system channel 
    ComM_Mode 
    Pointer to variable which contains the new BusSM communication mode 
    Return code 


    Functional Description 
    This function notifies the COMM about a state change of the BusSM. The COMM performs corresponding 
    actions dependent on the given ComM_Mode. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-28   ComM_BusSM_ModeIndication 
    5.4.4 
    ComM_DCM_ActiveDiagnostic 
    Prototype 
    void ComM_DCM_ActiveDiagnostic ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This function notifies the COMM about the start of an active diagnostic session for the given channel. The 
    COMM starts the communication for this channel as long as the DCM informs the COMM about the end of 
    this session. If more channels needed for diagnostic purpose, DCM needs to indicate it for each channel. 
    If the Nm Variant configured on the channel is PASSIVE 
    >  COMM ignores the indication and 
    >  Reports a DET error with error code COMM_E_DIAGNOSTIC_NOT_SUPPORTED. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    56 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-29   ComM_DCM_ActiveDiagnostic 
    5.4.5 
    ComM_DCM_InactiveDiagnostic 
    Prototype 
    void ComM_DCM_InactiveDiagnostic (NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This function notifies the COMM about the end of the DCM diagnostic session for the given channel. The 
    COMM triggers the network shutdown for this channel if all COMM users assigned to it request the COMM 
    state No Communication. 
    If the Nm Variant configured on the channel is PASSIVE 
    >  COMM ignores the indication and 
    >  Reports a DET error with error code COMM_E_DIAGNOSTIC_NOT_SUPPORTED. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-30   ComM_DCM_InactiveDiagnostic 
    5.4.6 
    ComM_Nm_NetworkStartIndication 
    Prototype 
    void ComM_Nm_NetworkStartIndication ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel, which has already entered Bus-Sleep Mode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    57 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Return code 


    Functional Description 
    This function notifies the COMM about a restart of the network management. The restart was triggered by 
    receiving an Nm message when Nm was in Bus-Sleep Mode. COMM stores the event and starts up the 
    corresponding network in the next ComM_MainFunction. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-31   ComM_Nm_NetworkStartIndication 
    5.4.7 
    ComM_Nm_NetworkMode 
    Prototype 
    void ComM_Nm_NetworkMode ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This function notifies the COMM that the Nm entered the Network Mode. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-32   ComM_Nm_NetworkMode 
    5.4.8 
    ComM_Nm_PrepareBusSleep 
    Prototype 
    void ComM_Nm_PrepareBusSleep ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    58 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Return code 


    Functional Description 
    This function notifies the COMM that the NM has entered Prepare Bus-Sleep Mode. The COMM uses this 
    function as synchronization for the network shutdown. Inside this function the COMM sets the 
    corresponding Bus state Manager into the COMM mode Silent Communication and the COMM itself 
    changes the state to Silent Communication. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant (but not for the same Nm channel). 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-33   ComM_Nm_PrepareBusSleep 
    5.4.9 
    ComM_Nm_BusSleepMode 
    Prototype 
    void ComM_Nm_BusSleepMode ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This function notifies the COMM that the NM ends the prepare bus sleep phase and has entered Bus-Sleep 
    Mode. The COMM uses this function as synchronization for the network shutdown. Inside this function the 
    COMM sets the corresponding Bus state Manager into the COMM mode No Communication and the 
    COMM itself changes the state to No Communication. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant (but not for the same Nm channel). 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-34   ComM_Nm_BusSleepMode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    59 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.4.10  ComM_Nm_RestartIndication 
    Prototype 
    void ComM_Nm_RestartIndication ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel, which has already entered Bus-Sleep Mode 
    Return code 


    Functional Description 
    NmIf notifies COMM that NmIf has started to shut down the coordinated busses, and not all coordinated 
    busses have indicated Bus-Sleep Mode, and on at least one of the coordinated busses Nm is restarted. 
    COMM stores the event and starts up the corresponding network in the next ComM_MainFunction. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    >  COMM must be initialized. 
    Expected Caller Context 
    >  Function can be called in task and interrupt context 
    Table 5-35   ComM_Nm_RestartIndication 
    5.4.11  ComM_Nm_StateChangeNotification 
    Prototype 
    void ComM_Nm_StateChangeNotification ( const NetworkHandleType Channel, const 
    Nm_StateType NmPreviousState, const Nm_StateType NmCurrentState ) 
    Parameter 
    Channel 
    Valid channel identifier (network handle) 
    NmPreviousState 
    Previous state of Nm 
    NmCurrentState 
    Current state of Nm 
    Return code 
    None 

    Functional Description 
    Notification that the Nm state has changed. The Pnc Routing Limitation state is updated depending on Nm 
    has left or entered the state NM_STATE_REPEAT_MESSAGE. 
    Particularities and Limitations 
    >  The function is available if Pnc to Channel Routing Limitation feature is activated. 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    Call context 
    >  Function can be called in task or interrupt context 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    60 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Table 5-36   ComM_Nm_StateChangeNotification 
    5.4.12  ComM_ComCbk_<SignalName> 
    Prototype 
    void ComM_ComCbk_<SignalName> ( void ) 
    Parameter 


    Return code 
    None 

    Functional Description 
    Notification that ComSignal data which is used to transport the partial network channel request information 
    has changed. SignalName is the name of the corresponding EIRA_RX or ERA ComSignal. The function is 
    generated. 
    Particularities and Limitations 
    >  The function is available if support of Partial Networking is enabled. 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    Call context 
    >  Function can be called in task context 
    Table 5-37   ComM_ComCbk_<SignalName> 
    5.5 
    Configurable Interfaces 
    5.5.1 
    Notifications 
    At  its  configurable  interfaces  the  COMM  defines  notifications  that  can  be  mapped  to 
    callback functions provided by other modules. The mapping is not statically defined by the 
    COMM  but  can  be  performed  at  configuration  time. The  function  prototypes  that  can  be 
    used  for  the  configuration  have  to  match  the  appropriate  function  prototype  signatures, 
    which are described in the following sub-chapters.  
    5.5.1.1 
    Dcm_ComM_FullComModeEntered 
    Prototype 
    void Dcm_ComM_FullComModeEntered ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This callback function informs the DCM about the COMM state change into Full Communication. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    61 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Particularities and Limitations 
    >  This callback function is only available if the DCM module is activated in the ECU 
    configuration. 
    Call context 
    >  The function is called in the context of ComM_BusSM_ModeIndication 
    Table 5-38   Dcm_ComM_FullComModeEntered  
    5.5.1.2 
    Dcm_ComM_SilentComModeEntered 
    Prototype 
    void Dcm_ComM_SilentComModeEntered ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This callback function informs the DCM about the COMM state change into Silent Communication. 
    Particularities and Limitations 
    >  This callback function is only available if the DCM module is activated in the ECU 
    configuration. 
    Call context 
    >  The function is called in the context of ComM_BusSM_ModeIndication 
    Table 5-39   Dcm_ComM_SilentComModeEntered  
    5.5.1.3 
    Dcm_ComM_NoComModeEntered 
    Prototype 
    void Dcm_ComM_NoComModeEntered ( NetworkHandleType Channel ) 
    Parameter 
    Channel 
    Index of the system channel 
    Return code 


    Functional Description 
    This callback function informs the DCM about the COMM state change into No Communication. 
    Particularities and Limitations 
    >  This callback function is only available if the DCM module is activated in the ECU 
    configuration. 
    Call context 
    >  The function is called in the context of ComM_BusSM_ModeIndication 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    62 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    Table 5-40   Dcm_ComM_NoComModeEntered 
    5.5.1.4 
    BswM_ComM_CurrentMode 
    Prototype 
    void BswM_ComM_CurrentMode ( NetworkHandleType Network, ComM_ModeType 
    RequestedMode ) 
    Parameter 
    Network 
    Index of the system channel 
    RequestedMode 
    Current Communication Mode, where COMM changed to 
    Return code 


    Functional Description 
    COMM indicates every main state change to BswM. 
    Particularities and Limitations 
    >  
    Call context 
    >  The function is called in the context of ComM_BusSM_ModeIndication 
    Table 5-41   BswM_ComM_CurrentMode 
    5.5.1.5 
    BswM_ComM_CurrentPNCMode 
    Prototype 
    void BswM_ComM_CurrentPNCMode ( PNCHandleType Pnc, ComM_PncModeType 
    RequestedMode ) 
    Parameter 
    Pnc 
    Partial network identifier 
    RequestedMode 
    Partial network state where the COMM changed to 
    Return code 


    Functional Description 
    COMM indicates every partial network state change to BswM. 
    Particularities and Limitations 
    >  This callback function is only available if Partial Network functionality is activated in the ECU 
    configuration. 
    Call context 
    >  The function is called in the context of ComM_MainFunction 
    Table 5-42   BswM_ComM_CurrentPNCMode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    63 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    5.5.1.6 
    BswM_ComM_InitiateReset 
    Prototype 
    void BswM_ComM_InitiateReset ( void ) 
    Parameter 


    Return code 


    Functional Description 
    COMM indicates a need for an ECU reset to BswM, see chapter ‘Mode Limitation to NO_COM’ for details. 
    Particularities and Limitations 
    >  This callback function is only available if BswM has a Mode Request Port with the Source 
    BswMComMInitiateReset. 
    Call context 
    >  The function is called in the context of ComM_BusSM_ModeIndication 
    Table 5-43   BswM_ComM_InitiateReset 
    5.5.1.7 
    Rte_Switch_ComM_<UserName>_currentMode 
    Prototype 
    Std_ReturnType Rte_Switch_ComM_<UserName>_currentMode (Rte_ModeType_ComMMode 
    mode) 
    Parameter 
    mode 
    >  RTE_MODE_ComMMode_NO_COMMUNICATION, no communication is 
    entered 
    >  RTE_MODE_ComMMode_SILENT_COMMUNICATION, silent 
    communication is entered 
    >  RTE_MODE_ComMMode_FULL_COMMUNICATION, full communication 
    is entered 
    Return code 
    Std_ReturnType 
    >  RTE_E_OK, the SW-C notified  
    >  RTE_E_LIMIT, the SW-C does not notified the mode and the COMM shall 
    informed again 
    Functional Description 
    This callback functions inform the SW-C about a mode change of a COMM user. 
    Particularities and Limitations 
    >  This callback function is only available for users with parameter ComMUserModeNotification set to true. 
    Call context 
    >  The function is called in the context of ComM_MainFunction 
    Table 5-44   Rte_Switch_ComM_<UserName>_currentMode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    64 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    6  Service Ports 
    6.1.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side. 
    6.1.1.1 
    Provide Ports on COMM Side 
    At the Provide Ports of the COMM the API functions described in chapter 5.2 are available 
    as  Runnable  Entities.  The  Runnable  Entities  are  invoked  via  Operations.  The  mapping 
    from a SWC client call to an Operation is performed by the RTE. In this mapping the RTE 
    adds Port Defined Argument Values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  COMM  and  the 
    Operations defined for the Provide Ports, the API functions related to the Operations and 
    the Port Defined Argument Values to be added by the RTE. 
    6.1.1.1.1 
    ComM_UserRequest 
    Operation 
    API Function 
    Port Defined Argument Values 
    RequestComMode 
    ComM_RequestComMode 
    ComM_UserHandleType UserHandle 
    GetCurrentComMode 
    ComM_GetCurrentComMode 
    ComM_UserHandleType UserHandle 
    GetMaxComMode 
    ComM_GetMaxComMode 
    ComM_UserHandleType UserHandle 
    GetRequestedComMode 
    ComM_GetRequestedComMode  ComM_UserHandleType UserHandle 
    Table 6-1   ComM_UserRequest 
    The naming rule for corresponding ports is UR_<user_name>, e.g. UR_ComMUser_000. 
    6.1.1.1.2 
    ComM_ECUModeLimitation 
    Operation 
    API Function 
    LimitECUToNoComMode 
    ComM_LimitECUToNoComMode 
    ReadInhibitCounter 
    ComM_ReadInhibitCounter 
    ResetInhibitCounter 
    ComM_ResetInhibitCounter 
    SetECUGroupClassification 
    ComM_SetECUGroupClassification 
    Table 6-2   ComM_ECUModeLimitation 
    The naming rule for the corresponding port is modeLimitation. 
    6.1.1.1.3 
    ComM_ChannelWakeUp 
    Operation 
    API Function 
    Port Defined Argument Values 
    PreventWakeUp 
    ComM_PreventWakeUp 
    NetworkHandleType Channel 
    GetInhibitionStatus (optional,  ComM_GetInhibitionStatus 
    NetworkHandleType Channel 
    see below) 
    Table 6-3   ComM_ChannelWakeUp 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    65 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    For compatibility,  the operation GetInhibitionStatus can be omitted from this interface. Its 
    presence  depends  on  the  value  of  the  optional  configuration  parameter 
    ComMOperationGetInhibitionStatusEnabled: 
    >  If the parameter does not exist or is set to ‘true’, the interface contains the operation 
    GetInhibitionStatus. 
    >  If  the  parameter  exists  and  is  set  to  ‘false’,  the  interface  does  not  expose  the 
    operation GetInhibitionStatus. 
    Note that the COMM API Function ComM_GetInhibitionStatus exists in both cases and is 
    also  exposed through the Client  Server Interface ComM_ChannelLimitation as described 
    in chapter 6.1.1.1.4. 
    The  naming 
    rule 
    for 
    corresponding 
    ports 
    is 
    CW_<channel_name>, 
    e.g. 
    CW_ComMChannel_CAN0. 
     
    6.1.1.1.4 
    ComM_ChannelLimitation 
    Operation 
    API Function 
    Port Defined Argument Values 
    LimitChannelToNoComMode 
    ComM_LimitChannelToNoComMode  NetworkHandleType Channel 
    GetInhibitionStatus 
    ComM_GetInhibitionStatus 
    NetworkHandleType Channel 
    Table 6-4   ComM_ChannelLimitation 
    The 
    naming 
    rule 
    for 
    corresponding 
    ports 
    is 
    CL_<channel_name>, 
    e.g. 
    CL_ComMChannel_CAN0. 
    6.1.1.2 
    Require Ports on COMM Side 
    COMM does not require any Ports providing Client Server Interface. 
    6.1.2 
    Mode Switch Interface 
    6.1.2.1 
    ComM_CurrentMode 
    The  interface  is  optional.  It  can  be  activated  or  de-activated  for  each  configured  COMM 
    user separately using the parameter ComMUserModeNotification. 
    The purpose of this interface is to inform an SW-C about the current COMM mode for each 
    configured  COMM  user,  to  which  an  SW-C  is  connected.  For  each  configured  interface 
    COMM  requires  a  notification  callback  function,  which  is  provided  by  the  RTE  and 
    described in 5.5.1.7. 
    Operation 
    Rte Interface 
    Mode Declaration Group 
    currentMode 
    Rte_Switch_ComM_UM_<UserName>_current
    RTE_MODE_ComMMode_COMM_FUL
    Mode 
    L_COMMUNICATION 
    e.g. 
    RTE_MODE_ComMMode_COMM_NO_
    Rte_Switch_ComM_UM_ComMUser_000_curr
    COMMUNICATION 
    entMode 
    RTE_MODE_ComMMode_COMM_SILE
    NT_COMMUNICATION 
    Table 6-5   ComM_CurrentMode 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    66 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    The naming rule for corresponding ports is UM_<user_name>, e.g. UM_ComMUser_000. 
    6.1.3 
    Sender Receiver Interface 
    6.1.3.1 
    ComM_CurrentChannelRequest 
    The  interface  is  optional.  It  can  be  activated  or  de-activated  for  each  configured  COMM 
    channel separately using the parameter ComMFullCommRequestNotificationEnabled. 
    The purpose of this interface is to inform an SW-C about COMM users requesting Full 
    Communication for a channel. Whenever the set of COMM users that are currently 
    requesting Full Communication for a channel changes, COMM updates the data element 
    ComM_FullComRequesters_CR_<channel_name>. A change updates the data element 
    only, when COMM accepts the communication request of the COMM user. If a Mode 
    Inhibition is active on a channel, this set is empty because no user is allowed to keep the 
    communication on the channel awake. 
     
    Rte Interface 
    Data element 
    Rte_Write_ComM_CR_<channel_name>_full
    ComM_UserHandleArrayType_<channel_name> 
    ComRequestors 
    Table 6-6   ComM_CurrentChannelRequest 
    The type ComM_UserHandleArrayType_<channel_name> exists for each channel where 
    the sender receiver interface is enabled. Refer to the Table 5-3 for details. 
    Please note that COMM only informs about COMM users requesting Full Communication 
    for users which are directly assigned to the COMM channel. COMM will not inform about 
    COMM users requesting a Partial Network, even if the channel is in Full Communication 
    mode because the Partial Network is requested by such a COMM user. 
    The naming rule for corresponding ports is CR_<channel_name>, e.g. 
    CR_ComMChannel_CAN0. 
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    67 
    based on template version 5.2.0 



    Technical Reference MICROSAR Communication Manager 
     
     
    Example 
    Assumptions: 
      One CAN channel with enabled interface ComM_CurrentChannelRequest, Channel ID 
    ‘0’ and Channel name ‘CAN0’. 
    There are 2 COMM users configured on the channel ‘CAN0’ having user handles: 
    >  ComMConf_ComMUser_000 (value = 0) and  
    >  ComMConf_ComMUser_001 (value = 1).  
    The corresponding define macro is COMM_MAX_CR_CAN0 = 2 
     
    Example Sequence: 
    The channel is in COMM_NO_COMMUNICATION mode. The application calls 
    ComM_RequestComMode(ComMConf_ComMUser_000, 
       COMM_FULL_COMMUNICATION)  
    COMM will call the following RTE interface in the next ComM_MainFunction_0(): 
    Rte_Write_ComM_CR_CAN0_fullComRequestors( 
       ComM_FullComRequesters_CR_CAN0) 
     
    The structure passed to the interface contains the following values: 
    /* a single user keeps the channel requested */ 
    ComM_FullComRequesters_CR_CAN0.numberOfRequesters = 1 
    /* user with handle ComMConf_ComMUser_000 keeps the channel 
       requested */ 
    ComM_FullComRequesters_CR_CAN0.handleArray[0] = 
       ComMConf_ComMUser_000 
    /* the 2nd element contains the invalid user handle */ 
    ComM_FullComRequesters_CR_CAN0.handleArray[1] = 0xff 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    68 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    7  Abbreviations 
    7.1 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DCM 
    Diagnostic Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PNC 
    Partial Network Cluster 
    PPort 
    Provide Port 
    RPort 
    Require Port 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 7-1   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    69 
    based on template version 5.2.0 


    Technical Reference MICROSAR Communication Manager 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 8.00.00 
    70 
    based on template version 5.2.0 

    Document Outline


    1.3.95 - TechnicalReference_Coms


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR COM 
    Technical Reference 
     
    CFG5 
    Version 5.05.00 
     
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Dominik  Biber,  Safiulla  Shakir,  Gunnar  Meiss,  Heiko 
    Hübler, Markus Bart, Anant Gupta, Büsra Bayrak 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR COM 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Safiulla Shakir 
    2012-02-21 
    1.00.00 
    >  Adapted to Cfg5 
    Dominik Biber 
    Dominik Biber 
    2012-07-19 
    2.00.00 
    >  Adapted to AUTOSAR 4.0.3 
    (ESCAN00058304) 
    Dominik Biber 
    2012-12-11 
    2.01.00 
    >  Added new feature descriptions 
    >  Invalidation Mechanism 
    (ESCAN00061795) 
    >  Signal Reception Filtering 
    (ESCAN00061805) 
    >  Signal Status Information 
    (ESCAN00061799) 
    Gunnar Meiss 
    2013-04-04 
    2.02.00 
    >  AR4-325: Post-Build Loadable 
    (ESCAN00064360) 
    Dominik Biber 
    2013-04-12 
    2.02.00 
    >  Added new feature Signal Gateway 
    (ESCAN00064081) 
    Adapted  
    >  Critical Sections (ESCAN00065327) 
    Dominik Biber 
    2013-06-20 
    3.00.00 
    >  Changed prototype description of 
    Callout Functions (ESCAN00068096) 
    Dominik Biber 
    2013-09-03 
    3.00.00 
    >  Transmission Deadline Monitoring 
    (ESCAN00070185) 
    >  Clarified transmission context of signals 
    and signal groups (ESCAN00070200) 
    >  Updated limitations of Callout Functions 
    (ESCAN00067146) 
    >   Support (ESCAN00070186) 
    >  Added support for 0-Bit signals 
    (ESCAN00069728) 
    Heiko Hübler 
    2013-09-23 
    3.00.00 
    >  Added following API descriptions 
    (ESCAN00070449): 
    >  Com_TpTxConfirmation 
    >  Com_CopyTxData 
    >  Com_TpRxIndication 
    >  Com_StartOfReception 
    >  Com_CopyRxData 
    >  Com_SendDynSignal 
    >  Com_ReceiveDynSignal 
    Heiko Hübler 
    2013-10-02 
    3.00.00 
    >  Added Chapter Large I-PDUs and 
    Dynamic length signals 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    (ESCAN00070449) 
    Heiko Hübler 
    2014-03-25 
    3.01.00 
    >  Updated Com_ StartOfReception API 
    according to ASR4.1.2 
    (ESCAN00071922) 
    Heiko Hübler 
    2014-04-16 
    3.01.00 
    >  ESCAN00075083: AR4-710: Support 
    IPDUGroup relevant API like as ASR3 
    API 
    >  Com_IpduGroupStart 
    >  Com_IpduGroupStop 
    >  Com_EnableReceptionDM 
    >  Com_DisableReceptionDM 
    Heiko Hübler 
    2014-04-25 
    3.01.00 
    >  Added Chapter: Autosar 3 based I-Pdu 
    Group handling 
    Markus Bart 
    2014-06-18 
    3.01.00 
    >  AR4-601: Support RfC #59936 
    (Request Handling) 
    Heiko Hübler 
    2014-06-27 
    3.01.00 
    >  Added chapter 3.1.2 Signal Processing 
    Heiko Hübler 
    2014-06-27 
    3.01.01 
    >  ESCAN00076544: The type of the 
    parameter "Result" of the APIs  
    Com_TpRxIndication and 
    Com_TpTxConfirmation mismatches 
    between TechRef and source 
    Heiko Hübler 
    2014-11-05 
    3.02.00 
    >  ESCAN00079371: AR4-698: Post-Build 
    Selectable (Identity Manager) 
    Heiko Hübler 
    2015-05-11 
    3.03.00 
    >  ESCAN00082938: FEAT-1047: 
    Gateway Rx signal timeout handling 
    without update bits [AR4-894] 
    Heiko Hübler 
    2015-05-20 
    3.03.01 
    >  ESCAN00083061: The figure on page 
    11 is labelled twice. 
    Anant Gupta 
    2015-07-15 
    4.01.00 
    >  ESCAN00084005: FEAT-77: COM 
    Based Transformer for 
    CONC_601_SenderReceiverSerializatio
    n incl. E2EXf [AR4-829] 
    Anant Gupta 
    2015-12-07 
    5.00.00 
    >  ESCAN00085557: FEAT-1436 
    Gateway: Optimization for COM. 
    >  ESCAN00087097: FEAT-1442 
    Gateway: Routing timeout behaviour 
    Gunnar Meiss 
    2016-02-25 
    5.01.00 
    >  ESCAN00088555: FEAT-1631: Trigger 
    Transmit API with SduLength In/Out 
    according to ASR4.2.2 
    Gunnar Meiss 
    2016-06-05 
    5.02.00 
    >  ESCAN00090302: FEAT-1688: 
    Anant Gupta 
    SafeBSW Step 4 
    Büsra Bayrak 
    2016-07-13 
    5.03.00 
    >  ESCAN00090995: FEAT-1818: 
    ComEnableMDTForCyclicTransmission 
    Anant Gupta 
    2016-07-13 
    5.03.00 
    >  ESCAN00091008: FEAT-1640: 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    >  Notification caching and ISR Lock 
    Thresholds 
    Anant Gupta 
    2016-07-26 
    5.03.00 
    >  ESCAN00091171: Missing description 
    of Com_Cot.h 
    Anant Gupta 
    2016-08-10 
    5.03.01 
    >  ESCAN00091398: Update API 
    description. 
    Büsra Bayrak 
    2016-09-28 
    5.04.00 
    >  ESCAN00092101: FEAT-2002: Support 
    64 Bit Signal Types for COM according 
    to ASR 4.2.2 
    Anant Gupta 
    2016-10-26 
    5.04.00 
    >  ESCAN00092539: FEAT-1890: 
    Extension of gateway description 
    routing with shifted copy and update bit 
    support. 
    Heiko Hübler 
    2016-11-07 
    5.04.00 
    >  ESCAN00092684: Tx Timeout for Cyclic 
    Messages misses in "Not Supported 
    AUTOSAR Standard Conform Features" 
    chapter 
    Büsra Bayrak 
    2016-12-09 
    5.05.00 
    >  FEATC-793: FEAT-2231 Support 
    ComTxRepetitionCnt according to ASR 
    4.2.2 
    Anant Gupta 
    2017-01-17 
    5.05.00 
    >  FEATC-797: FEAT-2333: Support Tx 
    Timeout for cyclic messages 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_COM.pdf 
    4.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [4]   Vector 
    TechnicalReference_Asr_Rte.pdf 
    3.90.00 
    [5]   Vector 
    TechnicalReference_PostBuildLoadable.pdf 
    1.0.0 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Contents 
    1 
    Component History .................................................................................................... 11 
    2 
    Introduction................................................................................................................. 12 
    2.1 
    Architecture Overview ...................................................................................... 13 
    3 
    Functional Description ............................................................................................... 15 
    3.1 

    Features .......................................................................................................... 15 
    3.1.1 
    Signal Types .................................................................................... 16 
    3.1.2 
    Signal Processing ............................................................................ 17 
    3.1.3 
    Transmission of a Signal .................................................................. 17 
    3.1.4 
    Transmission of a Signal Group ....................................................... 19 
    3.1.5 
    Transmission Mode Selector ............................................................ 21 
    3.1.6 
    Explicit Transmission Mode State Switch ......................................... 21 
    3.1.7 
    Transmit Signal Filters ...................................................................... 22 
    3.1.8 
    Minimum Send Distance of an I-PDU ............................................... 23 
    3.1.9 
    Minimum Send Distance only for Direct Send Triggers ..................... 23 
    3.1.10 
    Transmission Deadline Monitoring ................................................... 24 
    3.1.11 
    Replication of Signal Transmission Requests ................................... 26 
    3.1.12 
    Reception of a Signal ....................................................................... 28 
    3.1.13 
    Reception of a Signal Group ............................................................ 28 
    3.1.14 
    Array-based access of SignalGroups ............................................... 29 
    3.1.15 
    Dynamic DLC ................................................................................... 30 
    3.1.16 
    Reception Deadline Monitoring ........................................................ 30 
    3.1.17 
    Invalidation Mechanism .................................................................... 31 
    3.1.18 
    Signal Reception Filtering ................................................................ 31 
    3.1.19 
    Signal Status Information ................................................................. 31 
    3.1.20 
    Signal Gateway ................................................................................ 32 
    3.1.20.1 

    Signal routing requirements ........................................... 32 
    3.1.20.2 
    Routing of signal groups ................................................ 32 
    3.1.20.3 
    Routing latency for normal Signal Gateway ................... 33 
    3.1.20.4 
    Gateway routing timeout ................................................ 33 
    3.1.21 
    Gateway Description Routing ........................................................... 33 
    3.1.22 
    Large I-PDUs ................................................................................... 34 
    3.1.23 
    Dynamic length signals .................................................................... 35 
    3.1.24 
    Com Optimizations ........................................................................... 35 
    3.1.24.1 

    Critical section threshold loop strategy ........................... 35 
    3.1.24.2 
    Rx Notification caching .................................................. 37 
    3.1.24.3 
    Deferred Event Caching ................................................. 37 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.24.4 
    Main Function Timing Domains ...................................... 38 
    3.1.24.4.1  Timebase for Rx-deadline monitoring 
    handling ..................................................... 39 
    3.1.24.4.2  Timebase for Tx-deadline monitoring 
    handling ..................................................... 39 
    3.1.24.4.3  Timebase for Tx-cyclic operations .............. 39 
    3.1.24.5 
    Handle ID ....................................................................... 39 
    3.1.24.6 
    Autosar 3 based I-Pdu Group handling .......................... 40 
    3.2 
    Initialization ...................................................................................................... 40 
    3.3 
    States .............................................................................................................. 41 
    3.3.1 

    Module States .................................................................................. 41 
    3.3.2 
    I-PDU States .................................................................................... 42 
    3.3.3 
    Reception Deadline Monitoring States ............................................. 43 
    3.4 
    Main Functions ................................................................................................ 44 
    3.5 
    Error Handling .................................................................................................. 45 
    3.5.1 

    Development Error Reporting ........................................................... 45 
    3.5.2 
    Production Code Error Reporting ..................................................... 46 
    4 
    Integration ................................................................................................................... 47 
    4.1 

    Scope of Delivery ............................................................................................. 47 
    4.1.1 

    Static Files ....................................................................................... 47 
    4.1.2 
    Dynamic Files .................................................................................. 47 
    4.2 
    Critical Sections ............................................................................................... 49 
    5 
    API Description ........................................................................................................... 51 
    5.1 

    Type Definitions ............................................................................................... 51 
    5.2 
    Services provided by COM .............................................................................. 52 
    5.2.1 

    Com_Init .......................................................................................... 52 
    5.2.2 
    Com_InitMemory .............................................................................. 52 
    5.2.3 
    Com_DeInit ...................................................................................... 53 
    5.2.4 
    Com_IpduGroupControl ................................................................... 53 
    5.2.5 
    Com_ReceptionDMControl .............................................................. 54 
    5.2.6 
    Com_IpduGroupStart ....................................................................... 54 
    5.2.7 
    Com_IpduGroupStop ....................................................................... 55 
    5.2.8 
    Com_EnableReceptionDM ............................................................... 56 
    5.2.9 
    Com_DisableReceptionDM .............................................................. 56 
    5.2.10 
    Com_GetConfigurationId ................................................................. 57 
    5.2.11 
    Com_GetStatus ............................................................................... 57 
    5.2.12 
    Com_GetVersionInfo ........................................................................ 58 
    5.2.13 
    Com_TriggerIPDUSend ................................................................... 58 
    5.2.14 
    Com_TriggerIPDUSendWithMetaData ............................................. 59 
    5.2.15 
    Com_ClearIpduGroupVector ............................................................ 59 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    5.2.16 
    Com_SetIpduGroup ......................................................................... 60 
    5.2.17 
    Com_ReceiveDynSignal .................................................................. 60 
    5.2.18 
    Com_ReceiveSignalGroup ............................................................... 61 
    5.2.19 
    Com_ReceiveSignalGroupArray ...................................................... 62 
    5.2.20 
    Com_InvalidateSignal ...................................................................... 62 
    5.2.21 
    Com_InvalidateSignalGroup ............................................................ 63 
    5.2.22 
    Com_SwitchIpduTxMode ................................................................. 63 
    5.2.23 
    Com_SendDynSignal ....................................................................... 64 
    5.2.24 
    Com_SendSignal ............................................................................. 64 
    5.2.25 
    Com_SendSignalGroup ................................................................... 65 
    5.2.26 
    Com_SendSignalGroupArray ........................................................... 66 
    5.2.27 
    Com_MainFunctionRx ...................................................................... 66 
    5.2.28 
    Com_MainFunctionTx ...................................................................... 67 
    5.2.29 
    Com_MainFunctionRouteSignals ..................................................... 67 
    5.2.30 
    Com_ReceiveSignal......................................................................... 68 
    5.2.31 
    Com_ReceiveShadowSignal ............................................................ 68 
    5.2.32 
    Com_UpdateShadowSignal ............................................................. 69 
    5.2.33 
    Com_InvalidateShadowSignal ......................................................... 69 
    5.3 
    Services used by COM .................................................................................... 70 
    5.4 
    Callback Functions ........................................................................................... 70 
    5.4.1 

    Com_RxIndication ............................................................................ 70 
    5.4.2 
    Com_TxConfirmation ....................................................................... 71 
    5.4.3 
    Com_TriggerTransmit ...................................................................... 71 
    5.4.4 
    Com_TpTxConfirmation ................................................................... 72 
    5.4.5 
    Com_CopyTxData ........................................................................... 73 
    5.4.6 
    Com_TpRxIndication ........................................................................ 73 
    5.4.7 
    Com_StartOfReception .................................................................... 74 
    5.4.8 
    Com_CopyRxData ........................................................................... 75 
    5.5 
    Configurable Interfaces .................................................................................... 75 
    5.5.1 

    Notifications ..................................................................................... 75 
    5.5.1.1 

    Indication Notification ..................................................... 75 
    5.5.1.2 
    Confirmation Notification ................................................ 76 
    5.5.1.3 
    Rx Timeout Notification .................................................. 76 
    5.5.1.4 
    Tx Timeout Notification .................................................. 77 
    5.5.1.5 
    Error Notification ............................................................ 77 
    5.5.1.6 
    Invalid Notification .......................................................... 78 
    5.5.2 
    Callout Functions ............................................................................. 78 
    5.5.2.1 

    Rx I-Pdu callout function ................................................ 78 
    5.5.2.2 
    Tx I-Pdu callout function ................................................ 80 
    6 
    Configuration .............................................................................................................. 82 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    6.1 
    Configuration of Post-Build .............................................................................. 82 
    7 
    AUTOSAR Standard Compliance............................................................................... 83 
    7.1 

    Limitations........................................................................................................ 83 
    8 
    Glossary and Abbreviations ...................................................................................... 84 
    8.1 

    Glossary .......................................................................................................... 84 
    8.2 
    Abbreviations ................................................................................................... 84 
    9 
    Contact ........................................................................................................................ 85 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 13 
    Figure 2-2 
    Interfaces to adjacent modules of the COM .............................................. 14 
    Figure 3-1 
    Periodic Transmission Mode ..................................................................... 18 
    Figure 3-2 
    Direct Transmission Mode ........................................................................ 18 
    Figure 3-3 
    Minimum Delay Time ................................................................................ 23 
    Figure 3-4 
    Minimum Delay Time with ComEnableMDTForCyclicTransmission == 
    false .......................................................................................................... 24 

    Figure 3-5 
    Transmission Deadline Monitoring – Normal Mode ................................... 25 
    Figure 3-6 
    Transmission Deadline Monitoring – None Mode ...................................... 25 
    Figure 3-7 
    Replication of Signal Transmission Requests for n = 2 repetitions ............ 26 
    Figure 3-8 
    Reception of a periodic signal ................................................................... 28 
    Figure 3-9 
    Signal routing allows routing of individual signals ..................................... 32 
    Figure 3-10 
    Main Function Timing Domains ................................................................. 38 
    Figure 3-11 
    Module State Machine .............................................................................. 41 
    Figure 3-12 
    I-PDU State Machine ................................................................................ 42 
    Figure 3-13 
    Reception Deadline Monitoring State Machine ......................................... 43 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 11 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 15 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 16 
    Table 3-3  
    Gateway mapping processing context ...................................................... 34 
    Table 3-4  
    Configurable Thresholds ........................................................................... 37 
    Table 3-5  
    Main functions that have to be called cyclically ......................................... 44 
    Table 3-6  
    Service IDs ............................................................................................... 46 
    Table 3-7  
    Errors reported to DET ............................................................................. 46 
    Table 4-1  
    Static files ................................................................................................. 47 
    Table 4-2  
    Generated files ......................................................................................... 48 
    Table 4-3  
    Overview of used Exclusive Area per Com API ......................................... 50 
    Table 5-1  
    Type definitions ......................................................................................... 51 
    Table 5-2  
    Com_Init ................................................................................................... 52 
    Table 5-3  
    Com_InitMemory ...................................................................................... 53 
    Table 5-4  
    Com_DeInit .............................................................................................. 53 
    Table 5-5  
    Com_IpduGroupControl ............................................................................ 54 
    Table 5-6  
    Com_ReceptionDMControl ....................................................................... 54 
    Table 5-7  
    Com_IpduGroupStart ................................................................................ 55 
    Table 5-8  
    Com_IpduGroupStop ................................................................................ 55 
    Table 5-9  
    Com_EnableReceptionDM ....................................................................... 56 
    Table 5-10  
    Com_DisableReceptionDM ....................................................................... 57 
    Table 5-11  
    Com_GetConfigurationId .......................................................................... 57 
    Table 5-12  
    Com_GetStatus ........................................................................................ 58 
    Table 5-13  
    Com_GetVersionInfo ................................................................................ 58 
    Table 5-14  
    Com_TriggerIPDUSend ............................................................................ 59 
    Table 5-15  
    Com_TriggerIPDUSendWithMetaData ...................................................... 59 
    Table 5-16  
    Com_ClearIpduGroupVector ..................................................................... 60 
    Table 5-17  
    Com_SetIpduGroup .................................................................................. 60 
    Table 5-18  
    Com_ReceiveDynSignal ........................................................................... 61 
    Table 5-19  
    Com_ReceiveSignalGroup ....................................................................... 62 
    Table 5-20  
    Com_ReceiveSignalGroupArray ............................................................... 62 
    Table 5-21  
    Com_InvalidateSignal ............................................................................... 63 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 

    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Table 5-22  
    Com_InvalidateSignalGroup ..................................................................... 63 
    Table 5-23  
    Com_SwitchIpduTxMode .......................................................................... 64 
    Table 5-24  
    Com_SendDynSignal ............................................................................... 64 
    Table 5-25  
    Com_SendSignal ...................................................................................... 65 
    Table 5-26  
    Com_SendSignalGroup ............................................................................ 65 
    Table 5-27  
    Com_SendSignalGroupArray ................................................................... 66 
    Table 5-28  
    Com_MainFunctionRx .............................................................................. 67 
    Table 5-29  
    Com_MainFunctionTx ............................................................................... 67 
    Table 5-30  
    Com_MainFunctionRouteSignals .............................................................. 68 
    Table 5-31  
    Com_ReceiveSignal ................................................................................. 68 
    Table 5-32  
    Com_ReceiveShadowSignal .................................................................... 69 
    Table 5-33  
    Com_UpdateShadowSignal ...................................................................... 69 
    Table 5-34  
    Com_InvalidateShadowSignal .................................................................. 70 
    Table 5-35  
    Services used by the COM ....................................................................... 70 
    Table 5-36  
    Com_RxIndication .................................................................................... 71 
    Table 5-37  
    Com_TxConfirmation ................................................................................ 71 
    Table 5-38  
    Com_TriggerTransmit ............................................................................... 72 
    Table 5-39  
    Com_TpTxConfirmation ............................................................................ 72 
    Table 5-40  
    Com_CopyTxData .................................................................................... 73 
    Table 5-41  
    Com_TpRxIndication ................................................................................ 74 
    Table 5-42  
    Com_StartOfReception ............................................................................. 74 
    Table 5-43  
    Com_CopyRxData .................................................................................... 75 
    Table 5-44  
    Indication Notification ................................................................................ 76 
    Table 5-45  
    Confirmation Notification ........................................................................... 76 
    Table 5-46  
    Rx Timeout Notification ............................................................................. 77 
    Table 5-47  
    Tx Timeout Notification ............................................................................. 77 
    Table 5-48  
    Error Notification ....................................................................................... 78 
    Table 5-49  
    Invalid Notification .................................................................................... 78 
    Table 5-50  
    Rx I-PDU Callout with PduInfo pointer ...................................................... 79 
    Table 5-51  
    Rx I-PDU Callout with data pointer ........................................................... 79 
    Table 5-52  
    Tx I-PDU Callout with PduInfo pointer ...................................................... 80 
    Table 5-53  
    Tx I-PDU Callout with data pointer ............................................................ 81 
    Table 8-1  
    Glossary ................................................................................................... 84 
    Table 8-2  
    Abbreviations ............................................................................................ 84 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    10 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
    >  Signal and Signal Group Access 
    >  Notifications 
    >  I-PDU Callout 
    >  I-PDU Groups 
    >  Transmission Modes 
    >  Deferred and Immediate Signal Processing  
    2.00 
    >  AUTOSAR 4.0.3 support 
    >  Rx Deadline Monitoring 
    2.01 
    >  Signal Invalidation Mechanism 
    >  Signal Status Information (update bits) 
    >  Signal Reception Filtering 
    2.02 
    >  Post-Build Loadable 
    >  Signal Gateway 
    3.00 
    >  Tx Deadline Monitoring 
    >  Dynamic DLC support 
    >  Large (TP) Pdu support 
    >  Dynamic Length Signal support  
    4.00 
    >  Post-Build Selectable 
    7.00 
    >  Signal Group Array Access 
    8.00 
    >  Mainfunction Timing Domains 
    >  Deferred Event Caching 
    >  Description Routing  
    >  Gateway Routing Timeout 
    9.00 
    >  Safe BSW 
    10.00 
    >  ComEnableMDTForCyclicTransmission 
    >  Com Rx Indication Callouts 
    11.00 
    >  Support Update Bits for Gateway Description Routing 
    >  Support copying of unaligned bits from source to destination 
    description buffer. 
    >  Support 64 Bit SignalType. 
    Table 1-1   Component history 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    11 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module COM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    PRE-COMPILE [SELECTABLE]  
    POST-BUILD-LOADABLE [SELECTABLE] 
    Vendor ID: 
    COM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    COM_MODULE_ID   
    50 decimal 
    (according to ref. [3]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    The main purpose of the AUTOSAR BSW module Com is to provide a signal-based 
    interface to the upper layer. In an AUTOSAR based system it is the RTE. In a non-
    AUTOSAR system it is the application.  
     
    It is possible to use the Com layer with different underlying bus systems since they are 
    encapsulated by the PDU Router. Architecture Overview shows how the component is 
    embedded in the AUTOSAR layered architecture. 
     
    The main features of the Com component are: 
     
         Provision of interface for signed and unsigned signals to the upper layer 
         Packing and unpacking of signals in I-PDUs 
         Handling of transmission modes 
         Minimum delay between I-PDUs transmissions  
         Communication control by starting and stopping of I-PDU groups  
         Rx deadline monitoring  
        Tx deadline monitoring  
         Notification mechanisms  
        Initial value support  
        Signal Gateway  
     
    The implementation is based on the AUTOSAR Com specification [1]. It is assumed that 
    the reader is familiar with this document and other related AUTOSAR specifications. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    12 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    2.1 
    Architecture Overview 
    The following figure shows where the COM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    13 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  COM.  These  interfaces 
    are described in chapter 5.  
    cmp Com Context View
    «module»
    Rte::Rte
    «use»
    «module»
    «module»
    «use»
    Dem::Dem
    ComM::ComM
    Com
    Rte_ComCbk
    «use»
    «realize»
    «realize»
    «mandatory»
    «realize»
    «module»
    Com_Init
    Dem_ReportErrorStatus
    Com
    «realize»
    «optional»
    Det_ReportError
    Com_IpduGroup
    «mandatory»
    «realize»
    A
    «realize»
    PduR_<User:Up>Transmit
    Com_Cbk
    «optional»
    «realize»
    «optional»
    «module»
    «module»
    «module»
    Det::Det
    PduR::PduR
    Bsw M::Bsw M
     
    Figure 2-2  Interfaces to adjacent modules of the COM 
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    14 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    COM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
      Table 3-1   Supported AUTOSAR standard conform features  
      Table 3-2   Not supported AUTOSAR standard conform features 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    General functionality 
    Unpacking and packing of Signals and Signal Groups  
    Endianness conversion 
    Sign extension 
    Initialization and De-Initialization services 
    Signal invalidation mechanism 
    Signal status information (update bits) 
    Signal reception filtering 
    Signal Gateway 
    Large data types 
    Dynamic length signals 
    Communication Modes 
    Signal Transfer Property 
    I-PDU Transmission Mode 
    Selection of the Transmission Mode for one specific I-PDU 
    Replication of Signal Transmission Requests 
    Handling of I-PDUs 
    Starting and stopping of I-PDU groups 
    Minimum Delay Timer 
    Deadline Monitoring 
    Reception Deadline Monitoring 
    Transmission Deadline Monitoring 
    Callouts 
    I-PDU Callout 
    Table 3-1   Supported AUTOSAR standard conform features 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    15 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    General functionality 
    Float data types 
    Data sequence control 
    Communication protection 
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.1 
    Signal Types 
    The following signal types are supported: 
      boolean 
      uint8  
      uint16  
      uint32  
      uint64 
      sint8  
      sint16  
      sint32  
      sint64 
      uint8[n]  
     
    For signed and unsigned integers an endianness conversion is supplied depending on the 
    endianness of the signal and the target system. 
    The support of signed signals is based on the B-complement. 
    The data type opaque is interpreted as an unsigned integer and no endianness conversion 
    is performed. The target system specific byte order is applied. 
     
    Caution 
    Only unsigned and signed integer values are supported. Float and the scaling 
     
    factors (as adjustable in the database) are not supported and have to be 
    interpreted by the application. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    16 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.2 
    Signal Processing 
    Each  Pdu  has  the  parameter  ComIPduSignalProcessing,  this  parameter  can  have  the 
    value IMMEDIATE or DEFERRED. 
    >  IMMEDIATE  signal  processing  means  that  notification  functions  are  called  within 
    the functions Com_TxConfirmation() or Com_RxIndication(). 
    o  The transmission of a triggered signal with signal processing IMMEDIATE will 
    be triggered within the next call of the Com_MainFunctionTx(). 
    >  DEFERRED  signal  processing  means  that notification functions are  called  on  task 
    level 
    during 
    the 
    next 
    call 
    cycle 
    of 
    Com_MainFunctionRx() 
    or 
    Com_MainFunctionTx(). 
    o  Values of signals contained in an I-PDU with signal processing DEFERRED 
    will be updated on task level in the Com_MainFunctionRx(). 
     
    3.1.3 
    Transmission of a Signal 
    To request the transmission of a signal, the upper layer uses the API Com_SendSignal. 
    After performing optional parameter checks COM updates  the I-PDU with the new signal 
    value and checks if the transfer property of the signal requires a direct transmission. If yes, 
    a flag is set which is evaluated later in the cyclic main function of the COM layer’s transmit 
    part. 
    Transmission modes of the I-PDU are handled in the Com_MainFunctionTx. This means 
    that the actual transmit request to the underlying layer is always decoupled from the upper 
    layer. In the transmission mode handler cyclic transmissions and direct transmissions are 
    processed. 
    In  the  following  figure  the  transmission  procedure  is  shown  for  I-PDUs  with  direct  and 
    periodic transmission mode. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    17 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Periodic Transmission Mode
    RTE
    C
    o
    m
    _
    S
    e
    n
    asynchronous
    d
    S
    writing
    ignal (5)
    COM
    Com_MainFunctionTx
    t
    Com_MainFunctionTx
    Com_MainFunctionTx
    IP
    Com_MainFunctionTx
    IP
    D
    Com_MainFunctionTx
    Com_MainFunctionTx
    Com_MainFunctionTx
    D
    U
    U
     (5)
    PDU Router
    COM_TRANSMISSION_
    MODE_TIME_PERIOD
     
    Figure 3-1  Periodic Transmission Mode 
    Direct Transmission Mode
    RTE
    C
    C
    C
    o
    o
    o
    m
    m
    m
    _
    _
    _
    S
    lo
    S
    S
    e
    s
    e
    e
    n
    n
    n
    d

    d
    d
    S
    s
    S
    S
    ig
    i
    i
    g
    g
    ig
    n
    n
    n
    n
    a
    a
    a
    l
    a
    _
    l_
    l_
    (
    l
    a
    (b
    (a
    )
    Com_MainFunctionTx
    )
    )
    Com_MainFunctionTx
    COM
    t
    Com_MainFunctionTx
    Com_MainFunctionTx
    Com_MainFunctionTx
    Com_MainFunctionTx
    IP
    I
    Com_MainFunctionTx
    P
    D
    D
    U
    U
      (
     (
    a
    a
    )
    )
    PDU Router
    COM_IPDU_MINIMUM_DELAY_TIME
     
    Figure 3-2  Direct Transmission Mode 
    The mixed transmission mode provides a combination of periodic and direct transmission 
    mode.  
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    18 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
     
     
     
    Note 
    Signal values are not queued by COM. If the upper layer updates signals with a higher 
      rate as the I-PDU of the signal is transmitted, only the most recent signal value is sent. 
     
     
     
    3.1.4 
    Transmission of a Signal Group 
    AUTOSAR  COM  provides  signal  groups  to  send  several  signals  consistently.  Signals 
    mapped to a signal group are called group signals and should be in relationship with each 
    other. To ensure the consistency of the group signal values, a shadow buffer is provided 
    for each signal group. 
    To  request  the  transmission  of  a  signal  group  with  several  group  signals,  following 
    sequence of API calls must be followed: 
     
     
     
    Example 

    /* Update the group signal values in the shadow buffer */ 
      Com_SendSignal(GroupSignal1, &SigBuffer1); 
    Com_SendSignal(GroupSignal2, &SigBuffer2); 
    /* Copy the shadow buffer to the Tx buffer */ 
    Com_SendSignalGroup(SignalGroupA); 
     
     
     
    For the transmission modes DIRECT or MIXED the evaluation of the transfer property is 
    handled as follows 
      ComSignalGroup.ComTransferProperty equals TRIGGERED 
    and all ComGroupSignal.ComTransferProperty equals PENDING 
      Com_SendSignal(ComGroupSignal) -> 
    Com_SendSignalGroup(ComSignalGroup) will trigger a transmission of the Tx 
    I-Pdu regardless of the group signal value. 
      ComSignalGroup.ComTransferProperty equals TRIGGERED_ON_CHANGE 
    and all ComGroupSignal.ComTransferProperty equals PENDING 
      Com_SendSignal(ComGroupSignal) -> 
    Com_SendSignalGroup(ComSignalGroup) will trigger a transmission of the Tx 
    I-Pdu if at least one group signal value has changed. 
      ComSignalGroup.ComTransferProperty equals PENDING 
      ComGroupSignal.ComTransferProperty equals TRIGGERED 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    19 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
      Com_SendSignal(ComGroupSignal) -> 
    Com_SendSignalGroup(ComSignalGroup) will trigger a transmission of the Tx 
    I-Pdu regardless of the group signal value. 
      ComGroupSignal.ComTransferProperty equals TRIGGERED_ON_CHANGE 
      Com_SendSignal(ComGroupSignal) -> 
    Com_SendSignalGroup(ComSignalGroup) will trigger a  transmission of the 
    Tx I-Pdu if the group signal value has changed. 
      ComGroupSignal.ComTransferProperty equals PENDING 
      Com_SendSignal(ComGroupSignal) -> 
    Com_SendSignalGroup(ComSignalGroup) will not trigger a transmission of 
    the Tx I-Pdu. 
       
     
     
    Caution 
    To guarantee data consistency of the whole signal group the complete transmission of 
      a signal group (consecutive calls of 'Com_SendSignal' and 'Com_SendSignalGroup') 
    must not be interrupted by another transmission request for the same signal group or 
    by a call of 'Com_InvalidateSignalGroup'. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    20 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.5 
    Transmission Mode Selector 
    AUTOSAR  COM  allows  configuring  two  different  transmission  modes  for  each  I-PDU 
    (ComTxModeTrue  and  ComTxModeFalse).  The  transmission  mode  of  an  I-PDU  that  is 
    valid at a specific point in time is selected using only the filter states of the signals that are 
    mapped to this I-PDU. 
    If  a  filter  of  any  signal  mapped  to  a  specific  I-PDU  evaluates  to  TRUE,  this  I-PDU  is 
    transmitted with transmission mode TRUE. The transmission mode FALSE is used for an I-
    PDU when the filters of all signals mapped to this I-PDU evaluate to FALSE. 
    If all signals mapped to a specific I-PDU have no filter assigned,  the transmission mode 
    evaluates to TRUE and does never change. 
    The  transmission  mode  is  changed  as  a  result  of  a  call  of  Com_SendSignal  or 
    Com_SendSignalGroup. The value of the signal or group signal that caused the change 
    is already transmitted with the new transmission mode. 
    By a transmission mode switch to the Direct/N-times transmission mode a direct/ n-times 
    transmission to the underlying layer, respecting the minimum delay time, will be initiated, 
    even  if  the  transmission  mode  switch  was  triggered  by  a  signal  with  PENDING  transfer 
    property. 
    By a  transmission mode switch  to the Cyclic or Mixed transmission mode the new cycle 
    will  start  with  a  transmission  request  to  the  underlying  layers  respecting  the  minimum 
    delay time. 
    If  the  current  transmission  mode  is  configured  to  NONE,  the  COM  will  never  initiate  a 
    transmission to the underlying layer. 
    3.1.6 
    Explicit Transmission Mode State Switch 
    By calling the Com_SwitchIpduTxMode API the configured transmission modes can be 
    switched explicitly (TRUE/FALSE) per Tx I-PDU.  
    If  the  requested  transmission  mode  is  different  to  the  currently  active  mode,  the  new 
    transmission mode is immediately active.  
      For a new transmission mode PERIODIC or MIXED, the transmission cycle starts with 
    a transmission request, respecting the minimum delay time, and the timer for the cycle 
    time is restarted. 
      For a new transmission mode DIRECT or NONE, no transmission of the Tx I-PDU is 
    triggered by the API call. 
    If the requested TMS is already active, the function call will silently be ignored. 
    By  mixing  the  signal  based  TMS  switch  and  explicit  TMS  switch  by 
    Com_SwitchIpduTxMode  for  the  same  I-PDU,  the  signal  based  TMS  switches  the 
    manual set mode back, during a call to Com_SendSignal or Com_SendSignalGroup for 
    this Tx I-PDU. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    21 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.7 
    Transmit Signal Filters 
    A  signal  filter  can  be  optionally  assigned  to  each  transmit  signal. The  filter  of  a  transmit 
    signal  is  only  used  for  transmission  mode  selection  but  the  value  of  a  transmit  signal  is 
    never filtered out. 
    The following filters are supported: 
      F_Always                            (TRUE) 
      F_Never                               (FALSE) 
      F_MaskedNewDiffersMaskedOld   ((new_value&mask) != (old_value&mask)) 
      F_MaskedNewEqualsX             ((new_value&mask) == x
      F_MaskedNewDiffersX              ((new_value&mask) != x
      F_MaskedNewIsOutside              ((new_value<min) || (max<new_value)) 
      F_MaskedNewIsWithin               ((min<=new_value) && (new_value<=max)) 
     
    The values for maskxmin and max can be configured for each filter. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    22 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.8 
    Minimum Send Distance of an I-PDU 
    In the COM specification an optional mechanism is defined to achieve a delimitation of the 
    bus  load,  by  introducing  a  minimum  send  distance  for  an  I-PDU.  This  concept  is  also 
    handled in the Tx main function. 
    In  the  following  figure  an  example  for  the  mixed  transmission  mode  is  shown.  Note  that 
    due to the minimum send distance, cyclic transmissions can be delayed, however the base 
    cycle is not modified. Direct transmissions are drawn by solid red arrows. 
    Minimu
    Min

    imu
    Delay Time
    RTE
    Co
    m
    _
    S
    e
    n
    d
    Cycli
    Cy
    c se
    cli
    nd 
    S
    ig
    requ
    req est
    n
    a
    l()
    COM
    Com
    Co _Mainfunctio
    cti nTx()
    P
    Co
    P
    Co
    P
    Co
    d
    d
    d
    u
    m
    u
    m
    u
    m
    R
    R
    R
    _
    _
    _
    _
    _
    T
    _
    _
    _
    T
    _
    C
    T
    T
    T
    C
    x
    C
    x
    x
    C
    x
    x
    o
    Co
    o
    Co
    o
    Co
    m
    m
    m
    T
    n
    T
    n
    T
    n
    ra
    fir
    ra
    f
    ir
    ir
    ra
    fir
    n
    m
    m
    n
    n
    n
    m
    n
    s
    a
    s
    a
    s
    m
    a
    a
    a
    m
    ti
    m
    ti
    m
    ti
    it
    o
    o
    it
    it
    it
    o
    it
    ()
    n
    ()
    n
    ()
    n
    ()
    ()
    ()
    ()
    ()
    PDU 
    PDU Route
    Ro
    r
    ute
    COM_
    COM IPDU_
    DU MINIMUM
    INIMU _DEL
    DE AY_TIME
     
    Figure 3-3  Minimum Delay Time 
    The handling of the minimum send distance is based on the evaluation of the confirmation 
    by the underlying layer. 
     
    3.1.9 
    Minimum Send Distance only for Direct Send Triggers 
    If the parameter ComEnableMDTForCyclicTransmission is set to false, the Minimum Delay 
    Time will only be considered for event based transmissions, which can be initiated by 
    Com_InvalidateSignal(), Com_InvalidateSignalGroup(), 
    Com_SendSignal(), Com_SendSignalGroup(), Com_SendSignalGroupArray() 
    or Com_TriggerIPDUSend(). 
    Figure 3-4 shows that cyclic transmissions do not wind up the Minimum Delay Time. An 
    event based transmission is directly triggered after a cyclic transmission although the 
    minimum delay has not elapsed. Right after, in comparison a second event based 
    transmission request is delayed by the configured Minimum Delay Time as the first event 
    based transmission has reloaded the delay counter. 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    23 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
     
    Figure 3-4  Minimum Delay Time with ComEnableMDTForCyclicTransmission == false 
     
    3.1.10  Transmission Deadline Monitoring 
    For  Tx  I-PDUs  a  deadline  monitoring  mechanism  is  provided  to  detect  failures  in  the 
    transmission mechanism of the lower layers.  
    Two different variants are supported: 
      Normal Mode: If the COM triggers the transmission of the I-PDU, the time between the 
    send request for the I-PDU and the next Tx confirmation (Com_TxConfirmation()) 
    is observed. A send request for example is given by Com_SendSignal(), 
    Com_TriggerIPduSend() or cyclic triggers. 
      None Mode: For I-PDUs triggered by a schedule table of a bus interface (e.g. LIN 
    schedule table), the time between two consecutive Tx confirmations 
    (Com_TxConfirmation()) is observed. The “None Mode” is applied for Tx I-PDU 
    with both transmission modes configured to NONE. The timer is started whenever the 
    corresponding I-PDU Group of the I-PDU is started and reloaded on a transmission 
    confirmation. However, a trigger event for example given by Com_TriggerIPduSend() 
    also start’s the timer, if it’s not already running. 
    The  transmission  deadline  monitoring for  the  “Normal  Mode”,  is  illustrated  in  Figure  3-5. 
    Each  time  a  signal  or  signal  group  is  written,  the  timeout  timer  is  started  if  it  is  not  yet 
    running.  If  the timeout time (configuration parameter  ComTimeout) is expired before the 
    next Tx confirmation is received, all configured timeout notification functions of the I-PDU 
    are called. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    24 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
     
    Figure 3-5  Transmission Deadline Monitoring – Normal Mode 
    In the “None Mode” the timeout timers are initially started by the start of the corresponding 
    I-PDU  group  and  are  restarted  each  time  a  Tx  confirmation  is  received.  Figure  3-6 
    illustrates this behavior. 
     
    Figure 3-6  Transmission Deadline Monitoring – None Mode 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    25 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    3.1.11  Replication of Signal Transmission Requests  
    The AUTOSAR COM provides an optional feature to replicate transmission requests to the 
    lower layer for one send request by an upper layer. 
    If the attribute ComTxModeNumberOfRepetitions is configured to a value ‘n’ greater than 
    ‘0’ for a transmission mode DIRECT or MIXED, the COM triggers the transmission of the 
    Tx I-PDU cyclically with a configurable ComTxModeRepetitionPeriodFactor  as long as ‘n 
    + 1’ confirmations for this I-PDU are invoked after a send request by an upper layer. 
    Figure  3-7  illustrates  this  behavior  exemplarily  for  ‘n  =  2’  replications  with  a  repetition 
    period factor ‘td’ configured to ‘2’. 
     
     
     
    Note 
    Under certain conditions, if the confirmation is invoked late, the number of messages 
      send out on the bus can differ from the configured number of repetition, as the 
    confirmations and not the transmission requests are counted.  
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Figure 3-7  Replication of Signal Transmission Requests for n = 2 repetitions  
    As the replications are an attribute of a Tx I-PDU, each send request of a mapped signal 
    or  signal  group  with  a  transfer  property  ‘TRIGGERED’  or  ‘TRIGGERED_ON_CHANGE’  
    provokes the replications of the Tx I-PDU. 
    To enable replication control per signal following transfer properties were introduced 
      ‘TRIGGERED_WITHOUT_REPETITION’  
      ‘TRIGGERED_ON_CHANGE_WITHOUT_REPETITION’   
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    26 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
      A send request for signals with these transfer properties does only initiate one single 
    transmission requests to the lower layer even if replications are configured for the 
    current transmission mode. 
     
     
     
    Note 

      >  If a *-WITHOUT-REPETITION signal and a normal triggered signal are written at the 
    same time, the repetitions are triggered. 
    >  If a *-WITHOUT-REPETITION signal is written while repetitions of a former send 
    request are processed, the outstanding transmission repetitions are not canceled 
    and an additional transmission is triggered. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    27 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.12  Reception of a Signal 
    To  receive  a  signal  the  upper  layer  uses  the  API  Com_ReceiveSignal.  This  service 
    delivers the signal value which is contained in the latest I-PDU of the signal.  
    As the signal processing context depends on the configuration of the corresponding Rx I-
    PDU,  the  latest  signal  value  might  not  be  available  until  the  next  call  to 
    Com_MainfunctionRx. 
    The  reception  procedure  of  the  signal  is  usually  asynchronous  to  the  reception  of  the  I-
    PDU.  It  is  however  possible  to  call  Com_ReceiveSignal  in  the  reception  notification 
    callback. 
    Reception of a periodic signal
    RTE
    C
    o
    m
    _
    R
    e
    c
    e
    iv
    asynchronous
    e
    S
    reading
    ignal (5)
    COM
    t
    Com_MainFunctionRx
    IP
    Com_MainFunctionRx
    IP
    Com_MainFunctionRx
    D
    Com_MainFunctionRx
    D
    U
    Com_MainFunctionRx
    U
     (5)
    Com_MainFunctionRx
    Com_MainFunctionRx
    PDU Router
     
    Figure 3-8  Reception of a periodic signal 
    A call to Com_ReceiveSignal always returns the last received signal value or the initial 
    value if a timeout occurred and the Rx Data Timeout Action is set to REPLACE, even if the 
    corresponding I-PDU group is stopped.  
    3.1.13  Reception of a Signal Group 
    AUTOSAR  COM  provides  signal  groups  to  receive  several  signals  consistently.  Signals 
    mapped to a signal group are called group signals and should be in relationship with each 
    other. To ensure the consistency of the group signal values a shadow buffer is provided for 
    each signal group. 
    As the signal processing context depends on the configuration of the corresponding Rx I-
    PDU,  the  latest  signal  group  value  might  not  be  available  until  the  next  call  to 
    Com_MainfunctionRx. 
    To receive the values of a signal group with several group signals, following sequence of 
    API calls must be followed: 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    28 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
     
     
    Example 

    /* Copy the Rx buffer to the shadow buffer */ 
     
    Com_ReceiveSignalGroup(SignalGroupA); 
    /* Get the group signal values from the shadow buffer */ 
    Com_ReceiveSignal(GroupSignal1, &SigBuffer1); 
    Com_ReceiveSignal(GroupSignal2, &SigBuffer2); 
     
     
     
     
     
    Caution 
    To guarantee data consistency of the whole signal group the complete reception of a 
      signal group (consecutive calls of 'Com_ReceiveSignalGroup' and 
    'Com_ReceiveSignal') must not be interrupted by another reception request for the 
    same signal group. 
     
     
    3.1.14  Array-based access of SignalGroups 
    An  array-based  access  of  SignalGroups  represents  an alternative  to  the  aforementioned 
    approaches  in  3.1.4  and  3.1.13  to  access  SignalGroups.  Instead  of  treating  all 
    GroupSignals individually,  SignalGroups are accessed as  serialized composite data. The 
    APIs Com_ReceiveSignalGroupArray and Com_SendSignalGroupArray are used to send 
    and  receive  the uint8-array  based  representation  of the SignalGroup.  Using  this  feature, 
    the  overhead  for  packing  and  unpacking  the  GroupSignals  individually  vanishes  and 
    further processing of the SignalGroup is left to the caller of the API. However, to permit fast 
    processing, following preconditions have to be fulfilled: 
    -  Only fix-sized data types are supported. 
    -  The SignalGroup must be byte-aligned within the containing I-PDU.  
    -  All GroupSignals must be aligned consecutively within SignalGroup without leaving 
    gaps. 
    -  Only ALWAYS and NEVER filters are supported for TMS. 
    To activate this feature, the global COM configuration switch 
    ComEnableSignalGroupArrayApi must be enabled. Further, only SignalGroups with 
    ComSignalGroupArrayAccess being activated are permitted for the array-based access.  
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    29 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    3.1.15  Dynamic DLC 
    The  COM  evaluates  the  actual  received  DLC  of  the  SDU  given  from  the  lower  layer 
    interface to support the reception of Rx I-PDUs with a variable length. 
    Two cases are distinguished: 
      Actual received DLC is greater than or equal to the statically configured 
      Only the SDU payload data with the statically configured PDU length is processed. 
      Normal signal processing. 
      Actual received DLC is smaller than the statically configured 
      Only the SDU payload data with the actual received PDU length is processed. 
      Only completely received signals or signal groups are processed.   
    This affects: 
      Rx indication notifications 
      Rx Filter 
      Rx Invalidation 
      Signal routing 
      If a configured update-bit is not contained in the actual received payload, the signal is 
    processed as if the update-bit were set. 
     
     
    Note 
    If a signal or signal group is completely received depends on the following parameters: 
      > Bit position and length 
    > Endianness 
    > The position of all group signals of a signal group 
     
     
    3.1.16  Reception Deadline Monitoring 
    For Rx signals and signal groups, a deadline monitoring mechanism is provided to detect 
    failures of other ECUs. 
    The  timeout  time  can  be  configured  per  signal  and  signal  group,  but  only  signals  and 
    signal  groups  with  a  configured update-bit  can  be monitored  separately.  For  signals  and 
    signal group without a configured update-bit, an I-PDU based timeout is applied.  
    If a timeout occurs, it’s configurable whether the COM shall call a timeout notification and 
    additionally  replaces  the  signal  value  with  the  configured  initial  value.  If  the  Rx  Timeout 
    value  should  differ  the  initial  value,  the  parameter  “Rx  Data  Timeout  Substitution  Value” 
    can be used to configure a Rx timeout substitution value.  
    The start of the timeout monitoring can be deferred by using the first timeout time to avoid 
    timeout events in the startup time of a network. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    30 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    If  no  first  timeout  time  is  configured,  the  deadline  monitoring  is  not  started  until  the  first 
    reception of the Rx I-PDU or a set update-bit. After the first reception, the normal timeout 
    time is monitored. 
    3.1.17  Invalidation Mechanism 
    On sender side an invalid value can be configured per signal and group signal which is set 
    by the COM invalidation APIs to indicate than no valid signal value can be provided by the 
    application. 
    For signal groups all group signals should be invalided at once, because the group signals 
    are  related  in  a  consistent  manner. Thus,  if  one  group  signal  is  invalid,  the  whole  signal 
    group is invalid. 
    On receiver side the COM checks the value of received signals and group signals against 
    the  configured invalid value.  If  an invalid value is detected, the COM offers the following 
    actions: 
      The invalid value is replaced by the initial value of the signal and normal signal 
    processing takes place 
      A configured invalid notification is called and the invalid value is not stored in the 
    internal COM buffer 
      For signal groups, all group signals are checked against their invalid value. If at least 
    one group signal is invalid, the invalid action is performed for all group signals of the 
    signal group. 
    3.1.18  Signal Reception Filtering 
    A filter algorithm can be configured for Rx  signals and group signals to filter out  specific 
    signal values. If the filter algorithm is evaluated to FALSE, the complete signal processing 
    is inhibited. Thus the signal data is not stored in the internal COM buffer and a configured 
    notification function is not called. 
    For  signal  groups  the  signal  processing  is  performed,  if  at  least  one  configured  filter 
    algorithm of any of the contained group signals is evaluated to TRUE. The signal group is 
    only filtered out, if all filter algorithms are evaluated to FALSE. 
    3.1.19  Signal Status Information 
    For signals and signal groups update-bits can be configured to indicate whether the signal 
    value has been updated by the application since the last transmission of the signal on the 
    bus. 
    On  sender  side  the  update-bit  is  set  in  the  context  of  Com_SendSignal  or 
    Com_SendSignalGroup. As the update-bit shall only be present on the BUS once after the 
    value is updated, the update-bit has to be cleared dependent on the send behavior of the 
    lower layer. As the COM shall be aware of the lower layer, the clear context of the update-
    bit is configurable per Tx I-PDU. 
    If the lower layer copies the I-PDU payload in the transmit context, the update-bits shall be 
    cleared  directly  after  the  COM  triggers  the  transmission  of  the  I-PDU.  In  case  the  lower 
    layer  requests  the  I-PDU  payload  decoupled  by  a  call  to  Com_TriggerTransmit,  the 
    update-bits shall be cleared in this context. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    31 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    The receiving ECU checks the state of an update-bit associated to a signal or signal group 
    and inhibits the complete signal processing, if the update-bit is not set. In a well-functional 
    network, the update-bit should always be set if the signal value has changed. Otherwise 
    the sending ECU is defect. 
    3.1.20  Signal Gateway 
    The signal gateway allows routing of signals and signal groups from an Rx I-PDU to one or 
    several Tx I-PDU(s). To reduce interrupt runtime, signal routing is executed on task level 
    within Com_MainFunctionRouteSignals(). 
    As signals can be accessed individually by COM, it is possible to change the signal layout 
    of  I-PDUs  while  routing.  Furthermore  it  is  possible  to  change  the  byte  alignment  of  the 
    routed signals and to specify any available transmission property for the Tx signal and I-
    PDU. 
     
     
    Figure 3-9  Signal routing allows routing of individual signals 
    3.1.20.1  Signal routing requirements 
    In  order  to  allow  routing  between  two  signals  several  requirements  must  be  fulfilled 
    regarding the compatibility of the Rx and the Tx signal: 
      Application data type must be equal 
      Rx signal bit count must not be larger as the Tx signal bit count 
      When routing byte arrays (application data type is uint[8]) the byte count must be 
    equal 
      If a Tx signal is used in multiple routing relations (n(Rx):1(Tx) routing) the routing 
    relations must be exclusive at runtime to ensure data consistency. 
    3.1.20.2  Routing of signal groups 
    Signal groups are routed consistently from the Rx I-PDU to the Tx I-PDU. In order to allow 
    data  consistency  of  the  signals,  it  is  required  that  all  signals  of  the  Tx  signal  group  are 
    filled with signals of one Rx signal group. If this is not given, the signal group routing is not 
    possible. 
    It is not required that all signals of an Rx signal group are routed to a Tx signal group. This 
    allows routing an Rx signal group to a Tx signal group with less group signals. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    32 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    3.1.20.3  Routing latency for normal Signal Gateway 
    The maximum routing latency is influenced by several factors and cannot be guaranteed 
    by COM. When estimating the routing latency, the following factors have to be taken into 
    account: 
      the cycle times of COM (main) functions 
      the minimum delay time of the Tx I-PDU 
      the Tx I-PDU transmission mode and cycle time 
      the Tx signal transfer mode and filter settings 
      delays caused by lower layers (such as bus access delay times) 
      other factors such as interrupt events that can delay routing execution 
     
    Example 
    Eliminating all these factors to the fastest possible configuration (minimum delay 
     
    time is zero, Tx I-PDU send mode is DIRECT, Tx signal transfer property is 
    ‘TRIGGERED’, signal processing is immediate …) the maximum routing latency 
    is the sum of the following cycle times: 
    Call cycle of Com_MainFunctionRx(): If the signal processing of the Rx I-PDU 
    is configured to deferred, the routing event flag is evaluated deferred by this 
    main-function. For immediate signal processing the flag is evaluated in context of 
    Com_RxIndication(). 
    Call cycle of Com_MainFunctionRouteSignals(): This task polls the routing 
    event flag. If the flag is set the signal is copied to the destination I-PDU and the 
    transmission request flag of the Tx I-PDU is set. 
    Call cycle of Com_MainFunctionTx(): This function is used to control the 
    transmission of I-PDUs. The function polls the transmission request flags and 
    triggers the I-PDU transmission by calling PduR_ComTransmit() of the related Tx 
    I-PDU. 
    3.1.20.4  Gateway routing timeout 
    The Tx-I-PDU based gateway  routing timeout  describes the maximum time between two 
    routing events that refer the same Tx-I-PDU, before a timeout occurs. If a routing timeout 
    occurs,  the  cyclic  transmission  of  a Tx-I-PDU  is  stopped.  The  cyclic  transmission  of  the 
    PDU is reinitiated if any gateway mapping event occurs for the Tx-I-PDU. 
    3.1.21  Gateway Description Routing 
    Description routing represents a basic routing mode, in which a portion of an incoming Rx-
    I-PDU  is  copied  to  1…n  destination  Tx-I-PDUs  without  any  further  interpretation  and 
    processing  of  the  content.  In  this  mode,  the  normal  signal  processing  path  is  bypassed 
    allowing a reduction of the routing event latency. 
    A  minimal  set  up  of  a  gateway  mapping  consists  of  one  source  and  one  destination 
    description. A source description is at least defined by a source I-PDU reference, start bit 
    position,  bit  size  and endianness. The  bit  size  defines  the amount  of bits  that  should  be 
    copied starting from the start bit position. On the other hand, a destination description is 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    33 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    defined by a destination I-PDU, a start bit position and endianness. Additionally, a transfer 
    property can be configured.   
    The usage of this gateway mode requires several preconditions to be fulfilled: 
    -  Source  and  destination  description  of  a  gateway  mapping  share  the  same 
    endianness.  
    -  Sign extension, endianness conversion and filtering are not supported. 
    The  call  context  and  the  point  of  time,  when  a  gateway  mapping  is  processed  after 
    reception,  are  defined  through  the  source  and  destination  I-PDU  signal  processing 
    property: 
     
    Destination I-PDU 
    Immediate 
    Deferred 
     
     
    Immediate  Rx and Tx: Com_RxIndication() 
    Rx:  Com_RxIndication()                        
    Tx:  Com_MainFunctionTx() 
    rce
    u
    DU
    o
    P
    S
    -I Deferred 
    Rx and Tx: 
    Rx: Com_MainFunctionRouteSignals()  
    Com_MainFunctionRouteSignals() 
    Tx: Com_MainFunctionTx() 
    Table 3-3   Gateway mapping processing context 
    A  gateway  mapping  in  which  source  and  destination  descriptions  refer  I-PDUs  with  an 
    immediate signal processing property, have the least routing latency. In this case, copying 
    the  referred  bits  from  Rx-  to  Tx-I-PDU  buffer  and  transmit  initiation  take  place  in  the 
    context of Com_RxIndication().  
    A further optimization for reducing the routing latency is the possibility to generate gateway 
    routing  functions  and  therefore  reduce  the  latency  which  is  introduced  by  ROM  access 
    operations. In this case, the generated embedded code is used instead of the static code. 
    This 
    optimization 
    strategy 
    can 
    be 
    enabled 
    by 
    activating 
    the 
    ComDescriptionRoutingCodeGeneration switch and is only available for a PRE-COMPILE 
    implementation variant. 
     
     
    Note 
    If multiple source I-PDUs have a deferred signal processing property, then the received 
      I-PDUs are processed in reverse order.  
     
    3.1.22  Large I-PDUs 
    A  large  I-PDU  is  a  PDU  that  is  too  large  to  fit  into  a  single  L-PDU  of  the  underlying 
    communication protocol.  
    A  large  I-PDU  must  have  the  ComIPduType  configured  to  TP  and  will  be 
    transmitted/received by a transport protocol.  
    On  Receiver  side  the  COM  holds  for  always  a  valid  value  of  the  signals  contained  in  a 
    large I-PDU.  
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    34 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
    On  Transmission  side  the  COM  will  return  COM_BUSY,  by  a  call  of  the  APIs: 
    Com_SendSignal, Com_SendSignalGroup and Com_SendDynSignal when a large I-PDU 
    transmission is in progress. 
     
     
    Note 
    For large I-PDUs the ComTxIPduClearUpdateBit context can only be configured to 
      Confirmation. 
     
    3.1.23  Dynamic length signals 
    Dynamic  length  signals  are  ComSignals  or  ComGroupSignals  with  a  ComSignalType 
    configured to UINT8_DYN. The range of the length of a dynamic length signal is 0 to the 
    configured ComSignalLength.   
    Dynamic length signals must be contained in an I-PDU with the ComIPduType configured 
    to TP and dynamic length signals must be placed at the end of the I-PDU.  
    It  is  allowed  to  configure  an  update-bit  for  a  dynamic  length  signal.  In  this  case,  the  
    update-bit must be located in front of the dynamic length signal. 
    Use the API Com_ReceiveDynSignal to receive a dynamic length signal and use the API 
    Com_SendDynSignal to send a dynamic length signal.  
    Dynamic  length  signal  must  be  placed  to  byte  boundaries  and  must  have  the  signal 
    endianness OPAQUE. 
    Only  the  ComFilterAlgorithm  ALWAYS  and  NEVER  are  supported  for  dynamic  length 
    signals. 
     
     
    Note 
    The initial length of a dynamic length signal is 0.The configured ComSignalInitValue is 
      not required for the generation. 
     
    3.1.24  Com Optimizations 
    3.1.24.1  Critical section threshold loop strategy 
    Critical  sections  as  described  in  chapter  4.2  are  used  to  avoid  concurrency/  data 
    consistency problems when shared ressources are used. However, switching the state of 
    critical sections might be an expensive operation. To optimize the relation between runtime 
    with locked interrupts and the cost introduced by entering and exiting an exclusive area a 
    threshold strategy is applied when multiple elements are processed in a loop. 
    This  strategy  locks  the  desired  exclusive  area  before  entering  loop  and  exits  it  after  all 
    elements  have  been  processed.  Further,  at  the  end  of  each  iteration  step  a  counter  is 
    incremented  and  compared  with  configured  threshold  value.  If  the  counter  exceeds  the 
    threshold the exclusive area will be temporarily be opened to allow rescheduling of waiting 
    tasks as shown in following example. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    35 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
     
     
    Example
     
    Com_EnterExclusiveArea(); 
      for(; idx < tableSize; idx++) 

      exclusiveAreaCounter++; 
      /* Do processing */ 
      if(exclusiveAreaCounter >= exclusiveAreaThreshold) 
      { 
        exclusiveAreaCounter = 0; 
        Com_ExitExclusiveArea(); 
        Com_EnterExclusiveArea(); 
      }   
    }    
    Com_ExitExclusiveArea(); 
     
     
     
    Following thresholds can be configured: 
     
    Threshold 
    Description 
    (Affected Exclusive Area) 
    ComGatewayDescriptionProcessingISRLockThreshold  Strategy is applied on gateway description processing, where 
    the source description is deferred. 
    (COM_EXCLUSIVE_AREA_BOTH) 
    ComGatewayProcessingISRLockThreshold 
    Strategy is applied in context of 
    Com_MainFunctionRouteSignals, where gateway signal 
    (COM_EXCLUSIVE_AREA_BOTH) 
    routing elements are being processed. 
    ComIPduGroupISRLockThreshold 
    Strategy is applied in context of Com_IpduGroupControl or 
    Com_IpduGroupStart / -Stop respectively. Threshold describes 
    (COM_EXCLUSIVE_AREA_RX/ 
    the max. number of Rx or Tx I-PDU’s which are being started 
     COM_EXCLUSIVE_AREA_TX) 
    or stopped before ISR Locks will temporarily be opened. 
    ComRxDeadlineMonitoringISRLockThreshold 
    Threshold describes the max. number of monitored Rx items (I-
    PDU based or Signal/SignalGroup based), which are being 
    (COM_EXCLUSIVE_AREA_RX) 
    processed under locked interrupts in context of 
    Com_MainFunctionRx.  
    Note: Threshold might be released temporarily if a timeout 
    notification callback has to be called. 
    ComRxDeferredProcessingISRLockThreshold 
    Threshold describes the max. number of Rx I-PDUs which are 
    being processed after reception in context of 
    (COM_EXCLUSIVE_AREA_RX) 
    Com_MainFunctionRx. 
    Note: Threshold might be released temporarily if a notification/ 
    or invalid notification has to be called, whenever the deferred 
    notification cache is full (see section 0). 
    ComTxCyclicProcessingISRLockThreshold 
    Threshold describes the maximum number of Tx I-PDUs 
    whose cyclic parameters are processed under locked interrupts 
    (COM_EXCLUSIVE_AREA_TX) 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    36 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    before the interrupt lock will be opened temporarily. 
    ComTxDeadlineMonitoringISRLockThreshold 
    Threshold describes the max. number of monitored Tx I-PDUs, 
    which are being processed under locked interrupts in context of 
    (COM_EXCLUSIVE_AREA_TX) 
    Com_MainFunctionTx.  
    Note: Threshold might be released temporarily if a timeout 
    notification callback has to be called. 
    ComTxProcessingISRLockThreshold 
    Threshold describes the max. number of Tx I-PDUs which are 
    processed for transmission under locked interrupts in context of 
    (COM_EXCLUSIVE_AREA_TX) 
    Com_MainFunctionTx. 
    Table 3-4   Configurable Thresholds  
    3.1.24.2  Rx Notification caching 
    A  RTE/  application  callback  must  always  be  called  with  open  interrupt  locks,  therefore  it 
    might be required to temporarily exit an previously entered exclusive area. To reduce the 
    cost  of  switching  the  state  of  an  exclusive  area,  notification  callbacks  and  invalid 
    notification  callbacks  are  cached  in  a  configurable  notification  cache  while  signals  and 
    signal groups are being unpacked after reception. The idea behind this strategy is, instead 
    of  exiting  and  reentering  the  Rx  exclusive  area  multiple  times,  to  call  all  cached 
    notifications  afterwards  at  once,  after  all  received  signals/  signal  groups  have  been 
    processed.  However  caching  requires  some  amount  of  memory,  therefore  the  user  can 
    configure  the  cache  size.  Whenever,  the  cache  is  full,  the  exclusive  area  will  be 
    temporarily  exited  and  all  cached  notifications  and  invalid  notifications  callbacks  will  be 
    called.  
    Depending on the configured signal processing property of the I-PDU, the callbacks will be 
    either be called in immediate or deferred notification cache: 
    -  Immediate  notification  cache:  Callbacks  will  be  cached  in  the  context  of 
    Com_RxIndication. Cache is reserved on the stack whenever an immediate I-PDU 
    is  being  received.  Therefore  the  cache  has  a  local  scope  for  each  received 
    immediate I-PDU. 
    -  Deferred  notification  cache:  Callbacks  will  be  cached  in  the  task  context  of 
    Com_MainFunctionRx.  One  shared  cache  is  reserved  on  the  heap  and  therefore 
    has  a  global  scope  for  all  deferred  I-PDUs.  Signal/  signal  group  callbacks  of  all 
    deferred I-PDUs will be cached before the callbacks will be called. 
     
     
    Note 
    User has to ensure that the configured stack size complies with the configured 
      immediate notification cache and reception rate of immediate I-PDUs. 
     
     
    3.1.24.3  Deferred Event Caching 
    This  feature  describes  one  optimization  strategy  for  reducing  the  processing  time  of 
    deferred  I-PDUs.  The  main  idea  behind  this  feature  is  to  cache  the  ID  of  received  Rx-I-
    PDUs that should be processed in deferred manner and therefore avoid the handling of all 
    configured  deferred  I-PDUs.  The  optional  parameter  ComRxDeferredEventCacheSize 
    describes a cache size for storing the amount of deferred I-PDUs. The maximum size of 
    the cache is limited to the number of configured I-PDUs. If the number of deferred events 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    37 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
    exceeds  the  cache  size,  the  deferred  I-PDUs  will  be  processed  in  normal  fashion  and 
    every configured I-PDU has to be checked if a new event has occurred. This feature can 
    be activated by enabling the ComDeferredEventCacheSupport switch. 
     
     
    Note 
    If the deferred event caching strategy applies, received I-PDUs are processed in 
      reverse order.  
     
    3.1.24.4  Main Function Timing Domains 
    In general, a timebase for reception and transmission of COM I-PDUs can be configured. 
    These  timebases  should  meet  the  call  cycle  periods  of  Com_MainFunctionRx()  and 
    Com_MainFunctionTx(), respectively. All timing operations are derived from the resolution 
    of these timebases.  
    In order to reduce the computational overhead at runtime, separate timing domains can be 
    configured  for  Rx-/  Tx-deadline  monitoring  and  Tx-cyclic  operations.  The  resolutions  of 
    these timebases are limited to the resolution of the two basic timelines.  
    The configured resolution of a timeline defines the granularity, how precisely a timing event 
    is measured. Figure 3-10  Main Function Timing Domains gives an example for the usage 
    of timing domains.  
    Top most, a basic Rx-Timebase with a resolution of tres = 1ms is shown. In this example, 
    the reception of a signal should be monitored with a configured timeout of 3ms. In Figure 
    3-10  
    a)  an  Rx-Event  occurs  right  before  t  =  3ms.    Afterwards,  the  timeout  counter  is 
    decreased and checked every single tick of the Rx-Timebase until the timeout notification 
    function  is  called.  In  Figure  3-10  b)  a  separate  timing  domain  for  deadline  monitoring  is 
    configured.  This  domain  has  a  resolution  of  tres  =  3ms;  therefore  the  timeout  counter  is 
    decreased  and  checked  less  frequently  until  the  timeout  notification  function  is  called.  If 
    many signals should be monitored, the usage of a separate timing domain can relieve the 
    computational unit. 
    However,  a  coarse  resolution  can  lead to  a  timeline fuzziness,  which  is  shown  in  Figure 
    3-10 
    c). Here, the timeline is configured similar to Figure 3-10 b), but this time the signal is 
    received  right  after  one  clock  cycle  of  the  deadline  monitoring  timeline.  The  timeout 
    counter  is  not  decreased  until  the  next  tick,  which  leads  to  a  worst-case  inaccuracy  of    
    tfuzz = tres. 
     
    Figure 3-10  Main Function Timing Domains 
    To  activate  this  feature,  the  ComMainfunctionTimingDomainSupport  switch  must  be 
    enabled.  
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    38 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.1.24.4.1  Timebase for Rx-deadline monitoring handling 
    If a Rx-deadline monitoring timebase is configured, all Rx-deadline monitoring operations 
    will rely on the resolution of this timing domain. Therefore, the configured timeout and first 
    timeout  parameters  must  be  a  multiple  of  this  resolution.  If  no  Rx-deadline  monitoring 
    timebase  is  specified,  all  deadline  monitoring  operations  are  derived  from  the  basic 
    reception timeline. 
    3.1.24.4.2  Timebase for Tx-deadline monitoring handling 
    If a Tx-deadline monitoring timebase is configured,  all Tx-deadline monitoring operations 
    will  rely  on  the  resolution  of  this  timing  domain.  Therefore,  the  configured  timeout 
    parameter must be a multiple of  this  resolution. If  no Tx-deadline monitoring timebase is 
    specified, all deadline monitoring operation will rely on the basic transmission timeline. 
    Additionally,  if  the  gateway  functionality  is  configured,  the  I-PDU-based  gateway  routing 
    timeout is also configured within the Tx-deadline monitoring timebase. Hence, the gateway 
    routing timeout parameter must meet the above mentioned requirements. 
    3.1.24.4.3  Timebase for Tx-cyclic operations 
    If  a  timebase  for  Tx-cyclic  operations  is  configured,  following  operations  will  rely  on  the 
    resolution  of  this  timing  domain  and  therefore  have  to  be  a  multiple  of  the  configured 
    timebase resolution:  
    -  Tx Mode Repetition Period 
    -  Tx Mode Time Offset 
    -  Tx Mode Time Period 
    -  Minimum Delay Time 
     
    3.1.24.5  Handle ID 
    All data unit elements (Signal, SignalGroup, GroupSignal, I-PDU, I-PDU Group) contain a 
    numerical  ID  which  is  unique for the type  of  the data  unit. This  Handle  ID  is  required  to 
    access these elements via respective API calls. 
    However, Signals, SignalGroups and GroupSignals can be defined without being accessed 
    from outside. In this case, the assignment of a Handle ID is obsolete and can be removed 
    to reduce the computational overhead and code size. Though these unit elements cannot 
    be accessed, they are considered for the calculation of the initial values of their containing 
    I-PDU.  The  allocation  of  the  Handle  ID  is  coupled  to  the  values  of  parameters 
    ComSignalAccess and ComSignalGroupAccess. These parameters determine whether the 
    Handle ID is required or not: 
    ComSignalAccess/ 
    Description 
    Handle ID 
    ComSignalGroupAccess 
    ACCESS_NEEDED_BY_SWC_OR_COM 
    A data or a gateway mapping is 

    present. 
    ACCESS_NEEDED_BY_OTHER 
    A Handle ID is required by user or 

    any other module. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    39 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    ACCESS_UNCLEAR 
    It is unclear, if the data unit element 

    needs to be accessed. 
    ACCESS_NOT_NEEDED 
    Handle ID is not needed, as neither  
     
    a data nor a gateway mapping could 
    be found. 
     
    It  should  be  noted,  if  the  Handle  ID  of  a  GroupSignal  is  required,  the  containing 
    SignalGroup  must  have  a  Handle  ID  as  well.  Further,  for  an  array-based  access  of 
    SignalGroups, a Handle ID for the SignalGroup and all GroupSignals is essential.   
    3.1.24.6  Autosar 3 based I-Pdu Group handling 
    If  the  switch  ComGeneral.ComOptimizedIPduGroupHandling  is  enabled  the  APIs 
    Com_IpduGroupControl  and  Com_ReceptionDMControl  are  replaced  by  the  Autosar  3 
    APIs:  Com_IpduGroupStart,  Com_IpduGroupStop,  Com_EnableReceptionDM  and 
    Com_DisableReceptionDM.  These APIs  use  directly  the  I-PduGroup  Handle  Id  and  are 
    faster when one I-Pdu Group is switched at once. 
    3.2 
    Initialization 
    Before  the  COM  layer  can  be  used  it  has  to  be  initialized  by  Com_Init().  This  function 
    performs  the  basic  initialization  but  does  not  enable  the  transmission  or  reception  of 
    signals and I-PDUs. 
    Initialization, starting and stopping of the layer and its I-PDU groups is normally driven by 
    the  Communication  Manager.  If  this  software  component  is  not  available  a  similar 
    component has to be provided by the integrator. 
    If  variables  exist,  which  cannot  be  initialized  by  the  startup  code,  the  function 
    Com_InitMemory() has to be called. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    40 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.3 
    States 
    3.3.1 
    Module States 
    The COM module has the following module states 
      COM_UNINIT 
    The module is not initialized or not usable. 
      COM_INIT 
    The module is initialized and usable. 
    and the possible state changes are shown in Figure 3-11. 
    stm StateManager
    Com_Init()
    Module 
    Module 
    PowerOn
    COM_UNINIT
    COM_INIT
    Module
    Initial
    Com_DeInit()
     
    Figure 3-11  Module State Machine 
    The current state of the COM can be accessed by the API ‘Com_GetStatus()’. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    41 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.3.2 
    I-PDU States 
    Each I-PDU has the following states 
      Activated 
      Deactivated 
    An I-PDU is active if and only if at least one I-PDU group is active it belongs to. Thus an I-
    PDU must belong to at least one I-PDU group in order to be able to get activated. 
    The possible state changes are shown in Figure 3-12. 
    stm IPduGroupHandling
    Com_IpduGroupControl(RequestedActivationState == activated)
    I-PDU 
    I-PDU 
    Com_Init()
    deactiv ated
    activ ated
    I-PDU
    Initial
    Com_IpduGroupControl(RequestedActivationState == deactivated),
    Com_DeInit()
     
    Figure 3-12  I-PDU State Machine 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    42 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.3.3 
    Reception Deadline Monitoring States 
    The reception deadline monitoring of an I-PDU is enabled if and only if it is contained in an 
    I-PDU  group  that  has  reception  deadline  monitoring  enabled.  Otherwise,  the  reception 
    deadline monitoring of the I-PDU is disabled. 
    The possible state changes are shown in Figure 3-13. 
    stm ReceptionDeadlineMonitoring
    Com_IpduGroupControl(RequestedActivationState == activated) [CurrentActiveState == deactivated],
    Com_ReceptionDMControl(RequestedActivationState == enabled), Com_EnableIPduReceptionDM()
    I-PDU DM 
    I-PDU DM 
    Com_Init()
    disabled
    enabled
    I-PDU DM
    Initial
    Com_IpduGroupControl(RequestedActivationState == deactivated)  [CurrentActiveState == activated],
    Com_ReceptionDMControl(RequestedActivationState == disabled), Com_DisableIPduReceptionDM()
     
    Figure 3-13  Reception Deadline Monitoring State Machine 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    43 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    3.4 
    Main Functions 
    COM provides following functions listed in Table 3-5 that have to be called cyclically by the 
    Basic Software Scheduler or a similar component. 
     
    Main Function 
    Description 
    Com_MainFunctionRx() 
    This function performs the following reception 
    processings 
    >  Reception deadline monitoring 
    >  Deferred signal processing 
    This function must be called cyclically with a 
    cycle time identical to the configured Rx Time 
    Base. 
    Com_MainFunctionTx() 
    This function performs the following 
    transmission processings 
    >  Transmission of I-PDUs 
    >  Transmission deadline monitoring 
    >  Deferred transmission notification 
    This function must be called cyclically with a 
    cycle time identical to the configured Tx Time 
    Base. 
    Com_MainFunctionRouteSignals() 
    This function performs the signal gateway 
    functionality. 
    Note that the transmission of Tx I-PDUs is 
    never triggered by this function directly. Thus 
    the Com_MainFunctionTx() is necessary for a 
    complete signal routing. 
    This function must be called cyclically with a 
    cycle time identical to the configured Gw Time 
    Base. 
    Table 3-5   Main functions that have to be called cyclically 
     
     
    Note 
    To reduce the signal gateway latency, the order of the main function calls should be as 
      follows 
    >  Com_MainFunctionRx() 
    >  Com_MainFunctionRouteSignals() 
    >  Com_MainFunctionTx() 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    44 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    3.5 
    Error Handling 
    3.5.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter COM_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported COM ID is 50. 
    The reported service IDs identify the services which are described in 0. The following table 
    presents the service IDs and the related services: 
    Service ID 
    Service 
    COMServiceId_Init 
    Com_Init 
    COMServiceId_DeInit 
    Com_DeInit 
    COMServiceId_IpduGroupControl 
    Com_IpduGroupControl 
    COMServiceId_ReceptionDMControl 
    Com_ReceptionDMControl 
    COMServiceId_GetStatus 
    Com_GetStatus 
    COMServiceId_GetConfigurationId 
    Com_GetConfigurationId 
    COMServiceId_GetVersionInfo 
    Com_GetVersionInfo 
    COMServiceId_SendSignal 
    Com_SendSignal 
    COMServiceId_ReceiveSignal 
    Com_ReceiveSignal 
    COMServiceId_UpdateShadowSignal 
    Com_UpdateShadowSignal 
    COMServiceId_SendSignalGroup 
    Com_SendSignalGroup 
    COMServiceId_ReceiveSignalGroup 
    Com_ReceiveSignalGroup 
    COMServiceId_ReceiveShadowSignal 
    Com_ReceiveShadowSignal 
    COMServiceId_InvalidateSignal 
    Com_InvalidateSignal 
    COMServiceId_InvalidateShadowSignal 
    Com_InvalidateShadowSignal 
    COMServiceId_TriggerIPDUSend 
    Com_TriggerIPDUSend 
    COMServiceId_MainFunctionRx 
    Com_MainFunctionRx 
    COMServiceId_MainFunctionTx 
    Com_MainFunctionTx 
    COMServiceId_MainFunctionRouteSignals 
    Com_MainFunctionRouteSignals 
    COMServiceId_InvalidateSignalGroup 
    Com_InvalidateSignalGroup 
    COMServiceId_ClearIpduGroupVector 
    Com_ClearIpduGroupVector 
    COMServiceId_SetIpduGroup 
    Com_SetIpduGroup 
    COMServiceId_SendDynSignal 
    Com_SendDynSignal 
    COMServiceId_ReceiveDynSignal 
    Com_ReceiveDynSignal 
    COMServiceId_SendSignalGroupArray 
    Com_SendSignalGroupArray 
    COMServiceId_ReceiveSignalGroupArray 
    Com_ReceiveSignalGroupArray 
    COMServiceId_SwitchIpduTxMode 
    Com_SwitchIpduTxMode 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    45 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Service ID 
    Service 
    COMServiceId_TriggerIPDUSendWithMetaD Com_TriggerIPDUSendWithMetaData 
    ata 
    COMServiceId_TxConfirmation 
    Com_TxConfirmation 
    COMServiceId_TriggerTransmit 
    Com_TriggerTransmit 
    COMServiceId_RxIndication 
    Com_RxIndication 
    COMServiceId_CopyTxData 
    Com_CopyTxData 
    COMServiceId_CopyRxData 
    Com_CopyRxData 
    COMServiceId_TpRxIndication 
    Com_TpRxIndication 
    COMServiceId_StartOfReception 
    Com_StartOfReception 
    COMServiceId_TpTxConfirmation 
    Com_TpTxConfirmation 
    Table 3-6   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    COM_E_PARAM  
    The API service has been with a wrong parameter. 
    COM_E_UNINIT 
    The API service has been called before COM was initialized with 
    Com_Init() or after a call to Com_DeInit() 
    COM_E_PARAM_POINTER 
    The API service has been called with a not expected NULL 
    pointer. 
    COM_E_INIT_FAILED 
    The API service has been called with a not expected NULL 
    pointer 
    Table 3-7   Errors reported to DET 
    3.5.2 
    Production Code Error Reporting 
    No production error codes are currently defined for COM. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    46 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  COM into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the COM contains the files which are described in the chapters 4.1.1 and 
    4.1.2. 
    4.1.1 
    Static Files 
    File Name 
    Description 
    Com.c 
    This is the source file of the COM 
    Com.h 
    This is the header file of COM 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    Com_Cfg.h 
    This file contains: 
    >  global constant macros 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS PRE-COMPILE data. 
    Com_Cbk.h 
    This is the generated header file of COM containing prototypes for lower layers. 
    Com_Cfg.c 
    This file contains: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS PRE-COMPILE data.  
    Com_Cot.h 
    This file contains the prototypes of: 
    >  I-Pdu Callouts 
    >  I-Pdu Trigger Transmit Callouts 
    This file is included by Com_Cbk.h. 
    Com_Lcfg.h 
    This file contains: 
    >  global constant macros 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    47 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    File Name 
    Description 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS LINK data. 
    Com_Lcfg.c 
    This file contains: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS LINK data. 
    Com_PBcfg.h  This file contains: 
    >  global constant macros 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS POST-BUILD data. 
    Com_PBcfg.c  This file contains: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS POST-BUILD data. 
    Com_Types.h  This file contains the static type definitions. 
    Table 4-2   Generated files 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    48 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    4.2 
    Critical Sections 
    The handling of entering and leaving critical sections is provided by the RTE. The Vector 
    MICROSAR  COM  offers  several  groups  of  critical  sections  to  optimize  the  runtime 
    consumption. 
    For  a  more  detailed  description  of  the  possible  exclusive  area  implementation  variant 
    please refer to [4]. 
    Following critical sections are offered 
      COM_EXCLUSIVE_AREA_BOTH 
    This critical section protects Rx and Tx ressources that are being accessed in context of 
    Com_MainFunctionRouteSignals for signal gateway routings or description routings with 
    configured deferred description source. Therefore the critical section enclosed with 
    COM_EXCLUSIVE_AREA_BOTH should never be interrupted by any Com API which 
    accesses Tx or Rx ressources likewise mentioned in the second and third column of 
    Table 4-3 
      COM_EXCLUSIVE_AREA_TX 
    This critical section protects Tx ressources that can be accessed from various 
    contexts. Therefore the critical section enclosed with COM_EXCLUSIVE_AREA_TX 
    should never be interrupted by any Com API which accesses Tx ressources likewise 
    mentioned in the first and second column of Table 4-3 
      COM_EXCLUSIVE_AREA_RX 
    This critical section protects Rx ressources that can be accessed from various 
    contexts. Therefore the critical section enclosed with COM_EXCLUSIVE_AREA_RX 
    should never be interrupted by any Com API which accesses Rx ressources likewise 
    mentioned in the first and second column of Table 4-3 
    COM_EXCLUSIVE_AREA_BOTH 
    COM_EXCLUSIVE_AREA_TX 
    COM_EXCLUSIVE_AREA_RX 
    Com_MainFunctionRouteSignals 
    Com_Deinit 
    Com_DeInit 
     
    Com_Init 
    Com_Init 
     
    Com_InvalidateSignal 
    Com_IPduGroupControl 
     
    Com_InvalidateSignalGroup 
    Com_IPduGroupStart 
     
    Com_IpduGroupControl 
    Com_IPduGroupStop 
     
    Com_IpduGroupStart 
    Com_MainFunctionRx 
     
    Com_IpduGroupStop 
    Com_ReceiveDynSignal 
     
    Com_MainFunctionTx 
    Com_ReceiveSignal 
     
    Com_RxIndication (UseCase: 
    Com_ReceiveSignalGroup 
    Description routing with immediate 
    source description) 
     
    Com_SendDynSignal 
    Com_ReceiveSignalGroupArray 
     
    Com_SendSignal 
    Com_RxIndication 
     
    Com_SendSignalGroup 
    Com_TpRxindication 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    49 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
     
    Com_SendSignalGroupArray 
     
     
    Com_TpRxIndication 
     
     
    Com_TpTxConfirmation (UseCase:   
    Description routing with immediate 
    source description) 
     
    Com_TxConfirmation 
     
    Table 4-3   Overview of used Exclusive Area per Com API 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    50 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the COM are described in this chapter. 
    Type Name 
    C-Type  Description 
    Value Range 
    Com_StatusType 
    enum 
    This is a status value 
    COM_UNINIT 
    returned by the API 
    The AUTOSAR COM module is not 
    service 
    initialized or not usable 
    Com_GetStatus(). 
    COM_INIT 
    The AUTOSAR COM Module is 
    initialized and usable. 
    Com_SignalIdType 
    c-type   AUTOSAR COM signal 
    0..<SignalIdmax> 
    object identifier. 
    Zero-based integer number 
    Com_SignalGroupIdTy c-type 
    AUTOSAR COM signal 
    0..<SignalGroupIdmax>  
    pe 
    group object identifier. 
    Zero-based integer number 
    Com_IpduGroupIdTyp c-type 
    AUTOSAR COM I-PDU 
    0..<IpduGroupIdmax> 

    group object identifier. 
    Zero-based integer number 
    Com_IpduGroupVector  byte 
    This type stores a flag 
    uint8[(ComSupportedIPduGroups - 
    array 
    (bit) for each I-PDU 
    1)/8 + 1] 
    group 
    Com_SerciveIdType 
    enum 
    Unique identifier of an 
    See in Table 3-6 
    AUTOSAR COM service.   
    Table 5-1   Type definitions 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    51 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    5.2 
    Services provided by COM 
    5.2.1 
    Com_Init 
    Prototype 
    void Com_Init (const Com_ConfigType *config) 
    Parameter 
    config  
    NULL_PTR if COM_USE_INIT_POINTER is STD_OFF Pointer to the Com 
    configuration data if COM_USE_INIT_POINTER is STD_ON 
    Return code 
    void 
    none 
    Functional Description 
    This service initializes internal and external interfaces and variables of the AUTOSAR COM layer for the 
    further processing. After calling this function the inter-ECU communication is still disabled. 
    Particularities and Limitations 
    >  Com_InitMemory() has to be executed previously, if the startup code does not initialize variables.Com is 
    not in initialized state.  
    Caution 
    Com_Init shall not pre-empt any COM function. The rest of the system must guarantee that 
     
    Com_Init is not called in such a way. 
    Call context 
    >  The function must be called on task level and must not be interrupted by other administrative function 
    calls. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-2   Com_Init 
     
    5.2.2 
    Com_InitMemory 
    Prototype 
    void Com_InitMemory (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The function initializes variables, which cannot be initialized with the startup code. 
    Particularities and Limitations 
    Com_Init() is not called yet.  
    Call context 
    >  The function must be called on task level. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    52 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    Table 5-3   Com_InitMemory 
     
    5.2.3 
    Com_DeInit 
    Prototype 
    void Com_DeInit (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This service stops the inter-ECU communication. All started I-PDU groups are stopped and have to be 
    started again, if needed, after Com_Init is called. By a call to ComDeInit COM is put into an not initialized 
    state. 
    Particularities and Limitations 

    Caution 
    Com_DeInit shall not pre-empt any COM function. The rest of the system must guarantee that 
     
    Com_DeInit is not called in such a way. 
    Call context 
    >  The function must be called on task level and must not be interrupted by other administrative function 
    calls. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-4   Com_DeInit 
     
    5.2.4 
    Com_IpduGroupControl 
    Prototype 
    void Com_IpduGroupControl (Com_IpduGroupVector ipduGroupVector, boolean 
    initialize) 
    Parameter 
    ipduGroupVector  
    I-PDU group vector containing the activation state (stopped = 0/ started = 1) 
    for all I-PDU groups. 
    initialize  
    flag to request initialization of the I-PDUs which are newly started 
    Return code 
    void 
    none 
    Functional Description 
    This service starts I-PDU groups. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    53 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Particularities and Limitations 

    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-5   Com_IpduGroupControl 
     
    5.2.5 
    Com_ReceptionDMControl 
    Prototype 
    void Com_ReceptionDMControl (Com_IpduGroupVector ipduGroupVector) 
    Parameter 
    ipduGroupVector  
    I-PDU group vector containing the requested deadline monitoring state 
    (disabled = 0/ enabled = 1) for all I-PDU groups. 
    Return code 
    void 
    none 
    Functional Description 
    This service enables or disables I-PDU group Deadline Monitoring. 
    Particularities and Limitations 

    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-6   Com_ReceptionDMControl 
     
    5.2.6 
    Com_IpduGroupStart 
    Prototype 
    void Com_IpduGroupStart (Com_IpduGroupIdType IpduGroupId, boolean Initialize) 
    Parameter 
    IpduGroupId  
    ID of I-PDU group to be started 
    Initialize  
    Flag to request initialization of the data in the I-PDUs of this I-PDU group 
    Return code 
    void 
    none 
    Functional Description 
    Starts a preconfigured I-PDU group. For example, cyclic I-PDUs will be sent out cyclically after the call of 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    54 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
    Com_IpduGroupStart(). If Initialize is true all I-PDUs of the I-PDU group shall be (re-)initialized before the I-
    PDU group is started. That means they shall behave like after a start-up of COM, for example the old_value 
    of the filter objects and shadow buffers of signal groups have to be (re-)initialized. 
    Particularities and Limitations 

    Caution 
    A call to Com_IpduGroupStart shall not be interrupted by another call to Com_IpduGroupStart, 
     
    Com_EnableReceptionDM, Com_DisableReceptionDM or a call to Com_IpduGroupStop. 
    Call context 
    >  The function must be called on task level and must not be interrupted by other Com_IpduGroupStart and 
    Com_IpduGroupStop calls. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-7   Com_IpduGroupStart 
     
    5.2.7 
    Com_IpduGroupStop 
    Prototype 
    void Com_IpduGroupStop (Com_IpduGroupIdType IpduGroupId) 
    Parameter 
    IpduGroupId  
    ID of I-PDU group to be stopped 
    Return code 
    void 
    none 
    Functional Description 
    Stops a preconfigured I-PDU group. For example, cyclic I-PDUs will be stopped after the call of 
    Com_IpduGroupStop(). 
    Particularities and Limitations 

    Caution 
    A call to Com_IpduGroupStop shall not be interrupted by another call to Com_IpduGroupStop, 
     
    Com_EnableReceptionDM, Com_DisableReceptionDM or a call to Com_IpduGroupStart. 
    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-8   Com_IpduGroupStop 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    55 
    based on template version 5.6.0 




    Technical Reference MICROSAR COM 
    5.2.8 
    Com_EnableReceptionDM 
    Prototype 
    void Com_EnableReceptionDM (Com_IpduGroupIdType IpduGroupId) 
    Parameter 
    IpduGroupId  
    ID of I-PDU group where reception DM shall be enabled. 
    Return code 
    void 
    none 
    Functional Description 
    Enables the reception deadline monitoring for the I-PDUs within the given I-PDU group. 
    Particularities and Limitations 

    Caution 
    A call to Com_EnableReceptionDM shall not be interrupted by another call to 
     
    Com_EnableReceptionDM, Com_IpduGroupStop, Com_DisableReceptionDM or a call to 
    Com_IpduGroupStart. 
    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-9   Com_EnableReceptionDM 
     
    5.2.9 
    Com_DisableReceptionDM 
    Prototype 
    void Com_DisableReceptionDM (Com_IpduGroupIdType IpduGroupId) 
    Parameter 
    IpduGroupId  
    ID of I-PDU group where reception DM shall be disabled. 
    Return code 
    void 
    none 
    Functional Description 
    Disables the reception deadline monitoring for the I-PDUs within the given I-PDU group. 
    Particularities and Limitations 

    Caution 
    A call to Com_DisableReceptionDM shall not be interrupted by another call to 
     
    Com_DisableReceptionDM, Com_IpduGroupStop, Com_EnableReceptionDM or a call to 
    Com_IpduGroupStart. 
    Call context 
    >  The function must be called on task level. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    56 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-10   Com_DisableReceptionDM 
     
    5.2.10  Com_GetConfigurationId 
    Prototype 
    uint32 Com_GetConfigurationId (void) 
    Parameter 
    void 
    none 
    Return code 
    uint32 
    none 
    none 
    uint32 Configured ConfigurationID 
    Functional Description 
    This function shall perform the processing of the AUTOSAR COM receive processing that are not directly 
    initiated by the calls from the RTE and PDU-R. A call to Com_MainFunctionRx returns simply if COM was 
    not previously initialized with a call to Com_Init. 
    Particularities and Limitations 
    >  -  CREQ-103161 This function shall perform the processing of the transmission activities that are not 
    directly initiated by the calls from the RTE and PDU-R. A call to Com_MainFunctionTx returns simply if 
    COM was not previously initialized with a call to Com_Init.-  CREQ-103168 Provides the unique identifier 
    of the configuration.-  
    Call context 
    >  The function must be called on task level. 
    >  The function must be called on task level. 
    >  The function can be called on interrupt and task level.  CREQ-107420 
    Table 5-11   Com_GetConfigurationId 
     
    5.2.11  Com_GetStatus 
    Prototype 
    Com_StatusType Com_GetStatus (void) 
    Parameter 
    void 
    none 
    Return code 
    Com_StatusType 
    Com_StatusType 
    Functional Description 
    Returns the status of the AUTOSAR COM module. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    57 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level.  CREQ-107163 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-12   Com_GetStatus 
     
    5.2.12  Com_GetVersionInfo 
    Prototype 
    void Com_GetVersionInfo (Std_VersionInfoType *versioninfo) 
    Parameter 
    versioninfo  
    Pointer to where to store the version information of this module. 
    Return code 
    void 
    none 
    Functional Description 
    Returns the version information of this module. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-13   Com_GetVersionInfo 
     
    5.2.13  Com_TriggerIPDUSend 
    Prototype 
    void Com_TriggerIPDUSend (PduIdType PduId) 
    Parameter 
    PduId  
    ID of Tx I-PDU. 
    Return code 
    void 
    void 
    Functional Description 
    By a call to Com_TriggerIPDUSend the I-PDU with the given ID is triggered for transmission. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    58 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-14   Com_TriggerIPDUSend 
     
    5.2.14  Com_TriggerIPDUSendWithMetaData 
    Prototype 
    void Com_TriggerIPDUSendWithMetaData (PduIdType PduId, const uint8 *MetaData) 
    Parameter 
    PduId  
    ID of Tx I-PDU. 
    MetaData  
    The Meta data that shall be added to the I-PDU before sending. 
    Return code 
    void 
    void 
    Functional Description 
    By a call to Com_TriggerIPDUSendWithMetaData the given meta data is appended to the I-PDU and the I-
    PDU with the given ID is triggered for transmission. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-15   Com_TriggerIPDUSendWithMetaData 
     
    5.2.15  Com_ClearIpduGroupVector 
    Prototype 
    void Com_ClearIpduGroupVector (Com_IpduGroupVector ipduGroupVector) 
    Parameter 
    ipduGroupVector  
    I-PDU group vector to be cleared 
    Return code 
    void 
    none 
    Functional Description 
    This service sets all bits of the given Com_IpduGroupVector to 0. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    59 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Particularities and Limitations 

    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-16   Com_ClearIpduGroupVector 
     
    5.2.16  Com_SetIpduGroup 
    Prototype 
    void Com_SetIpduGroup (Com_IpduGroupVector ipduGroupVector, Com_IpduGroupIdType 
    ipduGroupId, boolean bitval) 
    Parameter 
    ipduGroupVector  
    I-PDU group vector to be modified 
    ipduGroupId  
    ID used to identify the corresponding bit in the I-PDU group vector 
    bitval  
    New value of the corresponding bit 
    Return code 
    void 
    none 
    Functional Description 
    This service sets the value of a bit in an I-PDU group vector. 
    Particularities and Limitations 

    Call context 
    >  The function must be called on task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-17   Com_SetIpduGroup 
     
    5.2.17  Com_ReceiveDynSignal 
    Prototype 
    uint8 Com_ReceiveDynSignal (Com_SignalIdType SignalId, void *SignalDataPtr, 
    uint16 *Length) 
    Parameter 
    SignalId  
    Id of signal or group signal to be received. 
    SignalDataPtr  
    Reference to the signal data in which to store the received data. 
    Length  
    in: maximum length that could be received out: length of the dynamic length 
    signal 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    60 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Return code 
    uint8 
    uint8 E_OK service has been accepted E_NOT_OK in case the Length (as in-
    parameter) is smaller than the received length of the dynamic length signal 
    COM_SERVICE_NOT_AVAILABLE corresponding I-PDU group was stopped 
    (or service failed due to development error) COM_BUSY in case the TP-Buffer 
    is locked 
    Functional Description 
    The service Com_ReceiveDynSignal updates the signal data referenced by SignalDataPtr with the data in 
    the signal object identified by SignalId. The Length parameter indicates as "in parameter" the maximum 
    length that can be received and as "out parameter" the length of the written dynamic length signal or group 
    signal. If the signal processing of the corresponding I-Pdu is configured to DEFERRED the last received 
    signal value is available not until the next call to Com_MainfunctionRx. If a group signal is read, the data in 
    the shadow buffer should be updated before the call by a call of the service Com_ReceiveSignalGroup. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-18   Com_ReceiveDynSignal 
     
    5.2.18  Com_ReceiveSignalGroup 
    Prototype 
    uint8 Com_ReceiveSignalGroup (Com_SignalGroupIdType SignalGroupId) 
    Parameter 
    SignalGroupId  
    Id of signal group to be received. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) 
    Functional Description 
    The service Com_ReceiveSignalGroup copies the received signal group to the shadow buffer. After this 
    call, the group signals could be copied from the shadow buffer to the upper layer by a call of 
    Com_ReceiveShadowSignal. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. To guarantee data consistency of the whole signal 
    group the complete reception of a signal group (consecutive calls of 'Com_ReceiveSignalGroup' and 
    'Com_ReceiveSignal') must not be interrupted by another reception request for the same signal group. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    61 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Table 5-19   Com_ReceiveSignalGroup 
     
    5.2.19  Com_ReceiveSignalGroupArray 
    Prototype 
    uint8 Com_ReceiveSignalGroupArray (Com_SignalGroupIdType SignalGroupId, uint8 
    *SignalGroupArrayPtr) 
    Parameter 
    SignalGroupId  
    Id of signal group to be received. 
    SignalGroupArrayPtr  
    reference to the location where the received signal group array shall be stored 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) COM_BUSY in case the TP-Buffer is locked for large data types 
    handling 
    Functional Description 
    The service Com_ReceiveSignalGroupArray copies the received signal group array representation from the 
    PDU to the location designated by SignalGroupArrayPtr. 
    Particularities and Limitations 
    The configuration switch ComEnableSignalGroupArrayApi has to be enabled.  
    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-20   Com_ReceiveSignalGroupArray 
    5.2.20  Com_InvalidateSignal 
    Prototype 
    uint8 Com_InvalidateSignal (Com_SignalIdType SignalId) 
    Parameter 
    SignalId  
    ID of signal or group signal to be invalidated. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) 
    Functional Description 
    This function invalidates the signal or group signal by calling Com_SendSignal with the configured invalid 
    value. If this function is used to invalidate a group signal, a call to Com_SendSignalGroup is needed to 
    update the signal group data. 
    Particularities and Limitations 

    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    62 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_SendSignal and Com_InvalidateSignal calls for the same SignalId. 
    >  This function is Reentrant 
    Table 5-21   Com_InvalidateSignal 
     
    5.2.21  Com_InvalidateSignalGroup 
    Prototype 
    uint8 Com_InvalidateSignalGroup (Com_SignalGroupIdType SignalGroupId) 
    Parameter 
    SignalGroupId  
    ID of signal group to be invalidated. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) 
    Functional Description 
    This function invalidates the whole signal group by calling Com_SendSignal with the configured invalid 
    value for all group signals of the signal group. After invalidation of the current signal group data 
    Com_SendSignalGroup is performed internally. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_InvalidateSignalGroup calls for the same SignalGroupId and by Com_SendSignal calls for a 
    SignalId which is contained in the same signal group. 
    >  This function is Reentrant 
    Table 5-22   Com_InvalidateSignalGroup 
    5.2.22  Com_SwitchIpduTxMode 
    Prototype 
    void Com_SwitchIpduTxMode (PduIdType PduId, boolean Mode) 
    Parameter 
    PduId  
    ID of Tx I-PDU. 
    Mode  
    TX mode of the I-PDU (TRUE/FALSE) 
    Return code 
    void 
    none 
    Functional Description 
    This method sets the TX Mode of the I-PDU referenced by PduId to Mode. In case the TX Mode changes 
    the new mode is immediately effective. In case the requested transmission mode was already active for this 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    63 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    I-PDU, the call will have no effect. 
    Particularities and Limitations 
     
    Call context 
    >  The function can be called on interrupt and task level 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-23   Com_SwitchIpduTxMode 
    5.2.23  Com_SendDynSignal 
    Prototype 
    uint8 Com_SendDynSignal (Com_SignalIdType SignalId, const void *SignalDataPtr, 
    uint16 Length) 
    Parameter 
    SignalId  
    ID of signal or group signal to be sent. 
    SignalDataPtr  
    Reference to the signal data to be transmitted. 
    Length  
    Length of the dynamic length signal. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) COM_BUSY in case the TP-Buffer is locked for large data types 
    handling 
    Functional Description 
    The service Com_SendDynSignal updates the signal or group signal object identified by SignalId with the 
    signal data referenced by the SignalDataPtr parameter. The Length parameter is evaluated for dynamic 
    length signals. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_SendSignal and Com_InvalidateSignal calls for the same SignalId. 
    >  This function is Reentrant 
    Table 5-24   Com_SendDynSignal 
     
    5.2.24  Com_SendSignal 
    Prototype 
    uint8 Com_SendSignal (Com_SignalIdType SignalId, const void *SignalDataPtr) 
    Parameter 
    SignalId  
    ID of signal or group signal to be sent. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    64 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    SignalDataPtr  
    Reference to the signal data to be transmitted. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) COM_BUSY in case the TP-Buffer is locked for large data types 
    handling 
    Functional Description 
    The service Com_SendSignal updates the signal or group signal object identified by SignalId with the signal 
    data referenced by the SignalDataPtr parameter. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_SendSignal and Com_InvalidateSignal calls for the same SignalId. 
    >  This function is Reentrant 
    Table 5-25   Com_SendSignal 
     
    5.2.25  Com_SendSignalGroup 
    Prototype 
    uint8 Com_SendSignalGroup (Com_SignalGroupIdType SignalGroupId) 
    Parameter 
    SignalGroupId  
    ID of signal group to be send. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) 
    Functional Description 
    The service Com_SendSignalGroup copies the content of the associated shadow buffer to the associated I-
    PDU buffer. Prior to this call, all group signals should be updated in the shadow buffer by the call of 
    Com_SendSignal. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_SendSignalGroup calls for the same SignalGroupId. To guarantee data consistency of the whole 
    signal group the complete transmission of a signal group (consecutive calls of 'Com_SendSignal' and 
    'Com_SendSignalGroup') must not be interrupted by another transmission request for the same signal 
    group or by a call of 'Com_InvalidateSignalGroup'. 
    >  This function is Reentrant 
    Table 5-26   Com_SendSignalGroup 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    65 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
     
    5.2.26  Com_SendSignalGroupArray 
    Prototype 
    uint8 Com_SendSignalGroupArray (Com_SignalGroupIdType SignalGroupId, const 
    uint8 *SignalGroupArrayPtr) 
    Parameter 
    SignalGroupId  
    Id of signal group to be sent. 
    SignalGroupArrayPtr  
    Reference to the signal group array. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) COM_BUSY in case the TP-Buffer is locked for large data types 
    handling 
    Functional Description 
    The service Com_SendSignalGroupArray copies the content of the provided SignalGroupArrayPtr to the 
    associated I-PDU. The provided data shall correspond to the array representation of the signal group. 
    Particularities and Limitations 
    The configuration switch ComEnableSignalGroupArrayApi has to be enabled.  
    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Reentrant 
    Table 5-27   Com_SendSignalGroupArray 
     
     
    5.2.27  Com_MainFunctionRx 
    Prototype 
    void Com_MainFunctionRx (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This function shall perform the processing of the AUTOSAR COM receive processing that are not directly 
    initiated by the calls from the RTE and PDU-R. A call to Com_MainFunctionRx returns simply if COM was 
    not previously initialized with a call to Com_Init. 
    Particularities and Limitations 
    -  CREQ-103161 
    Call context 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    66 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
    >  The function must be called on task level. 
    Table 5-28   Com_MainFunctionRx 
     
    5.2.28  Com_MainFunctionTx 
    Prototype 
    void Com_MainFunctionTx (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This function shall perform the processing of the transmission activities that are not directly initiated by the 
    calls from the RTE and PDU-R. A call to Com_MainFunctionTx returns simply if COM was not previously 
    initialized with a call to Com_Init. 
    Particularities and Limitations 
    -  CREQ-103168 
    Call context 
    >  The function must be called on task level. 
    Table 5-29   Com_MainFunctionTx 
     
    5.2.29  Com_MainFunctionRouteSignals 
    Prototype 
    void Com_MainFunctionRouteSignals (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    None 
    Functional Description 
    Calls the signal gateway part of COM to forward received signals to be routed. The insertion of this call is 
    necessary for decoupling receive interrupts and signal gateway tasks. A call to 
    Com_MainFunctionRouteSignals returns simply if COM was not previously initialized with a call to 
    Com_Init. 
    Particularities and Limitations 

    Caution 
    The time between to consecutive calls (perhaps the related task/thread cycle) affects directly the 
     
    signal gateway latency.  CREQ-103192 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    67 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Call context 
    >  The function must be called on task level. 
    Table 5-30   Com_MainFunctionRouteSignals 
     
    5.2.30  Com_ReceiveSignal 
    Prototype 
    uint8 Com_ReceiveSignal (Com_SignalIdType SignalId, void *SignalDataPtr) 
    Parameter 
    SignalId  
    Id of signal or group signal to be received. 
    SignalDataPtr  
    Reference to the signal data in which to store the received data. 
    Return code 
    uint8 
    uint8 E_OK service has been accepted COM_SERVICE_NOT_AVAILABLE 
    corresponding I-PDU group was stopped (or service failed due to development 
    error) 
    Functional Description 
    The service Com_ReceiveSignal updates the signal data referenced by SignalDataPtr with the data in the 
    signal object identified by SignalId. If the signal processing of the corresponding I-Pdu is configured to 
    DEFERRED the last received signal value is available not until the next call to Com_MainfunctionRx. If a 
    group signal is read, the data in the shadow buffer should be updated before the call by a call of the service 
    Com_ReceiveSignalGroup. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-31   Com_ReceiveSignal 
     
    5.2.31  Com_ReceiveShadowSignal 
    Prototype 
    uint8 Com_ReceiveShadowSignal (Com_SignalIdType SignalId, void *SignalDataPtr) 
    Parameter 
    SignalId  
    Id of group signal to be received. 
    SignalDataPtr  
    Reference to the group signal data in which to store the received data. 
    Return code 
    uint8 
    void 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    68 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Functional Description 
    The service Com_ReceiveShadowSignal updates the group signal data referenced by SignalDataPtr with 
    the data in the shadow buffer. The data in the shadow buffer should be updated before the call of 
    Com_ReceiveShadowSignal by a call of the service Com_ReceiveSignalGroup. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-32   Com_ReceiveShadowSignal 
     
    5.2.32  Com_UpdateShadowSignal 
    Prototype 
    uint8 Com_UpdateShadowSignal (Com_SignalIdType SignalId, const void 
    *SignalDataPtr) 
    Parameter 
    SignalId  
    ID of group signal to be updated. 
    SignalDataPtr  
    Reference to the group signal data to be updated. 
    Return code 
    uint8 
    void 
    Functional Description 
    The service Com_UpdateShadowSignal updates a group signal with the data, referenced by SignalDataPtr. 
    The update of the group signal data is done in the shadow buffer, not in the I-PDU. To send out the shadow 
    buffer, Com_SendSignalGroup has to be called. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level. 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-33   Com_UpdateShadowSignal 
    5.2.33  Com_InvalidateShadowSignal 
    Prototype 
    uint8 Com_InvalidateShadowSignal (Com_SignalIdType SignalId) 
    Parameter 
    SignalId  
    ID of group signal to be invalidated. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    69 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Return code 
    uint8 
    void 
    Functional Description 
    This function invalidates the group signal by calling Com_SendSignal with the configured invalid value. An 
    additional call to Com_SendSignalGroup is needed to update the signal group data. 
    Particularities and Limitations 

    Call context 
    >  The function can be called on interrupt and task level and has not to be interrupted by other 
    Com_SendSignal and Com_InvalidateSignal calls for the same SignalId. 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-34   Com_InvalidateShadowSignal 
    5.3 
    Services used by COM 
    In the following table services provided by other components, which are used by the COM  
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    PDUR 
    PduR_ComTransmit 
    DET 
    Det_ReportError 
    Application 
    I-PDU Callout 
    RTE/Application 
    Signal and ComSignalGroup configurable 
    callback/notification functions 
    EcuM 
    EcuM_BswErrorHook 
    Table 5-35   Services used by the COM 
    5.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the  COM and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file Com_Cbk.h by the COM. 
    5.4.1 
    Com_RxIndication 
    Prototype 
    void Com_RxIndication (PduIdType RxPduId, const PduInfoType* 
    PduInfoPtr) 
    Parameter 
    RxPduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. Range: 0..(maximum number of I-PDU IDs received by 
    AUTOSAR COM) - 1 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    70 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    PduInfoPtr 
    PduInfoPtr Payload information of the received I-PDU (pointer to data and 
    data length). 
    Return code 
    void 
    none 
    Functional Description 
    This function is called by the lower layer after an I-PDU has been received. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Call Context 
    The function can be called on interrupt and task level. It is not allowed to use CAT1 interrupts with Rte 
    (BSW00326]). Due to this, the interrupt context shall be configured to a CAT2 interrupt if an Rte is used. 
    Table 5-36   Com_RxIndication 
    5.4.2 
    Com_TxConfirmation 
    Prototype 
    void Com_TxConfirmation (PduIdType TxPduId) 
    Parameter 
    TxPduId 
    ID of AUTOSAR COM I-PDU that has been transmitted. Range: 0..(maximum 
    number of I-PDU IDs transmitted by AUTOSAR COM) - 1 
    Return code 
    void 
    none 
    Functional Description 
    This function is called by the lower layer after the PDU has been transmitted on the network. A confirmation 
    that is received for an I-PDU that does not require a confirmation is silently discarded. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Call Context 
    The function can be called on interrupt and task level. It is not allowed to use CAT1 interrupts with Rte 
    (BSW00326]). Due to this, the interrupt context shall be configured to a CAT2 interrupt if an Rte is used. 
    Table 5-37   Com_TxConfirmation 
    5.4.3 
    Com_TriggerTransmit 
    Prototype 
    Std_ReturnType Com_TriggerTransmit (PduIdType TxPduId, PduInfoType 
    *PduInfoPtr) 
    Parameter 
    TxPduId 
    ID of AUTOSAR COM I-PDU that is requested to be transmitted by AUTOSAR 
    COM. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    71 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    PduInfoPtr 
    Contains a pointer to a buffer (SduDataPtr) where the SDU data shall be 
    copied to, and the available buffer size in SduLengh. On return, the service 
    will indicate the length of the copied SDU data in SduLength. 
    Return code 
    Std_ReturnType 
    E_OK: SDU has been copied and SduLength indicates the number of copied 
    bytes. 
    E_NOT_OK: No data has been copied, because Com is not initialized or 
    TxPduId is not valid or PduInfoPtr is NULL_PTR or SduDataPtr is NULL_PTR 
    or SduLength is too small. 
    Functional Description 
    This function is called by the lower layer when an AUTOSAR COM I-PDU shall be transmitted. Within this 
    function, AUTOSAR COM shall copy the contents of its I-PDU transmit buffer to the L-PDU buffer given by 
    SduPtr. Use case: This function is used e.g. by the LIN Master for sending out a LIN frame. In this case, the 
    trigger transmit can be initiated by the Master schedule table itself or a received LIN header. This function 
    is also used by the FlexRay Interface for requesting PDUs to be sent in static part (synchronous to the 
    FlexRay global time). Once the I-PDU has been successfully sent by the lower layer (PDU-Router), the 
    lower layer must call Com_TxConfirmation(). 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Call Context 
    The function can be called on interrupt and task level. It is not allowed to use CAT1 interrupts with Rte 
    (BSW00326]). Due to this, the interrupt context shall be configured to a CAT2 interrupt if an Rte is used. 
    Table 5-38   Com_TriggerTransmit 
    5.4.4 
    Com_TpTxConfirmation 
    Prototype 
    void Com_TpTxConfirmation (PduIdType PduId, Std_ReturnType Result) 
    Parameter 
    PduId 
    ID of the I-PDU that has been transmitted. 
    Result 
    Result of the transmission of the I-PDU 
    Return Code 
    void 
    None. 
    Functional Description 
    This function is called by the PduR after a large I-PDU has been transmitted via the transport protocol on 
    its network. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Pre-Conditions 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-39   Com_TpTxConfirmation 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    72 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
     
    5.4.5 
    Com_CopyTxData 
    Prototype 
    BufReq_ReturnType Com_CopyTxData (PduIdType PduId, PduInfoType 
    *PduInfoPtr, RetryInfoType *RetryInfoPtr, PduLengthType *TxDataCntPtr) 
    Parameter 
    PduId 
    ID of Com TP I-PDU to be transmitted. 
    PduInfoPt 
    Pointer to a PduInfoType, which indicates the number of bytes to be copied 
    (SduLength) and the location where the data have to be copied to 
    (SduDataPtr). An SduLength of 0 is possible in order to poll the available 
    transmit data count. In this case no data are to be copied and SduDataPtr 
    might be invalid. 
    RetryInfoPtr 
    The COM module ignores the value of this pointer, since it always keeps the 
    complete buffer until the transmission of a large I-PDU is either confirmed or 
    aborted. 
    TxDataCntPtr 
    Out parameter: Remaining Tx data after completion of this call. 
    Return Code 
    BufReq_ReturnType 
    BufReq_ReturnType BUFREQ_OK: Data has been copied to the transmit 
    buffer completely as requested. BUFREQ_E_BUSY: The transmission buffer 
    is actually not available (implementation specific). BUFREQ_E_NOT_OK: 
    Data has not been copied. Request failed, in case the corresponding I-PDU 
    was stopped. 
    Functional Description 
    This function is called by the lower layer to copy Data from the Com TP buffer to the lower layer TP buffer. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Pre-Conditions 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-40   Com_CopyTxData 
     
    5.4.6 
    Com_TpRxIndication 
    Prototype 
    void Com_TpRxIndication (PduIdType PduId, Std_ReturnType Result) 
    Parameter 
    PduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. Range: 0..(maximum number of I-PDU IDs received by 
    AUTOSAR COM) - 1 
    Result 
    Indicates whether the Message was received successfully. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    73 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Return Code 
    void 
    none 
    Functional Description 
    This function is called by the lower layer after a TP I-PDU has been received. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Pre-Conditions 
    Call Context 
    The function can be called on interrupt and task level. It is not allowed to use CAT1 interrupts with Rte 
    (BSW00326]). Due to this, the interrupt context shall be configured to a CAT2 interrupt if an Rte is used. 
    Table 5-41   Com_TpRxIndication 
     
    5.4.7 
    Com_StartOfReception 
    Prototype 
    BufReq_ReturnType Com_StartOfReception (PduIdType ComRxPduId, 
    PduInfoType* TpSduInfoPtr, PduLengthType TpSduLength, PduLengthType 
    *RxBufferSizePtr) 
    Parameter 
    ComRxPduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. 
    TpSduInfoPtr 
    Is currently not used by COM. 
    TpSduLength 
    complete length of the TP I-PDU to be received. 
    RxBufferSizePtr 
    The Com returns in this value the remaining TP buffer size to the lower layer. 
    Return Code 
    BufReq_ReturnType 
    BufReq_ReturnType BUFREQ_OK: Connection has been accepted. 
    RxBufferSizePtr indicates the available receive buffer. BUFREQ_E_NOT_OK: 
    Connection has been rejected. RxBufferSizePtr remains unchanged. 
    BUFREQ_E_OVFL: In case the configured buffer size as specified via 
    ComPduIdRef.PduLength is smaller than TpSduLength. BUFREQ_E_BUSY: 
    In case the reception buffer is actually not available for a new reception 
    (implementation specific). 
    Functional Description 
    This function is called by the lower layer to indicate the start of a incomming TP connection. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Pre-Conditions 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-42   Com_StartOfReception 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    74 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
     
    5.4.8 
    Com_CopyRxData 
    Prototype 
    BufReq_ReturnType Com_CopyRxData (PduIdType PduId, const PduInfoType 
    *PduInfoPointer, PduLengthType *RxBufferSizePtr) 
    Parameter 
    PduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. 
    PduInfoPointer 
    Payload information of the received TP segment (pointer to data and data 
    length). 
    RxBufferSizePtr 
    The Com returns in this value the remaining TP buffer size to the lower layer. 
    Return Code 
    BufReq_ReturnType 
    BufReq_ReturnType BUFREQ_OK: Connection has been accepted. 
    RxBufferSizePtr indicates the available receive buffer. BUFREQ_E_NOT_OK: 
    Connection has been rejected. RxBufferSizePtr remains unchanged. 
    BUFREQ_E_OVFL: In case the configured buffer size as specified via 
    ComPduIdRef.PduLength is smaller than TpSduLength. BUFREQ_E_BUSY: 
    In case the reception buffer is actually not available for a new reception 
    (implementation specific). 
    Functional Description 
    This function is called by the lower layer to hand a received TP segment to Com. The Com copies the 
    received segment in his internal tp buffer. 
    Particularities and Limitations 
    The function is called by the lower layer. 
    Pre-Conditions 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-43   Com_CopyRxData 
    5.5 
    Configurable Interfaces 
    5.5.1 
    Notifications 
    At its configurable interfaces the COM defines notifications that can be mapped to callback 
    functions provided by other modules. The mapping is not statically defined by the COM but 
    can be performed at configuration time. The function prototypes that can be used for the 
    configuration  have  to  match  the  appropriate  function  prototype  signatures,  which  are 
    described in the following sub-chapters.  
    5.5.1.1 
    Indication Notification 
    Prototype 
    void [Indication Notification Name] ( void ) 
    Parameter 
    void 
    none 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    75 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Return code 
    void 
    none 
    Functional Description 
    The notification function is called after the message has been received successfully. The function can be 
    configured for signals and signal groups with a configurable function name. 
    Particularities and Limitations 
    >  none 
    Call Context 
    >  The call context depends on the configuration of the parameter ComIPduSignalProcessing for 
    the I-PDU. 
    Table 5-44   Indication Notification 
    5.5.1.2 
    Confirmation Notification 
    Prototype 
    void [Confirmation Notification Name] ( void ) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The notification function is called after successful transmission of the I-PDU containing the message. The 
    function can be configured for signals and signal groups with a configurable function name. 
    Particularities and Limitations 
    >  none 
    Call Context 
    >  The call context depends on the configuration of the parameter ComIPduSignalProcessing for 
    the I-PDU. 
    Table 5-45   Confirmation Notification 
    5.5.1.3 
    Rx Timeout Notification 
    Prototype 
    void [Rx Timeout Notification Name] ( void ) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    76 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Functional Description 
    It is called immediately after a message reception error has been detected by the deadline monitoring 
    mechanism. The function can be configured for signals with a configurable function name. 
    Particularities and Limitations 
    >  none 
    Call Context 
    >  The function is called on task level. 
    Table 5-46   Rx Timeout Notification 
    5.5.1.4 
    Tx Timeout Notification 
    Prototype 
    void [Tx Timeout Notification Name] ( void ) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    It is called immediately after a message transmission error has been detected by the deadline monitoring 
    mechanism. The function can be configured for signals and signal groups with a configurable function 
    name. 
    Particularities and Limitations 
    >  none 
    Call Context 
    >  The function is called on task level. 
    Table 5-47   Tx Timeout Notification 
    5.5.1.5 
    Error Notification 
    Prototype 
    void [Error Notification Name] ( void ) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    It is called immediately for outstanding, not confirmed  transmitted  signals that are contained in I-PDUs 
    that get stopped by a call to Com_IpduGroupControl. 
    Particularities and Limitations 
    >  none 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    77 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Call Context 
    >  The function is in the context of Com_IpduGroupControl. 
    Table 5-48   Error Notification 
    5.5.1.6 
    Invalid Notification 
    Prototype 
    void [Invalid Notification Name] ( void ) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This notification is called, if an invalid value is received and the invalid action is configured to ‘NOTIFY’. 
    Particularities and Limitations 
    >  none 
    Call Context 
    >  The call context depends on the configuration of the parameter ComIPduSignalProcessing for 
    the I-PDU. 
    Table 5-49   Invalid Notification 
    5.5.2 
    Callout Functions 
    At  its  configurable  interfaces  the  COM  defines  callout  functions. The  declarations  of  the 
    callout functions are provided by the BSW module, i.e. the COM. It is the integrator's task 
    to  provide  the  corresponding  function  definitions.  The  definitions  of  the  callouts  can  be 
    adjusted  to  the  system's  needs. The  COM  callout  function  declarations  are  described  in 
    the following tables: 
    5.5.2.1 
    Rx I-Pdu callout function 
    If /MICROSAR/Com/ComGeneral/ComAdvancedIPduCallouts is configured to TRUE, 
    the Rx I-PDU callouts are implemented as specified by AUTOSAR 4.1.1 
    Prototype 
    boolean <IPDU_CalloutName> (PduIdType PduId, const PduInfoType* 
    PduInfoPtr) 
    Parameter 
    PduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. 
    Range: 0..(maximum number of I-PDU IDs received by AUTOSAR COM) - 1 
    PduInfoPtr 
    Contains the length (SduLength) of the received I-PDU and a pointer to a 
    buffer (SduDataPtr) containing the I-PDU. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    78 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Return code 
    boolean 
    The return value indicates whether the processing of this I-PDU shall continue 
    (TRUE) or abandon (FALSE) after the callout returns. 
    Functional Description 
    For each I-PDU a callout function can be configured and the implementation has to be provided by the 
    application. It can be used to extend the COM functionality with application related functions (e.g. CRC or 
    sequence counter calculation).  
    Particularities and Limitations 
    >  In this context, the signal access APIs could not be used to read the signal values, as the 
    internal buffer is not updated yet and the old values are returned. 
    Call Context 
    >  Rx I-PDU Callouts are called by COM directly after Com_RxIndication on task or interrupt 
    level. The call context depends on the configuration of the Driver. 
    Table 5-50   Rx I-PDU Callout with PduInfo pointer 
    If  /MICROSAR/Com/ComGeneral/ComAdvancedIPduCallouts  is  configured  to 
    FALSE, the Rx I-PDU callouts are implemented as specified by AUTOSAR 4.0.3 
    Prototype 
    boolean <IPDU_CalloutName> (PduIdType Id, const uint8* IpduData) 
    Parameter 
    PduId 
    ID of AUTOSAR COM I-PDU that has been received. Identifies the data that 
    has been received. 
    Range: 0..(maximum number of I-PDU IDs received by AUTOSAR COM) - 1 
    IpduData 
    A pointer to the data of the received I-PDU. 
    Return code 
    boolean 
    The return value indicates whether the processing of this I-PDU shall continue 
    (TRUE) or abandon (FALSE) after the callout returns. 
    Functional Description 
    For each I-PDU a callout function can be configured and the implementation has to be provided by the 
    application. It can be used to extend the COM functionality with application related functions (e.g. CRC or 
    sequence counter calculation).  
    Particularities and Limitations 
    >  In this context, the signal access APIs could not be used to read the signal values, as the 
    internal buffer is not updated yet and the old values are returned. 
    Call Context 
    >  Rx I-PDU Callouts are called by COM directly after Com_RxIndication on task or interrupt 
    level. The call context depends on the configuration of the Driver. 
    Table 5-51   Rx I-PDU Callout with data pointer 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    79 
    based on template version 5.6.0 



    Technical Reference MICROSAR COM 
     
     
    Caution 
    If /MICROSAR/Com/ComGeneral/ComAdvancedIPduCallouts is configured to FALSE, 
      the current length of the PDU payload cannot be evaluated within the configured 
    callout.  
     
     
    5.5.2.2 
    Tx I-Pdu callout function 
    If  /MICROSAR/Com/ComGeneral/ComAdvancedIPduCallouts  is  configured  to TRUE,  the 
    Tx I-PDU callouts are implemented as specified by AUTOSAR 4.1.1 
    Prototype 
    boolean <IPDU_CalloutName> (PduIdType PduId, PduInfoType* 
    PduInfoPtr) 
    Parameter 
    PduId 
    ID of AUTOSAR COM I-PDU that should be transmitted. Identifies the data 
    that should be transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by AUTOSAR COM) - 

    PduInfoPtr 
    Contains the length (SduLength) of the I-PDU to be transmitted and a pointer 
    to a buffer (SduDataPtr) containing the I-PDU. 
    Return code 
    boolean 
    The return value indicates whether the processing of this I-PDU shall continue 
    (TRUE) or abandon (FALSE) after the callout returns. 
    Functional Description 
    For each I-PDU a callout function can be configured and the implementation has to be provided by the 
    application. It can be used to extend the COM functionality with application related functions (e.g. CRC or 
    sequence counter calculation).  
    Particularities and Limitations 
    >  In this context the signal access APIs can be used to update the signal values, as these APIs 
    directly updates the internal buffer. If a triggered event is caused by such a call, no additional 
    transmission of the I-PDU is triggered. 
    Call Context 
    >  Tx I-PDU Callouts are called by COM directly before the call of PduR_ComTransmit on task 
    level. 
    >  Tx I-PDU Trigger Transmit Callouts are called by COM in the function Com_TriggerTransmit. 
    The call context depends on the configuration of the lower layer. 
    Table 5-52   Tx I-PDU Callout with PduInfo pointer 
    If /MICROSAR/Com/ComGeneral/ComAdvancedIPduCallouts is configured to FALSE, the 
    Tx I-PDU callouts are implemented as specified by AUTOSAR 4.0.3 
    Prototype 
    boolean <IPDU_CalloutName> (PduIdType Id, uint8* IpduData) 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    80 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    Parameter 
    Id 
    ID of AUTOSAR COM I-PDU that should be transmitted. Identifies the data 
    that should be transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by AUTOSAR COM) - 

    IpduData 
    A pointer to the data of the received I-PDU. 
    Return code 
    boolean 
    The return value indicates whether the processing of this I-PDU shall continue 
    (TRUE) or abandon (FALSE) after the callout returns. 
    Functional Description 
    For each I-PDU a callout function can be configured and the implementation has to be provided by the 
    application. It can be used to extend the COM functionality with application related functions (e.g. CRC or 
    sequence counter calculation).  
    Particularities and Limitations 
    >  In this context the signal access APIs can be used to update the signal values, as these APIs 
    directly updates the internal buffer. If a triggered event is caused by such a call, no additional 
    transmission of the I-PDU is triggered. 
    Call Context 
    >  Tx I-PDU Callouts are called by COM directly before the call of PduR_ComTransmit on task 
    level. 
    >  Tx I-PDU Trigger Transmit Callouts are called by COM in the function Com_TriggerTransmit. 
    The call context depends on the configuration of the lower layer. 
    Table 5-53   Tx I-PDU Callout with data pointer 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    81 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    6  Configuration 
    6.1 
    Configuration of Post-Build 
    The configuration of post-build loadable is described in [5]. 
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    82 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    7  AUTOSAR Standard Compliance 
    7.1 
    Limitations 
    Component Limitations 
    TRUE must be defined to (boolean) 1 
    FALSE must be defined to (boolean) 0 
    NULL_PTR must be defined to ((void *)0) 
     
    Since 8-bit micro controllers are out of scope in AUTOSAR, COM has been optimized for 
    the  usage  on  16-  and  32-bit  controllers.  Therefore  the  target  system  must  be  able  to 
    provide atomic read and write accesses to 16-bit variables. 
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    83 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    CFG5 
    DaVinci Configurator 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 8-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    84 
    based on template version 5.6.0 


    Technical Reference MICROSAR COM 
    9  Contact 
    Visit our website for more information on 
     
      News 
      Products 
      Demo software 
      Support 
      Training data 
      Addresses 
     
    www.vector.com 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.05.00 
    85 
    based on template version 5.6.0 

    Document Outline


    1.3.96 - TechnicalReference_ComStackLib

    MICROSAR ComStackLib

    1.3.98 - TechnicalReference_ComStackLibs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR ComStackLib 
    Technical Reference 
     
    ComStackLib based BSW generators 
    Version 2.01.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Gunnar Meiss 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR ComStackLib 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Gunnar Meiss  2013-03-25  1.00.00  initial version 
    Gunnar Meiss  2013-08-23  1.01.00  ESCAN00068919 Remove 
    <MSN>UseSignedDataTypesInIndexArrays 
    ESCAN00070017 Remove <MSN>_Resource.xml 
    Gunnar Meiss  2014-10-06  2.00.00  ESCAN00078776 AR4-698: Post-Build Selectable 
    (Identity Manager) 
    Gunnar Meiss  2014-12-19  2.00.01  ESCAN00080380 Minor typing and grammar corrections 
    Gunnar Meiss  2016-03-30  2.00.02  ESCAN00089127 Extend MD_CSL_3355_3356 with the 
    aspects of the PRQA Rule 3358 and 3359 
    ESCAN00089126 Support a justification for PRQA Rule 
    310 and PCSymbolicNonDereferenciateablePointers 
    Added chapter Freedom from Interference 
    Gunnar Meiss  2016-07-19  2.00.03  ESCAN00091055 Extend 
    MD_CSL_3355_3356_3358_3359 with the aspects of 
    PRQA Rule 3325 
    Gunnar Meiss  2017-03-24  2.01.00  STORYC-534: <MSN>MinimizeNumericalDataTypes is 
    always enabled 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   Vector 
    Compliance Documentation MISRA-C:2004 / MICROSAR 
    2.2.0 
    Scope of the Document 
    This  technical  reference  describes  the  general  use  of  the  ComStackLib  based  BSW 
    generators. 
     
     
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 
    Architecture Overview ........................................................................................ 8 
    3 
    Functional Description ................................................................................................. 9 
    3.1 
    CONFIG-CLASS of Data .................................................................................. 10 
    3.2 
    CONFIG-CLASS PRE-COMPILE Optimizations .............................................. 10 
    3.2.1 

    Optimize Const Data to Defines ....................................................... 10 
    3.2.2 
    Optimize Bool Data in Structs .......................................................... 11 
    3.2.3 
    Data Deduplication and Reduction ................................................... 12 
    3.2.3.1 
    Equal Data ..................................................................... 13 
    3.2.3.2 
    Unary and Binary Operations ......................................... 14 
    3.2.4 
    Data Streaming ................................................................................ 15 
    3.3 
    CONFIG-CLASS Independent Optimizations ................................................... 16 
    3.3.1 

    Sort Struct Elements ........................................................................ 16 
    3.3.2 
    Optimize Data Types ........................................................................ 17 
    3.4 
    SELECTABLE Optimizations ............................................................................ 18 
    3.4.1 

    Merge of VAR and CONST Based Data ........................................... 18 
    3.5 
    Freedom from Interference .............................................................................. 18 
    4 
    Integration ................................................................................................................... 19 
    4.1 

    Dynamic Files .................................................................................................. 19 
    4.2 
    IMPLEMENTATION-CONFIG-VARIANT dependent Data ................................ 21 
    4.3 
    Optimization Levels .......................................................................................... 22 
    4.4 
    MISRA, PRQA and Compiler Warnings ............................................................ 24 
    4.4.1 

    General ............................................................................................ 24 
    4.4.2 
    Bitfields ............................................................................................ 31 
    4.4.3 
    <MSN>_Has Macros in the SELECTABLE Use Case ...................... 32 
    5 
    Configuration .............................................................................................................. 33 
    5.1 

    Configuration Variants ...................................................................................... 33 
    5.2 
    Configuration with a GCE ................................................................................. 33 
    6 
    Glossary and Abbreviations ...................................................................................... 39 
    6.1 

    Glossary .......................................................................................................... 39 
    6.2 
    Abbreviations ................................................................................................... 40 
    7 
    Contact ........................................................................................................................ 41 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Illustrations 
    Figure 2-1 
    Embedded Code Aspects ........................................................................... 7 
    Figure 2-2 
    AUTOSAR 4.2 Architecture Overview ......................................................... 8 
    Figure 3-1 
    Resources in compiler optimization variants ............................................... 9 
    Figure 3-2 
    Using defines for CONST data .................................................................. 10 
    Figure 3-3 
    Boolean struct data variants ..................................................................... 11 
    Figure 3-4 
    Boolean struct data versus Bitmasking ..................................................... 12 
    Figure 3-5 
    Data deduplication without operations ...................................................... 13 
    Figure 3-6 
    Data deduplication with operations ........................................................... 14 
    Figure 3-7 
    Data Streaming ......................................................................................... 15 
    Figure 3-8 
    Sorting struct elements ............................................................................. 16 
    Figure 3-9 
    Data type minimization ............................................................................. 17 
    Figure 4-1 
    Resources in optimization variants ........................................................... 22 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 4-1  
    Generated files ......................................................................................... 20 
    Table 4-2  
    IMPLEMENTATION-CONFIG-VARIATIONS ............................................. 21 
    Table 4-3  
    Optimization Levels .................................................................................. 22 
    Table 4-4  
    Optimization Decision Table ...................................................................... 23 
    Table 4-5  
    MD_CSL_3199 ......................................................................................... 24 
    Table 4-6  
    MD_CSL_750_759 ................................................................................... 25 
    Table 4-7  
    MD_CSL_0779 ......................................................................................... 26 
    Table 4-8  
    MD_CSL_2018 ......................................................................................... 27 
    Table 4-9  
    MD_CSL_3355_3356_3358_3359_3325 .................................................. 28 
    Table 4-10  
    MD_CSL_3453 ......................................................................................... 29 
    Table 4-11  
    MD_CSL_0310 ......................................................................................... 30 
    Table 4-12  
    /MICROSAR/EcuC/EcucGeneral/BitFieldDataType .................................. 31 
    Table 5-1  
    Container .................................................................................................. 33 
    7Table 5-2  
    Attributes of ComStackLib based BSW generators ................................... 38 
    Table 6-1  
    Glossary ................................................................................................... 39 
    Table 6-2  
    Abbreviations ............................................................................................ 40 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Support of embedded data generation in the 
    IMPLEMENTATION-CONFIG-VARIANT VARIANT-PRE-COMPILE 
    2.00.00 
    Support of the 
    IMPLEMENTATION-CONFIG-VARIANT VARIANT-POST-BUILD-
    LOADABLE 
    3.00.00 
    Revision of existing techniques 
    4.00.00 
    Revision of existing techniques 
    5.00.00 
    AR4-698: Post-Build Selectable (Identity Manager) 
    6.00.00 
    Support VTT 
    7.00.00 
    Support Techniques to ensure Freedom of Interference 
    8.00.00 
    Java 8 
    Table 1-1   Component history 
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    2  Introduction 
    This document describes the configuration of ComStackLib based BSW generators. 
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    PRE-COMPILE [SELECTABLE] 
    POST-BUILD-LOADABLE [SELECTABLE] 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The ComStackLib is an embedded data generation engine designed for AUTOSAR based 
    BSW  software.  Generating  embedded  software  is  situated  in  the  context  of  different 
    aspects. 
     
    Developer
    Customer A
    Customer B
    Size of ROM
    Development costs
    Size of RAM
    Complexity of different
    Size of code
    configuration variants
    Complexity of Features
    Runtime of code
    Compiler implementations
    Readability of code
    and configurations
    Readability of generated
    Hardware
    data
    Maintainability of the BSW
    MISRA conformance
    and code generators
     
    Figure 2-1  Embedded Code Aspects 
    The  number  of  aspects  for  embedded  software  is  quite  high  and  they  have  a  various 
    importance from the view of different stakeholders. Some aspects contradict to each other 
    and  other  aspects  cannot  be  changed  at  the  time  of  the  project.  Due  to  this  the 
    ComStackLib  has  been  introduced  as  scalable  embedded  data  generation  engine 
    designed for AUTOSAR. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    2.1 
    Architecture Overview 
    The  following  figure  shows  where  the  ComStackLib  is  used  in  the  MICROSAR 
    architecture. 
     
    Figure 2-2  AUTOSAR 4.2 Architecture Overview   
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3  Functional Description 
    This chapter gives necessary information for the tailoring of the MICROSAR ComStackLib 
    based software into your environment. Figure 3-1  Resources  in  compiler  optimization 
    variants  
    shows  the  resource  consumption  of  two  different  ECUs  combined  with  different 
    compiler optimization levels. The compiler is not able to influence the size of CONST and 
    VAR data. The embedded software developer is in charge to reduce the CONST and VAR 
    data consumption. 
    25000
    20000
    CanLin CONST
    15000
    CanLin VAR
    CanLin CODE
    10000
    FrLin CONST
    FrLin VAR
    FrLin CODE
    5000
    0
    /Od (Disable
    /O1 (Minimize Size)
    /O2 (Maximize
    /Ox (Full
    (Debug))
    Speed)
    Optimization)
     
    Figure 3-1  Resources in compiler optimization variants 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 

    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.1 
    CONFIG-CLASS of Data 
    The code generator has an internal knowledge of the required CONFIG-CLASS. Due to 
    this data can be moved dependent on the IMPLEMENTATION-CONFIG-VARIANT. See 
    chapter 4.2 IMPLEMENTATION-CONFIG-VARIANT dependent Data. 
    3.2 
    CONFIG-CLASS PRE-COMPILE Optimizations 
    3.2.1 
    Optimize Const Data to Defines 
    Set 
    the 
    configuration 
    parameters 
    <MSN>OptimizeConstVars2Define 
    and 
    <MSN>OptimizeConstArrays2Define  to  TRUE  to  optimize  automatically  CONST  data  in 
    the  CONFIG-CLASS PRE-COMPILE to a define. 
    25000
    12,00%
    10,00%
    20000
    8,00%
    CanLin %
    15000
    FrLin %
    6,00%
    CanLin Off
    CanLin On
    10000
    FrLin Off
    4,00%
    FrLin On
    5000
    2,00%
    0
    0,00%
    CONST
    VAR
    CODE
      
    Figure 3-2  Using defines for CONST data 
    The  optimization  effect  depends on  the  available  configuration  data.  CONST and  CODE 
    size in the ECU can be reduced. 
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    10 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.2.2 
    Optimize Bool Data in Structs 
    Boolean  data  can  be  represented  differently  in  C  structs.  Due  to  this,  the  generation  of 
    boolean  data  can  be  configured  with  <MSN>StructBoolDataUsage  as  BOOLEAN, 
    BITFIELD and BITMASKING. There is nearly no difference between the usage of different 
    bit data types. 
    25000
    20000
    15000
    CanLin CONST
    10000
    CanLin VAR
    CanLin CODE
    5000
    FrLin CONST
    0
    FrLin VAR
    FrLin CODE
     
    Figure 3-3  Boolean struct data variants 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    11 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    25000
    25,00%
    20000
    20,00%
    CanLin %
    15000
    15,00%
    FrLin %
    CanLin Off
    CanLin On
    10000
    10,00%
    FrLin Off
    FrLin On
    5000
    5,00%
    0
    0,00%
    CONST
    VAR
    CODE
      
    Figure 3-4  Boolean struct data versus Bitmasking 
    The usage of BITMASKING reduces the CONST  size. The increase of the CODE size is 
    so tiny, that it can be omitted. 
    3.2.3 
    Data Deduplication and Reduction 
    Data  deduplication  and  reduction  is  a  typical  way  to  reduce  the  amount  of  data.  The 
    ComStackLib  provides  generic  algorithms  which  implement  typical  data  deduplication 
    mechanisms. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    12 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.2.3.1 
    Equal Data 
    Identical data can be deduplicated by redirection of the data access to other data. There is 
    no influence to the runtime of the embedded software. 
    25000
    14%
    12%
    20000
    10%
    CanLin %
    15000
    8%
    FrLin %
    CanLin Off
    6%
    CanLin On
    10000
    FrLin Off
    4%
    FrLin On
    5000
    2%
    0
    0%
    CONST
    VAR
    CODE
     
    Figure 3-5  Data deduplication without operations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    13 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.2.3.2 
    Unary and Binary Operations 
    Data can be reduced by using unary operations or operations on constants or operations 
    on other data elements. The operations are located in the data access layer. Due to this, 
    the code itself remains as implemented. This reduction has influence to the runtime of the 
    embedded software. 
    25000
    35%
    30%
    20000
    25%
    CanLin %
    15000
    20%
    FrLin %
    CanLin Off
    15%
    CanLin On
    10000
    FrLin Off
    10%
    FrLin On
    5000
    5%
    0
    0%
    CONST
    VAR
    CODE
     
    Figure 3-6  Data deduplication with operations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    14 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.2.4 
    Data Streaming 
    Data can be packed into multiple streams of basic data types and identical parts can be 
    overlapped with and without data offsets. The data access layer redirects to the dependent 
    data index. There is no influence to the runtime of  the embedded software,  but the data 
    compression rate is quite high in large configurations and complex modules containing lots 
    of data. 
    25000
    40,00%
    35,00%
    20000
    30,00%
    25,00%
    CanLin %
    15000
    FrLin %
    20,00%
    CanLin Off
    CanLin On
    10000
    15,00%
    FrLin Off
    FrLin On
    10,00%
    5000
    5,00%
    0
    0,00%
    CONST
    VAR
    CODE
      
    Figure 3-7  Data Streaming 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    15 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.3 
    CONFIG-CLASS Independent Optimizations 
    3.3.1 
    Sort Struct Elements 
    C  structs  are  always  sorted  depending  on  the  size  of  an  element  data  type.  Sorting 
    structure  elements  reduces  the  number  of  padding bytes  added  by  the  compiler to align 
    the data. 
    25000
    7,00%
    6,00%
    20000
    5,00%
    CanLin %
    15000
    4,00%
    FrLin %
    CanLin Off
    3,00%
    CanLin On
    10000
    FrLin Off
    FrLin On
    2,00%
    5000
    1,00%
    0
    0,00%
    CONST
    VAR
    CODE
     
    Figure 3-8  Sorting struct elements 
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    16 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    3.3.2 
    Optimize Data Types 
    Every generated data element generated with the ComStackLib has an own C data type. 
    Due to this, the data type itself can be calculated automatically as small as possible based 
    on the used values. 
    25000
    50,00%
    40,00%
    20000
    30,00%
    CanLin %
    15000
    FrLin %
    20,00%
    CanLin Off
    CanLin On
    10000
    FrLin Off
    10,00%
    FrLin On
    5000
    0,00%
    0
    -10,00%
    CONST
    VAR
    CODE
      
    Figure 3-9  Data type minimization 
    The usage of data type minimization saves CONST, VAR and CODE size. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    17 
    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    3.4 
    SELECTABLE Optimizations 
    If  the  configuration  variant  is  SELECTABLE  based  the  following  optimizations  are 
    automatically performed. 
    3.4.1 
    Merge of VAR and CONST Based Data 
    All VAR based generated data is merged between different predefined variants. 
     
     
    Example 
     
      A predefined variant LEFT_ECU needs a VAR based array of the type uint8 with 10 
    elements and predefined variant RIGHT_ECU needs a VAR based array of the type 
    uint8 with 6 elements in the same context. The result is a variant independent 
    generated VAR based array of the type uint8 with 10 elements. 
     
     
     
    Due to this, if the BSW configuration data is identical in different predefined variants, the 
    module configuration is completely merged. 
     
    3.5 
    Freedom from Interference 
    The generated data elements are  wrapped by the generated data access. Writing out of 
    bounds in VAR arrays is a typically trap in software programming. To avoid overriding other 
    variables,  there  are  two  safety  strategies  implemented.  The  strategy  can  be  configured 
    with  <MSN>OutOfBoundsWriteProtectionStrategy  globally  for  the  data  access  macros. 
    The component developer can deactivate the strategy for a single VAR array individually if 
    interference freeness does not rely on an out of bounds protection strategy. 
    >  Index checking: the data access checks the used index against the generator known 
    size and values are not manipulated if the index value is out of bounds problem. 
    >  Index saturation: VAR arrays are blown up to the next 2 n size and the used index is 
    saturated by a mask value. Due to this, there is no out of bounds problem, but values 
    in other indexes can be manipulated. 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    18 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR 
    ComStackLib based software into an application environment of an ECU. 
    4.1 
    Dynamic Files 
    The dynamic files are generated by the configuration tool  CFG5 for ComStackLib  based 
    BSW software. 
    File Name 
    Description 
    <MSN>_Cfg.h 
    This file contains: 
    >  global constant macros 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS PRE-COMPILE data. 
    <MSN>_Cfg.c 
    This file is generated dependent on the used code generator for 
    compatibility reasons and contains if generated: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS PRE-COMPILE data.  
    <MSN>_Lcfg.h 
    This file contains: 
    >  global constant macros 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS LINK data. 
    <MSN>_Lcfg.c 
    This file contains: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS LINK and PRE-COMPILE data if the <MSN>_Cfg.c is 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    19 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    File Name 
    Description 
    not generated. 
    <MSN>_PBcfg.h 
    This file contains: 
    >  global constant macros 
    >  global function macros 
    >  global data types and structures 
    >  global data prototypes 
    >  global function prototypes 
    of CONFIG-CLASS POST-BUILD data. 
    <MSN>_PBcfg.c 
    This file contains: 
    >  local constant macros 
    >  local function macros 
    >  local data types and structures 
    >  local data prototypes 
    >  local data 
    >  global data 
    of CONFIG-CLASS POST-BUILD data. 
    <MSN>_XMI21.xml 
    This file is a XMI file to visualize data relations e.g. in Enterprise Architect.  
    The file is used for development purposes at Vector and informational for 
    the customer. 
    Table 4-1   Generated files 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    20 
    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    4.2 
    IMPLEMENTATION-CONFIG-VARIANT dependent Data 
    The  CONFIG-CLASS of  generated  data depends on  the  configured  IMPLEMENTATION-
    CONFIG-VARIANT  and  the  IMPLEMENTATION-CONFIG-CLASSES  described  in  the 
    <MSN>_bswmd.arxml. 
     
     
    Expert Knowledge 
    If the generated data is in a C struct and the struct contains pre-compile and postbuild 
      changeable data, the data nature is postbuild. 
     
     
     
    IMPLEMENTATION-
    Description 
    CONFIG-VARIANT 
    VARIANT-PRE-
    >  All generated data is of CONFIG-CLASS PRE-COMPILE and generated 
    COMPILE 
    into <MSN>_Cfg.c or <MSN>_Lcfg.c (if <MSN>_Cfg.c does not exist).  
    [SELECTABLE] 
    >  CONFIG-CLASS LINK and POST-BUILD data does not exist. 
    VARIANT-LINK-TIME 
    >  CONFIG-CLASS PRE-COMPILE data and is generated into 
    <MSN>_Cfg.c or <MSN>_Lcfg.c(if <MSN>_Cfg.c does not exist). 
    >  CONFIG-CLASS LINK data and is generated into <MSN>_Lcfg.c. 
    >  CONFIG-CLASS POST-BUILD data changeable data does not exist. 
    VARIANT-POST-
    >  CONFIG-CLASS PRE-COMPILE data and is generated into 
    BUILD-LOADABLE 
    <MSN>_Cfg.c or <MSN>_Lcfg.c(if <MSN>_Cfg.c does not exist). 
    [SELECTABLE] 
    >  CONFIG-CLASS LINK data and is generated into <MSN>_Lcfg.c. 
    >  CONFIG-CLASS POST-BUILD data and is generated into 
    <MSN>_PBcfg.c. 
    Table 4-2   IMPLEMENTATION-CONFIG-VARIATIONS 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    21 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    4.3 
    Optimization Levels 
    This  chapter  describes  optimization  levels  and  their  configuration.  Use  Table  4-3 
     

    Optimization Levels and Table 4-4   Optimization  Decision  Table  to  tailor  your 
    configuration. 
    Optimization 
    Description 
    Small (Default) 
    The data is reduced by operations and not packed into a data stream. 
    Fast 
    The data is not reduced by operations and not packed into a data stream. 
    Tiny 
    The data is not reduced by operations and packed into a data stream. 
    Teeny-weeny 
    The data is reduced by operations and packed into a data stream. 
    Table 4-3   Optimization Levels 
    25000
    20000
    CanLin CONST
    15000
    CanLin VAR
    CanLin CODE
    FrLin CONST
    10000
    FrLin VAR
    FrLin CODE
    5000
    0
    Off
    Default
    Fast
    Tiny
    Teeny Weeny
     
    Figure 4-1  Resources in optimization variants 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    22 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
     
    Optimization Level 
    t) 
     
    ul

     
    Defa
    ween
     
     (l
    -

     
    ny
    Parameter 
    ma
    as
    nyi
    S
    F
    T
    eeT
    DEDUPLICATE_ DEDUPLICATE_ DEDUPLICATE_ DEDUPLICATE_
    <MSN>ConstDataDeduplication 
    CONST_DATA_
    CONST_DATA_
    CONST_DATA_
    CONST_DATA_
    WITH_CAST 
    WITH_CAST 
    WITH_CAST 
    WITH_CAST 
    <MSN>OptimizeConstArrays2Defi
    TRUE 
    TRUE 
    TRUE 
    TRUE 
    ne 
    <MSN>OptimizeConstVars2Define 
    TRUE 
    TRUE 
    TRUE 
    TRUE 
    <MSN>StructBoolDataUsage 
    BITMASKING 
    BOOLEAN 
    BOOLEAN 
    BITMASKING 
    <MSN>DeduplicateZero2NIndirect
    TRUE 
    TRUE 
    TRUE 
    TRUE 
    edData 
    <MSN>ReduceBoolDataByNegati




    onThreshold 
    <MSN>ReduceNumericalDataByO




    ffsetThreshold 
    <MSN>ReduceBoolDataByNumeri




    calComparisonThreshold 
    <MSN>ReduceNumericalDataByA




    rraySubtractionThreshold 
    <MSN>DeduplicateBoolDataByNu




    mericalComparision 
    <MSN>UseSignedDataTypesInInd
    FALSE 
    FALSE 
    FALSE 
    FALSE 
    exArrays 
    <MSN>ReduceDataByStreaming 
    FALSE 
    FALSE 
    TRUE 
    TRUE 
    Table 4-4   Optimization Decision Table 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    23 
    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    4.4 
    MISRA, PRQA and Compiler Warnings 
    The  MICROSAR  code  is  in  the  most  cases  a  piece  of  hand  written  static  code  and 
    generated  data  and  code  for  different  compilers.  This  combination  of  hand  written  and 
    generated  code  can  produce  MISRA  deviations  or  compiler  warnings.  This  chapter 
    extends [1].  
    4.4.1 
    General 
     
     
    Note 
    The ComStackLib switch <MSN>OptimizeConstArrays2Define may produce compiler 
      warnings. If you don’t trust your compiler or your project settings do not allow the usage 
    of compiler warnings, configure <MSN>OptimizeConstArrays2Define to false. 
     
     
    Deviation ID 
    MD_CSL_3199 
    Violated rule 
    PRQA Redundancy 3199 (The value of '%s' is never used following this 
    assignment.) 
    Reason 
    The parameter /MICROSAR/EcuC/EcucGeneral/DummyStatement is 
    configured to TRUE to avoid the compiler warning about unused function 
    parameters. 
    If the function is an interface to other modules and the prototype is specified by 
    a standard, the prototype cannot be changed. 
    If the function is not defined by a standard, the parameter could be removed in 
    the implementation. The disadvantage is that the code itself is stuffed with 
    preprocessor statements and the number variations of the software are 
    exploding. Due to this, the code will not be changed. 
    Potential risks 
    The function contains unused code. 
    Prevention of risks  Configure the parameter /MICROSAR/EcuC/EcucGeneral/DummyStatement to 
    FALSE and accept the compiler warning about unused function parameters. 
    OR 
    The code inspection is in charge to detect unused code.  
    Examples 
    #define MSN_PROCESS_DATA          STD_OFF  
    #define MSN_USE_DUMMY_STATEMENT   STD_ON 
     
    void Msn_foo(uint8 a) 

    #if (MSN_PROCESS_DATA == STD_ON) 
      /* some code which uses the parameter a */ 
    #endif 
    #if (MSN_USE_DUMMY_STATEMENT == STD_ON) 
    # if (MSN_PROCESS_DATA == STD_OFF) 
      a=a; 
    # endif 
    #endif 

    Table 4-5   MD_CSL_3199 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    24 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_750_759 
    Violated rule 
    Rule 18.4 (Unions shall not be used.) 
    Reason 
    Generated data uses array and symbol based data access. The embedded 
    code itself uses only one access type. Due to this critical runtime effects do not 
    occur. 
    Potential risks 
    The A2L data may not match to the real data. 
    Prevention of risks  Each delivery is integrated and tested on the real target system. 
    Examples 
    /* symbolic data access for A2L */ 
    typedef struct sMsn_FooDataStructType 

      boolean indexA; 
      boolean indexB; 
    } Msn_FooDataStructType; 
     
    /* union data type to have array and symbolic data 
    access */ 
    typedef union uMsn_FooDataType 

      boolean raw[2]; /**< this element is used for array 
    based data access from the embedded code */ 
      Msn_FooDataStructType str; /**< this element is 
    used for symbolic based data access from A2L */ 
    } Msn_FooDataUType; 
     
    /* this variable array uses the union data type */ 
    Msn_FooDataUType msn_FooData;  
    Table 4-6   MD_CSL_750_759 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    25 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_0779 
    Violated rule 
    Rule 5.1 (Identifiers (internal and external) shall not rely on the significance of 
    more than 31 characters.) 
    Reason 
    Generated symbols may exceed the 31 character limitation, because the code 
    generator concatenates strings based on fixed rules. 
    Potential risks 
    The linker or compiler may mismatch symbols. 
    Prevention of risks  Modern compilers for AUTOSAR platforms do not have this limitation any 
    more. 
    Examples 
    #if (MSN_DEFRXSIGGRPINFOENDIDXOFDEFRXPDUINFO == STD_ON) 

      Msn_DefRxSigGrpInfoEndIdxOfDefRxPduInfoType idxRxSigGrpInfo = 
      Msn_GetDefRxSigGrpInfoStartIdxOfDefRxPduInfo(idxRxPduInfo); 
      /* some code */ 
    #endif 
    Table 4-7   MD_CSL_0779 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    26 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_2018 
    Violated rule 
    Rule 14.1 (This switch default label is unreachable.) 
    Reason 
    The parameter <MSN>OptimizeConstArrays2Define is configured to TRUE. 
    Potential risks 
    The default case of the switch statement contains possibly dead code. 
    Prevention of risks  The code inspection is in charge to detect useless conditions with possibly 
    dead code. 
    Examples 
    #define MSN_PROCESS_DATA          STD_ON  
    #define MSN_CASE_SMALL            5 
    #define MSN_CASE_MEDIUM           8 
    #define MSN_CASE_LARGE            12 
    #define MSN_CASE_SMALL_USED       FALSE 
    #define MSN_CASE_MEDIUM_USED      TRUE 
    #define MSN_CASE_LARGE            FALSE 
     
    /* this array is reduced to a constant define 
    const uint8 msn_FooData [2] = 

      MSN_CASE_MEDIUM, 
      MSN_CASE_MEDIUM 
    }; 
    */ 
    #define Msn_GetFooData (Index)      MSN_CASE_MEDIUM 
     
    void Msn_foo(uint8 a) 

    #if (MSN_PROCESS_DATA == STD_ON) 
      switch(Msn_GetFooData(a)) 
      { 
    #if (MSN_CASE_SMALL_USED == STD_ON) 
        case MSN_CASE_SMALL: 
          /* some MSN_CASE_SMALL code */ 
          break; 
    #endif 
    #if (MSN_CASE_MEDIUM_USED == STD_ON) 
        case MSN_CASE_MEDIUM: 
          /* some MSN_CASE_MEDIUM code */ 
          break; 
    #endif 
    #if (MSN_CASE_LARGE_USED == STD_ON) 
        case MSN_CASE_LARGE: 
          /* some MSN_CASE_LARGE code */ 
          break; 
    #endif 
        default: 
          /* some default handling like calling Det */ 
      } 
    #endif 

    Table 4-8   MD_CSL_2018 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    27 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_3355_3356_3358_3359_3325 
    Violated rule 
    Rule 13.7 (The result of this logical operation or control expression is always 
    'false' or ‘true’) 
    Reason 
    The parameter <MSN>OptimizeConstArrays2Define is configured to TRUE. 
    Potential risks 
    The function contains useless conditions with possibly dead code. 
    Prevention of risks  The code inspection is in charge to detect useless conditions with possibly 
    dead code. 
    Examples 
    #define MSN_PROCESS_DATA          STD_ON  
     
    /* this array is reduced to a define 
    const boolean msn_FooData [2] = 

      TRUE, 
      TRUE 
    }; 
    */ 
    #define Msn_IsFooData (Index)      TRUE 
     
    void Msn_foo(uint8 a) 

    #if (MSN_PROCESS_DATA == STD_ON) 
      if(Msn_IsFooData(a)) 
      { 
        /* some code */ 
      } 
    #endif 

    Table 4-9   MD_CSL_3355_3356_3358_3359_3325 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    28 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_3453 
    Violated rule 
    Rule 19.7 (A function should be used in preference to a function-like macro.) 
    Reason 
    ComStackLib based modules use macros to access generated RAM and ROM 
    data. The implementation of data access functions would cause much code 
    and runtime. 
    Potential risks 
    Resulting code is difficult to understand or may not work as expected. 
    Prevention of risks  Code inspection and test of the different variants in the component test. 
    Examples 
    #define MSN_PROCESS_DATA          STD_ON  
     
    /* this array is accessed by a generated data access 
    macro */ 
    const boolean msn_FooData [2] = 

      TRUE, 
      TRUE 
    }; 
     
    #define Msn_IsFooData (Index)   msn_FooData[Index] 
     
    void Msn_foo(uint8 a) 

    #if (MSN_PROCESS_DATA == STD_ON) 
      if(Msn_IsFooData(a)) 
      { 
        /* some code */ 
      } 
    #endif 

    Table 4-10   MD_CSL_3453 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    29 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Deviation ID 
    MD_CSL_310 
    Violated rule 
    Rule 11.4 (A cast should not be performed between a pointer to object type 
    and a different pointer to object type.) 
    Reason 
    The  parameter  <MSN>OptimizeConstArrays2Define  is  configured  to  TRUE 
    AND  the  module  configuration  variant  is  PRE-COMPILE  or  POST-BUILD-
    LOADABLE SELECTABLE.  
    The values behind a symbol are reduced to a constant define, but a non 
    NULL_PTR is needed to identify the usage of the values in the source code. 
    Due to this the module root symbol is used. 
    Potential risks 
    The compiler and MISRA warns about the cast of different pointer types. 
    Prevention of risks  The code uses the generated macros to access data values and does not 
    touch the pointers. 
    Examples 
    #define Msn_GetFoo(Index)     1U 
    #define Msn_HasFoo ()         (Msn_ConfigDataPtr->FooPtrOfPCConfig != NULL_PTR) 
    #define Msn_Foo               ((Msn_FooPtrType)(&(Msn_PCConfig))) 
     
    CONST(Msn_PCConfigsType, MSN_CONST) Msn_PCConfig = { 
      { /* Index: 0 Keys: [Config_LeftFront] */ 
          Msn_Foo  /**< the pointer to Msn_Foo */  /* PRQA S 0310 */  /* MD_CSL_310 
    */ 
        , 5U                  /**< the number of elements in Msn_Foo */ 
      }, 
      { /* Index: 1 Keys: [Config_RightFront] */ 
          NULL_PTR            /**< the pointer to Msn_Foo */ 
        , 0U                  /**< the number of elements in Msn_Foo */ 
      } 
    }; 
    Table 4-11   MD_CSL_0310 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    30 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    4.4.2 
    Bitfields 
    The  data  type  of  bit  fields  is  configurable  in  the  EcuC  module  and  important  if 
    <MSN>StructBoolDataUsage  is  configured  to  BITFIELD.  According  to  Table  4-12 
     

    /MICROSAR/EcuC/EcucGeneral/BitFieldDataType the usage of UNSIGNED_INT is the 
    best choice, but for some compilers the usage of UNSIGNED_CHAR is for some reasons 
    required and you want to live with the MISRA violations. 
    BitFieldDataType 
    Description 
    Literal 
    INT 
      does typically not produce a compiler warning 
      violates 
    MISRA Rule 6.4 Bit fields shall only be defined to be of type unsigned int or 
    signed int. 
    MISRA Rule 6.5   Bit fields of type signed int shall be at least 2 bits long. 
    MISRA Rule 10.1  The value of an expression of integer type shall not be 
    implicitly converted to a different underlying type if: a) it is not a conversion to a 
    wider integer type of the same signedness, or b) the expression is complex, or 
    c) the expression is not constant and is a function argument, or d) the 
    expression is not constant and is a return expression (if TRUE is assigned to 
    the value as initializer) 
    UNSIGNED_INT 
      does typically not produce a compiler warning 
      violates no MISRA Rule 
    UNSIGNED_CHAR 
      does typically produce a compiler warning like warning C4214: nonstandard 
    extension used : bit field types other than int 
      violates MISRA Rule 6.4 Bit fields shall only be defined to be of type unsigned 
    int or signed int. 
    UNSIGNED_SHORT    does typically produce a compiler warning like warning C4214: nonstandard 
    extension used : bit field types other than int 
      violates MISRA Rule 6.4 Bit fields shall only be defined to be of type unsigned 
    int or signed int. 
    Table 4-12   /MICROSAR/EcuC/EcucGeneral/BitFieldDataType 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    31 
    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    4.4.3 
    <MSN>_Has Macros in the SELECTABLE Use Case 
    The  usage  of  <MSN>_Has*  macros  produces  in  the  SELECTABLE  use  case  compiler 
    warnings like “The result of this logical operation is always 'false' or ‘true’”. This compiler 
    warning  is  up  to  now  acceptable  because  the  compiler  detects  automatically  the  case 
    where the “if” condition is not needed and removes automatically the runtime consuming if 
    condition. A typical use case is described in the following example code. 
     
     
    Example 
    The generated CONST or VAR data element accesses by Msn_GetFooData() is 
      needed in all predefined variants. Due to this, the generated Msn_HasFooData() 
    macro is always true and the compiler warning occurs. 
     
    #define MSN_USE_INIT_POINTER          STD_ON  
     
    #define Msn_HasFooData()              TRUE 
     
    void Msn_foo(uint8 a) 

    #if (MSN_USE_INIT_POINTER == STD_ON) 
      if(Msn_HasFooData()) 
    #endif 
      { 
        /* some code and process Msn_GetFooData() */ 
      } 

     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    32 
    based on template version 5.5.0 



    Technical Reference MICROSAR ComStackLib 
    5  Configuration 
    ComStackLib  based  BSW  generators  can  be  configured  according  with  CFG5.  For  a 
    detailed description see 5.2. 
    5.1 
    Configuration Variants 
    The  configuration  classes  of  ComStackLib  based  BSW  generators  depend  on  the 
    supported  configuration  variants.  For  their  definitions  please  see  the  BSW  specific 
    <MSN>_bswmd.arxml file. 
    5.2 
    Configuration with a GCE 
     
     
     
    Note 
    The configuration parameters, their multiplicity and default values depend on the BSW 
      module. For their definitions please see the BSW specific <MSN>_bswmd.arxml file. 
     
     
     
    Container Name 
    <MSN>General 
    Path 
    \MICROSAR\<MSN>\<MSN>General 
    Multiplicity 
    1..1 
    Description 
    The general configuration container of the ComStackLib based BSW 
    configuration 
    Table 5-1   Container  
     
    Attribute Name 
    Value 
    Description 
    Type 
    <MSN>OutOfBound ENUM 
    This parameter is used to configure a strategy to protect the code to 
    sWriteProtectionStra
    write out of bounds. 
    tegy 
     
    NONE: no protection strategy is generated in the data access. 
    INDEX_SATURATION: arrays are blown up and the data access index 
    is saturated by an appropriate mask. The advantage is the speed of the 
    data access, but own data elements at other indexes of the same 
    variable can be overridden. 
    INDEX_CHECKING: the data access index is validated by a runtime 
    check. The advantage is that values are never written to incorrect 
    indexes of the data access. 
    <MSN>OutOfBound BOOL 
    This parameter activates/deactivates the generation of runtime checks 
    sWriteSanitizer 
    which call a DET error notification function to find easily out of bounds 
    write problems. 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    33 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Attribute Name 
    Value 
    Description 
    Type 
    This debugging feature must not be used in production code! 
    FALSE:  no checks are generated in the data access. 
    TRUE: the data access is enriched with DET checks to validate 
    indexes. 
    <MSN>OutOfBound BOOL 
    This parameter activates/deactivates the generation of runtime checks 
    sReadSanitizer 
    which call a DET error notification function to find easily out of bounds 
    read problems. 
    The debugging feature must not be used in production code! 
    FALSE:  no checks are generated in the data access. 
    TRUE: the data access is enriched with DET checks to validate 
    indexes. 
    <MSN>ConstDataD ENUM 
    This parameter is used to deduplicate CONFIG-CLASS PRE-COMPILE  
    eduplication 
    ROM data. 
     
    NONE: The generated data is not deduplicated. 
     
    DEDUPLICATE_CONST_DATA_WITHOUT_CAST: The data is 
    deduplicated without using casts. 
    Code: no change expected. 
    RAM: no change expected. 
    ROM: the ROM size can be minimized. 
    Runtime: no change expected. 
     
    DEDUPLICATE_CONST_DATA_WITH_CAST: The data is deduplicated 
    using casts. 
    Code: no change expected. 
    RAM: no change expected. 
    ROM: the ROM size can be minimized more than in 
    DEDUPLICATE_CONST_DATA_WITHOUT_CAST. 
    Runtime: no change expected. 
    <MSN>OptimizeCon BOOL 
    This parameter activates/deactivates the capability to generate 
    stArrays2Define 
    CONFIG-CLASS PRE-COMPILE ROM arrays as constant define. 
     
    TRUE: ROM arrays are generated as constant define if all values are 
    identical. 
    Code: the code size is smaller. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased. 
     
    FALSE: ROM arrays are generated as data even if all values are 
    identical. 
    <MSN>OptimizeCon BOOL 
    This parameter activates/deactivates the capability to generate 
    stVars2Define 
    CONFIG-CLASS PRE-COMPILE ROM constants as constant define. 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    34 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Attribute Name 
    Value 
    Description 
    Type 
     
    TRUE: ROM constants are generated as constant define. 
    Code: the code size is smaller. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased. 
     
    FALSE: ROM constants are always generated as data. 
    <MSN>StructBoolD
    ENUM 
    This parameter is used to tailor the usage of boolean data in structures 
    ataUsage 
    in all CONFIG-CLASSES. The difference between BITFIELD and 
    BITMASKING depends on your compiler options and memory mapping. 
     
    BOOLEAN: The datatype of boolean data is native boolean. 
    Code: the code size is small. 
    RAM: no change expected. 
    ROM: the ROM size is large. 
    Runtime: the runtime is fast. 
     
    BITFIELD: The bitfield type is used and the compiler extracts the 
    boolean data from structures. 
    Code: the code size is larger than using BOOLEAN. 
    RAM: no change expected. 
    ROM: the ROM size is smaller than using BOOLEAN. 
    Runtime: the runtime is larger than using BOOLEAN. 
     
    BITMASKING: Generated Masks are used to extract the boolean data 
    from structures. 
    Code: the code size is larger than using BOOLEAN. 
    RAM: no change expected. 
    ROM: the ROM size is smaller than using BOOLEAN. 
    Runtime: the runtime is larger than using BOOLEAN. 
    <MSN>Deduplicate
    BOOL 
    This parameter activates/deactivates the capability to compress 0:N 
    Zero2NIndirectedDa
    relational ROM data in all CONFIG-CLASSES without increasing the 
    ta 
    runtime. 
    This option can be used in lib builds and in postbuild configurations. 
     
    TRUE: 0:N relational ROM data is compressed without decreasing the 
    runtime. 
    Code: no change expected. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: no change expected. 
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    35 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Attribute Name 
    Value 
    Description 
    Type 
    FALSE: 0:N relational ROM data is not compressed. 
    <MSN>ReduceBool INT 
    This parameter activates/deactivates the capability to compress 
    DataByNegationThr
    boolean CONFIG-CLASS PRE-COMPILE ROM data by using the 
    eshold 
    negation operator. 
    0: The optimization is not performed. 
    >0: This is the threshold to activate the data optimization. 
     
    Code: the code size is increased due to the usage of the negation 
    operator in the data access. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased due to the usage of the negation 
    operator in the data access. 
    <MSN>ReduceNum INT 
    This parameter activates/deactivates the capability to compress 
    ericalDataByOffsetT
    numerical CONFIG-CLASS PRE-COMPILE ROM data by using a 
    hreshold 
    constant offset. 
    0: The optimization is not performed. 
    >0: This is the threshold to activate the data optimization. 
     
    Code: the code size is increased due to the usage of the constant offset 
    operation in the data access. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased due to the usage of the constant 
    offset operation in the data access. 
    <MSN>ReduceBool INT 
    This parameter activates/deactivates the capability to compress 
    DataByNumericalCo
    boolean CONFIG-CLASS PRE-COMPILE ROM data by using 
    mparisonThreshold 
    comparison with other ROM data. 
    0: The optimization is not performed.  
    >0: This is the threshold to activate the data optimization. 
     
    Code: the code size is increased due to the usage of the operation in 
    the data access. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased due to the usage of the operation in 
    the data access. 
    <MSN>ReduceBool INT 
    This parameter activates/deactivates the capability to compress 
    DataByNumericalRe
    boolean CONFIG-CLASS PRE-COMPILE ROM data by using relational 
    lationThreshold 
    comparison with other ROM data. 
    0: The optimization is not performed. 
    >0: This is the threshold to activate the data optimization. 
     
    Code: the code size is increased due to the usage of the operation in 
    the data access. 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    36 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Attribute Name 
    Value 
    Description 
    Type 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased due to the usage of the operation in 
    the data access. 
    <MSN>ReduceNum INT 
    This parameter activates/deactivates the capability to compress 
    ericalDataByArrayS
    numerical CONFIG-CLASS PRE-COMPILE ROM data by using a 
    ubtractionThreshold 
    subtraction with other ROM data. 
    0: The optimization is not performed.  
    >0: This is the threshold to activate the data optimization. 
     
    Code: the code size is increased due to the usage of the operation in 
    the data access. 
    RAM: no change expected. 
    ROM: the ROM size is minimized. 
    Runtime: the runtime is increased due to the usage of the operation in 
    the data access. 
    <MSN>Deduplicate
    ENUM 
    This parameter is used to tailor the CONFIG-CLASS PRE-COMPILE 
    BoolDataByNumeric
    ROM data deduplication mechanisms. A comparison with 0 is very 
    alComparision 
    efficient, but a numerical comparison with a value not 0 can be used to 
    increase the ROM data compression rate. 
     
    NONE: ROM data deduplications are switched off. 
    Code: the code size is small. 
    RAM: no change expected. 
    ROM: the ROM size is large. 
    Runtime: the runtime is fast. 
     
    DEDUPLICATE_DATA_WITH_ZERO: ROM data deduplications can be 
    applied with the value 0. 
    Code: the code size is larger than using NONE 
    RAM: no change expected. 
    ROM: the ROM size is smaller than using NONE. 
    Runtime: the runtime is larger than using NONE. 
     
    DEDUPLICATE_DATA_WITH_ANY_VALUE: ROM data deduplications 
    can be applied with any numerical value. 
    Code: the code size is larger than using NONE 
    RAM: no change expected. 
    ROM: the ROM size is smaller than using 
    DEDUPLICATE_DATA_WITH_ZERO. 
    Runtime: the runtime is larger than using NONE. 
    <MSN>ReduceData BOOL 
    This parameter activates/deactivates the capability to pack generated 
    ByStreaming 
    CONFIG-CLASS PRE-COMPILE ROM data into a data type dependent 
    stream. 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    37 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    Attribute Name 
    Value 
    Description 
    Type 
     
    TRUE: generated const data is packed into a data type dependent 
    stream. 
    Code: no change expected. 
    RAM: no change expected. 
    ROM: configuration dependent smaller than with FALSE. 
    Runtime: no change expected. 
     
    FALSE: generated const data is not packed into a data type dependent 
    stream. 
    <MSN>ShortSymbol BOOL 
    This parameter activates/deactivates the capability to generate 

    shortened symbol names. 
     
    FALSE: symbol names are generated in a human readable style based 
    on the MIP, tags and variant names. 
    TRUE: symbol names are generated based on the MIP and a CRC32. 
    <MSN>InterfacesFo BOOL 
    This parameter activates/deactivates the capability to generate bsw 
    rDeactivatedData 
    data interfaces for deactivated data elements. This is an advantage for 
    the BSW developer to reduce the time to market with a development 
    environment using auto completition and to investigate potential 
    interfaces. 
     
    FALSE: data interfaces are not generated if the data element is 
    deactivated. 
    TRUE: data interfaces are generated as e.g. empty macros. 
    <MSN>ReferringKe
    BOOL 
    This parameter activates/deactivates the capability to generate referring 
    ysInComments 
    keys in comments. This is an advantage for the developer to investigate 
    indirections, but this feature reduces the overall readability of the 
    generated data. 
     
    FALSE: referring keys are not generated in comments. 
    TRUE: referring keys are generated in comments. 
    7Table 5-2   Attributes of ComStackLib based BSW generators 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    38 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    6  Glossary and Abbreviations 
    6.1 
    Glossary 
    Term 
    Description 
    BSWMD 
    The BSWMD is a formal notation of all information belonging to a certain 
    BSW artifact (BSW module or BSW cluster) in addition to the 
    implementation of that artifact. 
    CFG5 
    Generation tool for MICROSAR components. 
    Electronic Control 
    Also known as ECU. Small embedded computer system consisting of at 
    Unit 
    least one CPU and corresponding periphery which is placed in one 
    housing. 
    Post-build 
    This type of configuration is possible after building the software module or 
    the ECU software. The software may either receive parameters of its 
    configuration during the download of the complete ECU software resulting 
    from the linkage of the code, or it may receive its configuration file that 
    can be downloaded to the ECU separately, avoiding a re-compilation and 
    re-build of the ECU software modules. In order to make the post-build 
    time reconfiguration possible, the reconfigurable parameters shall be 
    stored at a known memory location of ECU storage area. 
    Use case 
    A model of the usage by the user of a system in order to realize a single 
    functional feature of the system. 
    Table 6-1   Glossary 
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    39 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    6.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CPU 
    Central Processing Unit 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    GCE 
    Generic Configuration Editor 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    MIP 
    Module Implementation Prefix 
    MISRA 
    Motor Industry Software Reliability Association 
    RAM 
    Random Access Memory 
    ROM 
    Read-Only Memory 
    SWS 
    Software Specification 
    XMI 
    The XML Metadata Interchange (XMI) is an Object Management Group 
    (OMG) standard for exchanging metadata information via Extensible 
    Markup Language (XML). 
    Table 6-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    40 
    based on template version 5.5.0 


    Technical Reference MICROSAR ComStackLib 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 2.01.00 
    41 
    based on template version 5.5.0 

    Document Outline


    1.3.99 - TechnicalReference_Crc

    MICROSAR CRC

    1.3.101 - TechnicalReference_Crcs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CRC 
    Technical Reference 
     
      
    Version 4.03.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Michael Goß 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR CRC 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Tobias Schmid 
    2006-12-13 
    1.0 
    Initial Version 
    Tobias Schmid 
    2008-01-21 
    3.00.00 
    Update to ASR 2.1 
    Changed versioning to new notation 
    Claudia Mausz 
    2008-05-19 
    4.00.00 
    Update to ASR 3 
    Add Crc8 calculation 
    Michael Goß 
    2014-11-18 
    4.01.00 
    Update to ASR 4 
    Add Crc8H2F calculation 
    Michael Goß 
    2015-05-08 
    4.02.00 
    SafeBSW 
    Add Crc32P4 calculation 
    Michael Goß 
    2016-11-24 
    4.03.00 
    Add Crc64 calculation 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_CRCLibrary.pdf 
    V4.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_CRCLibrary.pdf 
    V4.3.0 
    [3]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.6.0 
    Scope of the Document  
    This  technical  reference  describes  the  general  use  of  the  CRC  library  basis  software. 
    There are no aspects which are controller specific. 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 
    Architecture Overview ........................................................................................ 8 
    3 
    Functional Description ................................................................................................. 9 
    3.1 

    Features ............................................................................................................ 9 
    3.1.1 

    Deviations .......................................................................................... 9 
    3.1.2 
    Additions/ Extensions ....................................................................... 10 
    3.2 
    Initialization ...................................................................................................... 10 
    3.3 
    States .............................................................................................................. 10 
    3.4 
    Main Functions ................................................................................................ 10 
    3.5 
    Error Handling .................................................................................................. 10 
    3.5.1 

    Development Error Reporting ........................................................... 10 
    3.5.2 
    Production Code Error Reporting ..................................................... 10 
    3.5.3 
    Parameter Checking ........................................................................ 10 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Scope of Delivery ............................................................................................. 11 
    4.1.1 

    Static Files ....................................................................................... 11 
    4.1.2 
    Dynamic Files .................................................................................. 11 
    4.2 
    Include Structure .............................................................................................. 11 
    5 
    API Description ........................................................................................................... 12 
    5.1 

    Type Definitions ............................................................................................... 12 
    5.2 
    Interrupt Service Routines provided by CRC .................................................... 12 
    5.3 
    Services provided by CRC ............................................................................... 12 
    5.3.1 

    Crc_CalculateCRC8 ......................................................................... 12 
    5.3.2 
    Crc_CalculateCRC8H2F .................................................................. 13 
    5.3.3 
    Crc_CalculateCRC16 ....................................................................... 14 
    5.3.4 
    Crc_CalculateCRC32 ....................................................................... 15 
    5.3.5 
    Crc_CalculateCRC32P4 .................................................................. 17 
    5.3.6 
    Crc_CalculateCRC64 ....................................................................... 18 
    5.3.7 
    Crc_GetVersionInfo .......................................................................... 19 
    5.4 
    Services used by CRC ..................................................................................... 19 
    5.5 
    Callback Functions ........................................................................................... 20 
    5.6 
    Configurable Interfaces .................................................................................... 20 
    5.6.1 

    Notifications ..................................................................................... 20 
    5.6.2 
    Callout Functions ............................................................................. 20 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    5.6.3 
    Hook Functions ................................................................................ 20 
    6 
    Configuration .............................................................................................................. 21 
    6.1 

    Configuration Variants ...................................................................................... 21 
    7 
    Glossary and Abbreviations ...................................................................................... 22 
    7.1 

    Glossary .......................................................................................................... 22 
    7.2 
    Abbreviations ................................................................................................... 22 
    8 
    Contact ........................................................................................................................ 23 
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 8 
    Figure 4-1 
    Include structure ....................................................................................... 11 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 3-1  
    Supported AUTOSAR standard conform features ....................................... 9 
    Table 3-2  
    Not supported AUTOSAR standard conform features ................................. 9 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 10 
    Table 4-1  
    Static files ................................................................................................. 11 
    Table 4-2  
    Generated files ......................................................................................... 11 
    Table 5-1  
    Type definitions ......................................................................................... 12 
    Table 5-2  
    Std_VersionInfoType ................................................................................. 12 
    Table 5-3  
    SAE-J1850 CRC8 Standard ..................................................................... 13 
    Table 5-4  
    Crc_CalculateCRC8 ................................................................................. 13 
    Table 5-5  
    CRC calculation based on 0x2F polynomial .............................................. 14 
    Table 5-6  
    Crc_CalculateCRC8H2F ........................................................................... 14 
    Table 5-7  
    CCITT CRC16 Standard ........................................................................... 15 
    Table 5-8  
    Crc_CalculateCRC16 ............................................................................... 15 
    Table 5-9  
    IEEE-802.3 CRC32 Ethernet Standard ..................................................... 16 
    Table 5-10  
    Crc_CalculateCRC32 ............................................................................... 16 
    Table 5-11  
    CRC32 calculation based on 0xF4ACFB13 polynomial (E2E Protection 
    Profile 4) ................................................................................................... 17 

    Table 5-12  
    Crc_CalculateCRC32P4 ........................................................................... 17 
    Table 5-13  
    Crc_GetVersionInfo .................................................................................. 19 
    Table 7-1  
    Glossary ................................................................................................... 22 
    Table 7-2  
    Abbreviations ............................................................................................ 22 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    4.00.00 
    Update to AUTOSAR Version 3 
    Add Crc8 calculation 
    4.01.00 
    Update to AUTOSAR Version 4 
    Add Crc8 calculation based on 0x2F polynomial 
    4.02.00 
    Crc32 E2E Profile 4 routine was added due to SafeBSW 
    4.03.00 
    Crc64 (ECMA) E2E Profile 7 routine was added 
    Table 1-1   Component history 
     
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CRC as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    CRC_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CRC_MODULE_ID   
    201 decimal 
    (according to ref. [3]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    This component implements service functions in ANSI C for calculating CRC checksums. 
    The module allows pre-compile configuration of the calculation method, which is used to 
    compute the CRC values. The six possible methods are table based or runtime calculation 
    of CRC values. 
    There are six different CRC calculation services available: 
    >  Two different services for checksum calculation of 8bit CRC value from a buffer  
    >  Checksum calculation of 16bit CRC value from a buffer  
    >  Two different services for checksum calculation of 32bit CRC value from a buffer  
    >  Checksum calculation of 64bit CRC value from a buffer 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 



    Technical Reference MICROSAR CRC 
    2.1 
    Architecture Overview 
    The following figure shows where the CRC is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    No  interface from other module  is required. The CRC component is a service  module. It 
    can be called from any module or application (e.g. NVRAM Manager).  
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CRC. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector Informatik provides further CRC functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Crc8 calculation based on the SAE-J1850 CRC8 Standard 
    Crc8 calculation based on 0x2F polynomial 
    Crc16 calculation based on the CCITT CRC16 Standard 
    Crc32 calculation based on the IEEE-802.3 Ethernet Standard 
    Crc32 calculation based on 0xF4ACFB13 polynomial (E2E Profile 4) 
    Crc64 calculation based on 0x42F0E1EBA9EA3693 polynomial (E2E Profile 7) 
    For all CRC calculations following methods can be used: 
    >  Table based calculation: results in fast execution, but increases code size (ROM 
    table) 
    >  Runtime calculation: results in smaller code size, but slower execution time 
    All routines are re-entrant and can be used by multiple applications at the same time. 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations  
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Hardware based CRC calculation 
    Debugging concept 
    Table 3-2   Not supported AUTOSAR standard conform features 
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 

    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    none 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.2 
    Initialization 
    No initialization is necessary. 
    3.3 
    States 
    This component does not contain any state machine. 
    3.4 
    Main Functions 
    This component does not have a main function. It only contains the routines to calculate 
    the  checksums.  These  API  functions  are  called  from  other  modules,  e.g.  NVRAM 
    Manager. 
    3.5 
    Error Handling 
    3.5.1 
    Development Error Reporting 
    Module CRC does not provide any development error detection mechanism. 
    3.5.2 
    Production Code Error Reporting 
    Module CRC does not provide any production error detection mechanism. 
     
    3.5.3 
    Parameter Checking 
    Module CRC’s functions do not perform any parameter checks.  
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    10 
    based on template version 5.9.0 






    Technical Reference MICROSAR CRC 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  CRC into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the CRC contains the files which are described in the chapters  4.1.1 and 
    4.1.2. 
    4.1.1 
    Static Files 
    File Name 
    Description 
    Crc.c 
    Implementation of the CRC routines 
    Crc.h 
    Header file of the CRC routines 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    Crc_Cfg.h 
    Configuration of the CRC routines 
    Table 4-2   Generated files 
     
    4.2 
    Include Structure 
    cmp Component View
    Crc_Cfg.h
    Crc.h
    «include»
    «use»
    «include»
    application / other BSW module
    Crc.c
     
    Figure 4-1  Include structure 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    11 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    5  API Description 
    5.1 
    Type Definitions 
    The types defined by the CRC are described in this chapter. 
    Type Name 
    C-Type 
    Description 
    Value Range 
    Crc_DataRefType 
    P2CONST  Pointer type for pointers 
    0-255 (uint8) 
    to data buffers, from 
    which the CRC value is to 
    be calculated. 
    Table 5-1   Type definitions 
     Std_VersionInfoType 
    Struct Element Name  C-Type  Description 
    Value Range 
    Std_VersionInfoType 
    Struct 
    Returns the version 
    uint16 vendorID 
    information 
    uint16 moduleID 
    uint8 sw_major_version 
    uint8 sw_minor_version 
    uint8 sw_patch_version 
    Table 5-2   Std_VersionInfoType 
    5.2 
    Interrupt Service Routines provided by CRC  
    The CRC component does not provide any interrupt service routines. 
    5.3 
    Services provided by CRC 
    5.3.1 
    Crc_CalculateCRC8 
    Prototype 
    uint8 Crc_CalculateCRC8 (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, uint8 
    Crc_StartValue8, boolean Crc_IsFirstCall ) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue8 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start from initial 
    value, ignore Crc_StartValue8. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue8 is interpreted to 
    be the return value of the previous function call. 
    Return code 
    uint8 
    8 bit result of CRC calculation 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    12 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    Functional Description 
    This service performs a CRC8 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue8. The CRC8 routine is based on the SAE-J1850 
    CRC8 Standard: 
    SAE-J1850 CRC8  Standard 
    value 
    CRC result width 
    8 bits 
    Polynomial 
    1Dh 
    Initial value 
    FFh 
    Input data reflected 
    No 
    Result data reflected 
    No 
    XOR value 
    FFh 
    Check 
    4Bh 
    Magic check 
    C4h 
    Table 5-3   SAE-J1850 CRC8 Standard 
     
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method 
    should be configured in order to decrease the calculation time. 
    Expected Caller Context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-4   Crc_CalculateCRC8 
     
    5.3.2 
    Crc_CalculateCRC8H2F 
    Prototype 
    uint8 Crc_CalculateCRC8H2F (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, 
    uint8 Crc_StartValue8H2F, boolean Crc_IsFirstCall ) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue8H2F 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start from initial 
    value, ignore Crc_StartValue8H2F. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue8H2F is 
    interpreted to be the return value of the previous function call. 
    Return code 
    uint8 
    8 bit result of CRC calculation 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    13 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    Functional Description 
    This service performs a CRC8 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue8H2F. The CRC8 routine is based on the generator 
    polynomial 0x2F: 
    CRC8 routine based on 0x2F polynomial 
    value 
    CRC result width 
    8 bits 
    Polynomial 
    2Fh 
    Initial value 
    FFh 
    Input data reflected 
    No 
    Result data reflected 
    No 
    XOR value 
    FFh 
    Check 
    DFh 
    Magic check 
    42h 
    Table 5-5   CRC calculation based on 0x2F polynomial 
     
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method 
    should be configured in order to decrease the calculation time. 
    Expected Caller Context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-6   Crc_CalculateCRC8H2F 
     
    5.3.3 
    Crc_CalculateCRC16 
    Prototype 
    uint16 Crc_CalculateCRC16 (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, 
    uint16 Crc_StartValue16, boolean Crc_IsFirstCall ) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue16 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start from initial 
    value, ignore Crc_StartValue16. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue16 is interpreted to 
    be the return value of the previous function call. 
    Return code 
    uint16 
    16 bit result of CRC calculation 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    14 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    Functional Description 
    This service performs a CRC16 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue16. The CRC16 routine is based on the CCITT 
    CRC16 Standard: 
    CCITT CRC16  Standard 
    value 
    CRC result width 
    16 bits 
    Polynomial 
    1021h 
    Initial value 
    FFFFh 
    Input data reflected 
    No 
    Result data reflected 
    No 
    XOR value 
    0000h 
    Check 
    29B1h 
    Magic check 
    0000h 
    Table 5-7   CCITT CRC16 Standard 
     
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method 
    should be configured in order to decrease the calculation time. 
    Expected Caller Context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-8   Crc_CalculateCRC16 
     
    5.3.4 
    Crc_CalculateCRC32 
    Prototype 
    uint32 Crc_CalculateCRC32 (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, 
    uint32 Crc_StartValue32, boolean Crc_IsFirstCall) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue32 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start from initial 
    value, ignore Crc_StartValue32. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue32 is interpreted to 
    be the return value of the previous function call. 
    Return code 
    uint32 
    32 bit result of CRC calculation 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    15 
    based on template version 5.9.0 



    Technical Reference MICROSAR CRC 
    Functional Description 
    This service performs a CRC32 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue32. The CRC32 routine is based on the IEEE-802.3 
    CRC32 Ethernet Standard: 
    IEEE-802.3 CRC32 Ethernet Standard 
    value 
    CRC result width 
    32 bits 
    Polynomial 
    04C11DB7h 
    Initial value 
    FFFFFFFFh 
    Input data reflected 
    Yes 
    Result data reflected 
    Yes 
    XOR value 
    FFFFFFFFh 
    Check 
    CBF43926h 
    Magic check* 
    DEBB20E3h 
    Table 5-9   IEEE-802.3 CRC32 Ethernet Standard 
     
     
    *Important note 
    To match the magic check value, the CRC must be appended in little endian format, 
      i.e. low significant byte first. This is due to the reflections of the input and the result. 
    Example of magic check: calculation of IEEE-802.3 CRC32 over data bytes 31h 32h 
    33h 34h 35h 36h 37h 38h 39h: 
    >  CRC generation: CRC over 31h 32h 33h 34h 35h 36h 37h 38h 39h, 
    initial value FFFFFFFFh: 
    >  CRC-result: CBh F4h 39h 26h (See check value) 
    >  CRC check: CRC over 31h 32h 33h 34h 35h 36h 37h 38h 39h 26h 39h 
    F4h CBh (CRC-result was appended to data bytes in little endian 
    format), initial value FFFFFFFFh: 
    >  CRC-result: 21h 44h DFh 1Ch 
    >  Magic check = CRC-result XORed with ‘XOR value’: 
    DEBB20E3h = 2144DF1Ch xor FFFFFFFFh 
     
     
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method 
    should be configured in order to decrease the calculation time. 
    Expected Caller Context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-10   Crc_CalculateCRC32 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    16 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    5.3.5 
    Crc_CalculateCRC32P4 
    Prototype 
    uint32 Crc_CalculateCRC32P4 (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, 
    uint32 Crc_StartValue32, boolean Crc_IsFirstCall) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue32 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start from initial 
    value, ignore Crc_StartValue32. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue32 is interpreted to 
    be the return value of the previous function call. 
    Return code 
    uint32 
    32 bit result of CRC calculation 
    Functional Description 
    This service performs a CRC32 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue32. The CRC32 routine is based on the 0xF4ACFB13 
    polynomial (E2E Protection Profile 4): 
     
    CRC 32 routine based on 0xF4ACFB13 
    value 
    polyonmial 
    CRC result width 
    32 bits 
    Polynomial 
    F4ACFB13h 
    Initial value 
    FFFFFFFFh 
    Input data reflected 
    Yes 
    Result data reflected 
    Yes 
    XOR value 
    FFFFFFFFh 
    Check 
    1697D06Ah 
    Magic check 
    6FB32240h 
    Table 5-11   CRC32 calculation based on 0xF4ACFB13 polynomial (E2E Protection Profile 4) 
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method should be 
    configured in order to decrease the calculation time. 
    Call context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-12   Crc_CalculateCRC32P4 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    17 
    based on template version 5.9.0 



    Technical Reference MICROSAR CRC 
    5.3.6 
    Crc_CalculateCRC64 
     
    Prototype 
    uint64 Crc_CalculateCRC64 (Crc_DataRefType Crc_DataPtr, uint32 Crc_Length, 
    uint64 Crc_StartValue64, boolean Crc_IsFirstCall) 
    Parameter 
    Crc_DataPtr 
    Pointer to start address of data block to be calculated 
    Crc_Length 
    Length of data to be calculated (in bytes) 
    Crc_StartValue64 
    Value the algorithm starts with 
    Crc_IsFirstCall 
    TRUE: First call in a sequence or individual CRC calculation; start 
    from initial value, ignore Crc_StartValue64. 
    FALSE: Subsequent call in a call sequence; Crc_StartValue64 is 
    interpreted to be the return value of the previous function call. 
    Return code 
    uint64 
    64 bit result of CRC calculation 
    Functional Description 
    This service performs a CRC64 calculation synchronously on Crc_Length data bytes, pointed to by 
    Crc_DataPtr, with the starting value of Crc_StartValue64. The CRC64 routine is based on the ECMA 
    Standard used by E2E Profile 7: 
    ECMA Standard 
    value 
    CRC result width 
    64 bits 
    Polynomial 
    42F0E1EBA9EA3693h 
    Initial value 
    FFFFFFFFFFFFFFFFh 
    Input data reflected 
    Yes 
    Result data reflected 
    Yes 
    XOR value 
    FFFFFFFFFFFFFFFFh 
    Check 
    995DC9BBDF1939FAh 
    Magic check* 
    49958C9ABD7D353Fh 
    Table 5-13   IEEE-802.3 CRC32 Ethernet Standard 
     
     
    *Important note 
    To match the magic check value, the CRC must be appended in little endian format, 
      i.e. low significant byte first. This is due to the reflections of the input and the result. 
    Example of magic check: calculation of ECMA CRC64 over data bytes 31h 32h 33h 
    34h 35h 36h 37h 38h 39h: 
    >  CRC generation: CRC over 31h 32h 33h 34h 35h 36h 37h 38h 39h, 
    initial value FFFFFFFFFFFFFFFFh: 
    >  CRC-result: 99h 5Dh C9h BBh DFh19h 39h FAh (See check value) 
    >  CRC check: CRC over 31h 32h 33h 34h 35h 36h 37h 38h 39h FAh 39h 
    19h DFh BBh C9h 5Dh 99h (CRC-result was appended to data bytes in 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    18 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    little endian format), initial value FFFFFFFFFFFFFFFFh: 
    >  CRC-result: B6h 6Ah 73h 65h 42h 82h CAh C0h 
    >  Magic check = CRC-result XORed with ‘XOR value’: 
    49958C9ABD7D353Fh = B66A73654282CAC0h XOR 
    FFFFFFFFFFFFFFFFh 
     
    Particularities and Limitations 
    >  If large data blocks have to be calculated (>32 bytes), the table based calculation method should be 
    configured in order to decrease the calculation time. 
    Call context 
    >  There is no specific caller. CRC can be called from anywhere. 
    Table 5-14   Crc_CalculateCRC64 
     
     
    5.3.7 
    Crc_GetVersionInfo 
    Prototype 
    void Crc_GetVersionInfo ( Std_VersionInfoType *Versioninfo ) 
    Parameter 
    Versioninfo 
    Pointer to where to store the version information of this module 
    Return code 
    None 
    -- 
    Functional Description 
    This service returns the version information of the module. The version information includes: 
    >  Module ID 
    >  Vendor ID 
    >  Vendor specific version numbers 
    This function is pre-compile time configurable On/Off by the configuration parameter 
    CrcVersionInfoApi. 
    Particularities and Limitations 
    >  None 
    Expected Caller Context 
    >  Application 
    Table 5-15   Crc_GetVersionInfo 
    5.4 
    Services used by CRC 
    The CRC component does not use services from other modules. 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    19 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    5.5 
    Callback Functions 
    Module CRC’s functions do not provide any callback functions. 
    5.6 
    Configurable Interfaces 
    5.6.1 
    Notifications 
    The CRC module does not provide notifications for upper layers. The CRC routines return 
    the checksum; this value will be evaluated by application or other modules. 
    5.6.2 
    Callout Functions  
    The CRC module does not provide callout functions. 
    5.6.3 
    Hook Functions  
    The CRC module does not provide hook functions. 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    20 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    6  Configuration 
    6.1 
    Configuration Variants 
    The CRC supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the CRC parameters depend on the supported configuration 
    variants. For their definitions please see the Crc_bswmd.arxml file. 
    CRC can be configured using the following tool: 
    >  DaVinci Configurator 5 (AUTOSAR 4 packages only). Parameters are explained within 
    the tool. 
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    21 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    CRC 
    Cyclic Redundancy Check 
    Table 7-1   Glossary 
     
     
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CCITT 
    Commité Consultatif Internationale Télégrafique et Téléfonique 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    E2E 
    End to End 
    ECMA 
    European Computer Manufacturers Association 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    IEEE 
    Institute of Electrical and Electronics Engineers 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    NVRAM Manager 
    Non Volatile Random Access Memory Manager 
    ROM 
    Read Only Memory 
    RTE 
    Runtime Environment 
    SAE 
    Society of Automotive Engineers 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 7-2   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    22 
    based on template version 5.9.0 


    Technical Reference MICROSAR CRC 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2016 Vector Informatik GmbH 
    Version 4.03.00 
    23 
    based on template version 5.9.0 

    Document Outline


    1.3.102 - TechnicalReference_Cry_30_LibCv

    MICROSAR CRY

    1.3.104 - TechnicalReference_Cry_30_LibCvs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CRY 
    Technical Reference 
     
      
    Version 2.1 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Philipp Ritter, Markus Schneider, Tobias Finke 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR CRY 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Philipp Ritter 
    2012-10-01 
    1.00.00 
    Initial Version of MICROSAR CSM 
    Markus Schneider 
    2015-03-24 
    1.01.00 
    Added FIPS-186.2 and HMAC SHA-1; 
    adapted configuration chapter 
    Tobias Finke 
    2015-04-23 
    1.02.00 
    Added RSA-1024 Decrypt and RSA-SHA-1 
    Signature Verification 
    Tobias Finke 
    2015-07-30 
    1.02.01 
    Refactoring of key types 
    Markus Schneider 
    2015-12-08 
    2.00.00 
    Added DaVinci Configurator 5 support 
    Tobias Finke 
    2016-04-27 
    2.01.00 
    - Adjust Description and Behavior of Save 
    State 
    - Added description for MAC length in bits 
    - Added CMAC AES-128 
    Tobias Finke 
    2016-11-10 
    2.01.01 
    - RsaDecrypt supports keys greater than 
    1024 bit. 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_CryptoServiceManager.pdf 
    1.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    3.2.0 
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
     
     
    Caution 
    This symbol calls your attention to warnings. 
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Contents 
    1 
    Component History ...................................................................................................... 9 
    2 
    Introduction................................................................................................................. 10 
    2.1 

    Architecture Overview ...................................................................................... 10 
    3 
    Functional Description ............................................................................................... 12 
    3.1 

    Features .......................................................................................................... 12 
    3.2 
    Initialization ...................................................................................................... 12 
    3.3 
    Main Functions ................................................................................................ 13 
    3.4 
    Key Handling ................................................................................................... 13 
    3.5 
    Error Handling .................................................................................................. 13 
    3.5.1 

    Development Error Reporting ........................................................... 13 
    3.5.2 
    Production Code Error Reporting ..................................................... 13 
    4 
    Integration ................................................................................................................... 14 
    4.1 

    Scope of Delivery ............................................................................................. 14 
    4.1.1 

    Static Files ....................................................................................... 14 
    4.1.2 
    Dynamic Files .................................................................................. 15 
    4.2 
    Include Structure .............................................................................................. 15 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 16 
    4.4 
    Critical Sections ............................................................................................... 16 
    5 
    API Description ........................................................................................................... 17 
    5.1 

    Interfaces Overview ......................................................................................... 17 
    5.2 
    Structures ........................................................................................................ 17 
    5.2.1 

    Cry_Aes128ConfigType ................................................................... 17 
    5.2.2 
    Cry_Fips186ConfigType ................................................................... 17 
    5.2.3 
    Cry_HmacSha1ConfigType .............................................................. 18 
    5.2.4 
    Cry_RsaDecryptConfigType ............................................................. 18 
    5.2.5 
    Cry_RsaSha1SigVerConfigType ...................................................... 18 
    5.2.6 
    Cry_CmacAes128GenConfigType ................................................... 18 
    5.2.7 
    Cry_CmacAes128VerConfigType ..................................................... 19 
    5.2.8 
    Cry_RsaKeyType ............................................................................. 19 
    5.3 
    Services provided by CRY ............................................................................... 20 
    5.3.1 

    Cry_Init ............................................................................................ 20 
    5.3.2 
    Cry_InitMemory ................................................................................ 20 
    5.3.3 
    Cry_GetVersionInfo .......................................................................... 21 
    5.3.4 
    Cry_AesEncrypt128Start .................................................................. 21 
    5.3.5 
    Cry_AesEncrypt128Update .............................................................. 22 
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.6 
    Cry_AesEncrypt128Finish ................................................................ 23 
    5.3.7 
    Cry_AesEncrypt128MainFunction .................................................... 24 
    5.3.8 
    Cry_AesDecrypt128Start ................................................................. 25 
    5.3.9 
    Cry_AesDecrypt128Update .............................................................. 26 
    5.3.10 
    Cry_AesDecrypt128Finish................................................................ 27 
    5.3.11 
    Cry_AesDecrypt128MainFunction .................................................... 28 
    5.3.12 
    Cry_Fips186SeedStart ..................................................................... 28 
    5.3.13 
    Cry_Fips186SeedUpdate ................................................................. 29 
    5.3.14 
    Cry_Fips186SeedFinish ................................................................... 30 
    5.3.15 
    Cry_Fips186SeedMainFunction ....................................................... 30 
    5.3.16 
    Cry_Fips186Generate ...................................................................... 31 
    5.3.17 
    Cry_Fips186GenerateMainFunction ................................................. 32 
    5.3.18 
    Cry_HmacSha1VerifyStart ............................................................... 33 
    5.3.19 
    Cry_HmacSha1VerifyUpdate ........................................................... 34 
    5.3.20 
    Cry_HmacSha1VerifyFinish ............................................................. 35 
    5.3.21 
    Cry_HmacSha1VerifyMainFunction .................................................. 36 
    5.3.22 
    Cry_CmacAes128VerStart ............................................................... 36 
    5.3.23 
    Cry_CmacAes128VerUpdate ........................................................... 37 
    5.3.24 
    Cry_CmacAes128VerFinish ............................................................. 38 
    5.3.25 
    Cry_CmacAes128VerMainFunction ................................................. 39 
    5.3.26 
    Cry_CmacAes128GenStart .............................................................. 40 
    5.3.27 
    Cry_CmacAes128GenUpdate .......................................................... 41 
    5.3.28 
    Cry_CmacAes128GenFinish ............................................................ 42 
    5.3.29 
    Cry_CmacAes128GenMainFunction ................................................ 43 
    5.3.30 
    Cry_RsaDecryptStart ....................................................................... 44 
    5.3.31 
    Cry_RsaDecryptUpdate ................................................................... 45 
    5.3.32 
    Cry_RsaDecryptFinish ..................................................................... 46 
    5.3.33 
    Cry_RsaDecryptMainFunction ......................................................... 47 
    5.3.34 
    Cry_RsaSha1SigVerStart ................................................................. 48 
    5.3.35 
    Cry_RsaSha1SigVerUpdate ............................................................. 49 
    5.3.36 
    Cry_RsaSha1SigVerFinish ............................................................... 50 
    5.3.37 
    Cry_RsaSha1SigVerMainFunction ................................................... 51 
    5.4 
    Services used by CRY ..................................................................................... 51 
    5.5 
    Service Ports ................................................................................................... 51 
    6 
    Configuration .............................................................................................................. 52 
    6.1 

    Configuration Variants ...................................................................................... 52 
    6.2 
    Configuration with DaVinci Configurator 5 ........................................................ 52 
    6.2.1 

    Common Properties ......................................................................... 52 
    6.2.2 
    AES Encrypt/Decrypt Properties ...................................................... 52 
    6.2.3 
    FIPS-186-2 Properties ..................................................................... 52 
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    6.2.4 
    HMAC SHA-1 Verification Properties ............................................... 53 
    6.2.5 
    CMAC AES-128 Verification Properties ............................................ 53 
    7 
    AUTOSAR Standard Compliance............................................................................... 54 
    7.1 

    Deviations ........................................................................................................ 54 
    7.2 
    Additions/ Extensions ....................................................................................... 54 
    7.3 
    Limitations........................................................................................................ 54 
    7.3.1 

    Support of Cryptographic Services ................................................... 54 
    8 
    Glossary and Abbreviations ...................................................................................... 55 
    8.1 

    Glossary .......................................................................................................... 55 
    8.2 
    Abbreviations ................................................................................................... 55 
    9 
    Contact ........................................................................................................................ 56 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 10 
    Figure 2-2 
    Interfaces to adjacent modules of the CRY ............................................... 11 
    Figure 4-1 
    Include structure ....................................................................................... 15 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 9 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 12 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 12 
    Table 4-1  
    Static files ................................................................................................. 14 
    Table 4-2  
    Generated files ......................................................................................... 15 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 16 
    Table 5-1  
    Cry_Aes128ConfigType ............................................................................ 17 
    Table 5-2  
    Cry_Fips186ConfigType ........................................................................... 17 
    Table 5-3  
    Cry_HmacSha1ConfigType ...................................................................... 18 
    Table 5-4 
    Cry_RsaDecryptConfigType ..................................................................... 18 
    Table 5-5   
    Cry_RsaSha1SigVerConfigType ............................................................... 18 
    Table 5-6  
    Cry_CmacAes128GenConfigType ............................................................ 18 
    Table 5-7  
    Cry_CmacAes128VerConfigType ............................................................. 19 
    Table 5-8   
    Cry_RsaKeyType ...................................................................................... 19 
    Table 5-9  
    Cry_Init ..................................................................................................... 20 
    Table 5-10  
    Cry_InitMemory ........................................................................................ 20 
    Table 5-11  
    Cry_GetVersionInfo .................................................................................. 21 
    Table 5-12  
    Cry_AesEncrypt128Start .......................................................................... 22 
    Table 5-13  
    Cry_AesEncrypt128Update ...................................................................... 22 
    Table 5-14  
    Cry_AesEncrypt128Finish ........................................................................ 23 
    Table 5-15  
    Cry_AesEncrypt128MainFunction ............................................................. 24 
    Table 5-16  
    Cry_AesDecrypt128Start .......................................................................... 25 
    Table 5-17  
    Cry_AesDecrypt128Update ...................................................................... 26 
    Table 5-18  
    Cry_AesDecrypt128Finish ........................................................................ 27 
    Table 5-19  
    Cry_AesDecrypt128MainFunction ............................................................ 28 
    Table 5-20  
    Cry_Fips186SeedStart ............................................................................. 29 
    Table 5-21  
    Cry_Fips186SeedUpdate.......................................................................... 29 
    Table 5-22  
    Cry_Fips186SeedFinish ........................................................................... 30 
    Table 5-23  
    Cry_Fips186SeedMainFunction ................................................................ 31 
    Table 5-24  
    Cry_Fips186Generate .............................................................................. 31 
    Table 5-25  
    Cry_Fips186GenerateMainFunction ......................................................... 32 
    Table 5-26  
    Cry_HmacSha1VerifyStart ........................................................................ 33 
    Table 5-27  
    Cry_HmacSha1VerifyUpdate .................................................................... 34 
    Table 5-28  
    Cry_HmacSha1VerifyFinish ...................................................................... 35 
    Table 5-29  
    Cry_HmacSha1VerifyMainFunction .......................................................... 36 
    Table 5-30  
    Cry_CmacAes128VerStart ........................................................................ 37 
    Table 5-31  
    Cry_CmacAes128VerUpdate .................................................................... 37 
    Table 5-32  
    Cry_CmacAes128VerFinish ...................................................................... 38 
    Table 5-33  
    Cry_CmacAes128VerMainFunction .......................................................... 39 
    Table 5-34  
    Cry_CmacAes128VerStart ........................................................................ 40 
    Table 5-35  
    Cry_CmacAes128GenUpdate .................................................................. 41 
    Table 5-36  
    Cry_CmacAes128GenFinish .................................................................... 42 
    Table 5-37  
    Cry_CmacAes128GenMainFunction ......................................................... 43 
    Table 5-38  
    Cry_RsaDecryptStart ................................................................................ 44 
    Table 5-39  
    Cry_RsaDecryptUpdate ............................................................................ 45 
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Table 5-40  
    Cry_RsaDecryptFinish .............................................................................. 46 
    Table 5-41  
    Cry_RsaDecryptMainFunction .................................................................. 47 
    Table 5-42  
    Cry_RsaSha1SigVerStart ......................................................................... 48 
    Table 5-43  
    Cry_RsaSha1SigVerUpdate ..................................................................... 49 
    Table 5-44  
    Cry_RsaSha1SigVerFinish ....................................................................... 50 
    Table 5-45  
    Cry_RsaSha1SigVerMainFunction ............................................................ 51 
    Table 5-46  
    Services used by the CRY ........................................................................ 51 
    Table 6-1  
    Common configuration properties ............................................................. 52 
    Table 7-1  
    Supported AUTOSAR standard conform features ..................................... 54 
    Table 8-1  
    Glossary ................................................................................................... 55 
    Table 8-2  
    Abbreviations ............................................................................................ 55 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.0 
    Initial version 
    1.1 
    Added FIPS-186.2 and HMAC SHA-1 
    1.2 
    Added RSA-1024 Decrypt and RSA-SHA-1 Signature Verification 
    2.0 
    Support of DaVinci Configurator 5 
    2.1 
    Added CMAC AES-128 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 

    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    2  Introduction 
    This  document  describes  the  functionality,  API  and  configuration  of  the  MICROSAR 
    module CRY as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    CRY_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CRY_MODULE_ID   
    255 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The Cryptographic library module (CRY) offers cryptographic primitives. The CRY module 
    is used by the Crypto Service Manager (CSM). 
    2.1  Architecture Overview 
    The  figure  shows  the  interfaces  to  adjacent  modules  of  the  CRY.  These  interfaces  are 
    described in chapter 5.  
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    10 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    cmp Architecture ov erv iew
    Csm
    «optional»
    «optional»
    Cry_<Primitive>Start
    Cry_<Primitive>Finish
    Csm_<Service>CallbackNotification
    Cry_<Primitive>Update
    Cry_<Primitve>MainFunction
    Csm_<Service>ServiceFinishNotification
    Bsw M
    Cry
    Cry_Init
    Provided Service
    APIs
    Crypto
     
    Figure 2-2  Interfaces to adjacent modules of the CRY 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    11 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CRY. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 6.2.4. 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Synchronous job processing 
    Asynchronous job processing 
    Service for Symmetrical Interface (AES128) 
    Service for MAC Interface (HMAC SHA-1) 
    Service for Random Interface (FIPS-186.2) 
    Service for Asymmetrical Interface 
    Service for Signature Interface 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Service for Hash Interface 
    Service for Symmetrical Block Interface 
    Service for Checksum Interface 
    Service for Key Derivation Interface 
    Service for Key Exchange Interface 
    Service for Symmetrical Key Exchange Interface 
    Service for Symmetrical Key Extract Interface 
    Service for Asymmetrical Key Extract Interface 
    Table 3-2   Not supported AUTOSAR standard conform features 
     
    3.2  Initialization 
    Before  calling  any  other  functionality  of  the  Cry  module  the  initialization  function 
    Cry_Init() has to be called. For API details refer to chapter 5.3.1 ‘Cry_Init’. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    12 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    3.3  Main Functions 
    The  CRY  module  implementation  provides  a  main  function  for  each  service.  When  the 
    usage of sync job processing is disabled, this main function has to be called by the CSM 
    whenever a service is active. 
    For API details refer e.g. to chapter 5.3.7 ‘Cry_AesEncrypt128MainFunction’. 
    3.4  Key Handling 
    The    asymmetrical    keys    used    by    the    Cry    module    are  in    the    format    of  
    ‘Cry_RsaKeyType’, which is defined in ‘Cry_Key_Types.h’. 
    3.5  Error Handling 
    3.5.1 
    Development Error Reporting 
    The current implementation of the Cry module does not report any development errors. 
     
    3.5.2 
    Production Code Error Reporting 
    The current implementation of the Cry module does not report any production errors. 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  CRY into 
    an application environment of an ECU. 
    4.1  Scope of Delivery 
    The delivery of the CRY contains the files which are described in the chapters  4.1.1 and 
    4.1.2. 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Library 
    Description 
    Code 
    Delivery 
    Delivery 
    Cry.c 
     
     
    Source file of the Cry. 
    Cry.h 
     
     
    Header file of the Cry. 
    Cry_ AesDecrypt128.c 
     
     
    Source file of the service AesDecrypt128. 
    Cry_ AesDecrypt128.h 
     
     
    Header file of the service AesDecrypt128. 
    Cry_ AesEncrypt128.c 
     
     
    Source file of the service AesEncrypt128. 
    Cry_ AesEncrypt128.h 
     
     
    Header file of the service AesEncrypt128. 
    Cry_ Fips186.c 
     
     
    Source file of the service FIPS-186. 
    Cry_ Fips186.h 
     
     
    Header file of the service FIPS-186. 
    Cry_ HmacSha1.c 
     
     
    Source file of the service HMAC SHA-1. 
    Cry_ HmacSha1.h 
     
     
    Header file of the service HMAC SHA-1. 
    SecModLib.lib1 
     
     
    Library file of the cryptographic primitives 
    Cry_RsaDecrypt.c 
     
     
    Source file of the service RsaDecrypt. 
    Cry_RsaDecrypt.h 
     
     
    Header file of the service RsaDecrypt. 
    Cry_RsaSha1SigVer.c 
     
     
    Source file of the service RsaSha1SigVer. 
    Cry_RsaSha1SigVer.h 
     
     
    Header file of the service RsaSha1SigVer. 
    Cry_Key_Types.h 
     
     
    Header file for custom key types 
    Table 4-1   Static files 
     
     
     
     
                                                
    1 The name of the underlying cryptographic primitive library may differ. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    14 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the DaVinci Configurator 5. 
    File Name 
    Description 
    Cry_Cfg.c 
    This is the configuration source file. 
    Cry_Cfg.h 
    This is the configuration header file. 
    Table 4-2   Generated files 
    4.2  Include Structure 
    Figure 4-1 shows the include structure of the Cry. Some includes are optional and depend 
    on the configuration. Cry_<Primitve>.h stands for every used cryptographic primitive. 
      
    Figure 4-1  Include structure 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    15 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  (Table  4-3)  contains  the  memory  section  names  and  the  compiler 
    abstraction definitions of the CRY and illustrates their assignment among each other. 
    Compiler Abstraction 
     
    Definitions 
     
    INIT
    R
     
    A
     
    V
    NO
     
    E
    D
    L_
    R_
    P
    Memory Mapping 
    A
    P
    _CO
    _V
    _A
    Sections 
    Y
    Y
    Y
    CR
    CR
    CR
    CRY_START_SEC_CODE 
     
     
     
    CRY_STOP_SEC_CODE 
    CRY_START_SEC_VAR_NOINIT_8BIT 
     
     
     
    CRY_STOP_SEC_VAR_NOINIT_8BIT 
    CRY_START_SEC_VAR_NOINIT_UNSPECIFIED 
     
     
     
    CRY_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    Table 4-3   Compiler abstraction and memory mapping 
    4.4 
    Critical Sections 
    The current implementation of the CRY module does not have any critical section. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    16 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5  API Description 
    5.1 
    Interfaces Overview 
    For an interfaces overview please see Figure 2-2. 
    5.2 
    Structures 
    5.2.1 
    Cry_Aes128ConfigType 
    This  structure  represents  the  configuration  for  the  AesDecrypt128  and  AesEncrypt128 
    service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_Aes128Wo Pointer to a provided 
     
    rkSpaceType* 
    buffer which will be used 
    as workspace for the 
    primitives 
    CRY_BLOCKMODE_ECB, 
    blockMode 
    uint8 
    Block mode 
    CRY_BLOCKMODE_CBC 
    paddingMode 
    uint8 
    Padding mode 
    CRY_PADDINGMODE_PKCS5 
    Table 5-1   Cry_Aes128ConfigType 
    5.2.2 
    Cry_Fips186ConfigType 
    This structure represents the configuration for the FIPS-186 service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_Fips186W
    Pointer to a provided 
     
    orkSpaceType*  buffer which will be used 
    as workspace for the 
    primitives 
    Enable using the seed 
    TRUE, FALSE
    savedStateEna
     
    boolean
    for extending the 
    bled
     
     
    existing entropy.  
    Table 5-2   Cry_Fips186ConfigType 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    17 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.2.3 
    Cry_HmacSha1ConfigType 
    This structure represents the configuration for the HMAC SHA-1 service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_HmacSha1 Pointer to a provided 
     
    WorkSpaceTyp buffer which will be used 
    e * 
    as workspace for the 
    primitives 
    lengthInBytes 
    uint8 
    Defines if Mac Length is  TRUE, 
    interpeted in bytes or 
    FALSE 
    bits 
    Table 5-3   Cry_HmacSha1ConfigType 
    5.2.4 
    Cry_RsaDecryptConfigType 
    This structure represents the configuration for the RsaDecrypt service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_RsaDecryp Pointer to a provided 
     
    tWorkSpaceTyp buffer which will be used 
    e * 
    as workspace for the 
    primitives 
    Table 5-4 
    Cry_RsaDecryptConfigType 
    5.2.5 
    Cry_RsaSha1SigVerConfigType 
    This structure represents the configuration for the RsaSha1SigVer service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_RsaSha1S Pointer to a provided 
     
    igVerWorkSpac buffer which will be used 
    eType * 
    as workspace for the 
    primitives 
    Table 5-5    Cry_RsaSha1SigVerConfigType 
    5.2.6 
    Cry_CmacAes128GenConfigType 
    This structure represents the configuration for the CMAC AES-128 generation service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_CmacAes1 Pointer to a provided 
     
    28GenWorkSp
    buffer which will be used 
    aceType * 
    as workspace for the 
    primitives 
    Table 5-6   Cry_CmacAes128GenConfigType 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    18 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
     
    5.2.7 
    Cry_CmacAes128VerConfigType 
    This structure represents the configuration for the CMAC AES-128 verification service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_CmacAes1 Pointer to a provided 
     
    28VerWorkSpa buffer which will be used 
    ceType * 
    as workspace for the 
    primitives 
    lengthInBytes 
    uint8 
    Defines if Mac Length is  TRUE, 
    interpeted in bytes or 
    FALSE 
    bits 
    Table 5-7   Cry_CmacAes128VerConfigType 
     
    5.2.8 
    Cry_RsaKeyType 
    This structure represents a RSA key which is defined by a modulo and an exponent. This 
    structure is used for passing a key to the RsaDecrypt and RsaSha1SigVer service. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    keyModuleLeng uint16 
    Length of the modulo in   
    th 
    byte. 
    keyModule 
    const uint8 * 
    Pointer to the modulo of   
    the key. 
    keyExponentLe uint16 
    Length of the exponent   
    ngth 
    in byte. 
    keyExponent 
    const uint8 * 
    Pointer to the exponent   
    of the key. 
    Table 5-8    Cry_RsaKeyType 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    19 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3  Services provided by CRY 
    5.3.1 
    Cry_Init 
    Prototype 
    void Cry_Init (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function initializes the Cry. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called during start-up. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-9   Cry_Init 
     
    5.3.2 
    Cry_InitMemory 
    Prototype 
    void Cry_InitMemory (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function is currently empty but required by the MICROSAR stack. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-10   Cry_InitMemory 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    20 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.3 
    Cry_GetVersionInfo 
    Prototype 
    void Cry_GetVersionInfo (Std_VersionInfoType *cryVerInfoPtr) 
    Parameter 
    cryVerInfoPtr 
    Pointer where the version information shall be copied to. 
    Return code 

     
    Functional Description 
    This function copies the Cry version information to the location provided by the pointer. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is only available if ‘Version Info Api” is enabled. 
    Call Context 
    >  This function can be called from task and interrupt level. 
    Table 5-11   Cry_GetVersionInfo 
    5.3.4 
    Cry_AesEncrypt128Start 
    Prototype 
    Csm_ReturnType Cry_AesEncrypt128Start (Const void *cfgPtr, const 
    Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    encryption operation. 
    InitVectorPtr 
    Holds a pointer to initialization vector which has to be used during the 
    symmetrical encryption. 
    InitVectorLength 
    Holds a pointer to the initialization vector which has to be used during the 
    symmetrical encryption. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the symmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    21 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-12   Cry_AesEncrypt128Start 
    5.3.5 
    Cry_AesEncrypt128Update 
    Prototype 
    Csm_ReturnType Cry_AesEncrypt128Update (Const void *cfgPtr, const uint8 
    *plainTextPtr, uint32 plainTextLength, uint8 *cipherTextPtr, uint32 
    *cipherTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    plainTextPtr 
    Holds a pointer to the data for which a encrypted text shall be computed. 
    plainTextLength 
    Contains the number of bytes for which the encrypted text shall be computed. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical encryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-13   Cry_AesEncrypt128Update 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    22 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.6 
    Cry_AesEncrypt128Finish 
    Prototype 
    Csm_ReturnType Cry_AesEncrypt128Finish (Const void *cfgPtr, uint8 
    *cipherTextPtr, uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-14   Cry_AesEncrypt128Finish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    23 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.7 
    Cry_AesEncrypt128MainFunction 
    Prototype 
    void Cry_AesEncrypt128MainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-15   Cry_AesEncrypt128MainFunction 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.8 
    Cry_AesDecrypt128Start 
    Prototype 
    Csm_ReturnType Cry_AesDecrypt128Start (Const void *cfgPtr, const 
    Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    decryption operation. 
    InitVectorPtr 
    Holds a pointer to initialization vector which has to be used during the 
    symmetrical decryption. 
    InitVectorLength 
    Holds a pointer to the initialization vector which has to be used during the 
    symmetrical decryption. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the symmetrical decryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-16   Cry_AesDecrypt128Start 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    25 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.9 
    Cry_AesDecrypt128Update 
    Prototype 
    Csm_ReturnType Cry_AesDecrypt128Update (Const void *cfgPtr, const uint8 
    *cipherTextPtr, uint32 cipherTextLength, uint8 *plainTextPtr, uint32 
    *plainTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    cipherTextPtr 
    Holds a pointer to the data for which a decrypted text shall be computed. 
    cipherTextLength 
    Contains the number of bytes for which the decrypted text shall be computed. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical decryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-17   Cry_AesDecrypt128Update 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    26 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.10  Cry_AesDecrypt128Finish 
    Prototype 
    Csm_ReturnType Cry_AesDecrypt128Finish (Const void *cfgPtr, uint8 
    *plainTextPtr, uint32 *plainTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Aes128ConfigType for more information. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical decryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-18   Cry_AesDecrypt128Finish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    27 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.11  Cry_AesDecrypt128MainFunction 
    Prototype 
    void Cry_AesDecrypt128MainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-19   Cry_AesDecrypt128MainFunction 
    5.3.12  Cry_Fips186SeedStart 
    Prototype 
    Csm_ReturnType Cry_Fips186SeedStart (Const void *cfgPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Fips186ConfigType for more information. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This function initializes the workspace for the random seed service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    28 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-20   Cry_Fips186SeedStart 
    5.3.13  Cry_Fips186SeedUpdate 
    Prototype 
    Csm_ReturnType Cry_Fips186SeedUpdate (Const void *cfgPtr, const uint8 
    *seedPtr, uint32 seedLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Fips186ConfigType for more information. 
    seedPtr 
    Holds a pointer to the seed for the random number generator. 
    seedLength 
    Contains the length of the seed in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This function shall be used to feed a seed to the random number generator. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-21   Cry_Fips186SeedUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    29 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.14  Cry_Fips186SeedFinish 
    Prototype 
    Csm_ReturnType Cry_Fips186SeedFinish (Const void *cfgPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Fips186ConfigType for more information. 
    Return code 
    CSM_E_OK 
    Request successful. 
    Functional Description 
    This function finalizes the random seed service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-22   Cry_Fips186SeedFinish 
    5.3.15  Cry_Fips186SeedMainFunction 
    Prototype 
    void Cry_Fips186SeedMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    30 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Table 5-23   Cry_Fips186SeedMainFunction 
    5.3.16  Cry_Fips186Generate 
    Prototype 
    Csm_ReturnType Cry_Fips186Generate (Const void *cfgPtr, uint8 
    *resultPtr, uint32 resultLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_Fips186ConfigType for more information. 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the random 
    number generation. The memory location must have at least the size 
    "resultLength". 
    resultLength 
    Holds the amount of random bytes which should be generated. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    Generates a random number according to the FIPS186-2 specification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-24   Cry_Fips186Generate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    31 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.17  Cry_Fips186GenerateMainFunction 
    Prototype 
    void Cry_Fips186GenerateMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-25   Cry_Fips186GenerateMainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    32 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.18  Cry_HmacSha1VerifyStart 
    Prototype 
    Csm_ReturnType Cry_HmacSha1VerifyStart (Const void *cfgPtr, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the HMAC SHA1 verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-26   Cry_HmacSha1VerifyStart 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.19  Cry_HmacSha1VerifyUpdate 
    Prototype 
    Csm_ReturnType Cry_HmacSha1VerifyUpdate (Const void *cfgPtr, const 
    uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    dataPtr 
    Holds a pointer to the seed for the random number generator. 
    dataLength 
    Contains the length of the seed in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This function shall be used to feed a seed to the random number generator. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-27   Cry_HmacSha1VerifyUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    34 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.20  Cry_HmacSha1VerifyFinish 
    Prototype 
    Csm_ReturnType Cry_HmacSha1VerifyFinish (Const void *cfgPtr, const 
    uint8 *MacPtr, uint32 MacLength, Csm_VerifyResultType *resultPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    MacPtr 
    Holds a pointer to the memory location which will hold the MAC to verify. 
    MacLength 
    Holds the length of the MAC to be verified. 
    resultPtr 
    Holds a pointer to the memory location which will hold the MAC. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed 
    CSM_E_BUSY 
    Request failed, service is busy 
    Functional Description 
    This interface shall be used to finish the HMAC SHA1 verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-28   Cry_HmacSha1VerifyFinish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    35 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.21  Cry_HmacSha1VerifyMainFunction 
    Prototype 
    void Cry_HmacSha1VerifyMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-29   Cry_HmacSha1VerifyMainFunction 
    5.3.22  Cry_CmacAes128VerStart 
    Prototype 
    Csm_ReturnType Cry_CmacAes128VerStart (Const void *cfgPtr, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the CMAC AES-128 verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    36 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-30   Cry_CmacAes128VerStart 
    5.3.23  Cry_CmacAes128VerUpdate 
    Prototype 
    Csm_ReturnType CryCmacAes128VerUpdate (Const void *cfgPtr, const uint8 
    *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This function shall be used to feed data to the CMAC AES-128  verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-31   Cry_CmacAes128VerUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    37 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.24  Cry_CmacAes128VerFinish 
    Prototype 
    Csm_ReturnType Cry_CmacAes128VerFinish (Const void *cfgPtr, const uint8 
    *MacPtr, uint32 MacLength, Csm_VerifyResultType *resultPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    MacPtr 
    Holds a pointer to the memory location which will hold the MAC to verify. 
    MacLength 
    Holds the length of the MAC to be verified. 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the MAC 
    verification. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed 
    CSM_E_BUSY 
    Request failed, service is busy 
    Functional Description 
    This interface shall be used to finish the CMAC AES-128 verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-32   Cry_CmacAes128VerFinish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    38 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.25  Cry_CmacAes128VerMainFunction 
    Prototype 
    void Cry_CmacAes128VerMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-33   Cry_CmacAes128VerMainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    39 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.26  Cry_CmacAes128GenStart 
    Prototype 
    Csm_ReturnType Cry_CmacAes128GenStart (Const void *cfgPtr, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the CMAC AES-128 generation. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-34   Cry_CmacAes128VerStart 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    40 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.27  Cry_CmacAes128GenUpdate 
    Prototype 
    Csm_ReturnType CryCmacAes128GenUpdate (Const void *cfgPtr, const uint8 
    *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This function shall be used to feed data to the CMAC AES-128  generation. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-35   Cry_CmacAes128GenUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    41 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.28  Cry_CmacAes128GenFinish 
    Prototype 
    Csm_ReturnType Cry_CmacAes128GenFinish (Const void *cfgPtr, const uint8 
    *MacPtr, uint32 MacLength, boolean truncationIsAllowed) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_HmacSha1ConfigType for more information. 
    MacPtr 
    Holds a pointer to the memory location whwere the generated MAC will be 
    stored. 
    MacLength 
    Holds a pointer to the memory location in which the length information is 
    stored. 
    truncationIsAllowed
    This parameter states whether a truncation of the result is allowed or not.
     
     
    TRUE: truncation is allowed. 
    FALSE: truncation is not allowed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed 
    CSM_E_BUSY 
    Request failed, service is busy 
    Functional Description 
    This interface shall be used to finish the CMAC AES-128 generation. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-36   Cry_CmacAes128GenFinish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    42 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.29  Cry_CmacAes128GenMainFunction 
    Prototype 
    void Cry_CmacAes128GenMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-37   Cry_CmacAes128GenMainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    43 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.30  Cry_RsaDecryptStart 
    Prototype 
    void Cry_RsaDeryptStart (Const void *cfgPtr, const 
    Csm_AsymPrivateKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    keyPtr
    Holds a pointer to the key which has to be used during the asymmetrical 
     
    decryption operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the asymmetrical decryption. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
     
     
     
    Caution 
    The application (SWC) should pass a pointer to a structure of type Cry_RsaKeyType 
      containing the RSA private key.   
    The pointer to this structure has to be casted to Csm_AsymPrivateKeyType in order to 
    match the API. 
     
     
     
     
    Call Context 
    >  This function can be called from task level only. 
    Table 5-38   Cry_RsaDecryptStart 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.31  Cry_RsaDecryptUpdate 
    Prototype 
    void Cry_RsaDeryptUpdate (void) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    cipherTextPtr 
    Holds a pointer to the encrypted data. 
    cipherTextLenght 
    Contains the length of the encrypted data in bytes 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLenght 
    Holds a pointer to a memory location in which the length information is stored. 
    On calling this function this parameter shall contain the size of the buffer 
    provided by plainTextPtr. When the request has finished, the amount of data 
    that has been decrypted shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result. 
    Functional Description 
    This interface shall be used to feed the asymmetrical decryption with input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-39   Cry_RsaDecryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    45 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.32  Cry_RsaDecryptFinish 
    Prototype 
    void Cry_RsaDeryptFinish (void) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLenght 
    Holds a pointer to a memory location in which the length information is stored. 
    On calling this function this parameter shall contain the size of the buffer 
    provided by plainTextPtr. When the request has finished, the amount of data 
    that has been decrypted shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result. 
    Functional Description 
    This interface shall be used to finish the asymmetrical decryption. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-40   Cry_RsaDecryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    46 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.33  Cry_RsaDecryptMainFunction 
    Prototype 
    void Cry_RsaDecryptMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-41   Cry_RsaDecryptMainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    47 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.34  Cry_RsaSha1SigVerStart 
    Prototype 
    void Cry_RsaSha1SigVerStart (Const void *cfgPtr, const 
    Csm_AsymPublicKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    keyPtr 
    Holds a pointer to the key necessary for the signature verification operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to initialize the signature verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
     
     
     
    Caution 
    The application (SWC) should pass a pointer to a structure of type 
      Cry_RSASigKeyType containing the RSA public key. 
    The pointer to this structure has to be casted to Csm_AsymPublicKeyType in order to 
    match the API. 
     
     
     
    Call Context 
    >  This function can be called from task level only. 
    Table 5-42   Cry_RsaSha1SigVerStart 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    48 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.35  Cry_RsaSha1SigVerUpdate 
    Prototype 
    void Cry_RsaSha1SigVerUpdate (void) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    dataPtr 
    Holds a pointer to the signature which shall be verified. 
    dataLength 
    Contains the length of the signature to verify in bytes 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to feed the signature verification with input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-43   Cry_RsaSha1SigVerUpdate 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    49 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    5.3.36  Cry_RsaSha1SigVerFinish 
    Prototype 
    void Cry_RsaSha1SigVerFinish (void) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    signaturePtr 
    Holds a pointer to the memory location which holds the signature to be 
    verified. 
    signatureLength 
    Holds the length of the signature to be verified. 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the 
    signature verification. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to finish the signature verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-44   Cry_RsaSha1SigVerFinish 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    50 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY 
    5.3.37  Cry_RsaSha1SigVerMainFunction 
    Prototype 
    void Cry_RsaSha1SigVerMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-45   Cry_RsaSha1SigVerMainFunction 
    5.4  Services used by CRY 
    In the following table services provided by other components, which are used by the CRY 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    CSM 
    Csm_<Service>CallbackNotification 
    Csm_<Service>ServiceFinishNotification 
    SecMod2 
    Provided Service APIs 
    Table 5-46   Services used by the CRY 
    5.5  Service Ports 
    The current implementation of the CRY does not support Service Ports. 
                                                
    2 Name of the module may differ 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    51 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    6  Configuration 
    In the CRY the attributes can be configured with the following tools: 
    >  Configuration in DaVinci Configurator 5 
    6.1 
    Configuration Variants 
    The CRY supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    6.2  Configuration with DaVinci Configurator 5 
    6.2.1 
    Common Properties 
    Attribute Name 
    Values3 
    Description 
    CryUseSyncJobProcessing 
    STD_ON 
    Preprocessor switch to enable and disable 
    STD_OFF synchronous job processing.
     
     
    CryVersionInfoApi 
    STD_ON 
    Preprocessor switch to enable and disable 
    STD_OFF availability of the API Cry_GetVersionInfo(). 
     
     
    True: API Cry_GetVersionInfo() is available.   
    False: API Cry_GetVersionInfo() is not available. 
    Table 6-1   Common configuration properties 
    6.2.2 
    AES Encrypt/Decrypt Properties 
    Attribute Name 
    Values 
    Description 
    CryAes<Encrypt/Decrypt>128BlockMode  CRY_AESBLOCKMODE_CBC  The block mode describes 
    CRY_AESBLOCKMODE_ECB
    how to handle data which 
     
    exceeds the block length. 
    CryAes<Encrypt/Decrypt>128PaddingMo CRY_AESPADDINGMODE_PK To align the data length to the 
    de 
    CS5 
    block size a padding mode is 
    required. 
     
    6.2.3 
    FIPS-186-2 Properties 
    Attribute Name 
    Values 
    Description 
    CrySaveState 
    STD_ON 
    When the option Save State is enabled, the call of 
    STD_OFF the Csm_RandomSeed service extends the 
      existing entropy of an already initialized random 
    number generator with the seed provided to the 
    service. 
    Disabling this feature will initialize the random 
    number generator from scratch without regard to 
    any existing entropy of previous initializations. 
                                                
    3 Default values are typed bold 
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    52 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    6.2.4 
    HMAC SHA-1 Verification Properties 
    Attribute Name 
    Values 
    Description 
    CryLengthInBytes 
    TRUE 
    If TRUE, the given mac length is interpreted as the 
    FALSE
    number of bytes to verify.
     
     
    Otherwise the length is interpreted as the number 
    of bits, which are then verified from MSB to LSB. 
     
    Example: 
    If mac length in bit is 4, the 4 most significant bits 
    are verified. The other 4 less significant bits are 
    discarded. 
     
    6.2.5 
    CMAC AES-128 Verification Properties 
    Attribute Name 
    Values 
    Description 
    CryLengthInBytes 
    TRUE 
    If TRUE, the given mac length is interpreted as the 
    FALSE
    number of bytes to verify.
     
     
    Otherwise the length is interpreted as the number 
    of bits, which are then verified from MSB to LSB. 
     
    Example: 
    If mac length in bit is 4, the 4 most significant bits 
    are verified. The other 4 less significant bits are 
    discarded. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    53 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    7  AUTOSAR Standard Compliance 
    7.1  Deviations 
    The current implementation does not have any deviations. 
    7.2  Additions/ Extensions 
    The current implementation does not have any extensions. 
    7.3 
    Limitations 
    7.3.1 
    Support of Cryptographic Services 
    The current cryptographic services are supported: 
     AES128 - Service for Symmetrical Interface 
     FIPS-186 – Service for Random Interface 
     HMAC SHA-1 – Service for MAC Interface 
     RSA Decrypt - Service for Asymmetrical Interface 
     RSA-SHA1 Signature Verification - Service for Signature Interface 
    Table 7-1   Supported AUTOSAR standard conform features 
    The following cryptographic services are not supported yet: 
      Service for Hash Interface 
      Service for Symmetrical Block Interface 
      Service for Checksum Interface 
      Service for Key Derivation Interface 
      Service for Key Exchange Interface 
      Service for Symmetrical Key Exchange Interface 
      Service for Symmetrical Key Extract Interface 
      Service for Asymmetrical Key Extract Interface 
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    54 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    Cryptographic 
    An underlying cryptographic module or library 
    Primitive 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CRY 
    Cryptographic library module 
    CSM 
    Crypto Service Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SchM 
    Schedule Manager 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 8-2   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    55 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY 
    9  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 2.1 
    56 
    based on template version 5.2.0 

    Document Outline


    1.3.105 - TechnicalReference_Cry_30_Rh850Icum

    MICROSAR CRY DRIVER

    1.3.107 - TechnicalReference_Cry_30_Rh850Icums


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CRY DRIVER 
    Technical Reference 
     
    DrvCry_Rh850Icum 
    Version 1.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Tobias Finke 
    Status 
    Released 
     
     
     
     
     
     




    Technical Reference MICROSAR CRY DRIVER 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Tobias Finke 
    2016-11-17 
    1.00.00 
    Initial Version of MICROSAR CRY DRIVER 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_CryptoServiceManager.pdf 
    1.2.0 
    [2]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [3]   HIS 
    SHE - Functional Specification 
    1.1 
    [4]   Renesas 
    ICU-M Firmware User’s Manual Security Services 
    Draft 6 
    [5]   Renesas 
    ICU-M Firmware User’s Manual Installation Guide 
    Draft 3 
     
     
     
     
    Caution 
    This symbol calls your attention to warnings. 
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    Contents 
    1 
    Component History ...................................................................................................... 8 
    2 
    Introduction................................................................................................................... 9 
    2.1 

    Architecture Overview ........................................................................................ 9 
    3 
    Functional Description ............................................................................................... 11 
    3.1 

    Features .......................................................................................................... 11 
    3.2 
    Initialization ...................................................................................................... 11 
    3.3 
    Main Functions ................................................................................................ 12 
    3.4 
    Key Handling ................................................................................................... 12 
    3.5 
    Key Mapping .................................................................................................... 12 
    3.6 
    Key Update ...................................................................................................... 13 
    3.7 
    Abortion of Services ......................................................................................... 13 
    3.8 
    Error Handling .................................................................................................. 14 
    3.8.1 

    Development Error Reporting ........................................................... 14 
    3.8.2 
    Production Code Error Reporting ..................................................... 14 
    4 
    Integration ................................................................................................................... 15 
    4.1 

    Scope of Delivery ............................................................................................. 15 
    4.1.1 

    Static Files ....................................................................................... 15 
    4.1.2 
    Dynamic Files .................................................................................. 16 
    4.2 
    Include Structure .............................................................................................. 17 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 17 
    4.4 
    Critical Sections ............................................................................................... 18 
    5 
    API Description ........................................................................................................... 19 
    5.1 

    Interfaces Overview ......................................................................................... 19 
    5.2 
    Type Definitions ............................................................................................... 19 
    5.3 
    Structures ........................................................................................................ 19 
    5.3.1 

    Cry_30_Rh850Icum_Aes128ConfigType ......................................... 19 
    5.3.2 
    Cry_30_Rh850Icum_RngConfigType ............................................... 19 
    5.3.3 
    Cry_30_Rh850Icum_CmacAes128GenConfigType ......................... 20 
    5.3.4 
    Cry_30_Rh850Icum_CmacAes128VerConfigType ........................... 20 
    5.3.5 
    Cry_30_Rh850Icum_KeyExtractConfigType .................................... 20 
    5.3.6 
    Cry_30_Rh850Icum_KeyWrapSymConfigType ................................ 21 
    5.4 
    Services provided by CRY_30_RH850ICUM ................................................... 21 
    5.4.1 

    Cry_30_Rh850Icum_Init .................................................................. 21 
    5.4.2 
    Cry_30_Rh850Icum_InitMemory ...................................................... 22 
    5.4.3 
    Cry_30_Rh850Icum_GetVersionInfo ................................................ 22 
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.4 
    Cry_30_Rh850Icum_AesEncrypt128Start ........................................ 23 
    5.4.5 
    Cry_30_Rh850Icum_AesEncrypt128Update .................................... 24 
    5.4.6 
    Cry_30_Rh850Icum_AesEncrypt128Finish ...................................... 25 
    5.4.7 
    Cry_30_Rh850Icum_AesEncrypt128MainFunction .......................... 26 
    5.4.8 
    Cry_30_Rh850Icum_AesDecrypt128Start ........................................ 27 
    5.4.9 
    Cry_30_Rh850Icum_AesDecrypt128Update .................................... 28 
    5.4.10 
    Cry_30_Rh850Icum_AesDecrypt128Finish ...................................... 29 
    5.4.11 
    Cry_30_Rh850Icum_AesDecrypt128MainFunction .......................... 30 
    5.4.12 
    Cry_30_Rh850Icum_RngSeedStart ................................................. 31 
    5.4.13 
    Cry_30_Rh850Icum_RngSeedUpdate ............................................. 32 
    5.4.14 
    Cry_30_Rh850Icum_RngSeedFinish ............................................... 32 
    5.4.15 
    Cry_30_Rh850Icum_RngSeedMainFunction ................................... 33 
    5.4.16 
    Cry_30_Rh850Icum_RngGenerate .................................................. 34 
    5.4.17 
    Cry_30_Rh850Icum_RngGenerateMainFunction ............................. 35 
    5.4.18 
    Cry_30_Rh850Icum_CmacAes128GenStart .................................... 36 
    5.4.19 
    Cry_30_Rh850Icum_CmacAes128GenUpdate ................................ 37 
    5.4.20 
    Cry_30_Rh850Icum_CmacAes128GenFinish .................................. 38 
    5.4.21 
    Cry_30_Rh850Icum_CmacAes128GenMainFunction ...................... 39 
    5.4.22 
    Cry_30_Rh850Icum_CmacAes128VerStart ..................................... 40 
    5.4.23 
    Cry_30_Rh850Icum_CmacAes128VerUpdate ................................. 41 
    5.4.24 
    Cry_30_Rh850Icum_CmacAes128VerFinish ................................... 42 
    5.4.25 
    Cry_30_Rh850Icum_CmacAes128VerMainFunction........................ 43 
    5.4.26 
    Cry_30_Rh850Icum_KeyExtractStart ............................................... 44 
    5.4.27 
    Cry_30_Rh850Icum_KeyExtractUpdate ........................................... 45 
    5.4.28 
    Cry_30_Rh850Icum_KeyExtractFinish ............................................. 46 
    5.4.29 
    Cry_30_Rh850Icum_KeyExtractMainFunction ................................. 47 
    5.4.30 
    Cry_30_Rh850Icum_KeyWrapSymStart .......................................... 48 
    5.4.31 
    Cry_30_Rh850Icum_KeyWrapSymUpdate ...................................... 49 
    5.4.32 
    Cry_30_Rh850Icum_KeyWrapSymFinish ........................................ 50 
    5.4.33 
    Cry_30_Rh850Icum_KeyWrapSymMainFunction............................. 50 
    5.5 
    Services used by CRY_30_RH850ICUM ......................................................... 51 
    5.6 
    Service Ports ................................................................................................... 51 
    6 
    Configuration .............................................................................................................. 52 
    6.1 

    Configuration Variants ...................................................................................... 52 
    6.2 
    Configuration with DaVinci Configurator 5 ........................................................ 52 
    6.2.1 

    Common Properties ......................................................................... 52 
    6.2.2 
    AES Encrypt Properties ................................................................... 52 
    6.2.3 
    AES Decrypt Properties ................................................................... 52 
    6.2.4 
    CMAC AES-128 Verification Properties ............................................ 53 
    6.2.5 
    CMAC AES-128 Generation Properties ............................................ 53 
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    6.2.6 
    Key Extract Properties ..................................................................... 53 
    6.2.7 
    Key Wrap Sym Properties ................................................................ 53 
    6.3 
    Deviations ........................................................................................................ 53 
    6.4 
    Additions/ Extensions ....................................................................................... 54 
    6.5 
    Limitations........................................................................................................ 54 
    6.5.1 

    Support of Cryptographic Services ................................................... 54 
    6.5.2 
    Tool supported configuration ............................................................ 54 
    6.5.3 
    Parallel Access to Services .............................................................. 54 
    7 
    Glossary and Abbreviations ...................................................................................... 55 
    7.1 

    Glossary .......................................................................................................... 55 
    7.2 
    Abbreviations ................................................................................................... 55 
    8 
    Contact ........................................................................................................................ 56 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 9 
    Figure 2-2 
    Interfaces to adjacent modules of the CRY_30_RH850ICUM ................... 10 
    Figure 4-1 
    Include structure ....................................................................................... 17 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 8 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 11 
    Table 3-2  
    Mapping of KeyId to SHE Keyslots ........................................................... 13 
    Table 4-1  
    Static files ................................................................................................. 16 
    Table 4-2  
    Generated files ......................................................................................... 16 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 18 
    Table 5-1  
    Cry_30_Rh850Icum_Aes128ConfigType .................................................. 19 
    Table 5-2  
    Cry_30_Rh850Icum_RngConfigType ....................................................... 19 
    Table 5-3  
    Cry_30_Rh850Icum_CmacAes128GenConfigType .................................. 20 
    Table 5-4  
    Cry_30_Rh850Icum_CmacAes128VerConfigType ................................... 20 
    Table 5-5 
    Cry_30_Rh850Icum_KeyExtractConfigType ............................................. 20 
    Table 5-6 
    Cry_30_Rh850Icum_KeyWrapSymConfigType ........................................ 21 
    Table 5-7  
    Cry_30_Rh850Icum_Init ........................................................................... 21 
    Table 5-8  
    Cry_30_Rh850Icum_InitMemory .............................................................. 22 
    Table 5-9  
    Cry_30_Rh850Icum_GetVersionInfo ........................................................ 22 
    Table 5-10  
    Cry_30_Rh850Icum_AesEncrypt128Start ................................................ 23 
    Table 5-11  
    Cry_30_Rh850Icum_AesEncrypt128Update............................................. 24 
    Table 5-12  
    Cry_30_Rh850Icum_AesEncrypt128Finish .............................................. 25 
    Table 5-13  
    Cry_30_Rh850Icum_AesEncrypt128MainFunction ................................... 26 
    Table 5-14  
    Cry_30_Rh850Icum_AesDecrypt128Start ................................................ 27 
    Table 5-15  
    Cry_30_Rh850Icum_AesDecrypt128Update ............................................ 28 
    Table 5-16  
    Cry_30_Rh850Icum_AesDecrypt128Finish .............................................. 29 
    Table 5-17  
    Cry_30_Rh850Icum_AesDecrypt128MainFunction................................... 30 
    Table 5-18  
    Cry_30_Rh850Icum_RngSeedStart .......................................................... 31 
    Table 5-19  
    Cry_30_Rh850Icum_RngSeedUpdate ...................................................... 32 
    Table 5-20  
    Cry_30_Rh850Icum_RngSeedFinish ........................................................ 32 
    Table 5-21  
    Cry_30_Rh850Icum_RngSeedMainFunction ............................................ 33 
    Table 5-22  
    Cry_30_Rh850Icum_RngGenerate ........................................................... 34 
    Table 5-23  
    Cry_30_Rh850Icum_RngGenerateMainFunction ..................................... 35 
    Table 5-24  
    Cry_30_Rh850Icum_CmacAes128GenStart ............................................ 36 
    Table 5-25  
    Cry_30_Rh850Icum_CmacAes128GenUpdate ......................................... 37 
    Table 5-26  
    Cry_30_Rh850Icum_CmacAes128GenFinish........................................... 38 
    Table 5-27  
    Cry_30_Rh850Icum_CmacAes128GenMainFunction ............................... 39 
    Table 5-28  
    Cry_30_Rh850Icum_CmacAes128VerStart .............................................. 40 
    Table 5-29  
    Cry_30_Rh850Icum_CmacAes128VerUpdate .......................................... 41 
    Table 5-30  
    Cry_30_Rh850Icum_CmacAes128VerFinish ............................................ 42 
    Table 5-31  
    Cry_30_Rh850Icum_CmacAes128VerMainFunction ................................ 43 
    Table 5-32  
    Cry_30_Rh850Icum_KeyExtractStart ....................................................... 44 
    Table 5-33  
    Cry_30_Rh850Icum_KeyExtractUpdate ................................................... 45 
    Table 5-34  
    Cry_30_Rh850Icum_KeyExtractFinish ..................................................... 46 
    Table 5-35  
    Cry_30_Rh850Icum_KeyExtractMainFunction .......................................... 47 
    Table 5-36  
    Cry_30_Rh850Icum_KeyWrapSymStart ................................................... 48 
    Table 5-37  
    Cry_30_Rh850Icum_KeyWrapSymUpdate ............................................... 49 
    Table 5-38  
    Cry_30_Rh850Icum_KeyWrapSymFinish ................................................. 50 
    Table 5-39  
    Cry_30_Rh850Icum_KeyWrapSymMainFunction ..................................... 51 
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    Table 5-40  
    Services used by the CRY_30_RH850ICUM ............................................ 51 
    Table 6-1  
    Common configuration properties ............................................................. 52 
    Table 6-2  
    Configuration properties of AES-128 Encrypt ............................................ 52 
    Table 6-3  
    Configuration properties of AES-128 Decrypt............................................ 52 
    Table 6-4  
    Configuration properties of CMAC AES-128 Verification ........................... 53 
    Table 6-5  
    Configuration properties of CMAC AES-128 Generation ........................... 53 
    Table 6-6  
    Configuration properties of Key Extract..................................................... 53 
    Table 6-7  
    Configuration properties of Key Wrap Sym ............................................... 53 
    Table 6-8  
    Supported AUTOSAR standard conform features ..................................... 54 
    Table 7-1  
    Glossary ................................................................................................... 55 
    Table 7-2  
    Abbreviations ............................................................................................ 55 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.0 
    Initial version 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    2  Introduction 
    This  document  describes  the  functionality,  API  and  configuration  of  the  MICROSAR 
    module CRY_30_RH850ICUM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    CRY_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CRY_MODULE_ID   
    255 decimal 
    (according to ref. [2]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The Cryptographic library module (CRY) offers cryptographic primitives. The CRY module 
    is used by the Crypto Service Manager (CSM). 
    2.1  Architecture Overview 
    The figure shows the interfaces to adjacent modules of the CRY_30_RH850ICUM. These 
    interfaces are described in chapter 5.  
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 1.0 

    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
     
    Figure 2-2  Interfaces to adjacent modules of the CRY_30_RH850ICUM 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    10 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CRY_30_RH850ICUM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Synchronous job processing 
    Asynchronous job processing 
    Service for Symmetrical Interface (AES128) 
    Service for MAC Interface (CMAC) 
    Service for Random Interface (PRNG) 
    Service for Symmetrical Key Extract Interface 
    Service for Symmetrical Key Wrapping Interface 
    Table 3-1   Supported AUTOSAR standard conform features 
    The CRY_30_RH850ICUM is a wrapper for the SHE services available in the R_ICUMIF 
    provided by Renesas. For details of the R_ICUMIF refer to [4]. 
    3.2  Initialization 
    Before  calling  any  other  functionality  of  the  Cry  module  the  initialization  function 
    Cry_30_Rh850Icum_Init() has to be called by the BswM at startup. 
    The Kohaku firmware has to be written to the flash of the ICUM and the ICUM has to be 
    started prior to initializing the module CRY_30_RH850ICUM. For details on how to enable 
    the ICUM refer to the information provided by Renesas [5]. 
    For API details refer to chapter 5.4.1 ‘Cry_30_Rh850Icum_Init’. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    11 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
     
     
    Note 

      If the Kohaku firmware is delivered in debug mode, we have to wait for the register 
    ICUM_ICU2PES to be initialized by the ICUM before issuing any commands to the 
    firmware. 
     
    Therefore execute this loop before calling the function Cry_30_Rh850Icum_Init(): 
      do 
      { 
        /* wait until ICUM_ICU2PES is either 0xFFFFFFFF or 
          contains an address to the ISD struct */ 
        status = *(volatile uint32 *)(0xFF1F0010u); /* PRQA S 0303 */ /* MD_MSR_11.3 */ 
      } while (status == 0x00000000u); 
     
     
     
     
     
    3.3  Main Functions 
    The  CRY  module  implementation  provides  a  main  function  for  each  service.  When  the 
    usage of sync job processing is disabled, this main function has to be called from the CSM 
    mainfunction context when the service is active. 
    For 
    API 
    details 
    refer 
    e.g. 
    to 
    chapter 
    5.4.7 
    ‘Cry_30_Rh850Icum_AesEncrypt128MainFunction’. 
    3.4  Key Handling 
    The  symmetrical  keys  used  by  the  Cry  module  are  in  the  format  of  Csm_SymKeyType. 
    This struct consists of a data pointer and a length. If the length equals 1, the first aligntype 
    of data represents a keyId which is used to select the key slot of the SHE depending on 
    the configuration parameter keyIdType. Otherwise, if the length is 16, the data located at 
    the pointer is loaded as a 128 bit key into the RAM key slot of the SHE. This is handled in 
    the specific start function. 
    3.5 
    Key Mapping 
    Depending  on  the  configuration  option  CryKeyIdType,  the  keyId  is  interpreted  in  two 
    different ways. 
     
    CRY_KEYIDTYPE_RAW 
    CRY_KEYIDTYPE_MAPPED 
    KeyId 
    SHE-Keyslot 
    0x00 
    SECRET_KEY 
    KEY_RAM 
    0x01 
    MASTER_ECU_KEY 
    KEY_1 
    0x02 
    BOOT_MAC_KEY 
    KEY_2 
    0x03 
    BOOT_MAC 
    KEY_3 
    0x04 
    KEY_1 
    KEY_4 
    0x05 
    KEY_2 
    KEY_5 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    12 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    0x06 
    KEY_3 
    KEY_6 
    0x07 
    KEY_4 
    KEY_7 
    0x08 
    KEY_5 
    KEY_8 
    0x09 
    KEY_6 
    KEY_9 
    0x0A 
    KEY_7 
    KEY_10 
    0x0B 
    KEY_8 
    KEY_11 
    0x0C 
    KEY_9 
    KEY_12 
    0x0D 
    KEY_10 
    KEY_13 
    0x0E 
    KEY_RAM 
    KEY_14 
    0x0F 
    KEY_11 
    KEY_15 
    0x10 
    KEY_12 
    KEY_16 
    0x11 
    KEY_13 
    KEY_17 
    0x12 
    KEY_14 
    KEY_18 
    0x13 
    KEY_15 
    KEY_19 
    0x14 
    KEY_16 
    KEY_20 
    0x15 
    KEY_17 
    MASTER_ECU_KEY 
    0x16 
    KEY_18 

    0x17 
    KEY_19 

    0x18 
    KEY_20 

    Table 3-2   Mapping of KeyId to SHE Keyslots 
    3.6  Key Update 
    For  updating  a  key  slot  of  the  SHE  as  specified  in  [3]  and  [4],  the 
    Cry_30_Rh850Icum_KeyExtract service is used.  
    The dataPtr in Cry_30_Rh850Icum_KeyExtractUpdate() points to an array which 
    consists of  the concatenation of  a keyID  (1 byte) and the  three messages M1 (16 byte), 
    M2 (32 byte) and M3 (16 byte). If dataLength is 65, these three messages are written to 
    the SHE. The SHE updates the key slot with the key data. Information like Slot ID and the 
    plaintext key data are encoded in the messages M1 to M3. 
    After  writing  M1,  M2  and  M3  to  the  SHE,  the  SHE  generates  M4  and  M5  which  can  be 
    used  to  verify  the  key  update  procedure.  In  order  to  retrieve  M4  and  M5,  the  keyPtr  of 
    Cry_30_Rh850Icum_KeyExtractFinish()  is  used  to  store  the  48  bytes  of  data. 
    Ensure that CsmSymKeyExtractMaxKeySize in the CSM configuration is set to at least 
    48 Bytes. 
    3.7  Abortion of Services 
    After every call of Cry_30_Rh850Icum_<Primitve>Finish() the SHE is put into an 
    idle-state and any command is aborted if it’s still executing. A call of 
    Cry_30_Rh850Icum_CmacAes128GenFinish() would e.g. abort a currently running 
    AES decryption. For details refer to 6.5.3 ‘Parallel Access to Services’.  
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    3.8  Error Handling 
    3.8.1 
    Development Error Reporting 
    The  current  implementation  of  the  CRY_30_RH850ICUM  module  does  not  report  any 
    development errors. 
     
    3.8.2 
    Production Code Error Reporting 
    The  current  implementation  of  the  CRY_30_RH850ICUM  module  does  not  report  any 
    production errors. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    14 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR 
    CRY_30_RH850ICUM into an application environment of an ECU. 
    4.1  Scope of Delivery 
    The  delivery  of  the  CRY_30_RH850ICUM  contains  the  files  which  are  described  in  the 
    chapters 4.1.1 and 4.1.2. 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Library 
    Description 
    Code 
    Delivery 
    Delivery 
    Cry_30_Rh850Icum.c 
    Source file of the 
     
     
    Cry_30_Rh850Icum. 
    Cry_30_Rh850Icum.h 
    Header file of the 
     
     
    Cry_30_Rh850Icum. 
    Cry_30_Rh850Icum_AesDecrypt128.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_AesDe
    crypt128. 
    Cry_30_Rh850Icum_AesDecrypt128.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_AesDe
    crypt128. 
    Cry_30_Rh850Icum_AesEncrypt128.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_AesEn
    crypt128. 
    Cry_30_Rh850Icum_AesEncrypt128.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_AesEn
    crypt128. 
    Cry_30_Rh850Icum_Rng.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_Rng. 
    Cry_30_Rh850Icum_Rng.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_Rng. 
    Cry_30_Rh850Icum_CmacAes128Gen.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_CmacA
    es128Gen. 
    Cry_30_Rh850Icum_CmacAes128Gen.h 
    Header file of the 
     
     
    Cry_30_Rh850Icum_CmacA
    es128Gen. 
    Cry_30_Rh850Icum_CmacAes128Ver.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_CmacA
    es128Ver. 
    Cry_30_Rh850Icum_CmacAes128Ver.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_CmacA
    es128Ver. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    15 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    File Name 
    Source 
    Library 
    Description 
    Code 
    Delivery 
    Delivery 
    Cry_30_Rh850Icum_KeyExtract.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_KeyExt
    ract. 
    Cry_30_Rh850Icum_KeyExtract.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_KeyExt
    ract. 
    Cry_30_Rh850Icum_KeyWrapSym.c 
    Source file of the service 
     
     
    Cry_30_Rh850Icum_KeyWr
    apSym. 
    Cry_30_Rh850Icum_KeyWrapSym.h 
    Header file of the service 
     
     
    Cry_30_Rh850Icum_KeyWr
    apSym. 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated with the help of Cfg5. 
    File Name 
    Description 
    Cry_30_Rh850Icum_Cfg.c 
    This is the configuration source file. 
    Cry_30_Rh850Icum_Cfg.h 
    This is the configuration header file. 
    Table 4-2   Generated files 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    16 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    4.2  Include Structure 
    Figure 4-1 shows the include structure of the Cry. Some includes are optional and depend 
    on  the  configuration.  Cry_30_Rh850Icum_<Primitve>.h  stands  for  every  used 
    cryptographic primitive. 
      
    Figure 4-1  Include structure 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  (Table  4-3)  contains  the  memory  section  names  and  the  compiler 
    abstraction definitions of the CRY_30_RH850ICUM and illustrates their assignment among 
    each other. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    17 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
     
    Compiler Abstraction 
     
    INIT
    R
    Definitions
    A
     
     
    V
    L_
     
    DE
    R_NO
    P
    A
    P
     
    CO_
    V_
    A_
    Memory Mapping 
    Sections 

    CUM
    CUM
    CUM
    0I
    0I
    0I
    85
    85
    85
    RH
    RH
    RH
    0_
    0_
    0_
    _3
    _3
    _3
    Y
    Y
    Y
    CR
    CR
    CR
    CRY_30_RH850ICUM_START_SEC_CODE 
     
     
     
    CRY_30_RH850ICUM_STOP_SEC_CODE 
    CRY_30_RH850ICUM_START_SEC_VAR_NOINIT_8B
    IT 
     
     
     
    CRY_30_RH850ICUM_STOP_SEC_VAR_NOINIT_8BI

    CRY_30_RH850ICUM_START_SEC_VAR_NOINIT_U
    NSPECIFIED 
     
     
     
    CRY_30_RH850ICUM_STOP_SEC_VAR_NOINIT_UN
    SPECIFIED 
    Table 4-3   Compiler abstraction and memory mapping 
    4.4 
    Critical Sections 
    The current implementation of the CRY module does not have any critical section. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    18 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5  API Description 
    5.1 
    Interfaces Overview 
    For an interfaces overview please see Figure 2-2. 
    5.2 
    Type Definitions 
    The types defined by the CRY_30_RH850ICUM are described in this chapter. 
    5.3 
    Structures 
    5.3.1 
    Cry_30_Rh850Icum_Aes128ConfigType 
    This  structure  represents  the  configuration  for  the  Cry_30_Rh850Icum_AesDecrypt128 
    and Cry_30_Rh850Icum_AesEncrypt128 service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_Aes128W buffer which will be used 
    orkSpaceType*  as workspace for the 
    primitives 
    CRY_BLOCKMODE_ECB, 
    blockMode 
    uint8 
    Block mode 
    CRY_BLOCKMODE_CBC 
    Defines the 
    CRY_KEYIDTYPE_MAPPED, 
    keyIdType 
    uint8 
    interpretation of the 
    CRY_KEYIDTYPE_RAW 
    keyid 
    Table 5-1   Cry_30_Rh850Icum_Aes128ConfigType 
    5.3.2 
    Cry_30_Rh850Icum_RngConfigType 
    This structure represents the configuration for the Cry_30_Rh850Icum_Rng service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_RngWork
    buffer which will be used 
    SpaceType* 
    as workspace for the 
    primitives 
    Table 5-2   Cry_30_Rh850Icum_RngConfigType 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    19 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.3.3 
    Cry_30_Rh850Icum_CmacAes128GenConfigType 
    This structure represents the configuration for the  Cry_30_Rh850Icum_CmacAes128Gen 
    service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_CmacAes buffer which will be used 
    128GenWorkS
    as workspace for the 
    paceType * 
    primitives 
    Defines the 
    CRY_KEYIDTYPE_MAPPED, 
    keyIdType 
    uint8 
    interpretation of the 
    CRY_KEYIDTYPE_RAW 
    keyid 
    Table 5-3   Cry_30_Rh850Icum_CmacAes128GenConfigType 
    5.3.4 
    Cry_30_Rh850Icum_CmacAes128VerConfigType 
    This  structure  represents  the  configuration  for  the  Cry_30_Rh850Icum_CmacAes128Ver 
    service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_CmacAes buffer which will be used 
    128VerWorkSp as workspace for the 
    aceType * 
    primitives 
    Defines the 
    CRY_KEYIDTYPE_MAPPED, 
    keyIdType 
    uint8 
    interpretation of the 
    CRY_KEYIDTYPE_RAW 
    keyid 
    Defines if Mac Length is  CRY_MAC_LENGTH_IN_BYTES, 
    lengthInBytes 
    uint8 
    interpeted in bytes or 
    CRY_MAC_LENGTH_IN_BITS 
    bits 
    Table 5-4   Cry_30_Rh850Icum_CmacAes128VerConfigType 
    5.3.5 
    Cry_30_Rh850Icum_KeyExtractConfigType 
    This structure represents the configuration for the Cry_30_Rh850Icum_KeyExtract service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_KeyExtrac buffer which will be used 
    tWorkSpaceTyp as workspace for the 
    e * 
    primitives 
    Defines the 
    CRY_KEYIDTYPE_MAPPED, 
    keyIdType 
    uint8 
    interpretation of the 
    CRY_KEYIDTYPE_RAW 
    keyid 
    Table 5-5 
    Cry_30_Rh850Icum_KeyExtractConfigType 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    20 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.3.6 
    Cry_30_Rh850Icum_KeyWrapSymConfigType 
    This  structure  represents  the  configuration  for  the  Cry_30_Rh850Icum_KeyWrapSym 
    service 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    Cry_30_Rh850I Pointer to a provided 
     
    cum_KeyWrap
    buffer which will be used 
    SymWorkSpac
    as workspace for the 
    eType * 
    primitives 
    Defines the 
    CRY_KEYIDTYPE_MAPPED, 
    keyIdType 
    uint8 
    interpretation of the 
    CRY_KEYIDTYPE_RAW 
    keyid 
    Table 5-6 
    Cry_30_Rh850Icum_KeyWrapSymConfigType 
     
     
    5.4  Services provided by CRY_30_RH850ICUM 
    5.4.1 
    Cry_30_Rh850Icum_Init 
    Prototype 
    void Cry_30_Rh850Icum_Init (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function initializes the Cry. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called during start-up. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-7   Cry_30_Rh850Icum_Init 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    21 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.2 
    Cry_30_Rh850Icum_InitMemory 
    Prototype 
    void Cry_30_Rh850Icum_InitMemory (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function is currently empty but required by the MICROSAR stack. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-8   Cry_30_Rh850Icum_InitMemory 
     
    5.4.3 
    Cry_30_Rh850Icum_GetVersionInfo 
    Prototype 
    void Cry_30_Rh850Icum_GetVersionInfo (Std_VersionInfoType 
    *cryVerInfoPtr) 
    Parameter 
    cryVerInfoPtr 
    Pointer where the version information shall be copied to. 
    Return code 

     
    Functional Description 
    This function copies the Cry version information to the location provided by the pointer. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is only available if ‘Version Info Api” is enabled. 
    Call Context 
    >  This function can be called from task and interrupt level. 
    Table 5-9   Cry_30_Rh850Icum_GetVersionInfo 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    22 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.4 
    Cry_30_Rh850Icum_AesEncrypt128Start 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesEncrypt128Start (Const void *cfgPtr, 
    const Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    encryption operation. 
    InitVectorPtr 
    Holds a pointer to initialization vector which has to be used during the 
    symmetrical encryption. 
    InitVectorLength 
    Holds the length of the initialization vector which has to be used during the 
    symmetrical encryption. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy 
    Functional Description 
    This interface shall be used to initialize the symmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-10   Cry_30_Rh850Icum_AesEncrypt128Start 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    23 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.5 
    Cry_30_Rh850Icum_AesEncrypt128Update 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesEncrypt128Update (Const void 
    *cfgPtr, const uint8 *plainTextPtr, uint32 plainTextLength, uint8 
    *cipherTextPtr, uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    plainTextPtr 
    Holds a pointer to the data for which a encrypted text shall be computed. 
    plainTextLength 
    Contains the number of bytes for which the encrypted text shall be computed. 
    Only values which are the same or a multiple of the blocksize (16 bytes) are 
    allowed. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical encryption service with the input data. 
    Particularities and Limitations 
     
     
    Note 
    It’s not possible to call Cry_30_Rh850Icum_AesEncryptUpdate multiple times in order 
      to feed the symmetrical encryption service with separate input data chunks.  
    Therefore plainTextLength must be set to the length of the complete input data. 
    The data has to be padded to the length of the blocksize (16 bytes) or a multiple of it 
    before calling this function. 
     
     
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-11   Cry_30_Rh850Icum_AesEncrypt128Update 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.6 
    Cry_30_Rh850Icum_AesEncrypt128Finish 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesEncrypt128Finish (Const void 
    *cfgPtr, uint8 *cipherTextPtr, uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-12   Cry_30_Rh850Icum_AesEncrypt128Finish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    25 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.7 
    Cry_30_Rh850Icum_AesEncrypt128MainFunction 
    Prototype 
    void Cry_30_Rh850Icum_AesEncrypt128MainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-13   Cry_30_Rh850Icum_AesEncrypt128MainFunction 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    26 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.8 
    Cry_30_Rh850Icum_AesDecrypt128Start 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesDecrypt128Start (Const void *cfgPtr, 
    const Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    decryption operation. 
    InitVectorPtr 
    Holds a pointer to initialization vector which has to be used during the 
    symmetrical decryption. 
    InitVectorLength 
    Holds the length of the initialization vector which has to be used during the 
    symmetrical decryption. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical decryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-14   Cry_30_Rh850Icum_AesDecrypt128Start 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    27 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.9 
    Cry_30_Rh850Icum_AesDecrypt128Update 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesDecrypt128Update (Const void 
    *cfgPtr, const uint8 *cipherTextPtr, uint32 cipherTextLength, uint8 
    *plainTextPtr, uint32 *plainTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    cipherTextPtr 
    Holds a pointer to the data for which a decrypted text shall be computed. 
    cipherTextLength 
    Contains the number of bytes for which the decrypted text shall be computed. 
    Only values which are the same or a multiple of the blocksize (16 bytes) are 
    allowed. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical decryption service with the input data. 
    Particularities and Limitations 
     
     
    Note 
    It’s not possible to call Cry_30_Rh850Icum_AesDecryptUpdate multiple times in order 
      to feed the symmetrical decryption service with separate input data chunks.  
    Therefore cipherTextLength must be set to the length of the complete input data. 
     
     
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-15   Cry_30_Rh850Icum_AesDecrypt128Update 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    28 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.10  Cry_30_Rh850Icum_AesDecrypt128Finish 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_AesDecrypt128Finish (Const void 
    *cfgPtr, uint8 *plainTextPtr, uint32 *plainTextLengthPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_Aes128ConfigType for more information. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical decryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-16   Cry_30_Rh850Icum_AesDecrypt128Finish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    29 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.11  Cry_30_Rh850Icum_AesDecrypt128MainFunction 
    Prototype 
    void Cry_30_Rh850Icum_AesDecrypt128MainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-17   Cry_30_Rh850Icum_AesDecrypt128MainFunction 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    30 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.12  Cry_30_Rh850Icum_RngSeedStart 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_RngSeedStart (Const void *cfgPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_RngConfigType for more information. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This function initializes the workspace for the random seed service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-18   Cry_30_Rh850Icum_RngSeedStart 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    31 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.13  Cry_30_Rh850Icum_RngSeedUpdate 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_RngSeedUpdate (Const void *cfgPtr, 
    const uint8 *seedPtr, uint32 seedLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_RngConfigType for more information. 
    seedPtr 
    Holds a pointer to the seed for the random number generator. 
    seedLength 
    Contains the length of the seed in bytes. Only the value 16 is supported. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This function shall be used to feed a seed to the random number generator. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-19   Cry_30_Rh850Icum_RngSeedUpdate 
    5.4.14  Cry_30_Rh850Icum_RngSeedFinish 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_RngSeedFinish (Const void *cfgPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_RngConfigType for more information. 
    Return code 
    CSM_E_OK 
    Request successful. 
    Functional Description 
    This function finalizes the random seed service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-20   Cry_30_Rh850Icum_RngSeedFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    32 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.15  Cry_30_Rh850Icum_RngSeedMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_RngSeedMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-21   Cry_30_Rh850Icum_RngSeedMainFunction 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.16  Cry_30_Rh850Icum_RngGenerate 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_RngGenerate (Const void *cfgPtr, uint8 
    *resultPtr, uint32 resultLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_RngConfigType for more information. 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the random 
    number generation. The memory location must have at least the size 
    "resultLength". 
    resultLength 
    Holds the amount of random bytes which should be generated. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    Generates a pseudo random number with the help of the RNG of the SHE. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-22   Cry_30_Rh850Icum_RngGenerate 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    34 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.17  Cry_30_Rh850Icum_RngGenerateMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_RngGenerateMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-23   Cry_30_Rh850Icum_RngGenerateMainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    35 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.18  Cry_30_Rh850Icum_CmacAes128GenStart 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128GenStart (Const void *cfgPtr, 
    const Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    keyPtr 
    Holds a pointer to the key necessary for the MAC generation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the SHE-CMAC generation. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-24   Cry_30_Rh850Icum_CmacAes128GenStart 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    36 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.19  Cry_30_Rh850Icum_CmacAes128GenUpdate 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128GenUpdate (Const void 
    *cfgPtr, const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This function shall be used to feed the SHE-CMAC generation with input data. 
    Particularities and Limitations 
     
     
    Note 
    Due to limitations in the API of the SHE, it’s not possible to call 
      Cry_30_Rh850Icum_CmacAes128GenUpdate multiple times in order to feed the 
    CMAC generation with separate input data chunks.  
    Therefore dataLength must be set to the length of the complete input data. 
     
     
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-25   Cry_30_Rh850Icum_CmacAes128GenUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    37 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.20  Cry_30_Rh850Icum_CmacAes128GenFinish 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128GenFinish (Const void 
    *cfgPtr, const uint8 *resultPtr, uint32* resultLengthPtr, boolean 
    TruncationIsAllowed) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the MAC 
    generation. If the result does not fit into the given buffer, and truncation is 
    allowed, the result shall be truncated 
    resultLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    buffer provided by resultPtr. When the request has finished, the actual length 
    of the returned MAC shall be stored. 
    TruncationIsAllowed 
    This parameter states whether a truncation of the result is allowed or not.  
    TRUE: truncation is allowed.  
    FALSE: truncation is not allowed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed 
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result, and truncation was not 
    allowed.
     
     
    Functional Description 
    This interface shall be used to finish the SHE-CMAC generation. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-26   Cry_30_Rh850Icum_CmacAes128GenFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    38 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.21  Cry_30_Rh850Icum_CmacAes128GenMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_CmacAes128GenMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-27   Cry_30_Rh850Icum_CmacAes128GenMainFunction 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    39 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.22  Cry_30_Rh850Icum_CmacAes128VerStart 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128VerStart (Const void *cfgPtr, 
    const Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    keyPtr 
    Holds a pointer to the key necessary for the MAC verification. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the SHE-CMAC verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-28   Cry_30_Rh850Icum_CmacAes128VerStart 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    40 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.23  Cry_30_Rh850Icum_CmacAes128VerUpdate 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128VerUpdate (Const void 
    *cfgPtr, const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be verified. 
    dataLength 
    Contains the number of bytes for which the MAC shall be verified. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This function shall be used to feed the SHE-CMAC verification with the input data. 
    Particularities and Limitations 
     
     
    Note 
    Due to limitations in the API of the SHE, it’s not possible to call 
      Cry_30_Rh850Icum_CmacAes128VerUpdate multiple times in order to feed the CMAC 
    verification with separate input data chunks.  
    Therefore dataLength must be set to the length of the complete input data. 
     
     
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-29   Cry_30_Rh850Icum_CmacAes128VerUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    41 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.24  Cry_30_Rh850Icum_CmacAes128VerFinish 
    Prototype 
    Csm_ReturnType Cry_30_Rh850Icum_CmacAes128VerFinish (Const void 
    *cfgPtr, const uint8 *MacPtr, uint32 MacLength, Csm_VerifyResultType 
    *resultPtr) 
    Parameter 
    cfgPtr 
    Holds a pointer to the configuration of this service. See 
    Cry_30_Rh850Icum_CmacAes128GenConfigType for more information. 
    MacPtr 
    Holds a pointer to the memory location which will hold the MAC to verify. 
    MacLength 
    Holds the length of the MAC to be verified.  
    Depending on the configuration, this value is interpreted as number of bits or 
    number of bytes to verify. 
    resultPtr 
    Holds a pointer to the memory location which will hold the MAC. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed 
    Functional Description 
    This interface shall be used to finish the SHE-CMAC verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-30   Cry_30_Rh850Icum_CmacAes128VerFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    42 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.25  Cry_30_Rh850Icum_CmacAes128VerMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_CmacAes128VerMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-31   Cry_30_Rh850Icum_CmacAes128VerMainFunction 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    43 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.26  Cry_30_Rh850Icum_KeyExtractStart 
    Prototype 
    void Cry_30_Rh850Icum_KeyExtractStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the KeyExtract service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-32   Cry_30_Rh850Icum_KeyExtractStart 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.27  Cry_30_Rh850Icum_KeyExtractUpdate 
    Prototype 
    void Cry_30_Rh850Icum_KeyExtractUpdate (Csm_ConfigIdType cfgId, const 
    uint8* dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    dataPtr 
    Holds a pointer to the data which contains either 

    a plaintext key (Length is 16) 

    Messages M1, M2, M3 with an optional prepending KeyId  to update a 
    keyslot in the SHE. (Length is 64 or 65 Bytes) 

    A KeyId (Length is 1) 
    dataLength 
    Holds the length of the data in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to feed the KeyExtract service with input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-33   Cry_30_Rh850Icum_KeyExtractUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    45 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.28  Cry_30_Rh850Icum_KeyExtractFinish 
    Prototype 
    void Cry_30_Rh850Icum_KeyExtractFinish (Csm_ConfigIdType cfgId, 
    Csm_SymKeyType* keyPtr) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    keyPtr 
    Holds a pointer to a structure where the result (i.e. the symmetrical key) is 
    stored in. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to finish KeyExtract. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-34   Cry_30_Rh850Icum_KeyExtractFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    46 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.29  Cry_30_Rh850Icum_KeyExtractMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_KeyExtractMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-35   Cry_30_Rh850Icum_KeyExtractMainFunction 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    47 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.30  Cry_30_Rh850Icum_KeyWrapSymStart 
    Prototype 
    void Cry_30_Rh850Icum_KeyWrapSymStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType * keyPtr, const Csm_SymKeyType * wrappingKeyPtr) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    keyPtr 
    Holds a pointer to the symmetric key to be wrapped. 
    wrappingKeyPtr 
    Holds a pointer to the key used for wrapping. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical key wrapping. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-36   Cry_30_Rh850Icum_KeyWrapSymStart 
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    48 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    5.4.31  Cry_30_Rh850Icum_KeyWrapSymUpdate 
    Prototype 
    void Cry_30_Rh850Icum_KeyWrapSymUpdate (Csm_ConfigIdType cfgId, const 
    uint8* dataPtr, uint32 * dataLengthPtr) 
    Parameter 
    cfgPtr 
    Pointer to ConfigStructure 
    dataPtr 
    Holds a pointer to the memory location which will hold the result of the key 
    wrapping.  
    dataLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    buffer provided by dataPtr. When the request has finished, the actual length of 
    the computed value shall be stored. 
    Valid value is 112. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to retrieve the result of the key wrapping operation from the symmetrical key 
    wrapping. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-37   Cry_30_Rh850Icum_KeyWrapSymUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    49 
    based on template version 5.2.0 



    Technical Reference MICROSAR CRY DRIVER 
    5.4.32  Cry_30_Rh850Icum_KeyWrapSymFinish 
    Prototype 
    void Cry_30_Rh850Icum_KeyWrapSymFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgPtr 
    Pointer to Config Structure 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    Functional Description 
    This interface shall be used to finish the symmetrical key wrapping. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-38   Cry_30_Rh850Icum_KeyWrapSymFinish 
     
     
    5.4.33  Cry_30_Rh850Icum_KeyWrapSymMainFunction 
    Prototype 
    void Cry_30_Rh850Icum_KeyWrapSymMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    50 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-39   Cry_30_Rh850Icum_KeyWrapSymMainFunction 
    5.5  Services used by CRY_30_RH850ICUM 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CRY_30_RH850ICUM are listed. For details about prototype and functionality refer to the 
    documentation of the providing component. 
    Component 
    API 
    CSM 
    Csm_<Service>CallbackNotification 
    Csm_<Service>ServiceFinishNotification 
    R_ICUMIF 
    R_ICUMIF_Init 
    R_ICUMIF_ServiceRequest 
    R_ICUMIF_ServiceResponse 
    R_ICUMIF_IsServiceCompleted 
    Table 5-40   Services used by the CRY_30_RH850ICUM 
    5.6  Service Ports 
    The current implementation of the CRY does not support Service Ports. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    51 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    6  Configuration 
    In the CRY_30_RH850ICUM the attributes can be configured with the following tools: 
    >  Configuration in DaVinci Configurator 5 
    6.1 
    Configuration Variants 
    The CRY_30_RH850ICUM supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    6.2  Configuration with DaVinci Configurator 5 
    6.2.1 
    Common Properties 
    Attribute Name 
    Values1 
    Description 
    CryUseSyncJobProcessing 
    STD_ON 
    Preprocessor switch to enable and disable 
    STD_OFF synchronous job processing.
     
     
    CryVersionInfoApi 
    STD_ON 
    Preprocessor switch to enable and disable 
    STD_OFF availability of the API Cry_GetVersionInfo(). 
     
     
    True: API Cry_GetVersionInfo() is available.   
    False: API Cry_GetVersionInfo() is not available. 
    Table 6-1   Common configuration properties 
    6.2.2 
    AES Encrypt Properties 
    Attribute Name 
    Values 
    Description 
    CryAesEncrypt128BlockMode 
    CRY_AESBLOCKMODE_CBC  The block mode describes 
    CRY_AESBLOCKMODE_ECB
    how to handle data which 
     
    exceeds the block length. 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId 
    CRY_KEYIDTYPE_MAPPED
    is interpreted. Refer tochapter 
     
    “3.5 Key Mapping” for details. 
    Table 6-2   Configuration properties of AES-128 Encrypt 
    6.2.3 
    AES Decrypt Properties 
    Attribute Name 
    Values 
    Description 
    CryAesDecrypt128BlockMode 
    CRY_AESBLOCKMODE_CBC  The block mode describes 
    CRY_AESBLOCKMODE_ECB
    how to handle data which 
     
    exceeds the block length. 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId 
    CRY_KEYIDTYPE_MAPPED
    is interpreted. Refer tochapter 
     
    “3.5 Key Mapping” for details. 
    Table 6-3   Configuration properties of AES-128 Decrypt 
                                                
    1 Default values are typed bold 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    52 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
     
    6.2.4 
    CMAC AES-128 Verification Properties 
    Attribute Name 
    Values 
    Description 
    CryLengthInBytes 
    TRUE 
    If TRUE, the given mac length 
    FALSE
    is interpreted as the number of 
     
    bytes to verify. 
    Otherwise the length is 
    interpreted as the number of 
    bits, which are then verified 
    from MSB to LSB. 
     
    Example: 
    If mac length in bit is 4, the 4 
    most significant bits are 
    verified. The other 4 less 
    significant bits are discarded. 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId is 
    CRY_KEYIDTYPE_MAPPED
    interpreted. Refer tochapter 
      “3.5 Key Mapping” for details. 
    Table 6-4   Configuration properties of CMAC AES-128 Verification 
    6.2.5 
    CMAC AES-128 Generation Properties 
    Attribute Name 
    Values 
    Description 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId is 
    CRY_KEYIDTYPE_MAPPED
    interpreted. Refer tochapter 
      “3.5 Key Mapping” for details. 
    Table 6-5   Configuration properties of CMAC AES-128 Generation 
    6.2.6 
    Key Extract Properties 
    Attribute Name 
    Values 
    Description 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId is 
    CRY_KEYIDTYPE_MAPPED
    interpreted. Refer tochapter 
      “3.5 Key Mapping” for details. 
    Table 6-6   Configuration properties of Key Extract 
    6.2.7 
    Key Wrap Sym Properties 
    Attribute Name 
    Values 
    Description 
    CryKeyIdType 
    CRY_KEYIDTYPE_RAW 
    Defines how a passed keyId is 
    CRY_KEYIDTYPE_MAPPED
    interpreted. Refer tochapter 
      “3.5 Key Mapping” for details. 
    Table 6-7   Configuration properties of Key Wrap Sym 
    6.3  Deviations 
    The current implementation does not have any deviations. 
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    53 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    6.4  Additions/ Extensions 
    The current implementation does not have any extensions. 
    6.5 
    Limitations 
    6.5.1 
    Support of Cryptographic Services 
    The current cryptographic services are supported: 
     SHE-AES128-Service for Symmetrical Interface 
     SHE-PRNG-Service for Random Interface 
     SHE-CMAC-Service for MAC Interface 
     Service for Symmetrical Key Extract Interface 
     Service for Symmetrical Key Wrapping Interface 
    Table 6-8   Supported AUTOSAR standard conform features 
    6.5.2 
    Tool supported configuration 
    Currently, a tool supported configuration is not implemented. Therefore, the  CRY module 
    must be configured manually by editing the configuration files. 
     
    6.5.3 
    Parallel Access to Services 
    Due to limitations in the SHE, it’s not possible to process more than one  service at once. 
    An  error  (CSM_E_BUSY)  is  generated  when  a  service  is  already  running  and  another 
    service tries to start at the same time. 
    Therefore parallel access to services which are dependent on the SHE is not allowed. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    54 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    Cryptographic 
    An underlying cryptographic module or library 
    Primitive 
    Table 7-1   Glossary 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CRY 
    Cryptographic library module 
    CSM 
    Crypto Service Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SchM 
    Schedule Manager 
    SHE 
    Secure Hardware Extension 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 7-2   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    55 
    based on template version 5.2.0 


    Technical Reference MICROSAR CRY DRIVER 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.0 
    56 
    based on template version 5.2.0 

    Document Outline


    1.3.108 - TechnicalReference_Cry_Ford

    MICROSAR CRY FORD

    1.3.110 - TechnicalReference_Cry_Fords

     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CRY FORD 
    Security Access - Technical Reference 
     
      
    Version 1.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Schneider, Tobias Finke 
    Status 
    Released 
     
     
     
     
     
     

    Security Access - Technical Reference MICROSAR CRY FORD 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Markus Schneider 
    2015-04-14 
    1.00.00 
    Creation 
    Markus Schneider 
    2015-08-12 
    1.00.01 
    Minor corrections 
    Tobias Finke 
    2015-09-30 
    1.00.02 
    Fixed description of CryFord_Cfg.h 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_CryptoServiceManager.pdf 
    1.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    3.2.0 
    [6]   FORD 
    EESE DIAGNOSTIC APPLICATION SECURITY ALGORITHM  001 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    2 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 
    Architecture Overview ........................................................................................ 8 
    3 
    Functional Description ............................................................................................... 10 
    3.1 

    Features .......................................................................................................... 10 
    3.2 
    Initialization ...................................................................................................... 10 
    3.3 
    Main Functions ................................................................................................ 10 
    3.4 
    Error Handling .................................................................................................. 10 
    3.4.1 

    Development Error Reporting ........................................................... 10 
    3.4.2 
    Production Code Error Reporting ..................................................... 10 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Scope of Delivery ............................................................................................. 11 
    4.1.1 

    Static Files ....................................................................................... 11 
    4.1.2 
    Dynamic Files .................................................................................. 11 
    4.2 
    Include Structure .............................................................................................. 12 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 12 
    4.4 
    Critical Sections ............................................................................................... 13 
    5 
    API Description ........................................................................................................... 14 
    5.1 

    Interfaces Overview ......................................................................................... 14 
    5.2 
    Structures ........................................................................................................ 14 
    5.2.1 

    CryFord_MacSecAccessVerifyConfigType ....................................... 14 
    5.2.2 
    CryFord_MacSecAccessWorkSpaceType ........................................ 14 
    5.3 
    Services provided by CRYFORD ..................................................................... 15 
    5.3.1 

    CryFord_MacSecAccessInit ............................................................. 15 
    5.3.2 
    CryFord_MacSecAccessVerifyStart ................................................. 15 
    5.3.3 
    CryFord_MacSecAccessVerifyUpdate ............................................. 16 
    5.3.4 
    CryFord_MacSecAccessVerifyFinish ............................................... 17 
    5.3.5 
    CryFord_MacSecAccessVerifyMainFunction .................................... 18 
    5.4 
    Services used by CRYFORD ........................................................................... 18 
    6 
    Configuration .............................................................................................................. 19 
    6.1 

    Configuration Variants ...................................................................................... 19 
    6.2 
    Manual Configuration ....................................................................................... 19 
    6.2.1 

    CryFord_Cfg.h ................................................................................. 19 
    6.2.1.1 

    Common Properties ....................................................... 19 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    3 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    6.2.1.2 
    Service Properties ......................................................... 19 
    6.2.2 
    CryFord_Cfg.c .................................................................................. 19 
    7 
    AUTOSAR Standard Compliance............................................................................... 20 
    7.1 

    Deviations ........................................................................................................ 20 
    7.2 
    Additions/ Extensions ....................................................................................... 20 
    7.3 
    Limitations........................................................................................................ 20 
    7.3.1 

    Tool supported configuration ............................................................ 20 
    8 
    Glossary and Abbreviations ...................................................................................... 21 
    8.1 

    Glossary .......................................................................................................... 21 
    8.2 
    Abbreviations ................................................................................................... 21 
    9 
    Contact ........................................................................................................................ 22 
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    4 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 8 
    Figure 2-2 
    Interfaces to adjacent modules of the CRYFORD ....................................... 9 
    Figure 4-1 
    Include structure ....................................................................................... 12 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 4-1  
    Static files ................................................................................................. 11 
    Table 4-2  
    Generated files ......................................................................................... 11 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 13 
    Table 5-1  
    CryFord_MacSecAccessVerifyConfigType ................................................ 14 
    Table 5-2  
    CryFord_MacSecAccessWorkSpaceType ................................................ 14 
    Table 5-3  
    CryFord_MacSecAccessInit ...................................................................... 15 
    Table 5-4  
    CryFord_MacSecAccessVerifyStart .......................................................... 15 
    Table 5-5  
    CryFord_MacSecAccessVerifyUpdate ...................................................... 16 
    Table 5-6  
    CryFord_MacSecAccessVerifyFinish ........................................................ 17 
    Table 5-7  
    CryFord_MacSecAccessVerifyMainFunction ............................................ 18 
    Table 5-8  
    Services used by the CRYFORD .............................................................. 18 
    Table 8-1  
    Glossary ................................................................................................... 21 
    Table 8-2  
    Abbreviations ............................................................................................ 21 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    5 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.0 
    Initial version 
    Table 1-1   Component history 
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    6 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    2  Introduction 
    This  document  describes  the  functionality,  API  and  configuration  of  the  MICROSAR 
    module CRYFORD as a CRY service specified in [1].  
    The CRYFORD implements the Ford security access algorithm specified in [6]. 
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    CRY_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CRY_MODULE_ID   
    255 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The Cryptographic library module (CRY) offers cryptographic primitives. The CRY module 
    is used by the Crypto Service Manager (CSM). 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    7 / 22 
    based on template version 5.2.0 


    Security Access - Technical Reference MICROSAR CRY FORD 
    2.1  Architecture Overview 
    The figure shows the interfaces to adjacent modules of the CRYFORD.  
    These interfaces are described in chapter 5. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview  
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    8 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    cmp Architecture ov erv iew
    Csm
    «optional»
    «optional»
    Cry_<Primitive>Start
    Cry_<Primitive>Finish
    Csm_<Service>CallbackNotification
    Cry_<Primitive>Update
    Cry_<Primitve>MainFunction
    Csm_<Service>ServiceFinishNotification
    Bsw M
    Cry
    Cry_Init
    Provided Service
    APIs
    Crypto
     
    Figure 2-2  Interfaces to adjacent modules of the CRYFORD 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    9 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    3  Functional Description 
    3.1 
    Features 
    The  CRYFORD  implements  the  Ford  security  algorithm,  specified  in  [6],  as  MAC 
    verification service for the CSM. 
    3.2  Initialization 
    Before 
    calling 
    the 
    CRYFORD 
    module 
    the 
    initialization 
    function 
    CryFord_MacSecAccessInit() has to be called. The initialization call shall take place 
    before initializing the CSM. 
    For API details refer to chapter 5.3.1 ‘CryFord_MacSecAccessInit’. 
    3.3  Main Functions 
    The CRYFORD module implementation provides a main function. When the usage of sync 
    job  processing  is  disabled,  this  main  function  has  to  be  called  by  the  CSM  whenever  a 
    service is active. 
    For API details refer to chapter 5.3.5 ‘CryFord_MacSecAccessVerifyMainFunction’
    3.4  Error Handling 
    3.4.1 
    Development Error Reporting 
    The  current  implementation  of  the  CRYFORD  module  does  not  report  any  development 
    errors. 
     
    3.4.2 
    Production Code Error Reporting 
    The  current  implementation  of  the  CRYFORD  module  does  not  report  any  production 
    errors. 
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    10 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR CRYFORD 
    into an application environment of an ECU. 
    4.1  Scope of Delivery 
    The delivery of the CRYFORD contains the files which are described in the chapters 4.1.1 
    and 4.1.2.
     
    4.1.1 
    Static Files 
    File Name 
    Source 
    Library 
    Description 
    Code 
    Delivery 
    Delivery 
    CryFord_MacSecAccess.c 
    Implementation of the Ford Security Access 
     
     
    algorithm 
    CryFord_MacSecAccess.h 
     
     
    Header file of the module 
    SecModLib.lib1 
     
     
    Library file of the cryptographic primitives 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files must be adapted manually. Refer to chapter 6.2 ‘Manual Configuration’ 
    for more details. 
    File Name 
    Description 
    CryFord_Cfg.c 
    This is the configuration source file. 
    CryFord_Cfg.h 
    This is the configuration header file. 
    Table 4-2   Generated files 
     
                                                
    1 The name of the underlying cryptographic primitive library may differ. 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    11 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    4.2  Include Structure 
    Figure 4-1 shows the include structure of the Cry. Some includes are optional and depend 
    on  the  configuration.  CryFord_<Primitve>.h  stands  for  every  used  cryptographic 
    primitive. 
     obj ect Header File Structure
    MemMap.h
    Csm_Types.h
    «include»
    ESLib.h
    CryFord_MacSecAccess.h
    Std_Types.h
    «include»
    «include»
    «include»
    «include»
    Csm_Cbk.h
    CryFord_MacSecAccess.c
    CryFord_Cfg.h
    «include»
     
    Figure 4-1  Include structure 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  (Table  4-3)  contains  the  memory  section  names  and  the  compiler 
    abstraction  definitions  of  the  CRYFORD  and  illustrates  their  assignment  among  each 
    other. 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    12 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
     
    Compiler Abstraction 
     
    INIT
    R
    Definitions
    A
     
     
    V
    E
    NO
    L_
     
    D
    R_
    P
    A
    P
     
    _CO
    _V
    _A
    Memory Mapping 
    RD
    RD
    RD
    Sections
    O
    O
    O
     
    F
    F
    F
    Y
    Y
    Y
    CR
    CR
    CR
    CRYFORD_START_SEC_CODE 
     
     
     
    CRYFORD_STOP_SEC_CODE 
    CRYFORD_START_SEC_VAR_NOINIT_8BIT 
     
     
     
    CRYFORD_STOP_SEC_VAR_NOINIT_8BIT 
    CRYFORD_START_SEC_VAR_NOINIT_UNSPECIFIED 
     
     
     
    CRYFORD_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    Table 4-3   Compiler abstraction and memory mapping 
    4.4 
    Critical Sections 
    The current implementation of the CRYFORD module does not have any critical section. 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    13 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    5  API Description 
    5.1 
    Interfaces Overview 
    For an interfaces overview please see Figure 2-2. 
    5.2 
    Structures 
    5.2.1 
    CryFord_MacSecAccessVerifyConfigType 
    This structure represents the configuration for the MAC security access service. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    buffer 
    CryFord_MacS Pointer to a provided 
     
    ecAccessWork
    buffer which will be used 
    SpaceType* 
    as workspace for the 
    primitives 
    Switch to enable and 
    TRUE, FALSE 
    disable synchronous job 
    processing. 
    useSyncJobPro Boolean
    True: synchronous job 
    cessing
     
     
    processing enabled 
    False: synchronous job 
    processing disabled 
    Table 5-1   CryFord_MacSecAccessVerifyConfigType 
    5.2.2 
    CryFord_MacSecAccessWorkSpaceType 
    This structure represents the work space for the MAC security access service. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    workspace 
    uint8 
    Work space type for the   
    MAC security access 
    algorithm 
    Table 5-2   CryFord_MacSecAccessWorkSpaceType 
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    14 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    5.3  Services provided by CRYFORD 
    5.3.1 
    CryFord_MacSecAccessInit 
    Prototype 
    void CryFord_MacSecAccessInit (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This interface shall be used to initialize the MAC verification service of the CSM module. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called during start-up. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-3   CryFord_MacSecAccessInit 
    5.3.2 
    CryFord_MacSecAccessVerifyStart 
    Prototype 
    Csm_ReturnType CryFord_MacSecAccessVerifyStart (Const void *cfgPtr, 
    const Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgPtr 
    Holds the identifier of the CSM module configuration. 
    keyPtr 
    Holds a pointer to the key which has to be used. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is busy. 
    Functional Description 
    This interface shall be used to initialize the HMAC SHA1 verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-4   CryFord_MacSecAccessVerifyStart 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    15 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    5.3.3 
    CryFord_MacSecAccessVerifyUpdate 
    Prototype 
    Csm_ReturnType CryFord_MacSecAccessVerifyUpdate (Const void *cfgPtr, 
    const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgPtr 
    Holds the identifier of the CSM module configuration. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is busy 
    Functional Description 
    This interface shall be used to feed the MAC verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-5   CryFord_MacSecAccessVerifyUpdate 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    16 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    5.3.4 
    CryFord_MacSecAccessVerifyFinish 
    Prototype 
    Csm_ReturnType CryFord_MacSecAccessVerifyFinish (Const void *cfgPtr, 
    uint8 * MacPtr, uint32 * MacLength) 
    Parameter 
    cfgPtr 
    Holds the identifier of the CSM module configuration. 
    MacPtr 
    Holds a pointer to the memory location which will hold the MAC to verify. 
    MacLength 
    Holds the length of the MAC to be verified. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is busy. 
    Functional Description 
    This interface shall be used to finish the MAC verification. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-6   CryFord_MacSecAccessVerifyFinish 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    17 / 22 
    based on template version 5.2.0 


    Security Access - Technical Reference MICROSAR CRY FORD 
    5.3.5 
    CryFord_MacSecAccessVerifyMainFunction 
    Prototype 
    void CryFord_MacSecAccessVerifyMainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called by CSM. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-7   CryFord_MacSecAccessVerifyMainFunction 
    5.4  Services used by CRYFORD 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    CRYFORD  are  listed.  For  details  about  prototype  and  functionality  refer  to  the 
    documentation of the providing component. 
    Component 
    API 
    CSM 
    Csm_MacVerifyCallbackNotification 
    Csm_MacVerifyServiceFinishNotification 
    SecMod2 
    Provided Service APIs 
    Table 5-8   Services used by the CRYFORD 
                                                
    2 Name of the module may differ 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    18 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    6  Configuration 
    The  current  implementation  of  the  CRYFORD  does  not  have  a  tool  supported 
    configuration. The configuration must be edited manually.  
    6.1 
    Configuration Variants 
    The CRYFORD supports only the configuration variant VARIANT-PRE-COMPILE. 
    6.2  Manual Configuration 
    6.2.1 
    CryFord_Cfg.h 
    The  file  CryFord_Cfg.h  contains  all  necessary  defines.  There  is  no  need  for  the 
    Integrator to adapt these defines. 
    6.2.1.1 
    Common Properties 
    Attribute Name 
    Values 
    Description 
    Default value 
    is typed bold 
    CRY_USE_DUMMY_STATEMENT 
    STD_ON 
    If enabled, dummy statements are inserted for not 
    STD_OFF used parameters
     
     
     
    6.2.1.2 
    Service Properties 
    The following attributes enabled or disables the supported services. 
    Attribute Name 
    Values 
    Description 
    CRYFORD_MACSECACCESS_ENABLE STD_ON 
    Enables or disables the MAC 

    STD_OFF 
    6.2.2 
    CryFord_Cfg.c 
    The  template  _CryFord_Cfg.c  contains  the  configurations  as  well  as  the  workspace 
    buffers  for  the  provided  services.  Each  available  service  has  a  sample  configuration. 
    Please refer ‘5.2 Structures’ for a description of the structure elements. 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    19 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    7  AUTOSAR Standard Compliance 
    7.1  Deviations 
    The current implementation does not have any deviations. 
    7.2  Additions/ Extensions 
    The current implementation does not have any extensions. 
    7.3 
    Limitations 
    7.3.1 
    Tool supported configuration 
    Currently,  a  tool  supported  configuration  is  not  implemented.  Therefore,  the  CRYFORD 
    module must be configured manually by editing the configuration files. 
    2015, Vector Informatik GmbH 
    Version: 1.0 
    20 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    Cryptographic 
    An underlying cryptographic module or library 
    Primitive 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CRY 
    Cryptographic library module 
    CSM 
    Crypto Service Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SchM 
    Schedule Manager 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 8-2   Abbreviations 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    21 / 22 
    based on template version 5.2.0 

    Security Access - Technical Reference MICROSAR CRY FORD 
    9  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0 
    22 / 22 
    based on template version 5.2.0 

    Document Outline


    1.3.111 - TechnicalReference_Csm

    MICROSAR CSM

    1.3.113 - TechnicalReference_Csms


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR CSM 
    Technical Reference 
     
      
    Version 1.5 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Schneider, Philipp Ritter 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR CSM 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Philipp Ritter 
    2012-10-01 
    1.00 
    Initial Version of MICROSAR Csm 
    Markus Schneider 
    2013-09-24 
    1.01 
    Adapted Configuration Chapter 
    Markus Schneider 
    2014-02-06 
    1.02 
    Adapted Service Port Chapter 
    Markus Schneider 
    2015-08-27 
    1.03 
    Corrections due to SafeBSW process 
    Markus Schneider 
    2015-11-18 
    1.04 
    Minor corrections 
    Markus Schneider 
    2016-02-24 
    1.05 
    Minor corrections 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_CryptoServiceManager.pdf 
    1.2.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    3.2.0 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Contents 
    1.  Component History ...................................................................................................... 12 
    2.  Introduction .................................................................................................................. 13 
    2.1  Architecture Overview ............................................................................................ 13 
    3.  Functional Description ................................................................................................ 15 
    3.1  Features ................................................................................................................. 15 
    3.2  Initialization ............................................................................................................ 16 
    3.3  States ..................................................................................................................... 16 
    3.4  Main Functions ....................................................................................................... 16 
    3.5  Asynchronous Handling ......................................................................................... 16 
    3.6  Error Handling ........................................................................................................ 18 
    3.6.1 
    Development Error Reporting ........................................................................ 18 
    3.6.2 
    Production Code Error Reporting .................................................................. 21 
    4.  Integration .................................................................................................................... 22 
    4.1  Scope of Delivery ................................................................................................... 22 
    4.1.1 
    Static Files .................................................................................................... 22 
    4.1.2 
    Dynamic Files ............................................................................................... 22 
    4.2  Include Structure .................................................................................................... 23 
    4.3  Compiler Abstraction and Memory Mapping ........................................................... 23 
    4.4  Critical Sections ..................................................................................................... 24 
    5.  API Description ............................................................................................................ 25 
    5.1  Type Definitions ...................................................................................................... 25 
    5.2  Services provided by CSM ..................................................................................... 29 
    5.2.1 
    Csm_Init ........................................................................................................ 29 
    5.2.2 
    Csm_InitMemory ........................................................................................... 29 
    5.2.3 
    Csm_MainFunction ....................................................................................... 30 
    5.2.4 
    Csm_Interruption ........................................................................................... 30 
    5.2.5 
    Csm_GetVersionInfo ..................................................................................... 31 
    5.2.6 
    Csm_HashStart ............................................................................................. 31 
    5.2.7 
    Csm_HashUpdate ......................................................................................... 32 
    5.2.8 
    Csm_HashFinish ........................................................................................... 33 
    5.2.9 
    Csm_MacGenerateStart ................................................................................ 34 
    5.2.10  Csm_MacGenerateUpdate ............................................................................ 35 
    5.2.11  Csm_MacGenerateFinish .............................................................................. 36 
    5.2.12  Csm_MacVerifyStart...................................................................................... 37 
    5.2.13  Csm_MacVerifyUpdate .................................................................................. 38 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.14  Csm_MacVerifyFinish .................................................................................... 39 
    5.2.15  Csm_RandomSeedStart ............................................................................... 40 
    5.2.16  Csm_RandomSeedUpdate............................................................................ 41 
    5.2.17  Csm_RandomSeedFinish ............................................................................. 42 
    5.2.18  Csm_RandomGenerate ................................................................................ 43 
    5.2.19  Csm_SymBlockEncryptStart ......................................................................... 44 
    5.2.20  Csm_SymBlockEncryptUpdate ..................................................................... 45 
    5.2.21  Csm_SymBlockEncryptFinish ....................................................................... 46 
    5.2.22  Csm_SymBlockDecryptStart ......................................................................... 46 
    5.2.23  Csm_SymBlockDecryptUpdate ..................................................................... 47 
    5.2.24  Csm_SymBlockDecryptFinish ....................................................................... 48 
    5.2.25  Csm_SymEncryptStart .................................................................................. 49 
    5.2.26  Csm_SymEncryptUpdate .............................................................................. 50 
    5.2.27  Csm_SymEncryptFinish ................................................................................ 51 
    5.2.28  Csm_SymDecryptStart .................................................................................. 52 
    5.2.29  Csm_SymDecryptUpdate .............................................................................. 53 
    5.2.30  Csm_SymDecryptFinish ................................................................................ 54 
    5.2.31  Csm_AsymEncryptStart ................................................................................ 55 
    5.2.32  Csm_AsymEncryptUpdate ............................................................................ 56 
    5.2.33  Csm_AsymEncryptFinish .............................................................................. 57 
    5.2.34  Csm_AsymDecryptStart ................................................................................ 58 
    5.2.35  Csm_AsymDecryptUpdate ............................................................................ 59 
    5.2.36  Csm_AsymDecryptFinish .............................................................................. 60 
    5.2.37  Csm_SignatureGenerateStart ....................................................................... 61 
    5.2.38  Csm_SignatureGenerateUpdate ................................................................... 62 
    5.2.39  Csm_SignatureGenerateFinish ..................................................................... 63 
    5.2.40  Csm_SignatureVerifyStart ............................................................................. 64 
    5.2.41  Csm_SignatureVerifyUpdate ......................................................................... 65 
    5.2.42  Csm_SignatureVerifyFinish ........................................................................... 66 
    5.2.43  Csm_ChecksumStart .................................................................................... 67 
    5.2.44  Csm_ChecksumUpdate ................................................................................ 67 
    5.2.45  Csm_ChecksumFinish .................................................................................. 68 
    5.2.46  Csm_KeyDeriveStart ..................................................................................... 69 
    5.2.47  Csm_KeyDeriveUpdate ................................................................................. 70 
    5.2.48  Csm_KeyDeriveFinish ................................................................................... 71 
    5.2.49  Csm_KeyDeriveSymKey ............................................................................... 72 
    5.2.50  Csm_KeyExchangeCalcPubVal..................................................................... 73 
    5.2.51  Csm_KeyExchangeCalcSecretStart .............................................................. 74 
    5.2.52  Csm_KeyExchangeCalcSecretUpdate .......................................................... 75 
    5.2.53  Csm_KeyExchangeCalcSecretFinish ............................................................ 76 
    5.2.54  Csm_KeyExchangeCalcSymKeyStart ........................................................... 77 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.55  Csm_KeyExchangeCalcSymKeyUpdate ....................................................... 78 
    5.2.56  Csm_KeyExchangeCalcSymKeyFinish ......................................................... 79 
    5.2.57  Csm_SymKeyExtractStart ............................................................................. 80 
    5.2.58  Csm_SymKeyExtractUpdate ......................................................................... 81 
    5.2.59  Csm_SymKeyExtractFinish ........................................................................... 82 
    5.2.60  Csm_SymKeyWrapSymStart ........................................................................ 83 
    5.2.61  Csm_SymKeyWrapSymUpdate..................................................................... 84 
    5.2.62  Csm_SymKeyWrapSymFinish ...................................................................... 85 
    5.2.63  Csm_SymKeyWrapAsymStart ....................................................................... 85 
    5.2.64  Csm_SymKeyWrapAsymUpdate ................................................................... 86 
    5.2.65  Csm_SymKeyWrapAsymFinish ..................................................................... 87 
    5.2.66  Csm_AsymPublicKeyExtractStart.................................................................. 87 
    5.2.67  Csm_AsymPublicKeyExtractUpdate .............................................................. 88 
    5.2.68  Csm_AsymPublicKeyExtractFinish ................................................................ 89 
    5.2.69  Csm_AsymPrivateKeyExtractStart ................................................................ 89 
    5.2.70  Csm_AsymPrivateKeyExtractUpdate ............................................................ 90 
    5.2.71  Csm_AsymPrivateKeyExtractFinish .............................................................. 91 
    5.2.72  Csm_AsymPrivateKeyWrapSymStart ............................................................ 92 
    5.2.73  Csm_AsymPrivateKeyWrapSymUpdate ........................................................ 93 
    5.2.74  Csm_AsymPrivateKeyWrapSymFinish .......................................................... 94 
    5.2.75  Csm_AsymPrivateKeyWrapAsymStart .......................................................... 95 
    5.2.76  Csm_AsymPrivateKeyWrapAsymUpdate ...................................................... 96 
    5.2.77  Csm_AsymPrivateKeyWrapAsymFinish ........................................................ 97 
    5.3  Services used by CSM ........................................................................................... 97 
    5.4  Callback Functions ................................................................................................. 97 

    5.4.1 
    Csm_HashCallbackNotification ..................................................................... 98 
    5.4.2 
    Csm_HashServiceFinishNotification .............................................................. 98 
    5.4.3 
    Csm_MacGenerateCallbackNotification ........................................................ 99 
    5.4.4 
    Csm_MacGenerateServiceFinishNotification ................................................ 99 
    5.4.5 
    Csm_MacVerifyCallbackNotification ............................................................ 100 
    5.4.6 
    Csm_MacVerifyServiceFinishNotification .................................................... 100 
    5.4.7 
    Csm_RandomSeedCallbackNotification ...................................................... 101 
    5.4.8 
    Csm_RandomSeedServiceFinishNotification .............................................. 101 
    5.4.9 
    Csm_RandomGenerateCallbackNotification ............................................... 102 
    5.4.10  Csm_RandomGenerateServiceFinishNotification ........................................ 102 
    5.4.11  Csm_SymBlockEncryptCallbackNotification ................................................ 103 
    5.4.12  Csm_SymBlockEncryptServiceFinishNotification ........................................ 104 
    5.4.13  Csm_SymBlockDecryptCallbackNotification ................................................ 104 
    5.4.14  Csm_SymBlockDecryptServiceFinishNotification ........................................ 105 
    5.4.15  Csm_SymEncryptCallbackNotification ........................................................ 105 
    5.4.16  Csm_SymEncryptServiceFinishNotification ................................................. 106 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.17  Csm_SymDecryptCallbackNotification ........................................................ 106 
    5.4.18  Csm_SymDecryptServiceFinishNotification ................................................. 107 
    5.4.19  Csm_AsymEncryptCallbackNotification ....................................................... 107 
    5.4.20  Csm_AsymEncryptServiceFinishNotification ............................................... 108 
    5.4.21  Csm_AsymDecryptCallbackNotification....................................................... 108 
    5.4.22  Csm_AsymDecryptServiceFinishNotification ............................................... 109 
    5.4.23  Csm_SignatureGenerateCallbackNotification .............................................. 109 
    5.4.24  Csm_SignatureGenerateServiceFinishNotification ...................................... 110 
    5.4.25  Csm_SignatureVerifyCallbackNotification ..................................................... 111 
    5.4.26  Csm_SignatureVerifyServiceFinishNotification ............................................. 111 
    5.4.27  Csm_ChecksumCallbackNotification ........................................................... 112 
    5.4.28  Csm_ChecksumServiceFinishNotification ................................................... 112 
    5.4.29  Csm_KeyDeriveCallbackNotification ........................................................... 113 
    5.4.30  Csm_KeyDeriveServiceFinishNotification .................................................... 113 
    5.4.31  Csm_KeyDeriveSymKeyCallbackNotification .............................................. 114 
    5.4.32  Csm_KeyDeriveSymKeyServiceFinishNotification ...................................... 114 
    5.4.33  Csm_KeyExchangeCalcPubValCallbackNotification .................................... 115 
    5.4.34  Csm_KeyExchangeCalcPubValServiceFinishNotification ............................ 115 
    5.4.35  Csm_KeyExchangeCalcSecretCallbackNotification .................................... 116 
    5.4.36  Csm_KeyExchangeCalcSecretServiceFinishNotification ............................. 116 
    5.4.37  Csm_KeyExchangeCalcSymKeyCallbackNotification.................................. 117 
    5.4.38  Csm_KeyExchangeCalcSymKeyServiceFinishNotification .......................... 117 
    5.4.39  Csm_SymKeyExtractCallbackNotification ................................................... 118 
    5.4.40  Csm_SymKeyExtractServiceFinishNotification ............................................ 118 
    5.4.41  Csm_SymKeyWrapSymCallbackNotification ............................................... 119 
    5.4.42  Csm_SymKeyWrapSymServiceFinishNotification ....................................... 119 
    5.4.43  Csm_SymKeyWrapAsymCallbackNotification ............................................. 120 
    5.4.44  Csm_SymKeyWrapAsymServiceFinishNotification...................................... 120 
    5.4.45  Csm_AsymPublicKeyExtractCallbackNotification ........................................ 121 
    5.4.46  Csm_AsymPublicKeyExtractServiceFinishNotification ................................ 121 
    5.4.47  Csm_AsymPrivateKeyExtractCallbackNotification ....................................... 122 
    5.4.48  Csm_AsymPrivateKeyExtractServiceFinishNotification ............................... 122 
    5.4.49  Csm_AsymPrivateKeyWrapSymCallbackNotification .................................. 123 
    5.4.50  Csm_AsymPrivateKeyWrapSymServiceFinishNotification........................... 123 
    5.4.51  Csm_AsymPrivateKeyWrapAsymCallbackNotification ................................ 124 
    5.4.52  Csm_AsymPrivateKeyWrapAsymServiceFinishNotification ......................... 124 

    5.5  Configurable Interfaces ........................................................................................ 125 
    5.5.1 
    Notifications ................................................................................................ 125 
    5.6  Service Ports ........................................................................................................ 125 
    5.6.1 
    Client Server Interface ................................................................................. 125 
    5.6.2 
    Provide Ports on CSM Side ......................................................................... 125 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    6.  Configuration.............................................................................................................. 127 
    6.1  Configuration Variants .......................................................................................... 127 
    6.2  Configuration with DaVinci Configurator 5 ............................................................ 127 

    6.2.1 
    Common Properties .................................................................................... 127 
    6.2.2 
    Service Type related Properties................................................................... 128 
    6.2.3 
    Service specific Properties .......................................................................... 128 
    7.  AUTOSAR Standard Compliance .............................................................................. 130 
    7.1  Deviations ............................................................................................................ 130 
    7.2  Additions/ Extensions ........................................................................................... 130 

    7.2.1 
    Not supported service APIs can be disabled ............................................... 130 
    7.3  Memory Initialization ............................................................................................. 130 
    7.4  Limitations ............................................................................................................ 130 

    7.4.1 
    Interruption of job processing ...................................................................... 130 
    7.4.2 
    Production Error Reporting .......................................................................... 130 
    7.4.3 
    Development Error Reporting ...................................................................... 130 
    8.  Glossary and Abbreviations ...................................................................................... 131 
    8.1  Glossary ............................................................................................................... 131 
    8.2  Abbreviations ....................................................................................................... 131 

    9.  Contact........................................................................................................................ 132 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 13 
    Figure 2-2 
    AUTOSAR architecture ............................................................................. 14 
    Figure 2-3 
    Interfaces to adjacent modules of the CSM .............................................. 14 
    Figure 3-1 
    CSM asynchronous mode......................................................................... 17 
    Figure 4-1 
    Include structure ....................................................................................... 23 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 12 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 15 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 15 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 15 
    Table 3-4  
    Service IDs ............................................................................................... 20 
    Table 3-5  
    Errors reported to DET ............................................................................. 20 
    Table 3-6  
    Development Error Reporting: Assignment of checks to services ............. 20 
    Table 4-1  
    Static files ................................................................................................. 22 
    Table 4-2  
    Generated files ......................................................................................... 22 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 24 
    Table 5-1  
    Type definitions ......................................................................................... 25 
    Table 5-2  
    Csm_AsymPublicKeyType ........................................................................ 26 
    Table 5-3  
    Csm_AsymPivateKeyType ........................................................................ 26 
    Table 5-4  
    Csm_SymKeyType ................................................................................... 26 
    Table 5-5  
    Csm_SymKeyType ................................................................................... 27 
    Table 5-6  
    Csm_KeyExchangeBaseType .................................................................. 27 
    Table 5-7  
    Csm_KeyExchangePrivateType................................................................ 27 
    Table 5-8  
    Csm_<Service>ConfigType ...................................................................... 28 
    Table 5-9  
    Csm_Init ................................................................................................... 29 
    Table 5-10  
    Csm_InitMemory ...................................................................................... 29 
    Table 5-11  
    Csm_MainFunction ................................................................................... 30 
    Table 5-12  
    Csm_Interruption ...................................................................................... 30 
    Table 5-13  
    Csm_GetVersionInfo ................................................................................. 31 
    Table 5-14  
    Csm_HashStart ........................................................................................ 31 
    Table 5-15  
    Csm_HashUpdate .................................................................................... 32 
    Table 5-16  
    Csm_HashFinish ...................................................................................... 33 
    Table 5-17  
    Csm_MacGenerateStart ........................................................................... 34 
    Table 5-18  
    Csm_MacGenerateUpdate ....................................................................... 35 
    Table 5-19  
    Csm_MacGenerateFinish ......................................................................... 36 
    Table 5-20  
    Csm_MacVerifyStart ................................................................................. 37 
    Table 5-21  
    Csm_MacVerifyUpdate ............................................................................. 38 
    Table 5-22  
    Csm_MacVerifyFinish ............................................................................... 39 
    Table 5-23  
    Csm_RandomSeedStart ........................................................................... 40 
    Table 5-24  
    Csm_RandomSeedUpdate ....................................................................... 41 
    Table 5-25  
    Csm_RandomSeedFinish ......................................................................... 42 
    Table 5-26  
    Csm_RandomGenerate ............................................................................ 43 
    Table 5-27  
    Csm_SymBlockEncryptStart ..................................................................... 44 
    Table 5-28  
    Csm_SymBlockEncryptUpdate ................................................................. 45 
    Table 5-29  
    Csm_SymBlockEncryptFinish ................................................................... 46 
    Table 5-30  
    Csm_SymBlockDecryptStart ..................................................................... 47 
    Table 5-31  
    Csm_SymBlockDecryptUpdate ................................................................. 47 
    Table 5-32  
    Csm_SymBlockDecryptFinish ................................................................... 48 
    Table 5-33  
    Csm_SymEncryptStart ............................................................................. 49 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-34  
    Csm_SymEncryptUpdate.......................................................................... 50 
    Table 5-35  
    Csm_SymEncryptFinish ........................................................................... 51 
    Table 5-36  
    Csm_SymDecryptStart ............................................................................. 52 
    Table 5-37  
    Csm_SymDecryptUpdate ......................................................................... 53 
    Table 5-38  
    Csm_SymDecryptFinish ........................................................................... 54 
    Table 5-39  
    Csm_AsymEncryptStart ............................................................................ 55 
    Table 5-40  
    Csm_AsymEncryptUpdate ........................................................................ 56 
    Table 5-41  
    Csm_AsymEncryptFinish .......................................................................... 57 
    Table 5-42  
    Csm_AsymDecryptStart ........................................................................... 58 
    Table 5-43  
    Csm_AsymDecryptUpdate ........................................................................ 59 
    Table 5-44  
    Csm_AsymDecryptFinish.......................................................................... 60 
    Table 5-45  
    Csm_SignatureGenerateStart ................................................................... 61 
    Table 5-46  
    Csm_SignatureGenerateUpdate ............................................................... 62 
    Table 5-47  
    Csm_SignatureGenerateFinish ................................................................. 63 
    Table 5-48  
    Csm_SignatureVerifyStart......................................................................... 64 
    Table 5-49  
    Csm_SignatureVerifyUpdate ..................................................................... 65 
    Table 5-50  
    Csm_SignatureVerifyFinish ....................................................................... 66 
    Table 5-51  
    Csm_ChecksumStart ................................................................................ 67 
    Table 5-52  
    Csm_ChecksumUpdate ............................................................................ 68 
    Table 5-53  
    Csm_ChecksumFinish .............................................................................. 68 
    Table 5-54  
    Csm_KeyDeriveStart ................................................................................ 69 
    Table 5-55  
    Csm_KeyDeriveUpdate ............................................................................ 70 
    Table 5-56  
    Csm_KeyDeriveFinish .............................................................................. 71 
    Table 5-57  
    Csm_KeyDeriveSymKey .......................................................................... 72 
    Table 5-58  
    Csm_KeyExchangeCalcPubVal ................................................................ 73 
    Table 5-59  
    Csm_KeyExchangeCalcSecretStart ......................................................... 74 
    Table 5-60  
    Csm_KeyExchangeCalcSecretUpdate...................................................... 75 
    Table 5-61  
    Csm_KeyExchangeCalcSecretFinish........................................................ 76 
    Table 5-62  
    Csm_KeyExchangeCalcSymKeyStart....................................................... 77 
    Table 5-63  
    Csm_KeyExchangeCalcSymKeyUpdate ................................................... 78 
    Table 5-64  
    Csm_KeyExchangeCalcSymKeyFinish ..................................................... 79 
    Table 5-65  
    Csm_SymKeyExtractStart ........................................................................ 80 
    Table 5-66  
    Csm_SymKeyExtractUpdate .................................................................... 81 
    Table 5-67  
    Csm_SymKeyExtractFinish ...................................................................... 82 
    Table 5-68  
    Csm_SymKeyWrapSymStart .................................................................... 83 
    Table 5-69  
    Csm_SymKeyWrapSymUpdate ................................................................ 84 
    Table 5-70  
    Csm_SymKeyWrapSymFinish .................................................................. 85 
    Table 5-71  
    Csm_SymKeyWrapAsymStart .................................................................. 86 
    Table 5-72  
    Csm_SymKeyWrapAsymUpdate .............................................................. 86 
    Table 5-73  
    Csm_SymKeyWrapAsymFinish ................................................................ 87 
    Table 5-74  
    Csm_AsymPublicKeyExtractStart ............................................................. 87 
    Table 5-75  
    Csm_AsymPublicKeyExtractUpdate ......................................................... 88 
    Table 5-76  
    Csm_AsymPublicKeyExtractFinish ........................................................... 89 
    Table 5-77  
    Csm_AsymPrivateKeyExtractStart ............................................................ 90 
    Table 5-78  
    Csm_AsymPrivateKeyExtractUpdate ........................................................ 90 
    Table 5-79  
    Csm_AsymPrivateKeyExtractFinish .......................................................... 91 
    Table 5-80  
    Csm_AsymPrivateKeyWrapSymStart ....................................................... 92 
    Table 5-81  
    Csm_AsymPrivateKeyWrapSymUpdate ................................................... 93 
    Table 5-82  
    Csm_AsymPrivateKeyWrapSymFinish ..................................................... 94 
    Table 5-83  
    Csm_AsymPrivateKeyWrapAsymStart ..................................................... 95 
    Table 5-84  
    Csm_AsymPrivateKeyWrapAsymUpdate ................................................. 96 
    Table 5-85  
    Csm_AsymPrivateKeyWrapAsymFinish ................................................... 97 
    Table 5-86  
    Services used by the CSM ........................................................................ 97 
    Table 5-87  
    Csm_HashCallbackNotification ................................................................. 98 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-88  
    Csm_HashServiceFinishNotification ......................................................... 98 
    Table 5-89  
    Csm_MacGenerateCallbackNotification .................................................... 99 
    Table 5-90  
    Csm_MacGenerateServiceFinishNotification ............................................ 99 
    Table 5-91  
    Csm_MacVerifyCallbackNotification ....................................................... 100 
    Table 5-92  
    Csm_MacVerifyServiceFinishNotification ................................................ 100 
    Table 5-93  
    Csm_RandomSeedCallbackNotification ................................................. 101 
    Table 5-94  
    Csm_RandomSeedServiceFinishNotification .......................................... 102 
    Table 5-95  
    Csm_RandomGenerateCallbackNotification ........................................... 102 
    Table 5-96  
    Csm_RandomGenerateServiceFinishNotification ................................... 103 
    Table 5-97  
    Csm_SymBlockEncryptCallbackNotification ........................................... 103 
    Table 5-98  
    Csm_SymBlockEncryptServiceFinishNotification .................................... 104 
    Table 5-99  
    Csm_SymBlockDecryptCallbackNotification ........................................... 104 
    Table 5-100  
    Csm_SymBlockDecryptServiceFinishNotification ................................... 105 
    Table 5-101  
    Csm_SymEncryptCallbackNotification .................................................... 106 
    Table 5-102  
    Csm_SymEncryptServiceFinishNotification ............................................ 106 
    Table 5-103  
    Csm_SymDecryptCallbackNotification .................................................... 107 
    Table 5-104  
    Csm_SymDecryptServiceFinishNotification ............................................ 107 
    Table 5-105  
    Csm_AsymEncryptCallbackNotification .................................................. 108 
    Table 5-106  
    Csm_AsymEncryptServiceFinishNotification........................................... 108 
    Table 5-107  
    Csm_AsymDecryptCallbackNotification .................................................. 109 
    Table 5-108  
    Csm_AsymDecryptServiceFinishNotification .......................................... 109 
    Table 5-109  
    Csm_SignatureGenerateCallbackNotification ......................................... 110 
    Table 5-110  
    Csm_SignatureGenerateServiceFinishNotification ................................. 110 
    Table 5-111  
    Csm_SignatureVerifyCallbackNotification ................................................ 111 
    Table 5-112  
    Csm_SignatureVerifyServiceFinishNotification ........................................ 111 
    Table 5-113  
    Csm_ChecksumCallbackNotification ...................................................... 112 
    Table 5-114  
    Csm_ChecksumServiceFinishNotification ............................................... 112 
    Table 5-115  
    Csm_KeyDeriveCallbackNotification ....................................................... 113 
    Table 5-116  
    Csm_KeyDeriveServiceFinishNotification ............................................... 113 
    Table 5-117  
    Csm_KeyDeriveSymKeyCallbackNotification.......................................... 114 
    Table 5-118  
    Csm_KeyDeriveSymKeyServiceFinishNotification .................................. 114 
    Table 5-119  
    Csm_KeyExchangeCalcPubValCallbackNotification ............................... 115 
    Table 5-120  
    Csm_KeyExchangeCalcPubValServiceFinishNotification ....................... 115 
    Table 5-121  
    Csm_KeyExchangeCalcSecretCallbackNotification ................................ 116 
    Table 5-122  
    Csm_KeyExchangeCalcSecretServiceFinishNotification ........................ 116 
    Table 5-123  
    Csm_KeyExchangeCalcSymKeyCallbackNotification ............................. 117 
    Table 5-124  
    Csm_KeyExchangeCalcSymKeyServiceFinishNotification ..................... 117 
    Table 5-125  
    Csm_SymKeyExtractCallbackNotification ............................................... 118 
    Table 5-126  
    Csm_SymKeyExtractServiceFinishNotification ....................................... 118 
    Table 5-127  
    Csm_SymKeyWrapSymCallbackNotification .......................................... 119 
    Table 5-128  
    Csm_SymKeyWrapSymServiceFinishNotification ................................... 119 
    Table 5-129  
    Csm_SymKeyWrapAsymCallbackNotification ......................................... 120 
    Table 5-130  
    Csm_SymKeyWrapAsymServiceFinishNotification ................................. 120 
    Table 5-131  
    Csm_AsymPublicKeyExtractCallbackNotification ................................... 121 
    Table 5-132  
    Csm_AsymPublicKeyExtractServiceFinishNotification ............................ 121 
    Table 5-133  
    Csm_AsymPrivateKeyExtractCallbackNotification .................................. 122 
    Table 5-134  
    Csm_AsymPrivateKeyExtractServiceFinishNotification .......................... 122 
    Table 5-135  
    Csm_AsymPrivateKeyWrapSymCallbackNotification .............................. 123 
    Table 5-136  
    Csm_AsymPrivateKeyWrapSymServiceFinishNotification ...................... 123 
    Table 5-137  
    Csm_AsymPrivateKeyWrapAsymCallbackNotification ............................ 124 
    Table 5-138  
    Csm_AsymPrivateKeyWrapAsymServiceFinishNotification .................... 124 
    Table 5-139  
    ServiceCallback ...................................................................................... 125 
    Table 8-1  
    Glossary ................................................................................................. 131 
    Table 8-2  
    Abbreviations .......................................................................................... 131 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    10 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    11 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    1.  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Initial version 
    2.00.00 
    DaVinci Configurator 5 support added 
    2.02.00 
    SafeBSW  
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    12 
    based on template version 5.2.0 



    Technical Reference MICROSAR CSM 
    2.  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module CSM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    CSM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    CSM_MODULE_ID   
    110 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The  Crypto  Service  Manager  (CSM)  is  an  abstraction  layer  to  offer  a  unique  access  to 
    underlying  basic  cryptographic  functionalities.  Therefore,  synchronous  or  asynchronous 
    services are provided for which several configurations may exist. 
    2.1  Architecture Overview 
    The following figure shows where the CSM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    13 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Figure 2-2 
    AUTOSAR architecture 
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  CSM.  These  interfaces 
    are described in chapter 5.  
     cmp Architecture_Print
    User Application
    Csm_<Service>Finish
    <Service>Callback
    Csm_<Service>Start
    Csm_<Service>Update
    Csm_<Service>
    «optional»
    Det_ReportError
    Csm_MainFunction
    RTE
    CSM
    Det
    «optional»
    «optional»
    Bsw M
    Csm_Init
    Cry_<Primitive>Start
    Cry_<Primitive>Finish
    Csm_<Service>CallbackNotification
    Cry_<Primitive>
    Cry_<Primitive>Update
    Csm_<Service>FinishNotification
    «async»
    «async»
    Cry
     
    Figure 2-3  Interfaces to adjacent modules of the CSM 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    14 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    3.  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    CSM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 7. 
    Vector Informatik provides further CSM functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    All mentioned services are supported (5.2) 
    Synchronous job processing 
    Asynchronous job processing 
    Development Error Detection 
    Debugging Concept 
    Configuration through BSWMD with DaVinci Configurator Pro 5 
    Ports and Port Interfaces (RTE Support) 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Interruption of job processing 
    No support of DEM 
    Table 3-2   Not supported AUTOSAR standard conform features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Unused service APIs can be deactivated 
    Table 3-3   Features provided beyond the AUTOSAR standard 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    15 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    3.2  Initialization 
    Before  calling  any  other  functionality  of  the  CSM  module  the  initialization  function 
    Csm_Init()  has  to  be  called  by  the  application.  The  initialization  call  shall  take  place 
    after initializing the corresponding cryptographic modules. 
    For API details refer to chapter 5.2.1 ‘Csm_Init’. 
    The CSM module assumes that some variables are initialized with certain values at start-
    up. As not all embedded targets support the initialization of RAM within the start-up code 
    the  CSM  module  provides  the  function  Csm_InitMemory().  This  function  has  to  be 
    called during start-up and before Csm_Init() is called. Refer also to chapter  7.3  ‘Memory 
    Initialization’
    .  
    For API details refer to chapter 5.2.2 ‘Csm_InitMemory’. 
    3.3  States 
    The  CSM  module  stores  a  state for every  service  which  clarifies  if  a  service  is  active  or 
    idle.  The  service  state  is  set  to  active  in  the  Csm_<Service>Start  function  if  the  return 
    value is CSM_E_OK. To reset a state to idle, e.g. due to service cancelation during update 
    process, the specific Csm_<Service>Finish function has to be called. 
    3.4  Main Functions 
    The  CSM  module  implementation  provides  one  main  function.  When  the  usage  of 
    asynchronous job processing is enabled, this main function has to be called cyclically on 
    task  level. The default  cycle  time  is 10  milliseconds. The main function  is  responsible  to 
    execute  active  services  by  calling  the  main  function  of  the  corresponding  cryptographic 
    primitive. 
    For API details refer to chapter 5.2.3 ‘Csm_MainFunction’. 
    3.5  Asynchronous Handling 
    There  are  some  differences  in  the  handling  between  asynchronous  and  synchronous 
    mode. Asynchronous services need external state machines in the application to track the 
    progress.  When  calling  Csm_<Service>Start()  the  specific  CRY  function  is  called.  The 
    function stores the provided pointer and data provided by the API internally. Processing of 
    data is triggered in  the specific Cry_<ServiceName>MainFunction(). The configured user 
    callback  function  indicates  that  the  processing  is  finished  carrying  the  result  of  the 
    operation.  Depending  on  the  result,  the  next  operation  can  be  performed  e.g. 
    Csm_<Service>Update(). Figure 3-1 depicts this sequence. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    16 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     sd General Processing (streaming approach, async mode)
    Asynchronous processing of the Csm 
    Scheduler
    Application
    Csm
    Cry_1
    Csm_<Service>Start(...)
    Cry_<ServiceName>Start(..)
    Csm_MainFunction()
    Cry_<ServiceName>MainFunction()
    Csm_<Service>CallbackNotification()
    UserCallbackFunction()
    Csm_<Service>Update(..)
    Cry_<ServiceName>Update(..)
    Csm_MainFunction()
    Cry_<ServiceName>MainFunction()
    Csm_<Service>CallbackNotification()
    UserCallbackFunction()
    Csm_<Service>Finish(..)
    Cry_<ServiceName>MainFunction()
    Csm_MainFunction()
    Cry_<ServiceName>MainFunction()
    Csm_<Service>CallbackNotification()
    UserCallbackFunction()
    Csm_<Service>FinishNotification()
     
    Figure 3-1  CSM asynchronous mode 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    17 
    based on template version 5.2.0 



    Technical Reference MICROSAR CSM 
     
     
     
    Caution 
    All input and output data buffers have to be valid during the whole processing, not only 
      for the execution of the service call itself. 
     
     
     
    3.6  Error Handling 
    3.6.1 
    Development Error Reporting 
    If 
    development 
    error 
    reporting 
    is 
    enabled 
    (i.e. 
    pre-compile 
    parameter 
    CSM_DEV_ERROR_REPORT == STD_ON), reporting of development errors is done by the 
    service 
    Std_ReturnType Det_ReportError 
       
    uint16 ModuleId, uint8 InstanceId, 
       
    uint8 ApiId, uint8 ErrorId ) 
    (5.3) 
    Please  refer  to  the  documentation  of  the  development  error  tracer  [2]  for  further 
    information and a detailed description of the API.  
    The reported CSM ID is 110. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x03 
    CSM_HASHSTART_ID 
    Csm_HashStart() 
    0x04 
    CSM_HASHUPDATE_ID 
    Csm_HashUpdate() 
    0x05 
    CSM_HASHFINISH_ID 
    Csm_HashFinish() 
    0x06 
    CSM_MACGENERATESTART_ID 
    Csm_MacGenerateStart() 
    0x07 
    CSM_MACGENERATEUPDATE_ID 
    Csm_MacGenerateUpdate() 
    0x08 
    CSM_MACGENERATEFINISH_ID 
    Csm_MacGenerateFinish() 
    0x09 
    CSM_MACVERIFYSTART_ID 
    Csm_MacVerifyStart() 
    0x0A  CSM_MACVERIFYUPDATE_ID 
    Csm_MacVerifyUpdate() 
    0x0B 
    CSM_MACVERIFYFINISH_ID 
    Csm_MacVerifyFinish() 
    0x0C 
    CSM_RANDOMSEEDSTART_ID 
    Csm_RandomSeedStart() 
    0x0D  CSM_RANDOMSEEDUPDATE_ID 
    Csm_RandomSeedUpdate() 
    0x0E 
    CSM_RANDOMSEEDFINISH_ID 
    Csm_RandomSeedFinish() 
    0x0F 
    CSM_RANDOMGENERATE_ID 
    Csm_RandomGenerate() 
    0x10 
    CSM_SYMBLOCKENCRYPTSTART_ID 
    Csm_SymBlockEncryptStart() 
    0x11 
    CSM_SYMBLOCKENCRYPTUPDATE_ID 
    Csm_SymBlockEncryptUpdate() 
    0x12 
    CSM_SYMBLOCKENCRYPTFINISH_ID 
    Csm_SymBlockEncryptFinish() 
    0x13 
    CSM_SYMBLOCKDECRYPTSTART_ID 
    Csm_SymBlockDecryptStart() 
    0x14 
    CSM_SYMBLOCKDECRYPTUPDATE_ID 
    Csm_SymBlockDecryptUpdate() 
    0x15 
    CSM_SYMBLOCKDECRYPTFINISH_ID 
    Csm_SymBlockDecryptFinish() 
    0x16 
    CSM_SYMENCRYPTSTART_ID 
    Csm_SymEncryptStart() 
    0x17 
    CSM_SYMENCRYPTUPDATE_ID 
    Csm_SymEncryptUpdate() 
    0x18 
    CSM_SYMENCRYPTFINISH_ID 
    Csm_SymEncryptFinish() 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    18 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Service ID 
    Service 
    0x19 
    CSM_SYMDECRYPTSTART_ID 
    Csm_SymDecryptStart() 
    0x1A  CSM_SYMDECRYPTUPDATE_ID 
    Csm_SymDecryptUpdate() 
    0x1B 
    CSM_SYMDECRYPTFINISH_ID 
    Csm_SymDecryptFinish() 
    0x1C 
    CSM_ASYMENCRYPTSTART_ID 
    Csm_AsymEncryptStart() 
    0x1D  CSM_ASYMENCRYPTUPDATE_ID 
    Csm_AsymEncryptUpdate() 
    0x1E 
    CSM_ASYMENCRYPTFINISH_ID 
    Csm_AsymEncryptFinish() 
    0x1F 
    CSM_ASYMDECRYPTSTART_ID 
    Csm_AsymDecryptStart() 
    0x20 
    CSM_ASYMDECRYPTUPDATE_ID 
    Csm_AsymDecryptUpdate() 
    0x21 
    CSM_ASYMDECRYPTFINISH_ID 
    Csm_AsymDecryptFinish() 
    0x22 
    CSM_SIGNATUREGENERATESTART_ID 
    Csm_SignatureGenerateStart() 
    0x23 
    CSM_SIGNATUREGENERATEUPDATE_ID 
    Csm_SignatureGenerateUpdate() 
    0x24 
    CSM_SIGNATUREGENERATEFINISH_ID 
    Csm_SignatureGenerateFinish() 
    0x25 
    CSM_SIGNATUREVERIFYSTART_ID 
    Csm_SignatureVerifyStart() 
    0x26 
    CSM_SIGNATUREVERIFYUPDATE_ID 
    Csm_SignatureVerifyUpdate() 
    0x27 
    CSM_SIGNATUREVERIFYFINISH_ID 
    Csm_SignatureVerifyFinish() 
    0x28 
    CSM_CHECKSUMSTART_ID 
    Csm_ChecksumStart() 
    0x29 
    CSM_CHECKSUMUPDATE_ID 
    Csm_ChecksumUpdate() 
    0x2A  CSM_CHECKSUMFINISH_ID 
    Csm_ChecksumFinish() 
    0x2B 
    CSM_KEYDERIVESTART_ID 
    Csm_KeyDeriveStart() 
    0x2C 
    CSM_KEYDERIVEUPDATE_ID 
    Csm_KeyDeriveUpdate() 
    0x2D  CSM_KEYDERIVEFINISH_ID 
    Csm_KeyDeriveFinish() 
    0x4C 
    CSM_KEYDERIVESYMKEY_ID 
    Csm_KeyDeriveSymKey() 
    0x2E 
    CSM_KEYEXCHANGECALCPUBVAL_ID 
    Csm_KeyExchangeCalcPubVal() 
    0x2F 
    CSM_KEYEXCHANGECALCSECRETSTART_ID 
    Csm_KeyExchangeCalcSecretStart() 
    0x30 
    CSM_KEYEXCHANGECALCSECRETUPDATE_ID 
    Csm_KeyExchangeCalcSecretUpdate() 
    0x31 
    CSM_KEYEXCHANGECALCSECRETFINISH_ID 
    Csm_KeyExchangeCalcSecretFinish() 
    0x3D  CSM_KEYEXCHANGECALCSYMKEYSTART_ID 
    Csm_KeyExchangeCalcSymKeyStart() 
    0x3E 
    CSM_KEYEXCHANGECALCSYMKEYUPDATE_ID 
    Csm_KeyExchangeCalcSymKeyUpdate() 
    0x3F 
    CSM_KEYEXCHANGECALCSYMKEYFINISH_ID 
    Csm_KeyExchangeCalcSymKeyFinish() 
    0x32 
    CSM_SYMKEYEXTRACTSTART_ID 
    Csm_SymKeyExtractStart() 
    0x33 
    CSM_SYMKEYEXTRACTUPDATE_ID 
    Csm_SymKeyExtractUpdate() 
    0x34 
    CSM_SYMKEYEXTRACTFINISH_ID 
    Csm_SymKeyExtractFinish() 
    0x40 
    CSM_SYMKEYWRAPSYMSTART_ID 
    Csm_SymKeyWrapSymStart() 
    0x41 
    CSM_SYMKEYWRAPSYMUPDATE_ID 
    Csm_SymKeyWrapSymUpdate() 
    0x42 
    CSM_SYMKEYWRAPSYMFINISH_ID 
    Csm_SymKeyWrapSymFinish() 
    0x43 
    CSM_SYMKEYWRAPASYMSTART_ID 
    Csm_SymKeyWrapAsymStart() 
    0x44 
    CSM_SYMKEYWRAPASYMUPDATE_ID 
    Csm_SymKeyWrapAsymUpdate() 
    0x45 
    CSM_SYMKEYWRAPASYMFINISH_ID 
    Csm_SymKeyWrapAsymFinish() 
    0x35 
    CSM_ASYMPUBLICKEYEXTRACTSTART_ID 
    Csm_AsymPublicKeyExtractStart() 
    0x36 
    CSM_ASYMPUBLICKEYEXTRACTUPDATE_ID 
    Csm_AsymPublicKeyExtractUpdate() 
    0x37 
    CSM_ASYMPUBLICKEYEXTRACTFINISH_ID 
    Csm_AsymPublicKeyExtractFinish() 
    0x38 
    CSM_ASYMPRIVATEKEYEXTRACTSTART_ID 
    Csm_AsymPrivateKeyExtractStart() 
    0x39 
    CSM_ASYMPRIVATEKEYEXTRACTUPDATE_ID 
    Csm_AsymPrivateKeyExtractUpdate() 
    0x3A  CSM_ASYMPRIVATEKEYEXTRACTFINISH_ID 
    Csm_AsymPrivateKeyExtractFinish() 
    0x46 
    CSM_ASYMPRIVATEKEYWRAPSYMSTART_ID 
    Csm_AsymPrivateKeyWrapSymStart() 
    0x47 
    CSM_ASYMPRIVATEKEYWRAPSYMUPDATE_ID 
    Csm_AsymPrivateKeyWrapSymUpdate() 
    0x48 
    CSM_ASYMPRIVATEKEYWRAPSYMFINISH_ID 
    Csm_AsymPrivateKeyWrapSymFinish() 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    19 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Service ID 
    Service 
    0x49 
    CSM_ASYMPRIVATEKEYWRAPASYMSTART_ID 
    Csm_AsymPrivateKeyWrapAsymStart() 
    0x4A  CSM_ASYMPRIVATEKEYWRAPASYMUPDATE_ID  Csm_AsymPrivateKeyWrapAsymUpdate() 
    0x4B 
    CSM_ASYMPRIVATEKEYWRAPASYMFINISH_ID 
    Csm_AsymPrivateKeyWrapAsymFinish() 
    Table 3-4   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01  CSM_E_PARAM_PTR_INVALID 
    API request called with invalid parameter (null 
    pointer). 
    0x02  CSM_E_SERVICE_NOT_STARTED 
    Requested service is not initialized. 
    0x03  CSM_E_PARAM_METHOD_INVALID 
    API request called with invalid parameter 
    (invalid method for selected service). 
    0x04  CSM_E_PARAM_KEY_TYPE_INVALID  API request called with invalid parameter 
    (invalid key type for selected service). 
    0x05  CSM_E_UNINT 
    API request called before initialization of CSM 
    module. 
    0x06  CSM_E_BUFFER_TOO_SMALL 
    Provided buffer for storing the result of a 
    computation is too small. 
    Table 3-5   Errors reported to DET 
     
    The following table shows which development error can occur on which services: 
    Check 
     
     
    D
    D
     
    LI
     
    E
    T
    A
     
    R
    LID
    A
     
    A
    T
    V
    S
    D_INV
    Service
    _
     
    T
    HO
    R_IN
    T
    T
    E
    P
    _NO
    E
    M
    M_
    IC
    M_
     
    V
    RA
    R
    RA
    A
    E
    A
    P
    S
    P
    UNINT
    _
    _
    _
    _
    _E
    _E
    _E
    _E
    M
    M
    M
    M
    CS
    CS
    CS
    CS
    Csm_MainFunction 
     
     
     
     
    Csm_<Service>Start 
     
     
     
     
    Csm_<Service>Update 
     
     
     
     
    Csm_<Service>Finish 
     
     
     
     
    Table 3-6   Development Error Reporting: Assignment of checks to services 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    20 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    3.6.2 
    Production Code Error Reporting 
    The current implementation of the CSM module does not report any production errors. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    21 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    4.  Integration 
    This chapter gives necessary information for the integration of the MICROSAR CSM into 
    an application environment of an ECU. 
    4.1  Scope of Delivery 
    The delivery of the CSM contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    Csm.c 
     
     
    This is the source file of the CSM 
    Csm.h 
     
     
    This is the header file of the CSM. 
    Csm_Cbk.h 
     
     
    This is the callback header file of the CSM 
    Csm_Types.h 
     
     
    This is the type definition header file of the CSM 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator Pro 5. 
    For more Information about  the configuration see chapter 6.2  Configuration with DaVinci 
    Configurator.
     
    File Name 
    Description 
    Csm_Cfg.h 
    This is the configuration header file. 
    Csm_Cfg.c 
    This is the configuration source file. 
    Table 4-2   Generated files 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    22 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    4.2  Include Structure 
    Figure  4-1  shows  the  include  structure  of  the  CSM.  Some  includes  are  optional  and 
    depend  on  the  configuration.  Cry<Primitve>.h  stands  for  every  used  cryptographic 
    primitive.  
     class IncludeStructure
    Source
    Header
    IncContainer
    Static
    «include»
    Csm.c
    Csm.h
    Csm_Cbk.h
    Csm_Compiler_Cfg.inc
    Det.h
    «in
    « cl
    in ud
    cl e
    u »
    de»
    «include»
    «include»
    Cry_<ServiceName>.c
    Cry_<ServiceName>.h
    Csm_Types.h
    Csm_MemMap.inc
    Std_Types.h
    «include»
    «include»
    «include»
    «include»
    Generated
    Csm_Cfg.c
    Csm_Cfg.h
     
    Figure 4-1  Include structure 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  (Table  4-3)  contains  the  memory  section  names  and  the  compiler 
    abstraction definitions of the CSM and illustrates their assignment among each other. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    23 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     
    Compiler Abstraction 
     
    Definitions 
    IT
    _INIT
     
    IN
    RO
    R
     
    A
     

    E
    V
     
    DE
    NS
    L_
    R_NO
    R_Z
    P
    Memory Mapping
    A
    A
    P
     
    _CO
    _CO
    _V
    _V
    _A
    Sections 
    M
    M
    M
    M
    M
    CS
    CS
    CS
    CS
    CS
    CSM_START_SEC_CODE 
     
     
     
     
     
    CSM_STOP_SEC_CODE 
    CSM_START_SEC_CONST_8BIT 
     
     
     
     
     
    CSM_STOP_SEC_CONST_8BIT 
    CSM_START_SEC_CONST_UNSPECIFIED 
     
     
     
     
     
    CSM_STOP_SEC_CONST_UNSPECIFIED 
    CSM_START_SEC_VAR_NOINIT_8BIT 
     
     
     
     
     
    CSM_STOP_SEC_VAR_NOINIT_8BIT 
    CSM_START_SEC_VAR_NOINIT_16BIT 
     
     
     
     
     
    CSM_STOP_SEC_VAR_NOINIT_16BIT 
    CSM_START_SEC_VAR_ZERO_INIT_8BIT 
     
     
     
     
     
    CSM_STOP_SEC_VAR_ZERO_INIT_8BIT 
    Table 4-3   Compiler abstraction and memory mapping 
    4.4 
    Critical Sections 
    The current implementation of the CSM module does not need any critical section. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    24 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.  API Description 
    For an interfaces overview please see Figure 2-3. 
    5.1  Type Definitions 
    The types defined by the CSM are described in this chapter. 
    Type Name 
    C-Type  Description 
    Value Range 
    Csm_ConfigIdType 
    uint16 
    Identification of a CSM 
    0..65535 
    service configuration via 
    a numeric identifier, that 
    is unique within a 
    service. 
    Csm_ReturnType 
    uint8 
    Return Type of the Csm 
    CSM_E_OK 
    Module 
    The execution of the called 
    function succeeded. 
    CSM_E_NOT_OK 
    The execution of the called 
    function failed 
    CSM_E_BUSY 
    The service request failed because 
    the service is still busy. 
    CSM_E_SMALL_BUFFER 
    The service request failed because 
    the provided buffer is too small to 
    store the result of the service. 
    CSM_E_ENTROPY_EXHAUSION 
    The service request failed because 
    the entropy of the random number 
    generator is exhausted. 
    Csm_AlignType 
    uint8, 
    A scalar type which has 
      
    uint16,  maximum alignment 
    uint32 
    restrictions on the given 
    platform. This value is 
    configured by 
    CsmMaxAlignScalarType 
    Csm_VerifyResultType  uint8 
     
    CSM_E_VER_OK 
    The result of the verification is 
    "true". 
    CSM_E_VER_NOT_OK 
    The result of the verification is 
    "false". 
    Csm_CallbackType* 
    Std_Ret Function pointer for 
     
    urnType  service notification 
    callback. 
    Table 5-1   Type definitions 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    25 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     
    Csm_AsymPublicKeyType 
    This structure represents a public asymmetrical key. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_ASYM_PUB_KEY_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-2   Csm_AsymPublicKeyType 
    Csm_AsymPrivateKeyType 
    This structure represents a private asymmetrical key. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_ASYM_PUB_KEY_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-3   Csm_AsymPivateKeyType 
    Csm_SymKeyType 
    This structure represents a symmetrical key. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_ASYM_PRIV_KEY_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-4   Csm_SymKeyType 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    26 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Csm_SymKeyType 
    This structure represents a symmetrical key. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_SYM_KEY_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-5   Csm_SymKeyType 
    Csm_KeyExchangeBaseType 
    This structure represents base type information of the key exchange protocol. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_KEY_EX_BASE_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-6   Csm_KeyExchangeBaseType 
    Csm_KeyExchangePrivateType 
    This structure represents private information of the key exchange protocol. 
    Struct Element  C-Type 
    Description 
    Value Range 
    Name 
    length 
    uint32 
    This element contains 
    0..4294967295 
    the length of the key 
    stored in element 'data' 
    This element contains 
    CSM_KEY_EX_PRIV_MAX_SIZE 
    data 
    Csm_AlignType  the key data or a key 
    handle. 
    Table 5-7   Csm_KeyExchangePrivateType 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    27 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Csm_<Service>ConfigType 
    This structure is defined for each service and represents the configuration of this service. 
    The  parameters  of  the  several  function  pointers  depend  on  the  service  and  are  nearly 
    equal to the corresponding Csm Service function. Only the CfgId, which is part of every 
    Csm service function, will be replaced by the corresponding PrimitiveConfigPtr. 
    Struct Element Name  C-Type 
    Description 
    ConfigId 
    Csm_ConfigIdType  The numeric identifier of a configuration. 
    A pointer to the callback function which shall be 
    called when the configured service has finished. 
    CallbackFct* 
    Csm_CallbackType  This Element is only available if 
    "CsmUseSyncJobProcessing" is disabled. 
    This element shall only exist if the service contains 
    the function Csm_<Service>Start. It is a pointer to 
    PrimitiveStartFct* 
    Csm_ReturnType 
    the function Cry_<Primitive>Start of the configured 
    cryptographic primitive.  
    This element shall only exist if the service contains 
    the function Csm_<Service>Update. It is a pointer 
    PrimitiveUpdateFct* 
    Csm_ReturnType 
    to the function Cry_<Primitive>Update of the 
    configured cryptographic primitive.  
    This element shall only exist if the service contains 
    the function Csm_<Service>Finish. It is a pointer 
    PrimitiveFinishFct* 
    Csm_ReturnType 
    to the function Cry_<Primitive>Finish of the 
    configured cryptographic primitive.  
    This element shall only exist if the service contains 
    the function Csm_<Service>. It is a pointer to the 
    PrimitiveFct* 
    Csm_ReturnType 
    function Cry_<Primitive> of the configured 
    cryptographic primitive.  
    A pointer to the function 
    PrimitiveMainFct* 
    void 
    Cry_<Primitive>MainFunction of the configured 
    cryptographic primitive. 
    A pointer to the configuration of the underlying 
    PrimitiveConfigPtr* 
    void 
    cryptographic primitive. 
    Table 5-8   Csm_<Service>ConfigType 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    28 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2  Services provided by CSM 
    5.2.1 
    Csm_Init 
    Prototype 
    void Csm_Init (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function initializes the CSM. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called during start-up. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-9   Csm_Init 
    5.2.2 
    Csm_InitMemory 
    Prototype 
    void Csm_InitMemory (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    If RAM is not automatically initialized at start-up, this function must be called from start-up code to ensure 
    that variables which must be initialized with a certain value (e.g. initialization status with UNINIT value) are 
    set to those values. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called during start-up before the initialization is executed. 
    >  This function is a Vector Extension. Refer also to chapter 7.3 ‘Memory Initialization’. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-10   Csm_InitMemory 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    29 
    based on template version 5.2.0 



    Technical Reference MICROSAR CSM 
    5.2.3 
    Csm_MainFunction 
    Prototype 
    void Csm_MainFunction (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the asynchronous service handling. 
     
     
    Note 
    This function is empty if ‘Use Sync Job Processing’ is enabled. 
     
     
     
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called cyclically on task level by BSW Scheduler. 
    >  This function must not be called by the application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-11   Csm_MainFunction 
    5.2.4 
    Csm_Interruption 
    Prototype 
    void Csm_Interruption (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function has no functionality and exists only for compatibility reasons. 
    Particularities and Limitations 
    >  This function has no functionality. 
    Call Context 
    >  This function can be called from task and interrupt level. 
    Table 5-12   Csm_Interruption 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    30 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.5 
    Csm_GetVersionInfo 
    Prototype 
    void Csm_GetVersionInfo (Std_VersionInfoType *csmVerInfoPtr) 
    Parameter 
    csmVerInfoPtr 
    Pointer where the version information shall be copied to. 
    Return code 

     
    Functional Description 
    This function copies the CSM version information to the location provided by the pointer. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is only available if ‘Version Info Api” is enabled. 
    Call Context 
    >  This function can be called from task and interrupt level. 
    Table 5-13   Csm_GetVersionInfo 
    5.2.6 
    Csm_HashStart 
    Prototype 
    Csm_ReturnType Csm_HashStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the hash computation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-14   Csm_HashStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    31 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.7 
    Csm_HashUpdate 
    Prototype 
    Csm_ReturnType Csm_HashUpdate (Csm_ConfigIdType cfgId, const uint8 
    *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a hash value shall be computed. 
    dataLength 
    Contains the number of bytes for which the hash value shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the hash computation service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-15   Csm_HashUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    32 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.8 
    Csm_HashFinish 
    Prototype 
    Csm_ReturnType Csm_HashFinish (Csm_ConfigIdType cfgId, uint8 
    *resultPtr, uint32 *resultLengthPtr, boolean truncationIsAllowed) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    resultPtr 
    Holds a pointer to the memory location which will hold the hash value. If the 
    hash value does not fit into the given buffer, and truncation is allowed, the 
    result shall be truncated. 
    resultLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned hash value shall be stored. 
    truncationIsAllowed 
    This parameter states whether a truncation of the result is allowed or not. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the hash computation service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-16   Csm_HashFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    33 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.9 
    Csm_MacGenerateStart 
    Prototype 
    Csm_ReturnType Csm_MacGenerateStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the MAC generation 
    operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the MAC generation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-17   Csm_MacGenerateStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    34 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.10  Csm_MacGenerateUpdate 
    Prototype 
    Csm_ReturnType Csm_MacGenerateUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the MAC generation service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-18   Csm_MacGenerateUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    35 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     
    5.2.11  Csm_MacGenerateFinish 
    Prototype 
    Csm_ReturnType Csm_MacGenerateFinish (Csm_ConfigIdType cfgId, uint8 
    *resultPtr, uint32 *resultLengthPtr, boolean truncationIsAllowed) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    resultPtr 
    Holds a pointer to the memory location which will hold the MAC. If the MAC 
    does not fit into the given buffer, and truncation is allowed, the result shall be 
    truncated. 
    resultLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned MAC shall be stored. 
    truncationIsAllowed 
    This parameter states whether a truncation of the result is allowed or not. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the MAC generation service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-19   Csm_MacGenerateFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    36 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.12  Csm_MacVerifyStart 
    Prototype 
    Csm_ReturnType Csm_MacVerifyStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the MAC verification 
    operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the MAC verification service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-20   Csm_MacVerifyStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    37 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.13  Csm_MacVerifyUpdate 
    Prototype 
    Csm_ReturnType Csm_MacVerifyUpdate (Csm_ConfigIdType cfgId, const uint8 
    *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a MAC shall be computed. 
    dataLength 
    Contains the number of bytes for which the MAC shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the MAC verification service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-21   Csm_MacVerifyUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    38 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.14  Csm_MacVerifyFinish 
    Prototype 
    Csm_ReturnType Csm_MacVerifyFinish (Csm_ConfigIdType cfgId, const uint8 
    *MacPtr, uint32 MacLength, Csm_VerifyResultType *resultPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    MacPtr 
    Holds a pointer to the memory location which will hold the MAC to verify. 
    MacLength 
    Holds the length of the MAC to be verified. Note: the computed MAC will be 
    internally truncated to this 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the 
    verification. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the MAC verification service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-22   Csm_MacVerifyFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    39 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.15  Csm_RandomSeedStart 
    Prototype 
    Csm_ReturnType Csm_RandomSeedStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the random seed service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-23   Csm_RandomSeedStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    40 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.16  Csm_RandomSeedUpdate 
    Prototype 
    Csm_ReturnType Csm_RandomSeedUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *seedPtr, uint32 seedLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    seedPtr 
    Holds a pointer to a source of entropy which is used to provide a seed for the 
    random number generator. 
    seedLength 
    Contains the number of bytes for which the seed shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the random seed service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-24   Csm_RandomSeedUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    41 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.17  Csm_RandomSeedFinish 
    Prototype 
    Csm_ReturnType Csm_RandomSeedFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY  
    Request failed, service is still busy.  
    Functional Description 
    This interface shall be used to finish the random seed service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-25   Csm_RandomSeedFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    42 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.18  Csm_RandomGenerate 
    Prototype 
    Csm_ReturnType Csm_RandomGenerate (Csm_ConfigIdType cfgId, uint8 
    *resultPtr, uint32 resultLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    resultPtr 
    Holds a pointer to the memory location which will hold the random number. 
    resultLength 
    Contains the number of bytes for which the random number shall be 
    computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the random number generation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-26   Csm_RandomGenerate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    43 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.19  Csm_SymBlockEncryptStart 
    Prototype 
    Csm_ReturnType Csm_SymBlockEncryptStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical block 
    encryption operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical block encryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-27   Csm_SymBlockEncryptStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    44 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.20  Csm_SymBlockEncryptUpdate 
    Prototype 
    Csm_ReturnType Csm_SymBlockEncryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *plainTextPtr, uint32 plainTextLength, uint8 *cipherTextPtr, 
    uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    plainTextPtr 
    Holds a pointer to the data for which a encrypted text shall be computed. 
    plainTextLength 
    Contains the number of bytes for which the encrypted text shall be computed. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical block encryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-28   Csm_SymBlockEncryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    45 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.21  Csm_SymBlockEncryptFinish 
    Prototype 
    Csm_ReturnType Csm_SymBlockEncryptFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the symmetrical block encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-29   Csm_SymBlockEncryptFinish 
    5.2.22  Csm_SymBlockDecryptStart 
    Prototype 
    Csm_ReturnType Csm_SymBlockDecryptStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical block 
    decryption operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical block decryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    46 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-30   Csm_SymBlockDecryptStart 
    5.2.23  Csm_SymBlockDecryptUpdate 
    Prototype 
    Csm_ReturnType Csm_SymBlockDecryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *cipherTextPtr, uint32 cipherTextLength, uint8 *plainTextPtr, 
    uint32 *plainTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    cipherTextPtr 
    Holds a pointer to the data for which a decrypted text shall be computed. 
    cipherTextLength 
    Contains the number of bytes for which the decrypted text shall be computed. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical block decryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-31   Csm_SymBlockDecryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    47 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.24  Csm_SymBlockDecryptFinish 
    Prototype 
    Csm_ReturnType Csm_SymBlockDecryptFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the symmetrical block decryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-32   Csm_SymBlockDecryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    48 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.25  Csm_SymEncryptStart 
    Prototype 
    Csm_ReturnType Csm_SymEncryptStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    encryption operation. 
    InitVectorPtr 
    Holds a pointer to the initialisation vector which has to be used. 
    InitVectorLength 
    Contains the number of bytes provided as the initialisation vector. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical encryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-33   Csm_SymEncryptStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    49 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.26  Csm_SymEncryptUpdate 
    Prototype 
    Csm_ReturnType Csm_SymEncryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *plainTextPtr, uint32 plainTextLength, uint8 *cipherTextPtr, 
    uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    plainTextPtr 
    Holds a pointer to the data for which a encrypted text shall be computed. 
    plainTextLength 
    Contains the number of bytes for which the encrypted text shall be computed. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical encryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-34   Csm_SymEncryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    50 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.27  Csm_SymEncryptFinish 
    Prototype 
    Csm_ReturnType Csm_SymEncryptFinish (Csm_ConfigIdType cfgId, uint8 
    *cipherTextPtr, uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-35   Csm_SymEncryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    51 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.28  Csm_SymDecryptStart 
    Prototype 
    Csm_ReturnType Csm_SymDecryptStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr, const uint8 *InitVectorPtr, uint32 
    InitVectorLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical 
    decryption operation. 
    InitVectorPtr 
    Holds a pointer to initialisation vector which has to be used during the 
    symmetrical decryption. 
    InitVectorLength 
    Holds a pointer to the initialisation vector which has to be used during the 
    symmetrical decryption. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical decryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-36   Csm_SymDecryptStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    52 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.29  Csm_SymDecryptUpdate 
    Prototype 
    Csm_ReturnType Csm_SymDecryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *cipherTextPtr, uint32 cipherTextLength, uint8 *plainTextPtr, 
    uint32 *plainTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    cipherTextPtr 
    Holds a pointer to the data for which a decrypted text shall be computed. 
    cipherTextLength 
    Contains the number of bytes for which the decrypted text shall be computed. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the symmetrical decryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-37   Csm_SymDecryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    53 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.30  Csm_SymDecryptFinish 
    Prototype 
    Csm_ReturnType Csm_SymDecryptFinish (Csm_ConfigIdType cfgId, uint8 
    *plainTextPtr, uint32 *plainTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the symmetrical decryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-38   Csm_SymDecryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    54 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.31  Csm_AsymEncryptStart 
    Prototype 
    Csm_ReturnType Csm_AsymEncryptStart (Csm_ConfigIdType cfgId, const 
    Csm_AsymPublicKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the asymmetrical 
    encryption operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the asymmetrical encryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-39   Csm_AsymEncryptStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    55 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.32  Csm_AsymEncryptUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymEncryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *plainTextPtr, uint32 plainTextLength, uint8 *cipherTextPtr, 
    uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    plainTextPtr 
    Holds a pointer to the data for which a encrypted text shall be computed. 
    plainTextLength 
    Contains the number of bytes for which the encrypted text shall be computed. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the asymmetrical encryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-40   Csm_AsymEncryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    56 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.33  Csm_AsymEncryptFinish 
    Prototype 
    Csm_ReturnType Csm_AsymEncryptFinish (Csm_ConfigIdType cfgId, uint8 
    *cipherTextPtr, uint32 *cipherTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    cipherTextPtr 
    Holds a pointer to the memory location which will hold the encrypted text. 
    cipherTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned encrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the asymmetrical encryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-41   Csm_AsymEncryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    57 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.34  Csm_AsymDecryptStart 
    Prototype 
    Csm_ReturnType Csm_AsymDecryptStart (Csm_ConfigIdType cfgId, const 
    Csm_AsymPrivateKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the asymmetrical 
    decryption operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the asymmetrical decryption service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-42   Csm_AsymDecryptStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    58 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.35  Csm_AsymDecryptUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymDecryptUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *cipherTextPtr, uint32 cipherTextLengthPtr, uint8 *plainTextPtr, 
    uint32 *plainTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    cipherTextPtr 
    Holds a pointer to the data for which a decrypted text shall be computed. 
    cipherTextLengthPtr 
    Contains the number of bytes for which the decrypted text shall be computed. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to feed the asymmetrical decryption service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-43   Csm_AsymDecryptUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    59 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.36  Csm_AsymDecryptFinish 
    Prototype 
    Csm_ReturnType Csm_AsymDecryptFinish (Csm_ConfigIdType cfgId, uint8 
    *plainTextPtr, uint32 *plainTextLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    plainTextPtr 
    Holds a pointer to the memory location which will hold the decrypted text. 
    plainTextLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned decrypted text shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the asymmetrical decryption service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-44   Csm_AsymDecryptFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    60 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.37  Csm_SignatureGenerateStart 
    Prototype 
    Csm_ReturnType Csm_SignatureGenerateStart (Csm_ConfigIdType cfgId, 
    const Csm_AsymPrivateKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the signature generate 
    operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the signature generate service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-45   Csm_SignatureGenerateStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    61 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.38  Csm_SignatureGenerateUpdate 
    Prototype 
    Csm_ReturnType Csm_SignatureGenerateUpdate (Csm_ConfigIdType cfgId, 
    const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a signature shall be computed. 
    dataLength 
    Contains the number of bytes for which the signature shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the signature generate service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-46   Csm_SignatureGenerateUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    62 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.39  Csm_SignatureGenerateFinish 
    Prototype 
    Csm_ReturnType Csm_SignatureGenerateFinish (Csm_ConfigIdType cfgId, 
    uint8 *resultPtr, uint32 *resultLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    resultPtr 
    Holds a pointer to the memory location which will hold the signature. 
    resultLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned signature shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the signature generate service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-47   Csm_SignatureGenerateFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    63 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.40  Csm_SignatureVerifyStart 
    Prototype 
    Csm_ReturnType Csm_SignatureVerifyStart (Csm_ConfigIdType cfgId, const 
    Csm_AsymPublicKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the signature 
    verification operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the signature verification service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-48   Csm_SignatureVerifyStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    64 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.41  Csm_SignatureVerifyUpdate 
    Prototype 
    Csm_ReturnType Csm_SignatureVerifyUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a signature shall be computed. 
    dataLength 
    Contains the number of bytes for which the signature shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the signature verification service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-49   Csm_SignatureVerifyUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    65 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.42  Csm_SignatureVerifyFinish 
    Prototype 
    Csm_ReturnType Csm_SignatureVerifyFinish (Csm_ConfigIdType cfgId, const 
    uint8 *signaturePtr, uint32 signatureLength, Csm_VerifyResultType 
    *resultPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    signaturePtr 
    Holds a pointer to the memory location which holds the signature to be 
    verified. 
    signatureLength 
    Holds the length of the Signature to be verified 
    resultPtr 
    Holds a pointer to the memory location which will hold the result of the 
    signature verification. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the signature verification service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-50   Csm_SignatureVerifyFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    66 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.43  Csm_ChecksumStart 
    Prototype 
    Csm_ReturnType Csm_ChecksumStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the checksum generation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-51   Csm_ChecksumStart 
    5.2.44  Csm_ChecksumUpdate 
    Prototype 
    Csm_ReturnType Csm_ChecksumUpdate (Csm_ConfigIdType cfgId, const uint8 
    *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data for which a checksum shall be computed. 
    dataLength 
    Contains the number of bytes for which the checksum shall be computed. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the checksum generation service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    67 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-52   Csm_ChecksumUpdate 
    5.2.45  Csm_ChecksumFinish 
    Prototype 
    Csm_ReturnType Csm_ChecksumFinish (Csm_ConfigIdType cfgId, uint8 
    *resultPtr, uint32 *resultLengthPtr, boolean truncationIsAllowed) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    resultPtr 
    Holds a pointer to the memory location which will hold the checksum. If the 
    checksum does not fit into the given buffer, and truncation is allowed, the 
    result shall be truncated. 
    resultLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned checksum shall be stored. 
    truncationIsAllowed 
    This parameter states whether a truncation of the result is allowed or not. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the checksum generation service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-53   Csm_ChecksumFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    68 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.46  Csm_KeyDeriveStart 
    Prototype 
    Csm_ReturnType Csm_KeyDeriveStart (Csm_ConfigIdType cfgId, uint32 
    keyLength, uint32 iterations) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyLength 
    Holds the length of the key to be derived by the underlying key derivation 
    primitive. 
    iterations 
    Holds the number of iterations to be performed by the underlying key 
    derivation primitive. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the Key Derivation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-54   Csm_KeyDeriveStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    69 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.47  Csm_KeyDeriveUpdate 
    Prototype 
    Csm_ReturnType Csm_KeyDeriveUpdate (Csm_ConfigIdType cfgId, const uint8 
    *passwordPtr, uint32 passwordLength, const uint8 *saltPtr, uint32 
    saltLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    passwordPtr 
    Holds a pointer to the password, i.e. the original key, from which to derive a 
    new key. 
    passwordLength 
    Holds the length of the password in bytes. 
    saltPtr 
    Holds a pointer to the cryptographic salt, i.e. a random number, for the 
    underlying primitive. 
    saltLength 
    Holds the length of the salt in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the Key Derivation service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-55   Csm_KeyDeriveUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    70 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.48  Csm_KeyDeriveFinish 
    Prototype 
    Csm_ReturnType Csm_KeyDeriveFinish (Csm_ConfigIdType cfgId, 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the memory location which will hold the derived key. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    Functional Description 
    This interface shall be used to finish the Key Derivation service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-56   Csm_KeyDeriveFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    71 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.49  Csm_KeyDeriveSymKey 
    Prototype 
    Csm_ReturnType Csm_KeyDeriveSymKey (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *baseKeyPtr, const uint8 *customisationValPtr, uint32 
    customisationValLength, Csm_SymKeyType *derivedKeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    baseKeyPtr 
    Holds a pointer to the key from which the new key shall be derived. 
    customisationValPtr 
    Holds a pointer to the customisation value (if any). 
    customisationValLength 
    Holds the length of the customisation value in bytes. 
    derivedKeyPtr 
    Holds a pointer to the memory location which will hold the result of the key 
    derivation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the Key Derivation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-57   Csm_KeyDeriveSymKey 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    72 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.50  Csm_KeyExchangeCalcPubVal 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcPubVal (Csm_ConfigIdType cfgId, const 
    Csm_KeyExchangeBaseType *basePtr, const Csm_KeyExchangePrivateType 
    *privateValuePtr, uint8 *publicValuePtr, uint32 *publicValueLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    basePtr 
    holds a pointer to the base information known to both users of the key 
    exchange protocol. 
    privateValuePtr 
    Holds a pointer to the private information known only to the current user of the 
    key exchange protocol. 
    publicValuePtr 
    Holds a pointer to the memory location which will hold the public value. 
    publicValueLengthPtr 
    Holds a pointer to the number of bytes for the input buffer and the number of 
    actual written bytes if the request was successful. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to initialize the public value calculation service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-58   Csm_KeyExchangeCalcPubVal 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    73 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.51  Csm_KeyExchangeCalcSecretStart 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSecretStart (Csm_ConfigIdType cfgId, 
    const Csm_KeyExchangeBaseType *basePtr, const 
    Csm_KeyExchangePrivateType *privateValuePtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    basePtr 
    Holds a pointer to the base information known to both users of the key 
    exchange protocol. 
    privateValuePtr 
    Holds a pointer to the private information known only to the current user of the 
    key exchange protocol. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the Key Exchange service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-59   Csm_KeyExchangeCalcSecretStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    74 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.52  Csm_KeyExchangeCalcSecretUpdate 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSecretUpdate (Csm_ConfigIdType cfgId, 
    const uint8 *partnerPublicValuePtr, uint32 partnerPublicValueLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    partnerPublicValuePtr 
    Holds a pointer to the data representing the public value of the key exchange 
    partner. 
    partnerPublicValueLength  Holds the length of the part of the partner value in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the Key Exchange service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-60   Csm_KeyExchangeCalcSecretUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    75 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.53  Csm_KeyExchangeCalcSecretFinish 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSecretFinish (Csm_ConfigIdType cfgId, 
    uint8 *sharedSecretPtr, uint32 *sharedSecretLengthPtr, boolean 
    truncationIsAllowed) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    sharedSecretPtr 
    Holds a pointer to the memory location which will hold the secret key. If the 
    secret key does not fit into the given buffer, and truncation is allowed, the 
    result shall be truncated. 
    sharedSecretLengthPtr 
    Holds a pointer to the number of bytes for which a secret key shall be 
    computed. 
    truncationIsAllowed 
    This parameter states whether a truncation of the result is allowed or not. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy.  
    CSM_E_SMALL_BUFFER  The provided buffer is too small to store the result and truncation was not 
    allowed. 
    Functional Description 
    This interface shall be used to finish the Key Exchange service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-61   Csm_KeyExchangeCalcSecretFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    76 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.54  Csm_KeyExchangeCalcSymKeyStart 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSymKeyStart (Csm_ConfigIdType cfgId, 
    const Csm_KeyExchangeBaseType *basePtr, const 
    Csm_KeyExchangePrivateType *privateValuePtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    basePtr 
    Holds a pointer to the base information known to both users of the key 
    exchange protocol. 
    privateValuePtr 
    Holds a pointer to the private information known only to the current user of the 
    key exchange protocol. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the key exchange service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-62   Csm_KeyExchangeCalcSymKeyStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    77 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.55  Csm_KeyExchangeCalcSymKeyUpdate 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSymKeyUpdate (Csm_ConfigIdType cfgId, 
    const uint8 *partnerPublicValuePtr, uint32 partnerPublicValueLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    partnerPublicValuePtr 
    Holds a pointer to the data representing the public value of the key exchange 
    partner. 
    partnerPublicValueLength  Holds the length of the part of the partner value in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the key exchange service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-63   Csm_KeyExchangeCalcSymKeyUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    78 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.56  Csm_KeyExchangeCalcSymKeyFinish 
    Prototype 
    Csm_ReturnType Csm_KeyExchangeCalcSymKeyFinish (Csm_ConfigIdType cfgId, 
    Csm_SymKeyType *sharedKeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    sharedKeyPtr 
    Holds a pointer to the memory location which will hold the shared key. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the key exchange service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-64   Csm_KeyExchangeCalcSymKeyFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    79 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.57  Csm_SymKeyExtractStart 
    Prototype 
    Csm_ReturnType Csm_SymKeyExtractStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the key which has to be used during the symmetrical key 
    extraction operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical key extraction service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-65   Csm_SymKeyExtractStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    80 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.58  Csm_SymKeyExtractUpdate 
    Prototype 
    Csm_ReturnType Csm_SymKeyExtractUpdate (Csm_ConfigIdType cfgId, const 
    uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data which contains the key in a format which cannot be 
    used directly by the CSM. From this data the key will be extracted in a CSM-
    conforming format. 
    dataLength 
    Holds the length of the data in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the symmetrical key extraction service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-66   Csm_SymKeyExtractUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    81 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.59  Csm_SymKeyExtractFinish 
    Prototype 
    Csm_ReturnType Csm_SymKeyExtractFinish (Csm_ConfigIdType cfgId, 
    Csm_SymKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to a structure where the result (i.e. the symmetrical key) is 
    stored in. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the symmetrical key extraction service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-67   Csm_SymKeyExtractFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    82 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.60  Csm_SymKeyWrapSymStart 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapSymStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr, const Csm_SymKeyType *wrappingkeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the symmetric key to be wrapped. 
    wrappingkeyPtr 
    Holds a pointer to the key used for wrapping. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical key wrapping service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-68   Csm_SymKeyWrapSymStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    83 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.61  Csm_SymKeyWrapSymUpdate 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapSymUpdate (Csm_ConfigIdType cfgId, uint8 
    *dataPtr, uint32 *dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the memory location which will hold the first chunk of the 
    result of the key wrapping. If the result does not fit into the given buffer, the 
    caller shall call the service again, until *dataLengthPtr is equal to zero, 
    indicating that the complete result has been retrieved. 
    dataLength 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned wrapped key shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the symmetrical key wrapping service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-69   Csm_SymKeyWrapSymUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    84 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.62  Csm_SymKeyWrapSymFinish 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapSymFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the symmetrical key wrapping service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-70   Csm_SymKeyWrapSymFinish 
    5.2.63  Csm_SymKeyWrapAsymStart 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapAsymStart (Csm_ConfigIdType cfgId, const 
    Csm_SymKeyType *keyPtr, const Csm_AsymPublicKeyType *wrappingkeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the symmetric key to be wrapped. 
    wrappingkeyPtr 
    Holds a pointer to the key used for wrapping. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the symmetrical key wrapping service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    85 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-71   Csm_SymKeyWrapAsymStart 
    5.2.64  Csm_SymKeyWrapAsymUpdate 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapAsymUpdate (Csm_ConfigIdType cfgId, uint8 
    *dataPtr, uint32 *dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the memory location which will hold the first chunk of the 
    result of the key wrapping. If the result does not fit into the given buffer, the 
    caller shall call the service again, until *dataLengthPtr is equal to zero, 
    indicating that the complete result has been retrieved. 
    dataLength 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned wrapped key shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the symmetrical key wrapping service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-72   Csm_SymKeyWrapAsymUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    86 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.65  Csm_SymKeyWrapAsymFinish 
    Prototype 
    Csm_ReturnType Csm_SymKeyWrapAsymFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the symmetrical key wrapping service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-73   Csm_SymKeyWrapAsymFinish 
    5.2.66  Csm_AsymPublicKeyExtractStart 
    Prototype 
    Csm_ReturnType Csm_AsymPublicKeyExtractStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the public key extraction service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-74   Csm_AsymPublicKeyExtractStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    87 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.67  Csm_AsymPublicKeyExtractUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymPublicKeyExtractUpdate (Csm_ConfigIdType cfgId, 
    const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data which contains the key in a format which cannot be 
    used directly by the CSM. From this data the key will be extracted in a CSM-
    conforming format. 
    dataLength 
    Holds the length of the data in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the public key extraction service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-75   Csm_AsymPublicKeyExtractUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    88 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.68  Csm_AsymPublicKeyExtractFinish 
    Prototype 
    Csm_ReturnType Csm_AsymPublicKeyExtractFinish (Csm_ConfigIdType cfgId, 
    Csm_AsymPublicKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to a structure where the result (i.e. the asymmetrical public 
    key) is stored in. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the public key extraction service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-76   Csm_AsymPublicKeyExtractFinish 
    5.2.69  Csm_AsymPrivateKeyExtractStart 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyExtractStart (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the private key extraction service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    89 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-77   Csm_AsymPrivateKeyExtractStart 
    5.2.70  Csm_AsymPrivateKeyExtractUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyExtractUpdate (Csm_ConfigIdType cfgId, 
    const uint8 *dataPtr, uint32 dataLength) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the data which contains the key in a format which cannot be 
    used directly by the CSM. From this data the key will be extracted in a CSM-
    conforming format. 
    dataLength 
    Holds the length of the data in bytes. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the private key extraction service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-78   Csm_AsymPrivateKeyExtractUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    90 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.71  Csm_AsymPrivateKeyExtractFinish 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyExtractFinish (Csm_ConfigIdType cfgId, 
    Csm_AsymPrivateKeyType *keyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to a structure where the result (i.e. the asymmetrical private 
    key) is stored in. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the private key extraction service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-79   Csm_AsymPrivateKeyExtractFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    91 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.72  Csm_AsymPrivateKeyWrapSymStart 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapSymStart (Csm_ConfigIdType cfgId, 
    const Csm_AsymPrivateKeyType *keyPtr, const Csm_SymKeyType 
    *wrappingkeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the private key to be wrapped. 
    wrappingkeyPtr 
    Holds a pointer to the public key used for wrapping. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the asymmetrical key wrapping service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-80   Csm_AsymPrivateKeyWrapSymStart 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    92 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.73  Csm_AsymPrivateKeyWrapSymUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapSymUpdate (Csm_ConfigIdType cfgId, 
    uint8 *dataPtr, uint32 *dataLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the memory location which will hold the first chunk of the 
    result of the key wrapping. If the result does not fit into the given buffer, the 
    caller shall call the service again, until *dataLengthPtr is equal to zero, 
    indicating that the complete result has been retrieved. 
    dataLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned wrapped key shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the asymmetrical key wrapping service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-81   Csm_AsymPrivateKeyWrapSymUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    93 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.74  Csm_AsymPrivateKeyWrapSymFinish 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapSymFinish (Csm_ConfigIdType cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the asymmetrical key wrapping service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-82   Csm_AsymPrivateKeyWrapSymFinish 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    94 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
     
    5.2.75  Csm_AsymPrivateKeyWrapAsymStart 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapAsymStart (Csm_ConfigIdType cfgId, 
    const Csm_AsymPrivateKeyType *keyPtr, const Csm_AsymPublicKeyType 
    *wrappingkeyPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    keyPtr 
    Holds a pointer to the symmetric key to be wrapped. 
    wrappingkeyPtr 
    Holds a pointer to the key used for wrapping. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to initialize the asymmetrical key wrapping service of the CSM module. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-83   Csm_AsymPrivateKeyWrapAsymStart 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    95 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.76  Csm_AsymPrivateKeyWrapAsymUpdate 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapAsymUpdate (Csm_ConfigIdType 
    cfgId, uint8 *dataPtr, uint32 *dataLengthPtr) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    dataPtr 
    Holds a pointer to the memory location which will hold the first chunk of the 
    result of the key wrapping. If the result does not fit into the given buffer, the 
    caller shall call the service again, until *dataLengthPtr is equal to zero, 
    indicating that the complete result has been retrieved. 
    dataLengthPtr 
    Holds a pointer to the memory location in which the length information is 
    stored. On calling this function this parameter shall contain the size of the 
    provided buffer. When the request has finished, the actual length of the 
    returned wrapped key shall be stored. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to feed the asymmetrical key wrapping service with the input data. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-84   Csm_AsymPrivateKeyWrapAsymUpdate 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    96 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.2.77  Csm_AsymPrivateKeyWrapAsymFinish 
    Prototype 
    Csm_ReturnType Csm_AsymPrivateKeyWrapAsymFinish (Csm_ConfigIdType 
    cfgId) 
    Parameter 
    cfgId 
    Holds the identifier of the CSM module configuration that has to be used 
    during the operation. 
    Return code 
    CSM_E_OK 
    Request successful. 
    CSM_E_NOT_OK 
    Request failed. 
    CSM_E_BUSY 
    Request failed, service is still busy. 
    Functional Description 
    This interface shall be used to finish the asymmetrical key wrapping service. 
    Particularities and Limitations 
    >  This function can be synchronous or asynchronous. 
    >  This function is non-reentrant. 
    >  This function is called by application. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-85   Csm_AsymPrivateKeyWrapAsymFinish 
    5.3  Services used by CSM 
    In the following table services provided by other components, which are used by the CSM 
    are  listed.  For details about  prototype and functionality  refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    CRY 
    Cry_<Service>Start 
    Cry_<Service>Update 
    Cry_<Service>Finish 
    Cry_<Service>MainFunction 
    Cry_<Service> 
    Table 5-86   Services used by the CSM 
    5.4  Callback Functions 
    This chapter describes the callback functions that are implemented by the CSM and shall 
    be invoked by the CRY modules. The prototypes of the callback functions are provided in 
    the header file Csm_Cbk.h by the CSM. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    97 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.1 
    Csm_HashCallbackNotification 
    Prototype 
    void Csm_HashCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service Hash with the 
    argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-87   Csm_HashCallbackNotification 
    5.4.2 
    Csm_HashServiceFinishNotification 
    Prototype 
    void Csm_HashServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service Hash to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-88   Csm_HashServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    98 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.3 
    Csm_MacGenerateCallbackNotification 
    Prototype 
    void Csm_MacGenerateCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service MacGenerate with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-89   Csm_MacGenerateCallbackNotification 
    5.4.4 
    Csm_MacGenerateServiceFinishNotification 
    Prototype 
    void Csm_MacGenerateServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service MacGenerate to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-90   Csm_MacGenerateServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    99 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.5 
    Csm_MacVerifyCallbackNotification 
    Prototype 
    void Csm_MacVerifyCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service MacVerify with the 
    argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-91   Csm_MacVerifyCallbackNotification 
    5.4.6 
    Csm_MacVerifyServiceFinishNotification 
    Prototype 
    void Csm_MacVerifyServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service MacVerify to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-92   Csm_MacVerifyServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    100 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.7 
    Csm_RandomSeedCallbackNotification 
    Prototype 
    void Csm_RandomSeedCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    CSM_E_ENTROPY_EXHAUSTION: request failed, entropy of random number 
    generator is exhausted. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service RandomSeed with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-93   Csm_RandomSeedCallbackNotification 
    5.4.8 
    Csm_RandomSeedServiceFinishNotification 
    Prototype 
    void Csm_RandomSeedServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service RandomSeed to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    101 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-94   Csm_RandomSeedServiceFinishNotification 
    5.4.9 
    Csm_RandomGenerateCallbackNotification 
    Prototype 
    void Csm_RandomGenerateCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    CSM_E_ENTROPY_EXHAUSTION: request failed, entropy of random number 
    generator is exhausted. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service RandomGenerate 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-95   Csm_RandomGenerateCallbackNotification 
    5.4.10  Csm_RandomGenerateServiceFinishNotification 
    Prototype 
    void Csm_RandomGenerateServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service RandomGenerate to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    102 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-96   Csm_RandomGenerateServiceFinishNotification 
    5.4.11  Csm_SymBlockEncryptCallbackNotification 
    Prototype 
    void Csm_SymBlockEncryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymBlockEncrypt 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-97   Csm_SymBlockEncryptCallbackNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    103 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.12  Csm_SymBlockEncryptServiceFinishNotification 
    Prototype 
    void Csm_SymBlockEncryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymBlockEncrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-98   Csm_SymBlockEncryptServiceFinishNotification 
    5.4.13  Csm_SymBlockDecryptCallbackNotification 
    Prototype 
    void Csm_SymBlockDecryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymBlockDecrypt 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-99   Csm_SymBlockDecryptCallbackNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    104 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.14  Csm_SymBlockDecryptServiceFinishNotification 
    Prototype 
    void Csm_SymBlockDecryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymBlockDecrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-100  Csm_SymBlockDecryptServiceFinishNotification 
     
    5.4.15  Csm_SymEncryptCallbackNotification 
    Prototype 
    void Csm_SymEncryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymEncrypt with the 
    argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    105 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-101  Csm_SymEncryptCallbackNotification 
    5.4.16  Csm_SymEncryptServiceFinishNotification 
    Prototype 
    void Csm_SymEncryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymEncrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-102  Csm_SymEncryptServiceFinishNotification 
    5.4.17  Csm_SymDecryptCallbackNotification 
    Prototype 
    void Csm_SymDecryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymDecrypt with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    106 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-103  Csm_SymDecryptCallbackNotification 
    5.4.18  Csm_SymDecryptServiceFinishNotification 
    Prototype 
    void Csm_SymDecryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymDecrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-104  Csm_SymDecryptServiceFinishNotification 
    5.4.19  Csm_AsymEncryptCallbackNotification 
    Prototype 
    void Csm_AsymEncryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service AsymEncrypt with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    107 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-105  Csm_AsymEncryptCallbackNotification 
    5.4.20  Csm_AsymEncryptServiceFinishNotification 
    Prototype 
    void Csm_AsymEncryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymEncrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-106  Csm_AsymEncryptServiceFinishNotification 
    5.4.21  Csm_AsymDecryptCallbackNotification 
    Prototype 
    void Csm_AsymDecryptCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service AsymDecrypt with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    108 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Table 5-107  Csm_AsymDecryptCallbackNotification 
     
    5.4.22  Csm_AsymDecryptServiceFinishNotification 
    Prototype 
    void Csm_AsymDecryptServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymDecrypt to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-108  Csm_AsymDecryptServiceFinishNotification 
    5.4.23  Csm_SignatureGenerateCallbackNotification 
    Prototype 
    void Csm_SignatureGenerateCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SignatureGenerate 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    109 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-109  Csm_SignatureGenerateCallbackNotification 
    5.4.24  Csm_SignatureGenerateServiceFinishNotification 
    Prototype 
    void Csm_SignatureGenerateServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SignatureGenerate to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-110  Csm_SignatureGenerateServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    110 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.25  Csm_SignatureVerifyCallbackNotification 
    Prototype 
    void Csm_SignatureVerifyCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SignatureVerify with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-111   Csm_SignatureVerifyCallbackNotification 
    5.4.26  Csm_SignatureVerifyServiceFinishNotification 
    Prototype 
    void Csm_SignatureVerifyServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SignatureVerify to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-112  Csm_SignatureVerifyServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    111 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.27  Csm_ChecksumCallbackNotification 
    Prototype 
    void Csm_ChecksumCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service Checksum with the 
    argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-113  Csm_ChecksumCallbackNotification 
    5.4.28  Csm_ChecksumServiceFinishNotification 
    Prototype 
    void Csm_ChecksumServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service Checksum to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-114  Csm_ChecksumServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    112 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.29  Csm_KeyDeriveCallbackNotification 
    Prototype 
    void Csm_KeyDeriveCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service KeyDerive with the 
    argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-115  Csm_KeyDeriveCallbackNotification 
    5.4.30  Csm_KeyDeriveServiceFinishNotification 
    Prototype 
    void Csm_KeyDeriveServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service KeyDerive to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-116  Csm_KeyDeriveServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    113 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.31  Csm_KeyDeriveSymKeyCallbackNotification 
    Prototype 
    void Csm_KeyDeriveSymKeyCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service KeyDeriveSymKey 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-117  Csm_KeyDeriveSymKeyCallbackNotification 
    5.4.32  Csm_KeyDeriveSymKeyServiceFinishNotification 
    Prototype 
    void Csm_KeyDeriveSymKeyServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service KeyDeriveSymKey to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-118  Csm_KeyDeriveSymKeyServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    114 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.33  Csm_KeyExchangeCalcPubValCallbackNotification 
    Prototype 
    void Csm_KeyExchangeCalcPubValCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    KeyExchangeCalcPubVal with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-119  Csm_KeyExchangeCalcPubValCallbackNotification 
    5.4.34  Csm_KeyExchangeCalcPubValServiceFinishNotification 
    Prototype 
    void Csm_KeyExchangeCalcPubValServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service KeyExchangeCalcPubVal to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-120  Csm_KeyExchangeCalcPubValServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    115 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.35  Csm_KeyExchangeCalcSecretCallbackNotification 
    Prototype 
    void Csm_KeyExchangeCalcSecretCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    KeyExchangeCalcSecret with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-121  Csm_KeyExchangeCalcSecretCallbackNotification 
    5.4.36  Csm_KeyExchangeCalcSecretServiceFinishNotification 
    Prototype 
    void Csm_KeyExchangeCalcSecretServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service KeyExchangeCalcSecret to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-122  Csm_KeyExchangeCalcSecretServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    116 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.37  Csm_KeyExchangeCalcSymKeyCallbackNotification 
    Prototype 
    void Csm_KeyExchangeCalcSymKeyCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    KeyExchangeCalcSymKey with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-123  Csm_KeyExchangeCalcSymKeyCallbackNotification 
    5.4.38  Csm_KeyExchangeCalcSymKeyServiceFinishNotification 
    Prototype 
    void Csm_KeyExchangeCalcSymKeyServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service KeyExchangeCalcSymKey to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-124  Csm_KeyExchangeCalcSymKeyServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    117 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.39  Csm_SymKeyExtractCallbackNotification 
    Prototype 
    void Csm_SymKeyExtractCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymKeyExtract with 
    the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-125  Csm_SymKeyExtractCallbackNotification 
    5.4.40  Csm_SymKeyExtractServiceFinishNotification 
    Prototype 
    void Csm_SymKeyExtractServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymKeyExtract to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-126  Csm_SymKeyExtractServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    118 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.41  Csm_SymKeyWrapSymCallbackNotification 
    Prototype 
    void Csm_SymKeyWrapSymCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymKeyWrapSym 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-127  Csm_SymKeyWrapSymCallbackNotification 
    5.4.42  Csm_SymKeyWrapSymServiceFinishNotification 
    Prototype 
    void Csm_SymKeyWrapSymServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymKeyWrapSym to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-128  Csm_SymKeyWrapSymServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    119 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.43  Csm_SymKeyWrapAsymCallbackNotification 
    Prototype 
    void Csm_SymKeyWrapAsymCallbackNotification (Csm_ReturnType Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service SymKeyWrapAsym 
    with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-129  Csm_SymKeyWrapAsymCallbackNotification 
    5.4.44  Csm_SymKeyWrapAsymServiceFinishNotification 
    Prototype 
    void Csm_SymKeyWrapAsymServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service SymKeyWrapAsym to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-130  Csm_SymKeyWrapAsymServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    120 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.45  Csm_AsymPublicKeyExtractCallbackNotification 
    Prototype 
    void Csm_AsymPublicKeyExtractCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    AsymPublicKeyExtract with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-131  Csm_AsymPublicKeyExtractCallbackNotification 
    5.4.46  Csm_AsymPublicKeyExtractServiceFinishNotification 
    Prototype 
    void Csm_AsymPublicKeyExtractServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymPublicKeyExtract to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-132  Csm_AsymPublicKeyExtractServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    121 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.47  Csm_AsymPrivateKeyExtractCallbackNotification 
    Prototype 
    void Csm_AsymPrivateKeyExtractCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    AsymPrivateKeyExtract with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-133  Csm_AsymPrivateKeyExtractCallbackNotification 
    5.4.48  Csm_AsymPrivateKeyExtractServiceFinishNotification 
    Prototype 
    void Csm_AsymPrivateKeyExtractServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymPrivateKeyExtract to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-134  Csm_AsymPrivateKeyExtractServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    122 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.49  Csm_AsymPrivateKeyWrapSymCallbackNotification 
    Prototype 
    void Csm_AsymPrivateKeyWrapSymCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    AsymPrivateKeyWrapSym with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-135  Csm_AsymPrivateKeyWrapSymCallbackNotification 
    5.4.50  Csm_AsymPrivateKeyWrapSymServiceFinishNotification 
    Prototype 
    void Csm_AsymPrivateKeyWrapSymServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymPrivateKeyWrapSym to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-136  Csm_AsymPrivateKeyWrapSymServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    123 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.4.51  Csm_AsymPrivateKeyWrapAsymCallbackNotification 
    Prototype 
    void Csm_AsymPrivateKeyWrapAsymCallbackNotification (Csm_ReturnType 
    Result) 
    Parameter 
    Result 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    Return code 

     
    Functional Description 
    This function shall call the callback function as given in the configuration of the service 
    AsymPrivateKeyWrapAsym with the argument given by Result. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-137  Csm_AsymPrivateKeyWrapAsymCallbackNotification 
    5.4.52  Csm_AsymPrivateKeyWrapAsymServiceFinishNotification 
    Prototype 
    void Csm_AsymPrivateKeyWrapAsymServiceFinishNotification (void) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function shall set the state of the service AsymPrivateKeyWrapAsym to idle. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by cryptographic primitive. 
    Call Context 
    >  This function can be called from task level only. 
    Table 5-138  Csm_AsymPrivateKeyWrapAsymServiceFinishNotification 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    124 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    5.5  Configurable Interfaces 
    5.5.1 
    Notifications 
    At its configurable interfaces the CSM defines notifications that can be mapped to callback 
    functions  provided  by  other  modules. This  only  applies  for  the  asynchronous  processing 
    mode.  The  mapping  is  not  statically  defined  by  the  CSM  but  can  be  performed  at 
    configuration  time.  For  each  service,  a  notification  can  be  configured.  The  appropriate 
    function  prototype  signature  is  described  in  the following  sub-chapters. The  name  of  the 
    function is only a placeholder. 
    ServiceCallback 
    Prototype 
    Std_ReturnType ServiceCallback (Csm_ReturnType Return) 
    Parameter 
    Return 
    Contains the result of a cryptographic operation. 
    CSM_E_OK: request successful. 
    CSM_E_NOT_OK: request failed. 
    CSM_E_BUSY: request failed, service is still busy. 
    CSM_E_SMALL_BUFFER: provided buffer is too small to store the result. 
    CSM_E_ENTROPY_EXHAUSTION: request failed, entropy of random number 
    generator is exhausted. 
    Return code 
    E_OK 
    Return Value is ignored in this implementation of the Csm 
    E_NOT_OK 
    Functional Description 
    Function will be called when configured service has finished. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is called by Csm. 
    Call Context 
    >  This function will be called from task level only. 
    Table 5-139  ServiceCallback 
    5.6  Service Ports 
    5.6.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    5.6.2 
    Provide Ports on CSM Side 
    At  the  Provide  Ports  of  the  Csm  the  cryptographic  API  functions  described  in  5.2  are 
    available  as  Runnable  Entities.  The  Runnable  Entities  are  invoked  via  Operations.  The 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    125 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    mapping from a SWC client call to an Operation is performed by the RTE. In this mapping 
    the RTE adds Port Defined Argument Values to the client call of the SWC, if configured. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    126 
    based on template version 5.2.0 



    Technical Reference MICROSAR CSM 
    6.  Configuration 
    In the Csm the attributes can be configured with the following tools: 
    >  Configuration in DaVinci Configurator 
     
     
    FAQ 
    By default the CSM configuration is empty. To create a service instance, the specific 
      service sub container has to be created. Afterwards you can instance the service by 
    creating a new configuration container. 
     
     
    6.1 
    Configuration Variants 
    The CSM supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    6.2 
    Configuration with DaVinci Configurator 5 
    6.2.1 
    Common Properties 
    Attribute Name 
    Values 
    Description 
    Default value is 
    typed bold 
    CsmDevErrorDetect 
    STD_ON 
    Pre-processor switch to enable and disable 
    development error detection. 
    STD_OFF 
    True: Development error detection enabled. 
    False: Development error detection disabled 
    CsmDisableNotConfiguredApis 
    STD_ON 
    If enabled, APIs of not configured services will be 
    STD_OFF 
    disabled. 
    CsmMainFunctionPeriod 
    0.001 to 
    Specifies the period of main function 
    65.535 
    Csm_MainFunction in seconds. 
    CsmMaxAlignScalarType 
    8  
    The scalar type which has the maximum alignment 
    16 
    restrictions on the given platform.
     
     
    32
    This type can be e.g. uint8, uint16 or uint32.
     
     
    CsmMaximumBlockingTime 
    1 to 
    If interruption is turned on with the configuration 
    4294967295  option CsmUseInterruption, this option configures 
    the maximum time in microseconds the main 
    function shall be allowed to run before it must 
    interrupt itself. The lowest allowed value for the 
    option is implementation dependent. 
     
    NOT USED 
    CsmRteBufferSize 
    1 to 
    Specifies the size in bytes for the Rte Buffer types 
    4294967295 created by Csm. 
    128 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    127 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    Attribute Name 
    Values 
    Description 
    Default value is 
    typed bold 
    CsmUseInterruption 
    STD_ON 
    Pre-processor switch to enable and disable 
    STD_OFF
    interruption of job processing.
     
     
     
    NOT USED 
    True: Interruption of job processing enabled 
    False: Interruption of job processing disabled 
    CsmUseSyncJobProcessing 
    STD_ON 
    Pre-processor switch to enable and disable 
    STD_OFF 
    synchronous job processing. 
    True: synchronous job processing enabled 
    False: synchronous job processing disabled 
    CsmUserConfigFile 
    String 
    User configuration file that shall be part of the Csm 
    configuration. 
    If you want to overwrite or provide own settings in 
    the generated configuration file, you can specify a 
    path to a user defined configuration file. The user 
    defined configuration file will be included at the end 
    of the generated file. Thus definitions in the user 
    defined configuration file can overwrite definitions in 
    the generated configuration file. 
    CsmVersionInfoApi 
    STD_ON 
    Pre-processor switch to enable and disable 
    STD_OFF 
    availability of the API Csm_GetVersionInfo().  
    True: API Csm_GetVersionInfo() is available.   
    False: API Csm_GetVersionInfo() is not available. 
     
    6.2.2 
    Service Type related Properties 
    Depending on the type of service, the following parameter may configurable: 
    Attribute Name 
    Values 
    Description 
    Default value is 
    typed bold 
    Csm<ServiceType>MaxKeySize 
    1.. 
    This is the maximum size over all key lengths used 
    4294967295  in all CRY primitives, which implement the specific 
    kind of <ServiceType>. 
    Please note that the calling application has to 
    provide the key buffer. So, it has to be ensured that 
    the size of this buffer matches with the configured 
    value here. 
     
    6.2.3 
    Service specific Properties 
    Each service configuration has the following adjustable parameters: 
    Attribute Name 
    Description 
    Csm<ServiceType>Config 
    This container holds the configuration of one <ServiceType> 
    service. The container name serves as a symbolic name for the 
    identifier of a service configuration. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    128 
    based on template version 5.2.0 



    Technical Reference MICROSAR CSM 
    Attribute Name 
    Description 
    CsmCallback<ServiceType> 
    Callback function to be called if service has finished. This 
    parameter is only needed if the CSM is in asynchronous mode. 
    Csm<ServiceType>IncludeFile 
    Header file of the underlying cryptographic service that shall be 
    used. 
    Csm<ServiceType>InitConfiguration 
    This is the name of the C symbol, which contains the configuration 
    of the underlying cryptographic primitive. 
    Usually, this symbol represents a structure provided by the CRY 
    module. 
    Csm<ServiceType>PrimitiveName 
    This is the name of the cryptographic primitive to use. 
    This name will be used to form the function pointers to the Start, 
    Update and Finish functions of the corresponding cryptographic 
    primitive according to the following rule: 
    <name>[Start|Update|Finish] 
    Usually these functions are provided by the CRY module. 
    Csm<ServiceType>UseServicePorts 
    This parameter defines if this service is accessible via service 
    ports. The PortName will be derived from the service name. 
    Csm<ServiceType>CryRef 
    Reference to MICROSAR CRY. This eases up the configuration for 
    MICROSAR CRY. All necessary attributes will be set automatically 
    if linked with a CRY service instance. 
     
     
     
    Usage of callback functions without the RTE 
    The default use case of the CSM is the use with the RTE, so the callback functions are 
      automatically set to Rte_Call_<Shortname>_Callback_JobFinished. To use the 
    callback function without the RTE set this field to user defined.  
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    129 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    7.  AUTOSAR Standard Compliance 
    7.1  Deviations 
    The current implementation does not have any deviations. 
    7.2  Additions/ Extensions 
    7.2.1 
    Not supported service APIs can be disabled 
    When  enabling  the  switch  “Disable  not  used  APIs”,  each  API  of  a  service  without  a 
    configuration will be disabled. 
    7.3 
    Memory Initialization  
    Not  every  start-up  code  of  embedded  targets  and  neither  CANoe-Emulation  provide 
    initialized RAM. It thus may happen that the state of a variable that needs initialized RAM 
    may  not  be  set  to  the  expected  initial  value.  Therefore  an  explicit  initialization  of  such 
    variables has to be provided at start-up by calling the additional function Csm_InitMemory.  
    For more information refer to chapter 3.2 ‘Initialization’. 
    7.4 
    Limitations 
    7.4.1 
    Interruption of job processing 
    The interruption of job processing is not supported in this implementation of the CSM. The 
    API  Csm_Interruption  can  be  activated  for  compatibility  reasons  but  has  no  effect 
    when called.  
    7.4.2 
    Production Error Reporting 
    Currently, no production errors are reported. 
    7.4.3 
    Development Error Reporting 
    According  to  SWS  [1],  the  CSM  module  has  six  different  Error  Codes.  The  current 
    implementation 
    only 
    reports 
    four. 
    CSM_E_PARAM_KEY_TYPE_INVALID 
    and 
    CSM_E_BUFFER_TOO_SMALL are not reported. 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    130 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    8.  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    Cryptographic 
    An underlying cryptographic module or library 
    Primitive 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    Csm 
    Crypto Service Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SchM 
    Schedule Manager 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 8-2   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    131 
    based on template version 5.2.0 


    Technical Reference MICROSAR CSM 
    9.  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    132 
    based on template version 5.2.0 

    Document Outline


    1.3.114 - TechnicalReference_DaVinciConfigurator_Licenses

    DaVinci Configurator License Handling

    1.3.116 - TechnicalReference_DaVinciConfigurator_Licensess


     
     
     
     
     
     
     
     
     
     
     
    DaVinci Configurator License Handling 
    Technical Reference 
     
      
    Version 1.5 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Michael Hoffmann 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference DaVinci Configurator License Handling 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Michael Hoffmann 
    2014-01-02 
    1.0 
     
    Michael Hoffmann 
    2014-02-14 
    1.1 
    Server Configuration in 3.1 
    changed 
    Michael Hoffmann 
    2015-02-10 
    1.2 
    Server Configuration in 3.1 
    changed; VTT option added 
    Michael Hoffmann 
    2015-04-27 
    1.3 
    DaVinci_CFG floating server 
    option added 
    Michael Hoffmann 
    2015-05-21 
    1.4 
    Pool based licenses added 
    Michael Hoffmann 
    2016-02-01 
    1.5 
    Template update 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    Contents 
    1 
    Introduction................................................................................................................... 5 
    2 
    License Information ...................................................................................................... 6 
    2.1 

    SIP Based License ............................................................................................. 6 
    2.2 
    Software Based License .................................................................................... 6 
    2.3 
    Hardware Based Licenses ................................................................................. 6 
    2.4 
    License Display .................................................................................................. 7 
    2.5 
    Display of License Server Configuration and Options ........................................ 7 
    3 
    License Server Configuration ...................................................................................... 8 
    3.1 

    Server Configuration .......................................................................................... 8 
    3.1.1 
    Settings .............................................................................................. 9 
    3.2 
    Server Option Usage Configuration ................................................................. 10 
    3.3 
    Settings File Example ...................................................................................... 10 
    4 
    Pool Licence Handling ............................................................................................... 12 
    4.1 

    Standard Licenses ........................................................................................... 12 
    4.1.1 

    Adding License Options ................................................................... 12 
    4.1.2 
    Return and Extend a Standard License ............................................ 12 
    4.2 
    Sporadic Licenses ............................................................................................ 12 
    5 
    SIP License ................................................................................................................. 13 
    6 
    DaVinci Developer License ........................................................................................ 14 
    7 
    Abbreviations .............................................................................................................. 15 
    7.1 

    Abbreviations ................................................................................................... 15 
    8 
    Contact ........................................................................................................................ 16 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    Illustrations 

    Tables 
    Table 2-1  
    License appearance ................................................................................... 7 
    Table 3-1  
    Settings file locations .................................................................................. 8 
    Table 3-2  
    License precedence.................................................................................... 9 
    Table 3-3  
    Server options .......................................................................................... 10 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    1  Introduction 
    The  DaVinci  Configurator  application  can  be  activated  by  a  SIP  license  and  dongle  or 
    FlexNet based license. Both, the dongle and the FlexNet based license, provide the .PRO 
    option  +  supplemental  options.  These  options  activate  additional  product  functionality 
    within the DaVinci Configurator.  
    This document describes in which order the available licenses are applied and used by the 
    DaVinci Configurator. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 



    Technical Reference DaVinci Configurator License Handling 
    2  License Information 
    Detailed  information  about  the  current  available  and  used  licenses  can  be  obtained  by 
    starting  the  DaVinci  Configurator  application  and  opening  the  ‘Licenses’  dialog  (Help  > 
    Licenses). 
    This dialog shows the current SIP license details (‘Show SIP License Details’ button) and 
    the current tool license details (‘Show Tool License Details’). 
    The tool license details dialog provides three sections: 
      SIP-based licenses 
      Software-based licenses 
      Hardware-based licenses (USB-dongle) 
    2.1 
    SIP Based License 
    This section shows the currently available SIP license. A SIP license activates the BASE 
    option of the DaVinci Configurator application. 
    2.2 
    Software Based License 
    This  table  lists  all  available  FlexNet  license  information  (server  based  or  local)  that  can 
    potentially be used by the DaVinci Configurator application. 
    For server based licenses the floating licensing and the pool licensing model is supported 
    (see 3.1 for details).  
    The actual used license model is shown in the label of the ‘License server’ property of the 
    ‘Licenses’  dialog.  It  can  be  ‘Pool’  or  ‘Floating’,  depending  on  which  license  model  is 
    defined within the server configuration file (see chapter 3 for details). 
    2.3 
    Hardware Based Licenses 
    This section contains all dongle based licenses detected by the application. 
     
     
    Note 
    Aladdin dongles (blue dongles) cannot be used in 64-Bit Windows with DaVinci 
      Configurator executed in 64-Bit mode (which is the default on 64-Bit Windows). 
    In that case the new Keyman dongles need to be used instead. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    2.4 
    License Display 
    Each entry within  the sections of the license details dialog will have  one of  the following 
    colors  indicating  whether  the  license  is  valid  or  not  and  used  or  not.  Refer  to  following 
    table for details. 
    License Appearance 
     
    Color
    Description
     
     
    black 
    License is valid. 
    blue 
    License is valid and used by the current running application instance. 
    grey 
    License is expired. 
    Table 2-1   License appearance 
    2.5 
    Display of License Server Configuration and Options 
    In  case  a  FlexNet  license  server  is  configured  (see  3.1  for  details)  the  license  details 
    dialog shows the server configuration details and the according option configuration below 
    the software-based licenses grid. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    3  License Server Configuration 
    Flexnet  licenses  can  be  provided  by  using  a  license  server.  The  DaVinci  Configurator 
    application only accesses these licenses when: 
      No .PRO option is available at the local PC 
      A valid license server connection is configured  
      The DaVinci_CFG option within the settings.ini file is not explicitly set to ‘0’ (see also 
    3.2 and 3.3 for details) 
      The pool license model is used and no .PRO option (provided by a single-seat license 
    or dongle) is available at the local PC 
    Otherwise the server isn’t accessed. 
    3.1 
    Server Configuration 
    The  DaVinci  Configurator  application  detects  a  license  server  connection  if  a 
    Settings.ini file is either placed in the executable folder or in the common files folder 
    for Vector applications.  
    The search order is identical to the order of appearance in table Table 3-1. 
    Setting File Locations 
    Location
    Environment
     
     
    DaVinciCFG.exe directory 
    All 
    %COMMONPROGRAMFILES(X86)%\Vector\DaVinci  All 
    Table 3-1   Settings file locations 
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 



    Technical Reference DaVinci Configurator License Handling 
    3.1.1 
    Settings 
    Each server based license model has its own set of settings: 
     
      Floating: server based Flexnet licenses 
      Pool: server based license pool Flexnet licenses 
    For each license model an individual set of settings needs to be defined. Each consists of 
    a defined number of optional server ‘option usage’ flags (described in 3.2) and the 
    mandatory server connection configuration: 
     
      Host: License server network ID  
      Port: License server port 
     
     
     
    Note 
    The Settings.ini file may contain both server configurations. In that case the Pool based 
      license model is used. 
    Defined in Settings.ini 
    Used License Model 
    Pool and Floating 
    Pool 
    Table 3-2   License precedence 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 

    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    3.2 
    Server Option Usage Configuration 
    The usage of  server  license options  which  are  available  at the configured server can be 
    defined for each option individually. 
    By  default  all  options  available  at  the  server  are  used  by  the  DaVinci  Configurator 
    application.  To  restrict  this  usage  the  according  section  “Floating”  or  “Pool”  of  the 
    settings file described in 3.1 may contain additional properties. One property is defined for 
    each product option. 
      Server Option Usage 
    Property
    Value
     
     
    Description 
    DaVinci_CFG_DEV 
    {1|0} 
    Allow or prevent locking a server based DaVinci Developer license to enable 
    a RTE option within the DaVinci Configurator. 
    DaVinci_CFG_MD 
    {1|0} 
    Allow or prevent using a server based .MD product option. 
    DaVinci_CFG_RTE 
    {1|0} 
    Allow or prevent using a server based .RTE product option. 
    DaVinci_CFG_WF 
    {1|0} 
    Allow or prevent using a server based .WF product option. 
    DaVinci_CFG_VTT 
    {1|0} 
    Allow or prevent using a server based .VTT product option. 
    DaVinci_CFG 
    {1|0} 
    Blocks access to all DaVinci Configurator server based licenses. The 
    settings.ini file is used by the DaVinci Developer application too. With 
    settings this flag to 0 the license server access of the DaVinci Configurator 
    application is blocked.  
    Use this option when a specific PC should not use DaVinci Configurator 
    licenses but is allowed to use DaVinci Developer server based licenses. 
    Table 3-3   Server options 
    3.3 
    Settings File Example 
    Following exemplary settings file content demonstrates the structure of the file used by the 
    DaVinci Configurator application. Note that the ‘Server Option Usage’ flags are optional. 
     
      Floating license example: 
    [Floating] 
    Host=yourFloatingLicenseServer 
    Port=7777 
    DaVinci_CFG=1 
    DaVinci_CFG_DEV=0 
    DaVinci_CFG_MD=1 
    DaVinci_CFG_RTE=1 
    DaVinci_CFG_VTT=1 
    DaVinci_CFG_WF=0 
      Pool license example: 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    10 
    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    [Pool] 
    Host=yourPoolLicenseServer 
    Port=8888 
    DaVinci_CFG=1 
    DaVinci_CFG_DEV=0 
    DaVinci_CFG_MD=1 
    DaVinci_CFG_RTE=1 
    DaVinci_CFG_VTT=1 
    DaVinci_CFG_WF=0 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    11 
    based on template version 4.11.3 



    Technical Reference DaVinci Configurator License Handling 
    4  Pool Licence Handling 
    Pool licenses can be used in following modes 
      Sporadic 
      Standard 
    4.1 
    Standard Licenses 
    Standard licenses can be retrieved from the server and are stored on the local PC until the 
    minimum borrow period is expired. 
    4.1.1 
    Adding License Options 
    An existing and valid PRO standard license can be supplemented with additional license 
    options.  
    To  add  one  or  more  options  the  ‘License  Activation’  dialog  must  be  opened  (Help  > 
    Licenses > ‘Show SIP License Details’ > ‘Show Pool license configuration…’). Select one 
    or more of the available options and press ‘Get License’.  
    Added licenses become effective after restarting the application.  
    4.1.2 
    Return and Extend a Standard License 
    Returning  and extending  standard  licenses  is  possible  after  the  minimum  borrow  time  is 
    expired.  These  operations  are  supported  by  the  ‘License  Activation’  dialog  available  at 
    Help > Licenses > ‘Show SIP License Details’ > ‘Show Pool license configuration…’. 
    4.2 
    Sporadic Licenses 
    Sporadic licenses are activated on usage at 24 days per year and user.  
    When  using  sporadic  licenses  the  DaVinci  Configurator  requests  the  user  to  select  a 
    server  based  pool  license  for  each  session. A  sporadic  license  is  returned  to  the  server 
    after the application has been closed. 
     
     
    Note 
    Sporadic licenses cannot be used with the command line version of the DaVinci 
      Configurator (DVCmdCfg.exe).  
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    12 
    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    5  SIP License 
    The  DaVinci  Configurator  application  can  only  be  used  in  context  of  a  specific  SIP. This 
    SIP provides a SIP license that activates the DaVinci Configurator BASE product. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    13 
    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    6  DaVinci Developer License 
    A DaVinci Developer license provided by a hardware dongle or FlexNet license is used to 
    enable the .RTE option if a DaVinci Configurator Pro license is available. 
    The usage of a floating DaVinci Developer license by the DaVinci Configurator application 
    can be prevented by limiting the usage of server based licenses (see 3.2 for details).  
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    14 
    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    7  Abbreviations 
    7.1 
    Abbreviations 
    Abbreviation 
    Description 
     
     
     
     
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    15 
    based on template version 4.11.3 


    Technical Reference DaVinci Configurator License Handling 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    © 2016 Vector Informatik GmbH 
    Version 1.5 
    16 
    based on template version 4.11.3 

    Document Outline


    1.3.117 - TechnicalReference_Dcm

    MICROSAR DCM

    1.3.118 - TechnicalReference_Dcm_ind

    Outline
    Page 1
    Page 2
    Page 3
    Page 4
    Page 5
    Page 6
    Page 7
    Page 8
    Page 9
    Page 10
    Page 11
    Page 12
    Page 13
    Page 14
    Page 15
    Page 16
    Page 17
    Page 18
    Page 19
    Page 20
    Page 21
    Page 22
    Page 23
    Page 24
    Page 25
    Page 26
    Page 27
    Page 28
    Page 29
    Page 30
    Page 31
    Page 32
    Page 33
    Page 34
    Page 35
    Page 36
    Page 37
    Page 38
    Page 39
    Page 40
    Page 41
    Page 42
    Page 43
    Page 44
    Page 45
    Page 46
    Page 47
    Page 48
    Page 49
    Page 50
    Page 51
    Page 52
    Page 53
    Page 54
    Page 55
    Page 56
    Page 57
    Page 58
    Page 59
    Page 60
    Page 61
    Page 62
    Page 63
    Page 64
    Page 65
    Page 66
    Page 67
    Page 68
    Page 69
    Page 70
    Page 71
    Page 72
    Page 73
    Page 74
    Page 75
    Page 76
    Page 77
    Page 78
    Page 79
    Page 80
    Page 81
    Page 82
    Page 83
    Page 84
    Page 85
    Page 86
    Page 87
    Page 88
    Page 89
    Page 90
    Page 91
    Page 92
    Page 93
    Page 94
    Page 95
    Page 96
    Page 97
    Page 98
    Page 99
    Page 100
    Page 101
    Page 102
    Page 103
    Page 104
    Page 105
    Page 106
    Page 107
    Page 108
    Page 109
    Page 110
    Page 111
    Page 112
    Page 113
    Page 114
    Page 115
    Page 116
    Page 117
    Page 118
    Page 119
    Page 120
    Page 121
    Page 122
    Page 123
    Page 124
    Page 125
    Page 126
    Page 127
    Page 128
    Page 129
    Page 130
    Page 131
    Page 132
    Page 133
    Page 134
    Page 135
    Page 136
    Page 137
    Page 138
    Page 139
    Page 140
    Page 141
    Page 142
    Page 143
    Page 144
    Page 145
    Page 146
    Page 147
    Page 148
    Page 149
    Page 150
    Page 151
    Page 152
    Page 153
    Page 154
    Page 155
    Page 156
    Page 157
    Page 158
    Page 159
    Page 160
    Page 161
    Page 162
    Page 163
    Page 164
    Page 165
    Page 166
    Page 167
    Page 168
    Page 169
    Page 170
    Page 171
    Page 172
    Page 173
    Page 174
    Page 175
    Page 176
    Page 177
    Page 178
    Page 179
    Page 180
    Page 181
    Page 182
    Page 183
    Page 184
    Page 185
    Page 186
    Page 187
    Page 188
    Page 189
    Page 190
    Page 191
    Page 192
    Page 193
    Page 194
    Page 195
    Page 196
    Page 197
    Page 198
    Page 199
    Page 200
    Page 201
    Page 202
    Page 203
    Page 204
    Page 205
    Page 206
    Page 207
    Page 208
    Page 209
    Page 210
    Page 211
    Page 212
    Page 213
    Page 214
    Page 215
    Page 216
    Page 217
    Page 218
    Page 219
    Page 220
    Page 221
    Page 222
    Page 223
    Page 224
    Page 225
    Page 226
    Page 227
    Page 228
    Page 229
    Page 230
    Page 231
    Page 232
    Page 233
    Page 234
    Page 235
    Page 236
    Page 237
    Page 238
    Page 239
    Page 240
    Page 241
    Page 242
    Page 243

    1.3.119 - TechnicalReference_Dcms


     
     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR DCM 
    Technical Reference 
     
    Ford 
    Version 7.2 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Mishel  Shishmanyan,  Patrick  Rieder,  Vitalij  Krieger, 
    Thomas  Dedler,  Alexander  Ditte,  Savas  Ates,  Steffen 
    Köhler 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR DCM 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Thomas Dedler, 
    2012-08-15  1.00.00  Initial version 
    Mishel Shishmanyan 
    Mishel Shishmanyan  2012-09-21  1.01.00  Added: 
    5.19 ReadDataByPeriodicIdentifier ($2A) 
    5.22 InputOutputControlByIdentifier ($2F) 
    6.5.2.7 ReturnControlToECU() 
    6.5.2.8 ResetToDefault() 
    6.5.2.9 FreezeCurrentState() 
    6.5.2.10 ShortTermAdjustment() 
    9.8 How to Jump into the FBL from Service 
    DiagnosticSessionControl ($10) 
    9.10 How to Put DCM in a Non-Default Session at 
    ECU Power-On 
     
    Modified: 
    Table 6-84   DataServices_<DataName> 
    Table 3-4  DET Service IDs 
    Mishel Shishmanyan  2012-12-12  1.02.00  Added: 
    5.15 ReadMemoryByAddress ($23) 
    5.20 DynamicallyDefineDataIdentifier ($2C) 
    5.24 WriteMemoryByAddress ($3D) 
    Table 6-47   Dcm_ReadMemory() 
    Table 6-48   Dcm_WriteMemory() 
     
    Modified: 
    Table 6-54   ConditionCheckRead(), 
    Table 6-57   ReadDataLength(),
     
    Table 6-58   WriteData() (dynamic length),
     
    Table 6-59   WriteData() (static length),
     
    Table 6-60   ReturnControlToECU(),
     
    Table 6-61   ResetToDefault(),
     
    Table 6-62   FreezeCurrentState(),
     
    Table 6-63   ShortTermAdjustment()
     -“OpStatus”- 
    parameter availability limitation 
    Table 6-42   <Module>_<DiagnosticService>() 
    Table 6-43 
      <Module>_<DiagnosticService>_<SubService>() 
     
     
    Mishel Shishmanyan  2013-04-17  1.03.00  No changes 
    Mishel Shishmanyan  2013-06-28  1.04.00  Added:  
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Chapters for OBD service 0x01- 0x0A. 
    6.6.1.2.6 DtrServices 
    6.6.1.2.7 RequestControlServices_<TIDName> 
    6.6.1.2.8 InfotypeServices_<VEHINFODATA> 
    9.11 How to Support Calibrateable Configuration 
    Parameters 
     
    Modified: 
    Table 3-2  Not supported AUTOSAR standard 
    conform features
     
     
    –  Removed not supported OBD. 
     
    Table 8-3  Limitations to AUTOSAR
      
    –  Removed not supported OBD. 
    Mishel Shishmanyan  2013-08-20  1.05.00  Added:  
    6.6.1.2.9 CallbackDCMRequestServices_<SWC> 
     
    9.12 How and When to Configure Multiple Protocols 
     
    8.1 Deviations 

    –  Added deviation to 
    CallbackDCMRequestServices_<SWC> 
    service port. 
     
    Table 8-3  Limitations to AUTOSAR
      
    –  Added maximum number of supported 
    protocols. 
    –  Added maximum number of concurrent client 
    diagnostic connections. 
    Modified: 
    5.14 ReadDataByIdentifier ($22) 
    5.22 InputOutputControlByIdentifier ($2F) 
    –  Modified configuration and implementation 
    aspects. 
     
    Table 6-89   DtrServices_<MIDName>_<TIDName> 
    Table 6-90   RequestControlServices_<TIDName>
     
    –  Changed port names according to AR DCM 
    SWS. 
     
    Table 6-91   InfotypeServices_<VEHINFODATA> 

    –  Editorial change.  
     
    Table 8-3  Limitations to AUTOSAR
      
    –  Removed not supported multi-protocol. 
    –  Removed not supported multiple buffers. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Thomas Dedler, 
    2013-09-17  2.00.00   
    Mishel Shishmanyan 
     
    Modified: 
    8.1 Deviations 
    –  Removed deviations for DID and RID 
    signals. 
    3.1 Features 
    –  Removed not supported multi-protocol. 
    –  Removed not supported multiple buffers. 
    6.5.2.12 Start(), 6.5.2.13 Stop(), 6.5.2.14 
    RequestResults()
     

    –  Changed function signatures and 
    descriptions 
    5.22 InputOutputControlByIdentifier ($2F)  
    –  More details on how optional CEM is 
    supported by DCM. 
    6.5.2.10 ShortTermAdjustment()  
    –  Removed statement that CEM is included in 
    the controlOptionRecord. 
    Mishel Shishmanyan  2014-01-14  2.01.00  Added: 
    9.13 How to Select DEM-DCM Interface Version 
    9.14 How to Support OBD and UDS over a Single 
    Client Connection 
    9.15 How to Use a User Configuration File 
    9.16 How to Know When the Security Access Level 
    Changes 
     
    Modified: 
    3.4.1 Split Task Functions  
    –  Added configuration aspects. 
    Table 4-3  Compiler abstraction and memory 
    mapping 

    –  Added calibration parameter memory 
    sections. 
    5.11 EcuReset ($11) 
    –  Added clarification for request rejection while 
    waiting for reset execution. 
    5.13 ReadDiagnosticInformation ($19) 
    –  Added support of new sub-functions 0x17-
    0x19. 
    5.19 ReadDataByPeriodicIdentifier ($2A) 
    –  Added feature stop periodic reading on 
    changed state. 
    5.20 DynamicallyDefineDataIdentifier ($2C) 
    –  Added feature clear DDID on changed state. 
     
    Mishel Shishmanyan,  2014-04-14  2.02.00  Added: 
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Patrick Rieder 
    9.17 How to Deal with the PduR AR version 
     
    Modified: 
    Figure 2-2 Interfaces to adjacent modules of the 
    DCM 

    –  NvM added to figure 
    3.4.1 Split Task Functions 
    –  Reworked chapter  
    –  Added support by configuration tool  
    5.14.4 Configuration Aspects 
    –  Added information about NvRam signal 
    configuration 
    5.21.4 Configuration Aspects 
    –  Added information about NvRam signal 
    configuration 
    6.3 Services used by DCM 
    –  Added NvM services used by the DCM 
    6.4.3.2.1 Dcm_StartOfReception(), 6.4.3.2.3 
    Dcm_TpRxIndication(), 
    6.4.3.2.5 
    Dcm_TpTxConfirmation() 

    –  New version of the APIs for AR 4.1.2 PduR 
    added 
    8.3 Limitations 
    –  Shared signals between DIDs not supported 
    Mishel Shishmanyan  2014-10-08  3.00.00  Added:  
    5.16 ReadScalingDataByIdentifier ($24) 
    6.5.2.11 GetScalingInformation() 
    6.6.2 Managed Mode Declaration Groups 
    9.18 Post-build Support 
    10 Troubleshooting 
     
    Modified: 
    4.1.2 Dynamic Files 
    –  Added post-build data files 
    –  Added SWC template file 
    Table 4-3  Compiler abstraction and memory 
    mapping 

    –  Added post-build data memory mapping 
    Figure 4-1  Include structure 
    –  Added post-build configuration and other 
    BSW headers files 
    5.11 EcuReset ($11) 
    –  Sub-functions are now allowed to be user 
    defined. 
    5.13 ReadDiagnosticInformation ($19) 
    –  Added new implementation aspect. 
    6.6.1.2.1 DataServices_<DataName> 
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    –  Added new port operation 
    GetScalingInformation() 
    8.3 Limitations  
    –  Added limitation for support of DIDranges  
    6.2.1.1 Dcm_Init() 
    7.1 Configuration Variants 
    –  Added new post-build variants 
    9.16 How to Know When the Security Access Level 
    Changes 

    –  Added link to the corresponding mode 
    declaration group. 
    Mishel Shishmanyan,  2015-01-13  3.01.00  Added:  
    Vitalij Krieger, 
     
    Thomas Dedler 
    6.5.2.24 IsDidAvailable() 
    6.5.2.25 ReadDidData()  
    6.5.2.26 WriteDidData() 
    9.19 Handling with DID Ranges 
    9.20 How to Support DID 0xF186 
     
    Modified: 
    5.14.4, 5.23 
    –  Removed WWH-OBD only DIDs/RIDs from 
    examples. 
    6.3 Services used by DCM 
    –  AR3 support added 
    6.4.2 ComM, 6.4.3 PduR 
    –  AR3 support added 
    8.3 Limitations 
    –  Removed limitation for not supported DID 
    ranges. 
    –  Added limitation for DidRanges. 
    9.17 How to Deal with the PduR AR version 
    –  Added AR 3.x compliance aspect 
    Table 8-2  Additions/ Extensions to AUTOSAR 
    –  Added AR 3.x integration  
    Vitalij Krieger, 
    2015-02-06  4.00.00  Added: 
    Mishel Shishmanyan 
    6.2.1.6 Dcm_InitMemory() 
    6.2.3.1 Dcm_GetTesterSourceAddress() 
    6.4.4 CanTp 
    6.5.1.8<Diagnostic Session Change Notification 
    Callback> 
    6.5.1.9<Security Access Change Notification 
    Callback> 
    9.21 How to Suppress Responses to Functional 
    Addressed Requests 
    9.22 How to Support Interruption on Requests with 
    Foreign N_TA 

    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.23 How to Know When the Diagnostic Session 
    Changes 
     
    Modified: 
    Minor editorial changes 
    Table 4-3  Compiler abstraction and memory 
    mapping 

    –  Added DCM_VAR_INIT memory section. 
    9.17 How to Deal with the PduR AR version 
    –  PduR 4.0.1 added 
    6.2.1.5 Dcm_GetVersionInfo() 
    –  Specified the digit format of the module’s 
    version information. 
    Figure 4-1  Include structure 
    –  New include structure 
    4.1.1 Static Files 
    –  New files introduced 
    4.2 Include Structure 
    –  New include structure 
    5.17.4 Configuration Aspects 
    –  Added support for single/multiple instace 
    attempt counter, delay timer. 
    9.16 How to Know When the Security Access Level 
    Changes 

    –  Added new notification type 
    Alexander Ditte, 
    2015-05-04  4.01.00  Added: 
    Mishel Shishmanyan 
    6.2.2.5 Dcm_GetSecurityLevelFixedBytes()  
    6.4.3.1.1 Dcm_TriggerTransmit() 
    6.4.3.2.6 Dcm_TxConfirmation() 
    6.5.2.27 GetSecurityAttemptCounter() 
    6.5.2.28 SetSecurityAttemptCounter() 
    9.24 How to Save RAM using Paged-Buffer for 
    Large DIDs 
    9.25 How to Get Security-Access Level Specific 
    Fixed Byte
     Values 
    9.26 How to Extend the Diag Keep Alive Time 
    during Diagnostics 
    9.27 How to Recover DCM State Context on ECU 
    Reset/ Power On 
     
    Modified: 
    Global minor editorial changes 
    Table 5-26   Service $19: Supported subservices 
    –  Added sub-function 0x42 
    5.10.4 Configuration Aspects 
    –  Added session specific timings aspect 
    5.11 EcuReset ($11) 
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    –  Added note for resetting to default session if 
    needed. 
    5.17 SecurityAccess ($27)  
    –  Additions for the new features listed related 
    to this service 
    5.18.4 Configuration Aspects; 
    5.13.4 Configuration Aspects 

    –  Added a hint for external sub-function 
    implementation. 
    5.22.4 Configuration Aspects 
    –  Removed limitation to static length IO DID 
    for service 0x2F. 
    5.26.4 Configuration Aspects 
    –  Added missing related configuration 
    parameters 
    Table 6-83   DCMServices 
    –  Added new operation 
    Table 3-4  DET Service IDs 
    –  Completed API list  
    –  Names converted to hyperlinks for 
    convenience 
    Mishel Shishmanyan  2015-11-12 
    5.00.00  Added: 
    6.2.3.2 Dcm_ProcessVirtualRequest() 
    6.2.3.3 Dcm_SetSecurityLevel() 
    6.2.2.6 Dcm_SetActiveDiagnostic() 
    6.5.1.11 Dcm_FilterDidLookUpResult 
    6.5.1.12 Dcm_FilterRidLookUpResult 
    9.28 How to Define a Diagnostic Connection without 
    USDT
     Responses 
    9.29 How to Handle Multiple Diagnostic Service 
    Variants 
     
    Modified: 
    Minor editorial changes 
    5 Diagnostic Service Implementation 
    –  Modified introduction on how to read each 
    diagnostic service sub-chapter. 
    –  Added information for the supported types of 
    diagnostic service processor 
    implementations for all services. 
    5.17 SecurityAccess ($27) 
    –  Added external service implementation 
    aspect. 
    9.11.1 OBD Calibration 
    –  Added information about feature 
    configuration.  
    5.22 InputOutputControlByIdentifier ($2F) 
    –  More events monitored for automatic IO DID 
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    resetting. 
    Table 3-4  DET Service IDs 
    –  Added missing DET SIDs 
    6.5.2.24 IsDidAvailable() 
    –  Removed limitation of synchronous usage. 
    Table 4-3  Compiler abstraction and memory 
    mapping 

    –  Added DCM_VAR_INIT memory section for 
    32bit data. 
    Mishel Shishmanyan  2016-03-01  5.01.00  Added: 
    6.2.2.7 Dcm_GetRequestKind() 
     
    Modified: 
    Minor editorial changes. 
    Table 9-10  
    –  Added details for “RID operation”. 
    Table 6-83   DCMServices 
    –  Corrected supported return error codes 
    –  Added new operations 
    5.22 InputOutputControlByIdentifier ($2F) 
    6.5.2.7 ReturnControlToECU()  
    6.5.2.8 ResetToDefault() 
     
    6.5.2.9 FreezeCurrentState() 
     
    6.5.2.10 ShortTermAdjustment() 

    –  Reworked for support of bitmapped IO DIDs. 
    Table 3-4  DET Service IDs 
    –  Added new services 
    8.2 Additions/ Extensions 
    –  Added multi byte external CEMR handling 
    8.3 Limitations 
    –  Removed limitation for API IsDidAvailable() 
    Mishel Shishmanyan  2016-04-29  5.02.00   
    Modified: 
    Minor editorial changes. 
    Mishel Shishmanyan  2016-07-05  7.00.00  Added: 
    9.30 How to Switch Between OBD DTR Support by 
    DCM and DEM 
    9.31 How to Enable Support of OBD VIDs with 
    Dynamic Length 
    10.2 Code Generation Time Messages 
     
    Modified: 
    Minor editorial changes. 
    5.8.4 Configuration Aspects 
    –  Reordered FAQ and added variable data 
    size specific hints. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 

    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 6-24   Services used by the DCM 
    –  Updated used DEM API. 
    5.14.4 Configuration Aspects 
    –  Added configuration aspects for OBD MID 
    DIDs. 
    5.18.4 Configuration Aspects 
    –  Added FAQ for “AllNetworks” parameter. 
    6.5.2.22 GetInfotypeValueData() 
    –  Added AR4.2.2 compatibility. 
    9.18.1.2 Diagnostic Services Part 
    –  Enabled PBS for diagnostic service. 
    Table 10-1   Compile time error messages 
    –  Added new messages. 
    Table 8-1  Deviations to AUTOSAR 
    –  Removed deviation to AR for suppression of 
    NRC 0x7E and 0x7F, since AR 4.2.2 now 
    does require this behavior. 
    Mishel Shishmanyan  2016-09-22  7.01.00  Added: 
    9.32 How to setup DCM for Sender-Receiver 
    Communication 
    9.33 How to Support Routine Info Byte with UDS  
     
    Modified: 
    Replaced all used DCM_E_OK / DCM_E_NOT_OK 
    to E_OK resp. E_NOT_OK as per [1] 

    Note: This is not an API change, since the 
    DCM_E_* symbols have identical values 
    with the standard E_*. You can still use the 
    DCM_E_* ones in your application, if 
    preffered. 
    9.1 How to Reduce RAM Usage 
    –  Added information regarding DCM buffer 
    size recommendations integrated in the 
    Configuration 5 tool. 
    6.5.2.22 GetInfotypeValueData() 
    –  Corrected OpStatus parameter description. 
    11.2 Abbreviations 
    –  Added “C/S” and “S/R”. 
    Vitalij Krieger, 
    2017-03-20  7.02.00  Added: 
    Savas Ates, 
    6.1.3 Dcm_VsgIdentifierType 
    Steffen Köhler 
    6.1.4 Dcm_VsgStateType 
     
    6.2.2.8 Dcm_VsgSetSingle() 
    6.2.2.9 Dcm_VsgSetMultiple() 
    6.2.2.10 Dcm_VsgIsActive() 
    6.2.2.11 Dcm_VsgIsActiveAnyOf() 
    9.13.1 Setting the ClientId for DEM AR 4.3.0 API 
    9.21 How to Suppress Responses to Functional 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    10 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Addressed Requests 
    9.22 How to Support Interruption on Requests with 
    Foreign N_TA 
    9.25.3 Security Level Fixed Bytes variant handling 
    with VSGs 
    9.34 Vehicle System Group Support 
     
    Modified: 
    6 API Description 

    Corrected Particularities and Limitations
    6.1.2 Dcm_RecoveryInfoType 

    Added active protocol member. 
    6.3 Services used by DCM 

    Added Dem_[Dcm]ClearDTC. 

    Added new DEM AR 4.3.0 APIs 
    6.6.1.1.1 DCMServices 

    Added VSG services 
    9.11.1.2 Calibration of Supported OBD Parameter 
    Identifier 


    Corrected calibrateable configuration 
    symbols 
    9.13 How to Select DEM-DCM Interface Version 

    Also mention DEM AR 4.3.0 APIs 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    11 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
     
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticCommunicationManager.pdf 
    V4.2.2 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    V3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    V4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [5]   ISO 
    ISO 14229-1 UDS 
    2013 
    [6]   ISO 
    ISO 15031-5 OBD 
    2004 
    [7]   ISO 
    ISO 27145-2 WWH-OBD CDD Emissions 
    2009 
    [8]   ISO 
    ISO 27145-3 WWH-OBD CMD 
    2009 
    [9]  V 
    Vector 
    TechnicalReference_PostBuildSelectable.pdf 
    See delivery 
    [10]  Vector 
    TechnicalReference_IdentityManager.pdf 
    See delivery 
    [11]  Vector 
    TechnicalReference_Dem.pdf 
    See delivery 
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
     
    Caution 
    This symbol calls your attention to warnings. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    12 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Contents 
    1 
    Component History .................................................................................................... 28 
    2 
    Introduction................................................................................................................. 30 
    2.1 

    How to Read This Document ........................................................................... 30 
    2.1.1 

    DCM Integration and Basic Operation .............................................. 30 
    2.1.2 
    Diagnostic Service Documentation ................................................... 30 
    2.1.3 
    API Definitions ................................................................................. 31 
    2.1.4 
    DCM Configuration Parameter Descriptions ..................................... 31 
    2.2 
    Architecture Overview ...................................................................................... 32 
    3 
    Functional Description ............................................................................................... 34 
    3.1 

    Features .......................................................................................................... 34 
    3.2 
    Initialization ...................................................................................................... 35 
    3.3 
    States .............................................................................................................. 35 
    3.4 
    Main Functions ................................................................................................ 35 
    3.4.1 

    Split Task Functions ......................................................................... 35 
    3.4.1.1 

    Functionality .................................................................. 35 
    3.4.1.2 
    Configuration Aspects .................................................... 36 
    3.4.1.3 
    Integration Aspects ........................................................ 36 
    3.5 
    Error Handling .................................................................................................. 36 
    3.5.1 

    Development Error Reporting ........................................................... 36 
    3.5.2 
    Production Code Error Reporting ..................................................... 38 
    4 
    Integration ................................................................................................................... 39 
    4.1 

    Scope of Delivery ............................................................................................. 39 
    4.1.1 

    Static Files ....................................................................................... 39 
    4.1.2 
    Dynamic Files .................................................................................. 40 
    4.2 
    Include Structure .............................................................................................. 41 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 41 
    4.4 
    Critical Sections ............................................................................................... 43 
    4.5 
    Considerations Using Request- and ResponseData Pointers in a Call-back .... 43 
    5 
    Diagnostic Service Implementation........................................................................... 44 
    5.1 
    RequestCurrentPowertrainDiagnosticData ($01).............................................. 45 
    5.1.1 

    Functionality ..................................................................................... 45 
    5.1.2 
    Required Interfaces .......................................................................... 45 
    5.1.3 
    Implementation Aspects ................................................................... 45 
    5.1.4 
    Configuration Aspects ...................................................................... 45 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    13 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.2 
    RequestPowertrainFreezeFrameData ($02) ..................................................... 47 
    5.2.1 

    Functionality ..................................................................................... 47 
    5.2.2 
    Required Interfaces .......................................................................... 47 
    5.2.3 
    Implementation Aspects ................................................................... 47 
    5.2.4 
    Configuration Aspects ...................................................................... 47 
    5.3 
    RequestEmissionRelatedDTC ($03) ................................................................ 49 
    5.3.1 

    Functionality ..................................................................................... 49 
    5.3.2 
    Required Interfaces .......................................................................... 49 
    5.3.3 
    Implementation Aspects ................................................................... 49 
    5.3.4 
    Configuration Aspects ...................................................................... 49 
    5.4 
    ClearEmissionRelatedDTC ($04) ..................................................................... 50 
    5.4.1 

    Functionality ..................................................................................... 50 
    5.4.2 
    Required Interfaces .......................................................................... 50 
    5.4.3 
    Implementation Aspects ................................................................... 50 
    5.4.4 
    Configuration Aspects ...................................................................... 50 
    5.5 
    RequestOnBoardMonitorTestResults ($06) ...................................................... 51 
    5.5.1 

    Functionality ..................................................................................... 51 
    5.5.2 
    Required Interfaces .......................................................................... 51 
    5.5.3 
    Implementation Aspects ................................................................... 51 
    5.5.4 
    Configuration Aspects ...................................................................... 52 
    5.6 
    RequestEmissionRelatedDTCsDetectedDuringCurrentOrLastDrivingCycle 
    ($07) ................................................................................................................ 53 
    5.6.1 

    Functionality ..................................................................................... 53 
    5.6.2 
    Required Interfaces .......................................................................... 53 
    5.6.3 
    Implementation Aspects ................................................................... 53 
    5.6.4 
    Configuration Aspects ...................................................................... 53 
    5.7 
    RequestControlOfOnBoardSystemTestOrComponent ($08) ............................ 54 
    5.7.1 

    Functionality ..................................................................................... 54 
    5.7.2 
    Required Interfaces .......................................................................... 54 
    5.7.3 
    Implementation Aspects ................................................................... 54 
    5.7.4 
    Configuration Aspects ...................................................................... 54 
    5.8 
    RequestVehicleInformation ($09) ..................................................................... 56 
    5.8.1 

    Functionality ..................................................................................... 56 
    5.8.2 
    Required Interfaces .......................................................................... 56 
    5.8.3 
    Implementation Aspects ................................................................... 56 
    5.8.4 
    Configuration Aspects ...................................................................... 56 
    5.9 
    RequestEmissionRelatedDTCsWithPermanentStatus ($0A) ............................ 58 
    5.9.1 

    Functionality ..................................................................................... 58 
    5.9.2 
    Required Interfaces .......................................................................... 58 
    5.9.3 
    Implementation Aspects ................................................................... 58 
    5.9.4 
    Configuration Aspects ...................................................................... 58 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    14 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.10 
    DiagnosticSessionControl ($10) ....................................................................... 59 
    5.10.1 

    Functionality ..................................................................................... 59 
    5.10.2 
    Required Interfaces .......................................................................... 59 
    5.10.3 
    Implementation Aspects ................................................................... 59 
    5.10.4 
    Configuration Aspects ...................................................................... 59 
    5.11 
    EcuReset ($11) ................................................................................................ 61 
    5.11.1 

    Functionality ..................................................................................... 61 
    5.11.2 
    Required Interfaces .......................................................................... 61 
    5.11.3 
    Implementation Aspects ................................................................... 61 
    5.11.4 
    Configuration Aspects ...................................................................... 62 
    5.12 
    ClearDiagnosticInformation ($14) ..................................................................... 63 
    5.12.1 

    Functionality ..................................................................................... 63 
    5.12.2 
    Required Interfaces .......................................................................... 63 
    5.12.3 
    Implementation Aspects ................................................................... 63 
    5.12.4 
    Configuration Aspects ...................................................................... 63 
    5.13 
    ReadDiagnosticInformation ($19) ..................................................................... 64 
    5.13.1 

    Functionality ..................................................................................... 64 
    5.13.2 
    Required Interfaces .......................................................................... 64 
    5.13.3 
    Implementation Aspects ................................................................... 64 
    5.13.3.1 
    Reporting Stored DTC Environment Data ...................... 65 
    5.13.4 
    Configuration Aspects ...................................................................... 65 
    5.14 
    ReadDataByIdentifier ($22) .............................................................................. 67 
    5.14.1 

    Functionality ..................................................................................... 67 
    5.14.2 
    Required Interfaces .......................................................................... 67 
    5.14.3 
    Implementation Aspects ................................................................... 67 
    5.14.4 
    Configuration Aspects ...................................................................... 68 
    5.15 
    ReadMemoryByAddress ($23) ......................................................................... 70 
    5.15.1 

    Functionality ..................................................................................... 70 
    5.15.2 
    Required Interfaces .......................................................................... 70 
    5.15.3 
    Implementation Aspects ................................................................... 70 
    5.15.4 
    Configuration Aspects ...................................................................... 71 
    5.16 
    ReadScalingDataByIdentifier ($24) .................................................................. 71 
    5.16.1 

    Functionality ..................................................................................... 71 
    5.16.2 
    Required Interfaces .......................................................................... 71 
    5.16.3 
    Implementation Aspects ................................................................... 71 
    5.16.4 
    Configuration Aspects ...................................................................... 72 
    5.17 
    SecurityAccess ($27) ....................................................................................... 73 
    5.17.1 

    Functionality ..................................................................................... 73 
    5.17.2 
    Required Interfaces .......................................................................... 73 
    5.17.3 
    Implementation Aspects ................................................................... 73 
    5.17.4 
    Configuration Aspects ...................................................................... 74 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    15 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.18 
    CommunicationControl ($28) ........................................................................... 76 
    5.18.1 

    Functionality ..................................................................................... 76 
    5.18.2 
    Required Interfaces .......................................................................... 76 
    5.18.3 
    Implementation Aspects ................................................................... 76 
    5.18.4 
    Configuration Aspects ...................................................................... 77 
    5.19 
    ReadDataByPeriodicIdentifier ($2A)................................................................. 78 
    5.19.1 

    Functionality ..................................................................................... 78 
    5.19.2 
    Required Interfaces .......................................................................... 78 
    5.19.3 
    Implementation Aspects ................................................................... 78 
    5.19.4 
    Configuration Aspects ...................................................................... 79 
    5.20 
    DynamicallyDefineDataIdentifier ($2C) ............................................................ 81 
    5.20.1 

    Functionality ..................................................................................... 81 
    5.20.2 
    Required Interfaces .......................................................................... 81 
    5.20.3 
    Implementation Aspects ................................................................... 81 
    5.20.4 
    Configuration Aspects ...................................................................... 82 
    5.21 
    WriteDataByIdentifier ($2E).............................................................................. 84 
    5.21.1 

    Functionality ..................................................................................... 84 
    5.21.2 
    Required Interfaces .......................................................................... 84 
    5.21.3 
    Implementation Aspects ................................................................... 84 
    5.21.4 
    Configuration Aspects ...................................................................... 85 
    5.22 
    InputOutputControlByIdentifier ($2F)................................................................ 86 
    5.22.1 

    Functionality ..................................................................................... 86 
    5.22.2 
    Required Interfaces .......................................................................... 86 
    5.22.3 
    Implementation Aspects ................................................................... 86 
    5.22.4 
    Configuration Aspects ...................................................................... 88 
    5.23 
    RoutineControl ($31) ........................................................................................ 90 
    5.23.1 

    Functionality ..................................................................................... 90 
    5.23.2 
    Required Interfaces .......................................................................... 90 
    5.23.3 
    Implementation Aspects ................................................................... 90 
    5.23.4 
    Configuration Aspects ...................................................................... 90 
    5.24 
    WriteMemoryByAddress ($3D) ......................................................................... 92 
    5.24.1 

    Functionality ..................................................................................... 92 
    5.24.2 
    Required Interfaces .......................................................................... 92 
    5.24.3 
    Implementation Aspects ................................................................... 92 
    5.24.4 
    Configuration Aspects ...................................................................... 93 
    5.25 
    TesterPresent ($3E) ......................................................................................... 94 
    5.25.1 

    Functionality ..................................................................................... 94 
    5.25.2 
    Required Interfaces .......................................................................... 94 
    5.25.3 
    Implementation Aspects ................................................................... 94 
    5.25.4 
    Configuration Aspects ...................................................................... 95 
    5.26 
    ControlDTCSetting ($85) .................................................................................. 96 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    16 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.26.1 
    Functionality ..................................................................................... 96 
    5.26.2 
    Required Interfaces .......................................................................... 96 
    5.26.3 
    Implementation Aspects ................................................................... 96 
    5.26.4 
    Configuration Aspects ...................................................................... 96 
    6 
    API Description ........................................................................................................... 98 
    6.1 

    Type Definitions ............................................................................................... 98 
    6.1.1 

    Dcm_ProtocolType ........................................................................... 98 
    6.1.2 
    Dcm_RecoveryInfoType ................................................................... 98 
    6.1.3 
    Dcm_VsgIdentifierType .................................................................. 100 
    6.1.4 
    Dcm_VsgStateType ....................................................................... 100 
    6.2 
    Services provided by DCM ............................................................................. 101 
    6.2.1 

    Administrative ................................................................................ 101 
    6.2.1.1 

    Dcm_Init() .................................................................... 101 
    6.2.1.2 
    Dcm_MainFunction() .................................................... 101 
    6.2.1.3 
    Dcm_MainFunctionTimer() ........................................... 102 
    6.2.1.4 
    Dcm_MainFunctionWorker() ........................................ 103 
    6.2.1.5 
    Dcm_GetVersionInfo() ................................................. 103 
    6.2.1.6 
    Dcm_InitMemory() ....................................................... 104 
    6.2.1.7 
    Dcm_ProvideRecoveryStates() .................................... 105 
    6.2.2 
    SWC .............................................................................................. 105 
    6.2.2.1 

    Dcm_GetActiveProtocol() ............................................ 105 
    6.2.2.2 
    Dcm_GetSecurityLevel() .............................................. 106 
    6.2.2.3 
    Dcm_GetSesCtrlType() ................................................ 107 
    6.2.2.4 
    Dcm_ResetToDefaultSession() .................................... 107 
    6.2.2.5 
    Dcm_GetSecurityLevelFixedBytes() ............................ 108 
    6.2.2.6 
    Dcm_SetActiveDiagnostic() ......................................... 109 
    6.2.2.7 
    Dcm_GetRequestKind() ............................................... 110 
    6.2.2.8 
    Dcm_VsgSetSingle() ..................................................... 111 
    6.2.2.9 
    Dcm_VsgSetMultiple() .................................................. 111 
    6.2.2.10 
    Dcm_VsgIsActive() ...................................................... 112 
    6.2.2.11 
    Dcm_VsgIsActiveAnyOf() ............................................ 112 
    6.2.3 
    General Purpose ............................................................................ 113 
    6.2.3.1 

    Dcm_GetTesterSourceAddress() ................................. 113 
    6.2.3.2 
    Dcm_ProcessVirtualRequest() ..................................... 114 
    6.2.3.3 
    Dcm_SetSecurityLevel() .............................................. 115 
    6.3 
    Services used by DCM................................................................................... 116 
    6.4 
    Callback Functions ......................................................................................... 117 
    6.4.1 

    <Module> ....................................................................................... 117 
    6.4.1.1 
    Dcm_ExternalProcessingDone() .................................. 118 
    6.4.1.2 
    Dcm_ExternalSetNegResponse() ................................ 118 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    17 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.2 
    ComM ............................................................................................ 119 
    6.4.2.1 

    Dcm_ComM_NoComModeEntered() ........................... 119 
    6.4.2.2 
    Dcm_ComM_SilentComModeEntered() ....................... 119 
    6.4.2.3 
    Dcm_ComM_FullComModeEntered() .......................... 120 
    6.4.3 
    PduR .............................................................................................. 120 
    6.4.3.1 
    All AUTOSAR Versions ................................................ 121 
    6.4.3.1.1 

    Dcm_TriggerTransmit() ............................ 121 
    6.4.3.2 
    AUTOSAR 4 ................................................................ 121 
    6.4.3.2.1 

    Dcm_StartOfReception() .......................... 121 
    6.4.3.2.2 
    Dcm_CopyRxData() ................................. 122 
    6.4.3.2.3 
    Dcm_TpRxIndication() ............................. 123 
    6.4.3.2.4 
    Dcm_CopyTxData() ................................. 124 
    6.4.3.2.5 
    Dcm_TpTxConfirmation() ......................... 125 
    6.4.3.2.6 
    Dcm_TxConfirmation() ............................. 126 
    6.4.3.3 
    AUTOSAR 3 ................................................................ 127 
    6.4.3.3.1 

    Dcm_ProvideRxBuffer() ........................... 127 
    6.4.3.3.2 
    Dcm_RxIndication() ................................. 128 
    6.4.3.3.3 
    Dcm_ProvideTxBuffer() ............................ 129 
    6.4.3.3.4 
    Dcm_TxConfirmation() ............................. 130 
    6.4.4 
    CanTp ............................................................................................ 131 
    6.4.4.1 

    Dcm_OnRequestDetection() ........................................ 131 
    6.5 
    Configurable Interfaces .................................................................................. 131 
    6.5.1 

    Callout Functions ........................................................................... 131 
    6.5.1.1 
    <Module>_<DiagnosticService>() ................................ 132 
    6.5.1.2 
    <Module>_<DiagnosticService>_<SubService>() ........ 133 
    6.5.1.3 
    Dcm_SetProgConditions() ........................................... 134 
    6.5.1.4 
    Dcm_GetProgConditions() ........................................... 135 
    6.5.1.5 
    Dcm_Confirmation() ..................................................... 136 
    6.5.1.6 
    Dcm_ReadMemory() .................................................... 137 
    6.5.1.7 
    Dcm_WriteMemory() .................................................... 138 
    6.5.1.8 
    <Diagnostic Session Change Notification Callback> .... 139 
    6.5.1.9 
    <Security Access Change Notification Callback> ......... 140 
    6.5.1.10 
    Dcm_GetRecoveryStates() .......................................... 141 
    6.5.1.11 
    Dcm_FilterDidLookUpResult ........................................ 142 
    6.5.1.12 
    Dcm_FilterRidLookUpResult ........................................ 143 
    6.5.2 
    Required Port Operation Functions ................................................ 144 
    6.5.2.1 

    ConditionCheckRead() ................................................. 144 
    6.5.2.2 
    ReadData() (asynchronous) ......................................... 145 
    6.5.2.3 
    ReadData() (synchronous) ........................................... 145 
    6.5.2.4 
    ReadDataLength() ....................................................... 146 
    6.5.2.5 
    WriteData() (dynamic length) ....................................... 147 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    18 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.6 
    WriteData() (static length) ............................................ 148 
    6.5.2.7 
    ReturnControlToECU() ................................................. 149 
    6.5.2.8 
    ResetToDefault() .......................................................... 150 
    6.5.2.9 
    FreezeCurrentState() ................................................... 151 
    6.5.2.10 
    ShortTermAdjustment() ................................................ 152 
    6.5.2.11 
    GetScalingInformation() ............................................... 153 
    6.5.2.12 
    Start() .......................................................................... 154 
    6.5.2.13 
    Stop() ........................................................................... 155 
    6.5.2.14 
    RequestResults() ......................................................... 156 
    6.5.2.15 
    GetSeed() (with SADR) ................................................ 157 
    6.5.2.16 
    GetSeed() (without SADR) ........................................... 158 
    6.5.2.17 
    CompareKey() ............................................................. 159 
    6.5.2.18 
    Indication() ................................................................... 160 
    6.5.2.19 
    Confirmation() .............................................................. 161 
    6.5.2.20 
    GetDTRValue() ............................................................ 162 
    6.5.2.21 
    RequestControl() ......................................................... 163 
    6.5.2.22 
    GetInfotypeValueData()................................................ 164 
    6.5.2.23 
    StartProtocol() .............................................................. 165 
    6.5.2.24 
    IsDidAvailable() ............................................................ 166 
    6.5.2.25 
    ReadDidData() ............................................................. 167 
    6.5.2.26 
    WriteDidData() ............................................................. 168 
    6.5.2.27 
    GetSecurityAttemptCounter() ....................................... 169 
    6.5.2.28 
    SetSecurityAttemptCounter() ....................................... 170 
    6.5.2.29 
    ReadData() (paged-data-reading) ................................ 171 
    6.6 
    Service Ports ................................................................................................. 171 
    6.6.1 

    Client-Server Interface ................................................................... 171 
    6.6.1.1 

    Provide Ports on DCM Side ......................................... 171 
    6.6.1.1.1 
    DCMServices ........................................... 172 
    6.6.1.2 
    Require Ports on DCM Side ......................................... 172 
    6.6.1.2.1 
    DataServices_<DataName> .................... 173 
    6.6.1.2.2 
    RoutineServices_<RoutineName> ........... 173 
    6.6.1.2.3 
    SecurityAccess_<SecurityLevelName> .... 173 
    6.6.1.2.4
    ServiceRequestManufacturerNotification_<SWC> 174 
    6.6.1.2.5
     . ServiceRequestSupplierNotification_<SWC> 174 
    6.6.1.2.6 
    DtrServices_<MIDName>_<TIDName> ... 174 
    6.6.1.2.7 
    RequestControlServices_<TIDName> ..... 174 
    6.6.1.2.8 
    InfotypeServices_<VEHINFODATA> ........ 174 
    6.6.1.2.9 
    CallbackDCMRequestServices_<SWC> .. 175 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    19 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.6.1.2.10
     ...... DataServices_DIDRange_<RangeName> 175 
    6.6.2 
    Managed Mode Declaration Groups ............................................... 175 
    6.6.2.1 

    DcmDiagnosticSessionControl ..................................... 175 
    6.6.2.2 
    DcmCommunicationControl_<ComM_CHANNEL_SNV>176 
    6.6.2.3 
    DcmEcuReset .............................................................. 177 
    6.6.2.4 
    DcmModeRapidPowerShutDown ................................. 178 
    6.6.2.5 
    DcmControlDTCSetting ............................................... 178 
    6.6.2.6 
    DcmSecurityAccess ..................................................... 179 
    7 
    Configuration ............................................................................................................ 180 
    7.1 

    Configuration Variants .................................................................................... 180 
    7.2 
    Configurable Attributes ................................................................................... 180 
    8 
    AUTOSAR Standard Compliance............................................................................. 181 
    8.1 

    Deviations ...................................................................................................... 181 
    8.2 
    Additions/ Extensions ..................................................................................... 182 
    8.3 
    Limitations...................................................................................................... 183 
    9 
    Using the DCM .......................................................................................................... 184 
    9.1 

    How to Reduce RAM Usage .......................................................................... 184 
    9.2 
    How to Reduce DCM Main-Function Run Time Usage ................................... 186 
    9.3 
    How to Force DCM to not Respond on Requests with Response SIDs .......... 187 
    9.4 
    How to Handle Multiple Diagnostic Clients Simultaneously ............................ 188 
    9.5 
    How to Restrict a Diagnostic Service Execution by a Condition ..................... 188 
    9.6 
    How to Get Notified on a Diagnostic Service Execution Start and End ........... 189 
    9.7 
    How to Limit the Diagnostic Service Processing Time .................................... 189 
    9.8 
    How to Jump into the FBL from Service DiagnosticSessionControl ($10) ....... 190 
    9.9 
    The HIS Compliant Jump into FBL ................................................................. 190 
    9.9.1 

    The HIS Alternative Jump into FBL ................................................ 190 
    9.10 
    How to Put DCM in a Non-Default Session at ECU Power-On ....................... 190 
    9.11 
    How to Support Calibrateable Configuration Parameters ............................... 191 
    9.11.1 
    OBD Calibration ............................................................................. 192 
    9.11.1.1 

    Calibration of Supported OBD Services ....................... 192 
    9.11.1.2 
    Calibration of Supported OBD Parameter Identifier ...... 193 
    9.12 
    How and When to Configure Multiple Protocols ............................................. 196 
    9.12.1 

    Diagnostic Client(s) Processing Prioritization ................................. 196 
    9.12.2 
    Client Specific Diagnostic Application Timings ................................ 200 
    9.12.3 
    Diagnostic Service Firewall ............................................................ 200 
    9.13 
    How to Select DEM-DCM Interface Version ................................................... 201 
    9.13.1 

    Setting the ClientId for DEM AR 4.3.0 API ...................................... 201 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    20 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.14 
    How to Support OBD and UDS over a Single Client Connection .................... 201 
    9.15 
    How to Use a User Configuration File ............................................................ 202 
    9.16 
    How to Know When the Security Access Level Changes ............................... 202 
    9.16.1 
    Invoking a Mode Switch ................................................................. 203 
    9.16.2 
    Calling a Function Implemented Within a CDD Module .................. 203 
    9.17 
    How to Deal with the PduR AR version .......................................................... 204 
    9.17.1 

    AUTOSAR 3 Environment .............................................................. 204 
    9.17.2 
    AUTOSAR 4 Environment .............................................................. 204 
    9.18 
    Post-build Support ......................................................................................... 204 
    9.18.1 
    Post-build Variance Level ............................................................... 205 
    9.18.1.1 

    Communication Part .................................................... 205 
    9.18.1.2 
    Diagnostic Services Part .............................................. 205 
    9.18.1.2.1  Handling of State Execution 
    Preconditions of Variant Diagnostic 
    Entities ..................................................... 208 

    9.18.2 
    Initialization .................................................................................... 210 
    9.18.2.1 

    Error Detection and Handling ....................................... 210 
    9.18.3 
    Post-build Variants ......................................................................... 211 
    9.18.3.1 

    Post-build selectable .................................................... 211 
    9.18.3.2 
    Post-build loadable ...................................................... 211 
    9.18.3.3 
    Post-build loadable selectable ..................................... 211 
    9.18.3.4 
    Post-build deleteable ................................................... 212 
    9.19 
    Handling with DID Ranges ............................................................................. 212 
    9.19.1 

    Introduction .................................................................................... 212 
    9.19.2 
    Implementation Limitations............................................................. 212 
    9.19.3 
    Configuration Aspects .................................................................... 213 
    9.20 
    How to Support DID 0xF186 .......................................................................... 213 
    9.21 
    How to Suppress Responses to Functional Addressed Requests .................. 214 
    9.22 
    How to Support Interruption on Requests with Foreign N_TA ......................... 214 
    9.23 
    How to Know When the Diagnostic Session Changes ................................... 215 
    9.24 
    How to Save RAM using Paged-Buffer for Large DIDs................................... 215 
    9.24.1 

    Introduction .................................................................................... 215 
    9.24.2 
    Functionality ................................................................................... 216 
    9.24.3 
    Implementation Limitations............................................................. 217 
    9.24.4 
    Usage ............................................................................................ 217 
    9.24.4.1 
    Straightforward DID Paged-Data Reading ................... 218 
    9.24.4.2 
    Error Handling During DID Paged-Data Reading ......... 218 
    9.24.5 
    Configuration Aspects .................................................................... 222 
    9.25 
    How to Get Security-Access Level Specific Fixed Byte Values ....................... 223 
    9.25.1 

    Introduction .................................................................................... 223 
    9.25.2 
    Usage ............................................................................................ 224 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    21 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.25.3 
    Security Level Fixed Bytes variant handling with VSGs .................. 224 
    9.25.4 
    Configuration Aspects .................................................................... 224 
    9.26 
    How to Extend the Diag Keep Alive Time during Diagnostics ......................... 225 
    9.26.1 

    Problem Description ....................................................................... 225 
    9.26.2 
    Configuration Aspects .................................................................... 225 
    9.27 
    How to Recover DCM State Context on ECU Reset/ Power On ..................... 225 
    9.27.1 

    Introduction .................................................................................... 225 
    9.27.2 
    Functionality ................................................................................... 226 
    9.27.3 
    Configuration Aspect ...................................................................... 226 
    9.28 
    How to Define a Diagnostic Connection without USDT Responses ................ 226 
    9.29 
    How to Handle Multiple Diagnostic Service Variants ...................................... 227 
    9.29.1 

    Introduction .................................................................................... 227 
    9.29.2 
    Filtering Level Availability and the Corresponding Filtering Tools .... 227 
    9.29.3 
    Filtering OBD Objects .................................................................... 228 
    9.29.3.1 
    Suggested Preparation Methodology for Filtering 
    Process of OBD Objects .............................................. 229 

    9.30 
    How to Switch Between OBD DTR Support by DCM and DEM ...................... 229 
    9.30.1 

    Implementation Particularities and Limitations................................ 229 
    9.30.2 
    Configuration Aspect ...................................................................... 230 
    9.31 
    How to Enable Support of OBD VIDs with Dynamic Length ........................... 230 
    9.31.1 

    Implementation Limitations............................................................. 230 
    9.32 
    How to setup DCM for Sender-Receiver Communication ............................... 231 
    9.32.1 

    Implementation Limitations............................................................. 231 
    9.32.2 
    Application usage Scenario ............................................................ 232 
    9.32.3 
    Configuration Aspects .................................................................... 233 
    9.33 
    How to Support Routine Info Byte with UDS RIDs.......................................... 234 
    9.33.1 

    Introduction .................................................................................... 234 
    9.33.2 
    Configuration Aspects .................................................................... 234 
    9.34 
    Vehicle System Group Support ...................................................................... 234 
    9.34.1 

    Introduction .................................................................................... 234 
    9.34.2 
    Functionality ................................................................................... 234 
    9.34.3 
    VSG operations .............................................................................. 234 
    9.34.4 
    Configuration Aspects .................................................................... 235 
    10  Troubleshooting ....................................................................................................... 237 
    10.1 
    Compile Error Messages ................................................................................ 237 
    10.2 
    Code Generation Time Messages .................................................................. 238 
    11  Glossary and Abbreviations .................................................................................... 241 
    11.1 
    Glossary ........................................................................................................ 241 
    11.2 
    Abbreviations ................................................................................................. 241 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    22 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    12  Contact ...................................................................................................................... 243 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    23 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.2 Architecture Overview ....................................................... 32 
    Figure 2-2 
    Interfaces to adjacent modules of the DCM .............................................. 33 
    Figure 4-1 
    Include structure ....................................................................................... 41 
    Figure 9-1 
    Straightforward DID paged-data reading ................................................. 218 
    Figure 9-2 
    DID paged-data reading cancelled due to TP layer transmission abortion220 
    Figure 9-3 
    Protocol preemption during DID paged-data access ............................... 221 
    Figure 9-4 
    RCR-RP limit reached during DID paged-data access ............................ 222 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 29 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 34 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 34 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 35 
    Table 3-4  
    DET Service IDs ....................................................................................... 38 
    Table 3-5  
    Errors reported to DET ............................................................................. 38 
    Table 4-1  
    Static files ................................................................................................. 39 
    Table 4-2  
    Generated files ......................................................................................... 40 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 42 
    Table 5-1  
    Service $01: Implementation types ........................................................... 45 
    Table 5-2  
    Service $01: Supported subservices ......................................................... 45 
    Table 5-3  
    Service $02: Implementation types ........................................................... 47 
    Table 5-4  
    Service $02: Supported subservices ......................................................... 47 
    Table 5-5  
    Service $03: Implementation types ........................................................... 49 
    Table 5-6  
    Service $03: Supported subservices ......................................................... 49 
    Table 5-7  
    Service $04: Implementation types ........................................................... 50 
    Table 5-8  
    Service $04: Supported subservices ......................................................... 50 
    Table 5-9  
    Service $06: Implementation types ........................................................... 51 
    Table 5-10  
    Service $06: Supported subservices ......................................................... 51 
    Table 5-11  
    Service $07: Implementation types ........................................................... 53 
    Table 5-12  
    Service $07: Supported subservices ......................................................... 53 
    Table 5-13  
    Service $08: Implementation types ........................................................... 54 
    Table 5-14  
    Service $08: Supported subservices ......................................................... 54 
    Table 5-15  
    Service $09: Implementation types ........................................................... 56 
    Table 5-16  
    Service $09: Supported subservices ......................................................... 56 
    Table 5-17  
    Service $0A: Implementation types ........................................................... 58 
    Table 5-18  
    Service $0A: Supported subservices ........................................................ 58 
    Table 5-19  
    Service $10: Implementation types ........................................................... 59 
    Table 5-20  
    Service $10: Supported subservices ......................................................... 59 
    Table 5-21  
    Service $11: Implementation types ........................................................... 61 
    Table 5-22  
    Service $11: Supported subservices ......................................................... 62 
    Table 5-23  
    Service $14: Implementation types ........................................................... 63 
    Table 5-24  
    Service $14: Supported subservices ......................................................... 63 
    Table 5-25  
    Service $19: Implementation types ........................................................... 64 
    Table 5-26  
    Service $19: Supported subservices ......................................................... 64 
    Table 5-27  
    Service $22: Implementation types ........................................................... 67 
    Table 5-28  
    Service $22: Supported subservices ......................................................... 67 
    Table 5-29  
    Service $23: Implementation types ........................................................... 70 
    Table 5-30  
    Service $23: Supported subservices ......................................................... 70 
    Table 5-31  
    Service $24: Implementation types ........................................................... 71 
    Table 5-32  
    Service $24: Supported subservices ......................................................... 71 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    24 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 5-33  
    Service $27: Implementation types ........................................................... 73 
    Table 5-34  
    Service $27: Supported subservices ......................................................... 73 
    Table 5-35  
    Service $28: Implementation types ........................................................... 76 
    Table 5-36  
    Service $28: Supported subservices ......................................................... 76 
    Table 5-37  
    Service $2A: Implementation types ........................................................... 78 
    Table 5-38  
    Service $2A: Supported subservices ........................................................ 78 
    Table 5-39  
    Service $2C: Implementation types .......................................................... 81 
    Table 5-40  
    Service $2C: Supported subservices ........................................................ 81 
    Table 5-41  
    Service $2E: Implementation types ........................................................... 84 
    Table 5-42  
    Service $2E: Supported subservices ........................................................ 84 
    Table 5-43  
    Service $2F: Implementation types ........................................................... 86 
    Table 5-44  
    Service $2F: Supported subservices ........................................................ 86 
    Table 5-45  
    Service $31: Implementation types ........................................................... 90 
    Table 5-46  
    Service $31: Supported subservices ......................................................... 90 
    Table 5-47  
    Service $3D: Implementation types .......................................................... 92 
    Table 5-48  
    Service $3D: Supported subservices ........................................................ 92 
    Table 5-49  
    Service $3E: Implementation types ........................................................... 94 
    Table 5-50  
    Service $3E: Supported subservices ........................................................ 94 
    Table 5-51  
    Service $85: Implementation types ........................................................... 96 
    Table 5-52  
    Service $85: Supported subservices ......................................................... 96 
    Table 6-1  
    Dcm_ProtocolType ................................................................................... 98 
    Table 6-2  
    Dcm_RecoveryInfoType ........................................................................... 99 
    Table 6-3  
    Dcm_Init() ............................................................................................... 101 
    Table 6-4  
    Dcm_MainFunction() .............................................................................. 102 
    Table 6-5  
    Dcm_MainFunctionTimer() ..................................................................... 102 
    Table 6-6  
    Dcm_MainFunctionWorker() ................................................................... 103 
    Table 6-7  
    Dcm_GetVersionInfo() ............................................................................ 103 
    Table 6-8  
    Dcm_InitMemory() .................................................................................. 104 
    Table 6-9  
    Dcm_ProvideRecoveryStates() ............................................................... 105 
    Table 6-10  
    Dcm_GetActiveProtocol() ....................................................................... 106 
    Table 6-11  
    Dcm_GetSecurityLevel() ......................................................................... 106 
    Table 6-12  
    Dcm_GetSesCtrlType() ........................................................................... 107 
    Table 6-13  
    Dcm_ResetToDefaultSession() ............................................................... 107 
    Table 6-14  
    Dcm_GetSecurityLevelFixedBytes() ....................................................... 108 
    Table 6-15  
    Dcm_SetActiveDiagnostic() .................................................................... 109 
    Table 6-16  
    Dcm_GetRequestKind() .......................................................................... 110 
    Table 6-17  
    Dcm_VsgSetSingle() ............................................................................... 111 
    Table 6-18  
    Dcm_VsgSetMultiple() ............................................................................. 111 
    Table 6-19  
    Dcm_VsgIsActive() ................................................................................. 112 
    Table 6-20  
    Dcm_VsgIsActiveAnyOf() ....................................................................... 112 
    Table 6-21  
    Dcm_GetTesterSourceAddress() ............................................................ 113 
    Table 6-22  
    Dcm_ProcessVirtualRequest() ................................................................ 114 
    Table 6-23  
    Dcm_SetSecurityLevel() ......................................................................... 115 
    Table 6-24  
    Services used by the DCM ..................................................................... 117 
    Table 6-25  
    Dcm_ExternalProcessingDone() ............................................................. 118 
    Table 6-26  
    Dcm_ExternalSetNegResponse() ........................................................... 118 
    Table 6-27  
    Dcm_ComM_NoComModeEntered() ...................................................... 119 
    Table 6-28  
    Dcm_ComM_SilentComModeEntered() .................................................. 120 
    Table 6-29  
    Dcm_ComM_FullComModeEntered() ..................................................... 120 
    Table 6-30  
    Dcm_TriggerTransmit () .......................................................................... 121 
    Table 6-31  
    Dcm_StartOfReception() ........................................................................ 122 
    Table 6-32  
    Dcm_CopyRxData() ................................................................................ 123 
    Table 6-33  
    Dcm_TpRxIndication() ............................................................................ 123 
    Table 6-34  
    Dcm_CopyTxData() ................................................................................ 124 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    25 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 6-35  
    Dcm_TpTxConfirmation()........................................................................ 125 
    Table 6-36  
    Dcm_TxConfirmation() ............................................................................ 126 
    Table 6-37  
    Dcm_ProvideRxBuffer () ......................................................................... 127 
    Table 6-38  
    Dcm_RxIndication() ................................................................................ 128 
    Table 6-39  
    Dcm_ProvideTxBuffer () ......................................................................... 129 
    Table 6-40  
    Dcm_TxConfirmation() ............................................................................ 130 
    Table 6-41  
    Dcm_ OnRequestDetection() .................................................................. 131 
    Table 6-42  
    <Module>_<DiagnosticService>() ........................................................... 132 
    Table 6-43  
    <Module>_<DiagnosticService>_<SubService>() ................................... 133 
    Table 6-44  
    Dcm_SetProgConditions() ...................................................................... 134 
    Table 6-45  
    Dcm_GetProgConditions() ...................................................................... 135 
    Table 6-46  
    Dcm_Confirmation() ................................................................................ 136 
    Table 6-47  
    Dcm_ReadMemory() .............................................................................. 137 
    Table 6-48  
    Dcm_WriteMemory() ............................................................................... 138 
    Table 6-49  
    < Diagnostic Session Change Notification Callback > ............................. 139 
    Table 6-50  
    <Security Access Change Notification Callback> .................................... 140 
    Table 6-51  
    Dcm_GetRecoveryStates() ..................................................................... 141 
    Table 6-52  
    Dcm_FilterDidLookUpResult ................................................................... 142 
    Table 6-53  
    Dcm_FilterRidLookUpResult ................................................................... 143 
    Table 6-54  
    ConditionCheckRead() ........................................................................... 144 
    Table 6-55  
    ReadData() (asynchronous) .................................................................... 145 
    Table 6-56  
    ReadData() (synchronous) ...................................................................... 145 
    Table 6-57  
    ReadDataLength() .................................................................................. 146 
    Table 6-58  
    WriteData() (dynamic length) .................................................................. 147 
    Table 6-59  
    WriteData() (static length) ....................................................................... 148 
    Table 6-60  
    ReturnControlToECU() ............................................................................ 149 
    Table 6-61  
    ResetToDefault() ..................................................................................... 150 
    Table 6-62  
    FreezeCurrentState() .............................................................................. 151 
    Table 6-63  
    ShortTermAdjustment() ........................................................................... 152 
    Table 6-64  
    GetScalingInformation() .......................................................................... 153 
    Table 6-65  
    Start() ..................................................................................................... 154 
    Table 6-66  
    Stop() ..................................................................................................... 156 
    Table 6-67  
    RequestResults() .................................................................................... 157 
    Table 6-68  
    GetSeed() (with SADR) .......................................................................... 157 
    Table 6-69  
    GetSeed() (without SADR) ...................................................................... 158 
    Table 6-70  
    CompareKey() ........................................................................................ 159 
    Table 6-71  
    Indication() .............................................................................................. 160 
    Table 6-72  
    Confirmation() ......................................................................................... 161 
    Table 6-73  
    GetDTRValue() ....................................................................................... 162 
    Table 6-74  
    RequestControl() .................................................................................... 163 
    Table 6-75  
    GetInfotypeValueData() .......................................................................... 164 
    Table 6-76  
    StartProtocol() ........................................................................................ 165 
    Table 6-77  
    IsDidAvailable () ..................................................................................... 166 
    Table 6-78  
    ReadDidData() ........................................................................................ 167 
    Table 6-79  
    WriteDidData() ........................................................................................ 168 
    Table 6-80  
    GetSecurityAttemptCounter () ................................................................. 169 
    Table 6-81  
    SetSecurityAttemptCounter () ................................................................. 170 
    Table 6-82  
    ReadData() (paged-data-reading) ........................................................... 171 
    Table 6-83  
    DCMServices .......................................................................................... 172 
    Table 6-84  
    DataServices_<DataName> ................................................................... 173 
    Table 6-85  
    RoutineServices_<RoutineName> .......................................................... 173 
    Table 6-86  
    SecurityAccess_<SecurityLevelName> .................................................. 174 
    Table 6-87  
    ServiceRequestManufacturerNotification_<SWC> .................................. 174 
    Table 6-88  
    ServiceRequestSupplierNotification_<SWC> .......................................... 174 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    26 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 6-89  
    DtrServices_<MIDName>_<TIDName> .................................................. 174 
    Table 6-90  
    RequestControlServices_<TIDName> .................................................... 174 
    Table 6-91  
    InfotypeServices_<VEHINFODATA> ...................................................... 174 
    Table 6-92  
    CallbackDCMRequestServices_<SWC > ................................................ 175 
    Table 6-93  
    DataServices_DIDRange_<RangeName> .............................................. 175 
    Table 6-94  
    ModeDeclarationGroups managed by DCM ........................................... 175 
    Table 6-95  
    DcmDiagnosticSessionControl callouts................................................... 175 
    Table 6-96  
    DcmDiagnosticSessionControl modes .................................................... 176 
    Table 6-97  
    DcmCommunicationControl _<ComM_CHANNEL_SNV> callouts .......... 176 
    Table 6-98  
    DcmCommunicationControl_<ComM_CHANNEL_SNV> modes ............ 177 
    Table 6-99  
    DcmEcuReset callouts ............................................................................ 177 
    Table 6-100  
    DcmEcuReset modes ............................................................................. 177 
    Table 6-101  
    DcmModeRapidPowerShutDown callouts ............................................... 178 
    Table 6-102  
    DcmModeRapidPowerShutDown modes ................................................ 178 
    Table 6-103  
    DcmControlDTCSetting callouts ............................................................. 178 
    Table 6-104  
    DcmControlDTCSetting modes ............................................................... 178 
    Table 6-105  
    DcmSecurityAccess callouts ................................................................... 179 
    Table 6-106  
    DcmSecurityAccess modes .................................................................... 179 
    Table 8-1  
    Deviations to AUTOSAR ......................................................................... 181 
    Table 8-2  
    Additions/ Extensions to AUTOSAR ........................................................ 182 
    Table 8-3  
    Limitations to AUTOSAR ......................................................................... 183 
    Table 9-1  
    Diagnostic services with non-trivial DCM Buffer size estimation 
    calculation method .................................................................................. 185 

    Table 9-2  
    Initialization of the Dcm_ProgConditionsType for non-default session 
    activation at ECU power-on .................................................................... 191 

    Table 9-3  
    Calibrateable OBD “availability parameter identifier” values .................... 194 
    Table 9-4  
    Color legend to the protocol prioritization matrixes ................................. 197 
    Table 9-5  
    Protocol prioritization during default session ........................................... 198 
    Table 9-6  
    Protocol prioritization during non-default session .................................... 199 
    Table 9-7  
    Post-build configuration rules on invariant DCM parameters ................... 208 
    Table 9-8  
    Error Codes possible during Post-Build initialization failure ..................... 210 
    Table 9-9  
    Filtering level availability ......................................................................... 227 
    Table 9-10  
    Filter diagnostic objects and the corresponding filtering APIs / Callbacks 228 
    Table 10-1  
    Compile time error messages ................................................................. 238 
    Table 10-2  
    Code Generation Time Messages ........................................................... 240 
    Table 11-1  
    Glossary ................................................................................................. 241 
    Table 11-2  
    Abbreviations .......................................................................................... 242 
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    27 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.0.0 
    Initial Version  
    1.1.0 
    Added support for diagnostic services:  
    ReadDataByPeriodicIdentifier ($2A) 
    InputOutputControlByIdentifier ($2F) 
    1.2.0 
    Added support for diagnostic service: 
    DynamicallyDefineDataIdentifier ($2C) 
    Changed DataServices_<DataName> to have either all synchronous or 
    asynchronous operations. 
    1.3.0 
    Minor improvements 
    1.4.0 
    Support for OBD2 protocol diagnostic services 
    1.5.0 
    Support for multi-protocol use cases and protocol prioritization 
    Support resetting of IO control operation at session change/protocol 
    preemption. 
    Support for IO control actual data reporting in the positive response of 
    SID 0x2F. 
    Support for optional ConditionCheckRead() DataServices operation 
    2.0.0 
    Support for signal interfaces (C/S) for DIDs and RIDs. 
    Extended run time limitation (How to Reduce DCM Main-Function Run 
    Time Usage
    )

    2.1.0 
    Support for DEM AR 4.1.2 API 
    Automatic clear of DDID definition on DCM session/security level change 
    Automatic stop of PDID reading on DCM session/security level change 
    Optional SWC notification on security access level change 
    2.2.0 
    Support NvRam signal access for DIDs 
    Support for PduR AR4.1.2 API 
    3.0.0 
    Support for diagnostic service ReadScalingDataByIdentifier ($24) 
    Support for post-build selectable, loadable, selectable-loadable, deletable 
    for the communication part of DCM. 
    3.1.0 
    Support of DID ranges 
    Support for AR3 interfaces (PduR, ComM etc.) 
    4.0.0 
    Support of response suppression on functional addressed requests 
    Support of interruption by service request with foreign N_TA 
    New include structure and module refactoring 
    Additional notification on diagnostic session and security access level 
    state transitions. 
    4.1.0 
    Support of session specific P2/P2Star timings (5.10.4 Configuration 
    Aspects
    )
    . 
    Non-volatile storage of security access failed attempts (SecurityAccess 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    28 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Component Version  New Features 
    ($27))
    Configurable security level specific fixed bytes to support application 
    seed/key calculation (se9.25 How to Get Security-Access Level Specific 
    Fixed Byte
     Values)

    Support for paged-buffer reading of DIDs over service 
    ReadDataByIdentifier ($22). 
    Selectable C/S or direct function-calls for service 0x27 application 
    callbacks. 
    Extensible Keep-Alive time period (see 9.26 How to Extend the Diag 
    Keep Alive Time during Diagnostics
    )
     
    DCM state recovery on reset /power on (9.27 How to Recover DCM State 
    Context on ECU Reset/ Power
    )
     
    5.0.0 
    Service InputOutputControlByIdentifier ($2F) has now improved auto-
    resetting functionality on any diagnostic state change. 
    Service TesterPresent ($3E) can be handled within the application. Refer 
    to its chapter to get information on any limitations. 
    Support of diagnostic connections without response (see 9.28 How to 
    Define a Diagnostic Connection without USDT
     Responses)
     
    Support of diagnostic service variant-handling using application help (see 
    9.29 How to Handle Multiple Diagnostic Service Variants
    ) 
    5.1.0 
    The request status/kind of a DCM diagnostic client can be acquired at any 
    time, using new provided service API Dcm_GetRequestKind(). 
    Support for bitmapped IO DIDs with CEMR in service 
    InputOutputControlByIdentifier ($2F). 
    5.2.0 
    Minor improvements. 
     
    7.0.0 
    Variant handling for the DCM Diagnostic Services Part. 
    Improved AR 4.2.2 compatibility regarding: 

    How to Switch Between OBD DTR Support by DCM and DEM 

    How to Enable Support of OBD VIDs with Dynamic Length 

    API Dcm_ReadMemory() resp. Dcm_WriteMemory(). 
    7.1.0 
    Automatic reporting of RoutineInfoByte parameter in UDS RIDs (see 9.33 
    How to Support Routine Info Byte with UDS RIDs
    )
     
    7.2.0 
    Support for DEM AR 4.3.0 API 
    9.13 How to Select DEM-DCM Interface Version 
    VSG support DCM 
    9.34 Vehicle System Group Support 
    Table 1-1   Component history 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    29 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module DCM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile, post-build loadable, post-build selectable 
    Vendor ID: 
    DCM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    DCM_MODULE_ID   
    53 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    The Autosar DCM is a software component that 
    -  handles the diagnostic communication between the tester and the ECUs 
    application; 
    -  analyzes and interprets the diagnostic communication protocol UDS based on ISO 
    14229 ([5]); 
    -  implements the handling of all UDS services, providing abstract interface to the 
    application by hiding all protocol specifics; 
    -  provides a built in handling of the fault memory manager (DEM) data acquisition; 
    -  provides service execution precondition validation and state management such as  
    o  diagnostic sessions and security access verification; 
    o  custom ECU mode condition verification (e.g. vehicle speed, etc.) 
     
    2.1 
    How to Read This Document 
    Here are defined some general rules on how to read this document. 
    2.1.1 
    DCM Integration and Basic Operation 
    We  recommend  starting  with  the  chapter  4  Integration.  It  will  help  you  to  bind  the  DCM 
    component into your project and to learn about its integration specific requirements. Once 
    the code binding is finished in your project,  please go on with the Functional Description 
    chapter to learn about how to operate the DCM. 
     
    2.1.2 
    Diagnostic Service Documentation 
    Once the DCM is integrated into your project, you will need to know how each diagnostic 
    service, your ECU has to support, is to be configured, implemented and handled by DCM 
    and  your  application.  For  learning  that,  please  refer  to  chapter  5  Diagnostic  Service 
    Implementation
    .
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    30 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    2.1.3 
    API Definitions 
    You can any time directly refer to a DCM provided/required service or callout description 
    once you have started the DCM application implementation, by searching for the function 
    name in this document. But the usual way is to start with the usage context of the concrete 
    function you are looking for:  
    >  the diagnostic service it is bound to (look into the corresponding Diagnostic Service 
    Implementation sub-chapter)
    >  a special feature it serves (look into the corresponding Using the DCM “how to…” sub-
    chapter) 
    2.1.4 
    DCM Configuration Parameter Descriptions 
    This document  contains  many  references  to  DCM  configuration parameters. The  goal of 
    this  document  is  not  to  describe  the  parameters  in  detail,  but  to  show  you  which 
    parameters  are  bound  to  which  diagnostic  services  or  features.  All  those  parameter 
    references  are  given  as  full  path  links  within  the  DCM  Configurator  5  GCE  for  faster 
    location of the concrete parameter. Once you have followed such a link in the Configurator 
    5  tool,  please  read  the  description  information  bound  to  the  parameter.  Follow  any 
    dependency  links  from  this  description  to  learn  more  about  what  additionally  shall  be 
    configured in order to get a fully functioning configuration. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    31 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    2.2  Architecture Overview 
    The following figure shows where the DCM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.2 Architecture Overview  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    32 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    The  next  figure  shows  the  interfaces to  adjacent  modules  of  the  DCM.  These  interfaces 
    are described in chapter 5.  
     cmp Architecture
    Rte
    Bsw M
    Dem
    Dcm
    SchM
    Det
    PduR
    Nv M
    EcuM
    ComM
     
    Figure 2-2  Interfaces to adjacent modules of the DCM 
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. The service ports provided by the DCM 
    are listed in chapter 6.5.2.1 based on their definition in [1]. In some cases where the DCM 
    requires a call out extension, the DCM calls a CDD module directly through the Dcm_Cdd 
    interface. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    33 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    DCM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
      Table 3-1   Supported AUTOSAR standard conform features  
      Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 8. 
    Vector Informatik provides further DCM functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
      Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    MICROSAR Identity Manager using Post-Build Selectable 
    All features not listed iTable 3-2  Not supported AUTOSAR standard conform features are to be 
    considered as supported. 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    No link time configuration support. 
    No post-build support on diagnostic services (only communication). Though an alternative 
    solution is provided (see 9.29) 
    Table 3-2   Not supported AUTOSAR standard conform features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Possibility to avoid high CPU load peaks:  
    How to Reduce DCM Main-Function Run Time Usage 
    Optimized multi-client communication support:  
    How to Handle Multiple Diagnostic Clients Simultaneously  
    Run time optimized DCM DEM interface for low CPU load. 
    Native AR 4.0.3 and AR 4.1.2 DEM API version support. 
    Support for sub-functions 0x17, 0x18 and 0x19 of service ReadDiagnosticInformation ($19) 
    according t[5]. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    34 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Features Provided Beyond The AUTOSAR Standard 
    Optional notification on security access level change 
    Extensible keep-alive time period: How to Extend the Diag Keep Alive Time during Diagnostics 
    Recovery of DCM states over reset /power down: How to Recover DCM State Context on ECU 
    Reset/ Power
     

    Table 3-3   Features provided beyond the AUTOSAR standard 
     
    3.2  Initialization 
    At ECU power-on boot (or any reset situation) DCM must be initialized by calling the API 
    Dcm_Init() 
    3.3  States 
    DCM manages currently the following state machines: 
    -  Diagnostic session states (managed by service DiagnosticSessionControl ($10)) 
    -  Security access states (managed by service SecurityAccess ($27)) 
    -  ECU Communication activity (managed by the ComM) 
    -  DTC setting allowance (managed by the Dem) 
     
    3.4  Main Functions 
    In  order  to  function  properly,  the  Dcm_MainFunction()  must  be  called  periodically  in  the 
    configured time period.   
    To specify the DCM task cycle time, set up the configuration parameter:  
    /Dcm/DcmConfigSet/DcmGeneral/DcmTaskTime 
     
    3.4.1 
    Split Task Functions 
    3.4.1.1 
    Functionality 
    Dcm_MainFunction()  is  only  a  container  function  that  calls  the  two  functions 
    Dcm_MainFunctionTimer()  and  Dcm_MainFunctionWorker().  Of  these  two,  only  the 
    Dcm_MainFunctionTimer() depends on a stable cycle time. If you find it difficult to run the 
    Dcm_MainFunction()  on  a  high  priority  task  to  ensure  the  timing  behavior,  you  can 
    optionally call these two functions instead of Dcm_MainFunction(). 
    This allows you to run the Dcm_MainFunctionTimer() on a higher priority task to guarantee 
    the  UDS  timing  requirements  e.g.  sending  of  NRC  ‘RequestCorrectlyRecieved-
    ResponsePending’. 
    Please  note,  both  the  Dcm_MainFunctionWorker()  and  Dcm_MainFunctionTimer()  are 
    optimized for short run time, so this option is usually not necessary. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    35 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
    3.4.1.2 
    Configuration Aspects 
    Per default DCM has only one Dcm_MainFunction() i.e. has no split tasks as specified in 
    [1].  In  order  to  enable  split  task  usage  in  DCM,  you  have  to  set  up  DCM  in  the 
    configuration tool as follows:  
    >  Activate main-function task splitting via parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmSplitTasksEnabled 
    >  Both Dcm_MainFunctionTimer() and Dcm_MainFunctionWorker() will be scheduled for 
    the time period specified by: /Dcm/DcmConfigSet/DcmGeneral/DcmTaskTime 
    >  Optionally you can specify different scheduling time for the 
    Dcm_MainFunctionWorker() using parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmMainFunctionWorkerTaskTime 
     
    3.4.1.3 
    Integration Aspects 
    Both  main-functions  are  automatically  registered  for  scheduling  in  SchM  component  via 
    SWC-template,  but  still  they  have  no  assigned  task  priority  relation.  As  the 
    Dcm_MainFunctionTimer() handles the real-time aspect of the DCM component, it must be 
    running under high OS task priority. The Dcm_MainFunctionWorker() shall be assigned to 
    an OS task that has a lower or equal priority compared to the Dcm_MainFunctionTimer()’s 
    task.  
     
     
    Caution 

      >  Do not assign the Dcm_MainFunctionWorker() on a higher priority task than the 
    Dcm_MainFunctionTimer(), especially not if your OS supports task preemption.  
    >  You need both Dcm_MainFunctionWorker() and Dcm_MainFunctionTimer() (unless 
    you use the Dcm_MainFunction()). 
     
     
    3.5  Error Handling 
    3.5.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter DCM_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported DCM ID is 53. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    36 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    The  reported  service  IDs  identify  the  services  which  are  described  in  6.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Dcm_StartOfReception() 
    0x01 
    Dcm_Init() 
    0x02 
    Dcm_CopyRxData() (AR4) / Dcm_ProvideRxBuffer() (AR3) 
    0x03 
    Dcm_TpRxIndication() (AR4) / Dcm_RxIndication() (AR3) 
    0x04 
    Dcm_CopyTxData() (AR4) / Dcm_ProvideTxBuffer() (AR3) 
    0x05 
    Dcm_TpTxConfirmation() (AR4) / Dcm_TxConfirmation() (AR3) 
    0x06 
    Dcm_GetSesCtrlType() 
    0x0D 
    Dcm_GetSecurityLevel() 
    0x0F 
    Dcm_GetActiveProtocol() 
    0x21 
    Dcm_ComM_NoComModeEntered() 
    0x22 
    Dcm_ComM_SilentComModeEntered() 
    0x23 
    Dcm_ComM_FullComModeEntered() 
    0x24 
    Dcm_GetVersionInfo() 
    0x25 
    Dcm_MainFunction() 
    0x2A 
    Dcm_ResetToDefaultSession() 
    0x30 
    Dcm_ExternalSetNegResponse() 
    0x31 
    Dcm_ExternalProcessingDone() 
    0x32 
    <Module>_<DiagnosticService>() 
    0x34 
    ReadData() (synchronous) 
    0x3B 
    ReadData() (asynchronous) 
    0x3F 
    IsDidAvailable() 
    0x40 
    ReadDidData() 
    0x41 
    WriteDidData() 
    0x44 
    GetSeed() (with SADR) 
    0x45 
    GetSeed() (without SADR) 
    0x47 
    CompareKey() 
    0x56 
    Dcm_SetActiveDiagnostic() 
    0x59 
    GetSecurityAttemptCounter() 
    0x5A 
    SetSecurityAttemptCounter() 
    0x60 
    GetInfotypeValueData() 
    0xA0 
    Depricated from DCM 5.00.00 and mapped to “DCM internal function”. 
    DCM internal diagnostic service processor 
    0xA1 
    Dcm_TxConfirmation() 
    0xA2 
    Dcm_TriggerTransmit() 
    0xA3 
    Dcm_ProvideRecoveryStates() 
    0xA4 
    Dcm_OnRequestDetection() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    37 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Service ID 
    Service 
    0xA6 
    Dcm_GetTesterSourceAddress() 
    0xA7 
    Dcm_GetSecurityLevelFixedBytes() 
    0xA8 
    Dcm_ProcessVirtualRequest() 
    0xA9 
    Dcm_SetSecurityLevel() 
    0xAA 
    ReadData() (paged-data-reading) 
    0xAB 
    Dcm_GetRequestKind() 
    0xAC 
    Dcm_VsgSetSingle 
    0xAD 
    Dcm_VsgIsActive 
    0xAE 
    Dcm_VsgSetMultiple 
    0xAF 
    Dcm_VsgIsActiveAnyOf 
    0xF0 
    DCM internal function 
    Table 3-4   DET Service IDs 
     
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01  DCM_E_INTERFACE_TIMEOUT 
    Timeout during interaction with other module 
    0x02  DCM_E_INTERFACE_RETURN_VALUE 
    Return value of called API is out of range 
    0x03  DCM_E_INTERFACE_BUFFER_OVERFLOW  Boundary check of provided buffers fails 
    0x05  DCM_E_UNINIT 
    Executing program code before the DCM is 
    initialized 
    0x06  DCM_E_PARAM 
    API call with invalid parameter value 
    0x07  DCM_E_PARAM_POINTER 
    API call with invalid/null pointer parameter 
    0x40  DCM_E_ILLEGAL_STATE 
    Internal DCM error, reaching an unexpected 
    state 
    0x41  DCM_E_INVALID_CONFIG 
    Inconsistent configuration 
    Table 3-5   Errors reported to DET 
     
    3.5.2 
    Production Code Error Reporting 
    Production code related errors are not supported by DCM. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    38 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  DCM into 
    an application environment of an ECU. 
    4.1  Scope of Delivery 
    The delivery of the DCM contains the files which are described in the chapters 4.1.1 and 
    4.1.2:  
    4.1.1 
    Static Files  
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    Dcm.c 
    This is the implementation source file of the DCM 
     
     
    (delivered only for the “pre-compile” variant). 
    Dcm_Ext.c 
    This is the implementation source file of the DCM 
     
     
    with Autosar extensions (delivered only for the “pre-
    compile” variant). 
    Dcm.h 
    This is the header file containing the APIs of DCM. 
    This is the only file that has to be included by 
     
     
    the application if an interaction with DCM is 
    needed.
     
    Dcm_Int.h 
    This is the header file containing internal APIs of 
    DCM between the core- and extension parts. 
     
     
    This file must not be included by any other 
    source file except of the DCM own ones.
     
    Dcm_Cbk.h 
    This file contains all function prototypes of APIs 
     
     
    called by other BSW-C (i.e. Pdu-R, ComM, etc.). 
    Dcm_Types.h 
    This file contains all data types that shall be visible 
     
     
    to the other components interacting with DCM. 
    Dcm_Core.h 
    All these files belong to the DCM core part. 
    Dcm_CoreInt.h 
    None of these files must be included by an 

    Dcm_CoreCbk.h
     
     
     
    external source code. 
    Dcm_CoreTypes.h 
    Dcm_Ext.h 
    All these files belong to the DCM extension part. 
    Dcm_ExtInt.h 
    None of these files must be included by an 

    Dcm_ExtCbk.h
     
     
     
    external source code. 
    Dcm_ExtTypes.h 
    Dcm_bswmd.arxml 
    This file contains all DCM configuration parameters’ 
     
     
    definitions. 
    Table 4-1   Static files 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    39 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the Configurator 5 generation tool. 
    File Name 
    Description 
    Dcm_Cfg.h 
    This file contains all pre-compile configuration settings of DCM (e.g. 
    switches, constants, etc.). 
    Dcm_Lcfg.c 
    This file contains the link-time parameterization of DCM. 
    Dcm_Lcfg.h 
    This file contains all link-time parameters declarations and type definitions. 
    Dcm_PBcfg.c 
    This file contains all post-build loadable parameterization of DCM. 
    Dcm_PBcfg.h 
    This file contains all post-build loadable parameters declarations and type 
    definitions. 
    Rte_Dcm.h 
    This file will be generated by the RTE. 
    Rte_Dcm_Type.h  This file will be generated by the RTE. 
    Dcm_swc.arxml 
    This AUTOSAR xml file is used for the configuration of the Rte. It contains 
    the information to get prototypes of callback functions offered by other 
    components. 
    Table 4-2   Generated files 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    40 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    4.2  Include Structure 
     class Include Structure
    AR BSW Environment
    <AR_BSW_MIP>.h
    «include»
    Dcm_Core
    AR BSW
    Environment
    Dcm_Core.h
    Dcm_CoreCbk.h
    Dcm_CoreTypes.h
    Dcm_CoreInt.h
    Dcm.c
    «include»
    0..1
    Dcm_Extension
    4
    2
    2
    4
    Dcm_ExtInt.h
    2
    Dcm_Ext.c
    1
    Dcm_Ext.h
    Dcm_ExtCbk.h
    Dcm_ExtTypes.h
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    1
    1
    5
    3
    5
    2
    «include»
    «include»
    «inAR
    clu D
    d cm
    e»  Facade
    «include»
    «include»
    «include»
    1
    1
    1
    Dcm_Int
    Dcm.h
    Dcm_Cbk.h
    Dcm_Types.h
    ComStack_Types.h
    «include»
    «include»
    «include»
    «include»
    2
    3
    3
    «include»
    2
    «include»
    «include»
    Dcm Configuration
    «include»
    «include»
    Rte_Dcm_Type.h
    Dcm_PBCfg.c
    Dcm_LCfg.c
    Dcm_LCfg.h
    Dcm_PBCfg.h
    Dcm_Cfg.h
     
    Figure 4-1  Include structure 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants,  calibrate-able  memory  section)  are 
    declared by compiler independent definitions  – the compiler abstraction definitions. Each 
    compiler abstraction definition is assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of the DCM and illustrates their assignment among each other. 
    Compiler Abstraction 
     
    E
    D
    Definitions 
     
     
     

     
    A
    G
     
     
    DE
    _CO
    NS
    M
    INIT
     
    T
    CF
     
     

    R
    UT
     
    B
    S
    _CO
    _DA
    _CO
    G
    _P
    E
    _NO
    _INIT
    L
    L
    LO
    L
    _P
    Memory Mapping 
    N
    L
    D
    P
    P
    L
    P
    CF
    A
    R
    R
    R
    A
    A
    P
    P
    A
    P
    A
    B
    Sections
    V
    V
    A
    A
    A
    V
    P
     
    DCM_CO
    DCM_C
    DCM_CO
    DCM_
    DCM_
    DCM_
    DCM_
    DCM_C
    DCM_
    DCM_
    DCM_
    DCM_START_SEC_CONST_8 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CONST_8 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    41 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    DCM_START_SEC_CONST_16 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CONST_16 
    DCM_START_SEC_CONST_32 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CONST_32 
    DCM_START_SEC_CONST_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CONST_UNSPECIFIED 
    DCM_START_SEC_CALIB_8 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CALIB_8 
    DCM_START_SEC_CALIB_16 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CALIB_16 
    DCM_START_SEC_CALIB_32 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CALIB_32 
    DCM_START_SEC_CALIB_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CALIB_UNSPECIFIED 
    DCM_START_SEC_VAR_INIT_8 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_INIT_8 
    DCM_START_SEC_VAR_NOINIT_8 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_NOINIT_8 
    DCM_START_SEC_VAR_NOINIT_16 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_NOINIT_16 
    DCM_START_SEC_VAR_INIT_32 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_INIT_32 
    DCM_START_SEC_VAR_NOINIT_32 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_NOINIT_32 
    DCM_START_SEC_VAR_NOINIT_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    DCM_START_SEC_CODE 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CODE 
    DCM_START_SEC_CALLOUT_CODE 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_CALLOUT_CODE 
    DCM_START_SEC_APPL_CODE 
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_APPL_CODE 
    DCM_START_SEC_VAR_PBCFG 
     
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_VAR_PBCFG 
    DCM_START_SEC_PBCFG 
     
     
     
     
     
     
     
     
     
     
     
     
    DCM_STOP_SEC_PBCFG 
     
    Table 4-3   Compiler abstraction and memory mapping 
    The compiler abstraction definitions of DCM_APPL_DATA and  DCM_APPL_CONST refer 
    to any RAM resp. ROM section defined by any external to DCM software module. This can 
    be either BSW component or application data storage. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    42 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    The DCM_APPL_CODE and DCM_CALLOUT_CODE definitions also refer to an external 
    code section relative to DCM. These are memory locations, where the application code is 
    placed.  The  difference  between  these  two  sections  is  that  an  application  code  in 
    CALLOUT section is a DCM functionality extension (e.g. a complex device driver) and not 
    a component in the matter of providing server application specific data or functionality (i.e. 
    via RTE). 
     
    4.4 
    Critical Sections 
    To  protect  internal  data  structures  against  modifications  that  will  lead  to  data  corruption, 
    the  DCM  uses  “Critical  Sections”  for  blocking  concurrent  access,  such  as  from  lower 
    transport layer and from the Dcm_MainFunction() 
     
    The only method that DCM uses to handle the critical sections is: 
      AUTOSAR Schedule Manager (SchM_Dcm.h is included) 
     
     
    Caution 
    You must take special care that the SchM implementing the critical section is already 
      started before the DCM is run. 
     
     
    You  have  to  map  the  DCM  critical  sections  to  the  appropriate  resource  locking  method. 
    DCM  supports  only  the  DCM_EXCLUSIVE_AREA_0  and  it  shall  be  always  mapped  to 
    global  interrupt disabling,  since DCM has always  very short time  critical sections. The 
    real  critical  section  duration  depends  on  the  performance  of  the  controller  used  in  your 
    system,  but  the  DCM  critical  section  design  restricts  the  code  within  to  very  few 
    instructions and in very rear cases contains (internal) function calls, which usually are in-
    lined. 
     
    4.5 
    Considerations Using Request- and ResponseData Pointers in a Call-back 
    DCM is a half-duplex communication module and for memory usage optimization a single 
    buffer  is  used  for  both  request  and  response  data.  Therefore  if  a  call-back  function 
    contains  both  “ResponseData”  and  “RequestData”  pointers,  they  may  point  to  different 
    addresses, but these are still memory locations within the same diagnostic buffer. So if you 
    start writing the response data, you probably will overwrite the request data. If the request 
    data is still needed, while writing the response data, you will have to store it into temporary 
    RAM location in your application software, before starting the write process. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    43 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
    5  Diagnostic Service Implementation 
    The main goal of the DCM is to handle the diagnostic protocol services, defined by [5]. The 
    only  task  the  application  has  is  to  provide  the  required  data,  to  write  new  data  into  its 
    memory,  access  IO  ports,  etc. All  these  application  tasks  are  ECU  specific and have  no 
    dependency to the used diagnostic protocol.  
    The following chapters describe each diagnostic service that the DCM handles, including 
    implementation and configuration aspects. 
    Each chapter provides tables that give an overview over the following information: 
      Which implementation types of that diagnostic service are supported; 
      If the service is internally handled, which subservices are supported and how they are 
    or can be implemented. 
    For each of the about classifications the following implementation types are used: 
    >  internal only = by DCM; 
    >  external only = by application; 
    >  internal or external = implemented by DCM, but can be overridden by application; 
    >  not allowed = cannot be configured at all. 
     
     
     
    FAQ 
    If you miss a diagnostic service in the following chapter, it does only mean that the 
      DCM does not provide any predefined implementation for it, but you can define it in 
    Configurator 5 and handle it within your application. If you try to specify an invalid 
    service identifier, the Configurator 5 will notify you about that and will deny the service 
    definition. 
     
     
     
     
     
    FAQ 
    If not other stated every service that can be overridden by an application service 
      handler may not have configured sub-services, but actually the application 
    implementation of these services still can handle any by itself. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    44 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.1 
    RequestCurrentPowertrainDiagnosticData ($01) 
    5.1.1 
    Functionality 
    This is a legislated OBD service that delivers some current values of ECU parameters. 
    5.1.2 
    Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.1.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-1   Service $01: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-2   Service $01: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.1.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported PIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid 
    >  For each PID to be supported by this service, the following parameter has to be set to 
    either SERVICE_01 or SERVICE 01_02: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidService 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    45 
    based on template version 5.0.0 





    Technical Reference MICROSAR DCM 
    >  The data content of a PID shall be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData 
    >  The access type to the data content of a PID can be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01 
     
     
     
    FAQ 
    There shall be no “availability ID” (i.e. 0x00, 0x20, 0x40 …, 0xE0) explicitly defined in 
      the DCM configuration! All these IDs will be automatically calculated during the code 
    generation process and supported by the DCM code. 
     
     
     
     
     
    FAQ 
    If any of the service’s PIDs shall be also readable by the corresponding UDS service 
      (i.e. ReadDataByIdentifier ($22) DIDs 0xF400 – 0xF4FF), the corresponding DIDs, 
    including the “availability DIDs” shall be explicitly defined within the DCM 
    configuration. This is required in order to support the optional read access condition 
    checks on a DID operation.  
    Refer tReadDataByIdentifier ($22) for more details about OBD DID configuration 
    particularities. 
     
     
     
     
     
    Note 
    For all PIDs implemented by the DEM, the according DEM APIs (e.g. 
      Dem_DcmReadDataOfPID01) must be entered for the configuration parameter 
    Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService
    01/DcmDspPidDataReadFnc 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    46 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.2 
    RequestPowertrainFreezeFrameData ($02) 
    5.2.1 
    Functionality 
    This  is  a  legislated  OBD  service  that  delivers  the  contents  of  the  OBD  Freeze  Frame, 
    which consists of ECU parameter values stored by the fault memory module. 
    5.2.2 
    Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.2.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-3   Service $02: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-4   Service $02: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.2.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported PIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid 
    >  For each PID to be supported by this service, the following parameter has to be set to 
    either SERVICE_02 or SERVICE 01_02: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidService 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    47 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
     
    FAQ 
    There shall be no “availability ID” (i.e. 0x00, 0x20, 0x40 …, 0xE0) explicitly defined in 
      the DCM configuration! All these IDs will be automatically calculated during the code 
    generation process and supported by the DCM code. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    48 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.3 
    RequestEmissionRelatedDTC ($03) 
    5.3.1 
    Functionality 
    This is a legislated OBD service that delivers all DTCs with status “confirmed”. 
    5.3.2 
    Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.3.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-5   Service $03: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-6   Service $03: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.3.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    49 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.4 
    ClearEmissionRelatedDTC ($04) 
    5.4.1 
    Functionality 
    This is a legislated OBD service that clears all emission related DTCs. 
    5.4.2 
    Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.4.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-7   Service $04: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-8   Service $04: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.4.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    50 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    5.5 
    RequestOnBoardMonitorTestResults ($06) 
    5.5.1 
    Functionality 
    This is a legislated OBD service that delivers monitor specific test results. 
    5.5.2 
    Required Interfaces 
      If service handled by DCM: 
    >  DtrServices (if no OBD DTR support by DEM) 
    >  Refer to chapte6.3 Services used by DCM for the DEM component (if OBD DTR is 
    supported by DEM). 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.5.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-9   Service $06: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-10   Service $06: Supported subservices 
    This service is fully implemented by DCM. 
     
     
     
    Caution 
    Depending on the DEM SWS AR version and setup, the OBDMID configuration and 
      data handling is either implemented by DCM or DEM.  
    Please refer to the configuration aspects in the following chapters for more details: 
    >  5.5.4 Configuration Aspects 
    >  9.30 How to Switch Between OBD DTR Support by DCM and DEM 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    51 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
     
     
    5.5.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  If the OBDMID configuration and data handling is to be supported by DEM, the 
    following parameters will not be required, resp. will be ignored during the DCM 
    configuration code generation. 
    >  All to be supported MIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspTestResultByObdmid/DcmDspTestResultObd
    midTid 
    >  For each MID to be supported by this service, the corresponding TIDs shall be 
    associated: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspTestResultByObdmid/DcmDspTestResultObd
    midTid/DcmDspTestResultObdmidTids 
    >  The access type to the data content of a MIDTID can be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspTestResultByObdmid/DcmDspTestResultObd
    midTid/DcmDspTestResultObdmidTids/DcmDspTestResultObdmidTidUsePort 
     
     
     
    FAQ 
    There shall be no “availability ID” (i.e. 0x00, 0x20, 0x40 …, 0xE0) explicitly defined in 
      the DCM configuration! All these IDs will be automatically calculated during the code 
    generation process and supported by the DCM code. 
     
     
     
     
     
    FAQ 
    If any of the service’s MIDs shall be also readable by the corresponding UDS service 
      (i.e. ReadDataByIdentifier ($22) DIDs 0xF600 – 0xF6FF), the corresponding DIDs, 
    including the “availability DIDs” shall be explicitly defined within the DCM 
    configuration. This is required in order to support the optional read access condition 
    checks on a DID operation.  
    Refer tReadDataByIdentifier ($22) for more details about OBD DID configuration 
    particularities. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    52 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.6 
    RequestEmissionRelatedDTCsDetectedDuringCurrentOrLastDrivingCycle 
    ($07) 

    5.6.1 
    Functionality 
    This is a legislated OBD service that delivers all DTCs with status “pending”. 
    5.6.2 
    Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.6.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-11   Service $07: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-12   Service $07: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.6.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    53 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.7 
    RequestControlOfOnBoardSystemTestOrComponent ($08) 
    5.7.1 
    Functionality 
    This is a legislated OBD service that starts a routine within the ECU. 
    5.7.2 
    Required Interfaces 
      If service handled by DCM: 
    >  RequestControlServices_<TIDName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.7.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-13   Service $08: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-14   Service $08: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.7.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  Each to be supported TIDs shall be defined in a container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl 
    >  The request data content size of a TID shall be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl/DcmDspRequestControlInBuff
    erSize 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    54 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
    >  The response data content size of a TID shall be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl/DcmDspRequestControlOutBuf
    ferSize 
    >  The access type to the data content of a PID can be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl/DcmDspRequestControlUsePo
    rt 
     
     
     
    FAQ 
    There shall be no “availability ID” (i.e. 0x00, 0x20, 0x40 …, 0xE0) explicitly defined in 
      the DCM configuration! All these IDs will be automatically calculated during the code 
    generation process and supported by the DCM code. 
     
     
     
     
     
    FAQ 
    If any of the service’s PIDs shall be also readable by the corresponding UDS service 
      (i.e. RoutineControl ($31) DIDs 0xE000 – 0xE0FF), the corresponding RIDs, including 
    the “availability RIDs” shall be explicitly defined within the DCM configuration. This is 
    required in order to support the optional control access condition checks on a RID.  
    Refer tRoutineControl ($31) for more details about OBD RID configuration 
    particularities. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    55 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.8 
    RequestVehicleInformation ($09) 
    5.8.1 
    Functionality 
    This is a legislated OBD service that delivers some vehicle identification information. 
    5.8.2 
    Required Interfaces 
      If service handled by DCM: 
    >  InfotypeServices_<VEHINFODATA> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.8.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-15   Service $09: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-16   Service $09: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.8.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  Each to be supported VID shall be defined in a container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    56 
    based on template version 5.0.0 





    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    There shall be no “availability ID” (i.e. 0x00, 0x20, 0x40 …, 0xE0) explicitly defined in 
      the DCM configuration! All these IDs will be automatically calculated during the code 
    generation process and supported by the DCM code. 
     
     
     
     
     
    FAQ 
    If any of the service’s MIDs shall be also readable by the corresponding UDS service 
      (i.e. ReadDataByIdentifier ($22) DIDs 0xF800 – 0xF8FF), the corresponding DIDs, 
    including the “availability DIDs” shall be explicitly defined within the DCM 
    configuration. This is required in order to support the optional read access condition 
    checks on a DID operation.  
    Refer tReadDataByIdentifier ($22) for more details about OBD DID configuration 
    particularities. 
     
     
     
    >  The data content of a VID shall be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData 
     
     
     
    FAQ 
    In case the OBD VID data length shall be variable, the configuration parameter 
      /Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData/DcmDspVehInfoD
    ataSize will specify the maximum data size of the VID. This value will be passed as an 
    input to the API GetInfotypeValueData() 
     
     
     
    >  The access type to the data content of a VID can be defined in the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoData/DcmDspVehInfo
    DataUsePort 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    57 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.9 
    RequestEmissionRelatedDTCsWithPermanentStatus ($0A) 
    5.9.1 
    Functionality 
    This is a legislated OBD service that delivers all DTCs with status “permanent”. 
    5.9.2 
    Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.9.3 
    Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-17   Service $0A: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-18   Service $0A: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.9.4 
    Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    58 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.10  DiagnosticSessionControl ($10) 
    5.10.1  Functionality 
    This service manages the diagnostic session state in the ECU. 
     
    5.10.2  Required Interfaces 
    >  DcmDiagnosticSessionControl 
     
    5.10.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-19   Service $10: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 
     
     
     
     
    0x01 
     
     
     
     
    0x02 
     
     
     
     
    0x03 
     
     
     
     
    0x04 … 0x7E 
     
     
     
     
    0x7F … 0xFF 
     
     
     
     
    Table 5-20   Service $10: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.10.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    59 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
     
     
    Caution 
    This service is mandatory and therefore may not be missing in the configuration and 
      cannot be overridden by an application implementation. 
     
     
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
    >  For each defined sub-function there shall be a corresponding session level defined: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession 
    For each session, there must be also defined the P2/P2Start timings: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession/DcmDspSessionRow/DcmDspSession
    P2ServerMax and 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession/DcmDspSessionRow/DcmDspSession
    P2StarServerMax 
     
     
    FAQ 
    The P2/P2Start timings above will be reported to the diagnostic client within the 
      positive response of this service. These timings will apply as long as the DCM is in the 
    corresponding session. DCM is designed to send the RCR-RP not later than the 
    configured P2/P2Star time. Depending on the project integration specifics and main-
    functions scheduling of the communication stack (interfaces, transport layers, etc.) it 
    may lead to a delayed RCR-RP responses and failing compliance tests. Still, you have 
    to opportunity to adjust the DCM internal timer values by specifying a diagnostic 
    protocol specific (i.e. UDS and OBD may have different adjustments) timing 
    corrections. Please refer to the following parameters in the DCM configuration: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmTimStrP2Serv
    erAdjust and 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmTimStrP2Star
    ServerAdjust 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    60 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
    5.11  EcuReset ($11) 
    5.11.1  Functionality 
    This service implementation provides the reset functionality within the ECU. 
     
     
     
    Note 
    Once one of the following reset modes: HardReset, SoftReset and KeyOnOffReset is 
      being requested, after sending the positive response resp. finishing service processing 
    without positive response, DCM will not accept any further diagnostic request until the 
    ECU is reset or Dcm_ResetToDefaultSession() is called. The communication reaction 
    (reject or ignore new request) is dependent on the DCM configuration (see below). 
     
     
     
     
     
    FAQ 
    In some cases it is required not to perform a real reset of the ECU, but only to switch 
      into the default session and reset all active diagnostic jobs. If this kind of reset 
    implementation is required, then the application shall just call the 
    Dcm_ResetToDefaultSession() provided port operation once the Mode_Switch 
    operation for the DcmEcuReset mode declaration group is triggered. 
     
     
     
    5.11.2  Required Interfaces 
      If service handled by DCM: 
    >  DcmEcuReset 
    >  DcmModeRapidPowerShutDown 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.11.3  Implementation Aspects  
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-21   Service $11: Implementation types 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    61 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    a
    Subservice ID
    ternal
    ternal
     
    ntei
    ntei ex
    ex
    ot n
    0x00 
     
     
     
     
    0x01 
     
     
     
     
    0x02 
     
     
     
     
    0x03 
     
     
     
     
    0x04 
     
     
     
     
    0x05 
     
     
     
     
    0x06 … 0x7E 
     
     
     
     
    0x7F … 0xFF 
     
     
     
     
    Table 5-22   Service $11: Supported subservices 
    All in Table 5-22  Service  $11:  Supported  subservices  sub-functions  marked  as  internally 
    handled by DCM are fully implemented and no application interaction is necessary.  
     
     
     
    Caution 
    If any of the service’s sub-functions 0x01-0x05 are implemented externally (user 
      defined implementation), the corresponding mode switches (if required) shall be 
    triggered by the user implementation. 
    The mode declaration groups (DcmEcuReset and DcmModeRapidPowerShutDown
    will exist only if at least one of the corresponding sub-functions is still handled by DCM.  
     
     
    5.11.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
    >  If sub-function 0x04 is to be supported, additionally the following parameter shall be 
    configured: /Dcm/DcmConfigSet/DcmDsp/DcmDspPowerDownTime 
    >  If one of the following sub-functions: 0x01-0x03 is to be supported, the DCM will either 
    reject by NRC 0x21 or ignore any request received while waiting for the reset 
    execution accomplishment. The concrete reaction depends on the setting: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslDiagResp/DcmDslDiagRespOnSecondDeclined
    Request (refer also to 9.4 How to Handle Multiple Diagnostic Clients Simultaneously)
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    62 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.12  ClearDiagnosticInformation ($14) 
    5.12.1  Functionality 
    This service clears the stored fault memory content. 
     
    5.12.2  Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.12.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-23   Service $14: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-24   Service $14: Supported subservices 
    This service is fully implemented by DCM. 
     
    5.12.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    63 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.13  ReadDiagnosticInformation ($19) 
    5.13.1  Functionality 
    This service reads the stored fault memory information using the DEM data access API. 
     
    5.13.2  Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.13.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-25   Service $19: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 
      
     
     
     
    0x01 … 0x15 
     
     
     
     
    0x16 
      
     
     
     
    0x17 … 0x19 
      
     
     
     
    0x1A … 0x41 
      
     
     
     
    0x42 
     
     
     
     
    0x43 … 0x7E 
     
     
     
     
    0x7F … 0xFF 
     
     
     
     
    Table 5-26   Service $19: Supported subservices 
    All above sub-functions marked as internally handled by DCM are fully implemented and 
    no application interaction is necessary.  
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    64 
    based on template version 5.0.0 





    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    All WWH-OBD only related sub-functions (e.g. 0x42) will be internally handled in DCM 
      only with a valid WWH-OBD license. Otherwise must be implemented within an 
    external CDD module. 
     
     
     
    5.13.3.1  Reporting Stored DTC Environment Data 
    For all snapshot and extended data record sub-functions, DCM module requires additional 
    input from the ECU configuration. In order to be able to report properly all related record 
    numbers  when  the  records  masks  0xFF  or  0xFE  are  requested,  the  DCM  configuration 
    has been extended by a new parameter hierarchy:  
    /Dcm/DcmConfigSet/DcmDsp/DcmDspFaultMemory/DcmDspFaultMemoryRecords.  
    These new parameters allow DEM configuration independent parameterization of DCM. 
    More  details about  them follow in next  chapter  and  in the online help of each parameter 
    under this container. 
     
     
     
     
    Note 
    If you use this DCM module together with the MICROSAR DEM, it is not necessary to 
      use or change this configuration. DCM will automatically take the DEM settings 
    regarding the supported record numbers. 
     
     
     
    5.13.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
     
     
     
    FAQ 
    For all user defined sub-functions (marked as “external only” iTable 5-26  Service 
      $19: Supported subservices) the sub-function specific request length check shall be 
    performed by the corresponding sub-function processor implementation. This may lead 
    to a deviation of the defined in [5] NRC prioritization on a double error (i.e. wrong 
    security access level and invalid sub-function length). Currently this is unavoidable 
    since [1] does not provide a request length configuration option on sub-service level. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    65 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  If one of the sub-functions 0x17-0x19 shall be supported, a MemoryIdentifier is 
    optionally possible to be specified: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspFaultMemory/DcmDspFaultMemoryUserMemor
    yIdInfo/DcmDspFaultMemoryUserMemoryId. For more details please refer to the 
    parameter’s online help within the configuration tool.  
    >  If a non-MICROSAR DEM is used together with DCM and one of the stored DTC 
    environment data reporting sub-functions of this diagnostic service is to be supported, 
    all related record ranges shall be specified in the ECUC under the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspFaultMemory/DcmDspFaultMemoryRecords 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    66 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.14  ReadDataByIdentifier ($22) 
    5.14.1  Functionality 
    This  service  provides  read  access  to  data  structures  within  the  ECU,  marked  by  an 
    identifier (DID).  
    The  tester  may  simultaneously  access  multiple  DIDs  in  a  single  request. The  maximum 
    allowed  DID  list  length  is  configurable  (refer  to  5.14.4  Configuration  Aspects  for  more 
    details). 
     
    5.14.2  Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
    >  DataServices_DIDRange_<RangeName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.14.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-27   Service $22: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-28   Service $22: Supported subservices 
    The protocol handling of this service is fully implemented by DCM. The data  reported by 
    each DID will be provided by the application via service calls or call outs. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    67 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
     
     
    Caution 
    If you intend using DID ranges, please read carefully chapter 9.19 Handling with DID 
      Ranges to learn important particularities. 
     
     
     
     
     
    FAQ 
    In case very large DID data has to be carried out from the application an optimized 
      data reading process can be used to save RAM. For details please refer t9.24 How to 
    Save RAM using Paged-Buffer for Large DIDs. 
     
     
     
    5.14.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported readable DIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid 
    >  The read operation over a DID is defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead 
    >  The maximum number of simultaneously requested DIDs shall be defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspMaxDidToRead 
    >  For each DID data signal the corresponding container shall be configured 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData. 
    >  The check condition read operation is optional and if not used can be deactivated via: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataConditionCheckReadFncUs
    ed 
    >  For NvRam signal access select the value USE_BLOCK_ID in the container 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    >  A NvRam block Id has to be referenced: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataBlockIdRef 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    68 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    Particularities for OBD DIDs (i.e. all within [0xF400-0xF8FF]): 
     

    If DEM handles DTR values, please consider also chapter 9.30 How to Switch 
    Between OBD DTR Support by DCM and DEM
     
    for information on the DIDs. 

    Any OBD availability DID (e.g. 0xF400, 0xF420, 0xF600, 0xF620, 0xF880, 
    0xF8E0, etc.) will always be implemented by DCM. They will return the 
    corresponding DID availability mask value as described in [6]. 

    Every DID in the OBD range that covers a corresponding OBD PID, MID or VID, 
    shall not contain any data definition. The concrete data will be read out by DCM 
    directly using the corresponding OBD service data access method. For such 
    DIDs, there also will be no RTE DataServices port or callback generated. 

    Any OBD DID, that neither is an availability DID, nor covers any existing OBD 
    PID, MID or VID, will be handled as a generic DID and shall be configured 
    regularly. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    69 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.15  ReadMemoryByAddress ($23) 
    5.15.1  Functionality 
    This service provides direct read access to the physical memory of the ECU. All readable 
    memory  areas  and  their  access  preconditions  are  to  be  configured  as  documented  in 
    5.15.4 Configuration Aspects. 
     
    5.15.2  Required Interfaces 
      If service handled by DCM: 
    >  Dcm_ReadMemory() 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.15.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-29   Service $23: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-30   Service $23: Supported subservices 
    The protocol handling of this service is fully implemented by DCM. This includes: 
    >  Validating and evaluating the ALFID byte; 
    >  Parsing the requested memory address and size parameters; 
    >  Validating the requested memory block against the DCM memory configuration: 
    >  Supported requested memory area by the ECU; 
    >  Memory area access preconditions (e.g. security access, mode rules). 
    The memory access will then be provided by the application via a call out. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    70 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    All readable memory ranges will be considered during the definition of a DDID with 
      DynamicallyDefineDataIdentifier ($2C). 
     
     
     
    5.15.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported readable memory ranges shall be defined within the following 
    container: /Dcm/DcmConfigSet/DcmDsp/DcmDspMemory 
    5.16  ReadScalingDataByIdentifier ($24) 
    5.16.1  Functionality 
    This service provides read access to scaling information of each data within a DID.  
     
    5.16.2  Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.16.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-31   Service $24: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-32   Service $24: Supported subservices 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    71 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    The protocol handling of this service is fully implemented by DCM. The data reported by 
    each DID will be provided by the application via service calls or call outs. 
     
     
     
    FAQ 
    AUTOSAR does not provide a means for specifying session, security or mode rule 
      restrictions on scaling information operation per DID. Thus the only way to limit the 
    access to the scaling data is by limiting the access to the whole service $24 under the 
    corresponding parameter (e.g. DcmDsdSidTabSecurityLevelRef) in 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
     
     
     
    5.16.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported scaling DIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid 
    >  For each DID data signal the corresponding container shall be configured 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData. 
    >  For each DID data signal the corresponding container shall be configured in its scaling 
    size: /Dcm/DcmConfigSet/DcmDsp/DcmDspDataInfo/DcmDspDataScalingInfoSize 
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    72 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.17  SecurityAccess ($27) 
    5.17.1  Functionality 
    This  service  manages  the  security  level  of  the  ECU  used  to  constrain  the  diagnostic 
    access to critical services like writing data in restricted areas. 
     
    5.17.2  Required Interfaces 
    The following interfaces must be available when service $27 is used: 
      If service handled by DCM: 
    >  SecurityAccess_<SecurityLevelName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
    >  Dcm_SetSecurityLevel()  
     
    5.17.3  Implementation Aspects  
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
      
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-33   Service $27: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 
      
     
     
     
    0x01 … 0x7D 
     
     
     
     
    0x7E … 0xFF 
     
     
     
     
    Table 5-34   Service $27: Supported subservices 
    By default this service is fully implemented by DCM. If the internal implementation is used, 
    the following specifics have to be considered: 
    If  the  ECU  shall  support  “failed  attempt  monitoring”,  it  can  be  chosen  between  two 
    strategies on how to avoid brute-force-attack bypass via ECU reset. 
    >  Dynamic power-on delay time management:  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    73 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    The attempt counter shall be stored by the application (e.g. into a NvM block), so at 
    next ECU power on/reset event its value can be recovered. 
    >  Static power-on delay management: 
    The attempt counter will not be stored into the NvM (by the application), but instead 
    DCM will use the “delay time on boot” setting to insert a penalty time at each power 
    on cycle, regardless of the last attempt counter state. This means that even if during 
    the  last  power-on  cycle  there  was  no  failed  attempt,  the  ECU  will  not  accept  any 
    request for service 0x27 for that level, having set up “delay time on power on”. 
    Please,  refer  the  configuration  related  chapter  below  to  find  the  corresponding  DCM 
    settings that affect the brute-force-attack bypass strategy. 
     
    MICROSAR DCM provides an optional extension of the security access level configuration 
    if some fixed bytes for the seed/key value calculation are needed. For details, please refer 
    to chapte9.25 How to Get Security-Access Level Specific Fixed Byte Values. 
     
    5.17.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
    >  There shall always be a pair of sub-functions per security level (e.g. 0x01 for “get 
    seed” and 0x02 for the corresponding “send key” sub-function). 
    >  For each pair there shall always be a corresponding security level defined: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow 
    >  If a notification on a security access level state change is required, the option 
    described in 9.16 How to Know When the Security Access Level Changes shall be 
    enabled.  
    >  Specify whether a single (shared among all security levels) or multiple (per security 
    level) instances of the attempt counter shall be supported: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecuritySingleInstanceAttemp
    tMonitor 
    >  Specify whether a single (shared among all security levels) or multiple (per security 
    level) instances of the delay timer shall be supported: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecuritySingleInstanceDelayT
    imer 
    >  Specify whether a non-volatile storage of the attempt counter is required for a certain 
    level: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    AttemptCounterEnabled 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    74 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    >  Specify whether an unconditional delay timer start is required for a certain level: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    DelayTimeOnBoot 
     
     
    FAQ 
    You can only choose to have either DcmDspSecurityAttemptCounterEnabled or 
      DcmDspSecurityDelayTimeOnBoot. Both settings cannot be combined. 
     
     
    >  The access type to the security level specific operations can be defined using the 
    following parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    UsePort 
    >  Specify the attempt counter/timer recovery replacement strategy, in case the last 
    stored attempt counter value is no more readable: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    DelayTimeOnFailedGetAttemptCounter 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    75 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.18  CommunicationControl ($28) 
    5.18.1  Functionality 
    This service manages the communication state of both reception and transmission path of 
    the ECU. 
     
    5.18.2  Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapte6.3 Services used by DCM for the BswM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.18.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-35   Service $28: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 … 0x03 
     
     
     
     
    0x04 … 0x05 
     
     
     
     
    0x06 … 0x3F 
     
     
     
     
    0x40 … 0x7E 
     
     
     
     
    0x7F … 0xFF 
     
     
     
     
    Table 5-36   Service $28: Supported subservices 
    This service is fully implemented by DCM with the following limitations: 
    For  the  sub-network  id  parameter  only  the  values  “CurrentSubNetwork”  and 
    “AllSubNetworks”  are  supported.  The  third  type:  “SpecificSubNetworkId”  is  currently  not 
    supported. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    76 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
    5.18.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
     
     
     
    FAQ 
    For all user defined sub-functions (marked as “external only” iTable 5-36  Service 
      $28: Supported subservicesthe sub-function specific request length check shall be 
    performed by the corresponding sub-function processor implementation. This may lead 
    to a deviation of the defined in [5] NRC prioritization on a double error (i.e. wrong 
    security access level and invalid sub-function length). Currently this is unavoidable 
    since [1] does not provide a request length configuration option on sub-service level. 
     
     
     
    >  All other for this service relevant properties shall be configured under: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspComControl 
     
     
     
    FAQ 
    It is important that if UDS parameter “CommunicationType” 0x0X (AllNetworks) shall be 
      supported by DCM, that the corresponding channels are configured appropriately 
    under the following configuration containers: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspComControl/DcmDspComControlAllChannel 
     
     
     
    >  In case DCM shall monitor any critical condition under which this service shall no 
    longer be active, put a reference to that condition using parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspComControl/DcmDspComControlSetting/DcmD
    spComControlCommunicationReEnableModeRuleRef 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    77 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    5.19  ReadDataByPeriodicIdentifier ($2A) 
    5.19.1  Functionality 
    This service provides read access to data structures within the ECU, marked by a periodic 
    identifier (PDID). These are all DIDs in range [$F200 – $F2FF]. 
    The tester may schedule multiple PDIDs in a single request. The maximum allowed PDID 
    list length is configurable (refer to 5.19.4 Configuration Aspects). 
    Optionally, DCM is able to stop automatically the periodic transmission of any scheduled 
    PDID that cannot be accessed any more, after a diagnostic session/security access level 
    changes. Refer to 5.19.4 Configuration Aspects for details about this setting. 
     
     
     
    FAQ 
    Only periodic responses of type 2 (UUDT) are supported, as the latest versions of [5] 
      require. 
     
     
     
    5.19.2  Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
    >  DataServices_DIDRange_<RangeName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.19.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-37   Service $2A: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-38   Service $2A: Supported subservices 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    78 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    The  protocol  handling  and  the  PDID  read  job  scheduling  of  this  service  is  fully 
    implemented by DCM. The data reported by each DID will be provided by the application 
    via service calls or call outs. 
     
     
     
    Caution 
    If you intend using DID ranges, please read carefully chapter 9.19 Handling with DID 
      Ranges to learn important particularities. 
     
     
     
    5.19.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container. The 
    scheduling rates to be supported are specified by the corresponding rate time 
    configuration parameter. Example for “SlowRate”: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPeriodicTransmission/DcmDspPeriodicTransmi
    ssionSlowRate 
    >  All to be supported readable PDIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid. The only allowed DID numbers are within 
    the range [$F200-$F2FF]. 
    >  The read operation over a PDID is defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead 
    >  The maximum number of simultaneously requested PDIDs shall be defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspMaxDidToRead 
    >  The maximum number of simultaneously schedulable PDIDs shall be defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPeriodicDidTransmission/DcmDspMaxPeriodic
    DidScheduler 
    >  There shall be at least one DCM periodic connection (at least once client supports 
    periodic responses), referred by a corresponding tester main connection. For that 
    purpose configure: 
    >  Define the clients periodic connection with one or multiple PDUs of the UUDT 
    messages to be sent within the protocol container: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnecti
    on/DcmDslPeriodicTransmission 
    >  Refer the above created connection from the clients main connection located in the 
    same protocol container: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnecti
    on/DcmDslMainConnection/DcmDslPeriodicTranmissionConRef 
    >  If it is required that DCM shall stop automatically any PDID which is no more  
    supported in the active diagnostic session/security level the following parameter shall 
    be enabled:  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    79 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPeriodicDidTransmission/DcmDspPeriodicDid
    StopOnStateChange 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    80 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.20  DynamicallyDefineDataIdentifier ($2C) 
    5.20.1  Functionality 
    This  service  is  used  to  define  new  abstract  data  structures  (DIDs)  that  refer  to  other 
    statically  configured  DIDs  or  memory  areas.  The  newly  defined  data  structures  are 
    accessible for reading only through their assigned DDID (DynamicDID). 
    Optionally,  DCM  is  able  to  clear  automatically  any  already  defined  DDID  that  cannot  be 
    accessed  any  more,  after  a  diagnostic  session/security  access  level  changes.  This  also 
    implies  that  a  periodic  DDID  will  be  also  removed  from  the  periodic  scheduler 
    (ReadDataByPeriodicIdentifier  ($2A)).  Refer  to  5.20.4  Configuration  Aspects  for  details 
    about this setting. 
     
    5.20.2  Required Interfaces 
      If service handled by DCM: 
    >  No additional interfaces are required for this service, since it is completely handled 
    within the DCM. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.20.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-39   Service $2C: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x01 
     
     
     
     
    0x02 
     
     
     
     
    0x03 
     
     
     
     
    0x04 … 0xFF 
     
     
     
     
    Table 5-40   Service $2C: Supported subservices 
    This service is fully implemented by DCM corresponding to the [5]. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    81 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
     
    Caution 
    If you intend using DID ranges, please read carefully chapter 9.19 Handling with DID 
      Ranges to learn important particularities. 
     
     
     
    5.20.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
    >  If this service is to be used, there shall be at least one DID in the DCM configuration, 
    determined as a DDID by the parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidDynamicallyDefined 
    >  If the objects (DIDs or memory areas) referenced by a DDID shall be validated against 
    session, security and mode-rule preconditions each time the DDID is to be read: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidDynamicallyDefined 
    >  DCM verifies always the session, security and mode-rule preconditions of a DDID 
    when it is requested by a diagnostic client. You can configure DCM additionally to 
    check also the objects (DIDs or memory areas) referenced by a DDID against their 
    preconditions by parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDDDidCheckPerSourceDid 
    >  You can configure DCM to execute all in a DDID contained DID’s 
    ConditionCheckRead() operations when the DDID is requested by diagnostic client: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDDDidCheckConditionReadPerSourceDid 
    >  If it is required DCM to clear automatically any no more supported in the active 
    diagnostic session/security level DDID (and stop it from periodic reading), the 
    parameter shall be enabled:  
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDDDidClearOnStateChange 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    82 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    Enabling DcmDspDDDidClearOnStateChange  does imply that any DDID access 
      precondition evaluation for reading it once (ReadDataByIdentifier ($22)) or periodically 
    (ReadDataByPeriodicIdentifier ($2A)) will not be performed. The reason is that once 
    there is a change of the current diagnostic session/security access level, the DDID will 
    no more exist and the ECU will reject any read request for it by NRC 0x31 
    (RequestOutOfRange). Combining this feature together with 
    DcmDspDDDidCheckPerSourceDid increases the overall run time usage but also the 
    access precondition dependent level safety. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    83 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    5.21  WriteDataByIdentifier ($2E) 
    5.21.1  Functionality 
    This service provides write access to predefined and marked by identifier data  structures 
    within the ECU. 
     
    5.21.2  Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
    >  DataServices_DIDRange_<RangeName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.21.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-41   Service $2E: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-42   Service $2E: Supported subservices 
    The  protocol  handling  of  this  service  is  fully  implemented  by  DCM.  The  functionality  for 
    writing  the  data  of  each  DID  will  be  provided  by  the  application  via  service  calls  or  call 
    outs. 
     
     
     
    Caution 
    If you intend using DID ranges, please read carefully chapter 9.19 Handling with DID 
      Ranges to learn important particularities. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    84 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.21.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported writeable DIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid 
    >  The write operation over a DID is defined by: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite 
    >  For each DID data signal the corresponding container shall be configured 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData. 
    >  For NvRam signal access select the value USE_BLOCK_ID in the container 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    >  A NvRam block Id has to be referenced: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataBlockIdRef 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    85 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.22  InputOutputControlByIdentifier ($2F) 
    5.22.1  Functionality 
    This  service  provides  IO  control  access  to  predefined  and  marked  by  identifier  IO 
    structures (ports) within the ECU. 
     
    5.22.2  Required Interfaces 
      If service handled by DCM: 
    >  DataServices_<DataName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.22.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-43   Service $2F: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-44   Service $2F: Supported subservices 
    The protocol handling of this service is fully implemented by DCM. The control functionality 
    over the corresponding IO port will be performed by the application via service calls or call 
    outs. 
    DCM monitors all IO DIDs put under control, once a requested IO control operation other 
    than ReturnControlToECU() was successfully executed. This allows DCM to automatically 
    reset the IO DID operations, calling their the ReturnControlToECU() operations once one 
    of the following events occurs: 
    >  A state transition to the Default diagnostic session; 
    >  A state transition to any diagnostic session, where the monitored IO DID is not 
    supported; 
    >  A state transition to any security level, where the monitored IO DID is not supported; 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    86 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
     
     
     
    FAQ 
    If an IO DID is configured not to support operation ReturnControlToECU(), the 
      automatic resetting of this IO DID is not supported. The application shall catch the 
    mode switch for DcmDiagnosticSessionControl  and reset this IO DID by itself. 
     
     
     
     
     
    Caution 
    Although it is allowed to have an asynchronous IO DID DataServices_<DataName>” 
      service port, it is not allowed to implement the ReturnControlToECU() operation of 
    this port as asynchronous. This is because the transition to the default session is a 
    synchronous operation and cannot be delayed. 
    If the DET support in DCM is enabled and you have implemented the 
    ReturnControlToECU() operation to return DCM_E_PENDING, then this will cause a 
    DET report. 
     
     
     
    IO DID Data Handling in DCM and Application 
    According to [5] there are two types of IO DIDs: packeted and bitmapped. The difference is 
    the size of the IO signals addressed by an IO DID:  
    >  Packeted: Each data element within the IO DID can be of any size. 
    >  Bitmapped: Each data element within the IO DID has a size of a single bit. 
    For C/S DID data access, DCM is able to address only at least a whole byte element. So 
    there are two scenarios in using IO DIDs in DCM also regarding the CEMR: 
    >  Packeted IO DID with all signals which have a size of a multiple of eight bits 
    >  Bitmapped IO DID or IO DID where the signal size is not a multiple of eight bits 
    These two scenarios are described in details in the next paragraphs. 
    Packeted IO DID with all signals which have a size of a multiple of eight bits 
    If the IO DID has multiple data signals, the DCM can automatically derive an appropriate 
    CEMR for this DID as specified in [5]Then at run time during processing a valid request of 
    this service, the DCM will call only the service ports of the IO DID that are enabled in the 
    requested  CEMR.  To  learn  about  how  the  automatic  CEMR  derivation  can  be  enabled 
    resp.  disabled,  please  refer  to  5.22.4  Configuration Aspects  and  the  detailed  parameter 
    description in the configuration tool. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    87 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    The CEM has only effect on the requested IO control operation. The returned data in 
      the positive response will contain all IO DID data independently of the CEM value. 
     
     
     
    Bitmapped IO DID or IO DID where the signal size is not a multiple of eight bits 
    If the IO DID shall contain only single bit information or in general any data element of size 
    not filling a complete byte, word etc., then such an IO DID must be represented by a single 
    data object, which combines all the IO signals, including any reserved gaps in between or 
    at the end of the DID. 
    If this DID shall support in addition also the CEMR, then it shall be specified to support the 
    CEMR  as  a  one  handled  by  the application. To  learn  about  how  to  specify  an externally 
    handled CEMR, please refer to 5.22.4 Configuration Aspects and the detailed parameter 
    description in the configuration tool. 
     
    5.22.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported writeable DIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid 
    >  Which IO operation is supported by the IO DID is defined within the container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl
    . There you have to create the operation corresponding sub-containers like: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl
    /DcmDspDidShortTermAdjustment  
    >  For each DID data signal the corresponding container shall be configured 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData. 
    >  Whether the IO DID shall support CEMR and which kind of CEMR (internal/external) 
    handling is required, can be specified using parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl
    /DcmDspDidControlMask 
    >  If a CEMR handled by the application shall be supported, its size shall be specified by 
    the parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidIoEnableMaskSize. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    88 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    FAQ 
    Particularities of an IO DID configuration: 
      >  If the IO DID has read operation (i.e. accessible viReadDataByIdentifier ($22)) the 
    positive response to this service will return the actual IO data immediately after the 
    request IO control operation was successfully applied. Otherwise no response data 
    will be returned. 
    >  An IO DID with read operation shall never has ConditionCheckRead()” operation. 
    For details, please refer t5.14.4 Configuration Aspects of service 
    ReadDataByIdentifier ($22). The reason for that requirement is that the read 
    operation is executed always after the IO control operation is applied. Once it is 
    applied, the read operation must succeed and return the actual data. Otherwise the 
    IO control operation has to be undone and the response will be a negative one, 
    which contradicts the IO control definition. 
    >  If an IO DID has more than one data signal, DCM will automatically enable the 
    “enable mask record” support for this DID (AR 4.0.3 requirement). But if you have 
    configured only one signal for an IO DID and that signal actually represents all IO 
    signals that the concrete IO DID indeed represents (e.g. for optimization purposes 
    combined into one byte stream), then you have to use the 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidContr
    ol/DcmDspDidControlMask and 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidIoEnableMaskSize 
    parameter in order to configured appropriate enable mask records size. 
    >  An externally handled CEMR is passed to the application (refer to the corresponding 
    operations of DataServices_<DataName> C/S interface in exactly the same form 
    as it was located in the request message: always aligned with the MSB of the 
    function argument:  
    >  For 8, 16 and 32bit CEMRs, the corresponding uint8/16/32 data type will be used 
    as <ControlMaskType> to transfer the value to the application. It represents 
    directly the CEMR from the request, starting with the MSB for the very first data 
    element in the IO DID.  
    >  For a 24bit CEMR, DCM transfers the CEMR to the application using the uint32 
    data type for the <ControlMaskType>. In this case, in order to keep the bit 
    scanning algorithm in the application consistent (i.e. shift left and extract bit) once 
    again the MSB (and not bit 23 of the function argument value represents the very 
    first data element).  
    >  For CEMRs with more than 32bits, the ControlMask function argument points to 
    the first byte (MSB) of the requested CEMR using a uint8 data pointer (uint8*) as 
    <ControlMaskType>. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    89 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.23  RoutineControl ($31) 
    5.23.1  Functionality 
    This  service  provides  direct  access  to  routines  within  the  ECUs  (e.g.  self-test,  control  of 
    peripheries, etc.). 
     
    5.23.2  Required Interfaces 
      If service handled by DCM: 
    >  RoutineServices_<RoutineName> 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.23.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-45   Service $31: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
      
     
     
     
    Table 5-46   Service $31: Supported subservices 
    The protocol handling of this service is fully implemented by DCM, except the sub-function 
    execution sequence validation (e.g.  prior executing “stop” or “request  results” there  shall 
    be send a “start” command).  
    Those sequence rules may not apply to all routines. Instead the application can implement 
    an own state machine to model the running state of each routine. If the service execution 
    order  is  not  correct,  the  appropriate  NRC  (i.e.  0x24)  can  be  returned  back  from  the 
    corresponding service port, implemented by the application. 
     
    5.23.4  Configuration Aspects 
    The following configuration parameter shall be considered for the proper DCM function on 
    this service. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    90 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined under the service container; 
    >  All to be supported RIDs shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine 
    >  The sub-function to be supported by a RID is to be specified within the concrete RID 
    container (sub-function “start” is always available): 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine 
     
     
     
    FAQ 
    Particularities for OBD RIDs (i.e. all within [0xE000-0xE1FF]): 
     

    Any OBD availability RID (e.g. 0xE000, 0xE020, 0xE100, 0xE1A0, etc.) will 
    always be implemented by DCM. They will return the corresponding RID 
    availability mask value as described in [6]. 

    Every RID in the OBD range that covers a corresponding OBD TID, shall not 
    contain any data definition. The concrete data will be processed out by DCM 
    directly using the corresponding OBD TID service data access method. For 
    such RIDs, there also will be no RTE RoutineServices port or callback 
    generated. 

    Only “StartRoutine” operation is to be used on OBD RIDs, since [6] does not 
    define any other operation over a RID. 

    Any OBD RID, that neither is an availability RID, nor covers any existing OBD 
    TID, will be handled as a generic RID and shall be configured regularly. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    91 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.24  WriteMemoryByAddress ($3D) 
    5.24.1  Functionality 
    This service provides direct write access to the physical memory of the ECU. All writeable 
    memory  areas  and  their  access  preconditions  are  to  be  configured  as  documented  in 
    5.15.4 Configuration Aspects. 
     
    5.24.2  Required Interfaces 
      If service handled by DCM: 
    >  Dcm_WriteMemory() 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.24.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-47   Service $3D: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    all 
     
     
     
     
    Table 5-48   Service $3D: Supported subservices 
    The protocol handling of this service is fully implemented by DCM. This includes: 
    >  Validating and evaluating the ALFID byte; 
    >  Parsing the requested memory address and size parameters; 
    >  Validating the requested memory block against the DCM memory configuration: 
    >  Supported requested memory area by the ECU; 
    >  Memory area access preconditions (e.g. security access, mode rules). 
    The memory access will then be provided by the application via a call out. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    92 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.24.4  Configuration Aspects 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  No sub-functions shall be defined within the above defined service container; 
    >  All to be supported writeable memory ranges shall be defined within the following 
    container: /Dcm/DcmConfigSet/DcmDsp/DcmDspMemory 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    93 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    5.25  TesterPresent ($3E) 
    5.25.1  Functionality 
    This  service  is  only  used  for  keeping  the  current  diagnostic  state  in  the  ECU  active. 
    Otherwise on lack of diagnostic communication, the ECU will reset all temporary activated 
    states and functionalities (e.g. diagnostic session, security access, routine execution, etc.) 
     
    5.25.2  Required Interfaces 
      If service handled by DCM: 
    >  No interfaces required for this services. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.25.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-49   Service $3E: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 
     
     
     
     
    0x01 … 0xFF 
     
     
     
     
    Table 5-50   Service $3E: Supported subservices 
    This service is fully implemented by DCM, but can be also handled by the application. 
     
     
     
    Caution 
    If you intend to handle this service within your application, please be aware that the 
      application callback will be called for any request for this service except the 
    functionally requested 0x3E 0x80”! The latter is always handled within DCM. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    94 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
    5.25.4  Configuration Aspects 
    The following configuration parameter shall be considered for the proper DCM function on 
    this service. 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
     
     
    Caution 
    This service is mandatory and therefore may not be missing in the configuration and 
      cannot be overridden by an application implementation. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    95 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    5.26  ControlDTCSetting ($85) 
    5.26.1  Functionality 
    This  service  manipulates  the  setting  of  the  DTC  in  the  ECU  to  avoid  unnecessary  fault 
    memory entries (i.e. while the communication is disabled). 
     
    5.26.2  Required Interfaces 
      If service handled by DCM: 
    >  Refer to chapter 6.3 Services used by DCM for the DEM component. 
      If service handled by the application: 
    >  <Module>_<DiagnosticService>() 
     
    5.26.3  Implementation Aspects 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Protocol Level
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    ServiceID 
     
     
     
     
    SubServiceID 
     
     
     
     
    Table 5-51   Service $85: Implementation types 
    Implementation 
    y l
    y l

     
    on 
    or    
     on
    owe
     
    al
    al
    n
    l
    r
    nr
    Subservice ID
    ternal
    ternal
    t a
     
    ntei
    ntei ex
    ex
    no
    0x00 
      
     
     
     
    0x01 … 0x02 
     
     
     
     
    0x03 … 0xFF 
     
     
     
     
    Table 5-52   Service $85: Supported subservices 
    This service is completely implemented by DCM. 
     
    5.26.4  Configuration Aspects 
    The following configuration parameter shall be considered for the proper DCM function on 
    this service. 
    >  This service shall be defined in the configuration tool: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    96 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  All to be supported sub-functions shall be defined within the above defined service 
    container as sub-service containers: 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice 
    >  If DCM shall accept also a DTC group as a request parameter for this service, please 
    enable the following option: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspControlDTCSetting/DcmSupportDTCSettingCo
    ntrolOptionRecord 
    >  In case DCM shall monitor any critical condition under which this service shall no 
    longer be active, put a reference to that condition using parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspControlDTCSetting/DcmDspControlDTCSetting
    ReEnableModeRuleRef 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    97 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6  API Description 
    For an interfaces overview please see Figure 2-2. 
    6.1  Type Definitions 
    All types not described here are defined by the DCM as described in [1]. 
     
    6.1.1 
    Dcm_ProtocolType 
    Type Name 
    C-Type  Description 
    Value Range 
    Dcm_ProtocolType  c-type 
    Specifies the currently  [0x00-0x0B]U[0xF0-0xFE] 
    active protocol in 
    These values are defined in [1]. 
    DCM. 
    DCM_NO_ACTIVE_PROTOCOL (0x0C) 
    No protocol has been activated yet. 
    Table 6-1   Dcm_ProtocolType 
    6.1.2 
    Dcm_RecoveryInfoType 
    Struct Element Name  C-Type 
    Description 
    Value Range 
    CommControlState 
    uint8 [M]  List of all DCM ComControl 
    DCM_ENABLE_RX_TX_NORM_NM 
    (typically)  related (internal handle, no 
     - DCM will not perform any 
    ComM SNV representation)  CommunicationControl 
    channels with value equal to  operation. 
    the corresponding 
    enumeration type.  
    Any other- DCM will 
     
    perform the corresponding 
    Exist
    CommunicationControl 
    -Condition: 
    CommunicationControl ($28)  operation on the 
    is supported in DCM.
    corresponding channel. 
     
    ComMChannelState 
    Boolean 
    List of all DCM related 
    [X] = FALSE – DCM will 
    [N] 
    (internal handle, no ComM 
    leave the ComM channel in 
    SNV representation) 
    its default state. 
    channels. 
    If a non-default session shall  [X] = TRUE – DCM will 
    be started, this list has to 
    activate the ComM on that 
    exist in order to start up all 
    channel. 
    affected ComM channels. 
    ControlDTCSettingDT
    uint32 
    Optional parameter in case 
    CGroup
    <DTCgroup> - The DTC 
     
    service ControlDTCSetting 
    ($85)
     
    is enabled in DCM and  group that shall be used for 
    supports DTC group 
    the ControlDTCSetting API in 
    parameter.
    DEM. 
     
    ControlDTCSettingDis
    boolean 
    The new ControlDTCSetting  FALSE – DCM will not call 
    abled 
    state. 
    the ControlDTCSetting DEM 
     
    API. 
    Exist-Condition: 
    TRUE -  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    98 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Struct Element Name  C-Type 
    Description 
    Value Range 
    ControlDTCSetting ($85) is 
    DCM will perform a 
    enabled in DCM 
    ControlDTCSetting operation 
    for “disabling DTC” as for an 
    external diagnostic request 
    for ControlDTCSetting ($85). 
    SessionLevel 
    uint8 
    New diagnostic session. 
    0 – DCM will stay in the 
    (typically)   
    default session. 
    Note: This is not the session  Any other valid value 
    level as defined by AR. It is 
    DCM will perform a session 
    DCM internal value. 
    transition as if the 
    corresponding request has 
    been received. 
    SecurityLevel 
    uint8 
    New security level.  
    0 – DCM will stay in the 
    (typically)   
    locked state. 
    Note: This is not the security 
    level as defined by AR. It is 
    Any other valid value 
    DCM internal value. 
    DCM will perform a security 
     
    level transition as if the 
    Exist-Condition: 
    corresponding request has 
    If SecurityAccess ($27) is 
    been received. 
    supported in DCM. 
    SessionConnection 
    uint8 
    Transfers the client 
    Any value – Proper 
    (typically)  connection ID (internal DCM  connection ID on the last 
    value) that has started the 
    client started the non-default 
    non-default session. 
    session.  
     
    Exist-Condition:  
    Only if non-default session 
    protection against other 
    clients is required. 
    ActiveProtocol 
    uint8 
    New active protocol. 
    Any value – Proper 
     
    protocol ID of the last started 
    Note: This is not the protocol  protocol. 
    ID as defined by AR. It is 
    DCM internal value. 
     
    Exist-Condition: 
    If multiple protocols are 
    supported in DCM. 
    Magic number for data 
    consistency check between  A configuration dependent 
    Signature 
    uint32 
    stored and to be recovered 
    value. 
    data block. 
    Table 6-2   Dcm_RecoveryInfoType 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    99 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    6.1.3 
    Dcm_VsgIdentifierType 
    Type Name 
    C-Type  Description 
    Value Range 
    Dcm_VsgIdentifierType  uint8/ 
    Unique Identifier of a Vehicle System  [1-65535] 
    uint16 
    Group (VSG). 
     
    Note: C-Type depends on the total 
    number of VSGs. 
    If number of VSGs is more than 255 
    the C-Type is uint16, otherwise it is 
    uint8. 
     
     
     
    Caution 
    Changing the configured number of VSGs can change the C-Type of 
      Dcm_VsgIdentifierType. Already mapped SWC ports will be disconnected if the C-Type 
    changes (see 6.6.1.1). 
     
     
     
    6.1.4 
    Dcm_VsgStateType 
    Type Name 
    C-Type  Description 
    Value Range 
    Dcm_VsgStateType 
    uint8 
    Allowed states of a Vehicle 
    DCM_VSG_ENABLED 
     
    System Group (VSG). 
    VSG is enabled or shall be 
    enabled. 
    DCM_VSG_DISABLED 
    VSG is disabled or shall be 
    disabled. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    100 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2  Services provided by DCM 
    6.2.1 
    Administrative 
    6.2.1.1 
    Dcm_Init() 
    Prototype 
    void Dcm_Init ( Dcm_ConfigType * ConfigPtr ) 
    Parameter 
    ConfigPtr 
    The parameter specifies the configuration root the DCM shall use for this 
    power on cycle.  
     
    In case of pre-compile configuration – this parameter shall be NULL_PTR. If 
    any other address is used, it will have no effect. 
    In case of post-build selectable: 

    more than one variant is configured – the pointer shall be the address 
    of one of the generated variant structures in Dcm_Lcfg.c 

    only one variant is available – DCM is technically put into pre-compile 
    mode (see above) 
    In case of post-build loadable always a valid pointer to the root DCM structure 
    shall be passed.  
    In case of post-build selectable loadable always a valid pointer to the variant 
    root structure shall be passed. 
    Return code 
    void 
    N/A 
    Functional Description 
    Service for basic initialization of DCM module. 
     
    In all cases where this API does expect a non-null pointer argument, a validation of the passed argument is 
    performed. For details on that topic, please refere to 9.18.2.1 Error Detection and Handling 
    Particularities and Limitations 
    >  ServiceID = 0x01 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-3   Dcm_Init() 
     
    6.2.1.2 
    Dcm_MainFunction() 
    Prototype 
    void Dcm_MainFunction ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    101 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Functional Description 
    This service is used for processing the tasks of the main loop. 
     
    Particularities and Limitations 
    >  ServiceID = 37 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-4   Dcm_MainFunction() 
     
    6.2.1.3 
    Dcm_MainFunctionTimer() 
    Prototype 
    void Dcm_MainFunctionTimer ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    This service is used for time critical tasks (high priority task). 
     
    Particularities and Limitations 
    >  ServiceID = 37 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-5   Dcm_MainFunctionTimer() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    102 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.1.4 
    Dcm_MainFunctionWorker() 
    Prototype 
    void Dcm_MainFunctionWorker ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    This service is used for diagnostic service processing (low priority task). 
     
    Note: All application call outs the DCM executes are performed only from within this task. 
     
    Particularities and Limitations 
    >  ServiceID = 37 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-6   Dcm_MainFunctionWorker() 
     
    6.2.1.5 
    Dcm_GetVersionInfo() 
    Prototype 
    void Dcm_GetVersionInfo ( Std_VersionInfoType* versionInfo ) 
    Parameter 
    versionInfo 
    Pointer to where to store the version information of this module. 
    Return code 
    void 
    N/A 
    Functional Description 
    Returns the version information of the used DCM implementation. 
    Note:  
    Starting with DCM 4.00.00, the version information is decimal coded.  

    Particularities and Limitations 
    >  ServiceID = 0x24 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-7   Dcm_GetVersionInfo() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    103 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.1.6 
    Dcm_InitMemory() 
    Prototype 
    void Dcm_InitMemory ( void ) 
    Parameter 


    Return code 
    void 
    N/A 
    Functional Description 
    Service to initialize module global variables at power up. This function initializes the variables in 
    DCM_VAR_INIT_* (refer to 4.3 Compiler Abstraction and Memory Mapping)  
    sections and shall be used in case they are not initialized by the startup code. 
    Particularities and Limitations 
    >  This function must be called prior to Dcm_Init(). 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-8   Dcm_InitMemory() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    104 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.1.7 
    Dcm_ProvideRecoveryStates() 
    Prototype 
    Std_ReturnType Dcm_ProvideRecoveryStates (Dcm_RecoveryInfoType* RecoveryInfo) 
    Parameter 
    RecoveryInfo 
    Contains all the information that has to be stored for later recovery. 
    Return code 
    Std_ReturnType 
    E_OK: Recovery info could be retrieved and now can be stored. 
    E_NOT_OK: Some error occurred during state retrieval. Provided data is 
    invalid and shall not be stored. 
    Functional Description 
    This API shall be called by the DCM application right before performing the reset operation.  
    For details on the usage of this API, please refer chapter 9.27 How to Recover DCM State Context on ECU 
    Reset/ Power On
    .
     
     
    Note: 

    Once this API is called, the states may change due to external events (e.g. session timeout). 
    Therefore always perform this call right before executing the reset or within the context of a 
    diagnostic service processing (i.e. before the final response is sent). 
    For details on the recovered information, please refer the data type definitionDcm_RecoveryInfoType. 
    Particularities and Limitations 
    >  ServiceID = 0xA3 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-9   Dcm_ProvideRecoveryStates() 
     
    6.2.2 
    SWC 
    6.2.2.1 
    Dcm_GetActiveProtocol() 
    Prototype 
    Std_ReturnType Dcm_GetActiveProtocol Dcm_ProtocolType* ActiveProtocol ) 
    Parameter 
    ActiveProtocol 
    Currently active protocol type 
    Return code 
    Std_ReturnType 
    E_OK: this value is always returned. 
    Functional Description 
    This function returns the active protocol Id. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    105 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Particularities and Limitations 
    >  ServiceID = 0x0F 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-10   Dcm_GetActiveProtocol() 
     
    6.2.2.2 
    Dcm_GetSecurityLevel() 
    Prototype 
    Std_ReturnType Dcm_GetSecurityLevel ( Dcm_SecLevelType* SecLevel ) 
    Parameter 
    SecLevel 
    Active Security Level (see definition of Dcm_SecLevelType for values). 
    Return code 
    Std_ReturnType 
    E_OK: this value is always returned. 
    Functional Description 
    This function provides the active security level value. 
     
    Particularities and Limitations 
    >  ServiceID = 0x0D 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-11   Dcm_GetSecurityLevel() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    106 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.2.3 
    Dcm_GetSesCtrlType() 
    Prototype 
    Std_ReturnType Dcm_GetSesCtrlType ( Dcm_SesCtrlType* SesCtrlType ) 
    Parameter 
    SesCtrlType 
    Active Session Control Type (see definition of Dcm_SesCtrlType for values). 
    Return code 
    Std_ReturnType 
    E_OK: this value is always returned. 
    Functional Description 
    This function provides the active session control type value. 
     
    Particularities and Limitations 
    >  ServiceID = 0x06 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-12   Dcm_GetSesCtrlType() 
     
    6.2.2.4 
    Dcm_ResetToDefaultSession() 
    Prototype 
    Std_ReturnType Dcm_ResetToDefaultSession ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: this value is always returned. 
    Functional Description 
    The call to this function allows the application to reset the current session to Default session. 
    Example: Automatic termination of an extended diagnostic session upon exceeding of a speed limit. 
     
    Note: The time between the function call and the termination of the session depends on the current DCM 
    state. The minimum time to be expected is one DCM task cycle. If this service is called while the DCM is 
    processing a diagnostic request, the session termination will be postponed till the end of this service 
    processing, to avoid unpredictable behavior. 
    Particularities and Limitations 
    >  ServiceID = 0x2A 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-13   Dcm_ResetToDefaultSession() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    107 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
     
    6.2.2.5 
    Dcm_GetSecurityLevelFixedBytes() 
    Prototype 
    Std_ReturnType Dcm_GetSecurityLevelFixedBytes (Dcm_SecLevelType secLevel, uint8* 
    fixedBytes, uint8* bufferSize) 
    Parameter 
    secLevel 
    The security parameter, which fixed bytes are requested. 
    fixedBytes 
    Pointer to the buffer where the fixed bytes will be copied to. 
    bufferSize 
    IN: specifies the available size of the provided buffer 
    OUT: returns the number of copied fixed bytes, resp. number of required bytes 
    in order to copy the complete set (in case of returned 
    DCM_E_BUFFERTOOLOW) 
    Return code 
    Std_ReturnType 
    E_OK: If the fixed bytes of the requested security level have been copied. For 
    levels without fixed bytes, nothing will be copied, and the bufferSize 
    parameter will be 0. 
    DCM_E_BUFFERTOOLOW: If the level has fixed bytes, but the provided 
    buffer is too small to fit them. The bufferSize will return the required buffer 
    size. 
    E_NOT_OK: If an invalid/unsupported security level or the “locked” level is 
    passed to this API. 
    Functional Description 
    By calling this API the application gets access to the fixed bytes set associated with the security-access 
    level (i.e. any generated by the RTE DCM_SEC_LEV_XXX value) passed as selector.  
     
    This API can be called at any time, but the most applicable situation is from within any of thGetSeed() 
    or/and CompareKey() C/S callbacks. 
    The implementation of the above callbacks shall be aware of passing the correct security-access level 
    value that corresponds to its C/S port prototype. Otherwise the wrong values will be reported back. 
    Particularities and Limitations 
    >  ServiceID = 0xA7 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Available only if at least one security level was configured provide fixed bytes information. 
    Table 6-14   Dcm_GetSecurityLevelFixedBytes() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    108 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.2.6 
    Dcm_SetActiveDiagnostic() 
    Prototype 
    Std_ReturnType Dcm_SetActiveDiagnostic(boolean active) 
    Parameter 
    active 
    Represents the type of DCM interaction with ComM: 

    TRUE: DCM shall call thComM_DCM_ActiveDiagnostic 
    as required by se[1]. 

    FALSE: DCM shall not call the ComM_DCM_ActiveDiagnostic 
    anymore. 
    Return code 
    Std_ReturnType 
    E_OK: This code is always returned even if the action could not be executed 
    due to: 
    - invalid value of active; 
    - not initialized DCM. 
    Functional Description 
    This API shall be called by the application in cases where the sleep-prevention managed by DCM is no 
    more desirable.  
    Particularities and Limitations 
    >  ServiceID = 0x56 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-15   Dcm_SetActiveDiagnostic() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    109 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.2.7 
    Dcm_GetRequestKind() 
    Prototype 
    Std_ReturnType Dcm_GetRequestKind(uint16 TesterSourceAddress,                      
                                     Dcm_RequestKindType* RequestKind) 
    Parameter 
    TesterSourceAddress  The source address of the tester which request kind status will be reported. 
    RequestKind 
    Returns the current request kind of the given diagnostic client: 

    DCM_REQ_KIND_NONE: currently no request is in processing for 
    this client 

    DCM_REQ_KIND_EXTERNAL: an externally sent request for this 
    client is in progress (i.e. reception/processing/transmission) 

    DCM_REQ_KIND_ROE: it is a STRT of RoE is in progress for this 
    client 
    Return code 
    Std_ReturnType 
    E_OK: the TesterSourceAddress has a valid value  
    E_NOT_OK: an error occurred or the TesterSourceAddress has no valid 
    value 
    Functional Description 
    This API can be called by the application at any time and from any context if information is required 
    regarding the processing status of a certain diagnostic client.  
     
    Typically this API can be used from within a ServiceRequestManufacturerNotification_<SWC> or 
    ServiceRequestSupplierNotification_<SWC>where the tester source address is passed as an argument, 
    to get not only the request type (functional or physical) but also the kind of the request (internal/external). 
     
    Additionally using the provided APDcm_GetTesterSourceAddress(), the application may get the client 
    request kind also from a known valid DcmRxPduId. 
    Particularities and Limitations 
    >  ServiceID = 0xAB 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-16   Dcm_GetRequestKind() 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    110 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.2.8 
    Dcm_VsgSetSingle() 
    Prototype 
    Std_ReturnType Dcm_VsgSetSingle(Dcm_VsgIdentifierType VsgId,  
                                       Dcm_VsgStateType State) 
    Parameter 
    VsgId 
    Unique Identifier of a VSG (see 6.1.3 Dcm_VsgIdentifierType)
    State 
    New state to be set (for valid values see 6.1.4 Dcm_VsgStateType). 
    Return code 
    Std_ReturnType 
    E_OK: new state is set successfully 
    E_NOT_OK: new state is not set successfully 
    Functional Description 
    API to set the state of a single Vehicle System Group.  
    Particularities and Limitations 
    >  ServiceID = 0xAC 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-17   Dcm_VsgSetSingle() 
    6.2.2.9 
    Dcm_VsgSetMultiple() 
    Prototype 
    Std_ReturnType Dcm_VsgSetMultiple(Dcm_VsgIdentifierType* VsgIdList,  
                                         uint16 VsgListSize, 
                                         Dcm_VsgStateType State) 
    Parameter 
    VsgIdList 
    Pointer to a list of VSG Identifiers (see 6.1.3 Dcm_VsgIdentifierType). 
    VsgListSize 
    Number of VSG identifiers in VsgIdList 
    State 
    New state to be set (for valid values see 6.1.4 Dcm_VsgStateType). 
    Return code 
    Std_ReturnType 
    E_OK: new state is set successfully for all VSG Identifiers in VsgIdList 
    E_NOT_OK: new state is not set successfully for all VSG Identifiers in 
    VsgIdList. VSG identifiers that are set successfully remain in new state. 
    Functional Description 
    API to set the state of a list of Vehicle System Groups.  
    Particularities and Limitations 
    >  ServiceID = 0xAE 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-18   Dcm_VsgSetMultiple() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    111 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.2.10  Dcm_VsgIsActive() 
    Prototype 
    Std_ReturnType Dcm_VsgIsActive(Dcm_VsgIdentifierType VsgId,  
                                      Dcm_VsgStateType* State) 
    Parameter 
    VsgId 
    Unique Identifier of a VSG (see 6.1.3 Dcm_VsgIdentifierType). 
    State 
    Current state of the VSG if return code is E_OK (for valid values see 6.1.4 
    Dcm_VsgStateType).
     
    Return code 
    Std_ReturnType 
    E_OK: current state provided successfully  
    E_NOT_OK: Operation failed 
    Functional Description 
    API to query current state of a Vehicle Sytem Group.  
    Particularities and Limitations 
    >  ServiceID = 0xAD 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-19   Dcm_VsgIsActive() 
    6.2.2.11  Dcm_VsgIsActiveAnyOf() 
    Prototype 
    Std_ReturnType Dcm_VsgIsActiveAnyOf(Dcm_VsgIdentifierType* VsgIdList,  
                                           uint16 VsgListSize, 
                                           Dcm_VsgStateType State) 
    Parameter 
    VsgIdList 
    Pointer to a list of VSG Identifiers (see 6.1.3 Dcm_VsgIdentifierType). 
    VsgListSize 
    Number of VSG identifiers in VsgIdList 
    State 
    Result of operation if return code is E_OK (for valid values see 6.1.4 
    Dcm_VsgStateType).
     
    Return code 
    Std_ReturnType 
    E_OK: Operation succeded, result provided in parameter State 
    E_NOT_OK: Operation failed 
    Functional Description 
    API to query if state of at least one Vehicle System Group in a list of Vehicle System Groups is enabled.  
    Particularities and Limitations 
    >  ServiceID = 0xAF 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-20   Dcm_VsgIsActiveAnyOf() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    112 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
     
    6.2.3 
    General Purpose 
    6.2.3.1 
    Dcm_GetTesterSourceAddress() 
    Prototype 
    Std_ReturnType Dcm_GetTesterSourceAddress (PduIdType DcmRxPduId 
                                             ,uint16* TesterSourceAddress) 
    Parameter 
    DcmRxPduId 
    Specifies the DCM RxPduId for which the tester source address shall be read 
    out. 
    TesterSourceAddress  Will contain the configured tester source address of the DCM RxPduId. 
    Return code 
    Std_ReturnType 
    E_OK: the TesterSourceAddress has a valid value 
    E_NOT_OK: an error occurred, the TesterSourceAddress has no valid 
    value 
    Functional Description 
    This API can be used to access the configured tester source address parameter to a specific DCM main-
    connection, identified by the DCM RxPduId.  
    Usually this API is used in a project specific switch between software contexts (i.e. application and boot 
    loader) where the request is received in one context (e.g. application) and the response is sent from the 
    other context (e.g. boot loader) or vice versa.  
    Particularities and Limitations 
    >  ServiceID = 0xA6 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-21   Dcm_GetTesterSourceAddress() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    113 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.3.2 
    Dcm_ProcessVirtualRequest() 
    Prototype 
    Std_ReturnType Dcm_ProcessVirtualRequest (PduIdType     RxPduId 
                                            ,Dcm_MsgType   Data 
                                            ,PduLengthType Length) 
    Parameter 
    RxPduId 
    The DcmPduId (physical or functional) of the diagnostic client this virtual 
    request represents. The response of this request will later be forwarded to this 
    client. 
    Data 
    Pointer to the buffer where the complete diagnostic request incl. SID is 
    located. 
    Length 
    The length of the diagnostic request located in the Data buffer. 
    Return code 
    Std_ReturnType 
    E_OK: The request has been accepted. 
    E_NOT_OK: The request was not accepted. Possible reasons: 

    DCM is already busy with another client, resp. the RxPduId is from a 
    low priority client. 

    Invalid RxPduId, too long request or NULL_PTR for Data location 
    passed to the API. 
    Functional Description 
    This is a generic API that can be used by the application (CDD) to send a virtual request to the ECU which 
    response will be sent to a concrete diagnostic client.  
    Typical use-case of this API is an application implementation for service 0x86 (ResponseOnEvent). 
     
    This API can be called from any context (ISR, TASK, etc.). Just when called from an ISR and the request 
    contains lots of data, the interrupt latency can be significantly affected. 
    Particularities and Limitations 
    >  ServiceID = 0xA8 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-22   Dcm_ProcessVirtualRequest() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    114 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.2.3.3 
    Dcm_SetSecurityLevel() 
    Prototype 
    Std_ReturnType Dcm_SetSecurityLevel (Dcm_SecLevelType SecLevel) 
    Parameter 
    SecLevel 
    Active Security Level (see definition of Dcm_SecLevelType for values). 
    Return code 
    Std_ReturnType 
    E_OK: State change has been performed. 
    E_NOT_OK: State change failed. Possible reasons: 
    - wrong/invalid security level; 
    - called while DCM is busy with a diagnostic request; 
    - called from wrong task context (not from Dcm_MainFunctionWorker); 
    Functional Description 
    This API shall be called by the application when servicSecurityAccess ($27) is supported in the ECU but 
    not handled in DCM. In this case DCM will be able to switch only to the LOCKED security level when 
    performing a diagnostic session transition. In order to unlock the ECU in any other security level the 
    application shall trigger the security access state transitions by calling this API with the appropriate value.  
     
    Within this API call, DCM will perform the same RTE interaction as if the security state handling was done 
    by itself. For that reason this API must be called only from within the Dcm_MainFunction(Worker) context.  
    The best place for this call is either the callback function for SecurityAccess ($27) or a Confirmation() if 
    configured. 
    Particularities and Limitations 
    >  ServiceID = 0xA9 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Available only if servicSecurityAccess ($27) is supported in the ECU but handled within the DCM 
    application. 
    Table 6-23   Dcm_SetSecurityLevel() 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    115 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.3  Services used by DCM 
    In the following table services provided by other components, which are used by the DCM, 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    Dem 
    Dem_DcmCancelOperation 
    Dem_[Dcm]EnableDTCRecordUpdate 
    Dem_[Dcm]DisableDTCRecordUpdate 
    Dem_[Dcm]SetFreezeFrameRecordFilter 
    Dem_GetFreezeFrameDataByRecord / Dem_DcmGetOBDFreezeFrameData 
    Dem_[Dcm]GetDTCStatusAvailabilityMask 
    Dem_[Dcm]SetDTCFilter 
    Dem_[Dcm]GetNextFilteredRecord 
    Dem_[Dcm]GetNextFilteredDTCAndSeverity 
    Dem_[Dcm]GetNextFilteredDTCAndFDC 
    Dem_[Dcm]GetNextFilteredDTC 
    Dem_[Dcm]GetExtendedDataRecordByDTC 
    Dem_[Dcm]GetFreezeFrameDataByDTC 
    Dem_[Dcm]GetNumberOfFilteredDTC 
    Dem_[Dcm]GetSeverityOfDTC 
    Dem_[Dcm]GetFunctionalUnitOfDTC 
    Dem_[Dcm]GetStatusOfDTC 
    Dem_[Dcm]GetTranslationType 
    Dem_[Dcm]GetDTCByOccurrenceTime 
    Dem_[Dcm]DisableDTCSetting 
    Dem_[Dcm]EnableDTCSetting 
    Dem_[Dcm]GetDTCOfOBDFreezeFrame 
    Dem_[Dcm]ReadDataOfOBDFreezeFrame 
     
    Dem_DcmGetAvailableOBDMIDs 
    Dem_DcmGetNumTIDsOfOBDMID 
    Dem_DcmGetDTRData 
    Dem_[Dcm]ClearDTC 
     
    For AUTOSAR Environment prior to 4.3.0 
    Dem_[Dcm]GetSizeOfExtendedDataRecordByDTC 
    Dem_[Dcm]GetSizeOfFreezeFrameByDTC 
     
    For AUTOSAR 4.3.0 Environment 
    Dem_SelectDTC 
    Dem_GetDTCSelectionResult 
    Dem_SelectExtendedDataRecord 
    Dem_GetSizeOfExtendedDataRecordSelection 
    Dem_GetNextExtendedDataRecord 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    116 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Component 
    API 
    Dem_SelectFreezeFrameData 
    Dem_GetSizeOfFreezeFrameSelection 
    Dem_GetNextFreezeFrameData 
    BswM 
    For AUTOSAR 4.x Environment 
    BswM_Dcm_CommunicationMode_CurrentState 
    BswM_Dcm_ApplicationUpdated 
     
    For AUTOSAR 3.x Environment 
    BswM_Dcm_RequestCommunicationMode 
    Det 
    Det_ReportError 
    ComM 
    ComM_DCM_ActiveDiagnostic 
    ComM_DCM_InactiveDiagnostic 
    PduR 
    PduR_DcmTransmit 
    SchM 
    For AUTOSAR 4.x Environment 
    SchM_Enter_Dcm_DCM_EXCLUSIVE_AREA_0 
    SchM_Exit_Dcm_DCM_EXCLUSIVE_AREA_0 
     
    For AUTOSAR 3.x Environment 
    SchM_Enter_Dcm 
    SchM_Exit_Dcm 
    NvM 
    NvM_ReadBlock 
    NvM_WriteBlock 
    NvM_CancelJobs 
    NvM_SetBlockLockStatus 
    NvM_GetErrorStatus 
    NvM_GetDcmBlockId 
    EcuM 
    EcuM_BswErrorHook 
    Table 6-24   Services used by the DCM 
    6.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the  DCM and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file Dcm_Cbk.h by the DCM. 
    6.4.1 
    <Module> 
    The following callbacks are to be used from the module that implements the callouts: 
    >  <Module>_<DiagnosticService>() 
    >  <Module>_<DiagnosticService>_<SubService>() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    117 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.1.1 
    Dcm_ExternalProcessingDone() 
    Prototype 
    void Dcm_ExternalProcessingDone ( Dcm_MsgContextType* pMsgContext ) 
    Parameter 
    pMsgContext 
    Message-related information for one diagnostic protocol identifier. 
    Return code 
    void 
    N/A 
    Functional Description 
    Used by service interpreter outside of DCM to indicate that the current diagnostic service processing is 
    finished and (if required) a final response can be sent. 
     
    Particularities and Limitations 
    >  ServiceID = 0x31 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-25   Dcm_ExternalProcessingDone() 
     
    6.4.1.2 
    Dcm_ExternalSetNegResponse() 
    Prototype 
    void Dcm_ExternalSetNegResponse ( Dcm_MsgContextType* pMsgContext, 
    Dcm_NegativeResponseCodeType ErrorCode ) 
    Parameter 
     
    pMsgContext 
    Message-related information for one diagnostic protocol identifier. 
    ErrorCode 
    Contains the NRC to be returned to the diagnostic client. 
    Return code 
    void 
    N/A 
    Functional Description 
    Used by service interpreter outside of DCM to indicate that a the final response shall be a negative one. 
    Dcm_ExternalSetNegResponse will not finalize the response processing. 
     
    Particularities and Limitations 
    >  ServiceID = 0x30 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-26   Dcm_ExternalSetNegResponse() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    118 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.2 
    ComM 
    The  DCM  supports  the  ComM  interface  according  to AR3  and AR4.  By  default, AR4  is 
    used. AR3 is only available in deliveries which are preconfigured accordingly.  
    6.4.2.1 
    Dcm_ComM_NoComModeEntered() 
    Prototype 
    ComM AR 4.x.x 
    void Dcm_ComM_NoComModeEntered ( uint8 NetworkId ) 
    ComM AR 3.x.x 
    void Dcm_ComM_NoComModeEntered ( void ) 
    Parameter 
    NetworkId 
    Identifier of the network concerned by the mode change. 
    Return code 
    void 
    N/A 
    Functional Description 
    This call informs the DCM module about a ComM mode change to COMM_NO_COMMUNICATION. 
     
    Particularities and Limitations 
    >  ServiceID = 0x21 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-27   Dcm_ComM_NoComModeEntered() 
    6.4.2.2 
    Dcm_ComM_SilentComModeEntered() 
    Prototype 
    ComM AR 4.x.x 
    void Dcm_ComM_SilentComModeEntered ( uint8 NetworkId ) 
    ComM AR 3.x.x 
    void Dcm_ComM_SilentComModeEntered ( void ) 
    Parameter 
    NetworkId 
    Identifier of the network concerned by the mode change. 
    Return code 
    void 
    N/A 
    Functional Description 
    This call informs the DCM module about a ComM mode change to COMM_SILENT_COMMUNICATION. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    119 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Particularities and Limitations 
    >  ServiceID = 0x22 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-28   Dcm_ComM_SilentComModeEntered() 
     
    6.4.2.3 
    Dcm_ComM_FullComModeEntered() 
    Prototype 
    ComM AR 4.x.x 
    void Dcm_ComM_FullComModeEntered ( uint8 NetworkId ) 
    ComM AR 3.x.x 
    void Dcm_ComM_FullComModeEntered ( void ) 
    Parameter 
    NetworkId 
    Identifier of the network concerned by the mode change. 
    Return code 
    void 
    N/A 
    Functional Description 
    This call informs the DCM module about a ComM mode change to COMM_FULL_COMMUNICATION. 
     
    Particularities and Limitations 
    >  ServiceID = 0x23 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-29   Dcm_ComM_FullComModeEntered() 
    6.4.3 
    PduR 
    The  DCM  supports  different  versions  of  the  PduR  interface.  For  details  regarding  the 
    configuration, please refer to chapte9.17 How to Deal with the PduR AR version. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    120 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.1 
    All AUTOSAR Versions 
    6.4.3.1.1 
    Dcm_TriggerTransmit() 
    Prototype 
    Std_ReturnType Dcm_TriggerTransmit ( PduIdType DcmTxPduId, PduInfoType* Info ) 
    Parameter 
    DcmTxPduId 
    ID of DCM I-PDU that has been transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by DCM) - 1 
    Info 
    Pointer to the data buffer where to be transmitted data shall be copied to. 
    Return code 
    Std_ReturnType 
    E_OK: If data has been copied. 
     
    E_NOT_OK: In case of any error detected within this API. 
    Functional Description 
    This is called by the PduR to get any data to be transmitted to a lower layer with timed triggered 
    transmission (i.e. FlexRay). 
    Particularities and Limitations 
    >  ServiceID = 0xA2 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-30   Dcm_TriggerTransmit () 
     
    6.4.3.2 
    AUTOSAR 4 
    6.4.3.2.1 
    Dcm_StartOfReception() 
    Prototype 
    PduR AR 4.0.3 (DCM Version >= 1.00.00) 
    BufReq_ReturnType Dcm_StartOfReception ( PduIdType DcmRxPduId, PduLengthType 
    TpSduLength, PduLengthType* RxBufferSizePtr ) 
    PduR AR 4.1.2 (DCM Version >= 2.02.00) 
    BufReq_ReturnType Dcm_StartOfReception ( PduIdType DcmRxPduId, PduInfoType* 
    info, PduLengthType TpSduLength, PduLengthType* RxBufferSizePtr ) 
    Parameter 
    DcmRxPduId 
    Identifies the DCM data to be received. This information is used within the 
    DCM to distinguish two or more receptions at the same time. 
    info 
    Pointer to a structure containing content and length of the first frame or single 
    frame including MetaData. 
    TpSduLength 
    This length identifies the overall number of bytes to be received.  
    RxBufferSizePtr 
    Length of the available buffer. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    121 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Return code 
    BufReq_ReturnType 
    BUFREQ_OK: The diagnostic request will be accepted. 
    BUFREQ_E_NOT_OK: The diagnostic request will not be accepted at all (i.e. 
    no free buffer or processing context). 
    BUFREQ_E_OVFL: The diagnostic request could be accepted, but it will not fit 
    the configured buffer and therefore is rejected. 
    Functional Description 
    Called once to initialize the reception of a diagnostic request. 
     
    Particularities and Limitations 
    >  ServiceID = 0x00 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  The prototype of the API depends on the AR version of the PduR (please refer to chapter 9.17 How to 
    Deal with the PduR AR version)
    Table 6-31   Dcm_StartOfReception() 
    6.4.3.2.2 
    Dcm_CopyRxData() 
    Prototype 
    BufReq_ReturnType Dcm_CopyRxData ( PduIdType DcmRxPduId, PduInfoType* 
    PduInfoPtr, PduLengthType* RxBufferSizePtr ) 
    Parameter 
    DcmRxPduId 
    Identifies the DCM data to be received. This information is used within the 
    DCM to distinguish two or more receptions at the same time. 
    PduInfoPtr 
    Pointer to a PduInfoType which indicates the number of bytes to be copied 
    (SduLength) and the location of the source data (SduDataPtr). 
    An SduLength of 0 is possible in order to poll the available receive buffer size. 
    In this case no data are to be copied and PduInfoPtr might be invalid. 
    RxBufferSizePtr 
    Remaining free place in receive buffer after completion of this call. 
    Return code 
    BufReq_ReturnType 
    BUFREQ_OK: Data has been copied to the receive buffer completely as 
    requested. 
    BUFREQ_E_NOT_OK: Data has not been copied. Request failed. 
    Functional Description 
    Called once upon reception of each segment. Within this call, the received data is copied from the receive 
    TP buffer to the DCM receive buffer. 
    The API might only be called with an SduLength greater 0 if the RxBufferSizePtr returned by the previous 
    API call indicates sufficient receive buffer (SduLength <= RxBufferSizePtr). 
    The function must only be called if the connection has been accepted by an initial call to 
    Dcm_StartOfReception. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    122 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Particularities and Limitations 
    >  ServiceID = 0x02 
    >  Reentrant for different PduIds. Non reentrant for the same PduId. 
    >  This function is synchronous. 
    Table 6-32   Dcm_CopyRxData() 
     
    6.4.3.2.3 
    Dcm_TpRxIndication() 
    Prototype 
    PduR AR 4.0.3 (DCM Version >= 1.00.00) 
    void Dcm_TpRxIndication ( PduIdType DcmRxPduId, NotifResultType Result ) 
    PduR AR 4.1.2 (DCM Version >= 2.02.00) 
    void Dcm_TpRxIndication ( PduIdType DcmRxPduId, Std_ReturnType Result ) 
    Parameter 
    DcmRxPduId 
    ID of DCM I-PDU that has been received. Identifies the data that has been 
    received. 
    Range: 0..(maximum number of I-PDU IDs received by DCM) – 1 
    Result 
    PduR AR 4.0.3: 
    NTFRSLT_OK:  The complete N-PDU has been received and is stored in the 
    receive buffer. 
    any other value: The N_PDU has not been received; the receive buffer can be 
    unlocked by the DCM. 
     
    PduR AR 4.1.2: 
    E_OK: the complete N-PDU has been received and is stored in the  
    receive buffer  
    E_NOT_OK: the N_PDU has not been received properly, DCM  
    should prepare for a new reception. 
    Return code 
    void 
    N/A 
    Functional Description 
    This is called by the PduR to indicate the completion of a reception. 
     
    Particularities and Limitations 
    >  ServiceID = 0x03 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  The prototype of the API depends on the AR version of the PduR (please refer to chapter 9.17 How to 
    Deal with the PduR AR version). 
    Table 6-33   Dcm_TpRxIndication() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    123 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
    6.4.3.2.4 
    Dcm_CopyTxData() 
    Prototype 
    BufReq_ReturnType Dcm_CopyTxData ( PduIdType DcmTxPduId, PduInfoType* 
    PduInfoPtr, RetryInfoType* RetryInfoPtr, PduLengthType* TxDataCntPtr ) 
    Parameter 
    DcmTxPduId 
    Identifies the DCM data to be sent. This information is used to derive the PCI 
    information within the transport protocol. The value has to be same as in the 
    according service call PduR_DcmTransmit(). 
    PduInfoPtr 
    Pointer to a PduInfoType, which indicates the number of bytes to be copied 
    (SduLength) and the location where the data have to be copied to 
    (SduDataPtr). 
    An SduLength of 0 is possible in order to poll the available transmit data 
    count. In this case no data are to be copied and SduDataPtr might be invalid. 
    RetryInfoPtr 
    If the transmitted TP I-PDU does not support the retry feature a NULL_PTR 
    can be provided. This indicates that the copied transmit data can be removed 
    from the buffer after it has been copied. 
    TxDataCntPtr 
    Remaining Tx data after completion of this call. 
    Return code 
    BufReq_ReturnType 
    BUFREQ_OK: Data has been copied to the transmit buffer completely as 
    requested. 
    BUFREQ_E_NOT_OK: Data has not been copied. Request failed, in case the 
    corresponding I-PDU was stopped. 
    BUFREQ_E_BUSY: There is temporarily not enough data to be transmitted. 
    Retry later. 
    Functional Description 
    At invocation of Dcm_CopyTxData the DCM module copies the requested transmit data with ID PduId from 
    its internal transmit buffer to the location specified by the PduInfoPtr. The function Dcm_CopyTxData also 
    calculates and sets the TxDataCntPtr to the amount of remaining bytes for the transmission of this data. 
    If RetryInfoPtr is NULL_PTR or if TpDataState is equal to TP_DATACONF, the DCM shall always copy the 
    next fragment of data to the SduDataPtr. 
    No TpDataState other than TP_DATACONF is supported by the current DCM implementation. 
     
    Particularities and Limitations 
    >  ServiceID = 0x04 
    >  Reentrant for different PduIds. Non reentrant for the same PduId. 
    >  This function is synchronous. 
    Table 6-34   Dcm_CopyTxData() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    124 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.2.5 
    Dcm_TpTxConfirmation() 
    Prototype 
    PduR AR 4.0.3 (DCM Version >= 1.00.00) 
    void Dcm_TpTxConfirmation ( PduIdType DcmTxPduId, NotifResultType Result ) 
    PduR AR 4.1.2 (DCM Version >= 2.02.00) 
    void Dcm_TpTxConfirmation ( PduIdType DcmTxPduId, Std_ReturnType Result ) 
    Parameter 
    DcmTxPduId 
    ID of DCM I-PDU that has been transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by DCM) – 1 
    Result 
    PduR AR 4.0.3: 
    NTFRSLT_OK if the complete N-PDU has been transmitted.  
    any other value: an error occurred during transmission, the DCM can unlock 
    the transmit buffer. 
     
    PduR AR 4.1.2: 
    E_OK: the complete N-PDU has been transmitted.  
    E_NOT_OK: an error occurred during transmission, the DCM can  
    unlock the transmit buffer 
    Return code 
    void 
    N/A 
    Functional Description 
    This is called by the PduR to confirm an end of transport protocol (e.g. CanTp) transmission. 
     
    Particularities and Limitations 
    >  ServiceID = 0x05 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  The prototype of the API depends on the AR version of the PduR (please refer to chapter 9.17 How to 
    Deal with the PduR AR version). 
    Table 6-35   Dcm_TpTxConfirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    125 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.2.6 
    Dcm_TxConfirmation() 
    Prototype 
    void Dcm_TxConfirmation ( PduIdType DcmTxPduId ) 
    Parameter 
    DcmTxPduId 
    ID of DCM I-PDU that has been transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by DCM) – 1 
    Return code 
    void 
    N/A 
    Functional Description 
    This is called by the PduR to confirm an end of interface (e.g. CanIf) transmission. 
    Particularities and Limitations 
    >  ServiceID = 0xA1 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-36   Dcm_TxConfirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    126 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.3 
    AUTOSAR 3 
    6.4.3.3.1 
    Dcm_ProvideRxBuffer() 
    Prototype 
    BufReq_ReturnType Dcm_ProvideRxBuffer ( PduIdType DcmRxPduId, PduLengthType  
    TpSduLength, PduInfoType** PduInfoPtr ) 
    Parameter 
    DcmRxPduId 
    Identifies the DCM data to be received. This information is used within the 
    DCM to distinguish two or more receptions at the same time. 
    TpSduLength 
    The overall length of the message being received. 
    PduInfoPtr 
    Pointer to pointer to PduInfoType containing data pointer and length of a 
    receive buffer, which is provided by the DCM.  
    Note that certain TP's will put an initial value inside the length buffer, which is 
    the minimal size of the RxBuffer. This value is ignored by the DCM. 
    Return code 
    BufReq_ReturnType 
    BUFREQ_OK: buffer has been successfully provided. 
    BUFREQ_E_OVFL: no buffer provided, available buffer is too small. 
    BUFREQ_E_NOT_OK: no buffer provided, request failed. 
    Functional Description 
    Called at least once upon reception by a lower layer TP to request a buffer, where the received data will be 
    stored. 
    When called multiple times, the DCM expects that the previously provided buffer has been filled up 
    completely. 
     
    Particularities and Limitations 
    >  ServiceID = 0x02 
    >  Reentrant for different PduIds. Non reentrant for the same PduId. 
    >  This function is synchronous. 
    Table 6-37   Dcm_ProvideRxBuffer () 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    127 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.3.2 
    Dcm_RxIndication() 
    Prototype 
    void Dcm_RxIndication ( PduIdType DcmRxPduId, NotifResultType Result ) 
    Parameter 
    DcmRxPduId 
    ID of DCM I-PDU that has been received. Identifies the data that has been 
    received. 
    Range: 0..(maximum number of I-PDU IDs received by DCM) – 1 
    Result 
    NTFRSLT_OK:  The complete I-PDU has been received and is stored in the 
    receive buffer. 
    any other value: The I-PDU has not been received; the receive buffer can be 
    unlocked by the DCM. 
    Return code 
    void 
    N/A 
    Functional Description 
    This is called by the PduR to indicate the completion of a reception. 
     
    Particularities and Limitations 
    >  ServiceID = 0x03 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-38   Dcm_RxIndication() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    128 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.3.3 
    Dcm_ProvideTxBuffer() 
    Prototype 
    BufReq_ReturnType Dcm_ProvideTxBuffer ( PduIdType DcmTxPduId, PduInfoType** 
    PduInfoPtr, PduLengthType Length ) 
    Parameter 
    DcmTxPduId 
    Identifies the DCM data to be sent. This information is used to derive the PCI 
    information within the transport protocol. The value has to be same as in the 
    according service call PduR_DcmTransmit(). 
    PduInfoPtr 
    Pointer to pointer to PduInfoStructure containing data pointer and length of a 
    transmit buffer which is provided by the DCM. 
    Length 
    Minimum buffer size requested by the lower layer. 
    A length of zero indicates that the length of the buffer can be of arbitrary size 
    (larger than zero). The Length parameter is expected by DCM to be always 
    zero. 
    Return code 
    BufReq_ReturnType 
    BUFREQ_OK: buffer has been successfully provided. 
    BUFREQ_E_NOT_OK: no buffer provided, request failed. 
    BUFREQ_E_BUSY: There is temporarily not enough data to be transmitted. 
    Retry later. 
    Functional Description 
    Called by a lower layer TP to request a buffer with data to be transmitted. 
     
    Particularities and Limitations 
    >  ServiceID = 0x04 
    >  Reentrant for different PduIds. Non reentrant for the same PduId. 
    >  This function is synchronous. 
    Table 6-39   Dcm_ProvideTxBuffer () 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    129 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.3.3.4 
    Dcm_TxConfirmation() 
    Prototype 
    void Dcm_TxConfirmation ( PduIdType DcmTxPduId, NotifResultType Result ) 
    Parameter 
    DcmTxPduId 
    ID of DCM I-PDU that has been transmitted. 
    Range: 0..(maximum number of I-PDU IDs transmitted by DCM) – 1 
    Result 
    NTFRSLT_OK if the complete I-PDU has been transmitted.  
    any other value: an error occurred during transmission, the DCM can unlock 
    the transmit buffer. 
    Return code 
    void 
    N/A 
    Functional Description 
    This is called by the PduR to confirm an end of transmission. 
     
    Particularities and Limitations 
    >  ServiceID = 0x05 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Table 6-40   Dcm_TxConfirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    130 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.4.4 
    CanTp 
    6.4.4.1 
    Dcm_OnRequestDetection() 
    Prototype 
    void Dcm_OnRequestDetection ( PduIdType canTpRxPduId, uint8 tpAddrExtension ) 
    Parameter 
    canTpRxPduId 
    Represents the CanIf to CanTp RxPduId of the request. 
    tpAddrExtension 
    Defines the address extension byte value of the message. 
    Return code 
    void 
    N/A 
    Functional Description 
    This API will be called by the CanTp each time a new TP CAN frame of type first-frame or single-frame is 
    received. The DCM will check whether this CAN message applies to any DCM connection (i.e. the CAN 
    message is one of the DCM clients’ physical requests). If so, any ongoing diagnostic (request/response) 
    transmission over this client connection will be terminated. Additionally if there is service processing in 
    progress, it will be terminated too. 
    Particularities and Limitations 
    >  ServiceID = 0xA4 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  This function is only available if DCM shall support Mixed11 addressing CanTp connections. 
    Table 6-41   Dcm_ OnRequestDetection() 
     
    6.5  Configurable Interfaces 
    6.5.1 
    Callout Functions  
    At  its  configurable  interfaces  the  DCM  defines  callout  functions.  The  declarations  of  the 
    callout functions are provided by the BSW module, i.e. the DCM. It is the integrator's task 
    to  provide  the  corresponding  function  definitions.  The  definitions  of  the  callouts  can  be 
    adjusted  to  the  system's  needs.  The  DCM  callout  function  declarations  are  described  in 
    the following tables: 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    131 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.1 
    <Module>_<DiagnosticService>() 
    Prototype 
    Std_ReturnType <Module>_<DiagnosticService> ( Dcm_OpStatusType OpStatus, 
    Dcm_MsgContextType* pMsgContext ) 
    Parameter 
    OpStatus 
    DCM_INITIAL: All In-parameters are valid. 
    DCM_PENDING: All parameters are still valid. This is the subsequent function 
    calls after DCM_E_PENDING has been returned. 
    DCM_CANCEL: All In-parameters are still valid, but since this call is a final 
    one it must be used to finalize any pending activities only. 
    DCM_FORCE_RCRRP_OK: (Vendor extension) The enforced RCR-RP 
    transmission has finished with success. 
    DCM_FORCE_RCRRP_NOT_OK: (Vendor extension) The enforced RCR-RP 
    transmission has failed 
    pMsgContext 
    Message-related information for one diagnostic protocol identifier. The 
    pointers in pMsgContext points behind the SID. 
    Return code 
    Std_ReturnType 
    E_OK: Request was successful. 
    DCM_E_PENDING: Request is not yet finished. 
    DCM_E_FORCE_RCRRP: (Vendor extension) Forces a RCR-RP response. 
    The call out will called again once the response is sent. The OpStatus 
    parameter will contain the transmission result. 
    DCM_E_PROCESSINGDONE: (Vendor extension): Can be returned instead 
    of calling Dcm_ProcessingDone for the current pMsgContext. Saves 
    application code and stack usage. 
    Functional Description 
    DCM calls a function of this kind as soon as a supported diagnostic service, configured to be handled by a 
    CDD, is received. All of the relevant diagnostic request parameter information is forwarded by DCM through 
    the pMsgContext function parameter. 
     
    The concrete name of the callout is defined by the configuration parameter 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSidTabFnc. 
     
    Particularities and Limitations 
    >  ServiceID = 0x32 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    Table 6-42   <Module>_<DiagnosticService>() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    132 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.2 
    <Module>_<DiagnosticService>_<SubService>() 
    Prototype 
    Std_ReturnType <Module>_<DiagnosticService>_<SubService> ( Dcm_OpStatusType 
    OpStatus, Dcm_MsgContextType* pMsgContext ) 
    Parameter 
    OpStatus 
    DCM_INITIAL: All In-parameters are valid. 
    DCM_PENDING: All parameters are still valid. This is the subsequent function 
    calls after DCM_E_PENDING has been returned. 
    DCM_CANCEL: All In-parameters are still valid, but since this call is a final 
    one it must be used to finalize any pending activities only. 
    DCM_FORCE_RCRRP_OK: (Vendor extension) The enforced RCR-RP 
    transmission has finished with success. 
    DCM_FORCE_RCRRP_NOT_OK: (Vendor extension) The enforced RCR-RP 
    transmission has failed. 
    pMsgContext 
    Message-related information for one diagnostic protocol sub-function identifier. 
    The pointer in pMsgContext points behind the sub-function. 
    Return code 
    Std_ReturnType 
    E_OK: Request was successful. 
    DCM_E_PENDING: Request is not yet finished. 
    DCM_E_FORCE_RCRRP: (Vendor extension) Forces a RCR-RP response. 
    The call out will called again once the response is sent. The OpStatus 
    parameter will contain the transmission result. 
    DCM_E_PROCESSINGDONE: (Vendor extension): Can be returned instead 
    of calling Dcm_ProcessingDone for the current pMsgContext. Saves 
    application code and stack usage. 
    Functional Description 
    DCM calls a function of this kind as soon as a supported diagnostic sub-service, configured to be handled 
    by a CDD, is received. All of the relevant diagnostic request parameter information is forwarded by DCM 
    through the pMsgContext function parameter. 
     
    The concrete name of the callout is defined by the configuration parameter 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubService/DcmDsdSubSer
    viceFnc. 
     
    Particularities and Limitations 
    >  ServiceID = 0x33 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    Table 6-43   <Module>_<DiagnosticService>_<SubService>() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    133 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.3 
    Dcm_SetProgConditions() 
    Prototype 
    Std_ReturnType Dcm_SetProgConditions ( Dcm_ProgConditionsType * ProgConditions ) 
    Parameter 
    ProgConditions 
    Conditions on which the jump to bootloader has been requested. 
    Return code 
    Std_ReturnType 
    E_OK: Conditions have correctly been set. 
    E_NOT_OK: Conditions cannot be set. 
    DCM_E_PENDING: Conditions set is in progress, a further call to this API is 
    needed to end the setting. 
    Functional Description 
    The Dcm_SetProgConditions callout allows the integrator to store relevant information prior jumping to 
    bootloader. The context parameters are defined in Dcm_ProgConditionsType. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-44   Dcm_SetProgConditions() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    134 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.4 
    Dcm_GetProgConditions() 
    Prototype 
    Dcm_EcuStartModeType Dcm_GetProgConditions ( Dcm_ProgConditionsType * 
    ProgConditions ) 
    Parameter 
    ProgConditions 
    Conditions on which the jump from the bootloader has been requested. 
    Return code 
    Dcm_EcuStartModeType  DCM_COLD_START: The ECU starts normally. 
    DCM_WARM_START: The ECU starts from a bootloader jump. The function 
    parameter values will be evaluated for further processing. 
    Functional Description 
    The Dcm_GetProgConditions callout is called upon DCM initialization and allows determining if a response 
    ($50 or $51) has to be sent depending on request within the bootloader. The context parameters are 
    defined in Dcm_ProgConditionsType. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-45   Dcm_GetProgConditions() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    135 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.5 
    Dcm_Confirmation() 
    Prototype 
    void Dcm_Confirmation ( Dcm_IdContextType idContext, PduIdType dcmRxPduId, 
    Dcm_ConfirmationStatusType status ) 
    Parameter 
    idContext 
    Current context identifier which can be used to retrieve the relation between 
    request and confirmation. 
    Within the confirmation, the Dcm_MsgContext is no more available, so the 
    idContext can be used to represent this relation. 
    The idContext is also part of the Dcm_MsgContext 
     
    dcmRxPduId 
    DcmRxPduId on which the request was received. The source of the request 
    can have consequences for message processing. 
    status 
    Status indication about confirmation (differentiate failure indication and normal 
    confirmation) / The parameter "Result" of "Dcm_TxConfirmation" shall be 
    forwarded to status depending if a positive or negative responses was sent 
    before. 
    Return code 
    void 
    N/A 
    Functional Description 
    This function confirms the successful transmission or a transmission error of a diagnostic service. The 
    idContext and the dcmRxPduId are required to identify the message which was processed. If there was no 
    response for this request, this call out is invoked at service processing finish. 
     
    Note: This call out is invoked only then when a DCM internal or external <Module>_<DiagnosticService> 
    service handler has been executed. 
     
    Particularities and Limitations 
    >  ServiceID = 41 
    >  Not Reentrant 
    >  This function is synchronous. 
    Table 6-46   Dcm_Confirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    136 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.6 
    Dcm_ReadMemory() 
    Prototype 
    Dcm_ReturnReadMemoryType Dcm_ReadMemory ( Dcm_OpStatusType OpStatus, uint8 
    MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint8* MemoryData [, 
    Dcm_NegativeResponseCodeType* ErrorCode] ) 
    Parameter 
    OpStatus 
    DCM_INITIAL: All In-parameters are valid. 
    DCM_PENDING: All parameters are still valid. This is the subsequent function 
    calls after DCM_E_PENDING has been returned. 
    DCM_CANCEL: All In-parameters are still valid, but since this call is a final 
    one it must be used to finalize any pending activities only. 
    DCM_FORCE_RCRRP_OK: (Vendor extension) The enforced RCR-RP 
    transmission has finished with success. 
    DCM_FORCE_RCRRP_NOT_OK: (Vendor extension) The enforced RCR-RP 
    transmission has failed. 
    MemoryIdentifier 
    MemoryIdentifier  Identifier of the Memory Block (e.g. used if memory section 
    distinguishing is needed) 
    Note: If it's not used this parameter shall be set to 0. 
     
    MemoryAddress 
    Starting address of server memory from which data is to be retrieved. 
    MemorySize 
    Number of bytes in the MemoryData 
    MemoryData 
    Data read (Points to the diagnostic buffer in DCM). 
    ErrorCode 
    Optional parameter. Exists only in AR 4.2.2 or later enabled DCMs. 
    If written by the application, a specific NRC will be sent back. This NRC is 
    evaluated only in case DCM_READ_FAILED is returned. 
    Return code 
    Dcm_ReturnReadMemory DCM_READ_OK: read was successful 
    Type 
    DCM_READ_FAILED: read was not successful 
    DCM_READ_PENDING: read is not yet finished 
    DCM_READ_FORCE_RCRRP: enforce RCR-RP transmission (vendor 
    extension) 
    Functional Description 
    The Dcm_ReadMemory callout is used to request memory data identified by the parameter 
    memoryAddress and memorySize from the UDS request message. This service is needed for the 
    implementation of UDS services:  

    ReadMemoryByAddress ($23) 

    ReadDataByIdentifier ($22) (in case of Dynamical DID defined by memory address) 

    ReadDataByPeriodicIdentifier ($2A) (in case of Dynamical DID defined by memory address) 
    Particularities and Limitations 
    >  ServiceID = 0x26 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-47   Dcm_ReadMemory() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    137 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
    6.5.1.7 
    Dcm_WriteMemory() 
    Prototype 
    Dcm_ReturnWriteMemoryType Dcm_WriteMemory ( Dcm_OpStatusType OpStatus, uint8 
    MemoryIdentifier, uint32 MemoryAddress, uint32 MemorySize, uint8* MemoryData[, 
    Dcm_NegativeResponseCodeType* ErrorCode] ) 
    Parameter 
    OpStatus 
    DCM_INITIAL: All In-parameters are valid. 
    DCM_PENDING: All parameters are still valid. This is the subsequent function 
    calls after DCM_E_PENDING has been returned. 
    DCM_CANCEL: All In-parameters are still valid, but since this call is a final 
    one it must be used to finalize any pending activities only. 
    DCM_FORCE_RCRRP_OK: (Vendor extension) The enforced RCR-RP 
    transmission has finished with success. 
    DCM_FORCE_RCRRP_NOT_OK: (Vendor extension) The enforced RCR-RP 
    transmission has failed. 
    MemoryIdentifier 
    MemoryIdentifier  Identifier of the Memory Block (e.g. used if memory section 
    distinguishing is needed) 
    Note: If it's not used this parameter shall be set to 0. 
     
    MemoryAddress 
    Starting address of server memory where the data is to be written. 
    MemorySize 
    Number of bytes in the MemoryData 
    MemoryData 
    Data to be written (Points to the diagnostic buffer in DCM). 
    ErrorCode 
    Optional parameter. Exists only in AR 4.2.2 or later enabled DCMs. 
    If written by the application, a specific NRC will be sent back. This NRC is 
    evaluated only in case DCM_WRITE_FAILED is returned. 
    Return code 
    Dcm_ReturnWriteMemor DCM_WRITE_OK: write was successful 
    yType 
    DCM_WRITE_FAILED: write was not successful 
    DCM_WRITE_PENDING: write is not yet finished 
    DCM_WRITE_FORCE_RCRRP: enforce RCR-RP transmission (vendor 
    extension) 
    Functional Description 
    The Dcm_WriteMemory callout is used to write memory data identified by the parameter memoryAddress 
    and memorySize. This service is needed for the implementation of UDS services : 

    WriteMemoryByAddress ($3D) 
    Particularities and Limitations 
    >  ServiceID = 0x27 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-48   Dcm_WriteMemory() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    138 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.8 
    <Diagnostic Session Change Notification Callback> 
    Prototype 
    void <Diagnostic Session Change Callback> (Dcm_SesCtrlType formerSesCtrlId, 
    Dcm_SesCtrlType newSesCtrlId) 
    Parameter 
    formerSesCtrlId 
    Specifies the former diagnostic session ID (transition’s source state) 
    newSesCtrlId 
    Specifies the new diagnostic session ID (transition’s target state) 
    Return code 


    Functional Description 
    Any configured function of this kind will be called at a diagnostic session state transition. 
    Note:  
    The function argument values have the same definition as the ones returned by the API 
    Dcm_GetSesCtrlType(). 
     
    Please refer also to 9.23 How to Know When the Diagnostic Session Changes for more details on how to 
    configure such a callback and when it will be called. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-49   < Diagnostic Session Change Notification Callback > 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    139 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.9 
    <Security Access Change Notification Callback> 
    Prototype 
    void <Security Access Change Callback> (Dcm_SecLevelType formerSecLevelId, 
    Dcm_SecLevelType newSecLevelId) 
    Parameter 
    formerSecLevelId 
    Specifies the former security access level ID (transition’s source state) 
    newSecLevelId 
    Specifies the new security access level ID (transition’s target state) 
    Return code 


    Functional Description 
    Any configured function of this kind will be called at a security access level state transition. 
    Note:  
    The function argument values have the same definition as the ones returned by the API 
    Dcm_GetSecurityLevel(). 
     
    Please refer also to 9.16.2 Calling a Function Implemented Within a CDD Module for more details on how 
    to configure such a callback and when it will be called. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-50   <Security Access Change Notification Callback> 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    140 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    6.5.1.10  Dcm_GetRecoveryStates() 
    Prototype 
    Std_ReturnType Dcm_GetRecoveryStates (Dcm_RecoveryInfoType* RecoveryInfo) 
    Parameter 
    RecoveryInfo 
    Contains all the information that has to be recovered. 
    Return code 
    Std_ReturnType 
    E_OK: Recovery info is available and valid, process it. 
    DCM_E_PENDING: Recovery info not yet available, call again. 
    E_NOT_OK: No information to be recovered or result reading failed. DCM will 
    continue with the default initialized states. 
    Functional Description 
    This API will be called by DCM within the firsDcm_MainFunction() call right after the call of Dcm_Init(). 
    For details on the usage of this API, please refer chapter 9.27 How to Recover DCM State Context on ECU 
    Reset/ Power On
    .
     
     
    Note:  

    If no recovery of any state is needed (default startup of DCM), then the return value shall always be 
    E_NOT_OK. 

    Before this API is called, DCM will lock any external connections until the result is processed. This 
    is required in order to be able to switch into a consistent state without any influence from outside. 

    For details on the recovered information, please refer the data type definition: 
    Dcm_RecoveryInfoType. 
    Particularities and Limitations 
    >  ServiceID = 0xA5 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-51   Dcm_GetRecoveryStates() 
     
     
     
    Caution 
    It is not intended to use Dcm_GetRecoveryStates() as a standalone API. The data it 
      transfers depends on the DCM implementation version. For optimization reasons, the 
    data structure uses internal data representation and not any official DCM AR APIs (e.g. 
    macros for session and security access, or communication channel SNVs). Thus, it 
    shall be used only if the information provider (Dcm_ProvideRecoveryStates()) has been 
    used. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    141 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.11  Dcm_FilterDidLookUpResult 
    Prototype 
    Std_ReturnType Dcm_FilterDidLookUpResult(Dcm_OpStatusType OpStatus, uint16 Did, 
    Dcm_DidOpType DidOperation) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    Did 
    Data Identifier to be filtered. 
    DidOperation 
    DCM_DID_OP_READ: Available for services 0x22, 0x2A. 
    DCM_DID_OP_WRITE: Available for service 0x2E. 
    DCM_DID_OP_IO: Available for service 0x2F. 
    DCM_DID_OP_SCALINGINFO: Available for service 0x24. 
    DCM_DID_OP_DEFINE: Available for service 0x2C. 
    Return code 
    Std_ReturnType 
    E_OK: The DID is (still) active. 
    DCM_E_PENDING: The DID validation needs more time. Call this API again.  
    E_NOT_OK: The DID is not active.  
    Functional Description 
    This API will be called by DCM to check whether a particular combination of a DID and a DID operation is 
    still supported. The return of that API is E_OK if that DID is active for the provided DID operation. This API 
    is used in the filtering feature described i9.29 How to Handle Multiple Diagnostic Service Variants. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-52   Dcm_FilterDidLookUpResult  
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    142 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.1.12  Dcm_FilterRidLookUpResult 
    Prototype 
    Std_ReturnType Dcm_FilterRidLookUpResult(Dcm_OpStatusType OpStatus, uint16 Rid) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    Rid 
    Routine Identifier to be filtered. 
    Return code 
    Std_ReturnType 
    E_OK: The RID is (still) active. 
    DCM_E_PENDING: The RID validation needs more time. Call this API again.  
    E_NOT_OK: The RID is not active. 
    Functional Description 
    This API will be called by DCM to check whether a particular RID is still supported. The return of that API is 
    E_OK if that RID is active. This API is used in the filtering feature illustrated i9.29 How to Handle Multiple 
    Diagnostic Service Variants
    .
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-53   Dcm_FilterRidLookUpResult 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    143 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2 
    Required Port Operation Functions 
    6.5.2.1 
    ConditionCheckRead() 
    Prototype 
    Std_ReturnType ConditionCheckRead ( Dcm_OpStatusType OpStatus, 
    Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application, if the conditions to read a data element are 
    correct. 
     
    Particularities and Limitations 
    >  ServiceID = 0x37 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    Table 6-54   ConditionCheckRead() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    144 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.2 
    ReadData() (asynchronous) 
    Prototype 
    Std_ReturnType ReadData ( Dcm_OpStatusType OpStatus, uint8* Data ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    Data 
    Buffer where the read data shall be copied. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to get a data value of a DID/PID if 
    DcmDspDataUsePort is set to USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
     
    Particularities and Limitations 
    >  ServiceID = 0x3B 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-55   ReadData() (asynchronous) 
     
    6.5.2.3 
    ReadData() (synchronous) 
    Prototype 
    Std_ReturnType ReadData ( uint8* Data ) 
    Parameter 
    Data 
    Buffer where the read data shall be copied. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    E_NOT_OK: The operation has failed. The DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to get a data value of a DID/PID if 
    DcmDspDataUsePort is set to USE_DATA_SYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
     
    Particularities and Limitations 
    >  ServiceID = 0x34 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Table 6-56   ReadData() (synchronous) 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    145 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
    6.5.2.4 
    ReadDataLength() 
    Prototype 
    Std_ReturnType ReadDataLength (Dcm_OpStatusType OpStatus, uint16* DataLength ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    DataLength 
    Length of the data to be read. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to return the data length of a data element. 
     
    Note: This callout type is available only if the DID has dynamic length. 
    Particularities and Limitations 
    >  ServiceID = 0x36 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    Table 6-57   ReadDataLength() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    146 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.5 
    WriteData() (dynamic length) 
    Prototype 
    Std_ReturnType WriteData ( uint8* Data, uint16 DataLength, Dcm_OpStatusType 
    OpStatus, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    Data 
    Buffer containing the data to be written. 
    DataLength 
    Length of the data to be written. 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to set the data value of a DID. 
     
    Note: This callout type is available only if the DID has dynamic length. 
    Particularities and Limitations 
    >  ServiceID = 0x3E 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    Table 6-58   WriteData() (dynamic length) 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    147 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.6 
    WriteData() (static length) 
    Prototype 
    Std_ReturnType WriteData ( uint8* Data, Dcm_OpStatusType OpStatus, 
    Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    Data 
    Buffer containing the data to be written. 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to set the data value of a DID. 
     
    Note: This callout type is available only if the DID has constant length. 
    Particularities and Limitations 
    >  ServiceID = 0x35 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    Table 6-59   WriteData() (static length) 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    148 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.7 
    ReturnControlToECU() 
    Prototype 
    Std_ReturnType ReturnControlToECU ( Dcm_OpStatusType OpStatus, <ControlMaskType> 
    ControlMask, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    ControlMask 
    Contains/points to the CEMR from request or equals 0xF..F (all signals) on 
    lost session/security permissions. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK). 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: This return value is not allowed to be used! 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to return control of an IOControl back to the 
    ECU. 
    For details about the usage of the ControlMask parameter and the possible ControlMaskTypes, please 
    refer to chapter 5.22.3 Implementation Aspects of InputOutputControlByIdentifier ($2F). 
    Particularities and Limitations 
    >  ServiceID = 0x39 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    >  The DCM_E_PENDING return value is not allowed to be used due to the fact that this operation shall 
    always be executed synchronously. Refer to 5.22.3 Implementation Aspects of 
    InputOutputControlByIdentifier ($2F) for details. 
    >  The “ControlMask” parameter is only available if DcmDspDidControlMask is set to 
    “DCM_CONTROLMASK_EXTERNAL”. 
    Table 6-60   ReturnControlToECU() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    149 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.8 
    ResetToDefault() 
    Prototype 
    Std_ReturnType ResetToDefault ( Dcm_OpStatusType OpStatus, <ControlMaskType> 
    ControlMask, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    ControlMask 
    Contains/points to the CEMR from request. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to reset an IOControl to default value. 
    For details about the usage of the ControlMask parameter and the possible ControlMaskTypes, please 
    refer to chapter 5.22.3 Implementation Aspects of InputOutputControlByIdentifier ($2F). 
    Particularities and Limitations 
    >  ServiceID = 0x3C 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    >  The “ControlMask” parameter is only available if DcmDspDidControlMask is set to 
    “DCM_CONTROLMASK_EXTERNAL”. 
    Table 6-61   ResetToDefault() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    150 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.9 
    FreezeCurrentState() 
    Prototype 
    Std_ReturnType FreezeCurrentState ( Dcm_OpStatusType OpStatus, <ControlMaskType> 
    ControlMask, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    ControlMask 
    Contains/points to the CEMR from request. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to freeze the current state of an IOControl. 
    For details about the usage of the ControlMask parameter and the possible ControlMaskTypes, please 
    refer to chapter 5.22.3 Implementation Aspects of InputOutputControlByIdentifier ($2F). 
    Particularities and Limitations 
    ServiceID = 0x3A 
    >  Not Reentrant 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    >  The “ControlMask” parameter is only available if DcmDspDidControlMask is set to 
    “DCM_CONTROLMASK_EXTERNAL”. 
    Table 6-62   FreezeCurrentState() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    151 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.10  ShortTermAdjustment() 
    Prototype 
    Std_ReturnType ShortTermAdjustment ( uint8* ControlOptionRecord, 
    Dcm_OpStatusType OpStatus, <ControlMaskType> ControlMask, 
    Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    ControlOptionRecord  Control option parameter for the adjustment request. 
    OpStatus 
    Status of the current operation. 
    ControlMask 
    Contains/points to the CEMR from request. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to adjust the IO signal. 
    For details about the usage of the ControlMask parameter and the possible ControlMaskTypes, please 
    refer to chapter 5.22.3 Implementation Aspects of InputOutputControlByIdentifier ($2F). 
    Particularities and Limitations 
    >  ServiceID = 0x3D 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    >  The “ControlMask” parameter is only available if DcmDspDidControlMask is set to 
    “DCM_CONTROLMASK_EXTERNAL”. 
    Table 6-63   ShortTermAdjustment() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    152 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.11  GetScalingInformation() 
    Prototype 
    Std_ReturnType GetScalingInformation(Dcm_OpStatusType OpStatus, uint8* 
    ScalingInfo, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    ScalingInfo 
    Buffer where the read scaling info data shall be copied. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to read the scaling information of the 
    corresponding data signal. 
    Particularities and Limitations 
    >  ServiceID = 0x38 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  The “OpStatus” parameter is only available if DcmDspDataUsePort is set to 
    USE_DATA_ASYNCH_CLIENT_SERVER/ USE_DATA_ASYNCH_FNC. 
    Table 6-64   GetScalingInformation() 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    153 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.12  Start() 
    Prototype 
    Std_ReturnType Start ( [<DataType> <ReqSignalName>,] Dcm_OpStatusType OpStatus, 
                          [<DataType> <ResSignalName>,] [uint16(*) DataLength,]  
                          Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    <ReqSignalName> 
    Optional list of parameters. 
    Exists only if at least one request signal is defined in the configuration for this 
    RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    OpStatus 
    Status of the current operation. 
    <ResSignalName> 
    Optional list of parameters. 
    Exists only if at least one response signal is defined in the configuration for 
    this RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    DataLength 
    Optional parameter. Exists only if either the last request or response signal 
    has dynamic length. 
    As IN parameter contains the current request length (for dynamic length RID 
    requests). 
    As OUT parameter shall return the actual response length (for dynamic length 
    RID responses). 
    The DCM will ignore the returned value on RIDs with static response length. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    DCM_E_FORCE_RCRRP: Forces a RCR-RP response. The service port will 
    be called again once the RCR-RP response is sent. The OpStatus parameter 
    will contain the transmission result. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to start a RID execution. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is asynchronous. 
    Table 6-65   Start() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    154 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.13  Stop() 
    Prototype 
    Std_ReturnType Stop ( [<DataType> <ReqSignalName>,] Dcm_OpStatusType OpStatus, 
                         [<DataType> <ResSignalName>,] [uint16(*) DataLength,]  
                         Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    <ReqSignalName> 
    Optional list of parameters. 
    Exists only if at least one request signal is defined in the configuration for this 
    RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    OpStatus 
    Status of the current operation. 
    <ResSignalName> 
    Optional list of parameters. 
    Exists only if at least one response signal is defined in the configuration for 
    this RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    DataLength 
    Optional parameter. Exists only if either the last request or response signal 
    has dynamic length. 
    As IN parameter contains the current request length (for dynamic length RID 
    requests). 
    As OUT parameter shall return the actual response length (for dynamic length 
    RID responses). 
    The DCM will ignore the returned value on RIDs with static response length. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    DCM_E_FORCE_RCRRP: Forces a RCR-RP response. The service port will 
    be called again once the RCR-RP response is sent. The OpStatus parameter 
    will contain the transmission result. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to stop an already started RID execution. 
    Note: The DCM will call this function even if the concrete RID was not started yet. The application shall take 
    care about correct sequence execution. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  Not Reentrant 
    >  This function is asynchronous. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    155 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 6-66   Stop() 
    6.5.2.14  RequestResults() 
    Prototype 
    Std_ReturnType RequestResults (  
                          [<DataType> <ReqSignalName>,] Dcm_OpStatusType OpStatus, 
                          [<DataType> <ResSignalName>,] [uint16(*) DataLength,]  
                          Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    <ReqSignalName> 
    Optional list of parameters. 
    Exists only if at least one request signal is defined in the configuration for this 
    RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    OpStatus 
    Status of the current operation. 
    <ResSignalName> 
    Optional list of parameters. 
    Exists only if at least one response signal is defined in the configuration for 
    this RID operation. 
    For each signal there will be a dedicated function parameter of the data type 
    derived from the configuration. The parameter name is the same as the ECUC 
    data container name. 
    DataLength 
    Optional parameter. Exists only if either the last request or response signal 
    has dynamic length. 
    As IN parameter contains the current request length (for dynamic length RID 
    requests). 
    As OUT parameter shall return the actual response length (for dynamic length 
    RID responses). 
    The DCM will ignore the returned value on RIDs with static response length. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    DCM_E_FORCE_RCRRP: Forces a RCR-RP response. The service port will 
    be called again once the RCR-RP response is sent. The OpStatus parameter 
    will contain the transmission result. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to read the routine result of a stopped RID 
    execution. 
    Particularities and Limitations 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    156 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  ServiceID = N/A 
    >  Not Reentrant 
    >  This function is asynchronous. 
    Table 6-67   RequestResults() 
     
    6.5.2.15  GetSeed() (with SADR) 
    Prototype 
    Std_ReturnType GetSeed (uint8* SecurityAccessDataRecord, Dcm_OpStatusType 
    OpStatus, uint8* Seed, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    Seed 
    Points to the response seed data. 
    SecurityAccessDataRe Points to the request data. If the current security access level does not have 
    cord 
    any request data, the pointer is still valid (points behind the sub-function byte). 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to provide a security level specific seed. 
     
    Particularities and Limitations 
    >  ServiceID = 0x44 
    >  Not Reentrant 
    >  This function is asynchronous. 
    Table 6-68   GetSeed() (with SADR) 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    157 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.16  GetSeed() (without SADR) 
    Prototype 
    Std_ReturnType GetSeed (Dcm_OpStatusType OpStatus, uint8* Seed, 
    Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    Seed 
    Points to the response seed data. 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to provide a security level specific seed. 
     
    Particularities and Limitations 
    >  ServiceID = 0x45 
    >  Not Reentrant 
    >  This function is asynchronous. 
    Table 6-69   GetSeed() (without SADR) 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    158 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.17  CompareKey() 
    Prototype 
    Std_ReturnType CompareKey ( uint8* Key, Dcm_OpStatusType OpStatus [, 
    Dcm_NegativeResponseCodeType* ErrorCode]) 
    Parameter 
    Key 
    Points to the requested key. 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    Optional parameter. Exists only in AR 4.2.1 or later enabled DCMs 
    If written by the application, a specific NRC will be sent back. This NRC is 
    evaluated only in case E_NOT_OK is returned. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    DCM_E_COMPARE_KEY_FAILED: The received key is not a valid one. NRC 
    0x35/0x36 will be send accordingly. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set. Otherwise 
    the DCM sends NRC 0x35/0x36 as for return value 
    DCM_E_COMPARE_KEY_FAILED 
    Functional Description 
    This function is a request from the DCM to the application to verify the requested security access level 
    specific key. 
     
    Particularities and Limitations 
    >  ServiceID = 0x47 
    >  Not Reentrant 
    >  This function is asynchronous. 
    Table 6-70   CompareKey() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    159 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.18  Indication() 
    Prototype 
    Std_ReturnType Indication ( uint8 SID, uint8* RequestData, uint16 DataSize, 
    uint8 ReqType, uint16 SourceAddress, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    SID 
    Contains the diagnostic service Id. 
    RequestData 
    Points to the request data. Points behind the service Id byte. 
    DataSize 
    Specifies the requested data length (without the SID byte). 
    ReqType 
    Specifies the diagnostic request type: 0 - physical request, 1 - functional 
    request. 
    SourceAddress 
    Contains the diagnostic client source address. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_REQUEST_NOT_ACCEPTED: The diagnostic service shall not be 
    processed. No response will be sent. 
    E_NOT_OK: The operation has failed. A concrete NRC shall be set, otherwise 
    the DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to validate the received diagnostic service, 
    additionally to the DCM internal validation. 
     
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  Not Reentrant 
    >  This function is synchronous. 
    Table 6-71   Indication() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    160 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.19  Confirmation() 
    Prototype 
    Std_ReturnType Confirmation ( uint8 SID, uint8 ReqType, uint16 SourceAddress, 
    Dcm_ConfirmationStatusType ConfirmationStatus ) 
    Parameter 
    SID 
    Contains the diagnostic service Id. 
    ReqType 
    Specifies the diagnostic request type: 0 - physical request, 1 - functional 
    request. 
    SourceAddress 
    Contains the diagnostic client source address. 
    ConfirmationStatus 
    Contains the response transmission resp. diagnostic response type. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished. 
    E_NOT_OK: The operation has failed. Has no effect on DCM. 
    Functional Description 
    This function is a notification from the DCM to the application that a diagnostic service processing is 
    finished. 
     
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  Not Reentrant 
    >  This function is synchronous. 
    Table 6-72   Confirmation() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    161 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.20  GetDTRValue() 
    Prototype 
    Std_ReturnType GetDTRValue (Dcm_OpStatusType OpStatus, uint16* Testval, uint16* 
    MinLimit, uint16* MaxLimit, DTRStatusType * Status) 
    Parameter 
    OpStatus 
    Status of the current operation. Since the operation is synchronous, only 
    possible value is DCM_INITIAL. 
    Testval 
    Returns the current test value. 
    MinLimit 
    Returns the minimum limit. 
    MaxLimit 
    Returns the maximum limit. 
    Status 
    Returns the TID status:  

    DCM_DTRSTATUS_VISIBLE: all returned values are valid. 

    DCM_DTRSTATUS_INVISIBLE: all returned values are invalid. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    E_NOT_OK: The operation has failed, DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to report the corresponding MID test data. If the 
    data is currently not available the Status parameter shall be set to INVISIBLE. DCM will send to the tester 
    zero values. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is synchronous. 
    Table 6-73   GetDTRValue() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    162 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.21  RequestControl() 
    Prototype 
    Std_ReturnType RequestControl ( uint8* OutBuffer, uint8* InBuffer) 
    Parameter 
    OutBuffer 
    Points to the response routine control data. If the current TID does not have 
    any data, the pointer is still valid (points behind the TID parameter). 
    InBuffer 
    Points to the request routine control data. If the current TID does not have any 
    data, the pointer is still valid (points behind the TID parameter). 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    E_NOT_OK: The operation has failed, DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to start a TID execution. 
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is synchronous. 
    Table 6-74   RequestControl() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    163 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.22  GetInfotypeValueData() 
    Prototype 
    Std_ReturnType GetInfotypeValueData (Dcm_OpStatusType OpStatus, uint8* 
    DataValueBuffer [, uint8* DataValueBufferSize]) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    DataValueBuffer 
    Points to the response of the VID data. 
    DataValueBufferSize  Optional parameter. Exists only in AR 4.2.2 or later enabled DCMs. 
    The input value is the total/maximum size of the VID data (incl. NODI) in 
    bytes, configured in DCMs ECUC file (refer to 5.8.4). 
    The output value is the current size of the VID data (incl. NODI) in bytes, 
    returned by the application.  
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed, DCM sends NRC 0x22. 
    Functional Description 
    This function is a request from the DCM to the application to read the corresponding vehicle information. As 
    long as the data is temporarily not available, the DCM_E_PENDING code shall be returned. Once the data 
    is available, the E_OK shall be used to acknowledge that. 
     
    The returned data size (via DataValueBufferSize) shall always be less or equal to the value passed by 
    DCM as input. 
     
    Refer to chapter 9.31 How to Enable Support of OBD VIDs with Dynamic Length for details. 
    Particularities and Limitations 
    >  ServiceID = 0x60 (introduced first with AR 4.3.0 DCM SWS) 
    >  This function is asynchronous. 
    Table 6-75   GetInfotypeValueData() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    164 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.23  StartProtocol() 
    Prototype 
    Std_ReturnType StartProtocol (Dcm_ProtocolType ProtocolID) 
    Parameter 
    ProtocolID 
    Specifies the protocol ID of the new protocol to be started. 
    Return code 
    Std_ReturnType 
    E_OK: The protocol switch is allowed. 
    DCM_E_PROTOCOL_NOT_ALLOWED: The old protocol shall not be stopped 
    and the new one is not accepted, DCM sends NRC 0x22 to the new request. 
    E_NOT_OK: Same as DCM_E_PROTOCOL_NOT_ALLOWED. 
    Functional Description 
    This function is a request from the DCM to the application to get permission for switching to a new protocol. 
    It is called each time a request from a diagnostic client belonging to a protocol other than the currently 
    active one is received or for the very first diagnostic request (i.e. switches from no active protocol to any 
    other supported one).  
    Particularities and Limitations 
    >  ServiceID = N/A 
    >  This function is synchronous. 
    Table 6-76   StartProtocol() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    165 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.24  IsDidAvailable()  
    Prototype 
    Std_ReturnType IsDidAvailable ( uint16 DID, Dcm_OpStatusType OpStatus, 
    Dcm_DidSupportedType* supported) 
    Parameter 
    DID 
    The DID to be checked for active in the current range. 
    OpStatus 
    Status of the current operation. 
    supported 
    Returns the information whether the DID is a supported one: 
    DCM_DID_SUPPORTED: requested DID is a valid one; 
    DCM_DID_NOT_SUPPORTED: requested DID is not a valid one; 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The DCM will treat the DID as 
    unsupported one. 
    Functional Description 
    This function is a request from the DCM to the application to get information whether the requested DID, 
    from a supported DID range is really a valid one or not.  
    Note: This operation is only available if the corresponding DID range has been specified to have gaps (i.e. 
    not all DIDs within the range are valid ones). 
    Particularities and Limitations 
    >  ServiceID = 0x3F 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-77   IsDidAvailable () 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    166 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.25  ReadDidData()  
    Prototype 
    Std_ReturnType ReadDidData ( uint16 DID, uint8* Data, Dcm_OpStatusType OpStatus, 
    uint16* DataLength, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    DID 
    The DID which data will be read. 
    Data 
    Buffer where the read data shall be copied. 
    OpStatus 
    Status of the current operation. 
    DataLength 
    Actual length of the read data. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The DCM sends NRC 0x22, if 
    ErrorCode is not set. 
    Functional Description 
    This function is a request from the DCM to the application to get the data of a concrete DID within a DID 
    range.  
    Particularities and Limitations 
    >  ServiceID = 0x40 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-78   ReadDidData() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    167 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.26  WriteDidData()  
    Prototype 
    Std_ReturnType WriteDidData ( uint16 DID, uint8* Data, Dcm_OpStatusType 
    OpStatus, uint16* DataLength, Dcm_NegativeResponseCodeType* ErrorCode ) 
    Parameter 
    DID 
    The DID which data will be written. 
    Data 
    Buffer where the requested data shall be copied from. 
    OpStatus 
    Status of the current operation. 
    DataLength 
    Actual length of the data to be written. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The DCM sends NRC 0x22, if 
    ErrorCode is not set. 
    Functional Description 
    This function is a request from the DCM to the application to write the requested data of a concrete DID 
    within a DID range.  
    Particularities and Limitations 
    >  ServiceID = 0x41 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-79   WriteDidData() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    168 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.27  GetSecurityAttemptCounter() 
    Prototype 
    Std_ReturnType GetSecurityAttemptCounter(Dcm_OpStatusType OpStatus, uint8* 
    AttemptCounter) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    AttemptCounter 
    Contains the stored attempt-counter value. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed. The counter value will be assumed to 
    be zero. Note: The delay-timer could be started, depending on the 
    configuration (see below). 
    Functional Description 
    Once DCM is initialized, DCM requests this function per security level to get the stored attempt-counter 
    value prior last power-down/reset event. 
     
    Particularities and Limitations 
    >  ServiceID = 0x59 
    >  Not Reentrant 
    >  This function is asynchronous. 
    >  Exists for a certain security level only if the security row „DcmDspSecurityAttemptCounterEnabled” 
    specific parameter is enabled and the security level supports brute-force-attack prevention (i.e. delay 
    counter/timer). 
    Table 6-80   GetSecurityAttemptCounter () 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    169 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.28  SetSecurityAttemptCounter() 
    Prototype 
    Std_ReturnType SetSecurityAttemptCounter(Dcm_OpStatusType OpStatus, uint8 
    AttemptCounter) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    AttemptCounter 
    Contains the current attempt-counter value. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished 
    DCM_E_PENDING: The operation is not yet finished. 
    E_NOT_OK: The operation has failed.  
    Functional Description 
    Each time the corresponding security level counter value is changes, DCM will first notify the application 
    calling this API to store the new value prior giving any result to the diagnostic client. 
     
    Note:  
    DCM cannot provide any failed-write counter behavior replacement. It is up to the application to provide at 
    nexGetSecurityAttemptCounter() call an appropriate counter value, resp. just E_NOT_OK. If this API fails 
    to store the current counter value, the NRC sent back is still one of the appropriate ones 0x35 or 0x36. 
    Particularities and Limitations 
    >  ServiceID = 0x5A 
    >  Not Reentrant 
    >  This function is asynchronous. 
    >  Exists for a certain security level only if the security row „DcmDspSecurityAttemptCounterEnabled” 
    specific parameter is enabled and the security level supports brute-force-attack prevention (i.e. delay 
    counter/timer). 
    Table 6-81   SetSecurityAttemptCounter () 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    170 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.5.2.29  ReadData() (paged-data-reading) 
    Prototype 
    Std_ReturnType ReadData ( Dcm_OpStatusType OpStatus, uint8* Data, uint16* 
    DataLength ) 
    Parameter 
    OpStatus 
    Status of the current operation. 
    Data 
    Buffer where the read data shall be copied. 
    DataLength 
    As IN parameter contains the currently available buffer size. 
    As OUT parameter shall return the actual data chunk length. 
    Return code 
    Std_ReturnType 
    E_OK: The operation is finished, all data chunks are copied 
    DCM_E_PENDING: Current data chunk read operation is not yet finished. 
    E_NOT_OK: The operation has failed.  
    DCM_E_BUFFERTOOLOW: There was more data to be copied, but the 
    provided buffer was not big enough to fit all of them. The DataLength 
    parameter contains the amount of currently copied data. 
    Functional Description 
    This function is a request from the DCM to the application to get a data value of a DID if 
    DcmDspDataUsePort is set to USE_PAGED_DATA_ASYNCH_CLIENT_SERVER/ 
    USE_PAGED_DATA_ASYNCH_FNC. 
    For details on this API usage, please refer to chapter 9.24 How to Save RAM using Paged-Buffer for Large 
    DIDs
    .
     
    Particularities and Limitations 
    >  ServiceID = 0xA3 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    Table 6-82   ReadData() (paged-data-reading) 
     
    6.6  Service Ports  
    6.6.1 
    Client-Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    6.6.1.1  Provide Ports on DCM Side 
    At  the  Provide  Ports  of  the  DCM  the  API  functions  described  in  6.2  are  available  as 
    Runnable Entities. The Runnable Entities are invoked via Operations. The mapping from a 
    SWC client call to an Operation is performed by the RTE. In this mapping the RTE adds 
    Port Defined Argument Values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  DCM  and  the 
    Operations defined for the Provide Ports, the API functions related to the Operations and 
    the Port Defined Argument Values to be added by the RTE. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    171 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
    6.6.1.1.1 
    DCMServices 
    Operation 
    API Function 
    Arguments 
    GetActiveProtocol 
    Dcm_GetActiveProtocol() 
    OUT Dcm_ProtocolType 
    ActiveProtocol, ERR{E_OK} 
    GetSesCtrlType 
    Dcm_GetSesCtrlType() 
    OUT Dcm_SesCtrlType SesCtrlType, 
    ERR{E_OK} 
    GetSecurityLevel 
    Dcm_GetSecurityLevel() 
    OUT Dcm_SecLevelType SecLevel, 
    ERR{E_OK} 
    ResetToDefaultSession 
    Dcm_ResetToDefaultSession() 
    ERR{E_OK} 
    GetSecurityLevelFixedBytes  Dcm_GetSecurityLevelFixedBytes()  IN Dcm_SecLevelType secLevel,  
    OUT uint8 fixedBytes,  
    INOUT uint8 bufferSize 
    ERR{E_NOT_OK, 
    DCM_E_BUFFERTOOLOW} 
    SetActiveDiagnostic 
    Dcm_SetActiveDiagnostic() 
    boolean Active, 
    ERR{E_OK} 
    GetRequestKind 
    Dcm_GetRequestKind() 
    IN uint16 TesterSourceAddress, 
    OUT Dcm_RequestKindType 
    RequestKind, 
    ERR{E_NOT_OK} 
    VsgSetSingle 
    Dcm_VsgSetSingle 
    IN Dcm_VsgIdentifierType VsgId, 
    IN Dcm_VsgStateType State, 
    ERR{E_NOT_OK} 
    VsgSetMultiple 
    Dcm_VsgSetMultiple 
    IN Dcm_VsgIdentifierType* VsgIdList, 
    IN uint16 VsgListSize, 
    IN Dcm_VsgStateType State, 
    ERR{E_NOT_OK} 
    VsgIsActive 
    Dcm_VsgIsActive 
    IN Dcm_VsgIdentifierType VsgId, 
    OUT Dcm_VsgStateType State, 
    ERR{E_NOT_OK} 
    VsgIsActiveAnyOf 
    Dcm_VsgIsActiveAnyOf 
    IN Dcm_VsgIdentifierType* VsgIdList, 
    IN uint16 VsgListSize, 
    OUT Dcm_VsgStateType State, 
    ERR{E_NOT_OK} 
    Table 6-83   DCMServices 
    6.6.1.2  Require Ports on DCM Side 
    At its Require Ports the DCM calls Operations. These Operations have to be provided by 
    the  SWCs  by  means  of  Runnable  Entities.  These  Runnable  Entities  implement  the 
    callback functions expected by the DCM. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    172 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    The following sub-chapters present the Require Ports defined for the DCM, the Operations 
    that are called from the DCM and the related Notifications, which are described in chapter 
    6.4.4. 
     
    6.6.1.2.1 
    DataServices_<DataName> 
    Operation 
    Callout 
    ConditionCheckRead() 
    ReadData() (synchronous) 
    ReadData() (asynchronous) 

    ReadData() (paged-data-reading) 

    ReadDataLength() 
    WriteData() (static length) 
    Rte_Call_DataServices_<DataName>_<Operation> 
    WriteData() (dynamic length) 
     
    ReturnControlToECU() 
    ResetToDefault() 
    FreezeCurrentState() 
    ShortTermAdjustment() 
    GetScalingInformation() 
    Table 6-84   DataServices_<DataName> 
     
    6.6.1.2.2 
    RoutineServices_<RoutineName> 
    Operation 
    Callout 
    Start() 
    Rte_Call_RoutineServices_<RoutineName>_<Operation> 
    Stop() 
     
    RequestResults() 
    Table 6-85   RoutineServices_<RoutineName> 
     
     
    6.6.1.2.3 
    SecurityAccess_<SecurityLevelName> 
    Operation 
    Callout 
    GetSeed() (with SADR) 
    GetSeed() (without SADR) 
    CompareKey() 
    Rte_Call_SecurityAccess_<SecurityLevelName>_<Operation> 
     
    GetSecurityAttemptCounter() 
    SetSecurityAttemptCounter() 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    173 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Table 6-86   SecurityAccess_<SecurityLevelName> 
     
    6.6.1.2.4 
    ServiceRequestManufacturerNotification_<SWC> 
    Operation 
    Callout 
    Indication() 
    Rte_Call_ServiceRequestManufacturerNotification_<SWC>_<Operation> 
    Confirmation() 
    Table 6-87   ServiceRequestManufacturerNotification_<SWC> 
     
    6.6.1.2.5 
    ServiceRequestSupplierNotification_<SWC> 
    Operation 
    Callout 
    Indication() 
    Rte_Call_ServiceRequestSupplierNotification_<SWC>_<Operation> 
    Confirmation() 
    Table 6-88   ServiceRequestSupplierNotification_<SWC> 
     
    6.6.1.2.6 
    DtrServices_<MIDName>_<TIDName> 
    Operation 
    Callout 
    GetDTRValue() 
    Rte_Call_DtrServices_<MIDName>_<TIDName>_<Operation> 
    Table 6-89   DtrServices_<MIDName>_<TIDName> 
     
    6.6.1.2.7 
    RequestControlServices_<TIDName> 
    Operation 
    Callout 
    RequestControl() 
    Rte_Call_RequestControlServices_<TIDName>_<Operation> 
    Table 6-90   RequestControlServices_<TIDName> 
     
    6.6.1.2.8 
    InfotypeServices_<VEHINFODATA> 
    Operation 
    Callout 
    GetInfotypeValueData() 
    Rte_Call_InfotypeServices_<VEHINFODATA>_<Operation> 
    Table 6-91   InfotypeServices_<VEHINFODATA> 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    174 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.6.1.2.9 
    CallbackDCMRequestServices_<SWC> 
    Operation 
    Callout 
    StartProtocol() 
    Rte_Call_CallbackDCMRequestServices_<SWC>_<Operation> 
    Table 6-92   CallbackDCMRequestServices_<SWC > 
     
    6.6.1.2.10  DataServices_DIDRange_<RangeName> 
    Operation 
    Callout 
    IsDidAvailable() 
    ReadDidData() 
    Rte_Call_DataServices_DIDRange_<RangeName>_<Operation> 
    WriteDidData() 
    Table 6-93   DataServices_DIDRange_<RangeName> 
     
    6.6.2 
    Managed Mode Declaration Groups 
    DCM is a mode manager of the following modes. 
    ModeDeclarationGroup 
    Description 
    DcmDiagnosticSessionControl 
    Represents the diagnostic sessions from the 
    DCM configuration. 
    DcmCommunicationControl_<ComM_CHANNEL For each ComM channel, there is a mode 
    _SNV> 
    declaration group that represents the 
    communication state of the channel.  
    DcmEcuReset 
    Represents the normal ECU reset modes. 
    DcmModeRapidPowerShutDown 
    Represents the extended ECU reset modes. 
    DcmControlDTCSetting 
    Represents the DTC setting state. 
    DcmSecurityAccess 
    Represents the security access level from the 
    DCM configuration. 
    Table 6-94   ModeDeclarationGroups managed by DCM 
     
    6.6.2.1 
    DcmDiagnosticSessionControl 
    Callout 
    Description 
    Rte_Switch_Dcm_DcmDiagnosticSessionControl_
    Called each time a session change occurs. This 
    DcmDiagnosticSessionControl 
    call is only a notification and has no effect on any 
    DCM diagnostic service processing. 
    Invoked by DiagnosticSessionControl ($10) or S3 
    timeout. 
    Table 6-95   DcmDiagnosticSessionControl callouts 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    175 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Mode 
    Description 
    DefaultSession 
    Represents the UDS Default session (initial 
    state). 
    ProgrammingSession 
    Represents the UDS Programming session. 
    ExtendedSession 
    Represents the UDS Extended session. 
    </Dcm/DcmConfigSet/DcmDsp/DcmDspSession/
    DcmDspSessionRow> container‘s short
    Any user defined session. 
    -name 
    Table 6-96   DcmDiagnosticSessionControl modes 
     
    6.6.2.2 
    DcmCommunicationControl_<ComM_CHANNEL_SNV> 
    Callout 
    Description 
    Rte_Switch_Dcm_DcmCommunicationControl_<C Called each time a communication state change 
    omMChannelSNV>_ 
    on the corresponding channel occurs. This call is 
    Dcm_DcmCommunicationControl_<ComMChannel only a notification and has no effect on any DCM 
    SNV> 
    diagnostic service processing. 
    Invoked by servicCommunicationControl ($28) 
    or DiagnosticSessionControl ($10) or S3 timeout. 
    Table 6-97   DcmCommunicationControl _<ComM_CHANNEL_SNV> callouts 
    Mode 
    Description 
    DCM_ENABLE_RX_TX_NORM 
    Reception and transmission of application 
    messages is enabled (initial state). 
    DCM_ENABLE_RX_DISABLE_TX_NORM 
    Reception of application messages is enabled 
    but their transmission is disabled. 
    DCM_DISABLE_RX_ENABLE_TX_NORM 
    Reception of application messages is disabled 
    but their transmission is enabled. 
    DCM_DISABLE_RX_TX_NORMAL 
    Reception and transmission of application 
    messages is disabled. 
    DCM_ENABLE_RX_TX_NM 
    Reception and transmission of network 
    management messages is enabled. 
    DCM_ENABLE_RX_DISABLE_TX_NM 
    Reception of network management messages 
    is enabled but their transmission is disabled. 
    DCM_DISABLE_RX_ENABLE_TX_NM 
    Reception of network management messages 
    is disabled but their transmission is enabled. 
    DCM_DISABLE_RX_TX_NM 
    Reception and transmission of network 
    management messages is disabled. 
    DCM_ENABLE_RX_TX_NORM_NM 
    Reception and transmission of application and 
    network management messages is enabled. 
    DCM_ENABLE_RX_DISABLE_TX_NORM_NM 
    Reception of application and network 
    management messages is enabled but their 
    transmission is disabled. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    176 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Mode 
    Description 
    DCM_DISABLE_RX_ENABLE_TX_NORM_NM 
    Reception of application and network 
    management messages is disabled but their 
    transmission is enabled. 
    DCM_DISABLE_RX_TX_NORM_NM 
    Reception and transmission of application and 
    network management messages is disabled. 
    Table 6-98   DcmCommunicationControl_<ComM_CHANNEL_SNV> modes 
    6.6.2.3 
    DcmEcuReset 
    Callout 
    Description 
    Rte_Switch_Dcm_DcmEcuReset_DcmEcuReset 
    Called each time a power down state change 
    occurs. This call is a notification but has effect 
    on the DCM diagnostic servicEcuReset ($11) 
    EcuReset ($11) 
    or DiagnosticSessionControl 
    ($10) 
    processing. 
    Invoked by EcuReset ($11) or 
    DiagnosticSessionControl ($10) 
    for bootloader 
    related sessions. 
    Rte_SwitchAck_Dcm_DcmEcuReset_DcmEcuReset  Called after the Switch API is called to get the 
    mode transition acknowledged prior continuing 
    with the EXECUTE mode switch. 
    Invoked by EcuReset ($11) or 
    DiagnosticSessionControl ($10) 
    for bootloader 
    related sessions 
    Table 6-99   DcmEcuReset callouts 
    Mode 
    Description 
    NONE 
    No reset (initial state) 
    HARD 
    Hard reset target request (service 0x11 0x01) 
    KEYONOFF 
    KeyOnOff reset target request (service 0x11 
    0x02) 
    SOFT 
    Soft reset target request (service 0x11 0x03) 
    JUMPTOBOOTLOADER 
    Jump to bootloader reset target request 
    (service 0x10 0x02 or any session with jump 
    boot support) 
    JUMPTOSYSSUPPLIERBOOTLOADER 
    Jump to system supplier bootloader reset 
    target request (service 0x10 0x02 or any 
    session with jump boot support) 
    EXECUTE 
    Commits an already made reset target 
    request. 
    Table 6-100  DcmEcuReset modes 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    177 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    6.6.2.4 
    DcmModeRapidPowerShutDown 
    Callout 
    Description 
    Rte_Switch_DcmModeRapidPowerShutDown_Dcm
    Called each time a power down state change 
    ModeRapidPowerShutDown 
    occurs. This call is a notification but has effect 
    on the DCM diagnostic servicEcuReset ($11) 
    processing. 
    Invoked by EcuReset ($11) 
    Rte_SwitchAck_DcmModeRapidPowerShutDown_D Called after the Switch API is called to get the 
    cmModeRapidPowerShutDown 
    mode transition acknowledged prior continuing 
    with the EXECUTE mode switch. 
    Invoked by EcuReset ($11) 
    Table 6-101  DcmModeRapidPowerShutDown callouts 
    Mode 
    Description 
    ENABLE_RAPIDPOWERSHUTDOWN 
    Rapid shutdown is enabled (initial state) or 
    Rapid shutdown is disabled (Service 0x11 
    0x04) 
    DISABLE_RAPIDPOWERSHUTDOWN 
    Rapid shutdown is disabled (Service 0x11 
    0x05) 
    Table 6-102  DcmModeRapidPowerShutDown modes 
     
    6.6.2.5 
    DcmControlDTCSetting 
    Callout 
    Description 
    Rte_Switch_Dcm_DcmControlDtcSetting_DcmCon Called each time a DTC setting state change 
    trolDtcSetting 
    occurs. This call is only a notification and has no 
    effect on any DCM diagnostic service processing. 
    Invoked by ControlDTCSetting ($85), 
    DiagnosticSessionControl ($10) or S3 timeout. 
    Table 6-103  DcmControlDTCSetting callouts 
    Mode 
    Description 
    ENABLEDTCSETTING 
    DTC setting is enabled (initial state service 
    0x85 0x01 or DiagnosticSessionControl ($10) 
    or S3 timeout) 
    DISABLEDTCSETTING 
    DTC setting is disabled (service 0x85 0x02) 
    Table 6-104  DcmControlDTCSetting modes 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    178 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    6.6.2.6 
    DcmSecurityAccess 
     
     
    FAQ 
    This mode declaration group is vendor specific one and only available under certain 
      circumstances. Please refer to chapter 9.16 How to Know When the Security Access 
    Level Changes for more details. 
     
     
     
    Callout 
    Description 
    Rte_Switch_Dcm_DcmSecurityAccess_DcmSecuri Called each time a security access level change 
    tyAccess 
    occurs. This call is only a notification and has no 
    effect on any DCM diagnostic service processing. 
    Invoked by SecurityAccess ($27) or 
    DiagnosticSessionControl ($10) or S3 timeout. 
    Table 6-105  DcmSecurityAccess callouts 
    Mode 
    Description 
    LockedLevel 
    Represents the UDS locked level (initial 
    state). 
    </Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/ 
    DcmDspSecurityRow > container‘s short
    Any user defined security access level. 
    -name 
    Table 6-106  DcmSecurityAccess modes 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    179 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    7  Configuration 
    7.1 
    Configuration Variants 
    The DCM supports the configuration variants 
      VARIANT-PRE-COMPILE 
      VARIANT-POST-BUILD-SELECTABLE 
      VARIANT-POST-BUILD-LOADABLE 
      VARIANT-POST-BUILD-LOADABLE-SELECTABLE 
    The configuration classes of the DCM parameters depend on the supported configuration 
    variants. For their definitions please see the Dcm_bswmd.arxml file. 
    7.2 
    Configurable Attributes 
    The  description  of  each  configurable  option  is  described  within  its  online  help  in  the 
    Configurator 5 tool. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    180 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    8  AUTOSAR Standard Compliance 
    8.1  Deviations 
    Deviation 
    Statement 
    CallbackDCMRequestServices_<SWC> 
    Operation StopProtocol not supported since 
    not fully specified in AR 4.0.3 SWS DCM what 
    a protocol stop really does. Instead a single 
    protocol switch point is realized by 
    StartProtocol().  
    Table 8-1   Deviations to AUTOSAR 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    181 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    8.2  Additions/ Extensions 
    Additions/Extensions 
    Statement 
    DCM CPU peak load reduction support. 
    See 9.2 
    RAM and run time optimization parameters for 
    See 9.4 
    multi-client support 
    Optimized DCM DEM iterator 
    DCM internal design. 
    Calibrateable configuration parameters 
    See 9.11 
    Used definition for no active protocol (DCM SWS  Required since before the very first diagnostic 
    AR 4.1.1): DCM_NO_ACTIVE_PROTOCOL 
    request is received, there is no active protocol 
    assigned in DCM. But at the same time the 
    Dcm_GetActiveProtocol() shall return a valid 
    value. 
    Support for DEM AR 4.1.2 API 
    See 9.13 
    Combined OBD and UDS protocols over a single  See 9.14 
    client connection 
    Support for sub-functions 0x17, 0x18 and 0x19 
    See ReadDiagnosticInformation ($19) 
    of service Id 0x19. 
    Notification on security access level state 
    See 9.16 
    change 
    Integration within an AR 3.x environment  
    DCM will be delivered in a preconfigured state 
    for interaction with BSWs implemented on the 
    basis of the corresponding AR3 SWS. 
    Suppression on functional addressed requests 
    See 9.21 
    Support of paged-buffer data access on DID 
    See 9.24 
    signals 
    Configurable Security-Access level specific fixed  See 9.25 
    bytes 
    Extensible keep-alive time period 
    See 9.26 
    DCM state recovery on reset /power on 
    See 9.27 
    Alternative solution for diagnostic service variant  See 9.29 
    handling 
    Support for externally handled CEMR with more  According to see [1], a CEMR can be only up 
    than four byte control mask. 
    to four bytes in size. MICROSAR DCM 
    extends the SWS by allowing also any size of 
    CEMR. Refer to 
    InputOutputControlByIdentifier ($2F) for 
    details. 
    Table 8-2   Additions/ Extensions to AUTOSAR 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    182 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    8.3  Limitations 
    Limitation 
    Statement 
    OEM specific RoE support. 
    Due to insufficient specification in the DCM 
    SWS, the RoE support can only be 
    implemented for specific OEM requirements. 
    Support of up to 32 protocols 
    Required due to optimized implementation of 
    service to protocol mapping. 
    Support of up to 32 concurrent client 
    Required due to optimized implementation of 
    connections 
    concurrent request processing. 
    Sharing of signals between DIDs not supported 
    Required due to the inability to differentiate 
    between the callers of a signal (e.g. service 
    0x22 and 0x2A). 
    Table 8-3   Limitations to AUTOSAR 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    183 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    9  Using the DCM 
    This chapter shall give some examples and hints, how to handle common use cases of the 
    DCM. 
    9.1 
    How to Reduce RAM Usage 
    All diagnostic services in DCM have a constant length so  the DCM integrator person can 
    perform a static buffer pre-calculation for finding the optimal buffer size.  
    Starting with DCM 7.01.00, Configurator 5 provides a means to estimate each DCM buffer 
    size,  depending  on  the  configured  diagnostic  services,  accessible  via  this  buffer.  The 
    buffer-to-service relation is determined by the DCM protocol configuration entity that refers 
    to a certain diagnostic service table. 
     
     
     
    Caution 
    Depending on the DCM configuration the calculated buffer sizes are either precise or 
      just estimated values. The calculation algorithm has the goal to assure the minimum 
    value required so that each service, related to the validated buffer, can be requested 
    and processed in its simplest form (e.g. on multiple DID reading, that at least one DID 
    can be read). The worst case could also be calculated, but it will require too much RAM 
    to be reserved unnecessarily (e.g. it is not considered to be possible to read N-times 
    the largest DID with a single diagnostic request).  
    There are two calculation steps:  
    >  The first one verifies that the validated buffer must be set at least to the proposed 
    value (Error Message). Otherwise runtime errors may occur. 
    >  The second one verifies whether with the currently set buffer size the DCM will be 
    able to execute the diagnostic service or will ignore the request resp. send negative 
    responses due to a lack of enough buffer space (Warning Message). 
     
    The buffer size calculation considers only diagnostic (sub-)services, that are internally 
    handled by DCM. Once a diagnostic (sub-)service is redirected to an application 
    handler, it will be excluded from the buffer size calculation. This is always the case 
    regardless of the fact if the given diagnostic service was/is completely configured in the 
    ECUC file (e.g. all related DIDs are available). 
     
     
     
    In Table 9-1   Diagnostic  services  with  non-trivial  DCM  Buffer  size  estimation  calculation 
    method
     
    you can find information about the exactness of the buffer size calculation for each 
    diagnostic  services  DCM  can  handle.    From  this  table  there  are  excluded  all  diagnostic 
    services  that  have  a  trivial  calculation  formula  (e.g.  DiagnosticSessionControl  ($10))  or 
    could  only  be  implemented  by  the  application  (i.e.  non-UDS  user-defined  diagnostic 
    services  or  UDS  services  for  which  the  DCM  does  not  have  any  configuration  details  in 
    order to make a meaningfull estimation).  
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    184 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Diagnostic Service 
    Buffer Size Calculation Type 
     
    Request 
    Response 
    RequestCurrentPowertrainDiagnosticData ($01) 
    Precise 
    Precise1 
    RequestPowertrainFreezeFrameData ($02) 
    Precise 
    Precise2 
    RequestEmissionRelatedDTC ($03)  
    Precise 
    Not estimated3 
    RequestOnBoardMonitorTestResults ($06) 
    Precise 
    Precise4 
    RequestEmissionRelatedDTCsDetectedDuringCurrentOrLa Precise 
    Not estimated3 
    stDrivingCycle ($07) 
    RequestControlOfOnBoardSystemTestOrComponent ($08)  Precise 
    Precise 
    RequestVehicleInformation ($09) 
    Precise 
    Precise 
    RequestEmissionRelatedDTCsWithPermanentStatus ($0A)  Precise 
    Not estimated3 
    ReadDiagnosticInformation ($19) 
    Precise 
    Precise5 
    Not estimated3 
    ReadDataByIdentifier ($22) 
    Precise6 
    Minimum estimation7  
    ReadMemoryByAddress ($23) 
    Precise8 
    Minimum estimation9 
    ReadScalingDataByIdentifier ($24) 
    Precise 
    Precise 
    SecurityAccess ($27) 
    Precise 
    Precise 
    ReadDataByPeriodicIdentifier ($2A) 
    Precise6 
    Precise10 
    DynamicallyDefineDataIdentifier ($2C) 
    Minimum estimation11  Precise 
    WriteDataByIdentifier ($2E) 
    Precise 
    Precise 
    InputOutputControlByIdentifier ($2F) 
    Precise 
    Precise 
    RoutineControl ($31) 
    Precise 
    Precise 
    WriteMemoryByAddress ($3D) 
    Minimum estimation9  Precise8 
    ControlDTCSetting ($85) 
    Precise 
    Precise 
    Table 9-1   Diagnostic services with non-trivial DCM Buffer size estimation calculation method 
                                                
    1 Based on worst case: “response for six times the largest PID”.  
    2 Only if all PIDs accessible via this service have configured PID data size (usually not set, since the DEM 
    implements the PID data retrieval). 
    3 Usually the paged-buffer response will be used, so the final response length is not that much relevant. 
    4 Only if DCM knows the OBDMID configuration (refer t9.30 How to Switch Between OBD DTR Support by 
    DCM and DEM
    )
    . Otherwise only the worst case for “SupportedID” OBD MID will be considered. 
    5 For all sub-functions with constant length (i.e. 0x01, 0x07, 0x09, 0x0B-0x0E, 0x11 and 0x12). 
    6 It is considered that multiple-DIDs can be requested as per ECUC configuration. Refer to the service 
    configuration chapter for details on the maximum number of DID that can be requested simultaneously in a 
    single message. 
    7 It is guaranteed that the largest configured not dynamically definable DID with no paged-buffer response 
    can be read at least in a single DID request. Note: The (WWH-)OBD DIDs are not considered as in „1“. 
    8 The configured ALFIDs are taken into account for this estimation. If no specifc ALFID(s) specified, the worst 
    case (0x44 or 0x45 in case of MID usage) will be considered. 
    9 It is guaranteed that at least one memory byte can be transfered. 
    10 UUDT buffer size is not considered here. Only the USDT request/response messages. 
    11 It is guaranteed that at least one source item (DID or memory block) can be requested for the 
    corresponding definition function. Subfunction „clear“ is of course precisly calculated. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    185 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    In some special cases like: 
    >  Reading fault memory data: 
    >  ReadDiagnosticInformation ($19) 
    >  RequestEmissionRelatedDTC ($03) 
    >  RequestEmissionRelatedDTCsDetectedDuringCurrentOrLastDrivingCycle ($07) 
    >  RequestEmissionRelatedDTCsWithPermanentStatus ($0A) 
    >  Reading multiple DIDs in a single request: 
    >  ReadDataByIdentifier ($22) 
    the required buffer size cannot be estimated or a pessimistic prediction will be applied in 
    order to guarantee the ECU will always respond. 
    For  the  first  case  (Reading  fault  memory  data),  the  DCM  offers  the  option  to  enable 
    response  paged  buffer  handling,  that  may  reduce  the  overall  required  buffer  by  DCM. 
    Enabling this option will lead to an increased code ROM usage in DCM due to the added 
    functionality.  
     
     
     
    Note 
    It is recommended always to keep the paged buffer option in DCM enabled to avoid 
      situations where the tester would not be able to get a positive response when reading 
    the fault memory content. 
     
     
     
    To enable the paged buffer handling in DCM for Reading fault memory data, just set the 
    configuration parameter to TRUE: 
    /Dcm/DcmConfigSet/DcmPageBufferCfg/DcmPagedBufferEnabled 
     
    The situation is different for the Reading multiple DIDs in a single request case with 
    standard AUTOSAR approach. In case the tester requests reading more data as the 
    response buffer can handle, the DCM will respond with NRC 0x14 (ResponseTooLong) to 
    avoid buffer overflow. The tester shall then use single-DID requests to get the data.  
     
    Using  the  MSR  DCM,  you  have  still  an  option  that  will  allow  you  to  save  RAM  also  for 
    multiple- or single-DID reading when the DIDs are too large even for a single-DID request. 
    Please refer to 9.24 How to Save RAM using Paged-Buffer for Large DIDs for details on 
    this usage. 
    9.2 
    How to Reduce DCM Main-Function Run Time Usage 
    The DCM is designed and optimized for best possible response performance. This means 
    the DCM main function will perform as much as possible operations per single activation in 
    order to keep the P2 timings requirements. Additional the DCM internal code is optimized 
    for short run time in order to lower the CPU burden during the many operations performed 
    within a single DCM main function activation. But in cases where other BSWs are intensely 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    186 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    involved  in  the  service  processing,  such  as  the  DEM  during  reading  the  fault  memory 
    information, the DCM can no more guarantee for total short run time execution. Therefore, 
    the DCM offers a configuration option that may reduce the CPU peak load by limiting the 
    number of iterations of an external BSW API.  
    After introducing the signal level access on DID data, the CPU peak load can be 
    significantly affected also by services other than ReadDiagnosticInformation ($19)Such 
    services are: 
    >  ReadDataByIdentifier ($22) 
    >  ReadDataByPeriodicIdentifier ($2A) 
    >  DynamicallyDefineDataIdentifier ($2C) 
    Any of these allows multiple DIDs in a single request, that, depending on the total number 
    of DIDs in a request and the corresponding number of signals in a single DID, can lead to 
    really long execution times of the Dcm_MainFunction() 
     
    To enable the run time limitation in DCM set up the configuration parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmMaxNumberIterationsPerTask 
     
     
     
    FAQ 
    There is no recommended default value for this parameter. It shall be measured during 
      the integration by testing the worst case of the above mentioned diagnostic services.  
     
    Please note that a too low value of this parameter will lower the CPU usage to a 
    minimum, but will lead to long processing times of a diagnostic request. RCR-RP 
    responses will be always sent, since the P2 times expire after a few 
    Dcm_MainFunction() iterationsA compromise between performance and CPU usage 
    can be found using the Split Task Functions concept. Using this approach, the worker 
    task will be called more often than the timer task. This will help to achieve less CPU 
    load per task activation and at the same time more work done per unit of a real time. 
     
     
     
    9.3 
    How to Force DCM to not Respond on Requests with Response SIDs 
    Generally the DCM will replay to any physical addressed not supported service identifier 
    with a negative response: NRC 0x11 (ServiceNotSupported). This includes also all service 
    identifier from the diagnostic response Id range [0x40, 0x7F]U[0xC0, 0xFF]. In some cases 
    it is not allowed to reply to any request service Id from this range.  
    To  specify  whether  DCM  shall  reply  to  any  diagnostic  response  Id  or  not,  set  up  the 
    configuration parameter: /Dcm/DcmConfigSet/DcmGeneral/DcmRespondAllRequest. 
      
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    187 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.4 
    How to Handle Multiple Diagnostic Clients Simultaneously 
    The  DCM  is  a  single  instance  component. This  means  that  once a  diagnostic  client  has 
    sent a request, the server (DCM) is busy until the processing of  that  request is finished. 
    While busy, the DCM cannot handle in parallel other clients’ requests. In such a situation 
    the second client will not get a response. 
    If it is required to send always a response to a parallel client request, the DCM offers an 
    option to send NRC 0x21 (BusyRepeatRequest) to any additional request to the main one. 
    To  specify  the  DCM  behavior  on  a  multiple  client  environment,  set  up  the  configuration 
    parameter: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslDiagResp/DcmDslDiagRespOnSecondDeclinedReq
    uest 
    Since there will be reserved RAM for each client the DCM shall be able to communicate 
    with, the DCM RAM usage may increase drastically for large number of configured DCM 
    connections..  Also  the  DCM  main  function  run  time,  needed  to  process  all  parallel 
    connections, may increase significantly. In the practice, even if the DCM is configured to 
    communicate with many clients, it is not necessary that all of them will send request to the 
    same server at the same time. To optimize the RAM and run time resource usage of DCM, 
    there  is  configuration  option  provided  that  limits  the  amount  of  in  parallel  handled 
    diagnostic 
    clients: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslDiagResp/DcmDslDiagRespMaxNumOfDeclinedReq
    uests 
     
    9.5 
    How to Restrict a Diagnostic Service Execution by a Condition 
    On  a  reception  of  a  validly  formatted  diagnostic  request  DCM  evaluates  also  with  it 
    associated diagnostic session and security access restrictions, defined in Configurator 5. 
    In case of not matching required states, the DCM automatically rejects the request with the 
    appropriate NRC. 
    Additionally,  DCM  can  be  configured  to  consider  any  ECU  specific  states,  related  to  a 
    concrete  diagnostic  execution.  These  states  are  the  so  called  modes  that  can  either  be 
    managed by any BSW, including DCM or a SWC. You can simply define a condition made 
    of  such  a  mode  and  create  a  rule  that  will  be  later  used  by  a  diagnostic  service,  sub-
    service, DID, RID, etc. as a processing restriction. 
     
    An example of a use case using mode rules is service DiagnosticSessionControl ($10)If 
    you  need  to  restrict  session  activation  by  an  ECU  condition,  you  have  to  model  this 
    condition in your SWC and make a reference between the diagnostic session sub-service 
    you want to restrict and a mode rule that uses this mode in a logical expression. 
     
    To  configure  any  processing  conditions  and  rule,  refer  to  the  configuration  container  in 
    Configurator 5: /Dcm/DcmConfigSet/DcmProcessingConditions 
    Later, you can reference these rules from the corresponding diagnostic processing object 
    as an additional restriction to the diagnostic session and security access conditions. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    188 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    9.6 
    How to Get Notified on a Diagnostic Service Execution Start and End 
    Usually  the  DCM  validates  the  requested  services  without  involving  the  application,  only 
    using the configuration parameters. In some cases the DCM application may need to know 
    about  a  diagnostic  services  execution  start  and  when  it  is  finished.  Additionally  the 
    application  may  need  to  restrict  globally  the  processing  of  all  or  just  some  diagnostic 
    services.  
    For all the above mentioned use cases, the DCM offers two kinds of application notification 
    groups: 
    >  Manufacturer diagnostic service notification 
    >  System supplier diagnostic service notification 
    Each of them supports a list of one or more request indication and response confirmation 
    notification function pairs that will be called on request reception resp. service processing 
    finishing time. 
    The  differences  between  these  two  kinds  of  notifications  are  described  in  within  the 
    corresponding API documentation:  
      ServiceRequestManufacturerNotification_<SWC> 
      ServiceRequestSupplierNotification_<SWC> 
    To set up a manufacturer diagnostic service  notification, add a configuration container in 
    the Configurator 5:  
    /Dcm/DcmConfigSet/DcmDsl/DcmDslServiceRequestManufacturerNotification 
    To set up a system supplier diagnostic service notification, add a configuration container in 
    the Configurator 5:  
    /Dcm/DcmConfigSet/DcmDsl/DcmDslServiceRequestSupplierNotification 
     
     
     
    FAQ 
    If you have already specified long lists of notifications and want just temporary to 
      disable the usage of a certain kind of notifications (e.g. disable all manufacturer 
    notifications), you don’t need to delete the lists. Just disable the usage of the 
    notification kind by setting up the corresponding DCM configuration parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmRequestManufacturerNotificationEnabled 
    /Dcm/DcmConfigSet/DcmGeneral/ DcmRequestSupplierNotificationEnabled 
     
     
    9.7 
    How to Limit the Diagnostic Service Processing Time 
    In  general  there  is  no  limitation  of  a  diagnostic  service  processing  time.  If  the  DCM 
    application needs longer time before it can return the final request result i.e. waiting for a 
    response from an external ECU or during heavy NvM usage from other components, the 
    DCM monitors the diagnostic P2 times and keeps the diagnostic client notified about the 
    final response delay. This behavior fully complies with the ISO UDS specification.  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    189 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    In some cases, usually required by the car manufacturer, the DCM shall not wait endlessly 
    for  the  final  operation  result,  but  instead  it  will  have  a  configured  service  processing 
    deadline.  If  such  time  monitoring  is  required,  the  time  limit  shall  be  set  high  enough,  to 
    avoid abortion of a long service execution. In such a situation the DCM will decouple the 
    application,  take  over  the  service  processing  and  finalize  it  with  a  specific  NRC  (usually 
    0x10  (GeneralReject)).  In  that  way  the  diagnostic  client  will  be  notified  about  this  critical 
    situation  and  it  will  be  given  the  opportunity  to  send  a  reset  command  to  the  server  to 
    reinitialize the ECU, since obviously the software is no more in a reliable state. 
    To  enable  the  application  reaction  deadline  monitoring,  set  up  the  DCM  configuration 
    parameter: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslDiagResp/DcmDslDiagRespMaxNumRespPend 
     
    9.8 
    How to Jump into the FBL from Service DiagnosticSessionControl ($10)  
    The DCM provides means for transitions into the FBL from the ECU’s application software. 
    You  can  specify  in  the  DCM  configuration  on  which  diagnostic  session  request  this 
    transition shall occur by the following parameter type: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession/DcmDspSessionRow/DcmDspSessionFor
    Boot 
    9.9 
    The HIS Compliant Jump into FBL 
    By default if a diagnostic request for SID $10 with a session Id configured for boot loader 
    activation is received by the ECU, the DCM stores all necessary information for the FBL 
    (via  callout  Dcm_SetProgConditions())and  resets  the  ECU  without  sending  the  final 
    positive response to the request. This will be done by the FBL after the reset. Additionally, 
    to avoid P2 time violation during the transition (reset) phase, the DCM can be configured 
    to  send  a  RCR-RP  response  prior  resetting  the  ECU.  For  that  purpose  the  DCM 
    configuration parameter shall be set accordingly: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmSendRespPendO
    nTransToBoot 
     
    9.9.1 
    The HIS Alternative Jump into FBL 
    In some cases and depending on the FBL used in the ECU it may not be possible to send 
    a final response from the FBL. In that case the DCM within the ECUs application software 
    shall first send the final positive response to the diagnostic client and then jump  into the 
    FBL. To achieve this behavior, you have to set the following DCM configuration parameter 
    to TRUE:  
    /Dcm/DcmConfigSet/DcmGeneral/DcmResetToFblAfterSessionFinalResposeEnabled 
     
    9.10  How to Put DCM in a Non-Default Session at ECU Power-On 
    The  DCM  supports  also  the  HIS  compliant  transition  from  FBL  into  the  application 
    software,  where  the  positive  response  is  to  be  sent  after  the  transition  is  accomplished. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    190 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    These usually are responses for diagnostic services that cause a reset in the FBL during 
    the reprogramming process: $10 $01 and $11 $01.  
    This  mechanism  can  be  used  to  instruct  DCM  to  enter  in  a  non-default  session,  using 
    appropriate 
    combination 
    of 
    the 
    parameter 
    values 
    returned 
    by 
    the 
    Dcm_GetProgConditions().  The  callout  shall  return  the  value  DCM_WARM_START  to 
    notify DCM that  the out-parameters are valid and shall be evaluated. The correct  values 
    during this operation are defined below: 
     
    Member of the Dcm_ProgConditionsType  Value 
    parameter 
    TesterSourceAddr 
    Contains the Id of a tester that communications 
    with the ECU over the communication bus shall be 
    kept awaken while the non-default session is 
    active. The tester Ids are assigned to each DCM 
    connection in Configurator 5: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/Dc
    mDslProtocolRow/DcmDslConnection/DcmDslMai
    nConnection/DcmDslProtocolRxTesterSourceAddr 
    ProtocolId 
    Not evaluated. 
    Sid 
    $10 
    SubFuncId 
    The Id of the session to be activated [$02 -$7E]. 
    Must be a supported session within the DCM 
    configuration (refer to 
    5.10DiagnosticSessionControl ($10) for details).  
    ReprogrammingRequest 
    FALSE (Not evaluated.) 
    ApplUpdated 
    FALSE 
    ResponseRequired 
    FALSE 
    Table 9-2   Initialization of the Dcm_ProgConditionsType for non-default session activation at ECU power-on 
     
    9.11  How to Support Calibrateable Configuration Parameters 
    Vector  DCM  provides  a  limited  functionality  for  configuration  calibration.  The  following 
    chapters  describe  which  DCM  objects  are  possible  to  be  calibrated  after  ECU 
    programming. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    191 
    based on template version 5.0.0 




    Technical Reference MICROSAR DCM 
    9.11.1  OBD Calibration 
     
     
    FAQ 
    This feature is first supported in DCM 1.04.00. 
       
    In order to activate it, please use the following DCM ECUC parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmCalibrationOfObdIdsEnabled 
     
     
    DCM  implementation  is  prepared  for  post-programming  calibration  regarding  the  OBD 
    supported  services  and  their  sub-service  parameters. With  these  calibration  abilities  you 
    can  only  disable  or  re-enable  an  already  configured  and  supported  OBD  service  and/or 
    any of its sub-service parameters. The following calibration levels are supported in DCM: 
    >  Deactivate/Re-activate an OBD diagnostic service or complete disabling of OBD 
    support;  
    >  Deactivate/Re-activate specific OBD related parameter identifiers 
    >  For [6]PIDs/MIDs/TIDs/VIDs 
    >  For OBD in UDS resp[7] and [8] 
    >  DIDs in range 0xF400-0xF8FF 
    >  RIDs in range 0xE000-0xE1FF 
     
    9.11.1.1  Calibration of Supported OBD Services 
    DCM supports this level of calibration only in connection with the How to Get Notified on a 
    Diagnostic  Service  Execution  Start  and  End
      
    feature.  It  is  recommended  to  use  the 
    ServiceRequestManufacturerNotification_<SWC> notification in order to block as early as 
    possible any not supported OBD service identifiers. 
     
     
     
    Caution 
    Do not block any UDS OBD services: 0x22 and 0x31. These services are shared 
      between OBD and the UDS protocol. In case OBD or/and the UDS OBD parameters 
    shall be disabled, please refer to the chapter 9.11.1.2 Calibration of Supported OBD 
    Parameter Identifier
     
    to disable only the affected sub-service parameters.  
     
     
     
    The  diagnostic  service  level  filtering  is  completely  handled  by  the  application 
    implementation. This can be achieved by a calibrateable filter object that will be evaluated 
    within  the  diagnostic  request  indication  function.  This  application  call  shall  behave 
    depending on the filter state as follows: 
    >  Any OBD service(s) is (are) disabled: set the ErrorPtr function parameter to NRC 
    0x11 (SNS) and return the value DCM_E_NOT to DCM. On functional requests there 
    will be no response sent back. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    192 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    >  Any OBD service(s) shall be re-enabled: just return the value E_OK to DCM. 
     
     
     
    FAQ 
    Filtering the OBD services on SID level within the 
      ServiceRequestManufacturerNotification_<SWC> will avoid the diagnostic session 
    transition into the default session, required on an OBD request. This is especially 
    useful when the OBD support shall be completely disabled, and the ECU shall behave 
    as if it is a general UDS ECU. 
     
     
     
    9.11.1.2  Calibration of Supported OBD Parameter Identifier 
    Due to the OBD protocol specifics, the filtering of single OBD related parameter identifier is 
    completely  handled  within  the  DCM.  The  application  shall  implement  only  the  write 
    operation  onto  the  calibrateable  DCM  configuration  objects  described  in  Table  9-3 
     

    Calibrateable OBD “availability parameter identifier” values. 
    There are two types of OBD parameter identifiers: 
    >  Availability Parameter Identifier (APID):  
    >  For [6]0x00, 0x20, 0x40, … 0xE0 
    >  For OBD in UDS resp[7] and [8]: 0xZZ00, 0xZZ20, 0xZZ40, … 0xZZE0, where ZZ 
    stays for: 
    >  DIDs: any value in range 0xF4-0xF8 
    >  RIDs: any value in range 0xE0-0xE1. 
    >  Data Parameter Identifier (DPID): any other parameter identifiers 
    The  first  type  reports  to  the  requester  a  bit  map  of  the  corresponding  “data  parameter 
    identifiers” supported by the ECU. These bitmap values always have to be consistent with 
    the  real  ECU  “data  parameter  identifier”  availability  configuration.  To  guarantee  this 
    consistency and simplify the calibration process, DCM uses calibrateable bitmaps for each 
    “availability parameter identifier” that shall be supported.  
     
    The  following  table  shows  the  overview  of  all  OBD  diagnostic  service  dependent 
    calibrateable symbols: 
    Diagnostic  Table Name 
    Availability Condition 
    Service ID 
    0x01 
    Dcm_CfgSvc01SupportedIdMask[n] 1) 
    If SID 0x01 is to be supported. 
    0x02 
    Dcm_CfgSvc02SupportedIdMask[8] 2) 
    If SID 0x02 is to be supported 
    0x06 
    Dcm_CfgSvc06SupportedIdMask[n] 1) 
    If SID 0x06 is to be supported. 
    0x08 
    Dcm_CfgSvc08SupportedIdMask[n] 1) 
    If SID 0x08 is to be supported. 
    0x09 
    Dcm_CfgSvc09SupportedIdMask[n] 1) 
    If SID 0x09 is to be supported. 
    0x22 
    Dcm_CfgSvc22SupportedIdMask[n] 3) 
    If SID 0x22 with any OBD DIDs is 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    193 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Diagnostic  Table Name 
    Availability Condition 
    Service ID 
    to be supported. 
    0x31 
    Dcm_CfgSvc31SupportedIdMask[n] 4) 
    If SID 0x31 with any OBD RIDs is 
    to be supported. 
    Table 9-3   Calibrateable OBD “availability parameter identifier” values 
     
    1) n = total number of APIDs for this service. 
    2) always contains all possible APIDs. 
    3) n = total number of APIDs for the whole range of OBD DIDs [0xF400-0xF8FF]. 
    4) n = total number of APIDs for the whole range of OBD RIDs [0xE000-0xE1FF]. 
     
    All the above table symbols have a 32bit value according to [6] that represents the bitmap 
    for the corresponding parameter identifier range, defined by the APID. The only identifier 
    not available in these bitmaps is the APID 0x00, since this one shall be always supported if 
    the corresponding OBD diagnostic service is to be supported. For example if SID 0x02 is 
    to be supported, then PID 0x00 must exist in order SID 0x02 to be able to report the 
    complete parameter identifier support list. Due to the differences between the two byte 
    UDS OBD DIDs/RIDs and their single byte OBD equivalence, the following shall be 
    considered for their calibration: 
    >  If an OBD parameter identifier is to be disabled, its corresponding APID bit value in 
    the bitmap shall be reset. For the two types of parameter identifiers this means: 
    >   For an APID: 
    >  All bits in the corresponding service table shall be reset as follows: 
     
    All APIDs below the one to be disabled shall reset bit 0. 
     
    The APID to be disabled and the greater ones shall have zero mask value. 
     
    Example: for SID 0x02 APID 0x40 shall be disabled: 
    Dcm_CfgSvc02SupportedIdMask [4] = 

        XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX0b  /* APID 0x00*/ 
        XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX0b  /* APID 0x20*/ 
        0000 0000 0000 0000 0000 0000 0000 0000b  /* APID 0x40*/ 
        0000 0000 0000 0000 0000 0000 0000 0000b  /* APID 0x60*/ 
    }; 
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    194 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    Note 
    Disabling APID 0x00 would mean that the corresponding OBD diagnostic service is not 
      available. Therefore actually the SID level filtering described i9.11.1.1 Calibration of 
    Supported OBD Services shall apply. 
     
     
     
    >  For a DPID: The corresponding APID table entry (table index = DPID / 32) bitmap 
    value shall be changed (reset bit number [DPID % 32]).  
    Example: If PID 0x51 of SID 0x02 shall be disabled, then the value shall be: 
    Dcm_CfgSvc02SupportedIdMask [4] = 

       XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX1b  /* APID 0x00*/ 
       XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX1b  /* APID 0x20*/ 
       XXXX XXXX XXXX XXX0 XXXX XXXX XXXX XXX1b  /* APID 0x40*/ 
       XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX0b  /* APID 0x60*/ 
    }; 
     
    >  If a UDS OBD parameter identifier is to be disabled, its corresponding APID bit value 
    in the bitmap shall be reset. Here are the same rules as for the single byte OBD APIDs 
    to apply, but only within a concrete OBD DID type (i.e. 0xF4XX, 0xF6XX, etc.). 
    Example: If PID 0xF600 for SID 0x22 shall be disabled, then the value shall be:  
     
    Dcm_CfgSvc22SupportedIdMask[x] = 

        XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX1b  /* APID 0xF400*/ 
        XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX0b  /* APID 0xF420*/ 
        0000 0000 0000 0000 0000 0000 0000 0000b  /* APID 0xF600*/ 
        0000 0000 0000 0000 0000 0000 0000 0000b  /* APID 0xF620*/ 
        XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXX0b  /* APID 0xF800*/ 
    }; 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    195 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
     
    Caution 
    DCM will react just as proper as the calibrated values are. This means that the 
      generator of the calibration values is responsible for the correctness of the DCM 
    configuration. Therefore the following points have to be considered during the new 
    bitmap values’ generation: 
    >  The APID concatenation has to be taken into account - see examples above how bit 
    0 of the corresponding APID masks changes. 
    >  It is not possible to enable any APID or DPID that didn’t exist in the initial DCM 
    configuration. If the newly generated calibration value sets a bit in a bitmap, which 
    was not set in the initial configuration, DCM will report the calibrated APID value. But 
    once the tester tries to read the DPID, corresponding to the wrongly set bit in the 
    APID, DCM will react according to its initial configuration state – the DPID is not 
    supported.  
    >  If the OBD functionality shall be completely disabled, then: 
    >  The OBD services have to be filtered as described in 9.11.1.1 Calibration of 
    Supported OBD Services.  
    >  The UDS OBD DIDs/RIDs shall be disabled by resetting all APID specific bitmap 
    values. 
    Any faulty calibration will not cause any damage to the ECU or its software, but will 
    lead to OBD diagnostic protocol violations
     
     
     
    9.12  How and When to Configure Multiple Protocols 
    DCM  provides  means  for  supporting  multiple  diagnostic  protocols  in  one  configuration. 
    There are several use cases, where multiple protocols shall be used in need of: 
    >  Diagnostic Client(s) Processing Prioritization 
    >  Client Specific Diagnostic Application Timings 
    >  Diagnostic Service Firewall 
    Please refer to the corresponding use case chapter below for details. Please note that all 
    these use cases can also be combined. 
     
    9.12.1  Diagnostic Client(s) Processing Prioritization 
    If one or more diagnostic clients shall have privileged access over other clients (e.g. OBD2 
    client  is  more  important  than  an  OEM  service  tool),  then  all  clients  shall  be  grouped 
    according  to  their  priority.  These  groups  are  called  in  the  DCM  configuration  “protocols” 
    (/Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow). 
    Each 
    protocol 
    possesses  a  priority  property  (DcmDslProtocolPriority)  that  determines  the  group 
    importance. Please refer to the online help of this setting for more details about it. 
    Once all clients that will communicate with the ECU were classified upon their importance, 
    their connections 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    196 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    (/Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnection/D
    cmDslMainConnection) have to be assigned to the corresponding protocol.  
     
     
     
    FAQ 
    It is important to know, that in case of protocol prioritization needed, each protocol 
      available in the DCM configuration shall refer to a dedicated diagnostic buffer. If two 
    or more protocols do share the same buffer, no concurrent reception of diagnostic 
    requests will be possible for clients assigned to these protocols. Only in case a non-
    default session is already started and the ECU is currently not processing any request, 
    will give a client with higher priority the opportunity to get access over the ECU (please 
    refer tTable 9-6  Protocol prioritization during non-default session)
     
     
     
    Having  specified  the  diagnostic  protocols  with  their  tester  connections,  corresponding 
    buffers and priority, your ECU is ready to handle privileged requests.  
    Under the assumption that for all requests the activation of the new  protocol is accepted 
    (StartProtocol() returns E_OK), the handling of higher priority clients to lower priority ones 
    (and vice versa) in DCM in different diagnostic sessions is shown in the matrixes below. 
    The most important situations that can occur between two concurrent clients are focused 
    by dedicated colors. Please, refer to Table 9-4   Color  legend  to  the  protocol  prioritization 
    matrixes
     
    for detailed explanation. 
     
    Color 
    Meaning 
    Blue 
    Focuses on the different behavior for a lower or equal priority client when the ECU is 
    in the default or in a non-default session. 
    Green 
    Focuses on the situations where a lower or equal priority client will get a NRC 0x21. 
    Orange 
    Focuses on the situations where an active job of a client will be interrupted by a 
    higher priority client. 
    Grey 
    A situation that can never occur due to reactions in the preceded cases. 
    Table 9-4   Color legend to the protocol prioritization matrixes 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    197 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Hi-Prio 
    Client (A) 
    Tx End 
    Lo-Prio 
    Service  
    (Post-
    Client (B) 
    Idle 
    Rx Ongoing 
    Rx End 
    Processing 
    Tx Ongoing 
    Processing) 
    Continue 
    Start service 
    Continue 
    response 
    Do post-
    Receive 
    processing 
    service 
    transmission 
    processing 
    Idle 
     
    request (A). 
    (A). 
    processing (A).  (A). 
    (A). 
    Continue 
    Continue 
    Start service 
    service 
    response 
    Do post-
    processing 
    processing (A),  transmission 
    processing 
    Receive request  Receive both 
    (A), continue 
    continue 
    (A), continue 
    (A), continue 
    Rx Ongoing  (B). 
    requests. 
    reception (B). 
    reception (B). 
    reception (B).  reception (B). 
    Continue 
    Do post-
    Continue 
    Continue 
    response 
    processing 
    reception (A), 
    Start service 
    service 
    transmission 
    (A), start 
    start service 
    processing 
    processing (A),  (A), send 
    service 
    3)
    Start service 
    processing 
    (A), send NRC  send NRC 
    NRC 0x21  
    processing 
    3)
    3)
    Rx End 
    processing (B). 
    (B). 
    0x21  (B). 
    0x21  (B). 
    (B). 
    (B). 
    Interrupt 
    service 
    1)
    processing   
    Continue 
    (B), do post 2) 
    reception (A), 
    processing 
    continue 
    (B), start 
    Continue 
    service 
    service 
    Service  
    service 
    processing 
    processing 
    Processing  processing (B). 
    (B). 
    (A). 
    N/A 
    N/A 
    N/A 
    Interrupt 
    response 
    transmission 
    (B),  
    Continue 
    do post 
    2) 
    reception (A), 
    processing 
    Continue 
    continue 
    (B), 
    response 
    response 
    start service 
    transmission 
    transmission 
    processing 
    Tx Ongoing  (B). 
    (B). 
    (A). 
    N/A 
    N/A 
    N/A 
    Do post-
    processing 
    Do post-
    (B), start 
    Tx End 
    processing 
    service 
    (Post-
    Do post-
    (B), continue 
    processing 
    Processing)  processing (B). 
    reception (A). 
    (A). 
    N/A 
    N/A 
    N/A 
    Table 9-5   Protocol prioritization during default session 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    198 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Hi-Prio 
    Client (A) 
    Tx End 
    Lo-Prio 
    Service  
    (Post-
    Client (B) 
    Idle 
    Rx Ongoing 
    Rx End 
    Processing 
    Tx Ongoing 
    Processing) 
    Continue 
    Start service 
    Continue 
    response 
    Do post-
    Receive 
    processing 
    service 
    transmission 
    processing 
    Idle 
     
    request (A). 
    (A). 
    processing (A).  (A). 
    (A). 
    Continue 
    Continue 
    Start service 
    service 
    response 
    Do post-
    processing 
    processing (A),  transmission 
    processing 
    Receive request  Receive both 
    (A), continue 
    continue 
    (A), continue 
    (A), continue 
     4)
    Rx Ongoing  (B)

    requests. 
    reception (B). 
    reception (B). 
    reception (B).  reception (B). 
    Continue 
    Do post-
    Continue 
    Continue 
    response 
    processing 
    reception (A), 
    Start service 
    service 
    transmission 
    (A), start 
    start service 
    processing 
    processing (A),  (A), send 
    service 
    Send NRC 
    3)
    processing 
    (A), send NRC  send NRC 
    NRC 0x21  
    processing 
    3)
    3)
    3)
    Rx End 
    0x21  (B). 
    (B). 
    0x21  (B). 
    0x21  (B). 
    (B). 
    (B). 
    Interrupt 
    service 
    1) 
    processing 
    Continue 
    (B), do post 2) 
    reception (A), 
    processing 
    continue 
    (B), start 
    service 
    service 
    Service  
    processing 
    processing 
    Processing 
    N/A 
    (B). 
    (A). 
    N/A 
    N/A 
    N/A 
    Interrupt 
    response 
    transmission 
    (B),  
    Continue 
    do post 
    2) 
    reception (A), 
    processing 
    continue 
    (B), 
    response 
    start service 
    transmission 
    processing 
    Tx Ongoing 
    N/A 
    (B). 
    (A). 
    N/A 
    N/A 
    N/A 
    Do post-
    processing 
    Do post-
    (B), start 
    Tx End 
    processing 
    service 
    (Post-
    (B), continue 
    processing 
    Processing) 
    N/A 
    reception (A). 
    (A). 
    N/A 
    N/A 
    N/A 
    Table 9-6   Protocol prioritization during non-default session 
    1)  If an operation is ongoing (i.e. any callout with an OpStatus parameter that already 
    has been called with OpStatus == DCM_INITIAL), then this operation is called for a 
    last time with OpStatus == DCM_CANCEL to stop any further job execution. 
    2)  In 
    case 
    of 
    interruption 
    all 
    configured 
    confirmation 
    functions 
    (i.e. 
    ServiceRequestManufacturerNotification_<SWC>, 
    ServiceRequestSupplierNotification_<SWC>
    )  will  be  called to finalize  the  jobs  e.g. 
    releasing semaphores, resources, etc. The confirmation status will be negative. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    199 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    3)  NRC  0x21  will  be  sent  only  if  configured  (refer  to  9.4  How  to  Handle  Multiple 
    Diagnostic Clients Simultaneously). Otherwise there will be no response at all. 
    4)  The low priority request reception will be granted only if there shall be NRC 0x21 to 
    be  sent  back  (see  3)).  Otherwise  there  will  be  no  response  at  all  on  single  frame 
    request, or FC.OVFW in case of a multi-frame request. 
     
    9.12.2  Client Specific Diagnostic Application Timings 
    If the ECU shall be able to communicate with clients that have the same importance, but 
    some of the clients are connected to it via bus systems that cannot guarantee the default 
    P2 timings, then these clients can be assigned to a dedicated protocol. The new protocol 
    shall fulfill the following requirements: 
    >  share the same diagnostic service table (same services are accessible); 
    >  have the same priority in order to avoid any protocol preemption; 
    >  share the same buffer 
     
    Only the protocol specific P2 and P2Star specific parameters: 
    >  /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmTimStrP2Serv
    erAdjust 
    >  /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmTimStrP2Star
    ServerAdjust 
    shall be specified so that the RCR-RP messages can be sent in time to the corresponding 
    clients. 
     
    9.12.3  Diagnostic Service Firewall 
    If the ECU shall allow only limited diagnostic service access to certain diagnostic clients, 
    then the multi-protocol feature can be used to specify that.  
     
     
     
    FAQ 
    Diagnostic service firewalling support is limited to service identifier level. This means, 
      that you can specify whether a service is visible to a client or not, but cannot hide 
    specific sub-functions, DIDs, RIDs, etc. of a service. This also implies that if a 
    diagnostic service with a given SID is available in more than one diagnostic 
    service table; all of its corresponding properties must be identical in all 
    instances of this service
    . For example: it is not possible to specify different session 
    and security access execution precondition for the same SID in different tables. 
     
     
     
    Each protocol refers to a specific diagnostic service table  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    200 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    (/Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslProtocolSIDT
    able) that contains all services visible to this protocol. So in case an OBD2 tester shall only 
    be able to access the OBD2 services (SID 0x01-0x0A), and the service tester shall be able 
    to  access  all  UDS  services  and  additionally  ClearEmissionRelatedDTC  ($04),  then  the 
    DCM configuration shall look like as follows: 
     
      There shall be two diagnostic service tables 
    (/Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable):  
    >  One for the UDS services and the SID 0x04; 
    >  One for all OBD2 services (incl. SID 0x04); 
      There shall be two diagnostic protocols such as: 
    >  The “service tool“ one: 
    >  shall refer to the UDS service table;  
    >  shall contain only the service tester connection 
    >  The OBD2 one: 
    >  shall refer to the OBD2 service table; 
    >  shall contain only the OBD2 tester connection 
     
    In such a configuration the UDS tester will always get NRC 0x11 (ServiceNotSupported) if 
    any OBD2 request other than 0x04 is addressed physically. The OBD2 tester will never get 
    access to the UDS services – will get either NRC 0x11 (peer-to-peer communication) or no 
    response (on functionally addressed requests). 
    9.13  How to Select DEM-DCM Interface Version 
    As of version 2.01.00, the DCM supports both DEM AR 4.0.3 and AR 4.1.2 API. Starting 
    with version 7.02.00, DEM AR 4.3.0 API is supported as well. The API version selection is 
    not  performed  automatically  since  there  is  not  always  a  DEM  available  in  the  ECU 
    configuration,  but  indeed  there  is  one  used  in  the  software. Therefore,  a  vendor  specific 
    configuration  parameter  for  selection  of  the  DEM  API  version  is  introduced: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmDemApiVersion.  For  more  details  please  refer  to 
    the online help of this parameter. 
    9.13.1  Setting the ClientId for DEM AR 4.3.0 API 
    When using the DEM AR 4.3.0 API, a ClientId has to be specified for each protocol. This is 
    done with the configuration parameter: 
     
    Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDemClientRef 
    9.14  How to Support OBD and UDS over a Single Client Connection 
    Usually  if  an  ECU  shall  support  OBD  communication  capabilities  (i.e.  OBD2  diagnostic 
    protocol),  it  shall  have  a  dedicated  connection  to  an  OBD  tester.  This  allows 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    201 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    protocol/diagnostic client prioritization (refer to  9.12 How and When to Configure Multiple 
    Protocols
    )  
    and  guaranteed  OBD  task  handling.  Nevertheless  there  are  requirements  on 
    supporting both UDS and OBD over a shared diagnostic connection. In this case, no client 
    prioritization can take place, but still the ECU shall reset any short term changes caused 
    by  an  UDS  tester  right  before.  This  task  is  automatically  performed  by  DCM.  Once  a 
    functionally requested OBD service is received (regardless of whether it is supported or 
    not by the current ECU configuration), the ECU will enter the default session, just before 
    the OBD request evaluation and execution starts. This automatic switch is only possible if 
    all conditions below are fulfilled: 
    -  There  is  at  least  one  OBD  service  (i.e.  SID  in  range  [0x00-0x0F])  configured  for 
    DCM (as an internal or external service processor implementation). 
    -  There  is  exactly  one  diagnostic  connection  configured  in  DCM.  If  there  are  two  or 
    more  connections,  please  use  the  multi-protocol  prioritization  mechanism  with 
    shared  diagnostic  buffers  instead  (refer  to  9.12  How  and  When  to  Configure 
    Multiple Protocols
    )
    . 
     
    9.15  How to Use a User Configuration File 
    DCM has an advanced code configuration and code generation tool that completely sets 
    up  the  module.  However,  in  exceptional  cases  there  is  a  need  to  complete  or  override 
    some of the generated parameters. Most common such cases are workarounds for issues 
    found after product’s release. 
     
     
     
    Caution 
    User configuration file content must either be described in this manual or agreed by the 
      Vector Informatik company prior using it in production code. 
     
     
     
    A user configuration file has no specific name. It can be any text file form e.g. Dcm.cfg. In 
    order  to  use  already  created  user  configuration  file  within  the  DCM’s  code  generation 
    process, you have to specify the full path to this file here:  
    /Dcm/DcmConfigSet/DcmGeneral/DcmUserConfigFile 
     
    9.16  How to Know When the Security Access Level Changes 
    There are situations where the ECU shall cancel all by the tester activated functions, when 
    they  were  secured  and  the  security  level  changes.  In  some  cases  the  DCM  is  able  to 
    handle this internally:  
    >  ReadDataByPeriodicIdentifier ($2A) 
    >  DynamicallyDefineDataIdentifier ($2C) 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    202 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    For other diagnostic services, such as  
    >  InputOutputControlByIdentifier ($2F) (will be automatically reset by DCM only on  
    (re-)entering default session) 
    >  RoutineControl ($31) 
    this task has to be performed by the application. For that purpose, the DCM can notify the 
    application  in  several  ways  each  time  the  security  level  performs  a  non-self-state-
    transition.  An  example  for  such  a  transition  is  “Level  1  ->  Locked”,  but  not  “Locked-
    >Locked”. The latter occurs when the default session has been re-activated. 
    The possible notifications are: 
    >  Invoking a Mode Switch 
    >  Calling a Function Implemented Within a CDD Module 
    Using these indications the application may stop any running background routines that are 
    secured. 
     
     
     
    FAQ 
    A security access level change can be triggered by any of the following events: 
     

    Any diagnostic session change caused by: 

    Service DiagnosticSessionControl ($10); 

    TesterPresent Timeout; 

    Protocol Preemption; 

    A successfully processed security unlocking sequence with service 
    SecurityAccess ($27)
     
     
     
     
    9.16.1  Invoking a Mode Switch 
    Whether the DCM shall notify about security access change using a mode switch, you can 
    specify by configuration parameter:  
    /Dcm/DcmConfigSet/DcmGeneral/DcmSecurityLevelChangeNotificationEnabled 
     
    In case of state change, the DCM will invoke a mode switch for the mode declaration 
    group DcmSecurityAccess. 
     
    9.16.2  Calling a Function Implemented Within a CDD Module 
    Whether the DCM shall notify about security access changes using simple function calls, 
    you can specify by using configuration containers:  
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityCallback 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    203 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    For each callback you need, a dedicated container of the above type shall be configured 
    for DCM. The parameter 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityCallback/DcmDspSecurit
    yCallbackFnc will specify the function you want to be called by DCM. All these functions 
    will have the prototype defined in chapte6.5.1.9 <Security Access Change Notification 
    Callback>.
     
     
    9.17  How to Deal with the PduR AR version 
    The DCM supports the interface to the PduR according to AR 3.x, AR 4.0.1, AR 4.0.3 and 
    AR 4.1.2. Depending on the AR major version there are different configuration strategies. 
    9.17.1  AUTOSAR 3 Environment 
    If  DCM  shall  interact  with  a  PduR  from  an AR3  stack,  then  the  delivery  containing  this 
    DCM is already properly pre-configured. You cannot switch to any other PduR AR version. 
     
    9.17.2  AUTOSAR 4 Environment 
    For PduRs from AR 4.x stack,  the concrete AR version is automatically derived from the 
    PduR BSWMD file. 
    However, it is possible to enforce a specific AR version during integration by defining  
    MSR_PDUR_API_AR_VERSION in the file Compiler_Cfg.h. 
    Example: The PduR AR version is set to 4.0.3: 
    #define MSR_PDUR_API_AR_VERSION 0x403 
    For a detailed description of the PduR APIs, please refer to chapte6.4.3 PduR. 
    9.18  Post-build Support 
    The DCM is optionally capable of flexible configuration selection at run time. The following 
    post-build variants are supported: 
    >  variant switching at run-time - Post-build selectable 
    >  variant calibration - Post-build loadable 
    >  combination of both - Post-build loadable selectable 
     
     
    Note 
    Please refer to the basic software module description (Dcm_bswmd.arxml) file 
      accompanying your delivery to find which parameters support post-build 
    parametrization. 
    This information is also displayed in the DaVinci Configurator 5 tool. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    204 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    9.18.1  Post-build Variance Level 
    For all of the above mentioned supported variants, there is certain variance level that is 
    covered by the module. Since the DCM can be logically divided into two main parts: 
    >  Communication Part 
    >  Diagnostic Services Part 
    we will define the level of variance for each of them separately. 
     
    9.18.1.1  Communication Part 
    DCM’s  communication  part  includes  every  parameter  located  under  the  configuration 
    container  with  path  /Dcm/Dsl.  The  few  non-post-build  capable  parameters  are  defined 
    within the Dcm_bswmd.arxml file. 
    In general the communication part of DCM handles configurations with: 
    >  different amount of protocols or/and different protocol properties such as: 
    >  P2/P2 timing adjustments, priorities, buffer assignment, protocol ID, service table 
    references, etc.; 
    >  different number of connections or/and different connection parameters such as: 
    >  changed diagnostic message identifiers (e.g. multi-ECU use case using the same 
    ECU for both left and right doors); 
    >  with or without periodic transmission (e.g. when periodic reading is not allowed 
    within a variant (note: this will be possible once the diagnostic part of DCM 
    becomes capable of variant switching). 
    What you cannot change is the number of diagnostic buffers and their size. Since the size 
    is  used  for  the  RTE  ports  (ServiceRequestManufacturerNotification_<SWC>  and 
    ServiceRequestSupplierNotification_<SWC>)  it  cannot  change  after  compile  time  since 
    RTE is not post-build capable. 
     
    9.18.1.2  Diagnostic Services Part 
     
     
     
    Note 
      If you have used the only PBS like option on diagnostic service level, provided in 
      DCM 5.00.00 and later versions, as an alternative way to handle multiple diagnostic 
    service variants (described in details in chapter 9.29 How to Handle Multiple 
    Diagnostic Service Variants
    ) you may now want to switch to the fully operational PBS 
    support by DCM described here. 
     Since PBL variant handling on diagnostic service is not yet supported, OBD calibration 
    is still the only way to change variants by calibrating data only operation. 
     
     
    DCM’s  diagnostic  service  part  includes  every  parameter  located  under  the  configuration 
    containers with path /Dcm/Dsd and /Dcm/Dsp.  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    205 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    In  general,  the  PBS  support  in  DCM  is  limited  only  to  the  selection  of  the  following 
    diagnostic entities per ECU variant: 
    >  Diagnostic Services 
    >  Diagnostic Sub-Services 
    >  DIDs (and their operations)  
    >  RIDs 
    >  Memory Ranges 
    >  OBD PIDs 
    >  OBD MIDs 
    >  OBD TIDs 
    >  OBD VIDs 
    So, you can only decide whether a certain diagnostic entity is available or not in a certain 
    ECU variant. This implies that if an entity is available in more than one variant depending 
    on its type it is not possible to: 
    >  Vary its execution preconditions (i.e. Session and SecurityAccess state references); 
    >  Specify different DID/RID etc. data layout and content; 
    >  Specify variant dependent periodic rates; 
    >  Specify variant dependent scheduler capacity; 
    >  Specify variant RoE events; 
    >  Specify RID specific sub-functions (i.e. disable only the Stop operation for a RID); 
    >  Specify IO DID specific operation (i.e. disable only FreezeCurrentState for an IODID); 
    >  Etc. 
    Although the Dcm_bswmd.arxml file already limits those ECUC configuration containers 
    and parameters that are not meant to be variable, there are still some of them that for 
    specific reasons had to be defined as variant. Here is an abstract list of the 
    parameter/container kinds that are specified as post-build related, because they can be 
    absent in a variant, even if they shall not vary in their values: 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    206 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Rules 
    Description 
    All the diagnostic entities, listed above as 
    This is required in order to guarantee that the 
    variant-capable (e.g. DIDs, RIDs, diagnostic 
    corresponding diagnostic entity properties that 
    services etc.) that have the same identifier in 
    are not variable will remain constant in all 
    the variants they occur shall always have the 
    variants. 
    same short name. 
     
    For example, all corresponding containers that 
    represent a concrete DID must have the same 
    short name in all variants the DID is available. In 
    this way, the DID will have the same data layout 
    in all variants. 
    Invariant Boolean parameters will be merged 
    There are some Boolean parameters (e.g. 
    over all variants. 
    DcmDspRoeInitOnDSC) that may be missing in a 
    certain variant (e.g. RoE not supported) thus their 
    multiplicity or the container they belong to is 
    specified as post-build capable. The parameter 
    itself but shall not change its value over all the 
    variants it applies to.  
    Depending on the parameter semantic, the final 
    value for all variants will either be TRUE or 
    FALSE or last is best. 
    Invariant Integer parameters will be calculated  There are some Integer parameters (e.g. 
    over all variants. 
    DcmDspMaxPeriodicDidToRead) that may be 
    missing in a certain variant (e.g. where service 
    ReadDataByIdentifier ($22) is not supported) thus 
    their multiplicity or the container they belong to is 
    specified as post-build capable. The parameter 
    value shall not change its value over all the 
    variants it applies to.  
    Depending on the parameter semantic, the final 
    value for all variants will either be the minimum, 
    maximum (DcmDspMaxPeriodicDidToRead) or 
    last is best (DcmDspPowerDownTime). 
    All configuration entities with execution 
    For example a diagnostic service shall not vary 
    preconditions (i.e. 
    its session state dependencies in different 
    Session/Security/ModeRules) that have the 
    variants.  
    same identifier in the variants shall have the 
     
    same precondition. 
    For details on what shall be considered in case of 
    execution precondition mismatches, please refer 
    to chapter 9.18.1.2.1. 
    OBD related UDS entities are always linked to  MSR DCM always applies UDS-to-OBD 
    their corresponding OBD entities, when such 
    automatic linking for those UDS DIDs and RIDs 
    are available. 
    that have corresponding OBD PID/MID/TID or 
    VID.  
    In the context of multiple variants, there can be 
    configurations that for example do have only 
    OBD2 entities (e.g. PIDs) in one variant and OBD 
    related UDS entities (e.g. DIDs) in another 
    variant. In this case DCM will still link those 
    matching UDS and OBD entities as it does in a 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    207 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    single variant configuration. The advantage is – 
    the application has to implement only one data 
    provider for the overlapping UDS and OBD 
    entities. 
    Table 9-7   Post-build configuration rules on invariant DCM parameters 
    9.18.1.2.1  Handling of State Execution Preconditions of Variant Diagnostic Entities 
    The execution preconditions of diagnostic entities are meant to be invariant. Still, there are 
    some special scenarios that have to be taken into account. 
     
     
     
    Note 
    The configuration tool will detect inconsistencies regarding execution preconditions on 
      related diagnostic entities and warn you with an appropriate message. The message 
    IDs (DCM05010 - DCM05025) you may get and their explanations are listed i10.2 
    Code Generation Time Messages
    .
     
     
    Only one kind of diagnostic entity will not be validated upon execution precondition 
    mismatch: memory ranges
    DCM always calculates an optimized equivalent memory layout, based on the 
    configured memory ranges and their access type (read/write) related preconditions. If 
    there are overlapping memory areas with different preconditions, they will be merged 
    into a corresponding single memory area with new preconditions that allow access to it 
    under a certain state only if at least one variant resp. overlapping instance within the 
    same variant allows the access in the given state. 
     
     
     
    >  A diagnostic entity has execution precondition that refers to states not existing in some 
    variants. 
    >  A special case: The state group (e.g. SecurityAccess) is not available in all variants, 
    since service SecurityAccess ($27) is not available at all in those variants. 
    In the described case the affected diagnostic entity will be configured with an empty 
    list of precondition related states. A list with no state references is always interpreted 
    as “no execution precondition restrictions”. This of course mismatches the original 
    semantic of the precondition: “diagnostic entity accessible _only_ in the referenced 
    state(s)”. 
    Solution: 
    Having a diagnostic entity available in a variant where it shall not be executed in any 
    (remaining) state of a state group sounds implausible. Actually such a diagnostic entity 
    (e.g. diagnostic service, DID etc.) will never be able to send a positive response and 
    thus shall not even exist in the affected variant(s). 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    208 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Example: 
    Diagnostic service shall be supported only in the programming session. This service is 
    configured to be available in a variant, where the programming session is not available 
    at all. As a result the given service shall not exist in the variant too. 
    What happens if the affected diagnostic entity is not removed from the variant? 
    DCM will interpret the precondition as “there is no precondition” and will merge these 
    states over all the variants, allowing the diagnostic entity to be always accessible.   
    >  The execution precondition depends on the preconditions of other related diagnostic 
    entities. 
    In order to have a UDS compliant NRC prioritization, the execution preconditions on 
    diagnostic service level are derived from their sub-service parameters (i.e. sub-
    function or parameter identifiers such as DIDs). In other words a diagnostic service 
    shall be allowed in a specific state if at least one of its sub-service parameters is 
    allowed in this state.  
    Example: 
    For service ReadDataByIdentifier ($22) it is true, that it shall be allowed in the default 
    session if at least one of the readable DIDs shall be readable in the default session. 
    Otherwise, the DID specific operation “read” will have a precondition that allows to be 
    accessed, but any attempt to read the DID will fail, since it will be rejected on higher 
    processing (diagnostic service) level. 
    Problem: 
    The problem the multi-variant handling faces is that if the only DID that has required 
    service ReadDataByIdentifier ($22) to be accessible in the default session does not 
    exist in a new variant where other readable DIDs are still available, meaning service 
    ReadDataByIdentifier ($22)  is still required to be available too. This automatically 
    means that the diagnostic service shall lose its permission to be accessible in the 
    default session within that variant. Due to the invariance of the diagnostic entity 
    preconditions (i.e. once allowed and no not allowed), such configurations will cause 
    warnings to be issued in the configuration tool.  
    Solution: 
    There is no real solution for such situations, since the affected service cannot be 
    removed from the variant. But … 
    … what would happen in such a configuration? 
    The ECU will still reject any unsupported in the given state diagnostic entity (in our 
    example the concrete DID). The only difference will be the NRC sent back by the ECU 
    when the variant without the readable in the default session DID is active (i.e. instead 
    of expected NRC 0x7F, 0x31 will be sent). The advantage is that the ECU will have a 
    constant behavior independent of the active variant and will send the same NRC as in 
    the variant with the DID readable in the default session.  
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    209 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    9.18.2  Initialization 
    All post-build variants have in common that DCM must be first correctly initialized with the 
    concrete variant. Thus, the variant switching is only possible at run time during the module 
    initialization  phase.  For  that  purpose  the  DCM API  Dcm_Init()  has  to  be  called  with  the 
    appropriate configuration root pointer. Please refer to the API description for more details. 
     
    The  configuration  pointer  is  passed  by  the  MICROSAR  EcuM  based  on  the  post-build 
    configuration.  If  no  MICROSAR  EcuM  is  used,  the  procedure  of  how  to  find  the  proper 
    initialization pointers is out of scope of this document. 
     
    9.18.2.1  Error Detection and Handling 
    The DCM will verify the configuration data before accepting it to initialize the module. If this 
    verification fails,  an EcuM error hook (EcuM_BswErrorHook)  is called with an error code 
    according to Table 9-8. 
    Error Code 
    Reason 
    ECUM_BSWERROR_NULLPTR 
    Initialization with a null pointer. 
    ECUM_BSWERROR_MAGICNUMBER 
    Magic pattern check failed. This pattern is 
    appended at the end of the initialization root 
    structure. An error here is a strong indication of 
    random data, or a major incompatibility 
    between the code and the configuration data. 
    ECUM_BSWERROR_COMPATIBILITYVERSION  The configuration data was created by an 
    incompatible generator. This is also tested by 
    verification of a ‘magic’ pattern, so initialization 
    with random data can also cause this error 
    code.  
    Table 9-8   Error Codes possible during Post-Build initialization failure 
    If no MICROSAR EcuM is used, this error hooks and the error code constants have to be 
    provided by the environment. The DCM performs the following verification steps: 
    1.  If the pointer equals NULL_PTR, initialization is rejected. 
    2.  If the initialization structure does not end with the correct magic number it is rejected. 
    3.  If the initialization structure was created by an incompatible generator version it is 
    rejected (starting magic number check) 
     
     
    Caution 
    The verification steps performed during initialization are neither intended nor sufficient 
      to detect corrupted configuration data. They are intended only to detect initialization 
    with a random pointer, and to reject data created by an incompatible generator version. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    210 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.18.3  Post-build Variants 
    9.18.3.1  Post-build selectable 
    The MICROSAR Identity Manager (refer to [10]is an implementation of the AUTOSAR 4 
    post-build  selectable  concept.  It  allows  the  ECU  manufacturer  to  include  several  DCM 
    configurations  within  one  ECU.  With  post-build  selectable  and  the  Identity  Manager  the 
    ECU  variants  are  downloaded  within  the  ECUs  non-volatile  memory  (e.g.  flash)  at  ECU 
    build  time.  Post-build  selectable  does  not  allow  modification  of  DCM  aspects  after  ECU 
    build time. At the same time, this limitation allows some of the optimization strategies still 
    to  be  effective  –  DCM  static  code  part  will  be  optimized  for  the  variant  with  maximum 
    configuration size. 
     
    The variant selection is performed at run time by passing the corresponding configuration 
    root during the module initialization (refer to chapte9.18.2 Initialization).  
     
    9.18.3.2  Post-build loadable 
    All DCM configuration parameters, that are  classified to be post-build selectable, also do 
    support post-build loadable  variant. The differences to the post-build-selectable  case are 
    listed upon their qualification: 
    >  advantages:  
    >  The module’s configuration can be updated after the module’s compile time without 
    reprogramming the whole ECU software. 
    >  disadvantages: 
    >  Since all of the affected configuration parameters may change after module’s compile 
    time, the optimization level of the source code is very low.  
    >  Since no maximum configuration size can be pre-calculated, some scalable RAM 
    blocks are referred not by a direct linker symbol, but through a pointer. 
    >  Only one configuration variant is supported at a time (no variant selection at run time 
    possible). This disadvantage is avoided if the post-build loadable selectable variant is 
    chosen instead (refer to chapte9.18.3.3). 
    >  Greater risks of passing an invalid pointer during module initialization time. 
    For details about the post-build loadable feature, please refer to [9]. 
     
    9.18.3.3  Post-build loadable selectable  
    This variant actually combines both post-build selectable and loadable variants, allowing a 
    variant selection at run time and at the same time post-build calibration of parameters. 
    For  details  on  the  two  mentioned  variants,  please  refer  correspondingly  to  chapters 
    9.18.3.1 and 9.18.3.2. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    211 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.18.3.4  Post-build deleteable 
    This variant is actually a specific sub-variant of the post-build loadable variants. It allows 
    deleting of containers that were created at link time, by guaranteeing at the same time the 
    preservation of other post-build capable parameters’ values. For details about this feature, 
    refer to the [9]. 
     
    9.19  Handling with DID Ranges 
    9.19.1  Introduction 
    The  DIDs  in  DCM  are  usually  configured  in  detail:  for  a  concrete  DID  number,  it  is 
    specified the data access type (read, write, etc.), number of data signals the DID contains, 
    etc. For each data signal it is exactly configured the maximum/concrete length and type of 
    data acquisition (i.e. RTE C/S port, function call, direct NvM interaction, etc.).  
    Additionally DCM is able to support a more generic DID access method, using DID ranges. 
    This method has its advantages and disadvantages: 
    Advantages: 
      You can implement only one service port/function that covers a large group of DIDs 
    with a similar data access method. 
    Disadvantages: 
      Only read and write operations are allowed when using DID ranges. No IO-control or 
    scaling information reading is possible. 
     
    9.19.2  Implementation Limitations 
    Current AR  DCM  SWS  ([1])  defines  DID  range  interaction  with  the  application  in  such  a 
    way that some restrictions must be considered when configuring a DID range. 
      DID ranges may not be defined for DIDs 0xF300-0xF3FF (dynamically defined DIDs). 
      DID ranges may not be defined for DIDs 0xF400-0xF8FF (OBD/ WWH-OBD DIDs), 
    when DCM shall handle these on its own. 
      If a DID from a DID range shall be included in a dynamically defined DID, the 
    requested DynamicallyDefineDataIdentifier ($2C) service will validate the source 
    position and size parameters only upon the configured DID range maximum possible 
    length (9.19.3 Configuration Aspects). Hence, when the actual length of the DID from 
    this range is smaller than the maximum length and the stored source position and size 
    do not match the actual length, the reported data will be fully or partially invalid. 
      If a DID from a DID range is used in a multi DID request for service 
    ReadDataByIdentifier ($22)in order to protect the ECU from out of boundary access 
    during reading each, DCM will consider at first its maximum length for the total 
    response length. Later, the application will return the concrete length during reading 
    DID-Range data, so the positive response will always have the correct length. The only 
    negative effect is that DCM may reject requests with multiple DIDs that would actually 
    fit the configured buffer. So choosing values for the maximum DID range length, nearly 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    212 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    equal the size of the diagnostic buffer will mostly fail a multi DID request with a DID 
    range DID. To avoid such situations, please consider the following guideline: 
      Use DID ranges for DIDs that have nearly the same size, which is represented by the 
    maximum length parameter. 
      If not possible to group the DID in the way shown above, try splitting large ranges into 
    smaller ones in order to have less differences between the shortest and longest DID 
    of a range. 
      Try grouping short DIDs within ranges. If the maximum length of a DID range is far 
    smaller than the diagnostic buffer, then the multiple DID request limitation will no 
    longer persist. The best proportion is:  
     
    DCMBufferSize >= DcmDspMaxDidToRead * DcmDspDidRangeMaxDataLength 
      The DID range response length calculation limits also the usage of the paged DIDs 
    (9.24 How to Save RAM using Paged-Buffer for Large DIDs). 
      Since DID ranges support read operation, they may be used for periodic reading, but 
    then the maximum length may not exceed 7 bytes (CAN UUDT reference length). 
     
    9.19.3  Configuration Aspects 
    >  If a DID ranges is readable or/and writeable the corresponding UDS services shall be 
    defined in the configuration tool. Refer to ReadDataByIdentifier ($22) and 
    WriteDataByIdentifier ($2E)
     for more information about their configuration aspects. 
    >  Whether a DID range has read or/and write operation, is to be determined via a 
    corresponding /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo container (referenced by 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidRange/DcmDspDidRangeInfoRef  
    Refer to the concrete DID range configuration parameter online help in the configuration 
    tool for more details about the effect of the parameter value, dependencies to other 
    configuration parameters or any specific restrictions. 
    9.20  How to Support DID 0xF186 
    The ActiveDiagnosticSessionDataIdentifier (0xF186) is used to report the active diagnostic 
    session within the DCM. If you want DCM to implement the read access to its data, please 
    follow the configuration steps below: 
     
    >  A DID shall be defined within the following container: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid 
    >  Set the identifier of  that DID to 0xF186: 
    /DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidIdentifier 
    >  Define a read operation for that DID: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead 
    >  The read function should have the name “Dcm_DidMgr_F186_ReadData”: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataReadFnc 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    213 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    >  Select the value USE_DATA_SYNCH_FNC for the following container: 
    /DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    >  Because only one data byte has to be read the data size should be configured to 8 bit: 
    /DcmDsp/DcmDspData/DcmDspDataSize 
     
     
     
    Note 
    Since this is just a regular DID, that can be used in arbitrary manner, the following has 
      to be considered if other options related to this DID are set: 
    >  The DID may have also other data signals. If one of them fulfills to the above 
    conditions, you can still use the DCM’s internal implementation for reporting current 
    session ID. 
    >  If the DID shall support any other operation than only read (e.g. write), then for the 
    data signal, that will use the DCM’s internal implementation, the write operation 
    must be implemented by the application.  
    >  An example for a write functionality: Since DCM does not provide an API for 
    entering a non-Default session, the only effect such a write function may have is 
    to put DCM into the default session (refer to Dcm_ResetToDefaultSession()
    when the requested value is 0x01. All other values shall be rejected by NRC 
    0x31. 
     
     
    9.21  How to Suppress Responses to Functional Addressed Requests 
    Sometimes it may be necessary on a specific connection to suppress all kind of responses 
    (positive  or  negative)  on  functional  addressed  service  requests.  This  feature  will  be 
    automatically activated when Mixed11 addressing (applies to CanTP only) is configured for 
    that  connection.  To  achieve  this,  the  following  addressing  type  parameter  has  to  be 
    configured to “DCM_NET_ADDR_MIXED_11”: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnection/Dc
    mDslMainConnection/DcmDslAddressingType 
    Additionally the following configuration switch has to be enabled: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmSuppressResponseOnCanTpFuncMixedAddrRequ
    ests 
    9.22  How to Support Interruption on Requests with Foreign N_TA 
    The DCM supports service processing interruption when a request from the same client to 
    another ECU is detected. This feature is only available for Mixed11 addressing CanTp and 
    is automatically activated when Mixed11 addressing is configured for that connection. 
    The addressing type parameter of a connection can be configured here: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnection/Dc
    mDslMainConnection/DcmDslAddressingType 
    Additionally the following configuration switch has to be enabled: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmForeignDiagnosticRequestDetectionEnabled 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    214 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.23  How to Know When the Diagnostic Session Changes 
    There are situations where the ECU shall cancel all by the tester activated functions, when 
    the diagnostic session changes. In some cases the DCM is able to handle this internally:  
    >  ReadDataByPeriodicIdentifier ($2A) 
    >  DynamicallyDefineDataIdentifier ($2C) 
    >  CommunicationControl ($28) 
    >  ControlDTCSetting ($85) 
     
    For other diagnostic services, such as  
    >  InputOutputControlByIdentifier ($2F) (will be automatically reset by DCM only on  
    (re-)entering default session) 
    >  RoutineControl ($31) 
    this task has to be performed by the application. For that purpose, DCM already notifies 
    the  application  by  invoking  a  mode  switch  for  the  mode  declaration  group 
    DcmDiagnosticSessionControl. 
    Additionally for better DCM integration flexibility, there is also another way an application 
    located in a CDD can be notified – by a simple function call. 
    Whether  the  DCM  shall  notify  about  diagnostic  session  changes  using  simple  function 
    calls, you can specify by using configuration containers:  
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession/DcmDspSessionCallback 
    For each callback you need, a dedicated container of the above type shall be configured 
    for DCM. The parameter 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSession/DcmDspSessionCallback/DcmDspSession
    CallbackFnc will specify the function you want to be called by DCM. All these functions will 
    have the prototype defined in chapte6.5.1.8 <Diagnostic Session Change Notification 
    Callback>
    .
     
     
    9.24  How to Save RAM using Paged-Buffer for Large DIDs 
    9.24.1  Introduction 
    According  to  all  up  to  now  released AUTOSAR  DCM  SWS  documents,  the  only  service 
    that supports paged-data reading is service ReadDiagnosticInformation ($19). 
    For  any  other  data  access  services,  i.e.  service  0x22  (ReadDataByIdentifier),  it  is  not 
    possible to implement paged-buffer reading, without the need of fulfilling a lot of conditions 
    and accepting implementation drawbacks and unnecessary risks.  
     
    So if a large amount (measured in hundreds of bytes or even some kilobytes) of data has 
    to be carried out from the ECU, the DCM shall have at least one buffer that can handle the 
    entire  DID  data.  To  avoid  this  in  most  cases  unnecessarily  RAM  resource  waste,  the 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    215 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    MICROSAR  DCM  offers  a  concept  for  paged-data  reading,  described  in  details  further 
    below. 
     
    9.24.2  Functionality 
    In order to provide a user-friendly method for getting data from the application using the 
    paged-buffer  concept,  a  non-AUTOSAR  extension  of  the  already  available  DataServices 
    client-server port interface is requiredReadData() (paged-data-reading). 
     
    The advantage of this concept is the great flexibility it offers: 
    >  The application has full control of how many bytes to be transferred and for simple 
    “memory copy only” implementations will be able to optimally fill up the response 
    transmission buffer. 
    >  Only a single function has to be implemented, that handles the complete data transfer.  
    >  The imported diagnostic description ODX/CDD will not be affected by these changes, 
    since the ECU project implementer just chooses the kind of the data access, such as it 
    could be made for direct access to NvM signals. 
    >  If the diagnostic description defines a DID with multiple large signals, for example 
    four signals with 1000Byte each, for all those signals the new access type can be 
    used and the DCM can still have a small diagnostic buffer. 
    >  The concept is not defined by AUTOSAR but fits the AUTOSAR conventions.  
    >  Either RTE C/S port or a callback to a complex device driver can be used. 
    >  All DID related ECUC parameters are re-used as long as they are applicable for that 
    concept. 
     
    There  are  also  some  possible  drawbacks  that  have  to  be  considered  when  paged-DID 
    reading feature is activated: 
    Reading data using the paged-buffer access, could lead to some unwanted effects: 
    >  Sudden transmission interruptions for multiple DID requests on SID 0x22. 
    >  If the application generally has slow data access, then up to now, without the paged-
    data access, it had only caused some RCR-RP responses on the bus. With paged-
    buffer enabled read data access, a slow data provision could lead to transmission 
    abortion by the TP if the N_as/N_cs are significantly shorter than the application data 
    provision rate. 
    >  Limiting the maximum number of DIDs per service 0x22 request to one will avoid 
    such interruptions, but may also lead to a major deviation from the OEM diagnostic 
    requirements. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    216 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.24.3  Implementation Limitations 
    When paged-data access of a DID is intended to be used, there are still some limitations 
    that have to be considered: 
     
    >  A DID, whose data shall be read via paged-data access, shall only support read 
    operation. No paged-data access for writing or I/O control is possible. So only service 
    0x22 (ReadDataByIdentifier) may use it.  
    >  For DIDs, accessible via service 0x2A (ReadDataByPeriodicIdentifier), paged-data 
    access shall not be used.  
    >  Since those DIDs (0xF200-0xF2FF) are limited to only 7 bytes of data (on CAN) it 
    makes also no real sense to apply this concept. 
    >  Paged-data access cannot be used for DIDRanges (see 9.19 Handling with DID 
    Ranges).  
    >  The support of DIDRanges and the paged-data access DIDs lead to contradictory 
    concepts regarding the design of service 0x22 processor:  
    >  For paged-data access DID, the length of the DID shall be known prior reading the 
    data and starting the positive response transmission. 
    >  For DIDRanges due to a lack of appropriate interfaces, the response data length is 
    first known to DCM after the data reading has finished. 
    Thus, it is not possible to have both DIDRanges and paged-data access DID within 
    the same DCM configuration.  
    >  Service 0x2C (DynamicallyDefineDataIdentifier) shall not be supported in DCM 
    configurations with paged-data access DID. 
     
    9.24.4  Usage 
    From  application point  of  view,  paged-data  reading  concept  using  the new  DataServices 
    port  operation  does  not  differ  very  much  from  the  AUTOSAR  data  reading  via  an 
    asynchronous port interface.  
    Any single return value of the new ReadData() (paged-data-reading) is described in details 
    within its API description table.  
    For simplification reasons the following pictures show the DCM to application flow reading 
    a  single  DID,  consisting  of  a  single  data  signal,  that  provides  its  content  via  paged-data 
    access.  The  ReadDataLength()  usage  in  the  example  is  only  to  show  that  paged-DID 
    signals can also have dynamic length. 
    The following scenarios are covered below: 
      Straightforward DID Paged-Data Reading 
      Error Handling During DID Paged-Data Reading 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    217 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.24.4.1  Straightforward DID Paged-Data Reading 
     sd DID PagedBuffer Normal Flow
    PduR
    Dcm
    PagedDid_SERVER
    Dcm_TpRxIndication(0x22, PAGED_DID)
    Dcm_MainFunctionWorker()
    opt gather current data size
    ReadDataLength(DID length) :Std_ReturnType
    [only if the DID data has dynamic length]
    :DCM_E_OK
    Example for data 
    immediately available 
    and written into the 
    paged buffer.
    ReadData(DCM_INITIAL, Data, AvailableBufferSize) :Std_ReturnType
    :DCM_E_BUFFERTOOLOW
    CopyData()
    PduR_<User:Up>Transmit(Std_ReturnType, PduIdType, PduInfoType*)
    :E_OK
    loop CopyAv ilableDataChunk to TP
    [until a buffer underrun occurs]
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    :BUFREQ_OK
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    GetNextData()
    :BUFREQ_E_BUSY
    loop paged data currently not av ailable
    Dcm_MainFunctionWorker()
    [until other result than DCM_E_PENDING returned]
    ReadData(DCM_PENDING, Data, AvailableBufferSize) :Std_ReturnType
    :DCM_E_PENDING
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    Example for source 
    :BUFREQ_E_BUSY
    data temporarily not 
    available.
    Example for the last call where all of the data to be transferred are copied to
    DCM.
    Note: If the data server returns DCM_E_OK, before reaching the 
    configured/gathered by ReadDataLength operation DID data length, DCM 
    will invoke DET and cancel the response transmission due to lack on 
    ReadData(DCM_PENDING, Data, AvailableBufferSize) :Std_ReturnType
    diagnostic data.
    :DCM_E_OK
    loop copy all left data
    [until all data is transfered to TP]
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    :BUFREQ_OK
    Dcm_TpTxConfirmation(E_OK)
     
    Figure 9-1  Straightforward DID paged-data reading 
     
    9.24.4.2  Error Handling During DID Paged-Data Reading 
    There are certain situations where the paged-data reading can be prematurely aborted: 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    218 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  On response transmission abortion initiated by the TP layer caused by: 
    >  Too slow data provision by the application, which lead to a N_as/N_cs timeout. 
    >  Connection interrupted by the diagnostic client (i.e. no flow-control was sent). 
    >  Other communication bus error has enforced the TP to abort the transmission. 
    >  On protocol preemption via a higher priority client (e.g. OBD vs. UDS); 
    >  On hitting RCR-RP limitation (if configured) caused by: 
    >  Too slow data provision by the application (over several seconds or even minutes). 
    >  Application deadlock that leads to an inability even to initiate the response 
    transmission. 
    The figures below depict these situations and how the application is notified about the job 
    interruption.  
    The common part is: the ReadData() (paged-data-reading) will be always called with 
    OpStatus = DCM_CANCEL to notify the application that: 
    >  it can initialize now any internal states (e.g. releasing semaphores), 
    >  this is the last call of this data operation for current diagnostic service processing.  
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    219 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     sd DID PagedBuffer Appl Too Slow
    PduR
    Dcm
    PagedDid_SERVER
    Dcm_TpRxIndication(0x22, PAGED_DID)
    Dcm_MainFunctionWorker()
    opt gather current data size
    ReadDataLength(DID length) :Std_ReturnType
    [only if the DID data has dynamic length]
    :DCM_E_OK
    Example for data 
    immediately available 
    and written into the 
    ReadData(DCM_INITIAL, Data, AvailableBufferSize) :Std_ReturnType
    paged buffer.
    :DCM_E_BUFFERTOOLOW
    PduR_<User:Up>Transmit(Std_ReturnType, PduIdType, PduInfoType*)
    CopyData()
    :E_OK
    loop CopyAv ilableDataChunk to TP
    [until a buffer underrun occurs]
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    :BUFREQ_OK
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    GetNextData()
    :BUFREQ_E_BUSY
    loop paged data currently not av ailable
    Dcm_MainFunctionWorker()
    [until other result than DCM_E_PENDING returned]
    ReadData(DCM_PENDING, Data, AvailableBufferSize) :Std_ReturnType
    :DCM_E_PENDING
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    Example for source 
    :BUFREQ_E_BUSY
    data temporarily not 
    available.
    Dcm_TpTxConfirmation(E_NOT_OK)
    Dcm_MainFunctionWorker()
    Example for TP closing the connection due to a N_as/N_cs 
    timeout detection - the application was not able to provide 
    ReadData(DCM_CANCEL, Data, AvailableBufferSize) :Std_ReturnType
    sufficient data within the appropriate time.
    :Don't Care
     
    Figure 9-2  DID paged-data reading cancelled due to TP layer transmission abortion 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    220 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     sd DID PagedBuffer Premature Job Termination (Protocol Preemption)
    PduR
    Dcm
    PagedDid_SERVER
    Dcm_TpRxIndication(0x22, PAGED_DID)
    Dcm_MainFunctionWorker()
    opt gather current data size
    ReadDataLength(DID length) :Std_ReturnType
    [only if the DID data has dynamic length]
    :DCM_E_OK
    Example for data 
    immediately available 
    and written into the 
    ReadData(DCM_INITIAL, Data, AvailableBufferSize) :Std_ReturnType
    paged buffer.
    CopyData()
    :DCM_E_BUFFERTOOLOW
    PduR_<User:Up>Transmit(Std_ReturnType, PduIdType, PduInfoType*)
    :E_OK
    loop CopyAv ilableDataChunk to TP
    [until a buffer underrun occurs]
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    :BUFREQ_OK
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    GetNextData()
    :BUFREQ_E_BUSY
    alt Protocol Preemption during reading a paged data
    [no additional data from application yet needed]
    Dcm_TpRxIndication(OBD scan tool request)
    Example of a protocol 
    Dcm_MainFunctionWorker()
    preemption due to a 
    ReadData(DCM_CANCEL, Data, AvailableBufferSize) :Std_ReturnType
    higher priority 
    diagnostic client 
    :Don't Care
    request reception. 
    [waiting for additional data from application]
    loop paged data currently not av ailable
    Dcm_MainFunctionWorker()
    [until other result than DCM_E_PENDING returned]
    ReadData(DCM_PENDING, Data, AvailableBufferSize) :Std_ReturnType
    :DCM_E_PENDING
    Dcm_CopyTxData(BufReq_ReturnType, PduIdType, PduInfoType*, RetryInfoType*, PduLengthType**)
    Example for source 
    :BUFREQ_E_BUSY
    data temporarily not 
    available.
    Dcm_TpRxIndication(OBD scan tool request)
    Dcm_MainFunctionWorker()
    ReadData(DCM_CANCEL, Data, AvailableBufferSize) :Std_ReturnType
    :Don't Care
     
    Figure 9-3  Protocol preemption during DID paged-data access 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    221 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     sd DID PagedBuffer Premature Job Termination (RCR-RP limit)
    PduR
    Dcm
    PagedDid_SERVER
    Dcm_TpRxIndication(0x22, PAGED_DID)
    Dcm_MainFunctionWorker()
    opt gather current data size
    ReadDataLength(DID length) :Std_ReturnType
    [only if the DID data has dynamic length]
    :DCM_E_OK
    ReadData(DCM_INITIAL, Data, AvailableBufferSize) :Std_ReturnType
    Example for data 
    temporarily not 
    CopyData()
    available.
    :DCM_E_PENDING
    loop Application still cannot prov ide any data
    [(result == DCM_E_PENDING) OR ( RCR-RP limit reached)]
    alt Waiting for the v ery first application data
    [RCR-RP limit not reached]
    Dcm_MainFunctionWorker()
    ReadData(DCM_PENDING, Data, AvailableBufferSize) :Std_ReturnType
    :DCM_E_PENDING
    opt RCR-RP Transmission
    [P2/P2Star Timeout]
    PduR_<User:Up>Transmit([}x7F 0x22 0x78])
    [RCR-RP limit reached]
    Dcm_MainFunctionWorker()
    ReadData(DCM_CANCEL, Data, AvailableBufferSize) :Std_ReturnType
    :Don't Care
    PduR_<User:Up>Transmit([0x7F 0x22 0x10])
     
    Figure 9-4  RCR-RP limit reached during DID paged-data access 
     
    9.24.5  Configuration Aspects 
     
     
    Note 
    The DCM parameter 
      /Dcm/DcmConfigSet/DcmPageBufferCfg/DcmPagedBufferEnabled has no effect on the 
    paged-data access of a DID. It affects only the paged-buffer support on service 0x19. 
    In this way both services (0x19 and 0x22) can be independently configured for using 
    paged-buffer data reading. 
     
     
    To configure a DID signal for paged-data access, the DCM BSWMD file has to be changed 
    in the following way: 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    222 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Parameter: /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    was extended by two new values: 
    >  USE_PAGED_DATA_ASYNCH_CLIENT_SERVER – for SWC implementations 
    >  USE_PAGED_DATA_ASYNCH_FNC – for callouts in ComplexDeviceDrivers. 
    From the parameters and containers already defined by AUTOSAR the following ones are 
    only allowed to be used in context of a DID with paged-data access: 
    On DID level: 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidIdentifier 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidUsed 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidInfoRef 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead 
    – with all sub-parameters 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidSignal – with all sub-
    parameters 
    On DID Data level: 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataConditionCheckReadFncUs
    ed 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataConditionCheckReadFnc 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataReadFnc 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataSize 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataInfoRef 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspDataInfo/DcmDspDataFixedLength 
     
    9.25  How to Get Security-Access Level Specific Fixed Byte Values 
    9.25.1  Introduction 
    In  some  ECU  projects  it  is  desired,  that  some  or  all  security-access  level  calculation 
    algorithm shall use additional, level specific fixed bytes set to provide better flexibility and 
    higher  security  protection.  The  latter  is  guaranteed  by  the  split  knowledge  between 
    provided implementation and project specific concrete values calculation.  
    Additionally,  the diagnostic clients  shall know these fixed bytes values,  so in  such  cases 
    these values are  located within  the diagnostic data exchange document  (ODX/CANdela) 
    imported by the system supplier into the MICROSAR DCM configuration. In that way, both 
    diagnostic client and server (ECU) have always the correct values. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    223 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    To  achieve  this  goal,  MICROSAR  DCM  extends  the  AR  DCM  standard  ECUC 
    configuration  model  by  a  new  set  of  parameters  (refer  to  the  Configuration Aspects),  as 
    well as a new provided port operation Dcm_GetSecurityLevelFixedBytes(). 
     
    9.25.2  Usage 
    Once  the  fixed  bytes  are  specified  for  the  corresponding  security  levels,  the  DCM 
    application  implementer has the opportunity to access them within its  software,  by using 
    the newly introduced provided port operation Dcm_GetSecurityLevelFixedBytes(). 
     
    9.25.3  Security Level Fixed Bytes variant handling with VSGs 
    The DCM provides a means to define a set of security fixed byte values for a security level 
    and to assign each fixed byte value to a Vehicle System Group. The required security fixed 
    byte values can be enabled or disabled at run time of the ECU by enabling or disabling the 
    corresponding Vehicle System Group.  
    The  operation  Dcm_GetSecurityLevelFixedBytes()  will  provide  one  of  the  enabled  fixed 
    byte values. If all fixed byte values of a security level are disabled the operation will act as 
    if there were no fixed bytes configured for this level. 
    For detailed information see also 9.34 Vehicle System Group Support. 
     
    9.25.4  Configuration Aspects 
    If  a  security  level  shall  provide  a  fixed  bytes  set  to  the  application,  then  the  following 
    container shall exist: 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    FixedBytes 
    For each fixed byte value, belonging to the set, an instance of the parameter below shall 
    be specified: 
    >  /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    FixedBytes/DcmDspSecurityFixedByteValue 
     
     
     
    FAQ 
    For the fixed bytes sets definition, the following rules do apply: 
     

    It is allowed to define fixed byte sets only for some security-access levels; 

    It is allowed to have security-access level specific set size (e.g. one level with 5 
    bytes, another with 15); 

    The order of creation of each byte value parameter within a set must be the 
    same as the expected order of the values to be reported later to the application. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    224 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.26  How to Extend the Diag Keep Alive Time during Diagnostics 
    9.26.1  Problem Description 
    Per  specification  (see  [1])  DCM  shall  keep  the  ECU  alive  (awaken)  for  a  diagnostics 
    reason under following circumstences: 
    >  While in the default diagnostic session: as long as there is a diagnostic service in 
    processing. 
    >  While in a non-default session: as long as the DCM has not entered the default 
    session again. 
    In some projects it is required that the ECU shall be kept alive for a certain time period 
    after the processing of a diagnostic request is finished. This leads to changes in the above 
    listed situations as follows: 
    DCM will keep the ECU alive for a diagnostic reason when: 
    >  While in the default diagnostic session:  
    >  as long as there is a diagnostic service in processing  
    >  OR for the time period after the service processing is accomplished until the 
    configured keep-alive time elapses. 
    >  While in a non-default session:  
    >  as long as the DCM has not entered the default session again 
    >  OR as long as the running keep-alive timer is active. This condition is of course only 
    applicable if the keep-alive time is configured to a value greater than the S3 time (set 
    to 5000ms) since the keep-alive timer and the S3 timer are startet at the same time. 
     
    9.26.2  Configuration Aspects 
    If such an extended time period for keep ECU alive is required, then please set up DCM in 
    the configuration tool by specifying the keep-alive time in parameter: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmKeepAliveTime 
    9.27  How to Recover DCM State Context on ECU Reset/ Power On 
    9.27.1  Introduction 
    There  are  situations,  where  the  ECU  shall  perform  reset/power  shutdown,  but  without 
    losing some DCM internal states. Such states are for example: 
    >  Active diagnostic session; 
    >  Active security access level (if applicable); 
    >  The already managed communication control states (if applicable); 
    >  Active state of control DTC setting (if applicable); 
    >  Active state of any managed by DCM communication channel (DiagActive state) 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    225 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    Since this is not a feature supported by the AR standard per definition it was implemented 
    in DCM for optional use only (refer to the configuration chapter below). 
     
    9.27.2  Functionality 
    In order to support the state context recovery, DCM has been extended by two new APIs 
    for providing the data to be recovered on demand (Dcm_ProvideRecoveryStates()) and to 
    retrieve this data back on each reset /power on phase (Dcm_GetRecoveryStates()).  
    The data to be transferred is stored in the structure Dcm_RecoveryInfoType. 
     
     
     
    Caution 
    Please do always use both API to store and restore the context information. Only 
      compatible versions of this data shall be used. Since the transferred data primarily 
    consists of DCM internal data representation, it shall not be passed to DCM except if it 
    was retrieved via the Dcm_ProvideRecoveryStates() API call. 
     
     
     
    On any state change (recovery data with default state does not have any effect), DCM will 
    execute all notifications and actions related to that state transition. Due to this, DCM 
    always executes the recovery process in the best applicable order for dependent states. 
    For example: 
    >  If security access and session change have to be switched, then first the session 
    change will apply then the security access level in order not to reset the security level 
    during the session transition. 
    >  If ControlDTCSetting shall be disabled and CommunicationControl shall apply too, 
    then first the DTC setting will be disabled, and then the communication channels will 
    change their states in order to avoid any unnecessary fault memory entries. 
     
    9.27.3  Configuration Aspect 
    If  the  recovery  state  feature  is  required  for  your  project,  please  change  the  following 
    parameter as described in its online help: 
    /Dcm/DcmConfigSet/DcmGeneral/DcmStateRecoveryAfterResetEnabled 
     
    9.28  How to Define a Diagnostic Connection without USDT Responses  
    Sometimes it may be necessary on a specific connection to suppress all kind of responses 
    (positive  or  negative)  in  general.  In  order  to  configure  such  a  connection,  you  have  to 
    delete the following sub-container of it: 
    /Dcm/DcmConfigSet/DcmDsl/DcmDslProtocol/DcmDslProtocolRow/DcmDslConnection/Dc
    mDslMainConnection/DcmDslProtocolTx 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    226 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.29  How to Handle Multiple Diagnostic Service Variants 
    9.29.1  Introduction 
    DCM  provides  a  means  to  execute  filtering  process  on  incoming  requests  at  service, 
    subservice, DID, RID, and DID operation level. For example, if a specific DID is configured 
    in  ECUC to be available for read and write purposes,  the user is capable of using DCM 
    tools to update the configuration at run-time and to make the DID available only for read 
    purposes. So when a request comes with writing in that specific DID, the request will be 
    rejected accordingly. 
     
    9.29.2  Filtering Level Availability and the Corresponding Filtering Tools 
    In the following two tables, namelyTable 9-9 and Table 9-10the filtering options available 
    for each service are illustrated along with the corresponding filtering tools.  
     

    Service
    E
     
    2
     

     

    C, 0x
    3D]
    02
     
    2A
    2
    0x
    x
     
     0x
     0x
    &
    &
     

    , 0
    2F]

     
     




    22
    31
    23
    01
    06
    08
    09
    Filtering Level
    l
    24
     
    l
     0x
    [A
    [0x
    0x
    &
    [0x
    [0x
    [0x
    [0x
    [0x
    [0x
    Service 
     
     
     
     
     
     
     
     
    Sub-service (Sub-function) 
     
     
     
     
     
     
     
     
    DID 
     
     
     
     
     
     
     
     
    DID Operation 
     
     
     
     
     
     
     
     
    RID 
     
     
     
     
     
     
     
     
    RID Operation 
     
     
     
     
     
     
     
     
    Memory 
     
     
     
     
     
     
     
     
    Memory Operation 
     
     
     
     
     
     
     
     
    PID 
     
     
     
     
     
     
     
     
    MID 
     
     
     
     
     
     
     
     
    TID 
     
     
     
     
     
     
     
     
    VID 
     
     
     
     
     
     
     
     
    Table 9-9   Filtering level availability 
    In order to get an advantage of DCM extended filtering tools, the extended filtering feature 
    has  to  be  activated  in  the  configuration  tools.  Refer  to  Table  9-10  under  column 
    “Configuration Aspects for more details. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    227 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    Filtered Diagnostic  Filtering API / Callback 
    Configuration Aspects 
    Object 
    Service,  
    Refer to: 6.6.1.2.4 
    Refer to: 9.6 How to Get Notified on a 
    Sub-service (Sub-
    ServiceRequestManufacturerNotific Diagnostic Service Execution Start 
    function) 
    ation_<SWC> 
    and End 
    <Operation> = Indication() 
    DID, DID Operation  Refer to: 
    /Dcm/DcmConfigSet/DcmDsp/ 
    Dcm_FilterDidLookUpResult 
    DcmDspDidLookUpFilterEnabled 
    RID 
    Refer to: 
    /Dcm/DcmConfigSet/DcmDsp/ 
    Dcm_FilterRidLookUpResult 
    DcmDspRidLookUpFilterEnabled 
    RID Operation 
    Refer to: 6.6.1.2.4 
    Refer to: 9.6 How to Get Notified on a 
    ServiceRequestManufacturerNotific Diagnostic Service Execution Start 
    ation_<SWC> 
    and End 
    <Operation> = Indication() 
    Memory, Memory 
    Refer to: 6.6.1.2.4 
    Refer to: 9.6 How to Get Notified on a 
    Operation 
    ServiceRequestManufacturerNotific Diagnostic Service Execution Start 
    ation_<SWC> 
    and End 
    <Operation> = Indication() 
    PID 
    Refer to: 
    Refer to: 
    MID
    9.29.3 Filtering OBD Objects 
    9.29.3 Filtering OBD Objects 
     
    TID 
    VID 
    Table 9-10   Filter diagnostic objects and the corresponding filtering APIs / Callbacks 
     
     
     
    FAQ 
    The  filtering  process  is  executed  on  already  defined  objects  in the  compile-time. The 
      filtering  process  requires  interference  from  the  application.  It  is  not  possible  that  the 
    application enables features via the filtering process in the run-time that is disabled in 
    the first place in the compile-time. In case of OBD2, the application risks upon violation 
    this rule a wrong reported “AvailabilityID” masks by DCM.  
     
     
     
    9.29.3  Filtering OBD Objects 
    In order to filter OBD objects and at the same time to report the appropriate “AvailabilityID” 
    values in the most efficient way, the variant handling on OBD related objects is based on 
    the feature Calibration of Supported OBD Parameter Identifier (refer to chapte9.11.1.2 )
    Since the “calibration” in this case is performed on-board, the calibratable data specified in 
    the reference chapter shall be located in the volatile memory (RAM). To change the 
    calibration data memory location, please use the following parameter:  
    /Dcm/DcmConfigSet/DcmGeneral/DcmCalibrationOfObdIdsMemoryType 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    228 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    The concept requires that the application initializes the calibration data at every ECU 
    power-on/reset, prior the call of the Dcm_Init() function. For that purpose it is advisable for 
    the application to keep prepared sets of the calibration data for each variant in its non-
    volatile memory and just copy it into the DCM volatile memory variant.  
     
    9.29.3.1  Suggested Preparation Methodology for Filtering Process of OBD Objects  
    In order to get a consistent content of these tables in the fastest way, we suggest you to 
    follow the steps below: 
      Create configurations (ECUC) files with Configurator 5 for each variant you need. You 
    will need only the configuration part of DCM, and only few mandatory BSWs which 
    DCM refers to. These references will not be from importance for the purpose of 
    multiple-variant-handling, so they don’t need to be maintained in future. 
      Generate DCM configuration (Dcm_Lcfg.c/.h) for each of those variants.  
      Copy the generated tables described in Table 9-3  Calibrateable OBD “availability 
    parameter identifier” values which exist in Dcm_Lcfg.c to your application. 
      Rename the above copied tables according to the variant they belong to for better 
    identification at the use time.  
      If one variant includes one of the above mentioned tables to be copied while the other 
    does not (OBD service is disabled), make sure to add this table to your configuration 
    anyway with zero entries. 
     
    9.30  How to Switch Between OBD DTR Support by DCM and DEM 
    Starting with AR version 4.1.1 DCM shall implement OBD MIDTID data retrieval for service 
    RequestOnBoardMonitorTestResults  ($06)  not  directly  from  the  application,  but  via  a 
    dedicated DEM API. Still, DCM provides a backward compatibility mode and if configured 
    accordingly, it will handle the DTR values as before.  Reading the following chapters you 
    will learn more about the impacts the new DTR value reporting implementation may have 
    on  your  project.  Then,  if  any  choice  is  possible,  you  can  decide  which  method  you  will 
    prefer to use. 
      
    9.30.1  Implementation Particularities and Limitations 
    Once  DCM  is  configured  to  provide  DTR  handling  via  DEM,  any  already  available  MID 
    resp.  MIDTID  and  MID  DID  (0xF6XX)  in  its  configuration  will  be  discarded.  The 
    configuration  tool  will  inform  you  via  “information”  messages  for  all  ignored  related  OBD 
    MID parameters. 
    This  does  not  mean  that  you  will  have  to  delete  all  these  redundant  data. Any  available 
    DID in range 0xF600-0xF6FF will be used as information for the DCM code generator that 
    it is required a UDS MID mirroring of all of the OBD MIDs. Since DCM does no more know 
    which  are  the  valid  MID  DIDs,  it  catches  the  whole  DID  0xF6XX  range  for  OBD  MID 
    reporting purpose.  
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    229 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
    This implies that: 
    >  The UDS MIDs reported by DCM can only be those defined as MIDs under the DEM 
    configuration. No application specific DIDs (i.e. some DIDs still to be read via C/S port) 
    in the above cited range of identifiers is possible to be defined in DCM. 
    >  Due to the DCM internal redirection of the MID DID handling to a DID range handler, 
    the already known Implementation Limitations on Handling with DID Ranges do apply 
    in this case too. 
     
    9.30.2  Configuration Aspect 
     
     
    Caution 
    The DCM configuration regarding the OBD MIDTID handling shall always be kept 
      synchronized with the current DEM configuration. 
    >  In case DCM is used together with the MSR DEM, it will notify you for any 
    configuration mismatch by a corresponding error message, issued by an error 
    directive at compile time (refer to Table 10-1   Compile time error messages for 
    details on each message). 
    >  In case another DEM vendor implementation is provided to the ECU project, a 
    mismatching configuration between DCM and the DEM will result either in compile 
    time errors (i.e. missing required DEM APIs) or may lead to an unexpected run time 
    behavior as a result of the redundant and incompatible DEM and DCM MIDTID 
    configurations (i.e. DEM does not support a certain MID, TID but DCM does support 
    it or the DEM defines a different TID list for the same MID used within DCM etc.). 
     
     
     
    The OBD MIDTID handling is determined by setting the following DCM ECUC parameter 
    accordingly: /Dcm/DcmConfigSet/DcmGeneral/DcmDtrDataProvisionViaDemEnabled 
    9.31  How to Enable Support of OBD VIDs with Dynamic Length 
    Depending  on  the  DCM AR  SWS  compatibility  mode,  determined  by  the  project  license, 
    the OBD VIDs will be retrieved from the application resp. DEM using corresponding variant 
    of the GetInfotypeValueData() API. As you can see, the new API variant unconditionally (a 
    project license is assumed as a constant property) provides a means for supporting a VID 
    with variable data size. There is no additional configuration parameter to specify whether a 
    certain VID shall have a variable length. 
     
    9.31.1  Implementation Limitations 
    While the VID reading via RequestVehicleInformation ($09) is not really affected by the API 
    changeReadDataByIdentifier ($22) does require some limitations to be taken into 
    account, depending on the API variant. These limitations are of course only applicable if 
    any OBD DIDs in the VID range (0xF800-0xF8FF) are to be supported by DCM. 
     The main difference in the usage of both API types is the point in time the DCM will 
    calculate the final response length. When using APGetInfotypeValueData() in its AR 4.2.2 
    or newer variant, the final response length will be known to DCM _after_ the VID data is 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    230 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    read. This is the same situation as the one already known from chapte9.19 Handling with 
    DID Ranges
     
    and therefore the Implementation Limitations regarding the DID length 
    calculation do apply for these OBD VID DIDs too. Please note, that the maximum DID 
    length of those DIDs is determined by the corresponding VID data size parameter, as 
    specified in 5.8.4 Configuration Aspects.  
    9.32  How to setup DCM for Sender-Receiver Communication 
    Additionally  to  the  Client-Server  Interface  type  of  communication  with  the  application, 
    starting  with  DCM  7.00.00  also  the  Sender-Receiver  kind  is  supported  for  the  following 
    diagnostic services only: 
    >  Data Identifier (DID) related: 
    >  Read Access: 
    >  ReadDataByIdentifier ($22)  
    >  ReadDataByPeriodicIdentifier ($2A) 
    >  Write Access: 
    >  WriteDataByIdentifier ($2E) 
    >  IO Control: 
    >  InputOutputControlByIdentifier ($2F) (first available in DCM 7.01.00) 
    The read and write S/R communication can be applied on a single DID data element or for 
    the  whole  DID  package  as  a  single  unit.  The  latter  is  required  for  the  NvM  SW-C 
    communication to guarantee that all the data of a single NvM block is written consistently. 
     
    9.32.1  Implementation Limitations 
    When  using  the  DCM  S/R  communication  some  limitations  and  particularities  shall  be 
    considered: 
    >  The data element or DID shall have constant length. 
    >  The data element or DID shall represent data that is synchronously accessible (the IO 
    Control operation is an exception of this rule). 
    >  For the DID related read and write operations, the supported elements’ base data 
    types are: 
    >  Atomics: (u|s)int(8|16|32) 
    >  Fields: (u|s)int8 
    >  For the DID related IOControl operations, the supported element data types are: 
    >  Atomics: uint(8|16|32) 
    >  Fields: uint8 
    >  CEMR: Limited by AR up to 4 bytes 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    231 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  If a DID supports any other operation than the above listed (i.e. 
    GetScalingInformation()), those operations will be treated as if the data element was 
    specified to have access of kind “SYNCH_FNC”. Therefore a callout will be expected 
    to be implemented by the application for the affected configuration object. 
    9.32.2  Application usage Scenario 
    In order to get S/R IOControl operation working with your application, the following design 
    aspects shall be considered: 
    >  On diagnostic request for service InputOutputControlByIdentifier ($2F)  
    On each valid diagnostic request for an IO DID, DCM either delegates the IOControl job to 
    the corresponding C/S port or performs multiple S/R port operation as a form of 
    communication with the application. In the latter case if the requested IOControl operation 
    is “ReturnControlToECU” DCM executes the same sequence of S/R port operations as for 
    the diagnostic session transition, described in the next section. The only difference is that 
    not all IO channels of the IO DID will be reset, but only the ones, marked via the CEMR by 
    the diagnostic client. For any other IOControl operation DCM will perform the following 
    steps (per IO DID): 
    >  If the operation was “ShortTermAdjustment” the “controlState” data will be updated 
    with the content of the diagnostic request. 
    >  The “controlEnableMask” will be updated with the content of the diagnostic request 
    CEMR. (Please, read carefully the specifics of the CEMR handling in the 
    corresponding chapteInputOutputControlByIdentifier ($2F)). 
    >  At last the “inputOutputControlParameter” will be set to the requested IOControl 
    operation (e.g. DCM_SHORT_TERM_ADJUSTMENT), indicating that all related to 
    this operation parameters are already set and the operation can be executed. 
    >  DCM starts waiting for the operation result (IOControlResponse). The wait state 
    persists as long as the corresponding S/R has not yet been updated by the 
    application, or DCM reads one of the values DCM_IDLE or 
    DCM_RESPONSE_PENDING. 
    >  Once DCM reads any other from the above mentioned values (i.e. application has 
    finished validation of the requested operation), the diagnostic service processing 
    continues with: 
    If the result in IOControlResponse was DCM_POSITIVE_RESPONSE: 
    >  The “underControl” will be updated by adding the requested bits from the CEMR. 
    >  The “inputOutputControlParameter” will be set to DCM_IDLE, indicating to the 
    application that the operation is now accomplished. 
    >  DCM will now call the S/R port of the read operation to return to the client the actual 
    IO DID values within the positive response. 
    In any other case for IOControlResponse, DCM will take the value as NRC for the initiated 
    negative response that will follow. 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    232 
    based on template version 5.0.0 



    Technical Reference MICROSAR DCM 
     
    >  On diagnostic session transition to a session  
    Once  DCM  performs  a  diagnostic  session  transitions  to  the  default  session  or  to  a  non- 
    default  session  where  an  IO  DID  under  control  is  no  longer  supported,  the 
    “ReturnControlToECU”  operation  of  the  affected  DID  is  executed.  For  the  S/R  IOControl 
    DIDs the following steps will be performed (per IO DID): 
    >  The “underControl” data will be updated with all bits set to zero, indicating no IO 
    channel of this DID is under control. 
    >  The “controlEnableMask” will be updated with all bits set, indicating all IO DID 
    channels will be set back to normal mode. 
    >  At last the “inputOutputControlParameter” will be set to 0x00 (i.e. 
    DCM_RETURN_CONTROL_TO_ECU), indicating that all parameters related to this 
    operation are already set and the operation can be executed. 
     
     
     
    Note 
    Since the IOControl operation “ReturnControlToECU” is a synchronous one that must 
      always succeed, DCM will not expect any negative or pending response from the 
    application via the IOControlResponse_<XX> S/R port. This is also the case, when this 
    operation is executed upon an explicit diagnostic client request. 
     
    This implies that the application shall not expect that for “ReturnControlToECU” 
    the “inputOutputControlParameter” will be set to DCM_IDLE by DCM at a later 
    point!
     
     
     
     
     
     
     
    9.32.3  Configuration Aspects 
    >  In order to enable S/R communication on DIDs, you have to specify the RTE usage on 
    the corresponding DID data elements to be SENDER_RECEIVER: 
     
    /Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort 
    >  Additionally, if the S/R communication shall be applied on DID level (i.e. all DID data 
    elements will be merged into a single data block with the total length of the DID), then 
    following parameter shall be set accordingly: 
     
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDid/DcmDspDidUsePort 
    For usage details of these particular parameters, please refer to the Configurator5 online 
    help. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    233 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    9.33  How to Support Routine Info Byte with UDS RIDs  
    9.33.1  Introduction 
    The  Routine  Info  Byte  is  a  manufacturer  specific  value  that  is assigned  to  a  routine  and 
    that  can  be  reported  to  the  tester  when  the  diagnostic  service  RoutineControl  ($31)  is 
    requested. The  DCM  provides  a  means  to  report  this  Routine  Info  Byte  without  need  of 
    application intervention. 
     
    9.33.2  Configuration Aspects 
    If the DCM shall report the Routine Info Byte of a routine automatically, specify the value of 
    the Routine Info Byte using following parameter: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRoutineInfoByte 
    For every routine where this parameter is not supported, the application has to provide the 
    Routine Info Byte if needed. 
     
    9.34  Vehicle System Group Support 
    9.34.1  Introduction 
    Vehicle  System  groups  (VSGs)  is  a  multi  configuration feature  that  provides  a  means to 
    define  sub-sets  of  diagnostic  entities  at  configuration  time  that  can  be  activated  and 
    deactivated at run time in the ECU. Deactivated entities will not be available at run time. 
     
    9.34.2  Functionality 
    A sub-set is defined by assigning a diagnostic entity to a VSG. A diagnostic entity can be 
    assigned to one or several VSGs. The entity will be available at run time if at least one of 
    the corresponding VSGs is enabled. Diagnostic entities that are not assigned to a VSG are 
    part of the base variant and thus they are always available. 
    During initialization of DCM all configured VSGs will be disabled. The DCM application is 
    responsible to enable all required VSGs after the initialization. 
    The base variant is always enabled and can not be disabled. 
     
    9.34.3  VSG operations 
    Beside the operations to enable and disable VSGs, the DCM provides also operations to 
    request the current state of the VSGs: 
    >  6.2.2.8   Dcm_VsgSetSingle() 
    >  6.2.2.9 Dcm_VsgSetMultiple() 
    >  6.2.2.10 Dcm_VsgIsActive() 
    >  6.2.2.11 Dcm_VsgIsActiveAnyOf() 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    234 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
     
    9.34.4  Configuration Aspects 
    All VSGs that shall be supported have to be defined: 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspVehicleSystemGroups 
     
    Following diagnostic entities can be assigned to the defined VSGs: 
    >  Service 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSidTabV
    ehicleSystemGroupRef 
    >  SubService 
    /Dcm/DcmConfigSet/DcmDsd/DcmDsdServiceTable/DcmDsdService/DcmDsdSubSer
    vice/DcmDsdSubServiceVehicleSystemGroupRef 
    >  DID Operations (Read, Write, IO control) 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidRead/D
    cmDspDidReadVehicleSystemGroupRef 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidWrite/D
    cmDspDidWriteVehicleSystemGroupRef 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidAccess/DcmDspDidControl
    /DcmDspDidControlVehicleSystemGroupRef 
    >  Memory access operations (Read, Write) 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspMemory/DcmDspMemoryIdInfo/DcmDspRead
    MemoryRangeInfo/DcmDspReadMemoryRangeVehicleSystemGroupRef 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspMemory/DcmDspMemoryIdInfo/DcmDspWriteM
    emoryRangeInfo/DcmDspWriteMemoryRangeVehicleSystemGroupRef 
    >  RID 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRoutineInfo/DcmDspRoutineAuthorization/Dcm
    DspRoutineVehicleSystemGroupRef 
    >  PID 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidSvc01VehicleSystemGroupRef 
    >  TID 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspRequestControl/DcmDspRequestControlVehicl
    eSystemGroupRef 
    >  MID 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspTestResultByObdmid/DcmDspTestResultObdmi
    dTid/DcmDspTestResultByObdmidVehicleSystemGroupRef 
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    235 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    >  VID 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspVehInfo/DcmDspVehInfoVehicleSystemGroupR
    ef  
    >  Security Level Fixed Bytes (see also 9.25.3 Security Level Fixed Bytes variant 
    handling with VSGs) 
    /Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity/DcmDspSecurityRow/DcmDspSecurity
    FixedBytes/DcmDspSecurityFixedByteVehicleSystemGroupRef 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    236 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    10  Troubleshooting 
    10.1  Compile Error Messages 
    This chapter describes the error situations the DCM code checks and catches at compile 
    time. 
     
    Error Message 
    Reason 
    Countermeasure 
    Service 0x2A is enabled, but 
    You have activated service  
    - Remove the service from the 
    no periodic messages have 
    ReadDataByPeriodicIdentifier 
    DCM configuration.  
    been configured for Dcm. 
    ($2A) but have no periodic 
    - Check if any available 
    Please, refer to the Dcm 
    connection specified. 
    periodic messages in the 
    TechRef for SID 0x2A 
    communication layers used by 
    configuration aspect. 
    DCM. 
    - Check for periodic 
    connections not automatically 
    recognized by the configuration 
    tool. 
    Vendor specific version 
    The Dcm.c and Dcm.h are not  - Check for correct sources 
    numbers of Dcm.c and Dcm.h  from the same delivery. 
    resp. re-update the sources 
    are inconsistent 
    from the delivered package. 
    Mismatching OEMs between 
    - Using the DCM code intended  - Check for correct sources 
    static and generated code 
    for another OEM. 
    resp. re-update the sources 
    - Using wrong configuration 
    from the delivered package.  
    tool output for this project. 
    - Check for using correct 
    configuration tool generation 
    output (Dynamic Files). 
    Unsupported PduR version! 
    Unrecognized/unsupported 
    Refer t9.17 How to Deal with 
    PduR version is specified. 
    the PduR AR version. 
    Missing information for the 
    - The DCM could not retrieve 
    - Refer t5.13.3.1Reporting 
    supported DTC Extended Data  any extended data record 
    Stored DTC Environment Data 
    Records! See DCM TechRef! 
    information from the DEM 
    for information about this 
    module or it is a non-
    configuration. 
    MICROSAR DEM. 
    - Correct the MICROSAR DEM 
    - In a MICROSAR DEM no 
    configuration. 
    extended data records are 
    - Remove the corresponding 
    defined. 
    DCM 
    - In a MICROSAR DEM no 
    ReadDiagnosticInformation 
    DTC refers an extended data 
    ($19) sub-function since 
    record. 
    obviously not required when 
    the DEM does not specify any 
    records. 
    Missing information for the 
    - The DCM could not retrieve 
    - Refer t5.13.3.1Reporting 
    supported DTC Freeze Frame  any snapshot data record 
    Stored DTC Environment Data 
    Records! See DCM TechRef! 
    information from the DEM 
    for information about this 
    module or it is a non-
    configuration. 
    MICROSAR DEM. 
    - Correct the MICROSAR DEM 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    237 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Error Message 
    Reason 
    Countermeasure 
    - In a MICROSAR DEM no 
    configuration. 
    snapshot records are defined.  - Remove the corresponding 
    - In a MICROSAR DEM no 
    DCM 
    DTC refers a snapshot record.  ReadDiagnosticInformation 
    - In a MICROSAR DEM all 
    ($19) sub-function since 
    DTC has been specified to 
    obviously not required when 
    have up to zero (0) snapshot 
    the DEM does not specify any 
    records if calculated snapshot  records. 
    records are chosen. 
    Unknown DEM AR API 
    Unrecognized/unsupported 
    Refer t9.13 How to Select 
    interface! 
    DEM API version is specified. 
    DEM-DCM Interface Version. 
    Too many system timers! 
    Internal error – DCM design 
    Try reducing the maximum 
    limits reached. 
    number of schedulable DIDs or 
    number of periodic messages 
    per connection (refer to 
    ReadDataByPeriodicIdentifier 
    ($2A)
    )
     
    DCM configured to handle 
    OBD DID MIDs via DCM 
    configuration, but MID handling 
    is done by DEM. 
    This message can be issued 
    DCM configured to handle 
    only if MSR DEM is used 
    OBD DID MIDs via DEM 
    together with MSR DCM. 
    Refer to the 9.30 How to 
    configuration, but no MID 
     
    Switch Between OBD DTR 
    handling is done by DEM. 
    Either the MSR DEM has been  Support by DCM and DEM for 
    DCM configured to handle 
    configured to handle OBD 
    details on OBD DTR handling 
    OBD MIDs via DCM 
    DTRs as per AR 4.2.2, but at 
    and the configuration aspects. 
    configuration, but MID handling  the same time, DCM is 
    is done by DEM. 
    configured to this job too 
    or vice-versa. 
    DCM configured to handle 
    OBD MIDs via DEM 
    configuration, but no MID 
    handling is done by DEM. 
    DID ranges are not allowed if 
    Incompatible features have 
    Refer t9.24.3 Implementation 
    any paged DID is configured! 
    been activated.  
    Limitations  for details on using 
    paged DIDs. 
    Paged DIDs are not allowed if  Incompatible features have 
    Refer t9.31.1 Implementation 
    any OBD2 VIDs as per AR4.2.2  been activated. 
    Limitations for details on using 
    are enabled! 
    OBD2 VIDs with AR 4.2.2 API. 
    Any other message 
    Internal inconsistency 
    Contact Vector. 
    detection.  
    Table 10-1   Compile time error messages 
    10.2  Code Generation Time Messages 
    Here  are  listed  only  some  of  the  specific  error/warning/information  messages  that  may 
    occur during code generation for MSR DCM. 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    238 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Message ID 
    Reason 
    Description 
    DCM05010 
    The control operation over a DID has 
    been defined to have different 
    execution preconditions for the state 
    group “session” in multiple variants. 
    DCM05011 
    The read operation over a DID has 
    been defined to have different 
    execution preconditions for the state 
    group “session” in multiple variants. 
    DCM05012 
    The write operation over a DID has 
    been defined to have different 
    execution preconditions for the state 
    group “session” in multiple variants. 
    DCM05013 
    An RID has been defined to have 
    different execution preconditions for 
    the state group “session” in multiple 
    variants. 
    DCM05014 
    diagnostic service has been 
    defined to have different execution 
    preconditions for the state group 
    session” in multiple variants. 
    DCM05015 
    diagnostic sub-service has been 
    defined to have different execution 
    Refer t9.18.1.2.1 Handling of State 
    preconditions for the state group 
    Execution Preconditions of Variant 
    session” in multiple variants. 
    Diagnostic Entities to learn more about 
    DCM05020 
    The control operation over a DID has  multiple variants and execution 
    been defined to have different 
    preconditions variance. 
    execution preconditions for the state 
    group “security access” in multiple 
    variants. 
    DCM05021 
    The read operation over a DID has 
    been defined to have different 
    execution preconditions for the state 
    group “security access” in multiple 
    variants. 
    DCM05022 
    The write operation over a DID has 
    been defined to have different 
    execution preconditions for the state 
    group “security access” in multiple 
    variants. 
    DCM05023 
    An RID has been defined to have 
    different execution preconditions for 
    the state group “security access” in 
    multiple variants. 
    DCM05024 
    diagnostic service has been 
    defined to have different execution 
    preconditions for the state group 
    security access” in multiple variants. 
    DCM05025 
    diagnostic sub-service has been 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    239 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    Message ID 
    Reason 
    Description 
    defined to have different execution 
    preconditions for the state group 
    security access” in multiple variants. 
    Table 10-2   Code Generation Time Messages 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    240 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    11  Glossary and Abbreviations 
    11.1  Glossary 
    Term 
    Description 
    Configurator 5 
    Configuration and generation tool for MICROSAR components 
    Table 11-1   Glossary 
    11.2  Abbreviations 
    Abbreviation 
    Description 
    ALFID 
    Address and Length Format Identifier 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    C/S 
    Client/Server (Port) 
    CDD 
    Complex Device Driver 
    CEM 
    Control Enable Mask 
    CEMR 
    CEM Record 
    DCM 
    Diagnostic Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DDID 
    Dynamic DID 
    DID 
    Data Identifier 
    DTR 
    Diagnostic Test Result 
    ECU 
    Electronic Control Unit 
    EWT 
    Event Window Time 
    FC.OVFW 
    Flow Control with status Overflow 
    FBL 
    Flash Boot Loader 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    MID 
    Monitor Identifier 
    NRC 
    Negative Response Code 
    N_TA 
    Node Target Address 
    OBD2 
    On Board Diagnostics 2 
    OCY 
    Operation Cycle 
    PBS 
    Post Build Selectable (variant handling) 
    PBL 
    Post Build Loadable (variant handling) 
    PDID 
    Periodic DID 
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    241 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    PID 
    Parameter Identifier 
    PPort 
    Provide Port 
    RID 
    Routine Identifier 
    ROE 
    Response on Event 
    RPort 
    Require Port 
    RTE 
    Runtime Environment 
    S/R 
    Sender/Receiver (Port) 
    SADR 
    Security Access Data Record 
    SNS 
    Service Not Supported 
    SNV 
    Symbolic Name Value 
    SRS 
    Software Requirement Specification 
    STRT 
    Service To Respond To 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    TID 
    Test Identifier 
    VID 
    Vehicle Identification Number 
    Table 11-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    242 
    based on template version 5.0.0 


    Technical Reference MICROSAR DCM 
    12  Contact 
    Visit our website for more information on 
     
      News 
      Products 
      Demo software 
      Support 
      Training data 
      Addresses 
     
    www.vector.com 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 7.2 
    243 
    based on template version 5.0.0 

    Document Outline


    1.3.120 - TechnicalReference_Dem

    MICROSAR Diagnostic Event Manager (Dem)

    1.3.122 - TechnicalReference_Dems


     
     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Diagnostic Event Manager 
    (Dem) 
    Technical Reference 
     
    Ford 
    Version 6.0.3 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Thomas  Dedler,  Alexander  Ditte,  Matthias  Heil,  Anna 
    Bosch 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    A. Ditte 
    2012-05-04  1.0.0 
    >  Initial Version 
    A. Ditte 
    2012-10-09  1.0.1 
    >  Add chapter 6.2.4.18 and 6.6.1.2.11 
    >  Add GetEventEnableCondition to chapter 6.6.1.1.2 
    M. Heil 
    2012-11-02 
    1.1.0 
    >  Architecture Update 
    A. Ditte,  
    2013-02-15  1.2.0 
    >  Introduced Measurement and Calibration (chapter 5) 
    M. Heil 
    >  Extended chapters 3.3, 3.5, 3.15, 4.3 and 4.3.1 
    >  Added User Controlled WarningIndicatorRequest 
    (chapter 3.16.1) 
    >  Added chapters 6.2.4.22, 6.2.4.23, 6.6.1.1.9 
    M. Heil 
    2013-04-05  1.3.0 
    >  Support for feature ‘DTC suppression’ 
    >  Added chapter 3.9, APIs 6.2.4.24, 6.2.4.25 
    >  Reworked table layout in chapters 4.3, 5.2 
    >  Reworked Measurement and Calibration (chapter 5) 
    >  Added measurable items (chapter 5.1)  
    M. Heil 
    2013-06-17  1.4.0 
    >  Added combined events 
    >  Reworked suppression 
    T. Dedler 
    2013-07-22  1.4.1 
    >  critical section description extended 
    T. Dedler,   2013-09-04  2.0.0 
    >  Service ID definition changed 
    M. Heil 
    >  Post-Build Loadable 
    A. Ditte 
    2013-11-05 
    2.1.0 
    >  Added OBD DTC and Root cause EventId to chapter 
    3.10.2 
    >  Added limitation for internal data elements in chapter 
    8.3 
    A. Ditte, 
    2014-01-14  3.0.0 
    >  Added J1939 (chapters 3.19, 6.2.7) 
    M. Heil 
    >  Adapted DCM interfaces (chapter 6.2.6) according 
    AUTOSAR 4.1.2 
    >  Added chapter 4.3.1 
    >  Fixed ESCAN00071673: NVM configuration is not 
    described 
    >  Fixed ESCAN00071511: Missing hint for supported 
    feature 'individual post-build loadable' 
    >  Fixed ESCAN00073677: Incorrect figure for DEM 
    initialization states 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    M. Heil 
    2014-03-27  3.1.0 
    >  Describe deviation in handling operation cycles before 
    module initialization. 
    >  Add dependency to configuration to Dcm APIs. 
    >  Added warning about time-based de-bouncing and 
    maximum fault detection counter in current cycle 
    M. Heil 
    2014-05-08  3.2.0 
    >  Added Event Availability (chapters 3.9.1, 6.2.4.26) 
    >  Added freeze frame pre-storage (chapters 3.11, 6.2.4.4, 
    6.2.4.5) 
    >  Corrected description of Event and DTC suppression 
    (chapters 3.9, 6.2.4.4, 6.2.4.5) 
    >  Introduced chapter 3.3.3.4 
    >  Clarified usage of DTC groups (chapter 8.3) 
    M. Heil 
    2014-10-14  4.0.0 
    >  Moved Initialization Pointer (see Dem_PreInit(), 
    A. Ditte 
    Dem_Init()) 
    >  Added API Dem_RequestNvSynchronization() 
    >  Added de-bounce values in NVRAM and  API 
    Dem_NvM_InitDebounceData() 
    >  Added additional aging variant (chapter 3.5), added 
    Figure 3-3 
    >  Added missing configuration variants (chapter 2, 
    ESCAN00076237) 
    >  Added description for NVRAM write frequency (chapter 
    3.13.2, ESCAN00078587) 
    >  Added description for NVRAM recovery (chapter 3.13.3, 
    ESCAN00078582) 
    >  Added support of J1939 nodes 
    >  Added Ford limitations (chapter 3.1.1) 
    M. Heil 
    2015-02-27  4.1.0 
    >  Added APIs, chapters 6.2.4.3, 6.2.4.20 
    >  Support EnableCondition notification, 3.15.4 
    >  Added explanation of Dem task mapping, chapter 4.9 
    >  Added not of reduced queue depth for some events, 
    chapter 3.3.3.2 
    >  Updated critical sections, chapter 4.4 
    M. Heil 
    2015-04-20  4.1.1 
    >  Added deviation regarding notification signatures 
    (chapters 6.5.1, 8.1) 
    >  Reworked chapter 3.1 according ESCAN00082555  
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    M. Heil 
    2015-06-17  4.2.0 
    >  Extended data callback support (chapters 3.10.3, 
    6.5.1.6) 
    >  Described FDC statistics for DTCs using internal de-
    bouncing (chapter 3.10.2) 
    >  Described aging target 0 (chapter 3.5.1) 
    >  Described effect of asynchronous behavior of $85 
    (chapter 3.7) 
    >  Described different aging behavior (chapter 3.5.5) 
    M. Heil 
    2015-09-14  4.3.0 
    >  More information about NVRam setup (chapter 4.5 ff) 
    >  Changes due to new option to persist event availability 
    (chapters 3.9.1, 6.2.4.26, 6.2.4.11) 
    M. Heil 
    2015-11-26 
    5.0.0 
    >  Reworked aging behavior, added new behavior (Table 
    3-6, Figure 3-3) 
    >  Clarifications on feature support 
    >  Fixed ESCAN00086243 (chapter 4.5.1) 
    >  Fixed ESCAN00086483 (chapter 4.5.2.2) 
    M. Heil 
    2016-01-20  5.0.1 
    >  No changes 
    M. Heil 
    2016-02-03  6.0.0 
    >  Change Dcm notification handling (chapters 3.15.2 
    6.2.6.23) 
    >  Fixed ESCAN00087584 (chapter 4.5.2) 
    >  Fixed ESCAN00088862 (chapter 5) 
    >  Reworked NV write frequency Table 3-9 
    >  Changed APIs according to RfC72121(chapters 6.2.7.1, 
    6.2.7.8) 
    >  Reworked Autosar deviation Table 3-2 
    >  Added new header files to Table 4-1 
    M. Heil 
    2016-04-22  6.0.1 
    >  Fixed ESCAN00089671 (chapter 4.5) 
    >  Fixed ESCAN00089498 (Table 3-8) 
    M. Heil 
    2016-08-25  6.0.2 
    >  Extended Figure 3-1 with the new error state 
    >  Described handling of run-time check failures (chapter 
    3.18.1.2) 
    A. Bosch 
    2017-04-18  6.0.3 
    >  Fixed ESCAN00094549 (chapter 3.15) 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    V4.2.0, 
    V5.1.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    V3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticCommunicationManager.pdf 
    V4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_SWS_NVRAMManager.pdf 
    V3.2.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_StandardTypes.pdf 
    V1.3.0 
    [6]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.6.0 
    [7]   ISO 
    14229-1 Road vehicles – Unified diagnostic services (UDS)  - 
    – Part 1: Specification and requirements 
    [8]   Vector 
    TechnicalReference_PostBuildLoadable.pdf 
    See delivery 
    [9]   Vector 
    TechnicalReference_IdentityManager.pdf 
    See delivery 
    [10]  Ford 
    Generic Global Diagnostic Specification – Part 1: 
    4.0 
    Diagnostic Implementation Requirements 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Contents 
    1 
    Component History .................................................................................................... 16 
    2 
    Introduction................................................................................................................. 17 
    2.1 

    How to Read this Document ............................................................................ 17 
    2.1.1 

    API Definitions ................................................................................. 17 
    2.1.2 
    Configuration References ................................................................ 18 
    2.2 
    Architecture Overview ...................................................................................... 18 
    3 
    Functional Description ............................................................................................... 20 
    3.1 

    Features .......................................................................................................... 20 
    3.1.1 
    Ford Limitations ............................................................................... 22 
    3.2 
    Initialization ...................................................................................................... 23 
    3.2.1 
    Initialization States ........................................................................... 24 
    3.3 
    Diagnostic Event Processing ........................................................................... 25 
    3.3.1 

    Event De-bouncing .......................................................................... 25 
    3.3.1.1 

    Counter Based Algorithm ............................................... 25 
    3.3.1.2 
    Time Based Algorithm .................................................... 26 
    3.3.1.3 
    Monitor internal de-bouncing .......................................... 27 
    3.3.2 
    Event Reporting ............................................................................... 27 
    3.3.3 
    Event Status .................................................................................... 28 
    3.3.3.1 
    Synchronous Status Bit Transitions ................................ 29 
    3.3.3.2 
    Asynchronous Status Bit Transitions .............................. 29 
    3.3.3.3 
    Event Storage modifying Status Bits .............................. 30 
    3.3.3.4 
    Lightweight Multiple Trips 
    (FailureCycleCounterThreshold) .................................... 31 

    3.4 
    Event Displacement ......................................................................................... 31 
    3.5 
    Event Aging ...................................................................................................... 32 
    3.5.1 
    Aging Target ‘0’ ................................................................................ 33 
    3.5.2 
    Aging Counter Reallocation .............................................................. 33 
    3.5.3 
    Aging of Environmental Data ............................................................ 34 
    3.5.4 
    Aging of TestFailedSinceLastClear ................................................... 34 
    3.5.5 
    Aging and Healing ............................................................................ 34 
    3.6 
    Operation Cycles ............................................................................................. 35 
    3.6.1 

    Persistent Storage of Operation Cycle State .................................... 35 
    3.6.2 
    Automatic Operation Cycle Restart .................................................. 35 
    3.7 
    Enable Conditions and Control DTC Setting .................................................... 36 
    3.7.1 
    Effects on de-bouncing and FDC ..................................................... 37 
    3.8 
    Storage Conditions .......................................................................................... 37 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.9 
    DTC Suppression ............................................................................................. 38 
    3.9.1 

    Event Availability .............................................................................. 38 
    3.9.2 
    Suppress Event / Suppress DTC...................................................... 39 
    3.10 
    Environmental Data ......................................................................................... 39 
    3.10.1 
    Storage Trigger ................................................................................ 40 
    3.10.1.1 
    Storage Trigger ‘FDC Threshold’ .................................... 41 
    3.10.2 
    Internal Data Elements ..................................................................... 41 
    3.10.3 
    External Data Elements ................................................................... 42 
    3.10.3.1 

    Nv-Ram storage ............................................................. 42 
    3.11 
    Freeze Frame Pre-Storage .............................................................................. 43 
    3.12 
    Combined Events............................................................................................. 43 
    3.12.1 
    Configuration.................................................................................... 44 
    3.12.2 
    Event Reporting ............................................................................... 44 
    3.12.3 
    DTC Status ...................................................................................... 44 
    3.12.4 
    Environmental Data Update ............................................................. 45 
    3.12.5 
    Aging ............................................................................................... 45 
    3.12.6 
    Clear DTC ........................................................................................ 45 
    3.13 
    Non-Volatile Data Management ....................................................................... 45 
    3.13.1 

    NvM Interaction ................................................................................ 45 
    3.13.2 
    NVRAM Write Frequency ................................................................. 46 
    3.13.3 
    Data Recovery ................................................................................. 46 
    3.14 
    Diagnostic Interfaces ....................................................................................... 47 
    3.15 
    Notifications ..................................................................................................... 47 
    3.15.1 
    Event Status Changed ..................................................................... 48 
    3.15.2 
    DTC Status Changed ....................................................................... 48 
    3.15.3 
    Event Data Changed ........................................................................ 49 
    3.15.4 
    Monitor Re-Initialization .................................................................... 49 
    3.16 
    Indicators ......................................................................................................... 49 
    3.16.1 
    User Controlled WarningIndicatorRequest ....................................... 50 
    3.17 
    Interface to the Runtime Environment .............................................................. 50 
    3.18 
    Error Handling .................................................................................................. 50 
    3.18.1 

    Development Error Reporting ........................................................... 50 
    3.18.1.1 
    Parameter Checking ...................................................... 54 
    3.18.1.2 
    SilentBSW run-time checks ............................................ 54 
    3.18.2 
    Production Code Error Reporting ..................................................... 55 
    3.19 
    J1939 ............................................................................................................... 55 
    3.19.1 
    J1939 Freeze Frame and J1939 Expanded Freeze Frame .............. 56 
    3.19.2 
    Indicators ......................................................................................... 56 
    3.19.3 
    Clear DTC ........................................................................................ 56 
    3.19.4 
    Service Only DTCs........................................................................... 57 
    3.20 
    Clear DTC APIs ............................................................................................... 57 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4 
    Integration ................................................................................................................... 58 
    4.1 

    Scope of Delivery ............................................................................................. 58 
    4.1.1 

    Static Files ....................................................................................... 58 
    4.1.2 
    Dynamic Files .................................................................................. 59 
    4.2 
    Include Structure .............................................................................................. 60 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 61 
    4.3.1 
    Copy Routines ................................................................................. 62 
    4.4 
    Critical Sections ............................................................................................... 62 
    4.4.1 

    Exclusive Area 0 .............................................................................. 62 
    4.4.2 
    Exclusive Area 1 .............................................................................. 64 
    4.4.3 
    Exclusive Area 2 .............................................................................. 65 
    4.5 
    NVM Integration ............................................................................................... 65 
    4.5.1 
    NVRAM Demand ............................................................................. 66 
    4.5.2 
    NVRAM Initialization ........................................................................ 67 
    4.5.2.1 

    Controlled Re-initialization ............................................. 67 
    4.5.2.2 
    Manual Re-initialization .................................................. 67 
    4.5.2.3 
    Common Errors ............................................................. 68 
    4.5.3 
    Expected NVM Behavior .................................................................. 68 
    4.5.4 
    Flash Lifetime Considerations .......................................................... 70 
    4.6 
    Rte Integration ................................................................................................. 70 
    4.6.1 

    Runnable Entities ............................................................................. 70 
    4.6.2 
    Application Port Interface ................................................................. 71 
    4.6.3 
    DcmIf ............................................................................................... 71 
    4.7 
    Post-Run requirements .................................................................................... 72 
    4.8 
    Run-Time limitation .......................................................................................... 72 
    4.9 
    Split main function ............................................................................................ 73 
    5 
    Measurement and Calibration .................................................................................... 74 
    5.1 

    Measurable Data.............................................................................................. 74 
    5.1.1 

    Dem_Cfg_StatusData ...................................................................... 74 
    5.1.2 
    Dem_Cfg_EventDebounceValue ...................................................... 74 
    5.1.3 
    Dem_Cfg_EventMaxDebounceValues ............................................. 75 
    5.1.4 
    Dem_PrimaryEntry_<Number> ........................................................ 75 
    5.2 
    Post-Build Support ........................................................................................... 75 
    5.2.1 

    Initialization ...................................................................................... 75 
    5.2.2 
    Post-Build Loadable ......................................................................... 77 
    5.2.3 
    Post-Build Selectable ....................................................................... 77 
    6 
    API Description ........................................................................................................... 78 
    6.1 

    Type Definitions ............................................................................................... 78 
    6.2 
    Services provided by Dem ............................................................................... 79 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.1 
    Dem_GetVersionInfo() ..................................................................... 79 
    6.2.2 
    Dem_MainFunction() ........................................................................ 80 
    6.2.3 
    Interface EcuM ................................................................................. 81 
    6.2.3.1 

    Dem_PreInit() ................................................................ 81 
    6.2.3.2 
    Dem_Init() ...................................................................... 82 
    6.2.3.3 
    Dem_InitMemory() ......................................................... 82 
    6.2.3.4 
    Dem_Shutdown() ........................................................... 83 
    6.2.4 
    Interface SWC and CDD .................................................................. 84 
    6.2.4.1 

    Dem_SetEventStatus() .................................................. 84 
    6.2.4.2 
    Dem_ResetEventStatus() .............................................. 85 
    6.2.4.3 
    Dem_ResetEventDebounceStatus() .............................. 86 
    6.2.4.4 
    Dem_PrestoreFreezeFrame() ........................................ 87 
    6.2.4.5 
    Dem_ClearPrestoredFreezeFrame() .............................. 88 
    6.2.4.6 
    Dem_SetOperationCycleState() ..................................... 89 
    6.2.4.7 
    Dem_GetEventStatus() .................................................. 90 
    6.2.4.8 
    Dem_GetEventFailed() .................................................. 91 
    6.2.4.9 
    Dem_GetEventTested() ................................................. 92 
    6.2.4.10 
    Dem_GetDTCOfEvent() ................................................. 93 
    6.2.4.11 
    Dem_GetEventAvailable() .............................................. 94 
    6.2.4.12 
    Dem_SetEnableCondition() ........................................... 95 
    6.2.4.13 
    Dem_SetStorageCondition() .......................................... 96 
    6.2.4.14 
    Dem_GetFaultDetectionCounter() .................................. 97 
    6.2.4.15 
    Dem_GetIndicatorStatus() ............................................. 98 
    6.2.4.16 
    Dem_GetEventFreezeFrameData() ............................... 99 
    6.2.4.17 
    Dem_GetEventExtendedDataRecord() ........................ 100 
    6.2.4.18 
    Dem_GetEventEnableCondition() ................................ 101 
    6.2.4.19 
    Dem_GetEventMemoryOverflow() ............................... 102 
    6.2.4.20 
    Dem_GetNumberOfEventMemoryEntries() .................. 103 
    6.2.4.21 
    Dem_PostRunRequested() .......................................... 104 
    6.2.4.22 
    Dem_SetWIRStatus() .................................................. 105 
    6.2.4.23 
    Dem_GetWIRStatus() .................................................. 106 
    6.2.4.24 
    Dem_SetDTCSuppression() ........................................ 107 
    6.2.4.25 
    Dem_SetEventSuppression() ....................................... 108 
    6.2.4.26 
    Dem_SetEventAvailable() ............................................ 109 
    6.2.4.27 
    Dem_ClearDTC() ......................................................... 110 
    6.2.4.28 
    Dem_RequestNvSynchronization() .............................. 112 
    6.2.5 
    Interface BSW ................................................................................ 113 
    6.2.5.1 

    Dem_ReportErrorStatus() ............................................ 113 
    6.2.6 
    Interface Dcm................................................................................. 114 
    6.2.6.1 

    Dem_DcmSetDTCFilter() ............................................. 114 
    6.2.6.2 
    Dem_DcmGetNumberOfFilteredDTC() ........................ 116 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 

    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.3 
    Dem_DcmGetNextFilteredDTC() ................................. 117 
    6.2.6.4 
    Dem_DcmGetNextFilteredDTCAndFDC() .................... 118 
    6.2.6.5 
    Dem_DcmGetNextFilteredDTCAndSeverity() .............. 119 
    6.2.6.6 
    Dem_DcmSetFreezeFrameRecordFilter() .................... 120 
    6.2.6.7 
    Dem_DcmGetNextFilteredRecord() ............................. 121 
    6.2.6.8 
    Dem_DcmGetStatusOfDTC() ....................................... 122 
    6.2.6.9 
    Dem_DcmGetDTCStatusAvailabilityMask() ................. 123 
    6.2.6.10 
    Dem_DcmGetDTCByOccurrenceTime() ...................... 124 
    6.2.6.11 
    Dem_DcmGetTranslationType() ................................... 125 
    6.2.6.12 
    Dem_DcmGetSeverityOfDTC() .................................... 126 
    6.2.6.13 
    Dem_DcmGetFunctionalUnitOfDTC() .......................... 127 
    6.2.6.14 
    Dem_DcmDisableDTCRecordUpdate() ........................ 128 
    6.2.6.15 
    Dem_DcmEnableDTCRecordUpdate() ........................ 129 
    6.2.6.16 
    Dem_DcmGetFreezeFrameDataByDTC() .................... 130 
    6.2.6.17 
    Dem_DcmGetSizeOfFreezeFrameByDTC()................. 132 
    6.2.6.18 
    Dem_DcmGetExtendedDataRecordByDTC()............... 133 
    6.2.6.19 
    Dem_DcmGetSizeOfExtendedDataRecordByDTC() .... 134 
    6.2.6.20 
    Dem_DcmClearDTC() .................................................. 135 
    6.2.6.21 
    Dem_DcmDisableDTCSetting() ................................... 137 
    6.2.6.22 
    Dem_DcmEnableDTCSetting() .................................... 138 
    6.2.6.23 
    Dem_DcmControlDTCStatusChangedNotification() ..... 139 
    6.2.6.24 
    Dem_DcmCancelOperation() ....................................... 140 
    6.2.7 
    Interface J1939Dcm ....................................................................... 141 
    6.2.7.1 

    Dem_J1939DcmClearDTC() ........................................ 141 
    6.2.7.2 
    Dem_J1939DcmFirstDTCwithLampStatus()................. 142 
    6.2.7.3 
    Dem_J1939DcmGetNextDTCwithLampStatus () ......... 143 
    6.2.7.4 
    Dem_J1939DcmGetNextFilteredDTC() ........................ 144 
    6.2.7.5 
    Dem_J1939DcmGetNextFreezeFrame() ...................... 145 
    6.2.7.6 
    Dem_J1939DcmGetNextSPNInFreezeFrame() ........... 146 
    6.2.7.7 
    Dem_J1939DcmGetNumberOfFilteredDTC () .............. 147 
    6.2.7.8 
    Dem_J1939DcmSetDTCFilter() ................................... 148 
    6.2.7.9 
    Dem_J1939DcmSetFreezeFrameFilter() ..................... 150 
    6.2.7.10 
    Dem_J1939DcmReadDiagnosticReadiness1() ............ 151 
    6.3 
    Services used by Dem ................................................................................... 152 
    6.3.1 

    EcuM_BswErrorHook() .................................................................. 152 
    6.4 
    Callback Functions ......................................................................................... 153 
    6.4.1 
    Dem_NvM_JobFinished() .............................................................. 154 
    6.4.2 
    Dem_NvM_InitAdminData() ........................................................... 155 
    6.4.3 
    Dem_NvM_InitStatusData() ........................................................... 156 
    6.4.4 
    Dem_NvM_InitDebounceData() ..................................................... 157 
    6.4.5 
    Dem_NvM_InitEventAvailableData() .............................................. 158 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    10 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5 
    Configurable Interfaces .................................................................................. 159 
    6.5.1 

    Callouts .......................................................................................... 159 
    6.5.1.1 

    CBClrEvt_<EventName>() ........................................... 159 
    6.5.1.2 
    CBDataEvt_<EventName>() ........................................ 160 
    6.5.1.3 
    CBFaultDetectCtr_<EventName>() .............................. 161 
    6.5.1.4 
    CBInitEvt_<EventName>() ........................................... 162 
    6.5.1.5 
    CBInitFct_<N>() ........................................................... 162 
    6.5.1.6 
    CBReadData_<SyncDataElement>() ........................... 163 
    6.5.1.7 
    CBStatusDTC_<N>() ................................................... 164 
    6.5.1.8 
    CBStatusJ1939DTC_<N>() .......................................... 165 
    6.5.1.9 
    CBStatusEvt_<EventName>_<N>() ............................. 165 
    6.5.1.10 
    GeneralCBDataEvt() .................................................... 166 
    6.5.1.11 
    GeneralCBStatusEvt() ................................................. 166 
    6.6 
    Service Ports ................................................................................................. 167 
    6.6.1 

    Client Server Interface ................................................................... 167 
    6.6.1.1 

    Provide Ports on Dem Side .......................................... 167 
    6.6.1.1.1 

    DiagnosticMonitor .................................... 167 
    6.6.1.1.2 
    DiagnosticInfo and 
    GeneralDiagnosticInfo ............................. 167 

    6.6.1.1.3 
    OperationCycle ........................................ 168 
    6.6.1.1.4 
    AgingCycle .............................................. 168 
    6.6.1.1.5 
    ExternalAgingCycle .................................. 168 
    6.6.1.1.6 
    EnableCondition ...................................... 168 
    6.6.1.1.7 
    StorageCondition ..................................... 168 
    6.6.1.1.8 
    IndicatorStatus ......................................... 169 
    6.6.1.1.9 
    EventStatus ............................................. 169 
    6.6.1.1.10  EvMemOverflowIndication ....................... 169 
    6.6.1.1.11  DTCSuppression ..................................... 169 
    6.6.1.1.12  EventSuppression .................................... 170 
    6.6.1.1.13  DemServices ........................................... 170 
    6.6.1.1.14  DcmIf ....................................................... 170 
    6.6.1.1.15  CddIf ........................................................ 170 

    6.6.1.2 
    Require Ports on Dem Side ......................................... 170 
    6.6.1.2.1 
    CBInitEvt_<EventName> ......................... 171 
    6.6.1.2.2 
    CBInitFct_<N> ......................................... 171 
    6.6.1.2.3 
    CBStatusEvt_<EventName>_<N> ........... 171 
    6.6.1.2.4 
    GeneralCBStatusEvt ................................ 171 
    6.6.1.2.5 
    CBStatusDTC_<N> .................................. 171 
    6.6.1.2.6 
    CBDataEvt_<EventName> ...................... 171 
    6.6.1.2.7 
    GeneralCBDataEvt .................................. 172 
    6.6.1.2.8 
    CBClrEvt_<EventName> ......................... 172 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    11 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.6.1.2.9 
    CBReadData_<SyncDataElement> ......... 172 
    6.6.1.2.10  CBFaultDetectCtr_<EventName> ............ 172 
    6.6.1.2.11  CBCtrlDtcSetting ...................................... 172 

    6.7 
    Not Supported APIs ....................................................................................... 172 
    7 
    Configuration ............................................................................................................ 174 
    7.1 

    Configuration Variants .................................................................................... 174 
    7.2 
    Configurable Attributes ................................................................................... 174 
    7.3 
    Configuration of Post-Build Loadable ............................................................. 174 
    7.3.1 
    Supported Variance ........................................................................ 175 
    8 
    AUTOSAR Standard Compliance............................................................................. 176 
    8.1 

    Deviations ...................................................................................................... 176 
    Dem_J1939DcmClearDTC() ........................................................ 176 
    Dem_J1939DcmSetDTCFilter() ............................................... 176 

    8.2 
    Additions/ Extensions ..................................................................................... 176 
    8.3 
    Limitations...................................................................................................... 177 
    8.4 
    Not Supported Service Interfaces .................................................................. 178 
    9 
    Glossary and Abbreviations .................................................................................... 179 
    9.1 

    Glossary ........................................................................................................ 179 
    9.2 
    Abbreviations ................................................................................................. 179 
    10  Contact ...................................................................................................................... 181 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    12 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.1 Architecture Overview ....................................................... 18 
    Figure 2-2 
    Interfaces to adjacent modules of the Dem ............................................... 19 
    Figure 3-1 
    Dem states ............................................................................................... 25 
    Figure 3-2 
    Effect of Precondition ‘Event Storage’ and Displacement on Status Bits ... 30 
    Figure 3-3 
    Behavior of the Aging Counter .................................................................. 33 
    Figure 3-4 
    Environmental Data Layout ....................................................................... 40 
    Figure 3-5 
    User Controlled WarningIndicatorRequest ................................................ 50 
    Figure 3-6 
    Concurrent Clear Requests ...................................................................... 57 
    Figure 4-1 
    Include structure ....................................................................................... 60 
    Figure 4-2 
    NvM behavior ........................................................................................... 68 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 16 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 20 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 22 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 22 
    Table 3-4  
    Not supported Ford features ..................................................................... 23 
    Table 3-5  
    Configuration of status bit processing ....................................................... 31 
    Table 3-6  
    Aging algorithms ....................................................................................... 32 
    Table 3-7  
    Immediate aging ....................................................................................... 33 
    Table 3-8  
    DTC status combination ........................................................................... 45 
    Table 3-9  
    NVRAM write frequency ........................................................................... 46 
    Table 3-10  
    Service IDs ............................................................................................... 53 
    Table 3-11  
    Additional Service IDs ............................................................................... 54 
    Table 3-12  
    Errors reported to Det ............................................................................... 54 
    Table 3-13  
    Diagnostic messages where content is provided by Dem ......................... 55 
    Table 3-14  
    J1939 DTC Status to be cleared ............................................................... 56 
    Table 4-1  
    Static files ................................................................................................. 58 
    Table 4-2  
    Generated files ......................................................................................... 59 
    Table 4-3  
    Compiler abstraction and memory mapping, constant sections ................ 61 
    Table 4-4  
    Compiler abstraction and memory mapping, variable sections ................. 62 
    Table 4-5  
    Exclusive Area 0 ....................................................................................... 63 
    Table 4-6  
    Exclusive Area 1 ....................................................................................... 64 
    Table 4-7  
    Exclusive Area 2 ....................................................................................... 65 
    Table 4-8  
    NvRam blocks .......................................................................................... 66 
    Table 4-9  
    NvRam initialization .................................................................................. 67 
    Table 4-10  
    Dem runnable entities ............................................................................... 71 
    Table 5-1  
    Measurement item Dem_Cfg_StatusData ................................................. 74 
    Table 5-2  
    Measurement item Dem_Cfg_EventDebounceValue ................................ 74 
    Table 5-3  
    Measurement item Dem_Cfg_EventMaxDebounceValues[] ...................... 75 
    Table 5-4  
    Measurement item Dem_PrimaryEntry_<Number>................................... 75 
    Table 5-5  
    Error Codes possible during Post-Build initialization failure ....................... 76 
    Table 6-1  
    Dem_GetVersionInfo() .............................................................................. 79 
    Table 6-2  
    Dem_MainFunction() ................................................................................ 80 
    Table 6-3  
    Dem_PreInit() ........................................................................................... 81 
    Table 6-4  
    Dem_Init() ................................................................................................. 82 
    Table 6-5  
    Dem_InitMemory() .................................................................................... 82 
    Table 6-6  
    Dem_Shutdown() ...................................................................................... 83 
    Table 6-7  
    Dem_SetEventStatus() ............................................................................. 84 
    Table 6-8  
    Dem_ResetEventStatus() ......................................................................... 85 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    13 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Table 6-9  
    Dem_ResetEventDebounceStatus() ......................................................... 86 
    Table 6-10  
    Dem_PrestoreFreezeFrame() ................................................................... 87 
    Table 6-11  
    Dem_ClearPrestoredFreezeFrame() ........................................................ 88 
    Table 6-12  
    Dem_SetOperationCycleState()................................................................ 89 
    Table 6-13  
    Dem_GetEventStatus() ............................................................................. 90 
    Table 6-14  
    Dem_GetEventFailed() ............................................................................. 91 
    Table 6-15  
    Dem_GetEventTested() ............................................................................ 92 
    Table 6-16  
    Dem_GetDTCOfEvent() ............................................................................ 93 
    Table 6-17  
    Dem_GetEventAvailable() ........................................................................ 94 
    Table 6-18  
    Dem_SetEnableCondition() ...................................................................... 95 
    Table 6-19  
    Dem_SetStorageCondition() ..................................................................... 96 
    Table 6-20  
    Dem_GetFaultDetectionCounter() ............................................................ 97 
    Table 6-21  
    Dem_GetIndicatorStatus() ........................................................................ 98 
    Table 6-22  
    Dem_GetEventFreezeFrameData() .......................................................... 99 
    Table 6-23  
    Dem_GetEventExtendedDataRecord() ................................................... 100 
    Table 6-24  
    Dem_GetEventEnableCondition() ........................................................... 101 
    Table 6-25  
    Dem_GetEventMemoryOverflow() .......................................................... 102 
    Table 6-26  
    Dem_GetNumberOfEventMemoryEntries() ............................................. 103 
    Table 6-27  
    Dem_PostRunRequested() ..................................................................... 104 
    Table 6-28  
    Dem_SetWIRStatus () ............................................................................ 105 
    Table 6-29  
    Dem_GetWIRStatus () ............................................................................ 106 
    Table 6-30  
    Dem_SetDTCSuppression() ................................................................... 107 
    Table 6-31  
    Dem_SetEventSuppression() ................................................................. 108 
    Table 6-32  
    Dem_SetEventAvailable() ....................................................................... 109 
    Table 6-33  
    Dem_ClearDTC() ..................................................................................... 111 
    Table 6-34  
    Dem_RequestNvSynchronization() ......................................................... 112 
    Table 6-35  
    Dem_ReportErrorStatus() ....................................................................... 113 
    Table 6-36  
    Dem_DcmSetDTCFilter() ........................................................................ 115 
    Table 6-37  
    Dem_DcmGetNumberOfFilteredDTC() ................................................... 116 
    Table 6-38  
    Dem_DcmGetNextFilteredDTC() ............................................................ 117 
    Table 6-39  
    Dem_DcmGetNextFilteredDTCAndFDC() ............................................... 118 
    Table 6-40  
    Dem_DcmGetNextFilteredDTCAndSeverity() ......................................... 119 
    Table 6-41  
    Dem_DcmSetFreezeFrameRecordFilter() .............................................. 120 
    Table 6-42  
    Dem_DcmGetNextFilteredRecord() ........................................................ 121 
    Table 6-43  
    Dem_DcmGetStatusOfDTC() ................................................................. 122 
    Table 6-44  
    Dem_DcmGetDTCStatusAvailabilityMask() ............................................ 123 
    Table 6-45  
    Dem_DcmGetDTCByOccurrenceTime() ................................................. 124 
    Table 6-46  
    Dem_DcmGetTranslationType() ............................................................. 125 
    Table 6-47  
    Dem_DcmGetSeverityOfDTC() ............................................................... 126 
    Table 6-48  
    Dem_DcmGetFunctionalUnitOfDTC() ..................................................... 127 
    Table 6-49  
    Dem_DcmDisableDTCRecordUpdate() .................................................. 128 
    Table 6-50  
    Dem_DcmEnableDTCRecordUpdate() ................................................... 129 
    Table 6-51  
    Dem_DcmGetFreezeFrameDataByDTC() .............................................. 131 
    Table 6-52  
    Dem_DcmGetSizeOfFreezeFrameByDTC() ........................................... 132 
    Table 6-53  
    Dem_DcmGetExtendedDataRecordByDTC() ......................................... 133 
    Table 6-54  
    Dem_DcmGetSizeOfExtendedDataRecordByDTC() ............................... 134 
    Table 6-55  
    Dem_DcmClearDTC() ............................................................................ 136 
    Table 6-56  
    Dem_DcmDisableDTCSetting() .............................................................. 137 
    Table 6-57  
    Dem_DcmEnableDTCSetting() ............................................................... 138 
    Table 6-58  
    Dem_DcmControlDTCStatusChangedNotification() ................................ 139 
    Table 6-59  
    Dem_DcmCancelOperation() .................................................................. 140 
    Table 6-60  
    Dem_J1939DcmClearDTC() ................................................................... 141 
    Table 6-61  
    Dem_J1939DcmFirstDTCwithLampStatus() ........................................... 142 
    Table 6-62  
    Dem_J1939DcmGetNextDTCwithLampStatus () .................................... 143 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    14 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Table 6-63  
    Dem_J1939DcmGetNextFilteredDTC() ................................................... 144 
    Table 6-64  
    Dem_J1939DcmGetNextFreezeFrame() ................................................ 145 
    Table 6-65  
    Dem_J1939DcmGetNextSPNInFreezeFrame() ...................................... 146 
    Table 6-66  
    Dem_J1939DcmGetNumberOfFilteredDTC () ......................................... 147 
    Table 6-67  
    Dem_J1939DcmSetDTCFilter() .............................................................. 149 
    Table 6-68  
    Dem_J1939DcmSetFreezeFrameFilter() ................................................ 150 
    Table 6-69  
    Dem_J1939DcmReadDiagnosticReadiness1() ....................................... 151 
    Table 6-70  
    Services used by the Dem ...................................................................... 152 
    Table 6-71  
    EcuM_BswErrorHook() ........................................................................... 152 
    Table 6-72  
    Dem_NvM_JobFinished() ....................................................................... 154 
    Table 6-73  
    Dem_NvM_InitAdminData() .................................................................... 155 
    Table 6-74  
    Dem_NvM_InitStatusData() .................................................................... 156 
    Table 6-75  
    Dem_NvM_InitDebounceData() .............................................................. 157 
    Table 6-76  
    Dem_NvM_InitEventAvailableData() ....................................................... 158 
    Table 6-77  
    CBClrEvt_<EventName>() ...................................................................... 159 
    Table 6-78  
    CBDataEvt_<EventName>() ................................................................... 160 
    Table 6-79  
    CBFaultDetectCtr_<EventName>() ......................................................... 161 
    Table 6-80  
    CBInitEvt_<EventName>() ...................................................................... 162 
    Table 6-81  
    CBInitFct_<N>() ...................................................................................... 162 
    Table 6-82  
    CBReadData_<SyncDataElement>() ...................................................... 163 
    Table 6-83  
    CBStatusDTC_<N>() .............................................................................. 164 
    Table 6-84  
    CBStatusJ1939DTC_<N>() .................................................................... 165 
    Table 6-85  
    CBStatusEvt_<EventName>_<N>() ........................................................ 165 
    Table 6-86  
    GeneralCBDataEvt() ............................................................................... 166 
    Table 6-87  
    GeneralCBStatusEvt() ............................................................................ 166 
    Table 6-88  
    DiagnosticMonitor ................................................................................... 167 
    Table 6-89  
    DiagnosticInfo and GeneralDiagnosticInfo .............................................. 168 
    Table 6-90  
    OperationCycle ....................................................................................... 168 
    Table 6-91  
    EnableCondition ..................................................................................... 168 
    Table 6-92  
    StorageCondition .................................................................................... 169 
    Table 6-93  
    IndicatorStatus ........................................................................................ 169 
    Table 6-94  
    EventStatus ............................................................................................ 169 
    Table 6-95  
    EvMemOverflowIndication ...................................................................... 169 
    Table 6-96  
    DTCSuppression .................................................................................... 169 
    Table 6-97  
    EventSuppression .................................................................................. 170 
    Table 6-98  
    DemServices .......................................................................................... 170 
    Table 6-99  
    CBInitEvt_<EventName> ........................................................................ 171 
    Table 6-100  
    CBInitFct_<N> ........................................................................................ 171 
    Table 6-101  
    CBStatusEvt_<EventName>_<N> .......................................................... 171 
    Table 6-102  
    GeneralCBStatusEvt ............................................................................... 171 
    Table 6-103  
    CBStatusDTC_<N> ................................................................................ 171 
    Table 6-104  
    CBDataEvt_<EventName> ..................................................................... 171 
    Table 6-105  
    GeneralCBDataEvt ................................................................................. 172 
    Table 6-106  
    CBClrEvt_<EventName> ........................................................................ 172 
    Table 6-107  
    CBReadData_<SyncDataElement> ........................................................ 172 
    Table 6-108  
    CBFaultDetectCtr_<EventName> ........................................................... 172 
    Table 6-109  
    CBCtrlDtcSetting .................................................................................... 172 
    Table 6-110  
    Not Supported APIs ................................................................................ 173 
    Table 8-1  
    Deviations ............................................................................................... 176 
    Table 8-2  
    Extensions .............................................................................................. 176 
    Table 8-3 
    Limitations .............................................................................................. 178 
    Table 8-4  
    Service Interfaces which are not supported ............................................ 178 
    Table 9-1  
    Glossary ................................................................................................. 179 
    Table 9-2  
    Abbreviations .......................................................................................... 180 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    15 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    4.00.00 
    1st Release Version  
    4.03.00 
    Production Release 
    5.00.00 
    Post-Build support 
    6.00.00 
    J1939 support, API according ASR 4.1.2 
    7.00.00 
    Change of initialization to allow Postbuild-Selectable 
    8.00.00 
    Support API according ASR 4.2.1 
    9.00.00 
    Technical completion of WWH-OBD 
    10.00.00 
    Configuration tool migration to Java 8 
    11.00.00 
    Preparation for Silent BSW 
    11.01.00 
    Silent Process implemented 
    Table 1-1   Component history 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    16 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module Diagnostic Event Manager “Dem” as specified in [1].  
     
    Supported 
    AUTOSAR  
    Release*: 
    Supported 

    Configuration  pre-compile, post-build loadable, post-build selectable 
    Variants: 
    Vendor ID: 

    DEM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    DEM_MODULE_ID   
    54 decimal 
    (according to ref. [6]) 
    Version Information 
    DEM_AR_RELEASE_MAJOR_VERSION 
    version literal, 
    DEM_AR_RELEASE_MINOR_VERSION 
    decimal 
    DEM_AR_RELEASE_REVISION_VERSION 
    DEM_SW_MAJOR_VERSION 
    DEM_SW_MINOR_VERSION 
    DEM_SW_PATCH_VERSION 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    The  Dem  is  responsible  for  processing  and  storing  diagnostic  events  (both  externally 
    visible  DTCs  and  internal  events  reported  by  other  BSW  modules)  and  associated 
    environmental  data.  In  addition,  the  Dem  provides  the  fault  information  data  to  the  Dcm 
    and J1939Dcm (if applicable). 
    2.1 
    How to Read this Document 
    Here are some basic hints on how to navigate this document. 
    2.1.1 
    API Definitions 
    The application API of the Dem is usually never called directly. The functions declarations 
    here  are  given  for  documentation  purposes.  Parts  of  the  function  signatures  are  not 
    exposed to the actual caller, and represent an implementation detail. 
    Nonetheless,  this  documentation  refers  to  the  Dem  API  directly  when  describing  the 
    different features, as the actual name of the API called by the application is defined by the 
    application itself.  Instead of a sentence referring to this fact the underlying Dem function 
    name is mentioned directly. 
    E.g.  If  the  documentation  mentions  the  API  Dem_SetOperationCycleState,  a  client 
    module  would  call  a  service  function  resembling  Rte_Call_<APPLDEFINED>-
    _SetOperationCycleState. 
    An application is strongly advised to never call the Dem API directly, but to use the service 
    interface instead. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    17 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    2.1.2 
    Configuration References 
    When this text references a configuration parameter or container, the references are given 
    in the format of a navigation path: 
    >  /ModuleDefinition/ContainerDefinition/Definition:  
    The absolute variant is used for references in a different module. These references 
    start with a slash and the module definition. E.g. /NvM/NvMBlockDescriptor 
    >  ContainerDefinition/Definition:  
    The relative variant is used for references to parameters of the Dem itself. For brevity 
    the module definition has been omitted. 
    In both variants the last definition can be either of type container, parameter or reference. 
    This  document  does not  duplicate  the  parameter  description,  so please  also  refer  to  the 
    module’s  parameter  definition  file  (bsmwd-file)  for  an  exhaustive  description  of  the 
    available configuration parameters. 
    2.2 
    Architecture Overview 
    The following figure shows where the Dem is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.1 Architecture Overview   
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    18 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    The next figure shows the interfaces to adjacent modules of the Dem. These interfaces are 
    described in chapter 5.2.3.  
     class Architecture
    Rte
    Det
    Dem
    Dlt
    Dcm
    FiM
    SchM
    Nv M
    EcuM
    BSW
    J1939Dcm
     
    Figure 2-2  Interfaces to adjacent modules of the Dem 
     
     
     
    Caution 
    Applications do not access the services of the BSW modules directly. They use 
      the service ports provided by the BSW modules via the RTE. The service ports 
    provided by the Dem are listed in chapter 6.6 and are defined in [1]. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    19 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    Dem. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features 
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 7.3.1. 
    Vector Informatik provides further Dem functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Post-Build Loadable 
    MICROSAR Identity Manager using Post-Build Selectable 
    Module individual post-build loadable update 
    OBD II / WWH-OBD functionalities and APIs, only if licensed accordingly. 
    All non-optional features described in [1], except features described below 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Category  Description 
    ASR version 
    Configuration 
    Config 
    /AUTOSAR/EcucDefs/Dem/DemGeneral/DemFreezeFrameRecNumClass/De
    4.1.2 
    mFreezeFrameRecordClassRef 
    Configuration of configured snapshot records is based on 4.0.3. For details 
    please refer to the Module Parameter Description (BSWMD). 
    Config 
    /AUTOSAR/EcucDefs/Dem/DemGeneral/DemOperationCycle/DemOperationC 4.1.2 
    ycleAutostart 
    Configuration of automatic start of an operation cycle is only possible for one 
    cycle. For details please refer to the Module Parameter Description (BSWMD). 
    Config 
    Service Needs are neither provided nor evaluated. 
    4.0.3 
    Config 
    Multiplicity of some elements is restricted. For details please refer to the 
    4.0.3 
    Module Parameter Description (BSWMD). 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    20 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    De-Bouncing 
    API 
    Dem_GetDebouncingOfEvent() 
    4.1.2 
    Monitors / SWC cannot query the current de-bouncing state. 
    OperationCyles 
    Functional  AgingCycles 
    4.0.3 – 4.2.1 
    Aging cycles which are only used for aging and the corresponding API 
    Dem_SetAgingCycleState(). Use operation cycles instead. 
    Functional  Chapter 7.3.9.2 (4.0.3) resp. 7.6.10.2 (since 4.1.2) External aging 
    4.0.3 – 4.2.1 
    Centralized operation cycles and corresponding APIs are not available. 
    API 
    Dem_GetOperationCycleState()is not available. 
    4.1.2 
    Functional  Chapter 7.7 BSW Error Handling 
    4.0.3 
    All operation cycles are evaluated before initialization. To be able to report 
    BSW errors, these need to use a cycle which is automatically started. 
    Functional  Chapter 7.3.8 (4.1.2) resp. 7.6.8 (4.2.1) Operation Cycle Management 
    4.1.2 
    The Dem implicitly stops volatile cycles during shutdown. No DET is called in 
    this situation. 
    ClearDTC 
    Functional  Chapter 7.3.2.2 (4.1.2) resp. 7.6.2.2 (4.2.1) Clearing event memory entries 
    4.1.2 
    Partial status clear is not supported. Clearing a DTC is either completely 
    blocked, or the DTC is completely removed from memory. 
    Data collection / System integration 
    Functional  Chapter 7.3.7.1 (4.0.3, 4.1.2) resp. 7.6.7.1 (4.2.1) Storage of freeze frame data  4.0.3 
    Chapter 7.3.7.3 (4.0.3, 4.1.2) resp. 7.6.7.3 (4.2.1) Storage of extended data 
    Data collection is always performed on task level, never in the context of the 
    caller of Dem_SetEventStatus or Dem_ReportErrorStatus. 
    Functional  Chapter 7.3.7.3 (4.1.2) resp. 7.6.7.3 (4.2.1) Storage of extended data 
    4.1.2 
    For extended records collected from a user callback with NV storage, the Dem 
    only supports the data collection trigger ‘on Test Failed’. 
    Functional  Chapter 8.4.3.8 (4.0.3), 8.6.1 (4.1.2, 4.2.1) Sender/Receiver Interfaces 
    4.0.3 
    Sender/Receiver Interfaces and the related endianness / structural conversion 
    are not supported. 
    BSW integration 
    Functional  Chapter 7.8.6 (4.0.3), 7.9.7(4.1.2) resp. 7.10.7 (4.2.1) Interaction with 
    4.0.3 
    Diagnostic Log & Trace (Dlt) 
    The APIs to read snapshot and extended data from DLT are not supported. 
    Functional  Chapter 7.13 (4.0.3), 7.14 (4.1.2), resp 7.15 (4.2.1) Debugging Support 
    4.0.3 
    No support for public access to internal variables is provided. 
    API 
    FiM_DemInit() 
    4.0.3 
    This API is never called by the Dem. 
    API 
    Chapter 8.3.4 Dcm Interfaces 
    4.0.3-4.1.2 
    The Dcm interfaces are implemented according 4.1.2, the old interfaces are 
    not supported. 
    API 
    Chapter 8.3.5 (4.1.2) resp. 8.3.6 (4.2.1) J1939Dcm Interfaces 
    4.1.2 
    The J1939Dcm interfaces incorporate the changes of RfC#72121. The old 
    APIs are not supported. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    21 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Miscellaneous 
    Functional  Mirror Memory 
    4.0.3 
    Mirror Memory solutions are manufacturer specific and not supported. 
    Functional  Chapter 7.3.5 (4.0.3), 7.3.5.2 (4.1.2) resp. 7.6.5.2 (4.2.1) Event Combination 
    4.0.3 
    Type 2 / Event Combination on Retrieval 
    Only combination Type 1 / On Storage is supported. 
    Functional  Indicator-Event specific set and reset condition 
    4.0.3 
    Indicators are enabled together with the event confirmation, i.e. when bit 3 is 
    set. Healing is always done based on the event status byte (UDS status). 
    Table 3-2   Not supported AUTOSAR standard conform features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Interface Dem_InitMemory() 
    This function can be used to initialize static RAM variables in case the start-up code is not used 
    to initialize RAM. Refer to chapter 6.2.3.3. 
    Interface Dem_PostRunRequested() 
    Allows the application to test if the Dem can be shut down safely. For details refer to chapter 
    6.2.4.21. 
    Selective non-volatile mirror invalidation on configuration change 
    Allows the controlled reset of the Dem non-volatile data, without invalidating the whole non-
    volatile data or manual initialization algorithms. For details refer to chapter 4.5.2.1 
    Extended set of internal data elements 
    In addition to the set defined in [1], the Dem provides additional internal data elements. Refer to 
    chapter 3.10.1 for the complete list. 
    Extended support for ClientServer Data callbacks, see chapter 3.10.3 
    Variants on status bit handling in case of memory overflow, see chapter 3.3.3.3 
    Option to prevent aging of event entries to remove stored environment data (e.g. snapshot 
    records) 
    Multiple variants for aging behavior regarding healing, see chapter 3.5.5 
    Option to distribute runtime of ClearDTC operation across multiple tasks 
    Configurable copy routine, see chapter 4.3.1 
    Request for NV data synchronization, see Dem_RequestNvSynchronization() 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.1.1 
    Ford Limitations 
    The following features defined by [10] are not supported 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    22 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Not Supported Ford Features 
    On-Demand DTCs 
    Different aging criterias (number of operation cycles) to age status bit 5 – 
    TestFailedSinceLastClear and status bit 3 – ConfirmedDTC 
    WarningIndicatorRequested (bit7) is always stored in NV memory 
    Internal data element ‘Max FDC this operation cycle’ can only be used for GGDS FDC#0x11 
    when all DTCs may support it. If only a subset of the DTCs shall store this counter, the internal 
    data element cannot be used. (FDC#0x11 can still be implemented in application code) 
    Internal data element ‘Max FDC since last clear’ cannot be used for GGDS FDC#0x12. 
    (FDC#0x12 can still be implemented in application code) 
    Table 3-4   Not supported Ford features 
     
     
    3.2 
    Initialization 
    Initialization of the Dem module is a two-step process. 
    First,  using  the  interface  Dem_PreInit()  the  Dem  is  brought  into  a  state  of  reduced 
    functionality.  This  shall  be  used  during  the  startup  phase  to  allow  processing  events 
    reported by BSW modules using Dem_ReportErrorStatus(). 
    The pre-initialization phase already allows de-bouncing of status reports. 
    After the  Dem  has been pre-initialized  and after the  NVM  has  finished  the  restoration of 
    the  NVRAM  mirror  data,  the  Dem  will  be  brought  to  full  function  using  the  interface 
    Dem_Init(), also during the startup phase. Additionally, the interface Dem_Init() can 
    be used to reinitialize the Dem after Dem_Shutdown() was called. 
     
     
    Caution 
    This Dem implementation is not consistent with Autosar regarding the initialization API. 
      Both Dem_PreInit() and Dem_Init() take a configuration pointer. Please adapt your 
    initialization sequence accordingly. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    23 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    If a changed configuration set is flashed to an existing ECU, the NVRAM mirror 
      variables of the Dem must be re-initialized before Dem_Init() is called. There 
    are several ways how this can be implemented. Please also refer to chapter 4.5 
    regarding the correct setup. 
      Using the NvM which can be configured to invalidate data on configuration 
    change. 
      Using the Dem which supports a similar feature as the NvM using the 
    configuration option ‘DemCompiledConfigId’. In this case Dem_Init() will 
    take care of the re-initialization. 
      Before calling Dem_Init() it is safe to call the initialization functions 
    configured for usage by the NvM. Additionally, all primary and secondary 
    data can to be cleared by overwriting each RAM variable 
    Dem_Cfg_[Primary|Secondary]Entry_<N> with the contents of 
    Dem_MemoryEntryInit. 
     
     
     
     
    3.2.1 
    Initialization States 
    After the (re)start of the ECU the Dem is in state “UNINITIALIZED”. In this state the Dem is 
    not operable until the interface Dem_PreInit() was called. 
    Dem_PreInit() will change the state to “PREINITIALIZED”. Within this state only BSW 
    errors  can  be  reported  via  Dem_ReportErrorStatus().  EnableConditions  are  not 
    considered in this phase. 
    During initialization via Dem_Init() the Dem switches to state “INITIALIZED” and is fully 
    operable  afterwards.  In  this  phase  EnableConditions  are  initialized  to  their  configured 
    default state and can take effect. 
    Now  the  function  Dem_MainFunction()  can  be  called  until  Dem_Shutdown()  will 
    finalize  all  pending  operations  in  the  Dem,    deactivate  the  event  processing  except  for 
    BSW events and change the state to “SHUTDOWN”. Figure 3-1 provides an overview of 
    the described behavior. 
    In case SilentBSW checks are enabled, failing run-time checks will cause the Dem to enter 
    state ‘HALTED_AFTER_ERROR’. Please refer to chapter 3.18.1.2 for more details. 
     
     
    Changes 
    Prior versions (Implementation version < 7.00.00) did consider the configured enable 
      conditions during the pre-initialization phase. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    24 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     stm InitStates
    Normal operation
    UNINITIALIZED
    PREINITIALIZED
    Compiler startup
    notes
    notes
    code
    
    Dem is not initialized
    
    Dem is pre-initialized
    
    APIs if called will throw a DET 
    Pre-Init
    
    most APIs if called will throw a DET error
    
    Dem internal variables have random 
    
    calls to API Dem_ReportError() will not 
    value
    cause a DET error
    Initial
    InitMemory
    Init
    SHUTDOWN
    INITIALIZED
    notes
    notes
    
    Dem is stopped
    Init
    
    Dem is initialized and fully operational
    
    most APIs if called will throw a DET error
    
    All APIs can be accessed without a DET error
    
    calls to API Dem_ReportError() will not cause a 
    
    Dem does access (and modify) the NVRAM 
    DET error
    mirror
    Final
    Shutdown
    Run-Time check fails
    HALTED_AFTER_ERROR
    notes
    Dem is disabled due to failed run-time 
    checks

     
    Figure 3-1  Dem states 
    3.3 
    Diagnostic Event Processing 
    A  diagnostic  event  defines  the  result  of  a  monitor  which  can  be  located  in  a  SWC  or  a 
    BSW  module.  These  monitors  can  report  an  event  as  a  qualified  test  result  by  calling 
    Dem_ReportErrorStatus() or Dem_SetEventStatus() with “Failed” or “Passed” or 
    as  a  pre-qualified  test  result  by  using  the  event  de-bouncing  with  “PreFailed”  or 
    “PrePassed”. 
    In order to use pre-qualified test results the reported event must be configured with a de-
    bounce algorithm. Otherwise (using monitor internal de-bouncing) pre-qualified results will 
    cause a DET report and are ignored.  
    3.3.1 
    Event De-bouncing 
    The Dem implements the mechanisms described below: 
    3.3.1.1 
    Counter Based Algorithm 
    A  monitor  must  trigger  the  Dem  actively,  usually  multiple  times,  before  an  event  will  be 
    qualified as passed or failed. Each separate trigger will add (or subtract) a configured step 
    size value to a counter value, and the event will be qualified as ‘failed’ or ‘passed’ once this 
    de-bounce counter reaches the respective configured threshold value. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    25 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    The  configurable  thresholds  support  a  range  for  the  de-bounce  counter  of  -32768  … 
    32767.  For  external  reports  its  current  value  will  be  mapped  linearly  to  the  UDS  fault 
    detection counter which supports a range of -128 … 127. 
     
     
    Caution 
    Threshold values of 0 to detect a qualified failed or qualified passed result are allowed 
      in some Autosar versions, but this implementation does not support such a setting. 
     
     
    If  enabled,  counter  based  de-bounced  events  can  de-bounce  across  multiple  power 
    cycles. Therefore the counter value is persisted into non-volatile memory during shutdown 
    of the ECU. 
     
    3.3.1.2 
    Time Based Algorithm 
    For events  using time based de-bouncing,  the application only needs to trigger the Dem 
    once in order to set a qualification direction. The event will be qualified after the configured 
    de-bounce time has elapsed. Multiple triggers for the same event and same qualification 
    direction have no effect. 
    Each event report results at most in reloading a software timer due to a direction change. 
    Once an event was reported, the timer is stopped by 
    >  A “clear DTC” command 
    >  The restart of the event’s associated “Operation cycle” 
    >  Deactivation of (one of) the event’s associated enable condition. 
    >  API Dem_ResetEventDebounceStatus(). 
    Event  de-bouncing  via  time  based  algorithm  requires  comparatively  high  CPU  runtime 
    usage.  To  alleviate  this,  the  Dem  supports  both  a  high  resolution  timer  (a  Dem  main 
    function  call  equals  a  timer  tick)  and  a  low  resolution  timer  (150ms  equals  a  timer  tick). 
    Events  which  have  a  de-bounce time  greater  than  5  seconds  will  use  the  low  resolution 
    timer per default. Still, software timers are expensive and should be used sparingly. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    26 
    based on template version 5.0.0 






    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Changes 
    Since implementation version 8.00.00, events using time based debouncing are 
      processed on the Dem task function. This change affects monitors reporting a fully 
    qualified result instead of using a de-bounced report (e.g. DEM_EVENT_STATUS-
    _FAILED instead of DEM_EVENT_STATUS_PREFAILED) 
    If your monitor reports fully qualified results, consider using monitor internal 
    debouncing instead of time-based debouncing to achieve synchronous behavior or the 
    Dem reporting functions. 
     
     
     
     
    Note 
    The timer ticks are processed on the Dem main task. If you report an event using time-
      based de-bouncing before the Dem is initialized, the timer will only start running when 
    the system has reached the point where cyclic tasks are served. 
     
     
    3.3.1.3 
    Monitor internal de-bouncing 
    If the application implements the de-bouncing algorithm itself, a callback function can be 
    provided,  which  is  used  for  reporting  the  current  fault  detection  value  to  the  diagnostics 
    layer. 
    These  functions  should  not  implement  logic,  since  they  are  called  in  runtime  extensive 
    context. 
    If monitor internal de-bouncing is configured for an event, its monitor  cannot request de-
    bouncing  by  the  Dem  (i.e.  trigger  operation  SetEventStatus  with  monitor  results 
    DEM_STATUS_PRE_FAILED or DEM_STATUS_PRE_PASSED). This would also result in 
    a DET report in case development error detection is enabled. The Dem module does not 
    have the necessary information to process these types of monitor results. 
     
     
    Workaround (before version 6.00.00) 
    If you do not want de-bouncing for an event at all, e.g. only report qualified passed and 
      failed results, you should consider using counter based de-bouncing for these events. 
    For efficiency reasons, only choose monitor internal de-bouncing if you need to provide 
    the callback function.  
    With version 6.00.00 the callback function for internal de-bouncing is optional. 
     
     
     
     
    Note 
    In case environment data has to be stored due to reaching a de-bounce detection 
      counter value that is still less than qualified failed (< UDS FDC 127), monitor internal 
    de-bouncing cannot be used. Please also see chapter 3.10.1 
     
     
    3.3.2 
    Event Reporting 
    Monitors  may  report  test  results  either  by  PortInterface  or,  in  case  of  a  complex  device 
    driver or basic software module, by direct C API. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    27 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    The different APIs are important because callback contexts (i.e. the origin of the function 
    call)  for  all  configured  notification  callbacks  must  be  known  to  the  RTE  generator.  The 
    current Autosar design is implemented such that  CDD and BSW do not  declare formally 
    where  calls  to  ReportErrorStatus  take  place.  Instead,  the  Dem  has  to  queue  all  reports 
    from ReportErrorStatus and perform the action on its task level. 
     
     
    Caution 
    In systems with an Rte, never call Dem_SetEventStatus() directly from your code. 
      Always use the Rte_Call_.mechanism. Alternatively configure the reported event as 
    EventKind ‘BSW’ and report its status using API Dem_ReportEventStatus(). 
     
     
    One disadvantage of Dem_ReportEventStatus() is its missing return code. The caller 
    cannot tell if a test result has been discarded. Whenever possible, implement your 
    monitors as Software Components with access to Rte functionality. 
     
     
    Caution 
    Status reports do not maintain relative order. The Dem does not guarantee that multiple 
      event reports are processed in the same order that they had been reported in. 
    Ordering is preserved for the first result, but there is no guarantee that multiple reports 
    preserve the order of report for each and every single test result during a single task. 
    This is mainly due to the additional resources required for no apparent benefit. 
    The behavior is best described as example: 
    If two monitors 1 and 2 report failed results F1 and F2, their order is preserved. 
    If monitors toggle within a single Dem task cycle, their respective ordering is no 
    preserved.  
    Example: Reporting order F1, F2, P2, P1 would be processed as F1, P1, F2, P2 instead, 
    which still preserves the order of the initial test result. 
     
     
    Due to the different nature of these APIs, it is an error to call ‘the other’ API from the one 
    configured for an event. The Dem will post a DET notification in that case, provided 
    development error detection is enabled. 
    3.3.3 
    Event Status 
    Every  event  supports  a  status  byte  whereas  each  bit  represents  different  status 
    information. For detailed information please refer to [7]. 
    >  Bit 0 – TestFailed 
    The bit indicates the qualified result of the most recent test. 
    >  Bit 1 – TestFailedThisOperationCycle 
    The bit indicates if during the active operation cycle the event was qualified as failed.  
    >  Bit 2 – PendingDTC 
    This bit indicates if during a past or current operation cycle the event has been 
    qualified as failed, and has not tested ‘passed’ for a whole cycle since the failed result 
    was reported. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    28 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    >  Bit 3 – ConfirmedDTC 
    The bit indicates that the event has been detected enough times that it was stored in 
    long term memory. 
    >  Bit 4 – TestNotCompletedSinceLastClear 
    This bit indicates if the event has been qualified (passed or failed) since the fault 
    memory has been cleared. 
    >  Bit 5 – TestFailedSinceLastClear 
    This bit indicates if the event has been qualified as failed since the fault memory has 
    been cleared. 
    >  Bit 6 – TestNotCompletedThisOperationCycle 
    This bit indicates if the event has been qualified (passed or failed) during the active 
    operation cycle. 
    >  Bit 7 – WarningIndicatorRequested 
    The bit indicates if a warning indicator for this event is active. 
    Due to consistency concerns in systems using preemptive tasks not all status transitions 
    on these bits can be performed independently from each other. Transitions that depend on 
    the  state  of  the  shared  event  memory  can  influence  each  other  and  are  processed  in  a 
    serialized form on the Dem task function 
    Chapter  3.3.3.1  and  3.3.3.2  describe  which  status  bit  transitions  are  modified 
    synchronously (in context of the caller) and which status bits are modified asynchronously 
    (in context of the Dem). 
    3.3.3.1 
    Synchronous Status Bit Transitions 
    The  status  bits  0,  1,  4,  and  6  are  synchronously  modified  in  the  context  of  the  caller  of 
    Dem_SetEventStatus().  After  this  function  has  returned,  the  status  bits  will  have  an 
    updated state. 
    The setting of bit 5 can be influenced by configuration. If it is not set to setting ‘stored only’ 
    (see chapter 3.3.3.3) this bit is also set synchronously. 
    Please note that status notification callbacks will be processed in the caller context as well. 
    Reports by Dem_ReportErrorStatus() are queued and do not modify the status byte 
    synchronously. Please also see chapter 3.3.2. 
     
     
    Caution 
    Combined events and events using time-based de-bouncing are queued and do not 
      modify their event status synchronously. 
     
     
    3.3.3.2 
    Asynchronous Status Bit Transitions 
    During the call of Dem_MainFunction() Status bits 2, 3 and 7 will be updated. This is 
    done asynchronously to remove time consuming operations from the callers’ context, and 
    to provide an easy serialization without falling back to interrupt locks. 
    If bit 5 is set to ‘stored only’ processing it is set asynchronously as well. 
    Therefore, the call to Dem_SetEventStatus()only costs as little as possible in terms of 
    runtime and stack usage. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    29 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Pending reports by Dem_ReportErrorStatus() are processed on task level for all bits, 
    please also see chapter 3.3.2. 
    Events  configured  to  age  immediately  on  the  first  qualified  passed  result  do  not  allow 
    queuing  a  qualified failed  result until  after  the  passed  result  was  processed on  the  Dem 
    task. In this case, E_NOT_OK is returned from Dem_ReportErrorStatus() 
    3.3.3.3 
    Event Storage modifying Status Bits 
    Several  UDS  status  bit  transitions  depend  on  successful  event  storage.  The  Dem  offers 
    multiple interpretations of these transitions when taking event displacement into account. 
    For status bits 2 – PendingDTC, 3 – ConfirmedDTC and 7 – WarningIndicatorRequested  
    there are two alternatives ‘Stored Only’ and ‘All DTC’ – see Figure 3-2.  
    For status bit 5 – TestFailedSinceLastClear the alternatives ‘Stored Only’ and ‘All DTC’ are 
    supported as well, along with a third option to select different reset conditions for this bit. 
    Please also see chapter 3.5.4. 
    The usual bit transitions are not affected by this option. It only selects the behavior in case 
    of event memory overflow and displacement.  
     
    Figure 3-2  Effect of Precondition ‘Event Storage’ and Displacement on Status Bits 
    Due  to Autosar  standardized  naming  of  configuration  options,  the  settings  for  these  bits 
    are named differently for each bit, please refer to Table 3-5  Configuration  of  status  bit 
    processing 
    for details. 
    Status Bit 
    ‘Stored Only’ 
    ‘All DTC’ 
    Bit 2 – PendingDTC 
    DemPendingDtcProcessing = 
    DemPendingDtcProcessing = 
    (Vector Extension) 
    STORED_ONLY 
    ALL_DTC 
    Bit 3 – ConfirmedDTC 
    DemResetConfirmedBitOn-
    DemResetConfirmedBitOnOverflow = 
    Overflow = TRUE 
    FALSE 
    Bit 5 – FailedSinceLastClear  DemStatusBitHandlingTest-
    DemStatusBitHandlingTestFailed-
    FailedSinceLastClear = 
    SinceLastClear = NORMAL or AGING 
    AGING_AND_DISPLACEMENT 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    30 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Status Bit 
    ‘Stored Only’ 
    ‘All DTC’ 
    Bit 7 – WarningIndicatorReq  DemWarningIndicatorRequested- DemWarningIndicatorRequested-
    (Vector Extension) 
    Processing = STORED_ONLY 
    Processing = ALL_DTC 
    Note: WIR bit is not reset on 
    displacement due to additional 
    requirements 
    Table 3-5   Configuration of status bit processing 
    3.3.3.4 
    Lightweight Multiple Trips (FailureCycleCounterThreshold) 
    Enabling  the  feature  for  multiple  trips  (see  DemGeneral/DemMultipleTripSupport)  will 
    enable the full-fledged support, but at the cost of a non-volatile trip counter per event. The 
    common requirement of up to 2 trips (DemEventFailureCycleCounterThreshold <= 1) can 
    work without this added cost. 
    In case you want to reduce Dem NV-RAM consumption, you can disable the full support 
    for multiple trips, and still have support for up to 2 trips for event confirmation. 
     
     
    Caution 
    Although the UDS status byte normally allows distinguishing the first from the second 
      trip, it is not sufficient information in all failure scenarios with ConfirmedDTC handled 
    ‘STORED_ONLY’.  
    In case an event cannot enter the event memory (e.g. due to storage conditions or 
    overflow) at the time of the second trip, the Dem loses the information that the event 
    had already failed in the last operation cycle. 
    This means that failed event reports and re-occurrences of the DTC will not lead to 
    confirmation until the next operation cycle. 
    If this limitation is not acceptable for your ECU, you need to enable the full support for 
    multiple trips (DemMultipleTripSupport == true). 
     
     
    3.4 
    Event Displacement 
    In case all available memory slots are already used up by past events when a new event 
    needs to be entered, the Dem can displace a less important event. This is governed by the 
    following set of rules, in the order of mention: 
    >  Dedicated Aging Counters are repurposed first 
    >  Aged events are displaced before other events 
    >  Lower prioritized events will be displaced by higher prioritized events. This step 
    depends on the configuration of event priorities and is omitted if each event has the 
    same priority. 
    >  Passive events of equal priority (test failed bit is not set) can be displaced if no lower 
    prioritized event can be found. This step can be omitted by configuration. 
    >  An active event of equal priority can be displaced if it has not been tested in the active 
    operation cycle. This step can be omitted by configuration.  
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    31 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    If multiple events match, the oldest one is displaced. Age in this context is defined by the 
    point in time the event data was last updated. 
    If no event matches, an option exists to displace the oldest event whatever its state. 
    3.5 
    Event Aging 
    The process of aging resets status bit 3 – ConfirmedDTC when a sufficient amount of time 
    has elapsed so that the cause for the error entry is assumedly not relevant anymore. This 
    is often used as a trigger to also  clear stored snapshot or extended data from the event 
    memory. 
    In addition to the aging process defined in [1] there are further options. The differences are 
    summarized in Table 3-6. 
    In all cases the event ages only if it supports aging, and the aging process continues long 
    enough so the events aging counter reaches the defined threshold value. 
     
     
    Note 
    The Dem supports reporting the aging counter value ‘0x00’ as ‘0x01’. This has no effect 
      on the actual aging of the DTC – If the aging target is configured to ‘0x01’, the DTC will 
    age when the aging counter reaches ‘0x01’ (see Figure 3-3), not when the counter 
    value ‘0x01’ is reported. 
     
     
     
     
    Aging start condition 
    Aging continuation 
    Type 1 (Autosar 
    An event that is tested passed 
    At the end of the events aging 
    Default) 
    immediately starts to age. 
    cycle, if the event is not currently 
    active (tested failed). 
    Type 2 
    At the end of the events 
    At the end of the events aging 
    operation cycle, in case the 
    cycle, if the event is not currently 
    event is tested and did not test 
    active (tested failed). 
    ‘failed’ in that cycle. 
    Type 4 
    An event that is tested passed 
    At the end of the events aging 
    immediately starts to age. 
    cycle, in case the event is tested in 
    its current operation cycle and is 
    currently not failed. 
    Types 3, 5 
    At the end of the events 
    At the end of the events aging 
    operation cycle, in case the 
    cycle, if the event is tested and not 
    event is tested and did not test 
    tested failed in its current operation 
    ‘failed’ in that cycle. 
    cycle. I.e. untested cycles are not 
    considered. 
    Type 6 
    An event that is tested passed 
    At the end of the events aging 
    and had not been tested failed 
    cycle, if the event is tested and not 
    immediately starts to age. 
    tested failed in its current operation 
    cycle. I.e. untested cycles are not 
    considered. 
    Table 3-6   Aging algorithms 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    32 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
    Figure 3-3  Behavior of the Aging Counter 
    3.5.1 
    Aging Target ‘0’ 
    Events  aging  ‘immediately’  are  handled  in  a  special  way,  depending  on  the  configured 
    aging algorithm. 
    In  general,  they  age  immediately  when  the  aging  start  condition  is  reached.  For  details 
    refer to Table 3-7. 
     
    Aging with target 0 
    Types 1, 4 and 6 
    When an event reports a passed result, and the DTC is tested passed  
    Types 2, 3 
    At the end of the event’s operation cycle, if the DTC was tested 
    passed and not tested failed in that cycle. 
    Type 5 
    When an event reports a passed result, the DTC is tested passed, 
    and not tested failed in that cycle. 
    Table 3-7   Immediate aging 
    3.5.2 
    Aging Counter Reallocation 
    To  implement  aging  of  events,  an  event  requires  an  aging  counter.  This  counter  is 
    contained within the event memory entry along with stored additional data. If the confirmed 
    bit is set  independently of event  storage (see chapter  3.3.3.3) events  do not  necessarily 
    have  the means  to  age,  even  if they meet  the precondition  (e.g.  test  completed and  not 
    tested failed for one operation cycle). 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    33 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    In this case the Dem module tries to reallocate a  free memory entry for the aging event. 
    This event entry is used solely for the purpose of aging the confirmed DTC bit. 
     
     
     
    Caution 
    In case ConfirmedDTC is set independently of event storage (Setting ‘ALL DTC’, see 
      chapter 3.3.3.3) DTCs do not necessarily age with the configured number of aging 
    cycles. This is not a bug, but a result of an insufficient amount of available aging 
    counters. 
     
     
    3.5.3 
    Aging of Environmental Data 
    Stored  data  can  optionally  be  discarded  or  kept  intake  once  a  DTC  has  completed  the 
    aging process and resets its ConfirmedDTC bit. 
    If the data is kept intact, it is reported to the Dcm in the same way it is reported for active 
    events. 
     
     
    Caution 
    This setting has a negative side effect on reallocating aging counters (see chapter 
      3.5.1), since the Dem prioritizes aged environmental data higher than the need for new 
    aging counters. There is no displacement of aged data due to a different, aging event.  
    Only a number of DTCs up to the available event memory entries can age, unless 
    events are cleared by other means, e.g. ClearDTC. 
     
     
    3.5.4 
    Aging of TestFailedSinceLastClear 
    The general status bit processing for bit 5 is described in chapter 3.3.3. There is however 
    an additional option to reset this bit when an event ages. 
    Currently the aging counter value required to reset Bit 5 is the same as for ConfirmedDTC, 
    so there is no way to age it at a later time. 
    Please  refer  to  the  configuration  parameter  DemGeneral/DemStatusBitHandlingTest-
    FailedSinceLastClear for details. 
    3.5.5 
    Aging and Healing 
    Aging and healing normally happen in parallel. The Dem does not implement safe guards 
    to prevent aging before  healing has occurred. This situation is rather unusual and would 
    indicate a mistake in the configuration, or how the cycles are reported to the Dem. 
    For some use-cases like OBD II, it is supported to only start with the aging process once a 
    configured  indicator  request  has  completed  healing.  In  order  to  achieve  consistent 
    behavior across all DTC, this can be activated also for events not supporting an indicator. 
    This aspect of the aging behavior can be selected using the configuration switch 
    DemGeneral/DemAgingAfterHealing. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    34 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.6 
    Operation Cycles 
    Each event is assigned to an operation cycle, e.g. ignition cycle. An operation cycle can be 
    started and stopped with the function Dem_SetOperationCycleState(). Reporting an 
    event to the Dem is possible only if its corresponding operation cycle is started – otherwise 
    the  report  will  be  discarded.  In  this  regard  the  operation  cycle  acts  as  additional  enable 
    condition which cannot be circumvented. 
    The operation cycle also is the basis for the status bits referring to ‘this operation cycle’ (Bit 
    1 and Bit 6), as well as the calculation of events that may or may not have occurred during 
    the whole cycle, e.g. to calculate the precondition for resetting Bit 2. 
    Since  operation  cycle  restarts  can  cause  a  lot  of  notification  function  calls,  the  actual 
    processing  is  done  asynchronously  on  the  Dem_MainFunction().  As  notification  for  the 
    finished processing, please use InitMonitorForX callbacks. 
     
     
    Caution 
    Due to the asynchronous processing, operation cycle changes will get lost if you shut 
      down the Dem module before a pending change is processed. 
     
     
    3.6.1 
    Persistent Storage of Operation Cycle State 
    The  Dem  provides  the  possibility  to  restore  the  state  of  operation  cycles  through  power 
    down. This feature has its caveats though. 
    The  persisted  state  of  operation  cycles  is  not  known  in  pre-initialization  state,  since  the 
    NvM which controls the non-volatile data relies on a pre-initialized Dem!  
    Until  the  Dem  is  completely  initialized  all  operation  cycles  are  inactive,  independently  of 
    their stored state. The persisted state only becomes active during  Dem_Init(), but this 
    state modification is not counted as flank of the operation cycle state and will not modify 
    the DTC status bytes. 
     
     
     
    Caution 
    Even with persistent operation cycle storage enabled, during pre-initialization all cycles 
      are in state ‘stopped’ since their real state is not known until full initialization. This will 
    cause discarded BSW error reports due to unfulfilled preconditions! 
     
     
     
    3.6.2 
    Automatic Operation Cycle Restart 
    Operation  cycles  automatically  count  as  enable  condition for  all  related  events,  meaning 
    that if a cycle is not started, monitor reports are not accepted. During ECU startup, there is 
    no valid way to start an operation cycle by API. 
    If  you  select  a  cycle  to  be  started  automatically,  it  will  be  treated  as  ‘started’  during  pre-
    initialization, so event reports are possible. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    35 
    based on template version 5.0.0 





    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Additionally,  all  calculations  resulting  from  an  operation  cycle  restart  are  done  in 
    Dem_Init()  –  But  be  aware  that  all  notification  functions  are  skipped,  since  the 
    initialization status of the RTE is not known at this point. 
    The  DTC  status  calculation  is  performed  in  Dem_Init()  ‘as  if’  the  cycle  had  started 
    before  Dem_PreInit().  E.g.  fault  detection  counters  of  related  DTCs  do  not  reset  to 
    zero. 
     
     
    Caution 
    Since the cycle is already started automatically you may not start it again from your 
      application. This would be regarded as an additional, completed cycle and would cause 
    unwanted modifications of the event status, like premature aging of events. 
     
     
     
     
    Caution 
    Automatic restart of cycle skips all notifications – including event status change and 
      monitor initialization callbacks. If you use this feature, your monitors need to initialize 
    their starting state in an initialization routine and cannot rely on an init-monitor 
    notification callback alone. 
     
     
    3.7 
    Enable Conditions and Control DTC Setting 
    Up  to  31  enable  conditions  can  be  assigned  to  an  event.  Only  if  all  assigned  enable 
    conditions are fulfilled the respective event reported via Dem_ReportErrorStatus() or 
    Dem_SetEventStatus() will lead to a change of the event status bits and a storage of 
    environmental data. Otherwise the event report will be discarded. 
    A  diagnostic  monitor  using  the  RTE  interfaces  to  report  events  can  evaluate  the  return 
    value of the SetEventStatus operation. In case event reports are discarded, this operation 
    will always return E_NOT_OK. It is not possible to tell the exact reason for the discarded 
    report. 
    Enable  condition  states  can  be  set  via  Dem_SetEnableCondition()  respectively  by 
    the corresponding port interface operation. 
     
     
    Changes 
    Since Implementation version 7.00.00, enable conditions do not take effect until after 
      full initialization (Dem_Init()) 
     
     
    When an event’s enable conditions are not fulfilled, the Dem provides the option to reset or 
    to freeze an ongoing de-bouncing process. Using this feature  defers enabling an enable 
    condition  to  the  Dem  main  function,  because  it  involves  checking  all  events  if  they  are 
    affected by the change. 
    As a side effect, it is possible to lose enable condition changes that toggle faster than the 
    cycle time of the Dem main function. 
    The same applies to ControlDTCSetting. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    36 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Changes 
    Since implementation version 8.00.00, enabling enable conditions and 
      ControlDTCSetting are processed on the Dem main function. Activating an enable 
    condition will not have immediate effect. This change affects all configurations using 
    time-based de-bouncing, or the option to reset the de-bounce counters on enable 
    condition change. 
     
     
     
     
    Caution 
    EnableDTCSettings is processed on the main function, but the API was not changed to 
      asynchronous by Autosar (RfC 69895). As a result, the Dcm will send the positive 
    response to service $85 before the DTCSettings have actually been enabled. This can 
    be observable as DTCs are not entered into the Dem until the Dem task function has 
    completed. 
     
     
    3.7.1 
    Effects on de-bouncing and FDC 
    While  enable  conditions  are  disabled,  de-bouncing  is  usually  stopped  as  well.  The  Dem 
    allows  configuring  whether  events  continue  de-bouncing  where  they  left  off,  or  whether 
    they start from the beginning – or even continue de-bouncing. 
    The point in time of the reset, being either when the enable conditions are disabled or re-
    enabled, is also subject to configuration. 
    In  any  case,  it  is  not  possible for  events  to qualify  during  the  time  enable  conditions  (or 
    ControlDTCSetting) are disabled. 
    3.8 
    Storage Conditions 
    Up  to  32  storage  conditions  can  be  assigned  to  an  event.  If  the  assigned  storage 
    conditions  are  not  fulfilled,  the  respective  event  reported  via  Dem_SetEventStatus() 
    will change its status byte, but its environmental data and statistical data (e.g. most recent 
    failed event) is not stored or updated. 
    Also,  status bits  2,  3,  5  and  7  will  not  transition  while  storage  conditions are  not  fulfilled 
    (depending on configuration options, see chapter 3.3.3.3). 
    The storage condition state can be set via Dem_SetStorageCondition(). 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    37 
    based on template version 5.0.0 





    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    Unfulfilled storage conditions prevent event storage, not postpone it. When storage is 
      re-enabled, in most configurations the blocked entries will require either a passed 
    failed transition or a transition of TestFailedThisOperationCycle in order to create a 
    memory entry. 
     
     
    3.9 
    DTC Suppression 
    AUTOSAR  provides  two  mechanisms  to  disable,  hide or  otherwise  prevent  evaluation  of 
    test reports. They differ in the impact of the suppression operation. 
    This  implementation  allows  calling  the  event  based  suppression  API  before  full 
    initialization,  and  calls  by  BSW  or  CDD  (i.e.  it  does  not  require  Rte_Call).  Please  be 
    advised that this is an extension to [1]. 
     
     
    Note 
    Suppression / Availability states are not stored in non-volatile RAM – suppression must 
      be (re)activated in each power cycle. 
     
     
    3.9.1 
    Event Availability 
    The  API  Dem_SetEventAvailable()  can  disconnect  the  event  reporting  from  event 
    processing.  Use  this  mechanism  in  case  the  ECU  has  fault  paths  that  are  supported 
    conditionally, e.g. due to ECU variants. 
    Unavailable  events  do  not  track  a  status.  They  cannot  confirm,  cannot  enter  the  event 
    memory, and attached DTCs are not reported to the outside world, i.e. through Dcm API. 
    Event reports and the request to suppress the same event do collide. In order to correctly 
    implement  suppression,  unused  DTCs  should  be  suppressed  before  the  monitor  in 
    question starts to report test results for it. 
     
     
    Caution 
    The FiM module prior to Autosar 4.2.1 is not able to work with unavailable events. It 
      can cause runtime errors and/or FID status miscalculations when the FiM module tries 
    to request the event status of an unavailable event, since that request will return an 
    unexpected error code. 
     
     
    DTCs and events already stored in the event memory cannot be made unavailable and the 
    corresponding API call will fail. 
    For  combined  events,  the  DTC  will  be  hidden  only  after  all  events  attached  to  the  DTC 
    have been set to disabled. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    38 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    A default setting for event availability can be defined. In this case, the API 
      Dem_SetEventAvailable() may not be called before Dem initialization, as the active 
    configuration is not known  
    Also, the default setting cannot be used in conjunction with DemAvailabilityStorage 
     
     
    3.9.2 
    Suppress Event / Suppress DTC 
    The suppression APIs only ‘hide’ DTCs to the outside world. 
    Event processing and storage are processed normally – this means suppressed DTCs can 
    use up memory slots, and enable indicators. 
    DTCs  and  events  suppression  states  are  tracked  independently,  as  defined  in  [1].  This 
    means, you can only ‘unsuppress’ a DTC using the same API it was suppressed with. 
    For combined events, the DTC will be hidden only after all events attached to the DTC are 
    suppressed, or the DTC is suppressed directly using Dem_SetDTCSuppression(). 
     
     
    Note 
    Different from the event based suppression, DTC suppression is not possible before 
      full initialization. Dem_Init() is the API that selects the active configuration, so the 
    mapping between EventId and DTC is not known before then. 
     
     
    3.10  Environmental Data 
    The  Dem  supports  storage  of  data  with  each  DTC  in  form  of  snapshot  records  and 
    extended data records.  
    A  Snapshot  Record  is  DTC  specific  and  consists  of  one  or  more  DIDs  (Data  Identifiers) 
    which  in  turn  consist  of  one  more  data  elements.  Snapshot  Records  are  collected  and 
    stored at a configurable point in time during event confirmation, and often multiple times.  
    An Extended Data Record is defined globally and consists of one or more data elements. It 
    is typically used for statistic values like the occurrence counter or aging counter that are 
    not frozen at storage time. 
    The content of data elements can be provided by the application or by the Dem itself. 
    For application defined data the Dem will request the data using callback functions every 
    time a new value needs to be stored, and supply the stored values to the reading module 
    (e.g.  the  Dcm).  This  type  of  data  is  comparable  to  snapshot  records  in  that  no  current 
    value can be supplied to a reader. 
    To use internal data provided by the Dem, data elements must be mapped by configuration 
    to the requested statistical value. The Dem will then always supply the current value of the 
    respective statistic to reading modules. 
    Figure 3-4 provides an example of the described layout. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    39 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Snapshot Record Layout
    DTC1 DID2 Data1
    Data2
    DID1
    Data3
    DTC2 DID3
    Data2
    Data4
    DTCn DID3
    Data2
    Data4
    DID4
    Data5
    Data6
    Data7
    Extended Data Record Layout
    DTC1 Ext1 Aging Cnt 
    DTC2 Ext1 Aging Cnt 
    Ext10 Data8
    Data9
    DTCn Ext1 Aging Cnt 
    Ext2
    Data10
    Ext4
    Data11
     
    Figure 3-4  Environmental Data Layout 
    3.10.1  Storage Trigger 
    There  are  two  algorithms  how  snapshot  records  are  stored.  One  is  the  ‘calculated 
    snapshot number’ option, for which snapshots are currently stored with each transition of 
    the TestFailed bit of an event.
    © 2009. Vector Informatik GmbH. All rights reserved. Any distribut
      ion or copying is subject to prior written approval by Vector.
    Slide: 1
    The ‘configured snapshot number’ option allows defining for each snapshot record in detail 
    when to store it, if its contents may be updated, and what its record number is going to be. 
    This  second  option  also  necessitates  defining  when  to  try  and  create  an  event  memory 
    entry, for there are some interesting combinations: 
    A failing DTC will (ideally) create the following triggers, in order: 
    1.  FDC threshold (< qualified failed) exceeded 
    2.  FDC qualifies, Bit 0 is set 
    3.  DTC Pending, Bit 2 is set 
    4.  DTC Confirmed, Bit 3 is set 
    Although in reality these can easily all occur at the same time. 
    Snapshots are stored and updated with each trigger, so e.g. if the snapshot trigger is ‘test 
    failed’, each of these events will update a corresponding snapshot record – once an event 
    memory entry is created for the DTC. 
    The  exact  trigger  that  is  used  to  create  a  memory  entry  is  set  with  option 
    DemGeneral/DemEventStorageTrigger.  This  way  you  can  realize  ECUs  that  i.e.  update 
    snapshot data with each Occurrence, but start only once the DTC reaches ConfirmedDTC. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    40 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.10.1.1  Storage Trigger ‘FDC Threshold’ 
    If snapshot data has to be stored prior to event qualification, the event has to be set up to 
    use a Dem internal de-bouncing algorithm. Currently there is no API to notify the Dem that 
    a FDC threshold has been detected by a monitor internal de-bouncing algorithm. 
    Also, the actual threshold values need to be configured for the events as well. 
     
     
    Caution 
    If an event cannot be stored due to a full event memory, another attempt is made only 
      when the FDC threshold is crossed again. If the event’s FDC rests above the threshold 
    value, no attempt to store data is made, even if another event was cleared in the 
    meantime, e.g. by ClearDTC. 
     
     
    3.10.2  Internal Data Elements 
    The Dem provides access to the following values  by means of an internal data element. 
    Internal  data  is  usually  not  frozen  in  the  primary  memory,  but  rather  the  current  value  is 
    reported. 
    Aging counter 
    Available  both  in  positive  direction,  counting  up  from  0  (event  is  not  aging)  up  to  the 
    configured threshold value; and in reverse counting down to 0. 
    Occurrence counter 
    Counts  the  number  of  passed-failed  transitions  since  an  event  has  been  stored.  This 
    counter is available in 8bit and 16bit variants. 
    Cycle counters 
    Different  statistics  concerning  the  number  of  operation  cycles:  The  number  of  cycles 
    completed  since  the  first  or  last  failed  result,  and  the  number  of  cycles  during  which  an 
    event has reported a failed result. 
    Overflow indication:  
    Indicates if the event’s memory destination has overflown. 
    Event priority:  
    Is set to the configured priority value of the event. 
    Significance: 
    Is set to the configured event significance value. Occurrence is 0, Fault is 1. 
    Root cause EventId 
    The  event  id  that  caused  the  storage/update  of  the environmental  data.  Can  be  used  in 
    context of the feature combined events to store the root cause event id. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    41 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    OBD DTC 
    The OBD DTC for the event id that caused the storage/update of the environmental data. If 
    no OBD DTC is configured the returned value will be 0. 
    Fault Detection Counter statistics 
    The current fault detection counter can always map. For internally de-bounced events, the 
    maximum value per operation cycle, and the maximum value since last clear are available 
    as well. 
     
     
    Caution 
    For time-based events, the maximum FDC in a cycle (or since last clear) are updated 
      during the Dem task processing. This can result in a current FDC larger than the 
    displayed maximum FDC when the de-bouncing timer has just started. 
    This situation will correct itself after the timer has ticked once, but for low resolution 
    timing this can take up to the configured low resolution tick (which defaults to 150 ms). 
     
     
    3.10.3  External Data Elements 
    Data  is  collected  through  required  port  prototypes  and  needs  to  be  mapped  to  the  data 
    provider  during  Rte  configuration.  Please  note  that  each  data  element  has  its  own  port 
    interface and port prototype. It is not supported to collect a variety of DIDs or data signals 
    through a shared callback function by AUTOSAR design. 
    As a vendor specific extension, the MICROSAR Dem module supports data callbacks that 
    also pass the EventId to the application. This allows scenarios not possible with a standard 
    Dem: 
      Application managed data storage: e.g. connecting the Dem to legacy applications that 
    already store (parts of) the environment data. 
      Event specific data contents: e.g. storing root cause dependent data. 
    3.10.3.1  Nv-Ram storage 
    The usual AUTOSAR Dem will store all data collected from the application in NV-Ram. 
    For such data elements, data sampling is always processed on the Dem cyclic function. 
    Queries (e.g. through Dcm UDS diagnostic services) always return the frozen value. 
    As an extension to AUTOSAR, the Dem also allows  to configure data elements to return 
    ‘live’ data. This is useful especially to support statistics data that is not already covered by 
    the Dem internal data elements. 
    When  data  elements  are  configured  not  to  be  stored  in  NV-Ram,  the  data  is  requested 
    every  time  a  query  is  processed.  Their  implementation  should  be  reentrant  and  fast  to 
    allow diagnostic responses to complete in time. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    42 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    There is no way to tell the Dem that data is ‘not currently available’ in this case. The 
      Autosar standard requires to substitute a ‘0xFF’ pattern in case a data callback returns 
    ‘NOT OK’ 
    Optional data is not possible, especially since a single DID or extended record may 
    consist of up to 255 callbacks, and optional data right in the middle of a DID makes no 
    sense. 
     
     
    3.11  Freeze Frame Pre-Storage 
    The  environmental  data  associated  with  a  DTC  is  collected  when  the  DTC  storage  is 
    processed  on  the  Dem  task  function.  The  delay  between  the  event  report  and  the  data 
    collection can be a problem if fast changing data needs to be captured. In other use-cases 
    the DTC is supposed to store a snapshot of the system state some time before the event 
    qualification finishes. 
    Using  Dem_PrestoreFreezeFrame()  a  monitor  can  request  immediate  data  capture.  If 
    successful,  this  snapshot  is  used  as  the  data  source  if  the  DTC  is  stored  to  the  event 
    memory later on. 
    The Dem captures the following data, if relevant: 
      A UDS snapshot record 
      A OBD freeze frame 
      J1939 freeze frame and expanded freeze frame 
     
     
    Caution 
    Extended data records are not captured. 
     
     
     
    The  Dem  can  only  pre-store  a  limited  number  of  events  (see  configuration  parameter 
    DemGeneral/DemMaxNumberPrestoredFF).  Once  the  allotted  space  is  exhausted 
    subsequent pre-storage requests will fail until one or more of them were freed. It is always 
    possible to refresh a pre-stored data set already allocated to an event. 
    Pre-Stored  data  is  not  preserved  through  Power-Cycles,  and  will  be  discarded 
    automatically  once  it  is  used  or  after  a  qualified  test  result  has  been  processed  for  the 
    respective  event.  Also  see  Dem_ClearPrestoredFreezeFrame()  for  a  way  to  explicitly 
    discard stale data. 
    3.12  Combined Events 
    It is possible to combine the results of multiple monitors to a  single DTC. This feature is 
    referred to as ‘Combined Events’ in this document. 
    Monitors  report  events  as  usual,  events  are  de-bounced  individually,  and  for  each  event 
    the Dem keeps track of its individual status byte. Only when a DTC status is required there 
    is a visible difference. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    43 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.12.1  Configuration 
    Currently  the  configuration  format  allows  too  much  freedom  in  configuration  due  to  the 
    multiple combination types. For Type 1 combination the following restrictions apply: 
      All events mapped to the same DTC must have identical environmental data 
    (extended records, number and content of snapshots etc. 
      All events mapped to the same DTC must use the same cycles (operation, failing, 
    healing and aging cycles)  
      All events mapped to the same DTC must use the same destination, significance, 
    priority, the same setting for ‘aging allowed’ and the same significance. 
    The behavior with mixed settings is undefined and not supported by this implementation. 
    3.12.2  Event Reporting 
    Monitor results that need to be combined are not processed directly, but deferred to task 
    level. Other than that the application API is not changed. 
     
     
    Caution 
    Do not depend on status changes of either event status or DTC status to occur during 
      the call to SetEventStatus and ReportErrorStatus. If monitors are combined to a shared 
    DTC, the status will not change until the next task cycle. 
     
     
     
    3.12.3  DTC Status 
    If  event  combination  is  used,  the  DTC  status  does  not  correspond  to  the  event  status 
    directly. Instead, the DTC status is derived from the status of multiple events. 
    As defined by Autosar (see [1]) this combined status is calculated according to Table 3-8. 
    Basically the DTC status is a simple OR combination of all events, with the resulting status 
    byte modified by an additional combination term. This is done such that a failed result will 
    also reset the ‘test not completed’ bits even if not all contributing monitors have completed 
    their test cycle. 
     
     
    Caution 
    A direct effect of event combination is a possible toggle of Bit 4 and Bit 6 during a 
      single operation cycle. I.e. these bits can become set (test not completed  true) as 
    result of a completed test. This behavior is intended by Autosar and not an 
    implementation issue. 
    Applications need to take this into account when reacting on changes of ‘Test not 
    Completed This Operation Cycle / Since Last Clear’! 
     
     
     
    Combined DTC Status Bit 
     
    Bit 0 – TestFailed 
    OR (Event[i].Bit0) 
    Bit 1 – Test Failed This Operation Cycle 
    OR (Event[i].Bit1) 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    44 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Combined DTC Status Bit 
     
    Bit 2 – PendingDTC 
    OR (Event[i].Bit2) 
    Bit 3 – ConfirmedDTC 
    OR (Event[i].Bit3) 
    Bit 4 – Test not Completed Since Last Clear  
    OR (Event[i].Bit4) AND NOT Bit5 
    Bit 5 – Test Failed Since Last Clear 
    OR (Event[i].Bit5) 
    Bit 6 – Test not Completed This Operation Cycle 
    OR (Event[i].Bit6) AND NOT Bit1 
    Bit 7 – Warning Indicator Requested 
    OR (Event[i].Bit7) 
    Table 3-8   DTC status combination 
    3.12.4  Environmental Data Update 
    Environment  data  and  statistics  are  calculated  based  on  the  DTC  status,  not  the  event 
    status of contributing events. 
    Example:  The  occurrence  counter,  if  configured,  is  not  incremented  with  each  failing 
    monitor.  Instead,  the occurrence  counter  is  incremented  each  time  Bit0  of the  combined 
    DTC transitions 0  1. 
    A failed monitor result might therefore not result in an update of event data (nor an event 
    data changed notification). This behavior is intentional. 
    3.12.5  Aging 
    A combined DTC starts to age once the conditions discussed in chapter 3.5 are fulfilled for 
    each event, e.g. once all monitors have reported a ‘passed’ result. 
    3.12.6  Clear DTC 
    If  a  request  to  clear  a  combined  DTC  is  received,  all  monitors  that  define  a  ‘clear  DTC 
    allowed’  callback  will  be  notified  by  the  Dem  and  have  a  chance  to  prevent  the  clear 
    operation. If a single monitor disallows the clear operation, the DTC will be left in the event 
    memory. 
     
     
    Caution 
    If an application responds positively to a call to a ‘clear event allowed’ callback, the 
      DTC is not necessarily cleared as a result! 
    Another monitor can be combined to the same DTC and disallow the clear operation. 
    Do not use a clear allowed callback as indication that a DTC was cleared, instead use 
    the InitMonitorForEvent notification! 
     
     
    3.13  Non-Volatile Data Management 
    The Dem uses the standard AUTOSAR data management facilities provided by the NvM 
    module. 
    3.13.1  NvM Interaction 
    If immediate data writes are enabled, the NvM needs to support API configuration class 2. 
    Otherwise the APIs provided by configuration class 1 are sufficient for Dem operation. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    45 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    If  you  do  not  use  an  AUTOSAR  NvM  module,  you  have  to  provide  a  compatible 
    replacement in order to use features related to non-volatile data management. The NVM 
    module  needs  to  implement  at  least  the  functionality  described  in  chapter  4.5  NVM 
    Integration.
     
    3.13.2  NVRAM Write Frequency  
    The Dem is designed to trigger as less NVRAM writes as possible. Thereto only the data 
    which  typically changes not  very often is stored during ECU runtime. The following table 
    will give you an overview of the NVRAM write frequency. 
    NvRam Item  
     
     
     
     
    ntry
     
     
    ata
     
     E
    e D
    ntry
    y
    c
     E
    r
     
    Data
     Data
    da
    n i
    un
    ary
    Write Frequency
    us
     
    m
    on
    tat
    mir
    ec
    Ad
    S
    Debo
    P
    S
    At shutdown - always 
      1   
     
     
    At shutdown - if content has changed 
     
     
     
       
    At clear DTC 
             
    Immediately - if immediate NVRAM storage is enabled    
     
     
    2  2 
    Immediately by Dem_RequestNvSynchronization() – if           
    content has changed 
    Table 3-9   NVRAM write frequency 
    3.13.3  Data Recovery 
    As the Dem uses multiple NVRAM blocks to persist its data (refer to 4.5), it might happen 
    that  correlating  data  becomes  inconsistent  due  to  a  power  loss  or  an  NVRAM  error.  To 
    avoid  restoring  to  an  undefined  state,  during  initialization  some  errors  are  detected  and 
    corrected, as follows. 
    >  Duplicate entries in a memory are resolved by removing the older entry. 
    >  Stored-Only/Aging status bits are reset if the respective event is not stored, or aged. 
    >  Depending on aging behavior the status bits TestFailed, PendingDTC, 
    TestFailedThisOperationCycle and WarningIndicatorRequested, are reset for currently 
    aging events. 
    >  Reset status bit TestFailedThisOperationCycle if both TestFailedThisOperationCycle 
    and TestNotCompletedThisOperationCycle are set. 
    >  Reset status bit TestNotCompletedSinceLastClear if both TestFailedSincleLastClear 
    and TestNotCompletedSinceLastClear are set. 
    >  De-bounce counters are reset if they exceed the configured threshold, or the 
    TestFailed bit does not match a reached threshold (only relevant if de-bounce counters 
    are stored in NVRAM). 
                                                
    1 Only in case of option DemOperationCycleStatusStorage is enabled 
    2 Immediate storage is restricted to changes caused by an occurrence, or initial storage. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    46 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    >  Stored Events have their status bit corrected if: 
    >  Events are stored when they reach an fault detection counter limit and if 
    >  A consecutive failed cycle counter is supported, and has a value > 0, status bits 
    PendingDTC and TestFailedSincleLastClear are set. If that counter also exceeds 
    the failure cycle counter threshold, the ConfirmedDTC status bit is set. 
    >  An occurrence counter is supported and has a value > 0, then status bit 
    TestFailedSincleLastClear is set. 
    >  Events are stored with other triggers 
    >  The status bit TestFailedSincleLastClear is set. 
    >  If a consecutive failed cycle counter is supported, and has a value > 0, the status bit 
    PendingDTC is set. If that counter also exceeds the failure cycle counter threshold, 
    the status bit ConfirmedDTC is set. 
    >  If the event has a failure cycle counter threshold of 0, the status bit ConfirmedDTC 
    is set. 
    >  If events are stored with trigger ConfirmedDTC, status bit ConfirmedDTC is set. 
    >  If a combined event is stored, but the EventId in NVRAM is not the 'master' EventId for 
    that combination group, the entry is discarded. This happens due to an integration 
    error, so also a DET error (inconsistent state) will be set. 
    >  If the event has no warning indicator configured but the status bit 
    WarningIndicatorRequested is set, then the status bit WarningIndicatorRequested is 
    reset. 
    3.14  Diagnostic Interfaces 
    To  provide  the  data  maintained  by  the  Dem  to  an  external  tester  the  Dem  supports 
    interfaces to the Dcm which are described in chapter 6.2.6. 
    Please note, these API are intended for use by the Dcm module exclusively and may not 
    be  safe  to  use  otherwise.  In  case  a  replacement  for  the  Dcm  module  has  to  be 
    implemented, we politely refer to the Autosar Dcm specification  [3], and do not elaborate 
    on the details within the context of this document. 
    3.15  Notifications 
    The  Dem  supports  several  configurable  global  and  specific  event  or  DTC  related 
    notification  functions  which  will  be  described  in  the  following.  For  details  please  refer  to 
    chapter 6.5.1. 
    Notification functions will only be called, if the Dem is fully initialized. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    47 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    Status notifications are separated for asynchronous and synchronous changes (also 
      see chapter 3.3.3). A status report may therefore result in separate notifications. 
     
     
     
     
    Caution 
    Notifications are not necessarily ordered correctly. This means the event status 
      received from a notification function is not reliable. 
    Do not use event notification in safety relevant contexts (see AUTOSAR RfC 
    48668) 
    To work around the issue, you can prevent monitors and the Dem task from pre-
    empting each other (not recommended) or ignore the received status values and use 
    GetEventStatus to read the current one. 
     
     
    3.15.1  Event Status Changed 
    These  are  notifications  for  an  event  status  change  independent  of  the  DTC  status 
    availability  mask. With  the  given  old  and new  status  the  receiver  is  able  to  identify  what 
    has changed. 
    >  General notification:  
    This callback function is called from Dem for each event on status change. 
    >  Event specific notifications:  
    Each event may have one or more of these callback functions which are called only if 
    the respective event status has changed. 
    >  FIM notification:  
    This callback function is called for each event on status change. Dependent on the 
    given state the FIM is able to derive the new fault inhibition state. 
    3.15.2  DTC Status Changed 
    These are notifications for a DTC status change. The DTC status availability mask is taken 
    into account, so status bits which are not supported will not cause a notification. It is also 
    possible that a changed event status does not change the resulting status of a combined 
    DTC. 
    >  Global notifications:  
    The configuration can define one or more of these callback functions which are called 
    only if the respective DTC status has changed. 
    >  Dcm notification:  
    This callback function is called for each DTC status change. Dependent on the given 
    state the Dcm is able to decide if a ROE message shall be sent. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    48 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Changes 
    Since version 11.00.00, the Dem will not trigger Dcm notification on status changes 
      caused by ClearDTC. 
    Also, all Dcm notifications are suppressed unless they become enabled using API 
    Dem_DcmControlDTCStatusChangedNotification(). 
    To achieve the behavior of earlier versions, disable Dcm notifications and configure the 
    Dcm callback function as generic C callback: 
    DemTriggerDcmReports = False 
    DemCallbackDTCStatusChangedFnc = <Symbol of Dcm notification function> 
    DemHeaderFileInclusion = <Header file declaring the Dcm notification function> 
     
     
     
    3.15.3  Event Data Changed 
    These notifications will be called from Dem if the data related to an event has changed. 
    >  General notification:  
    This is a single callback function which is called for each event on data change. 
    >  Event specific notification:  
    Each event may have one callback function which is called on event data change. 
    3.15.4  Monitor Re-Initialization 
    These notifications are  called from  Dem,  to signal  to diagnostic monitors  that a new test 
    result is now requested. This can happen due to clearing the fault memory, the start of a 
    new  operation  cycle,  or  the  re-enabling  of  previously  disabled  DTC  settings  or  enable 
    conditions 
    The set of notification calls is fully customizable in the configuration. 
    >  Event specific notification:  
    Each event may have one callback function which is called for the reasons mentioned 
    above. 
    >  Function specific notifications:  
    Each event may have one or more of this callback functions which is called for the 
    reasons mentioned above. 
    For combined events, this callback is notified for each event if they are re-enabled by 
    enable conditions. 
    3.16  Indicators 
    An  event  can  be  configured  to  have  one  or  more  indicators  assigned.  An  indicator  is 
    reported  active  if  at  least  one  assigned  event  requests  it,  and  cleared  when  all  events 
    assigned  to  it  have  revoked  their  warning  indicator  request  (i.e.  by  healing  or  diagnostic 
    service ClearDtc). 
    The indicator status is set always with event confirmation (set condition of bit 3), and reset 
    after the configured number of operation cycles during which the event was tested, but not 
    tested failed. 
    An event’s warning indicator request status is reported in bit 7 of the UDS status byte. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    49 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.16.1  User Controlled WarningIndicatorRequest 
    Use  cases  that  demand  setting  of  the  UDS  Bit  7  (WarningIndicatorRequest)  differently 
    from  the  normal  indicator  handling  can  be  met  using  the  operation  SetWIRStatus  (see 
    chapter 6.6.1.1.9)
    Examples include resetting the WIR bit only with the next power cycle after the indicator 
    status has healed, or setting it with the first failed result instead of the ‘confirmedDTC’ bit. 
    This  interface  also  allows  controlling  Bit7  of  a  BSW  error.  There  is  only  a  SWC  API 
    available to control the WIR status bit of BSW errors, so a SWC module has to be used for 
    this task in all cases. 
    To calculate the visible status of Bit 7, the ‘normal’ monitor WIR request is logically OR’ed 
    to the user controlled state as depicted in Figure 3-5. 
     
     
    Note 
    UDS  DTC  status  change  notifications  are  called  only  if  the  combined  (User 
      Controlled  +  Indicator)  status  changes.  In  case  more  detailed  information  is 
    needed a SWC can use the operation GetWIRStatus in combination with event 
    status notifications. 
     
     
     
    Figure 3-5  User Controlled WarningIndicatorRequest 
    3.17  Interface to the Runtime Environment 
    The  Dem  interacts  with  the  application  through  the  Rte  and  defined  port  interfaces  (see 
    chapter 6.6). 
    There are no statically defined callouts that need to be implemented by the application. All 
    notifications and callouts are set up during configuration. 
    This  is  why  the  Dem software  component  description  file  (Dem_swc.arxml)  is  generated 
    based on the configuration. 
    3.18  Error Handling 
    3.18.1  Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  Det  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter Dem_DEV_ERROR_DETECT==STD_ON). 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    50 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported Dem ID is 54. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  6.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Dem_GetVersionInfo() 
    0x01 
    Dem_PreInit() 
    0x02 
    Dem_Init() 
    0x03 
    Dem_Shutdown() 
    0x04 
    Dem_SetEventStatus() 
    0x05 
    Dem_ResetEventStatus() 
    0x06 
    Dem_PrestoreFreezeFrame() 
    0x07 
    Dem_ClearPrestoredFreezeFrame() 
    0x08 
    Dem_SetOperationCycleState() 
    0x09 
    Dem_SetOperationCycleCntValue 
    0x0A 
    Dem_GetEventStatus() 
    0x0B 
    Dem_GetEventFailed() 
    0x0C 
    Dem_GetEventTested() 
    0x0D 
    Dem_GetDTCOfEvent() 
    0x0E 
    Dem_DcmGetSeverityOfDTC() 
    0x0F 
    Dem_ReportErrorStatus() 
    0x11 
    Dem_SetAgingCycleState 
    0x12 
    Dem_SetAgingCycleCounterValue 
    0x13 
    Dem_DcmSetDTCFilter() 
    0x15 
    Dem_DcmGetStatusOfDTC() 
    0x16 
    Dem_DcmGetDTCStatusAvailabilityMask() 
    0x17 
    Dem_DcmGetNumberOfFilteredDTC() 
    0x18 
    Dem_DcmGetNextFilteredDTC() 
    0x19 
    Dem_DcmGetDTCByOccurrenceTime() 
    0x1A 
    Dem_DcmDisableDTCRecordUpdate() 
    0x1B 
    Dem_DcmEnableDTCRecordUpdate() 
    0x1C 
    Dem_DcmGetOBDFreezeFrameData 
    0x1D 
    Dem_DcmGetFreezeFrameDataByDTC() 
    0x1F 
    Dem_DcmGetSizeOfFreezeFrameByDTC() 
    0x20 
    Dem_DcmGetExtendedDataRecordByDTC() 
    0x21 
    Dem_DcmGetSizeOfExtendedDataRecordByDTC() 
    0x22 
    Dem_DcmClearDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    51 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Service ID 
    Service 
    0x23 
    Dem_ClearDTC() 
    0x24 
    Dem_DcmDisableDTCSetting() 
    0x25 
    Dem_DcmEnableDTCSetting() 
    0x29 
    Dem_GetIndicatorStatus() 
    0x2A 
    Dem_DcmCancelOperation() 
    0x30 
    Dem_GetEventExtendedDataRecord() 
    0x31 
    Dem_GetEventFreezeFrameData() 
    0x32 
    Dem_GetEventMemoryOverflow() 
    0x33 
    Dem_SetDTCSuppression() 
    0x34 
    Dem_DcmGetFunctionalUnitOfDTC() 
    0x36 
    Dem_SetEventSuppression() 
    0x37 
    Dem_SetEventAvailable() 
    0x38 
    Dem_SetStorageCondition() 
    0x39 
    Dem_SetEnableCondition() 
    0x3A 
    Dem_DcmGetNextFilteredRecord() 
    0x3B 
    Dem_DcmGetNextFilteredDTCAndFDC() 
    0x3C 
    Dem_DcmGetTranslationType() 
    0x3D 
    Dem_DcmGetNextFilteredDTCAndSeverity() 
    0x3E 
    Dem_GetFaultDetectionCounter() 
    0x3F 
    Dem_DcmSetFreezeFrameRecordFilter() 
    0x40 
    Dem_DltGetAllExtendedDataRecords 
    0x41 
    Dem_DltGetMostRecentFreezeFrameRecordData 
    0x51 
    Dem_SetEventDisabled 
    0x52 
    Dem_DcmReadDataOfOBDFreezeFrame 
    0x53 
    Dem_DcmGetDTCOfOBDFreezeFrame 
    0x55 
    Dem_MainFunction() 
    0x61 
    Dem_DcmReadDataOfPID01 
    0x63 
    Dem_DcmReadDataOfPID1C 
    0x64 
    Dem_DcmReadDataOfPID21 
    0x65 
    Dem_DcmReadDataOfPID30 
    0x66 
    Dem_DcmReadDataOfPID31 
    0x67 
    Dem_DcmReadDataOfPID41 
    0x68 
    Dem_DcmReadDataOfPID4D 
    0x69 
    Dem_DcmReadDataOfPID4E 
    0x6B 
    Dem_DcmGetInfoTypeValue08 
    0x6C 
    Dem_DcmGetInfoTypeValue0B 
    0x71 
    Dem_RepIUMPRDenLock 
    0x72 
    Dem_RepIUMPRDenRelease 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    52 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Service ID 
    Service 
    0x73 
    Dem_RepIUMPRFaultDetect 
    0x79 
    Dem_SetPtoStatus 
    0x7A 
    Dem_SetWIRStatus() 
    0x90 
    Dem_J1939DcmSetDTCFilter() 
    0x91 
    Dem_J1939DcmGetNumberOfFilteredDTC () 
    0x92 
    Dem_J1939DcmGetNextFilteredDTC() 
    0x93 
    Dem_J1939DcmFirstDTCwithLampStatus() 
    0x94 
    Dem_J1939DcmGetNextDTCwithLampStatus () 
    0x95 
    Dem_J1939DcmClearDTC() 
    0x96 
    Dem_J1939DcmSetFreezeFrameFilter() 
    0x97 
    Dem_J1939DcmGetNextFreezeFrame() 
    0x98 
    Dem_J1939DcmGetNextSPNInFreezeFrame() 
    0x99 
    Dem_J1939DcmSetRatioFilter 
    0x9A 
    Dem_J1939DcmGetNextFilteredRatio 
    0x9B 
    Dem_J1939DcmReadDiagnosticReadiness1 
    0x9C 
    Dem_J1939DcmReadDiagnosticReadiness2 
    0x9D 
    Dem_J1939DcmReadDiagnosticReadiness3 
    0xAA 
    Dem_SetPfcCycle 
    0xAB 
    Dem_GetPfcCycle 
    0xAE 
    Dem_SetIUMPRDenCondition 
    Table 3-10   Service IDs 
    Table 3-11 presents the service IDs of APIs not defined by AUTOSAR, the related services 
    and corresponding errors: 
    Service ID 
    Service 
    0xD0 
    Dem_InitMemory() 
    0xD1 
    Dem_PostRunRequested() 
    0xD2 
    Dem_GetEventEnableCondition() 
    0xD3 
    Dem_GetWIRStatus() 
    0xD4 
    Dem_EnablePermanentStorage 
    0xD5 
    Dem_GetIUMPRGeneralData 
    0xD6 
    Dem_GetNextIUMPRRatioData (API was removed since version 8.00.00) 
    0xD7 
    Dem_GetNextIUMPRRatioDataAndDTC 
    0xD8 
    Dem_GetCurrentIUMPRRatioDataAndDTC 
    0xDB 
    Dem_RequestNvSynchronization() 
    0xF1 
    Dem_NvM_InitAdminData() 
    Dem_NvM_InitStatusData() 
    Dem_NvM_InitDebounceData() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    53 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Service ID 
    Service 
    0xF2 
    Dem_NvM_JobFinished() 
    0xFF 
    Internal function calls 
    Table 3-11   Additional Service IDs   
    The errors reported to Det are described in the following table: 
    Error Code 
    Description 
    0x10  DEM_E_PARAM_CONFIG 
    Service was called with a parameter value which is 
    not allowed in this configuration 
    0x11  DEM_E_PARAM_POINTER 
    Service was called with a NULL pointer argument 
    0x12  DEM_E_PARAM_DATA 
    Service was called with an invalid parameter value 
    0x13  DEM_E_PARAM_LENGTH 
    Service was called with an invalid length or size 
    parameter 
    0x20  DEM_E_UNINIT 
    Service was called before the Dem module has been 
    initialized 
    0x30  DEM_E_NODATAAVAILABLE 
    Data collection failed (application error) 
    0x40  DEM_E_WRONG_CONDITION 
    Service was called with unsatisfied precondition 
    0xF0  DEM_E_INCONSISTENT_STATE  Dem is in an inconsistent internal state 
    Table 3-12   Errors reported to Det 
    3.18.1.1  Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters. These checks 
    are for development error reporting and are en-/disabled together with development error 
    reporting. 
     
     
    Caution 
    If the Dem is used in as Pre-Compile variant, Dem_PreInit() does not verify the 
      initialization pointer. This pointer is unused anyways, so we deviate from [1] in order to 
    be more in line with most other Autosar modules. 
     
     
     
    3.18.1.2  SilentBSW run-time checks 
    The Dem module provides several run-time checks to prevent memory corruption caused 
    by inconsistent NV data. These checks are active only when enabled by configuration. 
    Most of the Dem state is preserved in NV memory, so inconsistencies introduced into the 
    NV  state  would  accumulate. The  result  would  be  misbehavior  at  a  much  later  time,  e.g. 
    multiple power cycles after the actual error occurred. To prevent this, the Dem will enter an 
    error state once a run-time check fails. In this error state, most API functions will return an 
    error code and return immediately without effect. 
    To  check  for  the  operational  state  of  the  Dem  module,  you  have  access  to  the  global 
    variable  Dem_LineOfRuntimeError.  It  will  be  set  to  0  during  normal  operation.  If  a  run-
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    54 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    time check fails, the variable will be set to the code line on which the error had occurred. In 
    addition, a DET error is reported, assuming DET reporting is enabled by configuration. 
    The only way to recover from the Dem error state is an ECU reset. 
    3.18.2  Production Code Error Reporting 
    The Dem does not report any production code related errors. 
    Production  code  errors  in  general  are  errors  which  shall  be  saved  through  the  Dem  by 
    definition. Errors of Dem itself occurring during normal operation are not saved as DTC. 
    3.19  J1939 
     
     
    Note 
    Dependent on the licensed components of your delivery the feature J1939 may not be 
      available in DEM.  
     
     
    In  general  the  SAE  J1939  communication  protocol  was  developed  for  heavy-duty 
    environments but is also applicable for communication networks in light- and medium-duty 
    on-road and off-road vehicles.  
    J1939 does not describe how the fault memory shall behave but how to report the faults 
    and their related data. 
    With  the  interface  described  in  chapter  6.2.7  the  following  diagnostic  messages  can  be 
    supported: 
    Diagnostic Message 
    DM1 – Active Diagnostic Trouble Codes 
    DM2 – Previously Active Diagnostic Trouble Codes 
    DM3 – Diagnostic Data Clear/Reset Of Previously Active DTCs 
    DM4 – Freeze Frame Parameters 
    DM5 – Diagnostic Readiness 1 
    DM11 – Diagnostic Data Clear/Reset of Active DTCs 
    DM25 – Expanded Freeze Frame 
    DM27 – All Pending DTCs 
    DM31 – DTC To Lamp Association 
    DM35 – Immediate Fault Status 
    DM53 – Active Service Only DTCs 
    DM54 – Previously Active Service Only DTCs 
    DM55 – Diagnostic Data Clear/Reset for All Service Only DTCs 
    Table 3-13   Diagnostic messages where content is provided by Dem 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    55 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    3.19.1  J1939 Freeze Frame and J1939 Expanded Freeze Frame 
    With  J1939  enabled,  the  Dem  supports  two  globally  defined  J1939  specific  freezes  in 
    addition to the environmental data described in chapter 3.10. Each DTC can be configured 
    individually to support freeze frame and/or expanded freeze frame, or none. 
    The  J1939  (expanded)  freeze  frame  data  is  stored  when  the  DTC  becomes  active 
    (ConfirmedDTC  1) and is not updated if the DTC reoccurs. 
    These freeze frames are stored in addition to any configured ‘standard’ freeze frames but 
    they are not mapped into a UDS snapshot record. 
    3.19.2  Indicators 
    In addition to the ‘normal’ indicators (refer to 3.16) a J1939 related DTC may support up to 
    one of the J1939 specific indicators listed below. 
    >  Red Stop Lamp (RSL) 
    >  Amber Warning Lamp (AWL) 
    >  Protect Lamp (PL) 
    These indicators use different behavior settings, as required for J1939. These settings are 
    valid for the indicators mentioned above:  
    >  Continuous 
    >  Fast Flash 
    >  Slow Flash 
    Differently  from  the  ‘normal’  AUTOSAR  indicators,  Dem_GetIndicatorStatus()  returns  a 
    prioritized result if multiple events request the same indicator with different behavior. E.g. 
    the  PL  is  triggered  at  the  same  time  as  “Continuous”  and  “Fast  Flash”,  the  behavior  is 
    indicated as “Continuous”. 
    DTC  and  event  suppression  (refer  to  chapter  3.9.2)  with  DTC  format  set  to  J1939  the 
    configured  indicator  is  not  applied  to  the  ECU  indicator  state.  I.e.  the  API 
    Dem_GetIndicatorStatus()  will  return  the  same  result  whether  DTCs  are  suppressed  or 
    not. To match this behavior, the network management node ID related indicator status also 
    reports the indicator state of suppressed DTCs. 
    3.19.3  Clear DTC 
    In contrast to the clear process defined by UDS which provides the DTC itself or the group 
    of  DTCs  that  shall be cleared,  the  J1939  Clear  DTC  command provides  the  DTC  status 
    that must match the available J1939 DTCs to be cleared.  
    DTCs with the following DTC status can be cleared: 
    DTC Status 
     
    TestFailed (Bit0) == 1  
    Active 
    AND  
    ConfirmedDTC (Bit3) == 1 
    TestFailed (Bit0) == 0  
    Previously Active 
    AND  
    ConfirmedDTC (Bit3) == 1 
    Table 3-14   J1939 DTC Status to be cleared 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    56 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Caution 
    Events without a DTC number cannot be cleared using the J1939 API as they do not 
      support the ConfirmedDTC status. 
     
     
    3.19.4  Service Only DTCs 
    Service  Only  diagnostic  trouble  codes  are  DTCs  that  do  not  use  an  indicator  and  are 
    stored in secondary memory. These DTCs are accessed by DMs 53-55.   
    3.20  Clear DTC APIs 
    The clear DTC operations are implemented in full accordance with [1].  
    Please be aware that the <xxx>ClearDTC interfaces start an asynchronous clear process. 
    While  one  clear  operation  is  in  progress,  other  clear  requests  receive  a 
    DEM_CLEAR_BUSY response (see chapters 6.2.4.27, 6.2.6.20 and 6.2.7.1 for details). 
     
     
    Caution 
    The Dem will reject new clear requests with DEM_CLEAR_BUSY until the final result of 
      an ongoing clear DTC has been retrieved (Figure 3-6). 
     
     
     
     sd Clear DTC
    Client 1
    Client 2
    Dem
    <xxx>ClearDTC()
    Clear
    start()
    :DEM_CLEAR_PENDING
    Operation
    *<xxx>ClearDTC()
    :DEM_CLEAR_PENDING
    <xxx>ClearDTC()
    :DEM_CLEAR_BUSY
    finish()
    <xxx>ClearDTC()
    :DEM_CLEAR_BUSY
    <xxx>ClearDTC()
    :DEM_CLEAR_OK
     
    Figure 3-6  Concurrent Clear Requests 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    57 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR  Dem into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the Dem contains the files which are described in the chapters  4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    Dem.c 
    This is the source file of the Dem. It contains the 
     
     
    main functionality of the Dem. 
    Dem.h 
    This header file provides the Dem API functions for 
    BSW modules and the application. This file is 
     
     
    supposed to be included by client modules but not 
    by Dcm. 
    Dem_Dcm.h 
    This header file provides the Dem API functions for 
     
     
    the Dcm. This file is supposed to be included by 
    Dcm. 
    Dem_J1939Dcm.h 
    This header file provides the Dem API functions for 
     
     
    the J1939Dcm. This file is supposed to be included 
    by J1939Dcm. 
    Dem_Types.h 
    This header file contains all Dem data types. Do not 
     
     
    include this file directly, but include Dem.h instead. 
    Dem_Cbk.h 
    This header file contains callback functions intended 
    for the NvM module. Include this in the NvM 
     
     
    configuration for the declarations of the initialization 
    and notification functions. 
    Dem_Validation.h 
    This header file contains static configuration checks. 
     
     
    Inconsistent configuration settings will trigger #error 
    directives within this file. 
    Dem_Cdd_Types.h 
    This header file contains all types that are supposed 
    to be generated by the Rte. 
     
     
    In case no Rte is used, this file is included instead of 
    Rte_Dem_Type.h. Otherwise, this file is not used at 
    all. 
    Dem_Cfg_Types.h 
     
     
    Internal header file, do not include directly 
    Dem_Cfg_Macros.h 
     
     
    Internal header file, do not include directly 
    Dem_Cfg_Declarati
    Internal header file, do not include directly

     
    ons.h
     
     
     
    Dem_Cfg_Definition
    Internal header file, do not include directly

     
    s.h
     
     
     
    Table 4-1   Static files 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    58 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool Cfg5. 
    File Name 
    Description 
    Dem_Cfg.h 
    This header file contains the configuration switches of the Dem. 
    Dem_Lcfg.c 
    This source file contains configuration values and tables of the Dem. 
    Dem_Lcfg.h 
    This header file provides access functions to the Dem for the configuration 
    values and tables. 
    Dem_PBcfg.c 
    This source file contains post-buildable configuration values/tables of the 
    Dem.  
    For easier handling, this file is created in pre-compile configurations as well. If 
    your build environment produces error messages due to this file not defining 
    any symbols, feel free to exclude it from the build. 
    Dem_PBcfg.h 
    This header file provides access functions to the Dem for the post-buildable 
    configuration values and tables. 
    Dem_swc.arxml  This AUTOSAR xml file is used for the configuration of the Rte. It contains the 
    information to get prototypes of callback functions offered by other 
    components. 
    Table 4-2   Generated files 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    59 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.2 
    Include Structure 
     class IncludeStructure
    FiM.h
    Det.h
    SchM_Dem.h
    EcuM_Error.h
    MemMap.h
    Dcm.h
    J1939Dcm.h
    Dlt.h
    NvM.h
    J1939Nm.h
    _Appl.h
    «include»
    «include»
    «include»
    «include»
    «include»
    vstdlib.h
    «include»
    Dem.c
    «include»
    «include»
    «include» «include»
    «include»
    Dem_Dcm.h
    Dem_J1939Dcm.h
    Dem_Cbk.h
    Rte_Dem.h
    «include»
    «include» «include»
    «include»
    «include»
    «include»
    Dem_Validation.h
    Dem.h
    Dem_Types.h
    Rte_Dem_Type.h
    Dem_Cdd_Types.h
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    Dem_Lcfg.h
    Dem_PBcfg.h
    Dem_Cfg.h
    Std_Types.h
    «include»
    «include»
    Dem_PBcfg.c
    Dem_Lcfg.c
     
    Figure 4-1  Include structure 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    60 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of the Dem and illustrates their assignment among each other. 
    Compiler Abstraction 

    Definitions 
    S
     
    N
     
     
     

    RM
    CO
    P
    G
     
    DE
    NS
    L_
    L_
    P
    CF
    Memory Mapping
    P
    B
     
    _CO
    _CO
    _CA
    _A
    _P
    Sections 
    M
    M
    M
    M
    M
    DE
     
    DE
     
    DE
     
    DE
     
    DE  
    DEM_START_SEC_CODE 
     
     
     
     
     
    DEM_STOP_SEC_CODE 
    DEM_START_SEC_CONST_<size> 
     
     
     
     
     
    DEM_STOP_SEC_CONST_<size> 
    DEM_START_SEC_CALIB_<size> 
     
     
     
     
     
    DEM_STOP_SEC_CALIB_<size> 
    DEM_START_SEC_PBCFG 
     
     
     
     
     
    DEM_STOP_SEC_PBCFG 
    DEM_START_SEC_PBCFG_ROOT 
     
     
     
     
     
    DEM_STOP_SEC_PBCFG_ROOT 
    Table 4-3   Compiler abstraction and memory mapping, constant sections 
     
    Compiler Abstraction
     
     
    A
     
    T
    Definitions
     
    A
     
    IT
     
     
    A
     
    A
    A
     
    IN
    T
    T
    A
    T
    A
     
    IT
    A
    T
    A
    D
    D_D
    _DA
    D
    E
     
    L_
    R
    R_IN
    R_NO
    M_
    _D
    T
    P
    A
    Memory Mapping
    A
    A
    P
    H
     
    _V
    _V
    _DCM
    _NV
    _DL
    _A
    _S
    Sections 
    M
    M
    M
    M
    M
    M
    M
    DE
     
    DE
     
    DE
     
    DE
     
    DE
     
    DE
     
    DE
    DEM_START_SEC_VAR_NO_INIT_<size> 
     
     
     
     
     
     
     
    DEM_STOP_SEC_VAR_NO_INIT_<size> 
    DEM_START_SEC_VAR_INIT_<size> 
     
     
     
     
     
     
     
    DEM_STOP_SEC_VAR_INIT_<size> 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    61 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    DEM_START_SEC_VAR_SAVED_ZONE0_<size> 
     
     
     
     
     
     
     
    DEM_STOP_SEC_VAR_SAVED_ZONE0_<size> 
    DCM diagnostic buffer (section depends on DCM 
     
     
     
     
     
     
     
    implementation) 
    Application or RTE buffer used in port communication 
     
     
     
     
     
     
     
    (section depends on configuration and port mapping) 
    Table 4-4   Compiler abstraction and memory mapping, variable sections 
    4.3.1 
    Copy Routines 
    By  default,  the  Dem  implementation  uses  the  copy  routines  provided  by  the  Vector 
    standard  library  (VStdLib).  Its  copy  routines  are  aware  of  the Autosar  Memory  Mapping 
    feature, and will work independently from the chosen mapping. 
    If the Dem module is not integrated into a MICROSAR 4 environment, the VstdLib module 
    might not be available, or not be enabled to support Autosar Memory Mapping. 
    In  this  case,  you  can  disable  the  use  of  VstdLib  (Configuration  option  DemGeneral/ 
    DemUseMemcopyMacros). The Dem provides a simple copy routine based on a for-loop, 
    which is used as default replacement for the VstdLib implementation. 
    If necessary, you can also replace this default implementation. To do so, simply provide a 
    specialized definition of the following macros, e.g. globally, or in a user-config file: 
    Dem_MemCpy_Macro(destination_ptr, source_ptr, length_in_byte) 
    Dem_MemSet_Macro(destination_ptr, value_byte, length_in_byte) 
    4.4 
    Critical Sections 
    The Dem uses the Critical Section implementation of the SchM.  
    4.4.1 
    Exclusive Area 0 
    DiagMonitor 
    Purpose: 
    Ensures data consistency between the Diagnostic Monitors and the Dem task. 
    Interfaces: 
    >  SchM_Enter_Dem_DEM_EXCLUSIVE_AREA_0 
    >  SchM_Exit_Dem_DEM_EXCLUSIVE_AREA_0 
     
    Runtime: 
    Short runtime; The runtime will increase if J1939 nodes are used.  
     
    Dependency: 
    >  Dem_MainFunction() 
    >  Dem_ReportErrorStatus() 
    >  Dem_SetEventStatus() 
    >  Dem_ResetEventStatus() 
    >  Dem_ResetEventDebounceStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    62 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    DiagMonitor 
    >  Dem_PrestoreFreezeFrame() 
    >  Dem_ClearPrestoredFreezeFrame() 
    >  Dem_GetIndicatorStatus() 
    >  Dem_SetWIRStatus() 
    >  Dem_SetEventAvailable() 
    >  Dem_SetDTCSuppression() 
    >  Dem_SetEventSuppression() 
    >  Dem_RepIUMPRFaultDetect()1 
    >  Dem_RepIUMPRDenLock()1 
    >  Dem_RepIUMPRDenRelease()1 
    >  Dem_SetIUMPRDenCondition()1 
     
    Recommendation: 
    This critical section is used from Dem_ReportErrorStatus() which has an unknown call context (it 
    may be called from any BSW and CDD, and even before the system is fully initialized). 
    Therefore this critical section cannot be mapped to OS resources. 
    Table 4-5   Exclusive Area 0 
                                                
    1 API may not be part of the delivery as its availability depends on the DEM license. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    63 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.4.2 
    Exclusive Area 1 
    StateManager 
    Purpose: 
    Ensures data consistency in case of preempted execution between application state managers 
    and Dem task.  
    Interfaces: 
    >  SchM_Enter_Dem_DEM_EXCLUSIVE_AREA_1 
    >  SchM_Exit_Dem_DEM_EXCLUSIVE_AREA_1 
     
    Runtime: 
    short runtime, sparse usage 
     
    Dependency: 
    >  Dem_MainFunction() 
    >  Dem_SetOperationCycleState() 
    >  Dem_SetEnableCondition() 
    >  Dem_SetStorageCondition() 
    >  Dem_DcmDisableDTCSetting() 
    >  Dem_DcmEnableDTCSetting() 
    >  Dem_SetPfcCycle()1 
     
    Recommendation: 
    No recommendation. 
    Table 4-6   Exclusive Area 1 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    64 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.4.3 
    Exclusive Area 2 
    DcmApi 
    Purpose: 
    Protects global state data and values used to track Dcm related tasks from concurrent 
    modification. 
     
    Interfaces: 
    >  SchM_Enter_Dem_DEM_EXCLUSIVE_AREA_2 
    >  SchM_Exit_Dem_DEM_EXCLUSIVE_AREA_2 
     
    Runtime: 
    short runtime, sparse usage 
     
    Dependency: 
    >  Dem_MainFunction() 
    >  Dem_DcmClearDTC() 
    >  Dem_J1939DcmClearDTC() 
    >  Dem_DcmCancelOperation() 
    >  Dem_DcmReadDataOfPID01()1 
    >  Dem_DcmReadDataOfPID21()1 
    >  Dem_EnablePermanentStorage()1 
    Recommendation: 
    No recommendation.  
    Table 4-7   Exclusive Area 2 
    4.5 
    NVM Integration 
    In  general,  the  Dem  module  is  designed  to  work  with  an Autosar  NvM  to  provide  non-
    volatile data storage. 
    It  is  expected  that  all  NV  blocks  used  by  the  Dem  are  configured  with  the  parameters 
    detailed in the following chapters: 
    >  RAM buffer 
    >  Initialization method: ROM element or initialization function 
    >  Single block job end notification 
    >  Enabled for both WriteAll and ReadAll 
    When using a non-Autosar NV manager, please also refer to the Autosar SWS of the NvM 
    module for more details on the expected behavior. 
                                                
    1 API may not be part of the delivery as its availability depends on the DEM license. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    65 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.5.1 
    NVRAM Demand 
    All non-volatile data blocks used by the Dem must be configured to match the size of the 
    underlying  type.  Since  the  actual  size  depends  on  compiler  settings  and  platform 
    properties, this size cannot be calculated by the configuration tool. 
    To find the correct data structure sizes, you can use temporary code to  perform a ‘sizeof’ 
    operation on the data types involved, or check your linker map file if it contains this kind of 
    data. 
    The MICROSAR NvM implementation supports a feature to verify the correct configuration 
    of  block  sizes.  It  is  strongly  recommended  to  enable  this feature;  it  also  provides  a  very 
    easy way to find out the correct block sizes. 
    Table 4-8 lists the types used by the different data elements. 
    NvRam  Item  RAM buffer symbol 
    Type 
    Comment 
    Admin Data 
    Dem_Cfg_AdminData 
    Dem_Cfg_AdminDataType 

    Event Data 
    Dem_Cfg_StatusData 
    Dem_Cfg_StatusDataType 

    Debounce Data  Dem_Cfg_DebounceData 
    Dem_Cfg_DebounceDataType 
    Only if de-
    bounce counter 
    storage is 
    enabled 
    Available Data  Dem_Cfg_EventAvailableData 
    Dem_Cfg_EventAvailableDataType  Only if 
    DemAvailabilitySt
    orage is enabled 
    Primary 
    Dem_Cfg_PrimaryEntry_0 
    Dem_Cfg_PrimaryEntryType 

    Memory 
    … 
    Dem_Cfg_PrimaryEntry_N 
    Secondary 
    Dem_Cfg_SecondaryEntry_0 
    Dem_Cfg_PrimaryEntryType 
    Only if secondary 
    Memory 
    … 
    memory is 
    Dem_Cfg_SecondaryEntry_N
    enabled
     
     
    Table 4-8   NvRam blocks 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    66 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    4.5.2 
    NVRAM Initialization 
    The NVM provides a means to initialize RAM buffers, if the backing storage cannot restore 
    a preserved copy – e.g. because none has ever been stored yet. 
    For this, the Dem provides initialization functions and default ROM data. The Init functions 
    are declared in Dem_Cbk.h, the ROM constants are declared via Dem.h. 
    NvRam Item 
    Initialization 
    Admin Data 
    Call Dem_NvM_InitAdminData() 
    Event Data 
    Call Dem_NvM_InitStatusData() 
    Debounce Data 
    Call Dem_NvM_InitDebounceData() 
    Available Data 
    Call Dem_NvM_InitEventAvailableData() 
    Primary Memory 
    Copy initialization data from Dem_Cfg_MemoryEntryInit 
    Secondary Memory 
    Copy initialization data from Dem_Cfg_MemoryEntryInit 
    Table 4-9   NvRam initialization 
     
     
    Note 
    Dem_Cfg_PrimaryEntry_0… Dem_Cfg_PrimaryEntry_N depend on the number of 
      primary entries stored in the ECU. (e.g. 0 … 19 in case of 20 primary entries). The 
    same applies to the other memory types. 
     
     
    4.5.2.1 
    Controlled Re-initialization 
    Some  use-cases  require  the  total  reset  of  all  stored  data.  A  simple  way  for  that  is  to 
    change the Dem configuration id (DemGeneral/DemCompiledConfigId) in the configuration 
    tool. 
    This  is  especially  useful  during  development,  when  a  different  software  configuration  is 
    loaded while the NV contents still remain from an older software version. Please be aware 
    that changing the Dem configuration is likely to require resetting the NV data. 
    If  a  different  configuration  id  is  detected  during  Dem_Init(),  the  Dem  will  completely 
    reinitialize  all  data.  This  can  be  helpful  if  you  do  not  want  to  use  the  similar  feature 
    provided by NvM.  
    In post-build configurations, the configuration Id will change automatically to ensure the NV 
    data is cleared if configuration changes invalidate the stored NV data. 
     
     
    Caution 
    Re-initialization is no replacement for ClearDtc. It will not respect any requirements 
      regarding the clear command. 
     
     
    4.5.2.2 
    Manual Re-initialization 
    If you need to reset the Dem’s data manually, you can do so by calling all NvM initialization 
    callbacks (Dem_NvM_Init*, see chapter 6.4) and zeroing the Primary/Secondary memory 
    blocks (Dem_Cfg_PrimaryEntry_X, Dem_Cfg_SecondaryEntry_X). 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    67 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Please be aware that this will not cause the NvM to actually persist the changes into Nv-
    Ram.  You  also  need  to  mark  the  corresponding  NvBlockIds  as  changed  –  refer  to  your 
    configuration to find out the correct handles. 
     
     
    Caution 
    Do not modify the Dem NV data blocks while the Dem is active. This will cause 
      undefined behavior, including write access to random memory locations. 
     
     
    4.5.2.3 
    Common Errors 
    Sadly  the  Dem  software  cannot  cope  with  all  possible  inconsistent  NV  data.  In  some 
    situations  the  NV  data  must  be  managed  in  parts  from  outside  the  Dem  to  ensure  data 
    consistency. 
      Initial initialization: 
    On the very first startup, the Dem will re-initialize the NV data. Unless this data is 
    actually persisted within the NV-Ram, the Dem will keep re-initializing all data on 
    startup.  
    You must allow the Dem to initialize its data, which requires at least one normal 
    shutdown

    Incomplete recovery: 
    After changing the Dem configuration, the contents currently stored in the NV memory 
    are internally inconsistent for the Dem module. This can happen when applying a new 
    Dem installation on an existing hardware, or when changing the Dem configuration 
    during development. 
    In most cases, the compiled config Id will suffice to re-initialize old content, but in some 
    cases the NvM will itself re-initialize some of the Dem blocks – but not all. In this case, 
    the compiled config Id does not work reliably. 
    4.5.3 
    Expected NVM Behavior 
     stm NVRAM Handling
    Startup
    Pre-Initialization
    Run State
    Shutdow n
    [RAM destroyed]
    [RAM intact]
    Startup
    DEM Pre-Initialization
    Operate
    Nv M Initialization
    DEM 
    Dem Shutdow n
    Nv M data retention
    Initialization
    notes
    [!PostRunRequested]
    notes
    notes
    notes
    -> Dem_PreInit()
    -> NvM_ReadAll()
    notes
    -> Dem_Shutdown()
    -> NvM_WriteAll()
    Abort
    -> Dem_Init()
    Shutdown
    loop all Bocks used by Dem
    loop all blocks used by Dem
    Immediate NvRam write == ON             Immediate NvRam write == OFF
    Block
    Block
    modified?
    invalid?
    [data has changed]
    [data has changed]
    [valid]
    /NvM_WriteBlock
    /NvM_SetRamBlockStatus
    [Yes]
    [Invalid]
    [JobResult ==
    NVM_REQ_OK]
    Write data to 
    Initialize Block
    NVRAM
    w ait Nv M j ob notification
    notes
    Either option:
    notes
     call initialization function
    -> Dem_NvM_JobFinished
     copy ROM data
    Ram-Block status: 
    [JobResult !=
    unmodified
    NVM_REQ_OK]
    Ram-Block status: 
    /NvM_SetRamBlockStatus
    modified
    notes
    NvM_SetRamBlockStatus
     
    Figure 4-2  NvM behavior 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    68 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    The key assumptions about NVM behavior are depicted in Figure 4-2. 
      The NVM initialization will start after Dem_PreInit() was called. 
      Before Dem_Init() is called, all blocks used by Dem are either restored from non-
    volatile memory, or re-initialized by calling the respective initialization function or 
    copying the initialization ROM data. 
      If a block has been re-initialized, the NVM will not need a separate call to 
    NvM_SetRamBlockStatus() to retain the changed data later on. 
      After Dem_Shutdown() is called, all blocks marked as modified by Dem or due to re-
    initialization are retained in non-volatile memory. 
      Before Dem_Init() is called after a Dem_Shutdown(), all data has either been 
    restored again, or is still valid. 
      After the Dem has requested an immediate write block, the NvM is expected to notify 
    the result by means of callback Dem_NvM_JobFinished().  
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    69 
    based on template version 5.0.0 






    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Caution 
    The Dem cannot keep track of NV-Ram blocks that have not been retained in non-
      volatile memory if the shutdown process is aborted.  
    After Dem_Init() is called, the Dem assumes the NVM will not need a trigger to store 
    a block which has changed before Dem_Shutdown() was called. 
    Due to this, the Dem will also not instruct the NVM to immediately write changed 
    environment data from before Dem_Shutdown(). 
     
     
     
     
    Caution 
    The Dem tries to detect completely uninitialized NV-Ram data by means of a ‘magic 
      pattern’ in the AdminData block. 
    Still, the Dem is unable to detect only partially initialized data. So if your implementation 
    of the NVM module only initializes some of the Dem’s non-volatile data, the results are 
    undefined. 
     
     
     
     
    Caution 
    Even when some NV data is stored during runtime of the Dem module, it is not optional 
      to store the remaining data as well. 
    The shutdown phase must always be finished before powering down the ECU. It is not 
    sufficient to simply drop the power supply. 
     
     
     
     
    Caution 
    If the NV data storage during runtime was not successful the Dem marks the NVRAM 
      block as to be considered for shutdown NVRAM storage. Hence it is mandatory to 
    configure all Dem NVRAM blocks to be processed during NvM_WriteAll. 
     
     
     
    4.5.4 
    Flash Lifetime Considerations 
    If  you  need  to  safe  on  writes  to  the  NVRAM,  e.g.  because  your  backing  storage  is 
    implemented as Flash EEPROM emulation, be aware of your options available to reduce 
    Dem data writes. 
    NV  synchronization  takes  place at  least  at  shutdown,  but  due  to  configuration  or explicit 
    request  the  NV  data  can  be  synchronized  during  runtime  as  well.  In  that  case,  multiple 
    writes to the backing storage can happen during a single power cycle, increasing wear on 
    the backing storage. Please refer to Table 3-9 for details regarding the write frequency. 
    4.6 
    Rte Integration 
    4.6.1 
    Runnable Entities 
    The Dem has been implemented in a way that allows all API to safely preempt each other. 
    So, all runnables can be called from fully preemptive tasks. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    70 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Runnable entity 
    Remarks 
    Dem_MainFunction 
    The Dem_MainFunction Runnable entity corresponds to 
    the Dem cyclic task function. As such, it has to be 
    mapped to a task.  
    Most notification and callout functions are called from this 
    Runnable 
    Dem_SetEventStatus 
    These runnables should not be mapped to a task for 
    Dem_ResetEventStatus 
    efficiency reasons. 
    Dem_GetEventStatus 
    Please note that these API are implemented reentrant for 
    Dem_GetEventFailed 
    different Pports, so clients do not need to synchronize 
    Dem_GetEventTested 
    these calls. 
    Dem_GetDTCOfEvent 
    Dem_GetEventEnableCondition 
    Dem_GetEventFreezeFrameData 
    Dem_GetEventExtendedDataRecord 
    Dem_GetFaultDetectionCounter 
    Dem_SetEventSuppression 
    Dem_PrestoreFreezeFrame 
    Dem_ClearPrestoredFreezeFrame 
    Dem_SetOperationCycleState 
    Dem_SetEnableCondition 
    Dem_SetStorageCondition 
    Dem_GetIndicatorStatus 
    Dem_GetEventMemoryOverflow 
    Dem_PostRunRequest 
    Dem_SetEventSuppression 
    Dem_SetDTCSuppression 
    Table 4-10   Dem runnable entities 
    4.6.2 
    Application Port Interface 
    Application software will communicate with the Dem through port interfaces only. The Dem 
    port  interfaces  all  use  port  defines  arguments  to  abstract  from  internal  object  handles. 
    Please refer to general Autosar documentation (not in scope of this document). 
    The  EventId  is  available  through  some  notification  port  operations,  though  a  typical 
    application  is  strongly  advised  not  to  rely  on  the handle  of  a  Dem  event for any  reason. 
    Instead, use port mapping to use a specific event and let the Rte handle the details. 
    4.6.3 
    DcmIf 
    The  Dcm  uses  a  dedicated  port  interface  of  type  ‘DcmIf’  to  communicate  to  the  Rte  in 
    which contexts it calls Dem APIs. This is a necessary mechanism to identify e.g. OS tasks 
    on which Dem APIs are called. 
    The port prototype provided by Dem – simply called ‘Dcm’ – needs to be connected to the 
    equivalent port prototype required by Dcm. Please make sure to verify your configuration 
    accordingly.  Failing  to  do  so  might  result  in  missing  serialization  resulting  in  data 
    corruption. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    71 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    If the MICROSAR 4 Dem is used in a different environment than pure AUTOSAR4, it 
      might not be possible to use Rte port mapping for the DcmIf port interface. 
    E.g. AUTOSAR before release 4 did not allow connecting service interfaces with other 
    service interfaces. 
    In those cases it usually is sufficient to map the Dcm task functions to the same task as 
    the Dem task function (Dem_MainFunction()). 
    Other measures may be possible, but are subject to the specific conditions of the run-
    time setup. Since the details also depend on the implementation of notification function 
    (functions called by Dem which are implemented in application code), an exhaustive 
    suggestion is not possible in the scope of this document. 
     
     
    4.7 
    Post-Run requirements 
    Before  shutting  down  the  Dem  by  calling  Dem_Shutdown()  the  runtime  environment 
    needs to verify that the Dem is in a consistent state. 
    Normally,  this  can  be  achieved  within  Dem_Shutdown(),  but  in  some  cases  the  Dem 
    needs  to  wait  for  an  NVRAM  write  operation  to  complete  before  the  cleanup  operations 
    can be performed. This will only be possible if immediate writes are activated. 
    For  this  reason,  the  Dem  must  be  queried  via  the API  Dem_PostRunRequested()  to 
    make  sure  there  are  no  pending  write  operations  that  block  the  shutdown  process. 
    Otherwise  the  Dem  will  notify  this  state  to  the  Det  (if  Development  Error  Detection  is 
    enabled) and some event related data will be lost. E.g. a cleared event  could be present 
    again after the ECU restarts. 
    The runtime environment should make sure that monitors do not report test results to the 
    Dem  after  the  result  of  Dem_PostRunRequested()  is  evaluated,  because  this  would 
    lengthen the time the Dem requires in PostRun. 
     
     
     
    Note 
    If you want to test for the post run condition, the Dem will enter this state only if the 
      same data is modified again while the NVRAM write is pending. This second 
    invalidation of the data block can only be reported to NvM after the write completes.  
     
     
    4.8 
    Run-Time limitation 
    In order to reduce run time ‘spikes’, the Dem supports a simple limiter for clearing the fault 
    memory.  In  effect,  the  Dem  can  be  instructed  to  only  delete  a  limited  number  of  DTCs 
    during  a  single  task  cycle.  This  will  cause  the  operation  to  take  much  longer,  but  will 
    distribute the effort through multiple task cycles. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    72 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Caution 
    Combined DTCs must be cleared ‘en bloc’, so the Dem will clear combined events 
      even when it exceeds the allowed limit. Thus, the sum of the largest combined event 
    and the limiter value can be cleared during a single task cycle. 
     
     
    A suggestion for the ‘correct’ setting of the clear limit, or even if the feature should be used 
    in  a  given  set-up  cannot  be  given  in  the  scope  of  this  document.  It  remains  in  the 
    responsibility of the integrator to identify run-time constraints that require its use. 
    4.9 
    Split main function 
    The Dem currently only provides a single task function. In case the features ‘time based 
    debouncing’ and ‘OBD’ are not enabled, the Dem main function does not drive a timer. In 
    that case, the configured cycle time is irrelevant for the function of the Dem module. 
    This allows mapping the Dem task function on a lower priority task, or a background task. 
    Since the Dcm APIs are also served from the Dem task function, this can affect the Dcm 
    response  times.  To  prevent  unwanted  NRC  78  (response  pending)  responses  from  the 
    Dcm  module,  make  sure  the  Dem  main  function  is  not  stalled  by  your  choice  of  task 
    mapping. 
    As  soon  as  the  Dem  configuration  requires  timer  handling  (e.g.  for  time  based  de-
    bouncing), the Dem main function must be called with the configured cycle time. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    73 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    5  Measurement and Calibration 
    Measurement  and  calibration  is  a  powerful  workflow  during  ECU  development  phase 
    which  allows  to  monitor  (e.g.  via  XCP)  module  internal  variables  and  also  to  modify  the 
    configuration so the behavior will be changed. These changes in the module configuration 
    can be done without the need to build new software which is flashed into the ECU. 
    5.1 
    Measurable Data 
    Measurable objects are not intended to be modified as they may have direct influence to 
    DEM state machines and therefore might result in an undefined behavior. So their current 
    value shall be read out only.  
    Please not that not all elements might be available – disabled features usually also disable 
    some of the RAM tables. 
    The following tables describe the measurable objects: 
    5.1.1 
    Dem_Cfg_StatusData 
    Dem_Cfg_StatusData 
    Measureable Item 
    Base Type 
    Description 
    FirstFailedEvent 
    uint16 
    The event id which was first reported as failed (FDC 127). 
    FirstConfirmedEvent 
    uint16 
    The event id which has confirmed first. 
    MostRecentFailedEvent 
    uint16 
    The event id which was reported as failed (FDC 127) 
    most recently. 
    MostRecentConfmdEvent  uint16 
    The event id which has confirmed most recently. 
    TripCount[] 
    uint8 
    The number of trips for each event. 
    EventStatus[] 
    uint8 
    The current UDS status for each event. Please note that 
    the actual DTC status may differ from the event status. 
    Table 5-1   Measurement item Dem_Cfg_StatusData 
    5.1.2 
    Dem_Cfg_EventDebounceValue 
    Dem_Cfg_EventDebounceValue[] 
    Measureable Item 
    Base Type 
    Description 
    Dem_Cfg_EventDebounceValue[] 
    sint16 
    Current value of the de-bounce counter or 
    time, depending on selected algorithm. 
    Table 5-2   Measurement item Dem_Cfg_EventDebounceValue 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    74 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    5.1.3 
    Dem_Cfg_EventMaxDebounceValues 
    Dem_Cfg_EventMaxDebounceValues[] 
    Measureable Item 
    Base Type 
    Description 
    Dem_Cfg_EventMaxDebounceValues[]  sint16 
    Maximum value of the de-bounce counter or 
    time in current operation cycle, depending on 
    the selected algorithm. 
    Table 5-3   Measurement item Dem_Cfg_EventMaxDebounceValues[] 
    5.1.4 
    Dem_PrimaryEntry_<Number> 
    Dem_PrimaryEntry_<Number> 
    Measureable Item  Base Type 
    Description 
    Timestamp 
    uint32 
    Entry/ update time of the primary entry slot. Used to provide 
    a chronology order between the primary entry slots. 
    AgingCounter 
    uint16 
    The current aging count of the event (refer to 3.10.1). 
    EventId 
    uint16 
    The event id which is stored in this primary entry slot. 
    MaxDebounceValue  uint16 
    The maximum de-bounce value of the respective event since 
    last fault memory clear. 
    OccurrenceCounter  uint8 
    refer to 3.10.1 
    SnapshotData[][] 
    uint8 
    refer to 3.10 
    ExtendedData[][] 
    uint8 
    refer to 3.10 
    ExtendedHeader 
    uint8 
    Bit coded information which extended data record is 
    currently stored. 
    SnapshotHeader 
    uint8 
    If DEM is configured for calculated snapshots: bit coded 
    information which snapshot record is currently stored. 
    If DEM is configured for configured snapshots: counter which 
    indicates the current number of stored snapshot records. 
    Table 5-4   Measurement item Dem_PrimaryEntry_<Number> 
    5.2 
    Post-Build Support 
    Please also refer to chapter 7.3 for configuration aspects of the post-build features. 
    5.2.1 
    Initialization 
    During  the  startup  of  the  ECU,  the  Dem  expects  to  receive  a  pointer  to  preliminary 
    configuration  data  in  Dem_PreInit().  Typically  the  final  ECU  configuration  is  determined 
    after  the  NV  subsystem  is  available,  but  the  Dem  still  needs  access  to  the  de-bouncing 
    configuration of events reported prior to full initialization. 
    The final configuration data can optionally be passed to Dem_Init(). 
    Both pointers are passed by the MICROSAR EcuM based on the post-build configuration. 
    If  no  MICROSAR  EcuM  is  used,  the  procedure  of  how  to  find  the  proper  initialization 
    pointers is out of scope of this document. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    75 
    based on template version 5.0.0 




    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Caution 
    The final configuration may not introduce change to the de-bouncing configuration of 
      events reported prior to full initialization. 
    The new configuration data cannot be applied in retrospect, so the state of these 
    events could become inconsistent, e.g. FDC > 127, and TestFailed == 0. 
     
     
    The  Dem  module  will  verify  the  configuration  data  before  accepting  it  to  initialize  the 
    module. If this verification fails, an EcuM error hook (see chapter  6.3.1) is called with an 
    error code according to Table 5-5. 
    Error Code 
    Reason 
    ECUM_BSWERROR_NULLPTR 
    Initialization with a null pointer. 
    ECUM_BSWERROR_MAGICNUMBER 
    Magic pattern check failed. This pattern is 
    appended at the end of the initialization root 
    structure. An error here is a strong indication of 
    random data, or a major incompatibility 
    between the code and the configuration data. 
    ECUM_BSWERROR_COMPATIBILITYVERSION  The configuration data was created by an 
    incompatible generator. This is also tested by 
    verification of a ‘magic’ pattern, so initialization 
    with random data can also cause this error 
    code.  
    Table 5-5   Error Codes possible during Post-Build initialization failure 
    If no MICROSAR EcuM is used, this error hooks and the error code constants have to be 
    provided by the environment. 
    1.  If the pointer equals NULL_PTR, initialization is rejected. 
    2.  If the initialization structure does not end with the correct magic number it is rejected. 
    3.  If the initialization structure was created by an incompatible generator version it is 
    rejected (starting magic number check) 
     
     
    Caution 
    The verification steps performed during initialization are neither intended nor sufficient 
      to detect corrupted configuration data. They are intended only to detect initialization 
    with a random pointer, and to reject data created by an incompatible generator version. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    76 
    based on template version 5.0.0 





    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    5.2.2 
    Post-Build Loadable 
    Vector also provides a tool based approach superior to calibration. While calibration only 
    modifies  existing  configuration  tables,  the  Post-Build  Loadable  approach  also  allows  to 
    validate the configuration change preventing misconfiguration, and to use compacted table 
    structures – with benefits to run-time and ROM usage. 
     
     
    Note 
    We do not support adding (or removing) of Events to /from an existing configuration 
      during Post-Build. If you have ‘inactive’ monitors that are enabled by calibration or 
    other means, statically set up the Event for this monitor and use the API 
    Dem_SetEventAvailable() to control event availability. 
     
     
    5.2.3 
    Post-Build Selectable 
    The MICROSAR Identity Manager (refer to  [9]) is an implementation of  the AUTOSAR 4 
    post-build  selectable  concept.  It  allows  the  ECU  manufacturer  to  include  several  DEM 
    configurations  within  one  ECU.  With  post-build  selectable  and  the  Identity  Manager  the 
    ECU  variants  are  downloaded  within  the  ECUs  non-volatile  memory  (e.g.  flash)  at  ECU 
    build  time.  Post-build  selectable  does  not  allow  modification  of  DEM  aspects  after  ECU 
    build time. 
     
     
    Note 
    Please refer to the basic software module description (bswmd) file accompanying your 
      delivery to find which parameters support post-build selectable. 
    This information is also displayed in the DaVinci Configurator 5 tool. 
     
     
     
     
    Note 
    We do not support adding (or removing) of Events to / from an existing configuration. If 
      you have monitors that are enabled only in some configurations, set up the Event for 
    this monitor and use the configuration parameter DemEventAvailableInVariant, or API 
    Dem_SetEventAvailable() to control event availability. 
    It is not supported to disable all events in all variants using parameter 
    DemEventAvailableInVariant. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    77 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6  API Description 
    For an interfaces overview please see Figure 2-2. 
    6.1 
    Type Definitions 
    The types defined by the Dem are described in [1]. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    78 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2 
    Services provided by Dem 
     
     
    Basic Knowledge 
    Call context means ‘who calls the API’. Typically these are rooted in an OS task 
      function or interrupt service routine and contain the call stack up to the API in question. 
    Call contexts are important to analyze possible data corruption that can occur due to 
    simultaneous calls from different call contexts. This is not restricted to interruption due 
    to preemptive OS tasks – A call to an API function from within a notification or callback 
    function also is a different call context. 
    Typically not all possible call sequences can be implemented safe for data consistency 
    with reasonable effort, and valid call contexts might be restricted as a consequence. 
     
     
    6.2.1 
    Dem_GetVersionInfo() 
    Prototype 
    void Dem_GetVersionInfo ( Std_VersionInfoType* versioninfo ) 
    Parameter 
    versioninfo 
    Pointer to where to store the version information of this module. 
    Return code 
    void 
    N/A 
    Functional Description 
    Returns the version information of this module. 
    The version information is decimal coded. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-1   Dem_GetVersionInfo() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    79 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     

    6.2.2 
    Dem_MainFunction() 
    Prototype 
    void Dem_MainFunction ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Processes all not event based Dem internal functions.  
    This function implements run-time heavy tasks. Make sure to allow it has a sufficient time slot for worst 
    case execution scenarios. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-2   Dem_MainFunction() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    80 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.3 
    Interface EcuM 
    6.2.3.1 
    Dem_PreInit() 
    Prototype 
    void Dem_PreInit ( const Dem_ConfigType* ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to preliminary configuration data 
    Return code 
    void 
    N/A 
    Functional Description 
    Initializes the internal states necessary to process events reported by BSW-modules. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  The ConfigPtr is used only in post-build variants. 
    >  If ConfigPtr is not needed, it is not checked to be non-NULL 
    Expected Caller Context 
    >  This function may not interrupt any other Dem function. 
    Table 6-3   Dem_PreInit() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    81 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.3.2 
    Dem_Init() 
    Prototype 
    void Dem_Init ( const Dem_ConfigType* ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to configuration data (Since version 7.00.00) 
    Return code 
    void 
    N/A 
    Functional Description 
    Initializes or re-initializes the Dem. 
    If NULL is passed, the configuration passed to Dem_PreInit() will be used instead. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  The ConfigPtr is used only in post-build variants. 
    >  The pointer is not checked to be non-NULL 
    Expected Caller Context 
    >  This function may not interrupt any other Dem function. 
    Table 6-4   Dem_Init() 
    6.2.3.3 
    Dem_InitMemory() 
    Prototype 
    void Dem_InitMemory ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    - Extension to Autosar – 
    Use this function to initialize static RAM variables in case the start-up code is not used to initialize RAM. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function may not interrupt any other Dem function. 
    Table 6-5   Dem_InitMemory() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    82 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.3.4 
    Dem_Shutdown() 
    Prototype 
    void Dem_Shutdown ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Shutdown Dem functionality. 
    The function freezes the Dem data structures. As a result the Dem functionality is no longer available, but 
    the Dem non-volatile data can be stored in non-volatile memory. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Most pending asynchronous tasks will get lost when this function is called. The only 
    exceptions are pending event status changes. These remain queued according to [1]. 
    Expected Caller Context 
    >  This function may not interrupt any other Dem function 
    Table 6-6   Dem_Shutdown() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    83 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4 
    Interface SWC and CDD 
    6.2.4.1 
    Dem_SetEventStatus() 
    Prototype 
    Std_ReturnType Dem_SetEventStatus ( Dem_EventIdType EventId, Dem_EventStatusType 
    EventStatus ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    EventStatus 
    Monitor test result 
    DEM_EVENT_STATUS_PASSED: monitor reports a qualified passed test 
    result  
    DEM_EVENT_STATUS_FAILED: monitor reports a qualified failed test result 
    DEM_EVENT_STATUS_PREPASSED: monitor reports a passed test result 
    DEM_EVENT_STATUS_PREFAILED: monitor reports a failed test result 
    Return code 
    Std_ReturnType 
    E_OK: set of event status was successful 
    E_NOT_OK: set of event status failed or could not be accepted (e.g.: the 
    operation cycle configured for this event has not been started, an according 
    enable condition has been disabled) 
    Functional Description 
    API for SWCs to report a monitor result to the Dem. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is not reentrant with the other operations defined in DiagnosticMonitor (for the 
    same EventId) (see Table 6-88) 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-7   Dem_SetEventStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    84 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.2 
    Dem_ResetEventStatus() 
    Prototype 
    Std_ReturnType Dem_ResetEventStatus ( Dem_EventIdType EventId ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    Return code 
    Std_ReturnType 
    E_OK: reset of event status was successful 
    E_NOT_OK: reset of event status failed or is not allowed, because the event 
    is already tested in this operation cycle 
    Functional Description 
    Resets the event failed status of an event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is not reentrant with the other operations defined in DiagnosticMonitor (for the 
    same EventId) (see Table 6-88) 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-8   Dem_ResetEventStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    85 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.3 
    Dem_ResetEventDebounceStatus() 
    Prototype 
    Std_ReturnType Dem_ResetEventDebounceStatus() ( Dem_EventIdType EventId, 
    Dem_DebounceResetStatusType DebounceResetStatus ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    DebounceResetStatus  Select the action to take 
    Return code 
    Std_ReturnType 
    E_OK: The request was processed successfully 
    E_NOT_OK: The request was rejected 
    Functional Description 
    SWC API to control the Dem internal event de-bouncing. 
    Depending on DebounceResetStatus and the EventId's configured debouncing algorithm, this API performs 
    the following: 
    >  Time Based Debouncing 
    >  DEM_DEBOUNCE_STATUS_FREEZE 
    If the de-bounce timer is active, it is paused without modifying its current value. Otherwise this has 
    no effect. The timer will continue if the monitor reports another PREFAILED or PREPASSED in the 
    same direction. 
    >  DEM_DEBOUNCE_STATUS_RESET 
    The de-bounce timer is stopped and its value is set to 0. 
    >  Counter Based Debouncing 
    >  DEM_DEBOUNCE_STATUS_FREEZE: 
    This has no effect. 
    >  DEM_DEDOUNCE_STATUS_RESET: 
    This will set the current value of the debounce counter back to 0. 
    >  Monitor Internal Debouncing 
    >  The API returns E_NOT_OK in either case. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is not reentrant with the other operations defined in DiagnosticMonitor (for the 
    same EventId) (see Table 6-88) 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-9   Dem_ResetEventDebounceStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    86 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.4 
    Dem_PrestoreFreezeFrame() 
    Prototype 
    Std_ReturnType Dem_PrestoreFreezeFrame ( Dem_EventIdType EventId ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    Return code 
    Std_ReturnType 
    E_OK: Freeze frame pre-storage was successful 
    E_NOT_OK: Freeze frame pre-storage failed 
    Functional Description 
    Captures the freeze frame data for a specific event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is not reentrant with the other operations defined in DiagnosticMonitor (for the 
    same EventId) (see Table 6-88) 
    >  This function is synchronous. 
    >  The function can have significant run-time. 
    >  If the call to this function coincides with the event storage on the task function, the Dem might 
    capture a current data set instead of using the pre-stored data. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-10   Dem_PrestoreFreezeFrame() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    87 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.5 
    Dem_ClearPrestoredFreezeFrame() 
    Prototype 
    Std_ReturnType Dem_ClearPrestoredFreezeFrame ( Dem_EventIdType EventId ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    Return code 
    Std_ReturnType 
    E_OK: Clear pre-stored freeze frame was successful 
    E_NOT_OK: Clear pre-stored freeze frame failed 
    Functional Description 
    Clears a pre-stored freeze frame of a specific event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is not reentrant with the other operations defined in DiagnosticMonitor (for the 
    same EventId) (see Table 6-88) 
    >  This function is synchronous. 
    >  If the call to this function coincides with the event storage on the task function, the Dem might 
    use the pre-stored data set instead of discarding it. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-11   Dem_ClearPrestoredFreezeFrame() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    88 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.6 
    Dem_SetOperationCycleState() 
    Prototype 
    Std_ReturnType Dem_SetOperationCycleState ( uint8 OperationCycleId, 
    Dem_OperationCycleStateType CycleState ) 
    Parameter 
    OperationCycleId 
    Identification of operation cycle, like power cycle or driving cycle. 
    CycleState 
    New operation cycle state: (re-)start or end 
    DEM_CYCLE_STATE_START: start a stopped cycle or restart an active cycle 
    DEM_CYCLE_STATE_END: stop an active cycle 
    Return code 
    Std_ReturnType 
    E_OK: set of operation cycle was successful 
    E_NOT_OK: set of operation cycle failed 
    Functional Description 
    This function reports a started or stopped operation cycle to the Dem.  
    The state change will set TestNotCompletedThisOperationCycle bits for all events using OperationCycleId 
    as operation cycle. Also all passive events using OperationCycleId as aging or healing cycle will increase 
    their respective counter and can heal or age. 
    It is allowed to call this run in pre-initialized mode to start the operation cycle of BSW events before full 
    initialization.  
    Since all these operations are computationally intensive, this function will not immediately complete but 
    postpone the work to the Dem task. Events that use OperationCycleId as operation cycle still use the last 
    known state until then.  
    Particularities and Limitations 
    >  This function is reentrant (for different OperationCycleId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-12   Dem_SetOperationCycleState() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    89 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.7 
    Dem_GetEventStatus() 
    Prototype 
    Std_ReturnType Dem_GetEventStatus ( Dem_EventIdType EventId, 
    Dem_EventStatusExtendedType* EventStatusExtended ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    EventStatusExtended  UDS DTC status byte of the requested event. 
    If the return value of the function call is E_NOT_OK, this parameter does not 
    contain valid data. 
    Return code 
    Std_ReturnType 
    E_OK: get of event status was successful 
    E_NOT_OK: get of event status failed 
    Functional Description 
    Gets the current extended event status of an event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-13   Dem_GetEventStatus() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    90 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.8 
    Dem_GetEventFailed() 
    Prototype 
    Std_ReturnType Dem_GetEventFailed ( Dem_EventIdType EventId, Boolean* 
    EventFailed ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    EventFailed 
    TRUE – Last Failed  
    FALSE – not Last Failed 
    Return code 
    Std_ReturnType 
    E_OK: get of “EventFailed” was successful 
    E_NOT_OK: get of “EventFailed” was not successful 
    Functional Description 
    Gets the failed status of an event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-14   Dem_GetEventFailed() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    91 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.9 
    Dem_GetEventTested() 
    Prototype 
    Std_ReturnType Dem_GetEventTested ( Dem_EventIdType EventId, Boolean* 
    EventTested ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    EventTested 
    TRUE – event tested this cycle 
    FALSE – event not tested this cycle  
    Return code 
    Std_ReturnType 
    E_OK: get of event state “tested” successful 
    E_NOT_OK: get of event state “tested” failed 
    Functional Description 
    Gets the tested status of an event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-15   Dem_GetEventTested() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    92 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.10  Dem_GetDTCOfEvent() 
    Prototype 
    Std_ReturnType Dem_GetDTCOfEvent ( Dem_EventIdType EventId, Dem_DTCFormatType 
    DTCFormat, uint32* DTCOfEvent ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    DTCFormat 
    Defines the output-format of the requested DTC value. 
    DEM_DTC_FORMAT_UDS: output format shall be UDS 
    DEM_DTC_FORMAT_OBD: output format shall be OBD 
    DEM_DTC_FORMAT_J1939: output format shall be J1939 
    DTCOfEvent 
    Receives the DTC value in respective format returned by this function. If the 
    return value of the function is other than E_OK this parameter does not 
    contain valid data. 
    Return code 
    Std_ReturnType 
    E_OK: get of DTC was successful 
    E_NOT_OK: the call was not successful 
    E_NO_DTC_AVAILABLE: there is no DTC 
    Functional Description 
    Provides the DTC number for the given EventId. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-16   Dem_GetDTCOfEvent() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    93 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.11  Dem_GetEventAvailable() 
    Prototype 
    Std_ReturnType Dem_GetEventAvailable (Dem_EventIdType EventId, Boolean 
    *AvailableStatus) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    AvailableStatus 
    Receives the current availability status: 
    TRUE: Event is ‘available’ 
    FALSE: Event is ‘not available’ 
    Return code 
    Std_ReturnType 
    E_OK: Request processed successfully 
    E_NOT_OK: Invalid parameters passed to the function (only if Det is enabled). 
    Functional Description 
    This API returns the current availability state of an event (also see Dem_SetEventAvailable()) 
    It is valid to call this API for events that have been set to unavailable.  
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Conditional [DemAvailabilityStorage == false]: This API may be called before full initialization 
    (after Dem_PreInit). 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-17   Dem_GetEventAvailable() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    94 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.12  Dem_SetEnableCondition() 
    Prototype 
    Std_ReturnType Dem_SetEnableCondition ( uint8 EnableConditionID, Boolean 
    ConditionFulfilled ) 
    Parameter 
    EnableConditionID 
    This parameter identifies the enable condition. 
    ConditionFulfilled 
    This parameter specifies whether the enable condition assigned to the 
    EnableConditionID is fulfilled (TRUE) or not fulfilled (FALSE). 
    Return code 
    Std_ReturnType 
    E_OK: the enable condition could be set successfully 
    E_NOT_OK: the setting of the enable condition failed 
    Functional Description 
    Sets an enable condition. 
    Each event may have assigned several enable conditions. Only if all enable conditions referenced by the 
    event are fulfilled the event will be processed in Dem_SetEventStatus(), Dem_ReportErrorStatus() and 
    during time based de-bouncing. 
    Depending on configuration, enabling an enable condition can be deferred to the Dem task. Enable 
    condition changes of the same enable condition can be lost if they change faster than the cycle time of the 
    Dem main function. See chapter 3.7 for further details. 
    Particularities and Limitations 
    >  This function is reentrant (for different EnableConditionID). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-18   Dem_SetEnableCondition() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    95 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.13  Dem_SetStorageCondition() 
    Prototype 
    Std_ReturnType Dem_SetStorageCondition ( uint8 StorageConditionID, Boolean 
    ConditionFulfilled ) 
    Parameter 
    StorageConditionID 
    This parameter identifies the storage condition. 
    ConditionFulfilled 
    This parameter specifies whether the storage condition assigned to the 
    StorageConditionID is fulfilled or not fulfilled. 
    TRUE: storage condition fulfilled 
    FALSE: storage condition not fulfilled  
    Return code 
    Std_ReturnType 
    E_OK: the storage condition could be set successfully 
    E_NOT_OK: the setting of the storage condition failed 
    Functional Description 
    Sets a storage condition. 
    Each event may have assigned several storage conditions. Only if all storage conditions referenced by the 
    event are fulfilled the event may be stored in memory. 
    Particularities and Limitations 
    >  This function is reentrant (for different StorageConditionID). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-19   Dem_SetStorageCondition() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    96 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.14  Dem_GetFaultDetectionCounter() 
    Prototype 
    Std_ReturnType Dem_GetFaultDetectionCounter ( Dem_EventIdType EventId, sint8* 
    FaultDetectionCounter ) 
    Parameter 
    EventId 
    Provide the EventId value the fault detection counter is requested for. If the 
    return value of the function is other than OK this parameter does not contain 
    valid data.  
    FaultDetectionCounter  This parameter receives the Fault Detection Counter information of the 
    requested EventId. If the return value of the function call is other than E_OK 
    this parameter does not contain valid data. 
    -128dec…127dec PASSED… FAILED according to ISO 14229-1 
    Return code 
    Std_ReturnType 
    E_OK: request was successful 
    E_NOT_OK: request failed 
    DEM_E_NO_FDC_AVAILABLE: if the event does not support de-bouncing 
    Functional Description 
    Gets the fault detection counter of an event. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-20   Dem_GetFaultDetectionCounter() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    97 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.15  Dem_GetIndicatorStatus() 
    Prototype 
    Std_ReturnType Dem_GetIndicatorStatus ( uint8 IndicatorId, 
    Dem_IndicatorStatusType* IndicatorStatus ) 
    Parameter 
    IndicatorId 
    The respective indicator which shall be checked for its status. 
    IndicatorStatus 
    Status of the indicator, like off, on, or blinking. 
    DEM_INDICATOR_OFF: indicator off 
    DEM_INDICATOR_CONTINUOUS: continuous on 
    DEM_INDICATOR_BLINKING: blinking mode  
    DEM_INDICATOR_BLINK_CONT: continuous and blinking mode 
    DEM_INDICATOR_FAST_FLASH: fast flash mode  
    DEM_INDICATOR_SLOW_FLASH: slow flash mode  
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed or is not supported 
    Functional Description 
    Gets the indicator status derived from the event status and the configured indicator states. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-21   Dem_GetIndicatorStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    98 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.16  Dem_GetEventFreezeFrameData() 
    Prototype 
    Std_ReturnType Dem_GetEventFreezeFrameData ( Dem_EventIdType EventId, uint8 
    RecordNumber, Boolean ReportTotalRecord, uint16 DataId, uint8* DestBuffer ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    RecordNumber 
    This parameter is a unique identifier for a freeze frame record as defined in 
    ISO15031-5 and ISO14229-1. 
    0xFF means that the most recent freeze frame record shall be returned. 
     
    ReportTotalRecord 
    TRUE: total freeze frame record (all PIDs/DIDs) data are requested 
    FALSE: a dedicated PID/DID is requested by the parameter DataId 
    DataId 
    This parameter specifies the PID (ISO15031-5) or DID (ISO14229-1) that shall 
    be copied to the destination buffer. 
    If ReportTotalRecord is TRUE, the value of DataId is ignored. 
    DestBuffer 
    The pointer to the buffer where the freeze frame data shall be written to. 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed 
    DEM_E_NODATAAVAILABLE: The data is not currently stored for the 
    requested event. 
    DEM_E_WRONG_RECORDNUMBER: The requested data was not copied 
    due to an undefined RecordNumber for the given event. 
    DEM_E_WRONG_DIDNUMBER: The requested data was not copied due to 
    an undefined data indentifier within the requested record (in case 
    ReportTotalRecord == FALSE) 
    Functional Description 
    Gets the data of a freeze frame/snapshot record for the given EventId. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-22   Dem_GetEventFreezeFrameData() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    99 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.17  Dem_GetEventExtendedDataRecord() 
    Prototype 
    Std_ReturnType Dem_GetEventExtendedDataRecord ( Dem_EventIdType EventId, uint8 
    RecordNumber, uint8* DestBuffer ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    RecordNumber 
    Identification of requested Extended data record. The valid range is 0x01 … 
    0xFF whereas 0xFF means that all extended data records shall be returned. 
    DestBuffer 
    The pointer to the buffer where the extended data shall be written to. 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed 
    DEM_E_NODATAAVAILABLE: The data is not currently stored for the 
    requested event. 
    DEM_E_WRONG_RECORDNUMBER: The requested data was not copied 
    due to an undefined RecordNumber for the given event. 
    Functional Description 
    Gets the data of an extended data record by the given EventId. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-23   Dem_GetEventExtendedDataRecord() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    100 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.18  Dem_GetEventEnableCondition() 
    Prototype 
    void Dem_GetEventEnableCondition ( Dem_EventIdType EventId, Boolean* 
    ConditionFulfilled ) 
    Parameter 
    EventId 
    This parameter identifies the enable condition. 
    ConditionFulfilled 
    This parameter specifies whether the enable conditions assigned to the 
    EventId is fulfilled (TRUE) or not fulfilled (FALSE). 
    Return code 
    void 
    N/A 
    Functional Description 
    - Extension to AUTOSAR –  
    Returns the enable condition state for the given event. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-24   Dem_GetEventEnableCondition() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    101 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.19  Dem_GetEventMemoryOverflow() 
    Prototype 
    Std_ReturnType Dem_GetEventMemoryOverflow ( Dem_DTCOriginType DTCOrigin, 
    Boolean* OverflowIndication ) 
    Parameter 
    DTCOrigin 
    Selects the memory which shall be checked for overflow indication. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    OverflowIndication 
    This parameter returns TRUE if the according event memory was overflowed, 
    otherwise it returns FALSE. 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed or is not supported 
    Functional Description 
    Reports if a DTC was displaced or not stored in the given event memory because the event memory was 
    completely full at the time. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-25   Dem_GetEventMemoryOverflow() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    102 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.20  Dem_GetNumberOfEventMemoryEntries() 
    Prototype 
    Std_ReturnType Dem_GetNumberOfEventMemoryEntries ( Dem_DTCOriginType DTCOrigin, 
    uint8* NumberOfEventMemoryEntries ) 
    Parameter 
    DTCOrigin 
    Identifier of the event memory concerned. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information 
    located in the primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information 
    located in the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information 
    located in the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located 
    in the mirror memory 
    NumberOfEventMemoryEntries  Pointer to receive the event count. 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed or is not supported 
    Functional Description 
    This function reports the number of event entries occupied by events. This does not necessarily correspond 
    to the DTC count read by Dcm due to event combination and other effects like post-building the OBD 
    relevance of a DTC stored in OBD permanent memory. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-26   Dem_GetNumberOfEventMemoryEntries() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    103 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.21  Dem_PostRunRequested() 
    Prototype 
    Std_ReturnType Dem_PostRunRequested (Boolean IsRequested ) 
    Parameter 
    IsRequested 
    Set to TRUE:  In case the Dem needs more time to finish NvRAM related 
    tasks. Shutdown is not possible without data loss. 
    Set to FALSE: Shutdown is possible. This value is only valid if all monitors are 
    disabled. 
    Return code 
    Std_ReturnType 
    E_OK: is always returned with disabled Det 
    E_NOT_OK: is returned with enabled Det when an error is detected 
    Functional Description 
    - Extension to Autosar – 
    Test if the Dem can be shut down safely (without possible data loss). 
    This function must be polled after leaving RUN mode (all application monitors have been stopped). Due to 
    pending NVM activity, data loss is possible if Dem_Shutdown is called while this function still returns TRUE. 
    As soon as the NVM finishes writing the current Dem data block, this function will return FALSE. The time 
    window for unsafe shutdown only depends on the write time of a data block (up to several seconds in 
    unfortunate circumstances!) 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-27   Dem_PostRunRequested() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    104 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.22  Dem_SetWIRStatus() 
    Prototype 
    Std_ReturnType Dem_SetWIRStatus (Dem_EventIdType EventId, Boolean WIRStatus ) 
    Parameter 
    WIRStatus 
    Set to TRUE:  The WarningIndicatorRequest Bit of the DTC status for the 
    specified Event will be reported as “1”, independent to the current event 
    status. 
    Set to FALSE: The behavior of the WarningIndicatorRequest Bit in the DTC 
    status byte only depends on the event status. 
    Return code 
    Std_ReturnType 
    E_OK: is returned if the new WIR status have been applied successfully 
    E_NOT_OK: is returned if the new WIR status have not been applied (e.g. 
    because of disabled ControlDTCSetting). The application should repeat the 
    request 
    Functional Description 
    This API can be used to override the status of the WarningIndicatorRequest Bit in the DTC status to “1”. 
    Note that overriding the WIR status does neither affect the internal event status nor any indicators related 
    to the event. Only the DTC status reported by APIs like Dem_GetStatusOfDTC (et al.) or the DT Status 
    Changed callbacks are affected. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-28   Dem_SetWIRStatus () 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    105 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.23  Dem_GetWIRStatus() 
    Prototype 
    Std_ReturnType Dem_GetWIRStatus (Dem_EventIdType EventId, Boolean* WIRStatus ) 
    Parameter 
    WIRStatus 
    Set to TRUE:  The WarningIndicatorRequest Bit is currently user-controlled 
    and have been set by the API Dem_SetWIRStatus. 
    Set to FALSE: The WarningIndicatorRequest Bit is currently not user-
    controlled. The WIR-Bit in the DTC status byte only depends on the event 
    status. 
    Return code 
    Std_ReturnType 
    E_OK: is always returned with disabled Det 
    E_NOT_OK: is returned with enabled Det when an error is detected 
    Functional Description 
    - Extension to Autosar – 
    This API can be used get the current override the status of the WarningIndicatorRequest Bit in the DTC 
    status. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-29   Dem_GetWIRStatus () 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    106 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.24  Dem_SetDTCSuppression() 
    Prototype 
    Std_ReturnType Dem_SetDTCSuppression (uint32 DTC, Dem_DTCFormatType DTCFormat, 
    Boolean SuppressionStatus ) 
    Parameter 
    DTC 
    The DTC Number to be suppressed. 
    DTCFormat 
    Defines the format of the given DTC to be suppressed 
    DEM_DTC_FORMAT_UDS: handle DTC in UDS format 
    DEM_DTC_FORMAT_J1939: handle DTC in J1939 format. 
    SuppressionStatus 
    TRUE: Suppress the DTC 
    FALSE: Report the DTC 
    Return code 
    Std_ReturnType 
    E_OK: Request processed successfully 
    E_NOT_OK: DTC not supported, DTC is already active (i.e. stored in event 
    memory), or invalid parameters passed to the function (only if Det is enabled). 
    Functional Description 
    This API suppresses the Event reporting the given DTCs such, that Dcm will not report the DTC. DTC 
    notification functions (e.g. to Dcm) are not called as well, preventing RoE responses. 
    Event reporting and notification (e.g. to FiM) are not affected and work as usual. 
    Particularities and Limitations 
    >  This function is reentrant for different DTCs. 
    >  This function is synchronous. 
    >  When the call to this function interrupts the entry process, this function can suppress an event 
    that is in the process of being entered into the event memory. In that case the function returns 
    E_OK but the DTC is still reported to the Dcm. 
    In order to make sure the suppression works correctly, either 
    >  clear DTCs after changing suppression 
    >  change suppression of DTCs before the monitors start reporting 
    >  prevent interruption of the Dem task by this function 
    >  DEM_DTC_FORMAT_OBD is not supported for this function. 
    Expected Caller Context 
    >  This function can be called from SWC modules, with limitations. 
    Table 6-30   Dem_SetDTCSuppression() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    107 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.25  Dem_SetEventSuppression() 
    Prototype 
    Std_ReturnType Dem_SetEventSuppression (Dem_EventIdType EventId, Boolean 
    SuppressionStatus ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    SuppressionStatus 
    TRUE: Suppress the DTC attached to this event 
    FALSE: Report the DTC attached to this event 
    Return code 
    Std_ReturnType 
    E_OK: Request processed successfully 
    E_NOT_OK: Event is already active (i.e. stored in event memory), or invalid 
    parameters passed to the function (only if Det is enabled). 
    Functional Description 
    This API suppresses Events such, that Dcm will not report the DTC mapped to the event. DTC related 
    notification functions (e.g. to Dcm) are not called as well, preventing RoE responses. 
    Event reporting and notification (e.g. to FiM) are not affected and work as usual. 
    Particularities and Limitations 
    >  This function is reentrant for different EventId. 
    >  This function is synchronous. 
    >  When the call to this function interrupts the entry process, this function can suppress an event 
    that is in the process of being entered into the event memory. In that case the function returns 
    E_OK but the DTC is still reported to the Dcm. 
    In order to make sure the suppression works correctly, either 
    >  clear DTCs after changing suppression 
    >  change suppression of DTCs before the monitors start reporting 
    >  prevent interruption of the Dem task by this function 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    >  Although this function is mapped to a port interface, it is safe to use from BSW or CDD 
    context, as long as Exclusive Area 0 (see chapter 4.4.1) can be used. 
    Table 6-31   Dem_SetEventSuppression() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    108 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.26  Dem_SetEventAvailable() 
    Prototype 
    Std_ReturnType Dem_SetEventAvailable (Dem_EventIdType EventId, Boolean 
    AvailableStatus) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    AvailableStatus 
    TRUE: Set the Event to ‘available’ 
    FALSE: Set the Event to ‘not available’ 
    Return code 
    Std_ReturnType 
    E_OK: Request processed successfully 
    E_NOT_OK: Event is already active (i.e. stored in event memory), or invalid 
    parameters passed to the function (only if Det is enabled). 
    Functional Description 
    Setting an event to unavailable prevents all APIs from using this EventId.  
    Event reporting and notification are not possible and the event will not be stored to the event memory.  
    Events having bit 0 (TestFailed) or bit 3 (ConfirmedDTC) set, stored events and events requesting an 
    indicator cannot be set unavailable. 
    Normally, the availability setting is volatile, and this API must be called in each power cycle of the ECU. In 
    case the option DemAvailabilityStorage is active, the last state is persisted in NVRAM. Since NVRAM is 
    restored between PreInit and Init, this API cannot be called before full initialization when using this option.  
    Particularities and Limitations 
    >  This function is reentrant for different EventId. 
    >  This function is synchronous. 
    >  Conditional [DemAvailabilityStorage == false]: This API may be called before full initialization 
    (after Dem_PreInit). 
    Expected Caller Context 
    >  This function can be called from any context, with limitations. 
    Table 6-32   Dem_SetEventAvailable() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    109 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.27  Dem_ClearDTC() 
    Prototype 
    Dem_ReturnClearDTCType Dem_ClearDTC ( uint32 DTC, Dem_DTCFormatType DTCFormat, 
    Dem_DTCOriginType DTCOrigin ) 
    Parameter 
    DTC 
    Defines the DTC in respective format that shall be cleared from the event 
    memory. If the DTC fits to a DTC group number, all DTCs of the group shall be 
    cleared. 
    DTCFormat 
    Defines the input format of the provided DTC value. 
    DEM_DTC_FORMAT_UDS:  clear UDS DTCs 
    DEM_DTC_FORMAT_OBD:  clear OBD DTCs 
    DEM_DTC_FORMAT_J1939:  clear J1939 DTCs 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the memory which shall be cleared. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    Return code 
    Dem_ReturnClearDTCTy DEM_CLEAR_OK: clearing is completed, the requested DTC(s) are reset 
    pe 
    DEM_CLEAR_WRONG_DTC: the requested DTC is not valid in the context of 
    DTCFormat and DTCOrigin 
    DEM_CLEAR_WRONG_DTCORIGIN: the requested DTC origin is not 
    available in the context of DTCFormat 
    DEM_CLEAR_FAILED: the clear operation could not be started 
    DEM_CLEAR_PENDING: the clear operation was started and is currently 
    processed to completion 
    DEM_CLEAR_BUSY: the clear operation is occupied from a different client 
    DEM_CLEAR_MEMORY_ERROR: (Since AR4.2.1) The clear operation has 
    completed in RAM, but synchronization to Nv-Ram has failed 
    Functional Description 
    Clears the stored event data from the event memory, resets the event status byte and de-bounce state. 
    There is a variety of configuration settings that further control the behavior of this function: 
    >  see DemClearDTCBehavior to control what part of non-volatile write back must have completed before 
    this function returns DEM_CLEAR_OK 
    >  Init monitor functions are called when an event is cleared, after clearing the event but before returning 
    OK to the tester 
    >  If an event does not allow clearing (see CBClrEvt_<EventName>()), Init monitor callbacks are called 
    nonetheless. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    110 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-33   Dem_ClearDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    111 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.4.28  Dem_RequestNvSynchronization() 
    Prototype 
    Std_ReturnType Dem_RequestNvSynchronization ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: Request processed successfully 
    E_NOT_OK: Request not processed due to errors, e.g. not initialized 
    Functional Description 
    This function can be used to request synchronization with the NV memory.  
    Following the call to this API, the Dem module will write back all modified NV blocks to the backing storage. 
    Particularities and Limitations 
    >  The write process will take a long time (depending on the ECU load, NV subsystem and 
    configuration size, it can take multiple seconds) 
    >  Only modifications up to the call to this API are taken into account. 
    >  There is no indication when everything was written. The Dem still requires a proper shutdown 
    procedure even when this API is used. 
    >  If the Dem shuts down while synchronizing the NV content, pending changes are still written 
    during NvM_WriteAll so no data is lost. 
    Expected Caller Context 
    >  This function can be called from any context 
    >  Although this function is mapped to a port interface, it is safe for use from BSW or CDD 
    context. 
    Table 6-34   Dem_RequestNvSynchronization() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    112 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.5 
    Interface BSW 
    6.2.5.1 
    Dem_ReportErrorStatus() 
    Prototype 
    void Dem_ReportErrorStatus ( Dem_EventIdType EventId, Dem_EventStatusType 
    EventStatus ) 
    Parameter 
    EventId 
    Identification of an event by assigned EventId. 
    EventStatus 
    Monitor test result 
    Return code 
    void 
    N/A 
    Functional Description 
    BSW API to report a monitor result. 
    Particularities and Limitations 
    >  This function is reentrant (for different EventId). 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-35   Dem_ReportErrorStatus() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    113 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6 
    Interface Dcm 
    6.2.6.1 
    Dem_DcmSetDTCFilter() 
    Prototype 
    Dem_ReturnSetFilterType Dem_DcmSetDTCFilter ( uint8 DTCStatusMask, 
    Dem_DTCKindType DTCKind, Dem_DTCFormatType DTCFormat, Dem_DTCOriginType 
    DTCOrigin, Dem_FilterWithSeverityType FilterWithSeverity, Dem_DTCSeverityType 
    DTCSeverityMask, Dem_FilterForFDCType FilterForFaultDetectionCounter ) 
    Parameter 
    DTCStatusMask 
    Status byte mask for DTC status byte filtering 
    0x00: deactivate the status-byte filtering to report all supported DTCs 
    0x01… 0xFF: status byte mask according to ISO14229-1  to filter for DTCs 
    with at least one status bit set matching this status byte mask 
    DTCKind 
    Defines the functional group of DTCs to be reported. 
    DEM_DTC_KIND_ALL_DTCS: report all kind of DTCs          
    DEM_DTC_KIND_EMISSION_REL_DTCS: report OBD relevant DTCs 
    DTCFormat 
    Defines the output-format of the requested DTC values for the sub-sequent 
    API calls. 
    DEM_DTC_FORMAT_OBD: report DTC in OBD format 
    DEM_DTC_FORMAT_UDS: report DTC in UDS format 
    DEM_DTC_FORMAT_J1939: not allowed  
    DTCOrigin 
    If the Dem supports more than one event memory this parameter is used to 
    select the source memory the DTCs shall be read from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    FilterWithSeverity 
    This flag defines whether severity information (ref. to parameter below) shall 
    be used for filtering. This is to allow for coexistence of DTCs with and without 
    severity information. 
    DTCSeverityMask 
    This parameter contains the DTCSeverityMask according to ISO14229-1. 
    DEM_FILTER_WITH_SEVERITY_YES: severity information shall be used 
    DEM_FILTER_WITH_SEVERITY_NO : severity information shall not be used 
    FilterForFaultDetect This flag defines whether the fault detection counter information shall be used 
    ionCounter 
    for filtering or not. If fault detection counter information is filter criteria, only 
    those DTCs with a fault detection counter value between 1 and 0x7E will be 
    reported. 
    DEM_FILTER_FOR_FDC_YES: fault detection counter shall be used 
    DEM_FILTER_FOR_FDC_NO: fault detection counter shall not be used  
     
    Note: If the event does not use Dem internal de-bouncing, the Dem will 
    request this information via GetFaultDetectionCounter. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    114 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Return code 
    Dem_ReturnSetFilterT Status of the operation to (re-)set a DTC filter. 
    ype 
    DEM_FILTER_ACCEPTED: filter was accepted 
    DEM_WRONG_FILTER: filter was not accepted 
    Functional Description 
    Initialize the DTC filter with the given criteria. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-36   Dem_DcmSetDTCFilter() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    115 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.2 
    Dem_DcmGetNumberOfFilteredDTC() 
    Prototype 
    Dem_ReturnGetNumberOfFilteredDTCType Dem_DcmGetNumberOfFilteredDTC ( uint16* 
    NumberOfFilteredDTC ) 
    Parameter 
    NumberOfFilteredDTC  The number of DTCs matching the defined filter criteria. 
    Return code 
    Dem_ReturnGetNumberO DEM_NUMBER_OK: a valid number of DTC was calculated 
    fFilteredDTCType 
    DEM_NUMBER_FAILED: no valid number can be calculated 
    DEM_NUMBER_PENDING: not used 
    Functional Description 
    Returns the number of DTCs matching the filter criteria. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-37   Dem_DcmGetNumberOfFilteredDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    116 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.3 
    Dem_DcmGetNextFilteredDTC() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_DcmGetNextFilteredDTC ( uint32* DTC, 
    uint8* DTCStatus ) 
    Parameter 
    DTC 
    Receives the DTC value in respective format of the filter returned by this 
    function. If the return value of the function is other than DEM_FILTERED_OK 
    this parameter does not contain valid data. 
    DTCStatus 
    This parameter receives the status information of the filtered DTC.  
    It follows the format as defined in ISO14229-1. 
    If the return value of the function call is other than DEM_FILTERED_OK this 
    parameter does not contain valid data. 
    Return code 
    Dem_ReturnGetNextFil DEM_NUMBER_OK: DTC number and status are valid 
    teredElementType 
    DEM_FILTERED_NO_MATCHING_ELEMENT: no DTC can be identified 
    (iteration end) 
    DEM_NUMBER_PENDING: not used 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used 
    Functional Description 
    Gets the next filtered DTC and its status. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-38   Dem_DcmGetNextFilteredDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    117 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.4 
    Dem_DcmGetNextFilteredDTCAndFDC() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_DcmGetNextFilteredDTCAndFDC ( uint32* 
    DTC, sint8* DTCFaultDetectionCounter ) 
    Parameter 
    DTC 
    Receives the DTC value in respective format of the filter returned by this 
    function. If the return value of the function is other than DEM_FILTERED_OK 
    this parameter does not contain valid data. 
    DTCFaultDetectionCou This parameter receives the Fault Detection Counter information of the 
    nter 
    requested DTC. If the return value of the function call is other than 
    DEM_FILTERED_OK this parameter does not contain valid data. 
    -128dec…127dec /PASSED…FAILED according to ISO 14229-1 
    Return code 
    Dem_ReturnGetNextFil DEM_NUMBER_OK: DTC number and FDC are valid 
    teredElementType 
    DEM_FILTERED_NO_MATCHING_ELEMENT: no DTC can be identified 
    (iteration end) 
    DEM_NUMBER_PENDING: not used 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used 
    Functional Description 
    Gets the current DTC and its associated Fault Detection Counter (FDC) from the Dem. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-39   Dem_DcmGetNextFilteredDTCAndFDC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    118 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.5 
    Dem_DcmGetNextFilteredDTCAndSeverity() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_GDcmetNextFilteredDTCAndSeverity ( 
    uint32* DTC, uint8* DTCStatus, Dem_DTCSeverityType* DTCSeverity, uint8* 
    DTCFunctionalUnit ) 
    Parameter 
    DTC 
    Receives the DTC value in respective format of the filter returned by this 
    function. If the return value of the function is other than DEM_FILTERED_OK 
    this parameter does not contain valid data. 
    DTCStatus 
    Receives the status value returned by the function. If the return value of the 
    function is other than DEM_FILTERED_OK this parameter does not contain 
    valid data. 
    DTCSeverity 
    Receives the severity value returned by the function. If the return value of the 
    function is other than DEM_FILTERED_OK this parameter does not contain 
    valid data. 
    DTCFunctionalUnit 
    Receives the functional unit value returned by the function. If the return value 
    of the function is other than DEM_FILTERED_OK this parameter does not 
    contain valid data. 
    Return code 
    Dem_ReturnGetNextFil DEM_FILTERED_OK: DTC number and all other out parameter are valid 
    teredDTCType 
    DEM_FILTERED_NO_MATCHING_ELEMENT: no DTC can be identified 
    (iteration end) 
    DEM_NUMBER_PENDING: not used 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used 
    Functional Description 
    Gets the current DTC and its Severity from the Dem. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-40   Dem_DcmGetNextFilteredDTCAndSeverity() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    119 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.6 
    Dem_DcmSetFreezeFrameRecordFilter() 
    Prototype 
    Dem_ReturnSetFilterType Dem_DcmSetFreezeFrameRecordFilter ( Dem_DTCFormatType 
    DTCFormat, uint16* NumberOfFilteredRecords ) 
    Parameter 
    DTCFormat 
    Defines the output-format of the requested DTC values for the sub-sequent 
    API calls. 
    DEM_DTC_FORMAT_OBD: report DTC in OBD format 
    DEM_DTC_FORMAT_UDS: report DTC in UDS format  
    DEM_DTC_FORMAT_J1939: not allowed 
    NumberOfFilteredReco Number of freeze frame records currently stored in the event memory. 
    rds 
    Return code 
    Dem_ReturnSetFilterT Status of the operation to (re-)set a freeze frame record filter. 
    ype 
    DEM_FILTER_ACCEPTED: filter was accepted 
    DEM_WRONG_FILTER: filter was not accepted 
    Functional Description 
    Initialize the DTC record filter with the given criteria. 
    Using this function all currently stored snapshot records are counted and the internal state machine is 
    initialized to read a copy of their data (see Dem_DcmGetNextFilteredRecord). The number of snapshot 
    records is not fixed. It can change after this function has returned, so Dem_DcmGetNextFilteredRecord can 
    actually return fewer records. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-41   Dem_DcmSetFreezeFrameRecordFilter() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    120 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.7 
    Dem_DcmGetNextFilteredRecord() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_DcmGetNextFilteredRecord ( uint32* DTC, 
    uint8* RecordNumber ) 
    Parameter 
    DTC 
    Receives the DTC value in respective format of the filter returned by this 
    function. If the return value of the function is other than DEM_FILTERED_OK 
    this parameter does not contain valid data.  
    RecordNumber 
    Freeze frame record number of the reported DTC. If the return value of the 
    function is other than DEM_FILTERED_OK this parameter does not contain 
    valid data. 
    Return code 
    Dem_ReturnGetNextFil DEM_FILTERED_OK: returned DTC number and RecordNumber are valid 
    teredElementType 
    DEM_FILTERED_NO_MATCHING_ELEMENT: no further matching records 
    are available 
    DEM_FILTERED_PENDING: not used 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used 
    Functional Description 
    Gets the next freeze frame/ snapshot record number and its associated DTC stored in the event memory. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-42   Dem_DcmGetNextFilteredRecord() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    121 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.8 
    Dem_DcmGetStatusOfDTC() 
    Prototype 
    Dem_ReturnGetStatusOfDTCType Dem_DcmGetStatusOfDTC ( uint32 DTC, 
    Dem_DTCOriginType DTCOrigin, uint8* DTCStatus ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCOrigin 
    If the Dem supports more than one event memory this parameter is used to 
    select the source memory the DTCs shall be read from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    DTCStatus 
    This parameter receives the status information of the requested DTC. If the 
    return value of the function call is other than DEM_STATUS_OK this 
    parameter does not contain valid data. 
    Return code 
    Dem_ReturnGetStatusO DEM_STATUS_OK: the requested status information was stored in 
    fDTCType 
    DTCStatus 
    DEM_STATUS_WRONG_DTC: DTC does not exist in DTCOrigin 
    DEM_STATUS_WRONG_DTCORIGIN: DTC origin does not exist 
    DEM_STATUS_FAILED: a generic error occurred 
    DEM_STATUS_PENDING: not used 
    Functional Description 
    Gets the current UDS status of a DTC. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-43   Dem_DcmGetStatusOfDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    122 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.9 
    Dem_DcmGetDTCStatusAvailabilityMask() 
    Prototype 
    Std_ReturnType Dem_DcmGetDTCStatusAvailabilityMask ( uint8* DTCStatusMask ) 
    Parameter 
    DTCStatusMask 
    The value DTCStatusMask indicates the supported DTC status bits from the 
    Dem. All supported information is indicated by setting the corresponding 
    status bit to 1. 
    Return code 
    Std_ReturnType 
    E_OK: get of DTC status mask was successful 
    E_NOT_OK: get of DTC status mask failed 
    Functional Description 
    Gets the DTC status availability mask. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-44   Dem_DcmGetDTCStatusAvailabilityMask() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    123 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.10  Dem_DcmGetDTCByOccurrenceTime() 
    Prototype 
    Dem_ReturnGetDTCByOccurrenceTimeType Dem_DcmGetDTCByOccurrenceTime ( 
    DTCRequestType DTCRequest, uint32* DTC ) 
    Parameter 
    DTCRequest 
    This parameter defines the request type of the DTC. 
    DEM_FIRST_DET_CONFIRMED_DTC: first detected confirmed DTC 
    requested 
    DEM_MOST_RECENT_FAILED_DTC: most recent failed DTC requested 
    DEM_MOST_REC_DET_CONFIRMED_DTC: most recently detected 
    confirmed DTC requested 
    DEM_FIRST_FAILED_DTC: first failed DTC requested  
    DTC 
    Receives the DTC value in UDS format returned by the function. If the return 
    value of the function is other than DEM_OCCURR_OK this parameter does 
    not contain valid data. 
    Return code 
    Dem_ReturnGetDTCByOc DEM_OCCURR_NOT_AVAILABLE: no DTC is available for the given 
    currenceTimeType 
    DTCRequest  
    DEM_OCCURR_OK: the function returns a valid DTC 
    Functional Description 
    Gets the DTC by occurrence time. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-45   Dem_DcmGetDTCByOccurrenceTime() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    124 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.11  Dem_DcmGetTranslationType() 
    Prototype 
    Dem_DTCTranslationFormatType Dem_DcmGetTranslationType ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Dem_DTCTranslationFo Returns the configured DTC translation format. A combination of different DTC 
    rmatType 
    formats is not possible. 
    DEM_DTC_TRANSLATION_ISO15031_6: DTC is formatted according 
    ISO15031-6 
    DEM_DTC_TRANSLATION_ISO14229_1: DTC is formatted according 
    ISO14229-1 
    DEM_DTC_TRANSLATION_SAEJ1939_73: DTC is formatted according 
    SAE1939-73 
    DEM_DTC_TRANSLATION_ISO11992_4: DTC is formatted according 
    ISO11992-4  
    Functional Description 
    Gets the supported DTC formats of the ECU. 
    The supported formats are configured via DemTypeOfDTCSupported. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-46   Dem_DcmGetTranslationType() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    125 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.12  Dem_DcmGetSeverityOfDTC() 
    Prototype 
    Dem_ReturnGetSeverityOfDTCType Dem_DcmGetSeverityOfDTC ( uint32 DTC, 
    Dem_DTCSeverityType* DTCSeverity ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCSeverity 
    This parameter contains the DTCSeverityMask according to ISO14229-1. 
    Return code 
    Dem_ReturnGetSeverit DEM_GET_SEVERITYOFDTC_OK: the requested severity information was 
    yOfDTCType 
    stored in DTCSeverity 
    DEM_GET_SEVERITYOFDTC_WRONG_DTC: DTC does not exist in origin 
    primary memory 
    DEM_GET_SEVERITYOFDTC_NOSEVERITY: severities do not exist 
    DEM_GET_SEVERITYOFDTC_PENDING: not used 
    Functional Description 
    Gets the severity of the requested DTC. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-47   Dem_DcmGetSeverityOfDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    126 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.13  Dem_DcmGetFunctionalUnitOfDTC() 
    Prototype 
    Dem_ReturnGetFunctionalUnitOfDTCType Dem_DcmGetFunctionalUnitOfDTC ( uint32 DTC, 
    uint8* DTCFunctionalUnit ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCFunctionalUnit 
    Functional unit value of this DTC 
    Return code 
    Dem_ReturnGetFunctio DEM_GET_FUNCTIONALUNITOFDTC_OK: the requested functional unit 
    nalUnitOfDTCType 
    information was stored in DTCFunctionalUnit 
    DEM_GET_FUNCTIONALUNITOFDTC_WRONG_DTC: DTC does not exist 
    in origin primary memory 
    Functional Description 
    Gets the functional unit of the requested DTC. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-48   Dem_DcmGetFunctionalUnitOfDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    127 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.14  Dem_DcmDisableDTCRecordUpdate() 
    Prototype 
    Dem_ReturnDisableDTCRecordUpdateType Dem_DcmDisableDTCRecordUpdate ( uint32 DTC, 
    Dem_DTCOriginType DTCOrigin ) 
    Parameter 
    DTC 
    Selects the DTC in UDS format, for which DTC record update shall be 
    disabled. 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the source memory for which DTC record update shall be disabled.  
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    Return code 
    Dem_ReturnDisableDTC DEM_DISABLE_DTCRECUP_OK: entry is locked, read APIs may be called 
    RecordUpdateType 
    now              
    DEM_DISABLE_DTCRECUP_WRONG_DTC: the given DTC number is not 
    valid in the requested origin  
    DEM_DISABLE_DTCRECUP_WRONG_DTCORIGIN: the given origin is not 
    supported 
    DEM_DISABLE_DTCRECUP_PENDING: the request processing is pending, 
    call again         
    Functional Description 
    Disables the event memory update of a specific DTC (only one at a time) so it can be read out by the Dcm. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-49   Dem_DcmDisableDTCRecordUpdate() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    128 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.15  Dem_DcmEnableDTCRecordUpdate() 
    Prototype 
    Std_ReturnType Dem_DcmEnableDTCRecordUpdate ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed 
    Functional Description 
    Enables the event memory update of the DTC disabled by Dem_DcmDisableDTCRecordUpdate() before. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-50   Dem_DcmEnableDTCRecordUpdate() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    129 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.16  Dem_DcmGetFreezeFrameDataByDTC() 
    Prototype 
    Dem_ReturnGetFreezeFrameDataByDTCType Dem_DcmGetFreezeFrameDataByDTC ( uint32 
    DTC, Dem_DTCOriginType DTCOrigin, uint8 RecordNumber, uint8* DestBuffer, 
    uint16* BufSize ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCOrigin 
    This parameter is used to select the source memory the DTCs shall be read 
    from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    RecordNumber 
    This parameter is a unique identifier for a freeze frame record as defined in 
    ISO15031-5 and ISO14229-1.  
    The value 0xFF is not allowed.  
    The value 0x00 indicates the OBD freeze frame. 
    DestBuffer 
    This parameter contains a byte pointer that points to the buffer, to which the 
    freeze frame data record shall be written to.  
    The format is: {RecordNumber, NumOfDIDs, DID[1], data[1], …, DID[N], 
    data[N]} 
    BufSize 
    When the function is called this parameter contains the maximum number of 
    data bytes that can be written to the buffer. 
    The function returns the actual number of written data bytes in this parameter. 
    Return code 
    Dem_ReturnGetFreezeF DEM_GET_FFDATABYDTC_OK: data was found and returned 
    rameDataByDTCType 
    DEM_GET_FFDATABYDTC_WRONG_DTC: the requested DTC is not 
    available for the requested Origin 
    DEM_GET_FFDATABYDTC_WRONG_DTCORIGIN: the requested Origin is 
    not available 
    DEM_GET_FFDATABYDTC_WRONG_RECORDNUMBER: the requested 
    record is not available 
    DEM_GET_FFDATABYDTC_WRONG_BUFFERSIZE: the destination buffer is 
    too small 
    DEM_GET_FFDATABYDTC_PENDING: not used 
    Functional Description 
    Gets freeze frame/ snapshot record data by DTC. The function stores the data in the provided DestBuffer. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    130 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-51   Dem_DcmGetFreezeFrameDataByDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    131 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.17  Dem_DcmGetSizeOfFreezeFrameByDTC() 
    Prototype 
    Dem_ReturnGetSizeOfDataByDTCType Dem_DcmGetSizeOfFreezeFrameByDTC ( uint32 DTC, 
    Dem_DTCOriginType DTCOrigin, uint8 RecordNumber, uint16* SizeOfFreezeFrame ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the source memory the DTCs shall be read from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    RecordNumber 
    This parameter is a unique identifier for a freeze frame record as defined in 
    ISO 15031-5 and ISO 14229-1.  
    The value 0xFF requests the overall size. 
    SizeOfFreezeFrame 
    Number of bytes in the requested freeze frame record. 
    Return code 
    Dem_ReturnGetSizeOfD DEM_GETSIZEBYDTC_OK: data was found and returned 
    ataByDTCType 
    DEM_GETSIZEBYDTC_WRONG_DTC: the requested DTC is not available 
    for the requested Origin 
    DEM_GETSIZEBYDTC_WRONG_DTCORIGIN: the requested Origin is not 
    available 
    DEM_GETSIZEBYDTC_WRONG_RECNUM: the requested record is not 
    available 
    DEM_GETSIZEBYDTC_PENDING: not used 
    Functional Description 
    Get the size of a formatted snapshot record stored for a DTC. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-52   Dem_DcmGetSizeOfFreezeFrameByDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    132 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.18  Dem_DcmGetExtendedDataRecordByDTC() 
    Prototype 
    Dem_ReturnGetExtendedDataRecordByDTCType Dem_DcmGetExtendedDataRecordByDTC ( 
    uint32 DTC, Dem_DTCOriginType DTCOrigin, uint8 ExtendedDataNumber, uint8* 
    DestBuffer, uint16* BufSize ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format  
    DTCOrigin 
    This parameter is used to select the source memory the DTCs shall be read 
    from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    ExtendedDataNumber 
    Identification of requested extended data record. The valid range is 0x01 … 
    0xEF. The values 0xFE and 0xFF are not allowed. 
    DestBuffer 
    This parameter contains a byte pointer that points to the buffer to which the 
    Extended Data shall be written.  
    BufSize 
    When the function is called this parameter contains the maximum number of 
    data bytes that can be written to the buffer. 
    The function returns the actual number of written data bytes in this parameter. 
    Return code 
    Dem_ReturnGetExtende DEM_RECORD_OK: data was found and returned 
    dDataRecordByDTCType  DEM_RECORD_WRONG_DTC: the requested DTC is not available for the 
    requested Origin 
    DEM_RECORD_WRONG_DTCORIGIN: the requested Origin is not available 
    DEM_RECORD_WRONG_NUMBER: the requested record is not available 
    DEM_RECORD_WRONG_BUFFERSIZE: the destination buffer is too small 
    DEM_RECORD_PENDING: not used by this implementation 
    Functional Description 
    Gets extended data by the given extended record number and DTC number. The function stores the data in 
    the provided DestBuffer. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-53   Dem_DcmGetExtendedDataRecordByDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    133 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.19  Dem_DcmGetSizeOfExtendedDataRecordByDTC() 
    Prototype 
    Dem_ReturnGetSizeOfDataByDTCType Dem_DcmGetSizeOfExtendedDataRecordByDTC ( 
    uint32 DTC, Dem_DTCOriginType DTCOrigin, uint8 ExtendedDataNumber, uint16* 
    SizeOfExtendedDataRecord ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the source memory the DTCs shall be read from.  
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    DEM_DTC_ORIGIN_MIRROR_MEMORY: event information located in the 
    mirror memory 
    ExtendedDataNumber 
    Number of requested extended data record. The valid range is 0x01 … 0xEF.  
    For OBD the values 0xFE and 0xFF are allowed to request the overall size of 
    all OBD records. 
    SizeOfExtendedDataRe Receives the size of the requested data record 
    cord 
    Return code 
    Dem_ReturnGetSizeOfD DEM_GETSIZEBYDTC_OK: data was found and returned 
    ataByDTCType 
    DEM_GETSIZEBYDTC_WRONG_DTC: the requested DTC is not available 
    for the requested Origin 
    DEM_GETSIZEBYDTC_WRONG_DTCORIGIN: the requested Origin is not 
    available 
    DEM_GETSIZEBYDTC_WRONG_RECNUM: the requested record is not 
    available 
    DEM_GETSIZEBYDTC_PENDING: not used 
    Functional Description 
    Get the size of a formatted extended data record stored for a DTC. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-54   Dem_DcmGetSizeOfExtendedDataRecordByDTC() 
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    134 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.20  Dem_DcmClearDTC() 
    Prototype 
    Dem_ReturnClearDTCType Dem_DcmClearDTC ( uint32 DTC, Dem_DTCFormatType 
    DTCFormat, Dem_DTCOriginType DTCOrigin ) 
    Parameter 
    DTC 
    Defines the DTC in respective format that shall be cleared from the event 
    memory. If the DTC fits to a DTC group number, all DTCs of the group shall be 
    cleared. 
    DTCFormat 
    Defines the input format of the provided DTC value. 
    DEM_DTC_FORMAT_UDS:  clear UDS DTCs 
    DEM_DTC_FORMAT_OBD:  clear OBD DTCs 
    DEM_DTC_FORMAT_J1939:  not allowed 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the memory which shall be cleared. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    DEM_DTC_ORIGIN_PERMANENT_MEMORY: event information located in 
    the permanent memory 
    Return code 
    Dem_ReturnClearDTCTy DEM_CLEAR_OK: clearing is completed, the requested DTC(s) are reset 
    pe 
    DEM_CLEAR_WRONG_DTC: the requested DTC is not valid in the context of 
    DTCFormat and DTCOrigin 
    DEM_CLEAR_WRONG_DTCORIGIN: the requested DTC origin is not 
    available in the context of DTCFormat 
    DEM_CLEAR_FAILED: the clear operation could not be started 
    DEM_CLEAR_PENDING: the clear operation was started and is currently 
    processed to completion 
    DEM_CLEAR_BUSY: the clear operation is occupied from a different client 
    DEM_CLEAR_MEMORY_ERROR: (Since AR4.2.1) The clear operation has 
    completed in RAM, but synchronization to Nv-Ram has failed 
    Functional Description 
    Clears the stored event data from the event memory, resets the event status byte and de-bounce state. 
    There is a variety of configuration settings that further control the behavior of this function: 
    >  see DemClearDTCBehavior to control what part of non-volatile write back must have completed before 
    this function returns DEM_CLEAR_OK 
    >  Init monitor functions are called when an event is cleared, after clearing the event but before returning 
    OK to the tester 
    >  If an event does not allow clearing (see CBClrEvt_<EventName>()), Init monitor callbacks are called 
    nonetheless. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    135 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-55   Dem_DcmClearDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    136 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.21  Dem_DcmDisableDTCSetting() 
    Prototype 
    Dem_ReturnControlDTCSettingType Dem_DcmDisableDTCSetting ( Dem_DTCGroupType 
    DTCGroup, Dem_DTCKindType DTCKind ) 
    Parameter 
    DTCGroup 
    Defines the group of DTC that shall be disabled to store in event memory. 
    DEM_DTC_GROUP_ALL_DTCS: select all DTCs 
    DEM_DTC_GROUP_BODY_DTCS: not supported 
    DEM_DTC_GROUP_EMISSION_REL_DTCS: not supported 
    DEM_DTC_GROUP_CHASSIS_DTCS: select group of chassis DTCs 
    DEM_DTC_GROUP_NETWORK_COM_DTCS: select group of network 
    communication DTCs,  
    DEM_DTC_GROUP_POWERTRAIN_DTCS: select group of powertrain DTCs  
    DTCKind 
    This parameter defines the requested DTC kind, either only OBD-relevant 
    DTCs or all DTCs 
    DEM_DTC_KIND_ALL_DTCS: select all DTCs  
    DEM_DTC_KIND_EMISSION_REL_DTCS: not supported 
    Return code 
    Dem_ReturnControlDTC DEM_CONTROL_DTC_SETTING_N_OK:  the input parameters are not valid 
    SettingType 
    DEM_CONTROL_DTC_SETTING_OK: the DTCs setting is switched off 
    Functional Description 
    Disables the setting (including update) of the status bits of a DTC group. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-56   Dem_DcmDisableDTCSetting() 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    137 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.22  Dem_DcmEnableDTCSetting() 
    Prototype 
    Dem_ReturnControlDTCSettingType Dem_DcmEnableDTCSetting ( Dem_DTCGroupType 
    DTCGroup, Dem_DTCKindType DTCKind ) 
    Parameter 
    DTCGroup 
    Defines the group of DTC that shall be enabled to store in event memory. 
    DEM_DTC_GROUP_BODY_DTCS: select group of body DTCs  
    DEM_DTC_GROUP_EMISSION_REL_DTCS: select group of OBD relevant 
    DTCs 
    DEM_DTC_GROUP_ALL_DTCS: select all DTCs 
    DTCKind 
    This parameter defines the requested DTC kind, either only OBD-relevant 
    DTCs or all DTCs 
    DEM_DTC_KIND_ALL_DTCS: select all DTCs  
    DEM_DTC_KIND_EMISSION_REL_DTCS: select OBD relevant DTCs  
    Return code 
    Dem_ReturnControlDTC DEM_CONTROL_DTC_SETTING_N_OK:  the input parameters are not valid 
    SettingType 
    DEM_CONTROL_DTC_SETTING_OK: the DTCs setting is switched on 
    Functional Description 
    Enables the DTC setting for a DTC group. Currently only group ALL_DTCS is supported. 
    Depending on configuration, enabling ControlDTCSetting can be deferred to the Dem task. As a result, 
    changes to control DTC setting can be lost if they toggle change faster than the cycle time of the Dem main 
    function. See chapter 3.7 for further details. 
     
     
    Caution 
    This API is defined as synchronous, so the Dcm will send a positive response before the DTC 
      setting is in fact re-enabled. An API change is discussed in Autosar to alleviate this problem. 
     
     
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-57   Dem_DcmEnableDTCSetting() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    138 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.23  Dem_DcmControlDTCStatusChangedNotification() 
    Prototype 
    void Dem_DcmControlDTCStatusChangedNotification ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Controls the triggering of Dcm_DemTriggerOnDTCStatus. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    >  Dcm notifications must be enabled by configuration for this API to have an effect. Otherwise, a 
    DET will be reported. 
    >  After initialization notifications are disabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-58   Dem_DcmControlDTCStatusChangedNotification() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    139 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.6.24  Dem_DcmCancelOperation() 
    Prototype 
    void Dem_DcmCancelOperation ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    void 
    N/A 
    Functional Description 
    Cancel pending operation started from Dcm. 
    Supported for: 
    >  Dem_DcmClearDTC()  
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportDcm’ is set to enabled. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-59   Dem_DcmCancelOperation() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    140 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7 
    Interface J1939Dcm 
     
     
     
    Note 
    Dependent on the licensed components of your delivery the interfaces listed in this 
      chapter may not be available in DEM.  
     
     
     
     
    6.2.7.1 
    Dem_J1939DcmClearDTC() 
    Prototype 
    Dem_ReturnClearDTCType Dem_J1939DcmClearDTC ( Dem_J1939DcmSetClearFilterType 
    DTCTypeFilter, Dem_DTCOriginType DTCOrigin, uint8 NodeAddress ) 
    Parameter 
    DTCTypeFilter 
    DEM_J1939DTC_CLEAR_ALL: Clears all Active DTCs               
    DEM_J1939DTC_CLEAR_PREVIOUSLY_ACTIVE: Clears all previously 
    active DTCs 
    DEM_J1939DTC_CLEAR_ALL_AND_PREVIOUSLY_ACTIVE: Clears all 
    active and previously active DTCs 
    DTCOrigin 
    If the Dem supports more than one event memory, this parameter is used to 
    select the memory which shall be cleared. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    NodeAddress 
    The network management node ID to be cleared.   
    Return code 
    Dem_ReturnClearDTCTy DEM_CLEAR_OK: DTC successfully cleared 
    pe 
    DEM_CLEAR_WRONG_DTC: DTC value not existing (in this format) 
    DEM_CLEAR_WRONG_DTCORIGIN: Wrong DTC origin 
    DEM_CLEAR_FAILED: DTC clearing failed 
    DEM_CLEAR_PENDING: The DTC clearing is performed asynchronously and 
    is still pending. The caller can retry later 
    DEM_CLEAR_BUSY: DTC not cleared, as another clearing process is in 
    progress. The caller can retry later.  
    Functional Description 
    Clears the J1939 DTCs only 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-60   Dem_J1939DcmClearDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    141 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.2 
    Dem_J1939DcmFirstDTCwithLampStatus() 
    Prototype 
    void Dem_J1939DcmFirstDTCwithLampStatus ( uint8 NodeAddress ) 
    Parameter 
    NodeAddress 
    The network management node ID to be filtered.  
    Return code 
    void 
    N/A 
    Functional Description 
    Initializes the filter mechanism to the first event in the primary memory 
     
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-61   Dem_J1939DcmFirstDTCwithLampStatus() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    142 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.3 
    Dem_J1939DcmGetNextDTCwithLampStatus () 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_J1939DcmGetNextDTCwithLampStatus  ( 
    J1939DcmLampStatusType LampStatus, uint32 J1939DTC, uint8 OccurrenceCounter ) 
    Parameter 
    LampStatus 
    DTC specific lamp status 
    J1939DTC 
    J1939 DTC number 
    OccurrenceCounter 
    The DTC specific occurrence counter 
    Return code 
    Dem_ReturnGetNext-
    DEM_FILTERED_OK: Returned next filtered element 
    FilteredElementType  DEM_FILTERED_NO_MATCHING_ELEMENT: No further element (matching 
    the filter criteria) found 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used  
    Functional Description 
    Gets the next filtered J1939 DTC for DM31 including current LampStatus 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-62   Dem_J1939DcmGetNextDTCwithLampStatus () 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    143 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.4 
    Dem_J1939DcmGetNextFilteredDTC() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_J1939DcmGetNextFilteredDTC (uint32 
    J1939DTC, uint8 OccurenceCounter ) 
    Parameter 
    J1939DTC 
    the J1939 DTC number 
    OccurenceCounter 
    the occurrence counter of the DTC 
    Return code 
    Dem_ReturnGetNext-
    DEM_FILTERED_OK: Returned next filtered element 
    FilteredElementType  DEM_FILTERED_NO_MATCHING_ELEMENT: No further element (matching 
    the filter criteria) found 
    DEM_FILTERED_PENDING: The requested value is calculated 
    asynchronously and currently not available. The caller can retry later. 
    DEM_FILTERED_BUFFER_TOO_SMALL: not used   
    Functional Description 
    Provides the next DTC that matches the filter criteria. 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-63   Dem_J1939DcmGetNextFilteredDTC() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    144 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.5 
    Dem_J1939DcmGetNextFreezeFrame() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_J1939DcmGetNextFreezeFrame ( uint32 
    J1939DTC, uint8 OccurrenceCounter , uint8 DestBuffer, uint8 BufSize ) 
    Parameter 
    J1939DTC 
    J1939 DTC number 
    OccurrenceCounter 
    DTC specific occurrence counter 
    DestBuffer 
    Pointer to the buffer where the Freeze Frame data shall be copied to. 
    BufSize 
    in: size of the available buffer 
    out: number of bytes copied into the buffer 
    Return code 
    Dem_ReturnGetNext-
    DEM_FILTERED_OK: Returned next filtered element 
    FilteredElementType  DEM_FILTERED_NO_MATCHING_ELEMENT: No further element (matching 
    the filter criteria) found 
    DEM_FILTERED_PENDING: The requested value is calculated 
    asynchronously and currently not available. The caller can retry later. 
    DEM_FILTERED_BUFFER_TOO_SMALL: Buffer in the BufSize parameter is 
    not huge enough   
    Functional Description 
    Returns the next J1939DTC and Freeze Frame matching the filter criteria 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is asynchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-64   Dem_J1939DcmGetNextFreezeFrame() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    145 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.6 
    Dem_J1939DcmGetNextSPNInFreezeFrame() 
    Prototype 
    Dem_ReturnGetNextFilteredElementType Dem_J1939DcmGetNextSPNInFreezeFrame ( 
    uint32 SPNSupported, uint8 SPNDataLength ) 
    Parameter 
    SPNSupported 
    This parameter contains the next SPN in the ExpandedFreezeFrame  
    SPNDataLength 
    This parameter contains the corresponding data length of the SPN 
    Return code 
    Dem_ReturnGetNext-
    DEM_FILTERED_OK: Returned next filtered element 
    FilteredElementType  DEM_FILTERED_NO_MATCHING_ELEMENT: No further element (matching 
    the filter criteria) found 
    DEM_FILTERED_PENDING: The requested value is calculated 
    asynchronously and currently not available. The caller can retry later. 
    DEM_FILTERED_BUFFER_TOO_SMALL: Buffer in the BufSize parameter is 
    not huge enough   
    Functional Description 
    Returns the SPNs that are stored in the J1939 FreezeFrame(s) 
    This interface returns always DEM_FILTERED_NO_MATCHING_ELEMENT as the data is directly provided 
    from J1939DCM 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-65   Dem_J1939DcmGetNextSPNInFreezeFrame() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    146 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.7 
    Dem_J1939DcmGetNumberOfFilteredDTC () 
    Prototype 
    Dem_ReturnGetNumberOfFilteredDTCType  Dem_J1939DcmGetNumberOfFilteredDTC  ( 
    uint16 NumberOfFilteredDTC ) 
    Parameter 
    NumberOfFilteredDTC  number of DTCs matching the filter criteria 
    Return code 
    Dem_ReturnGetNumber- DEM_NUMBER_OK: A valid number was calculated 
    OfFilteredDTCType  
    DEM_NUMBER_FAILED: No valid number can be calculated 
    DEM_NUMBER_PENDING: not used 
    Functional Description 
    Gets the number of currently filtered DTCs set by the function Dem_J1939DcmSetDTCFilter(). 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-66   Dem_J1939DcmGetNumberOfFilteredDTC () 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    147 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.8 
    Dem_J1939DcmSetDTCFilter() 
    Prototype 
    Dem_ReturnSetFilterType Dem_J1939DcmSetDTCFilter (  
    Dem_J1939DcmDTCStatusFilterType DTCStatusFilter, Dem_DTCKindType DTCKind, 
    Dem_DTCOriginType DTCOrigin, uint8 NodeAddress, Dem_J1939DcmLampStatusType 
    LampStatus ) 
    Parameter 
    DTCStatusFilter 
    DEM_J1939DTC_ACTIVE: Confirmed == 1 and TestFailed == 1 
    DEM_J1939DTC_PREVIOUSLY_ACTIVE: Confirmed == 1 and  
    TestFailed == 0 
    DEM_J1939DTC_PENDING: Pending == 1  
    DEM_J1939DTC_PERMANENT: not supported 
    DTCKind 
    DEM_DTC_KIND_ALL_DTCS: All DTCs 
    DEM_DTC_KIND_EMISSION_REL_DTCS: not supported 
    DTCOrigin 
    If the Dem supports more than one event memory this parameter is used to 
    select the source memory the DTCs shall be read from. 
    DEM_DTC_ORIGIN_PRIMARY_MEMORY: event information located in the 
    primary memory  
    DEM_DTC_ORIGIN_SECONDARY_MEMORY: event information located in 
    the secondary memory 
    NodeAddress 
    The network management node ID to be filtered. 
    LampStatus 
    The ECU Lamp Status 
    HighByte 
     bits 7,6: Malfunction Indicator Lamp Status 
     bits 5,4: Red Stop Lamp Status  
     bits 3,2: Amber Warning Lamp Status  
     bits 1,0: Protect Lamp Status 
    LowByte 
     bits 7,6: Flash Malfunction Indicator Lamp  
     bits 5,4: Flash Red Stop Lamp  
     bits 3,2: Flash Amber Warning Lamp  
     bits 1,0: Flash Protect Lamp  
    Return code 
    Dem_ReturnSetFilterType 
    DEM_FILTER_ACCEPTED: Filter was accepted 
    DEM_WRONG_FILTER: Wrong filter selected  
    Functional Description 
    Sets the filter criteria for the J1939 DTC filter mechanism and returns the ECU lamp status. 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    148 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Table 6-67   Dem_J1939DcmSetDTCFilter() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    149 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.9 
    Dem_J1939DcmSetFreezeFrameFilter() 
    Prototype 
    Dem_ReturnSetFilterType Dem_J1939DcmSetFreezeFrameFilter (  
    Dem_J1939DcmSetFreezeFrameFilterType FreezeFrameKind, uint8 NodeAddress ) 
    Parameter 
    FreezeFrameKind 
    DEM_J1939DCM_FREEZEFRAME: Set the filter for J1939 Freeze Frame 
    data 
    DEM_J1939DCM_EXPANDED_FREEZEFRAME: Set the filter for J1939 
    Expanded Freeze Frame data 
    DEM_J1939DCM_SPNS_IN_EXPANDED_FREEZEFRAME: Not supported, 
    DM24 message is handled by J1939Dcm 
    NodeAddress 
    The network management node ID to be filtered. 
    Return code 
    Dem_ReturnSetFilterType  DEM_FILTER_ACCEPTED: Filter was accepted 
    DEM_WRONG_FILTER: Wrong filter selected  
    Functional Description 
    Sets the filter criteria for the consecutive calls of functions 
    >  - Dem_J1939DcmGetNextFreezeFrame() 
    >  - Dem_J1939DcmGetNextSPNInFreezeFrame() 
     
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    >  Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    Table 6-68   Dem_J1939DcmSetFreezeFrameFilter() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    150 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.2.7.10  Dem_J1939DcmReadDiagnosticReadiness1() 
    Prototype 
    Std_ReturnType Dem_J1939DcmReadDiagnosticReadiness1 ( 
    Dem_J1939DcmDiagnosticReadiness1Type DataValue, uint8 NodeAddress ) 
    Parameter 
    DataValue 
    Buffer of 8 bytes containing the contents of Diagnostic Readiness 1 (DM5) 
    computed by the Dem. 
    NodeAddress 
    The network management node ID to be filtered. 
    Return code 
    Std_ReturnType 
    >  E_OK: Operation was successful. 
    >  E_NOT_OK: Operation failed. 
    Functional Description 
    Returns the DM5 data 
     
    Particularities and Limitations 
    This function is not reentrant. 
    This function is synchronous. 
    Only available if ‘DemSupportJ1939Dcm’ is set to enabled. 
    OBDII is not supported 
    Table 6-69   Dem_J1939DcmReadDiagnosticReadiness1() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    151 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.3 
    Services used by Dem 
    In the following table services provided by other components, which are used by the Dem 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    Det 
    optional Dem_ReportErrorStatus 
    FiM 
    optional FiM_DemTriggerOnEventStatus 
    Dlt 
    optional Dlt_DemTriggerOnEventStatus 
    EcuM 
    optional EcuM_BswErrorHook 
    NvM 
    optional NvM_GetErrorStatus 
    optional NvM_SetRamBlockStatus 
    optional NvM_WriteBlock 
    Dcm 
    optional Dcm_DemTriggerOnDTCStatus 
    J1939Dcm 
    optional J1939Dcm_DemTriggerOnDTCStatus 
    SchM 
    optional SchM_Enter_Dem_<ExclusiveArea> 
    optional SchM_Exit_Dem_<ExclusiveArea> 
    Table 6-70   Services used by the Dem 
    6.3.1 
    EcuM_BswErrorHook() 
    Prototype 
    void EcuM_BswErrorHook ( uint16 BswModuleId, uint8 ErrorId ) 
    Parameter 
    BswModuleId 
    Autosar ModuleId. The Dem will pass DEM_MODULE_ID. 
    ErrorId 
    Error code detailing the error cause, see Table 5-5 
    Return code 


    Functional Description 
    This function is called to report defunct configuration data passed to Dem_PreInit. 
    The Dem will leave Dem_PreInit after a call to this function, without initializing. Further calls to the Dem 
    module are not safe.  
    Particularities and Limitations 
    >  This function is called in error cases, when initializing only a Post-Build configurations 
    >  It is not safe if this function returns to the caller, especially if development error detection is disabled by 
    configuration. 
    Call context 
    >  This function is called from Dem_PreInit() 
    Table 6-71   EcuM_BswErrorHook() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    152 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the  Dem and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file Dem_Cbk.h by the Dem. 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    153 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4.1 
    Dem_NvM_JobFinished() 
    Prototype 
    Std_ReturnType Dem_NvM_JobFinished ( uint8 ServiceId, NvM_RequestResultType 
    JobResult ) 
    Parameter 
    ServiceId 
    The ServiceId indicates which one of the asynchronous services triggered via 
    the operations of Interface NVM Service (Read/Write) the notification belongs 
    to. 
    The value is currently not used by the Dem. 
    JobResult 
    Provides the result of the asynchronous job. 
    NVM_REQ_OK: last asynchronous request has been finished successfully    
    NVM_REQ_NOT_OK: last asynchronous request has been finished 
    unsuccessfully 
    NVM_REQ_PENDING: not used in this context  
    NVM_REQ_INTEGRITY_FAILED: not used in this context 
    NVM_REQ_BLOCK_SKIPPED: not used in this context    
    NVM_REQ_NV_INVALIDATED: not used in this context   
    Return code 
    Std_ReturnType 
    E_OK: is always returned 
     
    Functional Description 
    Is triggered from NVM to notify that the requested job which is processed asynchronous has been finished. 
    Particularities and Limitations 
    >  This function is reentrant. 
    >  This function is asynchronous. 
    >  Must be configured for every Dem related NVRAM block 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-72   Dem_NvM_JobFinished() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    154 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4.2 
    Dem_NvM_InitAdminData() 
    Prototype 
    Std_ReturnType Dem_NvM_InitAdminData ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: is always returned 
    Functional Description 
    Initialize NvBlock for administrative data. 
    This function is supposed to be called by the NVM in order to (re)initialize the data in case the non-volatile 
    memory has never been stored, or was corrupted (see NvMBlockDescriptor/NvMInitBlockCallback).  
    This API is intended as callback function the NvM module. It will not mark the initialized block ‘changed’. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-73   Dem_NvM_InitAdminData() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    155 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4.3 
    Dem_NvM_InitStatusData() 
    Prototype 
    Std_ReturnType Dem_NvM_InitStatusData ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: is always returned 
    Functional Description 
    Initialize NvBlock for event status data. 
    This function is supposed to be called by the NVM in order to (re)initialize the data in case the non-volatile 
    memory has never been stored, or was corrupted (see NvMBlockDescriptor/NvMInitBlockCallback). 
    This API is intended as callback function the NvM module. It will not mark the initialized block ‘changed’. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-74   Dem_NvM_InitStatusData() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    156 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4.4 
    Dem_NvM_InitDebounceData() 
    Prototype 
    Std_ReturnType Dem_NvM_InitDebounceData ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: is always returned 
    Functional Description 
    Initialize NvBlock for event de-bounce data. 
    This function is supposed to be called by the NVM in order to (re)initialize the data in case the non-volatile 
    memory has never been stored, or was corrupted (see NvMBlockDescriptor/NvMInitBlockCallback). 
    This API is intended as callback function the NvM module. It will not mark the initialized block ‘changed’. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-75   Dem_NvM_InitDebounceData() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    157 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.4.5 
    Dem_NvM_InitEventAvailableData() 
    Prototype 
    Std_ReturnType Dem_NvM_InitEventAvailableData ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    E_OK: is always returned 
    Functional Description 
    Initialize NvBlock for event availability data. 
    This function is supposed to be called by the NVM in order to (re)initialize the data in case the non-volatile 
    memory has never been stored, or was corrupted (see NvMBlockDescriptor/NvMInitBlockCallback). 
    This API is intended as callback function the NvM module. It will not mark the initialized block ‘changed’. 
    Particularities and Limitations 
    >  This function is not reentrant. 
    >  This function is synchronous. 
    Expected Caller Context 
    >  This function can be called from any context. 
    Table 6-76   Dem_NvM_InitEventAvailableData() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    158 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5 
    Configurable Interfaces 
    6.5.1 
    Callouts 
    At  its  configurable  interfaces  the  Dem  defines  callouts  that  can  be  mapped  to  callback 
    functions provided by other modules. The mapping is not statically defined by the Dem but 
    can be performed at configuration time. The function prototypes that can be used for the 
    configuration  have  to  match  the  appropriate  function  prototype  signatures,  which  are 
    described in the following sub-chapters.  
     
    6.5.1.1 
    CBClrEvt_<EventName>() 
    Prototype 
    Std_ReturnType CBClrEvt_<EventName> ( Boolean* Allowed ) 
    Parameter 
    Allowed 
    True – clearance of event is allowed 
    False – clearance of event is not allowed 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed 
    Functional Description 
    Is triggered on DTC deletion to request the permission if the event may be cleared or not. 
    If the return value of the function call is other than E_OK the Dem clears the event for security reasons 
    without checking the Allowed value. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from task context. 
    Table 6-77   CBClrEvt_<EventName>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    159 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.2 
    CBDataEvt_<EventName>() 
    Prototype 
    Std_ReturnType CBDataEvt_<EventName> ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Is triggered on changes of the event related data in the event memory. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    >  This function signature deviates from [1] to match the Rte_Call signature. 
    Call Context 
    >  This function is called from task context. 
    Table 6-78   CBDataEvt_<EventName>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    160 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.3 
    CBFaultDetectCtr_<EventName>() 
    Prototype 
    Std_ReturnType CBFaultDetectCtr_<EventName> ( sint8* FaultDetectionCounter ) 
    Parameter 
    FaultDetectionCounter  This parameter receives the fault detection counter information (according 
    ISO 14229-1) of the requested EventId. If the return value of the function call 
    is other than E_OK this parameter does not contain valid data. 
     
    -128dec…127dec PASSED…FAILED according to [7]  
     
    Return code 
    Std_ReturnType 
    E_OK: request was successful 
    E_NOT_OK: request failed 
     
    Functional Description 
    Gets the current fault detection counter value for the requested monitor-internal de-bouncing event. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from APIs with unrestricted call context. 
    Table 6-79   CBFaultDetectCtr_<EventName>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    161 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.4 
    CBInitEvt_<EventName>() 
    Prototype 
    Std_ReturnType CBInitEvt_<EventName> ( Dem_InitMonitorReasonType 
    InitMonitorReason ) 
    Parameter 
    InitMonitorReason 
    Specific (re-)initialization reason evaluated from the monitor to identify the 
    initialization kind to be performed. 
    DEM_INIT_MONITOR_CLEAR:  Monitor of the EventId is cleared and all 
    internal values and states are reset 
    DEM_INIT_MONITOR_RESTART: Monitor of the EventId is requested to 
    restart 
     
    Return code 
    Std_ReturnType 
    Return value is unused. 
    Functional Description 
    (Re-)initializes the diagnostic monitor of a specific event.  
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from task context. 
    Table 6-80   CBInitEvt_<EventName>() 
    6.5.1.5 
    CBInitFct_<N>() 
    Prototype 
    Std_ReturnType CBInitFct_<N> ( void ) 
    Parameter 
    N/A 
    N/A 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Resets the diagnostic monitor of a specific function. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from task context. 
    Table 6-81   CBInitFct_<N>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    162 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.6 
    CBReadData_<SyncDataElement>() 
    Prototype 
    Standard API 
    Std_ReturnType CBReadData_<SyncDataElement> ( uint8* 
    Buffer ) 
    API with Event Id 
    Std_ReturnType CBReadData_<SyncDataElement> ( 
    Dem_EventIdType EventId, uint8* Buffer ) 
    Parameter 
    Buffer 
    Buffer containing the value of the data element. 
    EventId 
    The EventId which has caused the trigger. 
    Return code 
    Std_ReturnType 
    E_OK: Operation was successful 
    E_NOT_OK: Operation failed 
    Functional Description 
    Requests the current value of the data element for freeze frame or extended data storage. 
    If the callback returns E_NOT_OK, the data is substituted by a pattern of 0xFF 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from task context. 
    Table 6-82   CBReadData_<SyncDataElement>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    163 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.7 
    CBStatusDTC_<N>() 
    Prototype 
    Std_ReturnType CBStatusDTC_<N> ( uint32 DTC, uint8 DTCStatusOld, uint8 
    DTCStatusNew ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in UDS format. 
    DTCStatusOld 
    DTC status ANDed with DTCStatusAvailabilityMask before change.   
    DTCStatusNew 
    DTC status ANDed with DTCStatusAvailabilityMask after change 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Is triggered on changes of the UDS DTC status byte. The trigger will not occur for changed status bits 
    which are disabled by the DTCStatusAvailabilityMask.  
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from APIs with unrestricted call context. 
    Table 6-83   CBStatusDTC_<N>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    164 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.8 
    CBStatusJ1939DTC_<N>() 
    Prototype 
    Std_ReturnType CBStatusJ1939DTC_<N> ( uint32 DTC, uint8 DTCStatusOld, uint8 
    DTCStatusNew ) 
    Parameter 
    DTC 
    Diagnostic Trouble Code in J1939 format. 
    DTCStatusOld 
    DTC status ANDed with DTCStatusAvailabilityMask before change.   
    DTCStatusNew 
    DTC status ANDed with DTCStatusAvailabilityMask after change 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Is triggered on changes of the J1939 DTC status byte. The trigger will not occur for changed status bits 
    which are disabled by the DTCStatusAvailabilityMask.  
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    Call Context 
    >  This function is called from APIs with unrestricted call context. 
    Table 6-84   CBStatusJ1939DTC_<N>() 
    6.5.1.9 
    CBStatusEvt_<EventName>_<N>() 
    Prototype 
    Std_ReturnType CBStatusEvt_<EventName>_<N> ( Dem_EventStatusExtendedType 
    EventStatusOld, Dem_EventStatusExtendedType EventStatusNew ) 
    Parameter 
    EventStatusOld 
    UDS status byte of event before change. 
    EventStatusNew 
    UDS status byte of event after change. 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Triggers on changes of the status byte for the related EventId. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    >  This function signature deviates from [1] to match the Rte_Call signature. 
    Call Context 
    >  This function is called from APIs with unrestricted call context. 
    Table 6-85   CBStatusEvt_<EventName>_<N>() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    165 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.5.1.10  GeneralCBDataEvt() 
    Prototype 
    Std_ReturnType GeneralCBDataEvt ( Dem_EventIdType EventId ) 
    Parameter 
    EventId 
    The EventId which has caused the trigger 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Is triggered on changes of the event related data in the event memory. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    >  This function signature deviates from [1] to match the Rte_Call signature. 
    Call Context 
    >  This function is called from task context. 
    Table 6-86   GeneralCBDataEvt() 
    6.5.1.11  GeneralCBStatusEvt() 
    Prototype 
    Std_ReturnType GeneralCBStatusEvt ( Dem_EventIdType EventId, 
    Dem_EventStatusExtendedType EventStatusOld, Dem_EventStatusExtendedType 
    EventStatusNew ) 
    Parameter 
    EventId 
    The EventId which has caused the trigger. 
    EventStatusOld 
    UDS status byte of event before change. 
    EventStatusNew 
    UDS status byte of event after change. 
    Return code 
    Std_ReturnType 
    Return value unused 
    Functional Description 
    Triggers on changes of the status byte for the related EventId. 
    Particularities and Limitations 
    >  This function shall be reentrant. 
    >  This function shall be synchronous. 
    >  This function signature deviates from [1] to match the Rte_Call signature. 
    Call Context 
    >  This function is called from APIs with unrestricted call context. 
    Table 6-87   GeneralCBStatusEvt() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    166 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.6 
    Service Ports 
    6.6.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    6.6.1.1 
    Provide Ports on Dem Side 
    At  the  Provide  Ports  of  the  Dem  the  API  functions  described  in  6.2  are  available  as 
    Runnable Entities. The Runnable Entities are invoked via Operations. The mapping from a 
    SWC client call to an Operation is performed by the RTE. In this mapping the RTE adds 
    Port Defined Argument Values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  Dem  and  the 
    Operations defined for the Provide Ports, the API functions related to the Operations and 
    the Port Defined Argument Values to be added by the RTE. 
    6.6.1.1.1 
    DiagnosticMonitor 
    Port Defined Argument: Dem_EventIdType EventId 
    Operation 
    API Function 
    Arguments 
    SetEventStatus 
    Dem_SetEventStatus 
    IN Dem_EventStatusType 
    EventStatus,  
    ERR{E_NOT_OK} 
    ResetEventStatus 
    Dem_ResetEventStatus 
    ERR{E_NOT_OK} 
    PrestoreFreezeFrame 
    Dem_PrestoreFreezeFrame 
    ERR{E_NOT_OK} 
    ClearPrestoredFreezeFrame 
    Dem_ClearPrestoredFreezeFrame  ERR{E_NOT_OK} 
    Table 6-88   DiagnosticMonitor 
    6.6.1.1.2 
    DiagnosticInfo and GeneralDiagnosticInfo 
    DiagnosticInfo has Port Defined Argument: Dem_EventIdType EventId 
    Operation 
    API Function 
    Arguments 
    GetEventStatus 
    Dem_GetEventStatus 
    OUT Dem_EventStatusExtendedType 
    EventStatusExtended,  
    ERR{E_NOT_OK} 
    GetEventFailed 
    Dem_GetEventFailed 
    OUT boolean EventFailed,  
    ERR{E_NOT_OK} 
    GetEventTested 
    Dem_GetEventTested 
    OUT boolean EventTested,  
    ERR{E_NOT_OK} 
    GetDTCOfEvent 
    Dem_GetDTCOfEvent 
    IN Dem_DTCFormatType DTCFormat,  
    OUT uint32 DTCOfEvent,  
    ERR{E_NOT_OK, 
    DEM_E_NO_DTC_AVAILABLE} 
    GetFaultDetectionCounter 
    Dem_ 
    OUT sint8 FaultDetectionCounter,  
    GetFaultDetectionCounter 
    ERR{E_NOT_OK, 
    DEM_E_NO_FDC_AVAILABLE} 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    167 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Operation 
    API Function 
    Arguments 
    GetEventEnableCondition 
    Dem_ 
    OUT boolean ConditionFullfilled  
    GetEventEnableCondition 
    ERR{E_NOT_OK} 
    GetEventFreezeFrameData 
    Dem_ 
    IN uint8 RecordNumber,  
    GetEventFreezeFrameData 
    IN boolean ReportTotalRecord,  
    IN uint16 DataId,  
    OUT Dem_MaxDataValueType 
    DestBuffer,  
    ERR{DEM_E_NODATAAVAILABLE, 
    DEM_E_WRONG_RECORDNUMBER} 
    GetEventExtendedDataRecord 
    Dem_ 
    IN uint8 RecordNumber,  
    GetEventExtendedDataRecor OUT Dem_MaxDataValueType 

    DestBuffer,  
    ERR{DEM_E_NODATAAVAILABLE, 
    DEM_E_WRONG_RECORDNUMBER} 
    Table 6-89   DiagnosticInfo and GeneralDiagnosticInfo 
    6.6.1.1.3 
    OperationCycle 
    Port Defined Argument: uint8 OperationCycleId 
    Operation 
    API Function 
    Arguments 
    SetOperationCycleState 
    Dem_SetOperationCycleState 
    IN Dem_OperationCycleStateType 
    CycleState,  
    ERR{E_NOT_OK} 
    Table 6-90   OperationCycle 
    6.6.1.1.4 
    AgingCycle 
    Not supported 
    6.6.1.1.5 
    ExternalAgingCycle 
    Not supported 
    6.6.1.1.6 
    EnableCondition 
    Port Defined Argument: uint8 EnableConditionId 
    Operation 
    API Function 
    Arguments 
    SetEnableCondition 
    Dem_SetEnableCondition 
    IN boolean ConditionFulfilled,  
    ERR{E_NOT_OK} 
    Table 6-91   EnableCondition 
    6.6.1.1.7 
    StorageCondition 
    Port Defined Argument: uint8 StorageConditionId 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    168 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Operation 
    API Function 
    Arguments 
    SetStorageCondition 
    Dem_SetStorageCondition 
    IN boolean ConditionFulfilled,  
    ERR{E_NOT_OK} 
    Table 6-92   StorageCondition 
    6.6.1.1.8 
    IndicatorStatus 
    Port Defined Argument: uint8 IndicatorStatus 
    Operation 
    API Function 
    Arguments 
    GetIndicatorStatus 
    Dem_GetIndicatorStatus 
    OUT Dem_IndicatorStatusType 
    IndicatorStatus,  
    ERR{E_NOT_OK} 
    Table 6-93   IndicatorStatus 
    6.6.1.1.9 
    EventStatus 
    Port Defined Argument: Dem_EventIdType EventId 
    Operation 
    API Function 
    Arguments 
    SetWIRStatus 
    Dem_SetWIRStatus 
    IN boolean WIRStatus,  
    ERR{E_NOT_OK} 
    GetWIRStatus 
    Dem_GetWIRStatus 
    OUT boolean WIRStatus, 
    ERR{E_NOT_OK} 
    Table 6-94   EventStatus 
    6.6.1.1.10  EvMemOverflowIndication 
    Port Defined Argument: Dem_DTCOriginType DTCOrigin 
    Operation 
    API Function 
    Arguments 
    GetEventMemoryOverflow 
    Dem_ 
    OUT boolean OverflowIndication,  
    GetEventMemoryOverflow 
    ERR{E_NOT_OK} 
    Table 6-95   EvMemOverflowIndication 
    6.6.1.1.11  DTCSuppression 
    Operation 
    API Function 
    Arguments 
    SetDTCSuppression 
    Dem_ 
    IN uint32 DTC, 
    SetDTCSuppression 
    IN Dem_DTCFormatType 
    DTCFormat, 
    IN boolean SuppressionStatus  
    ERR{E_NOT_OK} 
    Table 6-96   DTCSuppression 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    169 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.6.1.1.12  EventSuppression 
    Operation 
    API Function 
    Arguments 
    SetEventSuppression 
    Dem_ 
    IN Dem_EventIdType EventId, 
    SetEventSuppression 
    IN boolean SuppressionStatus  
    ERR{E_NOT_OK} 
    Table 6-97   EventSuppression 
    6.6.1.1.13  DemServices 
    Operation 
    API Function 
    Arguments 
    GetDtcStatusAvailabilityMask 
    Dem_ 
    OUT uint8 DTCStatusMask,  
    GetDtcStatusAvailabilityMask 
    ERR{E_NOT_OK} 
    GetPostRunRequested 
    Dem_ 
    OUT boolean isRequested 
    GetPostRunRequested 
    ERR{E_NOT_OK} 
    SynchronizeNvData 
    Dem_ 
    ERR{E_NOT_OK} 
    RequestNvSynchronization 
    Table 6-98   DemServices 
    6.6.1.1.14  DcmIf 
    The DcmIf PortInterface is a special case not intended to be used by application software. 
    Instead, this interface is a means to establish the call contexts for application notification 
    callbacks  that  are  the  result  of  function  calls  to  the  Dem  by  the  Dcm.  The  interface 
    description is omitted intentionally for this reason. 
    6.6.1.1.15  CddIf 
    Operation 
    API Function 
    Arguments 
    ClearDTC 
    Dem_ 
    IN uint32 DTC, 
    ClearDTC 
    IN Dem_DTCFormatType DTCFormat 
    IN Dem_DTCOriginType DTCOrigin 
    ERR{DEM_CLEAR_WRONG_DTC, 
    DEM_CLEAR_WRONG_DTCORIGIN, 
    DEM_CLEAR_FAILED, 
    DEM_CLEAR_PENDING, 
    DEM_CLEAR_BUSY } 
     
    6.6.1.2 
    Require Ports on Dem Side 
    At its Require Ports the Dem calls Operations. These Operations have to be provided by 
    the  SWCs  by  means  of  Runnable  Entities.  These  Runnable  Entities  implement  the 
    callback functions expected by the Dem. 
    The following sub-chapters present the Require Ports defined for the Dem, the Operations 
    that are called from the Dem and the related Callouts, which are described in chapter 6.5. 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    170 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
     
     
    Note 
    If following interfaces are used as port interfaces without RTE, the function prefix  
      Rte_Call will be replaced by the prefix Appl_Dem
     
     
    6.6.1.2.1 
    CBInitEvt_<EventName> 
    Operation 
    Callout 
    InitMonitorForEvent 
    Rte_Call_ CBInitEvt_<EventName>_InitMonitorForEvent 
    Table 6-99   CBInitEvt_<EventName> 
    6.6.1.2.2 
    CBInitFct_<N> 
    Operation 
    Callout 
    InitMonitorForFunction 
    Rte_Call_ CBInitFct_<N> _InitMonitorForFunction 
    Table 6-100  CBInitFct_<N> 
    6.6.1.2.3 
    CBStatusEvt_<EventName>_<N> 
    Operation 
    Callout 
    EventStatusChanged 
    Rte_Call_ CBStatusEvt_<EventName>_<N> _EventStatusChanged 
    Table 6-101  CBStatusEvt_<EventName>_<N> 
    6.6.1.2.4 
    GeneralCBStatusEvt 
    Operation 
    Callout 
    EventStatusChanged 
    Rte_Call_ GeneralCBStatusEvt _EventStatusChanged 
    Table 6-102  GeneralCBStatusEvt 
    6.6.1.2.5 
    CBStatusDTC_<N> 
    Operation 
    Callout 
    DTCStatusChanged 
    Rte_Call_ CBStatusDTC_<N>_DTCStatusChanged 
    Table 6-103  CBStatusDTC_<N> 
    6.6.1.2.6 
    CBDataEvt_<EventName> 
    Operation 
    Callout 
    EventDataChanged 
    Rte_Call_ CBDataEvt_<EventName>_EventDataChanged 
    Table 6-104  CBDataEvt_<EventName> 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    171 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    6.6.1.2.7 
    GeneralCBDataEvt 
    Operation 
    Callout 
    EventDataChanged 
    Rte_Call_ GeneralCBDataEvt _EventDataChanged 
    Table 6-105  GeneralCBDataEvt 
    6.6.1.2.8 
    CBClrEvt_<EventName> 
    Operation 
    Callout 
    ClearEventAllowed 
    Rte_Call_ CBClrEvt_<EventName>_ClearEventAllowed 
    Table 6-106  CBClrEvt_<EventName> 
    6.6.1.2.9 
    CBReadData_<SyncDataElement> 
    Operation 
    Callout 
    ReadData 
    Rte_Call_ CBReadData_<SyncDataElement> _ReadData 
    Table 6-107  CBReadData_<SyncDataElement> 
    6.6.1.2.10  CBFaultDetectCtr_<EventName> 
    Operation 
    Callout 
    GetFaultDetectionCounter 
    Rte_Call_ CBFaultDetectCtr_<EventName> 
    _GetFaultDetectionCounter 
    Table 6-108  CBFaultDetectCtr_<EventName> 
    6.6.1.2.11  CBCtrlDtcSetting 
    Operation 
    Callout 
    ControlDTCSettingChanged 
    Rte_Call_CBCControlDTCSetting_ControlDTCSettingChanged 
    Table 6-109  CBCtrlDtcSetting 
    6.7 
    Not Supported APIs 
    Operation 
    Dem_DcmGetOBDFreezeFrameData() 
    Dem_SetOperationCycleCntValue() 
    Dem_SetAgingCycleState() 
    Dem_SetAgingCycleCounterValue() 
    Dem_DltGetMostRecentFreezeFrameRecordData() 
    Dem_DltGetAllExtendedDataRecords() 
    Dem_SetEventDisabled() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    172 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Operation 
    Dem_RepIUMPRFaultDetect() 
    Dem_RepIUMPRDenLock() 
    Dem_RepIUMPRDenRelease() 
    Dem_DcmGetInfoTypeValue08() 
    Dem_DcmGetInfoTypeValue0B() 
    Dem_DcmReadDataOfPID01() 
    Dem_DcmReadDataOfPID1C() 
    Dem_DcmReadDataOfPID21() 
    Dem_DcmReadDataOfPID30() 
    Dem_DcmReadDataOfPID31() 
    Dem_DcmReadDataOfPID41() 
    Dem_DcmReadDataOfPID4D() 
    Dem_DcmReadDataOfPID4E() 
    Dem_DcmReadDataOfOBDFreezeFrame() 
    Dem_DcmGetDTCOfOBDFreezeFrame() 
    Dem_SetPtoStatus() 
    Table 6-110  Not Supported APIs 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    173 
    based on template version 5.0.0 



    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    7  Configuration 
    In the Dem the attributes can be configured with the following tools: 
    >  Configuration in GCE 
    >  Configuration in DaVinci Configurator 
    The configuration of post-build is described in [8] and [9]. 
    7.1 
    Configuration Variants 
    The Dem supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    >  VARIANT-POST-BUILD-LOADABLE 
    >  VARIANT-POST-BUILD-SELECTABLE 
    The configuration classes of the Dem parameters depend on the supported configuration 
    variants. For their definitions please see the Dem_bswmd.arxml file. 
    7.2 
    Configurable Attributes 
    The description of each configurable option is described within the Dem_bswmd.arxml file. 
    You  can  use  the  online  help  of  DaVinci  Configurator  5  to  access  these  parameter 
    descriptions comfortably. 
    7.3 
    Configuration of Post-Build Loadable 
    This component uses a static RAM management which differs from the concept described 
    in the mentioned post-build documentation. 
    Since  all  RAM  buffers  scale  with  the  number  of  configured  events,  and  the  number  of 
    events  cannot  be  changed  during  post-build  time,  we  see  no  need  for  dynamic  RAM 
    management. 
    The NV-Ram required is however also not covered by dynamic RAM management. NvM 
    cannot  change  its  memory  allocation,  so  this  is  a  restriction  by  necessity.  In  post-build 
    configurations,  the  Dem  can  reserve  some  NV  memory  for  snapshot  data  storage  using 
    parameter /DemGeneral/DemPostbuild/DemMaxSizeFreezeFrame. 
    It is mainly used to verify that configuration changes do not increase the required NV Ram 
    beyond the available amount. You can however increase its value if you need flexibility to 
    add DIDs to existing snapshot records. 
     
     
    Caution 
    The reserved NV Ram size cannot be reduced during post-build. Be aware of the 
      additional wear on the Flash memory if FEE is used to back the Dem NV data. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    174 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    7.3.1 
    Supported Variance 
    Since much of the configuration of Dem can result in API changes, some restrictions apply 
    regarding which features and configuration elements can be modified after linking. 
    E.g.,  there  is  no  sensible  way  to  introduce  (and  implement)  additional  application 
    callbacks. All code has to be already present in the ECU; service ports must be connected 
    via  RTE. Also, it’s not generally possible to add arbitrary data to the NV data structures, 
    whose block sizes are static as well. 
    Generally,  Post-Build  Loadable  for  the  Dem  module  supports  modifying  an  existing 
    configuration, but not changing it structurally. The exhaustive list of parameters that can be 
    modified using Post-Build Loadable is documented in the Dem parameter description file 
    (BSWMD file). This list is only intended as short outline. 
    >  DTC numbers 
    >  De-bouncing parameters 
    >  Step sizes and thresholds 
    >  Qualification time 
    >  DTC operation cycle 
    >  DID numbers 
    >  DIDs contained in snapshots 
    >  Restricted by the amount of reserved NV data 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    175 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    8  AUTOSAR Standard Compliance 
    8.1 
    Deviations 
    Deviation 
    Comment 
    DemGetNextFilteredDTCAndFDC()  If monitor internal de-bouncing is used the Dem 
    requests the application for the fault detection counter. 
    To implement the necessary call sequence definition, 
    the Dem provides this interface as part of PortInterface 
    DcmIf. 
    Dem_EnableDTCSetting() 
    This API can cause init monitor notifications if it ends a 
    DTC disabled state. To implement the necessary call 
    sequence definition, the Dem provides this interface as 
    part of PortInterface DcmIf. 
    Depending on the configuration, it requires a Dem task 
    for this API to take effect. 
    Dem_J1939DcmGetNextSPNIn 
    The interface is not supported and therefore will 
    FreezeFrame() 
    always return. 
    DEM_FILTERED_NO_MATCHING_ELEMENT. The 
    intended functionality is implemented in the Vector 
    J1939Dcm.  
    Operation cycle handling 
    Only the Operation Cycle using the ‘Autostart’ option is 
    considered active before initialization. This is different 
    from the Autosar standard, which defines to set all 
    cycles to active, and undo the effects for cycles not 
    started at initialization time. 
    TimeBased Debouncing 
    Qualified reports are handled asynchronously, for all 
    event status bits. 
    CBStatusEvt 
    and 
    CBtDataEvt  The signature of these callbacks is expected to match 
    Notification signature 
    Rte_Call (see chapter 6.5.1 Callouts). Notifications 
    with return type ‘void’ are not possible. 
    Dem_J1939DcmClearDTC() 
    This API can also be called for DTCOrigin 
    DEM_DTC_ORIGIN_SECONDARY_MEMORY. 
    Dem_J1939DcmSetDTCFilter() 
    This API can also be called for DTCOrigin 
    DEM_DTC_ORIGIN_SECONDARY_MEMORY. 
    Table 8-1   Deviations 
    8.2 
    Additions/ Extensions 
    Extension 
    Comment 
    Dem_InitMemory() 
    see 6.2.3.3 
    Dem_PostRunRequested() 
    see 6.2.4.21 
    Dem_GetEventEnableCondition() 
    see 6.2.4.18 
    Extension of 
    see 6.5.1.6 
    CBReadData_<SyncDataElement>() 
    Table 8-2   Extensions 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    176 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    8.3 
    Limitations 
    Limitation 
    Comment 
    Enable Conditions 
    Maximum number of Enable Conditions is limited to 31 for efficiency 
    reasons. 
    Storage Conditions 
    Maximum number of Storage Conditions is limited to 32 for efficiency 
    reasons. 
    Operation Cycles 
    Maximum number of Operation Cycles is limited to 16 for efficiency 
    reasons. 
    Aging Threshold 
    Maximum possible aging cycles are limited to 255 (from 256) for 
    efficiency reasons. 
    ControlDTCSetting 
    The service is limited to DTC Group 
    DEM_DTC_GROUP_ALL_DTCS and DTC Kind 
    DEM_DTC_KIND_ALL_DTCS. 
    Non-Volatile storage 
    Configuration option DemStatusBitStorageTestFailed == false will 
    reset the Test Failed bit during initialization, but it will be stored in 
    NVRAM anyways. 
    DemGroupOfDTC 
    Configuration of DTC groups is limited to 4. These are intended to be 
    used to support the Powertrain, Body, Chassis and Network 
    groupings defined by ISO 15031-6. 
    Different definitions may not work as intended. 
    Extended Data Record 
    Interface Dem_GetEventExtendedDataRecord() will return 
    E_NOT_OK if requested record number is equal to 0xFE or 0xFF. 
    Snapshot Record/ Freeze  Interface Dem_GetEventFreezeFrameData() will return the most 
    Frame 
    recent record only if the records are configured as “calculated”.  
    Interface Dem_GetEventFreezeFrameData() will return 
    E_NOT_OK if the records are configured as “Configured” and the 
    requested record is 0xFF.  
    Internal Data Elements 
    The internal data elements which can be mapped into an extended 
    data or snapshot record will always have their current internal values 
    at the time the data is read out. 
    This will not apply to the following elements as they are static 
    configuration elements: Significance, Priority, OBD DTC, root cause 
    Event Id  
    J1939 DTC 
    If the DTC class has configured a J1939 DTC then an UDS DTC 
    must be also available. 
    J1939NmNodes 
    Maximum number of different nodes is limited to 255 (from 256) for 
    efficiency reasons.  
    J1939 Indicators 
    An event is only allowed to support one J1939 related indicators 
    (RSL, AWL, PL). The MIL indicator is not supported. 
    J1939 Freeze Frame and  Only one global defined J1939 Freeze Frame and one global J1939 
    Expanded Freeze Frame  Expanded Freeze Frame is supported. 
    De-bounce counter 
    This feature is limited to counter based de-bounced events only. 
    storage in NVRAM 
    BSW events which are reported before initialization of DEM 
    (Dem_Init()) must not use this feature. 
    DTC suppression 
    DEM_DTC_FORMAT_OBD is not supported for function 
    Dem_SetDTCSuppression() 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    177 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    Table 8-3 
    Limitations   
    8.4 
    Not Supported Service Interfaces 
    The following table contains service interfaces which are not supported from Dem. 
    Port 
    Operation(s) 
    DiagnosticMonitor 
    SetEventDisable 
    AgingCycle 
    SetAgingCycleState 
    ExternalAgingCycle 
    SetAgingCycleCounterValue 
    PowerTakeOff 
    SetPtoStatus 
    DataServices<SyncDataElement> 
    ReadData  Sender/Receiver 
    Table 8-4   Service Interfaces which are not supported 
      
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    178 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    9  Glossary and Abbreviations 
    9.1 
    Glossary 
    Term 
    Description 
    Configurator 5 
    Configuration and code generation tool for MICROSAR components 
    Combined Event 
    The combination of multiple events into a combined status. 
    Warning Indicator 
    The warning indicator managed by the Dem only provides the information 
    that the related indicator (e.g. lamp in the dashboard) shall be requested, 
    the de-/activation must be handled by the application or a different ECU.  
    Each event that currently requests an indicator will have set the warning 
    indicator requested bit in the status byte. 
    Table 9-1   Glossary 
    9.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    AWL 
    Amber Warning Lamp  
    BSW 
    Basic Software 
    Cfg5 
    Configurator 5 
    CPU 
    Central Processing Unit 
    Dcm 
    Diagnostic Communication Manager 
    DCY 
    Driving Cycle 
    Dem 
    Diagnostic Event Manager 
    Det 
    Development Error Tracer 
    Dlt 
    Diagnostic Log and Trace 
    DTC 
    Diagnostic Trouble Code 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    EcuM 
    Ecu Manager 
    EEPROM 
    Electrically Erasable Programmable Read-Only Memory  
    FDC 
    Fault Detection Counter 
    FEE 
    Flash EEPROM Emulation 
    GCE 
    Generic Content Editor 
    HIS 
    Hersteller Initiative Software 
    ID 
    Identification 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    179 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    MIL 
    Malfunction Indicator Lamp 
    NVRAM 
    Non-volatile Random Access Memory 
    OBD 
    On Board Diagnostics 
    OCC 
    Occurrence Counter 
    PL 
    Protect Lamp 
    Pport 
    Provide Port 
    RAM 
    Random Access Memory 
    ROE 
    Response On Event 
    ROM 
    Read-Only Memory 
    Rport 
    Require Port 
    RSL 
    Red Stop Lamp 
    Rte 
    Runtime Environment 
    SAE 
    Society of Automotive Engineers 
    SchM 
    Schedule Manager 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    UDS 
    Unified Diagnostic Services 
    WUC 
    Warmup Cycle 
    Table 9-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    180 
    based on template version 5.0.0 


    Technical Reference MICROSAR Diagnostic Event Manager (Dem) 
    10  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
    © 2017 Vector Informatik GmbH 
    Version 6.0.3 
    181 
    based on template version 5.0.0 

    Document Outline


    1.3.123 - TechnicalReference_Det

    MICROSAR [BSW module]

    1.3.125 - TechnicalReference_Dets


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR DET 
    Technical Reference 
     
      
    Version 10.0.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Hartmut Hörner 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR DET 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Hartmut Hörner 
    2007-11-29 
    1.0 
    Initial version 
    Hartmut Hörner 
    2008-01-03 
    1.1 
    Update to AUTOSAR 3 
    Hartmut Hörner 
    2008-04-14 
    1.2 
    Naming changed to AUTOSAR short 
    name, screen shots updated. 
    (ESCAN00025687) 
    Hartmut Hörner 
    2008-09-16 
    1.3 
    Added DET extension mechanism based 
    on callout. 
    Added chapter 4.4. 
    Hartmut Hörner 
    2010-01-13 
    2.0 
    Update to AUTOSAR 4 
    Hartmut Hörner 
    2012-04-20 
    2.1 
    Added usage hints related to silent BSW 
    concept in 4.7.  
    (ESCAN00058419) 
    Hartmut Hörner 
    2013-04-09 
    2.2 
    Added Configurator 5 and service port 
    interface 
    (ESCAN00066511) 
    Hartmut Hörner 
    2013-09-13 
    2.3 
    Added DLT forwarding support for 
    Configurator 5 
    (ESCAN00068394, ESCAN00069807) 
    Hartmut Hörner 
    2014-12-10 
    2.3.1 
    Added description of  
    BCD-coded return value of 
    Det_GetVersionInfo() 
    (ESCAN00079310) 
    Hartmut Hörner 
    2015-06-12 
    2.4.0 
    File name changed 
    (ESCAN00081049) 
    Added chapter 4.2. 
    Hartmut Hörner 
    2016-12-24 
    10.0.0 
    Update to AUTOSAR 4.3 (FEAT-1939) 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_DET.pdf 
    4.3.0 
    [2]   AUTOSAR 
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR DET 
    Scope of the Document  
    This technical reference describes the general use of the MICROSAR Default Error Tracer 
    (DET). 
    Note  that  this  release  of  the  DET  supports  only AUTOSAR  4  and  the  configuration  tool 
    Configurator  5.  If  you  need  a  DET  module  for  previous AUTOSAR  versions  or  tools  an 
    older version is required. 
     
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Contents 
    1 
    Component History ...................................................................................................... 7 
    2 
    Introduction................................................................................................................... 8 
    2.1 

    Architecture Overview ........................................................................................ 8 
    3 
    Functional Description ............................................................................................... 10 
    3.1 

    Features .......................................................................................................... 10 
    3.1.1 

    Deviations ........................................................................................ 10 
    3.1.2 
    Additions/ Extensions ....................................................................... 10 
    3.1.3 
    Limitations ........................................................................................ 11 
    3.2 
    Initialization ...................................................................................................... 11 
    3.3 
    States .............................................................................................................. 11 
    3.4 
    Main Functions ................................................................................................ 11 
    3.5 
    Error Handling .................................................................................................. 11 
    3.5.1 

    Development Error Reporting ........................................................... 11 
    3.5.2 
    Production Code Error Reporting ..................................................... 12 
    3.6 
    Handling of development errors - Debugging with the DET .............................. 12 
    3.6.1 

    Extended Debug Features ............................................................... 12 
    3.6.1.1 
    Filters ............................................................................. 13 
    3.6.1.2 
    Logging .......................................................................... 14 
    3.6.1.3 
    Break handler ................................................................ 15 
    3.6.1.4 
    Filtering of DLT forwarding ............................................. 16 
    3.7 
    Handling of runtime errors and transient faults ................................................. 16 
    3.8 
    Extension of the DET ....................................................................................... 17 
    3.9 
    Usage of ErrorId .............................................................................................. 17 
    4 
    Integration ................................................................................................................... 18 
    4.1 

    Scope of Delivery ............................................................................................. 18 
    4.1.1 

    Static Files ....................................................................................... 18 
    4.1.2 
    Dynamic Files .................................................................................. 18 
    4.2 
    Critical Sections ............................................................................................... 18 
    4.3 
    Include Structure .............................................................................................. 18 
    4.4 
    Handling of Recursions .................................................................................... 19 
    4.5 
    Multi-core system ............................................................................................. 19 
    4.6 
    Partitioning and memory protection .................................................................. 19 
    4.7 
    Usage Hints for Operation in Safety Related ECUs .......................................... 20 
    5 
    API Description ........................................................................................................... 21 
    5.1 

    Type Definitions ............................................................................................... 21 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    5.2 
    Services provided by DET ................................................................................ 21 
    5.2.1 

    Det_Init ............................................................................................ 21 
    5.2.2 
    Det_InitMemory ................................................................................ 22 
    5.2.3 
    Det_Start .......................................................................................... 22 
    5.2.4 
    Det_GetVersionInfo .......................................................................... 23 
    5.2.5 
    Det_ReportError ............................................................................... 23 
    5.2.6 
    Det_ReportRuntimeError ................................................................. 24 
    5.2.7 
    Det_ReportTransientFault ................................................................ 25 
    5.3 
    Services used by DET ..................................................................................... 26 
    5.4 
    Callback Functions ........................................................................................... 26 
    5.5 
    Configurable Interfaces .................................................................................... 26 
    5.5.1 

    Callout Functions ............................................................................. 26 
    5.5.1.1 

    <DetErrorHook> ............................................................. 26 
    5.5.1.2 
    <DetReportRuntimeErrorCallout> .................................. 27 
    5.5.1.3 
    <DetReportTransientFaultCallout> ................................. 27 
    5.6 
    Service Ports ................................................................................................... 28 
    5.6.1 

    Client Server Interface ..................................................................... 28 
    5.6.1.1 

    Provide Ports on DET Side ............................................ 28 
    5.6.1.1.1 

    DETService................................................ 28 
    6 
    Configuration .............................................................................................................. 30 
    6.1 

    Configuration Variants ...................................................................................... 30 
    7 
    Glossary and Abbreviations ...................................................................................... 31 
    7.1 

    Glossary .......................................................................................................... 31 
    7.2 
    Abbreviations ................................................................................................... 31 
    8 
    Contact ........................................................................................................................ 32 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.3 Architecture Overview ......................................................... 8 
    Figure 2-2 
    Interfaces to adjacent modules of the DET ................................................. 9 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 7 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 10 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 10 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 10 
    Table 3-4  
    Service IDs ............................................................................................... 11 
    Table 3-5  
    Errors reported to DET ............................................................................. 12 
    Table 4-1  
    Static files ................................................................................................. 18 
    Table 4-2  
    Generated files ......................................................................................... 18 
    Table 5-1  
    Type definitions ......................................................................................... 21 
    Table 5-2  
    Det_Init ..................................................................................................... 22 
    Table 5-3  
    Det_InitMemory ........................................................................................ 22 
    Table 5-4  
    Det_Start .................................................................................................. 23 
    Table 5-5  
    Det_GetVersionInfo .................................................................................. 23 
    Table 5-6  
    Det_ReportError ....................................................................................... 24 
    Table 5-7  
    Det_ReportRuntimeError .......................................................................... 25 
    Table 5-8  
    Det_ReportTransientFault ......................................................................... 25 
    Table 5-9  
    Services used by the DET ........................................................................ 26 
    Table 5-10  
    <DetErrorHook> ....................................................................................... 27 
    Table 5-11  
    <DetReportRuntimeErrorCallout> ............................................................. 27 
    Table 5-12  
    <DetReportTransientFaultCallout>............................................................ 28 
    Table 5-13  
    DETService .............................................................................................. 28 
    Table 7-1  
    Glossary ................................................................................................... 31 
    Table 7-2  
    Abbreviations ............................................................................................ 31 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    0.01.00 
    Creation 
    2.00.00 
    Update for AUTOSAR Release 2.0 
    3.00.00 
    Update for AUTOSAR Release 2.1 
    3.01.00 
    GetVersionInfo API added  
    3.02.00 
    Extended debug features added  
    4.00.00 
    Update for AUTOSAR Release 3 
    compiler abstraction and memmap added 
    4.01.00 
    DET entry callout 
    5.00.00 
    Update for AUTOSAR Release 4 
    6.00.00 
    Support of Configurator 5 (MSR3) 
    7.00.00 
    Support of Configurator 5 (MSR4) 
    8.00.00 
    DLT and service port interface 
    9.00.00 
    safeBSW 
    10.00.00 
    safeBSW ASIL release 
    20.00.00 
    Update for AUTOSAR Release 4.3 
    Table 1-1   Component history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR DET 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module DET as specified in [1].  
     
    Supported AUTOSAR Release*: 
    4.3 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    DET_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    DET_MODULE_ID   
    15 decimal 
    (according to ref. [2]) 
    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
     
    The DET is the central error handler in the AUTOSAR architecture. All other basic software 
    modules can report development errors, runtime errors and transient faults to the DET. 
    2.1 
    Architecture Overview 
    The following figure shows where the DET is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.3 Architecture Overview  
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
     
    The next figure shows the interfaces to adjacent modules of the DET. These interfaces are 
    described in chapter 5.  
    <any BSW module>
    EcuM
    Application
    Dlt
    COM
    IPDU
    Report 
    Init / 
    Callout
    Forward 
    error
    Start
    error
    DET
     
    Figure 2-2  Interfaces to adjacent modules of the DET 
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. The service ports provided by the DET 
    are listed in chapter 5.5.1.2 and are defined in [1]. 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    DET. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector Informatik provides further DET functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Initialization and start services 
    Error reporting services 
    Service port interface 
    Forwarding of DET errors to the DLT module 
    Configurable lists of error hooks and callouts 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations  
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    none 
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Extended Debug Features: 
    Since AUTOSAR specifies only the interface and not the functionality of the DET all provided 
    debugging features are AUTOSAR extensions. 
    Table 3-3   Features provided beyond the AUTOSAR standard 
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    10 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    3.1.3 
    Limitations 
    There are no known limitations. 
    3.2 
    Initialization 
    The DET is initialized and operational after the API  Det_Init has been called. In [1] an 
    additional Det_Start  service  is specified to handle cases where  it  is necessary to split 
    the  initialization  in  two  phases.  Since  this  is  not  applicable  the  Det_Start  function  is 
    empty. 
    The  API  Det_InitMemory  may  have  to  be  used  in  addition,  please  refer  to  the  API 
    description 5.2.2 for details. 
    3.3 
    States 
    The DET has no internal state machine, it is operational after initialization. 
    The  module  uses  its  initialization  state  to  perform  a  check  if  the  module  has  been 
    initialized. 
    3.4 
    Main Functions 
    The DET has no main function since it does not perform cyclic tasks. 
    3.5 
    Error Handling 
    3.5.1 
    Development Error Reporting 
    Development  errors  detected  in  DET  API  functions  are  reported  to  the  DET  using  the 
    service Det_ReportError as specified in [1]. 
    The reported DET ID is 15. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Det_Init 
    0x01 
    Det_ReportError 
    0x02 
    Det_Start 
    0x03 
    Det_GetVersionInfo 
    0x04 
    Det_ReportRuntimeError 
    0x05 
    Det_ReportTransientFault 
    Table 3-4   Service IDs 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    11 
    based on template version 6.0.1 




    Technical Reference MICROSAR DET 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01 
    DET_E_PARAM_POINTER 
    Det_GetVersionInfo called with NULL parameter pointer 
    Table 3-5   Errors reported to DET 
     
    3.5.2 
    Production Code Error Reporting 
    The DET does not report production errors. 
    3.6 
    Handling of development errors - Debugging with the DET 
    The DET is called for each development error which is reported by other BSW modules. 
    Since  it  is  potentially  not  safe  to  continue  the  program  when  such  an  error  occurs,  the 
    default handling of development errors is an endless loop. 
    A  breakpoint  should  always  be  set  in  this  loop  which  can  found  in  the  local  function 
    Det_EndlessLoop.  When  the  breakpoint  is  hit,  the  parameters  of  the  function 
    Det_ReportError  5.2.5  can  be  inspected  in  the  debugger.  By  means  of  these 
    parameters it is possible  to find out  which  error occurred;  it is however sometimes more 
    convenient to use a stack trace if the debugger provides this. 
     
    A breakpoint should always be set in the endless loop 
     
     
     
     
    In  a  simulated  target  based  on  CANoe  an  error  message  is  logged  in  the  CANoe  write 
    window.  
    3.6.1 
    Extended Debug Features 
    Sometimes  setting  a  breakpoint  in  the  endless  loop  is  not  sufficient  for  debugging, 
    therefore  some  extended  debug  features  are  provided. These  features  are  thought  as  a 
    debugging aid, thus they are accessible via the debugger and do not have special APIs. 
    To use these features the attribute “Enable Extended Debug Support” must be enabled. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    12 
    based on template version 6.0.1 









    Technical Reference MICROSAR DET 
    3.6.1.1 
    Filters 
    Sometimes  it  happens  that  a  BSW  module  reports  DET  errors  which  are  known  to  be 
    uncritical.  Such  errors  can  be  ignored  by  discarding  the  related  calls  to 
    Det_ReportError. 
    To  implement  this  functionality  the  DET  provides  a  set  of  filters  where  the  errors  to  be 
    discarded can be configured. It is possible to use the patterns 0xff or 0xffff as wild cards 
    (don’t care patterns). 
    Configuration of filters 
      configure the required number of filters in configuration tool with the attribute 
     
    “Number of Global Filters”  
      enable filtering globally in the debugger by setting 
    detStatus.globalFilterActive to 1 
     
     
      configure the required filters in the debugger by setting detGlobalFilter 
    elements 
     
     
     
    Filter examples 
      a) ignore error 3 of API7 of module 20 in instance 0 
      moduleId=20 
      instanceId=0 
      apiId=7 
    errorId=3 
    b) ignore all errors of module 20 in instance 0 
      moduleId=20 
      instanceId=0 
      apiId=0xff 
      errorId=0xff 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    13 
    based on template version 6.0.1 








    Technical Reference MICROSAR DET 
    3.6.1.2 
    Logging 
    The DET provides a log buffer for incoming error messages. Error messages which have 
    been filtered are not logged. 
    The contents of the log buffer can be viewed with the debugger. 
     
    Configuration of logging 
      configure the required size of the log buffer in the configuration tool with the 
     
    attribute “Size of Log Buffer”  
      enable logging globally in the debugger by setting detStatus.logActive to 1 
     
     
     
    Logging example 
      The variable detStatus.logIndex shows the index in the log buffer with the last logged 
    development error. Use the elements of detLogBuffer to view the logged errors. 
     
    By default all elements of the variable (s. above) detLogBuffer are initialized with zero. 
     
    By  setting  detStatus.breakOnLogOverrun  in  the  debugger  it  is  possible  to  enter  the 
    endless loop if the log buffer is full. 
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    14 
    based on template version 6.0.1 








    Technical Reference MICROSAR DET 
    3.6.1.3 
    Break handler 
    For some errors it is possible to continue operation. Therefore it  is possible to unlock the 
    endless loop with the debugger to continue the program. Since the same error could occur 
    multiple times and to avoid ending up in the endless loop again it is possible to configure a 
    special filter set for the break handler. Such errors are logged (if logging is active) but do 
    not lead to a break. 
     
    Configuration of break handler filters 
      configure the required number of break handler filters in configuration tool 
     
    with the attribute “Number of Break Handler Filters”  
      enable break handler filtering globally in the debugger by setting 
    detStatus.breakFilterActive to 1 
     
     
      configure the required break handler filters in the debugger by setting 
    detBreakFilter elements 
     
     
     
    For some filter examples please refer to 3.6.1.1. 
    In  the  following  example  it  is  described  how  the  endless  loop  can  be  unlocked  in  the 
    debugger. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    15 
    based on template version 6.0.1 






    Technical Reference MICROSAR DET 
     
    How to unlock the endless loop 
    Set detStatus.unlockBreak to 1 to leave endless loop: 
       
     
     
    3.6.1.4 
    Filtering of DLT forwarding 
    It is sometimes necessary to suppress the forwarding of specific errors to the DLT module 
    to avoid overload. To implement this functionality the DET provides DLT filters where the 
    errors  which  shall  not be forwarded  can be configured.  It  is  possible  to use the  patterns 
    0xff or 0xffff as wild cards (don’t care patterns). These filters work in the same way as the 
    global filters described in 3.6.1.1, please refer to the description there. This functionality is 
    supported for all error reporting APIs. 
    3.7 
    Handling of runtime errors and transient faults 
    If  errors  are  reported  via  the  API  services  Det_ReportRuntimeError  and 
    Det_ReportTransientFault execution continues (i.e. no endless loop is entered). 
    The following extended debug features are available: 
      Logging (3.6.1.2) 
      Filtering of DLT forwarding (3.6.1.4) 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    16 
    based on template version 6.0.1 






    Technical Reference MICROSAR DET 
    3.8 
    Extension of the DET 
    Sometimes  the built-in  debug features of the DET may not  be sufficient  or some special 
    handling of errors is required. Examples for such use cases include: 
     Logging of DET errors via debug interface 
     Transmission of DET errors on a serial bus system 
     Error  handling  which  requires  direct  access  to  the  hardware  (e.g.  disabling  of 
    specific interrupts) 
     Complex application specific error handling 
    To support such extensions the DET provides callout functions which are called first when 
    the DET is entered. The callouts have to be provided by the application. They receive all 
    parameters  of  the  DET’s  error  reporting  functions.  For  details  please  refer  to  API 
    description (5.5.1)
    3.9 
    Usage of ErrorId 
    All three error reporting functions have an ErrorId parameter which is forwarded to the DLT 
    module and used by some extended debug features, e.g. filtering and logging. Note, that 
    the DLT module and the extended debug features do not distinguish the actual error kind 
    (i.e. development error, runtime error or transient fault). It is therefore recommended to use 
    a  different  number  range  of  ErrorIds  for  each  error  kind.  In  the  AUTOSAR  4.3 
    specifications this is already considered for modules reporting runtime errors. 
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    17 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    4  Integration 
    This chapter gives necessary information for the integration of  the MICROSAR  DET  into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the  DET contains the files which are described in the chapters  4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    Det.c 
    This is the source file of the DET 
    Det.h 
    This is the header file of the DET 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool [config tool]. 
    File Name 
    Description 
    Det_cfg.h 
    This is configuration header file containing pre-compile parameters. 
    Det_cfg.c 
    This is configuration source file containing pre-compile parameters. 
    Table 4-2   Generated files 
     
    4.2 
    Critical Sections 
    The DET has code sections which need protection against preemption. Therefore the DET 
    uses  one  exclusive  area  which  typically  requires  an  interrupt  lock  up  to  the  highest 
    interrupt level where DET error reports can be produced: 
    DET_EXCLUSIVE_AREA_0 
    This  exclusive  area  is  short  and  only  relevant  if  the  logging  feature  or  the  recursion 
    detection mechanism is activated. 
    4.3 
    Include Structure 
    The DET includes the headers mentioned in the previous chapters 4.1.1 and 4.1.2. 
    In addition the file Std_Types.h is included. 
    To support the AUTOSAR memory mapping concept the header MemMap.h is included. 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    18 
    based on template version 6.0.1 






    Technical Reference MICROSAR DET 
    4.4 
    Handling of Recursions 
    If DET errors occur within the call context of the DET recursions could be caused. This can 
    happen in a callout function or a subroutine of it if BSW API functions are used there. 
    These cases are handled by an internal recursion detection mechanism in the DET so the 
    application  needs  not  to  take  care  of  them.  If  the  configurable  number  of  recursions  is 
    exceeded  the  DET  enters  an  endless  loop.  The  recursion  detection  mechanism  can  be 
    deactivated by setting this number to zero.  
    Assure  that  enter  and  exit  functions  of  the  DET’s  exclusive  area  do  not  produce  DET 
    errors. 
    4.5 
    Multi-core system 
    Usage in a multi-core system is possible under one of the following conditions: 
      The DET’s exclusive area is mapped to a spinlock 
      The logging feature (3.6.1.2) and the recursion detection mechanism (4.4) is not 
    used  
    4.6 
    Partitioning and memory protection 
    It  is  assumed  that  the  BSW  is  trusted.  There  may  however  be  exceptional  cases  which 
    require  operation  of  parts  of  the  BSW  in  a  separate  partition,  e.g.  due  to  different ASIL 
    level. In such a case the DET is still usable if one of the following concepts is used: 
      Memory  protection  configuration  allows  write  access  to  the  DET  data  by  all 
    partitions  containing  DET  reporting  software.  Note,  that  this  could  lead  to 
    corruption of the DET’s internal data if it is overwritten by a QM application. As a 
    result the debug features of the DET may not work as expected. 
      The logging feature (3.6.1.2) and the recursion detection mechanism (4.4) is not 
    used 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    19 
    based on template version 6.0.1 





    Technical Reference MICROSAR DET 
    4.7 
    Usage Hints for Operation in Safety Related ECUs 
    The  silent  BSW  concept  assures  that  a  BSW  module  does  not  corrupt  memory  of  the 
    application  and  other  BSW  modules.  In  this  context  the  following  aspects  have  to  be 
    considered for the DET: 
     In the callout functions (5.5.1) the DET passes four parameters to the application 
    which  could  be  used  as  indices  by  the  application.  Please  note,  that  the  DET 
    does  not  perform  plausibility  checks  of  the  value  ranges  of  those  parameters 
    because the errors reported to the DET are not known by the DET in advance. 
    The  producer  and  consumer  (could  both  be  application  code)  has  to  perform 
    plausibility checks of the index parameters if necessary. 
     If  the  extended  debug  feature  “logging”  is  used  depending  on  the  scheduling 
    concept of the ECU DET errors could be logged from different contexts and it has 
    therefore  to  be  secured  that  the  critical  section  DET_EXCLUSIVE_AREA_0 
    reaches  up  the  highest  processing  level  of  the  application  which  can  produce 
    DET errors. 
     The  debug  features  of  the  DET  are  intended  for  the  development  phase  of  an 
    ECU. If the DET is used in production code the extended debug features should 
    be switched off because they are only relevant if a debugger is attached. 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    20 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the DET are described in this chapter. 
    Type Name 
    C-Type  Description 
    Usage 
    DetInfoType 
    struct 
    structure used to 
    Refer to chapter 3.6.1 for details. 
    configure filters and store   
    log data, using 0xFF for a 
    filter item means don't 
    care  
    DetStatusType 
    struct 
    structure to control the 
    Refer to chapter 3.6.1 for details. 
    operation of DET debug 
     
    extension 
    Det_ConfigType 
    uint8 
    Parameter type of the init  The dummy symbol 
    function – currently not 
    Det_ConfigPtr is provided by 
    used 
    the generator. 
    Table 5-1   Type definitions 
    5.2 
    Services provided by DET 
    5.2.1 
    Det_Init 
    Prototype 
    void Det_Init  ( const Det_ConfigType* ConfigPtr ) 
    Parameter 
    ConfigPtr 
    Pointer to configuration structure is currently not used by the DET. 
    Return code 


    Functional Description 
    Initializes the DET. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant.  
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    21 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Expected Caller Context 
    >  Should be called from a safe context on task level 
    Table 5-2   Det_Init 
    5.2.2 
    Det_InitMemory 
    Prototype 
    void Det_InitMemory  ( void ) 
    Parameter 


    Return code 


    Functional Description 
    Initializes the state variable for the un-init check of the DET. If this function is used it must be called before 
    Det_Init. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    >  Should only be called once by the EcuM when the system is started 
    >  Only needed if the startup code does not support initialized RAM 
    Expected Caller Context 
    >  Should be called from a safe context on task level 
    Table 5-3   Det_InitMemory 
    5.2.3 
    Det_Start 
    Prototype 
    void Det_Start  ( void ) 
    Parameter 


    Return code 


    Functional Description 
    Starts the DET. This service currently has no functionality, i.e. the API function is empty. 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    22 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant.  
    >  Call could be omitted 
    Expected Caller Context 
    >  No restriction 
    Table 5-4   Det_Start 
    5.2.4 
    Det_GetVersionInfo 
    Prototype 
    void Det_GetVersionInfo  ( Std_VersionInfoType *versioninfo ) 
    Parameter 
    versioninfo 
    Version information of the DET 
    Return code 


    Functional Description 
    This API returns version information, vendor ID and AUTOSAR module ID of the component. 
    The versions are decimal coded. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant.  
    >  This API is only available if enabled in configuration  
    Expected Caller Context 
    >  No restriction 
    Table 5-5   Det_GetVersionInfo 
    5.2.5 
    Det_ReportError 
    Prototype 
    Std_ReturnType Det_ReportError  ( uint16 ModuleId, uint8 InstanceId,  
                            uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    23 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    ErrorId 
    ID of detected development error 
    (defined in SWS of calling module) 
    Return code 
    Std_ReturnType 
    Always E_OK 
    Functional Description 
    Used to report development errors from other BSW modules to the DET. If extended debug features are 
    disabled the DET enters an endless loop in case of an embedded target or issues an error message in the 
    CANoe write window in case of a simulated target. 
    For details please refer to chapter 3.6. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant. 
    >  If this function is called the DET may enter an endless loop, therefore it is strongly 
    recommended to put a breakpoint in the local function Det_EndlessLoop. 
    Expected Caller Context 
    >  No restriction 
    Table 5-6   Det_ReportError 
     
    5.2.6 
    Det_ReportRuntimeError 
    Prototype 
    Std_ReturnType Det_ReportRuntimeError  ( uint16 ModuleId, uint8 InstanceId,  
                            uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    ErrorId 
    ID of detected runtime error 
    (defined in SWS of calling module) 
    Return code 
    Std_ReturnType 
    Always E_OK 
    Functional Description 
    Used to report runtime errors from other BSW modules to the DET. This function returns and issues an 
    error message in the CANoe write window in case of a simulated target. 
    For details please refer to chapter 3.6.1.4. 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    24 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant. 
    Expected Caller Context 
    >  No restriction 
    Table 5-7   Det_ReportRuntimeError 
     
    5.2.7 
    Det_ReportTransientFault 
    Prototype 
    Std_ReturnType Det_ReportTransientFault  ( uint16 ModuleId, uint8 InstanceId,  
                            uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    ErrorId 
    ID of detected transient fault 
    (defined in SWS of calling module) 
    Return code 
    Std_ReturnType 
    E_OK or E_NOT_OK depending on return value of last called callout 
    Functional Description 
    Used to report transient faults from other BSW modules to the DET. This function returns and issues an 
    error message in the CANoe write window in case of a simulated target. 
    For details please refer to chapter 3.6.1.4. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant. 
    Expected Caller Context 
    >  No restriction 
    Table 5-8   Det_ReportTransientFault 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    25 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    5.3 
    Services used by DET 
    In the following table services provided by other components, which are used by the DET 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DLT 
    Dlt_DetForwardErrorTrace 
    Table 5-9   Services used by the DET 
    5.4 
    Callback Functions 
    The DET does not provide callback functions. 
    5.5 
    Configurable Interfaces 
    5.5.1 
    Callout Functions 
    At  its  configurable  interfaces  the  DET  defines  callout  functions.  The  declarations  of  the 
    callout functions are provided by the BSW module, i.e. the DET. It is the integrator's task to 
    provide  the  corresponding  function  definitions.  The  definitions  of  the  callouts  can  be 
    adjusted to the system's needs. The DET callout function declarations are described in the 
    following tables: 
    5.5.1.1 
    <DetErrorHook> 
    Prototype 
    Std_ReturnType <DetErrorHook>  ( uint16 ModuleId, uint8 InstanceId,  
                   uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    ErrorId 
    ID of detected development error 
    (defined in SWS of calling module) 
    Return code 
    Std_ReturnType 
    E_OK or E_NOT_OK 
    If the last error hook which is called returns E_NOT_OK the extended debug 
    features filtering and logging are skipped and Det_ReportError returns 
    immediately. 
    Functional Description 
    This hook routine can be used to forward development error information received by Det_ReportError to 
    the application for further processing. 
    Particularities and Limitations 
    >  none 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    26 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Call context 
    >  Called in the context of the corresponding error reporting API which can be task or interrupt. 
    Table 5-10   <DetErrorHook> 
    5.5.1.2 
    <DetReportRuntimeErrorCallout> 
    Prototype 
    Std_ReturnType <DetReportRuntimeErrorCallout>  ( uint16 ModuleId,  
                   uint8 InstanceId, uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    ErrorId 
    ID of detected runtime error 
    (defined in SWS of calling module) 
    Return code 
    Std_ReturnType 
    E_OK or E_NOT_OK 
    If the last error hook which is called returns E_NOT_OK the extended debug 
    feature logging is skipped. 
    Functional Description 
    This hook routine can be used to forward runtime error information received by Det_ReportRuntimeError to 
    the application for further processing. 
    Particularities and Limitations 
    >  none 
    Call context 
    >  Called in the context of the corresponding error reporting API which can be task or interrupt. 
    Table 5-11   <DetReportRuntimeErrorCallout> 
    5.5.1.3 
    <DetReportTransientFaultCallout> 
    Prototype 
    Std_ReturnType <DetReportTransientFaultCallout>  ( uint16 ModuleId,  
                   uint8 InstanceId, uint8 ApiId, uint8 ErrorId ) 
    Parameter 
    ModuleId 
    Module ID of calling module 
    InstanceId 
    The identifier of the index based instance of a module, starting from 0, If the 
    module is a single instance module it shall pass 0 as the InstanceId. 
    ApiId 
    ID of API service in which error is detected 
    (defined in SWS of calling module) 
    ErrorId 
    ID of detected transient fault 
    (defined in SWS of calling module) 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    27 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    Return code 
    Std_ReturnType 
    E_OK or E_NOT_OK 
    The return value of the last error hook which is called will be returned by 
    Det_ReportTransientFault. 
    Functional Description 
    This hook routine can be used to forward transient fault information received by Det_ReportTransientFault 
    to the application for further processing. 
    Particularities and Limitations 
    >  none 
    Call context 
    >  Called in the context of the corresponding error reporting API which can be task or interrupt. 
    Table 5-12   <DetReportTransientFaultCallout> 
    5.6 
    Service Ports 
    5.6.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    5.6.1.1 
    Provide Ports on DET Side 
    At  the  Provide  Ports  of  the  DET  the  API  functions  described  in  5.2  are  available  as 
    Runnable Entities. The Runnable Entities are invoked via Operations. The mapping from a 
    SWC client call to an Operation is performed by the RTE. In this mapping the RTE adds 
    Port Defined Argument Values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  DET  and  the 
    Operations defined for the Provide Ports, the API functions related to the Operations and 
    the Port Defined Argument Values to be added by the RTE. 
    5.6.1.1.1 
    DETService 
     
    Operation 
    API Function 
    Port Defined Argument Values 
    ReportError  
    Det_ReportError 
    uint16 ModuleId 
    (  IN uint8 ApiId,  
    uint8 InstanceId
     
     
       IN uint8 ErrorId  ) 
    ReportRuntimeError  
    Det_ReportRuntimeError 
    uint16 ModuleId 
    (  IN uint8 ApiId,  
    uint8 InstanceId
     
     
       IN uint8 ErrorId  ) 
    Table 5-13   DETService 
    A  separate  DETService  Port  is  needed  for  each  instance  of  an AUTOSAR  SW-C  which 
    wants to report errors to the DET module which corresponds to the service port of the SW-
    C. Each DETService Port needs a ModuleId and an InstanceId as port defined argument 
    values.  These  values  are  set  automatically  and  symbolic  name  value  defines  for  the 
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    28 
    based on template version 6.0.1 



    Technical Reference MICROSAR DET 
    ModuleIds and InstanceIds are generated. The required service ports and their ModuleIds 
    and InstanceIds are configured in Configurator 5. 
     
     
     
    Migration hints 
    Note that the DETService Port was specified differently in previous AUTOSAR 
      releases. The InstanceId was part of the operation. 
    In order to update to the new specification it is recommended to 
      replace the old service port configuration by new instance specific service ports in 
    the configuration tool and to 
      adapt the SWC source code by removing the InstanceId parameter from the 
    service port calls. 
    If it is not possible to change the SWC source code some compatibility support is 
    provided in the configuration tool which allows configuring a service port for ModuleIds 
    only, i.e. without configuring InstanceIds. In that case a second port called 
    DETServiceLegacy is generated which provides the old operation including an 
    InstanceId. If you want to use DETServiceLegacy it has to be configured instead of 
    DETService in the SWC configuration. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    29 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    6  Configuration 
    In the DET the attributes can be configured with the following tools: 
    >  Configuration in Configurator 5, for a detailed description refer to the online help 
    6.1 
    Configuration Variants 
    The DET supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the DET parameters depend on the supported configuration 
    variants. For their definitions please see the Det_bswmd.arxml file. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    30 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    Stack trace 
    A stack trace (also called stack backtrace or stack traceback) is a report 
    of the active stack frames instantiated by the execution of a program. 
    Although stack traces may be generated anywhere within a program, they 
    are mostly used to aid debugging by showing where exactly an error 
    occurs. The last few stack frames often indicate the origin of the bug. 
    Table 7-1   Glossary 
     
     
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    BSW 
    Basis SoftWare 
    DEM 
    Diagnostic Event Manager 
    DET 
    Default Error Tracer 
    DLT 
    Diagnostic Log and Trace 
    pPort 
    Provide Port 
    rPort 
    Require Port 
    RTE 
    RunTime Environment 
    SWC 
    SoftWare Component 
    Table 7-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    31 
    based on template version 6.0.1 


    Technical Reference MICROSAR DET 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 10.0.0 
    32 
    based on template version 6.0.1 

    Document Outline


    1.3.126 - TechnicalReference_Diag_AsrSwcSecAccess_Ford

    MICROSAR - SwcSecAccessFord

    1.3.128 - TechnicalReference_Diag_AsrSwcSecAccess_Fords

     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR - SwcSecAccessFord 
    Technical Reference 
     
    FORD - Software Component Vector Security Access 
    Version 1.0.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Schneider 
    Status 
    Released 
     
     
     
     

    Technical Reference MICROSAR - SwcSecAccessFord 
     
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Markus Schneider 
    2015-04-13 
    1.0.0 
    Creation 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   Vector 
    TechnicalReference_Asr_Dcm_Vector.pdf 
    3.33.00 
    [2]   Vector 
    TechnicalReference_Asr_Csm.pdf 
    1.02.00 
    [3]   Vector 
    TechnicalReference_Asr_Cry.pdf 
    1.01.00 
    [4]   FORD 
    EESE DIAGNOSTIC APPLICATION SECURITY ALGORITHM  001 
     
    Scope of the Document  
    This  technical  reference  describes  the  general  use  of  the  Security  Access  software 
    component.  
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    2 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 

    Architecture Overview ........................................................................................ 7 
    3 
    Functional Description ................................................................................................. 9 
    3.1 

    Initialization ........................................................................................................ 9 
    3.2 
    Provide Entropy ................................................................................................. 9 
    3.3 
    States ................................................................................................................ 9 
    3.3.1 

    Sec_EntropyOp .................................................................................. 9 
    3.3.2 
    Sec_VerifyOp ................................................................................... 10 
    3.3.3 
    Sec_SeedState ................................................................................ 10 
    3.3.4 
    Sec_VerifyState ............................................................................... 10 
    3.4 
    Main Functions ................................................................................................ 10 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Scope of Delivery ............................................................................................. 11 
    4.1.1 

    Static Files ....................................................................................... 11 
    4.1.2 
    Dynamic Files .................................................................................. 11 
    4.1.3 
    CSM Configuration in DaVinci Configurator 5 ................................... 11 
    4.1.4 
    Integration in DaVinci Developer ...................................................... 11 
    4.1.5 
    Connecting ports and task mapping ................................................. 12 
    5 
    API Description ........................................................................................................... 13 
    5.1 

    Service Ports ................................................................................................... 13 
    5.1.1 

    SwcSecAccessFord_CallbackNotificationRandomGenerate ............ 13 
    5.1.2 
    SwcSecAccessFord_CallbackNotificationRandomSeed ................... 13 
    5.1.3 
    SwcSecAccessFord_CompareKey_L<LEVEL> ................................ 14 
    5.1.4 
    SwcSecAccessFord_GetSeed_L<LEVEL> ...................................... 14 
    5.1.5 
    SwcSecAccessFord_Init .................................................................. 15 
    5.1.6 
    SwcSecAccessFord_MainFunction .................................................. 15 
    5.1.7 
    SwcSecAccessFord_ProvideEntropy ............................................... 15 
    5.1.8 
    Client Server Interface ..................................................................... 16 
    5.1.8.1 

    Provide Ports on SwcSecAccessFord Side .................... 16 
    5.1.8.2 
    Require Ports on SwcSecAccessFord Side ................... 16 
    6 
    Glossary and Abbreviations ...................................................................................... 17 
    6.1 

    Abbreviations ................................................................................................... 17 
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    3 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    7 
    Contact ........................................................................................................................ 18 
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    4 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    Illustrations 
    Figure 2-1 
    Architecture Overview ................................................................................. 7 
    Figure 2-2 
    Interfaces to adjacent modules of the SwcSecAccessFord ......................... 8 
    Figure 3-1 
    State machine Sec_EntropyOp and Sec_VerifyOp ..................................... 9 
    Figure 3-2 
    State machine Sec_SeedState ................................................................. 10 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 4-1  
    Static files ................................................................................................. 11 
    Table 4-2  
    Generated files ......................................................................................... 11 
    Table 5-1  
    SwcSecAccessFord_CallbackNotificationRandomGenerate ..................... 13 
    Table 5-2  
    SwcSecAccessFord_CallbackNotificationRandomSeed ........................... 13 
    Table 5-3  
    SwcSecAccessFord_CompareKey_L<LEVEL> ........................................ 14 
    Table 5-4  
    SwcSecAccessFord_GetSeed_L<LEVEL> ............................................... 14 
    Table 5-5  
    SwcSecAccessFord_Init ........................................................................... 15 
    Table 5-6  
    SwcSecAccessFord_MainFunction ........................................................... 15 
    Table 5-7  
    SwcSecAccessFord_ProvideEntropy ........................................................ 16 
    Table 5-8  
    Provided ports by the SWC ....................................................................... 16 
    Table 5-9  
    Required ports by the SWC ...................................................................... 16 
    Table 6-1  
    Abbreviations ............................................................................................ 17 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    5 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Initial creation 
    Table 1-1   Component history 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    6 / 18 
    based on template version 5.11.0 


    Technical Reference MICROSAR - SwcSecAccessFord 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  SWC 
    SwcSecAccessFord, which implements a security access as specified in [4].  
     
    Supported AUTOSAR Release*: 

    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
     
    2.1 
    Architecture Overview 
    The  following  figure  shows  where  the  SwcSecAccessFord  is  located  in  the  AUTOSAR 
    architecture. 
     
    Figure 2-1  Architecture Overview 
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    7 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
     
    The next figure shows the port interfaces to adjacent modules of the SwcSecAccessFord. 
    These interfaces are described in chapter 5.  
     cmp Architecture
    Security Access
    Source of Entropy
    ProvideEntropy()
    Csm_<Service>Start
    Csm_<Service>Finish
    <Service>Callback
    Csm_<Service>Update
    Csm_<Service>
    GetSeed()
    CompareKey()
    «optional»
    CSM
    DCM
    Cry_<Primitive>Start
    Cry_<Primitive>Finish
    Csm_<Service>CallbackNotification
    Cry_<Primitive>Update
    Cry_<Primitive>
    Csm_<Service>FinishNotification
    «async»
    «async»
    Cry
     
    Figure 2-2  Interfaces to adjacent modules of the SwcSecAccessFord 
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    8 / 18 
    based on template version 5.11.0 


    Technical Reference MICROSAR - SwcSecAccessFord 
    3  Functional Description 
    3.1 
    Initialization 
    The  initialization  of  the  component  SwcSecAccessFord  takes  place  within  the  RTE  by 
    calling SwcSecAccessFord_Init. 
    3.2 
    Provide Entropy 
    After the initialization and before the usage of the security access a source of entropy has 
    to be provided at least once by calling SwcSecAccessFord_ProvideEntropy. 
     
     
     
    Note 
    Depending on the used (pseudo) random number generator, it may be necessary for 
      the entropy to have a certain minimum length. 
    E.g. in case FIPS186-2 is used, the length of the entropy has to be at least 20 bytes of 
    random data. 
     
     
    The entropy will be triggered in the main function task. 
    While the entropy is passed to the random number generator a seed request will report a 
    pending operation result. 
    3.3 
    States 
    3.3.1 
    Sec_EntropyOp 
    The  state  machine  is  used  to  feed  the  entropy  into  the  Csm_RandomSeed  service. 
    Internal  processing  in  the  main  function  task  will  be  started  by  invoking  the 
    SwcSecAccessFord_ProvideEntropy while the component is in the ‘Initial’ state. 
     act State Machine
    INITIAL
    ActivityInitial
    <SERVICE>FINISH
    <SERVICE>START
    <SERVICE>UPDATE
      
    Figure 3-1  State machine Sec_EntropyOp and Sec_VerifyOp 
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    9 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    3.3.2 
    Sec_VerifyOp 
    The  state  machine  is  used  to  verify  the  received  key  from  the  tester  using  the 
    Csm_MacVerify service. 
    3.3.3 
    Sec_SeedState 
    The state machine is used to determine the progression of seed generation. 
     act State Machine
    ActivityInitial
    INITIAL
    GENERATION_PENDING
    VALID
    INVALID
     
    Figure 3-2  State machine Sec_SeedState 
    3.3.4 
    Sec_VerifyState 
    The state machine is used to determine the progression of the MAC verification. 
    3.4 
    Main Functions 
    The  SwcSecAccessFord_MainFunction  triggers  the  processing  of  the  provided  entropy 
    and the MAC verification. The function has to be called cyclically from RTE level.  
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    10 / 18 
    based on template version 5.11.0 


    Technical Reference MICROSAR - SwcSecAccessFord 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR 
    SwcSecAccessFord into an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The  delivery  of  the  SwcSecAccessFord  contains  the  files  which  are  described  in  the 
    chapters 4.1.1 and 4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    SwcSecAccessFord.c 
    Implementation of the SwcSecAccessFord 
    SwcSecAccessFord.h 
    Header file of the SWC 
    SwcSecAccessFord_Cfg.c  In this file the secret keys can be stored 
    SwcSecAccessFord_Cfg.h  Configuration header file of the SWC 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator5. 
    File Name 
    Description 
    Rte_SwcSecAccessFord.h  Generated data types and function calls 
    Table 4-2   Generated files 
    4.1.3 
    CSM Configuration in DaVinci Configurator 5 
    Before  the  integration it  is  necessary  to  create  the  configurations of  the  random number 
    generator primitives. 
     
     
    Step 1 
    Create the configurations for the CsmRandomSeed, CsmRandomGenerate and 
      CsmMacVerify Services 
     
     
    On  further  Information  about  the  configuration  of  the  CSM  please  refer  to  the Technical 
    Reference of the CSM [2] and CRY [3]. 
     
    4.1.4 
    Integration in DaVinci Developer 
    The SwcSecAccessFord consists of one AUTOSAR SWC component.  
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    11 / 18 
    based on template version 5.11.0 







    Technical Reference MICROSAR - SwcSecAccessFord 
     
    Step 2 
    Import software components / compositions 
     
     
     
    To use the software component the software component description must be imported in 
    an existing DaVinci Developer workspace “File | Import XML file…” 
     
    Step 3 
    Instantiate software components  
     
     
     
     
     
    Step 4 
    Create a SWC to provide a source of entropy to the open SWC port. 
      When FIPS186-2 is used as random number generator this SWC has to provide at 
    least 20 byte of random data. 
    The quality of randomness highly depends on the quality of the entropy input. 
     
     
    4.1.5 
    Connecting ports and task mapping 
    To connect the ports and map the task you have to use the DaVinci Configurator 5 
     
     
    Step 5 
    Connect the port prototypes from the SWC with the specific component prototypes 
     
     
     
     
     
    Step 6 
    Mapping of the SwcSecAccessFord_MainFunction to a cyclically task and the 
      SwcSecAccessFord_Init to the initialization  
     
     
     
     
    Step 7 
    Use DaVinci Configurator 5 to generate and add the provided files, as described in 
      4.1.1 and 4.1.2, to your project. 
     
     
     
     
     
     
     
      
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    12 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
     
    5.1 
    Service Ports 
    5.1.1 
    SwcSecAccessFord_CallbackNotificationRandomGenerate 
    Prototype 
    Std_ReturnType SwcSecAccessFord_CallbackNotificationRandomGenerate 
    (Csm_ReturnType retVal) 
    Parameter 
    retVal 
    Result of CSM operation 
    Return code 
    Std_ReturnType 
    RTE_E_OK – allways succeed 
    Functional Description 
    This function is being called by the CSM after completion of the random number generation. The seed state 
    will be set to SEEDSTATE_VALID if successful 
    Call context 
    Called by CSM 
    Table 5-1   SwcSecAccessFord_CallbackNotificationRandomGenerate 
     
    5.1.2 
    SwcSecAccessFord_CallbackNotificationRandomSeed 
    Prototype 
    Std_ReturnType SwcSecAccessFord_CallbackNotificationRandomSeed (Csm_ReturnType 
    retVal) 
    Parameter 
    retVal 
    Result of CSM operation 
    Return code 
    Std_ReturnType 
    RTE_E_OK – allways succeed 
    Functional Description 
    This function is being called by the CSM after completion of a random seed operation. The state of 
    Sec_EntropyOp will be set to next processing step if successful. 
    Call context 
    Called by CSM 
    Table 5-2   SwcSecAccessFord_CallbackNotificationRandomSeed 
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    13 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    5.1.3 
    SwcSecAccessFord_CompareKey_L<LEVEL> 
    Prototype 
    Std_ReturnType SwcSecAccessFord_CompareKey_L<LEVEL> (const UInt8 *Key, 
    Dcm_OpStatusType OpStatus) 
    Parameter 
    Key 
    Points to the requested key. 
    OpStatus 
    Status of the current operation. 
    Return code 
    Std_ReturnType 
    RTE_E_OK 
    RTE_E_ SecurityAccess_E_COMPARE_KEY_FAILED 
    RTE_E_ SecurityAccess_E_NOT_OK 
    RTE_E_ SecurityAccess_E_PENDING 
    Functional Description 
    The routine calculates a key based on a previously calculated seed and compares the given key (from the 
    parameter) against the calculated key. 
    Call context 
    Called by DCM 
    Table 5-3   SwcSecAccessFord_CompareKey_L<LEVEL> 
     
    5.1.4 
    SwcSecAccessFord_GetSeed_L<LEVEL> 
    Prototype 
    Std_ReturnType SwcSecAccessFord_GetSeed_L<LEVEL> (Dcm_OpStatusType OpStatus, 
    UInt8 *Seed, Dcm_NegativeResponseCodeType *ErrorCode) 
    Parameter 
    Seed 
    Points to the response seed data 
    OpStatus 
    Status of the current operation. 
    ErrorCode 
    NRC to be sent in the negative response in case of failure (E_NOT_OK) 
    Return code 
    Std_ReturnType 
    RTE_E_OK 
    RTE_E_ SecurityAccess_E_NOT_OK 
    RTE_E_ SecurityAccess_E_PENDING 
    Functional Description 
    This function is connected to the GetSeed port of the DCM to provide a seed for the tester. 
    Call context 
    Called by DCM 
    Table 5-4   SwcSecAccessFord_GetSeed_L<LEVEL> 
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    14 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    5.1.5 
    SwcSecAccessFord_Init 
    Prototype 
    void SwcSecAccessFord_Init (void) 
    Functional Description 
    This function initializes the state machines of the SwcSecAccessFord 
    Call context 
    Called by RTE on initialization 
    Table 5-5   SwcSecAccessFord_Init 
     
    5.1.6 
    SwcSecAccessFord_MainFunction 
    Prototype 
    void SwcSecAccessFord_MainFunction (void) 
    Functional Description 
    The main function triggers the internal processing in the background. 
    Call context 
    Called by RTE cyclically 
    Table 5-6   SwcSecAccessFord_MainFunction 
     
    5.1.7 
    SwcSecAccessFord_ProvideEntropy 
    Prototype 
    Std_ReturnType SwcSecAccessFord_ProvideEntropy (const UInt8 *entropyBuffer, 
    UInt32 entropyLength) 
    Parameter 
    entropyBuffer 
    Points to the source of entropy 
    entropyLength 
    Length of the entropy buffer 
    Return code 
    Std_ReturnType 
    RTE_E_OK 
    RTE_E_SwcSecAccessFord_ProvideEntropy_E_BUSY 
    RTE_E_SwcSecAccessFord_ProvideEntropy_E_NOT_OK 
    Functional Description 
    A provided source of entropy will be used to instantiate the random number generator for the GetSeed() 
    function. 
    Particularities and Limitations 
    In case of FIPS186-2 the provided source of entropy has to be at least 20 bytes. 
    Call context 
    Called by a SWC 
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    15 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    Table 5-7   SwcSecAccessFord_ProvideEntropy 
     
    5.1.8 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    5.1.8.1 
    Provide Ports on SwcSecAccessFord Side 
    At  the  Provide  Ports  of  the  SwcSecAccessFord  the  API  functions  described  in  5.1  are 
    available  as  Runnable  Entities.  The  Runnable  Entities  are  invoked  via  Operations.  The 
    mapping from a SWC client call to an Operation is performed by the RTE.  
    Operation 
    Mapping 
    CsmCallbackMacVerify 
    Mapped to <Instance>_Callback of MacVerify primitive (CSM) 
    CsmCallbackRandomGenerate 
    Mapped to <Instance>_Callback of RandomGenerate primitive (CSM) 
    CsmCallbackRandomSeed 
    Mapped to <Instance>_Callback of RandomSeed primitive (CSM) 
    SecurityAccessL<LEVEL> 
    Mapped to SecurityAccess_<SecurityLevelName> of DCM 
    ProvideEntropy 
    SWC which provides a source of entropy at least once 
    Table 5-8   Provided ports by the SWC 
    5.1.8.2 
    Require Ports on SwcSecAccessFord Side 
    At  its Require Ports the  SwcSecAccessFord calls Operations. These Operations have to 
    be  provided  by  the  SWCs  by  means  of  Runnable  Entities.  These  Runnable  Entities 
    implement the callback functions expected by the SwcSecAccessFord. 
    Operation 
    Mapping 
    CsmRandomSeed 
    Mapped to <Instance> of RandomSeed primitive (CSM) 
    CsmRandomGenerate 
    Mapped to <Instance> of RandomGenerate primitive (CSM) 
    CsmMacVerify 
    Mapped to <Instance> of MacVerify primitive (CSM) 
    Table 5-9   Required ports by the SWC 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    16 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    6  Glossary and Abbreviations 
    6.1 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CRY 
    Cryptographic library module 
    CSM 
    Crypto Service Manager 
    DCM 
    Diagnostic Communication Manager 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PPORT 
    Provide Port 
    RPORT 
    Require Port 
    RTE 
    Runtime Environment 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 6-1   Abbreviations 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    17 / 18 
    based on template version 5.11.0 

    Technical Reference MICROSAR - SwcSecAccessFord 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.0.0 
    18 / 18 
    based on template version 5.11.0 

    Document Outline


    1.3.129 - TechnicalReference_DiagA2lGen

    MICROSAR Diag A2l Gen

    1.3.131 - TechnicalReference_DiagA2lGens

     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Diag A2l Gen 
    Technical Reference 
     
    A2l fragment file generator for DEM, DCM and FIM 
    Version 1.02.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Alexander Ditte 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR Diag A2l Gen 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Alexander Ditte 
    2012-04-13 
    01.00.00 
    initial version 
    Alexander Ditte 
    2013-06-12 
    01.01.00 
    added support for AR4 DCM 
    Alexander Ditte 
    2013-09-25 
    01.01.01 
    update of chapter 3.1 
    Alexander Ditte 
    2017-03-03 
    01.02.00 
    added chapter 4 Limitations 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 




    Scope of the Document  
    This  technical  reference  describes  the  specific  use  of  the  diagnostic  A2l  fragment  file 
    generator for the DEM, DCM and FIM modules. 
     
     
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    2 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    Contents 
    1  Component History ........................................................................................................ 5 
    2  Introduction .................................................................................................................... 6 
    3  Functional Description .................................................................................................. 7 
    3.1 
    Features .......................................................................................................... 7 
    4  Limitations ...................................................................................................................... 8 
    4.1 
    DEM ................................................................................................................ 8 
    5  Glossary and Abbreviations .......................................................................................... 9 
    5.1 
    Glossary .......................................................................................................... 9 
    5.2 
    Abbreviations .................................................................................................. 9 
    6  Contact .......................................................................................................................... 10 
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    3 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    Tables 
    Table 1-1  
    Component history...................................................................................... 5 
    Table 2-1  
    Supported components and specifications .................................................. 6 
    Table 3-1 
    Command line arguments ........................................................................... 7 
    Table 5-1  
    Glossary ..................................................................................................... 9 
    Table 5-2  
    Abbreviations .............................................................................................. 9 
     
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    4 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    01.00.00 
    >  Initial version  
    01.01.00 
    >  Added support for selective generation of measurement or calibration 
    fragment content only 
    01.02.00 
    >  Added support for AUTOSAR 4 DCM 
    >  Type definition template is generated in an own file 
    Table 1-1  
    Component history 
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    5 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    2  Introduction 
    This  document  describes  the  functionality,  API  and  configuration  of  the  diagnostic  A2l 
    fragment generator module. 
    This generator shall support the customer to calibrate pre-defined symbols of the following 
    modules: 
     
    Specification 
     
     
     
    3
    4


     
    A
    A
    S
    S
     
    Component 
    MICRO
    MICRO
    DEM 
     
     
    DCM 
     
     
    FIM 
     
     
    Table 2-1  
    Supported components and specifications 
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    6 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    3  Functional Description 
    3.1 
    Features 
    The generator can be controlled via command line options. It scans the given source code 
    folders for configuration files of the supported modules. If a known symbol is available and 
    also the correct size could be resolved an entry in the A2l fragment file will be generated. 
    For  a  list  of  the  supported  calibratable  and  measurable  symbols  refer  to  the  technical 
    reference of the respective module. 
    For this tool to work correctly all paths for the configuration files (header and source)  and 
    the static files must be passed. 
     
    The following command line options are supported:  
    Argument 
    Optional 
    Description 
    Default 
    [-c Component] 
    Yes 
    Only the specified component is 
    All components are 
    taken into account 
    taken into account 
    Dem: Diagnostic Event Manager 
    only                                                                                 
    Dcm: Diagnostic Communication 
    Manager only                                                                                
    FiM: Function Inhibition Manager 
    only 
    [-f] 
    Yes 
    Overwrite an existing output a2l 
    A confirmation from the 
    fragment file without confirmation 
    user is required 
    [-h] 
    Yes 
    Shows a help message 

    [input …] 
    No 
    Source code folder(s) to scan 

    Please add the folders for the 
    static and generated files 
    [-l] 
    Yes 
    Write a log file 
    no file is generated 
    [-mc 
    Yes 
    Set the content of the output file.  
    Measurement and 
    MeasurementCalibration] 
    0: Measurement and Calibration         
    C   
    al i      
    brat i    
    on       
    sy    
    m     
    bol   
    s                                                                       
    1: Measurement only                                                                                                             
    2: Calibration only 
    [-nr] 
    Yes 
    If set the given folders are not 

    recursively scanned  
    [-o Out] 
    Yes 
    Output directory for the generated  Current working 
    file 
    directory 
    [-v] 
    Yes 
    Print additional information during  - 
    program execution 
    Table 3-1 
    Command line arguments 
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    7 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    4  Limitations 
    4.1 
    DEM 
    Measurement symbol generation only supported if no Satellites are configured. 
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    8 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    5  Glossary and Abbreviations 
    5.1 
    Glossary 
    Term 
    Description 
    EAD 
    Embedded Architecture Designer; generation tool for MICROSAR 
    components 
    GENy 
    Generation tool for CANbedded and MICROSAR components 
    Table 5-1  
    Glossary 
     
     
    5.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PPort 
    Provide Port 
    RPort 
    Require Port 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 5-2  
    Abbreviations 
     
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    9 / 10 
    based on template version 4.8.3 

    Technical Reference MICROSAR Diag A2l Gen 
    6  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
     
    2017, Vector Informatik GmbH 
    Version: 1.02.00 
    10 / 10 
    based on template version 4.8.3 

    Document Outline


    1.3.132 - TechnicalReference_EcuM

    MICROSAR EcuM

    1.3.134 - TechnicalReference_EcuMs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR EcuM Flex 
    Technical Reference 
     
    SysService_Asr4EcuM 
    Version 6.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Jochen Vorreiter 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR EcuM Flex 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Jochen Vorreiter 
    2012-06-06 
    1.00.00 
    >  Initial Setup 
    Jochen Vorreiter 
    2013-01-30 
    1.00.01 
    >  ESCAN00064669 Updated compiler 
    abstraction and memory mapping 
    Jochen Vorreiter 
    2013-05-03 
    1.01.00 
    >  Added support of post-build-loadable 
    >  Added support of asynchronous 
    transceiver handling in 3.9.2 
    >  Added API 
    EcuM_ClearValidatedWakeupEvent() 
    in 5.2.10 
    >  Extended description of 
    EcuM_StartupTwo() in 5.2.3 
    Jochen Vorreiter 
    2013-10-31 
    2.00.00 
    >  ESCAN00069010 Added support for 
    Alarm Clock in 3.14 
    >  ESCAN00071546 Added Multi Core 
    support in 3.15 
    >  New API 
    EcuM_GoToSelectedShutdownTarget 
    >  ESCAN00071553 Changed handling of 
    wakeup source states in 5.1 
    >  Changes in chapter 4.2 Critical Sections 
    >  ESCAN00071552 Removed 
    BswM_EcuM_CurentState notification 
    Jochen Vorreiter 
    2014-06-03 
    3.00.00 
    >  Added Support for EcuM fixed 
    >  ESCAN00073631 Fixed missing 
    description of EcuM_BswErrorHook() 
    Jochen Vorreiter 
    2014-11-04 
    4.00.00 
    >  Added Support for Post-Build 
    Selectable 
    >  Added chapter 3.15.1.2.1 Driver 
    initialization on the Slave Core. 
    >  Added chapter 3.15.5 Reconfiguration 
    of the BSW Core ID 
    >  Added MICROSAR specific CanSM 
    handling in 3.18.2.3.3 
    >  ESCAN00079382 Fixed missing 
    description of the StateRequest Port in 
    5.8.1.1 
    >  ESCAN00077124 Fixed description of 
    Critical Sections in 4.2 
    >  ESCAN00079407, ESCAN00068331 
    Fixed description in Type Definitions of 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    EcuM_WakeupStateType in 5.1 
    Jochen Vorreiter 
    2014-11-25 
    4.00.01 
    >  Adapted description of 
    EcuM_DeterminePbConfiguration 
    Jochen Vorreiter 
    2015-01-26 
    4.01.00 
    >  Updated the Include structure and 
    added two files in 4.1.2 
    >  Updated access on PB and Variant data 
    in DriverInitLists in Ch. 5.7.2 
    Jochen Vorreiter 
    2015-07-14 
    5.00.00 
    >  Added new EcuM error ID for invalid 
    CoreID in Ch. 3.11.3 
    >  Added support for Mode Handling, see 
    Ch. 3.16, 5.3.13 and 5.5 
    >  Removed subchapters “Parameter 
    Checking” from Ch. 3.11 
    >  Added missing API ID in Table 3-8 
      Service IDs 
    Jochen Vorreiter 
    2016-11-15 
    6.00.00 
    >  Added support for PNC notifications to 
    ComM about Wakeup Events 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_ECUStateManager.pdf 
    V3.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    V3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf.pdf 
    V4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.6.0 
    [5]   AUTOSAR 
    AUTOSAR_EXP_ModemanagementGuide.pdf 
    V1.0.0 
    [6]   VECTOR 
    TechnicalReference_PostBuildLoadable.pdf 
    see delivery 
    [7]   AUTOSAR 
    AUTOSAR_SWS_ECUStateManagerFixed.pdf 
    V1.4.0 
    [8]   VECTOR 
    TechnicalReference_IdentityManager.pdf 
    see delivery 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Contents 
    1 
    Component History .................................................................................................... 13 
    2 
    Introduction................................................................................................................. 14 
    2.1 
    Architecture Overview ...................................................................................... 15 
    3 
    Functional Description ............................................................................................... 17 
    3.1 

    Features .......................................................................................................... 17 
    3.2 
    States of EcuM flex .......................................................................................... 19 
    3.3 
    States of EcuM fixed ........................................................................................ 20 
    3.4 
    The State Diagram of the EcuM flex................................................................. 22 
    3.5 
    The State Diagram of the EcuM with fixed state machine ................................ 23 
    3.6 
    Initialization ...................................................................................................... 24 
    3.6.1 

    EcuM_Init ......................................................................................... 24 
    3.6.2 
    EcuM_StartupTwo ............................................................................ 24 
    3.6.2.1 

    EcuM_StartupTwo in case of EcuM flex ......................... 24 
    3.6.2.2 
    EcuM_StartupTwo in case of EcuM fixed ....................... 24 
    3.6.3 
    Initialization Order ............................................................................ 24 
    3.6.4 
    Additional Code in the Initialization Callouts ..................................... 25 
    3.6.5 
    Inclusion of Additional Header Files ................................................. 26 
    3.6.6 
    Configuration Set Selection .............................................................. 26 
    3.7 
    Initialization of a MultiCore ECU ....................................................................... 27 
    3.8 
    Shutdown Targets ............................................................................................ 27 
    3.8.1 

    Using the API EcuM_SelectShutdownTarget().................................. 27 
    3.8.2 
    Default Shutdown Target .................................................................. 27 
    3.8.3 
    Reset Modes .................................................................................... 27 
    3.8.4 
    Sleep Modes .................................................................................... 28 
    3.9 
    Wake-up Sources ............................................................................................ 28 
    3.9.1 

    Validation Timeout ............................................................................ 28 
    3.9.2 
    Check-Wakeup Validation Timeout ................................................... 29 
    3.9.3 
    ComM Channel Reference ............................................................... 29 
    3.9.4 
    Polling of Wake-up Sources ............................................................. 29 
    3.9.5 
    MCU Reset Reason ......................................................................... 29 
    3.10 
    Main Functions ................................................................................................ 30 
    3.10.1 

    Wake-up Validation Protocol ............................................................ 30 
    3.10.2 
    Wake-up Validation Protocol for asynchronous Can transceiver ....... 32 
    3.11 
    Error Handling .................................................................................................. 33 
    3.11.1 

    Development Error Reporting ........................................................... 33 
    3.11.2 
    Production Code Error Reporting ..................................................... 35 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.11.3 
    EcuM_ErrorHook ............................................................................. 35 
    3.12 
    Callout Execution Sequences .......................................................................... 36 
    3.12.1 

    Callouts from Startup to Run ............................................................ 36 
    3.12.2 
    Callouts from Run to Sleep (Halt) and back to Run .......................... 37 
    3.12.3 
    Callouts from Run to Reset .............................................................. 38 
    3.12.4 
    Callouts from Run to Off ................................................................... 38 
    3.13 
    EcuM Flex Users and Defensive Behavior ....................................................... 39 
    3.14 
    Alarm Clock ..................................................................................................... 40 
    3.14.1 

    Configuring the Gpt to provide the Time base .................................. 40 
    3.14.2 
    Configuring the EcuM for using the Alarm Clock .............................. 40 
    3.14.3 
    Setting of the EcuM Clock ................................................................ 41 
    3.14.4 
    Setting of a Time Triggered Wake Up Alarm ..................................... 41 
    3.15 
    MultiCore Ecu .................................................................................................. 42 
    3.15.1 

    Initialization of a MultiCore ECU ....................................................... 42 
    3.15.1.1 

    Initialization on the Master Core ..................................... 42 
    3.15.1.2 
    Initialization on the Slave Core ....................................... 43 
    3.15.1.2.1  Driver initialization on the Slave Core......... 43 

    3.15.2 
    Sleep handling of slave cores .......................................................... 44 
    3.15.3 
    Blocking of the BSW Scheduler during Sleep ................................... 45 
    3.15.4 
    Shutdown of the MultiCore ECU ...................................................... 45 
    3.15.5 
    Reconfiguration of the BSW Core ID ................................................ 45 
    3.16 
    Mode Handling for EcuM Flex .......................................................................... 46 
    3.16.1 

    Mode Handling ................................................................................. 46 
    3.16.2 
    Run Request Protocol ...................................................................... 47 
    3.17 
    Generated Template Files ................................................................................ 48 
    3.18 
    Wake-up Event Handling and Wake-up Validation ........................................... 48 
    3.18.1 

    Wake-up after a Physical Sleep Mode .............................................. 48 
    3.18.1.1 

    Use Case Description .................................................... 48 
    3.18.1.2 
    Execution Flow .............................................................. 49 
    3.18.1.3 
    Callout Implementation Examples .................................. 49 
    3.18.2 
    Wake-up Validation of Communication Channels (ECUM in RUN 
    State) ............................................................................................... 50 
    3.18.2.1 

    Use Case Description .................................................... 50 
    3.18.2.2 
    Execution Flow .............................................................. 50 
    3.18.2.3 
    Callout Implementation Examples .................................. 51 
    3.18.2.3.1  EcuM_CheckWakeup ................................. 51 
    3.18.2.3.2  EcuM_CheckValidation .............................. 51 
    3.18.2.3.3  EcuM_StartWakeupSources and 

    EcuM_StopWakeupSources in the case 
    of a MICROSAR CanSM ............................ 51 

    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.18.2.3.4  EcuM_StartWakeupSources and 
    EcuM_StopWakeupSources in the case 
    of a non MICROSAR CanSM ..................... 52 

    4 
    Integration ................................................................................................................... 53 
    4.1 

    Scope of Delivery ............................................................................................. 53 
    4.1.1 

    Static Files ....................................................................................... 53 
    4.1.2 
    Dynamic Files .................................................................................. 53 
    4.2 
    Critical Sections ............................................................................................... 54 
    4.3 
    Include Structure .............................................................................................. 55 
    4.4 
    Dependencies on other BSW Modules ............................................................. 56 
    4.4.1 

    BswM ............................................................................................... 56 
    4.4.1.1 

    BswM and EcuM fixed ................................................... 56 
    4.4.2 
    AUTOSAR OS ................................................................................. 56 
    4.4.3 
    MCU ................................................................................................ 56 
    4.4.4 
    DEM ................................................................................................. 56 
    4.4.5 
    DET ................................................................................................. 56 
    4.4.6 
    ComM .............................................................................................. 56 
    4.4.6.1 

    ComM and EcuM fixed ................................................... 56 
    4.4.7 
    SchM ............................................................................................... 57 
    4.4.8 
    Gpt ................................................................................................... 57 
    4.4.9 
    NvM ................................................................................................. 57 
    5 
    API Description ........................................................................................................... 58 
    5.1 

    Type Definitions ............................................................................................... 58 
    5.2 
    Services Provided by EcuM ............................................................................. 62 
    5.2.1 

    EcuM_MainFunction ........................................................................ 62 
    5.2.2 
    EcuM_Init ......................................................................................... 63 
    5.2.3 
    EcuM_StartupTwo ............................................................................ 64 
    5.2.4 
    EcuM_Shutdown .............................................................................. 65 
    5.2.5 
    EcuM_SelectShutdownTarget .......................................................... 66 
    5.2.6 
    EcuM_GetShutdownTarget .............................................................. 67 
    5.2.7 
    EcuM_GetLastShutdownTarget ........................................................ 68 
    5.2.8 
    EcuM_GetPendingWakeupEvents ................................................... 69 
    5.2.9 
    EcuM_ClearWakeupEvent ............................................................... 69 
    5.2.10 
    EcuM_ClearValidatedWakeupEvent ................................................. 70 
    5.2.11 
    EcuM_GetValidatedWakeupEvents .................................................. 71 
    5.2.12 
    EcuM_GetExpiredWakeupEvents .................................................... 72 
    5.2.13 
    EcuM_GetBootTarget ....................................................................... 72 
    5.2.14 
    EcuM_SelectBootTarget ................................................................... 73 
    5.2.15 
    EcuM_StartCheckWakeup ............................................................... 74 
    5.2.16 
    EcuM_EndCheckWakeup ................................................................ 75 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.17 
    EcuM_GetVersionInfo ...................................................................... 75 
    5.2.18 
    EcuM_RequestRUN ......................................................................... 76 
    5.2.19 
    EcuM_ReleaseRUN ......................................................................... 77 
    5.2.20 
    EcuM_RequestPOST_RUN ............................................................. 78 
    5.2.21 
    EcuM_ReleasePOST_RUN ............................................................. 79 
    5.3 
    Services Provided by EcuM flex ....................................................................... 80 
    5.3.1 

    EcuM_SelectShutdownCause .......................................................... 80 
    5.3.2 
    EcuM_GetShutdownCause .............................................................. 81 
    5.3.3 
    EcuM_GoHalt................................................................................... 81 
    5.3.4 
    EcuM_GoPoll ................................................................................... 82 
    5.3.5 
    EcuM_GoDown ................................................................................ 83 
    5.3.6 
    EcuM_GoToSelectedShutdownTarget .............................................. 84 
    5.3.7 
    EcuM_SetRelWakeupAlarm ............................................................. 85 
    5.3.8 
    EcuM_SetAbsWakeupAlarm ............................................................ 86 
    5.3.9 
    EcuM_AbortWakeupAlarm ............................................................... 87 
    5.3.10 
    EcuM_GetWakeupTime ................................................................... 88 
    5.3.11 
    EcuM_SetClock ............................................................................... 89 
    5.3.12 
    EcuM_GetCurrentTime .................................................................... 90 
    5.3.13 
    EcuM_SetState ................................................................................ 91 
    5.4 
    Services Provided by EcuM fixed ..................................................................... 92 
    5.4.1 

    EcuM_GetState ................................................................................ 92 
    5.4.2 
    EcuM_KillAllRUNRequests .............................................................. 93 
    5.4.3 
    EcuM_KillAllPostRUNRequests ....................................................... 94 
    5.5 
    Services Used by EcuM ................................................................................... 95 
    5.6 
    Callback Functions ........................................................................................... 96 
    5.6.1 

    EcuM_SetWakeupEvent .................................................................. 96 
    5.6.2 
    EcuM_ValidateWakeupEvent ........................................................... 97 
    5.6.3 
    EcuM_AlarmCheckWakeup.............................................................. 98 
    5.6.4 
    Callback Functions by EcuM fixed .................................................... 99 
    5.6.4.1 

    EcuM_CB_NfyNvMJobEnd ............................................ 99 
    5.7 
    Configurable Interfaces .................................................................................... 99 
    5.7.1 

    Notifications ..................................................................................... 99 
    5.7.2 
    Callout Functions ............................................................................. 99 
    5.7.2.1 
    EcuM_ErrorHook ......................................................... 100 
    5.7.2.2 
    EcuM_OnGoOffOne ..................................................... 100 
    5.7.2.3 
    EcuM_OnGoOffTwo ..................................................... 101 
    5.7.2.4 
    EcuM_AL_SwitchOff .................................................... 101 
    5.7.2.5 
    EcuM_AL_Reset .......................................................... 102 
    5.7.2.6 
    EcuM_AL_DriverInitZero .............................................. 102 
    5.7.2.7 
    EcuM_AL_DriverInitOne .............................................. 103 
    5.7.2.8 
    EcuM_AL_DriverRestart .............................................. 104 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.9 
    EcuM_AL_SetProgrammableInterrupts ........................ 105 
    5.7.2.10 
    EcuM_McuSetMode ..................................................... 105 
    5.7.2.11 
    EcuM_WaitForSlaveCores ........................................... 106 
    5.7.2.12 
    EcuM_StartOS ............................................................. 106 
    5.7.2.13 
    EcuM_ShutdownOS..................................................... 107 
    5.7.2.14 
    EcuM_GenerateRamHash ........................................... 108 
    5.7.2.15 
    EcuM_CheckRamHash ................................................ 108 
    5.7.2.16 
    EcuM_SleepActivity ..................................................... 109 
    5.7.2.17 
    EcuM_EnableWakeupSources ..................................... 110 
    5.7.2.18 
    EcuM_DisableWakeupSources .................................... 110 
    5.7.2.19 
    EcuM_StartWakeupSources ......................................... 111 
    5.7.2.20 
    EcuM_StopWakeupSources ......................................... 111 
    5.7.2.21 
    EcuM_CheckWakeup................................................... 112 
    5.7.2.22 
    EcuM_CheckValidation ................................................ 112 
    5.7.2.23 
    EcuM_DeterminePbConfiguration ................................ 113 
    5.7.2.24 
    EcuM_BswErrorHook ................................................... 114 
    5.7.3 
    Callout Functions by EcuM flex ...................................................... 115 
    5.7.3.1 

    EcuM_GptStartClock ................................................... 115 
    5.7.3.2 
    EcuM_GptSetSleep ..................................................... 116 
    5.7.3.3 
    EcuM_GptSetNormal ................................................... 117 
    5.7.3.4 
    EcuM_AL_DriverInitBswM_<ID> .................................. 118 
    5.7.4 
    Callout Functions by EcuM fixed .................................................... 119 
    5.7.4.1 

    EcuM_AL_DriverInitTwo .............................................. 119 
    5.7.4.2 
    EcuM_AL_DriverInitThree ............................................ 120 
    5.7.4.3 
    EcuM_OnEnterRun ...................................................... 121 
    5.7.4.4 
    EcuM_OnExitRun ........................................................ 121 
    5.7.4.5 
    EcuM_OnGoSleep ....................................................... 122 
    5.7.4.6 
    EcuM_OnPrepShutdown ............................................. 122 
    5.7.4.7 
    EcuM_OnExitPostRun ................................................. 123 
    5.7.4.8 
    EcuM_OnFailedNvmWriteAllJobReaction .................... 123 
    5.7.4.9 
    EcuM_OnWakeupReaction .......................................... 124 
    5.7.4.10 
    EcuM_OnRTEStartup .................................................. 124 
    5.8 
    Service Ports ................................................................................................. 125 
    5.8.1 

    Client Server Interface ................................................................... 125 
    5.8.1.1 

    Provide Ports on EcuM Side ........................................ 125 
    5.8.1.1.1 

    ShutdownTarget Port ............................... 125 
    5.8.1.1.2 
    BootTarget Port ........................................ 125 
    5.8.1.1.3 
    AlarmClock Port ....................................... 126 
    5.8.1.1.4 
    StateRequest Port.................................... 126 
    5.8.1.2 
    Require Ports on EcuM Side ........................................ 127 
    5.8.1.2.1 

    currentMode Port ..................................... 127 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    6 
    AUTOSAR Standard Compliance............................................................................. 128 
    6.1 

    Deviations ...................................................................................................... 128 
    6.1.1 

    Deviation in the Naming of API Parameters ................................... 128 
    6.1.1.1 

    ResetSleepMode ......................................................... 128 
    6.1.1.2 
    TargetState .................................................................. 128 
    6.1.1.3 
    ShutdownTarget ........................................................... 128 
    6.1.1.4 
    Target (ShutdownTarget) .............................................. 128 
    6.1.1.5 
    Target (BootTarget) ...................................................... 128 
    6.1.1.6 
    Sources ....................................................................... 128 
    6.1.2 
    Starting of the Validation Timer....................................................... 128 
    6.1.3 
    Multiplicity of Parameters ............................................................... 128 
    6.1.3.1 

    EcuMResetReasonRef ................................................ 128 
    6.1.3.2 
    EcuMSleepMode ......................................................... 129 
    6.1.3.3 
    EcuMConfigConsistencyHash ...................................... 129 
    6.1.3.4 
    Removed parameter ConfigPtr from DriverInit Lists ..... 129 
    6.2 
    Additions/ Extensions ..................................................................................... 129 
    6.2.1 

    Additional Configuration Parameters .............................................. 129 
    6.2.2 
    Buffering of Wake ups if the BswM is Not Initialized ....................... 129 
    6.2.3 
    Buffering of Wake ups if the ComM is Not Initialized ...................... 130 
    6.2.4 
    Additional API EcuM_ClearValidatedWakeupEvent ........................ 130 
    6.2.5 
    Support of Asynchronous Transceiver Handling ............................. 130 
    6.2.6 
    Deferred notification of the BswM about wake-up events ............... 130 
    6.2.7 
    Additional Callback EcuM_AlarmCheckWakeup ............................. 130 
    6.2.8 
    Additional API EcuM_GoToSelectedShutdownTarget ..................... 130 
    6.2.9 
    Additional Callout EcuM_WaitForSlaveCores ................................. 130 
    6.2.10 
    Support of EcuM fixed .................................................................... 130 
    6.2.10.1 

    Shutdown Target ECUM_STATE_RESET .................... 130 
    6.2.10.2 
    Synchronization of EcuM and RTE modes ................... 131 
    6.3 
    Limitations...................................................................................................... 131 
    6.3.1 

    Inter Module Checks ...................................................................... 131 
    6.3.2 
    Recording of Shutdown Causes ..................................................... 131 
    6.3.3 
    Not Supported Configuration Parameters and Containers .............. 131 
    6.3.4 
    Wake-up Events after Reset Reason Translation are not Validated 131 
    6.3.5 
    EcuM Fixed Limitations .................................................................. 131 
    7 
    Glossary and Abbreviations .................................................................................... 133 
    7.1 

    Glossary ........................................................................................................ 133 
    7.2 
    Abbreviations ................................................................................................. 133 
    8 
    Contact ...................................................................................................................... 134 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 

    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Illustrations 
    Figure 2-1 
    AUTOSAR architecture ............................................................................. 15 
    Figure 2-2 
    Interfaces to adjacent modules of the EcuM ............................................. 16 
    Figure 3-1 
    The state diagram of the EcuM flex .......................................................... 22 
    Figure 3-2 State Diagram of the EcuM with fixed state machine .......................................... 23 
    Figure 3-3 
    Example Wake-up Validation .................................................................... 31 
    Figure 3-4 
    Example Wake-up Validation for asynchronous Can Transceivers ............ 32 
    Figure 3-5 
    Startup Sequence on a Master Core ......................................................... 42 
    Figure 3-6 
    Startup Sequence on a Slave Core ........................................................... 43 
    Figure 4-1 
    Include structure ....................................................................................... 55 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 13 
    Table 3-1  
    Supported AUTOSAR EcuM common features ......................................... 17 
    Table 3-2  
    Supported AUTOSAR EcuM flex features ................................................. 18 
    Table 3-3  
    Supported AUTOSAR EcuM fixed features ............................................... 18 
    Table 3-4  
    Features provided beyond the AUTOSAR standard .................................. 18 
    Table 3-5  
    States of the EcuM ................................................................................... 19 
    Table 3-6  
    States of the EcuM ................................................................................... 21 
    Table 3-7  
    Initialization Order ..................................................................................... 25 
    Table 3-8  
    Service IDs ............................................................................................... 34 
    Table 3-9  
    Errors reported to DET ............................................................................. 34 
    Table 3-10  
    Errors reported to DEM ............................................................................. 35 
    Table 3-11  
    Description of EcuM internal Error Codes ................................................. 36 
    Table 3-12  
    Callouts from Startup to Run ..................................................................... 36 
    Table 3-13  
    Callouts from Run to Sleep (Halt) and back to Run ................................... 37 
    Table 3-14  
    Callouts from Run to Reset ....................................................................... 38 
    Table 3-15  
    Callouts from Run to Off ........................................................................... 38 
    Table 3-16  
    Gpt Channel Configuration ....................................................................... 40 
    Table 3-17  
    Sleep handling on Slave Cores ................................................................. 44 
    Table 3-18  
    Mapping of States to Modes ..................................................................... 46 
    Table 4-1  
    Static files ................................................................................................. 53 
    Table 4-2  
    Generated files ......................................................................................... 54 
    Table 4-3  
    Critical Sections ........................................................................................ 54 
    Table 5-1  
    Type definitions ......................................................................................... 61 
    Table 5-2  
    EcuM_MainFunction ................................................................................. 62 
    Table 5-3  
    EcuM_Init ................................................................................................. 63 
    Table 5-4  
    EcuM_StartupTwo .................................................................................... 64 
    Table 5-5  
    EcuM_Shutdown ...................................................................................... 65 
    Table 5-6  
    EcuM_SelectShutdownTarget ................................................................... 66 
    Table 5-7  
    EcuM_GetShutdownTarget ....................................................................... 67 
    Table 5-8  
    EcuM_GetLastShutdownTarget ................................................................ 68 
    Table 5-9  
    EcuM_GetPendingWakeupEvents ............................................................ 69 
    Table 5-10  
    EcuM_ClearWakeupEvent ........................................................................ 69 
    Table 5-11  
    EcuM_ClearValidatedWakeupEvent ......................................................... 70 
    Table 5-12  
    EcuM_GetValidatedWakeupEvents .......................................................... 71 
    Table 5-13  
    EcuM_GetExpiredWakeupEvents ............................................................. 72 
    Table 5-14  
    EcuM_GetBootTarget ............................................................................... 72 
    Table 5-15  
    EcuM_SelectBootTarget ........................................................................... 73 
    Table 5-16  
    EcuM_StartCheckWakeup ........................................................................ 74 
    Table 5-17  
    EcuM_EndCheckWakeup ......................................................................... 75 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    10 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Table 5-18  
    EcuM_GetVersionInfo ............................................................................... 75 
    Table 5-19  
    EcuM_RequestRUN ................................................................................. 76 
    Table 5-20  
    EcuM_ReleaseRUN .................................................................................. 77 
    Table 5-21  
    EcuM_RequestPOST_RUN ...................................................................... 78 
    Table 5-22  
    EcuM_ReleasePOST_RUN ...................................................................... 79 
    Table 5-23  
    EcuM_SelectShutdownCause .................................................................. 80 
    Table 5-24  
    EcuM_GetShutdownCause ....................................................................... 81 
    Table 5-25  
    EcuM_GoHalt ........................................................................................... 81 
    Table 5-26  
    EcuM_GoPoll ............................................................................................ 82 
    Table 5-27  
    EcuM_GoDown ........................................................................................ 83 
    Table 5-28  
    EcuM_GoToSelectedShutdownTarget....................................................... 84 
    Table 5-29  
    EcuM_SetRelWakeupAlarm...................................................................... 85 
    Table 5-30  
    EcuM_SetAbsWakeupAlarm ..................................................................... 86 
    Table 5-31  
    EcuM_AbortWakeupAlarm ........................................................................ 87 
    Table 5-32  
    EcuM_GetWakeupTime ............................................................................ 88 
    Table 5-33  
    EcuM_SetClock ........................................................................................ 89 
    Table 5-34  
    EcuM_GetCurrentTime ............................................................................. 90 
    Table 5-35  
    EcuM_SetState ......................................................................................... 91 
    Table 5-36  
    EcuM_GetState ........................................................................................ 92 
    Table 5-37  
    EcuM_ KillAllRUNRequests ...................................................................... 93 
    Table 5-38  
    EcuM_ KillAllPostRUNRequests ............................................................... 94 
    Table 5-39  
    Services used by the EcuM ...................................................................... 96 
    Table 5-40  
    EcuM_SetWakeupEvent ........................................................................... 96 
    Table 5-41  
    EcuM_ValidateWakeupEvent .................................................................... 97 
    Table 5-42  
    EcuM_AlarmCheckWakeup ...................................................................... 98 
    Table 5-43  
    EcuM_AlarmCheckWakeup ...................................................................... 99 
    Table 5-44  
    EcuM_ErrorHook .................................................................................... 100 
    Table 5-45  
    EcuM_OnGoOffOne ............................................................................... 100 
    Table 5-46  
    EcuM_OnGoOffTwo ................................................................................ 101 
    Table 5-47  
    EcuM_AL_SwitchOff ............................................................................... 101 
    Table 5-48  
    EcuM_AL_Reset ..................................................................................... 102 
    Table 5-49  
    EcuM_AL_DriverInitZero ........................................................................ 102 
    Table 5-50  
    EcuM_AL_DriverInitOne ......................................................................... 103 
    Table 5-51  
    EcuM_AL_DriverRestart ......................................................................... 104 
    Table 5-52  
    EcuM_AL_SetProgrammableInterrupts................................................... 105 
    Table 5-53  
    EcuM_McuSetMode ............................................................................... 105 
    Table 5-54  
    EcuM_WaitForSlaveCores ...................................................................... 106 
    Table 5-55  
    EcuM_StartOS ........................................................................................ 106 
    Table 5-56  
    EcuM_ShutdownOS ............................................................................... 107 
    Table 5-57  
    EcuM_GenerateRamHash ...................................................................... 108 
    Table 5-58  
    EcuM_CheckRamHash .......................................................................... 108 
    Table 5-59  
    EcuM_SleepActivity ................................................................................ 109 
    Table 5-60  
    EcuM_EnableWakeupSources ............................................................... 110 
    Table 5-61  
    EcuM_DisableWakeupSources ............................................................... 110 
    Table 5-62  
    EcuM_StartWakeupSources .................................................................... 111 
    Table 5-63  
    EcuM_StopWakeupSources .................................................................... 111 
    Table 5-64  
    EcuM_CheckWakeup ............................................................................. 112 
    Table 5-65  
    EcuM_CheckValidation ........................................................................... 112 
    Table 5-66  
    EcuM_DeterminePbConfiguration ........................................................... 113 
    Table 5-67  
    EcuM_BswErrorHook ............................................................................. 114 
    Table 5-68  
    EcuM_GptStartClock .............................................................................. 115 
    Table 5-69  
    EcuM_GptSetSleep ................................................................................ 116 
    Table 5-70  
    EcuM_GptSetNormal .............................................................................. 117 
    Table 5-71  
    EcuM_AL_DriverInitBswM ...................................................................... 118 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    11 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Table 5-72  
    EcuM_AL_DriverInitTwo ......................................................................... 119 
    Table 5-73  
    EcuM_AL_DriverInitThree....................................................................... 120 
    Table 5-74  
    EcuM_OnEnterRun................................................................................. 121 
    Table 5-75  
    EcuM_OnExitRun ................................................................................... 121 
    Table 5-76  
    EcuM_OnGoSleep .................................................................................. 122 
    Table 5-77  
    EcuM_OnPrepShutdown ........................................................................ 122 
    Table 5-78  
    EcuM_OnExitPostRun ............................................................................ 123 
    Table 5-79  
    EcuM_OnFailedNvmWriteAllJobReaction ............................................... 123 
    Table 5-80  
    EcuM_OnFailedNvmWriteAllJobReaction ............................................... 124 
    Table 5-81  
    EcuM_OnRTEStartup ............................................................................. 124 
    Table 5-82  
    Shutdown Target Port ............................................................................. 125 
    Table 5-83  
    BootTarget Port ....................................................................................... 125 
    Table 5-84  
    AlarmClock Port ...................................................................................... 126 
    Table 5-85  
    StateRequest Port .................................................................................. 126 
    Table 5-86  
    currentMode Port .................................................................................... 127 
    Table 7-1  
    Glossary ................................................................................................. 133 
    Table 7-2  
    Abbreviations .......................................................................................... 133 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    12 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Adaption to AUTOSAR Release 4 
    1.01.00 
    Added support of configuration variant Post-Build Loadable 
    Added support of asynchronous transceiver handling 
    2.00.00 
    Added support for handling of MuliCore ECUs 
    Added support of Alarm Clock to provide the absolute time and handling 
    of time triggered wake-ups. 
    3.00.00 
    Added support for EcuM with fixed state machine 
    4.00.00 
    Added support for Post-Build Selectable 
    5.00.00 
    Added support for Mode Handling in EcuM Flex 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    13 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module EcuM as specified in [1] and [7].  
     
    Supported AUTOSAR Release*: 
    4.0.3 
    Supported Configuration Variants: 
    Pre-Compile, Post-Build Loadable 
    Vendor ID: 
    ECUM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    ECUM_MODULE_ID  
    10 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    This document describes the functionality and API of the ECU State Manager (EcuM) as a 
    hardware independent module. 
    The main tasks of the EcuM are:  
    >  Initialization of BSW (Basis Software) modules that are needed to start the operating 
    system 
    >  Preparation of the microcontroller for a sleep phase and the following wake up 
    >  Performing an ordered shut down or reset of the ECU 
    >  Validation of occurred wake ups via the wake-up validation protocol 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    14 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    2.1 
    Architecture Overview 
    The following figure shows where the EcuM is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR architecture 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    15 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    The next figure shows the interfaces to adjacent modules of the  EcuM. These interfaces 
    are described in chapter 5.2 Services Provided by EcuM and 5.5 Services Used by EcuM.  
     cmp Architecture_Ov erv iew
    SW-C / RTE
    SchM
    AUTOSAR OS
    Dem
    EcuM
    other BSW Modules
    Det
    Rte
    Bsw M
    ComM
    Mcu
    Gpt
    Nv M
     
    Figure 2-2  Interfaces to adjacent modules of the EcuM 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    16 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    EcuM. 
    The AUTOSAR standard functionality is specified in [1] and [7], the corresponding features 
    are listed in the tables: 
    >  Table 3-1   Supported AUTOSAR EcuM common features  
    >  Table 3-2   Supported AUTOSAR EcuM flex features 
    >  Table 3-3   Supported AUTOSAR EcuM fixed features 
    For further information of not supported features see also chapter 6. 
    Vector Informatik provides further EcuM functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table: 
    >  Table 3-4   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] and [7] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Configuration of different wake-up sources. 
    Configuration of EcuM users. 
    Configurable startup sequence of the BSW stack that is needed before starting the OS. 
    Possibility to add additional initialization code into the initialization lists. 
    Notification of the BswM if a wake-up event occurs on a wake-up source. 
    Notification of the ComM if a wake-up event occurs on communication channels. 
    Assignment of communication channels to wake-up sources. 
    Configuration of different sleep modes. 
    Selection of different shutdown targets. 
    Selection of different shutdown causes. 
    Generation of the SW-C description file needed for the generation of the RTE. 
    Service Port: EcuM_ShutdownTarget 
    Service Port: EcuM_BootTarget 
    Consistency hash checking according to AUTOSAR specification 
    Post-build configuration of the EcuM 
    Support of MultiCore ECUs 
    Run / Post_Run Request Protocol 
    Mode Port: EcuM_CurrentMode 
    Table 3-1   Supported AUTOSAR EcuM common features 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    17 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    The following EcuM flex features specified in [1] are supported: 
    Supported AUTOSAR EcuM flex Features 
    Configuration of different reset modes. 
    Service Port: EcuM_AlarmClock 
    Defensive Behavior to check the valid call of EcuM_GoDown 
    Alarm clock to provide an absolute time and handling of time triggered wake-ups. 
    Table 3-2   Supported AUTOSAR EcuM flex features 
     
    The following EcuM fixed features specified in [7] are supported: 
    Supported AUTOSAR EcuM fixed Features 
    Full initialization of the Stack via configurable DriverInitLists 
    Fixed state machine to control the ECU states 
    Allow communication via ComM_CommunicationAllowed when entering the ECUM_STATE_RUN 
    Handle NvM_WriteAll() and NvM_CancelWriteAll() 
    Start and stop of the RTE 
    Table 3-3   Supported AUTOSAR EcuM fixed features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Adding of additional initialization code by the configuration tool 
    Wake-up Events are buffered until the BswM and the ComM are initialized 
    Support of asynchronous transceiver handling (Introduced API EcuM_StartCheckWakeup + 
    EcuM_EndCheckWakeup)  
    Providing an additional API EcuM_ClearValidatedWakeupEvent() to clear only validated, but not 
    pending wake-up events 
    Providing an additional API EcuM_GoToSelectedShutdownTarget() to decide EcuM internal if 
    EcuM_GoPoll(), EcuM_GoHalt() or EcuM_GoDown() has to be called, depending on the selected 
    shutdown target [EcuM flex only] 
    Configuration of the Core ID on which the BSW is initialized 
    Notification of the ComM if a wake-up event occurs on a PNC 
    Table 3-4   Features provided beyond the AUTOSAR standard 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    18 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.2 
    States of EcuM flex 
    These states indicate the current internal EcuM Operation State.  
    Module State 
    Activities 
    Point in Time 
    ECUM_STATE_STARTUP 
    Initializes the drivers out of  Entered during EcuM_Init(). 
    the EcuM_DriverInitZero 
    list. 
    ECUM_STATE_STARTUP_ONE 
    Initializes the drivers out of  Entered during EcuM_Init(). 
    the EcuM_DriverInitOne 
    list. 
    Reset reason translation, 
    setting of the default 
    shutdown target and at the 
    end start the operating 
    system. 
    ECUM_STATE_STARTUP_TWO 
    Initializes the BswM and 
    Entered during 
    the SchM. 
    EcuM_StartupTwo(). 
    Former buffered Wake-up 
    Events are notified to the 
    BswM. 
    ECUM_STATE_APP_RUN 
    After initializing the 
    Entered during 
    necessary BSW, the EcuM  EcuM_StartupTwo(), 
    is in the Run state. 
    EcuM_GoSleep(), EcuM_GoPoll() 
    or during the MainFunction. 
    ECUM_STATE_GO_SLEEP 
    Prepares the ECU for the 
    Entered during EcuM_GoSleep(). 
    upcoming sleep phase. 
    ECUM_STATE_SLEEP 
    Handles the sleep. 
    Entered during EcuM_GoHalt() or 
    EcuM_GoPoll(). 
    ECUM_STATE_GO_OFF_ONE 
    Prepares the ECU for the 
    Entered during EcuM_GoDown(). 
    upcoming Off phase.  
    The SchM and the BswM 
    are deinitialized in this 
    phase and the 
    EcuM_OnGoOffOne() 
    Callout is invoked. 
    Finally the operating 
    system will be shut down. 
    ECUM_STATE_GO_OFF_TWO 
    The configured shutdown 
    Entered during 
    target is called by the 
    EcuM_Shutdown(). 
    EcuM. 
    ECUM_STATE_WAKEUP_ONE 
    The hardware is 
     
    reinitialized after a former 
    sleep mode. 
    ECUM_STATE_WAKEUP_VALIDATION 
    Waits for the validation of 
    After a wake-up event has 
    an occurred wake up. 
    occurred that needs validation. 
    Table 3-5   States of the EcuM 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    19 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.3 
    States of EcuM fixed 
    These states indicate the current internal EcuM Operation State which can be retrieved via 
    the API 5.4.1 EcuM_GetState.  
    All the states, except ECUM_STATE_STARTUP and ECUM_STATE_ERROR are notified 
    to the BswM. In some state transitions an RTE mode switch will be performed. 
    Module State 
    Activities 
    RTE Mode 
    ECUM_STATE_STARTUP 
    Initializes the drivers via the 
    ECUM_RTE_STARTUP 
    DriverInitLists. 
    (initial mode) 
    Reset reason translation, setting 
    of the default shutdown target 
    and at the end start the 
    operating system.  
    Initializes the BswM, the SchM 
    and the RTE. 
    Former buffered Wake-up 
    Events are notified to the BswM. 
    ECUM_STATE_APP_RUN 
    EcuM stays in this state while 
    ECUM_RTE_RUN 
    there are active Run Requests, 
    the EcuM Self Run Request 
    timeout has not expired or 
    ComM Channels are in 
    communication. 
    ECUM_STATE_APP_POST_RUN 
    Post Run Requests keep the 
    ECUM_RTE_POST_RUN 
    EcuM in this state. 
    ECUM_STATE_PREP_SHUTDOWN 
    Shutdown the DEM and transit 
    ECUM_RTE_POST_RUN 
    directly to 
    ECUM_STATE_GO_SLEEP or 
    ECUM_STATE_GO_OFF_ONE 
    ECUM_STATE_GO_SLEEP 
    EcuM triggers the 
    ECUM_RTE_SLEEP 
    NvM_WriteAll() job.  
    EcuM remains in this state until 
    the NvM calls 
    EcuM_CB_NfyNvMJobEnd() or 
    the occurrence of a wake up 
    event cancels the sleep 
    process. In case of a wake up 
    event, NvM_CancelWriteAll() is 
    called. 
    ECUM_STATE_SLEEP 
    Handles the sleep and a wake 
    ECUM_RTE_SLEEP 
    up from sleep. 
    ECUM_STATE_GO_OFF_ONE 
    Stops the RTE and triggers 
    ECUM_RTE_SHUTDOWN 
    NvM_WriteAll().  
    EcuM remains in this state until 
    the NvM call 
    EcuM_CB_NfyNvMJobEnd(). 
    ECUM_STATE_WAKEUP_VALIDATION 
    Waits for the validation of an 
    ECUM_RTE_SLEEP 
    occurred wake up. 
    ECUM_STATE_WAKEUP_REACTION 
    Wait for completion of a 
    ECUM_RTE_SLEEP 
    potential NvM_CancelWriteAll(). 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    20 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Module State 
    Activities 
    RTE Mode 
    ECUM_STATE_WAKEUP_WAKESLEEP  - 
    ECUM_RTE_WAKE_SLEEP 
    ECUM_STATE_ERROR 
    The EcuM_ErrorHook is called 

    in this state. 
    This state is only reached if the 
    ShutdownOS() or 
    EcuM_AL_SwitchOff returns to 
    the EcuM. 
    Table 3-6   States of the EcuM 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    21 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.4 
    The State Diagram of the EcuM flex 
    The  following  figure  shows  the  EcuM  state  diagram  with  all  state  transitions,  the 
    corresponding conditions and actions: 
    stm EcuPhases
    EcuM_Init
    called
    STARTUP
    EntryPoint
    ECUM_STATE_STARTUP_ONE (EcuM_Init)
    notes
    Perform the actions in the StartPreOS Sequence:
    - Set Interrupts
    - DriverInitZero (init Block0)
    - Determine PbConfiguration (return a pointer to the config struct 
    that contain post-build config data from EcuM and all other BSWs)
    - Check consistency of the configuration data
    - DriverInitOne (init Block1)
    - Get Mcu reset reason
    - Select default shutdown target
    - Start OS

    SLEEP
    EcuM_StartupTwo() is called by
    [Shutdown Target == ECUM_STATE_RESET]
    OS or by a task
    /Action: EcuM_AL_Reset
    EntryPoint
    ECUM_STATE_STARTUP_TWO (EcuM_StartupTw o)
    ECUM_STATE_GO_SLEEP 
    (EcuM_EnterSleep)
    notes
    A shutdown target must 
    Perform the actions in the StartPostOS Sequence:
    be set by the BswM or 
    another SW-C before 
    notes
    - Init BSW Scheduler 
    WakeUP Event
    GoHalt or GoPoll is 
    EcuM prepares the Hardware for going to 
    - Init BSW Mode Manager
    called.
    sleep and setting the WakeUp sources.
    - Notify the BswM about Wakeups during Startup
    (from Features)
    [call Mcu_Setmode(GoHalt)]
    ECUM_STATE_SLEEP
    Final
    BSW Scheduler started
    Poll
    Halt
    & BswM_Init called
    UP
    notes
    notes
    EcuM checks for pending wakeups 
    No more code is executed.
    cyclically by calling 
    [No WakeUp
    [No WakeUp
    EcuM_CheckWakeup(). 
    Before halting the MCU, EcuM must 
    occured]
    occured]
    Auxiliary EcuM_SleepActivity() must 
    invoke GenerateRamHash and call 
    be called for e.g. updating the alarm
    CheckRamHash before leaving halt.
    ECUM_STATE_RUN (EcuM_EnterSleep, 
    clock.
    On Multicore: Only check the master 
    EcuM_MainFunction, 
    core.
    EcuM_StartupTw o)
    [GoHalt() or GoPoll() is invoked by
    BswM]
    notes
    Tasks in the UP Phase:
    [ValidatedWakeups = True]
    - WakeUp Validation
    /
    [call EcuM_WakeupRestart]
    ECUM_STATE_WAKEUP_ONE 
    (EcuM_WakeupRestart)
    (from Features)
    EcuM_GoOff
    [ValidatedWakeups = False]
    ECUM_STATE_WAKEUP_VALIDATION 
    (EcuM_EnterSleep)
    [GoHalt() or GoPoll()]
    If in ECUM_STATE_WAKEUP_VALIDATION 
    SHUTDOWN
    no wakeup will be validated, the BswM can 
    set the EcuM back to sleep by calling GoHalt
    () or GoPoll().
    EntryPoint
    Final
    ECUM_STATE_GO_OFF_ONE (EcuM_GoDow n)
    notes
    Activities in the OffPreOS Phase:
    (from Features)
    If a wakeup event 
    - De-Init BSW Mode Manager
    occurs the Shutdown 
    - De-Init BSW Scheduler
    sequence shall be 
    - Check for pending wakeup events
    completed and restart 
    - Set RESET as shutdown target, if wakeup events are pending
    immediately thereafter.
    - Shutdown OS
    EcuM_Shutdown
    ECUM_STATE_GO_OFF_TWO
    Final
    [Shutdown Target == ECUM_STATE_OFF]
    /EcuM_AL_SwitchOff
    Off
     
    Figure 3-1  The state diagram of the EcuM flex 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    22 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.5 
    The State Diagram of the EcuM with fixed state machine 
    The  following  figure  shows  the  EcuM  state  diagram  with  all  state  transitions  and  the 
    corresponding RTE modes: 
     stm EcuMFixedStateMachine_Ov erv iew
    from Startup
    Code
    STARTUP
    ECUM_STATE_ INIT
    notes
    Init Sequence I:
    EcuM_AL_SetProgrammableInterrupts() [type:callout]
    EcuM_AL_DriverInitZero [type:callout]
    EcuM_DeterminePbConfiguration [type:callout]
    EcuM_AL_DriverInitOne [type:callout] e.g. Dem_Init
    Retrieve reset reason from MCU module and map it to an wakeup source
    Start OS

    Interrupts are 
    available now!
    ECUM_STATE_STARTUP
    notes
    Init Sequence II:
    Init BSW Scheduler (SchM_Init)
    Init BswM (BswM_Init)
    EcuM_AL_DriverInitTwo  [type:callout]
    EcuM_OnRTEStartup  [type:callout]
    Start Rte
    EcuM_AL_DriverInitThree [type:callout]

    Init finished and Rte has sent its feedback
    [NO - "normal" startup]
    [YES - wakeup by wakeup source with integrated power control]
    Wakeup validation necessary
    /EcuM_OnEnterRun [type: callout]
    /RTE notification about SLEEP
    to switch into RUN mode?
    ComM_CommunicationAllowed(TRUE)
    SLEEP Mode
    RUN Mode
    enter RUN mode
    enter SLEEP mode
    [wakeup event
    pending]
    [valid wakeup event && Rte has sent its
    feedback && NvM_WriteAll is canceled]
    /Dem_Init
    ECUM_STATE_ APP_RUN
    ECUM_STATE_ WAKEUP_REACTION
    EcuM_OnEnterRun [type: callout]
    ECUM_STATE_ 
    BswM_EcuM_CurrentState
    [wakeup event not pending]
    WAKEUP_VALIDATION
    (ECUM_STATE_APP_RUN)
    /BswM_EcuM_CurrentState
    notes
    ComM_CommunicationAllowed(TRUE)
    (ECUM_STATE_WAKEUP_REACTION)
    Decrease the EcuM SelfRequest Timeout.
    EcuM_OnWakeupReaction [type: callout]
    EcuM remains in RUN state for minimum duration of SelfRequestTimeout.
    Consider wakeup validation for communication channels.
    [All RUN requests released && SelfRequestTimeout reached &&
    [wakeup event occured]
    Rte has sent its feedback && ComM channels are not in state
    /BswM_EcuM_CurrentState(ECUM_STATE_WAKEUP_VALIDATION)
    COMM_NO_COM_PENDING_REQUEST]
    EcuM_OnWakeupReaction()
    /Clear all Wakeup Events
    BswM_EcuM_CurrentState/(ECUM_STATE_APP_POST_RUN)
    EcuM_OnExitRun [type: callout]
    leave RUN mode
    ComM_CommunicationAllowed(FALSE)
    POST_RUN Mode
    ECUM_STATE_SLEEP
    enter POST_RUN mode
    [no pending or valid wakeup
    [wakeup reaction is
    occured]
    SLEEP]
    ECUM_STATE_APP_POST_RUN
    WAKE_SLEEP Mode
    enter WAKE_SLEEP mode
    [wakeup event occured && Rte
    ECUM_STATE_WAKE_SLEEP
    has sent its feedback]
    [NvM finished its write job && no valid wakeup
    [(RUN state requested || EcuM has valid
    /NvM_CancelWriteAll
    existent && Rte has sent its feedback]
    wakeup || ComM channel is pending) && Rte
    [All POST_RUN requests released &&
    EcuM_AL_DriverRestart [type:
    /BswM_EcuM_CurrentState(ECUM_STATE_SLEEP)
    has sent its feedback]
    Rte has sent its feedback]
    callout]
    /EcuM_OnEnterRun [type:callout]
    /EcuM_OnExitPostRun [type: callout]
    EcuM_EnableCommunication(TRUE) [type:
    callout]
    [Rte has sent its feedback ]
    ECUM_STATE_ 
    switch back into
    [wait for NvM AND
    PREP_SHUTDOWN
    RUN mode
    asynchron wakeup
    events]
    /Rte notification about SLEEP
    EcuM_OnGoSleep [Type: callout]
    ECUM_STATE_ GO_SLEEP
    Dem_Shutdown
    NvM_WriteAll (when coming from PREP_SHUTDOWN)
    leave POST_RUN mode
    shutdown
    target?
    [shutdown target is SLEEP]
    [shutdown target is not SLEEP]
    enter SLEEP
    SHUTDOWN Mode
    mode
    enter SHUTDOWN mode
    /Rte notification about SHUTDOWN
    EcuM_OnGoOffOne [Type: callout]
    Dem_Shutdown
    NvM_WriteAll
    ECUM_STATE_ GO_OFF_ONE
    notes
    BswM notification about ECUM_STATE_ GO_OFF
    Rte_Stop
    SchM_DeInit
    BswM_DeInit
    ShutdownOS

    [Execution of ShutdownOS() successful]
    /EcuM_OnGoOffTwo [Type: callout]
    Rte_Stop()
    [NvM_WriteAll finished &&
    SchM_DeInit()
    Rte has sent its feedback]
    BswM_DeInit()
    ShutdownOS()
    ECUM_STATE_ 
    GO_OFF_TWO
    leave
    SHUTDOWN
    Mode
     
     
    Figure 3-2 State Diagram of the EcuM with fixed state machine 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    23 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    3.6 
    Initialization 
    The initialization of the EcuM is split into two parts: one part is the initialization before the 
    OS is up and running and the second part must be executed when the OS is started.  
    3.6.1 
    EcuM_Init 
    The first part will be performed by the function EcuM_Init() (refer to chapter 5.2.2). This 
    function executes the DriverInitLists “EcuMDriverInitListZero” and “EcuMDriverInitListOne” 
    where the basic driver initialization should be performed. EcuM_Init() starts the AUTOSAR 
    OS by calling the function StartOS() (refer to chapter 5.2.3).  
     
    3.6.2 
    EcuM_StartupTwo 
    The second part of the initialization sequence will be executed by the EcuM API 
    EcuM_StartupTwo(). The integrator must ensure that this function is called once right after 
    the start of the OS.  
     
    3.6.2.1 
    EcuM_StartupTwo in case of EcuM flex 
    When EcuM_StartupTwo() is left, the EcuM flex is in Run state and passes the control of 
    the ECU to the BswM. 
     
     
    Caution 
    At the end of the EcuM_StartupTwo the EcuM is fully initialized. That does not mean 
      that the whole stack is initialized, it means only that the EcuM has passed the control 
    over to the BswM. Further initialization is done by the BswM. 
     
     
     
    3.6.2.2 
    EcuM_StartupTwo in case of EcuM fixed 
    In  case  of  EcuM  fixed,  in  EcuM_StartupTwo()  the  DriverInitLists  “EcuMDriverInitListTwo” 
    and “EcuMDriverInitListThree” can be used to initialize the whole stack. 
     
     
    Caution 
    At the end of the EcuM_StartupTwo the EcuM fixed transits to 
      ECUM_STATE_APP_RUN in case of a validated wake up, e.g. set by the MCU Reset 
    Reason (refer to chapter 3.9.5)
    If this wake up was cleared (in EcuMDriverInitListTwo), the EcuM transits to 
    ECUM_STATE_WAKEUP_VALIDATION and performs a wake up validation if any wake 
    up source is pending. 
     
     
     
    3.6.3 
    Initialization Order 
    Depending on which modules are needed for starting the operating system the initialization 
    lists can look different.  
    In the following an example initialization order is given. Init Block 0 corresponds to the 
    EcuM_AL_DriverInitZero() (refer to chapter 5.7.2.6) and Init Block 1 corresponds to 
    EcuM_AL_DriverInitOne() (refer to chapter 5.7.2.7)
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    24 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    Initialization Group 
    Init Block0 
    Det_Init() 
    Dem_PreInit(ConfigPointer) 
    Init Block1 
    Mcu_Init(ConfigPointer) 
    Gpt_Init(ConfigPointer) 
    Wdg_Init() 
    WdgM_Init() 
    Adc_Init(ConfigPointer) 
    Icu_Init(ConfigPointer) 
    Pwm_Init(ConfigPointer) 
    Table 3-7   Initialization Order 
    3.6.4 
    Additional Code in the Initialization Callouts 
    If the user needs more than the initialization routines offered by the AUTOSAR modules, 
    the configuration tool offers the facility to add own Code to the DriverInitLists. To use this 
    feature the user has to choose “Code” instead of a MSN, then the code can be added to a 
    special field. 
    The user code is added to the Init Block 0 or Init Block 1 as configured by the user. 
     
     
    Example 
    In this example the routine Mcu_InitClock() is added to the DriverInitListOne: 
     
    >  Open the Initialization dialogue 
    >  Go to the configuration of DriverInitListOne in the Pre-OS Init Sequence 
    >  Add an InitItem to the list and choose a name like “McuInitClock” 
    >  Choose “Code” in the field Type 

    In the field “Code” you can insert: “Mcu_InitClock();” 
    >  Reorder the position of the InitItem 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    25 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.6.5 
    Inclusion of Additional Header Files 
    If the user needs additional headers for using in the EcuM_Callout_Stubs.c file, the EcuM 
    offers the possibility of adding them by the configuration tool. 
     
     
     
    Note 
    All header files of the modules that are initialized in the DriverInitLists must be 
      included  into  the  additional  header  files  because  they  are  not  included 
    automatically. 
     
     
    3.6.6 
    Configuration Set Selection 
    The  AUTOSAR  compatible  mechanism  to  select  the  configuration  set  which  should  be 
    used for module initialization considers the following aspects: 
    >  Most  of  the  AUTOSAR  modules  provide  a  configuration  reference  to  the  provided 
    configuration sets  
    >  Some modules are initialized without a configuration pointer (Init-function signature 
    <MSN>_Init(void)) 
    >  Some  modules  have  an  Init-function  signature  with  configuration  pointer  but  make 
    no use of it, therefore, they need to be initialized with a NULL_PTR. 
     
     
    The  user must  decide  which  routines  use  a  configuration pointer.  For  these  routines  the 
    configuration reference must be configured. 
    >  Module uses a configuration pointer for its initialization: 
    -  Select in the DriverInitList a MSN via the field Type (e.g. Dem) 
    -  Select the corresponding Service (e.g. Dem_PreInit) 
    -  Configure  the  corresponding  Configuration  Pointer  for  that  MSN  (e.g. 
    DemConfigSet) 
    -  Result: The EcuM generates “Dem_PreInit(&DemConfigSet)” 
    >  Module has a void Init-function signature 
    -  Select in the DriverInitList a MSN via the field Type (e.g. Det) 
    -  Select the corresponding Service (e.g. Det_Init) 
    -  Do not configure the corresponding Configuration Pointer for this MSN 
    -  Result: The EcuM generates: “Det_Init()” 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    26 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
     
     
    Caution 
    If a module initialization routine requires a configuration set as parameter, the 
      corresponding reference to the module must be configured. 
    This is also necessary if the initialization routine does not use the parameter. The 
    reference must be configured, otherwise the parameter list will be generated empty. 
     
     
    3.7 
    Initialization of a MultiCore ECU 
    The  initialization  of  a  MultiCore  Ecu  is  described  in  chapter  3.15.1  Initialization  of  a 
    MultiCore ECU.
     
    3.8 
    Shutdown Targets 
    The  EcuM  provides  the  possibility  to  select  a  shutdown  target  that  is  used  for  the  next 
    shutdown, 
    initiated 
    by 
    calling 
    EcuM_GoDown() 
    (refer 
    to 
    chapter 
    5.3.5),  
    EcuM_GoPoll()(refer to chapter 5.3.4) or EcuM_GoHalt()(refer to chapter 5.3.3).  
    The following three different targets can be selected by a SWC or a BSW module: 
    >  ECUM_STATE_SLEEP 
    >  ECUM_STATE_RESET 
    >  ECUM_STATE_OFF 
     
     
    Note 
    The two targets ECUM_STATE_SLEEP and ECUM_STATE_RESET have an 
      additional mode parameter, which is used to identify the configuration for the 
    Sleep mode or to identify the reason for an upcoming reset of the ECU. 
     
     
     
    3.8.1 
    Using the API EcuM_SelectShutdownTarget() 
    The API EcuM_SelectShutdownTarget()(refer to chapter 5.2.5) can only be used when the 
    EcuM is in the state ECUM_STATE_RUN. In the startup phase or during the sleep phase it 
    is not allowed to change the shutdown target. 
    3.8.2 
    Default Shutdown Target 
    A Default shutdown target must be set during the configuration. This is the first target that 
    is selected as shutdown target after a startup. During runtime the shutdown target can be 
    changed by another BSW or SWC via the API EcuM_SelectShutdownTarget(). 
    3.8.3 
    Reset Modes 
    The reset modes can be used to identify the reason for an upcoming ECU reset. A set of 
    reset modes is defined by the AUTOSAR standard. Additional modes can be added by the 
    configuration. 
    The reset mode is passed over to the Callout EcuM_AL_Reset(EcuM_ResetType) and the 
    user can implement different ways to reset the ECU, depending on the reason for this 
    reset. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    27 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
     
    The Vector extension ECUM_RESET_WAKEUP is used as the reset mode in the case of a 
    late wake-up event in the shutdown phase. If a wake-up occurs during the shutdown 
    procedure, the shutdown target is changed by the EcuM to ECUM_STATE_RESET and 
    the described mode is used. 
     
     
     
    Note 
    The following reset mode is defined by Vector as an extension to the standard 
      AUTOSAR modes: 
      ECUM_RESET_WAKEUP  
     
     
     
     
    Caution 
    Reset Modes are only available if EcuM flex is used. 
     
     
     
     
    3.8.4 
    Sleep Modes 
    A  sleep  mode  holds  the  information  about  the  configured  sleep  modes  and  the 
    corresponding relevant settings. The following items can be set for a sleep mode: 
    >  Reference to a configured MCU mode that is executed for that sleep mode. 
    >  Active Wake-up Sources during this sleep mode. 
    3.9 
    Wake-up Sources 
    The EcuM flex offers the possibility to configure wake-up sources for all modules that have 
    the functionality to wake up the ECU. The EcuM handles the Wake-up Validation Protocol 
    for these sources as described in 3.10.1 Wake-up Validation Protocol. 
    The Wake-up  Sources  have  several  configurable  attributes  as  described  in  the following 
    section. 
    3.9.1 
    Validation Timeout 
    For every source, except for the standard sources 0 – 4, a validation timeout timer can be 
    configured.  This  timer  specifies  the  time  (in  seconds)  until  the  wake-up  source  must  be 
    validated by calling EcuM_ValidateWakeupEvent().  
    If the wake-up event is not validated during that time the EcuM sets this event to “expired” 
    and reports it to the BswM. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    28 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
     
     
    Note 
    The following standard wake-up sources are pre-configured and do not need the wake-
      up validation protocol: 
    >  ECUM_WKSOURCE_POWER 
    >  ECUM_WKSOURCE_RESET 
    >  ECUM_WKSOURCE_INTERNAL_RESET 
    >  ECUM_WKSOURCE_INTERNAL_WDG 
    >  ECUM_WKSOURCE_EXTERNAL_WDG 
     
     
     
    3.9.2 
    Check-Wakeup Validation Timeout 
    For  every  source,  except  for  the  standard  sources  0  –  4,  a  check  wake-up  validation 
    timeout timer can be configured. This timer specifies the time (in seconds) until the wake-
    up source must be set by calling EcuM_SetWakeupEvent(). 
    This timer can be used for e.g. asynchronous transceiver drivers, which cannot check the 
    wake-up source in the context of EcuM_CheckWakeup.  
     
    3.9.3 
    ComM Channel Reference 
    If the configured Wake-up Source is a ComM Channel, the reference to the corresponding 
    channel can be configured by the parameter EcuMComMChannelRef. 
    If this reference is configured and a validated wake-up event occurred, the EcuM calls the 
    function ComM_EcuM_WakeupIndication() and reports it to the ComM. 
     
     
    Note 
    Only Wake-up Sources which represent a ComM Channel can lead to a wake up in the 
      state ECUM_STATE_RUN. Other Wake-up Sources are ignored during this state. 
     
     
    3.9.4 
    Polling of Wake-up Sources 
    If a Wake-up Source needs to be polled to detect wake-up events this parameter must be 
    set. In that case, the sleep can be entered by calling EcuM_GoPoll() and the EcuM polls 
    all Wake-up Sources that are active during that Sleep mode and the polling parameter is 
    set. 
    3.9.5 
    MCU Reset Reason 
    The EcuM calls the routine Mcu_GetResetReason() to acquire the reason for the recent 
    reset. The EcuM iterates over all configured Wake-up Sources and checks if the 
    configured Reset Reason of one Wake-up Source matches to the return value of the MCU. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    29 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    If a reset reason is found, the EcuM maps this MCU reset reason to an EcuM Wake-up 
    Source and reports the event to the BswM. The regular wake-up validation is done by the 
    EcuM in case it is required by the source. 
     
     
    Note 
    If the reset reason translation is not successful and no reset reason can be determined, 
      the EcuM reports to the BswM the default reset reason ECUM_WKSOURCE_RESET.  
     
     
    3.10  Main Functions 
    3.10.1  Wake-up Validation Protocol 
    The wake-up validation protocol provides a standardized way to recognize valid controller 
    wake ups after a sleep phase. 
    For  all  user  configured  wake-up  sources  the  parameter  “Validation  Timeout”  is 
    configurable.  If  the  parameter  is  set  to  a  value  which  is  not  0,  the  wake-up  validation 
    protocol is active for that source. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    30 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
     
     
    Example 
    In the following example the whole wake-up validation procedure can be seen. A wake-
      up event occurs for the ComMChannel CanIf and needs validation. The validation is 
    processed and the wake-up event is notified to the BswM and to the ComM. 
    sd WakeupValidation
    Module
    Module
    CanIf
    Interrupt Source
    «EmbeddedInterface»
    «EmbeddedInterface»
    Integration Code
    ComM
    BswM
    EcuM
    (EcuM_Callout_Stubs)
    Interrupt()
    EcuM_CheckWakeup(EcuM_WakeupSourceType)
    CanIf_CheckWakeup(EcuM_WakeupSourceType)
    EcuM_SetWakeupEvent(EcuM_WakeupSourceType)
    BswM_EcuM_CurrentWakeup(EcuM_WakeupSourceType, EcuM_WakeupStatusType ECUM_WKSOURCE_PENDING)
    EcuM_StartWakeupSources(EcuM_WakeupSourceType)
    loop WHILE w akeup ev ent has not been v alidated
    EcuM_CheckValidation(EcuM_WakeupSourceType)
    CanIf_CheckValidation(EcuM_WakupSourceType)
    opt w akeup ev ent is v alidated
    EcuM_ValidateWakeupEvent(EcuM_WakeupSourceType)
    BswM_EcuM_CurrentWakeup(EcuM_WakeupSourceType, EcuM_WakeupStatusType ECUM_WKSOURCE_VALIDATED)
    ComM_EcuM_WakeUpIndication(NetworkHandleType)
    EcuM_StopWakeupSources(EcuM_WakeupSourceType)
     
    Figure 3-3  Example Wake-up Validation 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    31 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.10.2  Wake-up Validation Protocol for asynchronous Can transceiver 
    For  all  user  configured  wake-up  sources  the  parameter  “Check  Validation  Timeout”  is 
    configurable. If the parameter is set to a value which is not 0, the check wake-up validation 
    protocol is active for that source. 
    For  these  sources  the  call  of  EcuM_SetWakeupEvent  must  not  occur  in  the  context  of 
    EcuM_CheckWakeup. 
     
     
     
    Example 
    In the following example parts of the wake-up validation procedure can be seen for an 
      asynchronous Can transceiver.  
    sd WakeupValidation
    Module
    Module
    CanIf
    Icu
    CanTrcv
    Interrupt Source (CanTrcv
    «EmbeddedInterface»
    Integration Code
    Hardware
    BswM
    EcuM
    (EcuM_Callout_Stubs)
    Interrupt()
    EcuM_CheckWakeup(WAKEUP_SOURCE_CAN)
    EcuM_StartCheckWakeup(WAKEUP_SOURCE_CAN)
    WAKEUP_SOURCE_CAN, ECUM_WKSTATUS_CHECKWAKEUP(source, state)
    start CheckWakeupTimer()
    CanIf_CheckWakeup(WAKEUP_SOURCE_CAN)
    CanTrcv_CB_WakeupByBus()
    Program flow continues, if Ecu was in a sleep mode the wake-up procedure 
    is performed. If the Ecu was in Run mode, the Run mode continues as 
    before.
    As soon as the transceiver gets a response via SPI about a valid wake-up 
    event, the CanTrcv calls EcuM_SetWakeupEvent in the positive case.
    alt Wait for Wakeup Indication by Transceiv er
    [positive Wakeup Indication]
    EcuM_SetWakeupEvent(EcuM_WakeupSourceType)
    BswM_EcuM_CurrentWakeup(WAKEUP_SOURCE_CAN,
    ECUM_WKSTATUS_VALIDATED)
    [negative Wakeup Indication]
    EcuM_EndCheckWakeup(EcuM_WakeupSourceType)
    BswM_EcuM_CurrentWakeup(WAKEUP_SOURCE_CAN, ECUM_WKSTATUS_EXPIRED)
    [Timeout]
    CheckWakeupTimerExpired()
    BswM_EcuM_CurrentWakeup(WAKEUP_SOURCE_CAN, ECUM_WKSTATUS_EXPIRED)
     
     
     
    Figure 3-4  Example Wake-up Validation for asynchronous Can Transceivers 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    32 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.11  Error Handling 
    3.11.1  Development Error Reporting 
    Development  errors  are  reported  to  the  DET  using  the  service  Det_ReportError()  as 
    specified 
    in 
    [2], 
    if 
    development 
    error 
    reporting 
    is 
    enabled 
    (ECUM_DEV_ERROR_DETECT==STD_ON). 
    The reported EcuM ID is 10. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    EcuM_GetVersionInfo() 
    0x01 
    EcuM_Init() 
    0x02 
    EcuM_Shutdown() 
    0x03 
    EcuM_RequestRun() 
    0x04 
    EcuM_ReleaseRun() 
    0x05 
    EcuM_KillAllRUNRequests() 
    0x06 
    EcuM_SelectShutdownTarget() 
    0x07 
    EcuM_GetState() 
    0x08 
    EcuM_GetLastShutdownTarget()   
    0x09 
    EcuM_GetShutdownTarget() 
    0x0A 
    EcuM_RequestPOST_RUN() 
    0x0B 
    EcuM_ReleasePOST_RUN() 
    0x0C 
    EcuM_SetWakeupEvent() 
    0x0D 
    EcuM_GetPendingWakeupEvents() 
    0x12 
    EcuM_SelectBootTarget() 
    0x13 
    EcuM_GetBootTarget() 
    0x14 
    EcuM_ValidateWakeupEvent() 
    0x15 
    EcuM_GetValidatedWakeupEvents() 
    0x16 
    EcuM_ClearWakeupEvent() 
    0x18 
    EcuM_MainFunction() 
    0x19 
    EcuM_GetExpiredWakeupEvents() 
    0x1A 
    EcuM_StartupTwo() 
    0x1B 
    EcuM_SelectShutdownCause() 
    0x1C 
    EcuM_GetShutdownCause()   
    0x1D 
    EcuM_GetMostRecentShutdown()[not supported in this release] 
    0x1E 
    EcuM_GetNextRecentShutdown()[not supported in this release] 
    0x1F 
    EcuM_GoDown() 
    0x20 
    EcuM_GoHalt() 
    0x21 
    EcuM_GoPoll() 
    0x22 
    EcuM_SetRelWakeupAlarm() 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    33 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Service ID 
    Service 
    0x23 
    EcuM_SetAbsWakeupAlarm() 
    0x24 
    EcuM_AbortWakeupAlarm() 
    0x25 
    EcuM_GetCurrentTime() 
    0x26 
    EcuM_GetWakeupTime() 
    0x27 
    EcuM_SetClock() 
    0x28 
    EcuM_StartCheckWakeup() 
    0x29 
    EcuM_EndCheckWakeup() 
    0x30 
    EcuM_ClearValidatedWakeupEvent() 
    0x2A 
    EcuM_KillAllPostRUNRequests() 
    0x2B 
    EcuM_SetState() 
    0x65 
    EcuM_CB_NfyNvMJobEnd() 
    Table 3-8   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x10 
    ECUM_E_UNINIT 
    A service was called prior to initialization. 
    0x11 
    ECUM_E_SERVICE_DISABLE
    Error code defined by AUTOSAR SWS (not used in this 

    implementation). 
    0x12 
    ECUM_E_NULL_POINTER 
    A null pointer was passed as an argument. 
    0x13 
    ECUM_E_INVALID_PAR 
    A parameter was invalid (not specified) 
    0x14 
    ECUM_E_MULTIPLE_RUN_RE EcuM_RequestRUN or EcuM_ RequestPOST_RUN was 
    QUESTS 
    called two times by the same user without release. 
    0x15 
    ECUM_E_MISMATCHED_RUN EcuM_ReleaseRUN or EcuM_ ReleasePOST_RUN was 
    _RELEASE 
    called by a user without a previous request. 
    0x16 
    ECUM_E_STATE_PAR_OUT_
    API service EcuM_SelectShutdownTarget() called with 
    OF_RANGE 
    parameter not in expected range  
    0x17 
    ECUM_E_UNKNOWN_ 
    Wake-up source ID is not known by ECU State Manager 
    WAKEUP_SOURCE 
    0x20 
    ECUM_E_MODULE_NOT_IN_
    EcuM_StartupTwo() is called and the EcuM is not in state 
    STARTUP 
    EcuM_Startup_One which is entered in EcuM_Init(). 
    0x21 
    ECUM_E_MODULE_NOT_IN_
    EcuM_Shutdown() was invoked without calling 
    PREPSHUTDOWN 
    EcuM_GoDown(). 
    0x22 
    ECUM_E_MODULE_NOT_IN_
    This error will be reported if the callout EcuM_AL_SwitchOff() 
    RUN_STATE 
    does not switch off the ECU.  
    0x23 
    ECUM_E_NO_SLEEPMODE_C This error will be reported if EcuM_GoPoll() or 
    ONFIGURED 
    EcuM_GoHalt() is called and no SleepMode is configured. 
    0x24 
    ECUM_E_INVALID_STATERE
    A state which was requested is invalid, perhaps because a 
    QUEST 
    former request is not finished yet. 
    Table 3-9   Errors reported to DET 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    34 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.11.2  Production Code Error Reporting 
    By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
    Dem_ReportErrorStatus() as specified in [3], if production error reporting is enabled 
    (In  the  case  that  a  reference  to  a  Dem  event  parameter  is  configured  in 
    EcuMDemEventParameterRefs). 
    If  another  module  is  used  for  production  code  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Dem_ReportErrorStatus(). 
    The errors reported to DEM are described in the following table: 
    Error Code 
    Description 
    ECUM_E_RAM_CHECK_FAILED 
    The RAM check during wake-up failed.  
    ECUM_E_CONFIGURATION_DATA_INCONSISTENT 
    Post build configuration data is inconsistent. 
    ECUM_E_IMPROPER_CALLER  
    Defensive behavior checks have detected 
    improper use of the module. 
    ECUM_E_ALL_RUN_REQUESTS_KILLED 
    The API EcuM_KillAllRUNRequests() was 
    called. 
    Table 3-10   Errors reported to DEM 
     
     
     
    Caution 
    Only ECUM_E_IMPROPER_CALLER and ECUM_E_ALL_RUN_REQUESTS_KILLED 
      are passed to the Dem directly out of the static code. In the other cases 
    EcuM_ErrorHook (see 3.11.3) is called and the integrator has to decide what happens 
    in the case of these errors. 
     
     
     
     
    3.11.3  EcuM_ErrorHook 
    The  EcuM  has  an  own  ErrorHook  which  offers  the  integrator  the  possibility  to  react  on 
    occurring errors during runtime.  
    Error Code 
    Description 
    ECUM_E_HOOK_RAM_CHECK_FAILED 
    If the Ram check has failed after a sleep 
    phase, the ErrorHook is called with this 
    parameter. 
    ECUM_E_HOOK_CONFIGURATION_DATA_INCONSISTENT  If the consistency check of pre-compile 
    and link-time parameters in variant post-
    build has failed, the ErrorHook is called 
    with this parameter. 
    ECUM_E_HOOK_WRONG_ECUM_USAGE 
    If the call of ShutdownOS returns to the 
    EcuM.  
    ShutdownOS has to call 
    EcuM_Shutdown() to perform a 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    35 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    Error Code 
    Description 
    shutdown.  
    ECUM_E_HOOK_INVALID_COREID 
    The OS returned an invalid CoreID via 
    the API GetCoreID(). 
    Table 3-11   Description of EcuM internal Error Codes 
    The  integrator  has  to  implement  the  behavior  of  the  EcuM  in  this  situation.  The  EcuM 
    reports the error not by default to the Dem. If this is desired, the integrator has to call the 
    Dem. 
     
    3.12  Callout Execution Sequences 
    This chapter describes the execution order of callouts and important functions. This may 
    be useful while integrating the software stack. 
     
     
     
    Caution 
    The execution sequences are not relevant for EcuM fixed. 
     
     
     
     
    3.12.1  Callouts from Startup to Run 
    STARTUP – RUN  
    Execution in EcuM_Init() 
      EcuM_AL_SetProgrammableInterrupts() 
      EcuM_AL_DriverInitZero() 
      EcuM_AL_DriverInitOne() 
      Mcu_GetResetReason() 
      EcuM_SetWakeupEvent(ResetReason) 
      StartOS(ECUM_DEFAULTAPPMODE) 
    Execution in EcuM_StartupTwo() 
      SchM_Init() 
      BswM_Init(NULL_PTR / CfgPtr_BswM) 
      If Wake-up Events have occurred before BswM_Init: 
      BswM_EcuM_CurrentWakeup(WakeupSource, ECUM_WKSTATUS_VALIDATED) 
    Table 3-12   Callouts from Startup to Run 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    36 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.12.2  Callouts from Run to Sleep (Halt) and back to Run  
    Run – Sleep (Halt) – Run  
    Selection of the ShutdownTarget must be done before the transition to sleep e.g. by the BswM 
      EcuM_SelectShutdownTarget(ECUM_STATE_SLEEP, resetSleepMode) 
    All validated wake-up events must be cleared, e.g. by the BswM 
      EcuM_ClearValidatedWakeupEvent(ECUM_WKSOURCE_ALL_SOURCES) 
    GoHalt must be called e.g. by the BswM 
      EcuM_GoHalt() 
    Execution in EcuM_GoHalt() 
      BswM_EcuM_CurrentWakeup(wakeupSource, ECUM_WKSTATUS_NONE) 
      EcuM_EnableWakeupSources(wakeupSource) 
      GetResource(ECUM_OS_RESOURCE) 
      DisableAllInterrupts() 
      EcuM_GenerateRamHash() 
      Mcu_SetMode(ECUM_SLEEPMODELIST[ECUM_CURRENTSLEEPMODE].mcuMode) 
      EnableAllInterrupts() 
      EcuM_CheckRamHash() 
      If CheckRamHash has failed 
      EcuM_ErrorHook(ECUM_E_HOOK_RAM_CHECK_FAILED) 
     
    DisableAllInterrupts() 
     
    Mcu_SetMode(ECUM_NORMALMCUMODEREF) 
     
    EnableAllInterrupts() 
     
    EcuM_DisableWakeupSources(EcuM_PendingWakeups | 
    EcuM_ValidatedWakeups)) 
     
    BswM_EcuM_CurrentWakeup(EcuM_PendingWakeups | 
    EcuM_ValidatedWakeups),  ECUM_WKSTATUS_DISABLED) 
     
    EcuM_Al_DriverRestart() 
     
    ReleaseResource(ECUM_OS_RESOURCE) 
     
    Table 3-13   Callouts from Run to Sleep (Halt) and back to Run 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    37 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.12.3  Callouts from Run to Reset  
    Run – Reset  
    Selection of the ShutdownTarget must be done before the transition to Off e.g. by the BswM 
      EcuM_SelectShutdownTarget(ECUM_STATE_RESET, resetMode) 
    GoDown must be called e.g. by the BswM 
      EcuM_GoDown() 
    Execution in EcuM_GoDown() 
      EcuM_OnGoOffOne() 
      BswM_Deinit() 
      SchM_Deinit() 
      ShutdownOS(E_OK) 
    Shutdown must be called from the ShutdownHook 
      EcuM_Shutdown() 
    Execution in EcuM_Shutdown() 
      EcuM_OnGoOffTwo() 
      EcuM_AL_Reset( EcuM_CurrentShutdownMode ) 
    Table 3-14   Callouts from Run to Reset 
    3.12.4  Callouts from Run to Off  
    Run – Reset  
    Selection of the ShutdownTarget must be done before the transition to Off e.g. by the BswM 
      EcuM_SelectShutdownTarget(ECUM_STATE_Off, 0) 
    All validated wake-up events must be cleared, e.g. by the BswM 
      EcuM_ClearValidatedWakeupEvent(ECUM_WKSOURCE_ALL_SOURCES) 
    GoDown must be called e.g. by the BswM 
      EcuM_GoDown() 
    Execution in EcuM_GoDown() 
      EcuM_OnGoOffOne() 
      BswM_Deinit() 
      SchM_Deinit() 
    >  If a wake-up event has occurred, the Shutdown Target will be changed to 
    ECUM_STATE_RESET and the reset mode will be ECUM_RESET_WAKEUP 
      ShutdownOS(E_OK) 
    Shutdown must be called from the ShutdownHook 
      EcuM_Shutdown() 
    Execution in EcuM_Shutdown() 
      EcuM_OnGoOffTwo() 
      EcuM_AL_SwitchOff() 
    Table 3-15   Callouts from Run to Off 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    38 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.13  EcuM Flex Users and Defensive Behavior 
    The  EcuM  offers  the  facility  to  configure  flex  Users  to  identify  the  caller  of  the  routine 
    EcuM_GoDown. The calling module has to use its Module ID as specified by AUTOSAR in 
    [4]. 
     
     
    Note 
    To use this feature, the switch EcuMEnableDefBehaviour must be active. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    39 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    3.14  Alarm Clock 
    The EcuM flex offers the possibility to configure a clock which provides the absolute time 
    since the last power-on reset  of  the ECU. This  clock  can be used to  retrieve the current 
    system  time  via  the  API  EcuM_GetCurrentTime  and  to  wake  up  the  ECU  from  sleep 
    phases. 
     
    In sleep phases the ECU will be woken up by the Gpt every second, depending if the Gpt 
    supports this. If the wake up by the Gpt is the only wakeup event, the EcuM will increment 
    the system clock and falls back to sleep again. If a wake up alarm has expired, the EcuM 
    will call EcuM_SetWakeupEvent() to indicate a valid wake up of the ECU. 
     
     
    Note 
    To use this feature, the switch EcuMAlarmClockPresent must be active. 
     
     
     
     
    3.14.1  Configuring the Gpt to provide the Time base  
    To support the Alarm Clock, a Gpt channel must be configured in a way which leads to an 
    interrupt every second. For a correct behavior of the Alarm Clock, even in sleep phases, 
    the channel must be configured as followed: 
     
    Gpt Channel Parameter 
    Value 
    GptChannelMode 
    GPT_CH_MODE_CONTINUOUS 
    GptEnableWakeup 
    True 
    GptNotification 
    EcuM_AlarmCheckWakeup 
    GptWakeupSourceRef 
    Choose here the same Wakeup Source as configured for 
    EcuM parameter EcuMAlarmWakeupSource 
    Table 3-16   Gpt Channel Configuration 
     
     
     
    Caution 
    The implementation of the EcuM alarm clock requires that the Gpt provides a time base 
      of exactly one second. If this is not supported by Gpt, the EcuM does not perform a 
    correction of the time base. 
     
     
     
     
    3.14.2  Configuring the EcuM for using the Alarm Clock 
    For  setting  a  wake  up  alarm during  the  runtime of  the  ECU,  an  EcuMAlarmClock  with  a 
    reference to an EcuMFlexUserConfig must be configured. 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    40 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    The  Gpt  channel  configured  in  3.14.1  must  be  referenced  by  the  EcuM  parameter 
    EcuMGptChannelRef. 
     
    3.14.3  Setting of the EcuM Clock 
    The API  EcuM_SetClock  is  offered  to  allow  configuring  an  EcuMFlexUser  to  modify  the 
    system  time  during  runtime.  This  user  must  be  set  as  reference  in  the  configuration 
    parameter EcuMSetClockAllowedUserRef. 
    Only if this reference is configured, the usage of the API EcuM_SetClock is allowed for this 
    user. 
    3.14.4  Setting of a Time Triggered Wake Up Alarm 
    Via the APIs EcuM_SetRelWakeupAlarm and EcuM_SetAbsWakeupAlarm the configured 
    EcuMFlexUsers  can  set  wake  up  alarms  during  the  runtime  of  the  ECU.  This  wake  up 
    alarm will be active during the next sleep phase. 
    The wake up alarm can be cancelled by the user during runtime of the ECU via the API 
    EcuM_AbortWakeupAlarm.  
     
     
     
    Note 
    One single EcuMFlexUser can only set one single wake up alarm. 
     
     
     
     
     
    Caution 
    All wake up alarms are cleared if the ECU wakes up from a sleep phase, even if the 
      reason for this wake up was not time triggered. The wake up alarms must be rearmed 
    before the next sleep phase is entered. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    41 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    3.15  MultiCore Ecu 
    The  EcuM  offers  the  possibility  to  handle  multi  core  ECUs.  The  handling  of  the 
    initialization,  sleep  and  shutdown  differs  to  a  single  core  ECU  and  is  described  in  the 
    following. 
    3.15.1  Initialization of a MultiCore ECU 
    3.15.1.1  Initialization on the Master Core 
    After  power-on  of  the  ECU,  the  master  core  starts  running  and  EcuM_Init()  should  be 
    called in the startup code. At the end of EcuM_Init() the callout EcuM_StartOS() is called. 
    In the callout EcuM_StartOS() all other slave cores are started via the OS API StartCore().  
     
     
    Example 
    In the following example the startup sequence of the master core for a ECU with 4 
      cores can be seen: 
     sd MasterCore Initialization
    Module
    Module
    Startup Code
    Module
    Module
    Module
    Integration Code
    EcuM
    Os
    SchM
    BswM
    (EcuM_Callout_Stubs)
    InitTask
    EcuM_Init()
    PreOS
    initialization
    sequence of
    EcuM()
    EcuM_StartOS(AppModeType)
    StartCore(CoreID1, &Status)
    StartCore(CoreID2, &Status)
    StartCore(CoreID3, &Status)
    StartOS(appMode)
    ActivateTask()
    EcuM_StartupTwo()
    SchM_Init()
    BswM_Init(const BswM_ConfigType *)
     
    Figure 3-5  Startup Sequence on a Master Core 
     
     
     
     
    Note 
    The callout EcuM_StartOS() is filled by the configuration tool per default. In some 
      cases it might be necessary to adapt this callout. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    42 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    3.15.1.2  Initialization on the Slave Core 
    After  the  slave  core  has  been  started  by  the  master  core,  it  also  starts  running  with  the 
    startup code. EcuM_Init() is called from the startup code, but on the slave core only driver 
    initialization and a call to StartOS() is performed via the callout EcuM_StartOS().  
     
     
     
    Example 
    In the following example the startup sequence of a slave core for a ECU with 4 cores 
      can be seen: 
     sd Slav eCore Initialization
    Module
    Module
    Startup Code
    Module
    Module
    Integration Code
    EcuM
    Os
    SchM
    (EcuM_Callout_Stubs)
    InitTask
    EcuM_Init()
    EcuM_AL_DriverInitZero()
    EcuM_AL_DriverInitOne()
    EcuM_StartOS(AppModeType)
    StartOS(appMode)
    ActivateTask()
    EcuM_StartupTwo()
    SchM_Init()
     
    Figure 3-6  Startup Sequence on a Slave Core 
     
     
     
     
     
    Caution 
    On the slave core a call to EcuM_StartupTwo() is only necessary if the initialization of 
      the SchM should be done by the EcuM. 
    The BswM is currently not initialized on a slave core in this release! 
     
     
     
    3.15.1.2.1  Driver initialization on the Slave Core 
    The  callouts  EcuM_AL_DriverInitZero()  and  EcuM_AL_DriverInitOne()  are  also  called  on 
    slave cores, but the generated code is only executed on the master core. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    43 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    On which core the driver initialization is called, is determined via the OS API GetCoreID(), 
    as it can be seen in the code example below. 
    A slave core specific handling has to be implemented by the user. 
     
     
    Example 
    /********************************************************************* 
      * EcuM_AL_DriverInitZero 
    *********************************************************************/ 
    FUNC(void, ECUM_CODE) EcuM_AL_DriverInitZero(void) 

      if(GetCoreID() == ECUM_CORE_ID_MASTER) 
      { 
        MasterCore_Init(); 
      } 
     
    /********************************************************************* 
     * DO NOT CHANGE THIS COMMENT!   <USERBLOCK EcuM_AL_DriverInitZero>   
    DO NOT CHANGE THIS COMMENT! 
    *********************************************************************/ 
      /* Add implementation of EcuM_AL_DriverInitZero() */ 
     
      return; 
    /********************************************************************* 
     * DO NOT CHANGE THIS COMMENT!   </USERBLOCK>   DO NOT CHANGE THIS 
    COMMENT! 
    *********************************************************************/ 

     
     
     
     
    3.15.2  Sleep handling of slave cores 
    The  EcuM  flex  supports  two  different  ways  to  set  the  ECU  to  sleep,  with  and  without 
    synchronization  of  all cores. Which  handling  is  used depends  on  the boolean  parameter 
    EcuMSlaveCoreHandling 
    EcuMSlaveCoreHandling 
    Behavior  
    False 
    The Master Core does not care about slave cores during the 
    sleep  mode.  Depending  on  the  used  hardware,  it  might 
    happen that the Master Core has switched already to sleep 
    and the slave cores are still running. 
    True 
    The  Master  Core  waits  on  the  way  to  sleep  (initiated  via 
    EcuM_GoHalt()  /  EcuM_GoPoll()  )  till  all  slave  cores  has 
    already  switched  to  sleep.  During  wait  for  the  slave  cores, 
    the  callout  EcuM_WaitForSlaveCores  is  called  cyclically  till 
    all cores have switched their state to sleep. The callout can 
    be used to set the slaves to sleep. 
    Table 3-17   Sleep handling on Slave Cores 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    44 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.15.3  Blocking of the BSW Scheduler during Sleep 
    If only one BSW scheduler is used on the master core, it is sufficient to configure only one 
    OsResource which is blocked during the sleep mode. 
    If  there  is  more  than  one  BSW  scheduler  running  on  several  cores,  it  is  necessary  to 
    configure an OsResource for every core. The configuration tool assigns automatically the 
    configured OsResource to the corresponding core.  
    3.15.4  Shutdown of the MultiCore ECU 
    It is necessary to call EcuM_GoDown() on all cores which have a running SchM to assure 
    a regular de-initialization of the SchM. 
    Finally after EcuM_GoDown() was called for all these slave cores, the API can be called 
    on the master core. This leads via the callout EcuM_ShutdownOS to a call of the OS API 
    ShutdownAllCores(). This API synchronizes all cores and stops the slaves. 
     
     
    Note 
    If the SchM is only running on the master core it is sufficient to call EcuM_GoDown() on 
      the master core only. 
     
     
    3.15.5  Reconfiguration of the BSW Core ID 
    The EcuM supports the configuration of the BSW Core Id. Per default the master Core Id 
    is mapped to the OS define OS_CORE_ID_MASTER (Id 0).  
     
    If the BSW shall run on another Core, the Id has to be configured via the configuration tool. 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    45 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.16  Mode Handling for EcuM Flex 
    3.16.1  Mode Handling 
    The  BswM  can  set  a  specific  EcuM  state  (via  EcuM_SetState)  which  is  mapped  to  the 
    corresponding mode and an Rte mode switch will be initiated by the EcuM. The mapping 
    of states to modes can be seen in Table 3-18. 
    After the mode switch is initiated, the EcuM polls the Rte in each MainFunction cycle if the 
    mode  switch  is  executed  successfully.  After  the  Rte  has  acknowledged  the  successful 
    mode switch execution, the EcuM will notify the BswM about the finished mode switch. 
    EcuM State 
    EcuM Mode 
    ECUM_STATE_STARTUP 
    RTE_MODE_EcuM_Mode_STARTUP 
    ECUM_STATE_SLEEP 
    RTE_MODE_EcuM_Mode_SHUTDOWN 
    or 
    RTE_MODE_EcuM_Mode_SLEEP 
    ECUM_STATE_APP_RUN 
    RTE_MODE_EcuM_Mode_RUN 
    ECUM_STATE_APP_POST_RUN 
    RTE_MODE_EcuM_Mode_POST_RUN 
    ECUM_STATE_SHUTDOWN 
    RTE_MODE_EcuM_Mode_SHUTDOWN 
    or 
    RTE_MODE_EcuM_Mode_SLEEP 
    Table 3-18   Mapping of States to Modes 
     
     
    Note 
    In case of a requested state ECUM_STATE_SHUTDOWN or ECUM_STATE_SLEEP, 
      the corresponding mode depends on the currently configured shutdown target.  
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    46 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.16.2  Run Request Protocol 
    The run request protocol is a mechanism for applications or Software Components (SW-C) 
    to  request  RUN  state  explicitly  via  EcuM_RequestRUN.  The  EcuM  notifies  the  BswM 
    about  an active application request. If the application has nothing to do anymore  it must 
    release the previous requested RUN state. If no other SW-C has requested RUN state the 
    ECU State Manger will notify the BswM that no application request is active anymore. 
    If SW-C needs special preparation for one of the shutdown states (SLEEP, OFF, RESET) 
    the  SW-C  must  request  POST  RUN  state.  This  is  the  same  mechanism  like  requesting 
    RUN state. So, the POST RUN state has to be released after the job of the application is 
    finished. It is very important for SW-C’s which needs POST RUN state activities to request 
    the POST RUN state before releasing the RUN request. Otherwise it is possible that the 
    application doesn't get the chance to execute its POST RUN activities, depending on the 
    BswM configuration. 
    To request RUN or POST RUN state each SW-C must be a configured user of the ECU 
    State  Manager.  Therefore  it  is  necessary  to  define  one  user  for  each  SW-C  to  place 
    requests. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    47 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    3.17  Generated Template Files 
    A generated template file in this document is a file which:  
    >  is generated by the generation tool at every generation process  
    >  the user can modify this template for his needs  
    >  the changes made by the user will not be overwritten at the next generation process  
      
    In order not to overwrite the changes made by the user, the template file contains special 
    comments. The user must insert his code between the two comments which delimit the 
    user block. The comments have the following format: 
     
    /*************************************************************************************************************************************** 
     * DO NOT CHANGE THIS COMMENT!  <USERBLOCK FUNCTIONNAME>   DO NOT CHANGE THIS COMMENT! 
    ***************************************************************************************************************************************/ 
     
     
    /**************************************************************************************************************************************** 
     * DO NOT CHANGE THIS COMMENT!  </USERBLOCK>                   DO NOT CHANGE THIS COMMENT! 
    ****************************************************************************************************************************************/ 
     
     
     
    Caution 
    Do not modify or delete these comments. 
     
     
     
     
    3.18  Wake-up Event Handling and Wake-up Validation 
    The handling of Wake-up Sources and Wake-up Validation has to be configured and 
    implemented specifically for every ECU. The following list provides a short overview which 
    callouts are affected:  
      EcuM_EnableWakeupSources(), (refer to Ch. 5.7.2.17) 
      EcuM_DisableWakeupSources(), (refer to Ch. 5.7.2.18) 
      EcuM_CheckWakeup(), (refer to Ch. 5.7.2.21) 
      EcuM_StartWakeupSources(), (refer to Ch. 5.7.2.19) 
      EcuM_StopWakeupSources(), (refer to Ch. 5.7.2.20) 
     
    The integration task is to fill these callouts with code which fulfill the ECU specific 
    requirements. The following paragraphs illustrate two example use cases: 
      Wake-up after a physical sleep mode  
      Wake-up validation of communication channels (EcuM in Run state) 
     
    3.18.1  Wake-up after a Physical Sleep Mode 
    3.18.1.1  Use Case Description 
    A raising edge on an ICU channel shall bring the ECUM into RUN state. A wake-up source 
    “ECUM_WKSOURCE_ICU_CH0”  is  configured for  that. The  name  of  the  configured  ICU 
    channel is Icu_Channel0.  
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    48 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    No  wake-up  validation shall be performed on that  wake-up  event. This  wake-up event  is 
    the only active wake-up event for the desired sleep mode.  
    3.18.1.2  Execution Flow 
    >  EcuM is in ECUM_STATE_RUN  
    >  BswM calls EcuM_GoHalt() 
      Callout EcuM_EnableWakeupSources() is executed. 
      EcuM transits to sleep, Mcu_SetMode() is called 
    >  External event triggers ICU hardware to raise an interrupt 
    >  Callout EcuM_CheckWakeup() is executed by ISR 
    >  API function EcuM_SetWakeupEvent() is executed 
    EcuM executes implicitly EcuM_ValidateWakeupEvent() because wake-up event is 
    instantly valid 
    >  EcuM transits from ECUM_STATE_SLEEP to ECUM_STATE_WAKEUP_ONE 
    >  EcuM transits from ECUM_STATE_WAKEUP_TWO to ECUM_STATE_ RUN 
      Callout EcuM_DisableWakeupSources() is executed 
    3.18.1.3  Callout Implementation Examples 
    FUNC(void, ECUM_CODE) EcuM_EnableWakeupSources(EcuM_WakeupSourceType 
    wakeupSource) 

      /* Check for each configured wake-up source the corresponding bit  
       * is set. Here the bit for the ICU wake-up source must be set 
      */ 
      if ((wakeupSource & ECUM_WKSOURCE_ICU_CH0) != 0) 
      { 
        Icu_EnableNotification(Icu_Channel0); 
        Icu_EnableWakeup(Icu_Channel0); 
        Icu_SetMode(ICU_MODE_SLEEP); 
      } 
      /* … */ 

     
    FUNC(void, ECUM_CODE) EcuM_CheckWakeup(EcuM_WakeupSourceType wakeupSource) 

      if ((wakeupSource & ECUM_WKSOURCE_ICU_CH0) != 0) 
      { 
        /* no validation necessary, so call EcuM_SetWakeupEvent() */ 
     
        EcuM_SetWakeupEvent(ECUM_WKSOURCE_ICU_CH0); 
      } 
      /* … */ 

     
     
     
    FUNC(void, ECUM_CODE) EcuM_DisableWakeupSources(EcuM_WakeupSourceType 
    wakeupSource) 

      if ((wakeupSource & ECUM_WKSOURCE_ICU_CH0) != 0) 
      { 
        Icu_DisableNotification(Icu_Channel0); 
        Icu_DisableWakeup(Icu_Channel0); 
        Icu_SetMode(ICU_MODE_NORMAL); 
      }  

    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    49 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
     
    3.18.2  Wake-up Validation of Communication Channels (ECUM in RUN State) 
    3.18.2.1  Use Case Description 
    A  wake-up  capable  CAN  hardware  is  assumed. A  message  on  a  CAN  channel  shall  be 
    recognized and set the CAN channel into normal operation mode (which will be triggered 
    by ComM). A wake-up source ECUM_WKSOURCE_CAN0 is configured for that. Wake-up 
    Validation shall be performed for that channel. 
    3.18.2.2  Execution Flow 
    >  ECUM is in RUN state, the CAN channel is in sleep state and is able to detect wake-up 
    events 
    >  Callout EcuM_CheckWakeup() is executed by ISR 
    >  API EcuM_SetWakeupEvent() is executed, EcuM starts wake-up validation timeout 
    >  EcuM_MainFunction() triggered by SCHM 
      (a) ECUM detects a pending wake-up event and executes callout 
    EcuM_StartWakeupSources() 
      (b) ECUM executes callout EcuM_CheckValidation() 
      Note: step (b) may be executed several times, with each EcuM_MainFunction() 
    call until the wake-up event is validated or expired, but 
    EcuM_StartWakeupSources() is executed only once. 
    >  Case Validation successful: 
      API EcuM_ValidateWakeupEvent() is executed, within this routine 
    ComM_WakeUpIndication() is called 
      EcuM_MainFunction() triggered by SCHM 
      ECUM stops validation timeout 
    >  Case Validation failed: 
      ECUM executes callout EcuM_StopWakeupSources() 
      The pending wake-up changes to an expired wake-up source 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    50 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.18.2.3  Callout Implementation Examples 
    3.18.2.3.1  EcuM_CheckWakeup 
    FUNC(void, ECUM_CODE) EcuM_CheckWakeup(EcuM_WakeupSourceType wakeupSource)  

    if((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 

    CanIf_CheckWakeup(ECUM_WKSOURCE_CAN0); 


     
    3.18.2.3.2  EcuM_CheckValidation 
    FUNC(void, ECUM_CODE) EcuM_CheckValidation(EcuM_WakeupSourceType wakeupSource) 

    if ((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 

    /* Query the driver if the wake-up event was valid */ 
    CanIf_CheckValidation(ECUM_WKSOURCE_CAN0); 


     
    3.18.2.3.3  EcuM_StartWakeupSources and EcuM_StopWakeupSources in the case 
    of a MICROSAR CanSM 
    If the used CanSM module is a MICROSAR module, the following implementation can be 
    used. 
     
    FUNC(void, ECUM_CODE) EcuM_StartWakeupSources(EcuM_WakeupSourceType 
    wakeupSource) 

      if ((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 
      { /* CanSM needs the corresponding Network Handle */ 
        if (CanSM_StartWakeupSources(0x00) == E_NOT_OK) 
        { 
          /* place ECU depended error handling here */ 
        } 
      } 

     
    void EcuM_StopWakeupSources(EcuM_WakeupSourceType wakeupSource) 

      if ((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 
      { /* CanSM needs the corresponding Network Handle */ 
        if (CanSM_StopWakeupSources(0x00, wakeupSource) == E_NOT_OK) 
        { 
          /* place ECU depended error handling here */ 
        }   
      } 

     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    51 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    3.18.2.3.4  EcuM_StartWakeupSources and EcuM_StopWakeupSources in the case 
    of a non MICROSAR CanSM 
    If the used CanSM module is a non MICROSAR module, the following implementation can 
    be used. 
     
    FUNC(void, ECUM_CODE) EcuM_StartWakeupSources(EcuM_WakeupSourceType 
    wakeupSource)  

      CanIf_ControllerModeType CanIfCtrlMode; 
    if ((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 

    /* determine in which is the current Can Controller state */ 
    (void)CanIf_GetControllerMode(0, &CanIfCtrlMode); 
    /* in case the Can Controller is not CANIF_CS_STARTED */ 
     
    if (CANIF_CS_STARTED != CanIfCtrlMode) 

    /* Set the controller and transceiver mode into normal operation mode*/ 
    CanIf_SetTrcvMode(0, CANIF_TRCV_MODE_NORMAL);  
    CanIf_SetControllerMode(0, CANIF_CS_STOPPED); 
    CanIf_SetControllerMode(0, CANIF_CS_STARTED);   

    else 

    /* Stack already up and running */ 

     } 

     
     
    FUNC(void, ECUM_CODE) EcuM_StopWakeupSources(EcuM_WakeupSourceType wakeupSource) 

    if ((wakeupSource & ECUM_WKSOURCE_CAN0) != 0) 

    /* Validation was not successful, set the CAN controller and 
    * Transceiver back to sleep mode. */ 
    CanIf_SetControllerMode(0, CANIF_CS_STOPPED); 
    CanIf_SetControllerMode(0, CANIF_CS_SLEEP); 
    CanIf_SetTrcvMode(0, CANIF_TRCV_MODE_STANDBY); 


     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    52 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR EcuM into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the EcuM contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    EcuM.c 
    This is the source file of the EcuM. It contains the 
     
     
    implementation of the EcuM interfaces. 
    EcuM.h 
    This is the header file of the EcuM. It declares the 
     
     
    interfaces of the MIRCROSAR module EcuM. 
    EcuM_Cbk.h 
    Contains the prototypes of the provided callbacks and 
     
     
    callout functions. 
    Table 4-1   Static files 
     
     
    Do not edit manually 

      The static files listed above must not be edited by the user! 
     
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool. 
    File Name 
    Description 
    EcuM_Cfg.h 
    Contains the configuration of the EcuM. 
    EcuM_Cfg.c 
    Contains the generated configuration data of the EcuM 
    EcuM_PrivateCfg.h 
    Contains configuration data which is only relevant for the EcuM 
    implementation. This file must be only included by the EcuM 
    implementation files. 
    EcuM_Generated_Types.h  Contains all provided types of the EcuM. 
    EcuM_PBcfg.c 
    Contains the post-build configuration of the EcuM. 
    EcuM_Callout_Stubs.c 
    Template for the callout code which has to be filled by the integrator. 
    EcuM_Init_PBcfg.c 
    This file contains configuration pointers to post-build modules. 
    EcuM_Init_PBcfg.h 
    This file contains the definition of the global post-build struct. 
    EcuM_Init_Cfg.c 
    This file contains configuration pointers to variant modules. 
    EcuM_Init_Cfg.h 
    This file contains the definition of the variant modules struct. 
    EcuM_Error.h 
    This file provides an BSW Error function for post-build-loadable 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    53 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    Table 4-2   Generated files 
     
    4.2 
    Critical Sections   
    The EcuM calls the following function when entering a critical section: 
    void  SchM_Enter_EcuM_ECUM_EXCLUSIVE_AREA_0(void) 
    >  When the critical section is left the following function is called by the EcuM: 
    void SchM_Exit_EcuM_ECUM_EXCLUSIVE_AREA_0(void) 
    Critical Section Define 
    Interrupt Lock 
    ECUM_EXCLUSIVE_AREA_0 
    No interrupt by any wake-up interrupt is 
    allowed. These interrupts must be locked in 
    this exclusive area. 
    ECUM_EXCLUSIVE_AREA_1 
    If it cannot be assured that a 32bit variable 
    is written atomically, this exclusive area 
    must be configured as a spin lock to 
    protect access on global state variables. 
     
     
    Note 
    The configuration of this exclusive 
      area is only necessary in the case 
    of a multi core ECU 
     
     
     
    ECUM_EXCLUSIVE_AREA_2 
    No task switch and no interrupt from the 
    Gpt is allowed in this exclusive area to 
    protect the global system time. 
     
     
    Note 
    The configuration of this exclusive 
      area is only necessary if the 
    feature Alarm Clock is enabled 
     
     
     
    Table 4-3   Critical Sections 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    54 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    4.3 
    Include Structure 
     class include Structure
    Std_Types.h
    EcuM_Generated_Types.h
    NvM.h
    EcuM_Cfg.h
    «include»
    «include»
    «include
    in case of
    Rte_EcuM_Type.h
    EcuM
    «include»
    fixed»
    «include»
    EcuM_Error.h
    «include»
    EcuM_Cbk.h
    EcuM_PBcfg.c
    «include»
    ComM.h
    «include»
    «include»
    EcuM_Cfg.c
    EcuM_Init_PBcfg.c
    EcuM.h
    Rte_Main.h
    «include»«include»
    «include»
    ComM_EcuMBswM.h
    EcuM_Init_Cfg.h
    «include»
    EcuM_Init_PBcfg.h
    «include»
    «include»
    «include»
    «include»
    «include»
    SchM_EcuM.h
    «include»
    «include»
    «include»
    EcuM_Init_Cfg.c
    EcuM_PrivateCfg.h
    EcuM_Callout_Stubs.c
    «include»
    BswM.h
    «include»
    «include» «include» «include» «include» «include»
    «include»
    Dem.h
    Mcu.h
    Os.h
    Det.h
    EcuM.c
    BswM_EcuM.h
    «include»
     
     
    Figure 4-1  Include structure 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    55 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    4.4 
    Dependencies on other BSW Modules 
    4.4.1 
    BswM 
    The  EcuM  module  depends  on  the  BswM.  The  EcuM  performs  the  initialization  of  the 
    BswM during EcuM_StartupTwo(). 
    The  states  of  all  wake-up  sources  are  reported  to  the  BswM  in  the  case  of  a  changing 
    wake-up source. 
    The usage of the BswM cannot be switched off.  
    4.4.1.1 
    BswM and EcuM fixed 
    The EcuM reports all state changes described in 3.6.2.1 to the BswM.  
    4.4.2 
    AUTOSAR OS 
    The EcuM module depends on the AUTOSAR OS. It starts and performs the shutdown of 
    the OS.  
    The EcuM needs a valid reference within the EcuC file to a configured OS application 
    mode. Additionally an OsResource must be configured to block other tasks during a sleep 
    mode. 
    The usage of the OS cannot be switched off.  
    4.4.3 
    MCU 
    The EcuM module depends on a MCU. The MCU mode settings are used to enter power 
    saving  modes  in  the  phases  ECUM_STATE_SLEEP  and  ECUM_STATE_OFF,  it  is  also 
    used to restore the normal MCU mode. Every sleep mode must have configured a MCU 
    mode which will be entered in that sleep mode. 
    After a reset, the MCU is called to get the reason for the current reset.  
    The usage of the MCU cannot be switched off. 
    4.4.4 
    DEM 
    The EcuM depends on the DEM. The EcuM supports the pre-initialization of the DEM and 
    if the production errors for the EcuM are configured as active, the EcuM reports some 
    Errors to the DEM. Refer to chapter 3.11.2 for more information. 
    The usage of the DEM can be switched off. 
    4.4.5 
    DET 
    The EcuM depends on the DET. The EcuM performs the initialization and reports 
    development errors for diagnostic purposes. Refer to chapter 3.11.1 for more information. 
    The usage of the DET can be switched off. 
    4.4.6 
    ComM 
    This module depends on the ComM. The EcuM manages the validation of communication 
    channels.  In  the  case  of  a  validated  wake-up  event  from  a  communication  channel,  the 
    EcuM reports this event to the ComM.  
    4.4.6.1 
    ComM and EcuM fixed 
    In 
    the 
    transition 
    to 
    ECUM_STATE_APP_RUN, 
    the 
    EcuM 
    calls 
    ComM_CommunicationAllowed() for all configured communication channels. 
    In  ECUM_STATE_APP_RUN,  the  ComM  API  ComM_GetState()  is  called  for  every 
    communication channel in EcuM_MainFunction. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    56 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    If  ComM_GetState()  returns  COMM_NO_COM_NO_PENDING_REQUEST  for  all 
    channels, the EcuM can leave the ECUM_STATE_APP_RUN. 
    4.4.7 
    SchM 
    The  EcuM  module  depends  on  the  SchM.  The  EcuM  performs  the  initialization  of  the 
    SchM during EcuM_StartupTwo(). 
    The usage of the SchM cannot be switched off. 
    4.4.8 
    Gpt 
    In  the  case  that  the Alarm  Clock  is  enabled,  the  EcuM  depends  on  the  Gpt. The  EcuM 
    initialize the Gpt (has to be done in EcuM_AL_DriverInitOne) and starts the corresponding 
    timer during EcuM_StartupTwo(). On the way to sleep, the mode of the Gpt is switched to 
    sleep and the normal mode is recovered after a wake-up from sleep. 
    4.4.9 
    NvM 
    The  EcuM  handles  the  call  of  NvM_WriteAll()  and  NvM_CancelWriteAll().  Both  calls  are 
    protected with a configurable timeout to guarantee a shutdown of the ECU even in case of 
    a defect NvM. 
     
     
    Caution 
    Dependency to the NvM exists only in case of EcuM fixed. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    57 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5  API Description 
    5.1 
    Type Definitions 
    The types defined by the EcuM are described in this chapter. 
    Type Name 
    C-Type 
    Description 
    Value Range 
    EcuM_StateType 
    uint8 
    Encodes all states and  ECUM_SUBSTATE_MASK 
    sub states provided by  Get the current state by AND 
    the ECU State 
    gating the state with this mask. All 
    Manager. 
    states are delivered including 
    substates. 
    ECUM_STATE_STARTUP 
    STARTUP super state 
    ECUM_STATE_STARTUP_ONE 
    Initialization of drivers which don’t 
    need OS support. 
    ECUM_STATE_STARTUP_TWO 
    Initialization of drivers which need 
    OS support. 
    ECUM_STATE_WAKEUP 
    WAKE-UP super state 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_WAKEUP_ONE 
    Reinitializing of drivers for normal 
    operation. 
    ECUM_STATE_WAKEUP_VALIDATIO

    Waits for validation of a wake-up 
    event 
    ECUM_STATE_WAKEUP_REACTION 
    Computes the appropriate wake-up 
    reaction 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_WAKEUP_TWO 
    Prepares the ECU for RUN state 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_WAKEUP_WAKESLE
    EP 
    A short system phase where the 
    ECU transit from a wake-up directly 
    to sleep again. 
    Not used in this EcuM flex 
    Implementation! 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    58 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Type Name 
    C-Type 
    Description 
    Value Range 
    ECUM_STATE_WAKEUP_TTII 
    Performs the TTII protocol 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_RUN 
    Normal ECU operation super state 
    ECUM_STATE_APP_RUN 
    ECU is in normal operation state 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_APP_POST_RUN 
    ECU performs POST RUN 
    activities 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_SHUTDOWN 
    Shutdown super state 
    ECUM_STATE_PREP_SHUTDOWN 
    Prepares the ECU for the following 
    shutdown sequence. 
    Not used in this EcuM flex 
    Implementation! 
    ECUM_STATE_GO_SLEEP 
    Activation of the wake-up sources 
    ECUM_STATE_GO_OFF_ONE 
    Shutdown of system services 
    ECUM_STATE_GO_OFF_TWO 
    Performs a RESET or switches off 
    the ECU 
    ECUM_STATE_SLEEP 
    ECU is in sleep state (this 
    information cannot be retrieved) 
    ECUM_STATE_OFF 
    ECU is without power supply (this 
    information cannot be retrieved) 
    EcuM_WakeupSource uint32 
    Each bit in this type 
    ECUM_WKSOURCE_POWER  
    Type 
    identifies a wake-up 
    Identifies a power on reset (bit 0) 
    source. 
    ECUM_WKSOURCE_RESET 
    Identifies a hardware reset (bit 1) 
    ECUM_WKSOURCE_INTERNAL_RE
    SET  
    Identifies resets which only reset 
    the core of the microcontroller but 
    not the peripherals. This source 
    also indicates unhandled 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    59 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Type Name 
    C-Type 
    Description 
    Value Range 
    exceptions (bit 2) 
    ECUM_WKSOURCE_INTERNAL_WD
    G  
    Identifies a reset by internal 
    watchdog (bit 3) 
    ECUM_WKSOURCE_EXTERNAL_W
    DG  
    Identifies a reset by external 
    watchdog (bit 4). (This is only 
    possible if the hardware supports 
    this feature) 
    ECUM_WKSOURCE_ALL_SOURCES  
    Identifies each wake-up source 
    ECUM_WKSOURCE_NONE  
    Value 0. This is a MICROSAR 
    ECUM extension and identifies an 
    invalid wake-up source. 
    ECUM_WKSOURCE_<NAME>  
    Can be extended by configuration 
    EcuM_UserType 
    uint8 
    ID of the Users which 
    0..255 
    are able to request 
    The Range depends on the 
    RUN state. Each user 
    number of configured users 
    must have a unique ID. 
    EcuM_WakeupStateTy uint8 
    The type describes 
    ECUM_WKSTATUS_NONE  
    pe 
    possible results of the 
    The wake-up source is Disabled 
    WAKE-UP 
    ECUM_WKSTATUS_PENDING  
    VALIDATION state. 
    The wake-up event was detected 
    but not yet validated 
    ECUM_WKSTATUS_VALIDATED  
    The wake-up event is valid 
    ECUM_WKSTATUS_EXPIRED  
    The wake-up event has not been 
    validated and has already expired. 
    ECUM_WKSTATUS_ENABLED  
    The wake-up source is enabled 
    (armed) and is ready for detecting 
    wake-up events. 
    ECUM_WKSTATUS_CHECKWAKEUP 
    Asynchronous wake-up event is 
    detected but SetWakeupEvent has 
    not been called yet. 
    EcuM_BootTargetType  uint8 
    Defines the boot target  ECUM_BOOT_TARGET_APP  
    which should be 
    Boot into application mode 
    chosen in the next start  ECUM_BOOT_TARGET_BOOTLOAD
    up. 
    ER  
    Boot into boot loader mode 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    60 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Type Name 
    C-Type 
    Description 
    Value Range 
    EcuM_ResetType 
    uint8 
    This type describes 
    ECUM_RESET_MCU 
    the reset 
    Microcontroller reset via 
    mechanisms 
    Mcu_PerformReset 
    supported by the 
    ECUM_RESET_WDG 
    ECU State Manager.   Watchdog reset via 
     
    WdgM_PerformReset 
    It can be extended by  ECUM_RESET_IO 
    configuration. 
    Reset by toggling an I/O line 
    ECUM_RESET_WAKEUP 
    Reset in the case of a wake-up 
    event during shutdown 
    ECUM_RESET_<NAME> 
    Can be extended by configuration. 
    EcuM_ShutdownCau uint8 
    This type describes 
    ECUM_CAUSE_UNKNOWN 
    seType 
    the cause for a 
    No cause was set. 
    shutdown 
    ECUM_CAUSE_ECU_STATE 
    by the ECU State 
    ECU state machine entered a 
    Manager.  
    state for shutdown 
     
    ECUM_CAUSE_WDGM 
    It can be extended by  Watchdog Manager detected a 
    configuration. 
    failure 
    ECUM_CAUSE_DCM 
    Diagnostic Communication 
    Manager requests a  
    shutdown due to a service request 
    ECUM_CAUSE_<NAME> 
    Can be extended by configuration. 
    Table 5-1   Type definitions 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    61 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2 
    Services Provided by EcuM 
    5.2.1 
    EcuM_MainFunction 
    Prototype 
    void EcuM_MainFunction (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The service which implements all activities of the ECU state Manager while OS is up and running. In the 
    MainFunction the wake-up validation is handled. This service must be called on a periodic basis from an 
    adequate OS task. 
      The service also carries out the wake-up validation protocol. The smallest validation timeout 
    typically should limit the period. 
      As a rule of thumb, the period of this service should be in the order of half as long as the shortest 
    time constant mentioned in the topics above 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      Called by SchM 
    Call Context 
      Function could be called from task level 
    Table 5-2   EcuM_MainFunction 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    62 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.2 
    EcuM_Init 
    Prototype 
    void EcuM_Init (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The Init function is called to initiate the startup procedure that takes place before the OS is started. 
    Additionally in this API all EcuM variables that need initialization are initialized. 
     
     
     
    Caution 
    After EcuM_Init() the EcuM is not in the running state, to achieve this state 
      EcuM_StartupTwo() has to be called. 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      called by start-up code 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-3   EcuM_Init 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    63 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.3 
    EcuM_StartupTwo 
    Prototype 
    void EcuM_StartupTwo (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The function implements the startup phase where the OS is already running. EcuM_AL_DriverInitTwo() is 
    called within this function. This function should be scheduled by a task directly after StartOS() and only be 
    called once. 
     
     
     
    Caution 
    The integrator has to ensure that the EcuM_StartupTwo is not interrupted by any other 
      function or task. 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-4   EcuM_StartupTwo 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    64 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.4 
    EcuM_Shutdown 
    Prototype 
    void EcuM_Shutdown (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This function performs a reset or switches off the ECU (depending on which shutdown target is currently 
    chosen).  
     
     
    Note 
    This function shall be called inside the OS ShutdownHook() routine. The integrator is 
      responsible to perform this task. 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function should be called from the ShutdownHook of the Os. 
    Table 5-5   EcuM_Shutdown 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    65 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.5 
    EcuM_SelectShutdownTarget 
    Prototype 
    Std_ReturnType EcuM_SelectShutdownTarget  
    (EcuM_StateType targetState,        
    uint8 resetSleepMode) 
    Parameter 
    targetState 
    One of these values: 
      ECUM_STATE_OFF 
      ECUM_STATE_SLEEP 
      ECUM_STATE_RESET 
    resetSleepMode 
    Depending on the parameter targetState this represents a sleep mode or a 
    reset mode. 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    This service selects a shutdown target in which the shutdown sequence should change 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. The EcuM must be in RUN state. 
      The ECU State Manager does not define any mechanism to resolve issues arising from parallel 
    requests. It is rather assumed that there will be one application which is ECU specific and handles 
    these kinds of issues. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-6   EcuM_SelectShutdownTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    66 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.6 
    EcuM_GetShutdownTarget 
    Prototype 
    Std_ReturnType EcuM_GetShutdownTarget  (EcuM_StateType *target,  
     
    uint8 *resetSleepMode) 
    Parameter 
    target 
    One of these values: 
      ECUM_STATE_OFF 
      ECUM_STATE_SLEEP 
      ECUM_STATE_RESET 
    resetSleepMode 
    Depending on the parameter target this represents a sleep mode or a reset 
    mode. If the target is ECUM_STATE_OFF this parameter is 0. 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    Returns the actual chosen shutdown target. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-7   EcuM_GetShutdownTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    67 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.7 
    EcuM_GetLastShutdownTarget 
    Prototype 
    Std_ReturnType EcuM_GetLastShutdownTarget 
    (EcuM_StateType *target,       
     
    uint8 *resetSleepMode) 
    Parameter 
    target 
    One of these values: 
      ECUM_STATE_OFF 
      ECUM_STATE_SLEEP 
      ECUM_STATE_RESET 
    resetSleepMode 
    Depending on the parameter target this represents a sleep mode or a reset 
    mode. If the target is ECUM_STATE_OFF this parameter is 0. 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    This function returns not the current shutdown target but the shutdown target set before the last reset. This 
    function always shall return the same value until the next shutdown. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-8   EcuM_GetLastShutdownTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    68 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.8 
    EcuM_GetPendingWakeupEvents 
    Prototype 
    EcuM_WakeupSourceType EcuM_GetPendingWakeupEvents (void) 
    Parameter 
    void 
    none 
    Return code 
    EcuM_WakeupSourceTyp
    Every bit set in the return value indicates a wake-up source where the 

    validation is in progress. 
    Functional Description 
    Returns wake-up events which have been set but not yet validated. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-9   EcuM_GetPendingWakeupEvents 
    5.2.9 
    EcuM_ClearWakeupEvent 
    Prototype 
    void EcuM_ClearWakeupEvent (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    Wake-up event(s) which should be cleared 
    Return code 
    void 
    none 
    Functional Description 
    Clears the pending, validated and expired wake-up events which are passed by the parameter. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-10   EcuM_ClearWakeupEvent 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    69 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.10  EcuM_ClearValidatedWakeupEvent 
    Prototype 
    void EcuM_ClearValidatedWakeupEvent (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    Wake-up event(s) which should be cleared 
    Return code 
    void 
    none 
    Functional Description 
    Clears only the validated wake-up events which are passed by the parameter. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-11   EcuM_ClearValidatedWakeupEvent 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    70 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.11  EcuM_GetValidatedWakeupEvents 
    Prototype 
    EcuM_WakeupSourceType EcuM_GetValidatedWakeupEvents (void) 
    Parameter 
    void 
    none 
    Return code 
    EcuM_WakeupSourceType  ID of the wake-up source which was responsible for the wake-up 
    Functional Description 
    This function returns wake-up event which causes the wake-up of the ECU from the previous sleep mode. 
     
     
    Caution 
    The validated Wake-up Events must be cleared before the EcuM is set to sleep. The 
      EcuM does not clear those events by itself. 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-12   EcuM_GetValidatedWakeupEvents 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    71 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.12  EcuM_GetExpiredWakeupEvents 
    Prototype 
    EcuM_WakeupSourceType EcuM_GetExpiredWakeupEvents (void) 
    Parameter 
    void 
    none 
    Return code 
    EcuM_WakeupSourceType  ID's of wake-up sources which are expired in the validation process. 
    Functional Description 
    Returns all events that have been set and for which validation has failed. Events which do not need 
    validation must never be reported by this service. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-13   EcuM_GetExpiredWakeupEvents 
    5.2.13  EcuM_GetBootTarget 
    Prototype 
    Std_ReturnType EcuM_GetBootTarget (EcuM_BootTargetType *BootTarget) 
    Parameter 
    BootTarget 
    The current selected BootTarget 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    Returns the current selected boot target of the ECU. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-14   EcuM_GetBootTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    72 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.14  EcuM_SelectBootTarget 
    Prototype 
    Std_ReturnType EcuM_SelectBootTarget (EcuM_BootTargetType BootTarget) 
    Parameter 
    BootTarget 
    The selected BootTarget 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    Sets the boot target for the next boot. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-15   EcuM_SelectBootTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    73 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.15  EcuM_StartCheckWakeup   
    Prototype 
    void EcuM_StartCheckWakeup (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    ID of the asynchronous wake-up source  
    Return code 
    void 
    none 
    Functional Description 
    This function starts the check wakeup timeout mechanism and marks that the wakeup source has an 
    unapproved CheckWakeup call if applicable on given wakeup source (check wakeup timeout > 0). 
     
     
    Caution 
    This service shall only be called by EcuM_CheckWakeup(). The call is generated 
      automatically if at least one wake-up source has a configured check wakeup timeout. 
     
     
     
    Particularities and Limitations 
      This service is synchronous. 
      This service is reentrant for the same WakeupSource. 
      This service is always available. 
    Call Context 
      Expected to be called in interrupt context. 
    Table 5-16   EcuM_StartCheckWakeup 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    74 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.16  EcuM_EndCheckWakeup  
    Prototype 
    void EcuM_EndCheckWakeup (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    ID of the asynchronous wake-up source  
    Return code 
    void 
    none 
    Functional Description 
    This function stops the check wakeup timeout mechanism and removes the wakeup source from the list of 
    unapproved CheckWakeup calls. 
    Particularities and Limitations 
      This service is synchronous. 
      This service is reentrant for the same WakeupSource. 
      This service is always available. 
    Call Context 
      Expected to be called in interrupt context. 
    Table 5-17   EcuM_EndCheckWakeup 
    5.2.17  EcuM_GetVersionInfo 
    Prototype 
    void EcuM_GetVersionInfo (Std_VersionInfoType *versioninfo) 
    Parameter 
    versioninfo 
    pointer to store the version information 
    Return code 
    void 
    none 
    Functional Description 
    Returns the version information of the ECU State Manager. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      The availability of this service depends on ECUM_VERSION_INFO_API. 
    Call Context 
      Function could be called from task level 
    Table 5-18   EcuM_GetVersionInfo 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    75 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.18  EcuM_RequestRUN 
    Prototype 
    Std_ReturnType EcuM_RequestRUN (EcuM_UserType user) 
    Parameter 
    user 
    User ID which requests the RUN state 
    Return code 
    E_OK 
    Request accepted  
    E_NOT_OK 
    Request not accepted 
    Functional Description 
    Places a RUN request for this user, Users represents normally an application. The tracking of the requests 
    are specific for each user. 
     
     
     
    Note 
    RUN request will be ignored after an API call to EcuM_KillAllRUNRequest(). 
     
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-19   EcuM_RequestRUN 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    76 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.19  EcuM_ReleaseRUN 
    Prototype 
    Std_ReturnType EcuM_ReleaseRUN (EcuM_UserType user) 
    Parameter 
    user 
    User ID which requests the RUN state 
    Return code 
    E_OK 
    Request accepted  
    E_NOT_OK 
    Request not accepted 
    Functional Description 
    Releases the RUN request previously done with a call to EcuM_RequestRUN(). 
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-20   EcuM_ReleaseRUN 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    77 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.2.20  EcuM_RequestPOST_RUN 
    Prototype 
    Std_ReturnType EcuM_RequestPOST_RUN (EcuM_UserType user) 
    Parameter 
    user 
    User ID which requests the RUN state 
    Return code 
    E_OK 
    Request accepted  
    E_NOT_OK 
    Request not accepted 
    Functional Description 
    Places a POST_RUN request for this user, Users represents normally an application. The tracking of the 
    requests are specific for each user. 
     
     
     
    Note 
    POST_RUN request will be ignored after an API call to 
      EcuM_KillAllPostRUNRequest(). 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-21   EcuM_RequestPOST_RUN 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    78 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.2.21  EcuM_ReleasePOST_RUN 
    Prototype 
    Std_ReturnType EcuM_ReleasePOST_RUN (EcuM_UserType user) 
    Parameter 
    user 
    User ID which requests the RUN state 
    Return code 
    E_OK 
    Request accepted  
    E_NOT_OK 
    Request not accepted 
    Functional Description 
    Releases the POST_RUN request previously done with a call to EcuM_RequestPOST_RUN().  
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-22   EcuM_ReleasePOST_RUN 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    79 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3 
    Services Provided by EcuM flex 
    In the following the services are described which are only relevant for EcuM flex: 
    5.3.1 
    EcuM_SelectShutdownCause 
    Prototype 
    Std_ReturnType EcuM_SelectShutdownCause  
    (EcuM_ShutdownCauseType      
     
    shutdownCause) 
    Parameter 
    shutdownCause 
    current shutdown cause 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    Selects a new Shutdown cause for an intended shutdown. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-23   EcuM_SelectShutdownCause 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    80 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.2 
    EcuM_GetShutdownCause 
    Prototype 
    Std_ReturnType EcuM_GetShutdownCause  
    (EcuM_ShutdownCauseType           
     
    *shutdownCause) 
    Parameter 
    shutdownCause 
    current shutdown cause 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    Get the currently set shutdown cause. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-24   EcuM_GetShutdownCause 
    5.3.3 
    EcuM_GoHalt 
    Prototype 
    Std_ReturnType EcuM_GoHalt (void) 
    Parameter 
    void 
    none 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    This API is called in some modes for saving power. In this mode no more code is executed after entering 
    that state. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      The selected shutdown target must set to ECUM_STATE_SLEEP 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-25   EcuM_GoHalt 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    81 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.4 
    EcuM_GoPoll 
    Prototype 
    Std_ReturnType EcuM_GoPoll (void) 
    Parameter 
    void 
    none 
    Return code 
    E_OK 
    success 
    E_NOT_OK 
    error 
    Functional Description 
    This API is called in some modes for saving power. In this mode code is executed, so the EcuM poll for 
    wake-up events. Only those Wake-up Sources with configured parameter EcuMWakeupSourcePolling are 
    polled during that sleep mode. Other active sources can set wake-up events via interrupts. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      The selected shutdown target must set to ECUM_STATE_SLEEP 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-26   EcuM_GoPoll 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    82 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.5 
    EcuM_GoDown 
    Prototype 
    Std_ReturnType EcuM_GoDown (uint16 caller) 
    Parameter 
    void 
    none 
    Return code 
    Std_ReturnType 
    none 
    Functional Description 
    This routine is called to initiate a shutdown or a reset. The routine checks if the caller is one of the allowed 
    callers (if defensive behavior is configured) and then the EcuM calls ShutdownOS() and thereafter the API 
    EcuM_Shutdown() is called by the shutdown hook. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
      The selected shutdown target must set to ECUM_STATE_OFF or ECUM_STATE_RESET 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-27   EcuM_GoDown 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    83 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.6 
    EcuM_GoToSelectedShutdownTarget 
    Prototype 
    Std_ReturnType EcuM_GoToSelectedShutdownTarget(void) 
    Parameter 
    void 
    none 
    Return code 
    E_OK 
     
    E_NOT_OK 
     
    Functional Description 
    This API can be called e.g. from the BswM without knowledge about the currently 
    configured shutdown target. The EcuM decides if EcuM_GoHalt(), EcuM_GoPoll() or 
    EcuM_GoDown() has to be called. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-28   EcuM_GoToSelectedShutdownTarget 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    84 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.3.7 
    EcuM_SetRelWakeupAlarm 
    Prototype 
    Std_ReturnType EcuM_SetRelWakeupAlarm (EcuM_UserType user, uint32 time) 
    Parameter 
    user 
    The user that wants to set up the wake up alarm 
    time 
    Relative time for the wake-up alarm in seconds 
    Return code 
    E_OK 
    Alarm was successfully started 
    E_NOT_OK 
    No Alarm was started because of an invalid user parameter 
    E_EARLIER_ACTIVE 
    An earlier alarm was already started 
    Functional Description 
    This API can be used to set a relative wake up alarm during runtime of the ECU. For further information 
    about this see chapter 3.14. 
     
     
     
    Caution 
    All wake up alarms are cleared if the ECU wakes up from a sleep phase, even if the 
      reason for this wake up was not time triggered. The wake up alarms must be rearmed 
    before the next sleep phase is entered. 
     
     
     
     
    Note 
    Each user can only set one wake-up alarm. 
     
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-29   EcuM_SetRelWakeupAlarm 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    85 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.3.8 
    EcuM_SetAbsWakeupAlarm 
    Prototype 
    Std_ReturnType EcuM_SetAbsWakeupAlarm (EcuM_UserType user, uint32 time) 
    Parameter 
    user 
    The user that wants to set up the wake-up alarm 
    time 
    Absolute time for the wake-up alarm in seconds 
    Return code 
    E_OK 
    Alarm was successfully started 
    E_NOT_OK 
    No Alarm was started because of an invalid user parameter 
    E_EARLIER_ACTIVE 
    An earlier alarm was already started 
    E_PAST 
    The time has already passed 
    Functional Description 
    This API can be used to set an absolute wake up alarm during runtime of the ECU. For further information 
    about this see chapter 3.14. 
     
     
    Caution 
    All wake up alarms are cleared if the ECU wakes up from a sleep phase, even if the 
      reason for this wake up was not time triggered. The wake up alarms must be rearmed 
    before the next sleep phase is entered. 
     
     
     
     
    Note 
    Each user can only set one wake-up alarm. 
     
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-30   EcuM_SetAbsWakeupAlarm 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    86 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.9 
    EcuM_AbortWakeupAlarm 
    Prototype 
    Std_ReturnType EcuM_AbortWakeupAlarm (EcuM_UserType user) 
    Parameter 
    user 
    The user that wants to abort the wake-up alarm 
    Return code 
    E_OK 
    Alarm was successfully aborted 
    E_NOT_OK 
    The parameter ‘user’ was not valid 
    E_NOT_ACTIVE 
    No alarm was active for this user 
    Functional Description 
    This API can be used to abort a wake-up alarm which was set via the APIs EcuM_SetRelWakeupAlarm or 
    EcuM_SetAbsWakeupAlarm.  
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-31   EcuM_AbortWakeupAlarm 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    87 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.3.10  EcuM_GetWakeupTime 
    Prototype 
    Std_ReturnType EcuM_GetWakeupTime (uint32 *time) 
    Parameter 
    time 
    Absolute time of the next configured wake-up alarm in seconds 
    Return code 
    E_OK 
    Time was successfully returned 
    E_NOT_OK 
    A null pointer was passed as parameter ‘time’ 
    Functional Description 
    Returns the time of the next active wake-up alarm which was set via the APIs EcuM_SetAbsWakeupAlarm 
    or EcuM_SetRelWakeupAlarm. 
     
     
     
    Note 
    If the returned value equals ‘0xFFFFFFFF’, no wake-up alarm is currently active 
     
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-32   EcuM_GetWakeupTime 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    88 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.11  EcuM_SetClock 
    Prototype 
    Std_ReturnType EcuM_SetClock (EcuM_UserType user, uint32 time) 
    Parameter 
    user 
    The user that wants to set up the clock 
    time 
    The absolute time value designated for the new time in seconds 
    Return code 
    E_OK 
    Time was successfully modified 
    E_NOT_ALLOWED 
    The user was not allowed to modify the time 
    Functional Description 
    This API can be used to modify the current time. Only special users are allowed to modify this time, e.g. for 
    test purposes. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-33   EcuM_SetClock 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    89 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.12  EcuM_GetCurrentTime 
    Prototype 
    Std_ReturnType EcuM_GetCurrentTime (uint32 *time) 
    Parameter 
    time 
    Current system time in seconds 
    Return code 
    E_OK 
    Time was successfully returned 
    E_NOT_OK 
    A null pointer was passed as parameter ‘time’ 
    Functional Description 
    This API can be used to get the current system time.  
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-34   EcuM_GetCurrentTime 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    90 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.3.13  EcuM_SetState 
    Prototype 
    void EcuM_SetState(EcuM_StateType state); 
    Parameter 
    state 
    State indicated by BswM 
    Return code 
    void 
    none 
    Functional Description 
    Requests a specific state which will be mapped to the corresponding RTE mode. This mode will be used 
    to trigger a RTE mode switch. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-35   EcuM_SetState 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    91 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.4 
    Services Provided by EcuM fixed 
    In the following the services are described which are only relevant for EcuM fixed: 
    5.4.1 
    EcuM_GetState 
    Prototype 
    Std_ReturnType EcuM_GetState (EcuM_StateType* state) 
    Parameter 
    state 
    Current EcuM State 
    Return code 
    E_OK 
    The parameter state was a not NULL_PTR 
    E_NOT_OK 
    The parameter state was a NULL_PTR 
    Functional Description 
    This API returns the current EcuM State. The possible EcuM States for the fixed EcuM can be seen in 
    chapter 3.3 States of EcuM fixed. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is reentrant. 
    Call Context 
      Function could be called from task level 
    Table 5-36   EcuM_GetState 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    92 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.4.2 
    EcuM_KillAllRUNRequests 
    Prototype 
    void EcuM_ KillAllRUNRequests (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    Deletes all RUN requests and ensures that no new RUN request is accepted. Additionally the EcuM self-
    run request period will be aborted. 
     
     
     
    Note 
    The benefit of this function over an ECU reset is that the shutdown sequence is  
      executed, which e.g. takes care of writing back NV memory contents. 
     
     
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-37   EcuM_ KillAllRUNRequests 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    93 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.4.3 
    EcuM_KillAllPostRUNRequests 
    Prototype 
    void EcuM_ KillAllPostRUNRequests (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    Deletes all POST_RUN requests and ensures that no new POST_RUN request is accepted.  
     
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from application context. 
    Table 5-38   EcuM_ KillAllPostRUNRequests 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    94 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.5 
    Services Used by EcuM 
    In the following table services provided by other components, which are used by the EcuM 
    are listed. Also refer to chapter 2.1. 
    For  details  about  prototype  and  functionality  refer  to  the  documentation  of  the  providing 
    component. 
    Component  API 
    EcuM 
    EcuM 
    flex 
    fixed 
    BswM 
    BswM_EcuM_CurrentWakeup() 
     
     
    BswM_Init() 
     
     
    BswM_Deinit() 
     
     
    BswM_EcuM_RequestedState() 
     
     
    BswM_EcuM_CurrentState() 
     
     
    ComM 
    ComM_EcuM_WakeUpIndication() 
     
     
    ComM_EcuM_PNCWakeUpIndication() 
     
     
    ComM_GetStatus() 
     
     
    ComM_GetState() 
     
     
    ComM_CommunicationAllowed() 
     
     
    ComM_DeInit() 
     
     
    Det 
    Det_ReportError() 
     
     
    Dem 
    Dem_ReportErrorStatus() 
     
     
    Dem_Init() 
     
     
    Dem_Shutdown() 
     
     
    Gpt 
    Gpt_EnableNotification() 
     
     
    Gpt_EnableWakeup() 
     
     
    Gpt_SetMode() 
     
     
    Gpt_StartTimer() 
     
     
    Mcu 
    Mcu_SetMode() 
     
     
    Mcu_GetResetReason() 
     
     
    NvM 
    NvM_WriteAll() 
     
     
    NvM_CancelWriteAll() 
     
     
    NvM_KillWriteAll() 
     
     
    OS 
    ShutdownOS() 
     
     
    StartOS() 
     
     
    GetResource() 
     
     
    ReleaseResource() 
     
     
    EnableAllInterrupts() 
     
     
    DisableAllInterrupts() 
     
     
    RTE 
    Rte_Start() 
     
     
    Rte_Stop() 
     
     
    Rte_Switch_currentMode_currentMode() 
     
     
    Rte_Feedback_currentMode_currentMode() 
     
     
    SchM 
    SchM_Init() 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    95 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    Component  API 
    EcuM 
    EcuM 
    flex 
    fixed 
    SchM_Deinit() 
     
     
    SchM_Enter_EcuM_ECUM_EXCLUSIVE_AREA_0() 
     
     
    SchM_Exit_EcuM_ECUM_EXCLUSIVE_AREA_0() 
     
     
    SchM_Enter_EcuM_ECUM_EXCLUSIVE_AREA_1() 
     
     
    SchM_Exit_EcuM_ECUM_EXCLUSIVE_AREA_1() 
     
     
    SchM_Enter_EcuM_ECUM_EXCLUSIVE_AREA_2() 
     
     
    SchM_Exit_EcuM_ECUM_EXCLUSIVE_AREA_2() 
     
     
    Table 5-39   Services used by the EcuM 
    5.6 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the  EcuM and can 
    be invoked by other modules. The prototypes of the callback functions are provided in the 
    header file EcuM_Cbk.h by the EcuM. 
    5.6.1 
    EcuM_SetWakeupEvent 
    Prototype 
    void EcuM_SetWakeupEvent (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    the source of the wake-up event. 
    Return code 
    void 
    none 
    Functional Description 
    Marks a wake-up event as pending if validation is required. If no validation is required then 
    EcuM_ValidateSetWakeupEvent will be called within this function. 
    Particularities and Limitations 
      None 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-40   EcuM_SetWakeupEvent 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    96 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.6.2 
    EcuM_ValidateWakeupEvent 
    Prototype 
    void EcuM_ValidateWakeupEvent (EcuM_WakeupSourceType WakeupSource) 
    Parameter 
    WakeupSource 
    the wake-up source which should be validated 
    Return code 
    void 
    none 
    Functional Description 
    After wake-up, the ECU State Manager will stop the process during the WAKE-UP VALIDATION state to 
    wait for validation of the wake-up event. The validation is carried out with a call of this API service. 
    Particularities and Limitations 
      Only ComM channels can validate Wake-up Events during ECUM_STATE_RUN. 
    Call Context 
      Function could be called from interrupt level or from task level 
    Table 5-41   EcuM_ValidateWakeupEvent 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    97 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.6.3 
    EcuM_AlarmCheckWakeup 
    Prototype 
    void EcuM_AlarmCheckWakeup(void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This API is used to update the system clock. The API is called by the EcuM callout EcuM_CheckWakeup or 
    directly by the GPT after one second has elapsed. 
    If during sleep the wake-up alarm which was set via the APIs EcuM_SetAbsWakeupAlarm or 
    EcuM_SetRelWakeupAlarm has expired, this API call will lead to a wake-up event. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from interrupt level 
    Table 5-42   EcuM_AlarmCheckWakeup 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    98 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.6.4 
    Callback Functions by EcuM fixed 
    5.6.4.1 
    EcuM_CB_NfyNvMJobEnd 
    Prototype 
    void EcuM_CB_NfyNvMJobEnd (uint8 ServiceID, NvM_RequestResultType JobResult) 
    Parameter 
    ServiceID 
    Unique service ID of NVRAM manger service. 
    JobResult 
    [parameter is ignored by EcuM fixed] 
    Return code 
    void 
    none 
    Functional Description 
    Used to notify about the end of NVRAM jobs initiated by ECUM. 
    Particularities and Limitations 
      Service ID: see table 'Service IDs'  
      This function is synchronous. 
      This function is non-reentrant. 
    Call Context 
      Function could be called from interrupt level 
    Table 5-43   EcuM_AlarmCheckWakeup 
     
    5.7 
    Configurable Interfaces 
    5.7.1 
    Notifications 
    The EcuM does not provide notifications. 
    5.7.2 
    Callout Functions 
    At  its  configurable  interfaces  the  EcuM  defines  callout  functions. The  declarations  of  the 
    callout functions are provided by the BSW module, i.e. the EcuM. It is the integrator's task 
    to  provide  the  corresponding  function  definitions.  The  definitions  of  the  callouts  can  be 
    adjusted to the system's needs. The  EcuM  callout function declarations are  described in 
    the following tables: 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    99 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.1 
    EcuM_ErrorHook 
    Prototype 
    void EcuM_ErrorHook (Std_ReturnType reason) 
    Parameter 
    reason 
    The reason for the current call of the ErrorHook. 
    Return code 
    void 
    none 
    Functional Description 
    The ECU State Manager calls the Errorhook if the following error code occur: 
      ECUM_E_HOOK_RAM_CHECK_FAILED 
    In that case it is not possible to continue processing. The integrator has to take the decision how the ECU 
    shall react in that situation.  
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in application context. 
    Table 5-44   EcuM_ErrorHook 
    5.7.2.2 
    EcuM_OnGoOffOne 
    Prototype 
    void EcuM_OnGoOffOne (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of additional activities in GO OFF I state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context  
      Called right after entering ECUM_STATE_GO_OFF_ONE. 
    Table 5-45   EcuM_OnGoOffOne 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    100 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.3 
    EcuM_OnGoOffTwo 
    Prototype 
    void EcuM_OnGoOffTwo (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of additional activities in GO OFF II state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context  
      Called right after entering ECUM_STATE_GO_OFF_TWO. 
    Table 5-46   EcuM_OnGoOffTwo 
    5.7.2.4 
    EcuM_AL_SwitchOff 
    Prototype 
    void EcuM_AL_SwitchOff (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout shall take the code for shutting off the power supply of the ECU. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in EcuM_Shutdown(), task context 
    Table 5-47   EcuM_AL_SwitchOff 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    101 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.5 
    EcuM_AL_Reset 
    Prototype 
    void EcuM_AL_Reset (EcuM_ResetType Reset) 
    Parameter 
    Reset 
    The parameter Reset describes the ResetType (refer to 5.1) that is currently 
    configured via EcuM_SelectShutdownTarget () (refer to 5.2.5). 
    Return code 
    void 
    none 
    Functional Description 
    This callout shall take the decision what kind of reset to be performed depending on the given Reset mode.  
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in application context. 
    Table 5-48   EcuM_AL_Reset 
    5.7.2.6 
    EcuM_AL_DriverInitZero 
    Prototype 
    void EcuM_AL_DriverInitZero (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout is invoked early in the PreOS Sequence during EcuM_Init(). 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
    Call Context 
      Invoked in EcuM_Init(), task context 
    Table 5-49   EcuM_AL_DriverInitZero 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    102 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.7.2.7 
    EcuM_AL_DriverInitOne 
    Prototype 
    void EcuM_AL_DriverInitOne (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout is invoked late in the PreOS Sequence during EcuM_Init(). 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
     
     
    Note 
    PostBuild data can be accessed via the global pointer EcuM_GlobalPBConfig_Ptr, 
      example: EcuM_GlobalPBConfig_Ptr->CfgPtr_Com_Init. 
     
     
     
     
    Note 
    Variant data can be accessed via the global pointer EcuM_GlobalPCConfig_Ptr, 
      example: EcuM_GlobalPCConfig_Ptr->CfgPtr_ComM_Init. 
     
     
     
    Call Context 
      Invoked in EcuM_Init(), task context 
    Table 5-50   EcuM_AL_DriverInitOne 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    103 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.7.2.8 
    EcuM_AL_DriverRestart 
    Prototype 
    void EcuM_AL_DriverRestart (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout shall provide driver initialization and other hardware related startup activities after a wake-up 
    event from SLEEP state. This callout should be a combination of EcuM_DriverInitZero and 
    EcuM_DriverInitOne. 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
     
     
    Note 
    PostBuild data can be accessed via the global pointer EcuM_GlobalPBConfig_Ptr, 
      example: EcuM_GlobalPBConfig_Ptr->CfgPtr_Com_Init. 
     
     
     
     
    Note 
    Variant data can be accessed via the global pointer EcuM_GlobalPCConfig_Ptr, 
      example: EcuM_GlobalPCConfig_Ptr->CfgPtr_ComM_Init. 
     
     
     
    Call Context 
      Invoked directly after the wake-up phase 
    Table 5-51   EcuM_AL_DriverRestart 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    104 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.9 
    EcuM_AL_SetProgrammableInterrupts 
    Prototype 
    void EcuM_AL_SetProgrammableInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    On ECUs with programmable interrupt priorities, these priorities must be set before the OS is started. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in EcuM_Init(), task context 
    Table 5-52   EcuM_AL_SetProgrammableInterrupts 
    5.7.2.10  EcuM_McuSetMode 
    Prototype 
    void EcuM_McuSetMode (Mcu_ModeType McuMode) 
    Parameter 
    McuMode 
    Mode for the upcoming sleep mode 
    Return code 
    void 
    none 
    Functional Description 
    Switches the Mcu to a power saving mode during a sleep phase. 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_GoHalt() or EcuM_GoPoll() 
    Table 5-53   EcuM_McuSetMode 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    105 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.2.11  EcuM_WaitForSlaveCores 
    Prototype 
    void EcuM_WaitForSlaveCores (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    Is only called if EcuMSlaveCoreHandling is active. During the master core is waiting for the slave cores to 
    be ready for the upcoming sleep this callout is called cyclically.  
    In context of this callout the slave cores can be initiated to enter sleep. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called by EcuM_GoHalt() or EcuM_GoPoll() 
    Table 5-54   EcuM_WaitForSlaveCores 
     
    5.7.2.12  EcuM_StartOS 
    Prototype 
    void EcuM_StartOS (AppModeType appMode) 
    Parameter 
    appMode 
    Default OS application Mode 
    Return code 
    void 
    none 
    Functional Description 
    This callout is called at the end of EcuM_Init() to start the OS. 
     
     
    Note 
    In case of a MultiCore ECU all slave cores are started from the Master Core via the OS 
      API StartCore() before the OS is started with a call to StartOS(). 
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_Init() 
    Table 5-55   EcuM_StartOS 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    106 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.2.13  EcuM_ShutdownOS 
    Prototype 
    void EcuM_ShutdownOS (Std_ReturnType ErrCode) 
    Parameter 
    ErrCode 
    E_OK 
    Return code 
    void 
    none 
    Functional Description 
    This callout is called at the end of EcuM_GoDown() to shut down the OS via 
    ShutdownOS(E_OK). 
     
     
    Note 
    In case of a MultiCore ECU this callout should lead to a call of 
      ShutdownAllCores(E_OK), inside this OS API all cores are synchronized and stopped. 
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_GoDown() 
    Table 5-56   EcuM_ShutdownOS 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    107 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.14  EcuM_GenerateRamHash 
    Prototype 
    void EcuM_GenerateRamHash (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout is intended to provide a RAM integrity test. The goal of this test is to ensure that after a long 
    SLEEP duration, RAM contents are still consistent. The RAM check itself must be provided by the 
    integrator. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context  
      Invoked just before setting the ECU into a sleep mode where the ECU is halted 
    Table 5-57   EcuM_GenerateRamHash 
    5.7.2.15  EcuM_CheckRamHash 
    Prototype 
    uint8 EcuM_CheckRamHash (void) 
    Parameter 
    void 
    none 
    Return code 

    Integrity test failed 
    1…255 
    Integrity test passed 
    Functional Description 
    This callout is intended to provide a RAM integrity check previously done with EcuM_GenerateRamHash(). 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
       Invoked in task context  
       Directly called after the wake-up of the ECU. 
    Table 5-58   EcuM_CheckRamHash 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    108 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.2.16  EcuM_SleepActivity 
    Prototype 
    void EcuM_SleepActivity (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The ECU State Manager invokes this callout periodically during the Poll Sequence if the MCU is not halted. 
    The EcuM polls periodically all sources that need polling and are active during the configured Sleep mode. 
    After all sources are polled EcuM_SleepActivity is called once. 
     
     
    Caution 
    The EcuM_SleepActivity is called in a blocking loop at maximum frequency. If a 
      lower period is preferred, the integrator has to implement this behavior. 
     
     
     
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in task context. 
    Table 5-59   EcuM_SleepActivity 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    109 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.17  EcuM_EnableWakeupSources 
    Prototype 
    void EcuM_EnableWakeupSources (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    Every bit set in the parameter indicates a wake-up source which should be 
    enabled in the current sleep mode. 
    Return code 
    void 
    none 
    Functional Description 
    This callout will be invoked when the EcuM enters a sleep state. The EcuM calls this callout for every bit 
    that is set as an active source for the current Sleep mode.  
    The integrator has to take care to implement the necessary activities to enable the corresponding wake-up 
    sources. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Invoked just before setting the ECU into a sleep mode 
    Table 5-60   EcuM_EnableWakeupSources 
    5.7.2.18  EcuM_DisableWakeupSources 
    Prototype 
    void EcuM_DisableWakeupSources (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    Every bit set in the parameter indicates a wake-up source which should be 
    enabled in the current sleep mode. 
    Return code 
    void 
    none 
    Functional Description 
    This callout will be invoked when the EcuM leaves a sleep state. The EcuM disables all wake-up sources 
    that have occurred during the recent sleep phase. The not occurred sources remain active till the EcuM 
    transits to ECUM_STATE_RUN after the successful validation of a wake-up source. 
    The integrator has to take care to implement the necessary activities to disable the corresponding wake-up 
    sources. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context  
      Called just before RUN state is entered after a sleep     OR 
      Called just before WAKEUP_VALIDATION state is entered 
    Table 5-61   EcuM_DisableWakeupSources 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    110 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.19  EcuM_StartWakeupSources 
    Prototype 
    void EcuM_StartWakeupSources (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    Every bit set in the parameter indicates a wake-up source which is enabled in 
    the current sleep mode. 
    Return code 
    void 
    none 
    Functional Description 
    The callout shall start the given wake-up source(s) so that they are ready to perform wake-up validation.  
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in task context. 
    Table 5-62   EcuM_StartWakeupSources 
    5.7.2.20  EcuM_StopWakeupSources 
    Prototype 
    void EcuM_StopWakeupSources (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    Every bit set in the parameter indicates a wake-up source which should be 
    stopped after unsuccessful wake-up validation. 
    Return code 
    void 
    none 
    Functional Description 
    This callout shall stop the given wake-up source(s) after unsuccessful wake-up validation.  
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in task context. 
    Table 5-63   EcuM_StopWakeupSources 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    111 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.21  EcuM_CheckWakeup 
    Prototype 
    void EcuM_CheckWakeup (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    ID of the wake-up source to be checked 
    Return code 
    void 
    none 
    Functional Description 
    This callout shall be called by the ISR of a wake-up source to set up the PLL and check wake-up sources 
    that may be connected to the same interrupt. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in interrupt context. 
    Table 5-64   EcuM_CheckWakeup 
    5.7.2.22  EcuM_CheckValidation 
    Prototype 
    void EcuM_CheckValidation (EcuM_WakeupSourceType wakeupSource) 
    Parameter 
    wakeupSource 
    Wake-up IDs of pending wake-up events. 
    Return code 
    void 
    none 
    Functional Description 
    This callout is called by the EcuM when wake-up validation of a wake-up event is necessary. The pending 
    wake-up event(s) are passed by the parameter in order to allow the necessary reaction depending on the 
    wake-up source. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context  
      Called in WAKE-UP VALIDATION state 
    Table 5-65   EcuM_CheckValidation 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    112 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.2.23  EcuM_DeterminePbConfiguration 
    Prototype 
    EcuM_ConfigRefType EcuM_DeterminePbConfiguration (void) 
    Parameter 
    void 
    none 
    Return code 
    EcuM_ConfigRefType 
    Pointer to the Post-Build structure 
    Functional Description 
    In the case of Post-Build Loadable or Selectable the EcuM gets the global configuration pointer via this 
    callout.  
     
     
    Note 
    In case of a MultiCore ECU this callout is only called on the core which starts up first. 
     
     
     
     
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Expected to be called in application context. 
    Table 5-66   EcuM_DeterminePbConfiguration 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    113 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.2.24  EcuM_BswErrorHook 
    Prototype 
    void EcuM_BswErrorHook (uint16 BswModuleId, uint8 ErrorId) 
    Parameter 
    BswModuleId 
    The reporting BSW module 
    ErrorId 
    The Id of the reported error 
    Return code 
    void 
    none 
    Functional Description 
    This API can be called by Basic Software Modules to notify corrupted Postbuild configuration data. 
     
    Specified ErrorIds are: 
      ECUM_BSWERROR_NULLPTR 
      ECUM_BSWERROR_COMPATIBILITYVERSION 
      ECUM_BSWERROR_MAGICNUMBER 
    Particularities and Limitations 
      The handling of an occurred error has to be specified by the integrator. 
    Call Context 
      Invoked in task context. 
    Table 5-67   EcuM_BswErrorHook 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    114 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.3 
    Callout Functions by EcuM flex 
    5.7.3.1 
    EcuM_GptStartClock 
    Prototype 
    void EcuM_GptStartClock (Gpt_ChannelType GptChannel, Gpt_ModeType Mode, 
    Gpt_ValueType Value) 
    Parameter 
    GptChannel 
    The configured Gpt channel which serves as time base for alarm clock 
    Mode 
    The Gpt normal mode 
    Value 
    The value to start the Gpt timer for second based notification / wake up 
    Return code 
    Void 
    none 
    Functional Description 
    This callout prepares the Gpt for calling the callback EcuM_AlarmCheckWakeup every second to increment 
    the system time. 
     
     
    Note 
    This callout is only active if the EcuM alarm clock is enabled 
     
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_StartupTwo(). 
    Table 5-68   EcuM_GptStartClock 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    115 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.3.2 
    EcuM_GptSetSleep 
    Prototype 
    void EcuM_GptSetSleep (Gpt_ChannelType GptChannel, Gpt_ModeType Mode) 
    Parameter 
    GptChannel 
    The configured Gpt channel which serves as time base for alarm clock 
    Mode 
    The Gpt sleep mode 
    Return code 
    Void 
    none 
    Functional Description 
    This callout sets the Gpt to sleep mode and enables the wake up functionality of the Gpt.  
     
     
    Note 
    This callout is only active if the EcuM alarm clock is enabled 
     
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_GoHalt() or EcuM_GoPoll() 
    Table 5-69   EcuM_GptSetSleep 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    116 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.3.3 
    EcuM_GptSetNormal 
    Prototype 
    void EcuM_GptSetNormal (Gpt_ChannelType GptChannel, Gpt_ModeType Mode) 
    Parameter 
    GptChannel 
    The configured Gpt channel which serves as time base for alarm clock 
    Value 
    The Gpt normal mode  
    Return code 
    Void 
    none 
    Functional Description 
    This callout sets the Gpt back to normal mode after the ECU has woken up from a sleep mode. 
     
     
    Note 
    This callout is only active if the EcuM alarm clock is enabled 
     
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be adapted by the integrator. 
    Call Context 
      Expected to be called by EcuM_GoHalt() or EcuM_GoPoll() 
    Table 5-70   EcuM_GptSetNormal 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    117 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.7.3.4 
    EcuM_AL_DriverInitBswM_<ID> 
    Prototype 
    void EcuM_AL_DriverInitBswM_<ID> (const EcuM_ConfigType *ConfigPtr) 
    Parameter 
    ConfigPtr 
    Pointer to global module configuration structure.  
    Return code 
    void 
    none 
    Functional Description 
    This callout can be invoked by the BswM to initialize the stack of the ECU. 
     
     
     
    Note 
    The ID and the count of this callout depends on the configuration. The integrator can 
      configure multiple driver init lists of this type. 
     
     
     
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
    Call Context 
      Invoked in BswM_Init(), task context 
    Table 5-71   EcuM_AL_DriverInitBswM 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    118 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.7.4 
    Callout Functions by EcuM fixed 
    5.7.4.1 
    EcuM_AL_DriverInitTwo 
    Prototype 
    void EcuM_AL_DriverInitTwo (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout is invoked during EcuM_StartupTwo(), prior the Rte is started. 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
     
     
    Note 
    PostBuild data can be accessed via the global pointer EcuM_GlobalPBConfig_Ptr, 
      example: EcuM_GlobalPBConfig_Ptr->CfgPtr_Com_Init. 
     
     
     
     
    Note 
    Variant data can be accessed via the global pointer EcuM_GlobalPCConfig_Ptr, 
      example: EcuM_GlobalPCConfig_Ptr->CfgPtr_ComM_Init. 
     
     
     
    Call Context 
      Invoked in EcuM_StartupTwo(), task context 
    Table 5-72   EcuM_AL_DriverInitTwo 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    119 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.7.4.2 
    EcuM_AL_DriverInitThree 
    Prototype 
    void EcuM_AL_DriverInitThree (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    This callout is invoked during EcuM_StartupTwo(), after the Rte is started. 
    Particularities and Limitations 
      This function is filled by the configuration tool. It can be extended by the integrator by using the 
    Userblocks. 
     
     
    Note 
    PostBuild data can be accessed via the global pointer EcuM_GlobalPBConfig_Ptr, 
      example: EcuM_GlobalPBConfig_Ptr->CfgPtr_Com_Init. 
     
     
     
     
    Note 
    Variant data can be accessed via the global pointer EcuM_GlobalPCConfig_Ptr, 
      example: EcuM_GlobalPCConfig_Ptr->CfgPtr_ComM_Init. 
     
     
     
    Call Context 
      Invoked in EcuM_StartupTwo(), task context 
    Table 5-73   EcuM_AL_DriverInitThree 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    120 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.4.3 
    EcuM_OnEnterRun 
    Prototype 
    void EcuM_OnEnterRun (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of activities before entering RUN state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called just before entering RUN state. 
    Table 5-74   EcuM_OnEnterRun 
    5.7.4.4 
    EcuM_OnExitRun 
    Prototype 
    void EcuM_OnExitRun (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of activities before leaving RUN state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called just before leaving RUN state. 
    Table 5-75   EcuM_OnExitRun 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    121 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.4.5 
    EcuM_OnGoSleep 
    Prototype 
    void EcuM_OnGoSleep (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of additional activities while module is in GO SLEEP state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called after entering GO SLEEP state. 
    Table 5-76   EcuM_OnGoSleep 
    5.7.4.6 
    EcuM_OnPrepShutdown 
    Prototype 
    void EcuM_OnPrepShutdown (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of additional activities in PREP SHUTDOWN state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called just after entering PREP SHUTDOWN state. 
    Table 5-77   EcuM_OnPrepShutdown 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    122 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.4.7 
    EcuM_OnExitPostRun 
    Prototype 
    void EcuM_OnExitPostRun (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of activities while leaving POST RUN state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called while leaving POST RUN state. 
    Table 5-78   EcuM_OnExitPostRun 
    5.7.4.8 
    EcuM_OnFailedNvmWriteAllJobReaction 
    Prototype 
    void EcuM_OnFailedNvmWriteAllJobReaction (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    The ECU State Manager will call this function in case that a Nvm_WriteAll() job was not finished in time. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
    Table 5-79   EcuM_OnFailedNvmWriteAllJobReaction 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    123 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.7.4.9 
    EcuM_OnWakeupReaction 
    Prototype 
    void EcuM_OnWakeupReaction (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of additional activities in WAKEUP_REACTION state. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called in ECUM_STATE_WAKEUP_REACTION state. 
    Table 5-80   EcuM_OnFailedNvmWriteAllJobReaction 
    5.7.4.10  EcuM_OnRTEStartup 
    Prototype 
    void EcuM_OnRTEStartup (void) 
    Parameter 
    void 
    none  
    Return code 
    void 
    none 
    Functional Description 
    Allows the execution of activities before starting the RTE. 
    Particularities and Limitations 
      This function has to be filled with code by the integrator. 
    Call Context 
      Invoked in task context 
      Called before Rte_Start() is executed. Module state: STARTUP 
    Table 5-81   EcuM_OnRTEStartup 
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    124 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    5.8 
    Service Ports  
    5.8.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side.  
    5.8.1.1 
    Provide Ports on EcuM Side 
    At  the  Provide  Ports  of  the  EcuM  the  API  functions  described  in  5.2  are  available  as 
    Runnable Entities. The Runnable Entities are invoked via Operations. The mapping from a 
    SWC client call to an Operation is performed by the RTE. In this mapping the RTE adds 
    Port Defined Argument Values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  EcuM  and  the 
    Operations defined for the Provide Ports, the API functions related to the Operations to be 
    added by the RTE. 
     
    5.8.1.1.1 
    ShutdownTarget Port 
    Operation 
    API Function 
    SelectShutdownTarget 
    EcuM_SelectShutdownTarget() 
    GetLastShutdownTarget 
    EcuM_GetLastShutdownTarget() 
    GetShutdownTarget 
    EcuM_GetShutdownTarget() 
    SelectShutdownCause 
    EcuM_SelectShutdownCause() 
    GetShutdownCause 
    EcuM_GetShutdownCause() 
    Table 5-82   Shutdown Target Port 
    5.8.1.1.2 
    BootTarget Port 
    Operation 
    API Function 
    SelectBootTarget 
    EcuM_SelectBootTarget() 
    GetBootTarget 
    EcuM_GetBootTarget() 
    Table 5-83   BootTarget Port 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    125 
    based on template version 4.8.3 




    Technical Reference MICROSAR EcuM Flex 
    5.8.1.1.3 
    AlarmClock Port 
    Operation 
    API Function 
    SelectRelWakeupAlarm 
    EcuM_SelectRelWakeupAlarm() 
    SelectAbsWakeupAlarm 
    EcuM_SelectAbsWakeupAlarm() 
    AbortWakeupAlarm 
    EcuM_AbortWakeupAlarm() 
    GetCurrentTime 
    EcuM_GetCurrentTime() 
    GetWakeupTime 
    EcuM_GetWakeupTime() 
    SetClock 
    EcuM_SetClock() 
    Table 5-84   AlarmClock Port 
     
     
    Caution 
    The AlarmClock Port is only available in case of EcuM flex. 
     
     
     
    5.8.1.1.4 
    StateRequest Port 
     
    Operation 
    API Function 
    Port Defined Argument Value 
    RequestRUN 
    EcuM_RequestRUN() 
    EcuM_UserType UserId 
    ReleaseRUN 
    EcuM_ReleaseRUN() 
    EcuM_UserType UserId 
    RequestPOST_RUN 
    EcuM_RequestPOST_RUN() 
    EcuM_UserType UserId 
    ReleasePOST_RUN 
    EcuM_ReleasePOST_RUN() 
    EcuM_UserType UserId 
    GetState 
    EcuM_GetStateWrapper() 
    EcuM_UserType UserId 
    Table 5-85   StateRequest Port 
     
    Info 
    The GetState operation above is mapped to an additional API function 
      EcuM_GetStateWrapper() which has to be introduced to be compliant with ASR3 
    Microsar EcuM. This API is not described in chapter 5.2 because the functionality is the 
    same as EcuM_GetState(). 
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    126 
    based on template version 4.8.3 



    Technical Reference MICROSAR EcuM Flex 
    5.8.1.2 
    Require Ports on EcuM Side 
    The EcuM calls operations at its Require Ports. These Operations have to be provided by 
    the  SWCs  by  means  of  Runnable  Entities.  These  Runnable  Entities  implement  the 
    callback functions expected by the EcuM. 
    The following sub-chapters present the Require Port defined for the EcuM, the Operations 
    that are called from the EcuM and the related Notifications. 
    5.8.1.2.1 
    currentMode Port 
    Operation 
    RTE Interface 
    Mode Declaration Group 
    currentMode 
    Rte_Switch_currentMode_currentMode 
    STARTUP 
    RUN 
    POST_RUN 
    SLEEP 
    WAKE_SLEEP 
    SHUTDOWN 
    Table 5-86   currentMode Port 
     
     
     
    Caution 
    The Ports CurrentMode and StateRequest are only available in case of EcuM fixed. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    127 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    6  AUTOSAR Standard Compliance 
    6.1 
    Deviations 
    6.1.1 
    Deviation in the Naming of API Parameters 
    6.1.1.1 
    ResetSleepMode 
    The parameter “mode” has been changed to “resetSleepMode” for the following APIs: 
    >  EcuM_GetLastShutdownTarget() 
    >  EcuM_GetShutdownTarget() 
    >  EcuM_SelectShutdownTarget() 
    6.1.1.2 
    TargetState 
    The parameter “target” has been changed to “targetState” for the following API: 
    >  EcuM_SelectShutdownTarget() 
    6.1.1.3 
    ShutdownTarget 
    The parameter “shutdownTarget” has been changed to “target” for the following API: 
    >  EcuM_GetShutdownTarget() 
    >  EcuM_GetLastShutdownTarget() 
    6.1.1.4 
    Target (ShutdownTarget) 
    The parameter “target” has been changed to “shutdownCause” for the following API: 
    >  EcuM_SelectShutdownCause() 
    6.1.1.5 
    Target (BootTarget) 
    The parameter “target” has been changed to “BootTarget” for the following API: 
    >  EcuM_SelectBootTarget() 
    >  EcuM_GetBootTarget() 
    6.1.1.6 
    Sources 
    The parameter “sources” has been changed to “WakeupSource” for the following API: 
    >  EcuM_ClearWakeupEvent() 
    >  EcuM_SetWakeupEvent() 
    >  EcuM_ValidateWakeupEvent() 
    6.1.2 
    Starting of the Validation Timer 
    The validation timer is not started by calling EcuM_SetWakeupEvent(), instead it is started 
    with the next MainFunctionCycle. 
    6.1.3 
    Multiplicity of Parameters 
    6.1.3.1 
     EcuMResetReasonRef 
    The parameter has been changed to optional so that not every wake-up source must have 
    configured an Mcu reset reason. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    128 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    6.1.3.2 
    EcuMSleepMode 
    The parameter has been changed to optional to allow code optimization on ECUs without 
    the possibility to switch ECUM_STATE_OFF. 
    6.1.3.3 
    EcuMConfigConsistencyHash 
    The parameter has been changed to optional because it is only necessary in the case of 
    variant post build. 
    6.1.3.4 
    Removed parameter ConfigPtr from DriverInit Lists 
    Removed the parameter ConfigPtr from the prototypes of the following Callouts: 
    >  EcuM_AL_DriverInitOne() 
    >  EcuM_AL_DriverInitTwo() 
    >  EcuM_AL_DriverInitThree() 
     
    6.2 
    Additions/ Extensions 
    6.2.1 
    Additional Configuration Parameters  
    To fulfill the jobs of the EcuM some more parameters beyond the AUTOSAR specification 
    are needed. The description of these parameters can be found in the BSWMD file which is 
    part of the delivery. 
    The following containers are added: 

    EcuMDriverInitListBswM 
     
    The following parameters are added: 

    EcuMAdditionalInitCode 

    EcuMGoDownRequestID 

    EcuMAdditionalIncludes 

    EcuMUserConfigurationFile 

    EcuMCheckWakeupTimeout 

    EcuMDeferredBswMNotification 

    EcuMGptChannelRef 

    EcuMSlaveCoreHandling 

    EcuMGenModeSwitchPort 

    EcuMIncludeDem 

    EcuMModeSwitchRteAck 

    EcuMGenModeSwitchPort 

    EcuMNvmCancelWriteAllTimeout 

    EcuMEnableFixBehavior 

    EcuMBswCoreId 

    EcuMPNCEcuMComMPNCRef 
    6.2.2 
    Buffering of Wake ups if the BswM is Not Initialized 
    In  early  phases  of  the  ECU,  wake-up  events  can  occur  and  should  not  be  missed.  The 
    EcuM  detects  these  Wake-up  Events  and  if the  BswM  is  not  initialized  the Event  will  be 
    buffered and reported to the BswM as soon as the BswM is initialized by the EcuM. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    129 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    6.2.3 
    Buffering of Wake ups if the ComM is Not Initialized 
    In  early  phases  of  the  ECU,  wake-up  events  can  occur  and  should  not  be  missed.  The 
    EcuM checks if the ComM is active by the routine ComM_GetStatus(), if the ComM is not 
    active  in  this  phase  the  Wake-up  Event  is  also  buffered.  In  the  EcuM_MainFunction  the 
    EcuM checks if the ComM is still uninitialized and the Wake-up Event is reported as soon 
    as possible to the ComM.  
    6.2.4 
    Additional API EcuM_ClearValidatedWakeupEvent 
    The  EcuM  implements  an  API  to  clear  only  the  validated  wakeup  events.  A  call  of  the 
    regular  API  EcuM_ClearWakeupEvent  leads  to  a  clear  of  all  events,  pending  wakeup 
    events will be lost in this case. 
    It is necessary to clear the validated wakeup events  to enter a sleep mode or shutdown 
    the Ecu. 
    6.2.5 
    Support of Asynchronous Transceiver Handling 
    To  support  asynchronous  transceiver  handling  a  check-wakeup  validation  timeout  was 
    introduced  for  wake-up  sources  which  cannot  be  checked  in  the  context  of 
    EcuM_CheckWakeup. 
    6.2.6 
    Deferred notification of the BswM about wake-up events 
    To prevent that the notification via BswM_EcuM_CurrentWakeup() is executed in context 
    of an interrupt (via EcuM_SetWakeupEvent or EcuM_ValidateWakeupEvent), the 
    notification can be deferred to the next cycle of the EcuM_MainFunction. If the notification 
    is executed deferred or not can be configured via the parameter 
    EcuMDeferredBswMNotification. 
     
    6.2.7 
    Additional Callback EcuM_AlarmCheckWakeup 
    This  callback  is  called  by  the  Gpt  every  second  to  increment  the  EcuM  clock  which  is 
    provided by the alarm clock feature. 
    6.2.8 
    Additional API EcuM_GoToSelectedShutdownTarget 
    This  API  can  be  called  e.g.  from  the  BswM  without  knowledge  about  the  currently 
    configured  shutdown  target.  The  EcuM  decides  if  EcuM_GoHalt(),  EcuM_GoPoll()  or 
    EcuM_GoDown() has to be called. 
    6.2.9 
    Additional Callout EcuM_WaitForSlaveCores 
    This  callout  is  only  active  in  case  of  MultiCore  and  if  the  parameter 
    EcuMSlaveCoreHandling  is  set  true.  In  this  case,  the  EcuM  Master  Core  calls  cyclically 
    this callout. It can be used to initiate that the sleep is also entered on the slave core. 
    6.2.10  Support of EcuM fixed 
    The EcuM supports the EcuM with fixed state machine. The EcuM fixed can be configured 
    without EcuM flex or combined. 
    6.2.10.1  Shutdown Target ECUM_STATE_RESET 
    The shutdown target ECUM_STATE_RESET is available and the callout EcuM_AL_Reset 
    is  available,  independent  of  EcuM_Flex  configuration.  The  ResetMode  parameter  will  be 
    passed  to  EcuM_AL_Reset  but  EcuM  does  not  check  if  the  parameter  is  valid,  because 
    this is a EcuM flex parameter. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    130 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    6.2.10.2  Synchronization of EcuM and RTE modes 
    Some transitions in the EcuM state machine lead to RTE mode switch notifications via the 
    API Rte_Switch_currentMode_currentMode(). 
    If the acknowledge mechanism of the EcuM is configured active, EcuM remains in its state 
    until the RTE has acknowledged the current mode switch. 
    6.3 
    Limitations 
    6.3.1 
    Inter Module Checks 
    The EcuM does not check the AUTOSAR version of included external modules. 
    6.3.2 
    Recording of Shutdown Causes 
    The EcuM does not support the facility to record recent shutdown causes. Therefore the 
    following two APIs are not supported: 
    >  EcuM_GetMostRecentShutdown() 
    >  EcuM_GetNextRecentShutdown() 
    6.3.3 
    Not Supported Configuration Parameters and Containers 
    Some of the specified configuration parameters are not supported. These parameters are 
    marked with the addition “Not used” in the corresponding parameter description. The 
    description is located within the module’s BSWMD file which is part of the delivery. 
    The following containers (including the parameters) are not supported in this release: 

    EcuMShutdownTarget 

    EcuMTTII 
    The following parameters are not supported in this release: 

    EcuMSleepModeSuspend 

    EcuMAlarmClockTimeOut 

    EcuMFlexEcucPartitionRef 

    EcuMResetLoopDetection 

    EcuMIncludeDem 

    EcuMIncludeDet 

    EcuMNvramReadallTimeout 

    EcuMIncludeNvM 

    EcuMTTIIEnabled 

    EcuMTTIIWakeupSourceRef 
     
    6.3.4 
    Wake-up Events after Reset Reason Translation are not Validated 
    During the initialization the EcuM get the reason for the current startup via the Mcu reset 
    reason translation. For this translated events the wake-up validation is not performed. 
    6.3.5 
    EcuM Fixed Limitations 
      NvM_ReadAll() is not started by the EcuM. This can be done by the integrator e.g. 
    in DriverInitListTwo(). 
      EcuM_AL_Reset is available, independent of EcuM_Flex configuration. ResetMode 
    parameter will be passed to EcuM_AL_Reset, but EcuM checks not if the parameter 
    is valid. 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    131 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
      TTII  is  not  supported.  As  a  consequence,  the  callout  EcuM_OnWakeupReaction 
    has no parameter and no return value. 
      EcuM_WakeupReactionType is not supported. 
      EcuM_GetStatusOfWakeupSource is not supported. 
      The  following  APIs  are  not  available  if  EcuM  flex  and  EcuM  fixed  are  both 
    configured: 
    >  EcuM_GoHalt 
    >  EcuM_GoPoll 
    >  EcuM_GoDown 
    >  EcuM_GoToSelectedShutdownTarget 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    132 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    Configuration Tool 
    Tool for generation like DaVinci Configurator Pro 
    MSN 
    Module Short Name, the AUTOSAR short name of the module, e.g. Can, 
    CanIf, EcuM, etc. 
    Table 7-1   Glossary 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    BSWMD 
    Basic Software Module Description 
    BswM 
    Basis Software Mode Manager 
    CAN 
    Controller Area Network 
    ComM 
    Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    EcuC 
    ECU configuration description 
    HIS 
    Hersteller Initiative Software 
    Gpt 
    General Purpose Timer 
    ICU 
    Input Capture Unit 
    ISR 
    Interrupt Service Routine 
    MCU 
    Microcontroller Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    MSN 
    Module Short Name 
    PLL 
    Phase Locked Loop 
    RTE 
    Runtime Environment 
    SchM 
    Scheduling Manager 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 7-2   Abbreviations 
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    133 
    based on template version 4.8.3 


    Technical Reference MICROSAR EcuM Flex 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 6.00.00 
    134 
    based on template version 4.8.3 

    Document Outline


    1.3.135 - TechnicalReference_Fee_30_SmallSector

    MICROSAR [BSW module]

    1.3.137 - TechnicalReference_Fee_30_SmallSectors


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Fee 
    Technical Reference 
     
    Small Sector 
    Version 1.1.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Michael Goß 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR Fee 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    virgmi 
    2016-06-22 
    1.00.00 
    Initial version 
    virgmi 
    2016-08-23 
    1.01.00 
    Chapter ‘Requirements and 
     
    Recommendations’ was added. 
    2016-09-21 
    Reference to ProductInformation of 
    SmallSectorFee was added. 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_FlashEEPROMEmulation.pdf 
    V2.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    V3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [4]   Vector 
    ProductInformation_8_MICROSARSmallSectorFee.pdf 
    V1.0.0 
     
     
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 
    Architecture Overview ........................................................................................ 8 
    3 
    Functional Description ............................................................................................... 11 
    3.1 

    Features .......................................................................................................... 11 
    3.1.1 

    Deviations from AUTOSAR R4.0.3 ................................................... 11 
    3.1.2 
    Additions/ Extensions ....................................................................... 12 
    3.2 
    Recommendations ........................................................................................... 12 
    3.3 
    Initialization ...................................................................................................... 13 
    3.4 
    States .............................................................................................................. 13 
    3.4.1 

    Module States .................................................................................. 13 
    3.4.2 
    Job States ........................................................................................ 13 
    3.5 
    Main Functions ................................................................................................ 14 
    3.5.1 

    Processing of a Read Job ................................................................ 14 
    3.5.2 
    Processing of a Write Job ................................................................ 14 
    3.5.3 
    Processing of an InvalidateBlock Job ............................................... 15 
    3.5.4 
    Processing of an EraseImmediateBlock Job .................................... 15 
    3.6 
    Error Handling .................................................................................................. 15 
    3.6.1 

    Development Error Reporting ........................................................... 15 
    3.6.2 
    Production Code Error Reporting ..................................................... 16 
    3.7 
    Partitions .......................................................................................................... 17 
    3.8 
    Service for handling under-voltage situations ................................................... 17 
    3.9 
    MainFunction Triggering ................................................................................... 18 
    4 
    Integration ................................................................................................................... 19 
    4.1 

    Scope of Delivery ............................................................................................. 19 
    4.1.1 

    Static Files ....................................................................................... 19 
    4.1.2 
    Dynamic Files .................................................................................. 20 
    4.2 
    Migration from FEE to SmallSectorFEE ........................................................... 20 
    5 
    API Description ........................................................................................................... 23 
    5.1 

    Type Definitions ............................................................................................... 23 
    5.2 
    Services provided by FEE ................................................................................ 23 
    5.2.1 

    Fee_30_SmallSector_Init ................................................................. 23 
    5.2.2 
    Fee_30_SmallSector_SetMode ....................................................... 23 
    5.2.3 
    Fee_30_SmallSector_Read ............................................................. 24 
    5.2.4 
    Fee_30_SmallSector_Write ............................................................. 25 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    5.2.5 
    Fee_30_SmallSector_Cancel ........................................................... 26 
    5.2.6 
    Fee_30_SmallSector_GetStatus ...................................................... 26 
    5.2.7 
    Fee_30_SmallSector_GetJobResult ................................................ 27 
    5.2.8 
    Fee_30_SmallSector_InvalidateBlock .............................................. 28 
    5.2.9 
    Fee_30_SmallSector_GetVersionInfo .............................................. 29 
    5.2.10 
    Fee_30_SmallSector_EraseImmediateBlock ................................... 29 
    5.2.11 
    Fee_30_SmallSector_MainFunction ................................................ 30 
    5.2.12 
    Fee_30_SmallSector_SuspendWrites .............................................. 31 
    5.2.13 
    Fee_30_SmallSector_ResumeWrites ............................................... 31 
    5.3 
    Services used by FEE ...................................................................................... 32 
    5.4 
    Callback Functions ........................................................................................... 32 
    5.4.1 

    Fee_30_SmallSector_JobEndNotification ........................................ 32 
    5.4.2 
    Fee_30_SmallSector_JobErrorNotification ....................................... 33 
    5.5 
    Configurable Interfaces .................................................................................... 34 
    6 
    Configuration .............................................................................................................. 35 
    6.1 

    Configuration Variants ...................................................................................... 35 
    6.2 
    Configuration with DaVinci Configurator ........................................................... 35 
    6.2.1 

    Configuring Flash API Services ........................................................ 35 
    6.2.2 
    Partition Configuration ...................................................................... 36 
    6.2.3 
    Block Configuration .......................................................................... 36 
    6.3 
    Overhead Calculation ...................................................................................... 37 
    7 
    Requirements and Recommendations ...................................................................... 39 
    7.1 

    Requirements for the User System .................................................................. 39 
    7.1.1 

    General Requirements ..................................................................... 39 
    7.1.2 
    Write-Related ................................................................................... 39 
    7.1.3 
    Read/Compare-Related ................................................................... 39 
    7.1.4 
    Erase-Related .................................................................................. 39 
    7.1.5 
    BlankCheck-Related ........................................................................ 39 
    7.2 
    Recommendations ........................................................................................... 39 
    8 
    Abbreviations .............................................................................................................. 41 
    9 
    Contact ........................................................................................................................ 42 
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 8 
    Figure 2-2 
    AUTOSAR 3.x Architecture Overview ......................................................... 9 
    Figure 2-3 
    Interfaces to adjacent modules of the FEE ............................................... 10 
    Figure 4-1 
    Update references of BSWMD file ............................................................ 21 
    Figure 4-2 
    Example PartitionConfiguration after updating BSWMD references .......... 21 
    Figure 4-3 
    DaVinci Configurator signals incorrect definition of configuration 
    elements ................................................................................................... 22 

    Figure 4-4 
    Choose solving action to delete all erroneous definitions .......................... 22 
    Figure 6-1 
    Configuring FeeFlsApi container ............................................................... 36 
    Figure 6-2 
    SmallSectorFee Partition Configuration example (RH850)........................ 36 
    Figure 6-3 
    Block Configuration................................................................................... 37 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 6 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 11 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 12 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 12 
    Table 3-4  
    Module States ........................................................................................... 13 
    Table 3-5  
    Job States ................................................................................................ 14 
    Table 3-6  
    Service IDs ............................................................................................... 16 
    Table 3-7  
    Errors reported to DET ............................................................................. 16 
    Table 4-1  
    Static files ................................................................................................. 20 
    Table 4-2  
    Generated files ......................................................................................... 20 
    Table 5-1  
    Fee_30_SmallSector_Init.......................................................................... 23 
    Table 5-2  
    Fee_30_SmallSector_SetMode ................................................................ 24 
    Table 5-13  
    Services used by the FEE......................................................................... 32 
    Table 5-14  
    Fee_30_SmallSector_JobEndNotification ................................................. 33 
    Table 7-2  
    Abbreviations ............................................................................................ 41 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
    Initial version of SmallSectorFee  
    1.01.00 
    Chapter ‘Requirements and Recommendations’ was added 
    Reference to SmallSectorFee’s ProductInformation was added 
    Table 1-1   Component history 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module FEE as specified in [1].  
     
    Supported AUTOSAR Release*: 
    3, 4 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    FEE_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    FEE_MODULE_ID   
    21 decimal 
    (according to ref. [3]) 
    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
     
    The FEE enables  you to access a dedicated flash area for storing data persistently.  It  is 
    intended to be used exclusively either by the NVRAM Manager or on SW instance within a 
    Flash-Boot-Loader. 
    This  module  is  especially  designed  for  Flash  devices  with  small  sector  and  page  sizes, 
    e.g.  RH850’s  internal  data  flash  RV40F  with  64  Byte  sectors  and  4  Byte  pages.  Due  to 
    these  hardware  properties  a  static  addressing  scheme  can  be  applied  with  reasonable 
    small overhead. Consequently, the main advantage is a significantly easier handling of all 
    jobs  due  to  the  static  addressing  scheme  compared  to  the  dynamic  block  addressing  of 
    ‘standard’ FEE. 
    Further on, the module depends on  some other modules like DET for error handling, the 
    underlying Flash driver for hardware access and the MEMIF for consistent types. 
    For further information about basic SmallSectorFee mechanisms and functionality refer to 
    [4].  This  product  information  gives  a  brief  overview  of  relevant  aspects  concerning  flash 
    memory and informs about SmallSectorFee implementation. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    2.1 
    Architecture Overview 
    The following figure shows where the FEE is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
     
    Figure 2-2  AUTOSAR 3.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    The next figure shows the interfaces to adjacent modules of the FEE. These interfaces are 
    described in chapter 5.  
     cmp Architecture ov erv iew
    NvM_JobErrorNotification
    Nv M
    NvM_JobEndNotification
    «use»
    MemIf
    F
    F
    F
    F
    F
    F
    F
    e
    e
    e
    F
    e
    e
    e
    e
    e
    e
    e
    e
    e
    e
    e
    e
    _
    _
    _
    e
    _
    _
    _
    _
    3
    3
    3
    _
    3
    3
    3
    3
    0
    0
    0
    3
    0
    0
    0
    0
    _
    _
    _
    0
    _
    _
    _
    _
    S
    S
    S
    _
    S
    S
    S
    S
    m
    m
    m
    S
    m
    m
    m
    m
    a
    m
    a
    a
    FeeSmallSector a
    a
    a
    a
    ll
    l
    ll
    a
    ll
    ll
    ll
    ll
    DET
    S
    lS
    S
    ll
    S
    S
    S
    S
    e
    e
    e
    S
    e
    e
    e
    e
    c
    c
    e
    c
    c
    c
    c
    Det_ReportError
    t
    c
    o
    t
    c
    t
    o
    to
    t
    to
    to
    o
    to
    r
    o
    _
    r
    r
    _
    r_
    r
    r_
    r_
    _
    r_
    R
    W
    I
    _
    C
    G
    G
    S
    e
    n
    E
    a
    e
    e
    e
    a
    ri
    v
    a
    ra
    n
    t
    F
    t
    F
    t
    d
    te
    l
    S
    J
    e
    M
    i
    c
    e
    d
    s
    e
    e
    t
    o
    e
    e
    o
    a
    I
    l
    a
    b
    _
    _
    d
    t
    m
    tu
    R
    3
    3
    e
    AUTOSAR OS
    e
    e
    0
    Fee_30_SmallSector_MainFunction
    B
    m
    s
    0
    s
    _
    l
    _
    o
    e
    u
    d
    S
    S
    l
    Fee_30_SmallSector_GetVersionInfo
    c
    t
    m
    k
    ia
    m
    t
    a
    e
    a
    l
    B
    ll
    l
    S
    S
    lo
    e
    e
    c
    c
    c
    k
    t
    to
    EcuM
    Fee_30_SmallSector_Init
    o
    r
    r
    _
    _
    J
    J
    o
    o
    b
    b
    E
    Fee_30_SmallSector_ResumeWrites
    E
    n
    rr
    d
    o
    N
    rN
    Fee_30_SmallSector_SuspendWrites
    o
    o
    ti
    t
    f
    i
    i
    f
    c
    ic
    a
    a
    ti
    t
    o
    io
    n
    n
    F
    F
    F
    F
    F
    F
    F
    ls
    ls
    ls
    ls
    ls
    ls
    ls
    _
    _
    _
    _
    _
    _
    _
    R
    W
    E
    C
    B
    G
    G
    e
    r
    o
    la
    e
    e
    a
    rit
    a
    m
    n
    t
    t
    d
    e
    s
    S
    J
    e
    p
    k
    o
    a
    C
    ta
    b
    r
    h
    Fls
    e
    t
    R
    e
    u
    c
    s
    e
    k
    s
    u
    lt
     
    Figure 2-3  Interfaces to adjacent modules of the FEE 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    10 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    FEE. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector Informatik provides further FEE functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    FEE provides a service for reading blocks from Flash 
    FEE provides a service for writing blocks to Flash 
    FEE provides a service for invalidating blocks in Flash 
    FEE provides a service for erasing blocks which contain immediate data 
    FEE provides a service to initialize the module 
    FEE provides a service to cancel pending jobs 
    FEE provides a service to query the module status and job result 
    FEE provides a service to query its version information. 
    FEE provides a mechanism to spread the erase/write accesses such that the physical device is 
    not overstressed, if the underlying Flash device does not provide at least the configured number 
    of erase/write cycles per physical memory cell. 
    FEE provides a mechanism to manage each block’s information, whether this block is “correct” 
    from the point of view of the FEE. 
    FEE provides development error detection to check API parameters. 
    The Flash driver can either be polled by the FEE for its current state or the Flash driver can 
    provide its state to the FEE module via a callback mechanism. 
    The FEE can be polled by the NVM or the FEE provides the result of a job to the upper layer via 
    a callback mechanism. 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations from AUTOSAR R4.0.3 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Alignment of logical blocks via FeeVirtualPageSize is not supported. Instead, alignment of logical 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    11 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Not Supported AUTOSAR Standard Conform Features 
    blocks is provided via partition specific alignments. Therefore see Table 3-3   Features provided 
    beyond the AUTOSAR standard.
     
    FEE does not provide debugging support. 
    FEE does not report any errors to DEM. 
    FEE does not support the usage of FeeBlockOverhead parameter, because the amount of 
    management overhead is an internal detail, which shall not be configurable. 
    FEE does not support the usage of FeeMaximumBlockingTime parameter because FEE does not 
    have any time base. 
    FEE does not support to set the mode of the underlying Flash driver, because handling of set 
    mode API is not clearly specified. 
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    FEE supports the usage of multiple Flash devices. 
    FEE supports the usage of Fls_BlankCheck API. 
    FEE provides the configuration of partitions, in order to separate independent contents/devices 
    from each other. 
    FEE provides partition specific address alignments to which all logical blocks of a partition are 
    aligned. Address alignment is configurable separately for each partition. Address alignment 
    usually corresponds to the Flash device’s sector size. 
    FEE provides partition specific write alignments which usually correspond to the Flash device’s 
    page size. 
    FEE provides verification of data which has been written recently to the Flash. This feature can 
    be configured block specifically. 
    FEE provides detection and correction of single bit flips in a block’s management information. 
    FEE supports two main function triggering modes. Main function of FEE can either be called 
    cyclically with a fixed cycle time or in a background task. 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.2 
    Recommendations 
    It’s recommended to use this FEE module only with Flash devices with reasonable small 
    sector  and  page  sizes.  This  means  that  the  size  of  one  user  block  should  not  be 
    significantly  smaller  than  one  physical  Flash  sector.  Due  to  the  fact  that  for  every  user 
    block  at  least  one  physical  Flash  sector  is  reserved,  the  overhead  of  unused  Flash 
    memory  strongly  depends  on  the  relation  between  block  size  and  Flash  sector  size. 
    Another aspect concerns the page size of a Flash device: In order to keep the overhead 
    small, the Flash device’s page size should be small as well. 
    For instance it’s recommended to use this FEE module with internal data flash RV40F of 
    Renesas’ RH850 microcontroller platform. This Flash device features physical sectors with 
    64 Byte and physical pages with 4 Byte. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    12 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    3.3 
    Initialization 
    The 
    FEE 
    is 
    initialized 
    and 
    operational 
    after 
    the 
    API 
    service 
    Fee_30_SmallSector_Init() was called. 
     
     
     
    Caution 
    The FEE is driven asynchronously, if a job has been requested to it. I.e. the jobs are 
      finally processed by calls of FEE’s main function. 
     
     
     
     
    3.4 
    States 
    FEE can change to different states during runtime which are described in the tables below. 
    3.4.1 
    Module States 
     
    Module States 
    Point in Time 
    MEMIF_UNINIT 
    The API service Fee_30_SmallSector_Init() has not been called yet. 
    The service Fee_30_SmallSector_GetStatus() returns the value 
    MEMIF_UNINIT. 
    MEMIF_IDLE 
    The API service Fee_30_SmallSector_Init() has been called and 
    finished successfully. No job has currently been requested to the FEE. The 
    service Fee_30_SmallSector_GetStatus() returns the value 
    MEMIF_IDLE. 
    MEMIF_BUSY 
    The API services 
    Fee_30_SmallSector_Read(),Fee_30_SmallSector_Write(),Fee_30
    _SmallSector_InvalidateBlock() or 
    Fee_30_SmallSector_EraseImmediateBlock() have been called 
    previously and the job is not yet finished. The service 
    Fee_30_SmallSector_GetStatus() returns the value MEMIF_BUSY. 
    Table 3-4   Module States 
    3.4.2 
    Job States 
    Job State 
    Correlating 
    Point in Time 
    Module State 
    MEMIF_JOB_OK 
    MEMIF_IDLE 
    After successfully finished job 
    MEMIF_JOB_PENDING 
    MEMIF_BUSY 
    After a job has been started 
    MEMIF_JOB_CANCELLED 
    MEMIF_IDLE 
    After Fee_30_SmallSector_Cancel(), if 
    previous state was MEMIF_JOB_PENDING 
    MEMIF_BLOCK_INVALID 
    MEMIF_IDLE 
    After a read job has been finished and an 
    invalidated block was found or if block was 
    erased. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    13 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    MEMIF_BLOCK_INCONSISTENT  MEMIF_IDLE 
    After reading a block, which wasn’t finished 
    successfully. 
    MEMIF_JOB_FAILED 
    MEMIF_IDLE 
    After a job wasn’t finished successfully. 
    Table 3-5   Job States 
    3.5 
    Main Functions 
    All  jobs  (Read,  Write,  InvalidateBlock  or  EraseImmediateBlock)  will  be  executed 
    asynchronously  and  are  processed  by  a  job  state  machine.  This  means  that  after  an 
    asynchronous  API  call  (e.g.  Fee_30_SmallSector_Write())  the  job  and  its 
    parameters are internally stored and will be processed by the main function later on. 
    The  function  Fee_30_SmallSector_MainFunction()  can  either  be  called  cyclically 
    with  a  fixed  cycle  time  by  the  OS  or  in  a  background  task.  The  mode  of  main  function 
    triggering is pre-compile configurable via FeeMainFunctionTriggering parameter. 
    Only one asynchronous job (Read, Write, InvalidateBlock or EraseImmediateBlock) can be 
    processed at a time. FEE does not provide a queue for any jobs that are requested while 
    the module is busy processing a job. The module state needs to be MEMIF_IDLE before a 
    new job can be requested. The current module state can be queried by calling the service 
    Fee_30_SmallSector_GetStatus().  Usually,  the  upper  layer  module  (i.e.  NVM)  is 
    responsible for synchronizing and queueing the pending jobs and assigning it to the FEE 
    consecutively,  whereas  in  the  Flash  Boot  Loader  use-case  the  Flash  Boot  Loader 
    application is responsible for doing this. 
    3.5.1 
    Processing of a Read Job 
    FEE  provides  the  service  Fee_30_SmallSector_Read()  for  reading  a  block.  This 
    service reads the latest data of the block specified by a block number. 
    This asynchronous job is initiated with the API function  Fee_30_SmallSector_Read() 
    and is processed by subsequent calls of Fee_30_SmallSector_MainFunction() until 
    the FEE returns back to idle state, which means that the job was finished. 
     
     
     
    Caution 
    The FEE will always read the block, which was written last. Consequently, if writing a 
      block fails (e.g. due to reset) a subsequent read job for this block will lead to the result 
    MEMIF_BLOCK_INCONSISTENT. The FEE does not look for the most recent valid 
    instance of this block, because it can’t be assured that there is any. 
     
     
     
     
    3.5.2 
    Processing of a Write Job 
    FEE provides the service Fee_30_SmallSector_Write() for writing a block specified 
    by  a  block  number.  The  FEE  searches  for  the  next  free  position  in  the  specified  block’s 
    memory area and requests a job to the underlying Flash driver to write a new instance of 
    the block. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    14 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    This asynchronous job is initiated with the API function Fee_30_SmallSector_Write() 
    and is processed by subsequent calls of Fee_30_SmallSector_MainFunction() until 
    the FEE returns back to idle state, which means that the job was finished. 
    3.5.3 
    Processing of an InvalidateBlock Job 
    FEE provides the service Fee_30_SmallSector_InvalidateBlock() for invalidating 
    block  content  specified  by  a  block  number.  The  FEE  module  marks  the  block  as  invalid 
    and reports the job result  MEMIF_BLOCK_INVALID  if such a block will be read after the 
    invalidation process. 
    This 
    asynchronous 
    job 
    is 
    initiated 
    with 
    the 
    API 
    function 
    Fee_30_SmallSector_InvalidateBlock() and is processed by subsequent calls of 
    Fee_30_SmallSector_MainFunction() until the FEE returns back to idle state, which 
    means that the job was finished. 
    3.5.4 
    Processing of an EraseImmediateBlock Job 
    FEE provides the service Fee_30_SmallSector_EraseImmediateBlock() to erase a 
    block  containing  immediate  data.  Hereupon  an  invalidation  of  the  specified  block  is 
    performed,  because  erasing  the  block’s  memory  area  will  not  accomplish  the  intended 
    goal, that writing of immediate data is speeded-up by a preceding erase operation.  
    This 
    asynchronous 
    job 
    is 
    initiated 
    with 
    the 
    API 
    function 
    Fee_30_SmallSector_EraseImmediateBlock()  and  is  processed  by  subsequent 
    calls  of  Fee_30_SmallSector_MainFunction()  until  the  FEE  returns  back  to  idle 
    state, which means that the job was finished. 
     
    3.6 
    Error Handling 
    3.6.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter FEE_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported FEE ID is 21. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Fee_30_SmallSector_Init 
    0x01 
    Fee_30_SmallSector_SetMode 
    0x02 
    Fee_30_SmallSector_Read 
    0x03 
    Fee_30_SmallSector_Write 
    0x04 
    Fee_30_SmallSector_Cancel 
    0x05 
    Fee_30_SmallSector_GetStatus 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    15 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Service ID 
    Service 
    0x06 
    Fee_30_SmallSector_GetJobResult 
    0x07 
    Fee_30_SmallSector_InvalidateBlock 
    0x08 
    Fee_30_SmallSector_GetVersionInfo 
    0x09 
    Fee_30_SmallSector_EraseImmediateBlock 
    0x10 
    Fee_30_SmallSector_JobEndNotification 
    0x11 
    Fee_30_SmallSector_JobErrorNotification 
    0x12 
    Fee_30_SmallSector_MainFunction 
    Table 3-6   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    FEE_30_SMALL_SECTOR_E_ API service (except for 
    UNINIT 
    Fee_30_SmallSector_GetStatus(),Fee_30_SmallSect
    or_GetVersionInfo() and 
    Fee_30_SmallSector_Init()) called although the FEE is 
    not yet initialized 
    FEE_30_SMALL_SECTOR_E_ API service called with invalid block number 
    INVALID_BLOCK_NO 
    FEE_30_SMALL_SECTOR_E_ API service Fee_30_SmallSector_Read() called with 
    INVALID_BLOCK_OFS 
    invalid block offset. 
    FEE_30_SMALL_SECTOR_E_ API service (Fee_30_SmallSector_Read() or 
    INVALID_DATA_POINTER 
    Fee_30_SmallSector_Write()) called with null pointer as 
    pointer to data buffer. API service 
    Fee_30_SmallSector_GetVersionInfo() called with null 
    pointer. 
    FEE_30_SMALL_SECTOR_E_ API service Fee_30_SmallSector_Read() called with 
    INVALID_BLOCK_LEN 
    invalid block length. 
    FEE_30_SMALL_SECTOR_E_ API service is called while currently a job is being processed. 
    BUSY 
    FEE_30_SMALL_SECTOR_E_ Not used. 
    BUSY_INTERNAL 
    FEE_30_SMALL_SECTOR_E_ API service Fee_30_SmallSector_Cancel() is called while 
    INVALID_CANCEL 
    module is not busy. 
    Table 3-7   Errors reported to DET 
     
    3.6.2 
    Production Code Error Reporting 
    FEE does not  report any production errors to DEM because the AUTOSAR specification 
    does not specify any error which shall be reported in production mode. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    16 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    3.7 
    Partitions 
    FEE employs a concept of partitions. A partition can be thought of an emulation space that 
    is managed separately from other ones: 
      Multiple Flash devices / Flash drivers are supported by using separate partitions in 
    FEE module 
      Alignments, such as write, read and address alignment, can be configured for each 
    partition specifically 
      Errors in one partition do not affect data in other ones 
      Each  partition  has  its own  start address  and  size.  Next  partition  does  not  have  to 
    start at the end of the previous partition. There can be gaps between the partitions. 
      Partitions do not overlap each other 
      Block  with  smallest  Block  ID  has  the  smallest  address  in  the partition.  Each block 
    has to be assigned to a partition 
      A  partition’s  address  alignment  must  be  identical  or  an  integer  multiple  of  its 
    referenced Flash’s sector size 
      A partition’s write alignment must be identical or an integer multiple of its referenced 
    Flash’s page size 
     
     
     
     
    Note 
    FEE configurations for FBL and Application do not need to share all partitions. E.g. a 
      partition containing only application data may remain unknown to the FBL. However, 
    shared partitions must refer to identical Fls configurations (FlsConfigSet container), and 
    they must match in address and size, as well as in alignment settings. 
     
     
     
    3.8 
    Service for handling under-voltage situations 
    The FEE provides a set of functions to handle under-voltage situations properly. 
    Fee_30_SmallSector_SuspendWrites() is intended to react on actual under-voltage 
    situation detected via dedicated monitoring circuitry. Usually there is some amount of time 
    (few  milliseconds)  to  react  on  such  conditions  until  a  low  voltage  reset  occurs.  Its 
    counterpart,  Fee_30_SmallSector_ResumeWrites()  was  introduced  in  order  to 
    prevent from stalling, if voltage reaches normal range, without any reset. 
    As  long  as  writes  are  suspended  the  FEE  no  longer  requests  any  write-class  job  from 
    underlying  Flash  driver  (e.g.  Fls_Write,  Fls_Erase)  due  to  high  risk  of  a  reset.  A 
    currently pending write job of FEE will be paused until writes are resumed again. If FEE is 
    currently  idle  when  writes  are  suspended,  FEE  write  jobs  are  accepted  but  will  not  be 
    processed until writes are resumed again. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    17 
    based on template version 6.0.1 




    Technical Reference MICROSAR Fee 
    3.9 
    MainFunction Triggering 
    In  AUTOSAR  release  4.x  an  additional  option  is  introduced  to  be  able  to  call  the 
    Fee_30_SmallSector_MainFunction in a cyclic task or in a background task. 
    The  cyclic  task  (default  configuration)  is  used  when  the  main  function  shall  be  triggered 
    periodically. Typically the cycle time needs to be defined, for example 10ms. 
    If the Fee_30_SmallSector_MainFunction shall be accessed quicker without periodic 
    time base, the function can also be called in a background task. The background task runs 
    when the system has nothing else to do. The Fee_30_SmallSector_MainFunction is 
    called as often as the available CPU load allows. 
     
     
     
    Caution 
    If the system is overloaded, it may happen that the background task is no longer called. 
     
     
     
     
     
     
     
    Note 
    The Fee_30_SmallSector_MainFunction should not be triggered faster than 
      Fls_MainFunction because the FEE must wait for the FLS. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    18 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    4  Integration 
    This chapter gives necessary information for the integration of  the MICROSAR  FEE  into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the  FEE contains the files which are described in the chapters  4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    Fee_30_SmallSector.c 
    Contains the implementation of the FEE interfaces. 
    Fee_30_SmallSector.h 
    Declares the interfaces of the FEE. 
    Fee_30_SmallSector_Cbk.h 
    Declares the callback functions of the FEE. 
    Fee_30_SmallSector_PartitionHandler.c 
    Responsible for partition relevant data. 
    Fee_30_SmallSector_PartitionHandler.h 
    Declares the interface of PartitionHandler. 
    Fee_30_SmallSector_BlockHandler.c 
    Responsible for block relevant data. 
    Fee_30_SmallSector_BlockHandler.h 
    Declares the interface of BlockHandler. 
    Fee_30_SmallSector_DatasetHandler.c 
    Responsible for dataset relevant data. 
    Fee_30_SmallSector_DatasetHandler.h 
    Declares the interface of DatasetHandler. 
    Fee_30_SmallSector_InstanceHandler.c 
    Responsible for instance relevant data. 
    Fee_30_SmallSector_InstanceHandler.h  Declares the interface of InstanceHandler. 
    Fee_30_SmallSector_TaskManager.c 
    Responsible for coordinating internal sub-
    components. 
    Fee_30_SmallSector_TaskManager.h 
    Declares the interface of TaskManager. 
    Fee_30_SmallSector_FlsCoordinator.c 
    Provides access to Flash driver’s services. 
    Fee_30_SmallSector_FlsCoordinator.h 
    Declares the interface of FlsCoordinator. 
    Fee_30_SmallSector_Layer1_Read.c 
    Internal layer 1 sub-component for read jobs. 
    Fee_30_SmallSector_Layer1_Read.h 
    Declares the interface of layer 1 read sub-
    component. 
    Fee_30_SmallSector_Layer1_Write.c 
    Internal layer 1 sub-component for write, invalidate 
    and erase jobs. 
    Fee_30_SmallSector_Layer1_Write.h 
    Declares the interface of layer 1 write sub-
    component. 
    Fee_30_SmallSector_Layer2_WriteInstan Internal layer 2 sub-component for writing instances. 
    ce.c 
    Fee_30_SmallSector_Layer2_WriteInstan Declares the interface of layer 2 write instance sub-
    ce.h 
    component. 
    Fee_30_SmallSector_Layer2_InstanceFin Internal layer 2 sub-component for finding instances. 
    der.c 
    Fee_30_SmallSector_Layer2_InstanceFin Declares the interface of layer 2 instance finder sub-
    der.h 
    component. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    19 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    File Name 
    Description 
    Fee_30_SmallSector_Layer2_DatasetEra Internal layer 2 sub-component for erasing datasets. 
    ser.c 
    Fee_30_SmallSector_Layer2_DatasetEra Declares the interface of layer 2 dataset eraser sub-
    ser.h 
    component. 
    Fee_30_SmallSector_Layer3_ReadMana Internal layer 3 sub-component for reading 
    gementBytes.c 
    management information of instances. 
    Fee_30_SmallSector_Layer3_ReadMana Declares the interface of layer 3 read management 
    gementBytes.h 
    bytes sub-component. 
    Table 4-1   Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    Fee_30_SmallSector_Cfg.c  Contains definitions of the configuration, e.g. partition 
    configuration and block configuration 
    Fee_30_SmallSector_Cfg.h  Contains declarations of the configuration and macro definitions. 
    Table 4-2   Generated files 
     
    4.2 
    Migration from FEE to SmallSectorFEE 
    When  it  comes  to  an  update  of  a  project,  where  MICROSAR  FEE  (“Standard”  FEE)  is 
    replaced  by  MICROSAR  SmallSectorFEE,  this  section  shows  how  to  migrate  the 
    consisting FEE configuration to SmallSectorFEE configuration. 
    1.  Update SIP with SmallSectorFEE description and generator 
    The SIP of the updated project should only contain SmallSectorFEE parts. Description and 
    Generator of “Standard” FEE shall be removed from the project. 
    2.  Update BSWMD references 
    Upon next start of Configurator it will be detected that the BSWMD file of “Standard” FEE 
    is  missing  and  SmallSectorFEE’s  BSWMD  is  found  instead,  according  to  Figure  4-1
     

    Update references of BSWMD file.  
    Select 
    OK 
    in 
    order 
    to 
    choose 
    the 
    alternative 
    module 
    definition 
    /MICROSAR/Fee_30_SmallSector/Fee_Impl for the current definition /MICROSAR/Fee. 
    The DaVinci Configurator 5 then takes care of replacing the references within the project, 
    so that as much information as possible is retained. Parameters which are identical in both 
    the  previous  and  the  new  definition  are  matched  easily,  which  is  applicable  to  all 
    AUTOSAR parameters. Due to the fact that even most of the vendor specific parameters, 
    e.g.  FeePartitionConfiguration  parameters,  haven’t  changed  significantly  there’s  no  real 
    data loss. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    20 
    based on template version 6.0.1 




    Technical Reference MICROSAR Fee 
     
    Figure 4-1  Update references of BSWMD file 
    3.  Remove incorrect definitions 
    After  updating  the  BSWMD  file  and  after  starting  the  DaVinci  Configurator  all  the 
    parameters  are  marked  with  a  small  info  icon  which  could  not  be  assigned  to  the  new 
    definition.  
     
    Figure 4-2  Example PartitionConfiguration after updating BSWMD references 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    21 
    based on template version 6.0.1 




    Technical Reference MICROSAR Fee 
    Figure 4-2 
    Example  PartitionConfiguration  after  updating  BSWMD  references  depicts 
    an example PartitionConfiguration with some parameters greyed out, which are no longer 
    available  after  updating  the  FEE  module  definition.  The  DaVinci  Configurator  5  shows 
    appropriate information in the Validation view, as depicted in Figure 4-3  DaVinci 
    Configurator signals incorrect definition of configuration elements.
     
     
    Figure 4-3  DaVinci Configurator signals incorrect definition of configuration elements 
    To  remove  all  incorrect  definitions  a  solving  action  can  be  processed  from  the  context 
    menu of the top element as shown in Figure 4-4 Choose  solving  action  to  delete  all 
    erroneous definitions.
     
     
    Figure 4-4  Choose solving action to delete all erroneous definitions 
    4.  Solve appearing errors 
    After the erroneous definitions were removed, still some errors may be present because of 
    incorrect parameter configuration. In order to solve these configuration issues please refer 
    to  error  descriptions  in  Validation  view  of  DaVinci  Configurator  and  to  section  6.2 
    Configuration with DaVinci Configurator in order to get some hints for configuration. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    22 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    5  API Description 
    For an interfaces overview please see Figure 2-3. 
    5.1 
    Type Definitions 
    The FEE does not specify any API data types. 
    5.2 
    Services provided by FEE 
    5.2.1 
    Fee_30_SmallSector_Init 
    Prototype 
    void Fee_30_SmallSector_Init ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This service initializes the FEE module and all necessary internal variables. 
    The FEE module doesn’t support any runtime configuration. Hence, a pointer to the configuration structure 
    is not needed by this service. 
    The FEE does not initialize the underlying Flash driver. This shall be done separately, e.g. by the ECUM 
    module. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    >  This service shall not be called during a pending job. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-1   Fee_30_SmallSector_Init 
    5.2.2 
    Fee_30_SmallSector_SetMode 
    Prototype 
    void Fee_30_SmallSector_SetMode ( void ) 
    Parameter 
    Mode 
    Parameter is not used. 
    Return code 
    void 
    -- 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    23 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Functional Description 
    This service will not be supported by current implementation of FEE module because SetMode handling is 
    not clearly specified by AUTOSAR. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    >  This service has no effect at all 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-2   Fee_30_SmallSector_SetMode 
    5.2.3 
    Fee_30_SmallSector_Read 
    Prototype 
    Std_ReturnType Fee_30_SmallSector_Read ( 
    uint16 BlockNumber, uint16 BlockOffset, uint8* DataBufferPtr, uint16 Length) 
    Parameter 
    BlockNumber 
    Handle of a logical block (depending on block configuration) 
    BlockOffset 
    Read address offset inside the block 
    DataBufferPtr 
    Pointer to data buffer 
    Length 
    Number of bytes to read 
    Return code 
    E_OK 
    Read job has been accepted 
    E_NOT_OK 
    Read job has been rejected 
    Functional Description 
    This service invokes the read processing of the specified block. After the job has been processed by the 
    Fee_30_SmallSector_MainFunction the requested data has been read and passed to the caller. 
     
     
    Note 
    The job processing is asynchronous. Hence, it is necessary to poll the FEE about its 
      current status by calling the function Fee_30_SmallSector_GetStatus() to check 
    if the job was completed. Finally, the result of the finished job can be queried by calling 
    the function Fee_30_SmallSector_GetJobResult(). Accordingly, it is possible to 
    notify the upper layer (usually the NVM) via the callback mechanism.  
     
     
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    24 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is asynchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-3   Fee_30_SmallSector_Read 
    5.2.4 
    Fee_30_SmallSector_Write 
    Prototype 
    Std_ReturnType Fee_30_SmallSector_Write ( 
    uint16 BlockNumber, uint8* DataBufferPtr) 
    Parameter 
    BlockNumber 
    Handle of a logical block (depending on block configuration) 
    DataBufferPtr 
    Pointer to data buffer 
    Return code 
    E_OK 
    Write job has been accepted 
    E_NOT_OK 
    Write job has been rejected 
    Functional Description 
    This service invokes the write processing of the specified block. After the job has been processed by the 
    Fee_30_SmallSector_MainFunction the requested data has been written to the non-volatile memory. 
     
     
    Note 
    The job processing is asynchronous. Hence, it is necessary to poll the FEE about its 
      current status by calling the function Fee_30_SmallSector_GetStatus() to check 
    if the job was completed. Finally, the result of the finished job can be queried by calling 
    the function Fee_30_SmallSector_GetJobResult(). Accordingly, it is possible to 
    notify the upper layer (usually the NVM) via the callback mechanism.  
     
     
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is asynchronous.  
    >  This function is non-reentrant. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    25 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-4   Fee_30_SmallSector_Write 
    5.2.5 
    Fee_30_SmallSector_Cancel 
    Prototype 
    void Fee_30_SmallSector_Cancel ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This service cancels a currently pending job. 
     
     
     
    Note 
    This service is a synchronous call and does not have to be triggered by the 
      Fee_30_SmallSector_MainFunction(). 
     
     
    The status of the FEE will be set to MEMIF_IDLE and the job result will be set to 
    MEMIF_JOB_CANCELLED, if a job was currently pending. 
     
    If the FEE is currently MEMIF_IDLE, calling this service is without any effect. A 
    development error will be reported to the DET module in this case, if development error 
    detection is enabled. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-5   Fee_30_SmallSector_Cancel 
    5.2.6 
    Fee_30_SmallSector_GetStatus 
    Prototype 
    MemIf_StatusType Fee_30_SmallSector_GetStatus ( void ) 
    Parameter 
    -- 
    -- 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    26 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Return code 
    MEMIF_UNINIT 
    The FEE is currently not initialized. Fee_30_SmallSector_Init() must be 
    called to use the functionality of FEE. 
    MEMIF_IDLE 
    The FEE is currently idle. No asynchronous job is pending. 
    MEMIF_BUSY 
    The FEE is currently busy. An asynchronous job is currently being processed 
    by the FEE. 
    Functional Description 
    This service returns synchronously the current module state of the FEE. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-6   Fee_30_SmallSector_GetStatus 
    5.2.7 
    Fee_30_SmallSector_GetJobResult 
    Prototype 
    MemIf_JobResultType Fee_30_SmallSector_GetJobResult ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    MEMIF_JOB_OK 
    The last job has been finished successfully. 
    MEMIF_JOB_PENDING 
    The last requested job is waiting for execution or is currently being 
    executed. 
    MEMIF_JOB_CANCELLED 
    The last job has been canceled via the 
    Fee_30_SmallSector_Cancel() service. 
    MEMIF_JOB_FAILED 
    The Flash driver reported an error or the FEE could not achieve the 
    requested job due to hardware errors (e.g. memory cells defect) 
    MEMIF_BLOCK_INCONSISTENT  The requested block’s management information is inconsistent; hence it 
    may contain corrupt data. This result happens if a write job has not 
    been completed (e.g. due to voltage drop) or if bit flips in the 
    management information occurred and can’t be corrected. Furthermore, 
    if write-verify for a specific block is enabled and the verification of the 
    written data fails, the job result is set to INCONSISTENT. 
    MEMIF_BLOCK_INVALID 
    The requested block has been invalidated previously via the service 
    Fee_30_SmallSector_InvalidateBlock() or it is erased (e.g. by 
    calling Fee_30_SmallSector_EraseImmediateBlock()).  
    Functional Description 
    This service returns the job result of the last job which was executed. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    27 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-7   Fee_30_SmallSector_GetJobResult 
    5.2.8 
    Fee_30_SmallSector_InvalidateBlock 
    Prototype 
    Std_ReturnType Fee_30_SmallSector_InvalidateBlock( uint16 BlockNumber ) 
    Parameter 
    BlockNumber 
    Handle of a logical block (depending on block configuration) 
    Return code 
    E_OK 
    Invalidate job has been accepted 
    E_NOT_OK 
    Invalidate job has been rejected 
    Functional Description 
    This service invokes the invalidate processing of the specified block. After the job has been processed by 
    the Fee_30_SmallSector_MainFunction the requested block is marked as INVALID. 
     
     
    Note 
    The job processing is asynchronous. Hence, it is necessary to poll the FEE about its 
      current status by calling the function Fee_30_SmallSector_GetStatus() to check 
    if the job was completed. Finally, the result of the finished job can be queried by calling 
    the function Fee_30_SmallSector_GetJobResult(). Accordingly, it is possible to 
    notify the upper layer (usually the NVM) via the callback mechanism.  
     
     
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is asynchronous.  
    >  This function is non-reentrant. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    28 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-8   Fee_30_SmallSector_InvalidateBlock 
    5.2.9 
    Fee_30_SmallSector_GetVersionInfo 
    Prototype 
    void Fee_30_SmallSector_GetVersionInfo ( Std_VersionInfoType *VersionInfoPtr ) 
    Parameter 
    VersionInfoPtr 
    Pointer to where to store the version information of this module. 
    Return code 
    void 
    -- 
    Functional Description 
    This service returns the version information of this module. The version information 
    includes: 
    >  Module ID 
    >  Vendor ID 
    >  Vendor specific version numbers 
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    >  This service is can be en-/disabled via configuration parameter FeeVersionInfoApi 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-9   Fee_30_SmallSector_GetVersionInfo 
    5.2.10  Fee_30_SmallSector_EraseImmediateBlock 
    Prototype 
    Std_ReturnType Fee_30_SmallSector_EraseImmediateBlock( uint16 BlockNumber ) 
    Parameter 
    BlockNumber 
    Handle of a logical block (depending on block configuration) 
    Return code 
    E_OK 
    Erase job has been accepted 
    E_NOT_OK 
    Erase job has been rejected 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    29 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Functional Description 
    This function doesn’t erase flash memory. 
    The addressed block is marked as invalid, thus a subsequent read request on the invalidated block 
    completes with MEMIF_BLOCK_INVALID. 
     
     
    Note 
    The job processing is asynchronous. Hence, it is necessary to poll the FEE about its 
      current status by calling the function Fee_30_SmallSector_GetStatus() to check 
    if the job was completed. Finally, the result of the finished job can be queried by calling 
    the function Fee_30_SmallSector_GetJobResult(). Accordingly, it is possible to 
    notify the upper layer (usually the NVM) via the callback mechanism.  
     
     
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is asynchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-10   Fee_30_SmallSector_EraseImmediateBlock 
    5.2.11  Fee_30_SmallSector_MainFunction 
    Prototype 
    void Fee_30_SmallSector_MainFunction ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This service triggers the processing of internal state machine and handles the 
    asynchronous job and management operations. 
    The complete handling of the job and the detection of invalidated or inconsistent blocks 
    will be done in the internal job state machine. 
    Additionally, if development mode is configured, parameter checks are performed and in 
    case of failure they are reported to the DET with according service ID and the reason of 
    occurrence (refer to 3.6.1). 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    30 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  May be called at interrupt level 
    Table 5-11   Fee_30_SmallSector_MainFunction 
    5.2.12  Fee_30_SmallSector_SuspendWrites 
    Prototype 
    void Fee_30_SmallSector_SuspendWrites ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This service instructs FEE to block all write class jobs (writing, invalidating and erasing).  
    Pending jobs will be paused, i.e. they won’t be finished. FEE will enter a safe state (by 
    means of Flash content). Once such state was reached, FEE does not issue new write 
    requests to FLS. 
    Multiple subsequent calls of this service don’t have additional effects, i.e. to re-enable 
    write accesses only one call of Fee_30_SmallSector_ResumeWrites is necessary. 
    Particularities and Limitations 
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Expected to be called in application context. 
    Table 5-12   Fee_30_SmallSector_SuspendWrites 
    5.2.13  Fee_30_SmallSector_ResumeWrites 
    Prototype 
    void Fee_30_SmallSector_ResumeWrites ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    31 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Functional Description 
    This service instructs FEE to allow all write class jobs (writing, invalidating and erasing), 
    after being suspended by Fee_30_SmallSector_SuspendWrites. 
    Multiple calls of this service don’t have any additional effects, i.e. to disable write class 
    jobs only Fee_30_SmallSector_SuspendWrites needs to be called only once. 
     
    Particularities and Limitations 
    >  This function is synchronous.  
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  May be called at interrupt level 
    Table 5-12   Fee_30_SmallSector_ResumeWrites 
     
    5.3 
    Services used by FEE 
    In the following table services provided by other components, which are used by the FEE 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    FLS 
    Fls_Read 
    Fls_Write 
    Fls_Compare 
    Fls_Erase 
    Fls_BlankCheck (if configured) 
    Fls_GetJobResult 
    Fls_GetStatus 
    NVM 
    NvM_JobEndNotification (if configured) 
    NvM_JobErrorNotification (if configured) 
    Table 5-13   Services used by the FEE 
    5.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the FEE and can be 
    invoked  by  other  modules.  The  prototypes  of  the  callback  functions  are  provided  in  the 
    header file Fee_30_SmallSector_Cbk.h by the FEE. 
    5.4.1 
    Fee_30_SmallSector_JobEndNotification 
    Prototype 
    void Fee_30_SmallSector_JobEndNotification( void ) 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    32 
    based on template version 6.0.1 




    Technical Reference MICROSAR Fee 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This routine shall be called by the underlying flash driver to report the successful end of an asynchronous 
    operation. 
     
     
     
    Note 
    This function is configurable at pre-compile time using the parameter 
      FeePollingMode. 
     
     
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous.  
    >  This function is non-reentrant.  
    Expected Caller Context 
    >  This routine might be called on interrupt level, depending on the calling function 
    Table 5-14   Fee_30_SmallSector_JobEndNotification 
    5.4.2 
    Fee_30_SmallSector_JobErrorNotification 
    Prototype 
    void Fee_30_SmallSector_JobErrorNotification( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This routine shall be called by the underlying flash driver to report the failure of an asynchronous operation. 
     
     
     
    Note 
    This function is configurable at pre-compile time using the parameter 
      FeePollingMode. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    33 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous.  
    >  This function is non-reentrant.  
    Expected Caller Context 
    >  This routine might be called on interrupt level, depending on the calling function 
    Table 5-15   Fee_30_SmallSector_JobErrorNotification 
     
    5.5 
    Configurable Interfaces 
    API 
    Description 
    Function 
    This function can be enabled/disabled by the 
    Fee_30_SmallSector_GetVersionInfo 
    configuration switch ‘Version Information API’ 
    Table 5-16   Configurable Interfaces 
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    34 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    6  Configuration 
    In the FEE the attributes can be configured according with the following methods: 
    >  DaVinci Configurator 5, domain “Memory” (AUTOSAR 4 packages only). Parameters 
    are explained within the tool. Parameters described in this chapter might not directly 
    correspond to parameters visible in Configurator 5’s GUI. 
    >  DaVinci Configurator 4 (AUTOSAR 3 packages only; for a detailed description see 
    this chapter) 
    6.1 
    Configuration Variants 
    The FEE supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the FEE parameters depend on the supported configuration 
    variants. For their definitions please see the  
    >  Fee_30_SmallSector_bswmd_Asr3.2.1.arxml (AUTOSAR 3 use-case) 
    >  Fee_30_SmallSector_bswmd_Asr4.0.3.arxml (AUTOSAR 4 use-case) 
    6.2 
    Configuration with DaVinci Configurator 
    Configuration parameters are well described within the tool, thus this section should point 
    out the key elements of configuration. 
    6.2.1 
    Configuring Flash API Services 
    By  default  SmallSectorFee  assumes  the  Flash’s  API  services  declared  like 
    Fls_<Operation> (i.e. Fls_Read, Fls_Write, Fls_Erase, etc.). 
    If declaration of Flash’s API services differs from this default, e.g. Fls_<VendorInfix>_Read 
    an according FeeGeneral/FeeFlsApi container shall be instantiated and the service names 
    shall be entered manually as shown in Figure 6-1  Configuring FeeFlsApi container. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    35 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    Figure 6-1  Configuring FeeFlsApi container 
    Figure 6-1 
    Configuring FeeFlsApi containerdepicts an example with Flash API services 
    (here: Fls_Spi_<operation>) differing from default. The parameter ‘Device Index’ shall be 
    set to FlsGeneral container of the corresponding FLS module in configuration.  
    If  the  FLS  driver  does  not  provide  a  BlankCheck-API,  the  content  of  this  configuration 
    parameter is not relevant and will be ignored. Nevertheless it shouldn’t be left empty. 
    6.2.2 
    Partition Configuration 
    For each partition three different alignment parameters can be configured. This is due to 
    the  fact  that  theoretically  each  partition  could  reference  a  separate  FLS  module  with 
    different hardware properties. 
    >  AddressAlignment shall be configured to the same size of referenced FLS module’s 
    physical sector 
    >  WriteAlignment  shall  be  configured  to  the  same  size  of  referenced  FLS  module’s 
    physical page 
    >  ReadAlignment  shall  be  configured  as  small  as  possible  in  order  to  avoid  reading 
    overhead. For example RH850’s RV40F data flash allows 1 byte read accesses. 
     
    Figure 6-2  SmallSectorFee Partition Configuration example (RH850) 
    The  connection  between  a  FeePartition  and  a  FLS  module  shall  be  established  via 
    ‘Partition Device’ parameter, which holds the reference to FLS’ FlsConfigSet container. 
    Both  ‘Partition  Start  Address’  and  ‘Partition  Size’  needs  to  be  aligned  to  the  partition’s 
    AddressAlignment. 
    In  case  the  referenced  FLS  driver  provides  a  Fls_BlankCheck API,  it’s  recommended  to 
    enable the configuration parameter  ‘Fls Blank Check API’,  so that FEE can make use of 
    this API service. Especially if Renesas RH850 is used with internal data flash RV40F, this 
    parameter shall be enabled. 
    6.2.3 
    Block Configuration 
    In BlockConfiguration the number of instances is mentionable. It’s calculated automatically 
    using  the  parameters  ‘Number  Of  Write  Cycles’  and  FlsSpecifiedEraseCycles  in 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    36 
    based on template version 6.0.1 



    Technical Reference MICROSAR Fee 
    FlsPublishedInformation. FEE uses a walking block mechanism to spread write jobs over 
    several instances in order to prevent the Flash cells from getting overstressed.  
     
    Figure 6-3  Block Configuration 
    The  ‘Number  Of  Instances’  is  equal  to  ‘Number  Of  Write  Cycles’  divided  by 
    FlsSpecifiedEraseCycles rounded up to the next integer value. 
    6.3 
    Overhead Calculation 
    Since addressing scheme of SmallSectorFEE is statically, the overhead for each block in 
    configuration can be calculated. Overhead can therefore be split into two groups: 
    >  Fixed overhead due to management information of a block 
    >  Overhead due to page and physical sector alignments 
    The  user  of  SmallSectorFEE  can  only  influence  alignment-related  overhead,  because 
    overhead for management information is unavoidable. 
    A FEE block consists of at least one FEE dataset. A FEE dataset consists of at least one 
    FEE instance. In the following the algorithms are introduced to calculate the size of these 
    entities depending on configured data length and expected number of writes. 
    Explanation of terms: 
    Name 
    Description 
    FeeMgmtSize 
    1 Byte (Fixed value in implementation) 
    FeeInstanceSize 
    Size of one instance for a configured FEE block 
    FeeNrInstances 
    Configured number of instances for FEE block. Depends on expected 
    number of writes of FEE block and flash device’s specified erase 
    cycles 
    FeeNrDatasets 
    Configured number of datasets for FEE block. 
    DataLength 
    Configured size of user data for FEE block 
    FlsPageSize 
    Size of smallest writeable unit of flash device. Should be identical to 
    FEE’s write alignment. 
    FlsSectorSize 
    Size of smallest erasable unit of flash device Should be identical to 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    37 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    FEE’s address alignment. 
    align(value, alignment) 
    If  ‘value’  is  already  aligned  to  ‘alignment’,  ‘value’  is  returned. 
    Otherwise  the  next  greater  value  aligned  to  ‘alignment’  is 
    returned. 
    Table 6-1   Explanation of terms used in algorithms 
    1.  Calculation of size for one instance of FEE block: 
    FeeInstanceSize = align( 2 * FlsPageSize + FeeMgmtSize + DataLength, FlsPageSize) 
     
    2.  Calculation of size for one dataset of FEE block: 
    FeeDatasetSize = align(FlsPageSize + FeeInstanceSize * FeeNrInstances, FlsSectorSize) 
     
    3.  Calculation of size for one FEE block: 
    FeeBlockSize = FeeDatasetSize * FeeNrDatasets 
     
    It  becomes  clear  that  overhead  due  to  alignment  appears  two  times.  FEE  instances  are 
    aligned to flash device’s page boundaries and FEE datasets are aligned to flash device’s 
    sector  boundaries.  By  adjusting  the  parameters  DataLength  and  FeeNrInstances  it  is 
    possible  to  reduce  alignment-related  overhead.  Both  parameters  should  be  chosen  in  a 
    way  that  the  number  of  padding  bytes  is  minimalized  to  fill  the  entity  up  to  the  next 
    alignment boundary. It should be considered to reduce the size of DataLength in order to 
    decrease the total size of FeeDataSize. 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    38 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    7  Requirements and Recommendations 
    This  section  shall  point  out  requirements  the  user  system  needs  to  comply  with  when 
    using  this  FEE  module.  Additionally,  recommendations  are  made  for  use-case  of  this 
    module and its configuration with regard to limitations of FEE. 
    7.1 
    Requirements for the User System 
    The following requirements are focused on FEE’s underlying layers: Flash driver and Flash 
    memory hardware. 
    7.1.1 
    General Requirements 
    >  Only addressed flash pages and sectors shall be affected during a job 
    7.1.2 
    Write-Related 
    >  Only  if  intended  data  was  written  successfully  and  persistently  to  flash  memory,  FLS 
    driver shall return with MEMIF_JOB_OK 
    >  Only erased flash cells shall be writeable 
    >  Successfully written flash cells shall not alter their values over time 
    >  Write aborts (e.g. due to reset) shall only affect the flash page which is currently being 
    written 
    7.1.3 
    Read/Compare-Related 
    >  Only  if  intended  data was  read/compared  successfully  from flash memory,  FLS  driver 
    shall return with MEMIF_JOB_OK 
    >  If FLS driver does not support a BlankCheck API, erased flash cells shall contain FLS’ 
    erased value 
    7.1.4 
    Erase-Related 
    >  Only  if  intended  flash  area  was  erased  successfully  and  persistently,  FLS  driver  shall 
    return with MEMIF_JOB_OK 
    >  Erased flash cells shall remain erased over time until a write job is performed 
    >  Erase  aborts  (e.g.  due  to  reset)  shall  only  affect  the  flash  sector  which  is  currently 
    being erased 
    7.1.5 
    BlankCheck-Related 
    >  Only  if  all  flash  cells  in  intended  flash  area  are  erased,  FLS  driver  shall  return  with 
    MEMIF_JOB_OK 
     
    7.2 
    Recommendations 
    The following items shall serve as basis for general considerations regarding use-case and 
    FEE configuration. 
    >  The SmallSectorFEE shall be used with flash devices with reasonable small physical 
    sectors. This means that sector size shall not exceed the size of single configured 
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    39 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    blocks by far. SmallSectorFEE assigns every configured block to separate flash 
    sectors, thus overhead is kept small if block size is about the size of a flash sector or a 
    multiple of it.  
    >  It’s recommended to use this FEE module with internal data flash RV40F of Renesas’ 
    RH850 platform because of its 64 byte physical flash sectors. 
    >  If erase state of flash cells can’t be determined via Read service but BlankCheck 
    service, using the FLS’ BlankCheck service shall be enabled in 
    FeePartitionConfiguration. 
    >  ‘AddressAlignment’ parameter in FeePartitionConfiguration shall be identical to 
    referenced FlsSector’s sector size. 
    >  ‘WriteAlignment’ parameter in FeePartitionConfiguration shall be identical to referenced 
    FlsSector’s page size. 
    >  ‘ReadAlignment’ parameter in FeePartitionConfiguration shall be configured as small 
    as FLS driver and flash hardware allows in order to keep reading overhead small. 
    >  In FeeBlockConfiguration the number of instances for a block is calculated by ‘Number 
    Of Write Cycles’ and FLS module’s ‘Specified Erase Cycles’. If the expected ‘Number 
    Of Write Cycles’ for a block is nearly as large as a multiple of FLS module’s ‘Specified 
    Erase Cycles’ it should be considered to increase the expected ‘Number Of Write 
    Cycles’ so that one additional instance is allocated for this block. This way enough 
    reserve is established to prevent the flash area for this block from getting overstressed. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    40 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    8  Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    EEPROM 
    Electrically Erasable Programmable Read-Only Memory 
    FEE 
    Flash EEPROM Emulation 
    FLS 
    Flash module 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    NVM 
    Non-Volatile RAM Manager 
    RAM 
    Random Access Memory 
    SIP 
    Software Integration Package 
    SWS 
    Software Specification 
    Table 8-1   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    41 
    based on template version 6.0.1 


    Technical Reference MICROSAR Fee 
    9  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.1.0 
    42 
    based on template version 6.0.1 

    Document Outline


    1.3.138 - TechnicalReference_GenTool_CsAsrLegacyDb2SystemDescr_Vector

    YourTopic

    1.3.140 - TechnicalReference_GenTool_CsAsrLegacyDb2SystemDescr_Vectors

     
     
     
     
     
     
     
     
     
     
     
     
    Vector Legacy Converter 
    Technical Reference 
     
    Technical Documentation 
    Version 1.4.2 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Thorsten Fröhlinghaus 
    Status 
    Released 
     
     
     
     
     


    Technical Reference Vector Legacy Converter 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Thorsten Fröhlinghaus 
    2011-04-07 
    1.0 
    Created 
    Thorsten Fröhlinghaus 
    2011-04-07 
    1.0 
    Released 
    Thorsten Fröhlinghaus 
    2011-12-20 
    1.1 
    Legacy Converter V1.3.0 
    Thorsten Fröhlinghaus 
    2012-01-20 
    1.1 
    Released 
    Thorsten Fröhlinghaus 
    2012-03-22 
    1.2 
    Released 
    Thorsten Fröhlinghaus 
    2012-11-21 
    1.3 
    Released 
    Thorsten Fröhlinghaus 
    2014-04-01 
    1.4.1 
    Released 
    Thorsten Fröhlinghaus 
    2014-07-28 
    1.4.2 
    Released 
    Reference Documents 
    No. 
    Source  Title 
    Version 
    [1]   
    Autosar  Specification of the System Template, R3.1 Rev 4 
    V3.2.0 
    [2]   
    Autosar  Specification of the System Template, R3.2 Rev 1 
    V3.4.0 
    [3]   
    Autosar  System Template, R4.0 Rev 3 
    V4.2.0 
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    2 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    Contents 
    1 
    Introduction................................................................................................................... 5 
    2 
    Functional Description ................................................................................................. 6 
    2.1 
    DBC Transformation .......................................................................................... 8 
    2.2 
    LDF Transformation ......................................................................................... 12 
    2.3 
    Fibex Transformation ....................................................................................... 15 
    2.4 
    Extension File .................................................................................................. 21 
    3 
    Glossary and Abbreviations ...................................................................................... 25 
    3.1 

    Glossary .......................................................................................................... 25 
    3.2 
    Abbreviations ................................................................................................... 25 
    4 
    Contact ........................................................................................................................ 26 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    3 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    Tables 
    Table 2-1  
    Vector Legacy Converter help text. ............................................................. 6 
    Table 2-2  
    Transformation of CAN network objects. ..................................................... 9 
    Table 2-3  
    Transformation of user-defined attributes. ................................................. 11 
    Table 2-4  
    Transformation of LIN network objects. ..................................................... 14 
    Table 2-5  
    Transformation of Fibex 2.0.1 elements. ................................................... 18 
    Table 2-6  
    Transformation of Fibex 3.0.0/3.1.0 elements. .......................................... 20 
    Table 2-7  
    Vector System Description Extension file elements................................... 24 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    4 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    1  Introduction 
    The Vector Legacy Converter (VLC) supports the migration of legacy embedded software 
    to the AUTOSAR software architecture. The VLC is a console application which transforms 
    one  or  more  DBC-,  LDF-  and  Fibex  files  into  an AUTOSAR  System  Description  and  its 
    ECU Extracts. The VLC is typically called by the DaVinci Project Assistant (DPA), but it can 
    also be used as a stand-alone tool. The resulting ECU Extracts will serve as input for the 
    Initial EcuC Generator. 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    5 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    2  Functional Description 
    The VLC analyses legacy communication databases, and it maps their communication ele-
    ments to AUTOSAR System Description elements. There are no standards or established 
    rules which define such a mapping between legacy communication databases and System 
    Descriptions. For this reason, the VLC defines its own AUTOSAR mapping rules which aim 
    at preserving the semantics of the original communication databases. These generic rules 
    may be supplemented with OEM-specific rules. 
    The AUTOSAR System Description allows various modeling variants w.r.t. to, e.g., naming 
    conventions and package structures. The VLC imposes fixed modeling rules which define 
    a  common  namespace  for  DBC-,  LDF-  and  Fibex  transformations.  The  VLC  modeling 
    rules  are  not  coordinated  with  the  AUTOSAR  transformations  of  other  tools  from  other 
    vendors.  The  transformation  results  of  the  VLC  and  other  tools  may  appear  rather 
    different. 
    The VLC supports no user interaction, and thus the transformation between legacy formats 
    and AUTOSAR System Descriptions is always the same. However, the VLC still identifies 
    the manufacturer of a communication database, and it applies OEM-specific rules. These 
    OEM-specific rules must be implemented in advance. 
    The calling conventions and options of the VLC are specified with the following help text: 
     
    Usage: LegacyDb2SystemDescrConverter [options] <file|dir> [<file|dir> ...] 
    [extfile] 
     
    Create an AUTOSAR System Description out of one or more DBC, LDF or Fibex 
    communication databases. 
     
    Options: 
      -h, --help                 Show this help 
      -a, --adoptname            Adopt DBC filename as cluster name 
      -e, --extract              Create ECU extracts 
      -r, --release <31|32|40>   AUTOSAR release 
      -o, --output <file|dir>    Output file or directory 
       
    Parameters: 
      <file|dir>                 Input file (*.dbc, *.ldf, *.xml) or directory 
      extfile                    Extension file (*.vsde) 
     
                  Table 2-1   Vector Legacy Converter help text. 
    The options may also be specified in a file called LegacyDb2SystemDescrConverter.config 
    which resides in the same directory as the exe file LegacyDb2SystemDescrConverter.exe. 
    In this way, options can be defined which are processed, e.g., when calling the VLC from 
    the DPA. 
    With the option ‘-r’ or ‘--release’ the AUTOSAR schema version can be selected. Currently, 
    AUTOSAR  3.1.4,  AUTOSAR  3.2.1  and AUTOSAR  4.0.3  are  supported.  The  VLC  imple-
    ments  those  schema versions  which  are  required by the Vector tool chain,  especially by 
    the Initial EcuC Generator. The VLC does not aim at supporting arbitrary AUTOSAR sche-
    ma versions. 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    6 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    Please note that the DBC-, LDF- and Fibex transformations are rather sophisticated, and 
    thus we can only provide a general survey with this document. To identify the AUTOSAR 
    mapping  more  in  detail,  the  user  may,  e.g.,  perform  minor  changes  to  a  communication 
    database,  and  then  compare  the  transformation  results  before  and  after  these  changes. 
    The VLC defines a fixed order for all AUTOSAR elements, so two System Descriptions can 
    be easily diffed. 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    7 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    2.1 
    DBC Transformation 
    The DBC file format is based on a network-specific object model and on user-defined attri-
    butes. The former can be transformed in a generic way to AUTOSAR, while the latter often 
    require an OEM-specific transformation. The table below shows how CAN network objects 
    are mapped to AUTOSAR 3.1.4 or AUTOSAR 3.2.1 elements. 
    CAN network object 
    AUTOSAR element 
    Signal 
    SystemSignal 
     
      ShortName = Signal.Name 
      Length    = Signal.Bitcount 
      BooleanType|IntegerType|RealType 
        ShortName  = “DT_” + Signal.Name 
        LowerLimit = (Signal.Min-Signal.Offset)/Signal.Factor 
        UpperLimit = (Signal.Max-Signal.Offset)/Signal.Factor 
        CompuMethod 
          ShortName = “CM_” + Signal.Name 
          Unit 
            ShortName = “U_” + Signal.Unit 
          CompuInternalToPhys.CompuScale 
            LowerLimit = Signal.TextualEncoding.LowerBound 
            UpperLimit = Signal.TextualEncoding.UpperBound 
            CompuConst = “Cx<Limit>_” + Signal.TextalEncoding.Text 
          CompuInternalToPhys.CompuScale.CompuRationalCoeffs 
            CompuNumerator = Signal.Offset, Signal.Factor 
    SignalGroup 
    SystemSignalGroup 
     
      ShortName = “SG_” + SignalGroup.Name 
    CANBus 
    CanCluster 
      ShortName    = CANBus.Attributes.DBName 
      ProtocolName = “CAN” 
      PhysicalChannel 
        ShortName = “CHNL” 
    CANBus 
    Frame 
     .CANFrame 
      ShortName   = CANFrame.Name + “__” + CanCluster.ShortName 
      FrameLength = CANFrame.DLC 
    SignalIPdu|MultiplexedIPdu|DcmIPdu|NmPdu|NPdu 
      ShortName = CANFrame.Name + “__” + CanCluster.ShortName 
      Length    = 8*CANFrame.DLC 
    Frame.PduToFrameMapping 
      ShortName        = CANFrame.Name 
      PackingByteOrder = Intel 
      StartPosition    = 0 
    PhysicalChannel.CanFrameTriggering 
      ShortName  = “FT_” + CANFrame.Name 
      Identifier = CANFrame.ID 
    PhysicalChannel.IPduTriggering 
      ShortName  = “PT_” + CANFrame.Name 
    CANBus 
    ISignal 
     .CANFrame 
      ShortName = Signal.Name + “__” + CANFrame.Name 
     .MappedSignal 
                              + “__” + CanCluster.ShortName 
     .Signal 
    SignalIPdu.ISignalToIPduMapping 
      ShortName        = Signal.Name 
      PackingByteOrder = MappedSignal.Intel|Motorola 
      StartPosition    = MappedSignal.Startbit 
    PhysicalChannel.SignalTriggering 
      ShortName = “ST_” + Signal.Name + “__” + CANFrame.Name 
    CANBus 
    MultiplexedIPdu.SelectorField 
     .CANFrame 
      ByteOrder     = MappedMultiplexorSignal.Intel|Motorola 
     .MappedMultiplexorSignal 
      Length        = MultiplexorSignal.Bitcount 
     .MultiplexorSignal 
      StartPosition = MappedMultiplexorSignal.Startbit 
    CANBus 
    MultiplexedIPdu.DynamicPart.DynamicPartAlternative 
     .CANFrame 
      SelectorFieldCode = MappedMultiplexedSignal.MultiplexorValue 
     .MappedMultiplexorSignal 
      SignalIPdu 
     .MappedMultiplexedSignal 
        ShortName = CANFrame.Name + “_Mx<Code>__” + CanCluster.ShortName 
     .MultiplexedSignal 
        Length    = 8*CANFrame.DLC 
      PhysicalChannel.IPduTriggering 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    8 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
        ShortName  = “PT_” + CANFrame.Name + “_Mx<Code>” 
    CANNode 
    EcuInstance 
      ShortName           = CANNode.Name 
      ComProcessingPeriod = 0.001 
    EcuInstance.CanCommunicationController 
      ShortName = “CT_” + CanCluster.ShortName 
    EcuInstance.CommunicationConnector 
      ShortName = “CN_” + CanCluster.ShortName 
    EcuInstance.AssociatedIPduGroup(Rx) 
      ShortName = CANNode.Name + “__” + CanCluster.ShortName + “_Rx” 
    EcuInstance.AssociatedIPduGroup(Tx) 
      ShortName = CANNode.Name + “__” + CanCluster.ShortName + “_Tx” 
    CANNode 
    CommunicationConnector.FramePort 
     .RxCANFrame 
      ShortName = “FP_” + RxCANFrame.Name + “_Rx” 
      Direction = In 
    CommunicationConnector.IPduPort 
      ShortName = “PP_” + RxCANFrame.Name + “_Rx” 
      Direction = In 
    CANNode 
    CommunicationConnector.SignalPort 
     .RxCANFrame 
      ShortName = “SP_” + Signal.Name + “__” + RxCANFrame.Name + “_Rx” 
     .MappedSignal 
      Direction = In 
     .Signal 
     
    CANNode 
    CommunicationConnector.FramePort 
     .TxCANFrame 
      ShortName = “FP_” + TxCANFrame.Name + “_Tx” 
      Direction = Out 
    CommunicationConnector.IPduPort 
      ShortName = “PP_” + TxCANFrame.Name + “_Tx” 
      Direction = Out 
    CANNode 
    CommunicationConnector.SignalPort 
     .TxCANFrame 
      ShortName = “SP_” + Signal.Name + “__” + TxCANFrame.Name + “_Tx” 
     .MappedSignal 
      Direction = Out 
     .Signal 
     
    Table 2-2   Transformation of CAN network objects. 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    9 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    The subsequent table shows how user-defined attributes are processed by the AUTOSAR 
    transformation. 
    Attribute 
    Autosar element 
     
    ConstantSpecification 
     
      ShortName = “C_” + Signal.Name 
     
      BooleanLiteral|IntegerLiteral|RealLiteral 
     
        ShortName = “C_” + Signal.Name 
    Signal.GenSigStartValue 
        Value     = Signal.GenSigStartValue 
    CANFrame.GenMsgILSupport 
    SignalIPdu|MultiplexedIPdu 
    CANFrame.DiagRequest 
    DcmIPdu 
    CANFrame.DiagResponse 
    NPdu 
    CANFrame.DiagUUDTResponse 
    CANFrame.DiagState 
    CANFrame.NmAsrMessage 
    NmPdu 
    CANFrame.GenMsgSendType 
    SignalIPdu.IPduTimingSpecification 
     
    SignalIPdu.IPduTimingSpecification.CyclicTiming 
    CANFrame.GenMsgCycleTime 
      RepeatingTime = CANFrame.GenMsgCycleTime|GenMsgCycleTimeFast 
    CANFrame.GenMsgStartDelayTime 
      StartingTime  = CANFrame.GenMsgStartDelayTime 
     
    SignalIPdu.IPduTimingSpecification.EventControlledTiming 
    CANFrame.GenMsgNrOfRepetition 
      NumberOfRepeats  = CANFrame.GenMsgNrOfRepetition 
    CANFrame.GenMsgCycleTimeFast 
      RepetitionPeriod = CANFrame.GenMsgCycleTimeFast 
     
    SignalIPdu.IPduTimingSpecification 
    CANFrame.GenMsgDelayTime 
      MinimumDelay = CANFrame.GenMsgDelayTime 
     
    SignalIPdu.IPduTimingSpecification.TransmissionModeCondition 
    Signal.GenSigInactiveValue 
      MaskedNewDiffersX.X = Signal.GenSigInactiveValue 
     
    SignalIPdu.ISignalToIPduMapping 
    Signal.GenSigSendType 
      TransferProperty = Pending|Triggered|TriggeredWithoutRepetition 
                |TriggeredOnChange|TriggeredOnChangeWithoutRepetition 
     
    EcuInstance.CommunicationConnector.SignalPort 
    Signal.GenSigTimeoutTime 
      Timeout = Signal.GenSigTimeoutTime 
     
    CanCluster.PhysicalChannel.CanTpConnectionChannel 
    CANFrame.DiagConnection 
      DataPdu.DiagConnection = FlowControlPdu.DiagConnection 
    CANFrame.CanTpBs 
      BlockSize              = CANFrame.CanTpBs 
    CANFrame.CanTpSTmin 
      MinimumSeparationTime  = CANFrame.CanTpSTmin 
     
    CanCluster 
    CANBus.DBName 
      ShortName = CANBus.DBName 
     
    CanCluster 
    CANBus.Baudrate 
      Speed = CANBus.Baudrate 
     
    EcuInstance.CanCommunicationController.ConfigurationRequirements 
    CANBus.NBTMin 
      MinNumberOfTimeQuantaPerBit = CANBus.NBTMin 
    CANBus.SamplePointMin 
      MinSamplePoint              = CANBus.SamplePointMin 
    CANBus.SyncJumpWidthMin 
      MinSyncJumpWidth            = CANBus.SyncJumpWidthMin 
    CANBus.NBTMax 
      MaxNumberOfTimeQuantaPerBit = CANBus.NBTMax 
    CANBus.SamplePointMax 
      MaxSamplePoint              = CANBus.SamplePointMax 
    CANBus.SyncJumpWidthMax 
      MaxSyncJumpWidth            = CANBus.SyncJumpWidthMax 
     
    CanCluster 
     
      NmLowerCanID = CANBus.NmAsrBaseAddress 
     
      NmUpperCanID = CANBus.NmAsrBaseAddress 
     
                   + CANBus.NmAsrMessageCount-1 
     
    CanCluster.AdminData.CanNmConfiguration 
    CANBus.NmAsrBaseAddress 
      CanNmBaseAddress  = CANBus.NmAsrBaseAddress 
    CANBus.NmAsrMessageCount 
      CanNmMessageCount = CANBus.NmAsrMessageCount 
    CANBus.NmAsrCanMsgCycleTime 
      CanNmMsgCycleTime = CANBus.NmAsrCanMsgCycleTime 
     
    CanCluster 
    CANBus.NmAsrRepeatMessageTime 
      NmRepeatMessageStateTime = CANBus.NmAsrRepeatMessageTime 
    CANBus.NmAsrTimeoutTime 
      NmTimeoutTime            = CANBus.NmAsrTimeoutTime 
    CANBus.NmAsrWaitBusSleepTime 
      NmWaitBusSleepTime       = CANBus.NmAsrWaitBusSleepTime 
     
    EcuInstance.CommunicationConnector 
    CANNode.NmAsrNodeIdentifer 
      NmAddress = CANNode.NmAsrNodeIdentifer 
     
    EcuInstance.AdminData.CanNmConfiguration 
    CANNode.NmAsrCanMsgCycleOffset    CanNmMsgCycleOffset = CANNode.NmAsrCanMsgCycleOffset 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    10 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    CANNode.NmAsrCanMsgReducedTime    CanNmMsgReducedTime = CANNode.NmAsrCanMsgReducedTime 
    Table 2-3   Transformation of user-defined attributes. 
    In  addition  to  the  transformation  steps described  in  the  tables  above,  the following  rules 
    hold for the DBC transformation. 
    >  For SignalGroups the SignalIPdu.ISignalToIPduMapping.TransferProperty is always Pending. 
    >  The attribute CANBus.ILTxTimeout is not processed. 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    11 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    2.2 
    LDF Transformation 
    The LDF file format does not provide any user-defined attributes or other OEM extensions. 
    The subsequent table shows how LIN network objects are transformed in a generic way to 
    AUTOSAR 3.1.4 or AUTOSAR 3.2.1 elements. 
    LIN network object 
    AUTOSAR element 
    Signal 
    SystemSignal 
      ShortName = Signal.Name 
      Length    = Signal.Bitcount 
      BooleanType|IntegerType 
        ShortName  = “DT_” + Signal.Name 
        LowerLimit = (Signal.Min-Signal.Offset)/Signal.Factor 
        UpperLimit = (Signal.Max-Signal.Offset)/Signal.Factor 
        CompuMethod 
          ShortName = “CM_” + Signal.Name 
          Unit 
            ShortName = “U_” + Signal.Unit 
          CompuInternalToPhys.CompuScale 
            LowerLimit = Signal.TextualEncoding.LowerBound 
            UpperLimit = Signal.TextualEncoding.UpperBound 
            CompuConst = “Cx<Limit>_” + Signal.TextalEncoding.Text 
          CompuInternalToPhys.CompuScale.CompuRationalCoeffs 
            CompuNumerator = Signal.Offset, Signal.Factor 
      ConstantSpecification 
        ShortName = “C_” + Signal.Name 
        BooleanLiteral|IntegerLiteral 
          ShortName = “C_” + Signal.Name 
          Value     = Signal.LDFSignalSpecialValues 
    LINBus 
    LinCluster 
      ShortName       = LINBus.LINChannelPostfix 
      ProtocolName    = “LIN” 
      ProtocolVersion = LINBus.ProtocolVersion 
      Speed           = LINBus.BaudRate 
      PhysicalChannel 
        ShortName = “CHNL” 
    LINBus 
    Frame 
     .LINFrame(Unconditional) 
      ShortName   = LINFrame.Name + “__” + LinCluster.ShortName 
      FrameLength = LINFrame.Size 
    SignalIPdu|DcmIPdu|NPdu 
      ShortName = LINFrame.Name + “__” + LinCluster.ShortName 
      Length    = 8*LINFrame.Size 
    Frame.PduToFrameMapping 
      ShortName        = LINFrame.Name 
      PackingByteOrder = LINBus.ByteOrder 
      StartPosition    = 0(Intel)|7(Motorola) 
    PhysicalChannel.LinFrameTriggering 
      ShortName    = “FT_” + LINFrame.Name 
      ChecksumType = LINFrame.CSModel 
      Identifier   = LINFrame.ID 
    PhysicalChannel.IPduTriggering 
      ShortName  = “PT_” + LINFrame.Name 
    LINBus 
    ISignal 
     .LINFrame(Unconditional) 
      ShortName = Signal.Name + “__” + LINFrame.Name 
     .MappedSignal 
                              + “__” + LinCluster.ShortName 
     .Signal 
    SignalIPdu.ISignalToIPduMapping 
      ShortName        = Signal.Name 
      PackingByteOrder = MappedSignal.Intel|Motorola 
      StartPosition    = MappedSignal.Startbit 
    PhysicalChannel.SignalTriggering 
      ShortName = “ST_” + Signal.Name + “__” + LINFrame.Name 
    LINBus 
    SubstitutionFrame 
     .LINFrame(Sporadic 
      ShortName        = LINFrame.Name + “__” + LinCluster.ShortName 
              |EventTriggered) 
      FrameLength      = LINFrame.Size 
      SubstitutionType = Sporadic|EventTriggered 
    PhysicalChannel.LinFrameTriggering 
      ShortName    = “FT_” + LINFrame.Name 
      ChecksumType = LINFrame.CSModel 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    12 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
      Identifier   = LINFrame.ID 
    LINNode(Master|Slave) 
    EcuInstance 
      ShortName = LINNode.Name 
    EcuInstance.LinMaster 
      ShortName      = “CT_” + LinCluster.ShortName 
      TimeBase       = LINNode.Timebase 
      TimeBaseJitter = LINNode.Jitter 
    EcuInstance.LinSlave 
      ShortName        = “CT_” + LinCluster.ShortName 
      ConfiguredNad    = LINSlaveNode.ConfiguredNad 
      LinErrorResponse = LINSlaveNode.ResponseErrorSignal 
      ProtocolVersion  = LINSlaveNode.ProtocolVersion 
    EcuInstance.CommunicationConnector 
      ShortName = “CN_” + LinCluster.ShortName 
    EcuInstance.AssociatedIPduGroup(Rx) 
      ShortName = LINNode.Name + “__” + LinCluster.ShortName + “_Rx” 
    EcuInstance.AssociatedIPduGroup(Tx) 
      ShortName = LINNode.Name + “__” + LinCluster.ShortName + “_Tx” 
    LINNode 
    CommunicationConnector.FramePort 
     .RxLINFrame 
      ShortName = “FP_” + RxLINFrame.Name + “_Rx” 
      Direction = In 
    CommunicationConnector.IPduPort 
      ShortName = “PP_” + RxLINFrame.Name + “_Rx” 
      Direction = In 
    LINNode 
    CommunicationConnector.SignalPort 
     .RxLINFrame 
      ShortName = “SP_” + Signal.Name + “__” + RxLINFrame.Name + “_Rx” 
     .MappedSignal 
      Direction = In 
     .Signal 
     
    LINNode 
    CommunicationConnector.FramePort 
     .TxLINFrame 
      ShortName = “FP_” + TxLINFrame.Name + “_Tx” 
      Direction = Out 
    CommunicationConnector.IPduPort 
      ShortName = “PP_” + TxLINFrame.Name + “_Tx” 
      Direction = Out 
    LINNode 
    CommunicationConnector.SignalPort 
     .TxLINFrame 
      ShortName = “SP_” + Signal.Name + “__” + TxLINFrame.Name + “_Tx” 
     .MappedSignal 
      Direction = Out 
     .Signal 
     
    LINBus 
    LinCluster.LinScheduleTable 
     .LINScheduleTable 
      ShortName = LINScheduleTable.Name 
      Priority  = 255 
      RunMode   = RunContinuous 
    LINBus 
    LinFrameTriggering.RelativelyScheduledTiming 
     .LINScheduleTable 
      Delay           = UnconditionalFrameSlot.SlotDelay 
     .UnconditionalFrameSlot 
      PositionInTable = UnconditionalFrameSlot.ID 
    LINBus 
    LinFrameTriggering.RelativelyScheduledTiming 
     .LINScheduleTable 
      Delay           = DiagnosticFrameSlot.SlotDelay 
     .DiagnosticFrameSlot 
      PositionInTable = DiagnosticFrameSlot.ID 
    LINBus 
    LinFrameTriggering.AssignFrameIdTiming 
     .LINScheduleTable 
      Delay           = AssignFrameIdSlot.SlotDelay 
     .AssignFrameIdSlot 
      PositionInTable = AssignFrameIdSlot.ID 
      AssignedFrameTriggering 
        ShortName = “FT_” + AssignFrameIdSlot.FrameToAssign.Name 
    LINBus 
    LinFrameTriggering.UnassignFrameIdTiming 
     .LINScheduleTable 
      Delay           = UnassignFrameIdSlot.SlotDelay 
     .UnassignFrameIdSlot 
      PositionInTable = UnassignFrameIdSlot.ID 
      UnassignedFrameTriggering 
        ShortName = “FT_” + UnassignFrameIdSlot.FrameToUnassign.Name 
    LINBus 
    LinFrameTriggering.AssignNADTiming 
     .LINScheduleTable 
      Delay           = AssignNADSlot.SlotDelay 
     .AssignNADSlot 
      PositionInTable = AssignNADSlot.ID 
      NewNAD          = AssignNADSlot.NewNAD 
    LINBus 
    LinFrameTriggering.DataTiming 
     .LINScheduleTable 
      Delay                = ConditionalChangeNADSlot.SlotDelay 
     .ConditionalChangeNADSlot 
      PositionInTable      = ConditionalChangeNADSlot.ID 
      FreeFormatByteValues = ConditionalChangeNADSlot.DataBytes 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    13 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    LINBus 
    LinFrameTriggering.DataTiming 
     .LINScheduleTable 
      Delay                = FreeFormatSlot.SlotDelay 
     .FreeFormatSlot 
      PositionInTable      = FreeFormatSlot.ID 
      FreeFormatByteValues = FreeFormatSlot.DataBytes 
    LINBus 
    LinFrameTriggering.RelativelyScheduledTiming 
     .LINScheduleTable 
      Delay           = EventTriggeredFrameSlot.SlotDelay 
     .EventTriggeredFrameSlot 
      PositionInTable = EventTriggeredFrameSlot.ID 
    LINBus 
    LinFrameTriggering.RelativelyScheduledTiming 
     .LINScheduleTable 
      Delay           = SporadicFrameSlot.SlotDelay 
     .SporadicFrameSlot 
      PositionInTable = SporadicFrameSlot.ID 
    LINBus 
    LinFrameTriggering.DataTiming 
     .LINScheduleTable 
      Delay                = DataDumpSlot.SlotDelay 
     .DataDumpSlot 
      PositionInTable      = DataDumpSlot.ID 
      FreeFormatByteValues = DataDumpSlot.DataBytes 
    LINBus 
    LinFrameTriggering.DataTiming 
     .LINScheduleTable 
      Delay                = AssignFrameIdRangeSlot.SlotDelay 
     .AssignFrameIdRangeSlot 
      PositionInTable      = AssignFrameIdRangeSlot.ID 
      FreeFormatByteValues = AssignFrameIdRangeSlot.DataBytes 
    LINBus 
    LinFrameTriggering.DataTiming 
     .LINScheduleTable 
      Delay                = SaveConfigurationSlot.SlotDelay 
     .SaveConfigurationSlot 
      PositionInTable      = SaveConfigurationSlot.ID 
      FreeFormatByteValues = SaveConfigurationSlot.DataBytes 
    Table 2-4   Transformation of LIN network objects. 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    14 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    2.3 
    Fibex Transformation 
    The VLC supports the transformation of Fibex 2.0.1 files and of Fibex 3.0.0 or 3.1.0 files. 
    The main difference between these Fibex versions is the modeling of PDUs. In Fibex 2.0.1 
    PDUs are modeled with signal groups, while in Fibex 3.0.0 and 3.1.0 PDUs are an explicit 
    part of the XML schema. The table below shows how Fibex 2.0.1 elements are mapped to 
    AUTOSAR 3.1.4 or AUTOSAR 3.2.1 elements. 
    Fibex element 
    AUTOSAR element 
    PhysicalDimension 
    PhysicalDimesion 
      ShortName            = PhysicalDimension.ShortName 
      LengthExp            = PhysicalDimension.LengthExp 
      MassExp              = PhysicalDimension.MassExp 
      TimeExp              = PhysicalDimension.TimeExp 
      CurrentExp           = PhysicalDimension.CurrentExp 
      TemperatureExp       = PhysicalDimension.TemperatureExp 
      MolarAmoutExp        = PhysicalDimension.MolarAmoutExp 
      LuminousIntensityExp = PhysicalDimension.LuminousIntensityExp 
    Unit 
    Unit 
      ShortName      = Unit.ShortName 
      DisplayName    = Unit.DisplayName 
      FactorSiToUnit = Unit.FactorSiToUnit 
      OffsetSiToUnit = Unit.OffsetSiToUnit 
    Coding 
    BooleanType|OpaqueType|IntegerType|RealType|CharType|StringType 
      ShortName  = Coding.ShortName 
      LowerLimit = (Coding.CompuMethod.PhysConstr.LowerLimit 
                  - Coding.CompuMethod.CompuRationalCoeffs[0]) 
                  / Coding.CompuMethod.CompuRationalCoeffs[1] 
      UpperLimit = (Coding.CompuMethod.PhysConstr.UpperLimit 
                  - Coding.CompuMethod.CompuRationalCoeffs[0]) 
                  / Coding.CompuMethod.CompuRationalCoeffs[1] 
      InvalidValue.BooleanLiteral|OpaqueLiteral|IntegerLiteral 
                  |RealLiteral|CharLiteral|StringLiteral 
        ShortName = Coding.ShortName 
        Value     = Coding.CompuMethod.InternalConstr.LowerLimit 
    Coding 
    CompuMethod 
     .CompuMethod 
      ShortName = “CM_” + CompuMethod.ShortName 
      CompuInternalToPhys.CompuScale 
        LowerLimit = CompuMethod.CompuScale.LowerLimit 
        UpperLimit = CompuMethod.CompuScale.UpperLimit 
        CompuConst = “Cx<Limit>_” + CompuMethod.CompuScale.CompuConst 
        CompuRationalCoeffs = CompuMethod.CompuScale.CompuRationalCoeffs 
    Signal 
    SystemSignal 
      ShortName = Signal.ShortName 
      Length    = Signal.Coding.BitLength 
    ConstantSpecification 
      ShortName = “C_” + Signal.ShortName 
      BooleanLiteral|OpaqueLiteral|IntegerLiteral|RealLiteral 
                                  |CharLiteral|StringLiteral 
        ShortName = “C_” + Signal.ShortName 
        Value     = Signal.DefaultValue 
    Frame 
    Frame 
      ShortName   = Frame.ShortName 
      FrameLength = Frame.ByteLength 
    SignalGroup 
    SignalIPdu|DcmIPdu|NmPdu|NPdu 
      ShortName = SignalGroup.ShortName 
      Length    = SignalGroup.BitLength 
    Frame.PduToFrameMapping 
      ShortName        = SignalGroup.ShortName 
      PackingByteOrder = Intel 
      StartPosition    = Frame.SignalInstance.BitPosition 
                         - SignalGroup.OrderedSignal.BitPosition 
    Frame 
    ISignal 
     .SignalInstance 
      ShortName = Signal.ShortName + “__” + Frame.ShortName 
     .Signal 
    SignalIPdu.ISignalToIPduMapping 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    15 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
      ShortName        = Signal.ShortName 
      PackingByteOrder = SignalInstance.Intel|Motorola 
      StartPosition    = SignalInstance.BitPosition 
                         - Frame.PduToFrameMapping.StartPosition 
    Frame 
    MultiplexedIPdu 
     .Multiplexer 
      ShortName = Frame.ShortName 
     .Switch 
      Length    = 8*Frame.ByteLength 
    Frame.PduToFrameMapping 
      ShortName        = Frame.ShortName 
      PackingByteOrder = Intel 
      StartPosition    = 0 
    MultiplexedIPdu.SelectorField 
      ByteOrder     = Switch.Intel|Motorola 
      Length        = Switch.BitLength 
      StartPosition = Switch.BitPosition 
    Frame 
    MultiplexedIPdu.DynamicPart.DynamicPartAlternative 
     .Multiplexer 
      SelectorFieldCode = SubFrame.SwitchCode 
     .Data 
      SignalIPdu 
     .SubFrame 
        ShortName = SubFrame.ShortName + “_Mx” + SubFrame.SwitchCode 
        Length    = 8*Frame.ByteLength 
    Cluster(FlexRay) 
    FlexrayCluster 
      ShortName               = Cluster.ShortName 
      MaxFrameLength          = Cluster.MaxFrameLength 
      ProtocolName            = Cluster.Protocol 
      ProtocolVersion         = Cluster.ProtocolVersion 
      Speed                   = Cluster.Speed 
      ActionPointOffset       = Cluster.ActionPointOffset 
      Bit                     = Cluster.Bit/1000000 
      CasRxLowMin             = Cluster.CasRxLowMin 
      CasRxLowMax             = Cluster.CasRxLowMax 
      ColdStartAttempts       = Cluster.ColdStartAttempts 
      Cycle                   = Cluster.Cycle/1000000 
      DynamicSlotIdlePhase    = Cluster.DynamicSlotIdlePhase 
      ListenNoise             = Cluster.ListenNoise 
      MacroPerCycle           = Cluster.MacroPerCycle 
      MacrotickDuration       = Cluster.Macrotick/1000000 
      MaxInitialisationError  = Cluster.MaxInitializationError/100000 
      MaxWithoutClockCorrectionFatal 
                              = Cluster.MaxWithoutClockCorrectionFatal 
      MaxWithoutClockCorrectionPassive 
                              = Cluster.MaxWithoutClockCorrectionPassive 
      MinislotActionPointOffset = Cluster.MinislotActionPointOffset 
      MinislotDuration        = Cluster.Minislot 
      NetworkIdleTime         = Cluster.NIT 
      NetworkManagementVectorLength 
                              = Cluster.NetworkManagementVectorLength 
      NumberOfCycles          = Cluster.NumberOfCycles 
      NumberOfMinislots       = Cluster.NumberOfMinislots 
      NumberOfStaticSlots     = Cluster.NumberOfStaticSlots 
      OffsetCorrectionMax     = Cluster.OffsetCorrectionMax/1000000 
      OffsetCorrectionStart   = Cluster.OffsetCorrectionStart 
      PayloadLengthStatic     = Cluster.PayloadLengthStatic 
      SampleClockPeriod       = Cluster.SampleClockPeriod/1000000 
      StaticSlotDuration      = Cluster.StaticSlot 
      SymbolWindow            = Cluster.SymbolWindow 
      SyncFrameIdCountMax     = Cluster.SyncNodeMax 
      TransmissionStartSequenceDuration = Cluster.TSSTransmitter 
      WakeupRxIdle            = Cluster.WakeUpSymbolRxIdle 
      WakeupRxLow             = Cluster.WakeUpSymbolRxLow 
      WakeupRxWindow          = Cluster.WakeUpSymbolRxWindow 
      WakeupTxActive          = Cluster.WakeUpSymbolTxLow 
      WakeupTxIdle            = Cluster.WakeUpSymbolTxIdle 
    Channel 
    FlexrayCluster.FlexrayPhysicalChannel 
      ShortName   = Channel.ShortName 
      ChannelName = Channel.FlexrayChannelName 
    Channel 
    FlexrayPhysicalChannel.FlexrayFrameTriggering 
     .FrameTriggering 
      ShortName = “FT_” + FrameTriggering.AbsolutelyScheduledTiming 
    Channel 
    FlexrayFrameTriggering.AbsolutelyScheduledTiming 
     .FrameTriggering 
      SlotID          = AbsolutelyScheduledTiming.SlotID 
     .AbsolutelyScheduledTiming    BaseCycle       = AbsolutelyScheduledTiming.BaseCycle 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    16 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
      CycleRepetition = AbsolutelyScheduledTiming.CycleRepetition 
    Channel 
    FlexrayPhysicalChannel.IPduTriggering 
     .FrameTriggering 
      ShortName = “PT_” + SignalGroup.ShortName 
     .Frame 
     .SignalGroup 
    Channel 
    FlexrayPhysicalChannel.SignalTriggering 
     .FrameTriggering 
      ShortName = “ST_” + Signal.ShortName + “__”+ SignalGroup.ShortName 
     .Frame 
     .SignalGroup 
     .Signal 
    Channel 
    SignalIPdu.IPduTimingSpecification.CyclicTiming 
     .FrameTriggering 
      RepeatingTime = CyclicTiming.RepeatingTimeRange 
     .CyclicTiming 
    Channel 
    SignalIPdu.IPduTimingSpecification.EventControlledTiming 
     .FrameTriggering 
      RepetitionPeriod = EventControlledTiming.DebounceTimeRange 
     .EventControlledTiming 
    Channel 
    SignalIPdu.IPduTimingSpecification.RequestControlledTiming 
     .FrameTriggering 
      ResponseTime = RequestControlledTiming.ResponseTimeRange 
     .RequestControlledTiming 
    Ecu 
    EcuInstance 
      ShortName = Ecu.ShortName 
    Ecu 
    EcuInstance.FlexrayCommunicationController 
     .Controller 
      ShortName                   = Controller.ShortName 
      AcceptedStartupRange        = Controller.AcceptedStartupRange 
      AllowHaltDueToClock         = Controller.AllowHaltDueToClock 
      AllowPassiveToActive        = Controller.AllowPassiveToActive 
      ClusterDriftDamping         = Controller.ClusterDriftDamping 
      DecodingCorrection          = Controller.DecodingCorrection 
      DelayCompensationA          = Controller.DelayCompensationA 
      DelayCompensationB          = Controller.DelayCompensationB 
      ExternOffsetCorrection      = Controller.ExternOffsetCorrection 
      ExternRateCorrection        = Controller.ExternRateCorrection 
      KeySlotId                   = Controller.KeySlotUsage.StartupSync 
                                  | Controller.KeySlotUsage.Sync 
      KeySlotUsedForStartUp  = Controller.KeySlotUsage.StartupSync!=null 
      KeySlotUsedForSync     = Controller.KeySlotUsage.StartupSync!=null 
                             | Controller.KeySlotUsage.Sync       !=null 
      LatestTx                    = Controller.LatestTx 
      ListenTimeout               = Controller.ListenTimeout 
      MacroInitialOffsetA         = Controller.MacroInitialOffsetA 
      MacroInitialOffsetB         = Controller.MacroInitialOffsetB 
      MaximumDynamicPayloadLength = Controller.MaxDynamicPayloadLength 
      MicroInitialOffsetA         = Controller.MicroInitialOffsetA 
      MicroInitialOffsetB         = Controller.MicroInitialOffsetB 
      MicroPerCycle               = Controller.MicroPerCycle 
      MicrotickDuration           = Controller.Microtick/1000000 
      OffsetCorrectionOut         = Controller.OffsetCorrectionOut 
      RateCorrectionOut           = Controller.RateCorrectionOut 
      SamplesPerMicrotick         = Controller.SamplesPerMicrotick 
      WakeUpPattern               = Controller.WakeUpPattern 
    Ecu 
    EcuInstance.FlexRayCommunicationConnector 
     .Connector 
      ShortName     = “CN_” + Cluster.ShortName 
                            + “__” + Connector.Channel.ShortName 
      TpAddress     = Ecu.DiagnosticAddress[Physical] 
      WakeUpChannel = Connector.WakeUpChannel 
    EcuInstance.AssociatedIPduGroup(Rx) 
      ShortName = Ecu.ShortName 
                  + “__” + Connector.Channel.ShortName + “_Rx” 
    EcuInstance.AssociatedIPduGroup(Tx) 
      ShortName = Ecu.ShortName 
                  + “__” + Connector.Channel.ShortName + “_Tx” 
    Ecu 
    FlexRayCommunicationConnector.FramePort 
     .Connector 
      ShortName = “FP_” 
     .InputPort 
                  + FrameTriggering.AbsolutelyScheduledTiming + “_Rx” 
     .FrameTriggering 
      Direction = In 
    Ecu 
    FlexRayCommunicationConnector.IPduPort 
     .Connector 
      ShortName = “PP_” + SignalGroup.ShortName + “_Rx” 
     .InputPort 
      Direction = In 
     .SignalInstance 
    FlexRayCommunicationConnector.SignalPort 
     .Signal 
      ShortName = “SP_” + Signal.ShortName 
     .SignalGroup 
                        + “__” + SignalGroup.ShortName + “_Rx” 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    17 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
      Direction = In 
    Ecu 
    FlexRayCommunicationConnector.FramePort 
     .Connector 
      ShortName = “FP_” 
     .OutputPort 
                  + FrameTriggering.AbsolutelyScheduledTiming + “_Tx” 
     .FrameTriggering 
      Direction = Out 
    Ecu 
    FlexRayCommunicationConnector.IPduPort 
     .Connector 
      ShortName = “PP_” + SignalGroup.ShortName + “_Tx” 
     .OutputPort 
      Direction = Out 
     .SignalInstance 
    FlexRayCommunicationConnector.SignalPort 
     .Signal 
      ShortName = “SP_” + Signal.ShortName 
     .SignalGroup 
                        + “__” + SignalGroup.ShortName + “_Tx” 
      Direction = Out 
    Table 2-5   Transformation of Fibex 2.0.1 elements. 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    18 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    The subsequent table shows how Fibex 3.0.0 or 3.1.0 elements are mapped to AUTOSAR 
    3.1.4 or AUTOSAR 3.2.1 elements. 
    Fibex element 
    AUTOSAR Element 
    PhysicalDimension 
    see Table 2-5 
    Unit 
    see Table 2-5 
    Coding 
    see Table 2-5 
    Signal 
    see Table 2-5 
    Frame 
    see Table 2-5 
    Frame 
    Frame.PduToFrameMapping 
     .PduInstance 
      ShortName                   = PduInstance.Pdu.ShortName 
      PackingByteOrder            = PduInstance.Intel|Motorola 
      StartPosition               = PduInstance.BitPosition 
      UpdateIndicationBitPosition = PduInstance.PduUpdateBitPosition 
    Pdu 
    SignalIPdu|MultiplexedIPdu|DcmIPdu|NmPdu|NPdu 
      ShortName = Pdu.ShortName 
      Length    = 8*Pdu.ByteLength 
    Pdu 
    ISignal 
     .SignalInstance 
      ShortName = Signal.ShortName + “__” + Pdu.ShortName 
     .Signal 
    SignalIPdu.ISignalToIPduMapping 
      ShortName        = Signal.ShortName 
      PackingByteOrder = SignalInstance.Intel|Motorola 
      StartPosition    = SignalInstance.BitPosition 
    Pdu 
    MultiplexedIPdu.SelectorField 
     .Multiplexer 
      ByteOrder     = Switch.Intel|Motorola 
     .Switch 
      Length        = Switch.BitLength 
      StartPosition = Switch.BitPosition 
    Pdu 
    MultiplexedIPdu.DynamicPart.DynamicPartAlternative 
     .Multiplexer 
      SelectorFieldCode = SwitchedPduInstance.SwitchCode 
     .DynamicPart 
      SignalIPdu 
     .SwitchedPduInstance 
        ShortName = SwitchedPduInstance.Pdu.ShortName 
        Length    = 8*SwitchedPduInstance.Pdu.ByteLength 
    Cluster(FlexRay) 
    see Table 2-5 
    Channel 
    see Table 2-5 
    Channel 
    see Table 2-5 
     .FrameTriggering 
    Channel 
    see Table 2-5 
     .FrameTriggering 
     .AbsolutelyScheduledTiming 
    Channel 
    FlexrayPhysicalChannel.IPduTriggering 
     .PduTriggering 
      ShortName = “PT_” + PduTriggering.Pdu.ShortName 
    Channel 
    FlexrayPhysicalChannel.SignalTriggering 
     .PduTriggering 
      ShortName = “ST_” + Signal.ShortName 
     .Pdu 
                        + “__” + PduTriggering.Pdu.ShortName 
     .SignalInstance 
     .Signal 
    Channel 
    SignalIPdu.IPduTimingSpecification.CyclicTiming 
     .PduTriggering 
      FinalRepetitions = CyclicTiming.FinalRepetitions 
     .CyclicTiming 
      RepeatingTime    = CyclicTiming.RepeatingTimeRange 
      StartingTime     = CyclicTiming.StartingTimeRange 
    Channel 
    SignalIPdu.IPduTimingSpecification.EventControlledTiming 
     .PduTriggering 
      NumberOfRepeats  = EventControlledTiming.FinalRepetitions 
     .EventControlledTiming 
      RepetitionPeriod = EventControlledTiming.DebounceTimeRange 
    Channel 
    SignalIPdu.IPduTimingSpecification.RequestControlledTiming 
     .PduTriggering 
      ResponseTime = RequestControlledTiming.ResponseTimeRange 
     .RequestControlledTiming 
    Ecu 
    see Table 2-5 
    Ecu 
    see Table 2-5 
     .Controller 
    Ecu 
    see Table 2-5 
     .Connector 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    19 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    Ecu 
    see Table 2-5 
     .Connector 
     .InputPort 
     .FrameTriggering 
    Ecu 
    FlexRayCommunicationConnector.IPduPort 
     .Connector 
      ShortName = “PP_” + PduTriggering.Pdu.ShortName + “_Rx” 
     .InputPort 
      Direction = In 
     .IncludedPdu 
     .PduTriggering 
    Ecu 
    FlexRayCommunicationConnector.SignalPort 
     .Connector 
      ShortName = “SP_” + SignalInstance.Signal.ShortName + “__” 
     .InputPort 
                       + IncludedPdu.PduTriggering.Pdu.ShortName + “_Rx” 
     .IncludedPdu 
      Direction = In 
     .IncludedSignal 
     .SignalInstance 
    Ecu 
    see Table 2-5 
     .Connector 
     .OutputPort 
     .FrameTriggering 
    Ecu 
    FlexRayCommunicationConnector.IPduPort 
     .Connector 
      ShortName = “PP_” + PduTriggering.Pdu.ShortName + “_Tx” 
     .OutputPort 
      Direction = Out 
     .IncludedPdu 
     .PduTriggering 
    Ecu 
    FlexRayCommunicationConnector.SignalPort 
     .Connector 
      ShortName = “SP_” + SignalInstance.Signal.ShortName + “__” 
     .OutputPort 
                       + IncludedPdu.PduTriggering.Pdu.ShortName + “_Tx” 
     .IncludedPdu 
      Direction = Out 
     .IncludedSignal 
     .SignalInstance 
    TpConfig 
    FlexrayPhysicalChannel.TpAddress 
     .TpAddress 
      ShortName = “TA_” + TpAddress 
      TpAddress = TpAddress 
    TpConfig 
    FlexrayPhysicalChannel.FlexrayTpChannel 
     .TpChannel 
      AckType               = TpChannel.AckType 
      ExtendedAddressing    = TpChannel.AddressingType == FrtpTb 
      MaxBs                 = TpChannel.MaxBlockSize 
      MaxRetries            = TpChannel.MaxRetries 
      MaximumMessageLength  = TpChannel.MaximumMessageLength 
      MulticastSegmentation = TpChannel.GroupSegmentation 
      TimeoutBs             = TpChannel.TimeoutBs 
      TimeoutCr             = TpChannel.TimeoutCr 
      TransmitCancellation  = TpChannel.TransmitCancellation 
    TpConfig 
    FlexrayTpChannel.FlexRayTpConnection 
     .TpChannel 
    FlexrayTpChannel.FlexRayTpConnection.DirectTpSdu 
     .TpConnection 
      ShortName = TpConnection.ShortName + “_Rq” 
    FlexrayTpChannel.FlexRayTpConnection.ReversedTpSdu 
      ShortName = TpConnection.ShortName + “_Rs” 
    TpConfig 
    FlexrayPhysicalChannel.FlexrayTpNode 
     .TpNode 
      ShortName = TpNode.ShortName 
    FlexrayPhysicalChannel.FlexrayTpChannel 
      MaxAr                 = TpNode.MaxAr 
      MaxAs                 = TpNode.MaxAs 
      MaxBufferRequest      = TpNode.BufferRequest 
      MaxFrIf               = TpNode.MaxFrif 
      MinimumSeparationTime = TpNode.Stmin 
      TimeBuffer            = TpNode.TimeBuffer 
      TimeFrIf              = TpNode.TimeFrif 
      TimeoutAr             = TpNode.TimeoutAr 
      TimeoutAs             = TpNode.TimeoutAs 
    Table 2-6   Transformation of Fibex 3.0.0/3.1.0 elements. 
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    20 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    2.4 
    Extension File 
    The Vector System Description Extension (VSDE) file is used to supplement the content of 
    DBC-, LDF- or Fibex files. An extension file defines certain communication elements which 
    might  be  missing  in  the  original  legacy  communication  databases,  or  which  cannot  be 
    specified  with  these  communication  databases.  The  table  below  explains  the  extension 
    elements which are supported so far. 
    VSDE element 
    Description 
    <FILTERING> 
    The dual channel FlexRayCluster FlexRay01 is 
      <FLEXRAY-CLUSTER-REF CHANNEL=”A”>FlexRay01 
    filtered for its A channel.
        </FLEXRAY-CLUSTER-REF> 
     
    </FILTERING> 
    This feature is supported for Fibex databases. 
    <CAN-CLUSTER-NAME> 
    The CanCluster Can01 obtains a new name 
      <CAN-CLUSTER-REF>Can01</CAN-CLUSTER-REF> 
    Can01NewName. Similarly, LinClusters and 
      <SHORT-NAME>Can01NewName</SHORT-NAME> 
    </CAN-CLUSTER-NAME> 
    FlexrayClusters can be renamed. 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <ECU-INSTANCE-NAME> 
    The ECU Ecu01 obtains a new name 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    Ecu01NewName.
      <SHORT-NAME>Ecu01NewName</SHORT-NAME> 
     
    </ECU-INSTANCE-NAME> 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <SYSTEM-SIGNAL-NAME> 
    The signal Sig01 within pdu Pdu01 obtains a 
      <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    new name Sig01NewName. Signal renaming
      <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
     
      <SHORT-NAME>Sig01NewName</SHORT-NAME> 
    is used, e.g., to distinguish signals of the same 
    </SYSTEM-SIGNAL-NAME> 
    name in different pdus. 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <SYSTEM-SIGNAL-GROUP> 
    The signals Sig01 and Sig02 are aggregated to 
      <SHORT-NAME>SG_SigGrp01</SHORT-NAME> 
    a new signal group SG_SigGrp01. The signals 
      <SYSTEM-SIGNAL-REFS> 
        <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
    must be defined in the same database. Each 
        <SYSTEM-SIGNAL-REF>Sig02</SYSTEM-SIGNAL-REF> 
    pdu must contain all or none of these signals. 
      </SYSTEM-SIGNAL-REFS> 
    This feature is supported for DBC, LDF and 
    </SYSTEM-SIGNAL-GROUP> 
    Fibex databases. 
    <SAFETY-PDU> 
    All signals of pdu Pdu01 are aggregated to a 
      <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    new signal group SG_Pdu01. Optionally, the 
      <CREATE-PDU-GAP-SIGNALS>true</CREATE-PDU-GAP-SIGNALS> 
    </SAFETY-PDU> 
    pdu gaps are filled with artificial gap signals, 
    when then also become part of the new signal 
    group. 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <BIDIRECTIONAL-PDU> 
    The pdu Pdu01 can be send and received by 
      <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    the same ECU.
    </BIDIRECTIONAL-PDU> 
     
    This feature is supported for DBC and Fibex 
    databases. 
    <PDU-GROUP> 
    For each cluster and ECU which sends or 
      <SHORT-NAME>PduGrp01</SHORT-NAME> 
    receives the pdus Pdu01 or Pdu02 a new Tx
      <SIGNAL-I-PDU-REFS> 
     
        <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    or Rx pdu group is created. The pdus are not 
        <SIGNAL-I-PDU-REF>Pdu02</SIGNAL-I-PDU-REF> 
    assigned to the standard pdu groups created 
      </SIGNAL-I-PDU-REFS> 
    by the VLC. 
    </PDU-GROUP> 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <PDU-GROUP-DEFINITION> 
    The dual channel FlexRayCluster FlexRay01 
      <FLEXRAY-CLUSTER-REF>FlexRay01</FLEXRAY-CLUSTER-REF> 
    obtains for its ECU Ecu01 two standard Tx pdu 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
      <CHANNEL-SPECIFIC>true</CHANNEL-SPECIFIC> 
    groups and two standard Rx pdu groups – one 
    </PDU-GROUP-DEFINITION> 
    for each channel and direction, respectively. 
    This feature is supported for Fibex databases. 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    21 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    <SIGNAL-UPDATE-DEFINITION> 
    The signal SigUpd01_UB within pdu Pdu01 
      <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    serves as update signal for the signal Sig01 
      <UPDATE-INDICATION-SIGNAL-REF> 
        SigUpd01_UB</UPDATE-INDICATION-SIGNAL-REF> 
    and the signal group SG_SigGrp01. The 
      <UPDATED-SIGNALS> 
    update signal can be used for one or more 
        <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
    signals and signal groups within a pdu at the 
      </UPDATED-SIGNALS> 
    same time. 
      <UPDATED-SIGNAL-GROUPS> 
    This feature is supported for DBC, LDF and 
        <SYSTEM-SIGNAL-GROUP-REF> 
    Fibex databases.
          SG_SigGrp01</SYSTEM-SIGNAL-GROUP-REF> 
     
      </UPDATED-SIGNAL-GROUPS> 
    </SIGNAL-UPDATE-DEFINITION> 
    <I-PDU-TIMING> 
    The timing elements NumberOfRepetitions, 
      <SIGNAL-I-PDU-REF>Pdu01</SIGNAL-I-PDU-REF> 
    RepetitionPeriod and MinimumDelay of pdu 
      <NUMBER-OF-REPETITIONS>10</NUMBER-OF-REPETITIONS> 
      <REPETITION-PERIOD>0.001</REPETITION-PERIOD> 
    Pdu01 override the corresponding database 
      <MINIMUM-DELAY>0.01</MINIMUM-DELAY> 
    settings. Further, the SignalSendType timing 
      <SIGNAL-TIMINGS> 
    element of signal Sig01 overrides the signal 
        <SIGNAL-TIMING> 
    specific timing settings. Finally, the element 
          <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
    AccessRights defines whether the timing data 
          <SIGNAL-SEND-TYPE>ON-CHANGE</SIGNAL-SEND-TYPE> 
    later can be changed in the Vector tool chain. 
     
    </SIGNAL-TIMING> 
      </SIGNAL-TIMINGS> 
    This feature is supported for DBC databases. 
      <ACCESS-RIGHTS>READ-ONLY</ACCESS-RIGHTS> 
    The AccessRights element is also supported 
    </I-PDU-TIMING> 
    for LDF and Fibex databases. 
     
    <CAN-TP-CONNECTION> 
    The directly opposed pdus Pdu01 and Pdu02 
      <SHORT-NAME>Can01_Pdu01_Pdu02</SHORT-NAME> 
    of CanCluster Can01 are combined to a new 
      <CAN-CLUSTER-REF>Can01</CAN-CLUSTER-REF> 
      <DATA-PDU-REF>Pdu01</DATA-PDU-REF> 
    CanTpConnection Can01_Pdu01_Pdu02. The 
      <FLOW-CONTROL-PDU-REF>Pdu02</FLOW-CONTROL-PDU-REF> 
    VSDE internal CanTpConnection name can be 
    </CAN-TP-CONNECTION> 
    referred by TpHighLevelRoutings. Similarly, 
    pdus can be combined to a LinTpConnection. 
    This feature is supported for DBC and LDF 
    databases. 
    <PDUR-MESSAGE-ROUTING> 
    The pdu Pdu01 of CanCluster Can01 is routed 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    via the gateway ECU Ecu01 to the pdu Pdu02 
      <SOURCE-CAN-CLUSTER-REF>Can01</SOURCE-CAN-CLUSTER-REF> 
      <TARGET-CAN-CLUSTER-REF>Can02</TARGET-CAN-CLUSTER-REF>  of CanCluster Can02. The pdu Pdu01 will be 
      <I-PDU-MAPPINGS> 
    routed by the PDUR module, and also its DLC 
        <I-PDU-MAPPING> 
    value will be routed. The signal Sig01 of pdu 
          <ROUTE-DLC>true</ROUTE-DLC> 
    Pdu01 is received by the gateway ECU Ecu01, 
          <SOURCE-I-PDU-REF>Pdu01</SOURCE-I-PDU-REF> 
    all other signals of pdu Pdu01 are not received 
          <SOURCE-SIGNALS> 
    by Ecu01. 
            <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
          </SOURCE-SIGNALS> 
    This feature is supported for DBC, LDF and 
          <TARGET-I-PDU-REF>Pdu02</TARGET-I-PDU-REF> 
    Fibex databases. 
        </I-PDU-MAPPING> 
      </I-PDU-MAPPINGS> 
    </PDUR-MESSAGE-ROUTING> 
    <COM-MESSAGE-ROUTING> 
    The pdu Pdu01 of CanCluster Can01 is routed 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    via the gateway ECU Ecu01 to the pdu Pdu02 
      <SOURCE-CAN-CLUSTER-REF>Can01</SOURCE-CAN-CLUSTER-REF> 
      <TARGET-CAN-CLUSTER-REF>Can02</TARGET-CAN-CLUSTER-REF>  of CanCluster Can02. The pdu Pdu01 will be 
      <I-PDU-MAPPINGS> 
    routed immediately by the COM module, and 
        <I-PDU-MAPPING> 
    also its DLC value will be routed. The signal 
          <PROCESSING>IMMEDIATE</PROCESSING> 
    Sig01 of pdu Pdu01 is received by the gateway 
          <ROUTE-DLC>true</ROUTE-DLC> 
    ECU Ecu01, all other signals of pdu Pdu01 are 
          <SOURCE-I-PDU-REF>Pdu01</SOURCE-I-PDU-REF> 
    not received by Ecu01. The signal Sig02 of pdu 
          <SOURCE-SIGNALS> 
    Pdu01 is excluded from the routings merge 
            <SYSTEM-SIGNAL-REF>Sig01</SYSTEM-SIGNAL-REF> 
          </SOURCE-SIGNALS> 
    algorithm for the COM module. This avoids 
          <SOURCE-EXCLUDE-SIGNALS> 
    conflicts with an OnChange sending behavior 
            <SYSTEM-SIGNAL-REF>Sig02</SYSTEM-SIGNAL-REF> 
    of COM routed signals. 
          </SOURCE-EXCLUDE-SIGNALS> 
    This feature is supported for DBC, LDF and 
          <TARGET-I-PDU-REF>Pdu02</TARGET-I-PDU-REF> 
    Fibex databases. 
          <TARGET-EXCLUDE-SIGNALS> 
            <SYSTEM-SIGNAL-REF>Sig02</SYSTEM-SIGNAL-REF> 
          </TARGET-EXCLUDE-SIGNALS> 
        </I-PDU-MAPPING> 
      </I-PDU-MAPPINGS> 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    22 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    </COM-MESSAGE-ROUTING> 
    <COM-SIGNAL-ROUTING> 
    The signal Sig01 within pdu Pdu01 of 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    CanCluster Can01 is routed via the gateway 
      <SOURCE-CAN-CLUSTER-REF>Can01</SOURCE-CAN-CLUSTER-REF> 
      <TARGET-CAN-CLUSTER-REF>Can02</TARGET-CAN-CLUSTER-REF>  ECU Ecu01 to the signal Sig02 within pdu 
      <SIGNAL-MAPPINGS> 
    Pdu02 of CanCluster Can02. The signal Sig01 
        <SIGNAL-MAPPING> 
    will be routed deferred by the COM module. 
          <PROCESSING>DEFERED</PROCESSING> 
    This feature is supported for DBC, LDF and 
          <SOURCE-I-PDU-REF>Pdu01</SOURCE-I-PDU-REF> 
    Fibex databases. 
          <SOURCE-SIGNAL-REF>Sig01</SOURCE-SIGNAL-REF> 
          <TARGET-I-PDU-REF>Pdu02</TARGET-I-PDU-REF> 
          <TARGET-SIGNAL-REF>Sig02</TARGET-SIGNAL-REF> 
        </SIGNAL-MAPPING> 
      </SIGNAL-MAPPINGS> 
    </COM-SIGNAL-ROUTING> 
    <TP-HIGH-LEVEL-ROUTING> 
    The CanTpConnection Can01_Pdu01_Pdu02 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    is routed via the gateway ECU Ecu01 to the 
      <SOURCE-CAN-TP-CONNECTION-REF>Can01_Pdu01_Pdu02 
        </SOURCE-CAN-TP-CONNECTION-REF> 
    CanTpConnection Can02_Pdu03_Pdu04. 
      <TARGET-CAN-TP-CONNECTION-REF>Can02_Pdu03_Pdu04 
    CanTpConnections and LinTpConnections 
        </TARGET-CAN-TP-CONNECTION-REF> 
    are defined by the VSDE file, while 
    </TP-HIGH-LEVEL-ROUTING> 
    FlexrayTpConnections are provided by Fibex 
    databases. 
    This feature is supported for DBC, LDF and 
    Fibex databases. 
    <TP-LOW-LEVEL-ROUTING> 
    The n-pdu Pdu01 of CanCluster Can01 is 
      <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
    routed via the gateway ECU Ecu01 to the
      <SOURCE-CAN-CLUSTER-REF>Can01</SOURCE-CAN-CLUSTER-REF> 
     
      <TARGET-CAN-CLUSTER-REF>Can02</TARGET-CAN-CLUSTER-REF>  n-pdu Pdu02 of CanCluster Can02. 
      <N-PDU-MAPPINGS> 
    This feature is supported for DBC databases. 
        <N-PDU-MAPPING> 
          <SOURCE-N-PDU-REF>Pdu01</SOURCE-N-PDU-REF> 
          <TARGET-N-PDU-REF>Pdu02</TARGET-N-PDU-REF> 
        </N-PDU-MAPPING> 
      </N-PDU-MAPPINGS> 
    </TP-LOW-LEVEL-ROUTING> 
    <PNC-CONFIGURATION> 
    The pdus Pdu01 and Pdu02 of CanCluster 
      <PNC-VECTOR-LENGTH>3</PNC-VECTOR-LENGTH> 
    Can01 are combined to a PNC group for ECU 
      <PNC-VECTOR-OFFSET>5</PNC-VECTOR-OFFSET> 
      <PNC-CLUSTERS> 
    Ecu01 and the partial network with the ID 1. 
        <PNC-CLUSTER> 
    A partial network is defined by all PNC groups 
          <CAN-CLUSTER-REF>Can01</CAN-CLUSTER-REF> 
    which refer the same partial network ID. 
          <PNC-ECUS> 
    This feature is supported for DBC and Fibex 
            <PNC-ECU> 
    databases. 
              <ECU-INSTANCE-REF>Ecu01</ECU-INSTANCE-REF> 
              <PNC-GATEWAY-TYPE>ACTIVE</PNC-GATEWAY-TYPE> 
              <PNC-WAKEUP-CAN-ID>452984832 
                </PNC-WAKEUP-CAN-ID> 
              <PNC-WAKEUP-CAN-ID-EXTENDED>true 
                </PNC-WAKEUP-CAN-ID-EXTENDED> 
              <PNC-WAKEUP-CAN-ID-MASK>127 
                </PNC-WAKEUP-CAN-ID-MASK> 
              <PNC-WAKEUP-DATA-MASK>4611686018427387904 
                </PNC-WAKEUP-DATA-MASK> 
              <PNC-WAKEUP-DLC>8</PNC-WAKEUP-DLC> 
              <PNC-GROUPS> 
                <PNC-GROUP> 
                  <PNC-IDENTIFIER>1</PNC-IDENTIFIER> 
                  <COMMUNICATION-DIRECTION>IN 
                    <COMMUNICATION-DIRECTION> 
                  <SIGNAL-I-PDU-REFS> 
                    <SIGNAL-I-PDU-REF>Pdu01 
                      </SIGNAL-I-PDU-REF> 
                  </SIGNAL-I-PDU-REFS> 
                  <MULTIPLEXED-I-PDU-REFS> 
                    <MULTIPLEXED-I-PDU-REF>Pdu02 
                      </MULTIPLEXED-I-PDU-REF> 
                  </MULTIPLEXED-I-PDU-REFS> 
                </PNC-GROUP> 
              </PNC-GROUPS> 
            </PNC-ECU> 
          </PNC-ECUS> 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    23 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
        </PNC-CLUSTER> 
      </PNC-CLUSTERS> 
    </PNC-CONFIGURATION> 
    Table 2-7   Vector System Description Extension file elements. 
    The extension file is provided as a file parameter to the VLC. Its XML schema is described 
    with the ExtractExtension.xsd file. 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    24 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    3  Glossary and Abbreviations 
    3.1 
    Glossary 
    Term 
    Description 
     
     
     
     
    3.2 
    Abbreviations 
    Abbreviation 
    Description 
    DPA 
    DaVinci Project Assistant 
    VLC 
    Vector Legacy Converter 
    VSDE 
    Vector System Description Extension 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    25 / 26 
    based on template version 4.11.1 

    Technical Reference Vector Legacy Converter 
    4  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    2014, Vector Informatik GmbH 
    Version: 1.4.2 
    26 / 26 
    based on template version 4.11.1 

    1.3.141 - TechnicalReference_IdentityManager

    MICROSAR Identity Manager

    1.3.143 - TechnicalReference_IdentityManagers

     
     
     
      
     
     
     
     
     
     
     
     
     
    MICROSAR Identity Manager 
    Technical Reference 
     
    Post-Build Selectable 
    Version 1.1.1 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Hannes Haas 
    Status 
    Released 
     
     
     
     
     


    Technical Reference MICROSAR Identity Manager 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Hannes Haas 
    2014-10-29 
    1.0.0 
    Creation 
    Hannes Haas 
    2015-01-26 
    1.1.0 
    ESCAN00080589: global root structure is 
    now a structure with one element for each 
    variant. 
    Global Root Structure Customization now 
    possible by configuring the ECUC module. 
    Hannes Haas 
    2015-03-03 
    1.1.1 
    Adapted file names of referred 
    documentations. 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   Vector 
    TechnicalReference_PostBuildLoadable.pdf 
    as delivered 
    [2]   Vector 
    TechnicalReference_EcuM.pdf 
    as delivered 
    [3]   Vector 
    TechnicalReference_BswM.pdf 
    as delivered 
    Scope of the Document 
    This  technical  reference  describes  the  general  aspects  of  the  MICROSAR  Identity 
    Manager.  The  document  does  not  describe  BSW  module  specific  functionality  or 
    limitations  unless  this  is  essential  to  understand  the  overall  concept.  Module-specific 
    details can be found in the documentation of each BSW module. 
    This document focuses on BSW functionality.  Configuration aspects  are described in the 
    help system of DaVinci Configurator Pro. 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    2 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    Contents 
    1 
    Introduction................................................................................................................... 5 
    1.1 
    Comparison to Post-Build Loadable ................................................................... 6 
    2 
    Functional Description ................................................................................................. 7 
    2.1 

    Technical Background ........................................................................................ 7 
    2.2 
    Features ............................................................................................................ 8 
    2.3 
    Deviations .......................................................................................................... 8 
    3 
    Workflow Overview ....................................................................................................... 9 
    3.1 

    Setting Up a Variant Project ............................................................................... 9 
    3.2 
    BSW Configuration .......................................................................................... 11 
    3.3 
    Variance in Application Code ............................................................................ 11 
    3.3.1 
    Variance of COM Signals ................................................................. 12 
    3.3.2 
    Variance in SWC and BSW APIs ...................................................... 12 
    3.4 
    Validation and Code Generation ...................................................................... 13 
    3.5 
    BSW Initialization ............................................................................................. 13 
    3.5.1 
    Manual BSW Initialization................................................................. 14 
    4 
    Configuration .............................................................................................................. 15 
    4.1 

    Activating Variance for BSW Modules .............................................................. 15 
    4.2 
    Semantics of ECU Configuration Variance ....................................................... 16 
    5 
    Integration ................................................................................................................... 18 
    5.1 

    BSW Module Initialization ................................................................................ 18 
    5.1.1 
    Implementation of EcuM_DeterminePbConfiguration() ..................... 19 
    5.1.2 
    BSWM Module Initialization Auto Configuration ................................ 19 
    5.1.3 
    Global Root Structure Customization ............................................... 20 
    5.2 
    Critical Sections ............................................................................................... 20 
    5.3 
    Main Function Scheduling ................................................................................ 20 
    6 
    Glossary and Abbreviations ...................................................................................... 21 
    6.1 

    Glossary .......................................................................................................... 21 
    6.2 
    Abbreviations ................................................................................................... 21 
    7 
    Contact ........................................................................................................................ 22 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    3 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    Illustrations 
    Figure 1-1 
    Identity Manager use-case exampels ......................................................... 5 
    Figure 2-1 
    Variants configurator editor in DaVinci Configurator Pro ............................ 7 
    Figure 3-1 
    Workflow overview ...................................................................................... 9 
    Figure 3-2 
    Major steps to setup a variant project with DaVinci Configurator Pro ........ 10 
    Figure 3-3 
    DaVinci Configurator Pro: Variant specific definition of input files .............. 10 
    Figure 3-4 
    Illustration of Variant Parameters in DaVinci Configurator Pro .................. 11 
    Figure 4-1 
    Enabling Variance for BSW Modules ........................................................ 15 
    Figure 4-2 
    Location of variation points has no semantic meaning to the 
    configuration ............................................................................................. 16 

    Figure 5-1 
    Hierarchy of BSW configuration structures for variant specific 
    initialization ............................................................................................... 18 

    Figure 5-2 
    Module Initialization Auto Configuration Assistant of the DaVinci 
    Configurator Pro BSWM configuration ...................................................... 19 

     
    Tables 
    Table 2-1  
    Supported features ..................................................................................... 8 
    Table 2-2  
    Not supported features ............................................................................... 8 
    Table 3-1  
    Manual BSW initialization using the configuration structure address 
    provided by ECUM.................................................................................... 14 

    Table 6-1  
    Glossary ................................................................................................... 21 
    Table 6-2  
    Abbreviations ............................................................................................ 21 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    4 / 22 
    based on template version 5.7.1 





    Technical Reference MICROSAR Identity Manager 
    1  Introduction 
    The  MICROSAR  Identity  Manager  is  an  implementation  of  the  AUTOSAR  4  post-build 
    selectable concept. It allows the ECU manufacturer to include several BSW configurations 
    within  one  ECU.  At  start-up  the  application  determines  the  BSW  variant  to  be  activated 
    and initializes the BSW accordingly.  
    The  ultimate  goal  of  the  Identity  Manager  is  to  reduce  the  number  of  ECU  variants  that 
    have  to  be  built,  stored  and  distributed.  The  Identity  Manager  thereby  focuses  on 
    communication  and  diagnostic  stack  variance.  Variance  of  the  application  (that  may  or 
    may not be required) has to be realized within the application internally. 
    Carline 
    Revision 2
    Communication 
    Identity Manager 
    Door Right
    ECUX
    Right Door
    Door Left
    Left Door
    ECUX
     1 in 2 (or n) 
     One active
    2016
    Communication 
    Carline
    Identity Manager 
    Revision 1
    ECUX
    Carline Rev. 1
    Carline Rev. 2 ECUX
    2012
     2 (or n) in 1
     One active
     
    Figure 1-1  Identity Manager use-case exampels 
    Typical use-cases for the Identity Manager: 
    >  Usage of one ECU multiple times within one vehicle. Typically the variants have a very 
    similar behavior and communication description. An example may be the usage of an 
    ECU that is used as both, driver and passenger door module. 
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    5 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
    >  Usage of an ECU in multiple vehicle architectures that have each distinct requirements 
    to the communication and diagnostic description 
     
     
    FAQ 
    One variant represents one complete set of functionality as required e.g. for the driver’s 
      door module. A variant is thereby an ECU global variant definition that can affect all 
    BSW modules and potentially the application. 
     
     
     
    1.1 
    Comparison to Post-Build Loadable 
    Post-Build Loadable allows downloading configuration sets to the ECU at a time after the 
    ECU has been build (e.g. end of line or in a workshop). This chapter points out in short the 
    major  differences  between  post-build  loadable  and  post-build  selectable  (Identity 
    Manager). Post-build loadable is a MICROSAR option that is available upon request. 
    Using the Identity Manager (an implementation of post-build selectable) all ECU variants 
    are  downloaded  to  the  ECUs  non-volatile  memory  (e.g.  flash)  at  ECU  build  time.  The 
    Identity  Manager  does  not  allow  modification  of  BSW  aspects  after  ECU  build  time.  If 
    changes are required a new ECU build has to be created. 
    Post-build  loadable  in  contrast  allows  the modification  of  selected  ECU  parameters  after 
    the ECU build time: at post-build time. The goal is to enable OEMs to update parts of the 
    ECU BSW behavior independently of the Tier1, who controls the ECU build environment. 
    On  request  Vector  can  provide  BSW  packages  that  support  both,  the  Identity  Manager 
    (post-build  selectable)  and  post-build  loadable.  This  will  allow  a  post-build  time 
    modification of variant ECU projects. 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    6 / 22 
    based on template version 5.7.1 




    Technical Reference MICROSAR Identity Manager 
    2  Functional Description 
    2.1 
    Technical Background 
    MICROSAR  Identity  Manager  is  based  on  the  post-build  selectable  variant  handling 
    defined  by AUTOSAR  4.  It  uses  variation  points  of  binding  time  PostBuild  in  the  arxml 
    description files to define variance. 
    Variants – or according to AUTOSAR Predefined Variants – are defined based on a set of 
    criteria  settings  within  the  DaVinci  Configurator  Pro  Variants  Editor.  One  criterion  is  an 
    enumeration  that  allows  formal  definition  of  differences  in  the  ECU  configuration.  At 
    present  DaVinci  Configurator  Pro  supports  a  single  criterion  only.  The  default  name  is 
    Communication.  In  a  use-case  with  several  input  files,  one  Criteria  Value  is  created  for 
    each (non-variant) input file. Using the Variant Editor it is possible to combine the criteria 
    values to ECU Variants that are also visible as BSW configuration structures. 
     
    Figure 2-1  Variants configurator editor in DaVinci Configurator Pro 
     
     
    Note 
    Criteria are a modelling aid of the AUTOSAR schema and do not reflect directly on the 
      generated BSW code and the BSW configuration structures used for BSW initialization. 
    The generated configuration structures instead reflect the ECU variants that are based 
    on the selected criteria values. 
     
     
     
     
    Workaround 
    DaVinci Configurator Pro is currently limited to a single criterion. The default name is 
      Communication. Despite the name (that may be changed by the user), this criterion 
    can be used for both diagnostic and communication variance. 
    It is still possible to define multiple ECU variants by defining one criterion value for 
    each variant. 
     
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    7 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    2.2 
    Features 
    The following high-level features are supported: 
     
     
     
    Supported Features 
     
    Selection of the ECU variant at startup time of the ECU. Thereby one out of N available 
    configuration variants can be selected by the application. Implementing the logic that 
     
    determines the variant to be chosen is an application responsibility. 
    The Identity Manager is supported by MICROSAR BSW modules that support the Feature 
    MICROSAR Identity Manager using Post-Build Selectable (as it is listed in the technical 
     
    reference of the BSW module: Chapter Functional Description  Features). 
    Variance of communication aspects such as signals, PDUs and their properties. 
     
    Variance of communication channels such as the properties and the number of channels. 
     
    Variance of the RTE data mapping that links the communication stack with the application 
     
    (SWCs).  
    Variance of diagnostic aspects such as DTCs and DIDs as well as some of their properties. 
     
    Data deduplication that reduces RAM and ROM footage by eliminating redundant data from the 
     
    generated BSW configuration files. 
    Combination with MICROSAR Post-Build Loadable [1]. Post-build loadable requires dedicated 
     
    licensing. 
    The recommended maximum number of variants is 16. The maximum number of supported 
     
    variants is 32. On request higher numbers of variants may be supported. 
    Table 2-1   Supported features 
    2.3 
    Deviations 
    The following features specified by AUTOSAR are currently not supported: 
     
     
     
    Not Supported Features 
     
    Variance of SWC and service-SWCs is currently not supported. 
    As a consequence variant SWC must provide a superset API and manage the variance 

    internally. The application must not invoke service-SWC and BSW APIs that are not defined in 
    the currently active variant. 
    DaVinci Configurator Pro supports a single criterion only. As this criterion can have multiple 

    values all use-cases can be covered. 
    Table 2-2   Not supported features 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    8 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    3  Workflow Overview 
    This  chapter  highlights  the  most  important  aspects  of  the  workflow  that  is  required  to 
    realize  a  variant  ECU.  The  chapter  shall  be  seen  as  an  overview  but  already  provides 
    important information on the usage of this functionality. 
    More  details  can  be  found  in  the  following  chapters  and  the  online  help  of  DaVinci 
    Configurator Pro. 
     
    ODX
    ODX
    SYSEX
    SYSEX
    SYSEX
    diag1
    diag2
    com1
    com2
    com3
    Variance configuration
    Variants
    Eco
    Easy
    Star
    Variant
    Criterias
    DaVinci Configurator Pro
    project
    Comm.
    com1
    com2
    com3
    .dpa
    arxml
    Diagn.
    diag1
    diag1
    diag2
    Code generation +
    resource optimization
    Application implements 
    MICROSAR SIP:
    variant selection at 
    startup:
    Variant module configuration:
    - Msn_Config_Eco
    Static files:
    if(rule == a)
    - Msn_Config_Easy
    Msn.c
    use Msn_Config_Eco
    - Msn_Config_Star
    if(rule == b)
    use Msn_Config_Easy
    if(rule == c)
    use Msn_Config_Star
    Build Environment
    Runtime
    Production (OEM, Tier1)
    Variant ECU build:
    Variant definition
    One activated 
    Eco, Easy, Star
    variant (e.g. Eco)
     
    Figure 3-1  Workflow overview 
    3.1 
    Setting Up a Variant Project 
    Setting up a project with variance requires several steps which are summarized in  Figure 
    3-2. 
    The major difference between a workflow without variants is that variants need to be 
    defined  before  databases  are  added  to  the  configuration.  For  this  purpose  DaVinci 
    Configurator Pro provides the Variants editor (see screenshot in Figure 2-1). 
    Adding additional variants at a later point remains possible, however. 
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    9 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
    Create new project
    Create criterion
    Create one criterion value 
    Configure variants
    for each variant
    Create variants and map 
    Tool enters
    criterion value to Variant
    „Update Pending“
    project state
    Add input file(s) for each 
    Add input files and 
    criterion value
    perform a database 
    update
    Trigger database update
    Enable variance for 
    BSW modules. Activate 
    additional modules. 
    (project settings)
    Configure and 
    generate BSW modules
     
    Figure 3-2  Major steps to setup a variant project with DaVinci Configurator Pro 
    In a next step input files are assigned to each variant. Therefore a file set of input files is 
    created  for  each  criteria  value  (e.g.  Communication  =  Left).  A  file  set  consists  of  e.g. 
    multiple  legacy  files  (one  for  each  channel)  that  is  relevant  for  one  variant  or  a  single 
    system extract that describes all channels of one variant. 
     
     
    Figure 3-3  DaVinci Configurator Pro: Variant specific definition of input files 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    10 / 22 
    based on template version 5.7.1 



    Technical Reference MICROSAR Identity Manager 
    3.2 
    BSW Configuration 
    DaVinci Configurator Pro highlights variant parameter and container using a brown [V]
    When changing the configuration it has to be considered whether the change shall be 
    applied to all variants [V] or if the change shall be done only for one variant. 
     
     
    Figure 3-4  Illustration of Variant Parameters in DaVinci Configurator Pro 
    If  required,  variation  points  can  be  added  to  the  configuration  and  linked  with  a  set  of 
    criteria  values  that  must  apply  to  include  that  configuration  element  into  one  variant.  If 
    required also custom criteria and criteria values can be defined. The criteria configuration 
    of a variation point will implicitly link the setting with one or several variants depending on 
    the variance configuration table. 
    3.3 
    Variance in Application Code 
    The application code may or may not be affected by the variance in the BSW.  If only the 
    CAN  IDs  or  Tx  modes  of  messages  are  different  in  each  variant  this  is  handled  in  a 
    transparent way for the application within the BSW. 
    Typically  ECU  variance  is  more  complex  and  also  involves  application  interfaces.  For 
    example  the  application  may  transmit  or  receive  more  signals  in  one  variant  than  in  the 
    other. Equally there may be different requirements to the diagnostic handling such as one 
    variant may have more features and thus may have more fault memory entries (DTCs) to 
    be managed. 
    As soon as the interface of the BSW provides variant-dependent functionality (e.g. a signal 
    or a DTC that exists in some of the variants only) the application will have to consider the 
    BSW variance when dealing with BSW APIs. 
     
     
    Caution 
    The application must not invoke any APIs that are not available in the variant that is 
      currently realized by the BSW. Even with enabled development error detection, the 
    BSW will not be able to detect all kinds of invalid API usage! 
    Undefined ECU behavior can be the result of calling APIs that are not available in the 
    active variant. 
     
     
    If  development  error  detection  (DET)  is  enabled,  the  MICROSAR  BSW  will  be  able  to 
    detect  some faults related to accessing functionality that  is not available  in  the activated 
    variants.  Due  to  technical  reasons,  not  all  faults  can  be  detected  and  be  handled 
    gracefully.  
    When accessing BSW functionality that is not available in one variant (but in another) the 
    following faults may happen: 
    >  Reporting of a development error if DET is enabled. 
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    11 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
    >  Activation of a BSW functionality that is not related to the API call (e.g. a different 
    message is transmitted as requested by the API call). 
    >  BSW API returns an error such as E_INVALID_REQUEST or E_UNINIT 
    >  Undefined ECU behavior (with and without usage of development error detection) 
    The following sections give some advice, how the application can deal with variance in the 
    BSW. 
    3.3.1 
    Variance of COM Signals 
    The  MICROSAR  RTE  supports  variant  data  mapping.  This  allows  e.g.  to  map  one 
    application  SWC  S/R  port  to  different  signals  depending  on  the  activated  variant.  If 
    required an S/R port can remain unconnected in one variant while in another variant a data 
    mapping is configured. 
    When accessing COM signals directly from a complex driver, only these signals must be 
    accessed at runtime that are configured for the activated variant. 
    3.3.2 
    Variance in SWC and BSW APIs 
    MICROSAR BSW modules of the service  layer  generate a service  SWC description that 
    describes the API in a formal way. MICROSAR service-SWCs define the BSW variance in 
    a non-formal way by providing the API superset of all BSW variants. As a consequence the 
    accessing  application  SWC  must  only  invoke APIs  that  are  enabled  in  the  current  BSW 
    variant. The same applies for complex drivers that access BSW functionality directly. 
     
     
     
    Example 
    Both  examples  realize  the  same  ECU  behavior  and  point  out  how  BSW 
      variance may be considered during application development. 
    This is an incomplete example only. Of course there are many other ways of taking 
    care that the application invokes only these BSW APIs that are valid in the variant that 
    is currently enabled. 
     
     
     
    >  Example 1 (SWC implementation): 
    if(Rte_IrvRead_Swc_Runnable_EcuVariant == V_ECO) 

     
    /* Service mapping to DEM ErrorX configured */ 
     
    Rte_Call_DiagnosticMonitor_Port_SetEventStatus(DEM_EVENT_STATUS_PASSED); 

    else if(Rte_IrvRead_Swc_Runnable_EcuVariant == V_STAR) 

     
    /* DEM ErrorX is not defined in this variant and must not be reported */ 

    /* Variant Data Mapping to SigA for ECO and SigB for START managed by RTE */ 
    Rte_Write_Swc_Port(data); 
     
    >  Example 2 (CDD implementation): 
    if(gVariant == V_ECO) 

    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    12 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
     
    /* Report DEM ErrorX on V_ECO only */ 
     
    Dem_SetEventStatus(ErrorX, DEM_EVENT_STATUS_PASSED); 
     
    Com_SendSignal(SigA, &data); /* SigA is defined in this variant only */ 

    else if(gVariant == V_STAR) 

     
    /* DEM ErrorX is not defined in this variant and must not be reported */ 
     
    Com_SendSignal(SigB, &data); /* SigB is defined in this variant only */ 

     
    3.4 
    Validation and Code Generation 
    The ECU configuration is validated and generated for all configured variants at the same 
    time.  
     
     
    Practical Procedure 
    To reduce overall complexity when setting up a new project it may be helpful to realize 
      a single ECU variant first. After having the first variant tested, additional variants may 
    be added and linked with the appropriate input files that are now imported for the first 
    time to this project. 
     
     
    The  BSW  module  configuration  must  be  valid  according  to  the  BSWMD  file  for  each 
    variant  (e.g.  variant  parameters with a multiplicity of 1:1 must  be available  in  all variants 
    but possibly with different values). 
    When  generating  code,  all  BSW  modules  that  are  enabled  for  variance  (DaVinci 
    Configurator  Pro  Project  Settings  editor)  will  produce  one  configuration  set  for  each 
    configured  ECU  variant.  Variance  may  be  implemented  by  the  BSW  modules  as  part  of 
    post-build tables (linked by the related configuration structures) or within generated source 
    code. 
    Validation rules at configuration and generation time ensure that MICROSAR modules that 
    do  not  support  variance  do  not  access  variant  data.  In  this  case  an  error  is  thrown.  To 
    solve  this  issue,  variance  may  have  to  be  enabled  for  the  affected  BSW  module  (see 
    chapter 4.1) or the variance has to be removed from the configuration. 
    3.5 
    BSW Initialization 
    At ECU start-up, the application has to determine the expected ECU behavior and choose 
    the appropriate BSW configuration structures to initialize the BSW.  
    Determining the required variant can be done in multiple ways and is typically defined by 
    the vehicle manufacturer. Examples are: 
    >  External pin coding of the ECU e.g. by using specific connectors that allow the ECU to 
    detect its variant 
    >  Definition of a non-volatile memory pattern that may be set end of line or during the 
    first start-up of the ECU 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    13 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
     
     
    Caution 
    If the variant of the ECU shall be changed, it may be required that some hardware 
      devices are disabled as these are no longer used in the variant to be enabled. The 
    BSW does not provide any functionality to disable hardware functionality that had been 
    enabled by a previous variant. Therefore it is recommended to completely restart the 
    ECU before activating a new BSW variant. Alternatively the application may also 
    disable hardware functionality required by the BSW prior of starting the BSW 
    initialization. 
     
     
     
    3.5.1 
    Manual BSW Initialization 
    If  for  some  reason  the  initialization  through  the  BSWM  “Module  Initialization”  Auto 
    Configuration  assistant  is  not  possible  the  BSW  initialization  can  also  be  implemented 
    manually.  
    For  post-build  loadable  modules  the  header  EcuM_Init_PBcfg.h  is  used  to  publish 
    initialization relevant data types. To access the module configuration pointers always use 
    EcuM_GlobalPBConfig_Ptr.  
    For variant modules that do not support post-build loadable the header EcuM_Init_Cfg.h is 
    used  to  publish  initialization  relevant  data  types.  To  access  the  module  configuration 
    pointers always use EcuM_GlobalPCConfig_Ptr.  
     
    #include “EcuM_Init_Cfg.h” 
    … 
    void MyInitFunction() 

    … 
      Com_Init(EcuM_GlobalPCConfig_Ptr->CfgPtr_Com_Init); 
      ComM_Init(EcuM_GlobalPCConfig_Ptr->CfgPtr_ComM_Init); 
    … 

    Table 3-1   Manual BSW initialization using the configuration structure address provided by ECUM 
    The EcuM_GlobalPBConfig_Ptr  and EcuM_GlobalPCConfig_Ptr are initialized by the ECUM 
    during  EcuM_Init()  with  the  global  root  structure  address  returned  by  the  callout 
    EcuM_DeterminePbConfiguration(). 
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    14 / 22 
    based on template version 5.7.1 




    Technical Reference MICROSAR Identity Manager 
    4  Configuration 
    The DaVinci Configurator Pro help system (press F1 within the tool) will provide you with 
    information how to set up a configuration that includes variants. 
    This chapter highlights the most important aspects only. 
    4.1 
    Activating Variance for BSW Modules 
    In the project settings editor of DaVinci Configurator Pro you can define each BSW module 
    whether  it  shall  support  variance  or  not.  It  is  recommended  to  enable  variance  for  a 
    complete cluster (e.g. communication stack or diagnostic stack) at once. 
     
     
    Basic Knowledge 
    As the BSW initialization sequence will handle the BSW modules variance, modules in 
      charge for BSW initialization (BSWM and ECUM) have to support variance in any case. 
     
     
     
    To enable variance for a BSW module choose either 
    >  VARIANT-POST-BUILD-SELECTABLE: Variants are supported. No post-build 
    loadable update of the configuration at post-build time. All variants are configured at 
    pre-compile time. 
    >  VARIANT-POST-BUILD (LOADABLE and SELECTABLE): Variants are supported 
    and a post-build loadable update of the configuration data is supported using 
    MICROSAR Post-Build Loadable. This feature required dedicated licensing. 
     
     
    Figure 4-1  Enabling Variance for BSW Modules 
     
     
    Hint 
    You can use multi select in DaVinci Configurator Pro to enabled variance for several 
      BSW modules at the same time. 
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    15 / 22 
    based on template version 5.7.1 



    Technical Reference MICROSAR Identity Manager 
     
    4.2 
    Semantics of ECU Configuration Variance 
    The location of the variation point  does not  imply any semantic  and has no effect  to the 
    generated  code.  Figure  4-2  illustrates  two  ECU  configuration  hierarchies  which  would 
    produce the same generated code as the content of configuration is equal when looking at 
    one  variant  at  a  time.  The  right  version  however  contains  more  redundant  data  as  the 
    variation point is located at a higher level.  
     
     
     
    Example 
    When editing B1 in the left example the change would apply for all variants as long as 
      no additional variation point is introduced first. When editing B1 in the right example, 
    the change is applied only to the variant where the change is made. The other instance 
    of B1 remains as it is. 
     
     
     
     
    M:Module
    M:Module
    C:C1
    [Eco]
    C:C1
    [Easy]
    C:C1
    A:A1
    B:B1
    A:A1
    B:B1
    A:A1
    B:B1
    P=1
    P=2
    P=1
    P=2
    [Eco]
    [Easy]
     
    Figure 4-2  Location of variation points has no semantic meaning to the configuration 
    As  the  example  shows,  the  location  of  the  variation  point  mainly  depends  on  the 
    expectations what shall or shall not be equal for an object within the different variants. A 
    general statement is therefore not possible. 
     
     
     
    Practical Procedure 
    If it is not clear where to create a variation point (e.g. as the requirements or the impact 
      are not yet fully understood) it is recommended to create the variation points as low as 
    possible in order to handle with as few redundant data as possible. 
    At a later point when it turns out that an object is assumed to be completely different in 
    all variants a new variation point can be added at a higher level. 
     
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    16 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
    Note 
    The Base ECUC creation process of DaVinci Configurator Pro for example locates 
      variation points as low as possible in the hierarchy in order to reduce the amount of 
    redundant data within the project (left example in Figure 4-2). Having to deal with less 
    redundant data can simplify the BSW configuration when dealing with variants that 
    have also common settings. 
     
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    17 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    5  Integration 
    5.1 
    BSW Module Initialization 
    During  BSW  initialization  the  application  is  required  to  provide  information  which  variant 
    the BSW shall implement. After ECUM initialization (that is variant independent) the ECUM 
    will  query  the  variant  to  be  used  from  the  application  by  using  the  callout 
    EcuM_DeterminePbConfiguration()  (chapter  5.1.1).  Within  this  callout  the 
    application shall return the global root configuration structure (chapter 5.1.1) of the variant 
    to be used. 
    The  variant-specific  global  root  structure  references  the  configuration  structures  of  each 
    BSW module relevant of that variant. 
     
    ECUM global
    BSW configuration
    root structures
    structures
    Variant Eco
    BSW A
    Variant Eco
    Variant Easy
    BSW A
    Variant Easy
    BSW B
    Variant Eco
    Pointer returned by the 
    BSW B
    application from callout 
    EcuM_DeterminePbConfiguration
    Variant Easy
     
    Figure 5-1  Hierarchy of BSW configuration structures for variant specific initialization 
    In  typical  BSW  environments  using  the  MICROSAR  stack,  no  further  actions  or 
    adaptations are required to the templates provided. 
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    18 / 22 
    based on template version 5.7.1 





    Technical Reference MICROSAR Identity Manager 
     
     
    Reference 
    Please read the Technical References of ECUM ([2]) and BSWM ([3]) carefully to find 
      out how the BSW initialization needs to be implemented in general terms. 
    If you also realize a post-build time update of your configuration data using MICROSAR 
    Post-Build Loadable, please also follow [1]. 
     
     
    5.1.1 
    Implementation of EcuM_DeterminePbConfiguration() 
    During 
    initialization 
    the 
    ECUM 
    invokes 
    the 
    callout 
    EcuM_DeterminePbConfiguration()  to  determine  the  variant  that  shall  be  used  for 
    BSW  initialization.  This  callout  shall  return  the  address  of  global  root  structure  of  the 
    variant to be used. 
    To 
    determine 
    the 
    address 
    use 
    e.g. 
    the 
    following 
    code: 
    &EcuM_GlobalConfigRoot.<Variant>. The symbol is published by EcuM_Init_PBcfg.h. 
     
     
     
    FAQ 
    EcuM_DeterminePbConfiguration() is expected to return the pointer to the 
      global root structure (&EcuM_GlobalConfigRoot.<Variant> ) published by 
    EcuM_Init_PBcfg.h even in projects where post-build loadable is not supported.  
     
     
      
     
    Edit 
    A sample implementation of this function is provided by EcuM_Callout_Stubs.c as 
      a template. Extend this implementation with the application specific rules to determine 
    the root structure required for the variant that shall be used. 
     
     
     
    5.1.2 
    BSWM Module Initialization Auto Configuration 
    BSW  modules  with  variance  are  initialized  by  the  BSWM.  To  realize  the  BSW  module 
    initialization  use  the  Module  Initialization  Auto  Configuration  assistant  provided  by  the 
    BSW Management editor of DaVinci Configurator Pro. This assistant will realize the BSW 
    initialization as required by the Identity Manager using the global root structure as source 
    for the BSW initialization pointers. Find more details in the BSWM technical reference [3]. 
     
    Figure 5-2  Module Initialization Auto Configuration Assistant of the DaVinci Configurator Pro BSWM configuration 
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    19 / 22 
    based on template version 5.7.1 


    Technical Reference MICROSAR Identity Manager 
    5.1.3 
    Global Root Structure Customization 
    If  an  additional  configuration  pointer  shall  be  added  to  the  global  root  structure  you  can 
    add the initialization details in the ECUC module configuration using DaVinci Configurator: 
    /MICROSAR/EcuC/EcucGeneral/BswInitialization/InitFunction. 
     
     
    Caution 
    Within DaVinci Configurator only BSW modules that support the MICROSAR post-build 
      loadable process must be configured as Implementation Variant VARIANT-POST-
    BUILD-LOADABLE or VARIANT-POST-BUILD. As a consequence these modules are 
    added to the post-build loadable global root structure EcuM_GlobalPBConfigRoot. 
    Variant modules that do not support post-build loadable will be added to 
    EcuM_GlobalPCConfigRoot instead. 
     
     
    5.2 
    Critical Sections 
    Critical  sections  are  not  variant-specific.  As  a  consequence  each  critical  section  has 
    exactly  one  implementation.  One  critical  section  can  be  used  in  just  one  variant  but  can 
    also  be  used  in  several  or  even  all  ECU  variants.  The  technical  reference  of  the  BSW 
    modules will define what to consider when implementing the critical section handling. 
    5.3 
    Main Function Scheduling 
    The RTE Schedule Manager is not variant aware. Consequently the main function cycles 
    are configured globally and are valid for all variants of the ECU.  
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    20 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    6  Glossary and Abbreviations 
    6.1 
    Glossary 
    Term 
    Description 
    MICROSAR Identity 
    Implementation of the AUTOSAR 4 variance concept using post-build 
    Manager 
    selectable and variation points in the configuration data. 
    DaVinci Configurator  Vector´s configuration and generation tool for MICROSAR BSW and RTE 
    Pro 
    DaVinci Developer 
    Vector´s AUTOSAR SWC design editor 
    Table 6-1   Glossary 
    6.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CDD 
    Complex Drivers 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    IDM 
    MICROSAR Identity Manager 
    ECU 
    Electronic Control Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 6-2   Abbreviations 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    21 / 22 
    based on template version 5.7.1 

    Technical Reference MICROSAR Identity Manager 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    2015, Vector Informatik GmbH 
    Version: 1.1.1 
    22 / 22 
    based on template version 5.7.1 

    Document Outline


    1.3.144 - TechnicalReference_MemIf

    YourTopic

    1.3.146 - TechnicalReference_MemIfs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR MemIf 
    Technical Reference 
     
      
    Version 2.02.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Tobias Schmid, Manfred Duschinger, Michael Goß 
    Status 
    Released 
     
     
     
     
     



    Technical Reference MICROSAR MemIf  
     
    1  Document Information 
    1.1 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Tobias Schmid 
    2008-04-14 
    1.0 
    Creation of document 
    Manfred Duschinger 
    2013-02-20 
    1.01.00 
    Ch. 4.1. Update files 
    according to new generator 
    Ch. 6 Update Configuration 
    Michael Goß 
    2014-11-21 
    2.01.01 
    Typos were corrected and 
    content was modified a little  
    Michael Goß 
    2015-04-23 
    2.02.00 
    Content was updated 
    regarding SafeBSW MemIf 
    Table 1-1  
    History of the document 
    1.2 
    Reference Documents 
    No. 
    Title 
    Version 
    [1]   
    AUTOSAR_SWS_Mem_AbstractionInterface.pdf 
    V1.4.0 
    [2]   
    AUTOSAR_SWS_DET.pdf 
    V2.2.0 
    [3]   
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [4]   
    AUTOSAR_SWS_EEPROM_Abstraction.pdf 
    V2.0.0 
    [5]   
    AUTOSAR_SWS_Flash_EEPROM_Emulation.pdf 
    V2.0.0 
    Table 1-2  
    Reference documents 
     
    1.3 
    Scope of the Document 
    This technical reference describes the general use of module MemIf (AUTOSAR Memory 
    Abstraction Interface). 
     
    Please note 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    2 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Contents 
    1 
    Document Information ................................................................................................. 2 
    1.1 

    History ............................................................................................................... 2 
    1.2 
    Reference Documents ....................................................................................... 2 
    1.3 
    Scope of the Document...................................................................................... 2 
    2 
    Introduction................................................................................................................... 6 
    2.1 
    Architecture Overview ........................................................................................ 7 
    3 
    Functional Description ................................................................................................. 8 
    3.1 

    Features ............................................................................................................ 8 
    3.2 
    Initialization ........................................................................................................ 8 
    3.3 
    Main Functions .................................................................................................. 8 
    3.4 
    Error Handling .................................................................................................... 8 
    3.4.1 

    Development Error Reporting ............................................................. 8 
    3.4.1.1 
    Parameter Checking ........................................................ 9 
    4 
    Integration ................................................................................................................... 11 
    4.1 

    Scope of Delivery ............................................................................................. 11 
    4.1.1 

    Static Files ....................................................................................... 11 
    4.1.2 
    Dynamic Files .................................................................................. 11 
    4.2 
    Include Structure .............................................................................................. 12 
    4.3 
    Compiler Abstraction and Memory Mapping ..................................................... 12 
    5 
    API Description ........................................................................................................... 14 
    5.1 

    Interfaces Overview ......................................................................................... 14 
    5.2 
    Type Definitions ............................................................................................... 14 
    5.3 
    Services provided by MemIf ............................................................................. 15 
    5.3.1 

    MemIf_GetVersionInfo ..................................................................... 15 
    5.3.2 
    MemIf_SetMode ............................................................................... 16 
    5.3.3 
    MemIf_Read .................................................................................... 16 
    5.3.4 
    MemIf_Write ..................................................................................... 17 
    5.3.5 
    MemIf_Cancel .................................................................................. 18 
    5.3.6 
    MemIf_GetStatus ............................................................................. 18 
    5.3.7 
    MemIf_GetJobResult ....................................................................... 19 
    5.3.8 
    MemIf_EraseImmediateBlock .......................................................... 20 
    5.3.9 
    MemIf_InvalidateBlock ..................................................................... 20 
    5.4 
    Services used by MemIf ................................................................................... 21 
    6 
    Configuration .............................................................................................................. 22 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    3 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    7 
    AUTOSAR Standard Compliance............................................................................... 23 
    7.1 

    Deviations ........................................................................................................ 23 
    7.1.1 

    Extension of Error Codes ................................................................. 23 
    7.2 
    Additions/ Extensions ....................................................................................... 23 
    8 
    Glossary and Abbreviations ...................................................................................... 24 
    8.1 

    Glossary .......................................................................................................... 24 
    8.2 
    Abbreviations ................................................................................................... 24 
    9 
    Contact ........................................................................................................................ 25 
     
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    4 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Illustrations 
    Figure 2-1 
    AUTOSAR architecture ............................................................................... 7 
    Figure 2-2 
    Interfaces to adjacent modules of the MemIf............................................... 7 
    Figure 4-1 
    Include structure ....................................................................................... 12 
    Figure 5-1 
    MemIf interactions with other BSW ........................................................... 14 
     
    Tables 
    Table 1-1  
    History of the document .............................................................................. 2 
    Table 1-2  
    Reference documents ................................................................................. 2 
    Table 3-1  
    Supported SWS features ............................................................................ 8 
    Table 3-2  
    Mapping of service IDs to services ............................................................. 9 
    Table 3-3  
    Errors reported to DET ............................................................................... 9 
    Table 3-4  
    Development Error Reporting: Assignment of checks to services ............... 9 
    Table 4-1  
    Static files ................................................................................................. 11 
    Table 4-2  
    Generated files ......................................................................................... 11 
    Table 4-3  
    Compiler abstraction and memory mapping .............................................. 13 
    Table 5-1  
    Type definitions ......................................................................................... 15 
    Table 5-2  
    MemIf_GetVersionInfo .............................................................................. 16 
    Table 5-3  
    MemIf_SetMode ....................................................................................... 16 
    Table 5-4  
    MemIf_Read ............................................................................................. 17 
    Table 5-5  
    MemIf_Write ............................................................................................. 18 
    Table 5-6  
    MemIf_Cancel .......................................................................................... 18 
    Table 5-7  
    MemIf_GetStatus ...................................................................................... 19 
    Table 5-8  
    MemIf_GetJobResult ................................................................................ 19 
    Table 5-9  
    MemIf_EraseImmediateBlock ................................................................... 20 
    Table 5-10  
    MemIf_InvalidateBlock .............................................................................. 21 
    Table 5-11  
    Services used by the MemIf ...................................................................... 21 
    Table 8-1  
    Glossary ................................................................................................... 24 
    Table 8-2  
    Abbreviations ............................................................................................ 24 
     
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    5 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module MemIf as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    PRE-COMPILE 
     
     
    Vendor ID: 
    MEMIF_VENDOR_ID 
    30 decimal 
    (= 
    Vector-Informatik, 
    according to HIS) 
    Module ID: 
    MEMIF_MODULE_ID   
    22 decimal 
    (according to ref. [3]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
    MemIf (Memory Abstraction Interface) provides the interface that is used by the NvM to 
    access NV memory devices. Two different types of NV memory are intended for use: Flash 
    memory and EEPROM. To abstract the hardware dependencies of the memory devices, 
    low level drivers with a commonly defined API are used: Fls and Eep (internal or external). 
    These modules are abstracted by the modules Fee (Flash EEPROM Emulation) and Ea 
    (EEPROM Abstraction). Both modules may exist at the same time. 
    MemIf offers a common interface for accessing Fee or Ea instances. In order to distinguish 
    those different instances MemIf provides a set of device handles, which may be used for 
    configuration of NvM. 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    6 / 25 
    based on template version 3.1 



    Technical Reference MICROSAR MemIf  
     
    2.1 
    Architecture Overview 
    The following figure shows where the MemIf is located in the AUTOSAR architecture. 
     
    Figure 2-1 
    AUTOSAR architecture 
     
    The next figure shows the interfaces to adjacent modules of the  MemIf. These interfaces 
    are described in chapter 5.  
    COM
    DCM
    NvM
    IPDU
    Det
    MemIf
    Fee
    FR 
    Ea
    CAN IF
    FR IF
    Fls
    Eep
     
    Figure 2-2 
    Interfaces to adjacent modules of the MemIf 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    7 / 25 
    based on template version 3.1 




    Technical Reference MICROSAR MemIf  
     
    3  Functional Description 
    3.1 
    Features 
    The features listed in this chapter cover the complete functionality specified in [1]. 
    The  "supported"  and  "not  supported"  features  are  presented  in  the  following  two  tables. 
    For further information of not supported features also see chapter 7. 
    The following features described in [1] are supported: 
    Feature 
    MemIf allows the NVRAM manager to access multiple instances of memory hardware 
    abstraction modules (Fee or Ea), regardless of different APIs and implementations. 
    Table 3-1  
    Supported SWS features 
    3.2 
    Initialization 
    MemIf does not need any initialization. Nevertheless it is necessary to initialize all memory 
    hardware abstraction module instances that are interfaced by MemIf. 
     
    Caution 
    MemIf does not provide any services for initialization of underlying memory hardware 
      abstraction modules. Initialization of these modules is not done by MemIf! 
     
    3.3 
    Main Functions 
    MemIf  does  not  implement  main-functions  that  would  need  recurring  execution.  Job 
    requests are mapped to the appropriate underlying memory hardware abstraction module, 
    which implements the main-function for processing the job. 
     
    Caution 
    MemIf is not responsible for calling main-functions of the underlying hardware 
      abstraction modules. Calling main-functions cyclically has to be implemented in the 
    BSW Scheduler (or something similar). 
     
    3.4 
    Error Handling 
    3.4.1 
    Development Error Reporting 
    Development  errors  are  reported  by  default  to  DET  using  the  service 
    Det_ReportError(),  (specified  in  [2]),  if  the  pre-compile  configuration  parameter  for 
    “Development Mode” and “Development Error Reporting” are enabled. 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    8 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.3.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 

    MemIf_SetMode 

    MemIf_Read 

    MemIf_Write 

    MemIf_Cancel 

    MemIf_GetStatus 

    MemIf_GetJobResult 

    MemIf_InvalidateBlock 

    MemIf_GetVersionInfo 

    MemIf_EraseImmediateBlock 
    Table 3-2  
    Mapping of service IDs to services 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01 
    MEMIF_E_PARAM_DEVICE 
    The parameter denoting the device index passed to 
    the API service is out of range.  
    0x02 
    MEMIF_E_PARAM_POINTER  The parameter passed to MemIf_GetVersionInfo 
    references no valid address (NULL-Pointer). 
    Table 3-3  
    Errors reported to DET 
     
    3.4.1.1 
    Parameter Checking 
    The following table shows which parameter checks are performed on which services: 
     
    Check 

    ter 
     t
    g a
     

    n
    c
     
    i

    i
    ed
    me
    es
    a
    nc
     
    v
    ss ci r er dres
     
     dek  pa erv  pak efe  add
    Service
    ex
    I s
    i
     
    P
    Chec
    ndi A
    Chec
    for  r
    alv
    MemIf_GetVersionInfo 
     
     
    MemIf_SetMode 
     
     
    MemIf_Read 
     
     
    MemIf_Write 
     
     
    MemIf_Cancel 
     
     
    MemIf_GetStatus 
     
     
    MemIf_GetJobResult 
     
     
    MemIf_InvalidateBlock 
     
     
    MemIf_EraseImmediateBlock 
     
     
    Table 3-4  
    Development Error Reporting: Assignment of checks to services 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    9 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    AUTOSAR requires that API functions check the validity of their parameters. The checks in 
    Table 3-4 are internal parameter checks of the API functions.  
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    10 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR MemIf into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the MemIf contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    MemIf.h 
    API of module MemIf, only this file needs to be included by upper layer 
    software (e.g. NvM) 
    MemIf_Types.h 
    Defines all standard types, needed by upper layer modules as well as the 
    modules Fee and Ea. 
    This file needs to be included by all memory hardware abstraction 
    modules according to AUTOSAR. 
    MemIf.c 
    Implementation of the functionalities of the module MemIf 
    Table 4-1  
    Static files 
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool. 
    File Name 
    Description 
    MemIf_Cfg.h 
    Configuration header file 
    MemIf_Cfg.c 
    Configuration source file 
    Table 4-2  
    Generated files 
     
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    11 / 25 
    based on template version 3.1 











    Technical Reference MICROSAR MemIf  
     
    4.2 
    Include Structure 
    deployment File Structure
    Fee.h
    «configurable
    0..*
    MemIf_Cfg.h
    include»
    Det.h
    «include»
    «configurable
    Ea.h
    include»
    0..*
    «include»
    MemIf.h
    MemIf_Types.h
    «include»
    Std_Types.h
    «include»
    «include»
    «include»
    «include»
    MemIf.c
    MemIf_Cfg.c
     
    Figure 4-1 
    Include structure 
    4.3 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions, which are defined for the MemIf, and illustrates their assignment among each 
    other. 
     
    Compiler Abstraction 
    DE
    Definitions 
     
    CO
    A
     
    _
    T
    E
    A
     

     
    T
    D
    S
    E
    A
    L_
    Memory Mapping 
    N
    D
    P
    RIV
    P
    Sections 
    IF_CO
    IF_CO
    IF_P
    IF_A
    M
    M
    M
    M
    ME
    ME
    ME
    ME
    MEMIF_START_SEC_CONST_8BIT 
     
     
     
     
    MEMIF_STOP_SEC_CONST_8BIT 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    12 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    MEMIF_START_SEC_CONST_32BIT 
     
     
     
     
    MEMIF_STOP_SEC_CONST_32BIT 
    MEMIF_START_SEC_CODE 
     
     
     
     
    MEMIF_STOP _SEC_CODE 
    Memory sections in which underlying memory 
     
     
     
     
    hardware abstraction modules’ code resides 
    Memory sections of data buffers, which are passed 
     
     
     
     
    to the API services for read or write jobs 
    Memory sections of buffers passed to 
     
     
     
     
    MemIf_GetVersionInfo 
    Table 4-3  
    Compiler abstraction and memory mapping 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    13 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    5  API Description 
    5.1 
    Interfaces Overview 
    class Logical View
    Nv M
    MemIf
    +  MemIf_Cancel(uint8) : void
    +  MemIf_EraseImmediateBlock(uint8, uint16) : Std_ReturnType
    +  MemIf_GetJobResult(uint8) : MemIf_JobResultType
    +  MemIf_GetStatus(uint8) : MemIf_StatusType
    +  MemIf_GetVersionInfo(Std_VersionInfoType*) : void
    Det
    +  MemIf_InvalidateBlock(uint8, uint16) : Std_ReturnType
    +  MemIf_Read(uint8, uint16, uint16, MemIf_DataPtr_pu8*, uint16) : Std_ReturnType
    +  Det_ReportError(uint16, uint8, uint8, uint8) : void
    +  MemIf_SetMode(MemIf_ModeType) : void
    +  MemIf_Write(uint8, uint16, MemIf_DataPtr_pu8) : Std_ReturnType
    0..*
    0..*
    Fee
    Ea
    +  Fee_Cancel() : void
    +  Ea_Cancel() : void
    +  Fee_EraseImmediateBlock(uint16) : Std_ReturnType
    +  Ea_EraseImmediateBlock(uint16) : Std_ReturnType
    +  Fee_GetJobResult() : MemIf_JobResultType
    +  Ea_GetJobResult() : MemIf_JobResultType
    +  Fee_GetStatus() : MemIf_StatusType
    +  Ea_GetStatus() : MemIf_StatusType
    +  Fee_GetVersionInfo(Std_VersionInfoType*) : void
    +  Ea_GetVersionInfo(Std_VersionInfoType) : void
    +  Fee_Init() : void
    +  Ea_Init() : void
    +  Fee_InvalidateBlock(uint16) : Std_ReturnType
    +  Ea_InvalidateBlock(uint16) : Std_ReturnType
    +  Fee_Read(uint16, uint16, uint8*, uint16) : Std_ReturnType
    +  Ea_Read(uint16, uint16, uint8*, uint16) : Std_ReturnType
    +  Fee_SetMode(MemIf_ModeType) : void
    +  Ea_SetMode(MemIf_ModeType) : void
    +  Fee_Write(uint16, uint8*) : Std_ReturnType
    +  Ea_Write(uint16, uint8*) : Std_ReturnType
     
    Figure 5-1 
    MemIf interactions with other BSW 
    5.2 
    Type Definitions 
    Type Name 
    C-Type  Description 
    Value Range 
    MemIf_StatusType 
    enum 
    Denotes the states of 
    MEMIF_UNINIT 
    BSW modules in the 
    Module is not initialized 
    memory stack 
    MEMIF_IDLE 
    There are no pending jobs that 
    need processing 
    MEMIF_BUSY 
    Module is processing jobs, no 
    further job requests are accepted 
    MEMIF_BUSY_INTERNAL 
    No job requests are being 
    processed, but the module is busy 
    executing internal operations 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    14 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Type Name 
    C-Type  Description 
    Value Range 
    MemIf_JobResultType  enum 
    Denotes the result of a 
    MEMIF_JOB_OK 
    job request after 
    Job processing finished 
    processing of this job 
    successfully 
    MEMIF_JOB_FAILED 
    Job processing finished with an 
    error 
    MEMIF_JOB_PENDING 
    Job is currently being processed 
    MEMIF_JOB_CANCELLED 
    Job has been cancelled by the 
    user 
    MEMIF_BLOCK_INCONSISTENT 
    Job finished successfully, but data 
    is inconsistent 
    MEMIF_BLOCK_INVALID 
    Job finished successfully but data 
    has been invalidated 
    MemIf_ModeType 
    enum 
    Denotes the processing 
    MEMIF_MODE_SLOW 
    mode for a module in the  Jobs are processed with the 
    memory stack 
    configured properties for slow 
    mode 
    MEMIF_MODE_FAST 
    Jobs are processed with the 
    configured properties for fast mode 
    Table 5-1  
    Type definitions 
    5.3 
    Services provided by MemIf 
    The MemIf API consists of services, which are realized by function calls. 
    5.3.1 
    MemIf_GetVersionInfo 
    Prototype 
    void MemIf_GetVersionInfo ( Std_VersionInfoType * VersionInfoPtr ) 
    Parameter 
    VersionInfoPtr
    Reference to a version information structure in RAM
     
     
    Return code 


    Functional Description 
    This service writes the version information of MemIf to the referenced structure.  
    Particularities and Limitations 
      In case the input parameter references an invalid address (NULL-pointer) the error 
    MEMIF_E_PARAM_POINTER is reported to Det and execution of the service is aborted. 
      This service is only available if “Version Info Api” is configured to STD_ON 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    15 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Expected Caller Context 
      This service has no restriction to the allowed or expected caller context. 
    Table 5-2  
    MemIf_GetVersionInfo 
    5.3.2 
    MemIf_SetMode 
    Prototype 
    void MemIf_SetMode(MemIf_ModeType Mode ) 
    Parameter 
    Mode
    Mode to switch modules into
     
     
    Return code 


    Functional Description 
    This service switches all underlying memory hardware abstraction modules to the requested mode of 
    operation, by calling [Ea|Fee]_SetMode (See description of respective module’s function). 
    Particularities and Limitations 
      All memory abstraction modules have to be in state MEMIF_IDLE when this service is 
    executed. 
    Call context 
    >  This service has no restriction to the allowed or expected caller context. 
    Table 5-3  
    MemIf_SetMode 
    5.3.3 
    MemIf_Read 
    Prototype 
    Std_ReturnType MemIf_Read 

     
    uint8 
    DeviceIndex, 
     
    uint16  BlockNumber, 
     
    uint16  BlockOffset, 
     
    uint8*  DataBufferPtr, 
     
    uint16  Length 

    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module to which the read operation 
     
    shall be delegated. 
    BlockNumber
    Identifies the block to read in non
     
    -volatile memory. 
    BlockOffset
    Offset in the block identified by BlockNumber from which on reading is 
     
    performed 
    DataBufferPtr
    Reference to the data buffer to which the data in non
     
    -volatile memory is read 
    to. 
    Length
    Number of bytes to read
     
     
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    16 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Return code 
    E_OK
    Read job request is accepted by the addressed memory hardware abstraction 
     
    module. 
    E_NOT_OK
    Read job request is rejected by the addressed memory hardware abstraction 
     
    module. 
    Functional Description 
    Delegates the job request to the appropriate memory hardware abstraction module by calling the service 
    [Ea|Fee]_Read of the addressed module instance (See description of respective module’s function) 
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    >  NvM / Application 
    Table 5-4  
    MemIf_Read 
    5.3.4 
    MemIf_Write 
    Prototype 
    Std_ReturnType MemIf_Write  

     
    uint8 
    DeviceIndex, 
     
    uint16  BlockNumber, 
     
    uint8*  DataBufferPtr 

    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module to which the write 
     
    operation shall be delegated. 
    BlockNumber
    Identifies the block to write to non
     
    -volatile memory. 
    DataBufferPtr
    Reference to the data buffer whose content is written to non
     
    -volatile memory 
    Return code 
    E_OK
    Write job request is accepted by the addressed memory hardware abstraction 
     
    module. 
    E_NOT_OK
    Write job request is rejected by the addressed memory hardware abstraction 
     
    module. 
    Functional Description 
    Delegates the job request to the appropriate memory hardware abstraction module by calling the service 
    [Ea|Fee]_Write of the addressed module instance (See description of respective module’s function) 
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    17 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    >  NvM / Application 
    Table 5-5  
    MemIf_Write 
    5.3.5 
    MemIf_Cancel 
    Prototype 
    void MemIf_Cancel ( uint8 DeviceIndex ) 
    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module whose job processing shall 
     
    be cancelled. 
    Return code 


    Functional Description 
    Delegates the cancel request to the appropriate memory hardware abstraction module by calling the 
    service [Ea|Fee]_Cancel of the addressed module instance (See description of respective module’s 
    function) 
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    >  NvM / Application 
    Table 5-6  
    MemIf_Cancel 
    5.3.6 
    MemIf_GetStatus 
    Prototype 
    MemIf_StatusType MemIf_GetStatus ( uint8 DeviceIndex ) 
    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module whose job processing shall 
     
    be cancelled. 
    Return code 
    MEMIF_IDLE
    Addressed module is ready to accept job requests
     
     
    MEMIF_UNINIT
    Addressed module is not initialized
     
     
    MEMIF_BUSY
    Addressed module is processing a job and is not able to accept new job 
     
    requests 
    MEMIF_BUSY_INTERNAL Addressed module is not processing any job requests, but the module is busy 
      executing internal operations 
    Functional Description 
    Delegates the call to this service to the appropriate memory hardware abstraction module by calling the 
    service [Ea|Fee]_GetStatus (See description of respective module’s function).  
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    18 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices and unequal to MEMIF_BROADCAST_ID), the error code MEMIF_E_PARAM_DEVICE is 
    reported to Det and execution of the service is aborted. 
    >  In case the MEMIF_BROADCAST_ID is used as device index parameter, the overall status of all 
    underlying memory abstraction modules is returned. This overall status is computed as 
    follows: 

    MEMIF_IDLE – all underlying devices are in this state 

    MEMIF_UNINIT – at least one device returned this state 

    MEMIF_BUSY – at least one device returned this state and no other returned 
    MEMIF_UNINIT 

    MEMIF_BUSY_INTERNAL – at least one device returned this state and no other returned 
    MEMIF_BUSY or MEMIF_UNINIT 
    Call context 
    >  NvM / Application 
    Table 5-7  
    MemIf_GetStatus 
    5.3.7 
    MemIf_GetJobResult 
    Prototype 
    MemIf_JobResultType MemIf_GetJobResult ( uint8 DeviceIndex ) 
    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module whose job 
     
    processing shall be cancelled. 
    Return code 
    MEMIF_JOB_OK
    Job processing finished successfully
     
     
    MEMIF_JOB_FAILED
    Job processing finished with an error
     
     
    MEMIF_JOB_PENDING
    Job is currently being processed
     
     
    MEMIF_JOB_CANCELLED
    Job has been cancelled by the user
     
     
    MEMIF_BLOCK_INCONSISTENT
    Job finished successfully, but data is inconsistent
     
     
    MEMIF_BLOCK_INVALID
    Job finished successfully but data has been invalidated
     
     
    Functional Description 
    Delegates the call to this service to the appropriate memory hardware abstraction module by calling the 
    service [Ea|Fee]_GetJobResult (See description of respective module’s function).  
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    >  NvM / Application 
    Table 5-8  
    MemIf_GetJobResult 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    19 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    5.3.8 
    MemIf_EraseImmediateBlock 
    Prototype 
    Std_ReturnType MemIf_EraseImmediateBlock  

     
    uint8 
    DeviceIndex, 
     
    uint16  BlockNumber 

    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module to which the operation shall 
     
    be delegated. 
    BlockNumber
    Identifies the block to erase in non
     
    -volatile memory. 
    Return code 
    E_OK
    Erase job request is accepted by the addressed memory hardware abstraction 
     
    module. 
    E_NOT_OK
    Erase job request is rejected by the addressed memory hardware abstraction 
     
    module. 
    Functional Description 
    Delegates the job request to the appropriate memory hardware abstraction module by calling the service 
    [Ea|Fee]_EraseImmediateBlock of the addressed module instance (See description of respective module’s 
    function) 
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    >  NvM / Application 
    Table 5-9  
    MemIf_EraseImmediateBlock 
    5.3.9 
    MemIf_InvalidateBlock 
    Prototype 
    Std_ReturnType MemIf_InvalidateBlock  

     
    uint8 
    DeviceIndex, 
     
    uint16  BlockNumber 

    Parameter 
    DeviceIndex
    Index of the memory hardware abstraction module to which the operation shall 
     
    be delegated. 
    BlockNumber
    Identifies the block to invalidate in non
     
    -volatile memory. 
    Return code 
    E_OK
    Erase job request is accepted by the addressed memory hardware abstraction 
     
    module. 
    E_NOT_OK
    Erase job request is rejected by the addressed memory hardware abstraction 
     
    module. 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    20 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    Functional Description 
    Delegates the job request to the appropriate memory hardware abstraction module by calling the service 
    [Ea|Fee]_InvalidateBlock of the addressed module instance (See description of respective module’s 
    function) 
    Particularities and Limitations 
    >  If the parameter DeviceIndex is out of range (greater than the number of configured 
    devices), the error code MEMIF_E_PARAM_DEVICE is reported to Det and execution of the 
    service is aborted. 
    Call context 
    >  NvM / Application 
    Table 5-10  
    MemIf_InvalidateBlock 
    5.4 
    Services used by MemIf 
    In the following table services provided by other components, which are used by the MemIf 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DET (see [2]) 
    Det_ReportError 
    EA (see [4]) 
    Ea_SetMode 
    Ea_Read 
    Ea_Write 
    Ea_Cancel 
    Ea_GetStatus 
    Ea_GetJobResult 
    Ea_InvalidateBlock 
    Ea_GetVersionInfo 
    Ea_EraseImmediateBlock 
    FEE (see [5]) 
    Fee_SetMode 
    Fee_Read 
    Fee_Write 
    Fee_Cancel 
    Fee_GetStatus 
    Fee_GetJobResult 
    Fee_InvalidateBlock 
    Fee_GetVersionInfo 
    Fee_EraseImmediateBlock 
    Table 5-11  
    Services used by the MemIf 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    21 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    6  Configuration 
    The  MEMIF  attributes  can  be  configured  using  the  DaVinci  Configurator.  The  outputs  of 
    the configuration and generation process are the configuration source files.  
    The description of each used parameter is set in the MemIf bswmd file. 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    22 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    7  AUTOSAR Standard Compliance 
    7.1 
    Deviations 
    7.1.1 
    Extension of Error Codes 
    In contradiction to AUTOSAR standard MemIf019, no set of macros is implemented, which 
    maps  the  Memory  Abstraction  Interface  API  to  the  API  of  the  corresponding  memory 
    abstraction module. 
    7.2 
    Additions/ Extensions 
    No Extensions to AUTOSAR standard  
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    23 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator  Generation tool for MICROSAR components 
    Table 8-1  
    Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    SRS 
    Software Requirement Specification 
    SWS 
    Software Specification 
    NVRAM 
    Non Volatile RAM Manager 
    NvM 
    NVRAM Manager 
    Fee 
    Flash EEPROM Emulation 
    Ea 
    EEPROM Abstraction 
    Fls 
    Flash Driver 
    Eep 
    EEPROM Driver 
    RAM 
    Random Access Memory 
    Table 8-2  
    Abbreviations 
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    24 / 25 
    based on template version 3.1 


    Technical Reference MICROSAR MemIf  
     
    9  Contact 
    Visit our website for more information on 
     
    >   News 
    >   Products 
    >   Demo software 
    >   Support 
    >   Training data 
    >   Addresses 
     
    www.vector.com 
     
    2015, Vector Informatik GmbH 
    Version: 2.02.00 
    25 / 25 
    based on template version 3.1 

    Document Outline


    1.3.147 - TechnicalReference_MSSV

    YourTopic

    1.3.149 - TechnicalReference_MSSVs

     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Safe Silence Verifier 
    Technical Reference 
     
     
    Version 1.4 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Groß, Patrick Markl 
    Status 
    Released 
     
     
     
     
     
     

    Technical Reference MICROSAR Safe Silence Verifier 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Markus Groß 
    2012-07-24  1.0 
    Initial version 
    Patrick Markl 
    2012-08-22  1.1 
    Changes after review 
    Markus Groß 
    2012-11-15  1.2 
    Add information about third party libraries 
    Markus Groß 
    2013-01-15  1.3 
    Update to reflect changes 
    Patrick Markl 
    2014-03-03  1.4 
    Added restrictions chapter 
    Reference Documents 
    No. 
    Source  Title 
    Version 
    [1]   
    ISO 
    ISO/IEC 9899:1990, Programming languages -C 
    Second 
    edition 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    2 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    Contents 
    1 
    Introduction................................................................................................................... 6 
    1.1 

    Intended audience ............................................................................................. 6 
    2 
    Functional Description ................................................................................................. 7 
    2.1 

    Required Environment ....................................................................................... 7 
    2.2 
    Restrictions ........................................................................................................ 7 
    2.3 
    Command Line Parameters ............................................................................... 7 
    2.3.1 
    Option -h, --help ................................................................................. 8 
    2.3.2 
    Option --version ................................................................................. 8 
    2.3.3 
    Option -v, --verbose ............................................................................ 8 
    2.3.4 
    Option --crcCheck .............................................................................. 8 
    2.3.5 
    Option --openReport .......................................................................... 8 
    2.3.6 
    Option --stats ................................................................................ 8 
    2.3.7 
    Option -l, --logFile .............................................................................. 8 
    2.3.8 
    Option -r, --reportFile .......................................................................... 9 
    2.3.9 
    Option -p, --pluginDir .......................................................................... 9 
    2.3.10 
    Option -D, --define ............................................................................. 9 
    2.3.11 
    Option –i, --inputDir ............................................................................ 9 
    2.3.12 
    Command Line Usage ....................................................................... 9 
    2.3.12.1 

    Option Only Parameters .................................................. 9 
    2.3.12.2 
    Parameters Requiring A Value ....................................... 10 
    2.3.12.3 
    Examples ....................................................................... 10 
    3 
    Analysis Report .......................................................................................................... 11 
    3.1.1 
    Structure .......................................................................................... 11 
    3.1.1.1 

    Header ........................................................................... 11 
    3.1.1.2 
    Information about Environment ...................................... 11 
    3.1.1.3 
    Detailed Log Output ....................................................... 11 
    3.2 
    Error Messages ............................................................................................... 12 
    3.3 
    Steps if the Analysis Fails ................................................................................ 13 
    4 
    Integration ................................................................................................................... 14 
    4.1 

    Deliverables ..................................................................................................... 14 
    4.2 
    GENy ............................................................................................................... 14 
    4.3 
    DaVinci Configurator Pro 5............................................................................... 16 
    5 
    Third Party Libraries ................................................................................................... 18 
    5.1 

    Boost ............................................................................................................... 18 
    5.2 
    ChaiScript ........................................................................................................ 18 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    3 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    5.3 
    LLVM/Clang ..................................................................................................... 19 
    5.4 
    OpenBSD regex ............................................................................................... 20 
    6 
    Contact ........................................................................................................................ 22 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    4 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    Tables 
    Table 2-1  
    Command Line Parameters ........................................................................ 8 
    Table 3-1  
    Message classes and their value .............................................................. 13 
    Table 4-1  
    Locations of Deliverables in an SIP .......................................................... 14 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    5 / 22 
    based on template version 4.11.3 


    Technical Reference MICROSAR Safe Silence Verifier 
    1  Introduction 
    MICROSAR  Safe  Silence  Verifier  (MSSV)  is  a  command  line  tool  delivered  as  part  of 
    Silent  BSW  packages.  MSSV  checks  based  on  rules  the  consistency  of  generated 
    configuration files of the BSW modules. The result is written to a HTML report. The report 
    is part of the proof that the BSW modules fulfill the Freedom from Interference criteria. 
     
     
    Reference 
    For all required steps to be performed as part of the Silent BSW integration see the 
      project specific Safety Manual. 
     
     
    1.1 
    Intended audience 
    This document is relevant for developers who integrate Silent BSW into their ECU.  
    2014, Vector Informatik GmbH 
    Version: 1.4 
    6 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    2  Functional Description 
    This chapter describes the tool MSSV and how it can be used to check the consistency of 
    the generated configuration data for SilentBSW modules. MSSV supports configuration via 
    command line parameters. These are described in the following section together with the 
    report which is the output of MSSV.  
    2.1 
    Required Environment 
    MSSV supports the following operating systems: 
    >  Windows XP SP3 (32Bit) 
    >  Windows 7 (32Bit)  
    >  Windows 7 (64Bit) 
    2.2 
    Restrictions 
    MSSV uses a Compiler front end in order to compile the input source files. This Compiler 
    front end requires ANSI-C 90 [1] conform source code. Some target compilers implement 
    specific  language  extensions  which  might  prevent  MSSV  from  compiling  the  code 
    successfully. The Vector BSW code does not contain such language extensions. However, 
    these extensions may be included via customer header files. In such a case the customer 
    shall take care that these language extensions are encapsulated via the preprocessor for 
    the  MSSV  execution. The  corresponding preprocessor  switches  can be  specified  via  the 
    command line when calling MSSV. 
    2.3 
    Command Line Parameters 
    MSSV  is  configured  by  means  of  command  line  parameters. This  chapter  describes  the 
    available command line parameters and their meaning. 
    Command Line Parameter 
    Description 
    Optional Parameters 
     
    -h, --help 
    Display available options. 
    --version 
    Prints the version and exits. 
    -v, --verbose 
    Enables verbose output of MSSV. 
    --crcCheck 
    Only perform CRC32 checks and then exit. 
    --openReport 
    Open the report file when finished. 
    --stats 
    Display timing statistics when MSSV is finished. 
    -l, --logFile <file> 
    Specifies the filename of a logfile.  
    If this parameter is missing MSSV writes the log to 
    stdout. 
    -r, --reportFile <file> 
    Specifies the filename of the report. If the parameter is 
    just a path the report is written with the default report 
    file name. Otherwise the specified report file name is 
    used.  
    2014, Vector Informatik GmbH 
    Version: 1.4 
    7 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    Command Line Parameter 
    Description 
    Optional Parameters 
     
    If this parameter is missing MSSV writes the report to 
    the current working directory. 
    -p, --pluginDir <directory> 
    Specifies the path of the plugin directory. By default 
    this is the subfolder “plugins” in the directory of MSSV. 
    -D, --define <symbol> 
    Additional defines for the compiler. 
    Required Parameters 
     
    -i, --inputDir <directory> 
    One or more input directories. 
    Table 2-1   Command Line Parameters 
    2.3.1 
    Option -h, --help 
    This  command  line  option  prints  the  help  of  MSSV  on  the  console.  The  help  lists  all 
    command line parameters as displayed in Table 2-1. 
    2.3.2  Option --version 
    This parameter displays the version of MSSV on the command line. 
    2.3.3  Option -v, --verbose 
    The verbose option enables a verbose output of messages from  MSSV. As a default the 
    verbose  mode  is  not  active.  This  means  that  MSSV  only  displays  warnings,  errors  and 
    fatal  errors  as  well  as  some  selected  note  messages  which  might  be  of  interest  for  the 
    user. If the verbose mode is enabled MSSV will display all note messages. 
    2.3.4 
    Option --crcCheck 
    The CRC check option can be used to check the CRC32 checksums of the plugins. Then 
    the report file contains a report about all plugins and their checksums. If the report is green 
    all plugins are valid. If the report is red at least one plugin is invalid. 
    2.3.5 
    Option --openReport 
    This command line parameter instructs MSSV to open the resulting report HTML file after it 
    has  finished.  Please  make  sure  that  HTML  files  are  opened  with  a  suitable  program  by 
    default when using this option (e.g. if you double click an HTML file in the explorer it should 
    open a web browser). 
    2.3.6  Option --stats 
    The statistics option is not particularly interesting. Passing this option to MSSV will display 
    some timing statistics. These statistics include how much time was spent on each plugin 
    and to parse a file etc. 
    2.3.7  Option -l, --logFile 
    By default MSSV displays all messages on the standard output (stdout). Using this option 
    MSSV will redirect its output to a file instead. Please note that the file which is specified 
    using this option should be writable  by  MSSV  and be located inside a directory  which  is 
    accessible for MSSV.  
    The  resulting  log file will  have  the file extension  “.log”  regardless  what  extension  the  file 
    had which was specified as the command line parameter. 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    8 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    2.3.8 
    Option -r, --reportFile 
    MSSV writes a report file at the end of its analysis. This report file is named “report.html” 
    by default and will be stored inside the working directory from which MSSV was called. 
    Using this command line option it is possible to specify a custom filename and location for 
    the  report  file.  Please  note  that  the  file  which  is  specified  using  this  option  should  be 
    writable by MSSV and be located inside a directory which is accessible for MSSV.  
    The resulting  report file will have the file extension “.html” regardless what extension the 
    file had which was specified as the command line parameter. 
    2.3.9 
    Option -p, --pluginDir 
    This option enables the user to switch the plugin directory MSSV is using to perform the 
    consistency checks. This is useful if multiple plugin directories exist. 
    2.3.10  Option -D, --define 
    Internally  MSSV  uses  a  compiler  frontend  to  parse  the  generated  source  code  and 
    preprocess it. With this option it is possible to define symbols for the preprocessor without 
    adding them to a header file. This parameter is similar to the “-D” parameter known from 
    compilers such as GCC or Clang. 
    This command line option can be specified multiple times to define an arbitrary amount of 
    symbols. 
    2.3.11  Option –i, --inputDir 
    MSSV requires one or more input directories to operate correctly. These input directories 
    are scanned for source code files, which are processed by the plugins. 
    To  specify  multiple  input  directories  the  parameter  can  be  passed  multiple  times  with 
    different values. The input directories are not scanned recursively by default. However, if a 
    directory ends with “\*” MSSV scans this input directory recursively. 
    2.3.12  Command Line Usage 
    2.3.12.1  Option Only Parameters 
    Option only command line parameters can be passed to MSSV and do not require a value. 
    Option only command line parameters are: 
      -h / --help 
      --version 
      -v / --verbose 
      --crcCheck 
      --openReport 
      --stats 
    These options can be passed as command line option separated by spaces. 
    For example: 
    MSSV.exe --help 
    or 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    9 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    MSSV.exe –v --openReport ... 
    2.3.12.2  Parameters Requiring A Value 
    Parameters which require a value are: 
      -l / --logFile 
      -r / --reportFile 
      -p / --pluginDir 
      -D / --define 
      -i / --inputDir 
    These parameters require a value if they are specified on the command line. The value is 
    separated from the identifier using a space. 
    For example: 
    MSSV.exe --reportFile myreport.html --define DEBUG ... 
    2.3.12.3  Examples 
     
    Display MSSV Help 
    To display the MSSV help use: 
    MSSV.exe --help 
     
    Run MSSV with minimum parameters 
    Assume  that  the  root  path  of  the  delivery  is  D:\delivery.  To  run  MSSV  with  the 
    minimum required parameters one can use: 
    MSSV.exe --inputDir D:\delivery\* 
    This will instruct MSSV to scan the root path of the delivery recursively. 
     
    Log the output of MSSV to a file 
    Based  on  the  example  above,  one  can  extend  the  command  line  to  log  the  output  of 
    MSSV to a file. This time we use the short form parameters: 
    MSSV.exe –-inputDir D:\delivery\* -l mylog.log 
     
    Write the report to another file and enable verbose mode 
    The  command  line  from  the  previous  example  is  adapted  to  write  the  report  to  the  file 
    specified and to enable verbose output: 
    MSSV.exe –-inputDir D:\delivery\* -r myreport.html -v 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    10 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    3  Analysis Report 
    MSSV generates a report file after performing its consistency checks. By default the report 
    file  is  named  “report.html”  and  is  located  inside  the  working  directory  where  MSSV  was 
    executed. 
    3.1.1 
    Structure 
    This report file has a simple structure to display the most important parts at a glance. The 
    parts are described in the next sections. 
    3.1.1.1 
    Header 
    The header displays whether the MSSV consistency check was successful or not. 
    In case the check was successful and no inconsistencies or errors occurred, the header 
    displays “Overall Check Result: Passed”. 
    If  an  inconsistency  was  detected  or  other  errors  occurred,  the  header  displays  “Overall 
    Check Result: Fail”. 
    Additionally there may be a list of plugins which were skipped. This can happen both if the 
    overall  check  result  is  pass  or  fail.  In  case  one  or  more  plugins  were  skipped,  “Skipped 
    Plugins:  …”  will  be  displayed  directly  under  the  overall  check  result.  This  list  of  skipped 
    plugins  needs to be manually reviewed as to why they were  skipped and if  this has any 
    impact on the consistency of the generated data. 
    For example if a plugin was skipped because the module it is checking is not enabled and 
    not used, this would most likely not affect the consistency of the generated data. For more 
    information refer to the project specific Safety Manual. 
    3.1.1.2 
    Information about Environment 
    The  second  section  of  the  report  displays  some  information  about  the  environment  of 
    MSSV. This includes for example the current windows user and the number of found errors 
    and warnings. 
    3.1.1.3 
    Detailed Log Output 
    The detailed log output contains all messages from  MSSV. This also includes messages 
    which are only visible if the verbose mode is active. 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    11 / 22 
    based on template version 4.11.3 


    Technical Reference MICROSAR Safe Silence Verifier 
     
     
    Note 
    The information found in the detailed log output is complex and not intended to be 
      checked. The only relevant information for the user is the overall test result which says 
    if the check was successful or not. The detailed information becomes relevant if any 
    errors occurred. 
     
     
    3.2 
    Error Messages 
    MSSV  emits  errors  either  in  the  detailed  log  output  section  of  the  report  file  or  displays 
    them  as  message  boxes.  Errors  are  only  displayed  using  message  boxes  if  the  report 
    could not be opened or written and hence cannot be emitted to the report. 
    This  leads  to  a  simple  workflow  of  MSSV.  If  an  error  message  was  displayed  using  a 
    message  box  a  report  file  does  not  exist.  If no  message  box  was  displayed  all  potential 
    errors  can  be  found  in  the  report  alongside  the  overall  verdict  of  the  MSSV  consistency 
    check. 
    There exist four classes of MSSV messages: 
      Note, 
      Warning, 
      Error, 
      Fatal error. 
    Notes are emitted very often and are not of importance for the user of MSSV, but can help 
    to trace a problem if one occurred. 
    Warnings indicate that a minor issue occurred which are not relevant enough to issue an 
    error. For example if a source code file for a plugin was not found, a warning is emitted. An 
    error  is  not  emitted  because  the  user  may  have  disabled  the  module  intentionally  in  the 
    generator and thus the consistency of the project is not affected by this module. However, 
    the plugin for which the source code file was not found is skipped and added to the list of 
    skipped plugins in the report. This list needs to be reviewed manually. 
    An error can occur during the consistency check of a BSW module if e.g. an inconsistency 
    was detected. Errors do not prevent MSSV from continuing its consistency check and help 
    the user to identify the underlying issue. 
    A fatal error indicates that a serious Issue occurred that prevents MSSV from performing 
    the consistency check. 
    The return value of the MSSV.exe is determined by these four classes of messages. The 
    class of the highest occurred message defines the return value. 
    Message Class 
    Value 
    Note 

    Warning 

    Error 

    Fatal Error 

    2014, Vector Informatik GmbH 
    Version: 1.4 
    12 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    Table 3-1   Message classes and their value 
    For example if a warning occurred and no errors of any kind the return value of MSSV is 1. 
    If an error and a fatal error were emitted the return value is 3. If only notes were emitted 
    MSSV returns 0. 
    3.3 
    Steps if the Analysis Fails 
    In  case  the  MSSV  analysis  reports  a  failure  Vector  has  to  be  informed  about  this  issue. 
    Please use the contact information found in the project specific Safety Manual. 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    13 / 22 
    based on template version 4.11.3 


    Technical Reference MICROSAR Safe Silence Verifier 
    4  Integration 
    Since MSSV checks the consistency of the generated data it is convenient to run  MSSV 
    automatically  after  the  data  is  generated.  To  integrate  MSSV  into  the  MICROSAR  3 
    workflow  a  GENy  post  generation  application  can  be  used.  For  integration  into 
    MICROSAR 4 DaVinci Configurator Pro 5 supports external generation steps to allow easy 
    integration. 
    4.1 
    Deliverables 
    The following table describes which parts are delivered with the  MSSV tool and where to 
    find them. 
     
    Deliverable 
    Location 
    MSSV.exe 
    .\Generators\MSSV\MSSV.exe 
    Technical Reference 
    .\Doc\TechnicalReferences\TechnicalReference_MSSV.pdf 
    Table 4-1   Locations of Deliverables in an SIP 
    4.2 
    GENy 
     
    Start  GENy  and  select  the  menu  “Configuration”.  Next  select  the  menu  item  “Post 
    Generation Applications...”. This will display the following window: 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    14 / 22 
    based on template version 4.11.3 




    Technical Reference MICROSAR Safe Silence Verifier 
     
    In this window you can enter the  MSSV command line. First enter the path to the  MSSV 
    executable and then add any parameters to it. The input directory is specified as absolute 
    path using the respective command line parameter. 
     
    To test the post generation application select again the menu “Configuration” and click the 
    item “Generate System”. Alternatively you can press F7. This will trigger GENy to generate 
    the data for the current configuration. 
     
     
    After  the  Generation  has  finished  generating  the  data  a  messagebox  will  be  displayed. 
    This  messagebox  displays  the  previously  set  up  post  generation  application  and  shows 
    exactly what command line will be executed if the button “OK” is clicked. 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    15 / 22 
    based on template version 4.11.3 




    Technical Reference MICROSAR Safe Silence Verifier 
    To run the post generation application click the “OK” button. 
    4.3 
    DaVinci Configurator Pro 5 
     
    Start DaVinci Configurator Pro 5 and select the menu “Project”. Next select the menu item 
    “Settings”. 
     
    To  add  a  new  external  generation  step,  select  “External  Generation  Steps”.  This  will 
    display the following window: 
     
    Click on the Add button with the “+” symbol and enter the MSSV path and command line 
    arguments.  
    2014, Vector Informatik GmbH 
    Version: 1.4 
    16 / 22 
    based on template version 4.11.3 





    Technical Reference MICROSAR Safe Silence Verifier 
     
     
    Note 
    It is required to set a working directory for a post generation step. 
     
     
     
     
     
    Now  the  external  generation  step  needs  to  be  configured  to  be  run  after  the  DaVinci 
    Generators. To configure this click on the item “Code Generation” in the location bar in the 
    same window. 
     
    Now select the MSSV Generation Step and enable it by checking the check box in front of 
    it.  Additionally  MSSV  should  be  run  after  DaVinci  Configurator  Pro  generated  the  data. 
    Therefore  it  is  necessary  to  move  it  after  the  DaVinci  Code  Generation  using  the  Down 
    button with the “” symbol. 
    Now  MSSV  will  be  automatically  executed  after  the  DaVinci  Configurator  Pro  has 
    generated the data. 
     
     
    Note 
    MSSV will also be executed if the data was not successfully generated. 
     
     
     
     
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    17 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    5  Third Party Libraries 
    5.1 
    Boost 
    Boost Software License - Version 1.0 - August 17th, 2003 
     
    Permission is hereby granted, free of charge, to any person or organization 
    obtaining a copy of the software and accompanying documentation covered by 
    this license (the "Software") to use, reproduce, display, distribute, 
    execute, and transmit the Software, and to prepare derivative works of the 
    Software, and to permit third-parties to whom the Software is furnished to 
    do so, all subject to the following: 
     
    The copyright notices in the Software and this entire statement, including 
    the above license grant, this restriction and the following disclaimer, 
    must be included in all copies of the Software, in whole or in part, and 
    all derivative works of the Software, unless such copies or derivative 
    works are solely in the form of machine-executable object code generated by 
    a source language processor. 
     
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
    FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 
    SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 
    FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
    DEALINGS IN THE SOFTWARE. 
    5.2 
    ChaiScript 
    Copyright 2009-2012 Jason Turner and Jonathan Turner. All Rights Reserved. 
    Redistribution and use in source and binary forms, with or without 
    modification, are permitted provided that the following conditions are 
    met: 
     
      * Redistributions of source code must retain the above copyright 
        notice, this list of conditions and the following disclaimer. 
      * Redistributions in binary form must reproduce the above 
        copyright notice, this list of conditions and the following 
        disclaimer in the documentation and/or other materials provided 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    18 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
        with the distribution. 
      * Neither the name of Jason Turner nor Jonathan Turner nor the  
        name of contributors may be used to endorse or promote products derived 
        from this software without specific prior written permission. 
     
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    5.3 
    LLVM/Clang 
    University of Illinois/NCSA 
    Open Source License 
     
    Copyright (c) 2003-2012 University of Illinois at Urbana-Champaign. 
    All rights reserved. 
     
    Developed by: 
     
        LLVM Team 
     
        University of Illinois at Urbana-Champaign 
     
        http://llvm.org 
     
    Permission is hereby granted, free of charge, to any person obtaining a copy of 
    this software and associated documentation files (the "Software"), to deal with 
    the Software without restriction, including without limitation the rights to 
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
    of the Software, and to permit persons to whom the Software is furnished to do 
    so, subject to the following conditions: 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    19 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
        * Redistributions of source code must retain the above copyright notice, 
          this list of conditions and the following disclaimers. 
     
        * Redistributions in binary form must reproduce the above copyright notice, 
          this list of conditions and the following disclaimers in the 
          documentation and/or other materials provided with the distribution. 
     
        * Neither the names of the LLVM Team, University of Illinois at 
          Urbana-Champaign, nor the names of its contributors may be used to 
          endorse or promote products derived from this Software without specific 
          prior written permission. 
     
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
    FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE 
    CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE 
    SOFTWARE. 
    5.4 
    OpenBSD regex 
    $OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $ 
     
    Copyright 1992, 1993, 1994 Henry Spencer.  All rights reserved. 
    This software is not subject to any license of the American Telephone 
    and Telegraph Company or of the Regents of the University of California. 
     
    Permission is granted to anyone to use this software for any purpose on 
    any computer system, and to alter it and redistribute it, subject 
    to the following restrictions: 
     
    1. The author is not responsible for the consequences of use of this 
       software, no matter how awful, even if they arise from flaws in it. 
     
    2. The origin of this software must not be misrepresented, either by 
       explicit claim or by omission.  Since few users ever read sources, 
       credits must appear in the documentation. 
     
    3. Altered versions must be plainly marked as such, and must not be 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    20 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
       misrepresented as being the original software.  Since few users 
       ever read sources, credits must appear in the documentation. 
     
    4. This notice may not be removed or altered. 
     
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
    /*- 
     * Copyright (c) 1994 
     *  The Regents of the University of California.  All rights reserved. 
     * 
     * Redistribution and use in source and binary forms, with or without 
     * modification, are permitted provided that the following conditions 
     * are met: 
     * 1. Redistributions of source code must retain the above copyright 
     *    notice, this list of conditions and the following disclaimer. 
     * 2. Redistributions in binary form must reproduce the above copyright 
     *    notice, this list of conditions and the following disclaimer in the 
     *    documentation and/or other materials provided with the distribution. 
     * 3. Neither the name of the University nor the names of its contributors 
     *    may be used to endorse or promote products derived from this software 
     *    without specific prior written permission. 
     * 
     * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 
     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 
     * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
     * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
     * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
     * SUCH DAMAGE. 
     * 
     *  @(#)COPYRIGHT  8.1 (Berkeley) 3/16/94 
     */ 
    2014, Vector Informatik GmbH 
    Version: 1.4 
    21 / 22 
    based on template version 4.11.3 

    Technical Reference MICROSAR Safe Silence Verifier 
    6  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
    2014, Vector Informatik GmbH 
    Version: 1.4 
    22 / 22 
    based on template version 4.11.3 

    1.3.150 - TechnicalReference_Nm

    MICROSAR Network Management Interface

    1.3.152 - TechnicalReference_Nms


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR Network Management 
    Interface 
    Technical Reference 
     
     
    Version 10.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Leticia Garcia; Markus Drescher 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR Network Management Interface 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Oliver Hornung 
    2011-03-11 
    1.00.00 
    ESCAN00048893: Initial Version of Nm 
    AUTOSAR Release 4 
    Philipp Ritter 
    2012-07-20 
    2.00.00 
    ESCAN00058346: Updated to ASR 4.0.3 
    Markus Drescher 
    2013-05-11 
    2.01.00 
    ESCAN00063146: Updated Figure 2-1 
    ESCAN00067284: Added chapter 1, 
    merged Chapter ‘AUTOSAR Standard 
    Compliance’ with chapter 3.1, removed 
    chapter ‘Compiler Abstraction and Memory 
    Mapping’, various improvements 
    ESCAN00067285: Rewritten chapter 3.8 
    Markus Drescher 
    2013-10-01 
    3.00.00 
    ESCAN00068794: Added J1939Nm 
    Support 
    ESCAN00068989: Adapted conditions for 
    availability of Nm_PrepareBusSleepMode 
    ESCAN00070593: Added Runtime 
    Measurement Support as ‘Feature Beyond 
    the AUTOSAR Standard’ 
    ESCAN00070804: Updated Figure 2-1 
    Markus Drescher 
    2014-02-14 
    3.01.00 
    ESCAN00071769: Updated chapters 1, 
    3.1, 5.2, 5.4, 5.6, added chapter 3.9 
    ESCAN00073703: Updated Figure 2-1 
    ESCAN00073704: Updated chapter 3.1.3 
    ESCAN00073705: Updated chapter 3.11.1 
    ESCAN00073707: Added chapter 4.3.2 
    ESCAN00073709: Updated chapter 5.1 
    Markus Drescher 
    2014-04-17 
    4.00.00 
    ESCAN00074299: Added chapter 3.1.2.8 
    ESCAN00075103: Updated chapter 3 
    ESCAN00075105: Updated Figure 2-1 
    ESCAN00075012: Updated Figure 3-1, 
    added chapter 3.1.1.2 
    ESCAN00075311: Updated Figure 3-1 
    ESCAN00075118: Updated chapters 3.1.2, 
    3.4.4 
    ESCAN00075812: Added chapter 3.3.1 
    Markus Drescher 
    2014-10-07 
    5.00.00 
    ESCAN00076764: Updated chapters 2, 3.1 
    ESCAN00078802: Updated chapter 5.2.15 
    ESCAN00078803: Updated Figure 2-1 
    Markus Drescher 
    2015-03-23 
    6.00.00 
    ESCAN00081207 Updated Table 3-7, 
    updated Table 5-1 
    Leticia Garcia 
    2015-07-21 
    7.00.00 
    ESCAN00080959: Updated chapter 
    3.1.2.1 
    ESCAN00083545: Added chapters: 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    3.1.2.9, 5.4.8 and 5.6.1.4. 
    ESCAN00083555: Updated chapters.5.4.2, 
    5.4.3, 5.4.4, 5.4.5 and 5.4.6 
    ESCAN00084339: Updated chapter 3.11.1 
    Leticia Garcia 
    2015-12-16 
    8.00.00 
    ESCAN00084773 Updated chapter 5.6.1, 
    3.1.2.3, 3.8.2, 4.2 
    ESCAN00085986: Updated chapter 5.2.16 
    ESCAN00087098: Updated chapter 3.1.1 
    Markus Drescher 
    2016-03-08 
    9.00.00 
    ESCAN00088776: Updated Figure 2-1 
    ESCAN00088777: Update to new CI layout 
    ESCAN00088778: Extended chapter 3.9.1 
    Leticia Garcia 
    2016-07-04 
    10.00.00 
    ESCAN00089481 Extended chapters: 
    3.1.2.6, 3.4.2 and 3.4.6. 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_NetworkManagementInterface.pdf 
    3.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DiagnosticEventManager.pdf 
    4.2.0 
    [4]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [5]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    3.2.0 
    [6]   Vector 
    TechnicalReference_CanNm.pdf 
    See 
    delivery 
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector’s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Contents 
    1 
    Component History ...................................................................................................... 9 
    2 
    Introduction................................................................................................................. 10 
    2.1 
    Architecture Overview ...................................................................................... 11 
    3 
    Functional Description ............................................................................................... 13 
    3.1 

    Features .......................................................................................................... 13 
    3.1.1 

    Deviations Against AUTOSAR 4.0.3 ................................................. 13 
    3.1.1.1 
    Set Sleep Ready Bit ....................................................... 14 
    3.1.1.2 
    Nm_NetworkStartIndication as trigger for Coordinated 
    Shutdown Abortion ......................................................... 14 

    3.1.2 
    Additions/ Extensions ....................................................................... 14 
    3.1.2.1 

    Additional DET Error Codes ........................................... 14 
    3.1.2.2 
    Synchronization Timeout ................................................ 15 
    3.1.2.3 
    Configurable Notification Functions ................................ 15 
    3.1.2.4 
    Macro Layer Optimization .............................................. 15 
    3.1.2.5 
    Memory Initialization ...................................................... 15 
    3.1.2.6 
    Automatic Calculation of Shutdown Delay Timer ............ 15 
    3.1.2.7 
    Callback Nm_CoordReadyToSleepCancellation ............ 16 
    3.1.2.8 
    Passive Mode as Global Setting .................................... 16 
    3.1.2.9 
    BusNm Specific Pdu Rx Indication Support ................... 16 
    3.1.2.9.1 
    Macro Layer interaction with BusNm 
    Specific Pdu Rx Indication ......................... 17 

    3.1.3 
    Limitations ........................................................................................ 17 
    3.1.3.1 

    Multiple BusNms on One Channel ................................. 17 
    3.2 
    Basic Functionality ........................................................................................... 18 
    3.3 
    Support of Generic BusNm Modules ................................................................ 18 
    3.3.1 

    Creating a Generic BusNm or a Generic BusNm Wrapper ............... 18 
    3.3.1.1 
    Providing the Interfaces that are called by the Nm 
    module ........................................................................... 19 

    3.3.1.2 
    Implementing the functions called by Nm ....................... 20 
    3.4 
    Coordinator Functionality ................................................................................. 21 
    3.4.1 

    Coordinated Networks ...................................................................... 21 
    3.4.2 
    Shutdown Algorithm ......................................................................... 22 
    3.4.3 
    State Machine of Coordinator ........................................................... 24 
    3.4.4 
    Wake-up........................................................................................... 25 
    3.4.5 
    Sleep Master .................................................................................... 25 
    3.4.6 
    Wait Bus Sleep Extensions .............................................................. 25 
    3.4.6.1 
    CanNm and NmOsek on the same channel ................... 26 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.5 
    State Report ..................................................................................................... 26 
    3.6 
    Macro Layer Optimization ................................................................................ 26 
    3.7 
    Initialization ...................................................................................................... 26 
    3.8 
    Provision of the NM State ................................................................................ 27 
    3.8.1 

    Determining the NM State Using Nm_GetState ................................ 27 
    3.8.2 
    Using the ‘State Change Ind Enabled’ feature .................................. 27 
    3.9 
    Multiple BusNms on One Channel ................................................................... 27 
    3.9.1 
    Notification of Mode Changes in the BusNms .................................. 29 
    3.9.2 
    State Change Notifications ............................................................... 31 
    3.9.3 
    Remote Sleep Indication Statuses ................................................... 33 
    3.9.4 
    Other Aggregated Information and Caveats ..................................... 34 
    3.10 
    Main Functions ................................................................................................ 35 
    3.11 
    Error Handling .................................................................................................. 35 
    3.11.1 

    Development Error Reporting ........................................................... 35 
    3.11.2 
    Production Code Error Reporting ..................................................... 37 
    4 
    Integration ................................................................................................................... 38 
    4.1 

    Scope of Delivery ............................................................................................. 38 
    4.1.1 

    Static Files ....................................................................................... 38 
    4.1.2 
    Dynamic Files .................................................................................. 38 
    4.2 
    Include Structure .............................................................................................. 39 
    4.3 
    Critical Sections ............................................................................................... 40 
    4.3.1 

    Exclusive Area 0 .............................................................................. 40 
    4.3.2 
    Exclusive Area 1 .............................................................................. 41 
    5 
    API Description ........................................................................................................... 42 
    5.1 

    Type Definitions ............................................................................................... 42 
    5.2 
    Services Provided by Nm ................................................................................. 44 
    5.2.1 

    Nm_Init ............................................................................................ 44 
    5.2.2 
    Nm_PassiveStartUp ......................................................................... 45 
    5.2.3 
    Nm_NetworkRequest ....................................................................... 46 
    5.2.4 
    Nm_NetworkRelease ....................................................................... 47 
    5.2.5 
    Nm_DisableCommunication ............................................................. 48 
    5.2.6 
    Nm_EnableCommunication .............................................................. 49 
    5.2.7 
    Nm_SetUserData ............................................................................. 50 
    5.2.8 
    Nm_GetUserData ............................................................................ 51 
    5.2.9 
    Nm_GetPduData .............................................................................. 52 
    5.2.10 
    Nm_RepeatMessageRequest .......................................................... 53 
    5.2.11 
    Nm_GetNodeIdentifier ..................................................................... 54 
    5.2.12 
    Nm_GetLocalNodeIdentifier ............................................................. 55 
    5.2.13 
    Nm_CheckRemoteSleepIndication ................................................... 56 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.14 
    Nm_GetState ................................................................................... 57 
    5.2.15 
    Nm_GetVersionInfo .......................................................................... 58 
    5.2.16 
    Nm_MainFunction ............................................................................ 59 
    5.2.17 
    Nm_InitMemory ................................................................................ 60 
    5.3 
    Services Used by Nm ...................................................................................... 60 
    5.4 
    Callback Functions ........................................................................................... 61 
    5.4.1 

    Nm_NetworkStartIndication .............................................................. 61 
    5.4.2 
    Nm_NetworkMode ........................................................................... 62 
    5.4.3 
    Nm_BusSleepMode ......................................................................... 63 
    5.4.4 
    Nm_PrepareBusSleepMode ............................................................. 64 
    5.4.5 
    Nm_RemoteSleepIndication ............................................................. 65 
    5.4.6 
    Nm_RemoteSleepCancellation ........................................................ 66 
    5.4.7 
    Nm_SynchronizationPoint ................................................................ 66 
    5.4.8 
    Nm_<BusNm>_PduRxIndication ...................................................... 67 
    5.4.9 
    Nm_PduRxIndication ....................................................................... 68 
    5.4.10 
    Nm_StateChangeNotification ........................................................... 69 
    5.4.11 
    Nm_RepeatMessageIndication ........................................................ 70 
    5.4.12 
    Nm_TxTimeoutException ................................................................. 71 
    5.4.13 
    Nm_CarWakeUpIndication ............................................................... 72 
    5.4.14 
    Nm_CoordReadyToSleepIndication ................................................. 72 
    5.4.15 
    Nm_CoordReadyToSleepCancellation ............................................. 73 
    5.5 
    Callback Functions used by Nm ....................................................................... 73 
    5.6 
    Configurable Interfaces .................................................................................... 73 
    5.6.1 

    Notifications ..................................................................................... 73 
    5.6.1.1 
    UL_Nm_RemoteSleepIndication .................................... 74 
    5.6.1.2 
    UL_Nm_RemoteSleepCancellation ................................ 75 
    5.6.1.3 
    UL_Nm_PduRxIndication ............................................... 76 
    5.6.1.4 
    UL_Nm_BusNmSpecificPduRxIndication ....................... 77 
    5.6.1.5 
    UL_Nm_StateChangeNotification .................................. 78 
    5.6.1.6 
    UL_Nm_RepeatMessageIndication ................................ 79 
    5.6.1.7 
    UL_Nm_TxTimeoutException ........................................ 80 
    5.6.1.8 
    UL_Nm_CarWakeUpIndication ...................................... 81 
    6 
    Glossary and Abbreviations ...................................................................................... 82 
    6.1 

    Glossary .......................................................................................................... 82 
    6.2 
    Abbreviations ................................................................................................... 82 
    7 
    Contact ........................................................................................................................ 83 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 11 
    Figure 2-2 
    Interfaces to adjacent modules of the Nm ................................................. 12 
    Figure 3-1 
    State Machine of Coordinator ................................................................... 24 
    Figure 3-2 
    Left: Architectural View in AUTOSAR. Right: Network Topology with 
    multiple BusNms on one network .............................................................. 28 

    Figure 3-3 
    Not recommended use case having more than one node with multiple 
    BusNms on the network ............................................................................ 28 

    Figure 3-4 
    Unsupported use case having more than one node with multiple 
    BusNms .................................................................................................... 29 

    Figure 3-5 
    Mode Changes with two BusNms on one channel .................................... 30 
    Figure 3-6 
    State Machine of Remote Sleep callbacks for two BusNms on one 
    channel ..................................................................................................... 33 

    Figure 4-1 
    Include structure ....................................................................................... 39 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 9 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 13 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 13 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 14 
    Table 3-4  
    Configurable Notification Function Mapping .............................................. 15 
    Table 3-5 
    BusNm Shutdown Time Calculation .......................................................... 16 
    Table 3-6  
    Nm State Change Signal Values ............................................................... 26 
    Table 3-7  
    Overall State of two BusNms on one channel ........................................... 32 
    Table 3-8  
    Service IDs ............................................................................................... 36 
    Table 3-9  
    Errors reported to DET ............................................................................. 37 
    Table 4-1  
    Static files ................................................................................................. 38 
    Table 4-2  
    Generated files ......................................................................................... 38 
    Table 4-3  
    Exclusive Area 0 ....................................................................................... 40 
    Table 4-4  
    Exclusive Area 1 ....................................................................................... 41 
    Table 5-1  
    Type definitions ......................................................................................... 43 
    Table 5-2  
    Nm_Init ..................................................................................................... 44 
    Table 5-3  
    Nm_PassiveStartUp ................................................................................. 45 
    Table 5-4  
    Nm_NetworkRequest ................................................................................ 46 
    Table 5-5  
    Nm_NetworkRelease ................................................................................ 47 
    Table 5-6  
    Nm_DisableCommunication ..................................................................... 48 
    Table 5-7  
    Nm_EnableCommunication ...................................................................... 49 
    Table 5-8  
    Nm_SetUserData ..................................................................................... 50 
    Table 5-9  
    Nm_GetUserData ..................................................................................... 51 
    Table 5-10  
    Nm_GetPduData ...................................................................................... 52 
    Table 5-11  
    Nm_RepeatMessageRequest ................................................................... 53 
    Table 5-12  
    Nm_GetNodeIdentifier .............................................................................. 54 
    Table 5-13  
    Nm_GetLocalNodeIdentifier ...................................................................... 55 
    Table 5-14  
    Nm_CheckRemoteSleepIndication ........................................................... 56 
    Table 5-15  
    Nm_GetState ............................................................................................ 57 
    Table 5-16  
    Nm_GetNodeIdentifier .............................................................................. 58 
    Table 5-17  
    Nm_MainFunction .................................................................................... 59 
    Table 5-18  
    Nm_InitMemory ........................................................................................ 60 
    Table 5-19  
    Services used by the Nm .......................................................................... 61 
    Table 5-20  
    Nm_NetworkStartIndication ...................................................................... 61 
    Table 5-21  
    Nm_NetworkMode .................................................................................... 62 
    Table 5-22  
    Nm_BusSleepMode .................................................................................. 63 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Table 5-23  
    Nm_PrepareBusSleepMode ..................................................................... 64 
    Table 5-24  
    Nm_RemoteSleepIndication ..................................................................... 65 
    Table 5-25  
    Nm_RemoteSleepCancellation ................................................................. 66 
    Table 5-26  
    Nm_SynchronizationPoint ......................................................................... 66 
    Table 5-27  
    Nm_BusNmSpecificPduRxIndication ........................................................ 67 
    Table 5-28  
    Nm_PduRxIndication ................................................................................ 68 
    Table 5-29  
    Nm_StateChangeNotification .................................................................... 69 
    Table 5-30  
    Nm_RepeatMessageIndication ................................................................. 70 
    Table 5-31  
    Nm_TxTimeoutException .......................................................................... 71 
    Table 5-32  
    Nm_CarWakeUpIndication ....................................................................... 72 
    Table 5-33  
    Nm_CoordReadyToSleepIndication .......................................................... 72 
    Table 5-34  
    Nm_CoordReadyToSleepCancellation ...................................................... 73 
    Table 5-35  
    Callback Functions used by the Nm .......................................................... 73 
    Table 5-36  
    UL_Nm_RemoteSleepIndication ............................................................... 74 
    Table 5-37  
    UL_Nm_RemoteSleepCancellation .......................................................... 75 
    Table 5-38  
    UL_Nm_PduRxIndication.......................................................................... 76 
    Table 5-39  
    Standard Bus Nm Pdu Rx Indication ......................................................... 77 
    Table 5-40  
    UL_Nm_StateChangeNotification ............................................................. 78 
    Table 5-41  
    UL_Nm_RepeatMessageIndication .......................................................... 79 
    Table 5-42  
    UL_Nm_TxTimeoutException ................................................................... 80 
    Table 5-43  
    UL_Nm_CarWakeUpIndication ................................................................. 81 
    Table 6-1  
    Glossary ................................................................................................... 82 
    Table 6-2  
    Abbreviations ............................................................................................ 82 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component. 
    Component Version  New Features 
    1.00.00 
    Creation for AUTOSAR 4.0.1  
    2.00.00 
    Adaption for AUTOSAR 4.0.3 
    Added Coordinator Support 
    Added support for AUTOSAR Standard BusNms 
    3.00.00 
    Added Runtime Measurement Support 
    Added J1939Nm Support 
    3.01.00 
    Added Support for Multiple BusNms on one CAN channel 
    4.00.00 
    Added support for Variant Post-Build-Selectable 
    Added wake-up support for NM Coordinator 
    6.00.00 
    Added support for OSEK NM 
    7.00.00 
    Added support for BusNm Pdu-Rx indications 
    8.00.00 
    Added support for Class C and Class B BusNms 
    Added support for Nm Gateway Extensions 
    9.00.00 
    Adapter for Safe BSW feature. 
    10.00.00 
    Added support for Wait Bus Sleep Extension 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 

    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module Nm as specified in [1]. 
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile, post-build-selectable 
    Vendor ID: 
    NM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    NM_MODULE_ID  
    29 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation. 
     
     
    The Nm module acts as an adaptation layer between the AUTOSAR BSW module ComM 
    and  the  AUTOSAR  BSW  bus-specific  network  management  modules  (BusNm),  e.g. 
    CanNm.  Therefore  a  call  of  the  ComM  on  a  network  is  forwarded  to  the  corresponding 
    BusNm  on  this  network.  Callback  functions  from  a  BusNm  are  forwarded  to  the  ComM. 
    This functionality is also called ‘basic functionality’. 
    Beside  the  standard  BusNm  modules  defined  by  AUTOSAR,  the  Nm  module  can  also 
    support generic lower layer modules to allow the integration of OEM specific or legacy NM 
    components, e.g. OSEK NM (NmOsek). For this support it is required that the lower layer 
    modules implements the requirements for a generic BusNm. 
    Optionally  the  Nm  module  provides  a  coordination  algorithm  to  perform  a  synchronous 
    shutdown  handling  of  several  connected  networks  and/or  multiple  BusNms  on  one 
    channel. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    10 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    2.1 
    Architecture Overview 
    The following figure shows where the Nm is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    11 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    The next figure shows the interfaces to adjacent modules of the Nm. These interfaces are 
    described in chapter 5. 
    class Architecture
    ComM
    Bsw M
    ComM_Nm_API
    Nm_API
    Nm_API
    Com_API
    Det_API
    Com
    Nm
    Det
    «optional»
    «optional»
    Nm_Cbk_API
    Nm_Mainfunction
    BusNm_API
    SchM_Nm_API
    BusNm
    SchM
     
    Figure 2-2  Interfaces to adjacent modules of the Nm 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    12 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    Nm. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features 
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector  Informatik  provides  further  Nm  functionality  beyond  the AUTOSAR  standard. The 
    corresponding features are listed in the table 
    Table 3-3  
    Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Basic Functionality 
    Support of Generic BusNm Modules 
    Coordinator Functionality 
    State Report 
    MICROSAR Identity Manager using Post-Build Selectable 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations Against AUTOSAR 4.0.3 
    The following features specified in [1] are not supported: 
     
    Category 
    Description 
    ASR 
    Version 



    4.0.3 
    Table 3-2   Not supported AUTOSAR standard conform features 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    13 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.1.1.1 
    Set Sleep Ready Bit 
    According to [1], Sleep Ready Bit will be set before waiting for Synchronization Points. In 
    this implementation, Sleep Ready Bit will be set after a Synchronization Point appears. 
    3.1.1.2 
    Nm_NetworkStartIndication as trigger for Coordinated Shutdown Abortion 
    The function Nm_NetworkStartIndication is not a trigger for aborting a shutdown in the NM 
    Coordinator  algorithm  despite  the  requirements  in  [1].  The  NM  deviates  against  this 
    requirement, because it has been removed in newer versions of [1]. 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Additional DET Error Codes 
    Synchronization Timeout 
    Configurable Notification Functions 
    Macro Layer Optimization 
    Memory Initialization 
    Support for J1939Nm 
    Runtime Measurement Support 
    Automatic Calculation of Shutdown Delay Timer 
    Callback Nm_CoordReadyToSleepCancellation 
    Multiple BusNms on One Channel 
    Wake-up by Nm Coordinator 
    Passive Mode as Global Setting 
    BusNm Specific Pdu Rx Indication support 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.1.2.1 
    Additional DET Error Codes 
    The following error code is reported additionally to the errors defined in [1]: 
    >  NM_E_SYNCHRONIZATION_TIMEOUT: Nm_SynchronizationPoint was not 
    called within the configured synchronization timeout time. 
    >  NM_E_INVALID_STATE: An invalid/unexpected state transition has been passed to 
    Nm_StateChangeNotification (only available if the optimization for only one 
    BusNm on a channel is OFF) (e.g. transition from Normal Operation to Ready Sleep if 
    all BusNms are currently in Bus Sleep). 
    >  NM_E_SAME_STATES: The same states have been passed to 
    Nm_StateChangeNotification. 
    >  NM_E_FUNCTION_PTR_IS_NULL: The pointer that has been passed in order to call 
    a function is equals to NULL. (E.g. BusNm function in the generated function table). 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    14 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.1.2.2 
    Synchronization Timeout 
    If Nm Synchronizing Network is enabled, coordinator algorithm waits for a suitable point in 
    time  to  continue  shutdown  of  corresponding  networks.  If  such  a  point  is  never  reached, 
    coordination  algorithm  will  wait  forever.  To  prevent  this,  a  timeout  for  this  point  can  be 
    defined by setting the ‘Synchronization Timeout Time’. 
    3.1.2.3 
    Configurable Notification Functions 
    Some  of  the  callback  functions  provided  by  the  Nm  may  be  needed  by  upper  layers. 
    Therefore  the  Nm  was  extended  to  provide  a  configurable  notification  interface  where 
    those callbacks can be configured to be forwarded to another module. Therefore a name 
    has to be entered into the corresponding configuration parameter. 
    The following  table  shows  which  Nm  callbacks  can  be forwarded and  the  corresponding 
    configuration parameter where a function name has to be entered. 
    Nm Callback 
    Configuration Parameter 
    Nm_StateChangeNotification 
    State Change Indication Callback 
    Nm_RemoteSleepIndication 
    Remote Sleep Indication Callback 
    Nm_RemoteSleepCancellation 
    Remote Sleep Cancellation Callback 
    Nm_PduRxIndication 
    PDU Receive Indication Callback 
    Nm_RepeatMessageIndication 
    Repeat Message Indication Callback 
    Nm_TxTimeoutException 
    Transmission Timeout Error Callback 
    Nm_<Specific Standard BusNm>_PduRxIndication  Standard Bus Nm Pdu Rx Indication 
    Nm_<Specific Generic BusNm>_PduRxIndication 
    Generic Bus Nm Pdu Rx Indication 
    Table 3-4   Configurable Notification Function Mapping 
    Note that the prototypes for the forwarded functions must be provided by the module that 
    wants  to  implement  those  notifications.  Therefore  header  files  containing  the  prototype 
    definitions can be entered in the configuration. 
    The API prototype for these functions are described in chapter 5.6.1 ‘Notifications’. 
    3.1.2.4 
    Macro Layer Optimization 
    When having only one type of BusNm the Nm can be configured to be realized completely 
    as a macro layer to save resources (ROM, RAM and run-time). 
    For further information refer to chapter 3.6 ‘Macro Layer Optimization’. 
    3.1.2.5 
    Memory Initialization 
    Not every start-up code of embedded targets and neither CANoe provide initialized RAM. 
    It thus may happen that the state of a variable that needs initialized RAM may not be set to 
    the  expected  initial  value.  Therefore  an  explicit  initialization  of  such  variables  has  to  be 
    provided at start-up by calling the additional function Nm_InitMemory. 
    For more information refer to chapter 3.7 ‘Initialization’. 
    3.1.2.6 
    Automatic Calculation of Shutdown Delay Timer 
    The shutdown delay timer is determined automatically. Therefore, the shutdown time of the 
    corresponding  BusNm  is  calculated  and  cannot  be  set  by  the  user.  The  computation 
    formula for each type is listed in the following table. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    15 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    NM Type 
    Shutdown Time 
    CAN Nm 
    CanNmWaitBusSleepTime1 + CanNmTimeoutTime1 
    FlexRay Nm 
    ((FrNmReadySleepCnt2 + 2) * FrNmRepetitionCycle3 * FrCycleTime4 ) 
    Udp Nm 
    UdpNmWaitBusSleepTime1 + UdpNmTimeoutTime1 
    Lin Nm 

    Generic Nm 
    Value of GenericBusNmShutdownTime1 
    Table 3-5 
    BusNm Shutdown Time Calculation 
    If BusNm is a Generic Nm, Generic Bus Nm Shutdown Time is used. The shutdown time is 
    subtracted from the Global Coordinator Time and the result is used as the shutdown delay 
    timer. 
    3.1.2.7 
    Callback Nm_CoordReadyToSleepCancellation 
    When  the  NM  Coordinator  Sleep  Ready  Bit  in  the  Control  Bit  Vector  is  set,  the 
    corresponding  BusNm  sets  an  indication  and  coordination  algorithm  assumes  that  the 
    corresponding  network  is  ready  to  sleep.  But  when  the  Sleep  Ready  Bit  is  not  set 
    anymore,  and  therefore  the  network  is  not  ready  to  sleep  anymore,  there  is  no 
    indication/cancellation according to [1]. For this reason, this callback is introduced. 
    For further information refer to chapter 5.4.15 ‘Nm_CoordReadyToSleepCancellation’. 
    3.1.2.8 
    Passive Mode as Global Setting 
    The setting ‘Passive Mode Enabled’ can either be configured for each NM channel (note: 
    the BusNm setting is globally) or globally for all channels. 
    The possibility to configure this setting for each channel exists due to the requirements in 
    [1];  however  newer  versions  of  [1]  have  moved  the  ‘Passive  Mode  Enabled’  setting  to a 
    global configuration container so that this setting is applied for the whole ECU. 
    The  NM  module  supports  both  possibilities,  but  the  parameter  may  either  only  exist  in 
    every channel configuration container or exist in the global container. 
    3.1.2.9 
    BusNm Specific Pdu Rx Indication Support 
    The  setting  ‘Bus  Nm  Specific  Pdu  Rx  Indication  Enabled’  allows  the  generation  of  a 
    BusNm  specific  callback  that  shall  be  called  by  the  BusNm  upon  reception  of  the 
    RxNmPdu. This function is called to notify the reception of a NmPdu in order to distinguish 
    between each BusNm on the same channel (Multiple BusNms on a Channel, chapter 3.9) 
    by using different identifiers for each BusNm. 
    Any function can be configured that shall be called on NM PDU reception. 
    Please note that this feature is relevant for rare cases. 
                                                
    1 In the 'Wait Bus Sleep Extensions' feature is activated and in presence of NmOsek BusNm, the NM 
    coordination algorithm permits two different shut-down times, depending on the NmOsek state (Normal or 
    LimpHome), this times are calculated during run time. Refer to chapter 3.4.6 for more information. 
      In all cases the timing value given in s. 
    2 Ready Sleep Counter is given in number of Repetition Cycles. 
    3 Repetition Cycle is given in number of FlexRay Cycles 
    4 FlexRay Cycle Time (duration of one FlexRay cycle) given in ms. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    16 
    based on template version 4.8.0 





    Technical Reference MICROSAR Network Management Interface 
     
     
    Example 

       In a setup with one channel equipped with CanNm and NmOsek on the same channel, 
    a distinction of which BusNm has received a NM PDU cannot be made by the 
    NmPduReceiveIndCallback, since the provided Network Handle is the same. 
    Therefore, for a distinction, define the parameter ‘Standard Bus Nm Pdu Rx Indication’ 
    to a certain value for CanNm and the ‘Generic Bus Nm Pdu Rx Indication’ for the 
    NmOsek to yet another certain value. 
     
     
     
     
     
    Note 

       Use case not needed if, for example:  
    In a setup with two channels, one of them equipped with CanNm, the other one 
    equipped with FrNm, there is no distinction required between the BusNms, because the 
    Network Handle parameter is different for each channel. 
    Therefore it suffices to use ‘Pdu Rx Indication Enabled’ with ‘Pdu Receive Ind 
    Callback’. (see also chapter 5.4.9 and 5.6.1.3)
     
     
     
     
     
    Caution 
    ‘Bus Nm Specific Pdu Rx Indication Support’ cannot be turned on if ‘Standard Bus 
      Type’ is not equal to NM_BUSNM_CANNM. This functionality works only for CAN 
    channels. 
     
     
    It is not necessary to configure the function if there is only one BusNm on the channel. The 
    ‘Pdu  Receive  Ind  Callback’  (See  chapter  5.4.9)  can  be  used  as  an  alternative  for  this 
    purpose. 
    3.1.2.9.1 
    Macro Layer interaction with BusNm Specific Pdu Rx Indication 
    It is possible to use ‘Bus Nm Specific Pdu Rx Indication’ with the Macro Layer optimization 
    active. 
    The  BusNm  should  call  Nm_<BusNm>_PduRxIndication  which  is  a  macro  definition  in 
    Nm_Cfg.h,  therefore,  at  most  one  upper  layer  BusNm  Specific  Pdu  Rx  Indication  is 
    allowed if 'Macro Layer Enabled' is turned ON. 
    3.1.3 
    Limitations 
    3.1.3.1 
    Multiple BusNms on One Channel 
    There are several restrictions for multiple BusNms on one channel: 
    The  BusNms  on  one  channel  are  either  coordinated  completely  actively  or  passively  on 
    one node. 
    Multiple BusNms on one channel can only be used on CAN channels. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    17 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    The  NM  Coordinator  needs  to  be  activated  if  at  least  one  channel  exists  that  contains 
    more  than  one  BusNm.  The  channel  can  however  be  inside  a  coordination  cluster  that 
    contains multiple channels or can form a coordination cluster on its own. This implies that, 
    if the channel is coordinated actively by the node, the node is the last one that withdraws 
    its communication request. 
    Furthermore, it is required that the BusNms either call the required functions for an active 
    coordination  (Nm_RemoteSleepIndication,  Nm_RemoteSleepCancellation)  /  passive 
    coordination  (Nm_CoordReadyToSleepIndication,  Nm_CoordReadyToSleepCancellation) 
    or that the BusNm is a Channel Sleep Master, i.e. other nodes cannot keep the bus awake 
    while the own node is ready to sleep. 
    Passive Mode can only have the same value for all BusNms on a channel. 
    The feature ‘State Report Enabled’ only reports the aggregated state (numerically highest 
    state is considered as current state) of all BusNms on a channel to a Com signal. 
    If  ‘Synchronized  Network’  is  enabled,  it  is  only  waited  for  one  function  call  of 
    Nm_SynchronizationPoint  by  one  of  the  BusNms  until  the  Shutdown  Delay  Timers  are 
    started. 
    Many service functions aggregate data retrieved from the BusNms in a manner that is not 
    useful for the application (see also chapter 3.9.4). 
    3.2 
    Basic Functionality 
    The  Nm  module  is  a  bus-independent  adaptation  layer  between  the  ComM  module  and 
    the  bus-specific  network  management  modules  (e.g.  CanNm,  FrNm,  LinNm,  UdpNm  or 
    J1939Nm).  Therefore  it  forwards  function  calls  from  the  ComM  module  to  the 
    corresponding bus-specific network management and vice versa. 
    Further details can be found in [1]. 
    The API description can be found in chapter 5 ‘API Description’. 
    3.3 
    Support of Generic BusNm Modules 
    Beside  the  bus-specific  network  management  modules  defined  by  AUTOSAR  the  Nm 
    module  is  able  to  support  further  OEM-specific  or  legacy  Nm  modules  if  they  fulfill  the 
    requirements for generic BusNm modules. This means that such modules have to provide 
    the  same  APIs  as  the  standard  BusNm  modules  but  with  an  own  prefix.  Also  these 
    modules have to take care about the Nm module configuration. 
    3.3.1 
    Creating a Generic BusNm or a Generic BusNm Wrapper 
    If a Generic BusNm needs to be created or a legacy Nm module needs to be wrapped by 
    Generic BusNm interfaces, the following (not necessarily complete) list of aspects has to 
    be considered: 
    >  The Generic BusNm interfaces that are called by the Nm module have to be provided 
    by the <GenericBusNmPrefix>.h. The <GenericBusNmPrefix> has to be configured in 
    the configuration tool in the Nm module. This parameter determines the header file 
    name as well as the prefix of the APIs called by the Nm module. 
    >  At least the interface of Nm concerning the current mode (Nm_NetworkMode / 
    Nm_BusSleepMode and optionally Nm_PrepareBusSleepMode has to be used). 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    18 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    >  If the Generic BusNm sends or receives messages, the corresponding Bus Interface 
    module (e.g. CanIf) has to be configured to forward the RxIndication / TxConfirmation 
    towards the Generic BusNm and to have the possibility to use <BusIf>_Transmit. 
    The  last  aspect  is  not  covered  by  this  document, because  this document  describes  only 
    the aspects of the NM Interface module. 
    3.3.1.1 
    Providing the Interfaces that are called by the Nm module 
    The <GenericBusNmPrefix>.h needs to provide the following function declarations: 
    >  <GenericBusNmPrefix>_PassiveStartUp 
    >  <GenericBusNmPrefix>_NetworkRequest5 
    >  <GenericBusNmPrefix>_NetworkRelease5 
    >  <GenericBusNmPrefix>_EnableCommunication6 
    >  <GenericBusNmPrefix>_DisableCommunication6 
    >  <GenericBusNmPrefix>_SetUserData7 
    >  <GenericBusNmPrefix>_GetUserData8 
    >  <GenericBusNmPrefix>_GetPduData9 
    >  <GenericBusNmPrefix>_RepeatMessageRequest10 
    >  <GenericBusNmPrefix>_GetNodeIdentifier11 
    >  <GenericBusNmPrefix>_GetLocalNodeIdentifier11 
    >  <GenericBusNmPrefix>_CheckRemoteSleepIndication12 
    >  <GenericBusNmPrefix>_GetState 
    >  <GenericBusNmPrefix>_RequestBusSynchronization13 
    >  <GenericBusNmPrefix>_SetSleepReadyBit14 
    It  is  recommended  to  copy  the  function  prototypes  from  Nm.h  and  replace  the  compiler 
    abstraction  and  memory  mapping  parts  to  the  sections/keywords  of  NM  to 
    <GENERICBUSNMPREFIX>. 
    Since 
    there 
    are 
    no 
    prototypes 
    of 
    Nm_RequestBusSynchronization and  Nm_SetSleepReadyBit,  an example  header for  the 
    exemplary  Generic  Bus  Nm  ‘SpecialBusNm’ is  provided  for  these function  prototypes  as 
                                                
    5 Function is only required if ‘Passive Mode Enabled’ is OFF in the Nm channel/module configuration settings 
    6 Function is only required if ‘Com Control Enabled’ is ON in the Nm module configuration settings 
    7 Function is only required if ‘User Data Enabled’ is ON, ‘Passive Mode Enabled’ is OFF, ‘Com User Data 
    Support’ is OFF in the Nm module configuration settings 
    8 Function is only required if ‘User Data Enabled’ is ON in the Nm module configuration settings 
    9 Function is only required if ‘Node Id Enabled’ is ON or ‘User Data Enabled’ is ON in the Nm module 
    configuration settings 
    10 Function is only required if ‘Node Detection Enabled’ is ON in the Nm module configuration settings 
    11 Function is only required if ‘Node Id Enabled’ is ON in the Nm module configuration settings 
    12 Function is only required if ‘Remote Sleep Ind Enabled’ is ON in the Nm module configuration settings 
    13 Function is only required if ‘Bus Synchronization Enabled’ is ON in the Nm module configuration settings 
    14 Function is only required if ‘Passive Mode Enabled’ is OFF in the Nm channel/module configuration 
    settings and if ‘Coordinator Sync Support’ is ON in the Nm module configuration settings 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    19 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    follows.  Note  that  Compiler_Cfg.h  has  to  be  extended  by  the  SPECIALBUSNM_CODE 
    keyword and MemMap.h has to be adapted by the SPECIALBUSNM_START_SEC_CODE 
    / SPECIALBUSNM_STOP_SEC_CODE section begin/end parts. 
     
     
     
    Example 
    If a Generic Bus Nm called ‘SpecialBusNm’ needs to be implemented, a header file 
      called ‘SpecialBusNm.h’ also needs to be provided. Note that this header does not 
    contain all prototypes, only those that cannot be derived from the prototypes of Nm.h. 
    #if !defined(SPECIALBUSNM_H) 
    #define SPECIALBUSNM_H 
     
    #include "Nm_Cfg.h" 
     
    #define SPECIALBUSNM_START_SEC_CODE 
    #include "MemMap.h" 
     
    /* Insert other function prototypes like 
     * SpecialNm_PassiveStartUp here... 
     */ 
     
    #if (NM_BUS_SYNCHRONIZATION_ENABLED == STD_ON) 
    extern FUNC(Std_ReturnType, SPECIALBUSNM_CODE) 
    SpecialBusNm_RequestBusSynchronization 
    ( CONST( NetworkHandleType, AUTOMATIC ) nmNetworkHandle ); 
    #endif 
     
    #if (NM_PASSIVE_MODE_ENABLED == STD_OFF) && \ 
        (NM_COORDINATOR_SYNC_SUPPORT == STD_ON) 
    extern FUNC(Std_ReturnType, SPECIALBUSNM_CODE) 
    GenericBusNm_SetSleepReadyBit 
    (CONST(NetworkHandleType, AUTOMATIC) nmNetworkHandle, 
    CONST(boolean, AUTOMATIC) nmSleepReadyBit); 
    #endif 
     
    #define SPECIALBUSNM_STOP_SEC_CODE 
    #include "MemMap.h" 
     
    #endif 
     
     
    3.3.1.2 
    Implementing the functions called by Nm 
    As  next  step,  implement  these  functions  in  a  C  file  of  the  application  that  includes 
    <GenericBusNm>.h. As a minimum requirement, 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    20 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    >  <GenericBusNm>_PassiveStartUp 
    >  <GenericBusNm>_NetworkRequest 
    >  <GenericBusNm>_NetworkRelease 
    >  <GenericBusNm>_GetState 
    should be implemented. 
    It is useful to use a variable of the Nm_StateType that holds the current state towards the 
    NM Interface. 
    When  the  <GenericBusNm>  is  asleep,  <GenericBusNm>_PassiveStartUp  and/or 
    <GenericBusNm>_NetworkRequest  have  been  called,  this  should  lead  to  a  call  of 
    Nm_NetworkMode  (not  necessarily  in  the  context  of  these  function,  may  be  delayed). 
    When  <GenericBusNm>  is  not  asleep  (i.e.  Nm_NetworkMode  has  been  called), 
    Nm_BusSleepMode  may  only  be  called  if  there  is  no  network  request  (i.e. 
    <GenericBusNm>_NetworkRelease 
    has 
    been 
    called 
    after 
    <GenericBusNm>_NetworkRequest  or  only  <GenericBusNm>_PassiveStartUp  led  to  the 
    call of Nm_NetworkMode). 
    The usage of 
    >  Nm_BusSleepMode 
    >  Nm_NetworkMode 
    is mandatory for a Generic BusNm. The usage of the other callback functions (see chapter 
    5.4) is optional. 
    If 

    legacy 
    module 
    is 
    wrapped, 
    the 
    <GenericBusNm>_PassiveStartUp, 
    <GenericBusNm>_NetworkRequest,  <GenericBusNm>_NetworkRelease  functions  (and 
    eventually other <GenericBusNm> functions called by Nm) probably need to call a function 
    of  the  legacy  module.  Vice  versa,  if  the  legacy  module  wants  to  notify  a  higher  module, 
    these callbacks need to be implemented by <GenericBusNm> and to be forwarded to the 
    Nm callbacks (e.g. Nm_BusSleepMode, Nm_NetworkMode). 
    3.4 
    Coordinator Functionality 
    The  coordinator  functionality  can  be  used  to  shut  down  two  or  more  networks 
    synchronously. The coordination algorithm keeps all networks of a coordinator awake  as 
    long as at least one network is not ready to sleep. When all networks are ready to sleep, 
    synchronous shutdown will start. 
    The  coordinator  can  also  be  used  to  coordinate  the  usage  of  multiple  BusNms  on  one 
    network. 
    3.4.1 
    Coordinated Networks 
    An ECU can have multiple, independent coordinators as long as every coordinator has at 
    least two networks (or at least two BusNms one network). Not every network of an ECU 
    must be part of a coordinator. 
    A  network,  which  shall  be  part  of  a  coordinator,  must  have  a  configured  ‘Coordinator 
    Cluster Index’. This index identifies the coordinator which is associated to the network. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    21 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    Furthermore,  a  coordinated  network  can  either  be  an  active  or  a  passive  one.  On  an 
    actively coordinated network, the current ECU is the last ECU which releases the Network. 
    As long as any other ECU  requests  the network, the current ECU requests  the network, 
    too.  
     
     
    Caution 
    A network should only have one active coordinator! 
      If there were two or more active coordinators on one network, no ECU would enter 
    sleep because the coordinators keep awake each other. 
     
     
    Additionally, an actively coordinated network is kept awake as long as any other network of 
    the same coordinator is requested.  
    If  a  coordinated network  is  not  an  active  one,  it  is  automatically  a  passively  coordinated 
    network. Passively coordinated networks are kept awake when a local request exists or as 
    long as at least one actively coordinated network of the same coordinator is requested. 
    3.4.2 
    Shutdown Algorithm 
    The  coordinator  algorithm  checks  the  communication  status  of  all networks  belonging  to 
    the same coordinator. Communication is required as long as a local or a remote request is 
    present.  A  local  request  means,  that  Nm_NetworkRequest()  was  called  and 
    Nm_NetworkRelease()  was  not  called  yet.  For  an  actively  coordinated  network  a 
    remote  request  is  assumed  as  long  as  no  call  of  Nm_RemoteSleepIndication() 
    indicates that network is ready to sleep.  Nm_RemoteSleepCancellation() restores a 
    remote  request.  Nm_CoordReadyToSleepIndication()  and  Nm_CoordReady-
    ToSleepCancellation() are the counterpart of passively coordinated networks.  
    When  no  communication  request  for  actively  coordinated  networks  is  present,  shutdown 
    algorithm  starts.  Therefore,  BusNm_NetworkRelease()  will  be  called  on  passively 
    coordinated networks if there is no local communication request present anymore. As soon 
    as an actively  coordinator on a remote ECU determines that no other ECU requests the 
    network, it will locally initiate its shutdown algorithm. Hence, remaining ECUs do not have 
    a remote communication request on its passively coordinated channels and can continue 
    the shutdown procedure. 
    If  one  of  the  networks  belonging  to  the  coordinator  is  awake  and  is  a  synchronizing 
    network, the shutdown algorithm waits for a suitable point in time to continue the shutdown 
    procedure. This point is indicated by Nm_SynchronizationPoint(). 
    If  no  synchronizing  network  is  available  or  the  synchronization  point  has  occurred,  a 
    network-specific  delay  time  starts  for  each  actively  coordinated  network.  The  timing  is 
    predetermined  and  depends  on  the  Global  Coordination  Delay  Time  and  the  network-
    specific shutdown time (refer to chapter 3.1.2.6 ‘Automatic Calculation of Shutdown Delay 
    Timer’ 
    for more information). In case the network has NmOsek and all NmOsek members 
    are  in  “Normal  State”  the  shutdown  delay  time  is  calculated  differently.  (refer  to  chapter 
    3.4.6  ‘Wait  Bus  Sleep  Extension’)  Additionally,  the  Sleep  Ready  Bit  is  set  by  calling  the 
    corresponding BusNm_SetSleepReadyBit() function. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    22 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    When  a  timer  of  a  network  expires,  this  network  will  be  released  by  calling  the 
    corresponding  BusNm_RequestBusSynchronization()  and  BusNm_Network-
    Release() function. 
    Finally,  when  all  timers  are  expired  and  every  network  has  notified  Bus  Sleep,  the 
    coordinator is shut down. 
    If the coordinator detects any need for communication during the shutdown procedure, the 
    algorithm  ensures  that  all  not  sleeping  networks  are  restarted  again.  Additionally,  on 
    actively  coordinated networks, the Sleep Ready Bit will be set  back.  For  networks which 
    are already asleep ComM_Nm_RestartIndication() will be called. 
     
     
     
    Caution 
    When a new request on a network occurs and coordinator is already shut down, neither 
      a restart nor an indication will be invoked on networks belonging to the same 
    coordinator. 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    23 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.4.3 
    State Machine of Coordinator 
     stm Cooordinator
    for each coordinated netw ork
    Bus_Sleep
    Nm_NetworkMode()
    Nm_NetworkMode()
    [Nm_NetworkRequest() c alled]
    [Nm_PassiveStartup() c alled]
    Nm_NetworkRelease()
    [Nm_RemoteSleepIndic ation() &&
    Nm_CoordReadyToSleepIndic ation()
    Bus_Aw ake 
    Bus_Aw ake 
    not c alled]
    Remote_Request
    Local_Request
    Nm_NetworkRequest()
    Nm_RemoteSleepCanc ellation(),
    Nm_NetworkRequest()
    Nm_CoordReadyToSleepCanc ellation()
    Nm_NetworkRelease()
    Nm_CoordReadyToSleepIndic ation(),
    [Nm_RemoteSleepIndic ation() ||
    Nm_RemoteSleepIndic ation()
    Nm_CoordReadyToSleepIndic ation()
    c alled]
    Ready_To_Sleep
    Nm_BusSleepMode()
    for each coordinator
    Nm_NetworkMode()  [on any network if
    Timer Expired
    Every network is in
    Shut Dow n
    NmCoordinatorRequestChannelsInBusSleep
    Netw ork Requested
    BusSleep
    == false]
    Abort [NmCoordinatorRequestChannelsInBusSleep == true]
    All Bus Timer
    Abort
    /Nm_NeworkRequest() on
    expired
    not sleeping networks &&
    ComM_RestartIndic ation
    on sleeping networks
    Timer not expired
    /Dec rease timer
    Abort=
    Nm_PassiveStartUp() 
    Wait For Timers
    Abort Shutdow n
    || Nm_NetworkRequest()
    || Nm_NetworkMode()
    Abort
    || Nm_RemoteSleepCancellation()
    || Nm_CoordReadyToSleepCancellation()
    all ac tive c oordinated
    networks are
    Ready_To_Sleep ||
    Bus_Sleep
    Timer of network expired
    /BusNm_NetworkRelease()
    /BusNm_RequestBusSync hronization()
    Abort
    for all networks whic h are in
    & BusNm_NetworkRelease()
    Remote_Request
    Wait For Sync
    Abort
    /start timers &&
    set ready sleep bit on
    Abort
    ac tive c oordinated
    networks
    Nm_Sync hronizationPoint()
    all passive c oordinated networks are
    Ready_To_Sleep || Bus_Sleep [any awake
    network is a sync hronizing network]
    Start Timers
    Netw ork Passiv ed 
    Released
    all passive c oordinated networks are Ready_To_Sleep ||
    Bus_Sleep [no awake network is a sync hronizing network]
    Network c hanges state from Loc al_Request to Remote_Request
    /BusNm_NetworkRelease()
     
     
    Figure 3-1  State Machine of Coordinator 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    24 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    3.4.4 
    Wake-up 
    The  wake-up  of  networks  is  outside  the  scope  of  the  Nm  according  to  AUTOSAR, 
    independent of coordinator support being enabled or not. Further details can be found in 
    [1]. 
     
     
     
    Note 
    ComM can be configured to automatically start all networks when one network is 
      requested (Synchronous Wake-up). 
     
     
     
    However,  the  NM  Coordinator  can  also  be  used  to  indicate  to  ComM  via 
    ComM_Nm_RestartIndication  that  an  asleep  network  should  be  requested  in  the 
    coordinator  state  ‘Shut  Down’  (see  Figure  3-1).  This  requires  the  configuration  setting 
    ‘Coordinator Request Channels In Bus Sleep’ to be turned ON. 
    Thus  an alternative  way of  waking up networks synchronously can be realized:  if one of 
    the  networks  that  is  inside  a  coordinator  cluster  is  woken  up  by  bus  or  is  requested  by 
    ComM while the NM Coordinator is in the ‘Shut Down’ state, all networks are woken up in 
    the  coordinator  cluster.  So  this  feature  permits  the  NM  coordinator  to  wake  up  only  the 
    channels  in  one  NM  coordinator  cluster,  not  every  communication  channel  like 
    ‘Synchronous Wake-up’ of ComM does. 
    If  the  configuration  setting  ‘Coordinator  Request  Channels  In  Bus  Sleep’  is  not  ON,  this 
    behavior is disabled. 
    3.4.5 
    Sleep Master 
    If a coordinated network is a Sleep Master, the current ECU can absolutely decide when to 
    shut down this network. Therefore, the coordinator assumes that this bus is always ready 
    to sleep when no local request exists and does not evaluate the remote sleep indication 
    status. 
    3.4.6 
    Wait Bus Sleep Extensions 
    Within NM Coordination, the shutdown time of each BusNm is considered as a static time 
    and therefore generated into constant arrays. 
    However,  the feature  'Wait  Bus Sleep Extensions'  permits NmOsek to have two different 
    shutdown  times.  Thus,  the  NM  Coordination  algorithm  needs  to  decide  during  run-time 
    which  of the two shutdown  times will be applied by NmOsek depending on the status of 
    NmOsek (either Normal or LimpHome). 
    When at least one of the NmOsek BusNms is in 'LimpHome' status, the regular shut down 
    time is used. 
    On the other hand, when the NmOsek BusNms are in 'Normal' status on every channel, a 
    shorter shut down timer is used. The timer calculation is realized by Nm and it depends on 
    the configured NmGenericBusNmShutdownTime
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    25 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.4.6.1 
    CanNm and NmOsek on the same channel 
    CanNm behaves differently regarding its shutdown time if NmOsek is located on the same 
    channel and if Wait Bus Sleep Extensions are  turned ON  [6]. This  is also  considered by 
    the Nm code generator for the shutdown delay timer calculation. 
    3.5 
    State Report 
    The feature ‘State Report’ writes state change notifications  about a network as bit-coded 
    values in a configured Com signal for every network which has enabled the feature. 
    The  following  table  provides  all  state  changes  (from  previous  state  to  current  state)  and 
    the corresponding signal values that are set by the NM Interface. 
    Previous State 
    Current State 
    Signal Value 
    Bus Sleep Mode15 
    Repeat Message 

    Prepare Bus Sleep Mode16 
    Repeat Message 

    Repeat Message 
    Normal Operation 

    Ready Sleep 
    Normal Operation 

    Ready Sleep 
    Repeat Message 
    16 
    Normal Operation 
    Repeat Message 
    32 
    Table 3-6   Nm State Change Signal Values 
    3.6 
    Macro Layer Optimization 
    The Nm module  implementation can be optionally  configured  to be only a macro layer if 
    only one BusNm type is used. All function calls beside Nm_GetVersionInfo() are then 
    realized  as  preprocessor  defines  that  forward  the  calls  directly  to  calls  of  the 
    corresponding  BusNm  module.  Also  all  callback  functions  from  the  BusNm  module  are 
    redefined directly to callbacks to the upper layer (e.g. ComM). 
    3.7 
    Initialization 
    Before  calling  any  other  functionality  of  the  Nm  module  the  initialization  function 
    Nm_Init()has to be called by the application. The initialization call shall take place after 
    initializing the BusNm modules and prior to the initialization of the ComM module. 
    For API details refer to chapter 5.2.1 ‘Nm_Init’. 
    The Nm module assumes that some variables are initialized with certain values at start-up, 
    if the feature ‘Macro Layer Optimization’ is disabled and ‘Coordinator Support’ is enabled. 
    As not all embedded targets support the initialization of RAM within the start-up code the 
    Nm module provides the function Nm_InitMemory(). This function has to be called  during 
    start-up and before Nm_Init() is called. Refer also to chapter 3.1.2.5 ‘Memory Initialization’. 
    For API details refer to chapter 5.2.17 ‘Nm_InitMemory’. 
                                                
    15 As FlexRay NM does not perform a transition directly from Bus Sleep Mode to Repeat Message State the 
    value is set in the transition from Synchronize Mode to Repeat Message State. 
    16 This transition is not available for FlexRay NM. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    26 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.8 
    Provision of the NM State 
    The NM State can be determined either by using the function Nm_GetState() (see also 
    chapter  5.2.14)  or  by  activating  the  feature  ‘State  Change  Ind  Enabled’.  Both  of  these 
    features are implemented according to [1]. 
    Note that the NM state may also be optionally reported into Com signals using the ‘State 
    Report Enabled’ feature (refer to chapter 3.5 for details). 
    3.8.1 
    Determining the NM State Using Nm_GetState 
    If Nm_GetState() (see also chapter 5.2.14) has been called, the current NM state and 
    the  current  NM  mode  of  the  bus-specific  Nm  (e.g.  CanNm,  FrNm)  associated  with  the 
    system  channel  index  nmChannelHandle  are  written  to  the  passed  pointer  variables. 
    Possible state and mode values that are returned into these variables can be seen in the 
    definition of Nm_StateType / Nm_ModeType in NmStack_Types.h. 
    3.8.2 
    Using the ‘State Change Ind Enabled’ feature 
    The ‘State Change Ind Enabled’ feature enables a callback that is called each time the NM 
    state  has  been  changed.  To  use  this  feature,  activate  the  ‘State  Change  Ind  Enabled’ 
    setting in configuration. Furthermore, enter the name of the function that shall be called in 
    case of a NM state change into the ‘State Change Ind Callback’ field and provide the file 
    name of the header file that contains the function prototype  of this function as one of the 
    ‘Callbacks Prototype Header’ setting. 
    Note that the function prototype of the function given in ‘State Change Ind Callback’ has to 
    be  the  same  as  (except  the  function  name)  Nm_StateChangeNotification  (refer  to 
    chapter 5.4.10 for details). 
    3.9 
    Multiple BusNms on One Channel 
    The Nm module provides the possibility to support multiple BusNms on one channel (e.g. 
    CanNm  and  J1939Nm,  see  Figure  3-2  Left).  That  means  that  there  can  be  several  NM 
    algorithms running on one network and they can be coordinated by one node (see Figure 
    3-2 
    Right). 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    27 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
     cmp CanNm and J1939Nm on one channel
     obj ect Netw ork View
    ComM
    Equipped with CanNm
    Equipped with CanNm 
    and proprietary BusNm 
    (Generic BusNm)
    Nm
    ECU 1
    ECU 2
    ECU 5
    CAN
    CanNm
    J1939Nm
    ECU 3
    ECU 4
    CanIf
    Equipped with proprietary BusNm (Generic BusNm)
     
     
    Figure 3-2  Left: Architectural View in AUTOSAR. Right: Network Topology with multiple BusNms on one network 
    In  the  bus  topology  example  (Figure  3-2  Right),  two  ECUs  are  equipped  with  CanNm 
    (ECU  1,  ECU  2)  and  two  other  ECUs  (ECU  3,  ECU  4)  are  equipped  with  a  proprietary 
    BusNm. ECU 5 is equipped with both BusNms (CanNm and the proprietary one). 
    To  realize  the  functionality  of  ECU  5,  this  feature  can  be  used.  It  requires  the  NM 
    Coordinator to be used. 
    There should be only one node that has multiple BusNms on the network (ECU 5 in this 
    example).  If  there  is  more  than  one  node,  only  one  of  the  nodes  that  have  multiple 
    BusNms is allowed to be coordinated actively (thus the other nodes with multiple BusNms 
    need to be coordinated passively, Figure 3-3). This use case is not recommended. 
     obj ect Netw ork View  of not recommended use case
    Equipped with CanNm
    Equipped with CanNm 
    Equipped with CanNm 
    and proprietary BusNm 
    and proprietary BusNm 
    (passively coordinated)
    ECU 1
    ECU 2
    (actively coordinated)
    ECU 5
    ECU 6
    ECU 3
    ECU 4
    Equipped with proprietary BusNm
     
    Figure 3-3  Not recommended use case having more than one node with multiple BusNms on the network 
    Even  worse  would  be  a  setup  with  three  different  types  of  BusNms  (e.g.  CanNm, 
    proprietary BusNm Type 1, and proprietary BusNm Type 2) without having one node that 
    provides all three types of BusNms. Instead there could be two nodes having two BusNms 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    28 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    of a certain type, for instance one having the two first types and the other having the last 
    two types (Figure 3-4). Such setups are not supported! 
     obj ect Netw ork View  of not supported use case
    Equipped with CanNm
    Equipped with CanNm 
    ECU 1
    ECU 2
    ECU 3
    and proprietary BusNm 
    (Type 2)
    ECU 7
    ECU 8
    Equipped with 
    proprietary BusNm 
    (Type 2)
    ECU 4
    ECU 5
    ECU 6
    Equipped with CanNm 
    and proprietary BusNm 
    (Type 1)
    Equipped with proprietary BusNm (Type 1)
     
    Figure 3-4  Unsupported use case having more than one node with multiple BusNms 
     
     
     
    Caution 
    Currently, multiple BusNms are only supported on CAN channels. 
     
     
     
     
    The following sections explain the basic principles how information is exchanged between 
    the BusNms, Nm and the upper layers. 
    3.9.1 
    Notification of Mode Changes in the BusNms 
    The  BusNms  notify  the  Nm  module  about  changes  in  their  modes  (Bus  Sleep  Mode, 
    Prepare Bus Sleep Mode, Network Mode). 
    This mode is notified towards ComM. If multiple BusNms are configured on one channel, 
    the modes need to be aggregated before  ComM is notified. In other words, the ‘highest’ 
    mode of all BusNms on a channel needs to be determined before ComM is notified about 
    mode changes. The set  of modes of  all BusNms on a channel is an unordered one (the 
    order does not matter to Nm). 
    The  mode  requests  (Nm_PassiveStartUp,  Nm_NetworkRequest,  Nm_NetworkRelease) 
    are  propagated  towards  the  BusNm  by  the  NM  Coordinator  (refer  to  chapter  3.4  for 
    details). 
    Figure 3-5 provides an example of two BusNms on one channel. The encoding of the sub-
    states  ‘00’,  ‘01’,  ‘02’,  ‘11’,  ‘12’,  ‘22’  represents  the  current  modes  of  the  underlying 
    BusNms, where ‘0’ indicates ‘Bus Sleep Mode’, ‘1’ refers to ‘Prepare Bus Sleep Mode’ and 
    ‘2’ stands for ‘Network Mode’. 
    Note that  the super-states ‘Bus Sleep Mode’, ‘Prepare  Bus Sleep Mode’ and ‘Bus Sleep 
    Mode’ indicate the mode that is forwarded as an aggregated mode towards ComM. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    29 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
     stm State Machine for Mode Changes w ith Tw o BusNms
    Bus Sleep Mode
    00
    Nm_BusSleepMode
    Nm_PrepareBusSleepMode
    ()
    e
    ()
    d
    Nm_BusSleepMode
    e
    o
    d
    o
    M
    /ComM_Nm_BusSleepMode()
    p
    e
    rkM
    Prepare Bus Sleep Mode
    e
    o
    d
    le
    e
    Nm_PrepareBusSleepMode
    o
    d
    tw
    sS
    01
    11
    o
    e
    M
    u
    p
    N
    B
    e
    _
    _
    rkM
    le
    m
    m
    o
    Nm_PrepareBusSleepMode
    tw
    N
    sS
    N
    e
    _
    u
    _
    N
    M
    B
    M
    _
    m
    _
    m
    Nm_BusSleepMode
    m
    o
    m
    o
    N
    /C
    N
    /C
    Nm_NetworkMode [Overall
    Nm_NetworkMode
    Mode is 12]
    /ComM_Nm_NetworkMode()
    Nm_BusSleepMode
    Nm_PrepareBusSleepMode
    /ComM_Nm_NetworkMode() [Overall Mode is 01]
    /ComM_Nm_PrepareBusSleepMode()
    /ComM_Nm_PrepareBusSleepMode()
    Netw ork Mode
    12
    02
    Nm_BusSleepMode
    [Overall Mode is 02]
    Nm_NetworkMode
    Nm_PrepareBusSleepMode
    Nm_NetworkMode
    Nm_BusSleepMode
    22
    Nm_NetworkMode
    Nm_NetworkMode [Overall Mode is 02]
    /ComM_Nm_NetworkMode()
    Legend
    Regular transition
    Nm_PrepareBusSleepMode
    /ComM_Nm_PrepareBusSleepMode()
    Irregular transition
     
    Figure 3-5  Mode Changes with two BusNms on one channel 
    The states ‘01’ of ‘Prepare Bus Sleep Mode’ and ’12’ of ‘Network Mode’ need to recalculate 
    the  Overall  Mode  of  all  BusNms  for  certain  triggers  (01:  Nm_NetworkMode,  12: 
    Nm_BusSleepMode).  This  is  because  these  triggers  are  ambiguous  inside  these  states 
    (e.g.  possible  target  states  from  ‘01’  for  the  trigger  Nm_NetworkMode  are  ‘02’  and  ‘12’, 
    because either the one BusNm or the other may have changed to Network Mode). 
    In  ambiguous  cases,  BusNm_GetState  is  called  for  each  BusNm.  This  requires  each 
    BusNm  to  provide  the  correct  new  mode  in  the  context  of  the  Nm_BusSleepMode, 
    Nm_PrepareBusSleepMode, Nm_NetworkMode calls by the BusNm. 
    Figure  3-5  also  contains  transitions  annotated  as  ‘irregular  transitions’.  These  are 
    transitions  that  shall  normally  not  occur  because  they  are  not  intended  by  AUTOSAR. 
    Example: Nm_PrepareBusSleepMode() shall not be called in Bus Sleep Mode. However, if 
    it was called, it would not lead to any problems. 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    30 
    based on template version 4.8.0 




    Technical Reference MICROSAR Network Management Interface 
     
     
    Caution 
    Take care that BusNm_GetState returns the correct new mode in the context of the 
      Nm_BusSleepMode, Nm_PrepareBusSleepMode, Nm_NetworkMode calls by the 
    BusNm when implementing a Generic BusNm. 
     
     
     
     
     
    Note 
    The ‘Synchronize Mode’ is not explicitly notified through a callback function and is 
      therefore considered as ‘Bus Sleep Mode’ concerning the aggregation. 
     
     
     
     
    3.9.2 
    State Change Notifications 
    If  the  ‘State  Change  Ind  Enabled’  feature  is  used  (see  chapter  3.8.2),  the  state  change 
    notifications are aggregated over all BusNms on a channel. Only the numerically highest 
    state  is  forwarded  to  the  ‘State  Change  Ind  Callback’  function  (e.g.  implemented  by 
    BswM). In other words, the current overall state of n BusNms is maxi=1,…,n{statei}. 
    Since the previous state is also provided by the call of Nm_StateChangeNotification, there 
    are no ambiguities and errors in state changes can also be detected and reported to Det 
    (see chapter 3.11.1). 
    An example for two BusNms on one channel is provided in Table 3-7. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    31 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
     
    Current State of BusNm 1 
    E
    VI
     
    CT
     
    A
    _
    G
     
    S
     
     
    E
    _M
    V
    T
     
    I
    N
    CT
    E
     
    V
    _A
    _E
     
    G
    ND
     
    MS
     
    _
    A
    _
     
    P
     
    E
    N
    W
    W
     
     
    LE
    IO
    T
    E
    _G
    _G
    G
     
    P
     
    _S
    A
     
    A
     
     
    RK
    RK
    P
    R
    U
    E
    S
    E
    E
    UP
    O
    O
     
     
    US
    E
    S
    P
    B
    E
    P
    K
    T
    W
    W
    O
    E
    NIZ
    A
    R
    T
    T
      
     
    E
    _
    L
    F
    _M
    O
     
    W
    A
    E
    E
    F
    LE
    RE
    _S
    L_
    T
    E
    _
    T
     
     
    A
    A
    K
    _S
    P
    DY
    MA
    E
    _O
    LIN
    C
    _S
    IT_N
    IT_N
    S
     
    S
    E
    A
    R
    P
    NCHR
    F
    IT
    A
    A
    NINIT
    U
    R
    E
    E
    Y
    F
    HE
    A
    U
    W
     
    B
    P
    S
    W
    _W
    _B
    _U
    _
    _
    _R
    _NO
    _R
    _
    _O
    _C
    _
    _
    E
    E
    E
     
    E
    E
    E
    E
    E
    E
    E
    E
    E
    E
    T
    T
    T
    T
    T
    T
    T
    T
    T
    T
    T
    T
    A
    T
    A
    A
    A
    A
    A
    A
    A
    A
    A
    A
    A
    T
    AT
    T
     
    T
    T
    T
    T
    T
    T
    T
    T
    T
    T
    S
    S
    _S
     
    _S
    _S
    _S
    _S
    _S
    _S
    _S
    _S
    _S
    _S
    M_
    M_
    NM
    Current State of BusNm 2 
    NM
    NM
    NM
    NM
    NM
    NM
    NM
    NM
    NM
    NM
    : N
    : N
    0: 
    1: 
    2: 
    3: 
    4: 
    5: 
    6: 
    7: 
    8: 
    9: 
    10
    1: 1
    12
    0: NM_STATE_UNINIT 










    10  11  12 
    1: NM_STATE_BUS_SLEEP 










    10  11  12 
    2: 










    10  11  12 
    NM_STATE_PREPARE_BUS_SLEEP 
    3: NM_STATE_READY_SLEEP 










    10  11  12 
    4: NM_STATE_NORMAL_OPERATION  4 









    10  11  12 
    5: NM_STATE_REPEAT_MESSAGE 










    10  11  12 
    6: NM_STATE_SYNCHRONIZE 










    10  11  12 
    7: NM_STATE_OFFLINE 










    10  11  12 
    8: NM_STATE_CHECK_WAKEUP 










    10  11  12 
    9: NM_STATE_WAIT_STARTUP 










    10  11  12 
    10: 
    NM_STATE_WAIT_NETWORK_GW_M 10  10  10  10  10  10  10  10  10  10  10  11  12 
    SG_ACTIVE 
    11: 
    NM_STATE_WAIT_NETWORK_GW_A
    11  11  11  11  11  11  11  11  11  11  11  11  12 
    ND_EVENT_MSG_ACTIVE 
    12: NM_STATE_BUS_OFF  
    12  12  12  12  12  12  12  12  12  12  12  12  12 
    Table 3-7   Overall State of two BusNms on one channel 
    Note that the initial state of each BusNm is ‘Bus Sleep’ (1). 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    32 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.9.3 
    Remote Sleep Indication Statuses 
    The Remote Sleep status for actively coordinated channels and the Coordinator Ready to 
    Sleep  status  for  passively  coordinated  channels  is  aggregated  over  all  BusNms  on  a 
    channel. 
    The ‘Remote Sleep Ind Callback’ / ‘Remote Sleep Cancel Callback’ notifications that may 
    be  implemented  by  an  upper  layer  are  thus  also  augmented  by  an  aggregation  of  the 
    Remote Sleep Indication overall state of all BusNms. 
    The  initial  Remote  Sleep  state  is  ‘Number  of  BusNms  that  are  Channel  Sleep  Masters’. 
    Currently, J1939Nm is always considered as a Channel Sleep Master (see chapter3.4.5) 
    and each Generic BusNm can be configured individually as Channel Sleep Master. 
    The ‘Remote Sleep Ind Callback’ function is called when all BusNms that are not ‘Channel 
    Sleep  Masters’  have  indicated  the  readiness  to  sleep  of  the  other  nodes  (call  of 
    Nm_RemoteSleepIndication 
    on 
    actively 
    coordinated 
    channels 

    Nm_CoordReadyToSleepIndication on passively coordinated channels). 
    If ‘Remote Sleep Ind Callback’ has already been called and one BusNm has detected that 
    at least one remote node is not ready to sleep (call of  Nm_RemoteSleepCancellation on 
    actively  coordinated  channels  /  Nm_CoordReadyToSleepCancellation  passively 
    coordinated channels), the ‘Remote Sleep Cancel Callback’ function is called. 
    A  call  of  Nm_NetworkMode  by  the  first  BusNm  that  enters  Network  Mode  resets  the 
    Remote sleep to its initial value (‘Number of BusNms that are Channel Sleep Masters’). 
    An example state machine of the remote sleep callbacks is illustrated in Figure 3-6. 
     stm Remote Sleep for Tw o BusNms
    Nm_RemoteSleepCanc ellation
    Nm_CoordReadyToSleepCanc ellation
    0
    Nm_NetworkMode [Number
    of BusNms in Network Mode
    == 0 && Channel Sleep
    Nm_NetworkMode [Number of BusNms in Network Mode == 0 &&
    Masters == 0]
    Channel Sleep Masters == 0]
    /ComM_Nm_NetworkMode();
    Nm_CoordReadyToSleepIndic ation
    /ComM_Nm_NetworkMode();
    Nm_RemoteSleepCanc ellation
    Nm_CoordReadyToSleepCanc ellation
    Nm_NetworkMode [Number of BusNms in
    Nm_NetworkMode [Number of BusNms in Network Mode == 0 &&
    Nm_RemoteSleepIndic ation
    Network Mode == 0 && Channel Sleep Masters
    Channel Sleep Masters == 0]
    == 1]
    /ComM_Nm_NetworkMode();
    /ComM_Nm_NetworkMode();
    &
    1
     &
     0
    Nm_NetworkMode [Number of BusNms in Network
    =
     =
    Mode == 0 && Channel Sleep Masters == 1]
    e
    d
    /ComM_Nm_NetworkMode();
    o
    M
    rk 
    o
    tw
    e
     N
    Nm_RemoteSleepCanc ellation
    in
    Nm_RemoteSleepIndic ation
    /Nm_ChannelState =
    Nm_CoordReadyToSleepCanc ellation

    /Nm_ChannelState = NM_BUS_STATE_READY_TO_SLEEP;
    m
    NM_BUS_STATE_BUS_AWAKE;
    /Nm_ChannelState =
    UL_Nm_RemoteSleepIndic ation;
    sN
    Nm_AbortShutdown();
    NM_BUS_STATE_BUS_AWAKE;
    u
    UL_Nm_RemoteSleepCanc ellation();
    Nm_AbortShutdown();
    f B
    ]
    r o
     2
    ();
    e
    =
    e
    b
    =
    d
    Nm_NetworkMode [Number of BusNms in Network Mode == 0 &&
    m
    o
    Nm_NetworkMode [Number of BusNms in Network Mode == 0 &&
    u
    rs 
    Channel Sleep Masters == 1]
    e
    Channel Sleep Masters == 2]
     [N
    st
    rkM
    /ComM_Nm_NetworkMode();
    e
    a
    o
    /ComM_Nm_NetworkMode();
    Nm_CoordReadyToSleepIndic ation
    d
    tw
    o
     M
    e
    /Nm_ChannelState =
    p
    e
    N
    _
    NM_BUS_STATE_READY_TO_SLEEP;
    rkM
    le
    o
    m
    tw
    l S
    N
    e
    e
    _
    N
    n
    M
    _
    n
    a
    m
    m
    h
    o
    N
    C
    /C
    2
    Nm_CoordReadyToSleepIndic ation
    Nm_RemoteSleepIndic ation
    Nm_NetworkMode [Number of BusNms in Network Mode == 0 && Channel Sleep Masters == 2]
    /ComM_Nm_NetworkMode();
     
    Figure 3-6  State Machine of Remote Sleep callbacks for two BusNms on one channel 
    As it can be seen, the total number of states is ‘Number of BusNms on the channel’ + 1. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    33 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    3.9.4 
    Other Aggregated Information and Caveats 
    If the following service functions are used by the application, the data that is retrieved from 
    the  BusNms  is  aggregated  overall  BusNms.  It  is  therefore  recommended  to  call  the 
    corresponding BusNm function directly if multiple BusNms are used on one channel. Refer 
    to the detailed service description chapters for details. 
    Nm_GetUserData (chapter 5.2.8) 
    Nm_GetPduData (chapter 5.2.9) 
    Nm_GetNodeIdentifier (chapter 5.2.11) 
    Nm_GetLocalNodeIdentifier (chapter 5.2.12) 
    Nm_CheckRemoteSleepIndication (chapter 5.2.13) 
    Nm_GetState (chapter 5.2.14) 
    The service function Nm_SetUserData (chapter 5.2.7) propagates the provided user data 
    to  all  BusNms  on  the  channel.  Therefore  the  pointer  nmUserDataPtr  has  to  point  to  a 
    buffer that is large enough to fit into the user data bytes of the BusNm that has greatest 
    number  of  user  data  bytes.  Even  though  E_NOT_OK  may  be  returned  from 
    Nm_SetUserData,  the  user  data  has  been  accepted  by  the  BusNms  that  support  the 
    service BusNm_SetUserData. No DET Error is thrown by Nm itself (but maybe thrown by 
    the BusNm, depends on the BusNm). 
    Also consider the following caveats: 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    34 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
     
     
    Caution 
     
      >  The function Nm_PduRxIndication (and thus the user callback 
    UL_Nm_PduRxIndication) can be called by any BusNm on the channel and it 
    cannot be determined during run-time which BusNm has called the function. Refer 
    to chapter 5.6.1.3 for details. 
    >  The functions Nm_<BusNm>_PduRxIndication (and thus the configured user 
    callbacks) can be called by any BusNm on the channel and they can determine 
    which BusNm has called the function by using different identifiers for each BusNm. 
    >  The function Nm_StateChangeNotification (and thus the callback 
    UL_Nm_StateChangeNotification) can be called by any BusNm on the channel and 
    the numerically highest state is reported as current state towards the 
    UL_Nm_StateChangeNotification callback and the Com Signal if ‘State Report 
    Enabled’ is used. Refer to chapter 5.6.1.5 for details. 
    >  The function Nm_RepeatMessageIndication (and thus the callback 
    UL_Nm_RepeatMessageIndication) can be called by any BusNm on the channel 
    and thus it cannot be determined which of the BusNms has entered Repeat 
    Message. The repeat message request is not forwarded to the other BusNms on the 
    channel by the Nm. Refer to chapter 5.6.1.6 for details. 
    >  The function Nm_TxTimeoutException and Nm_CarWakeUpIndication (and thus the 
    callbacks UL_Nm_TxTimeoutException, UL_Nm_CarWakeUpIndication) can be 
    called by any BusNm on the channel and thus it cannot be determined which of the 
    BusNms has called it. 
    >  The return values of the service functions are aggregated (i.e. if one BusNm call 
    returns E_NOT_OK, E_NOT_OK is returned by the corresponding Nm function). 
    >  The data behind the pointer(s) in Nm_GetNodeIdentifier, 
    Nm_GetLocalNodeIdentifier might have been manipulated although E_NOT_OK is 
    returned. 
     
     
     
    3.10  Main Functions 
    The Nm module implementation provides one main function. When the NM Coordinator is 
    enabled this main function has to be called cyclically on task level. The default cycle time 
    is 10 milliseconds. The value has to be set in the component configuration. 
    For API details refer to chapter 5.2.16 ‘Nm_MainFunction’. 
    3.11  Error Handling 
    3.11.1  Development Error Reporting 
    Reporting of development errors is done by the service 
    Std_ReturnType Det_ReportError 
       
    uint16 ModuleId, uint8 InstanceId, 
       
    uint8 ApiId, uint8 ErrorId ) 
    (5.3) 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    35 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Please  refer  to  the  documentation  of  the  development  error  tracer  [2]  for  further 
    information and a detailed description of the API.  
    The reported Nm ID is 29. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    NM_SID_INIT 
    Nm_Init  
    NM_SID_PASSIVESTARTUP 
    Nm_PassiveStartUp 
    NM_SID_NETWORKREQUEST 
    Nm_NetworkRequest  
    NM_SID_NETWORKRELEASE 
    Nm_NetworkRelease 
    NM_SID_DISABLECOMMUNICATION 
    Nm_DisableCommunication  
    NM_SID_ENABLECOMMUNICATION 
    Nm_EnableCommunication  
    NM_SID_SETUSERDATA 
    Nm_SetUserData 
    NM_SID_GETUSERDATA 
    Nm_GetUserData 
    NM_SID_GETPDUDATA 
    Nm_GetPduData  
    NM_SID_REPEATMESSAGEREQUEST 
    Nm_RepeatMessageRequest 
    NM_SID_GETNODEIDENTIFIER_ 
    Nm_GetNodeIdentifier  
    NM_SID_GETLOCALNODEIDENTIFIER 
    Nm_GetLocalNodeIdentifier  
    NM_SID_CHECKREMOTESLEEPINDICATION 
    Nm_CheckRemoteSleepIndication 
    NM_SID_GETSTATE 
    Nm_GetState  
    NM_SID_GETVERSIONINFO 
    Nm_GetVersionInfo 
    NM_SID_MAINFUNCTION 
    Nm_MainFunction 
    NM_SID_NETWORKSTARTINDICATION 
    Nm_NetworkStartIndication  
    NM_SID_NETWORKMODE 
    Nm_NetworkMode 
    NM_SID_PREPAREBUSSLEEPMODE 
    Nm_PrepareBusSleepMode 
    NM_SID_BUSSLEEPMODE 
    Nm_BusSleepMode 
    NM_SID_PDURXINDICATION 
    Nm_PduRxIndication 
    NM_SID_STATECHANGENOTIFICATION 
    Nm_StateChangeNotification 
    NM_SID_REMOTESLEEPINDICATION 
    Nm_RemoteSleepIndication  
    NM_SID_REMOTESLEEPCANCELLATION 
    Nm_RemoteSleepCancellation 
    NM_SID_SYNCHRONIZATIONPOINT 
    Nm_SynchronizationPoint 
    NM_SID_REPEATMESSAGEINDICATION 
    Nm_RepeatMessageIndication  
    NM_SID_TXTIMEOUTEXCEPTION 
    Nm_TxTimeoutException 
    NM_SID_BUSNMSPECIFICPDURXINDICATION 
    Nm_<BusNm>_PduRxIndication 
    NM_SID_CARWAKEUPINDICATION 
    Nm_CarWakeUpIndication 
    NM_SID_COORDREADYTOSLEEPINDICATION 
    Nm_CoordReadyToSleepIndication 
    NM_SID_COORDREADYTOSLEEPCANCELLATION  Nm_CoordReadyToSleepCancellation 
    NM_SID_INITMEMORY 
    Nm_InitMemory 
    Table 3-8   Service IDs 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    36 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x00 
    NM_E_UNINIT 
    API service used without module initialization. 
    0x01 
    NM_E_HANDLE_UNDEF 
    API service used with wrong network handle. 
    0x02 
    NM_E_PARAM_POINTER 
    API service called with a NULL pointer 
    0x20 
    NM_E_SYNCHRONIZATION Nm_SynchronizationPoint was not called within the 
    _TIMEOUT17 
    configured synchronization timeout time. 
    0x21 
    NM_E_FUNCTION_PTR_IS Pointer to a function to be called is equals NULL 
    _NULL 
    0x22 
    NM_E_INVALID_STATE17 
    An invalid state has been passed to 
    Nm_StateChangeNotification (only available if 
    the optimization for only one BusNm on a channel is 
    OFF) 
    0x23 
    NM_E_SAME_STATES17 
    The same states have been passed to 
    Nm_StateChangeNotification 
    0x24 
    NM_E_NOT_AVAILABLE_IN Nm Passive Mode is not enabled for this channel 
    _PASSIVE_MODE 
    Table 3-9   Errors reported to DET 
    3.11.2  Production Code Error Reporting 
    The Nm module currently does not have any error which has to be reported to the DEM. 
                                                
    17 This error code is an extension to AUTOSAR. Refer also to chapter 3.1.2.1 ‘Additional DET Error Codes’. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    37 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR Nm into an 
    application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The  delivery  of  the  Nm  contains  the  files  which  are  described  in  the  chapters  4.1.1  and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name  Source 
    Object 
    Description 
    Code 
    Code 
    Delivery  Delivery 
    Nm.c 
     
     
    This is the source file of the Nm. 
    Nm.lib 
     
     
    This is the library file built from the source file 
    Nm.h 
     
     
    This is the header file of the Nm. 
    Nm_Cbk.h 
     
     
    This is the callback header file of the Nm. 
    NmStack_
    This is the Nm type definition header file of the Nm.

     
    Types.h
     
     
     
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    Nm_Cfg.h 
    This is the configuration header file. 
    Nm_Cfg.c 
    This is the configuration source file containing all pre-compile relevant content. 
    Nm_Lcfg.c 
    This is the configuration source file containing all link-time relevant content. 
    Table 4-2   Generated files 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    38 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    4.2 
    Include Structure 
     class File Include Structure_extended
    Rtm.h
    SchM_Nm.h
    «include»
    «include»
    «include»
    «include»
    Nm.h
    Nm.c
    Det.h
    0..1
    «include»
    «include»
    «include»
    «include»
    0..1
    «include»
    «include»
    «include»
    Nm_Lcfg.c
    MemMap.h
    Nm_Cbk.h
    ComM_Nm.h
    0..1
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    BusNm.h
    Nm_Cfg.c
    CallbacksPrototype.h
    «include»
    1..*
    0..*
    «include»
    0..1
    «include»
    «include»
    «include»
    «include»
    Nm_Cfg.h
    NmStack_Types.h
    Std_Types.h
    «include»
    «include»
    «include»
    «include»
    0..1
    UserCfg.h
    ComStack_Types.h
    Compiler.h
    Platform_Types.h
     
    Figure 4-1  Include structure 
    Some includes are optional and depend on the configuration.  BusNm.h  stands for every 
    used  BusNm  module  and  if  multiple  BusNm  modules  are  used  for  each  one  the 
    corresponding header is included. For example if CanNm and FrNm are used, the header 
    files  CanNm.h  and  FrNm.h  are  included.  The  files  are  included  either  in  Nm_Cfg.h  or 
    Nm_Cfg.c  depending  on  the  configuration  settings  for  ‘Macro  Layer  Optimization’. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    39 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    CallbacksPrototype.h and UserCfg.h stand for the respectively configured header 
    files. 
    4.3 
    Critical Sections 
    The AUTOSAR standard provides with the BSW Scheduler (SchM) a BSW module, which 
    handles entering and leaving critical sections. 
    The NM Interface calls the following function when entering a critical section: 
    void SchM_Enter_Nm_NM_EXCLUSIVE_AREA_i() 
    () 
    When the critical section is left the following function is called by the NM Interface: 
    void SchM_Exit_Nm_NM_EXCLUSIVE_AREA_i() 
    () 
    The critical sections  have to be defined and mapped to corresponding interrupt  locks  by 
    the BSW Scheduler. Details which section needs what kind of interrupt lock are provided in 
    the following section. For more information about the BSW Scheduler please refer to [5]. 
    4.3.1 
    Exclusive Area 0 
    Interrupt Lock 
    No interruption by any interrupt is allowed. Therefore this section must always lock global 
    interrupts. 
    Interfaces 
    >  SchM_Enter_Nm_NM_EXCLUSIVE_AREA_0 
    >  SchM_Exit_Nm_NM_EXCLUSIVE_AREA_0 
    Purpose 
    Ensures data consistency between BusNm and coordination algorithm. 
    Particularities and Limitations 
    This critical section is only relevant if the Nm coordinator is used. 
    Table 4-3   Exclusive Area 0 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    40 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    4.3.2 
    Exclusive Area 1 
    Interrupt Lock 
    No interruption by an interrupt is allowed if one of the following functions is executed in the 
    context of an interrupt service routine: 
    >  Nm_NetworkMode 
    >  Nm_BusSleepMode 
    >  Nm_PrepareBusSleepMode 
    >  Nm_RemoteSleepIndication 
    >  Nm_RemoteSleepCancellation 
    >  Nm_CoordReadyToSleepIndication 
    >  Nm_CoordReadyToSleepCancellation 
    If at least one of the above mentioned functions is executed in interrupt context, this section must 
    always lock global interrupts. 
    Interfaces 
    >  SchM_Enter_Nm_NM_EXCLUSIVE_AREA_1 
    >  SchM_Exit_Nm_NM_EXCLUSIVE_AREA_1 
    Purpose 
    Ensures data consistency between BusNm and coordination algorithm. 
    Particularities and Limitations 
    This critical section is only relevant if the Nm coordinator is used and at least one channel 
    contains more than one BusNm (e.g. CanNm and J1939Nm on one channel). 
    Table 4-4   Exclusive Area 1 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    41 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the Nm are described in this chapter. 
    Type Name 
    C-Type  Description 
    Value Range 
    Nm_StateType 
    uint8 
    States of the bus-
    NM_STATE_UNINIT 
    specific network 
    No initialization has been performed. 
    management state 
    NM_STATE_BUS_SLEEP 
    machine. Not all states 
    will be reached by each  Nm entered sleep state due to 
    BusNm. For details 
    initialization or shutdown. 
    refer to the Technical 
    NM_STATE_PREPARE_BUS_SLEEP 
    Reference or the 
    Nm prepares for entering sleep. This 
    AUTOSAR SWS of the  state is only relevant for BusNm 
    corresponding BusNm.  modules on CAN, e.g. CanNm. 
    NM_STATE_READY_SLEEP 
    Communication is not needed any 
    more by the application and no NM 
    messages are transmitted. 
    NM_STATE_NORMAL_OPERATION 
    Communication is needed by the 
    application and the NM message is 
    transmitted 
    NM_STATE_REPEAT_MESSAGE 
    Nm has (re-)started and 
    communication is enabled. Nm stays 
    a configurable amount of time in this 
    state and transmits its Nm message. 
    NM_STATE_SYNCHRONIZE 
    Start-up has been requested and Nm 
    waits to be synchronized to the 
    Repetition Cycle. This state is only 
    relevant for FrNm. 
    NM_STATE_OFFLINE 
    Address Claiming is running or 
    Address Loss has occurred. This 
    state is only relevant for J1939Nm. 
    NM_STATE_CHECK_WAKEUP 
    State that is entered on external bus 
    wake-up event. This state is only 
    relevant for NmStMgr. 
    NM_STATE_WAIT_STARTUP 
    State that is entered on internal 
    network request on NmStMgr 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    42 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Type Name 
    C-Type  Description 
    Value Range 
    channels. 
    Nm is starting up and sends a wake-
    up message. No other messages can 
    be transmitted in this state on 
    NmOsek channels. This state is only 
    relevant for NmStMgr and NmOsek. 
    NM_STATE_WAIT_NETWORK_GW_MS
    G_ACTIVE 
    Nm is starting up and was in state 
    NM_STATE_WAIT_STARTUP 
    before. The transmission of  
    gateway messages is enabled in this 
    state. This state is only relevant for 
    NmOsek. 
    NM_STATE_WAIT_NETWORK_GW_AN
    D_EVENT_MSG_ACTIVE 
    Nm is starting up and was in state 
    NM_STATE_WAIT_NETWORK_GW_MS
    G_ACTIVE before. Gateway as well 
    as event triggered messages can be 
    transmitted in this state. This state is 
    only relevant for NmOsek. 
    NM_STATE_BUS_OFF 
    This state is entered upon a BusOff 
    notification. This state is only 
    relevant for NmOsek. 
    Nm_ModeType 
    uint8 
    Modes of the bus-
    NM_MODE_BUS_SLEEP 
    specific network 
    Nm entered sleep mode due to 
    management state 
    initialization or shutdown. 
    machine. Not all modes  NM_MODE_PREPARE_BUS_SLEEP 
    will be reached by each 
    BusNm. For details 
    Nm prepares for entering sleep. This 
    refer to the Technical 
    mode is only relevant for BusNm 
    Reference or the 
    modules on CAN, e.g. CanNm. 
    AUTOSAR SWS of the  NM_MODE_SYNCHRONIZE 
    corresponding BusNm.  Start-up has been requested and Nm 
    waits to be synchronized to the 
    Repetition Cycle. This mode is only 
    relevant for FrNm. 
    NM_MODE_NETWORK 
    Nm has (re-)started and 
    communication is (partly) enabled. 
    Table 5-1   Type definitions 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    43 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2 
    Services Provided by Nm 
    5.2.1 
    Nm_Init 
    Prototype 
    void Nm_Init ( void ) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function initializes the Nm. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function has to be called after the initialization of the respective bus interface. 
    >  This API is realized as a macro if ‘Coordinator Support’ is disabled. 
    Expected Caller Context 
    >  This function can be called from task level only. 
    Table 5-2   Nm_Init 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    44 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    5.2.2 
    Nm_PassiveStartUp 
    Prototype 
    Std_ReturnType Nm_PassiveStartUp ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Passive start of network management has failed 
    Functional Description 
    This function requests a passive start-up of the network management. The Nm calls therefore the passive 
    start-up function of the respective BusNm (see also chapter 5.3 ‘Services Used by Nm’)
     
     
    Note 
    When Nm_PassiveStartUp is called for a coordinated network the network request 
      function of the respective BusNm(s) on the network is called instead of the passive 
    start-up function. 
     
     
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-3   Nm_PassiveStartUp 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    45 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.3 
    Nm_NetworkRequest 
    Prototype 
    Std_ReturnType Nm_NetworkRequest ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Requesting the network has failed 
    Functional Description 
    This function requests the network and the bus communication. The Nm calls therefore the network request 
    function of the respective BusNm(s) on the network (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available if at least one network is not passive or CONFIG-VARIANT is 
    LINK-TIME. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-4   Nm_NetworkRequest 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    46 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    5.2.4 
    Nm_NetworkRelease 
    Prototype 
    Std_ReturnType Nm_NetworkRelease ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Releasing the network has failed 
    Functional Description 
    This function releases the network and the bus communication. The Nm calls therefore the network release 
    function of the respective BusNm (see also chapter 5.3 ‘Services Used by Nm’)
     
     
    Note 
    When Nm_NetworkRelease is called for a coordinated network, the network release 
      function of the respective BusNm(s) is/are not called immediately. Instead, the network 
    release function(s) is/are called when every network of the corresponding coordinator 
    is ready to sleep. 
     
     
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous for not coordinated networks. 
    >  This function is asynchronous for coordinated networks. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available, if at least one network is not passive or CONFIG-VARIANT is 
    LINK-TIME. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-5   Nm_NetworkRelease 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    47 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.5 
    Nm_DisableCommunication 
    Prototype 
    Std_ReturnType Nm_DisableCommunication (const NetworkHandleType nmNetworkHandle) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Disabling the communication has failed 
    Functional Description 
    This function disables the NM PDU transmission ability. The Nm calls therefore the disable communication 
    function of the respective BusNm(s) on the network (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available if ‘Com Control Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-6   Nm_DisableCommunication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    48 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.6 
    Nm_EnableCommunication 
    Prototype 
    Std_ReturnType Nm_EnableCommunication (const NetworkHandleType nmNetworkHandle) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Enabling the communication has failed 
    Functional Description 
    This function enables the NM PDU transmission ability. The Nm calls therefore the enable communication 
    function of the respective BusNm(s) on the network (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available if ‘Com Control Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-7   Nm_EnableCommunication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    49 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.7 
    Nm_SetUserData 
    Prototype 
    Std_ReturnType Nm_SetUserData ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    const uint8 * const nmUserDataPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmUserDataPtr 
    Pointer to the user data that shall be transmitted in the next NM messages 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Setting of user data has failed 
    Functional Description 
    This function sets the user data that shall be transmitted within the next NM messages. The Nm calls 
    therefore the set user data function of the respective BusNm(s) (see also chapter 5.3 ‘Services Used by 
    Nm’)

    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available if ‘User Data Enabled’ is enabled, ‘Com User Data Support’ is 
    disabled and at least one network is not passive or CONFIG-VARIANT is LINK-TIME. 
    >  If multiple BusNms are configured on the channel, the Set User Data API will be called for all 
    BusNms on the channel. This implies that the buffer behind the nmUserDataPtr has to provide 
    enough data bytes so that all BusNms copy valid user data bytes. If the user data bytes shall 
    be different for each BusNm, call the BusNm_SetUserData function directly instead. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-8   Nm_SetUserData 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    50 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.8 
    Nm_GetUserData 
    Prototype 
    Std_ReturnType Nm_GetUserData ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    uint8 * const nmUserDataPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmUserDataPtr 
    Pointer where the user data of the last received NM message shall be copied 
    to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Getting of user data has failed 
    Functional Description 
    This function copies the user data of the last received NM message to the location provided by the pointer. 
    The Nm calls therefore the get user data function of the respective BusNm(s) on the network (see also 
    chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘User Data Enabled’ is enabled. 
    >  If multiple BusNms are configured on the channel, the Get User Data API will be called for all 
    BusNms on the channel. This implies that the buffer will contain the most recent user data 
    bytes of one of the BusNms that is configured on the channel and that has implemented the 
    service. It is recommended to call each BusNm_GetUserData function directly for channels 
    with multiple BusNms, otherwise (one BusNm is configured on the channel) use 
    Nm_GetUserData. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-9   Nm_GetUserData 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    51 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.9 
    Nm_GetPduData 
    Prototype 
    Std_ReturnType Nm_GetPduData ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    uint8 * const nmPduDataPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmUserDataPtr 
    Pointer where the PDU data of the last received NM message shall be copied 
    to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Getting of PDU data has failed 
    Functional Description 
    This function copies the complete PDU data (system bytes and user data) of the last received NM message 
    to the location provided by the pointer. The Nm calls therefore the get PDU data function of the respective 
    BusNm(s) on the network (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘User Data Enabled’ is enabled or ‘Node Id Enabled’ is 
    enabled. 
    >  If multiple BusNms are configured on the channel, the Get Pdu Data API will be called for all 
    BusNms on the channel. This implies that the buffer will contain the most recent PDU data 
    bytes of one of the BusNms that is configured on the channel and that has implemented the 
    service. It is recommended to call each BusNm_GetPduData function directly for channels 
    with multiple BusNms, otherwise (one BusNm is configured on the channel) use 
    Nm_GetPduData. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-10   Nm_GetPduData 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    52 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.10  Nm_RepeatMessageRequest 
    Prototype 
    Std_ReturnType Nm_RepeatMessageRequest (const NetworkHandleType nmNetworkHandle) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Repeat message request has failed 
    Functional Description 
    This function sets the repeat message request bit for the next NM message transmitted on the bus. This 
    will force all NM nodes on the bus (including itself) to enter state ‘Repeat Message’ again and transmit NM 
    messages. The Nm calls therefore the repeat message request function of the respective BusNm(s) on the 
    network (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant for the same network handle, reentrant otherwise. 
    >  This function is only available if ‘Node Detection Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-11   Nm_RepeatMessageRequest 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    53 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.11  Nm_GetNodeIdentifier 
    Prototype 
    Std_ReturnType Nm_GetNodeIdentifier ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    uint8 * const nmNodeIdPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmNodeIdPtr 
    Pointer where the node identifier of the last received NM message shall be 
    copied to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Getting of node identifier has failed 
    Functional Description 
    This function copies the node identifier of the last received NM message to the location provided by the 
    pointer. The Nm calls therefore the get node identifier function of the respective BusNm(s) on the network 
    (see also chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Node Id Enabled’ is enabled. 
    >  If multiple BusNms are configured on the channel, the Get Node Identifier API will be called for 
    all BusNms on the channel. This implies that the buffer will contain the most recent node 
    identifier of one of the BusNms that is configured on the channel and that has implemented the 
    service. If one of the BusNm_GetNodeIdentifier calls returns E_NOT_OK, the buffer behind 
    the nmNodeIdPtr may still have been manipulated due to the call of Nm_GetNodeIdentifier. It 
    is recommended to call each BusNm_GetNodeIdentifier function directly for channels with 
    multiple BusNms, otherwise (one BusNm is configured on the channel) use 
    Nm_GetNodeIdentifier. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-12   Nm_GetNodeIdentifier 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    54 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.12  Nm_GetLocalNodeIdentifier 
    Prototype 
    Std_ReturnType Nm_GetLocalNodeIdentifier ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    uint8 * const nmNodeIdPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmNodeIdPtr 
    Pointer where the node identifier of the local node shall be copied to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Getting of local node identifier has failed 
    Functional Description 
    This function copies the node identifier of the local node to the location provided by the pointer. The Nm 
    calls therefore the get local node identifier function of the respective BusNm(s) on the network (see also 
    chapter 5.3 ‘Services Used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Node Id Enabled’ is enabled. 
    >  If multiple BusNms are configured on the channel, the Get Local Node Identifier API will be 
    called for all BusNms on the channel. This implies that the buffer will contain the local node 
    identifier of one of the BusNms that is configured on the channel and that has implemented the 
    service. If one of the BusNm_GetLocalNodeIdentifier calls returns E_NOT_OK, the buffer 
    behind the nmNodeIdPtr may still have been manipulated due to the call of 
    Nm_GetLocalNodeIdentifier. It is recommended to call each BusNm_GetLocalNodeIdentifier 
    function directly for channels with multiple BusNms, otherwise (one BusNm is configured on 
    the channel) use Nm_GetLocalNodeIdentifier. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-13   Nm_GetLocalNodeIdentifier 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    55 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.13  Nm_CheckRemoteSleepIndication 
    Prototype 
    Std_ReturnType Nm_CheckRemoteSleepIndication ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    boolean * const nmRemoteSleepIndPtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmRemoteSleepIndPtr  Pointer where the remote sleep status shall be copied to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Checking of remote sleep status has failed 
    Functional Description 
    This function copies the remote sleep status to the location provided by the pointer. The Nm calls therefore 
    the check remote sleep indication function of the respective BusNm(s) on the network (see also chapter 5.3 
    ‘Services Used by Nm’)

    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Remote Sleep Ind Enabled’ is enabled. 
    >  If multiple BusNms are configured on the channel, the Check Remote Sleep Indication API will 
    be called for all BusNms on the channel. This implies that the buffer will contain the overall 
    remote sleep statuses of all BusNms on the channel. That means that if one of the Remote 
    Sleep Indication statuses is false, the result will be false. Also, if one of the 
    BusNm_CheckRemoteSleepIndication returns E_NOT_OK, the result will not be returned. If 
    one is interested the Remote Sleep Indication status of a particular BusNm on the channel, it 
    is recommended to call BusNm_CheckRemoteSleepIndication directly for channels with 
    multiple BusNms. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-14   Nm_CheckRemoteSleepIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    56 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.14  Nm_GetState 
    Prototype 
    Std_ReturnType Nm_GetState ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    Nm_StateType * const nmStatePtr, 
     
    Nm_ModeType * const nmModePtr ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmStatePtr 
    Pointer where the current network management state shall be copied to 
    nmModePtr 
    Pointer where the current network management mode shall be copied to 
    Return code 
    E_OK 
    No error 
    E_NOT_OK 
    Checking of remote sleep status has failed 
    Functional Description 
    This function copies the NM state and the NM mode to the location provided by the pointers. The Nm calls 
    therefore the get state function of the respective BusNm(s) on the network (see also chapter 5.3 ‘Services 
    Used by Nm’)

    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  If multiple BusNms are configured on the channel, the Get State API will be called for all 
    BusNms on the channel. This implies that the state buffer and the mode buffer will contain the 
    numerically greatest state/mode of all BusNms. Also, if one of the BusNm_GetState returns 
    E_NOT_OK, the result will not be returned. If one is interested in the state of a particular 
    BusNm on the channel, it is recommended to call BusNm_GetState directly for channels with 
    multiple BusNms. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-15   Nm_GetState 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    57 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.15  Nm_GetVersionInfo 
    Prototype 
    void Nm_GetVersionInfo ( Std_VersionInfoType * nmVerInfoPtr ) 
    Parameter 
    nmVerInfoPtr 
    Pointer where the version information shall be copied to 
    Return code 

     
    Functional Description 
    Nm_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of the component. 
    The versions are BCD-coded. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Version Info Api’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-16   Nm_GetNodeIdentifier 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    58 
    based on template version 4.8.0 



    Technical Reference MICROSAR Network Management Interface 
    5.2.16  Nm_MainFunction 
    Prototype 
    void Nm_MainFunction ( void ) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function implements the handling of coordinated networks of the NM Interface. 
     
     
    Note 
    This function is not available if ‘Coordinator Support’ is turned OFF. 
     
     
     
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is not reentrant. 
    >  This function has to be called cyclically on task level by BSW Scheduler 
    >  This function must not be called by the application. 
    Expected Caller Context 
    >  This function can be called from task level only. 
    Table 5-17   Nm_MainFunction 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    59 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.2.17  Nm_InitMemory 
    Prototype 
    void Nm_InitMemory ( void ) 
    Parameter 

     
    Return code 

     
    Functional Description 
    If RAM is not automatically initialized at start-up, this function must be called from start-up code to ensure 
    that variables which must be initialized with a certain value (e.g. initialization status with UNINIT value) are 
    set to those values. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function is a Vector Extension. Refer also to chapter 3.1.2.5 ‘Memory Initialization’. 
    >  This function has to be called during start-up and before the initialization is executed. 
    >  This function is realized as a macro if ‘Coordinator Support’ is disabled. 
    Expected Caller Context 
    >  This function can be called from task level only 
    Table 5-18   Nm_InitMemory 
    5.3 
    Services Used by Nm 
    In the following table services provided by other components, which are used by the  Nm 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    BusNm (e.g. CanNm, FrNm, NmOsek) 
    BusNm_PassiveStartUp 
    BusNm_NetworkRequest 
    BusNm_NetworkRelease 
    BusNm_DisableCommunication 
    BusNm_EnableCommunication 
    BusNm_SetUserData 
    BusNm_GetUserData 
    BusNm_GetPduData 
    BusNm_RepeatMessageRequest 
    BusNm_GetNodeIdentifier 
    BusNm_GetLocalNodeIdentifier 
    BusNm_CheckRemoteSleepIndication 
    BusNm_RequestBusSynchronization 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    60 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    Component 
    API 
    BusNm_SetSleepReadyBit 
    BusNm_GetState 
    Table 5-19   Services used by the Nm 
    5.4 
    Callback Functions 
    This chapter describes the callback functions that are implemented by the Nm and can be 
    invoked  by  other  modules.  The  prototypes  of  the  callback  functions  are  provided  in  the 
    header file Nm_Cbk.h by the Nm. 
    5.4.1 
    Nm_NetworkStartIndication 
    Prototype 
    void Nm_NetworkStartIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message has been received in state ‘Bus Sleep’. This indicates that some nodes in 
    the network have restarted and already entered ‘Network Mode’. This notification is forwarded to the ComM 
    (see also chapter 5.5 ‘Callback Functions used by Nm’). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-20   Nm_NetworkStartIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    61 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.2 
    Nm_NetworkMode 
    Prototype 
    void Nm_NetworkMode ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has entered ‘Network Mode’. This notification is forwarded to the 
    ComM (see also chapter 5.5 ‘Callback Functions used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant if NM_COORDINATOR_SUPPORT_ENABLED is STD_OFF, 
    otherwise it is reentrant only for different channel handles. 
    >  If multiple BusNms are used on a channel, the notification is only forwarded to ComM if it is 
    the first BusNm that has entered ‘Network Mode’ on this channel. 
    >  If multiple BusNms are used on a channel, the new mode must also be returned by a 
    BusNm_GetState call within the context of the Nm_NetworkMode call. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-21   Nm_NetworkMode 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    62 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.3 
    Nm_BusSleepMode 
    Prototype 
    void Nm_BusSleepMode ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has entered ‘Bus Sleep Mode’. This notification is forwarded to the 
    ComM (see also chapter 5.5 ‘Callback Functions used by Nm’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant if NM_COORDINATOR_SUPPORT_ENABLED is STD_OFF, 
    otherwise it is reentrant only for different channel handles. 
    >  If multiple BusNms are used on a channel, the notification is only forwarded to ComM if it is 
    the last BusNm that enters ‘Bus Sleep Mode’. 
    >  If multiple BusNms are used on a channel, the new mode must also be returned by a 
    BusNm_GetState call within the context of the Nm_BusSleepMode call. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-22   Nm_BusSleepMode 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    63 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.4 
    Nm_PrepareBusSleepMode 
    Prototype 
    void Nm_PrepareBusSleepMode ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has entered ‘Prepare Bus Sleep Mode’. This notification is forwarded 
    to the ComM (see also chapter 5.5 ‘Callback Functions used by Nm’). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant if NM_COORDINATOR_SUPPORT_ENABLED is STD_OFF, 
    otherwise it is reentrant only for different channel handles. 
    >  This function is only available if CanNm, UdpNm or a Generic BusNm is used or if the 
    Configuration Variant is VARIANT-LINK-TIME 
    >  If multiple BusNms are used on the channel, the notification is only forwarded if all other 
    BusNms have left ‘Network Mode’. 
    >  If multiple BusNms are used on a channel, the new mode must also be returned by a 
    BusNm_GetState call within the context of the Nm_PrepareBusSleepMode call. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-23   Nm_PrepareBusSleepMode 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    64 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.5 
    Nm_RemoteSleepIndication 
    Prototype 
    void Nm_RemoteSleepIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has detected that all other nodes on the network are ready to sleep. 
    This notification is optionally forwarded to an upper layer by a configurable notification function (see also 
    chapter 5.6.1.1 ’UL_Nm_RemoteSleepIndication’)
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant if NM_COORDINATOR_SUPPORT_ENABLED is STD_OFF, 
    otherwise it is reentrant only for different channel handles. 
    >  This function is only available if ‘Remote Sleep Ind Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-24   Nm_RemoteSleepIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    65 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.6 
    Nm_RemoteSleepCancellation 
    Prototype 
    void Nm_RemoteSleepCancellation ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has detected that some other nodes on the network are not ready to 
    sleep any more. This notification is optionally forwarded to an upper layer by a configurable notification 
    function (see also chapter 5.6.1.2 ‘UL_Nm_RemoteSleepCancellation’). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant if NM_COORDINATOR_SUPPORT_ENABLED is STD_OFF, 
    otherwise it is reentrant only for different channel handles. 
    >  This function is only available if ‘Remote Sleep Ind Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-25   Nm_RemoteSleepCancellation 
    5.4.7 
    Nm_SynchronizationPoint 
    Prototype 
    void Nm_SynchronizationPoint ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification to the NM Coordinator functionality that this is a suitable point in time to initiate the coordination 
    algorithm. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Coordinator Support’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-26   Nm_SynchronizationPoint 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    66 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.8 
    Nm_<BusNm>_PduRxIndication 
    Prototype 
    void Nm_<BusNm>_PduRxIndication( const NetworkHandleType nmNetworkHandle, 
                                     const PduInfoType* const pduInfo ); 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    pduInfo 
    Pointer to the received PDU data 
    Return code 

     
    Functional Description 
    Notification that a NM message has been received by a specific BusNm on a channel. This notification is 
    optionally forwarded to an upper layer by a configurable notification function (see also chapter 5.6.1.4 
    ‘UL_Nm_BusNmSpecificPduRxIndication’).
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Bus Nm Specific Pdu Rx Indication Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-27   Nm_BusNmSpecificPduRxIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    67 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.9 
    Nm_PduRxIndication 
    Prototype 
    void Nm_PduRxIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message has been received. This notification is optionally forwarded to an upper 
    layer by a configurable notification function (see also chapter 5.6.1.3 ‘UL_Nm_PduRxIndication’). 
    This notification may also be forwarded to another configurable notication (see chapter 5.6.1.4 
    ‘UL_Nm_BusNmSpecificPduRxIndication’ f
    or details). Note that the latter upper layer notification function 
    will contain a NULL pointer for the pduInfo argument. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Pdu Rx Indication Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-28   Nm_PduRxIndication 
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    68 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.10  Nm_StateChangeNotification 
    Prototype 
    void Nm_StateChangeNotification ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    const Nm_StateType nmPreviousState, 
     
    const Nm_StateType nmCurrentState ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmPreviousState 
    Previous state of the BusNm on the respective network 
    nmCurrentState 
    Current state of the BusNm on the respective network 
    Return code 

     
    Functional Description 
    Notification that network management state of the BusNm has changed. This notification is optionally 
    forwarded to an upper layer by a configurable notification function (see also chapter 5.6.1.5 
    ‘UL_Nm_StateChangeNotification’).
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘State Change Ind Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-29   Nm_StateChangeNotification 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    69 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.11  Nm_RepeatMessageIndication 
    Prototype 
    void Nm_RepeatMessageIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message with set repeat message request bit has been received. This notification is 
    optionally forwarded to an upper layer by a configurable notification function (see also chapter 5.6.1.6 
    ‘UL_Nm_RepeatMessageIndication’).
     
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Repeat Msg Ind Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-30   Nm_RepeatMessageIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    70 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.12  Nm_TxTimeoutException 
    Prototype 
    void Nm_TxTimeoutException ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that NM message could not be sent for a certain time period. This notification is optionally 
    forwarded to an upper layer by a configurable notification function (see also chapter 5.6.1.7 
    ‘UL_Nm_TxTimeoutException’
    ). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if at least one network is not passive or CONFIG-VARIANT is 
    LINK-TIME. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-31   Nm_TxTimeoutException 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    71 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.13  Nm_CarWakeUpIndication 
    Prototype 
    void Nm_CarWakeUpIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message with set Car Wake Up request bit has been received. This notification is 
    optionally forwarded to an upper layer by a configurable notification function (see also chapter 5.6.1.8) 
    ‘UL_Nm_CarWakeUpIndication’)

    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Car Wake Up Rx Enabled’ is enabled. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-32   Nm_CarWakeUpIndication 
    5.4.14  Nm_CoordReadyToSleepIndication 
    Prototype 
    void Nm_CoordReadyToSleepIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message with set Sleep Ready bit has been received. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Coordinator Support’ and ‘Coordinator Sync Support’ are 
    enabled 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-33   Nm_CoordReadyToSleepIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    72 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.4.15  Nm_CoordReadyToSleepCancellation 
    Prototype 
    void Nm_CoordReadyToSleepCancellation (const NetworkHandleType nmNetworkHandle) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message, which has not set Sleep Ready bit anymore, has been received. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  This function is only available if ‘Coordinator Support’ and ‘Coordinator Sync Support’ are 
    enabled 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-34   Nm_CoordReadyToSleepCancellation 
    5.5 
    Callback Functions used by Nm 
    In the following table services provided by other components, which are used by the  Nm 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    ComM 
    ComM_Nm_NetworkStartIndication 
    ComM_Nm_RestartIndication 
    ComM_Nm_NetworkMode 
    ComM_Nm_BusSleepMode 
    ComM_Nm_PrepareBusSleepMode 
    Table 5-35   Callback Functions used by the Nm 
    5.6 
    Configurable Interfaces 
    5.6.1 
    Notifications 
    At its configurable interfaces the Nm defines notifications that can be mapped to callback 
    functions provided by other modules. The mapping is not statically defined by the Nm but 
    can be performed at configuration time. The function prototypes that can be used for the 
    configuration  have  to  match  the  appropriate  function  prototype  signatures,  which  are 
    described in the following sub-chapters. The name of those functions is configurable and 
    provided names here are just examples. The header file names where the prototypes for 
    those functions are provided has to be provided also in the configuration. 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    73 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.1 
    UL_Nm_RemoteSleepIndication 
    Prototype 
    void UL_Nm_RemoteSleepIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has detected that all other nodes on the network are ready to sleep. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Remote Sleep Ind Enabled’ is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel, this function is only called if the last BusNm has 
    indicated ‘Remote Sleep’. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-36   UL_Nm_RemoteSleepIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    74 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.2 
    UL_Nm_RemoteSleepCancellation 
    Prototype 
    void UL_Nm_RemoteSleepCancellation ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that network management has detected that some other nodes on the network are not ready to 
    sleep any more. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Remote Sleep Ind Enabled’ is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel, this function is only called if the first BusNm has 
    cancelled ‘Remote Sleep’. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-37   UL_Nm_RemoteSleepCancellation 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    75 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.3 
    UL_Nm_PduRxIndication 
    Prototype 
    void UL_Nm_PduRxIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message has been received. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Pdu Rx Indication Enabled’ is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel and this function is called, it cannot be 
    distinguished which BusNm has triggered the call of this function. If the PDU contents are 
    different between the PDUs of BusNms, one can use BusNm_GetPduData in the context of 
    the callback function to get the most recently received PDU data of each BusNm. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-38   UL_Nm_PduRxIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    76 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.4 
    UL_Nm_BusNmSpecificPduRxIndication 
    Prototype 
    void <FunctionName>( NetworkHandleType nmNetworkHandle, const PduInfoType* 
    const pduInfo) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    pduInfo 
    Pointer to the received PDU data 
    Return code 

     
    Functional Description 
    Notification that a NM message has been received. 
    It can be differentiated from which BusNm it comes, in contrast to Nm_PduRxIndication 5.6.1.3. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Specific Pdu Rx Indication Enabled’ is enabled and a function 
    name is configured. 
    >  This function can be used to distinguish between each BusNm on the same channel by using 
    different identifiers for each BusNm. It is not necessary to configure the function if there is only 
    one BusNm on the channel. The ‘Pdu Receive Ind Callback’ can be used as an alternative for 
    this purpose. 
    >  The argument pduInfo will always be NULL if the function is called from the context of 
    Nm_PduRxIndication (see also chapter 5.4.9). 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-39   Standard Bus Nm Pdu Rx Indication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    77 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.5 
    UL_Nm_StateChangeNotification 
    Prototype 
    void UL_Nm_StateChangeNotification ( 
     
    const NetworkHandleType nmNetworkHandle, 
     
    const Nm_StateType nmPreviousState, 
     
    const Nm_StateType nmCurrentState ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    nmPreviousState 
    Previous state of the BusNm on the respective network 
    nmCurrentState 
    Current state of the BusNm on the respective network 
    Return code 

     
    Functional Description 
    Notification that network management state of the BusNm has changed. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘State Change Ind Enabled’ is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel and if this function used, it cannot be 
    distinguished which BusNm has triggered the state change notification. The current state is 
    always the numerically highest overall state of the BusNms on the channel. If an exact state 
    needs to be determined for each BusNm, call BusNm_GetState directly. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-40   UL_Nm_StateChangeNotification 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    78 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.6 
    UL_Nm_RepeatMessageIndication 
    Prototype 
    void UL_Nm_RepeatMessageIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message with set repeat message request bit has been received. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Repeat Msg Ind Enabled’ is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel, it cannot be distinguished which BusNm has 
    called this function. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-41   UL_Nm_RepeatMessageIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    79 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.7 
    UL_Nm_TxTimeoutException 
    Prototype 
    void UL_Nm_TxTimeoutException ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that NM message could not be sent for a certain time period. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Passive Mode Enabled’ is disabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel, it cannot be distinguished which BusNm has 
    called this function. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-42   UL_Nm_TxTimeoutException 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    80 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    5.6.1.8 
    UL_Nm_CarWakeUpIndication 
    Prototype 
    void UL_Nm_CarWakeUpIndication ( const NetworkHandleType nmNetworkHandle ) 
    Parameter 
    nmNetworkHandle 
    Identification of the network 
    Return code 

     
    Functional Description 
    Notification that a NM message with set Car Wake Up request bit has been received. 
    Particularities and Limitations 
    >  Service ID: Has to be provided by the module that implements this notification. 
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The name of this function is configurable. 
    >  This function is only available if ‘Car Wake Up Rx Enabled ‘is enabled and a function name is 
    configured. 
    >  If multiple BusNms are used on the channel, it cannot be distinguished which BusNm has 
    called this function. 
    Expected Caller Context 
    >  This function can be called from task and interrupt level. 
    Table 5-43   UL_Nm_CarWakeUpIndication 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    81 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    6  Glossary and Abbreviations 
    6.1 
    Glossary 
    Term 
    Description 
    BusNm 
    Bus-specific network management, e.g. CanNm, FrNm, NmOsek 
    DaVinci Configurator  Generation tool for MICROSAR components 
    Table 6-1   Glossary 
    6.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    BswM 
    Basis Software Manager 
    ComM 
    Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DLL 
    Data Link Layer 
    ECU 
    Electronic Control Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    Nm 
    AUTOSAR Network Management Interface (this module) 
    NM 
    Network Management 
    NmOsek 
    OSEK Network Management (Vector module) 
    OSEK 
    Open Systems and the Corresponding Interfaces for Automotive 
    Electronics (German term: “Offene Systeme und deren Schnittstellen für 
    die Elektronik im Kraftfahrzeug”) 
    SchM 
    Schedule Manager 
    SWS 
    Software Specification 
    Table 6-2   Abbreviations 
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    82 
    based on template version 4.8.0 


    Technical Reference MICROSAR Network Management Interface 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 10.00.00 
    83 
    based on template version 4.8.0 

    Document Outline


    1.3.153 - TechnicalReference_NvM

    MICROSAR NVM

    1.3.155 - TechnicalReference_NvMs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR NVM 
    Technical Reference 
     
      
    Version 5.06.02 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Christian Kaiser, Tomas Ondrovic 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR NVM 
    1  Document Information 
    1.1 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Christian Kaiser 
    2007-08-20  1.4 
    AUTOSAR 2.1, 
    updated for EAD3.1 usage, 
    conversion to new template   
    Christian Kaiser 
    2007-12-06  3.01.00 
    Change of the document's versioning 
    scheme to correspond to the module's 
    major and minor, 
    update of parameter description in 
    chapter 'Graphical Configuration of NvM' 
    and service port generation description, 
    remove of DATASET ROM, feature not 
    supported anymore, 
    remove of introduction paragraphs from 
    'Description of Memory Mapping and 
    Compiler Abstraction', not subject of this 
    document, 
    simplified 'Block Management Types' 
    naming, 
    formal changes    
    Christian Kaiser 
    2008-01-11 
    3.01.01 
    New chapter to clarify the dependency on 
    the CRC library, 
    stated explicitly that DET is optional, 
    corrected default values   
    Manfred Duschinger, 
    2008-05-23  3.02.00 
    AUTOSAR 3, 
    Heike Bischof 
    conversion to Technical Reference 
    Manfred Duschinger 
    2008-12-08  3.03.00 
    ESCAN00027300: Description of 
    NvM_ServiceIdType in 
    SingleBlockCallbackFunction and 
    MultiBlockCallbackFunction 
    Description and expected caller context 
    of NvM_SetBlockLockStatus-API 
    reworked. 
    Chapter 4.4.17 ‘Concurrent access to NV 
    data for DCM’ added. 
    Chapter 4.4.5.2: Write order at redundant 
    blocks added. 
    Expansion of glossary. 
    Chapter 7.2.2: Description of ‘Dataset 
    Selection Bits’ added. 
    Manfred Duschinger 
    2009-02-25  3.03.01 
    ESCAN00031177: Manufacturer specific 
    requirements attribute for traceability 
    reasons 
    Manfred Duschinger 
    2009-03-24  3.03.02 
    ESCAN00032480: Missing information in 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    documentation: 
    Chapter 6.4.5: ‘Description of 
    NvM_RequestResultType added’. 
    Chapters 6.4.15 and 6.4.16: ‘Services are 
    multiblock requests’. 
    Manfred Duschinger 
    2009-06-03  3.04.00 
    ESCAN00032480: Update of History of 
    version 3.03.02: Updated changed 
    chapters.  
    Chapter  6.2: ‘Block ID 0 is only allowed 
    for API NvM_GetErrorStatus()’ 
    ESCAN00033075: Chapter 4.5.1.1: 
    DataIndex Check in NvM_ReadBlock() 
    added. DataIndex Check was also added 
    to NvM_InvalidateNvBlock() and 
    NvM_EraseNvBlock(). 
    ESCAN00033900: Chapter 4.4.17: 
    “Priority Handling of DCM-Blocks” 
    ESCAN00035089: Chapters 4.1, 7.2.2 
    “Callbacks NvM_JobEndNotification, 
    NvM_JobErrorNotification implemented” 
    ESCAN00034073: Chapters 2, 4.4.5.1, 
    7.2.2 “Crc Handling is configurable: Either 
    an internal buffer is used or Crc is stored 
    at the end of RAM Block.” 
    ESCAN00035891: Chapter 7.1.1 
    “Integrate SWC-Generation into CFG 
    Pro's Generation process” 
    Chapter 3.1: update AUTOSAR 
    architecture figure. 
    Christian Kaiser 
    2010-01-25  3.04.01 
    ESCAN00039648 – Rebuilt document; 
    made hyperlinks working. Updated Logo; 
    No changes in content. 
    Christian Kaiser 
    2010-03-26  3.05.00 
    Updated Component history 
    Whole document: “EAD”  “DaVinci 
    Configurator” 
    Added Ch. 7.3 “Attributes only 
    configurable using GCE” 
    Updated Ch. 5.6.1 – “RAM Usage” 
    ESCAN00040662: Chapter 4.4.3: Added 
    note about restricted access to RAM 
    block during job execution. 
    ESCAN00035134: Chapter 5.1.2 
    reworked 
    ESCAN00039749: Ch. 4.4.10, 8.2.4: 
    Guaranteed CRC values; Ch 6.4.7: note 
    about asynchronous CRC calculation 
    ESCAN00031315: added Ch. 4.2.1, Ch  
    8.2.3; updated Ch. 7.2.5 
    ESCAN00042745 – corrected Ch. 4.5.2 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Manfred Duschinger 
    2011-01-25 
    3.07.00 
    ESCAN00047171: Ch. 6.4.18: 
    NvM_KillWriteAll; Abbreviations: ECUM 
    ESCAN00045141: Ch. 4.4.5.1: 
    information about names of Block 
    Handles 
    Manuela Scheufele  
    2011-02-03 
    3.07.01 
    Minor changes 
    Manfred Duschinger 
    2011-07-12 
    3.08.00 
    ESCAN00049327: Ch. 4.5.2 DEM errors 
    inserted into MICROSAR DEM 
    Christian Kaiser 
    2012-01-24  3.09.00 
    ESCAN00053235, ESCAN00051729: Ch. 
    7.1 – updated PortInterface names 
    Manfred Duschinger 
    2013-01-02  5.00.00 
    Ch. 4.1: supported features added 
    Ch. 4.4.3 and ch. 4.4.4: added 
    NvM_CancelJobs 
    Ch. 4.3.5: error handling updated 
    Ch. 4.4.20: added explicit synchronization 
    mechanism 
    Ch. 5.4.6: updated callback functions 
    Ch. 5.5: updated initialization process of 
    memory stack 
    Ch. 6.4: updated return values of most 
    synchronous APIs 
    Ch. 6.4.6: instanceID deleted 
    Ch. 6.4.16: updated NvM_WriteAll 
    handling 
    Ch. 6.4.19: description of API 
    NvM_CancelJobs 
    Ch. 6.7.4 and 6.7.5: Callback routines for 
    explicit synchronization mechanism 
    Ch. 7: completely reworked 
    Ch. 9.2: added abbreviations 
    Ch. 7.2.1 and ch. 7.3 removed 
    Manfred Duschinger 
    2013-01-04  5.01.00 
    Ch. 5.4.8 Interaction with BswM 
     
    Manfred Duschinger, 
    2013-08-23  5.01.01 
    ESCAN00064110: Ch. 4.4.8 Description 
    Christian Kaiser 
    of synchronous Job-End Notification 
    ESCAN00062895: Ch. 4.4.5.1 Symbolic 
    name values of Nv Block Handles 
    updated. 
    ESCAN00062896: Ch. 4.4.13. 4.4.20, 
    5.4.8, 6.7.3, 6.7.4 and 6.7.5: Added 
    information that block is still busy during 
    invoking callback. 
    ESCAN00063639: Ch. 4.4.20: Extended 
    information about explicit synchronization 
    mechanism 
    ESCAN00064063: Ch. 6.2 Improve 
    description of 
    NvM_RequestResultType 
    ESCAN00064173: Ch. 5.3: Explanation 
    of some necessity of memory mapping 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    ESCAN00068239: Ch. 6.4, Ch. 4.4.20: 
    Limitations Explicit Synchronization 
    Mechanism 
    ESCAN00063532 – Ch. 6.4.16 Block 
    Processing order during NvM_WriteAll 
    Christian Kaiser 
    2014-06-17  5.02.00 
    Internal release; no changes 
    Christian Kaiser 
    2014-10-13  5.02.01 
    Updated Ch. 2. Component history. 
    ESCAN00073178  –  updated  Ch.  4.1 
    unsupported features, Ch. 8.1 Deviations 
    ESCAN00074672 
    – 
    Description 
    of 
    Redundant Blocks; extended Ch. 4.4.5.2 
    ESCAN00076366  –  SWCs’  callback 
    return types – added Ch. 7.1.5 
    Removed Ch. 4.4.18, 4.4.19 
    ESCAN00071933 
    – 
    Description 
    of 
    internal  buffering  and  internal  CRC 
    storage,  rewording  Ch.  4.4.5.1,  4.4.5.5, 
    4.4.10, 5.6.1 
    ESCAN00075284  –  Reworked  Ch. 
    4.4.17, Ch. 6.4.8 
    Review  findings  –  Development  Error 
    Codes in chapter 4.5.1, minor rephrasing, 
    Glossary (PIM) 
    Added Chapter 5.7 
    Christian Kaiser 
    2015-01-07  5.02.02 
    Chapters 6.4.8, 8.1 
    NvM_SetBlockLockStatus – emphasized 
    deviation from AUTOSAR. 
    Tomas Ondrovic 
    2015-02-02  5.03.00 
    Chapter 4.2.1, 4.5.1 – removed RAM and 
    ROM block length DET check 
    Chapter 4.5.3 – describes the new 
    compile time RAM and ROM block length 
    checks 
    Chapter 4.1.1.1– created to describe 
    feature Block Id check 
    Chapter 6.4.20 – describes the new 
    feature “Repair Redundant Blocks” 
    Tomas Ondrovic 
    2015-09-28  5.03.01 
    Only improvements 
    Tomas Ondrovic 
    2015-11-25 
    5.0400 
    Added chapter 4.1.2 and updated chapter 
    4.5.3 
    Tomas Ondrovic 
    2016-02-11 
    5.05.00 
    Removed the possibility to configure dev 
    error hook, include file and reporting 
    Tomas Ondrovic 
    2016-04-14  5.06.00 
    ESCAN00088791: updated function 
    signatures to AUTOSAR4 in chapter 6.4 
    FEAT-1888: described changed callback 
    invoking during ReadAll in chapters 4.4.8 
    and 4.4.13 
    Added new chapter 5.2 with critical 
    section list. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    ESCAN00091004: extended chapter 4.2 
    Tomas Ondrovic 
    2016-10-18  5.06.01 
    ESCAN00073639: improved chapter 
    4.4.17 
    Tomas Ondrovic 
    2017-02-23  5.06.02 
    ESCAN00094128: improved DEM error 
    handling description (chapter 4.5.2 and 
    5.5.2) 
    Table 1-1  
    History of the document 
    1.2 
    Reference Documents 
    No. 
    Title 
    Version 
    [1]   
    AUTOSAR_SWS_NVRAMManager.pdf 
    V 2.2.0 
    [2]   
    AUTOSAR_SWS_DET.pdf 
    V 2.2.0 
    [3]   
    AUTOSAR_SWS_DEM.pdf 
    V 2.2.1 
    [4]   
    AUTOSAR_BasicSoftwareModules.pdf 
    V 1.2.0 
    Table 1-2  
    Reference documents 
     
    Please note 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Contents 
    1 
    Document Information ................................................................................................. 2 
    1.1 

    History ............................................................................................................... 2 
    1.2 
    Reference Documents ....................................................................................... 6 
    2 
    Component History .................................................................................................... 13 
    3 
    Introduction................................................................................................................. 15 
    3.1 
    Architecture Overview ...................................................................................... 16 
    4 
    Functional Description ............................................................................................... 18 
    4.1 

    Features .......................................................................................................... 18 
    4.1.1 
    Safety Features ................................................................................ 19 
    4.1.2 
    Automatic Block Length ................................................................... 19 
    4.2 
    Initialization ...................................................................................................... 19 
    4.2.1 
    Start-up ............................................................................................ 20 
    4.2.2 
    Initialization of the Data Blocks ........................................................ 20 
    4.3 
    States .............................................................................................................. 21 
    4.4 
    Main Functions ................................................................................................ 21 
    4.4.1 

    Hardware Independence .................................................................. 21 
    4.4.2 
    Synchronous Requests .................................................................... 21 
    4.4.3 
    Asynchronous Requests .................................................................. 21 
    4.4.4 
    API Configuration Classes and additional API Services ................... 22 
    4.4.5 
    Block Handling ................................................................................. 23 
    4.4.6 
    Prioritized or non-prioritized Queuing of asynchronous Requests .... 27 
    4.4.7 
    Asynchronous Job-End Polling ........................................................ 27 
    4.4.8 
    Single Block Job End Notifications ................................................... 27 
    4.4.9 
    Immediate Priority Jobs and Cancellation of current Jobs ................ 28 
    4.4.10 
    Asynchronous CRC Calculation ....................................................... 28 
    4.4.11 
    Write Protection ............................................................................... 29 
    4.4.12 
    Erase and Invalidate ........................................................................ 29 
    4.4.13 
    Init Block Callbacks .......................................................................... 29 
    4.4.14 
    Define Locking/ Unlocking Services ................................................. 30 
    4.4.15 
    Interrupts .......................................................................................... 30 
    4.4.16 
    Data Corruption ................................................................................ 30 
    4.4.17 
    Concurrent access to NV data for DCM ........................................... 30 
    4.4.18 
    Explicit synchronization mechanism between application and NVM . 31 
    4.5 
    Error Handling .................................................................................................. 32 
    4.5.1 

    Development Error Reporting ........................................................... 32 
    4.5.2 
    Production Code Error Reporting ..................................................... 35 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    4.5.3 
    Compile-time Block Length Checks .................................................. 35 
    5 
    Integration ................................................................................................................... 37 
    5.1 

    Scope of Delivery ............................................................................................. 37 
    5.1.1 

    Static Files ....................................................................................... 37 
    5.1.2 
    Dynamic Files .................................................................................. 37 
    5.2 
    Critical Sections ............................................................................................... 38 
    5.3 
    Include Structure .............................................................................................. 38 
    5.4 
    Compiler Abstraction and Memory Mapping ..................................................... 38 
    5.5 
    Dependencies on SW Modules ........................................................................ 40 
    5.5.1 

    OSEK / AUTOSAR OS ..................................................................... 40 
    5.5.2 
    DEM ................................................................................................. 40 
    5.5.3 
    DET ................................................................................................. 41 
    5.5.4 
    MEMIF ............................................................................................. 41 
    5.5.5 
    CRC Library ..................................................................................... 41 
    5.5.6 
    Callback Functions ........................................................................... 41 
    5.5.7 
    RTE ................................................................................................. 41 
    5.5.8 
    BSWM.............................................................................................. 41 
    5.6 
    Integration Steps .............................................................................................. 42 
    5.7 
    Estimating Resource Consumption .................................................................. 43 
    5.7.1 

    RAM Usage ..................................................................................... 43 
    5.7.2 
    ROM Usage ..................................................................................... 43 
    5.7.3 
    NV Usage ........................................................................................ 44 
    5.8 
    How-To: Integrate NVM with AUTOSAR3 SWC’s ............................................. 44 
    5.8.1 

    NVM’s provided Interfaces/Ports. ..................................................... 44 
    5.8.2 
    Callbacks (Ports provided by client SWCs) ...................................... 45 
    5.8.3 
    Request Result Types ...................................................................... 45 
    6 
    API Description ........................................................................................................... 46 
    6.1 

    Interfaces Overview ......................................................................................... 46 
    6.2 
    Type Definitions ............................................................................................... 46 
    6.3 
    Global API Constants ....................................................................................... 48 
    6.4 
    Services provided by NVM ............................................................................... 48 
    6.4.1 

    NvM_Init ........................................................................................... 48 
    6.4.2 
    NvM_SetDataIndex .......................................................................... 48 
    6.4.3 
    NvM_GetDataIndex.......................................................................... 49 
    6.4.4 
    NvM_SetBlockProtection ................................................................. 50 
    6.4.5 
    NvM_GetErrorStatus ........................................................................ 51 
    6.4.6 
    NvM_GetVersionInfo ........................................................................ 51 
    6.4.7 
    NvM_SetRamBlockStatus ................................................................ 52 
    6.4.8 
    NvM_SetBlockLockStatus ................................................................ 53 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    6.4.9 
    NvM_MainFunction .......................................................................... 54 
    6.4.10 
    NvM_ReadBlock .............................................................................. 54 
    6.4.11 
    NvM_WriteBlock .............................................................................. 55 
    6.4.12 
    NvM_RestoreBlockDefaults ............................................................. 56 
    6.4.13 
    NvM_EraseNvBlock ......................................................................... 57 
    6.4.14 
    NvM_InvalidateNvBlock ................................................................... 58 
    6.4.15 
    NvM_ReadAll ................................................................................... 59 
    6.4.16 
    NvM_WriteAll ................................................................................... 60 
    6.4.17 
    NvM_CancelWriteAll ........................................................................ 61 
    6.4.18 
    NvM_KillWriteAll .............................................................................. 61 
    6.4.19 
    NvM_CancelJobs ............................................................................. 62 
    6.4.20 
    NvM_RepairRedundantBlocks ......................................................... 62 
    6.5 
    Services used by NVM ..................................................................................... 63 
    6.6 
    Callback Functions ........................................................................................... 64 
    6.6.1 

    NvM_JobEndNotification .................................................................. 64 
    6.6.2 
    NvM_JobErrorNotification ................................................................ 65 
    6.7 
    Configurable Interfaces .................................................................................... 65 
    6.7.1 

    SingleBlockCallbackFunction ........................................................... 65 
    6.7.2 
    MultiBlockCallbackFunction ............................................................. 66 
    6.7.3 
    InitBlockCallbackFunction ................................................................ 66 
    6.7.4 
    Callback function for RAM to NvM copy ........................................... 67 
    6.7.5 
    Callback function for NvM to RAM copy ........................................... 68 
    6.8 
    Service Ports ................................................................................................... 68 
    6.8.1 

    Client Server Interface ..................................................................... 68 
    7 
    Configuration .............................................................................................................. 71 
    7.1 

    Software Component Template ........................................................................ 71 
    7.1.1 

    Generation ....................................................................................... 71 
    7.1.2 
    Import into DaVinci Developer .......................................................... 71 
    7.1.3 
    Dependencies on Configuration of NVM Attributes ........................... 72 
    7.1.4 
    Service Port Prototypes ................................................................... 73 
    7.1.5 
    Modelling SWC’s callback functions ................................................. 73 
    7.2 
    Configuration of NVM Attributes ....................................................................... 75 
    8 
    AUTOSAR Standard Compliance............................................................................... 77 
    8.1 

    Deviations ........................................................................................................ 77 
    8.2 
    Additions/ Extensions ....................................................................................... 77 
    8.2.1 

    Parameter Checking ........................................................................ 77 
    8.2.2 
    Concurrent access to NV data ......................................................... 77 
    8.2.3 
    RAM-/ROM Block Size checks ......................................................... 77 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 

    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    8.2.4 
    Calculated CRC value does not depend on number of calculation 
    steps ................................................................................................ 77 

    8.3 
    Limitations........................................................................................................ 78 
    9 
    Glossary and Abbreviations ...................................................................................... 79 
    9.1 

    Glossary .......................................................................................................... 79 
    9.2 
    Abbreviations ................................................................................................... 79 
    10  Contact ........................................................................................................................ 81 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    10 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Illustrations 
    Figure 3-1 
    AUTOSAR 4.x Architecture Overview ....................................................... 16 
    Figure 3-2 
    Interfaces to adjacent modules of the NVM .............................................. 17 
    Figure 5-1 
    The file structure of the NVM sections module .......................................... 38 
    Figure 7-1 
    Import a new software component into DaVinci Developer ....................... 71 
    Figure 7-2 A  
    “Single Block Job End Notification” with return type Std_ReturnType ....... 74 
    Figure 7-3 A  
    “Single Block Job End Notification” with return type void. ......................... 75 
     
    Tables 
      
    Table 1-1  
    History of the document .............................................................................. 6 
    Table 1-2  
    Reference documents ................................................................................. 6 
    Table 2-1  
    Component history.................................................................................... 14 
    Table 4-1  
    Supported SWS features .......................................................................... 18 
    Table 4-2  
    Not supported SWS features .................................................................... 18 
    Table 4-3  
    Block concept ........................................................................................... 25 
    Table 4-4  
    Mapping of service IDs to services ........................................................... 33 
    Table 4-5  
    Errors reported to DET ............................................................................. 34 
    Table 4-6  
    Development Error Checking: Assignment of checks to services .............. 34 
    Table 4-7  
    Errors reported to DEM ............................................................................. 35 
    Table 5-1  
    Static files ................................................................................................. 37 
    Table 5-2  
    Generated files ......................................................................................... 37 
    Table 5-3  
    Compiler abstraction and memory mapping .............................................. 39 
    Table 6-1  
    Type definitions ......................................................................................... 48 
    Table 6-2  
    NvM_Init ................................................................................................... 48 
    Table 6-3  
    NvM_SetDataIndex................................................................................... 49 
    Table 6-4  
    NvM_GetDataIndex .................................................................................. 50 
    Table 6-5  
    NvM_SetBlockProtection .......................................................................... 50 
    Table 6-6  
    NvM_GetErrorStatus ................................................................................ 51 
    Table 6-7  
    NvM_GetVersionInfo ................................................................................. 52 
    Table 6-8  
    NvM_SetRamBlockStatus......................................................................... 52 
    Table 6-9  
    NvM_SetBlockLockStatus......................................................................... 53 
    Table 6-10  
    NvM_MainFunction ................................................................................... 54 
    Table 6-11  
    NvM_ReadBlock ....................................................................................... 55 
    Table 6-12  
    NvM_WriteBlock ....................................................................................... 56 
    Table 6-13  
    NvM_RestoreBlockDefaults ...................................................................... 57 
    Table 6-14  
    NvM_EraseNvBlock .................................................................................. 58 
    Table 6-15  
    NvM_InvalidateNvBlock ............................................................................ 59 
    Table 6-16  
    NvM_ReadAll ............................................................................................ 60 
    Table 6-17  
    NvM_WriteAll ............................................................................................ 61 
    Table 6-18  
    NvM_CancelWriteAll ................................................................................. 61 
    Table 6-19  
    NvM_KilllWriteAll ...................................................................................... 62 
    Table 6-20  
    NvM_CancelJobs ..................................................................................... 62 
    Table 6-21  
    NvM_RepairRedundantBlocks .................................................................. 63 
    Table 6-22  
    Services used by the NVM ........................................................................ 64 
    Table 6-23  
    NvM_JobEndNotification .......................................................................... 64 
    Table 6-24  
    NvM_JobErrorNotification ......................................................................... 65 
    Table 6-25  
    SingleBlockCallbackFunction .................................................................... 66 
    Table 6-26 
    MultiBlockCallbackFunction ...................................................................... 66 
    Table 6-27 
    InitBlockCallbackFunction ......................................................................... 67 
    Table 6-28 
    Callback function for RAM to NvM copy .................................................... 68 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    11 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Table 6-29 
    Callback function for NvM to RAM copy .................................................... 68 
    Table 6-30 
    Operations of Port Prototype Padmin_<BlockName> ............................... 69 
    Table 6-31 
    Operations of Port Prototype PS_<BlockName> ....................................... 69 
    Table 6-32 
    Operation of Port prototype NvM_RpNotifyFinished_Id<BlockName> ...... 70 
    Table 9-1  
    Glossary ................................................................................................... 79 
    Table 9-2  
    Abbreviations ............................................................................................ 80 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    12 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    2  Component History 
    Component 
    New Features 
    Version 
    (Implementation) 
    5.05.xx 
    Reworked job end and init block callback invocation during ReadAll for blocks 
    with service ports 
    5.03.xx 
    Specific development errors cannot be switched on/off, only global development 
    error mode can be enabled/disabled 
    5.02.xx 
    Added RepairRedundantBlocks functionality 
    SafeBSW 
    5.01.xx 
    Interaction with BswM added. 
    Defined Block Write Order (descending IDs) during write all 
    5.xx.xx 
    AUTOSAR4.0. 
      Changed API (return types) 
      New service: NvM_CancelJobs 
      New DEM Errors  
      “Write Block during WriteAll” configurable 
      Explicit Synchronization Mechanism 
    4.xx.xx 
    Skipped/Reserved. 
    3.09.xx 
    Removed AUTOSAR Version Check for DEM 
    NvM_Mainfunction runnable is always generated into SWC descripion 
    Generation of SWC Interface Names according to AUTOSAR  
    3.08.xx 
    NVM provides information about error codes for MICROSAR Dem to automate 
    configuration. 
    3.07.xx 
    Service NvM_KillWriteAll added. 
    Significant changes in internal handling (CRC/internal buffer) 
    3.06.xx 
    Never released; no new features. 
    3.05.xx 
    Calculated CRC32 value does not depend anymore on configuration of 
    parameter NvmCrcNumOfBytes. 
    Added RAM and ROM block size checks: The NVM can be configured to check 
    each RAM block’s and/or each ROM block’s size against the configured NV 
    block length, considering CRC setting, internal buffering, etc. 
    3.04.xx 
    Crc Handling is configurable: Either the internal buffer, available since 
    component version 3.02, is used or Crc is stored at the end of RAM Block. 
    3.03.xx 
    At processing a redundant NVRAM Block NVM determines an appropriate write 
    order, depending on the NV Block’s current state/content. A defect NV block is 
    written in preference to a valid one. 
    NVM provides possibility for DCM to access NV data concurrently with NVM’s 
    applications. 
    3.02.xx 
    Update to AUTOSAR 3 specification. 
    Additional API NvM_SetBlockLockStatus. 
    Storing each NVRAM block’s CRC internally: RAM Blocks provided by the 
    application don’t have to allocate additional space for CRC. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    13 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Component 
    New Features 
    Version 
    (Implementation) 

    Configurability, whether the NVM shall create the RAM Block associated with the 
    ConfigID NVRAM Block on its own, or the user creates the RAM block. 
    Table 2-1  
    Component history 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    14 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    3  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module NVM as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    link-time 
     
     
    Vendor ID: 
    NVM_VENDOR_ID 
    30 decimal 
    (= 
    Vector-Informatik, 
    according to HIS) 
    Module ID: 
    NVM_MODULE_ID   
    20 decimal 
    (according to ref. [4]) 
    * For the precise AUTOSAR Release 3.x please see the release specific documentation.  
     
    The  module  NVM  is  created  to  abstract  the  usage  of  non-volatile  memory,  such  as 
    EEPROM  or  Flash,  from  application. All  access  to  NV  memory  is  block  based. To  avoid 
    conflicts  and  inconsistent  data  the  NVM  shall  be  the  only  module  to  access  non-volatile 
    memory. 
    The  NVM  accesses  the  module  MEMIF  (Memory Abstraction  Interface)  which  abstracts 
    the modules FEE (Flash EEPROM Emulation) and EA (EEPROM Abstraction). Thus, the 
    NVM is hardware independent. The modules FEE and EA abstract the access to Flash or 
    EEPROM driver. To select the appropriate device (FEE or EA) the NVM uses a handle that 
    is provided by the MEMIF.  
     
     
    Caution 
    MICROSAR FEE and MICROSAR EA are different products that are not part of 
      MICROSAR NVM! 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    15 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    3.1 
    Architecture Overview 
    The following figure shows where the NVM is located in the AUTOSAR architecture. 
     
    Figure 3-1 
    AUTOSAR 4.x Architecture Overview 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    16 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    The  next  figure  shows  the  interfaces  to  adjacent  modules  of  the  NVM.  These  interfaces 
    are described in chapter 6.  
     
    Figure 3-2 
    Interfaces to adjacent modules of the NVM 
    Applications normally do not access the services of the BSW modules directly. They use 
    the service ports provided by the BSW modules via the RTE. The service ports provided 
    by the NVM are listed in chapter 6.8 and are defined in [1]. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    17 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    4  Functional Description 
    4.1 
    Features 
    The features listed in this chapter cover the complete functionality specified in [1]. 
    The supported and not supported features are presented in the following two tables. For 
    further information on not supported features also see chapter 8. 
     
    The following features described in [1] are supported: 
    Supported Feature 
    Complete API 
    Block Management Types (Native, Redundant, Dataset) 
    CRC handling (CRC16, CRC32) 
    Priority handling, including Immediate (Crash) Data write 
    Job queuing 
    ROM defaults (ROM defaults block, Init callback) 
    Config Id handling 
    RAM block valid/modified handling 
    Re-Validation of RAM blocks during start up using CRC 
    Job end notifications 
    Skipping Blocks during Start-Up 
    API Configuration Classes 
    Service Ports – Generation of Software Component Description 
    Concurrent access to NV data for DCM 
    Explicit Synchronization mechanism between application and NVM 
    Interaction with BswM 
    Table 4-1  
    Supported SWS features 
    The following features described in [1] are not supported: 
    Not Supported Feature 
    Dataset ROM blocks (Management Type Dataset, multiple ROM blocks) 
    Disabling Set/Get_DataIndex API 
    Static Block ID Check during read 
    Write Verification 
    Read Retries 
    Table 4-2  
    Not supported SWS features 
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    18 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
    4.1.1 
    Safety Features 
    4.1.1.1 
    Block Id check 
    NvM  provides  a  feature  to  ensure  the  underlying  devices  deliver  data  for  the  currently 
    processing NvM block – Block Id Check. 
     
     
    Note 
    Since the Block Id Check is implemented via extension in CRC calculation, the feature 
      is only working for NvM block configured with CRC. 
    Since the feature uses the NvM Block Id, during configuration update the user has to 
    ensure the Block Id remains the same for each NvM Block. Otherwise the check will fail 
    though the correct data was read. 
     
     
    To check the data to belong to currently processing NvM Block, the NvM calculates the 
    NvM Block Id and the current Dataindex into its CRC. That means in fact that the NvM 
    calculates the CRC over the Block Id (2 bytes), Dataindex (1 byte) and the actual data –  
    NvM needs one CRC calculation function call more that without the Block Id check.  
     
     
    Caution 
    The NvM is not able to distinguish between wrong CRC and CRC calculated for 
      another NvM Block! In case the underlying modules deliver data belonging to wrong 
    NvM Block, the NvM behaves in same way as in case of CRC mismatch. 
     
     
    4.1.2 
    Automatic Block Length 
    Since the block length might be unknown during configuration time, the feature Automatic 
    Block Length can be enabled for NvM blocks with permanently configured RAM. 
    The feature changes the meaning of block length from actual length to maximum length - 
    the actual block length is set via size of permanent RAM within generated structures. The 
    configured  length  is  used  by  underlying  modules  to  initialize  their  structures,  therefore  it 
    must not be less than the actual length. To check the configured length to be valid, Block 
    Length Check (see 4.5.3) shall be enabled. 
     
     
    Caution 
    After the system is running and the actual block lengths are known, the configuration 
      shall be adjusted to the actual length. Since the configured lengths are used by 
    underlying modules, there might be a lot of unused space in Flash or EEPROM. 
     
     
    4.2 
    Initialization 
    Before the module  NVM can be used  it has to be initialized. All modules,  NVM depends 
    on, need to be initialized before. The initialization of all these modules should be done by 
    the ECU State Manager. If the NVM is not used in an AUTOSAR environment it should be 
    done by a different entity. Pay attention that the NVM will not initialize the used modules 
    by its own. 
    Depending  on  the  configuration  of  the  NVM  stack,  different  modules  might  need  to  be 
    initialized. It is advised to use a bottom up strategy for initialization: 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    19 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    >  NV device drivers for internal devices (FLS/EEP) 
    >  Low level driver that an external NV device driver might depend on (e.g. DIO, SPI) 
    >  Drivers for external NV devices (e.g. external EEP or FLS) 
    >  NV device abstraction modules (EA/FEE) 
    >  Non-Volatile Manager (NVM) 
    Initializing the modules in this sequence ensures  that, as soon as a module  is  used,  the 
    modules it depends on are ready. 
     
     
    Basic Knowledge 
    NvM initialization consists of two steps 
     
    1.  NvM_Init() (see 4.2.1) 
    2.  NvM_ReadAll() (see 4.2.2) 
    Indenpendently from SelectBlockForReadAll NvM uses the NvM_ReadAll() to 
    initialize all its blocks. Therefore it is not possible to access any NvM block until it was 
    initialized during NvM_ReadAll(). 
     
     
    4.2.1 
    Start-up 
    The  basic  initialization  of  the  NVRAM  Manager  is  done  by  the  request  NvM_Init().  It 
    shall  be  invoked  e.g.  by  the  ECU  State  Manager  exclusively.  Due  to  strong  constraints 
    concerning  the  ECU  start-up  time  the  NvM_Init()  request  does  not  contain  the  basic 
    initialization  of  the  configured  NVRAM  blocks.  The  NvM_Init()  request  resets  the 
    internal variables of the NVM such as the queue and the state machine. 
    4.2.2 
    Initialization of the Data Blocks 
    The initialization of the single blocks is normally also initiated by the ECU State Manager 
    by calling  NvM_ReadAll(). All blocks  that have no valid RAM data  anymore  and have 
    SelectBlockForReadAll  set  will  be  reloaded  from  NV  memory  or  from  ROM  (if 
    available).  All  other  blocks  won’t  be  reloaded,  they  must  be  loaded  manually  by  the 
    application  calling  NvM_ReadBlock(),  but  they  will  be  initialized,  e.g.  their  write 
    protection and status. 
    Block 1 (the configuration ID) has a special role. It is stored in NV memory and also as a 
    constant  (NvM_CompiledConfigId_t)  that  is  externally  visible  and  link-time 
    configurable.  During  NvM_ReadAll()  the  NV  value  of  block  1  is  compared  against  the 
    constant NvM_CompiledConfigId_t. In case of a match all NV blocks are presumed to 
    be  valid  and  NVM  tries  to  read  them  from  NV  memory.  In  case  of  a  mismatch  or  if  the 
    configuration ID cannot be read the system behaves as following: 
    >  If the configuration switch Dynamic Configuration Handling is OFF, the mismatch is 
    ignored. It will be tried to read all blocks from NV memory (also called ‘normal runtime 
    preparation’). 
    >  If the Dynamic Configuration Handling is ON, the normal runtime preparation is 
    processed for all blocks having been configured with the option ‘Resistant to Changed 
    SW’. For all other blocks an ‘extended runtime preparation’ will take place. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    20 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    >  All blocks that will be processed with the ‘extended runtime preparation’ will be treated 
    as invalid or blank. Thus, it is possible to rewrite a block having been marked as ‘Write 
    Once’. If available, ROM defaults are loaded or the initialization callback is invoked. 
    4.3 
    States 
    The NVRAM Manager is internally organized with a state machine which is shown in the 
    following chapters. 
    4.4 
    Main Functions 
    4.4.1 
    Hardware Independence 
    The NVRAM Manager is independent from its  underlying memory hardware.  It accesses 
    the API of the MEMIF (Memory Abstraction Interface). The MEMIF abstracts the modules 
    FEE  (Flash EEPROM  Emulation)  and  EA  (EEPROM Abstraction) for  the  NVM.  FEE and 
    EA are used for storing data blocks in Flash or EEPROM devices. For selecting at which 
    FEE or EA instance a block shall be stored, the NVM uses a device handle (device ID) that 
    is provided by the MEMIF. 
    4.4.2 
    Synchronous Requests 
    The NVM API services are divided into synchronous and asynchronous requests.  
    The  synchronous  services  are  executed  immediately  when  called.  They  are  executed  in 
    the context of the calling task. This means, that behavior depends on the characteristics of 
    the calling task and not on the NVM. For example, if the calling task is a non-preemptive 
    one, the synchronous NVM request will be executed until it has finished. Otherwise, if the 
    calling  task  is  a  preemptive  one,  the  synchronous  NVM  request  can  be  preempted  by 
    another higher prioritized task. 
    Following NVM API services initiate synchronous requests: 
    >  NvM_Init() 
    >  NvM_SetDataIndex() 
    >  NvM_GetDataIndex() 
    >  NvM_SetBlockProtection() 
    >  NvM_SetBlockLockStatus() 
    >  NvM_SetRamBlockStatus() (for not CRC protected blocks) 
    >  NvM_GetErrorStatus() 
    >  NvM_GetVersionInfo() 
    4.4.3 
    Asynchronous Requests 
    Following NVM API services initiate asynchronous requests: 
    >  NvM_ReadBlock() 
    >  NvM_WriteBlock() 
    >  NvM_RestoreBlockDefaults() 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    21 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    >  NvM_EraseNvBlock() 
    >  NvM_InvalidateNvBlock() 
    >  NvM_SetRamBlockStatus() (for CRC protected blocks) 
    >  NvM_ReadAll() 
    >  NvM_WriteAll() 
    >  NvM_CancelWriteAll() 
    >  NvM_CancelJobs() 
    The API call is handled in the context of the calling task. Here the service is queued and 
    will be processed asynchronously. The processing of the queued requests is done in the 
    context of the caller of the cyclic function NvM_MainFunction(). 
     
     
    Caution 
    RAM blocks must not be accessed by any user while a request to its associated 
      NVRAM Block is pending! 
    There are some exceptions to this limitation: 
    >  NvM_InvalidateNvBlock and NvM_EraseNvBlock don’t access any RAM 
    blocks. Thus access is still possible without limitations 
    >  While the NVM processes an NvM_WriteBlock request, the RAM block may still 
    read. 
    >  Though applications are not expected to be running while NVM processes 
    NvM_WriteAll, RAM blocks may be read, as during NvM_WriteBlock 
    processing. 
     
     
    4.4.4 
    API Configuration Classes and additional API Services 
    Depending  on  the  needs  of  the  customer,  the  extent  of  the  NVM  can  be  tailored. Three 
    configuration classes are specified that offer a different amount of functionality/functions of 
    the NVM: 
    API configuration class 1: 
    A minimum set of API services is used. Queuing and job prioritization are not implemented. 
    Following functions are available: 
    >  NvM_Init() 
    >  NvM_GetErrorStatus() 
    >  NvM_SetRamBlockStatus() 
    >  NvM_ReadAll() 
    >  NvM_WriteAll() 
    >  NvM_CancelWriteAll() 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    22 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    API configuration class 2: 
    Intermediate set of API services. Queuing and job prioritization are implemented. Following 
    functions are available additionally according to API configuration class 1: 
    >  NvM_SetDataIndex() 
    >  NvM_GetDataIndex() 
    >  NvM_ReadBlock() 
    >  NvM_WriteBlock() 
    >  NvM_RestoreBlockDefaults() 
    >  NvM_CancelJobs() 
    API configuration class 3: 
    All  API  services  are  available.  Following  functions  can  be  used  additionally  to  API 
    configuration class 2: 
    >  NvM_SetBlockProtection() 
    >  NvM_EraseNvBlock() 
    >  NvM_InvalidateNvBlock() 
    The  functions  NvM_SetRamBlockStatus()  and  NvM_GetVersionInfo()  can  be 
    enabled/disabled 
    additionally 
    via 
    the 
    configuration 
    tool. 
    The 
    function 
    NvM_SetBlockLockStatus()  is  always  available  independent  of  API  configuration 
    class. 
    4.4.5 
    Block Handling 
    4.4.5.1 
    NV Blocks and Block Handles 
    Every  application’s  data  packet  that  is  intended  for  storage  in  NV  memory  is  seen  as  a 
    block.  For  each  block  a  unique  block  handle  (block  ID)  is  used.  For  the  application  the 
    (RAM) block is just one of its variables associated with the block. To write this variable to 
    NV memory it calls the NvM_WriteBlock() service with the block handle that is mapped 
    to this variable. The block handle names are given during configuration of the NVM. They 
    are published to the application by including NvM.h. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    23 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
     
     
    Note 
    The block handle names are automatically prefixed according to the AUTOSAR 
      Specification EcucConfiguration: 
     <Module Definition>Conf_<Container Definition Short Name>_<Container Instance 
    Short Name> 
    The prefixing has no influence on RTE. 
     
     
     
     
    Caution 
    The actual processing of an asynchronous job (such as a write job) is done in 
      NvM_MainFunction. Therefore it needs to be called cyclically. Usually this is done by 
    the Basic Software Scheduler (SCHM). 
     
     
    4.4.5.2 
    Different Types of NV Blocks 
    The application data can be stored in different types of blocks in the NV memory. 
    4.4.5.2.1 
    Native Blocks 
    This is the standard block type. The data is stored once in the NV area. 
    4.4.5.2.2 
    Redundant Blocks 
    This  type  is  intended  to  increase  availability  of  data,  in  case  of  errors,  i.e.  it  is  not 
    intended  to  provide  additional  error  detection.  The  main  focus  lies  on  write  aborts, 
    especially resets due to under-voltage conditions. 
     
     
    Note 
    It is recommended to configure CRC usage for Redundant Blocks, because CRC 
      provides adequate error detection, beyond the scope of aborts. 
     
     
    The  user  data  is  stored  twice  in  the  NV  area.  While  relying  on  lower  layers’  (FEE/EA) 
    detection of aborted write accesses, NVM makes sure that a readable data block remains 
    readable, even in case of write aborts. 
    For that purpose, before starting a write access, NVM checks primary and secondary NV 
    blocks to determine the adequate write order (which NV block to write first): If it detects a 
    defective NV Block, it is written in preference to a valid NV Block. If writing to one single 
    NV Block failed, the NVM reports the error NVM_E_REQ_FAILED (see chapter 4.5.2) to 
    the  DEM.  If  writing  to  primary  NV  block  failed,  NVM  ends  the  request  always  with  a 
    negative  job  result.  If the  primary  NV  block  was  written  successfully,  the  request  always 
    ends with a positive job result, even when the secondary NV block failed. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    24 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
     
     
    Expert Knowledge 
    NVM does not check any data to determine the write order. Rather, it just checks 
      whether lower layers would find valid data instances (i.e. whether they successfully 
    read a block’s first data byte). At this point, NVM relies on lower layers’ abort detection 
    capabilities. 
     
     
     
     
    Note 
    NVM always attempts writing both NV blocks, regardless of errors reported by lower 
      layers. 
     
     
     A read request is successful even if one block is corrupted but the  other block could be 
    read.  An  erase  or  invalidate  request  is  only  successful  if  both  blocks  could  be  erased 
    respectively invalidated.  
     
     
    Expert Knowledge 
    After a write abort, the “age” of data is not defined. NVM may deliver previous or recent 
      data; in fact it does not distinguish them. Before NVM completed the result with 
    NVM_REQ_OK, clients shall make no assumption on “age” of data in NV memory. 
     
     
    4.4.5.2.3 
    Dataset Blocks 
    A dataset block can be seen as an array. A configurable number of instances of this block 
    are stored in NV-memory. In the RAM area there is only one RAM buffer. The appropriate 
    NV block instance is selected by the so called data index. The data index can be read and 
    set by synchronous API services NvM_GetDataIndex() and NVM_SetDataIndex(). 
    Concept 
    Description 
    Block 
    General notion of the structure composed of data, state and CRC. It is 
    spread over RAM, ROM and NVRAM. 
    NV Block 
    One block in NVRAM – CRC is optional. 
    NV Block of 
    One NV Block of specified type. 
    >  Native type 
    >  Redundant type 
    >  Dataset type 
    RAM Block 
    One data Block in RAM. The data is shared by NVRAM Manager and 
    application. E. g. application writes data to this block and requests 
    NVRAM Manager to write it into NVRAM. 
    ROM Block 
    One data block in ROM. Default data supplied by application. 
    NVRAM Block 
    A logical composition of one RAM block and its corresponding NV and 
    ROM Block. 
    NV = NVRAM 
    Non-volatile memory. Actually a synonym for Flash or EEPROM devices. 
    Table 4-3  
    Block concept 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    25 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    4.4.5.3 
    Permanent and non-permanent RAM Blocks 
    The  RAM  block  (application  variable)  can  be  either  permanent  or  non-permanent.  A 
    permanent RAM block belongs to a NV block that is accessed only by one application. The 
    address of the RAM block is fixed and is stored in the configuration of the NVM. 
    It  is  also  possible  to  have  multiple  applications  accessing  the  same  NV  block.  Each 
    application uses its own RAM block. In this case the RAM block is called non-permanent. 
    As the RAM address is not stored (and may vary) a pointer must be given for reading and 
    writing a non-permanent block. 
     
     
    Caution 
    Asynchronous API functions can be reentered by different tasks. So it is possible that 
      several tasks queue for example a write job at the same time (a task with higher priority 
    might interrupt a lower one). But it is not possible to queue the same block multiple 
    times (neither by different tasks nor for different jobs). So if for instance a read job for 
    block 5 is queued, an erase job for this block can’t be queued before the read job is 
    finished. 
    If one block is used by multiple tasks, which is a common task for non-permanent RAM 
    blocks, the application is responsible for synchronization. Of course if, for example, an 
    erase request is in process the RAM block could be read or written without any effect to 
    the result of the erase job. The only problem is that the NVM does not offer any 
    information to an application what service is currently processed for a block. The 
    application that initiated the service of course does know, but a different application that 
    also uses the block does not. So the safest way for block access is not to use the RAM 
    block as long as it is pending. This way RAM inconsistency can be avoided definitively. 
     
     
    4.4.5.4 
    ROM Defaults 
    ROM defaults can be assigned to any NVRAM block. The ROM defaults block is provided 
    by the application. Alternatively, an initialization callback (see 4.4.13) can be used. These 
    features  are  selected  during  configuration.  It  is  only  possible  to  configure  either  ROM 
    defaults or an initialization callback for a block. 
    ROM defaults can be read explicit (by a call of NvM_RestoreBlockDefaults()). ROM 
    defaults  will  also  be  read  implicitly  during  a  read  request,  if  no  valid  data  could  be  read 
    from  NV-memory,  either  due  to  a  CRC  error  or  because  of  a  failure  reported  by  the 
    underlying MemHwA via MEMIF. 
    4.4.5.5 
    Checksum 
    For  each  block  an  optional  checksum  can  be  configured.  This  checksum  can  be  either 
    CRC16 or CRC32. The checksum will be appended to user data; in NV memory they will 
    be stored consecutively in one single NV block. 
    If  Internal  Buffer  for  CRC  Handling  is  disabled,  Storage for  CRC  must  be provided  by 
    every  single  user;  otherwise  NVM  provides  an  internal  buffer.  In  this  case  it  copies  user 
    data (associated with NVRAM blocks configured with CRC) into an internal buffer, instead 
    of  directly  passing  them  down  to  lower  layers.  Here,  data  gets  appended  with  CRC,  in 
    order to keep both within one NV block, which requires NVM to pass both down with one 
    single write request. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    26 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    If  “Calc  RAM  CRC”  was  additionally  enabled,  NVM  will  internally  store  CRC  values  in 
    RAM,  in  order  to  check  against  them  during  NvM_ReadAll  processing.  Without  internal 
    buffering, additional space in RAM block serves for this purpose. 
    4.4.6 
    Prioritized or non-prioritized Queuing of asynchronous Requests 
    As mentioned before, asynchronous services are not processed immediately but queued 
    and  processed  asynchronously  by  the  NvM_MainFunction().  This  is  necessary  to 
    decrease the runtime of application tasks and to increase the predictability of their duration 
    (synchronous  write  jobs  on  an  EEPROM  or  Flash  would  block  your  task  for  multiple 
    milliseconds up to one second).  
    Jobs  can  be  queued  either  prioritized  or  non-prioritized,  depending  on  the  user 
    configuration.  
    If  job  prioritization  is  configured,  the  priorities  0  (immediate  priority)  until  255  (lowest 
    priority) can be selected for a block. It is important that the priority depends on the block, 
    rather than the request. Multi block requests always have a priority value greater than 255, 
    i.e. their priority is less than the lowest block specific priority; they will be processed after 
    all single block requests have been completed. 
    If block prioritization is not selected, the job queue works as a FIFO buffer. 
    4.4.7 
    Asynchronous Job-End Polling 
    As  alluded  before,  asynchronous  requests  are  processed  in  the  background.  The 
    application  has  the  possibility  to  poll  the  NVM  for  the  end  of  the  service  by  calling 
    NvM_GetErrorStatus().  NVM_REQ_PENDING  will  be  returned  as  long  as  the  job  is 
    queued or in  process. Once the job is finished  NvM_GetErrorStatus()  will  return  the 
    job result. 
    4.4.8 
    Single Block Job End Notifications 
    Alternatively  to  poll  for  the  job-end,  a  job  end  notification  can  be  implemented  and 
    configured for every block. NvM invokes the notification each time a job was processed for 
    the block and informs about the finished job and its result via parameter. 
    The return value of the functions is specified but will not be used by the NVM. 
     
     
    Note 
    There  are  two  different  exceptions  where  the  NvM  does  not  invoke  the  job  end 
      notification: 
    >  During NvM_WriteAll() the single block job end notification won’t be called 
    >  During NvM_ReadAll() the single block job end notification won’t be called, if 
    the block is configured with enabled NvMUseServicePorts. This will be done 
    because during the NvM_ReadAll() the RTE is not initialed yet and callback 
    invocations  could  lead  to  DET  error.  For  all  blocks  with  disabled 
    NvMUseServicePorts the callbacks will be invoked during NvM_ReadAll() 
    without restrictions. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    27 
    based on template version 3.01 




    Technical Reference MICROSAR NVM 
    4.4.9 
    Immediate Priority Jobs and Cancellation of current Jobs 
    If job prioritization is selected, blocks of different priority exist. A new queued, higher prior 
    job, (e.g. priority 5) does not cancel/suspend a lower prioritized job (e.g. priority 10) if this 
    job is already processed. 
    The only  exceptions for this are  immediate priority jobs (priority 0)  which  can suspend a 
    running  job  that  priority  is  less.  The  suspended  job  will  be  restarted  after  all  jobs  with 
    higher priority are finished. 
     
     
    Caution 
    Pay attention that only blocks with high priority (0) can be erased (by using API 
      NvM_EraseNvBlock)! 
     
     
    4.4.10  Asynchronous CRC Calculation 
    The  (re-)calculation  of  a  block’s  CRC  is  done  asynchronously  by  the 
    NvM_MainFunction(). A CRC protected block’s CRC value is calculated every time the 
    block shall be written to NV memory. If a block is read from NV memory the CRC value is 
    recalculated and compared to the one that was just read from NV memory. If configuration 
    option  ‘Calculate  RAM  CRC’  was  enabled  for  a  block,  its  recently  calculated  CRC  value 
    will be stored in RAM for later use. 
    If NvM_SetRamBlockStatus(TRUE) is called, the re-calculation of the CRC value over 
    the  RAM block’s  data  will  also  be  initiated,  if  ‘Calculate  RAM  CRC’  was  enabled for  this 
    block. 
     
     
    Note 
    The purpose of requesting recalculation of the RAM CRC with every call to 
      NvM_SetRamBlockStatus is to provide the possibility to re-use the RAM data even if 
    a reset (short power-loss, watchdog-reset) occurred. 
    NvM attempts so during NvM_ReadAll processing for all NVRAM blocks having ‘Read 
    during ReadAll’ and ‘Calc RAM CRC’ enabled in their configuration: If the block is 
    internally still marked as VALID, NVM calculates the CRC value over current RAM 
    block’s contents and compares it with the value stored elsewhere. If thy match it does 
    not touch RAM contents; rather NVM pretends having successfully read those values 
    from NV. 
     
     
    The CRC calculation is done in the cyclically called service NvM_MainFunction(). To be 
    able to split a CRC calculation job, the number of CRC bytes to be calculated during one 
    cycle can be configured via the configuration tool. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    28 
    based on template version 3.01 




    Technical Reference MICROSAR NVM 
     
     
    Note 
    If an AUTOSAR compliant CRC library implementation is used, the NVM ensures for all 
      supported CRC types that calculated values do not depend on the number of cycles 
    needed for calculation, i.e. for any number of calculation steps any CRC value is 
    guaranteed to be equal to the CRC value calculated over same data with one single 
    call to the appropriate library function. 
    For CRC32 this is a feature in NvM, beyond the requirements of AUTOSAR. 
     
     
    4.4.11  Write Protection 
    The  NVM  supports  write  protection  of  any  NV  Block.  The  API  services 
    NvM_SetBlockProtection() is used for locking and unlocking a NV block. The initial 
    write protection (after reset) can be configured. It will be set during NvM_ReadAll(). 
    A  block  can  also  be  configured  to  be  written  once. The  write  protection  of  such  a  block 
    cannot be removed by an API call. Nevertheless, it is possible to rewrite such a block by 
    using the extended runtime preparation during NvM_ReadAll(). 
     
     
    Caution 
    Pay attention, for a dataset block configured as write once only one dataset can be 
      written. The other datasets can’t be written any more. The whole block is protected 
    after first write. 
     
     
    4.4.12  Erase and Invalidate 
    There  are  two  services  specified  for  making  a  NV  block  unreadable: 
    NvM_EraseNvBlock() and NvM_InvalidateNvBlock(). 
    Invalidating  a  block  is  much  faster  than  erasing  the  block  because  only  the  status 
    information will be invalidated. 
    4.4.13  Init Block Callbacks 
    For any block  ROM defaults  (see  4.4.5.4)  or an initialization callback can be configured. 
    The  initialization  callback  is  called  every  time  the  default  values  of  the  block  have  to be 
    loaded, e.g. during a restore block defaults service or for failed read jobs.  
    In contrast to ROM defaults NvM does not update the RAM data itself, this shall be done 
    within the initialization callback. 
    The return value of the functions is specified but will not be used by the NVM. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    29 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
     
     
    Note
     
    >  Init callback is invoked when the related block is still busy, so no request shall 
     
    be issued until the block isn’t busy any more. 
    >  During NvM_ReadAll() the initialization callback won’t be called, if the block is 
    configured  with  enabled  NvMUseServicePorts.  This  will  be  done  because 
    during  the  NvM_ReadAll()  the  RTE  is  not  initialed  yet  and  callback 
    invocations  could  lead  to  DET  error.  For  all  blocks  with  disabled 
    NvMUseServicePorts the callbacks will be invoked during NvM_ReadAll() 
    without restrictions. 
     
     
     
    4.4.14  Define Locking/ Unlocking Services 
    In preemptive systems, it is necessary to protect some actions of preemption. That means 
    that  a  few  NVM  internal  actions  need  to  be  atomic.  So  for  protecting  these  sequences 
    functions for entering and leaving such a critical section can be configured. By default the 
    Operating System (OS) services are used. 
    The  configuration  tool  can  be  used  to  define  or  configure  services  such  as  the  OSEK 
    services GetResource(…) and ReleaseResource(…) to lock and unlock resources. To 
    use these services of your Operating System, you must also publish the header file of the 
    Operating System via configuration tool (in the ‘MyECU’ window and the included tab ‘OS 
    Services’). 
    4.4.15  Interrupts 
    When  interrupts  occur  during  write  accesses,  they  do  not  corrupt  already  saved  data  or 
    data  to  be  written.  To  ensure  this,  these  critical  sections  have  to  be  locked,  which  is 
    configurable via configuration tool. 
    4.4.16  Data Corruption 
    Write  operations  to  non-volatile  memories  are  non-atomic  operations.  A  power  supply 
    failure  during  write  accesses  may  lead  to  corrupted/invalid  data. Assuring  that  corrupted 
    data will not be signaled as valid is no more the task of the NVM but of the FEE or EA. 
    4.4.17  Concurrent access to NV data for DCM 
    NVM  provides  possibility  to  access  NV  data  concurrently  with  NVM’s  applications. 
    Therefore each configured NVRAM block has an additional alias, the “DCM block”. 
    Aliases have following differences to normal NvM blocks: 
      Aliases have the same configuration as the origin NvM blocks (e.g CRC or length) 
      Aliases are treated as NVRAM blocks without permanent RAM block 
      Aliases are neither read at start-up (during NvM_ReadAll processing) nor written at 
    shut-down (during NvM_WriteAll processing) 
      explicit read or write requests must supply a reference to a temporary RAM block 
      NvM_SetRamBlockStatus invoked for an alias does not have any influence on 
    processing 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    30 
    based on template version 3.01 




    Technical Reference MICROSAR NVM 
      Only one asynchronous request for an alias can be queued at a time 
      If one is already queued, the request will be rejected (API returns E_NOT_OK) 
      NvM_GetErrorStatus works for all aliases, no matter which alias ID is given to the 
    function.  
      There is only one job result for all aliases which is valid until the next alias is 
    requested 
      NvM_SetDataIndex and NvM_GetDataIndex work for all aliases, no matter which 
    alias ID is given to the functions 
      NvM_SetBlockProtection works for all aliases, no matter which alias ID is given to 
    the function 
    All jobs of DCM are always put into Standard Job Queue, even if blocks with immediate 
    priority are requested and job prioritization was enabled. So  cancellation of pending jobs 
    by an immediate DCM-Block is avoided. The original priority itself is kept. 
    For  accessing  the  alias  of  a  NVRAM  block,  NVM  provides  the  global  macro 
    NvM_GetDcmBlockId(<NvMBlockId>)  which  expects  the  origin  NVRAM  BlockId  as 
    parameter and returns the block’s alias of type NvM_BlockIdType.  
     
     
    Note 
    It is recommended that DCM accesses NVRAM data only via aliases. Otherwise the 
      DCM would be responsible for synchronization with every single NVM client (blocks’ 
    owners). 
     
     
     
     
    Caution 
    DCM should lock the block using NvM_SetBlockLockStatus (see chapter 6.4.8) 
      before requesting jobs (via the alias, especially write requests). In case of an error 
    during job processing, DCM should also unlock the block again. If job processing 
    completes successfully the block should remain locked; it will be automatically 
    unlocked after next start-up (NvM_ReadAll processing).  
    A lock itself only affects the original block (i.e. the alias cannot be locked). 
    4.4.18  Explicit synchronization mechanism between application and NVM 
    NvM  supports  an  optional  explicit  synchronization  mechanism  between  application  and 
    NvM.  It  is  realized  by  a  RAM  mirror  in  the  NvM  module.  The  data  is  transferred  by  the 
    application in both directions via callback routines, called by the NvM module. 
    The synchronization mechanism can be configured for every NVRAM block separately. If 
    the synchronization mechanism is configured NvM uses the internal buffer as RAM mirror 
    between  NvM  and  application.  It  is  the  same  internal  buffer  which  is  used  for  Crc 
    calculation (see chapter 4.4.5.1). The size of the internal buffer is the size of the biggest 
    configured block plus configured Crc bytes. 
    If  the  synchronization  mechanism  is  configured,  both  NvMWriteRamBlockToNvM  and 
    NvMReadRamBlockFromNvM must be configured.  
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    31 
    based on template version 3.01 







    Technical Reference MICROSAR NVM 
    It is not useful to configure a permanent RAM block for a block which uses the 
    synchronization mechanism. In this case the RAM block will be ignored. It is also not 
    recommended to configure an Init callback for a block using synchronization mechanism. 
     
     
    Note 
    If Explicit Synchronization was configured for a block, clients may modify RAM contents 
      (which are not visible to NVM) while block is pending. In this case take care they may 
    get overwritten when a pending read completes. 
     
     
    Basic Knowledge 
    By definition, this mechanism serves as permanent RAM block. 
     
     
     
     
     
    Expert Knowledge 
    Calculate RAM CRC 
    and related fast re-validation of RAM data during NvM_ReadAll 
      processing cannot be used along with explicit synchronization mechanism. 
     
     
    4.4.18.1  Explicit synchronization mechanism during write requests 
    After application issued NvM_WriteBlock, application might modify the RAM block until 
    callback  NvMWriteRamBlockToNvM  is  called  by  NvM.  If  NvMWriteRamBlockToNvM  is 
    called, application has to provide a consistent copy of the RAM block to the internal RAM 
    mirror. 
     
     
    Note 
    During calling NvMWriteRamBlockToNvM callback related block is still busy. No 
      request for it shall be issued as long as block is busy. 
     
     
    4.4.18.2  Explicit synchronization mechanism during read requests 
    After  application  issued  NvM_ReadBlock,  application  might  modify  the  RAM  block  until 
    the 
    routine 
    NvMReadRamBlockFromNvM 
    is 
    called 
    by 
    the 
    NvM. 
    If 
    NvMReadRamBlockFromNvM  is  called,  then  application  has  to  copy  the  data  from  the 
    internal RAM mirror to the RAM block.  
     
     
    Note 
    During calling NvMReadRamBlockFromNvM callback related block is still busy. No 
      request for it shall be issued as long as block is busy. 
     
     
    4.5 
    Error Handling 
    4.5.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development error  reporting  is  enabled  (i.e. 
    pre-compile parameter NVM_DEV_ERROR_DETECT == STD_ON). 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    32 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    The reported NVM ID can be seen here [chapter 3]
    The  reported  service  IDs  identify  the  services  which  are  described  in  6.4.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    NvM_Init() 
    0x01 
    NvM_SetDataIndex() 
    0x02 
    NvM_GetDataIndex() 
    0x03 
    NvM_SetBlockProtection() 
    0x04 
    NvM_GetErrorStatus() 
    0x05 
    NvM_SetRamBlockStatus() 
    0x06 
    NvM_ReadBlock() 
    0x07 
    NvM_WriteBlock() 
    0x08 
    NvM_RestoreBlockDefaults() 
    0x09 
    NvM_EraseNvBlock() 
    0x0A 
    NvM_CancelWriteAll()       
    0x0B 
    NvM_InvalidateNvBlock() 
    0x0C 
    NvM_ReadAll() 
    0x0D 
    NvM_WriteAll() 
    0x0E 
    NvM_MainFunction() 
    0x0F 
    NvM_GetVersionInfo() 
    0x10 
    NvM_CancelJobs() 
    0x13 
    NvM_SetBlockLockStatus() 
    Table 4-4  
    Mapping of service IDs to services 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x14 
    NVM_E_NOT_INITIALIZED 
    Every API service, except NvM_Init() and 
    NvM_GetVersionInfo(), may check if NVM has 
    already been initialized. 
    0x15 
    NVM_E_BLOCK_PENDING 
    As long as an asynchronous operation on a certain 
    Block has not been completed, no further requests 
    belonging to this Block are allowed.  
    0x18 
    NVM_E_BLOCK_CONFIG 
    This service is not possible with this configuration. 
    0x0A 
    NVM_E_PARAM_BLOCK_ID 
    NVM API services may check, whether the passed 
    BlockId is in the allowed range. 
    0x0B 
    NVM_E_PARAM_BLOCK_ TYPE  NvM_SetDataIndex() and 
    NvM_GetDataIndex() are restricted to Dataset 
    bocks. If these functions are called with any other 
    bock type, this error code is produced. 
    NvM_RestoreBlockDefaults() is restricted to 
    blocks configured with ROM defaults or an init 
    callback. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    33 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Error Code 
    Description 
    0x0C 
    NVM_E_PARAM_BLOCK_DATA_
    NvM_SetDataIndex() may check the range of the 
    IDX 
    passed DataIndex.  
    0x0D 
    NVM_E_PARAM_ADDRESS 
    A wrong pointer parameter was passed. (NULL_PTR 
    passed in an asynchronous call, e.g. 
    NvM_WriteBlock() for a non-permanent block) 
    0x0E 
    NVM_E_PARAM_DATA 
    A NULL_PTR was passed in one of the synchronous 
    functions NvM_GetDataIndex(), 
    NvM_GetErrorStatus() or 
    NvM_GetVersionInfo(). 
    Table 4-5  
    Errors reported to DET 
    4.5.1.1 
    Parameter Checking 
    AUTOSAR requires that API functions check the validity of their parameters. The checks in 
    Table 4-6 are internal parameter checks of the API functions. 
    The following table shows which parameter checks are performed on which services: 
    Check 
     
    e-
    k c

    g
    ng

    c

     

    he
    i
    d
    c
    he
    c

    c
    na

    he
     c
    he
     
     
    o
    e c
    en
    c
    s
    ti
    he
     c
     c
    a
     Ma
    py
     P
    he
    ex
    s
     
    e’l z  c
    i
    s
    s
    r
    l

    T

     Id
    ndI
    a
    us
    kc
    k
    e c
    k
    nte
    Service
    du
    nt 
     
    ti
    tat
    ocl tat
    ocl
    oi
    Mo
    nii S
    Blo
    me
    B
    S
    B
    Data
    P
    NvM_Init() 
     
     
     
     
     
     
    NvM_SetDataIndex() 
     
     
     
       
     
    NvM_GetDataIndex() 
     
     
     
     
     
     
    NvM_SetBlockProtection() 
     
     
     
     
     
     
    NvM_GetErrorStatus() 
     
     
     
     
     
     
    NvM_GetVersionInfo() 
     
     
     
     
     
     
    NvM_SetRamBlockStatus() 
     
     
     
     
     
     
    NvM_SetBlockLockStatus() 
     
     
     
     
     
     
    NvM_ReadBlock() 
     
     
     
         
    NvM_WriteBlock() 
     
     
     
         
    NvM_RestoreBlockDefaults() 
     
     
     
     
     
     
    NvM_EraseNvBlock() 
     
     
     
       
     
    NvM_CancelWriteAll() 
     
     
     
     
     
     
    NvM_InvalidateNvBlock() 
     
     
     
       
     
    NvM_ReadAll() 
     
     
     
     
     
     
    NvM_WriteAll() 
     
     
     
     
     
     
    NvM_MainFunction() 
     
     
     
     
     
     
    NvM_CancelJobs() 
     
     
     
     
     
     
    Table 4-6  
    Development Error Checking: Assignment of checks to services 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    34 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    4.5.2 
    Production Code Error Reporting 
    NvM checks and reports following error codes to DEM: 
    Error Code 
    Description 
    NVM_E_INTEGRITY_FAILED 
    API request integrity failed 
    NVM_E_REQ_FAILED 
    API request failed 
    NVM_E_WRITE_PROTECTED 
    NvM_WriteBlock, NvM_EraseNvBlock and 
    NvM_InvalidateNvBlock check, if the 
    block with specified BlockId is write-protected, 
    before it is written (or erased or invalidated). 
    NVM_E_QUEUE_OVERFLOW 
    All asynchronous requests can only be en-
    queued if the queue is not full. 
    NVM_E_LOSS_OF_REDUNDANCY 
    One single block of a redundant block is 
    invalid. 
    Table 4-7  
    Errors reported to DEM 
    According to AUTOSAR component specific DEM error codes must be configured in DEM, 
    NvM configuration references them. 
    To report production errors to DEM, NvM uses the Dem_ReportErrorStatus API which 
    has to be published via Dem.h (included if NvM references at least one DEM error code). 
    NvM  invokes  the  DEM  API  with  configured  error  code  and  the  status 
    DEM_EVENT_STATUS_FAILED. 
    NvM 
    never 
    uses 
    the 
    status 
    DEM_EVENT_STATUS_PASSED. 
     
     
    Caution 
    NvM does not report DEM errors without reference to DEM. If any DEM error reporting 
      is required, the NvM error code has to point to a DEM error code. 
     
     
    For more information about DEM see [3] 
    4.5.3 
    Compile-time Block Length Checks 
    For each block  with permanent  RAM or ROM,  NvM provides the Block  Length Check to 
    ensure  the  configured  block  length  and  the  permanent  RAM’s/ROM’s  length  fits  to  each 
    other. 
    There are three different checks for permanent RAM 
    >  Automatic  Block  Length  enabled  (see  4.1.2):  size  of  permanent  RAM  must  not 
    exceed the configured block length 
    >  Strict  Block  Length:  configured  block  length  has  to  match  the  size  of  permanent 
    RAM exactly 
    >  Non-strict  Block  Length:  configured  block  length  must  not  exceed  the  size  of 
    permanent RAM 
    And one for permanent ROM 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    35 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    >  Non-strict  Block  Length:  configured  block  length  must  not  exceed  the  size  of 
    permanent ROM 
     
     
    Basic Knowledge 
    To check the block length during compile time, NvM uses bitfields – those have to be 
      initialized with positive length. Once a bitfield is initialized with negative length (block 
    length check failed), compiler error shall occur and mark the corresponding line. 
     
    Each length check shows all required information: block name, RAM symbol and what 
    is wrong with the block (depends on strict, non-strict or automatic block length) 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    36 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    5  Integration 
    This chapter gives necessary information for the integration of the MICROSAR NVM into 
    an application environment of an ECU. 
    5.1 
    Scope of Delivery 
    The delivery of the NVM contains the files which are described in the chapters 5.1.1 and 
    5.1.2: 
    5.1.1 
    Static Files 
    File Name 
    Description 
    NvM.h 
    This file must not be modified by user. 
    Defines the interface of NVM. Only this file shall be included by the 
    application. 
    NvM_Cbk.h 
    This file must not be modified by user. 
    Contains the declarations of the callback functions being invoked by 
    EEPROM driver 
    NvM_Types.h 
    This file must not be modified by user. 
    Defines general types used by NVM. 
    NvM.c / 
    This file must not be modified by user. 
    NvM.lib/NvM.a 
    Implementation of NVM, delivered as object library. 
    NvM_Act / 
    These are files for internal use of the NvM. 
    NvM_Crc / 
    If NVM is delivered as object then this parts are content of NvM.lib. 
    NvM_JobProc / 
    NvM_Qry / 
    NvM_Queue.c *.h 
    Table 5-1  
    Static files 
    5.1.2 
    Dynamic Files 
    The  dynamic  files  are  generated  by  the  configuration  tool  DaVinci  Configurator.  Do  not 
    modify them manually. 
    File Name 
    Description 
    NvM_Cfg.c 
    It contains configuration parameters of NVM which can be modified after 
    compilation of NvM.c. 
    NvM_Cfg.h 
    Contains public configuration parameters of NVM. They are (or might be) 
    also important to NvM’s user(s), or they may affect NvM’s API 
    It contains also public types and symbol declarations to be used by NVM as 
    well as its user(s). 
    NvM_PrivateCfg.h  Contains parameters as well as type and symbol declarations, which are 
    private to the NvM, i.e. they only affect internal behavior. 
    This file is intended to be included only by NvM’s sources. 
    Table 5-2  
    Generated files   
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    37 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    5.2 
    Critical Sections 
    To protect critical code against interruptions NvM uses following critical section: 
    >  NvM_NVM_EXCLUSIVE_AREA_0 
    5.3 
    Include Structure 
    The  following  figure  illustrates  the  hierarchy  of  included  files.  It  also  shows  that 
    Std_Types.h and Nvm.h must be included by the application. 
     
     
    Figure 5-1 
    The file structure of the NVM sections module 
    5.4 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of NVM and illustrates the relationship among each them. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    38 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Compiler Abstraction 
     

    E
    S
     
     


     
    Definitions
    S
     
    D
    N
    AT
    E
    S

    A
    A
     
    D
    N
     
    N
    E
    S
     
    T
     
    A
    A
    A
    _CO
    _CO
    _D
    T
    D
    N
    T
    A
    _CO
    _D
     
    E
    E
    E
    A
    T
    T
    T
    CO
    CO
    D
    _D
    C_CO
    C_CO
    IG
    IG
     
    A
    A
    A
    V
    V
    V
    T
    LI
    LI
    L_
    L_
    L_
    S
    B
    B
    P
    P
    P
    NF
    NF
    Memory Mapping 
    RI
    RI
    RI
    A
    U
    U
    P
    P
    P
    Sections 
    _P
    _P
    _P
    _F
    _P
    _P
    _A
    _A
    _A
    _CO
    _CO
    M
    M
    M
    M
    M
    M
    M
    M
    M
    M
    M
    NV
    NV
    NV
    NV
    NV
    NV
    NV
    NV
    NV
    NV
    NV
    NVM_START_SEC_CODE 
     
     
     
     
     
     
     
     
     
     
     
    NVM_START_SEC_ 
     
     
     
     
     
     
     
     
     
     
     
    VAR_NOINIT_UNSPECIFIED 
    NVM_START_SEC_VAR_NOINIT_8 
     
     
       
     
     
     
     
     
     
     
     
    NVM_START_SEC_VAR_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
    NVM_START_SEC_VAR_FAST_8 
     
     
     
       
     
     
     
     
     
     
     
    NVM_START_SEC_ 
     
     
     
     
     
     
     
     
     
     
     
    CONST_UNSPECIFIED 
    NVM_START_SEC_CONST_8 
     
     
     
     
     
     
     
     
     
     
     
    NVM_START_SEC_CONST_16 
     
     
     
     
     
     
     
     
     
     
     
    NVM_START_SEC_ 
     
     
     
     
     
     
     
     
     
     
     
    CONST_DESCRIPTOR_TABLE 
    NVM_START_SEC_VAR_POWER_ON_I
    NIT_UNSPECIFIED 
     
     
     
     
     
     
     
     
     
     
     
    Table 5-3  
    Compiler abstraction and memory mapping 
    For  each  start  keyword,  there  is  a  stop  keyword.  As  these  stop  keywords  are  used  to 
    restore the default section, the stop keywords do not need to be configured. 
     
     
    Caution 
    The size of the section NVM_START_SEC_CONST_DESCRIPTOR_TABLE depends 
      on the configuration settings. It makes sense to create an own section for this item if it 
    becomes too big to link it into the same page/section as the elements of the 
    MICROSAR NVM module. In this case the according memory modifier has to be used 
    in order to address the elements in this section. 
     
     
    Above  listed  section  keywords  are  compiler  dependent.  They  are  set  in  the  files 
    MemMap.h and Compiler.h/Compiler_Cfg.h. Compiler pragmas may be used to open and 
    close  a  special  memory  section. As  these  pragmas  are  already  used  when  creating  the 
    NVM library (object code) these parameters are  not  link-time configurable. Libraries  with 
    different settings can be obtained at Vector Informatik GmbH. Please refer to the Software 
    release notes  (SRN)  (or  to  the delivered  MemMap.h,  Compiler.h/Compiler_Cfg.h) for  the 
    settings made for your delivery. 
    NVM_START_SEC_VAR_POWER_ON_INIT_UNSPECIFIED  shall  be  mapped  to  a  section 
    that  is  guaranteed  to be  zeroed  out  after  Power-On  Reset  (therefore  it  may  be  a  normal 
    ZERO_INIT  section,  being  zeroed  out  after  any  reset.  Make  sure  this  helds  true  for  all 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    39 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
    kinds of variable data (esp. uninitialized). If necessary, create a special section (don’t map 
    to a common one). 
    NVM_START_SEC_VAR_UNSPECIFIED  shall  also  be  mapped  to  a  section  that  is 
    guaranteed  to  be  zeroed  out.  It  holds  the  variable  NvM_TaskState_t  which  has  to  be 
    zero since NvM is not initialized. 
     
     
     
    Note 
    The integrator has to make sure specific section related settings (#pragmas) cover all 
      (intended) variables defined within in a particular specific section. (It might be desired, 
    and possible with a compiler to further divide variables, e.g. by type/size/alignment 
    requirements). 
     
     
     
     
    Expert Knowledge 
    It is important to understand that a variable declaration lacking an initializer does not 
      actually mean an uninitialized variable (unless the variable has automatic storage 
    duration)
    Instead, according to ANSI/ISO, every object that has static storage duration is not 
    initialized explicitly 
    (ISO/IEC 9899:1999 chapter 6.7.8 clause 10) shall be initialized 
    (according to the rules defined there). Technically, they shall be initialized to 0 
    However, how a compiler achieves it, is beyond the standard. It is also beyond the 
    standard, how compilers map variables to sections, what default sections they define, 
    etc. 
    A compiler may treat a variable explicitly initialized to 0 like an “uninitialized” variable, it 
    may treat it like an initialized variable, or it may even treat it completely differently (e.g. 
    some compilers can be setup to emit all explicitly initialized variables to a section 
    “.zbss”, in contrast to “.data” and “.bss”, used for initialized, and uninitialized variables, 
    respectively”. 
    Therefore, any section definition (#pragmas) should consider all variables (regardless 
    of existence of an explicit initializer, and/or eventually other differentiations a compiler 
    might provide), unless there’s a good reason to exclude some of them. 
     
     
     
     
    Caution 
    The sections mentioned above have to fit to the linker configuration (linker command 
      file) as well as to the memory modifier settings in the Compiler Abstraction! 
     
     
     
    5.5 
    Dependencies on SW Modules 
    5.5.1 
    OSEK / AUTOSAR OS 
    An  OS  environment  is  not  necessary  unless  it  is  used  for  interrupt  or  resource  locking 
    issues. 
    5.5.2 
    DEM 
    NvM reports runtime errors to DEM. For more information see chapter 4.5.2. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    40 
    based on template version 3.01 




    Technical Reference MICROSAR NVM 
    5.5.3 
    DET 
    Module  DET:  Can  be  used  in  development  mode.  It  records  all  development  errors  for 
    evaluation  purposes.  Its  usage  can  be  enabled/disabled  via  configuration  tool  by  the 
    switch Development Error Reporting
    5.5.4 
    MEMIF 
    The NVM uses configuration parameters defined by the MEMIF. 
    5.5.5 
    CRC Library 
    For  CRC  calculations  the  NVM  uses  the  services  provided  by  an  AUTOSAR  compliant 
    CRC Library. 
     
     
    Note 
    Since the Configuration Id Block must be configured with either CRC16 or CRC32; 
      you will always need the CRC library. 
     
     
    5.5.6 
    Callback Functions 
    MICROSAR  NVM  offers  the  usage  of  notifications  that  can  be  mapped  to  callback 
    functions  provided  by  other  modules,  in  order  to  inform  them  about  job  completion.  For 
    each  NVRAM  block  a  separate  callback  function  may  be  defined  by  application.  These 
    callback function declarations must be made within the application and be included by the 
    NVM. 
    5.5.7 
    RTE 
    When  at  least  one  Service  Port  is  enabled  and  corresponding  PIM  (see  Technical 
    Reference  of  RTE)  is  available,  all  additional  necessary  header  files  are  included 
    automatically. SWC must not include NvM.h. 
    5.5.8 
    BSWM 
    If the switch BSWM Multi Block Job Status Information is enabled the NVM shall inform 
    the 
    BSWM 
    about 
    the 
    current 
    state 
    of 

    multi 
    block 
    job 
    via 
    BswM_NvM_CurrentJobMode(). The multi job callback is not called. 
     
     
    Note 
    During calling BswM_NvM_CurrentJobMode(), if called with status 
      NVM_REQ_PENDING, callback related block is still busy. No request for it shall be 
    issued as long as block is busy. 
     
     
    If  the  switch  BSWM  Block Status  Information  for  a  single  block  is  true,  the  NVM  shall 
    inform 
    the 
    BSWM 
    about 
    the 
    current 
    state 
    of 
    the 
    block 
    via 
    BswM_NvM_CurrentBlockMode(). 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    41 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
     
     
    Note 
    During calling BswM_NvM_CurrentBlockMode(),if called with status 
      NVM_REQ_PENDING, callback related block is still busy. No request for it shall be 
    issued as long as block is busy. 
     
     
     
    5.6 
    Integration Steps 
    To integrate MICROSAR NVM into your system, several steps beginning with configuration 
    have to be done: 
    >  Configure MICROSAR NVM and MICROSAR MEMIF according to applications’ 
    requirements using MICROSAR configuration tool or a GCE editor.  
    >  Generate the configuration files of the modules NVM and MEMIF. 
    >  Configure and generate the lower modules FEE/EA and the driver modules for 
    FLS/EEP. 
    >  If a FEE or EA module is used that is not delivered by Vector, make sure that the 
    parameters that are exchanged between the two modules are consistent. 
    >  Each application is responsible to make their RAM and ROM blocks available (do not 
    use the static modifier!). The MICROSAR NVM includes the file that declares these 
    blocks and defines memory modifier to address the blocks. This memory modifier can 
    be changed in the Compiler.h. 
    >  Make sure all applications using MICROSAR NVM include Std_Types.h and NvM.h 
    (in that order). 
    >  Check the initialization of the drivers FLS/EEP, FEE/EA and the MICROSAR NVM 
    (MICROSAR NVM does not initialize any other module). 
    >  Make sure that the initialization sequence is correct. FEE/EA and FLS/EEP must be 
    initialized before any NVM request (usually NvM_ReadAll()) can be used. Take care 
    initialization sequence of FEE/EA must be finished until FEE/EA is able to accept a job 
    from NvM. In case Fee_MainFunction calls and/or Fls_MainFunction calls are 
    necessary to finish initialization process for FEE/EA the calls have to be executed 
    before NvM requests the first job to FEE/EA.  
    >  Ensure that the main functions of the NVM, the FEE/EA and the FLS/EEP drivers are 
    called cyclically. This must be done within an application task running at sufficient 
    priority (to avoid starving). 
    >  Ensure that a waiting task frees CPU to make it possible that the action for the task is 
    waiting for, can be done! 
    Finally: Compile and link your MICROSAR NVM together with your project. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    42 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    5.7 
    Estimating Resource Consumption 
    Besides resources needed anyway when using NVM, there are some configuration options 
    influencing  resource  consumption  of  your  system.  In  general  these  options  affect  usage 
    independently  of  the  number  of  configured  NVRAM  blocks.  Additionally  each  NVRAM 
    block  requires  resources  in  RAM,  ROM  and  NV,  respectively. The  following  sections  will 
    summarize the options and give you hints, how to estimate their effects. 
    5.7.1 
    RAM Usage 
    In general, each NVRAM block consumes RAM – for the application-defined RAM-block as 
    well as for the internal block management structure, which holds information about request 
    results, blocks’ attributes and its current data index. The amount of RAM occupied by the 
    RAM  block  itself  should  be  equal  to  the  configured  length.  However,  the  actual  size 
    depends  on  the  size  of  the  object  (variable)  the  application  declares.  The  size  of  each 
    management area is currently 3 bytes. 
    However, though they need to be considered when estimating (overall) RAM consumption, 
    RAM blocks technically belong to the clients of NVM. 
    The configuration options affecting RAM consumption pertain to size of the  queue(s) and 
    the option  job prioritization. The  size  of  one  queue  entry  depends  on  the  target  platform 
    and the compiler options used. It ranges from 8 bytes (16 bit platform, 16bit pointers) to 12 
    bytes (32bit architectures, aligned structure members). 
    Additionally the setting Internal Buffer for Crc Handling affects RAM usage: If enabled, 
    the NVM internally allocates a RAM buffer. Its size is at least the size of largest NVRAM 
    block configured with CRC, including CRC size. Sizes of NVRAM Blocks configured with 
    Use  Synchronisation  Mechanism,  will  also  be  considered  in  calculation  of  internal 
    buffer’s size. 
    Additionally, each NVRAM block with Calc RAM Block CRC gets a dedicated RAM area 
    for CRC storage,  exactly matching CRC’s size. As a result,  applications’  RAM blocks  do 
    not  need  to  provide  additional  space  for  CRC.  Therefore  it  does  not  affect  RAM 
    consumption. 
    5.7.2 
    ROM Usage 
    Because each NVRAM block’s configuration is compiled into a constant block descriptor, 
    the  ROM  needed  is  also  affected  by  the  whole  number  of  configured  NVRAM  blocks. 
    Again, the size of one descriptor varies with the target platform and the compiler options 
    used.  
    There are some configuration options affecting NVM code size. The options  
    >  Development mode 
    >  API configuration class 
    >  use Version Info API 
    >  use Set Ram Block Status API 
    result in switching on/off complete code sections. 
    NVM’s  ROM  usage  does  not  depend  on  block  configured  with  ROM  defaults.  ROM 
    default blocks (defining default data) belong to the clients of NVM, as any callbacks do.  
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    43 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    5.7.3 
    NV Usage 
    The requirements on NV memory space per device are affected by the NVRAM blocks and 
    their  configuration.  Basically,  each  NV  block  allocates  as many  bytes  as  specified for  its 
    length,  plus  CRC  bytes  (if  configured).  Underlying  components  (FEE  or  EA)  would  also 
    add  internal  management  information,  as  well  as  padding  bytes  to  meet  NV  memory 
    device’s alignment requirements. 
    According to the management type of the NVRAM block, it consists of one or more blocks 
    consuming NV space: 
    >  NATIVE         1 NV Block 
    >  REDUNDANT  2 NV Blocks 
    >  DATASET       Count NV Blocks 
    5.8 
    How-To: Integrate NVM with AUTOSAR3 SWC’s 
    Embedded Interface of ASR4 NVM is NOT compatible with ASR3; especially return types 
    have been changed. 
    However, RTE encapsulates all of them: If an SWC calls a C/S-Interface’s operation (via 
    RTE), it always gets Std_ReturnType. 
    Finally, existing embedded code – SWCs as well as NVM itself – compiles against these 
    changed interfaces without modifications. 
    Unfortunately, to achieve this embedded compatibility, SWC-descriptions (which instruct 
    the RTE generator, how to create compatible code) slightly differ between AUTOSAR 
    services. Users will have to adapt their clients’ interface references in order to use 
    AUTOSAR4 BSW along with AUTOSAR3 SWCs. 
    5.8.1 
    NVM’s provided Interfaces/Ports. 
    Every interface used by client SWCs needs to be remapped. 
    5.8.1.1 
    NvMAdministration 
    The only operation – SetBlockProtection – changed from POSSIBLE-ERRORS() to 
    POSSIBLE-ERRORS(E_NOT_OK). 
    This definition may be exchanged at R-Port side, because the embedded software already 
    used Std_ReturnType (and E_OK/E_NOT_OK), due to RTE API. Code should have been 
    implemented in a defensive way, i.e. it should check return values. 
    However, this operation can only fail, if development error detection was enabled. 
    5.8.1.2 
    NvMService_AC[1|2|3][_SRBS][_Defs] 
    For information about naming, please refer to 7.1.4 
    Return types (POSSIBLE-ERRORS) of following operations changed: 
    >  GetErrorStatus 
    >  GetDataIndex 
    >  SetDataIndex 
    >  SetRamBlockStatus 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    44 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
     
     
    Note 
    NvM_SetDataIndex and NvM_GetDataIndex may fail if “Development Error 
      Detection” is disabled. 
     
     
     
    Similar to NvMAdministration interface, clients’ R-Port Prototypes must be associated with 
    these new interfaces. The implications on Runnables’ implementations are the same as 
    above – no changes are necessary. 
    5.8.2 
    Callbacks (Ports provided by client SWCs) 
    Actually, callbacks specifications did not change from AUTOSAR3 to AUTOSAR4. 
    However,  a  recent  feature  added  to  DaVinci  Developer  and  RTE  Generator  allows  for 
    more flexibility in modeling and implementing callback’ signatures.  Refer to chapter 7.1.5 
    for  information  the  relationship  between  modelled  callbacks  (SWC’s  P-Ports)  and  their 
    RUNNABLEs’ prototypes. 
    5.8.3 
    Request Result Types 
    In AUTOSAR4 new values for NvM_RequestResultType have been defined, namely 
    NVM_REQ_REDUNDANCY_FAILED and NVM_REQ_RESTORED_FROM_ROM. 
    However, since their actual usage is not specified, they will not be used by NVM; its 
    interface description omits them, and clients do not need to deal with them.  
    Finally, NvM uses the same set of request result values that was specified in AUTOSAR3. 
    Therefore, this change in specification does not require any actions. 
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    45 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    6  API Description 
    6.1 
    Interfaces Overview 
    For an interfaces overview please see Figure 3-2. 
    6.2 
    Type Definitions 
    Type Name 
    C-Type  Description 
    Value Range 
    NvM_RequestResult 
    uint8 
    An asynchronous API 
    NVM_REQ_OK (see chapter 
    Type 
    service can have following  4.5.1) 
    results or status that can 
    The last asynchronous request has 
    be polled by 
    been finished successfully. This is the 
    NvM_GetErrorStatus default value after reset. This status 
    (). 
    has the value 0. 
    Can be delivered by all asynchronous 
    APIs. 
    NVM_REQ_NOT_OK (see 
    chapter 4.5.1) 
    The last asynchronous request has 
    been finished unsuccessfully. 
    Can be delivered by all asynchronous 
    APIs. 
    NVM_REQ_PENDING (see 
    chapter 4.5.1) 
    An asynchronous request is currently 
    being processed by the task. 
    Can be delivered by all asynchronous 
    APIs. 
    NVM_REQ_INTEGRITY_FAILED 
    (see chapter 4.5.1) 
    A NV block was supposed to be valid 
    but it turned out that the data are 
    corrupted (either CRC mismatch or the 
    FEE or the EA reported an 
    inconsistency). 
    Can be delivered by NvM_ReadBlock 
    or NvM_ReadAll. 
    NVM_REQ_BLOCK_SKIPPED (see 
    chapter 4.5.1) 
    The block was skipped during a multi 
    block request. 
    Can be delivered by NvM_ReadAll and 
    NvM_WriteAll. 
    NVM_REQ_NV_INVALIDATED 
    (see chapter 4.5.1) 
    The NV block is marked as invalid. 
    Can be delivered by NvM_ReadBlock 
    or NvM_ReadAll. 
    NVM_REQ_CANCELLED (see 
    chapter 4.5.1) 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    46 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Type Name 
    C-Type  Description 
    Value Range 
    The last asynchronous 
    NvM_WriteAll() has been  
    cancelled by 
    NvM_CancelWriteAll(). 
    NvM_BlockIdType 
    uint16 
    It is the type of a block 
    {
    [0. .2𝑛[, ]215. . 215 + 2𝑛[,

    handle that is used by the 
     𝑛 = 16 − NVM_DATASET_SELECTION_BITS
    application in order to 
     
    access a NVM block. There  NVM_DATASET_SELECTION_BITS 
    are two reserved IDs: 
    is the maximum number of bits that are 
    >  Block ID 0 for multi 
    needed in order to store the maximum 
    block requests (Block ID  dataset value. 
    0 is only allowed for API  The second range describes each 
    NvM_GetErrorStatus())  block’s DCM alias. Block ID 0 does not 
    and 
    have such an alias. 
    >  Block ID 1 for the 
    Example: 
    configuration Id block 
    The dataset block with the greatest 
    The block handles are 
    number of datasets has six of them. So 
    created as defines in an 
    it is necessary to store the data index 
    ascending define list. 
    0…5 to select the appropriate dataset 
    block. To store the value five, three bits 
     
    are necessary. So 
     
    NVM_DATASET_SELECTION_BITS has 
    the value 3. 
    This means that only the block IDs 
    0 … 8191 are available as block 
    handles. Additionally NVM provides 
    access to these IDs’ block aliases via 
    handles 32768+1 … 32768+8191 
    NvM_ServiceIdType 
    uint8 
    Service Ids of the different  NVM_INIT (0u) 
    service routines of the 
    NVM_SET_DATA_INDEX (1u) 
    NVM. 
    NVM_GET_DATA_INDEX (2u) 
    NVM_SET_BLOCK_PROTECTION 
    (3u) 
    NVM_GET_ERROR_STATUS (4u) 
    NVM_SET_RAM_BLOCK_STATUS 
    (5u) 
    NVM_READ_BLOCK (6u) 
    NVM_WRITE_BLOCK (7u) 
    NVM_RESTORE_BLOCK_DEFAULTS 
    (8u) 
    NVM_ERASE_BLOCK (9u) 
    NVM_CANCEL_WRITE_ALL (10u) 
    NVM_INVALIDATE_NV_BLOCK 
    (11u) 
    NVM_READ_ALL (12u) 
    NVM_WRITE_ALL (13u) 
    NVM_MAINFUNCTION (14u) 
    NVM_GET_VERSION_INFO (15u) 
    NVM_SET_BLOCK_LOCK_STATUS 
    (16u) 
    The single values are applied as 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    47 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Type Name 
    C-Type  Description 
    Value Range 
    defines. 
    See also chapter 4.5.1 
    Table 6-1  
    Type definitions 
    6.3 
    Global API Constants 
    These  NVM  specific  constants  are  available  through  the  inclusion  of  NvM.h.  They  are 
    configurable within DaVinci Configurator Pro. 
    >  NVM_COMPILED_CONFIG_ID: configured identifier for the NV memory layout  
    >  NVM_NO_OF_BLOCK_IDS: number of all defined NVRAM Blocks (including reserved 
    blocks) 
    >  Name of the NVRAM blocks 
    6.4 
    Services provided by NVM 
    The NVM API consists of services, which are realized by function calls. 
    6.4.1 
    NvM_Init 
    Prototype 
    void NvM_Init ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    Service for basic NVM initialization. The time consuming NVRAM block initialization and setup according to 
    the block descriptor is done by the NvM_ReadAll request. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    >  This service is always available. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    >  It is expected to be exclusively called by ECU State Manager (or a comparable component) 
    Table 6-2  
    NvM_Init 
    6.4.2 
    NvM_SetDataIndex 
    Prototype 
    Std_ReturnType NvM_SetDataIndex ( NvM_BlockIdType BlockId,  
                                      uint8 DataIndex ) 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    48 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Parameter 
    BlockId 
    The Block identifier. 
    DataIndex 
    Index position of a Block in the NV Block of Dataset type. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. Det error occurred. 
    Functional Description 
    The request sets the specified index to associate a dataset NV block (with/without ROM blocks) with its 
    corresponding RAM block. The DataIndex needs to have a valid value before a read/write/erase or 
    invalidate request is initiated. 
    If the dataset block has a set of ROM defaults, this function is used (prior to NvM_ReadBlock()) to select 
    the appropriate ROM set.  
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM manager shall have been initialized before this request is called. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-3  
    NvM_SetDataIndex 
    6.4.3 
    NvM_GetDataIndex 
    Prototype 
    Std_ReturnType NvM_GetDataIndex ( NvM_BlockIdType BlockId,  
                                      uint8* DataIndexPtr ) 
    Parameter 
    BlockId 
    The Block identifier. 
    DataIndexPtr 
    Address where the current DataIndex shall be written to 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. Det error occurred. 
    Functional Description 
    The request passes the current DataIndex (association) of the specified dataset block. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    49 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-4  
    NvM_GetDataIndex 
    6.4.4 
    NvM_SetBlockProtection 
    Prototype 
    Std_ReturnType NvM_SetBlockProtection( NvM_BlockIdType BlockId,  
                                           boolean ProtectionEnabled ) 
    Parameter 
    BlockId 
    The Block identifier. 
    ProtectionEnabled 
    This parameter is responsible for setting the write protection of a selected 
    NVRAM block: 
    TRUE: enable protection 
    FALSE: disable protection 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. Det error occurred. 
    Functional Description 
    The request sets the write protection for the NV block. Any further write/erase/invalidate requests to the 
    NVRAM block are rejected synchronously if the NV block-write protection is set. The data area of the RAM 
    block remains writable in any case.  
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. The protection 
    cannot be released for a write once block that has already been written. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-5  
    NvM_SetBlockProtection 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    50 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    6.4.5 
    NvM_GetErrorStatus 
    Prototype 
    Std_ReturnType NvM_GetErrorStatus ( NvM_BlockIdType BlockId,   
                                  NvM_RequestResultType* RequestResultPtr ) 
    Parameter 
    BlockId 
    The Block identifier. 
    RequestResultPtr 
    Pointer where the result shall be written to. 
    Result is of type NvM_RequestResultType. All possible results are 
    described in chapter 6.2. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. Det error occurred. 
    Functional Description 
    The request reads the block dependent error/status information and writes it to the given address. The 
    status/error information was set by a former or current asynchronous request. 
    This API can also be requested with BlockId 0 (multi block). Then the multi block error/status information 
    will be read to the given address. Only NvM_ReadAll() and NvM_WriteAll() are multi block requests 
    and change the status/error information of the multi block. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-6  
    NvM_GetErrorStatus 
    6.4.6 
    NvM_GetVersionInfo 
    Prototype 
    void NvM_GetVersionInfo ( Std_VersionInfoType* versioninfo ) 
    Parameter 
    versioninfo 
    Pointer to the address where the version info shall be written to. 
    Return code 
    void 
    -- 
    Functional Description 
    The request writes the version info (Vendor ID, module ID, SW major version, SW minor version, SW patch 
    version) to the given pointer. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is available if the pre-compile switch Use version info API is enabled. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    51 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-7  
    NvM_GetVersionInfo 
    6.4.7 
    NvM_SetRamBlockStatus 
    Prototype 
    Std_ReturnType NvM_SetRamBlockStatus ( NvM_BlockIdType BlockId,   
                                           boolean BlockChanged )  
    Parameter 
    BlockId 
    The block identifier. 
    BlockChanged 
    Sets the new status of the RAM block: 
    TRUE: Validates the RAM block and marks it as changed. If the block has a 
    CRC and the option NVM_CALC_RAM_BLOCK_CRC is TRUE the CRC 
    calculation is initiated. 
    FALSE: Mark the block as unchanged 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. Det error occurred. 
    Functional Description 
    The request sets a block’s status to valid/changed respectively to unchanged. Setting a block to changed 
    marks it for writing it during NvM_WriteAll(). 
    If the block shall be set to changed, it has a CRC and the option NVM_CALC_RAM_BLOCK_CRC is TRUE the 
    CRC calculation of the RAM block is initiated. 
     
     
     
    Note 
    Though this service is defined to operate synchronously, the CRC re-calculation will be 
      performed asynchronously. However, there is no restriction on accessing RAM block data, or 
    on calling other services. Consistency of data and CRC is ensured by WriteBlock/WriteAll, 
    which will unconditionally recalculate the CRC before writing. Requesting CRC re-calculation, 
    using NvM_SetRamBlockStatus again, will be recognized in a save way, the calculation 
    will be re-queued, if necessary.. 
     
     
     
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-8  
    NvM_SetRamBlockStatus 
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    52 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    6.4.8 
    NvM_SetBlockLockStatus 
    Prototype 
    void NvM_SetBlockLockStatus( NvM_BlockIdType BlockId,  
                                 boolean BlockLocked ) 
    Parameter 
    BlockId 
    The Block identifier. 
    BlockLocked 
    This parameter is responsible for setting the lock protection status of a 
    selected NVRAM block: 
    TRUE: Lock shall be enabled  
    FALSE: Lock shall be disabled 
    Return code 

     
    Functional Description 
    Service for setting/resetting the lock of a NV block.  
    If locked, the NV contents associated to the NVRAM block identified by BlockId, will not be modified by any 
    subsequent write request, i.e. the Block will be skipped during NvM_WriteAll; other requests, namely 
    NvM_WriteBlock, NvM_InvalidateNvBlock, NvM_EraseNvBlock, will be rejected without error 
    notification to Det or Dem; i.e. they just return E_NOT_OK.  
    During processing of NvM_ReadAll, a locked NVRAM block shall be loaded from NV memory, regardless 
    of RAM block’s state (see 4.4.10). After that the lock is disabled again. 
    If a block gets locked with NvM_SetBlockLockStatus, only the original NVRAM block is locked, 
    regardless which BlockId was passed - original or DCM (see chapter 4.4.17) 
     
     
     
    Expert Knowledge 
    It is allowed to use this service for an already pending block. However, setting a lock 
      affects only subsequent requests; an already pending write will be processed. 
    This is a deviation from AUTOSAR, which prohibits this request for a pending block.  
     
     
     
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is re-entrant. 
    >  This service is always available independent on API configuration class. 
    >  The NVRAM Manager shall have been initialized before this request is called. The protection 
    cannot be released for a write once block that has already been written. 
    >  The service is only usable by BSW components; it is not accessible via RTE. 
     
    Expected Caller Context 
    >  This service is expected to be called by DCM. 
    Table 6-9  
    NvM_SetBlockLockStatus 
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    53 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    6.4.9 
    NvM_MainFunction 
    Prototype 
    void NvM_MainFunction ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    This function has to be called cyclically. It is the entry point of the NVRAM Manager. In here the processing 
    of the asynchronous jobs (read/write/erase/invalidate/CRC calculation…) is handled. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-10  
    NvM_MainFunction 
    6.4.10  NvM_ReadBlock 
    Prototype 
    Std_ReturnType NvM_ReadBlock ( NvM_BlockIdType BlockId,  
                                   void* NvM_DstPtr ) 
    Parameter 
    BlockId 
    The Block identifier. 
    NvM_DstPtr 
    Pointer where the data of a non-permanent RAM block shall be written to. If 
    the block is permanent NULL_PTR shall be passed. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. because of a list overflow. 
    Functional Description 
    Request to copy the data of the NV block to its corresponding RAM block. This function queues the read 
    request and returns the acceptance result synchronously.  
    The NVM can notify the application by callback when the service is finished.  
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    54 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. In development 
    mode the service will not accept the call if the block is already queued (either for this or for a 
    different service). 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-11  
    NvM_ReadBlock 
    6.4.11  NvM_WriteBlock 
    Prototype 
    Std_ReturnType NvM_WriteBlock ( NvM_BlockIdType BlockId,  
                                    const void* NvM_SrcPtr ) 
    Parameter 
    BlockId 
    The Block identifier. 
    NvM_SrcPtr 
    Pointer where the data of a non-permanent RAM block shall be read from. If 
    the block is permanent, NULL_PTR shall be passed. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. list overflow. 
    Functional Description 
    Request for copying data from the RAM block to its corresponding NV block. This function queues the write 
    request and returns the acceptance result synchronously.  
    If the block has a CRC, the RAM block CRC will be recalculated before the data and the CRC are written to 
    the NV memory, even if the service NvM_SetRamBlockStatus was called before and the configuration 
    was set that within this service, the CRC calculation should be done. 
    If writing the data to NV memory fails, the NVM will retry writing. The number of write retries is a 
    configuration option. 
    The NVM can notify the application by callback when the service is finished.  
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    55 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. In development 
    mode the service will not accept the call if the block is already queued (either for this or for a 
    different service). If the block’s write protection is activated it can’t be written. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-12  
    NvM_WriteBlock 
    6.4.12  NvM_RestoreBlockDefaults 
    Prototype 
    Std_ReturnType NvM_RestoreBlockDefaults ( NvM_BlockIdType BlockId,   
                                              void* NvM_DstPtr ) 
    Parameter 
    BlockId 
    The Block identifier. 
    NvM_DstPtr 
    Pointer where the data of a non-permanent RAM block shall be written to. If 
    the block is permanent, NULL_PTR shall be passed. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. list overflow. 
    Functional Description 
    Request to copy the ROM block default data to its corresponding RAM block. The selected block needs 
    either ROM defaults or an initialization callback.  
    This function queues the restore request and returns the acceptance result synchronously.  
    The NVM can notify the application by callback when the service is finished.  
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    56 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. In development 
    mode the service will not accept the call if the block is already queued (either for this or for a 
    different service). This function is not intended for reading ROM sets of a dataset ROM block. 
    Use NvM_ReadBlock instead for these blocks. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-13  
    NvM_RestoreBlockDefaults 
    6.4.13  NvM_EraseNvBlock 
    Prototype 
    Std_ReturnType NvM_EraseNvBlock ( NvM_BlockIdType BlockId ) 
    Parameter 
    BlockId 
    The Block identifier. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. list overflow. 
    Functional Description 
    Request to erase a specified NV block. This function queues the erase request and returns the acceptance 
    result synchronously. 
    The NVM can notify the application by callback when the service is finished. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    57 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. In development 
    mode the service will not accept the call if the block is already queued (either for this or for a 
    different service). If the block’s write protection is activated it also can’t be erased. 
     
     
    Caution
     
    Pay attention that only high priority jobs (priority 0) can be erased! 
     
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-14  
    NvM_EraseNvBlock 
    6.4.14  NvM_InvalidateNvBlock 
    Prototype 
    Std_ReturnType NvM_InvalidateNvBlock ( NvM_BlockIdType BlockId ) 
    Parameter 
    BlockId 
    The Block identifier. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. list overflow. 
    Functional Description 
    Request to invalidate a specified NV block. This function queues the invalidate request and returns the 
    acceptance result synchronously.  
    The NVM can notify the application by callback when the service is finished. 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called. In development 
    mode the service will not accept the call if the block is already queued (either for this or for a 
    different service). If the block’s write protection is activated it also can’t be invalidated. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    58 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-15  
    NvM_InvalidateNvBlock 
    6.4.15  NvM_ReadAll 
    Prototype 
    void NvM_ReadAll ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    Request to (re)load all RAM blocks that have the option NVM_SELECT_BLOCK_FOR_READALL 
    selected. The function queues the request that will be processed asynchronously in 
    NvM_MainFunction. 
    Before reloading a block’s NV data, it first checks if the RAM block data is still valid. This can only 
    be assured if the block has a checksum. In case of valid RAM data, the NV data will not be 
    reloaded. 
     
     
     
    Caution
     
    Non-permanent blocks and dataset blocks are also skipped during a ReadAll job. 
     
     
     
    The first block that is read from NV memory is the configuration ID (block 1). The value is 
    compared to the compiled configuration ID. The result of this check affects the further processing 
    of the ReadAll job, depending on the setting of Dynamic Configuration Handling: If disabled, all 
    NVRAM blocks will be processed as described above, regardless of the result of 
    reading/checking the configuration ID (match/mismatch/block invalid/integrity error/read failure). 
    If Dynamic Configuration Handling is enabled, the NVM loads all NVRAM blocks as described 
    above, only if it detected a configuration ID match. Otherwise (including failures) those blocks 
    having option Resistant to Changed Software set will be loaded as if the configuration ID 
    matched. The NVRAM blocks having this option cleared will be restored with ROM defaults, if 
    available, and if Select for ReadAll was configured. 
    When the last block is reloaded the NVM can notify the application by callback (configurable multi 
    block callback). 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    59 
    based on template version 3.01 





    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is a multi block request. 
    >  This service is asynchronous. 
    >  This service is non re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new 
      requests for a pending block. 
     
     
     
    Expected Caller Context 
    >  This function is intended only to be called by the ECU State Manager during startup. 
    Table 6-16  
    NvM_ReadAll 
    6.4.16  NvM_WriteAll 
    Prototype 
    void NvM_WriteAll ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    Request to write all blocks with changed RAM data that have the option 
    NVM_SELECT_BLOCK_FOR_WRITEALL selected to the NV memory. The function will queue the WriteAll job 
    that will be processed asynchronously. 
     
     
    Caution 
    Non-permanent and dataset blocks will not be written during NvM_WriteAll(). 
     
     
     
    When the last block is written the NVM can notify the application by callback (configurable multiblock 
    callback). 
     
     
    Note 
    It is not recommended to make any assumption on the order in which blocks will be 
      processed. 
    It is only ensured that the ConfigID block (ID1) is the final block being processed, in 
    order to “commit” a Configuration Update and any related activity. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    60 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is a multi block request. 
    >  This service is asynchronous. 
    >  This service is non re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
     
     
    Note 
    Usage of Explicit Synchronization, does not permit NvM’s clients to issue new requests for a 
      pending block. 
     
     
     
    Expected Caller Context 
    >  This function is intended only to be called by the ECU State Manager during shutdown. 
    Table 6-17  
    NvM_WriteAll 
    6.4.17  NvM_CancelWriteAll 
    Prototype 
    void NvM_CancelWriteAll ( void ) 
    Parameter 
    -- 
    -- 
    Return code 
    void 
    -- 
    Functional Description 
    Request to cancel a running NvM_WriteAll() request. This call en-queues the request that will be 
    processed asynchronously. 
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is non re-entrant. 
    >  This service is always available. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-18  
    NvM_CancelWriteAll 
    6.4.18  NvM_KillWriteAll 
    Prototype 
    void NvM_KillWriteAll ( void ) 
    Parameter 
    -- 
    -- 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    61 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Return code 
    void 
    -- 
    Functional Description 
    Request to cancel a running NvM_WriteAll() request destructively. To keep required wake-up response 
    times in an ECU the ECUM has the possibility to time-out a non-destructive NvM_CancelWriteAll() 
    request. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    >  This service is available if the pre-compile switch NvmKillWriteAllApi (only in Generic Editor 
    in container Nvm_30_CommonVendorParams) is enabled independent on API configuration 
    class. 
    >  The NVRAM Manager shall have been initialized before this request is called. 
    Expected Caller Context 
    >  This service is expected to be called by ECUM 
    Table 6-19  
    NvM_KilllWriteAll 
    6.4.19  NvM_CancelJobs 
    Prototype 
    Std_ReturnType NvM_CancelJobs ( NvM_BlockIdType BlockId) 
    Parameter 
    BlockId 
    The Block identifier. 
    Return code 
    E_OK 
    Request has been accepted. 
    E_NOT_OK 
    Request has not been accepted, e.g. because of a list overflow. 
    Functional Description 
    Request to cancel pending job for a NV Block.  
    Particularities and Limitations 
    >  This service is asynchronous. 
    >  This service is re-entrant. 
    >  This service is available if API configuration class 2 or 3 is configured.  
    >  The NVRAM Manager shall have been initialized before this request is called.  
    >  Was Cancellation successful Block result is set to NVM_REQ_CANCELED. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 6-20  
    NvM_CancelJobs 
    6.4.20  NvM_RepairRedundantBlocks 
    Prototype 
    void NvM_RepairRedundantBlocks (void) 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    62 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Parameter 


    Return code 


    Functional Description 
    Request to check the redundancy within NV RAM for all configured redundant blocks. Write 
    protection or lock state does not matter – NvM do not change the data, it always overwrites 
    blocks with data from NV RAM. 
     
    If the NvM recognizes a lost redundancy, it will try to restore it via overwriting the defect block with 
    data from valid block. 
     
    Nothing to repair: 

    Both sub-blocks are readable 

    Both sub-blocks’ Crcs match the recalculates Crc 
     
    Repairable blocks: 

    One sub-block isn’t readable, another is 

    One sub-block’s Crc doesn’t match the recalculated one, another sub-block’s Crc does 

    Both sub-blocks’ Crcs match the data, but their do not match each other (first block is 
    valid) 
     
    Non-repairable blocks: 

    Both sub-blocks aren’t readable 

    Block sub-blocks’ Crc does not match the recalculated Crc 
     
    NvM will report the error NVM_E_LOSS_OF_REDUNDANCY in case block isn’t stored in NV 
    RAM redundantly and the NvM could not restore the redundancy. 
     
    Particularities and Limitations 
    >  This service is asynchronous 
    >  This service is re-entrant 
    >  This service is suspendable via all single and multi block requests – it will resume after the 
    requests are done 
    >  This service can be enabled or disabled via configuration 
    >  The NVRAM Manager shall have been initialized before this request is called 
    Call context 
    >  This service is expected to be called in application context. 
    Table 6-21  
    NvM_RepairRedundantBlocks 
    6.5 
    Services used by NVM 
    In the following table services provided by other components, which are used by the NVM 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    63 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    Component 
    API 
    DET 
    Det_ReportError 
    DEM 
    Dem_SetEventStatus 
    MEMIF 
    MemIf_Read 
    MEMIF 
    MemIf_InvalidateBlock 
    MEMIF 
    MemIf_GetJobResult 
    MEMIF 
    MemIf_Write 
    MEMIF 
    MemIf_EraseImmediateBlock 
    MEMIF 
    MemIf_GetStatus 
    MEMIF 
    MemIf_Cancel 
    MEMIF 
    MemIf_SetMode 
    CRC 
    Crc_CalculateCRC16 
    CRC 
    Crc_CalculateCRC32 
    EA 
    Used by MEMIF 
    FEE 
    Used by MEMIF 
    Table 6-22  
    Services used by the NVM 
    6.6 
    Callback Functions 
    This  chapter  describes  the  callback  functions  that  are  implemented  by  the  NVM  and  can  be 
    invoked by other modules. The prototypes of the callback functions are provided in the header file 
    NvM_Cbk.h by the NVM. 
    6.6.1 
    NvM_JobEndNotification 
    Prototype 
    void NvM_JobEndNotification ( void ) 
    Parameter 


    Return code 
    void 

    Functional Description 
    Function to be used by the underlying memory abstraction to signal end of job without error. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    Expected Caller Context 
      The callback function NvM_JobEndNotification is intended to be used by the underlying 
    memory abstraction (Fee/Ea) to signal end of job without error. 
    Table 6-23  
    NvM_JobEndNotification 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    64 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    6.6.2 
    NvM_JobErrorNotification 
    Prototype 
    void NvM_JobErrorNotification ( void ) 
    Parameter 


    Return code 
    void 

    Functional Description 
    Function to be used by the underlying memory abstraction to signal end of job with error. 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    Expected Caller Context 
    >  The callback function NvM_JobErrorNotification is intended to be used by the 
    underlying memory abstraction (Fee/Ea) to signal end of job with error. 
    Table 6-24  
    NvM_JobErrorNotification 
    6.7 
    Configurable Interfaces 
    At its configurable interfaces the NVM defines notifications that can be mapped to callback 
    functions  provided  by  other  modules. The  mapping  is  not  statically  defined  by  the  BSW 
    module  but  can  be  performed at  configuration  time. The function prototypes  that  can  be 
    used  for  the  configuration  have  to  match  the  signatures  described  in  the  following  sub-
    chapters. 
    6.7.1 
     SingleBlockCallbackFunction 
    Prototype 
    Std_ReturnType <SingleBlockCallbackFunction> ( 
    NvM_ServiceIdType ServiceId,                                           
    NvM_RequestResultType JobResult ) 
    Parameter 
    ServiceId 
    The service identifier (see chapter 6.2) of the completed request. 
    NvM_ServiceIdType is of type uint8. 
    JobResult 
    Result of the single block job. 
    Return code 
    E_OK 
    Callback function has been processed successfully 
    E_NOT_OK 
    Callback function has not been processed successfully. 
    Functional Description 
    Callback routine to notify the upper layer that an asynchronous single block request has been finished. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    65 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
     
     
    Caution 
    This description is limited to embedded code; it does not describe RUNNABLES 
      implementing a callback’s behavior in an SWC, but it describes the prototype to be 
    implemented/generated be the RTE or by a BSW component. 
     
     
     
    Call Context 
    >  Called from NvM_MainFunction 
    >  Asynchronous block processing completed (except NvM_WriteAll, for NvM_ReadAll it is 
    configurable) 
    Table 6-25  
    SingleBlockCallbackFunction 
    6.7.2 
    MultiBlockCallbackFunction  
    Prototype 
    void <MultiBlockCallbackFunction> ( NvM_ServiceIdType ServiceId,                                  
                                      NvM_RequestResultType JobResult ) 
    Parameter 
    ServiceId 
    The service identifier (see chapter 6.2) of the completed request. 
    NvM_ServiceIdType is of type uint8. 
    JobResult 
    Result of the multi block job. 
    Return code 
    void 
    -- 
    Functional Description 
    Common callback routine to notify the upper layer that an asynchronous multi block request has been 
    finished.  
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant. 
    Call Context 
    >  Called from NvM_MainFunction. 
    >  Called upon completion of NvM_ReadAll and NvM_WriteAll, respectively 
    Table 6-26 
    MultiBlockCallbackFunction 
    6.7.3 
    InitBlockCallbackFunction 
    Prototype 
    Std_ReturnType <InitBlockCallbackFunction> ( void ) 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    66 
    based on template version 3.01 




    Technical Reference MICROSAR NVM 
    Parameter 
    -- 
    -- 
    Return code 
    Std_ReturnType 
    NVM always returns E_OK. 
    Functional Description 
    Callback routine which shall be called by the NVM module to copy default data to a RAM block if 
    a ROM block is configured. 
     
     
    Note 
    During calling init block callback related block is still busy. No request for it shall be 
      issued as long as block is busy. 
     
     
     
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant 
    Call Context 
    >  Called from NvM_MainFunction 
    >  Called during processing of NvM_ReadAll, if application shall copy default values into the 
    corresponding RAM block. 
    Table 6-27 
    InitBlockCallbackFunction 
    6.7.4 
    Callback function for RAM to NvM copy 
    Prototype 
    Std_ReturnType <NvM_WriteRamBlockToNvm> ( void* NvMBuffer ) 
    Parameter 
    NvMBuffer 
    Internal RAM mirror where Ram block data shall be written to 
    Return code 
    E_OK 
    Callback function has been processed successfully 
    E_NOT_OK 
    Callback function has not been processed successfully. 
    Functional Description 
    Block specific callback routine which shall be called in order to let the application copy data from 
    RAM block to internal NvM RAM mirror. 
     
     
    Note 
    During calling NvM_WriteRamBlockToNvM callback related block is still busy. No 
      request for it shall be issued as long as block is busy. 
     
     
     
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant 
    Call Context 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    67 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    >  Called from NvM_MainFunction 
    >  Called during processing of NvM write requests, if application shall copy RAM block data into 
    the internal RAM mirror. 
    Table 6-28 
    Callback function for RAM to NvM copy 
    6.7.5 
    Callback function for NvM to RAM copy 
    Prototype 
    Std_ReturnType <NvM_ReadRamBlockFromNvm> ( const void* NvMBuffer ) 
    Parameter 
    NvMBuffer 
    Internal RAM mirror where Ram block data can be read from 
    Return code 
    E_OK 
    Callback function has been processed successfully 
    E_NOT_OK 
    Callback function has not been processed successfully. 
    Functional Description 
    Block specific callback routine which shall be called in order to let the application copy data from 
    NvM module’s mirror to RAM block. 
     
     
    Note 
    During calling NvM_ReadRamBlockFromNvM callback related block is still busy. No 
      request for it shall be issued as long as block is busy. 
     
     
     
    Particularities and Limitations 
    >  This service is synchronous. 
    >  This service is non re-entrant 
    Call Context 
    >  Called from NvM_MainFunction 
    >  Called during processing of NvM read requests, if application can copy data from internal RAM 
    mirror to RAM block. 
    Table 6-29 
    Callback function for NvM to RAM copy 
    6.8 
    Service Ports 
    Via Service Ports the software components (SWC) have the possibility to execute services 
    of  the  NVM  with  an  abstract  RTE  interface.  Hence,  the  software  components  are 
    independent from the underlying basic software stack. 
    6.8.1 
    Client Server Interface 
    A  client  server  interface  is  related  to  a  Provide  Port  (Pport)  at  the  server  side  and  a 
    Require Port (Rport) at client side. 
    Configuration dependent naming details are described in the chapters 7.1.3 and 7.1.4. 
    6.8.1.1 
    Provide Ports on NVM side 
    At  the  Pports  of  the  NVM  the API  functions  described  in  6.4  are  available  as  Runnable 
    Entities.  The  Runnable  Entities  are  invoked  via  Operations.  The  mapping  from  a  SWC 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    68 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    client  call  to  an  Operation  is  performed  by  the  RTE.  In this  mapping  the  RTE adds  Port 
    Defined Argument Values to the client call of the SWC, if configured. 
    The following  subchapters present the Pports  defined for the  NVM  and their Operations, 
    the API functions related to those Operations and the Port Defined Argument Values to be 
    added by the RTE: 
    6.8.1.1.1 
    Padmin_<BlockName> 
    A port of type Padmin is a Pport of one NVRAM block, which is configured to use Service 
    Ports. 
    If the SWC setting Long Service Port Names is enabled, the name of the service ports is 
    Padmin_<BlockName>;  if  Long  Service  Port  Names  is  disabled,  the  name  is 
    Padmin_<BlockId>. 
    Available if API Config Class = 3 
    Operation 
    API Function 
    Port Defined Argument Values 
    SetBlockProtection
    NvM_SetBlockProtection() 
    NvM_BlockIdType4 1..n
     
     
    Table 6-30 
    Operations of Port Prototype Padmin_<BlockName> 
    6.8.1.1.2 
    PS_<BlockName> 
    A port of type PS is a Pport of one NVRAM block, which is configured to use Service Ports. 
    If the SWC setting Long Service Port Names is enabled, the name of the service ports is 
    PS_<BlockName>; if Long Service Port Names is disabled, the name is PS_<BlockId>. 
    Operation 
    API Function 
    Port Defined Argument Values 
    GetErrorStatus 1
    NvM_GetErrorStatus() 
    NvM_BlockIdType4 1..n
     
     
    SetRamBlockStatus1
    NvM_SetRamBlockStatus() 
    NvM_BlockIdType4 1..n
     
     
    SetDataIndex2,5
    NvM_SetDataIndex() 
    NvM_BlockIdType4 1..n
     
     
    GetDataIndex2,5
    NvM_GetDataIndex() 
    NvM_BlockIdType4 1..n
     
     
    ReadBlock2
    NvM_ReadBlock() 
    NvM_BlockIdType4 1..n
     
     
    WriteBlock2
    NvM_WriteBlock() 
    NvM_BlockIdType4 1..n
     
     
    RestoreBlockDefaults2, 6
    NvM_RestoreBlockDefaults()  NvM_BlockIdType4 1..n
     
     
    EraseBlock3
    NvM_EraseNvBlock() 
    NvM_BlockIdType4 1..n
     
     
    InvalidateNvBlock3
    NvM_InvalidateNvBlock() 
    NvM_BlockIdType4 1..n
     
     
    Table 6-31 
    Operations of Port Prototype PS_<BlockName> 
    1.  Always available 
    2.  Available if API Config Class >= 2 
    3.  Available if API Config Class = 3 
    4.  Is derived from the block’s position in the configuration 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    69 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    5.  Only available for blocks of Management Type Dataset 
    6.  Only available for blocks with Rom defaults configured 
    6.8.1.2 
    Require Ports 
    NVM invokes callbacks using Rports. These Operations have to be provided by the SWCs 
    by  means  of  Runnable  Entities  using  Pports.  These  Runnable  Entities  implement  the 
    callback functions expected by the NVM. 
    The following subchapters present the Require Ports defined for the NVM, the Operations 
    that are called from the NVM and the related Notifications, which are described in chapter 
    6.7. 
    6.8.1.2.1 
    NvM_RpNotifyFinished_Id<BlockName> 
    A  port  of  type  NvM_RpNotifyFinished_Id  is  a  Rport  of  one  NVRAM  block,  which  is 
    configured to use Service Ports. 
    If the SWC setting Long Service Port Names is enabled, the name of the service ports is 
    NvM_RpNotifyFinished_Id<BlockName>;  if  Long  Service  Port  Names  is  disabled,  the 
    name is NvM_RpNotifyFinished_Id<BlockId>. 
    Available in all API Config Classes but Use Callbacks must be enabled. 
    Operation 
    Notification 
    JobFinished
    SingleBlockCallbackFunction
     
     
    Table 6-32 
    Operation of Port prototype NvM_RpNotifyFinished_Id<BlockName> 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    70 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    7  Configuration 
    7.1 
    Software Component Template 
    7.1.1 
    Generation 
    The definition of the Provide Ports is described in an XML file. This file describes the NVM 
    as a software component with ports to which other applications can connect. This XML file 
    is  always  saved  consistent  to  the  current  ECUC  file  when  the  project  in  DaVinci 
    Configurator is saved. The target directory for SW-C files  can be set  in  the  Dpa file. For 
    more information see documentation of DaVinci Configurator. 
    7.1.2 
    Import into DaVinci Developer 
    For further processing the generated software component template file has to be imported 
    into DaVinci Developer. This can be done while a DaVinci-project is open by clicking File 
    Import XML File.... Choose the correct file for the import. 
      
    Figure 7-1 
    Import a new software component into DaVinci Developer 
    After  importing  the  NVM  as  software  component  there  is  a  new  component  type  in  the 
    library  view available. After double  clicking  the  component  NVM,  all configured ports are 
    presented. 
    The  DaVinci  tool  suite  lets  you  design  the  complete  architecture  of  a  car,  consisting  of 
    several ECUs, each with its own NVM. Therefore it is desirable to import several NVM SW-
    C  descriptions,  each  containing  the  description  of  an  NVM  to  be  mapped  to  a  particular 
    ECU.  Using the  ‘Service Component  Name Parameter’  you can give  your configurations 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    71 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    meaningful  unique  names.  All  elements  of  the  SW-C  description  are  unique  in  this 
    particular  configuration  and  are  prefixed  with  this  parameter’s  value.  However,  most 
    elements  are  common  to  all  SW-C  descriptions,  or  are  at  least  unique  to  the  used 
    configuration (which is also expressed by the elements’ names) so that some elements are 
    contained in each different SW-C description. During import, DaVinci will warn you about 
    these doubled elements. You can ignore them (overwrite the existing elements); they are 
    identical. 
    7.1.3 
    Dependencies on Configuration of NVM Attributes 
    The configuration of the NVM attributes (described in chapter 7.1.5) highly influences the 
    resulting  SW-C  Description.  So,  the  value  of  the  parameter  Service  Component  Name 
    influences  the  names  of  several  elements  in  the  description,  especially  the  name  of  the 
    Service  Component.  It  is  also  the  prefix  for  several  other  names  that  belong  to  this 
    particular NVM configuration (and the resulting service component). 
    There  is  a  couple  of  different  port  interfaces  that  will  be  generated,  depending  on  the 
    particular configuration. Each generated interface that results from a specific configuration 
    has a unique name, i.e. in different SW-C descriptions port interfaces with the same name 
    are compatible; they provide the same operations, each with the same arguments of same 
    type. 
    7.1.3.1 
    Naming of Service Port Interfaces 
    The  Service  Port  Interface  provides  the  prototypes  of  the  elementary  block  related 
    services  of  the  NVM,  such  as  read  data  from  NV  memory,  write  data  to  NV  memory.  It 
    generally contains the string Service
    As  described  above,  port  interfaces  resulting  from different  configurations,  have  different 
    names. These names are given according to this scheme: 
    >  Each Interface is prefixed by NvM 
    >  Set Ram Block Status Api 
    If enabled, the interface name contains the string ‘SRBS’, and it contains the operation 
    SetRamBlockStatus. 
    >  API Configuration Class 
    The interface name contains a short string that denotes the API configuration class it 
    belongs to: AC1AC2 or AC3. The operations the interface describes in that 
    configuration class are described in Chapter  6.8.1.1. 
    >  Availability of ROM default data 
    The interface contains the operation RestoreBlockDefaults; it contains the string Defs
    This interface will be used by all P-Port-Prototypes belonging to a NVRAM block that 
    was configured with ROM default data. 
    >  Block Management Type DATASET 
    The interface provides the operations GetDataIndex and SetDataIndex. Its name 
    contains DS. This interface will be used by all NVRAM blocks of Management Type 
    DATASET 
    The first two possibilities are common within one SW-C Description. Only one combination 
    of  them  will  occur.  Unless  API  Configuration  Class  1  was  chosen,  Port  Interfaces 
    describing any combination of the latter two possibilities may be generated. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    72 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    7.1.4 
    Service Port Prototypes 
    For  each  active  NVRAM  block  (including  the  configuration  ID  block)  that  was  configured 
    with  Use  Service  Ports  port,  prototypes  will  be  generated.  The  port  interfaces  they  are 
    based on can differ. The interfaces depend on the block’s configuration, and hence on the 
    operations that are necessary for current block. 
    7.1.4.1 
    Port Prototype Naming 
    The short name uniquely identifying the prototype is based on the numeric block ID (which, 
    in  turn,  is  derived  from  the  block’s  position  in  the  configuration)  and  the  port  interface 
    class it corresponds to. 
    Each  prototype  is  prefixed  by  the  String  NvM_;  the  next  substring  describes  the 
    corresponding  port  interface,  and  whether  it  is  a  Provide  Port  (‘Pp’)  or  a  Require  Port 
    (‘Rp’): 
    >  Padmin 
    Linked with port interface NvMAdministration (only in API Configuration Class 3
    >  PS 
    Linked with Port Interface ‘NvMService_AC{1|2|3}[_SRBS][_Defs][_DS]’. The actual 
    interface depends on the possibilities described above. 
    >  NvM_RpNotifyFinished 
    Linked with Port Interface NvMNotifyJobFinished that describes the interface used by 
    the NVM for single block job end notification 
    If SWC setting Long Service Port Names is disabled, each port prototype’s name is post 
    fixed  by  _Id{BlockId}.  If  SWC  setting  Long  Service  Port  Names  is  enabled,  each  port 
    prototype’s name is post fixed by ‘_{BlockName}’.  
    Additionally  each  port  prototype  contains  a  long  name  as  well  as  a  description,  which 
    describe  it  in  a  better,  human  readable  form.  They  contain  the  logical  block  name,  as 
    configured, instead of the block ID, and the used port interface’s short name. 
    7.1.5 
    Modelling SWC’s callback functions 
    According to AUTOSAR, the prototype of a SingleBlockCallbackFunction (Chapter 6.7.1), 
    differs from that of a RUNNABLE implementing SWC’s behavior of that callback. Therefore 
    the prototype describes the RTE function called by NVM. 
    The prototype of the RUNNABLE, which is actually called by RTE, must match model, i.e. 
    the  return  type  must  match  the  information  given  in  callback’s  interface  description 
    (“Application  Errors”).  The  correct  modelling  would  be  “no  Application  Errors”,  which 
    requires a RUNNABLE implementation without return type: 
    void <init_cbk_runnable_name>(void) 
    void <jobend_cbk_runnable_name>( NvM_ServiceIdType ServiceId,                                           
    NvM_RequestResultType JobResult) 
    However,  DaVinci  Developer  since  Version  3.8  along  with  MICROSAR  RTE  version 
    4.04.00 and later enable NVM to support another different (actually incompatible) function 
    prototype:  
    Std_ReturnType <init_cbk_runnable_name>(void) 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    73 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
    Std_ReturnType <jobend_cbk_runnable_name>( NvM_ServiceIdType 
    ServiceId,                                           
    NvM_RequestResultType JobResult) 
     
    Both implementations require slightly different  Interface definitions;  they may be adapted 
    using  DaVinci  Developer.  From  a  modeling  point  of  view,  the  runnable  must  be 
    implemented according to the Interface associated with the related Pport-Prototype. 
     
    Figure 7-2 A  
    “Single Block Job End Notification” with return type Std_ReturnType 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    74 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
     
    Figure 7-3 A  
    “Single Block Job End Notification” with return type void. 
    NVM itself provides interfaces as described by Figure 7-3. To make SWCs independent of 
    this definition, they may associate their PPort prototype to their own interface definitions, 
    according to their (planned) RUNNABLEs’ implementations. Of course, the interface must 
    be compatible according to AUTOSAR’s rules; which limits possible interface definitions to 
    exactly one of both mentioned here. 
    7.2 
    Configuration of NVM Attributes 
    The NVM attributes can be configured using the DaVinci Configurator. The outputs of the 
    configuration and generation process are the configuration source files.  
    The description of each used parameter is set in the NvM bswmd file. 
    Only additional information is given in this chapter. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    75 
    based on template version 3.01 



    Technical Reference MICROSAR NVM 
     
     
    Caution 
    Because sizeof-operator cannot be used during configuration in production code 
      because sizes also affect lower layers, the exact sizes of your NVRAM blocks, and 
    hence your data structures must be known at configuration time. Therefore you are 
    required to determine these values by yourself. This leads to some significant pitfalls: 
    >  The sizes of basic data types are platform dependent. To handle this problem, you 
    should use only AUTOSAR data types as defined in Std_Types.h (respectively 
    Platform_Types.h). They are defined to have the same size on all platforms. The 
    enumeration type’s size also depends on your platform, the compiler and its options. 
    Be aware of the size the compiler actually chooses. Usually an enum equals to an 
    int by default, but you can force it to be the smallest possible type (e.g. char). 
    >  Be aware of the composition of bit fields. It can be affected by compiler switches. 
    >  The compiler may rearrange members of structures to save memory. The best 
    solution would be to arrange members according to their type manually. The 
    compiler may add unused padding bytes to increase accessibility to the members of 
    a structure. According to the previous fact, you should order your structure’s 
    members. Doing so, you should be aware of aligned start addresses for larger 
    integral data types (e.g. uint16 or uint32) according to the CPU’s requirements 
    for accessing them. 
    >  As stated above, some compiler switches influence the sizes of data types. Keep in 
    mind that changing these ones may result in changed sizes of your data blocks, 
    leading to a reconfiguration of NVM. 
    A good way to determine the blocks’ sizes is to extract the required information from 
    the linker file or from the generated object. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    76 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    8  AUTOSAR Standard Compliance 
    8.1 
    Deviations 
    >  In contrast to AUTOSAR most configuration parameters are link-time parameters. 
    >  Saving RAM CRC of current block is configuration dependent. Either it is saved behind 
    the block’s data or it is saved internally by NVM in an own variable. 
    >  Unified handling of ROM defaults among all block management types is processed. 
    Rom defaults handling of blocks of type dataset is just like the handling of blocks of the 
    other management types. 
    >  NVM is able to provide the Config Id’s RAM block on its own. 
    >  NvM_WriteAll() does not write unchanged data, even if this would repair (redundant) 
    NV data. 
    >  Attempts to write to a locked block (NvM_SetBlockLockStatus) are explicitly not 
    treated as Development Error; error NVM_E_BLOCK_LOCKED is not defined. 
    >  NvM_SetBlockLockStatus is allowed for pending Blocks; no related Development 
    Error Check will be performed. 
    >  Block CRC type CRC8 is not supported. 
    >  Write retries can only be globally configured, rather than individually per NVRAM Block 
    >  Calls to Explicit Synchronization callbacks (see chapter 4.4.18) cannot be limited by 
    configuration. Rather those functions are expected to succeed within few attempts. 
    8.2 
    Additions/ Extensions 
    8.2.1 
    Parameter Checking 
    The  internal  parameter  checks  of  the API  functions  can  be  en-/disabled  separately.  The 
    AUTOSAR standard  requires en-/disabling of the complete parameter checking only. For 
    details see chapter 4.5.1.1. 
    8.2.2 
    Concurrent access to NV data 
    NVM provides for DCM possibility to access NV data concurrently with NVM application. 
    (see chapter 4.4.17) 
    8.2.3 
    RAM-/ROM Block Size checks 
    NVM can be configured to check all RAM and ROM blocks’ lengths against corresponding 
    NV Block lengths, using sizeof operator; see chapter 4.5.3. 
    8.2.4 
    Calculated CRC value does not depend on number of calculation steps 
    Due to the specified CRC32 algorithm, and missing further requirements on NVM’s CRC 
    calculation,  a  calculated  CRC32  value  depends  on  the  number  of  necessary  calculation 
    steps  (defined  by  block  length  and  parameter  CRC  Bytes  per  Cycle).  Unless  the  CRC 
    can be calculated with one step (i.e. the block is small enough), the CRC32 value will not 
    match the value resulting from calling the CRC32 library function once for the whole block. 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    77 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    The reason is the negation of the result, as specified for CRC32 (which in turn belongs to 
    standard/widely used Ethernet CRC). This behavior introduces some drawbacks on NVM, 
    especially:  
    >  Changing parameter CRC Bytes per Cycle (for run-time optimization), in an existing 
    (already flashed) project. Data blocks with CRC32 could not be read after the update. 
    >  CRC32 values cannot be verified outside NVM (e.g. for testing purposes), without 
    knowing the configuration – each single step would have to be reproduced. 
    >  Valid data blocks along with their CRC32 cannot be pre-defined using standard CRC 
    algorithms. 
    NVM circumvents these restrictions by reverting the final negation of each single CRC32 
    calculation step, except the last one. This (quite simple) measure guarantees that the CRC 
    value does NOT depend on the number of calculation steps, as it is originally guaranteed 
    for CRC16 (since it will not be inverted by the CRC library). 
    8.3 
    Limitations 
    There are no limitations. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    78 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    9  Glossary and Abbreviations 
    9.1 
    Glossary 
    Term 
    Description 
    DaVinci Configurator  Configuration and generation tool for MICROSAR. 
    Pro 
    DCM 
    Diagnostic Communication Manager 
    GCE 
    Generic Configuration Editor – generic tool for editing AUTOSAR 
    configuration files. 
    In DaVinci Configurator, the view can be switch to Generic Editor
    Per Instance Memory  Memory (RAM) to be used by an instance of an Softwar Component, 
    (PIM) 
    provide by RTE. It may also be used as permanent or tempary RAM 
    block. 
    Such a memory need is usually modeled using a tool like DaVinci 
    Developer. 
    Primary NV Block 
    The first NV block of an NVRAM Block of type Redundant. During reads, 
    this block will always be tried first. During writes it will be preferred, 
    unless only secondary is defective. 
    Secondary NV Block  The second NV block of an NVRAM Block of type Redundant. During 
    reads and this block will be accessed second; if primary is defective. 
    Table 9-1  
    Glossary 
    9.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    CRC 
    Cyclic Redundancy Check 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DPA 
    DaVinci Project Assistant 
    EA 
    EEPROM Abstraction Module 
    ECU 
    Electronic Control Unit 
    ECUC 
    ECU Configuration 
    ECUM 
    ECU State Manager 
    EEP 
    EEPROM Driver 
    EEPROM 
    Electrically Erasable Programmable Read Only Memory 
    FEE 
    Flash EEPROM Emulation Module 
    FIFO 
    First In First Out 
    FLS 
    Flash Driver 
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    79 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    GCE 
    Generic Configuration Editor 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    MemHwA 
    Memory Hardware Abstraction Layer 
    MEMIF 
    Memory Abstraction Interface Module 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    NVM 
    NVRAM Manager 
    NV, NVRAM 
    Non Volatile Random Access Memory 
    OS 
    Operating System 
    PPort 
    Provide Port 
    RAM 
    Random Access Memory 
    ROM 
    Read Only Memory 
    RPort 
    Require Port 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 9-2  
    Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    80 
    based on template version 3.01 


    Technical Reference MICROSAR NVM 
    10  Contact 
    Visit our website for more information on 
     
    >   News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
    © 2017 Vector Informatik GmbH 
    Version 5.06.02 
    81 
    based on template version 3.01 

    Document Outline


    1.3.156 - TechnicalReference_Os

    MICROSAR OS

    1.3.157 - TechnicalReference_Os_ind

    Outline
    Page 1
    Page 2
    Page 3
    Page 4
    Page 5
    Page 6
    Page 7
    Page 8
    Page 9
    Page 10
    Page 11
    Page 12
    Page 13
    Page 14
    Page 15
    Page 16
    Page 17
    Page 18
    Page 19
    Page 20
    Page 21
    Page 22
    Page 23
    Page 24
    Page 25
    Page 26
    Page 27
    Page 28
    Page 29
    Page 30
    Page 31
    Page 32
    Page 33
    Page 34
    Page 35
    Page 36
    Page 37
    Page 38
    Page 39
    Page 40
    Page 41
    Page 42
    Page 43
    Page 44
    Page 45
    Page 46
    Page 47
    Page 48
    Page 49
    Page 50
    Page 51
    Page 52
    Page 53
    Page 54
    Page 55
    Page 56
    Page 57
    Page 58
    Page 59
    Page 60
    Page 61
    Page 62
    Page 63
    Page 64
    Page 65
    Page 66
    Page 67
    Page 68
    Page 69
    Page 70
    Page 71
    Page 72
    Page 73
    Page 74
    Page 75
    Page 76
    Page 77
    Page 78
    Page 79
    Page 80
    Page 81
    Page 82
    Page 83
    Page 84
    Page 85
    Page 86
    Page 87
    Page 88
    Page 89
    Page 90
    Page 91
    Page 92
    Page 93
    Page 94
    Page 95
    Page 96
    Page 97
    Page 98
    Page 99
    Page 100
    Page 101
    Page 102
    Page 103
    Page 104
    Page 105
    Page 106
    Page 107
    Page 108
    Page 109
    Page 110
    Page 111
    Page 112
    Page 113
    Page 114
    Page 115
    Page 116
    Page 117
    Page 118
    Page 119
    Page 120
    Page 121
    Page 122
    Page 123
    Page 124
    Page 125
    Page 126
    Page 127
    Page 128
    Page 129
    Page 130
    Page 131
    Page 132
    Page 133
    Page 134
    Page 135
    Page 136
    Page 137
    Page 138
    Page 139
    Page 140
    Page 141
    Page 142
    Page 143
    Page 144
    Page 145
    Page 146
    Page 147
    Page 148
    Page 149
    Page 150
    Page 151
    Page 152
    Page 153
    Page 154
    Page 155
    Page 156
    Page 157
    Page 158
    Page 159
    Page 160
    Page 161
    Page 162
    Page 163
    Page 164
    Page 165
    Page 166
    Page 167
    Page 168
    Page 169
    Page 170
    Page 171
    Page 172
    Page 173
    Page 174
    Page 175
    Page 176
    Page 177
    Page 178
    Page 179
    Page 180
    Page 181
    Page 182
    Page 183
    Page 184
    Page 185
    Page 186
    Page 187
    Page 188
    Page 189
    Page 190
    Page 191
    Page 192
    Page 193
    Page 194
    Page 195
    Page 196
    Page 197
    Page 198
    Page 199
    Page 200
    Page 201
    Page 202
    Page 203
    Page 204
    Page 205
    Page 206
    Page 207
    Page 208
    Page 209
    Page 210
    Page 211
    Page 212
    Page 213
    Page 214
    Page 215
    Page 216
    Page 217
    Page 218
    Page 219
    Page 220
    Page 221
    Page 222
    Page 223
    Page 224
    Page 225
    Page 226
    Page 227
    Page 228
    Page 229
    Page 230
    Page 231
    Page 232
    Page 233
    Page 234
    Page 235
    Page 236
    Page 237
    Page 238
    Page 239
    Page 240
    Page 241
    Page 242
    Page 243
    Page 244
    Page 245
    Page 246
    Page 247
    Page 248
    Page 249
    Page 250
    Page 251
    Page 252
    Page 253
    Page 254
    Page 255
    Page 256
    Page 257
    Page 258
    Page 259
    Page 260
    Page 261
    Page 262
    Page 263
    Page 264
    Page 265
    Page 266
    Page 267
    Page 268
    Page 269
    Page 270
    Page 271
    Page 272
    Page 273
    Page 274
    Page 275
    Page 276
    Page 277
    Page 278
    Page 279
    Page 280
    Page 281
    Page 282
    Page 283
    Page 284
    Page 285
    Page 286
    Page 287
    Page 288
    Page 289
    Page 290
    Page 291
    Page 292
    Page 293
    Page 294
    Page 295
    Page 296
    Page 297
    Page 298
    Page 299
    Page 300
    Page 301
    Page 302
    Page 303
    Page 304
    Page 305
    Page 306
    Page 307
    Page 308
    Page 309
    Page 310
    Page 311
    Page 312
    Page 313
    Page 314

    1.3.158 - TechnicalReference_Oss


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR OS 
    Technical Reference 
     
      
    Version 2.19.0 
     
     
     
     
     
     
     
     
     
     
    Authors 
    Anton  Schmukel,  Ivan  Begert,  Stefano  Simoncelli, 
    Torsten  Schmidt,  Da  He,  David  Feuerstein,  Michael 
    Kock,  Martin  Schultheiß,  Andreas  Jehl,  Fabian  Wild, 
    Senol  Cendere,  Benjamin  Seifert,  Bilal  Parvez,  Rainer 
    Künnemeyer 
    Status 
    Released 
     
     
     
     
     


    Technical Reference MICROSAR OS 
     
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Torsten Schmidt 
    2016-04-27  1.0.0 
    First release version 
    Torsten Schmidt 
    2016-05-18  1.0.1 
    References to hardware manuals added. 
    Revision work 
    Torsten Schmidt 
    2016-06-03  1.0.2 
    Fix of ESCAN00089598 
    Torsten Schmidt 
    2016-06-20  1.1.0 
    List of OS internal objects added. 
    Additional startup concept chapter added. 
    Chapter “Memory mapping concept” reworked. 
    Description of “generate callout stubs” feature 
    added. 
    Torsten Schmidt 
    2016-07-05  1.1.1 
    Chapter “Memory Mapping Concept” extended. 
    IOC notification callback concept changed. 
    HSI of RH850 family added. 
    HSI of Power PC family added. 
    Torsten Schmidt 
    2016-07-19  1.1.2 
    Chapter “Memory Mapping Concept” changed. 
    Hints for shorter compile times added. 
    Nesting behavior of OS hooks described. 
    Ivan Begert 
    2016-08-11  1.1.3 
    HSI of ARM family added. 
    Torsten Schmidt 
    2016-08-12  1.1.4 
    Chapter “Memory Mapping Concept” extended. 
    Chapter “Clear Pending Interrupt” extended. 
    Chapter “RH850 Special Characteristics” extended. 
    Ivan Begert 
    2016-08-18  1.1.5 
    HSI of ARM Zynq UltraScale added. 
    Torsten Schmidt 
    2016-08-30  1.1.6 
    HSI of RH850 extended. 
    Torsten Schmidt 
    2016-08-31  1.1.7 
    ORTI Debugging added. 
    Timing Hook Macros reworked. 
    Chapter “Memory Mapping Concept” changed. 
    Chapter “Category 1 Interrupts” extended. 
    Stefano Simoncelli  2016-09-15  1.1.8 
    Chapter “Interrupt Source API” extended. 
    Torsten Schmidt 
    HSI chapter for ARM extended 
    Torsten Schmidt 
    2016-09-22  1.2.0 
    VTT OS and Dual Target Concept added. 
    Chapter ORTI Debugging extended. 
    Anton Schmukel 
    2016-10-14  1.3.0 
    Ristrictions concerning API usage before StartOS() 
    Da He 
    documented. 
    Clarification concerning forcible termination and 
    schedule tables added. 
    Deviations in IOC added. 
    Notes on mixed criticality systems added. 
    Chapter “RH850 Special Characteristics” extended. 
    Torsten Schmidt 
    2016-10-19  1.3.1 
    Chapter “Configuration of X-Signals” added. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Chapter “Power PC Special Characteristics” 
    extended. 
    Correction of startup examples. 
    Chapter “User include files” added. 
    RH850 HSI extended. 
    PPC HSI extended. 
    Hardware Overview extended by RH850. 
    David Feuerstein 
    2016-11-03  1.4.0 
    PPC HSI extended. 
    Chapter ORTI Debugging extended. 
    Michael Kock 
    2016-11-25  1.5.0 
    Updated chapter Timing Hooks 
    Martin Schultheiß  2016-12-08  1.6.0 
    PPC HSI extended. 
    Updated characteristics of VTT OS. 
    David Feuerstein 
    2016-12-22  1.7.0 
    Updated precautions in PreStartTask. 
    Andreas Jehl 
    Support new Power PC Derivative: PC580003 
    Ivan Begert 
    Support IAR compiler for ARM 
    Stefano Simoncelli 
    ARM Cortex-A HSI added 
    David Feuerstein 
    2017-01-23  1.8.0 
    Chapter “Memory Mapping Concept” changed. 
    Torsten Schmidt 
    Chapter “Resulting sections” extended. 
    Chapter “X-Signals” extended. 
    Chapter “API Description” extended. 
    Torsten Schmidt 
    2017-02-06  2.0.0 
    Chapter “Memory Mapping Concept” corrected. 
    Stefano Simoncelli   
    Chapter “MICROSAR OS Deviations from 
    David Feuerstein 
    AUTOSAR OS Specification” extended. 
    Chapter “IOC” extended. 
    Feature “Fast Trusted Functions” added. 
    Chapter “Non-Trusted Functions (NTF)” changed. 
    ARM Cortex-M Hardware overview updated. 
    Feature “Barriers” added. 
    Martin Schultheiß  2017-03-22  2.1.0 
    Updated Hardware Overview for Power PC 
    Benjamin Seifert 
    derivative groups (RM revisions). 
    Da He 
    Chapter “MICROSAR OS Deviations from 
    Torsten Schmidt 
    AUTOSAR OS Specification” corrected. 
    Stefano Simoncelli 
    Added API 
    Anton Schmukel
    OSError_GetScheduleTableStatus_ScheduleStatus 
     
    Chapter “ARM Special characteristic” extended. 
    Chapter “Cortex-R derivatives” extended. 
    Chapter “Idle Task” extended. 
    TI Compiler added as supported compiler for ARM. 
    Platform POSIX added 
    Added HSI for ARM Cortext-M 
    Fabian Wild 
    2017-03-31  2.2.0 
    Added AUTOSAR specification deviations. 
    Stefano Simoncelli 
    Changed address parameter type in periperal API 
    functions. 
    Da He 
    2017-04-11  2.3.0 
    Added HSI for TI AR16xx 
    Martin Schultheiß 
    Added information for Hardware Init Core 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Senol Cendere 
    2017-05-10  2.4.0 
    Added HSI for R-Car H3. 
    Torsten Schmidt 
    Extended chapter “Memory Mapping Concept”. 
    Martin Schultheiß 
    Added chapter “Linking of Spinlocks”. 
    Da He 
    Updated HSI for S32K derivatives. 
    Added chapter for exception context manipulation 
    Fabian Wild 
    2017-06-19  2.5.0 
    Removed ORTI tracing from Os_Init and 
    Martin Schultheiß 
    Os_InitMemory 
    Support new Power PC Derivative: SPC574Sxx 
    Torsten Schmidt 
    2017-06-06  2.6.0 
    Added descriptions for category 0 ISRs. 
    Ivan Begert 
    2017-07-05  2.6.1 
    Chapter “ARM Special characteristic” extended. 
    Senol Cendere 
    RH850 HSI extended. 
    Updated Table 1-9 Supported RH850 Compilers. 
    Updated Chapter 4.5.2 RH850 
    Torsten Schmidt 
    2017-07-17  2.7.0 
    Chapter “Software Stack Check” extended. 
    Chapter “VTT OS Specifics” extended. 
    Chapter “Initialization of Interrupt Sources” 
    extended. 
    Chapter “Notes on Category 1 ISRs” extended. 
    Chapter “Notes on Category 0 ISRs” extended. 
    Chapter “Pre-Process Linker Command Files” 
    added. 
    API description of “Os_Init” extended. 
    Senol Cendere 
    2017-08-15  2.8.0 
    Documented support for more RH850 derivatives 
    Da He 
    and compiler versions. 
    Andreas Jehl 
    Updated documentations regarding location of OS 
    identifiers. 
    Support ARM CC (5.x) compiler for ARM Cortex-M 
    Documented support of TC39x derivative with 
    Tasking v6.0r1p2 compiler 
    Martin Schultheiß  2017-08-17  2.9.0 
    Updated Derivative Support for PPC and RH850 
    Senol Cendere 
    2017-10-25  2.10.0 
    New vector timing hooks 
    Torsten Schmidt 
    OS_VTHACTIVATION_LIMIT and 
    Rainer 
    OS_VTH_WAITEVENT_NOWAIT, usage of vector 
    Künnemeyer 
    timing hooks now also in safety systems. Chapter 
    “Task Stack Sharing” Extended 
    Added comments on RTE interrupt API 
    Da He 
    2017-11-13  2.11.0 
    Support GCC Linaro compiler for ARM Cortex-A/R 
    Benjamin Seifert 
    and Cortex-M 
    Added HighTec compiler support for PowerPC and 
    TriCore 
    Added MPC56xx derivatives to chapter “Hardware 
    Overview” and “Hardware Software Interfaces” 
    Fixed Timing Hooks API descriptions 
    Stefano Simoncelli  2017-12-14  2.12.0 
    Support for TDA2x family derivatives  
    Torsten Schmidt 
    Support for TriCore Aurix TC38x 
    Benjamin Seifert 
    Added caution to chapter “Aurix Special 
    Characteristics” 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Fixed descriptions in "Os generated objects" 
    Bilal Parvez 
    2018-01-11  2.13.0 
    Chapter “VTT OS Specifics” corrected 
    Senol Cendere 
    Added RH850 F1KH hardware manual reference 
    Stefano Simoncelli 
    Chapter “Floating Point Context Extension” 
    Updated HSI Chapter 
    Martin Schultheiß  2018-02-02  2.14.0 
    Adapted HSI – MSR Bits used by OS 
    Simoncelli Stefano 
    Added Chapter “User defined processor state.” 
    Support for TMSLS57021x_31x derivatives 
    Torsten Schmidt 
    2018-03-09  2.14.1 
    Adapted a note in chapter “Floating Point Context 
    Extension” 
    Senol Cendere 
    2018-03-14  2.15.0 
    Adapted Chapter 4.3.3 “Section Symbols” 
    Added Chapter 2.4.8 “Unhandled Syscalls” 
    Added Chapter 4.2.1.8 “Configuration of Interrupt 
    Sources” 
    Rainer 
    2018-04-03  2.16.0 
    Added chapter 4.10 “Preprocessing of assembler 
    Künnemeyer 
    language files” 
    Benjamin Seifert 
    Added supported compiler version for ARM 
    Fabian Wild 
    Added deviation regarding spinlock deadlock 
    detection 
    Benjamin Seifert 
    2018-04-17  2.17.0 
    Added support for TMS570LC43x derivatives 
    Updated chapter "4.2.4.4 ARM Special 
    Characteristics" 
    Bilal Parvez 
    2018-05-14  2.18.0 
    Added description for Interrupt Mapping support 
    Benjamin Seifert 
    Updated the usage section of the Exception 
    Context Manipulation chapter 
    Added caution for GetTaskID to chapter "2.3.4 
    Software Stack Check" 
    Bilal Parvez 
    2018-06-28  2.19.0 
    Support for CYT2Bx derivatives 
    Benjamin Seifert 
    Extended Chapter "4.11.2 ARM Family” 
    Added Chapter "4.12 Stack Summary" 
    Small fix in Chapter "2.17.5 Protection Violation 
    Handling" 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   
    AUTOSAR 
    Specification of Operating System 
    4.2.1 
    Document ID 034:  AUTOSAR_SWS_OS 
    [2]   
    OSEK/VDX 
    OSEK/VDX Operating System Specification 
    2.2.3 
    This document is available in PDF-format on 
    the Internet at the OSEK/VDX homepage 
    (http://www.osek-vdx.org) 
    [3]   
    OSEK/VDX 
    OSEK RunTime Interface (ORTI) Part A: 
    2.2 
    Language Specification. 
    This document is available in PDF-format on 
    the Internet at the OSEK/VDX homepage 
    (http://www.osek-vdx.org) 
    [4]   
    OSEK/VDX 
    OSEK Run Time Interface (ORTI) Part B: OSEK  2.2 
    Objects and Attributes 
    This document is available in PDF-format on 
    the Internet at the OSEK/VDX homepage 
    (http://www.osek-vdx.org) 
    [5]   
    Lauterbach 
    ORTI Representation of SMP Systems (ORTI 

    2.3) 
    [6]   
    Vector 
    vVIRTUALtarget Technical Reference 
    See delivery 
    information 
    [7]   
    Vector 
    Startup with Vector and vVIRTUALtarget 
    See delivery 
    information 
    [8]   
    Vector 
    MICROSAR VStdLib Technical Reference 
    See delivery 
    TechnicalReference_VStdLib_GenericAsr.pdf 
    information 
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
     
    questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Contents 
    1 
    Introduction................................................................................................................. 25 
    1.1 

    Architecture Overview ...................................................................................... 25 
    1.2 
    Abstract ........................................................................................................... 26 
    1.3 
    Characteristics ................................................................................................. 26 
    1.4 
    Hardware Overview ......................................................................................... 27 
    1.4.1 
    TriCore Aurix .................................................................................... 28 
    1.4.2 
    Power PC ......................................................................................... 29 
    1.4.3 
    ARM ................................................................................................. 31 
    1.4.4 
    RH850.............................................................................................. 33 
    1.4.5 
    VTT OS ............................................................................................ 34 
    1.4.5.1 

    Characteristics of VTT OS ............................................. 34 
    1.4.6 
    POSIX OS ........................................................................................ 34 
    1.4.6.1 
    Characteristic of POSIX OS ........................................... 35 
    2 
    Functional Description ............................................................................................... 36 
    2.1 

    General ............................................................................................................ 36 
    2.2 
    MICROSAR OS Deviations from AUTOSAR OS Specification ......................... 36 
    2.2.1 

    Generic Deviation for API Functions ................................................. 36 
    2.2.2 
    Trusted Function API Deviations ...................................................... 36 
    2.2.3 
    Service Protection Deviation ............................................................ 37 
    2.2.4 
    Code Protection ............................................................................... 37 
    2.2.5 
    SyncScheduleTable API Deviation ................................................... 37 
    2.2.6 
    CheckTask/ISRMemoryAccess API Deviation .................................. 38 
    2.2.7 
    Interrupt API Deviation ..................................................................... 38 
    2.2.8 
    Cross Core Getter APIs .................................................................... 38 
    2.2.9 
    IOC .................................................................................................. 39 
    2.2.10 
    Return value upon stack violation ..................................................... 39 
    2.2.11 
    Handling of OS internal errors .......................................................... 40 
    2.2.12 
    Forcible Termination of Applications ................................................. 40 
    2.2.13 
    OS Configuration ............................................................................. 41 
    2.2.14 
    Spinlocks ......................................................................................... 41 
    2.3 
    Stack Concept ................................................................................................. 42 
    2.3.1 
    Task Stack Sharing .......................................................................... 43 
    2.3.1.1 

    Description ..................................................................... 43 
    2.3.1.2 
    Activation ....................................................................... 43 
    2.3.1.3 
    Usage ............................................................................ 44 
    2.3.2 
    ISR Stack Sharing ............................................................................ 44 
    2.3.2.1 

    Description ..................................................................... 44 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.3.2.2 
    Activation ....................................................................... 44 
    2.3.2.3 
    Usage ............................................................................ 45 
    2.3.3 
    Stack Check Strategy ....................................................................... 45 
    2.3.4 
    Software Stack Check ...................................................................... 45 
    2.3.4.1 

    Description ..................................................................... 45 
    2.3.4.2 
    Activation ....................................................................... 46 
    2.3.4.3 
    Usage ............................................................................ 46 
    2.3.5 
    Stack Supervision by MPU ............................................................... 47 
    2.3.5.1 

    Description ..................................................................... 47 
    2.3.5.2 
    Activation ....................................................................... 47 
    2.3.5.3 
    Usage ............................................................................ 47 
    2.3.6 
    Stack Usage Measurement .............................................................. 48 
    2.3.6.1 

    Description ..................................................................... 48 
    2.3.6.2 
    Activation ....................................................................... 48 
    2.3.6.3 
    Usage ............................................................................ 48 
    2.4 
    Interrupt Concept ............................................................................................. 49 
    2.4.1 

    Interrupt Handling API ...................................................................... 49 
    2.4.2 
    Interrupt Levels ................................................................................ 49 
    2.4.3 
    Interrupt Vector Table ....................................................................... 50 
    2.4.4 
    Nesting of Category 2 Interrupts....................................................... 50 
    2.4.4.1 

    Description ..................................................................... 50 
    2.4.4.2 
    Activation ....................................................................... 50 
    2.4.5 
    Category 1 Interrupts ....................................................................... 50 
    2.4.5.1 

    Implementation of Category 1 ISRs ............................... 50 
    2.4.5.2 
    Nesting of Category 1 ISRs ............................................ 50 
    2.4.5.3 
    Category 1 ISRs before StartOS .................................... 51 
    2.4.5.4 
    Notes on Category 1 ISRs ............................................. 51 
    2.4.6 
    Initialization of Interrupt Sources ...................................................... 52 
    2.4.7 
    Unhandled Interrupts ........................................................................ 53 
    2.4.8 
    Unhandled Syscalls.......................................................................... 53 
    2.5 
    Exception Concept ........................................................................................... 54 
    2.5.1 

    Exception Vector Table ..................................................................... 54 
    2.5.2 
    Unhandled Exceptions ..................................................................... 54 
    2.6 
    Timer Concept ................................................................................................. 55 
    2.6.1 

    Description ....................................................................................... 55 
    2.6.2 
    Activation ......................................................................................... 55 
    2.6.3 
    Usage .............................................................................................. 55 
    2.6.4 
    Dependencies .................................................................................. 55 
    2.7 
    Periodical Interrupt Timer (PIT) ........................................................................ 56 
    2.7.1 

    Description ....................................................................................... 56 
    2.7.2 
    Activation ......................................................................................... 56 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.8 
    High Resolution Timer (HRT) ........................................................................... 57 
    2.8.1 

    Description ....................................................................................... 57 
    2.8.2 
    Activation ......................................................................................... 57 
    2.9 
    PIT versus HRT ............................................................................................... 57 
    2.10 
    Startup Concept ............................................................................................... 58 
    2.11 
    Single Core Startup .......................................................................................... 59 
    2.11.1 

    Single Core Derivatives .................................................................... 59 
    2.11.2 
    Multi Core Derivatives ...................................................................... 59 
    2.11.2.1 

    Examples for SC1 / SC2 Systems .................................. 59 
    2.11.2.2 
    Examples for SC3 / SC4 Systems .................................. 60 
    2.12 
    Multi Core Startup ............................................................................................ 62 
    2.12.1 

    Example for SC1 / SC2 Systems ...................................................... 62 
    2.12.2 
    Examples for SC3 / SC4 systems .................................................... 63 
    2.12.2.1 

    Only with AUTOSAR Cores ............................................ 63 
    2.12.2.2 
    Mixed Core System........................................................ 63 
    2.13 
    Error Handling .................................................................................................. 65 
    2.14 
    Error Reporting ................................................................................................ 65 
    2.14.1 

    Extension of Service IDs .................................................................. 65 
    2.14.2 
    Extension of Error Codes ................................................................. 66 
    2.14.3 
    Detailed Error Codes ........................................................................ 66 
    2.15 
    Multi Core Concepts ........................................................................................ 68 
    2.15.1 

    Scheduling and Dispatching ............................................................. 68 
    2.15.2 
    Multi Core Data Concepts ................................................................ 68 
    2.15.3 
    X-Signals ......................................................................................... 68 
    2.15.4 
    Master / Slave Core ......................................................................... 68 
    2.15.5 
    Hardware Init Core ........................................................................... 68 
    2.15.6 
    Startup of a Multi Core System ........................................................ 68 
    2.15.7 
    Spinlocks ......................................................................................... 68 
    2.15.7.1 
    Linking of Spinlocks ....................................................... 69 
    2.15.8 
    Cache .............................................................................................. 69 
    2.15.9 
    Shutdown ......................................................................................... 69 
    2.15.9.1 

    Shutdown of one Core ................................................... 69 
    2.15.9.2 
    Shutdown of all Cores .................................................... 69 
    2.15.9.3 
    Shutdown during Protection Violation............................. 69 
    2.16 
    Debugging Concepts ....................................................................................... 70 
    2.16.1 

    Description ....................................................................................... 70 
    2.16.2 
    Activation ......................................................................................... 70 
    2.16.3 
    ORTI Debugging .............................................................................. 70 
    2.17 
    Memory Protection ........................................................................................... 72 
    2.17.1 

    Usage of the System MPU ............................................................... 72 
    2.17.2 
    Usage of the Core MPUs ................................................................. 72 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.17.3 
    Configuration Aspects ...................................................................... 72 
    2.17.3.1 
    Static MPU Regions ....................................................... 73 
    2.17.3.2 
    Dynamic MPU Regions .................................................. 73 
    2.17.3.3 
    Freedom from Interference ............................................ 73 
    2.17.4 
    Stack Monitoring .............................................................................. 74 
    2.17.5 
    Protection Violation Handling ........................................................... 74 
    2.17.6 
    Optimized / Fast Core MPU Handling .............................................. 74 
    2.17.7 
    Recommended Configuration ........................................................... 75 
    2.18 
    Memory Access Checks ................................................................................... 76 
    2.18.1 

    Description ....................................................................................... 76 
    2.18.2 
    Activation ......................................................................................... 76 
    2.18.3 
    Usage .............................................................................................. 76 
    2.18.4 
    Dependencies .................................................................................. 76 
    2.19 
    Timing Protection Concept ............................................................................... 77 
    2.19.1 

    Description ....................................................................................... 77 
    2.19.2 
    Activation ......................................................................................... 77 
    2.19.3 
    Usage .............................................................................................. 78 
    2.20 
    IOC .................................................................................................................. 79 
    2.20.1 

    Description ....................................................................................... 79 
    2.20.2 
    Unqeued (Last Is Best) Communication ........................................... 79 
    2.20.2.1 

    1:1 Communication Variant ............................................ 79 
    2.20.2.2 
    N:1 Communication Variant ........................................... 79 
    2.20.2.3 
    N:M Communication Variant .......................................... 80 
    2.20.3 
    Queued Communication .................................................................. 80 
    2.20.4 
    Notification ....................................................................................... 80 
    2.20.5 
    Particularities ................................................................................... 80 
    2.20.5.1 

    N:1 Queued Communication .......................................... 80 
    2.20.5.2 
    IOC Spinlocks ................................................................ 81 
    2.20.5.3 
    Notification ..................................................................... 81 
    2.20.5.4 
    Complex Data Types ...................................................... 82 
    2.21 
    Trusted OS Applications ................................................................................... 83 
    2.21.1 

    Trusted OS Applications with Memory Protection ............................. 83 
    2.21.1.1 

    Description ..................................................................... 83 
    2.21.1.2 
    Activation ....................................................................... 83 
    2.21.1.3 
    Dependencies ................................................................ 83 
    2.21.2 
    Trusted OS Applications in User Mode ............................................. 83 
    2.21.2.1 

    Description ..................................................................... 83 
    2.21.2.2 
    Activation ....................................................................... 83 
    2.21.2.3 
    Dependencies ................................................................ 83 
    2.21.3 
    Trusted Functions ............................................................................ 84 
    2.22 
    OS Hooks ........................................................................................................ 85 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    10 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.22.1 
    Runtime Context .............................................................................. 85 
    2.22.2 
    Nesting behavior .............................................................................. 85 
    2.22.3 
    Hints ................................................................................................ 85 
    3 
    Vector Specific OS Features ...................................................................................... 87 
    3.1 

    Optimized Spinlocks ........................................................................................ 87 
    3.1.1 

    Description ....................................................................................... 87 
    3.1.2 
    Activation ......................................................................................... 87 
    3.1.3 
    Usage .............................................................................................. 87 
    3.2 
    Barriers ............................................................................................................ 88 
    3.2.1 

    Description ....................................................................................... 88 
    3.2.2 
    Activation ......................................................................................... 88 
    3.2.3 
    Usage .............................................................................................. 88 
    3.3 
    Peripheral Access API ...................................................................................... 90 
    3.3.1 

    Description ....................................................................................... 90 
    3.3.2 
    Activation ......................................................................................... 90 
    3.3.3 
    Usage .............................................................................................. 90 
    3.3.4 
    Dependencies .................................................................................. 90 
    3.3.5 
    Alternatives ...................................................................................... 90 
    3.3.6 
    Common Use Cases ........................................................................ 90 
    3.4 
    Trusted Function Call Stubs ............................................................................. 91 
    3.4.1 

    Description ....................................................................................... 91 
    3.4.2 
    Activation ......................................................................................... 91 
    3.4.3 
    Usage .............................................................................................. 91 
    3.4.4 
    Dependencies .................................................................................. 91 
    3.5 
    Non-Trusted Functions (NTF) .......................................................................... 92 
    3.5.1 

    Description ....................................................................................... 92 
    3.5.2 
    Activation ......................................................................................... 92 
    3.5.3 
    Usage .............................................................................................. 92 
    3.5.4 
    Dependencies .................................................................................. 92 
    3.6 
    Fast Trusted Functions..................................................................................... 93 
    3.6.1 

    Description ....................................................................................... 93 
    3.6.2 
    Activation ......................................................................................... 93 
    3.6.3 
    Usage .............................................................................................. 93 
    3.6.4 
    Dependencies .................................................................................. 93 
    3.7 
    Interrupt Source API ......................................................................................... 94 
    3.7.1 

    Description ....................................................................................... 94 
    3.8 
    Pre-Start Task .................................................................................................. 95 
    3.8.1 

    Description ....................................................................................... 95 
    3.8.2 
    Activation ......................................................................................... 95 
    3.8.3 
    Usage .............................................................................................. 95 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    11 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    3.8.4 
    Dependencies .................................................................................. 96 
    3.9 
    X-Signals ......................................................................................................... 97 
    3.9.1 

    Description ....................................................................................... 97 
    3.9.1.1 
    Notes on Synchronous X-Signals ................................... 99 
    3.9.1.2 
    Notes on Mixed Criticality Systems ................................ 99 
    3.9.2 
    Activation ....................................................................................... 100 
    3.10 
    Timing Hooks ................................................................................................. 101 
    3.10.1 

    Description ..................................................................................... 101 
    3.10.2 
    Activation ....................................................................................... 101 
    3.10.3 
    Usage ............................................................................................ 101 
    3.11 
    Kernel Panic .................................................................................................. 103 
    3.12 
    Generate callout stubs ................................................................................... 104 
    3.12.1 

    Description ..................................................................................... 104 
    3.12.2 
    Activation ....................................................................................... 104 
    3.12.3 
    Usage ............................................................................................ 104 
    3.13 
    Exception Context Manipulation ..................................................................... 105 
    3.13.1 

    Description ..................................................................................... 105 
    3.13.2 
    Usage ............................................................................................ 105 
    3.14 
    Category 0 Interrupts ..................................................................................... 106 
    3.14.1 

    Description ..................................................................................... 106 
    3.14.2 
    Usage ............................................................................................ 106 
    3.14.2.1 

    Implement Category 0 ISRs ......................................... 106 
    3.14.2.2 
    Nesting of Category 0 ISRs .......................................... 106 
    3.14.2.3 
    Category 0 ISRs before StartOS .................................. 106 
    3.14.2.4 
    Locations where category 0 ISRs are locked ............... 107 
    3.14.3 
    Notes on Category 0 ISRs.............................................................. 107 
    3.15 
    Floating Point Context Extension ................................................................... 110 
    3.15.1 

    Description ..................................................................................... 110 
    3.15.2 
    Usage ............................................................................................ 110 
    3.16 
    User defined processor state .......................................................................... 111 
    3.17 
    Interrupt Mapping ............................................................................................ 111 
    3.17.1 

    Description ...................................................................................... 111 
    3.17.2 
    Usage ............................................................................................. 111 
    4 
    Integration ................................................................................................................. 112 
    4.1 

    Compiler Optimization Assumptions ............................................................... 112 
    4.1.1 

    Compile Time ................................................................................. 112 
    4.2 
    Hardware Software Interfaces (HSI)............................................................... 112 
    4.2.1 
    TriCore Aurix Family ....................................................................... 113 
    4.2.1.1 

    Context ........................................................................ 113 
    4.2.1.2 
    Core Registers ............................................................. 113 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    12 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.1.3 
    Interrupt Registers ....................................................... 113 
    4.2.1.4 
    GPT Registers ............................................................. 113 
    4.2.1.5 
    STM Registers ............................................................. 114 
    4.2.1.6 
    Aurix Special Characteristics ....................................... 114 
    4.2.1.7 
    PSW handling .............................................................. 117 
    4.2.1.8 
    Configuration of Interrupt Sources ............................... 117 
    4.2.2 
    RH850 Family ................................................................................ 118 
    4.2.2.1 

    Context ........................................................................ 118 
    4.2.2.2 
    Core Registers ............................................................. 118 
    4.2.2.3 
    MPU Registers ............................................................. 119 
    4.2.2.4 
    INTC Registers ............................................................ 119 
    4.2.2.5 
    Inter Processor Interrupt Control Registers .................. 119 
    4.2.2.6 
    Timer TAUJ Registers .................................................. 119 
    4.2.2.7 
    Timer STM Registers ................................................... 121 
    4.2.2.8 
    Timer OSTM Registers ................................................ 122 
    4.2.2.9 
    RH850 Special Characteristics .................................... 122 
    4.2.2.10 
    PSW Register Handling ............................................... 124 
    4.2.2.11 
    Instructions .................................................................. 124 
    4.2.2.12 
    Exception and Interrupt Cause Address ....................... 124 
    4.2.3 
    Power PC Family ........................................................................... 125 
    4.2.3.1 

    Context ........................................................................ 125 
    4.2.3.2 
    Core Registers ............................................................. 125 
    4.2.3.3 
    Interrupt Registers ....................................................... 125 
    4.2.3.4 
    PIT Registers ............................................................... 126 
    4.2.3.5 
    STM Registers ............................................................. 126 
    4.2.3.6 
    MPU Registers ............................................................. 126 
    4.2.3.7 
    SEMA4 Registers ........................................................ 126 
    4.2.3.8 
    MC_ME Registers ........................................................ 126 
    4.2.3.9 
    SSCM Registers .......................................................... 126 
    4.2.3.10 
    Power PC Special Characteristics ................................ 127 
    4.2.3.11 
    Derivative Special Characteristics ................................ 129 
    4.2.3.12 
    MSR Handling .............................................................. 129 
    4.2.4 
    ARM Family ................................................................................... 130 
    4.2.4.1 

    Cortex-R derivatives .................................................... 130 
    4.2.4.1.1 

    Generic Cortex-R ..................................... 130 
    4.2.4.1.2 
    Traveo Family .......................................... 131 
    4.2.4.1.3 
    Ultrascale Family ..................................... 133 
    4.2.4.1.4 
    TI AR 16xx ............................................... 134 
    4.2.4.1.5 
    TI TMS570x ............................................. 135 
    4.2.4.1.6 
    Renesas R-Car H3 (Cortex-R7) ............... 136 
    4.2.4.1.7 
    PSR Handling .......................................... 138 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    13 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.2 
    Cortex-A derivatives ..................................................... 139 
    4.2.4.3 
    Cortex-M derivatives .................................................... 140 
    4.2.4.3.1 

    Generic Cortex-M..................................... 140 
    4.2.4.3.2 
    ATSAMv7x Family .................................... 141 
    4.2.4.3.3 
    S32K14x Family ....................................... 142 
    4.2.4.3.4 
    TDA2x ...................................................... 143 
    4.2.4.3.5 
    Traveo 2 Family ....................................... 144 
    4.2.4.4 
    ARM Special Characteristics ........................................ 145 
    4.3 
    Memory Mapping Concept ............................................................................. 147 
    4.3.1 

    Provided MemMap Section Specifiers ............................................ 147 
    4.3.1.1 
    Usage of MemMap Macros .......................................... 150 
    4.3.1.2 
    Resulting sections ........................................................ 150 
    4.3.1.3 
    Access Rights to Variable Sections .............................. 156 
    4.3.1.4 
    Access Rights to Shared Data Sections ....................... 158 
    4.3.2 
    Link Sections.................................................................................. 158 
    4.3.2.1 

    Pre-Process Linker Command Files ............................. 158 
    4.3.2.2 
    Simple Linker Defines .................................................. 159 
    4.3.2.3 
    Hierachical Linker Defines ........................................... 159 
    4.3.2.4 
    Selecting OS constants ................................................ 159 
    4.3.2.5 
    Selecting OS variables ................................................. 160 
    4.3.2.6 
    Selecting special OS Variables .................................... 161 
    4.3.2.7 
    Selecting User Constant Sections ................................ 162 
    4.3.2.8 
    Selecting User Variable Sections ................................. 163 
    4.3.3 
    Section Symbols ............................................................................ 165 
    4.3.3.1 
    Aggregation of Data Sections ...................................... 166 
    4.4 
    Static Code Analysis ...................................................................................... 166 
    4.5 
    Configuration of X-Signals ............................................................................. 167 
    4.5.1 

    TriCore Aurix Family ....................................................................... 167 
    4.5.2 
    RH850 Family ................................................................................ 167 
    4.5.3 
    Power PC Family ........................................................................... 168 
    4.5.4 
    ARM Family ................................................................................... 168 
    4.5.5 
    VTT OS .......................................................................................... 168 
    4.6 
    OS generated objects .................................................................................... 168 
    4.6.1 

    System Application ......................................................................... 168 
    4.6.2 
    Idle Task ......................................................................................... 169 
    4.6.3 
    Timer ISR ....................................................................................... 169 
    4.6.4 
    System Timer Counter ................................................................... 169 
    4.6.5 
    Timing Protection Counter .............................................................. 170 
    4.6.6 
    Timing protection ISR ..................................................................... 170 
    4.6.7 
    Resource Scheduler....................................................................... 170 
    4.6.8 
    X-Signal ISR .................................................................................. 170 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    14 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.6.9 
    IOC Spinlocks ................................................................................ 170 
    4.7 
    VTT OS Specifics ........................................................................................... 171 
    4.7.1 

    Configuration.................................................................................. 171 
    4.7.2 
    CANoe Interface ............................................................................ 171 
    4.7.2.1 

    Idle Task behavior with VTT OS ................................... 171 
    4.8 
    POSIX OS Specifics ...................................................................................... 172 
    4.8.1 

    Configuration.................................................................................. 172 
    4.8.2 
    Posix Interface ............................................................................... 172 
    4.9 
    User include files............................................................................................ 173 
    4.10 
    Preprocessing of assembler language files .................................................... 174 
    4.11 
    Configuration of Interrupt Mapping ................................................................. 175 
    4.11.1 

    TriCore Aurix Family ....................................................................... 175 
    4.11.2 
    ARM Family ................................................................................... 175 
    4.11.2.1 

    Traveo ......................................................................... 175 
    4.11.2.2 
    Traveo 2....................................................................... 175 
    4.12 
    Stack Summary ............................................................................................. 175 
    5 
    API Description ......................................................................................................... 177 
    5.1 

    Specified OS services .................................................................................... 177 
    5.1.1 

    StartCore ....................................................................................... 177 
    5.1.2 
    StartNonAutosarCore ..................................................................... 178 
    5.1.3 
    GetCoreID ...................................................................................... 179 
    5.1.4 
    GetNumberOfActivatedCores ......................................................... 180 
    5.1.5 
    GetActiveApplicationMode ............................................................. 181 
    5.1.6 
    StartOS .......................................................................................... 182 
    5.1.7 
    ShutdownOS .................................................................................. 183 
    5.1.8 
    ShutdownAllCores ......................................................................... 184 
    5.1.9 
    ControlIdle ..................................................................................... 185 
    5.1.10 
    GetSpinlock ................................................................................... 186 
    5.1.11 
    ReleaseSpinlock ............................................................................ 187 
    5.1.12 
    TryToGetSpinlock ........................................................................... 188 
    5.1.13 
    DisableAllInterrupts ........................................................................ 189 
    5.1.14 
    EnableAllInterrupts ......................................................................... 190 
    5.1.15 
    SuspendAllInterrupts ...................................................................... 191 
    5.1.16 
    ResumeAllInterrupts ....................................................................... 192 
    5.1.17 
    SuspendOSInterrupts ..................................................................... 193 
    5.1.18 
    ResumeOSInterrupts ..................................................................... 194 
    5.1.19 
    ActivateTask ................................................................................... 195 
    5.1.20 
    TerminateTask ................................................................................ 196 
    5.1.21 
    ChainTask ...................................................................................... 197 
    5.1.22 
    Schedule ........................................................................................ 198 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    15 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.23 
    GetTaskID ...................................................................................... 199 
    5.1.24 
    GetTaskState ................................................................................. 200 
    5.1.25 
    GetISRID ....................................................................................... 201 
    5.1.26 
    SetEvent ........................................................................................ 202 
    5.1.27 
    ClearEvent ..................................................................................... 203 
    5.1.28 
    GetEvent ........................................................................................ 204 
    5.1.29 
    WaitEvent ....................................................................................... 205 
    5.1.30 
    IncrementCounter .......................................................................... 206 
    5.1.31 
    GetCounterValue ........................................................................... 207 
    5.1.32 
    GetElapsedValue ........................................................................... 208 
    5.1.33 
    GetAlarmBase ................................................................................ 209 
    5.1.34 
    GetAlarm ........................................................................................ 210 
    5.1.35 
    SetRelAlarm ................................................................................... 211 
    5.1.36 
    SetAbsAlarm .................................................................................. 212 
    5.1.37 
    CancelAlarm .................................................................................. 213 
    5.1.38 
    GetResource .................................................................................. 214 
    5.1.39 
    ReleaseResource .......................................................................... 215 
    5.1.40 
    StartScheduleTableRel ................................................................... 216 
    5.1.41 
    StartScheduleTableAbs .................................................................. 217 
    5.1.42 
    StopScheduleTable ........................................................................ 218 
    5.1.43 
    NextScheduleTable ........................................................................ 219 
    5.1.44 
    GetScheduleTableStatus ................................................................ 220 
    5.1.45 
    StartScheduleTableSynchron ......................................................... 221 
    5.1.46 
    SyncScheduleTable........................................................................ 222 
    5.1.47 
    SetScheduleTableAsync ................................................................ 223 
    5.1.48 
    GetApplicationID ............................................................................ 224 
    5.1.49 
    GetCurrentApplicationID ................................................................ 225 
    5.1.50 
    GetApplicationState ....................................................................... 226 
    5.1.51 
    CheckObjectAccess ....................................................................... 227 
    5.1.52 
    CheckObjectOwnership ................................................................. 228 
    5.1.53 
    AllowAccess ................................................................................... 229 
    5.1.54 
    TerminateApplication ...................................................................... 230 
    5.1.55 
    CallTrustedFunction ....................................................................... 231 
    5.1.56 
    Check Task Memory Access .......................................................... 232 
    5.1.57 
    Check ISR Memory Access ............................................................ 233 
    5.1.58 
    OSErrorGetServiceId ..................................................................... 234 
    5.1.59 
    OSError_Os_DisableInterruptSource_ISRID .................................. 235 
    5.1.60 
    OSError_Os_EnableInterruptSource_ISRID .................................. 235 
    5.1.61 
    OSError_Os_EnableInterruptSource_ClearPending....................... 236 
    5.1.62 
    OSError_Os_ClearPendingInterrupt_ISRID ................................... 236 
    5.1.63 
    OSError_Os_IsInterruptSourceEnabled_ISRID .............................. 237 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    16 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.64 
    OSError_Os_IsInterruptSourceEnabled_IsEnabled ....................... 237 
    5.1.65 
    OSError_Os_IsInterruptPending_ISRID ......................................... 238 
    5.1.66 
    OSError_Os_IsInterruptPending_IsPending ................................... 238 
    5.1.67 
    OSError_CallTrustedFunction_FunctionIndex ................................ 239 
    5.1.68 
    OSError_CallTrustedFunction_FunctionParams ............................. 239 
    5.1.69 
    OSError_CallNonTrustedFunction_FunctionIndex .......................... 240 
    5.1.70 
    OSError_CallNonTrustedFunction_FunctionParams ...................... 240 
    5.1.71 
    OSError_StartScheduleTableRel_ScheduleTableID ....................... 241 
    5.1.72 
    OSError_StartScheduleTableRel_Offset ........................................ 241 
    5.1.73 
    OSError_StartScheduleTableAbs_ScheduleTableID ...................... 242 
    5.1.74 
    OSError_StartScheduleTableAbs_Start.......................................... 242 
    5.1.75 
    OSError_StopScheduleTable_ScheduleTableID ............................. 243 
    5.1.76 
    OSError_NextScheduleTable_ScheduleTableID_From .................. 243 
    5.1.77 
    OSError_NextScheduleTable_ScheduleTableID_To ....................... 244 
    5.1.78 
    OSError_StartScheduleTableSynchron_ScheduleTableID ............. 244 
    5.1.79 
    OSError_SyncScheduleTable_ScheduleTableID ............................ 245 
    5.1.80 
    OSError_SyncScheduleTable_Value .............................................. 245 
    5.1.81 
    OSError_SetScheduleTableAsync_ScheduleTableID ..................... 246 
    5.1.82 
    OSError_GetScheduleTableStatus_ScheduleTableID .................... 246 
    5.1.83 
    OSError_GetScheduleTableStatus_ScheduleStatus ...................... 247 
    5.1.84 
    OSError_IncrementCounter_CounterID ......................................... 247 
    5.1.85 
    OSError_GetCounterValue_CounterID ........................................... 248 
    5.1.86 
    OSError_GetCounterValue_Value .................................................. 249 
    5.1.87 
    OSError_GetElapsedValue_CounterID .......................................... 249 
    5.1.88 
    OSError_GetElapsedValue_Value .................................................. 250 
    5.1.89 
    OSError_GetElapsedValue_ElapsedValue ..................................... 250 
    5.1.90 
    OSError_TerminateApplication_Application .................................... 251 
    5.1.91 
    OSError_TerminateApplication_RestartOption ............................... 251 
    5.1.92 
    OSError_GetApplicationState_Application ..................................... 252 
    5.1.93 
    OSError_GetApplicationState_Value .............................................. 252 
    5.1.94 
    OSError_GetSpinlock_SpinlockId .................................................. 253 
    5.1.95 
    OSError_ReleaseSpinlock_SpinlockId ........................................... 253 
    5.1.96 
    OSError_TryToGetSpinlock_SpinlockId .......................................... 254 
    5.1.97 
    OSError_TryToGetSpinlock_Success ............................................. 254 
    5.1.98 
    OSError_ControlIdle_CoreID ......................................................... 255 
    5.1.99 
    OSError_Os_GetExceptionContext_Context .................................. 255 
    5.1.100  OSError_Os_SetExceptionContext_Context .................................. 256 
    5.1.101  OSError_ControlIdle_IdleMode ...................................................... 256 
    5.1.102  OSError_IocSend_IN ..................................................................... 257 
    5.1.103  OSError_IocWrite_IN ..................................................................... 257 
    5.1.104  OSError_IocSendGroup_IN ........................................................... 258 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    17 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.105  OSError_IocWriteGroup_IN ........................................................... 258 
    5.1.106  OSError_IocReceive_OUT ............................................................. 259 
    5.1.107  OSError_IocRead_OUT ................................................................. 259 
    5.1.108  OSError_IocReceiveGroup_OUT ................................................... 260 
    5.1.109  OSError_IocReadGroup_OUT ....................................................... 260 
    5.1.110  OSError_StartOS_Mode ................................................................ 261 
    5.1.111  OSError_ActivateTask_TaskID ....................................................... 261 
    5.1.112  OSError_ChainTask_TaskID .......................................................... 262 
    5.1.113  OSError_GetTaskID_TaskID .......................................................... 262 
    5.1.114  OSError_GetTaskState_TaskID ...................................................... 263 
    5.1.115  OSError_GetTaskState_State ........................................................ 263 
    5.1.116  OSError_SetEvent_TaskID............................................................. 264 
    5.1.117  OSError_SetEvent_Mask ............................................................... 264 
    5.1.118  OSError_ClearEvent_Mask ............................................................ 265 
    5.1.119  OSError_GetEvent_TaskID ............................................................ 265 
    5.1.120  OSError_GetEvent_Mask .............................................................. 266 
    5.1.121  OSError_WaitEvent_Mask ............................................................. 266 
    5.1.122  OSError_GetAlarmBase_AlarmID .................................................. 267 
    5.1.123  OSError_GetAlarmBase_Info ......................................................... 267 
    5.1.124  OSError_GetAlarm_AlarmID .......................................................... 268 
    5.1.125  OSError_GetAlarm_Tick ................................................................ 268 
    5.1.126  OSError_SetRelAlarm_AlarmID ..................................................... 269 
    5.1.127  OSError_SetRelAlarm_increment .................................................. 269 
    5.1.128  OSError_SetRelAlarm_cycle .......................................................... 270 
    5.1.129  OSError_SetAbsAlarm_AlarmID .................................................... 270 
    5.1.130  OSError_SetAbsAlarm_start .......................................................... 271 
    5.1.131  OSError_SetAbsAlarm_cycle ......................................................... 271 
    5.1.132  OSError_CancelAlarm_AlarmID ..................................................... 272 
    5.1.133  OSError_GetResource_ResID ....................................................... 272 
    5.1.134  OSError_ReleaseResource_ResID ................................................ 273 
    5.1.135  OSError_Os_GetUnhandledIrq_InterruptSource ............................ 273 
    5.1.136  OSError_Os_GetUnhandledExc_ExceptionSource ........................ 274 
    5.1.137  OSError_BarrierSynchronize_BarrierID.......................................... 274 

    5.2 
    Additional OS services ................................................................................... 275 
    5.2.1 

    Os_GetVersionInfo ......................................................................... 275 
    5.2.2 
    Peripheral Access API .................................................................... 276 
    5.2.2.1 

    Read Functions ............................................................ 276 
    5.2.2.2 
    Write Functions ............................................................ 278 
    5.2.2.3 
    Bitmask Functions ....................................................... 280 
    5.2.3 
    Pre-Start Task ................................................................................ 282 
    5.2.4 
    Non-Trusted Functions (NTF) ......................................................... 283 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    18 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.5 
    Fast Trusted Functions ................................................................... 284 
    5.2.6 
    Interrupt Source API ....................................................................... 285 
    5.2.6.1 

    Disable Interrupt Source .............................................. 285 
    5.2.6.2 
    Enable Interrupt Source ............................................... 286 
    5.2.6.3 
    Clear Pending Interrupt ................................................ 287 
    5.2.6.4 
    Check Interrupt Source Enabled .................................. 288 
    5.2.6.5 
    Check Interrupt Pending .............................................. 289 
    5.2.7 
    Detailed Error API .......................................................................... 290 
    5.2.7.1 

    Get detailed Error ........................................................ 290 
    5.2.7.2 
    Unhandled Interrupt Requests ..................................... 291 
    5.2.7.3 
    Unhandled Exception Requests ................................... 292 
    5.2.8 
    Stack Usage API ............................................................................ 293 
    5.2.9 
    RTE Interrupt API ........................................................................... 294 
    5.2.10 
    Time Conversion Macros ............................................................... 295 
    5.2.10.1 

    Convert from Time into Counter Ticks .......................... 295 
    5.2.10.2 
    Convert from Counter Ticks into Time .......................... 295 
    5.2.11 
    OS Initialization .............................................................................. 296 
    5.2.12 
    Timing Hooks ................................................................................. 297 
    5.2.12.1 

    Timing Hooks for Activation .......................................... 297 
    5.2.12.1.1  Task Activation ......................................... 297 
    5.2.12.1.2  Task Activation Exeeding Limit ................. 298 
    5.2.12.1.3  Set Event ................................................. 298 
    5.2.12.1.4  Wait Event Not Waiting ............................ 299 
    5.2.12.1.5  Timing Hook for Context Switch ............... 300 
    5.2.12.2 
    Timing Hooks for Locking Purposes ............................. 301 
    5.2.12.2.1  Get Resource ........................................... 301 
    5.2.12.2.2  Release Resource ................................... 301 
    5.2.12.2.3  Request Spinlock ..................................... 302 
    5.2.12.2.4  Request Internal Spinlock ........................ 302 
    5.2.12.2.5  Get Spinlock ............................................ 303 
    5.2.12.2.6  Get Internal Spinlock ................................ 303 
    5.2.12.2.7  Release Spinlock ..................................... 304 
    5.2.12.2.8  Release Internal Spinlock ........................ 304 
    5.2.12.2.9  Disable Interrupts ..................................... 305 
    5.2.12.2.10  Enable Interrupts ..................................... 306 
    5.2.13 
    PanicHook ..................................................................................... 307 
    5.2.14 
    Barriers .......................................................................................... 308 
    5.2.15 
    Exception Context Manipulation ..................................................... 309 
    5.2.15.1 

    Os_GetExceptionContext............................................. 309 
    5.2.15.2 
    Os_SetExceptionContext ............................................. 310 
    5.3 
    Calling Context Overview ............................................................................... 311 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    19 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    6 
    Configuration ............................................................................................................ 312 
    7 
    Glossary .................................................................................................................... 313 
    8 
    Contact ...................................................................................................................... 314 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    20 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Illustrations 
    Figure 1-1 
    AUTOSAR Architecture Overview ............................................................. 25 
    Figure 2-1 
    Stack Safety Gap ...................................................................................... 48 
    Figure 2-2 
    Interrupt Lock Levels ................................................................................ 49 
    Figure 2-3 
    API functions during startup ...................................................................... 58 
    Figure 2-4 
    MICROSAR OS Detailed Error Code ........................................................ 67 
    Figure 2-5 
    N:1 Multiple Sender Queues ..................................................................... 81 
    Figure 3-1 
    Barriers ..................................................................................................... 88 
    Figure 3-2 
    X-Signal .................................................................................................... 97 
    Figure 3-3 
    Usage of manipulating exception context ................................................ 105 
    Figure 4-1 
    Padding bytes between MPU regions ..................................................... 114 
     
    Tables 
    Table 1-1  
    MICROSAR OS Characteristics ................................................................ 26 
    Table 1-2  
    Supported TriCore Aurix Hardware ........................................................... 28 
    Table 1-3  
    Supported TriCore Aurix Compilers ........................................................... 28 
    Table 1-4  
    Supported Power PC Hardware ................................................................ 31 
    Table 1-5  
    Supported Power PC compilers ................................................................ 31 
    Table 1-6  
    Supported ARM Hardware ........................................................................ 31 
    Table 1-7  
    Supported ARM compilers ........................................................................ 32 
    Table 1-8  
    Supported RH850 Hardware ..................................................................... 33 
    Table 1-9  
    Supported RH850 Compilers .................................................................... 33 
    Table 1-10  
    VTT OS characteristics ............................................................................. 34 
    Table 1-11  
    POSIX OS characteristic .......................................................................... 35 
    Table 2-1  
    MICROSAR OS Stack Types .................................................................... 43 
    Table 2-2  
    Stack Check Patterns ............................................................................... 45 
    Table 2-3  
    PIT versus HRT ........................................................................................ 57 
    Table 2-4  
    Types of OS Errors ................................................................................... 65 
    Table 2-5  
    Extension of Error Codes .......................................................................... 66 
    Table 2-6  
    Linking of spinlocks................................................................................... 69 
    Table 2-7  
    Recommended Configuration MPU Access Rights ................................... 75 
    Table 3-1  
    Differences of OS and Optimized Spinlocks .............................................. 87 
    Table 3-2  
    Comparison between Synchronous and Asynchronous X-Signal .............. 98 
    Table 3-3  
    Priority of X-Signal receiver ISR................................................................ 99 
    Table 4-1  
    Provided MemMap Section Specifiers .................................................... 149 
    Table 4-2  
    MemMap Code Sections Descriptions .................................................... 150 
    Table 4-3  
    MemMap Callout Code Sections Descriptions ........................................ 150 
    Table 4-4  
    MemMap Const Sections Descriptions ................................................... 151 
    Table 4-5  
    MemMap Variable Sections Descriptions ................................................ 154 
    Table 4-6  
    MemMap Variable Stack Sections Descriptions ...................................... 155 
    Table 4-7  
    Recommended Section Access Rights ................................................... 157 
    Table 4-8  
    Recommended Spinlock Section Access Rights ..................................... 158 
    Table 4-9  
    List of Generated Linker Command Files ................................................ 158 
    Table 4-10  
    OS constants linker define group ............................................................ 159 
    Table 4-11  
    OS variables linker define group ............................................................. 160 
    Table 4-12  
    OS Barriers and Core status linker define group ..................................... 161 
    Table 4-13  
    User constants linker define group .......................................................... 162 
    Table 4-14  
    User variables linker define group ........................................................... 163 
    Table 5-1  
    StartCore ................................................................................................ 177 
    Table 5-2  
    StartNonAutosarCore ............................................................................. 178 
    Table 5-3  
    GetCoreID .............................................................................................. 179 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    21 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Table 5-4  
    GetNumberOfActivatedCores ................................................................. 180 
    Table 5-5  
    GetActiveApplicationMode ...................................................................... 181 
    Table 5-6  
    StartOS ................................................................................................... 182 
    Table 5-7  
    ShutdownOS .......................................................................................... 183 
    Table 5-8  
    ShutdownAllCores .................................................................................. 184 
    Table 5-9  
    ControlIdle .............................................................................................. 185 
    Table 5-10  
    GetSpinlock ............................................................................................ 186 
    Table 5-11  
    ReleaseSpinlock ..................................................................................... 187 
    Table 5-12  
    TryToGetSpinlock ................................................................................... 188 
    Table 5-13  
    DisableAllInterrupts................................................................................. 189 
    Table 5-14  
    EnableAllInterrupts ................................................................................. 190 
    Table 5-15  
    SuspendAllInterrupts .............................................................................. 191 
    Table 5-16  
    ResumeAllInterrupts ............................................................................... 192 
    Table 5-17  
    SuspendOSInterrupts ............................................................................. 193 
    Table 5-18  
    ResumeOSInterrupts .............................................................................. 194 
    Table 5-19  
    ActivateTask ........................................................................................... 195 
    Table 5-20  
    TerminateTask ........................................................................................ 196 
    Table 5-21  
    ChainTask ............................................................................................... 197 
    Table 5-22  
    Schedule ................................................................................................ 198 
    Table 5-23  
    GetTaskID ............................................................................................... 199 
    Table 5-24  
    GetTaskState .......................................................................................... 200 
    Table 5-25  
    GetISRID ................................................................................................ 201 
    Table 5-26  
    SetEvent ................................................................................................. 202 
    Table 5-27  
    ClearEvent .............................................................................................. 203 
    Table 5-28  
    GetEvent ................................................................................................ 204 
    Table 5-29  
    WaitEvent ............................................................................................... 205 
    Table 5-30  
    IncrementCounter ................................................................................... 206 
    Table 5-31  
    GetCounterValue .................................................................................... 207 
    Table 5-32  
    GetElapsedValue .................................................................................... 208 
    Table 5-33  
    GetAlarmBase ........................................................................................ 209 
    Table 5-34  
    GetAlarm ................................................................................................ 210 
    Table 5-35  
    SetRelAlarm ........................................................................................... 211 
    Table 5-36  
    SetAbsAlarm........................................................................................... 212 
    Table 5-37  
    CancelAlarm ........................................................................................... 213 
    Table 5-38  
    GetResource .......................................................................................... 214 
    Table 5-39  
    ReleaseResource ................................................................................... 215 
    Table 5-40  
    StartScheduleTableRel ........................................................................... 216 
    Table 5-41  
    StartScheduleTableAbs .......................................................................... 217 
    Table 5-42  
    StopScheduleTable ................................................................................. 218 
    Table 5-43  
    NextScheduleTable ................................................................................. 219 
    Table 5-44  
    GetScheduleTableStatus ........................................................................ 220 
    Table 5-45  
    StartScheduleTableSynchron .................................................................. 221 
    Table 5-46  
    SyncScheduleTable ................................................................................ 222 
    Table 5-47  
    SetScheduleTableAsync ......................................................................... 223 
    Table 5-48  
    GetApplicationID ..................................................................................... 224 
    Table 5-49  
    GetCurrentApplicationID ......................................................................... 225 
    Table 5-50  
    GetApplicationState ................................................................................ 226 
    Table 5-51  
    CheckObjectAccess ................................................................................ 227 
    Table 5-52  
    CheckObjectOwnership .......................................................................... 228 
    Table 5-53  
    AllowAccess ........................................................................................... 229 
    Table 5-54  
    TerminateApplication .............................................................................. 230 
    Table 5-55  
    CallTrustedFunction ................................................................................ 231 
    Table 5-56  
    API Service CheckTaskMemoryAccess .................................................. 232 
    Table 5-57  
    API Service CheckISRMemoryAccess .................................................... 233 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    22 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Table 5-58  
    OSErrorGetServiceId .............................................................................. 234 
    Table 5-59  
    OSError_Os_DisableInterruptSource_ISRID .......................................... 235 
    Table 5-60  
    OSError_Os_EnableInterruptSource_ISRID ........................................... 235 
    Table 5-61  
    OSError_Os_EnableInterruptSource_ClearPending ............................... 236 
    Table 5-62  
    OSError_Os_ClearPendingInterrupt_ISRID ............................................ 236 
    Table 5-63  
    OSError_Os_IsInterruptSourceEnabled_ISRID ...................................... 237 
    Table 5-64  
    OSError_Os_IsInterruptSourceEnabled_IsEnabled ................................ 237 
    Table 5-65  
    OSError_Os_IsInterruptPending_ISRID .................................................. 238 
    Table 5-66  
    OSError_Os_IsInterruptPending_IsPending ........................................... 238 
    Table 5-67  
    OSError_CallTrustedFunction_FunctionIndex ......................................... 239 
    Table 5-68  
    OSError_CallTrustedFunction_FunctionParams ..................................... 239 
    Table 5-69  
    OSError_CallNonTrustedFunction_FunctionIndex .................................. 240 
    Table 5-70  
    OSError_CallNonTrustedFunction_FunctionParams ............................... 240 
    Table 5-71  
    OSError_StartScheduleTableRel_ScheduleTableID ................................ 241 
    Table 5-72  
    OSError_StartScheduleTableRel_Offset ................................................. 241 
    Table 5-73  
    OSError_StartScheduleTableAbs_ScheduleTableID ............................... 242 
    Table 5-74  
    OSError_StartScheduleTableAbs_Start .................................................. 242 
    Table 5-75  
    OSError_StopScheduleTable_ScheduleTableID ..................................... 243 
    Table 5-76  
    OSError_NextScheduleTable_ScheduleTableID_From ........................... 243 
    Table 5-77  
    OSError_NextScheduleTable_ScheduleTableID_To................................ 244 
    Table 5-78  
    OSError_StartScheduleTableSynchron_ScheduleTableID ...................... 244 
    Table 5-79  
    OSError_SyncScheduleTable_ScheduleTableID ..................................... 245 
    Table 5-80  
    OSError_SyncScheduleTable_Value....................................................... 245 
    Table 5-81  
    OSError_SetScheduleTableAsync_ScheduleTableID .............................. 246 
    Table 5-82  
    OSError_GetScheduleTableStatus_ScheduleTableID ............................. 246 
    Table 5-83  
    OSError_GetScheduleTableStatus_ScheduleStatus ............................... 247 
    Table 5-84  
    OSError_IncrementCounter_CounterID .................................................. 247 
    Table 5-85  
    OSError_GetCounterValue_CounterID ................................................... 248 
    Table 5-86  
    OSError_GetCounterValue_Value .......................................................... 249 
    Table 5-87  
    OSError_GetElapsedValue_CounterID ................................................... 249 
    Table 5-88  
    OSError_GetElapsedValue_Value .......................................................... 250 
    Table 5-89  
    OSError_GetElapsedValue_ElapsedValue .............................................. 250 
    Table 5-90  
    OSError_TerminateApplication_Application ............................................ 251 
    Table 5-91  
    OSError_TerminateApplication_RestartOption ........................................ 251 
    Table 5-92  
    OSError_GetApplicationState_Application .............................................. 252 
    Table 5-93  
    OSError_GetApplicationState_Value ...................................................... 252 
    Table 5-94  
    OSError_GetSpinlock_SpinlockId ........................................................... 253 
    Table 5-95  
    OSError_ReleaseSpinlock_SpinlockId .................................................... 253 
    Table 5-96  
    OSError_TryToGetSpinlock_SpinlockId .................................................. 254 
    Table 5-97  
    OSError_TryToGetSpinlock_Success ..................................................... 254 
    Table 5-98  
    OSError_ControlIdle_CoreID .................................................................. 255 
    Table 5-99  
    OSError_Os_GetExceptionContext_Context .......................................... 255 
    Table 5-100  
    OSError_Os_SetExceptionContext_Context ........................................... 256 
    Table 5-101  
    OSError_ControlIdle_IdleMode ............................................................... 256 
    Table 5-102  
    OSError_IocSend_IN .............................................................................. 257 
    Table 5-103  
    OSError_IocWrite_IN .............................................................................. 257 
    Table 5-104  
    OSError_IocSendGroup_IN .................................................................... 258 
    Table 5-105  
    OSError_IocWriteGroup_IN .................................................................... 258 
    Table 5-106  
    OSError_IocReceive_OUT ..................................................................... 259 
    Table 5-107  
    OSError_IocRead_OUT .......................................................................... 259 
    Table 5-108  
    OSError_IocReceiveGroup_OUT ............................................................ 260 
    Table 5-109  
    OSError_IocReadGroup_OUT ................................................................ 260 
    Table 5-110  
    OSError_StartOS_Mode ......................................................................... 261 
    Table 5-111  
    OSError_ActivateTask_TaskID ................................................................ 261 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    23 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Table 5-112  
    OSError_ChainTask_TaskID ................................................................... 262 
    Table 5-113  
    OSError_GetTaskID_TaskID ................................................................... 262 
    Table 5-114  
    OSError_GetTaskState_TaskID .............................................................. 263 
    Table 5-115  
    OSError_GetTaskState_State ................................................................. 263 
    Table 5-116  
    OSError_SetEvent_TaskID ..................................................................... 264 
    Table 5-117  
    OSError_SetEvent_Mask........................................................................ 264 
    Table 5-118  
    OSError_ClearEvent_Mask .................................................................... 265 
    Table 5-119  
    OSError_GetEvent_TaskID ..................................................................... 265 
    Table 5-120  
    OSError_GetEvent_Mask ....................................................................... 266 
    Table 5-121  
    OSError_WaitEvent_Mask ...................................................................... 266 
    Table 5-122  
    OSError_GetAlarmBase_AlarmID ........................................................... 267 
    Table 5-123  
    OSError_GetAlarmBase_Info ................................................................. 267 
    Table 5-124  
    OSError_GetAlarm_AlarmID ................................................................... 268 
    Table 5-125  
    OSError_GetAlarm_Tick ......................................................................... 268 
    Table 5-126  
    OSError_SetRelAlarm_AlarmID .............................................................. 269 
    Table 5-127  
    OSError_SetRelAlarm_increment ........................................................... 269 
    Table 5-128  
    OSError_SetRelAlarm_cycle .................................................................. 270 
    Table 5-129  
    OSError_SetAbsAlarm_AlarmID ............................................................. 270 
    Table 5-130  
    OSError_SetAbsAlarm_start ................................................................... 271 
    Table 5-131  
    OSError_SetAbsAlarm_cycle .................................................................. 271 
    Table 5-132  
    OSError_CancelAlarm_AlarmID ............................................................. 272 
    Table 5-133  
    OSError_GetResource_ResID ................................................................ 272 
    Table 5-134  
    OSError_ReleaseResource_ResID ........................................................ 273 
    Table 5-135  
    OSError_Os_GetUnhandledIrq_InterruptSource ..................................... 273 
    Table 5-136  
    OSError_Os_GetUnhandledExc_ExceptionSource................................. 274 
    Table 5-137  
    OSError_BarrierSynchronize_BarrierID .................................................. 274 
    Table 5-138  
    Os_GetVersionInfo ................................................................................. 275 
    Table 5-139  
    Read Peripheral API ............................................................................... 276 
    Table 5-140  
    Write Peripheral APIs .............................................................................. 278 
    Table 5-141  
    Bitmask Peripheral API ........................................................................... 281 
    Table 5-142  
    API Service Os_EnterPreStartTask ......................................................... 282 
    Table 5-143  
    Call Non-Trusted Function API ................................................................ 283 
    Table 5-144  
    API Service Os_DisableInterruptSource ................................................. 285 
    Table 5-145  
    API Service Os_EnableInterruptSource .................................................. 286 
    Table 5-146  
    API Service Os_ClearPendingInterrupt ................................................... 287 
    Table 5-147  
    API Service Os_IsInterruptSourceEnabled ............................................. 288 
    Table 5-148  
    API Service Os_IsInterruptPending ........................................................ 289 
    Table 5-149  
    API Service Os_GetDetailedError ........................................................... 290 
    Table 5-150  
    API Service Os_GetUnhandledIrq .......................................................... 291 
    Table 5-151  
    API Service Os_GetUnhandledExc ......................................................... 292 
    Table 5-152  
    Overview: Stack Usage Functions .......................................................... 293 
    Table 5-153  
    Conversion Macros from Time to Counter Ticks ...................................... 295 
    Table 5-154  
    Conversion Macros from Counter Ticks to Time ...................................... 295 
    Table 5-155  
    API Service Os_Init................................................................................. 296 
    Table 5-156  
    API Service Os_InitMemory .................................................................... 296 
    Table 5-157  
    Barriers ................................................................................................... 308 
    Table 5-158  
    Os_GetExceptionContext ....................................................................... 309 
    Table 5-159  
    Os_SetExceptionContext ........................................................................ 310 
    Table 5-160  
    Calling Context Overview........................................................................ 311 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    24 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    1  Introduction 
    This  document  describes  the  usage  and  functions  of  “MICROSAR  OS”,  an  operating 
    system which implements the AUTOSAR BSW module “OS” as specified in [1]. 
    This  documentation  assumes  that  the  reader  is  familiar  with  both  the  OSEK  OS1 
    specification and the AUTOSAR OS specification. 
    1.1 
    Architecture Overview 
    The  following  figure  shows  the  location  of  the  OS  module  within  the  AUTOSAR 
    architecture. 
     
    Figure 1-1  AUTOSAR Architecture Overview 
     
     
                                                
    1 OSEK is a registered trademark of Continental Automotive GmbH (until  2007: Siemens AG) 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    25 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.2 
    Abstract 
    The  MICROSAR  OS  operating  system  is  a  real  time  operating  system,  which  was 
    specified for the usage in electronic control. 
    As a requirement, there is no dynamic creation of new tasks at runtime; all tasks have to 
    be defined before compilation (pre-compile configuration variant). 
    The OS has no dynamic memory management and there is no shell for the control of tasks 
    by hand. 
    Typically  the  source  and  configuration  files  of  the  operating  system  and  the  application 
    source files are compiled and linked together to one executable file, which is loaded into 
    an emulator or is burned into an EPROM or Flash EEPROM. 
    1.3 
    Characteristics 
    MICROSAR OS has the following characteristics: 
    Supported Scalability Classes 
    SC1, SC2, SC3, SC4 (as described in [1]) 
    Single Core ECUs 
    Supported 
    Multi Core ECUs 
    Supported 
    IOC 
    Supported 
    Table 1-1   MICROSAR OS Characteristics 
    MICROSAR  OS  supports  various  different  processor  families  of  different  vendors  in 
    conjunction with multiple compilers. 
    The  availability  for  a  particular  processor  in  conjunction  with  a  specific  compiler  can  be 
    queried from Vector Informatik. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    26 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4 
    Hardware Overview 
    The  following  table  summarizes  information  about  MICROSAR  OS.  It  gives  detailed 
    information  about  the  derivatives  and  compilers.  As  very  important  information  the 
    documentations of the hardware manufacturers are listed. MICROSAR OS is based upon 
    these documents in the given version. 
    Table Rows 
    >  Compiler: List of Compilers MICROSAR OS is working with. 
    >  Derivative: This can be a single information or a list of derivatives, MICROSAR OS 
    can be used on. 
    >  Hardware Manufacturer Document Name: List of hardware documentation 
    MICROSAR OS is based on. 
    >  Document Version: To be able to reference to this hardware documentation its 
    version is very important. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    27 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4.1 
    TriCore Aurix 
    Derivative  Hardware Manufacturer Document Name 
    Document 
    Version 

    TC21x 
    User Manual: tc23x_tc22x_tc21x_um_v1.1.pdf 
    V1.1 
    TC22x 
    Errata Sheet: TC22x_TC21x_AB_Errata_Sheet_v1_2_03804A.pdf 
    V1.2 
    TC23x 
    TC24x 
    Target Specification: tc24x_ts_v2.0_OPEN_MARKET.pdf 
    V2.0 
    TC26x 
    User Manual: 
    V1.3 
    tc26xB_um_v1.3._usermanual_rev1v3.pdf 
    Errata Sheet: 
    V1.2 
    TC26x_BB_Errata_Sheet_rev1v2_03989A_2016-04-18.pdf 
    TC27x 
    User Manual: 
    V2.2 
    tc27xD_um_v2.2_UserManual_rev2v2_2014-12.pdf 
    Errata Sheet: 
    V1.5 
    TC27x_BC_Errata_Sheet_rev1v5_2015_09_16.pdf 
    TC29x 
    User Manual: 
    V1.3 
    tc29xB_um_v1.3._TC29x_B-Step_User_Manual_rev_1v3_2014_12.pdf 
    Errata Sheet: 
    V1.0 
    TC29x_BA_Errata_Sheet_v1_0.pdf 
    TC38x 
    User Manual:  
    V1.3 
    TC3XX_ts__TargetSpec_rev1v3v0.pdf V1.3.0, 2016-02 
    Appendix: 
    V2.3 
    TC38X_ts_appx_V2.3.0.pdf V2.3.0 2017-09 
    TC39x 
    User Manual:  
    V1.3 
    TC3XX_ts__TargetSpec_rev1v3v0.pdf V1.3.0, 2016-02 
    Errata Sheet:  
    V1.0 
    TC39x AA_Errata_Sheet_rev1v0_2016-06-08.pdf Rel. 1.0, 2016-06-08 
    Table 1-2   Supported TriCore Aurix Hardware 
     
    Tasking 
    v4.2r2 (TC2xx only) 
    v6.0r1p2 (TC3xx only) 
    HighTec (GNU) 
    V4.6.3.0 
    Table 1-3   Supported TriCore Aurix Compilers 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    28 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4.2 
    Power PC 
    Derivative 
    Hardware Manufacturer Document Name 
    Document 
    Version 

    MPC560xB 
    Freescale Semiconductor MPC5607B  
    Rev. 7.2, 05/2012 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z0  
    Rev. 0, 04/2008 
    Power Architecture Core Reference Manual 
    MPC560xC 
    Freescale Semiconductor MPC5604B/C  
    Rev. 8.2, 09/2013 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z0  
    Rev. 0, 04/2008 
    Power Architecture Core Reference Manual 
    MPC564xB 
    Freescale Semiconductor MPC5646C  
    Rev. 5, 11/2013 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z4  
    Rev. 0, 10/2009 
    Power Architecture Core Reference Manual 
    MPC564xC 
    Freescale Semiconductor MPC5646C  
    Rev. 5, 11/2013 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z0  
    Rev. 0, 04/2008 
    Power Architecture Core Reference Manual 
    Freescale Semiconductor e200z4  
    Rev. 0, 10/2009 
    Power Architecture Core Reference Manual 
    MPC564xL 
    Freescale Semiconductor MPC5643L  
    Rev. 10, 06/2013 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z4  
    Rev. 0, 10/2009 
    Power Architecture Core Reference Manual 
    Freescale Semiconductor Safety Manual for Qorivva 
    Rev. 2, 04/2013 
    MPC5643L 
    MPC567xF 
    Freescale Semiconductor MPC5674F  
    Rev. 7, 02/2015 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z760n3  
    Rev. 2, 06/2012 
    Power Architecture Core Reference Manual 
    MPC567xK 
    Freescale Semiconductor Qorivva MPC5675K  
    Rev. 10, 11/2013 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z760n3  
    Rev. 2, 06/2012 
    Power Architecture Core Reference Manual 
    Freescale Semiconductor Safety Manual for Qorivva 
    Rev. 1, 12/2012 
    MPC567xK 
    MPC567xR 
    Freescale Semiconductors MPC5676R  
    Rev. 5, 09/2012 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z759n3  
    Rev. 2, 01/2015 
    Power Architecture Core Reference Manual 
    MPC574xBD 
    Freescale Semiconductor MPC5746C  
    Rev. 2.1, 06/2015 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    29 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Reference Manual 
    MPC574xC1 
    Freescale Semiconductor MPC5746C  
    Rev. 2.1, 06/2015 
    Reference Manual 
    MPC574xC2 
    NXP MPC5748G Reference Manual 
    Rev. 4, 07/2015 
    MPC574xG 
    NXP MPC5748G Reference Manual 
    Rev. 4, 07/2015 
    NXP Safety Manual for MPC5748G 
    Rev. 2, 01/2016 
    MPC574xK 
    ST SPC574Kxx  
    Rev. 5, 08/2015 
    Reference Manual 
    MPC574xM 
    Freescale Semiconductor MPC5746M  
    Rev. 5.1, 04/2014 
    Reference Manual 
    MPC574xP 
    Freescale Semiconductor MPC5744P 
    Rev. 5.1, 02/2015 
    Reference Manual 
    NXP Safety Manual for MPC5744P 
    Rev. 3, 06/2014 
    MPC574xR 
    NXP MPC5746R  
    Rev. 6, 03/2016 
    Reference Manual 
    MPC577xC 
    Freescale Semiconductors MPC5777C  
    Rev. 8, 11/2016 
    Microcontroller Reference Manual 
    Freescale Semiconductor e200z759n3  
    Rev. 2, 01/2015 
    Power Architecture Core Reference Manual 
    Freescale Semiconductor Safety Manual for MPC5777C 
    Rev. 2.1, 02/2017 
    MPC577xK 
    Freescale Semiconductor MPC5775K  
    Rev. 4, 12/2015 
    Reference Manual 
    MPC577xM 
    NXP MPC5777M  
    Rev. 4, 04/2015 
    Reference Manual 
    MPC577xN 
    Freescale Semiconductor MPC5774N  
    Rev. 2, 02/2014 
    Reference Manual 
    PC580000 
    Freescale Semiconductor QUASAR0  
    Rev. 3, 03/2015 
    Reference Manual 
     
    PC580002 
    Freescale Semiconductor QUASAR2 Cut2  
    Rev. 5, 07/2014 
    Reference Manual 
    PC580002e 
    NXP QUASAR2e Reference Manual 
    Rev. 2, 06/2017 
    PC580003 
    NXP QUASAR3 Reference Manual 
    Rev. 5.2, 01/2017 
    SPC58ECxx 
    ST SPC584Cx/SPC58ECx  
    Rev. 2, 10/2016 
    Reference Manual 
    SPC58EGxx 
    ST SPC58NE84x/SPC58xG84x  
    Rev. 2, 02/2016 
    Reference Manual 
    SPC58NGxx 
    ST SPC58NE84x/SPC58xG84x  
    Rev. 2, 02/2016 
    Reference Manual 
    SPC582Bxx 
    ST SPC582Bx  
    Rev. 2, 09/2016 
    Reference Manual 
    SPC584Bxx 
    ST SPC584Cx/SPC58ECx  
    Rev. 1, 10/2015 
    Reference Manual 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    30 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    SPC584Cxx 
    ST SPC584Cx/SPC58ECx  
    Rev. 2, 10/2016 
    Reference Manual 
    SPC584Gxx 
    ST SPC58NE84x/SPC58xG84x  
    Rev. 2, 02/2016 
    Reference Manual 
    SPC574Sxx 
    ST SPC574Sx Reference Manual 
    Rev. 3, 05/2016 
    Table 1-4   Supported Power PC Hardware 
    Windriver DiabData 
    5.9.4.x 
    Green Hills (GHS) 
    2014.1.6 
    HighTec (GNU) 
    4.6.6.1 
    Table 1-5   Supported Power PC compilers 
    1.4.3 
    ARM 
    Derivative 
    Hardware Manufacturer Document Name 
    Document 
    Version 

    S6J32xx 
    Cypress S6J3200 Series Hardware Manual 
    Rev. 4.0, 
    09/2015 
    ZUxxx 
    XILINX Zynq UltraScale+ MPSoc Technical Reference 
    v1.2, 06/2016 
    Manual 
    iMX6xx 
    i.MX 6Dual/6Quad  Applications Processor Reference 
    Rev. 3, 
    Manual 
    07/2015 
    ATSAMV7x 
    SAM v70 Datasheet 
    Rev.11297D, 
    06/2016 
    S32K14x 
    NXP/Freescale - S32K14x Series Reference Manual - 
    Rev. 3, 
    Supports S32K142, S32K144, S32K146, and S32K148 
    03/2017 
    Generic Cortex-M 
    ARMv7-M Architecture Reference Manual 
    v.E.b 
    12/2015 
    AR16xx 
    16xx Technical Reference Manual 
    SWRU431, 
    November 2016 
    TDA2x 
    TDA2x Technical Reference Manual 
    SPRUI29D, 
    November 2015 
    TMS570LS21x_31x  TMS570LS31x/21x 16/32-Bit RISC Flash Microcontroller  SPNU499B, 
    Technical Reference Manual 
    August 2013 
    TMS570LC43x 
    TMS570LC43x 16/32-Bit RISC Flash Microcontroller 
    SPNU563,  
    Technical Reference Manual 
    May 2014 
    CYT2Bx 
    Traveo 2 Automotive Body Controller Entry Family 
    Rev.*B,  
    Architecture Technical Reference Manual 
    February 2018 
    Table 1-6   Supported ARM Hardware 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    31 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Green Hills (GHS) 
    2013.5.4 
    IAR 
    V7.50.1 
    TI 
    v15.12.3.LTS 
    ARM CC 
    5.06u1, 6.6.1 
    GCC Linaro Distribution 
    gcc-linaro-7.1.1-2017.08-i686-mingw32_arm-eabi 
    Table 1-7   Supported ARM compilers 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    32 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4.4 
    RH850 
    Derivative Family 
    Hardware Manufacturer Document Name 
    Document Version 
    RH850 C1M 
    RH850/C1x User’s Manual: Hardware 
    Rev.1.00 Mar 2015 
    RH850 C1H 
    RH850/C1x User’s Manual: Hardware 
    Rev.1.00 Mar 2015 
    RH850 D1x 
    RH850/D1L/D1M Group User’s Manual: Hardware  Rev.2.01 Aug 2016 
    RH850 E1x FCC2 
    RH850/E1x-FCC2 User’s Manual: Hardware 
    Rev.1.00 Jun 2016 
    RH850 E1x FCC1 
    RH850/E1x-FCC1 User’s Manual: Hardware 
    Rev.0.50 Jul 2014 
    RH850 E1L 
    RH850/E1L User’s Manual: Hardware 
    Rev.1.10 Apr 2016 
    RH850 E1M 
    RH850/E1M-S User’s Manual: Hardware 
    Rev.1.10 Apr 2016 
    RH850 F1H 
    RH850/F1H Group User’s Manual: Hardware 
    Rev.1.12 May 2016 
    RH850 F1L 
    RH850/F1L Group User’s Manual: Hardware 
    Rev.1.33 Apr 2016 
    RH850 F1K 
    RH850/F1K Group User’s Manual: Hardware 
    Rev.1.00 Jun 2016 
    RH850 F1KH 
    RH850/F1KH Group User’s Manual: Hardware 
    Rev.0.91 Aug 2017 
    RH850 F1KM 
    RH850/F1KM Group User’s Manual: Hardware 
    Rev.0.50 Jan 2017 
    RH850 F1M 
    RH850/F1M Group User’s Manual: Hardware 
    Rev.1.03 May 2016 
    RH850 P1HC 
    RH850/P1x-C Group User’s Manual: Hardware 
    Rev.1.10 Jul 2016 
    RH850 P1MC 
    RH850/P1x-C Group User’s Manual: Hardware 
    Rev.1.10 Jul 2016 
    RH850 P1M 
    RH850/P1x Group User’s Manual: Hardware 
    Rev.1.00 Jul, 2015 
    RH850 R1L 
    RH850/R1x Group User’s Manual: Hardware 
    Rev.1.31 Jun 2016 
    G3K Core 
    RH850G3K User’s Manual: Software 
    Rev.1.20 Apr 2016 
    G3KH Core 
    RH850G3KH User’s Manual: Software 
    Rev.1.10 Jul 2016 
    G3M Core 
    RH850G3M User’s Manual: Software 
    Rev.1.30 Jun 2016 
    G3MH Core 
    RH850G3MH User’s Manual: Software 
    Rev.1.00 Mar 2015 
    Table 1-8   Supported RH850 Hardware 
    Green Hills (GHS) 
    V6.1.4 2013.5.4 
    V6.1.4 2013.5.5 
    V6.1.6 2014.1.7 
    V6.1.6 2015.1.5 
    V6.1.6 2015.1.7 
    Table 1-9   Supported RH850 Compilers 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    33 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4.5 
    VTT OS 
    VTT  OS  stands  for  “vVIRTUALtarget  Operating  System”.  It  runs  within  Vectors  CANoe 
    development tool. 
    Vectors CANoe is capable of simulating an entire ECU network. Within such a simulated 
    network the OS of each ECU can be simulated. 
    This is useful in early ECU development phases when no real hardware is available yet. 
    Application development can be started at once. 
    The VTT OS behaves as regular AUTOSAR  OS. All OS objects  (e.g.  tasks or ISRs) are 
    simulated. 
    The VTT system is described in [6]. 
    1.4.5.1 
    Characteristics of VTT OS 
    Supported Scalability Classes 
    SC1, SC2 
    Single Core ECUs 
    Supported 
    Multi Core ECUs 
    Up to 32 cores are supported 
    IOC 
    Supported 
    Number of Simulated Interrupt Sources  Up to 10000 
    Simulated Interrupt Levels 
    VTT OS allows interrupt levels from 1 .. 200 
    Whereas 1 is the lowest priority and 200 is the 
    highest. 
    Memory Protection 
    Not supported2 
    Stack Protection 
    Not supported 
    Stack Usage Measurement 
    Not supported 
    Stack Sharing 
    Not supported 
    Table 1-10   VTT OS characteristics 
    1.4.6 
    POSIX OS 
    POSIX OS is an AUTOSAR Operating System running as a process in the user space of a 
    POSIX3 host. 
    There  are  no  dependencies  with  the  underlying  hardware  or  with  specific  POSIX 
    conforming host OS (QNX, Linux…). 
    In the Adaptive AUTOSAR scenario, it is necessary to exploit new resources (i.e. pthreads) 
    offered by such environment and to deal with the new abstraction layers. 
     
                                                
    2 The memory protection can be configured. However the actual protection mechanism is not executed. 
    3 Portable Operating System Interface 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    34 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    1.4.6.1 
    Characteristic of POSIX OS 
    Supported Scalability Classes 
    SC1 
    Single Core ECUs 
    Supported 
    Multi Core ECUs 
    Not supported 
    IOC 
    Supported 
    Number of Simulated Interrupt 
    Up to 10000 
    Sources 
    Simulated Interrupt Levels 
    POSIX OS allows interrupt levels from 1 .. 100 
    Whereas 1 is the lowest priority and 100 is the 
    highest. 
    Memory Protection 
    Not supported4 
    Stack Protection 
    Not supported 
    Stack Usage Measurement 
    Not supported 
    Stack Sharing 
    Not supported 
    Table 1-11   POSIX OS characteristic 
     
     
                                                
    4 The memory protection can be configured. However the actual protection mechanism is not executed. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    35 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2  Functional Description 
    2.1 
    General 
    The  MICROSAR  OS  basically  implements  the  OS  according  to  the  AUTOSAR  OS 
    standard referred in [1]. 
    It  is  possible  that  MICROSAR  OS  deviates  from  specified  AUTOSAR  OS  behavior.  All 
    deviations from the standard are listed in the chapters hereafter. 
    On  the  other  hand  MICROSAR  OS  extends  the AUTOSAR  OS  standard  with  numerous 
    functions. These extensions in function are described in detail in chapter 2.21.1. 
    2.2 
    MICROSAR OS Deviations from AUTOSAR OS Specification 
    2.2.1 
    Generic Deviation for API Functions 
    Specified Behavior 
    There are some API functions which are only available within specific 
    scalability classes (e.g. TerminateApplication() in SC3 and SC4 only). 
    Deviation Description 
    Within the MICROSAR OS all API functions are always available. 
    Deviation Reason 
    The static OS code gets more simplified for better maintainability (less 
    pre-processor statements are necessary). 
    Modern toolchains will remove unused function automatically. 
     
    2.2.2 
    Trusted Function API Deviations 
    Specified Behavior 
    The Operating System shall not schedule any other Tasks which 
    belong to the same OS-Application as the non-trusted caller of the 
    service. Also interrupts of Category 2 which belong to the same OS-
    Application shall be disabled during the execution of the service. 
    Deviation Description 
    In MICROSAR OS the re-scheduling of tasks in this particular case is 
    not suppressed. 
    The selective disabling of category 2 ISRs is also not done. 
    Deviation Reason 
    For a better runtime performance during trusted function calls the 
    specified behavior is not implemented in MICROSAR OS. 
    Data consistency problems can be solved in a more efficient way by 
    using the OS interrupt API and/or OS resource API. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    36 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Specified Behavior 
    All specified OS APIs should be called with interrupts enabled. 
    In case CallTrustedFunction() API is called with disabled interrupts it 
    returns the status code E_OS_DISABLEDINT. 
    Deviation Description 
    In MICROSAR OS this limitation does not exist. 
    It is allowed to call CallTrustedFunction() API with disabled interrupts. 
    There is no error check. 
    The return value E_OS_DISABLEDINT is not possible. 
    Deviation Reason 
    It offers the possibility to call CallTrustedFunction() API where 
    interrupts may be disabled. This is more convenient and reasonable. 
     
    2.2.3 
    Service Protection Deviation 
    Specified Behavior 
    If an invalid address (address is not writable by this OS-Application) is 
    passed as an out-parameter to an Operating System service, the 
    Operating System module shall return the status code 
    E_OS_ILLEGAL_ADDRESS. 
    Deviation Description 
    The validity of out-parameters is checked automatically by the MPU. 
    Write accesses to such parameters are always done with the 
    accessing rights of the caller of the OS service. 
    If the address is invalid a MPU exception is raised. 
    The return value E_OS_ILLEGAL_ADDRESS is not possible. 
    Deviation Reason 
    Hardware checks by the MPU are much more performant than 
    software memory checks. 
     
    2.2.4 
    Code Protection 
    Specified Behavior 
    The Operating System module may provide an OS-Application 
    the ability to protect its code sections against executing by non-
    trusted OS-Applications.  
    Deviation Description  The MICROSAR OS does not support code section protection. 
    Deviation Reason 
    Design decision. 
     
    2.2.5 
    SyncScheduleTable API Deviation 
    Specified Behavior 
    All specified OS APIs should be called with interrupts enabled. 
    In case SyncScheduleTable() is called with disabled interrupts it 
    returns the status code E_OS_DISABLEDINT. 
    Deviation Description 
    In MICROSAR OS this limitation does not exist. 
    It is allowed to call SyncScheduleTable() with disabled interrupts. 
    There is no error check. 
    The return value E_OS_DISABLEDINT is not possible. 
    Deviation Reason 
    It offers the possibility to call SyncScheduleTable() where interrupts 
    may be disabled. This is more convenient and reasonable. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    37 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.2.6 
    CheckTask/ISRMemoryAccess API Deviation 
    Specified Behavior 
    All specified OS APIs should be called with interrupts enabled. 
    In case one of these APIs is called with disabled interrupts it issues 
    the error E_OS_DISABLEDINT. 
    Deviation Description 
    In MICROSAR OS this limitation does not exist. 
    It is allowed to call these API functions with disabled interrupts. There 
    is no error check. 
    The return value E_OS_DISABLEDINT is not possible. 
    Deviation Reason 
    It offers the possibility to call these functions e.g. from hardware 
    drivers where interrupts may be disabled. This is more convenient and 
    reasonable. 
     
    Specified Behavior 
    The API functions CheckTask/ISRMemoryAccess() are only allowed 
    within specific OS call contexts (Task/Cat2 
    ISR/ErrorHook/ProtectionHook) 
    In case one of these APIs is called within the wrong OS call context it 
    issues the error E_OS_CALLEVEL. 
    Deviation Description 
    In MICROSAR OS In MICROSAR OS this limitation does not exist. 
    It is allowed to call these API functions from all OS contexts. 
    The return value E_OS_CALLEVEL is not possible. 
    Deviation Reason 
    Practically it is more reasonable to allow these APIs in all OS runtime 
    contexts. 
     
    2.2.7 
    Interrupt API Deviation 
    Specified Behavior 
    The API functions SuspendOSInterrupts() and ResumeOSInterrupts() 
    are allowed within a category 1 ISR 
    Deviation Description 
    In MICROSAR OS it is not allowed to use SuspendOSInterrupts() and 
    ResumeOSInterrupts() within a category 1 ISR. 
    Deviation Reason 
    The function SuspendOSInterrupts() lowers the current interrupt level 
    when used in a category 1 ISR. This may lead to data inconsistencies 
    if another category 1 ISR occurs. 
    Therefore those functions are not allowed. 
     
    2.2.8 
    Cross Core Getter APIs 
    Specified Behavior 
    All getter APIs (e.g. GetTaskID()) may be called cross core within 
    hooks and non nestable category 2 ISRs. 
    Deviation Description 
    MICROSAR OS does not allow usage of those functions within OS 
    Hooks and non-nestable category 2 ISRs. 
    Deviation Reason 
    Deadlock avoidance due to disabled interrupts in case that there are 
    two simultaneous concurrent usages of those APIs from multiple 
    cores. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    38 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.2.9 
    IOC 
    Specified Behavior 
    IocSend/IocWrite APIs have an IN parameter. The parameter will be 
    passed by value for primitive data elements and by reference for all 
    other types. The data type is configured in “OsIocDataTypeRef”. 
    Deviation Description 
    The configurator does not evaluate information in 
    “OsIocDataTypeRef”. Instead it evaluates the parameter 
    “OsIocDataType“. Primitive data types are passed by value. The 
    configurator identifies all primitive AUTOSAR and OS data types (e.g. 
    “uint8”, “sint32”, “TaskType”). All other data types are passed by 
    reference. 
    Deviation Reason 
    Usage of “OsIocDataType” reduces dependencies and complexity of 
    the OS configurator. 
     
    Specified Behavior 
    The configuration parameter “OsIocInitValue” is specified to be an 
    initialization value. 
    Deviation Description 
    If the used data is of a complex type the configuration parameter 
    “OsIocInitValue” holds the name of a constant, which contains the 
    initialization value. For integral types it can hold a value or the name of 
    a constant containing the value. 
    Deviation Reason 
    It enables the OS to initialize complex data types. 
     
    2.2.10  Return value upon stack violation 
    Specified Behavior 
    If a stack fault is detected by stack monitoring AND no ProtectionHook 
    is configured, the Operating System module shall call the 
    ShutdownOS() service with the status E_OS_STACKFAULT. 
    Deviation Description 
    Within a SC3 / SC4 system with MPU stack supervision: 
    If a stack fault is detected by stack monitoring AND no ProtectionHook 
    is configured, the Operating System module shall call the 
    ShutdownOS() service with the status 
    E_OS_PROTECTION_MEMORY. 
    Deviation Reason 
    With hardware stack supervision MICROSAR OS is not possible to 
    distinguish between stack violation and other memory violation 
     
    Specified Behavior 
    If a stack fault is detected by stack monitoring AND a ProtectionHook 
    is configured the Operating System module shall call the 
    ProtectionHook() with the status E_OS_STACKFAULT. 
    Deviation Description 
    Within a SC3 / SC4 system with MPU stack supervision: 
    If a stack fault is detected by stack monitoring AND a ProtectionHook 
    is configured the Operating System module shall call the 
    ProtectionHook() with the status E_OS_PROTECTION_MEMORY. 
    Deviation Reason 
    With hardware stack supervision MICROSAR OS is not possible to 
    distinguish between stack violation and other memory violation 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    39 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.2.11  Handling of OS internal errors 
    Specified Behavior 
    In cases where the OS detects a fatal internal error all cores shall be 
    shut down. 
    Deviation Description 
    In case that the OS detects an internal error the kernel panic mode is 
    entered. 
    Deviation Reason 
    In case of OS internal errors normal operations (e.g. calling the 
    protection hook) are possible no more, as the OS is in an inconsistent 
    state. 
     
    2.2.12  Forcible Termination of Applications 
    Specified Behavior 
    AUTOSAR does not specify the handling of “next” schedule tables in 
    case of forcible termination of applications. 
    Deviation Description 
    Use case: 
    An application has a running schedule table which itself has a nexted 
    schedule table of a foreign application. 
    The foreign application is forcibly terminated. 
     
    The OS removes the “next” request from the running schedule table. 
    Deviation Reason 
    Clarification of behavior. 
    Impact on other applications should be minimal, therefore the current 
    schedule table is not stopped. This is different to the behavior of 
    StopScheduleTable(). 
     
    Specified Behavior 
    AUTOSAR does not specify the handling of “next” schedule tables in 
    case of forcible termination of applications. 
    Deviation Description 
    Use case: 
    An application has a running schedule table which itself has a nexted 
    schedule table of a foreign application. 
    The first application is forcibly terminated. 
     
    The OS stops the current schedule table of the terminated application. 
    and removes the “next” request. 
    As a result it does not switch to the “next” schedule table of the foreign 
    application. 
    Deviation Reason 
    Clarification of behavior. 
    Impact on other applications should be minimal. The described 
    behavior is identical to the behavior of StopScheduleTable(). 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    40 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.2.13  OS Configuration 
    Specified Behavior 
    The generator shall print out information about timers used 
    internally by the OS during generation (e.g. on console, list file). 
    Deviation Description  In case of MICROSAR OS there is no such output. Instead the 
    timer is visible to the user as any other timer during configuration. 
    Deviation Reason 
    In order to increase the transparency, OS internal objects are 
    visible to the user during configuration time. 
     
    Specified Behavior 
    If ShutdownOS() is called and ShutdownHook() returns then the 
    Operating System module shall disable all interrupts and enter an 
    endless loop. 
    Deviation Description  If ShutdownOS() is called and ShutdownHook() returns then the 
    Operating System module enters the kernel panic mode. 
    Deviation Reason 
    In case of unusual situations the MICROSAR OS enters the 
    kernel panic mode. To keep the behaviour of the OS consistent, 
    the kernel panic mode is also applied in case that the 
    ShutdownHook() returns. 
     
    2.2.14  Spinlocks 
    Specified Behavior 
    The AUTOSAR Operating System shall generate an error if a 
    TASK/ISR2 on a core, where the same or a different TASK/ISR 
    already holds a spinlock, tries to seize another spinlock that has 
    not been configured as a direct or indirect successor of the latest 
    acquired spinlock (by means of the OsSpinlockSuccessor 
    configuration parameter) or if no successor is configured. 
    Deviation Description  The nesting order check is only valid for a single task or ISR and 
    if all nested spinlocks are members of the same lock order list. 
    Deviation Reason 
    By implementing this check, the user of MICROSAR OS would be 
    enforced to 
      either configure a single lock order list 
      or the user would be enforced to ensure correct nesting of 
    spinlock between tasks or ISRs of different diagnostic 
    coverage. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    41 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.3 
    Stack Concept 
    MICROSAR OS implements a specific stack concept. 
    It  defines  different  stacks  which  may  be  used  by  stack  consumers  (runtime  contexts). 
    Whereas not all stacks may be used by all consumers. 
    The following table gives an overview. 
    Stack Type 
    Multiplicity  Possible Stack Consumers 
    Kernel stack 
    1 per core 
    >  OS memory exception handling 
    >  Os_PanicHook() 
    >  Category 0 ISRs 
    Protection stack 
    0..1 per core  >  ProtectionHook() 
    >  OS API calls 
    >  Os_PanicHook() 
    >  Category 0 ISRs 
    Error stack 
    0..1 per core  >  ErrorHooks (global and OS-application specific) 
    >  OS API calls 
    >  Category 0/1 ISRs 
    >  Os_PanicHook() 
    Shutdown stack 
    0..1 per core  >  ShutdownHooks (global and OS-application 
    specific) 
    >  OS API calls 
    >  Os_PanicHook() 
    >  Category 0 ISRs 
    Startup stack 
    0..1 per core  >  StartupHooks (global and OS-application specific) 
    >  OS API calls 
    >  Category 0/1 ISRs 
    >  Os_PanicHook() 
    NTF stacks 
    0..n 
    >  Non-trusted functions 
    >  OS API calls 
    >  OS ISR wrapper 
    >  Trusted functions 
    >  Alarm callback functions 
    >  Pre / PostTaskHook() 
    >  Category 0/1 ISRs 
    >  Os_PanicHook() 
    No nesting interrupt stack 
    0..1 per core  >  No nesting category 2 ISRs 
    >  OS API calls 
    >  Trusted functions 
    >  Alarm callback functions 
    >  Category 0/1 ISRs 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    42 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    >  Os_PanicHook() 
    Interrupt level stacks 
    0..n 
    >  Nesting category 2 ISRs 
    >  OS API calls 
    >  OS ISR wrapper 
    >  Trusted functions 
    >  Alarm callback functions 
    >  Category 0/1 ISRs 
    >  Os_PanicHook() 
    Task stacks 
    1..n 
    >  Tasks 
    >  OS API calls 
    >  OS ISR wrapper 
    >  Trusted functions 
    >  Alarm callback functions 
    >  Pre / PostTaskHook() 
    >  Category 0/1 ISRs 
    >  Os_PanicHook() 
    IOC receiver pull callback 
    0..1 per core  >  IOC receiver pull callback functions  
    stack 
    >  Category 0 ISRs 
    Table 2-1   MICROSAR OS Stack Types 
     
     
     
    Note 
    The stack sizes of all stacks must be configured within the ECU configuration 
     
     
     
     
    2.3.1 
    Task Stack Sharing 
    2.3.1.1 
    Description 
    In order to save RAM it is possible that  different basic tasks share the same task stack. 
    Tasks which fulfill the following requirements share a stack: 
    >  Basic tasks which have the same configured priority. 
    >  Basic tasks which are non-preemptive and are configured to share stacks. Within 
    such basic tasks the call of the OS service Schedule() is not allowed. 
    >  Basic tasks which share an internal resource and are configured to share stacks. 
    Within such basic tasks the call of the OS service Schedule() is not allowed. 
    2.3.1.2 
    Activation 
    The  attribute  “OsTaskStackSharing”  of  a  basic  task  has  to  be  set  to  TRUE.  The  OS 
    decides  then  in  dependancy  of  the  preemption  settings  and  assigned  internal  resources 
    whether the stack of basic tasks may be shared or not. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    43 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    The size of the shared task stack is the maximum of all stack sizes of tasks which share 
    the stack. 
     
     
     
    Note 

      The OS activates stack sharing automatically for basic tasks with the same configured 
    priority regardless of the value of OsTaskStackSharing. 
     
     
     
     
     
    Note 

      By setting “OsTaskStackSharing” to TRUE the OS API service Schedule() may not be 
    called within the corresponding basic task. 
    The OS throws an error if Schedule() is called within a task with activated stack 
    sharing. 
     
     
     
     
     
    Note 
    Stack sharing of tasks can only be achieved between tasks which are assigned to the 
      same core! 
     
     
     
    2.3.1.3 
    Usage 
    Tasks  which  are  cooperative  to  each  other  are  sharing  the  same  stack.  No  additional 
    actions are necessary. 
    2.3.2 
    ISR Stack Sharing 
    2.3.2.1 
    Description 
    In  order  to  save  RAM  it  is  possible  that  different  category  2  ISRs  share  the  same  ISR 
    stack. 
    >  All category 2 ISRs which are not nestable can share one stack. 
    >  All Category 2 ISRs which have the same priority can share one stack. 
    2.3.2.2 
    Activation 
    The attribute “OsIsrEnableNesting” must be set to FALSE for a category 2 ISR. 
    The size of the shared ISR stack is the maximum of all configured ISR stack sizes of non-
    nestable category 2 ISRs. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    44 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
     
    Note 
    Stack sharing of ISRs can only be achieved between ISRs which are assigned to the 
      same core! 
     
     
     
    2.3.2.3 
    Usage 
    The feature is used automatically by the OS. All category 2 ISRs on the same core which 
    are not nestable are sharing the same stack. 
    2.3.3 
    Stack Check Strategy 
    All OS stacks must be protected from overflowing. 
    MICROSAR  OS  offers  different  strategies  to  detect  stack  overflows  or  even  to  prevent 
    stacks from overflowing. 
    In dependency of the configured scalability class there are the following strategies: 
    Scalability Class 
    Stack check strategy 
    SC1 / SC2 
    Software stack check (see 2.3.4) 
    SC3 / SC4 
    Stack supervision by memory protection unit (MPU) (see 2.3.5) 
     
    2.3.4 
    Software Stack Check 
    2.3.4.1 
    Description 
    The  OS  initializes  the  very  last  element  of  each  stack  to  a  specific  stack  check  pattern. 
    Whenever a stack switch is performed (e.g. a task switch) the OS checks whether this last 
    element of the valid stack still holds the stack check pattern. 
    If the  OS  detects  that  the  stack  check  pattern  has  been  altered  it  assumes  that  the  last 
    valid stack did overflow. 
     
    Stack Check Pattern 
    32-Bit Microcontrollers  0xAAAAAAAA 
    Table 2-2   Stack Check Patterns 
     
     
    Note 
    The software stack check is able to detect stack overflows. It is not capable to avoid 
      them! 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    45 
    based on template version 6.0.1 







    Technical Reference MICROSAR OS 
     
     
    Caution 
    The software stack check is not able to detect all stack overflows. There may be 
      scenarios where the memory of the adjacent stack is already overwritten, but the last 
    element of the current stack still holds the stack check pattern. 
    In such cases the software stack check is not able to detect the overflow. 
     
     
     
     
     
    Caution 
    The software stack check is not able to detect the amount memory which has been 
      destroyed. 
     
     
     
     
     
    Caution 
    In case of error reporting due to a stack fault (E_OS_STACK_FAULT), the API 
      GetTaskID() might not return the ID of the causing task. 
     
     
     
    2.3.4.2 
    Activation 
    Within  a  SC1  or  SC2  configuration  the  attribute  “OsStackMonitoring”  has  to  be  set  to 
    TRUE to activate the software stack check feature. 
     
     
    Expert Knowledge 
    On platforms which disable the MPU in supervisor mode, the software stack check may 
      be activated also for SC3 and SC4 configurations. 
    On other platforms the software stack check should be switched off in a SC3 or SC4 
    configuration. 
     
     
     
    2.3.4.3 
    Usage 
    Once  the  feature  is  activated  the  OS  checks  the  stacks  automatically  upon  each  stack 
    switch. 
    If the OS detects a stack overflow it goes into shutdown. If a ShutdownHook is configured 
    it is invoked to inform the application about OS shutdown. 
     
     
    Note 
    Debugging hint: The stack check pattern is restored by the OS before the 
      ShutdownHook() is called. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    46 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.3.5 
    Stack Supervision by MPU 
    2.3.5.1 
    Description 
    During the whole runtime of the OS the current active stack is supervised by the MPU of 
    the microcontroller. Therefore the OS reserves one MPU region which is reprogrammed by 
    the OS with each stack switch. 
    Stack  overflows  cannot  happen  since  the  MPU  avoids  write  accesses  beyond  the  stack 
    boundaries. 
    Whenever a memory violation is recognized (e.g. due to a stack violation) an exception is 
    raised. Within the exception handling the OS calls the ProtectionHook(). 
    The  application decides  in  the ProtectionHook()  how  to  deal  with  the memory  protection 
    violation. If the application invokes the shutdown of the OS, the ShutdownHook() is called 
    as well (if configured). 
     
     
    Note 
    The stack supervision recognizes write accesses beyond stack boundaries and 
      suppresses them. 
     
     
     
    2.3.5.2 
    Activation 
    The system must be configured as a SC3 or SC4 system. 
    2.3.5.3 
    Usage 
    In  a  SC3  /  SC4  system  the  OS  automatically  initializes  one  MPU  region  for  stack 
    supervision. 
    To  safely  detect  stack  violations  special  care  must  be  taken  with  configuring  additional 
    MPU regions and also with linking of sections: 
    >  When configuring additional MPU regions included memory region must never overlap 
    with any OS stack sections. 
    >  By using an OS generated linker command file (see 4.3.2) it is assured that the OS 
    stacks are linked consecutively into the RAM. 
    >  A stack safety gap is needed which is linked adjacent to the stacks (in dependency of 
    the stack growth direction; see Figure 2-1). No software parts must have write access 
    to the stack safety gap. 
    >  The size of the stack safety gap must be at least the granularity of the MPU. 
    >  The linkage of the safety gap is mandatory. Otherwise a stack violation of the stack 
    with the lowest address cannot be detected. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    47 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    stack safety gap
    OS stacks
    Stack growth direction
     
    Figure 2-1  Stack Safety Gap 
     
     
    Caution 
    Don’t configure MPU regions which grant access to any OS stacks 
     
     
     
     
     
     
    Caution 
    Add a stack safety gap to the linkage scheme. The stack safety gap is a restricted 
      memory region. No software parts must have write access to this region. 
     
     
     
    2.3.6 
    Stack Usage Measurement 
    2.3.6.1 
    Description 
    During runtime of  the OS the maximum stack usage can be obtained by the application. 
    The OS initializes all OS stacks with the stack check pattern (see Table 2-2). 
    There are API functions which are capable to return the maximum stack usage (since call 
    of StartOS()) for each stack (see 5.2.8). 
    2.3.6.2 
    Activation 
    Set “OsStackUsageMeasurement” to TRUE 
    2.3.6.3 
    Usage 
    The stack usage APIs can be used anywhere in application. 
     
     
    Note 
    To save OS startup time, the feature can be deactivated in a productive environment. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    48 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.4 
    Interrupt Concept 
    2.4.1 
    Interrupt Handling API 
    The AUTOSAR OS standard specifies several APIs to disable / enable Interrupts. 
    DisableAllInterrupts() 
    EnableAllInterrupts() 

    The functions disable all category 1 and category 2 interrupts. 
    SuspendAllInterrupts() 
    ResumeAllInterrupts() 

    SuspendOSInterrupts() 
    The functions disable category 2 interrupts only. 
    ResumeOSInterrupts() 
     
    2.4.2 
    Interrupt Levels 
    The OS defines several interrupt levels. 
    Interrupt Priority
    High
    Category 0
    ISRs
    TP Lock Level
    Timing 
    Protection
    ISR
    Category 1 Lock Level
    Category 1
    ISRs
    DisableAllInterrupts()
    EnableAllInterrupts()

    Category 2 Lock Level
    SuspendAllInterrupts()
    Category 2
    SuspendOSInterrupts()
    ResumeAllInterrupts()
    ISRs
    ResumeOSInterrupts()
    Low
    Tasks
     
    Figure 2-2  Interrupt Lock Levels 
    >  Category 2 ISRs must have a lower priority than category 1 ISRs 
    >  Category 1 ISRs must have a lower priority than the timing protection ISR (within an 
    SC2 / SC4 system) 
    >  The timing protection ISR must have a lower priority than category 0 ISRs (category 0 
    ISRs are described in detail in chapter 3.14) 
    >  The TP Lock Level cannot be set by the user. Interrupts are disabled up to this level 
    OS internally whenever timing protection is handled. 
    >  Category 0 ISRs are disabled OS internally for very short times only e.g. when 
    performing a stack switch (the locations where category 0 ISRs are locked can be 
    found in chapter 3.14.2.4). 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    49 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.4.3 
    Interrupt Vector Table 
    The  interrupt  vector  table  is  generated  by  MICROSAR  OS  with  respect  to  the 
    configuration, microcontroller family and used compiler. 
    In a multi core system multiple vector tables may be generated. 
    MICROSAR OS generates an interrupt vector for each possible interrupt source. 
    2.4.4 
    Nesting of Category 2 Interrupts 
    2.4.4.1 
    Description 
    To keep interrupt latency as low as possible it is possible that 
    >  A higher priority category 2 ISR interrupts a lower priority category 2 ISR. 
    >  A category 1 ISRs interrupts a category 2 ISR (category 1 ISR has always a higher 
    priority) 
    2.4.4.2 
    Activation 
    When  setting  “OsIsrEnableNesting”  to TRUE  the  category  2  ISR  itself  is  interruptible  by 
    higher priority ISRs. 
    2.4.5 
    Category 1 Interrupts 
    2.4.5.1 
    Implementation of Category 1 ISRs 
    MICROSAR  OS  offers  a  macro  for  implementing  a  category  1  ISR.  This  is  a  similar 
    mechanism like the macro for a category 2 ISR defined by the AUTOSAR standard. 
    MICROSAR OS abstracts the needed compiler keywords. 
     
     
    Implement a category 1 ISR 

      OS_ISR1(<MyCategory1ISR>) 


     
     
     
    2.4.5.2 
    Nesting of Category 1 ISRs 
    Since category 1 ISRs are directly called  from interrupt vector table  without any OS pro- 
    and epilogue, automatic nesting of category 1 ISRs cannot be supported. 
    The configuration attribute “OsIsrEnableNesting” is ignored for category 1 ISRs. 
    Nevertheless  the  interrupts  may  be  enabled  during  a  category  1  ISR  to  allow  interrupt 
    nesting but OS API functions cannot be used for this purpose. The application has to use 
    compiler intrinsic functions or inline assembler statements. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    50 
    based on template version 6.0.1 






    Technical Reference MICROSAR OS 
     
     
    Example 
    OS_ISR1(<MyCategory1ISR>) 
      { 
       __asm(EI); /* enable nesting of this ISR */ 
     
       __asm(DI); /* disable nesting before leaving the function */ 

     
     
     
    2.4.5.3 
    Category 1 ISRs before StartOS 
    There  may  be  the  need  to  activate  and  serve  category  1  ISRs  before  the  OS  has  been 
    started. 
    The following sequence should be implemented: 
    1.  Call Os_InitMemory 
    2.  Call Os_Init (within the function the basic interrupt controller settings are initialized 
    e.g. priorities of interrupt sources). 
    3.  Enable the Interrupt sources of category 1 ISRs by directly manipulating the control 
    registers in the interrupt controller. 
    4.  Enable  the  interrupts  by  directly  manipulating  the  global  interrupt  flag  and  /  or 
    current interrupt priority to allow the category 1 ISRs 
    2.4.5.4 
    Notes on Category 1 ISRs 
     
     
    Expert Knowledge 
    On platforms which have no automatic stack switch upon interrupt request there will be 
      no stack switch at all if a category 1 ISR occurs. Thus the stack consumption of a 
    category 1 ISR should be added to all stacks which are can be consumed by category 
    1 ISRs (see 2.3 for an overview). 
     
     
     
     
     
    Note 
    Although the interrupt priorities are initialized by MICROSAR OS there is no API to 
      enable or acknowledge category 1 ISRs. The interrupt control registers have to be 
    accessed directly. 
     
     
     
     
     
    Caution 
    The AUTOSAR OS standard does not allow OS API usage within category 1 ISRs (the 
      only exception is the interrupt handling API). 
    If a not allowed OS API is called anyway, MICROSAR OS is not able to detect this and 
    the called API may not work as expected. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    51 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
     
     
    Caution 
    Category 1 ISRs are always executed with trusted rights on supervisor level. 
     
     
     
     
     
     
    Caution 

      The macro “OS_ISR1” abstracts the appropriate compiler keyword for implementing 
    the interrupt service routine. Thus the compiler generates code which safes and restore 
    a subset of the general purpose registers. 
    In certain usecases e.g. usage of the FPU or nested interrupts it may require the 
    application to save and restore more registers. 
     
     
     
    2.4.6 
    Initialization of Interrupt Sources 
    Through the OS configuration MICROSAR OS knows the assignment of interrupt sources 
    and priorities to ISRs. In multi core system the core assignment of all ISRs is also known. 
    Based  on  these  configuration  information  MICROSAR  OS  generates  data  structures  for 
    initializing the interrupt controller. It initializes the interrupt priority and its core assignment. 
     
     
     
    Note 

      Enabling of interrupt sources: 
    The OS enables the interrupt sources only for the OS generated timer ISRs. 
    Other user ISRs can be only be served if the corresponding interrupt sources are 
    enabled by the application. 
    This should be done by using the interrupt source API (see 5.2.6 for details; function 
    Os_EnableInterruptSource). 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    52 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
     
    2.4.7 
    Unhandled Interrupts 
    Interrupt sources which are not assigned to a user defined ISR are assigned to a default 
    OS interrupt handler which collects those interrupt sources. 
    Thus interrupt requests from unassigned interrupt sources are handled by the OS. Within 
    OS  Hooks  (e.g.  ProtectionHook())  the  application  can  obtain  the  source  number  of  the 
    unhandled interrupt request by an OS API (see 5.2.7.1 for details). 
    In case of an unhandled interrupt request which has occurred within OS code MICROSAR 
    OS calls the PanicHook() because an inconsistent internal state is recognized and the OS 
    does not know how to correctly continue execution. 
    In case of an unhandled interrupt request which has occurred within critical user sections, 
    i.e. StartupHook, ErrorHook, PreTaskHook, PostTaskHook, Alarm callbacks, IOC receiver 
    callbacks,  Timing  Hooks,  ProtectionHook  and  ShutdownHook,  MICROSAR  OS  calls  the 
    PanicHook()  because  an  inconsistent  internal  state  is  recognized  and  the  OS  does  not 
    know how to correctly continue execution. 
    In  all  other  cases  of  an  unhandled  interrupt  request  MICROSAR  OS  calls  the 
    ProtectionHook() with the parameter E_OS_SYS_PROTECTION_IRQ. 
     
    2.4.8 
    Unhandled Syscalls 
    Syscall sources which are not assigned to OS or user handlers are assigned to a default 
    OS syscall handler which collects those exceptions. 
    Thus syscall requests from unassigned syscall sources are handled by the OS.  
    In case of an unhandled syscall request which has occurred within OS code MICROSAR 
    OS calls the PanicHook() because an inconsistent internal state is recognized and the OS 
    does not know how to correctly continue execution. 
    In case of an unhandled syscall request which has occurred within critical user sections, 
    i.e. StartupHook, ErrorHook, PreTaskHook, PostTaskHook, Alarm callbacks, IOC receiver 
    callbacks,  Timing  Hooks,  ProtectionHook  and  ShutdownHook,  MICROSAR  OS  calls  the 
    PanicHook()  because  an  inconsistent  internal  state  is  recognized  and  the  OS  does  not 
    know how to correctly continue execution. 
    In  all  other  cases  of  an  unhandled  syscall  request  MICROSAR  OS  calls  the 
    ProtectionHook() with the parameter E_OS_SYS_PROTECTION_SYSCALL. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    53 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
    2.5 
    Exception Concept 
    2.5.1 
    Exception Vector Table 
    The  exception  vector  table  is  generated  by  MICROSAR  OS  with  respect  to  the 
    configuration, microcontroller family and used compiler. 
    In a multi core multiple vector tables may be generated. 
    MICROSAR OS generates an exception vector for each possible exception source. 
     
     
     
    Note 
    In a SC3 and SC4 system MICROSAR OS defines OS exception handlers for memory 
      protection errors and for SYSCALL / TRAP instructions. 
    Exception sources which are used by the OS cannot be configured by the application. 
     
     
     
    2.5.2 
    Unhandled Exceptions 
    Exception  sources  which  are  not  assigned  to  user  defined  exception  handlers  are 
    assigned to a default OS exception handler which collects those exceptions. 
    Thus  exception  requests  from  unassigned  exception  sources  are  handled  by  the  OS. 
    Within  OS  Hooks  the  application  can  obtain  the  exception  number  of  the  unhandled 
    exception request by an OS API (see 5.2.7.3 for details). 
    In  case  of  an  unhandled  exception  request  which  has  occurred  within  OS  code 
    MICROSAR OS calls the PanicHook() because an inconsistent internal state is recognized 
    and the OS does not know how to correctly continue execution. 
    In case of an unhandled exception request which has occurred within critical user sections, 
    i.e. StartupHook, ErrorHook, PreTaskHook, PostTaskHook, Alarm callbacks, IOC receiver 
    callbacks,  Timing  Hooks,  ProtectionHook  and  ShutdownHook,  MICROSAR  OS  calls  the 
    PanicHook()  because  an  inconsistent  internal  state  is  recognized  and  the  OS  does  not 
    know how to correctly continue execution. 
    In  all  other  cases  of  an  unhandled  exception  request  MICROSAR  OS  calls  the 
    ProtectionHook() with the parameter E_OS_PROTECTION_EXCEPTION. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    54 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.6 
    Timer Concept 
    2.6.1 
    Description 
    MICROSAR  OS  can provide  a  time  base  generated from  timer  hardware  located  on  the 
    microcontroller. This time base can be used to drive alarms and schedule-tables. 
    2.6.2 
    Activation 
    The  OS  configuration  may  define  an  OsCounter  Object  of  type  “HARDWARE”.  Then  a 
    driving hardware must be assigned to “OsDriver” attribute. 
    2.6.3 
    Usage 
    Once the hardware counter is defined it can be assigned to alarms (“OsAlarmCounterRef”) 
    and schedule-tables (“OsScheduleTableCounterRef”). 
    Such alarms and schedule-tables are driven time based. 
    Additionally  MICROSAR  OS  provides  conversion  macros  (which  are  based  on  the 
    hardware counter configuration) to convert from hardware ticks to time and vice versa (see 
    for 5.2.10 details). 
    2.6.4 
    Dependencies 
    A hardware counter can be driven in two modes: 
    >  Periodical interrupt timer mode (see 2.7) 
    >  High resolution timer mode (see 2.8) 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    55 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.7 
    Periodical Interrupt Timer (PIT) 
    2.7.1 
    Description 
    The  timer  hardware  is  set  up  to  generate  timer  interrupts  requests  in  a  strict  periodical 
    interval (e.g. 1ms). The interval does not change during OS runtime. 
    Within  each  timer  ISR  MICROSAR  OS  checks  for  alarm  and  schedule-table  expirations 
    and execute the configured OS action. 
    2.7.2 
    Activation 
    >  Define an OsCounter of type “HARDWARE” and select the timer Hardware in 
    “OsDriver”. 
    >  Set the counter sub-attribute “OsDriverHighResolution” to FALSE. 
    >  The attribute “OsSecondsPerTick” specifies the cycle time of interrupt generation. 
    >  The attribute “OsCounterTicksPerBase” specifies the number of timer counter cycles 
    which are necessary to reach “OsSecondsPerTick”. 
     
     
    Note 
    The OS will add an appropriate ISR automatically to the configuration. 
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    56 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.8 
    High Resolution Timer (HRT) 
    2.8.1 
    Description 
    The  timer  hardware  is  set  up  to  generate  one  timer  interrupt  request  when  an  alarm  or 
    schedule-table action shall be executed. 
    Within each  timer ISR MICROSAR OS  performs  that action,  calculates the timer interval 
    for the next action and reprograms the timer hardware with the new expiration time. 
    2.8.2 
    Activation 
    >  Define an OsCounter of type “HARDWARE” and select the timer Hardware in 
    “OsDriver”. 
    >  Set the counter sub-attribute “OsDriverHighResolution” to TRUE. 
    >  The attribute “OsSecondsPerTick” specifies the cycle time of the timer counter. 
    >  The attribute “OsCounterTicksPerBase” must be set to “1”. 
    >  The attribute “OsCounterMaxAllowedValue” must be set to 0x3FFFFFFF 
     
     
    Note 
    The OS will add an appropriate ISR automatically to the configuration. 
     
     
     
     
    2.9 
    PIT versus HRT 
     
    PIT 
    HRT 
    Interrupt Requests are generated …    Strictly periodical 
     On demand 
    Precision of Alarms / Schedule-
     Only multiples of the 
     Any times are possible. 
    tables 
    attribute 
    With precision of the 
    OsSecondsPerTick are 
    cycle time of the used 
    possible for alarm / 
    timer hardware. 
    schedule-table times. 
    Interrupt Load 
     Generates a constant 
     Interrupt load is not 
    interrupt load which is 
    equally distributed over 
    equally distributed over 
    runtime. 
    runtime. 
     Interrupt bursts may be 
    possible. 
    Table 2-3   PIT versus HRT 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    57 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.10  Startup Concept 
    The  following  figure  gives  an  overview  of  the  different  startup  phases  of  the  OS.  It  also 
    shows which OS API functions are available in the different phases. 
     stm API Usage before StartOS
    Initial
    Startup-Phase0
    Os_InitMemory()
    Init-Step1
    Startup-Phase1
    Os_Init()
    Init-Step2
    Startup-Phases2and3
    Startup-Phase2
    DisableAllInterrupts(),
    EnableAllInterrupts(),
    Initial
    SuspendAllInterrupts(),
    ResumeAllInterrupts(),
    SuspendOSInterrupts(),
    ResumeOSInterrupts(),
    Os_EnterPreStartTask()
    Os_CallNonTrustedFunction(),
    StartCore(), GetCoreID(),
    Init-Step3
    CallTrustedFunction,
    StartNonAutosarCore()
    Os_ReadPeripheral*,
    Os_WritePeripheral*,
    Os_ModifyPeripheral*
    Startup-Phase3
    StartOS()
    Init-Step4
    After StartOS() all API functions can be 
    ExitPoint
    called in exactly the contexts as 
    described in the AutosarOS standard. 
    Mind that StartNonAutosarCore() can still 
    be called.
     
    Figure 2-3  API functions during startup 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    58 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    2.11  Single Core Startup 
    This chapter shows some examples how MICROSAR OS is started as single core OS. 
    2.11.1  Single Core Derivatives 
     
     
    OS single core startup on a single core derivative 
    void main (void) 
      { 
       Os_InitMemory(); 
       Os_Init(); 
       StartOS(OSDEFAULTAPPMODE); 

     
     
     
    2.11.2  Multi Core Derivatives 
    2.11.2.1  Examples for SC1 / SC2 Systems 
     
     
    OS single core startup on a multi core derivative 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
     
       switch(GetCoreID()) 
       { 
          case OS_CORE_ID_MASTER: 
             StartNonAutosarCore(OS_CORE_ID_1, &rv); /* call of StartNonAutosarCore is 
                                                        optional the other core may also be 
                                                        held in reset */ 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          case OS_CORE_ID_1: 
             /* don’t call StartOS; do something else */ 
             break; 
          default: 
             break; 
       } 

     
     
     
    The example starts a single core OS on the master core of a multi core derivative. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    59 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
     
    OS single core startup on a multi core derivative 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
     
       switch(GetCoreID()) 
       { 
          case OS_CORE_ID_MASTER: 
             StartCore(OS_CORE_ID_1, &rv); 
             /* don’t call StartOS; do something else */ 
             break; 
          case OS_CORE_ID_1: 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          default: 
             break; 
       } 

     
     
     
    The example starts a single core OS on the slave core of a multi core derivative 
     
    2.11.2.2  Examples for SC3 / SC4 Systems 
     
     
     
    Caution 
    The function GetCoreID requires a trap into the OS to be functional. Since the OS does 
      not initialize any trap tables on non-AUTOSAR cores GetCoreID cannot be used on 
    such cores. 
    Therefore it is not possible to use the API function GetCoreID within the main function. 
    A user function (e.g. UsrGetCoreID) is necessary which distinguishes the correct core 
    ID. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    60 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    OS single core startup on a multi core derivative 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
     
       switch(UsrGetCoreID()) 
       { 
          case 0: 
             StartNonAutosarCore(OS_CORE_ID_1, &rv); /* call of StartNonAutosarCore is 
                                                        optional the other core may also be 
                                                        held in reset */ 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          case 1: 
             /* don’t call StartOS; do something else */ 
             break; 
          default: 
             break; 
       } 

     
     
     
    The example starts a single core OS on the master core of a multi core derivative. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    61 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.12  Multi Core Startup 
    Within a multi core system each core has the following possibilities when entering the main 
    function: 
    1.  Mandatory: call to Os_InitMemory and Os_Init(). 
    2.  Optional: calls to StartCore() to start additional cores under control of MICROSAR 
    OS. 
    3.  Optional: calls to StartNonAutosarCore() to start additional cores which are 
    independent of MICROSAR OS. 
    4.  Optional: call StartOS() to start MICROSAR OS on the core  
     
    For a slave core this is only possible if the core once has been started with 
    StartCore() API from another core. 
     
    For the master core this is only possible if the core itself is configured to be 
    an AUTOSAR core. 
    2.12.1  Example for SC1 / SC2 Systems 
     
     
    OS multi core startup 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
        
       switch(GetCoreID()) 
       { 
          case OS_CORE_ID_MASTER: 
             StartCore(OS_CORE_ID_1, &rv); 
             StartCore(OS_CORE_ID_2, &rv); 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          case  OS_CORE_ID_1: 
             StartOS(DONOTCARE); 
             break; 
          case  OS_CORE_ID_2: 
             StartCore(OS_CORE_ID_3, &rv); 
             StartOS(DONOTCARE); 
             break; 
          case  OS_CORE_ID_3: 
             StartOS(DONOTCARE); 
             break; 
          default: 
             break; 
       } 

     
     
     
    The example shows a possible startup sequence for a quad core system. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    62 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    2.12.2  Examples for SC3 / SC4 systems 
    2.12.2.1  Only with AUTOSAR Cores 
     
     
    OS multi core startup 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
        
       switch(GetCoreID()) 
       { 
          case OS_CORE_ID_MASTER: 
             StartCore(OS_CORE_ID_1, &rv); 
             StartCore(OS_CORE_ID_2, &rv); 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          case  OS_CORE_ID_1: 
             StartOS(DONOTCARE); 
             break; 
          case  OS_CORE_ID_2: 
             StartCore(OS_CORE_ID_3, &rv); 
             StartOS(DONOTCARE); 
             break; 
          case  OS_CORE_ID_3: 
             StartOS(DONOTCARE); 
             break; 
          default: 
             break; 
       } 

     
     
     
    The  example  shows  a  possible  startup  sequence  for  a  quad  core  system. All  cores  are 
    configured to be AUTOSAR cores. 
     
    2.12.2.2  Mixed Core System 
     
     
    Caution 
    The function GetCoreID requires a trap into the OS to be functional. Since the OS does 
      not initialize any trap tables on non-AUTOSAR cores GetCoreID cannot be used on 
    such cores. 
    Therefore it is not possible to use the API function GetCoreID within the main function. 
    A user function (e.g. UsrGetCoreID) is necessary which distinguishes the correct core 
    ID. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    63 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    OS multi core startup 
    void main (void) 
      { 
       StatusType rv; 
     
       Os_InitMemory(); 
       Os_Init(); 
        
       switch(UsrGetCoreID()) 
       { 
          case 0: 
             StartNonAutosarCore(OS_CORE_ID_1, &rv); 
             StartCore(OS_CORE_ID_2, &rv); 
             StartOS(OSDEFAULTAPPMODE); 
             break; 
          case 1: 
             /* not an AUTOSAR core; do something else */ 
             break; 
          case 2: 
             StartCore(OS_CORE_ID_3, &rv); 
             StartOS(DONOTCARE); 
             break; 
          case 3: 
             StartOS(DONOTCARE); 
             break; 
          default: 
             break; 
       } 

     
     
     
    The example shows a possible startup sequence for a quad core system. Three cores are 
    AUTOSAR cores and one core is a non-AUTOSAR core. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    64 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.13  Error Handling 
    MICROSAR OS is able to detect and handle the following types of errors: 
    Application Errors … 
     Are raised if the OS could not execute a requested OS API service 
    correctly. Typically the OS API is used wrong (e.g. invalid object 
    ID). 
     Do not corrupt OS internal data. 
     Will result in call of the global ErrorHook() for centralized error 
    handling (if configured). 
     Will result in call of an application specific ErrorHook (if configured). 
     May not induce shutdown / terminate reactions. Instead the 
    application may continue execution by simply returning from the 
    ErrorHooks. 
    Protection Errors … 
     Are raised if the application violates its configured boundaries (e.g. 
    memory access violations, timing violations). 
     Do not corrupt OS internal data. 
     Are raised upon occurrence of unhandled exceptions and 
    interrupts. 
     Will result in call of the ProtectionHook() where a shutdown or 
    terminate handling (with or without restart) is induced. 
     If Shutdown is induced the ShutdownHook() is called (if 
    configured). 
     If no ProtectionHook() is configured shutdown is induced. 
    Kernel Errors … 
     Are raised if the OS cannot longer assume the correctness of its 
    internal data (e.g. memory access violation during 
    ProtectionHook()) 
     Will result in call of the Os_PanicHook() to inform the application. 
     Afterwards the OS disables all interrupts and enters an infinite loop. 
    Table 2-4   Types of OS Errors 
    2.14  Error Reporting 
    MICROSAR OS supports error reporting according to the AUTOSAR [1] and OSEK OS [2] 
    standard. 
    This includes 
    >  StatusType return values of OS APIs 
    >  Parameter passing of error codes error to ErrorHook() 
    >  Service ID information provided by the macro OSErrorGetServiceId() 
    >  Parameter access macros (e.g. OSError_ActivateTask_TaskID()) 
     
    2.14.1  Extension of Service IDs 
    MICROSAR OS introduces new service IDs for own services. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    65 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
     
    Reference 

      All service IDs are listed in the OS header file Os_Types.h and may be looked up in 
    the enum data type OSServiceIdType. 
     
     
     
    2.14.2  Extension of Error Codes 
    MICROSAR OS introduces new 8 bit error codes which extend the error codes which are 
    already defined by AUTOSAR OS and OSEK OS standard. 
    Type of Error 
    Related Error Code 
    Value 
    An internal OS buffer used for cross core 
    E_OS_SYS_OVERFLOW 
    0xF5 
    communication is full. 
    A forcible termination of a kernel object has  E_OS_SYS_KILL_KERNEL_OBJ 
    0xF6 
    been requested e.g. terminate system 
    applications. 
    An OS-Application has been terminated 
    E_OS_SYS_NO_RESTARTTASK 
    0xF7 
    with requested restart but no restart task 
    has been configured. 
    The application tries to use an API cross 
    E_OS_SYS_CALL_NOT_ALLOWED 
    0xF8 
    core, but the target core has not been 
    configured for cross core API 
    The triggered cross core function is not 
    E_OS_SYS_FUNCTION_UNAVAILABLE  0xF9 
    available on the target core. 
    A syscall instruction has been executed 
    E_OS_SYS_PROTECTION_SYSCALL  0xFA 
    with an invalid syscall number. 
    An unhandled interrupt occurred. 
    E_OS_SYS_PROTECTION_IRQ 
    0xFB 
    The interrupt handling API is used wrong. 
    E_OS_SYS_API_ERROR 
    0xFC 
    Internal OS assertion (not issued to 
    E_OS_SYS_ASSERTION 
    0xFD 
    customer). 
    A system timer ISR was delayed too long. 
    E_OS_SYS_OVERLOAD 
    0xFE 
    Table 2-5   Extension of Error Codes 
     
     
    Reference 

      All error codes and their values can be looked up in the header file Os_Types.h 
     
     
     
    2.14.3  Detailed Error Codes 
    MICROSAR  OS  provides  detailed  error  code  to  extend  the  standard  error  handling  of 
    AUTOSAR to uniquely identify each possible OS error. 
    The detailed error code is assembled from AUTOSAR StatusType error code and unique 
    error code. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    66 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    0x XXXXXX
    YY
    MICROSAR OS
    Error code extension
    Autosar StatusType  
    Figure 2-4  MICROSAR OS Detailed Error Code 
    Within OS Hook routines the error code can be obtained by calling Os_GetDetailedError() 
    (see 5.2.7.1 for details). 
     
     
     
    Note 
    Vector OS experts always asks about the detailed error codes when supporting 
      customers in case of OS errors. 
     
     
     
     
     
    Reference 

      The detailed error codes are listed in the file Os_Types.h and may be looked up in 
    the enum data type Os_StatusType. 
    Each detailed error code is preceded by a descriptive comment. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    67 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.15  Multi Core Concepts 
    2.15.1  Scheduling and Dispatching 
    MICROSAR OS implements independent schedulers and dispatchers for each core. 
    2.15.2  Multi Core Data Concepts 
    The multi core data concept of MICROSAR OS tries to avoid concurrent writing accesses 
    between cores. 
    Although  cores  may  read  all  OS  data  of  all  cores,  write  accesses  to  OS  data  are  only 
    performed locally from the owning core. 
    This data concept allows optimized linking: 
    >  The data of a particular core may be linked into fast accessible memory 
    >  The data of a particular core may be linked into cached memory 
    Only the variables related to spinlocks have to be linked into global memory which must be 
    accessible by all participating cores. 
    2.15.3  X-Signals 
    To realize cross core service APIs MICROSAR OS offers the X-Signal concept (see 3.9 for 
    details). 
    2.15.4  Master / Slave Core 
    In a real master / slave multi core architecture only one core is started upon reset. This is 
    the master core. All other cores are held in a reset state and must be explicitly started by 
    the master core. These are slave cores. 
    There  are  also  multi  core  systems  which  starts  all  cores  simultaneously.  There  is  no 
    hardware master / slave classification. 
    MICROSAR OS is capable to deal with  both concepts.  In a system with equal cores the 
    OS emulates master / slave behavior according to the core configurations. 
    2.15.5  Hardware Init Core 
    To  initialize  the  system  peripherals  used  by  the  OS  (e.g.  System  MPU,  Interrupt 
    Controller), MICROSAR OS uses a dedicated so called Hardware Init Core. 
    MICROSAR  OS  offers  the  possibility  to  configure  one  core  as  Hardware  Init  Core 
    ("/MICROSAR/Os/OsOS/OsHardwareInitCore").  If  the  user  does  not  configure  a  specific 
    core, the Master Core is used as Hardware Init Core. 
    In  safety-critical  environments  it  is  recommended  to  configure  the  core  with  the  highest 
    diagnostic coverage as Hardware Init Core. 
    2.15.6  Startup of a Multi Core System 
    The startup of a multi core system is described in detail in 2.12. 
    MICROSAR OS offers the possibility to configure a startup symbol for each core. Within a 
    real master / slave system the OS needs this information for starting the slave cores. 
    2.15.7  Spinlocks 
    Synchronization of cores is done by 
    >  OS Spinlocks (see [1]) or 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    68 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    >  Optimized spinlocks (see 3.1) 
    2.15.7.1  Linking of Spinlocks 
    To  achieve  freedom  from  interference  between  cores  with  different  diagnostic  coverage 
    capability, spinlocks are linked into different memory sections. 
    An MPU may be used to allow access from only specific cores or specific OS applications. 
    The used memory sections depend on the feature „OsForcibleTermination“ 
     
    OS spinlocks 
    Optimized spinlocks 
    Spinlock variables are linked 
    OsForcibleTermination = TRUE 
    into a core shared section 
    Spinlocks variables are linked 
    into a core shared section 
    Spinlock variables are linked 
    OsForcibleTermination = FALSE 
    into an application shared 
    section 
    Table 2-6   Linking of spinlocks 
    2.15.8  Cache 
    Due to cache coherency problems spinlock variables and other application variables which 
    are shared among cores must not be cached. 
    2.15.9  Shutdown 
    2.15.9.1  Shutdown of one Core 
    If ShutdownOS() is called on one core, it induces shutdown actions. 
    >  The core terminates all its applications 
    >  Application specific ShutdownHooks are called  
    >  The global ShutdownHook() is called 
    >  Interrupts are disabled 
    >  An endless loop is entered 
    2.15.9.2  Shutdown of all Cores 
    Upon  call  to  ShutdownAllCores()  synchronized  shutdown  of  the  system  is  invoked.  An 
    asynchronous X-Signal is used for this purpose. 
    Synchronized shutdown is described in [1]. 
     
    2.15.9.3  Shutdown during Protection Violation 
    If  the  ProtectionHook()  returns  with  “PRO_SHUTDOWN”  a  shutdown  of  all  cores  is 
    invoked. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    69 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.16  Debugging Concepts 
    2.16.1  Description 
    MICROSAR OS offers two software utilities to support OS debugging. 
    ORTI 
    MICROSAR OS generates an ORTI debug file (OSEK RunTime 
    Interface). Many debuggers are capable of loading such ORTI files 
    and provide comfortable debug means based upon the OS 
    configuration. 
    See chapter 2.16.3 for details 
    TimingHooks 
    MICROSAR OS provides macros which may be used for debugging 
    purposes (also suitable for third party tools). See chapter 3.10 for 
    details. 
     
    2.16.2  Activation 
    ORTI and TimingHooks may be switched on within the OsDebug container. 
     
     
    Note 
    There is an additional switch within the “OsDebug” container. It enables OS assertions. 
      They are intended for OS internal test purposes. If activated the OS performs additional 
    runtime checks on its own internal states. 
     
     
     
    2.16.3  ORTI Debugging 
    ORTI is the abbreviation of “OSEK Runtime Interface”. 
    When ORTI debugging is activated MICROSAR OS generates additional files with “.ort” 
    extension.  These  files  contain  information  about  the  whole  OS  configuration.  They  are 
    intended to be read by a debugger. 
    The  debugger  uses  the  information  from  the  ORTI  files  to  display  static  and  runtime 
    information about OS objects e.g. task states. 
    ORTI versions supported by MICROSAR OS: 
    ORTI 2.2 
    As described in the OSEK standard [3] and [4] 
    ORTI 2.3 
    Unofficial “Standard” based upon ORTI 2.2. It does contain extensions 
    for multi core OS and was proposed by “Lauterbach Development 
    Tools” (described in [5]). 
     
    Both ORTI versions are capable to be used within single core and multi core systems. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    70 
    based on template version 6.0.1 







    Technical Reference MICROSAR OS 
     
     
    Note for ORTI 2.2 multi core debugging 

      For each configured AUTOSAR core there is one separate ORTI file. 
    For multi core debugging, the debugger software must be capable to read several 
    ORTI files. 
     
     
     
     
     
    Note for ORTI 2.3 multi core debugging 

      The debug information for all configured cores is aggregated in one file. 
     
     
     
     
     
    Note 

      Basically debuggers are capable to display the stack consumption for each stack 
    (OsStackUsageMeasurement must be switched on). 
    Please note that uninitialized OS stacks may show 100% stack usage within ORTI 
    debugging. Reliable information can only be given after the OS has initialized all 
    stacks. 
     
     
     
     
     
    Caution 

      MESSAGE objects and CONTEXT information specified by ORTI 2.2 Standard are not 
    supported in MICROSAR OS. 
     
     
     
     
     
    Caution 

      The following OS services are not traced by ORTI service tracing: 
    >  GetSpinlock (for optimized spinlocks) 
    >  TryToGetSpinlock (for optimized spinlocks) 
    >  ReleaseSpinlock (for optimized spinlocks) 
    >  IOC 
    >  Os_GetVersionInfo 
    >  Os_Init 
    >  Os_InitMemory 
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    71 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.17  Memory Protection 
    MICROSAR OS uses memory protection facilities of a processor to achieve freedom from 
    interference between OS applications and cores. For this purpose it may use the system 
    MPU and the core MPUs. 
    2.17.1  Usage of the System MPU 
    In  multi  core  systems  whereas  the  cores  have  different  levels  of  diagnostic  coverage  it 
    may  be  necessary  to  use  a  system  MPU  to  achieve  freedom  of  interference  between 
    cores. 
    A  system  MPU  allows  configuring  access  rights  for  cores  to  access  specific  memory 
    ranges. 
    The  system  MPU  is  only  initialized  once  during  startup  of  the  OS.  It  is  never 
    reprogrammed during runtime. 
    With  a  system  MPU  other  potential  bus  masters  (DMA,  FlexRay)  can  be  isolated  to 
    achieve freedom from interference. 
    This is done with the following steps: 
    Step 
    Toolchain phase 
    Set up a SC3 system 
    Configure memory regions 
    Configuration of OS 
    Assign the memory region to the system MPU 
     
    2.17.2  Usage of the Core MPUs 
    The  core  MPUs  are  used  to  achieve  freedom  from  interference  between  applications  / 
    tasks / ISRs on the same core. The basic concept is that access rights  of these runtime 
    entities (read/write/executable) have to be granted explicitly to software parts. 
    This is done with the following steps: 
    Step 
    Toolchain phase 
    Set up a SC3 system 
    Configure memory regions 
    Configuration of OS 
    Assign the memory region to a core MPU 
    Assign the memory regions to OS applications / Tasks / ISRs 
    (optional) 

    Use the AUTOSAR MemMap mechanism to place code, constants and 
    Compilation 
    variables into appropriate sections (see 4.3.1.1) 
    Use OS generated linker command files to locate the sections into 
    Linkage 
    memory (see 4.3.2) 
     
    2.17.3  Configuration Aspects 
    A memory region is typically configured by 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    72 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    >  Specify a start and end address by number, or by linker labels (see 4.3.3 for OS 
    generated section labels) 
    >  Specify access rights to this region (a pre-defined set of access rights is referable) 
    >  Specify the validity of the region by ID (e.g. PID / ASID / Protection Set) 
    >  Specify to which memory protection unit the region belongs (e.g. Core MPU / System 
    MPU) 
    >  Specify the owner of the region 
    The owner of the memory region distinguishes the runtime behavior of the hardware MPU 
    regions (whether the region is static or dynamic). 
     
     
     
    Note 
    The start and end addresses of configured memory region should always be a multiple 
      of the granularity of the hardware MPU. 
     
     
     
     
     
    Note 
    The number of available hardware MPU regions is limited by hardware! 
      MICROSAR OS checks during code generation that the overall number of configured 
    memory regions does not exceed the number of available hardware MPU regions. 
     
     
     
    2.17.3.1  Static MPU Regions 
    If no owner is specified, MICROSAR OS initializes a hardware MPU region to be static. It 
    is never reprogrammed during runtime of the OS. It is valid for all software parts. 
     
    2.17.3.2  Dynamic MPU Regions 
    If an owner is specified for a memory region MICROSAR OS initializes a hardware MPU 
    region  to  be  dynamically  reprogrammed  during  OS  runtime. Whenever  the  owner  of  the 
    memory is active during runtime a specific hardware MPU region is programmed with the 
    configured values of the memory region. 
    Memory regions which are assigned to an OS application are reprogrammed whenever the 
    OS application is switched. 
    Memory regions which are assigned to tasks or ISRs are reprogrammed with each thread 
    switch. 
     
    2.17.3.3  Freedom from Interference 
    MICROSAR  OS  is  able  to  encapsulate  OS  application  data,  task  private  data  and  ISR 
    private data. This does also depend on the owner of the memory region. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    73 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    Memory Region Owner 
    Access Granted To 
    Access Denied For 
    OS application 
    Runtime objects of this OS 
    >  Other non-trusted OS 
    application 
    applications and its 
    >  Tasks 
    applications objects 
    >  ISRs 
    >  IOC callbacks 
    >  Non-trusted functions 
    >  Application specific hooks 
    Task 
    >  The owning task 
    >  Other non-trusted OS 
    applications and its 
    ISR 
    >  The owning ISR 
    applications objects 
    >  Other runtime objects of the 
    belonging OS application 
     
    2.17.4  Stack Monitoring 
    MICROSAR OS uses one memory region of the MPU to supervise the current stack. This 
    is the default handling in SC3 and SC4 systems. See 2.3.5 for details. 
     
     
     
    Caution 
    Memory regions must not be configured to allow write access into any stack regions. 
      Otherwise the OS cannot ensure stack data integrity. 
     
     
     
    2.17.5  Protection Violation Handling 
    Upon any memory protection violation exception the OS first switches to the kernel stack 
    and then informs the application. 
    In  case  of  a  memory  protection  violation  exception  which  has  occurred  within  OS  code 
    MICROSAR OS calls the PanicHook(). 
    In case of a memory protection violation exception which has occurred within critical user 
    sections,  i.e.  PreTaskHook,  PostTaskHook,  Alarm  callbacks,  Timing  Hooks, 
    ProtectionHook and ShutdownHook, MICROSAR OS calls the PanicHook(). 
    In  all  other  cases  of  a  memory  protection  violation  exception  MICROSAR  OS  calls  the 
    ProtectionHook() with the parameter E_OS_PROTECTION_MEMORY. 
     
    2.17.6  Optimized / Fast Core MPU Handling 
    If the number of application / task / ISR specific memory regions is small, MICROSAR OS 
    may have the possibility to initialize the MPU entirely with static MPU regions. 
    By  utilize  memory  protection  identifiers  different  access  rights  may  still  be  achieved 
    between different applications. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    74 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    MICROSAR OS  switches  access rights  by simply switching the  protection  identifier. This 
    will result in a very fast MPU handling. 
    >  Configure only memory regions which are static (no owner is assigned). 
    >  Use “OsMemoryRegionIdentifier” to assign a protection identifier to that region. 
    >  Assign either OS applications or Tasks and ISRs to use a specific protection identifier 
    (OsAppMemoryProtectionIdentifier, OsTaskMemoryProtectionIdentifier, 
    OsIsrMemoryProtectionIdentifier) 
     
     
    Note 
    Depending on the used platform protection identifiers are also referred as PID (MPC), 
      ASID (RH850) or protection sets (TriCore). But the basic technique is the same. 
     
     
     
    2.17.7  Recommended Configuration 
    MICROSAR OS offers a recommended MPU configuration which contains a basic setup. 
    It configures the MPU to achieve the access rights as follows 
    Access Rights 
    Trusted Software 
    Non-Trusted Software 
    Executable rights to whole memory 


    Read access to whole RAM / ROM 


    Write access to whole RAM (except 


    stack regions) 
    Read / Write access to peripheral 


    registers 
    Read / Write access to global shared 


    memory 
    Write access to current active stack 


    Table 2-7   Recommended Configuration MPU Access Rights 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    75 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.18  Memory Access Checks 
    2.18.1  Description 
    AUTOSAR OS specifies functions for checking memory access rights of an ISR or task to 
    a specific memory region. 
    >  CheckTaskMemoryAccess 
    >  CheckISRMemoryAccess 
    2.18.2  Activation 
    No  explicit  activation  of  these  API  service  functions  necessary.  They  are  provided 
    automatically by the OS. 
    2.18.3  Usage 
    The  API  service  functions  CheckTaskMemoryAccess()  and  CheckISRMemoryAccess() 
    work on additional configuration data which has to be provided by the user. 
    Therefore  additional  regions  (“OsAccessCheckRegion“)  may  be  configured.  Tasks  and 
    ISRs may be assigned to each access check region. 
     
     
    Note 
    All memory access checks are based upon the configured “OsAccessCheckRegion” 
      objects. They are not based upon current MPU values during runtime! 
    OsAccessCheckRegions and OsMemoryRegions contain redundant information. 
     
     
     
    2.18.4  Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    76 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    2.19  Timing Protection Concept 
    2.19.1  Description 
    To implement timing protection, MICROSAR OS needs a timer hardware which is able to 
    generate an interrupt with high priority. This interrupt is never disabled by the OS interrupt 
    handling API. 
    Two concepts may be implemented within MICROSAR OS: 
      The timing protection interrupt request is non-maskable (NMI request) 
      The timing protection interrupt request is maskable 
    The consequences of both concepts are shown in the comparison: 
     
    Timing Protection IRQ is 
    Timing Protection IRQ is NMI 
    Maskable 
    Level of timing 
    The level of the interrupt source  The exception source has no 
    protection IRQ 
    is chosen to be higher than the 
    interrupt level. 
    highest category 1 ISR. 
     
     
     
    Caution 
    Any category 1 ISR bypasses the OS. For this reason such an ISR may get terminated 
      in case it is executed, while the budget of a monitored entity is exhausted. 
    Thus the AUTOSAR OS specification advises not to use category 1 ISRs within a 
    system which uses timing protection. 
     
     
     
     
     
    Caution 
    In case of an inter-arrival time violation MICROSAR OS does currently not provide the 
      information which task or ISR did violate its inter-arrival time. GetTaskID() and 
    GetISRID() return the current task / ISR. The suppressed task / ISR ID is not returned 
    by these APIs. 
     
     
     
    2.19.2  Activation 
    Timing  protection  features  are  activated  by  setting  the  scalability  class  to  SC2  or  SC4 
    (OsScalabilityClass). 
    Afterwards  timing  protection  containers  may  be  configured  for  tasks  or  ISRs 
    (OsTaskTimingProtection  /  OsIsrTimingProtection).  Observed  times  are  configured  within 
    these containers. 
     
     
    Note 
    The OS will add an appropriate ISR automatically to the configuration. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    77 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    2.19.3  Usage 
    Once the timing protection feature is active tasks and ISRs are observed automatically by 
    the OS. 
    Observation  of  a  particular  OS  object  (task  /  ISR)  only  takes  place  if  any  execution 
    budgets or locking times are configured for this object. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    78 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.20  IOC 
    2.20.1  Description 
    The Inter OS-Application Communicator (IOC) is responsible for data exchange between 
    OS applications. It handles two important tasks 
    >  Data exchange across core boundaries 
    >  Data exchange across memory protection boundaries 
    Parts of the IOC API services are generated. 
    MICROSAR OS always tries to generate IOC API services and data structures to minimize 
    resource usage. 
    Especially the runtime of IOC API services is influenced by the configuration of IOC 
    objects. For the customer it is important how configuration aspects minimize the IOC 
    runtime. 
    For each IOC object MICROSAR OS decides during runtime whether 
    >  Interrupt locks 
    >  Spinlocks 
    Are used or not. 
    2.20.2  Unqeued (Last Is Best) Communication 
     
     
    Note 
    Whenever the data of a last is best IOC object can be written / read atomically (integral 
      data type) no spinlocks are used at all. 
     
     
     
    2.20.2.1  1:1 Communication Variant 
     
    Sender and Receiver are located  Sender and Receiver are located 
    on the same core 
    on the different cores 
    Interrupt Locks 
    Used 
    Not used 
    Spinlocks 
    Not Used 
    Used 
    System Call Traps 
    Not Used 
    Not Used 
     
    2.20.2.2  N:1 Communication Variant 
     
    Sender and Receiver are located  Sender and Receiver are located 
    on the same core 
    on the different cores 
    Interrupt Locks 
    Used 
    Not used 
    Spinlocks 
    Not Used 
    Used 
    System Call Traps 
    Used 
    Used 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    79 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.20.2.3  N:M Communication Variant 
     
    Sender and Receiver are located  Sender and Receiver are located 
    on the same core 
    on the different cores 
    Interrupt Locks 
    Used 
    Not used 
    Spinlocks 
    Not Used 
    Used 
    System Call Traps 
    Used 
    Used 
     
    2.20.3  Queued Communication 
    For 1:1 and N:1 Communication the following table is applied: 
     
    Sender and Receiver are located  Sender and Receiver are located 
    on the same core 
    on the different cores 
    Interrupt Locks 
    Not Used 
    Not used 
    Spinlocks 
    Not Used 
    Not Used 
    System Call Traps 
    Not Used 
    Not Used 
     
    2.20.4  Notification 
    MICROSAR OS provides configurable receiver callback functions for notification purposes. 
     
     
    Note 
    In case an IOC object has a configured receiver callback function a system call trap is 
      needed in any case. 
     
     
     
    2.20.5  Particularities 
    2.20.5.1  N:1 Queued Communication 
    N:1 queued commination is realized with multiple sender queues. The receiver application 
    does  an  even  multiplexing  on  all  sender  queues  when  calling  the  receive  function  (see 
    figure). 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    80 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
    Figure 2-5  N:1 Multiple Sender Queues 
    2.20.5.2  IOC Spinlocks 
     
     
    Note 
    During generation of OS data structures, if MICROSAR OS detects that a spinlock is 
      needed for a particular IOC object, it automatically creates a spinlock object within the 
    OS configuration. 
     
     
     
    2.20.5.3  Notification 
    Based  on  the  core  assignment  of  sender  and  receiver  of  an  IOC  object,  two  possible 
    scenarios for callback handling are possible. 
    Sender and Receiver are located on 
    >  The callback notification function is called within the 
    the same core 
    IOC send function 
    Sender and Receiver are located on 
    >  The sender triggers an X-Signal request on the 
    different cores 
    receiving core 
    >  The callback notification function is called within the 
    X-Signal ISR 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    81 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
     
    Note 

      >  All callback functions are using the cores IOC receiver pull callback stack. 
    >  During execution of the IOC receiver pull callback function category 2 ISRs are 
    disabled. 
    >  Within IOC receiver pull callback functions only other IOC API functions and 
    interrupt dis/enable API functions are allowed. 
     
     
     
    2.20.5.4  Complex Data Types 
     
     
    Note 

      If “OsIocDataType” of an IOC object is a complex data type, MICROSAR OS uses a 
    memcpy function of the VStdLib Module for data transfer and initialization. 
    See VStdLib Technical Reference [8]. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    82 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.21  Trusted OS Applications 
    Trusted  OS  Applications  are  basically  executed  in  supervisor  mode.  They  can  have 
    read/write access to nearly the whole memory (except stack regions). 
    MICROSAR OS allows gradually restricting of access rights of trusted OS applications. 
    Trusted OS applications may be restricted by memory access or by processor mode. 
    2.21.1  Trusted OS Applications with Memory Protection 
    2.21.1.1  Description 
    Runtime objects (Tasks / ISRs / Trusted functions) of trusted OS applications with enabled 
    memory protection have the following behavior 
    >  They run in supervisor mode 
    >  Memory access has to be granted explicitly (in the same way as for a non-trusted OS 
    application) 
    >  The MPU is re-programmed whenever software of the OS application is executed. 
    2.21.1.2  Activation 
    Set “OsTrustedApplicationWithProtection” to TRUE. 
    2.21.1.3  Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
    2.21.2  Trusted OS Applications in User Mode 
    2.21.2.1  Description 
    Such  OS  applications  can  have  read/write  access  to  nearly  the  whole  memory  (except 
    stack  regions),  but  they  are  running  in  user  mode.  This  is  also  applied  to  all  runtime 
    objects (Tasks / ISRs / Trusted functions) assigned to this OS application. 
     
     
    Note 

      >  API runtimes for OS applications which run in user mode are longer. 
     
     
     
    2.21.2.2  Activation 
    Set “OsApplicationIsPrivileged” to FALSE. 
    2.21.2.3  Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    83 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    2.21.3  Trusted Functions 
     
     
    Note 

      >  The interrupt state of the caller is preserved when entering the trusted function. 
    >  The trusted function may manipulate the interrupt state by using OS services. The changed 
    interrupt state is preserved upon return from the trusted function. 
     
     
     
     
     
    Caution 
    Nesting level of trusted functions is limited to 255. 
      The application has to ensure that this limitation is held. There is no error detection 
    within the OS. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    84 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    2.22  OS Hooks 
    2.22.1  Runtime Context 
    MICROSAR  OS  implements  the  runtime  context  and  accessing  rights  of  OS  Hooks 
    according to the following table 
    Hook Name 
    Processor Mode  Access Rights  Interrupt State 
    StartupHook 
    Category 2 lock 
    ErrorHook
    level 
     
    Supervisor 
    Trusted 
    ShutdownHook 
    Category 1 lock 
    ProtectionHook
    level 
     
    StartupHook_<OS application name> 
    Category 2 lock 
    Depending on the configuration of 
    ErrorHook_<OS application name>
    level 
     
    the owning OS application 
    ShutdownHook_<OS application name> 
    TP lock level 
    Os_PanicHook 
    Supervisor 
    Trusted 
    TP lock level 
    PreTaskHook 
    Supervisor 
    Trusted 
    TP lock level 
    PostTaskHook 
    Supervisor 
    Trusted 
    TP lock level 
    AlarmCallbacks 
    Category 1 lock 
    Supervisor 
    Trusted 
    level 
    IOC receiver pull callbacks 
    Depending on the configuration of 
    Category 2 lock 
    the owning OS application 
    level 
     
    2.22.2  Nesting behavior 
    It is possible that OS hooks may be nested by other OS hooks according to the  following 
    table 
    Nested by  ErrorHook(s) 
    ProtectionHook  StartupHook(s)  ShutdownHook(s))  IOC Callbacks 
    OS Hook 
    ErrorHook(s) 
    Not possible 
    possible 
    Not possible 
    possible 
    possible 
    ProtectionHook 
    Not possible 
    Not possible 
    Not possible 
    possible 
    possible 
    StartupHook(s) 
    possible 
    possible 
    Not possible 
    possible 
    possible 
    ShutdownHook(s) 
    Not possible 
    Not possible 
    Not possible 
    Not possible 
    possible 
    IOC Callbacks 
    possible 
    possible 
    Not possible 
    possible 
    Not possible 
     
     
    2.22.3  Hints 
     
     
    Caution 
    Within OS Hooks the interrupts must not be enabled again! 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    85 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
     
     
    Caution 
    Hooks must never be called by application code directly. 
     
     
     
     
     
     
    Note for SC2 or SC4 
    Hooks don’t have any own runtime budgets. OS Hooks consume the budget of the 
      current task / ISR. 
     
     
     
     
     
    Note: Protection violations during OS Hooks 

      If any protection violation occurs during the hooks 
     PreTaskHook 
     PostTaskHook 
    the OS will always go into shutdown! 
    The return value of the ProtectionHook (e.g. PRO_TERMINATEAPPL) will be ignored 
    and overwritten by the OS to PRO_SHUTDOWN. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    86 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    3  Vector Specific OS Features 
    This chapter describes functions which are available only in MICROSAR OS. They extend 
    the standardized OS functions from the AUTOSAR and OSEK OS standard [1] [2]. 
    3.1 
    Optimized Spinlocks 
    3.1.1 
    Description 
    For  core  synchronization  in  multi  core  systems,  MICROSAR  OS  offers  (beneath  the 
    AUTOSAR specified OS spinlocks) additional optimized spinlocks. 
    They are able to reduce the runtime of the Spinlock API. Configuration is also easier. 
    AUTOSAR  specified  OS  spinlocks  cannot  cause  any  deadlocks  between  cores  (see 
    unique  order  of  nesting  OS  spinlocks  in AUTOSAR  OS  standard).  Therefore  some  error 
    checks on OS configuration data are necessary. 
    The error checks are not performed with optimized spinlocks. 
     
    OS Spinlocks 
    Optimized Spinlocks 
    Deadlocks 
    No deadlocks possible 
    Deadlocks are possible 
    Runtime 
    Longer runtime due to more error  Smaller runtime due to less error 
    checks 
    checks 
    Configuration 
    OsSpinlockSuccessor must be 
    OsSpinlockSuccessor need not to 
    configured if spinlocks must be 
    be configured 
    nested 
    Nesting 
    Can be nested by other OS 
    Nesting of optimized spinlock 
    spinlocks 
    should be avoided or at least be 
    used with caution 
    Linking 
    OS and optimized spinlock variables are placed into different 
    dedicated memory sections (see 4.3.1)
    Table 3-1   Differences of OS and Optimized Spinlocks 
    3.1.2 
    Activation 
    The spinlock attribute “OsSpinlockLockType” may be set to “OPTIMIZED”. 
    The “OsSpinlockSuccessor” attribute should not be configured for an optimized spinlock. 
    3.1.3 
    Usage 
    Once a spinlock object is configured to be an optimized spinlock the application may use 
    the  Spinlock  API  as  usual.  The  Spinlock  service  functions  are  capable  to  deal  with 
    optimized and OS spinlocks. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    87 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.2 
    Barriers 
    3.2.1 
    Description 
    MICROSAR  OS  offers  the  feature  to  synchronize  participating  tasks  at  a  referenced 
    barrier. The calling task is blocked until the required numbers of tasks have also called the 
    method referencing the same barrier. 
    3.2.2 
    Activation 
    Within  OS  configuration  “Barrier”  objects  may  be  specified. A  barrier  consists  of  a  list  of 
    tasks that participate the barrier. 
     
     
    Note 
    Only one task per core may be assigned to a barrier object. The assigned task must 
      also be the task that calls the API. 
     
     
     
    3.2.3 
    Usage 
    If  one  or  more  barriers  are  configured  Os_BarrierSynchronize  may  be  called  inside  the 
    tasks  that  are  configured  to  participate  the  barrier.  Tasks  can  participate  in  multiple 
    barriers. Per core only one task can participate a single barrier. 
    The core on which a task calls Os_BarrierSynchronize gets blocked inside the API until all 
    other participating tasks have called the API for the same BarrierID. 
     
    Task1
    Task2
    Task3
    Os_BarrierSynchronize(Barrier1)
    (Wa
    Os_BarrierSynchronize(Barrier2)
    itin
    g
    for
    Os_BarrierSynchronize(Barrier2)
     ot
    Barrier2
    h
    er
     cor
    es)
    Os_BarrierSynchronize(Barrier1)
    Os_BarrierSynchronize(Barrier1)
    Barrier1
     
    Figure 3-1  Barriers 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    88 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Caution 
    Deadlock may occur if one task has called Os_BarrierSynchronize and one of the other 
      participants don’t calls the API for the same barrier. 
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    89 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    3.3 
    Peripheral Access API 
    3.3.1 
    Description 
    MICROSAR OS offers peripheral access services for manipulating registers of peripheral 
    units.  The  application  may  delegate  such  accesses  to  the  OS  in  case  that  its  own 
    accessing rights are not sufficient to manipulate specific peripheral registers. 
    3.3.2 
    Activation 
    The API service functions themselves do not need any activation. 
    But within the OS configuration “OsPeripheralRegion” objects may be specified. They are 
    needed for error and access checking by the OS. 
    An OsPeripheralRegion object consists of the start address, end address and a list of OS 
    applications which have accessing rights to the peripheral region. 
     
     
    Note 
    Access to a peripheral region is granted if the following constraint is held 
      Start address of peripheral region <= Accessed address <= End address of peripheral region 
     
     
     
    3.3.3 
    Usage 
    Once peripheral regions are configured they may be passed to the API functions. 
     
     
    Reference
     
    The API service functions themselves are described in chapter 5.2.2. 
     
     
     
     
    3.3.4 
    Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
    3.3.5 
    Alternatives 
    The access rights to peripheral registers may also be granted by configure an additional 
    MPU region for the accessing OS application. 
    3.3.6 
    Common Use Cases 
    The peripheral access APIs may be used … 
    >  … if the accessing OS application runs in user mode but the register to be 
    manipulated can only be accessed in supervisor mode. 
    >  … if the application does not want to spend a whole MPU region to grant access 
    rights. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    90 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    3.4 
    Trusted Function Call Stubs 
    3.4.1 
    Description 
    Since the OS service CallTrustedFunction() is very generic, there is the need to implement 
    a  stub-interface  which  does  the  packing  and  unpacking  of  the  arguments  for  trusted 
    functions. 
    MICROSAR OS is able to generate these stub functions. 
    3.4.2 
    Activation 
    The OS application attribute “OsAppUseTrustedFunctionStubs” must be set to TRUE. Data 
    types 
    must 
    be 
    defined 
    in 
    the 
    header 
    file 
    which 
    is 
    referred 
    by 
    “OsAppCalloutStubsIncludeHeader”. 
    3.4.3 
    Usage 
    A particular trusted function is called with the following syntax: 
    <configured return type> Os_Call_<trusted function name> 
    (<configured parameters>); 
    Parameter packing, unpacking and return value handling is done by the stub function. 
    3.4.4 
    Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    91 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    3.5 
    Non-Trusted Functions (NTF) 
    3.5.1 
    Description 
    Service  functions  which  are  provided  by  non-trusted  OS  applications  are  called  non-
    trusted functions. They have the following characteristics: 
    >  They run in user mode. 
    >  They run with the MPU access rights of the owning OS application. 
    >  They perform a stack switch to specific non-trusted function stacks. 
    >  They run on an own secured stack. 
    >  They can safely provide non-trusted code to other OS applications. 
    >  Parameters are passed to the NTF with a reference to a data structure provided by 
    the caller. 
    >  Returning of values is only possible if the caller passes the non-trusted functions 
    parameters as pointer to global accessible data. 
    3.5.2 
    Activation 
    They are defined within an OsApplication container (“OsApplicationNonTrustedFunction”). 
    The attribute “OsTrusted” for this OS application must be set to FALSE. 
    3.5.3 
    Usage 
    Similar  to  the  CallTrustedFunction() API  of  the AUTOSAR  OS  standard  MICROSAR  OS 
    implements  an  additional  service  which  is  called  Os_CallNonTrustedFunction()  (see 
    chapter 5.2.4 for Details). 
    Configured non-trusted functions are called with this API. 
     
     
    Note 

      >  The interrupt state of the caller is preserved when entering the non-trusted function 
    >  The non-trusted function may manipulate the interrupt state by using OS services. The 
    changed interrupt state is preserved upon return from the non-trusted function. 
     
     
     
     
     
    Caution 
    Non-trusted functions currently cannot be terminated without termination of the caller. 
     
     
     
     
    3.5.4 
    Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    92 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.6 
    Fast Trusted Functions 
    3.6.1 
    Description 
    MICROSAR  OS  offers  the  feature  of  runtime  optimized  trusted  functions  (fast  trusted 
    functions). 
    The  speedup  of  the  runtime  is  achieved  by  removing  most  of  the  OS  error  checks,  the 
    application switch and the MPU reprogramming. 
    Fast trusted functions have the following characteristics: 
    >  They may be called with disabled interrupts. 
    >  They run in supervisor mode. 
    >  They run with the application ID of the caller. 
    >  They run on the stack of the caller. 
    >  They run with the MPU settings of the caller. 
    >  Parameters are passed to the fast trusted function with a reference to a data 
    structure provided by the caller. 
     
     
    Caution 
    Calls to other OS API services are not allowed within a fast trusted function! 
     
     
     
     
    3.6.2 
    Activation 
    They are defined within an OsApplication container (“OsApplicationFastTrustedFunction”). 
    The attribute “OsTrusted” for this OS application must be set to TRUE. 
    3.6.3 
    Usage 
    Similar  to  the  CallTrustedFunction() API  of  the AUTOSAR  OS  standard  MICROSAR  OS 
    implements  an  additional  service  which  is  called  Os_CallFastTrustedFunction()  (see 
    chapter 5.2.5 for Details). 
    Configured fast trusted functions are called with this API. 
    3.6.4 
    Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    93 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    3.7 
    Interrupt Source API 
    3.7.1 
    Description 
    MICROSAR  OS  offers  additional  API  services  for  category  2  ISRs  and  their  respective 
    interrupt sources. 
    The services include 
    >  Enable of an interrupt source 
    >  Disable of an interrupt source 
    >  Clearing of the interrupt pending bit 
    >  Checking if the interrupt source is enabled 
    >  Checking of interrupt pending bit status 
    (See 5.2.6 for API details). 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    94 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    3.8 
    Pre-Start Task 
    3.8.1 
    Description 
    MICROSAR OS offers the possibility to provide a set of OS API functions for initialization 
    purposes before StartOS has been called. 
    Therefore a pre-start task may be configured which is capable to run before the OS has 
    been started. Within  this task stack protection is enabled and particular OS APIs  can be 
    used. 
    The table in 5.2.15 lists the OS API functions which may be used within the Pre-Start task. 
    3.8.2 
    Activation 
    >  Define a basic task 
    >  Within a core object this basic task has to be referred to be the pre-start task of this 
    core (attribute “OsCorePreStartTask”). Only one pre-start task per core is possible. 
    >  Start the OS as described below 
    3.8.3 
    Usage 
    1.  Execute Startup Code 
    2.  Call Os_InitMemory() 
    3.  Call Os_Init() 
    4.  Call Os_EnterPreStartTask() (see 5.2.3 for Details) 
    5.  The OS schedules and dispatches to the task which has been referred as pre-start 
    task. 
    6.  The pre-start task has to be left by a call to StartOS()  
     
     
    Caution 
    The pre-start task may only be active once prior to StartOS() call. 
     
     
     
     
     
     
    Caution 
    Within the pre-start task the getter OS API services (e.g. GetActiveApplicationMode()) 
      neither return a valid result nor a valid error code. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    95 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
     
     
    Caution 
    If MICROSAR OS encounters an error within the pre-start task, only the global hooks 
      (ErrorHook(), ProtectionHook() and ShutdownHook()) are executed. OS application 
    specific hooks won’t be executed. 
    Consider that the StartupHook() did not yet run when the Pre-Start Task is executed. 
     
     
     
     
     
    Caution 
    If the Pre-Start Task is used, global hooks have to consider that the OS might not be 
      completely initialized. OS APIs which are allowed after normal initialization (e.g. 
    TerminateApplication()) are not allowed within global hooks, if the error occurred in the 
    Pre-Start Task. 
     
     
     
     
     
    Caution 
    If the ProtectionHook() is triggered within the Pre-Start Task, the OS ignores its return 
      value. The only valid return value is PRO_SHUTDOWN. 
     
     
     
    3.8.4 
    Dependencies 
    This feature is of significance in SC3 and SC4 system with active memory protection. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    96 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    3.9 
    X-Signals 
    3.9.1 
    Description 
    MICROSAR OS uses cross core signaling (X-Signals) to realize API service calls between 
    cores. 
    The next figure shows the basic principles of an X-Signal 
    X-Signal
    Requesting
    Serving
    Core
    Core
    Send Port Queue
    Receive Port Queue
    R/W access
    Read only access
     
    Figure 3-2  X-Signal 
    Whenever a core executes a service API cross core it writes this request into its own send 
    port  queue. Then  it  signals  this  request  by an  interrupt  request  (X-Signal)  to  the  serving 
    core. 
    The serving core reads the request from the send port queue and executes the requested 
    service API. The result of the service API is provided in the receive port queue. 
     
    X-Signals have the following characteristics: 
    >  An X-Signal is a unidirectional request from one core to another (1:1). 
    >  For each core interconnection one X-Signal is needed. 
    >  All accesses to the (sender / receiver) port queues are lock free. 
    >  Queue Sizes must be configured. 
    >  The Queues may be protected by MPU to achieve freedom of interference between 
    cores. 
    >  X-Signals may be configured to offer only a subset of possible cross core API services. 
    Not configured API services are refused to be served. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    97 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    >  The API error codes for cross core API services are extended. 
      Additional error codes for queue handling. 
      Additional error code if the requested service is refused to be served. 
    >  X-Signals can be configured to be synchronous or asynchronous. 
     
    Synchronous X-Signal 
    Asynchronous X-Signal 
    Call behavior 
    After the cross core service API has  After the cross core service API has 
    been requested the requester core 
    been requested the requester core 
    goes into active waiting loop and 
    continues its own program execution.  
    polls for the result from the server 
    core (remote procedure call). 
    Note: During active wait the 
    interrupts are enabled. 
    Error signaling 
    Error handling is induced on the 
    Error handling is induced with the 
    requester core immediately, if the 
    next X-Signal request on the 
    polled API result is not E_OK. 
    requester core, if the result of the 
    previously requested API is not 
    E_OK. 
    Note: Upon potential errors of the 
    previously requested API the current 
    application ID on sender and receiver 
    side meanwhile may have changed. 
    AUTOSAR standard  Compliant to the AUTOSAR 
    Deviation to the AUTOSAR Standard 
    compliance 
    Standard 
    Table 3-2   Comparison between Synchronous and Asynchronous X-Signal 
     
     
    Note 
    Any cross core “getter” APIs e.g. GetTaskState() are always executed with a 
      synchronous X-Signal. 
     
     
     
     
     
    Note 
    The sender core as well as the receiver core may cause protection violations. 
      Protection error handling is performed on the core where the violation is detected. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    98 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
     
     
    Note 
    When a cross core API is induced by an X-Signal, all static error checks (e.g. validity of 
      parameters) are done on the caller side. 
    All dynamic error checks (which depend on runtime states) are executed on the 
    receiver side. 
     
     
     
     
     
    Caution 
    For correct X-Signal function it is essentially that a sender core of an X-Signal must 
      have read access to the receiver core data structure. Especially if the data is mapped 
    into core local RAM. 
    There are some platforms e.g. RH850 which does not grant cross core read access to 
    core local RAM out of reset. Within such platforms it is the duty of the application to set 
    up these cross core read accesses before the OS is started. 
     
     
     
    3.9.1.1 
    Notes on Synchronous X-Signals 
    The priority of the receiver ISR determines which other category 2 ISRs of one core may 
    use cross core API services. 
    Additionally category 2 ISRs may only use cross core API services if they allow nesting. 
    The following table gives an overview. 
    Logical Priority 
    ISR Nesting 
    Synchronous Cross 
    Core API Calls 

    ISR with higher priority than X-Signal priority 
    ISR nesting is allowed  Not allowed 
    ISR with higher priority than X-Signal priority 
    ISR nesting is disabled  Not allowed 
    X-Signal ISR priority 


    ISR with lower priority than X-Signal priority 
    ISR nesting is allowed  Allowed 
    ISR with lower priority than X-Signal priority 
    ISR nesting is disabled  Not allowed 
    Table 3-3   Priority of X-Signal receiver ISR 
     
     
    Caution 
    If the priority and nesting requirements from the previous table are not fulfilled there 
      may be deadlocks within a multicore system! 
     
     
     
    3.9.1.2 
    Notes on Mixed Criticality Systems 
    MICROSAR  OS  checks  application  access  rights  on  sender  and  on  receiver  side.  This 
    increases  isolation  of  safety-critical  parts  in  mixed  criticality  systems  (e.g.  protect  a 
    lockstep core from a non-lockstep core). 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    99 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Consider that these application access checks are not performed for ShutdownAllCores(). 
    Thus  switching  off  the  usage  of  ShutdownAllCores  API  for  non-lockstep  cores  is 
    recommended. This can be done within the X-Signal configuration. 
    3.9.2 
    Activation 
    X-Signals  must  be  configured  explicitly  in  a  multi  core  environment.  See  chapter  4.5  for 
    details. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    100 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.10  Timing Hooks 
    3.10.1  Description 
    MICROSAR OS supports timing measurement and analysis by external tools. Therefor it 
    provides timing hooks. Timing hooks inform the external tools about several events within 
    the OS: 
    >  Activation (arrival) of a task or ISR 
      These allow an external tool to trace all activations of task as well as further arrivals 
    (e.g. setting of an event or the release of a semaphore with transfer to another task. 
      They allow external tools to visualize the arrivals and to measure the time between 
    them in order to allow a schedule-ability analysis. 
    >  Context switch 
      These allow external tools to trace all context switches from task to ISR and back as 
    well as between tasks. So external tools may visualize the information or measure 
    the execution time of tasks and ISRs.  
    >  Locking of interrupts, resources or spinlocks 
      These allow an external tool to trace locks. This is important as locking times of 
    tasks and ISRs influence the execution of other tasks and ISRs. The kind of 
    influence is different for different locks. 
    Within MICROSAR OS code the timing hooks are called. Additionally it provides empty 
    hooks by default. 
    The application may decide to implement any of the hooks by itself. The empty OS default 
    hook is then replaced by the application implemented hook. 
    3.10.2  Activation 
    An  include  header  has  to  be  specified  in  the  attribute  “OsTimingHooksIncludeHeader” 
    located in the “OsDebug” container. 
    3.10.3  Usage 
    The timing hooks may be implemented in the configuration specified header. All available 
    macros are introduced in chapter 5.2.12. 
     
     
    Caution 
    Within the timing hooks trusted access rights are active e.g. access rights to OS 
      variables. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    101 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Note: Protection violations during Timing Hooks 
    If any protection violation occurs during any of the timing hooks the OS will always go 
      into shutdown! 
    The return value of the ProtectionHook (e.g. PRO_TERMINATEAPPL) will be ignored 
    and overwritten by the OS to PRO_SHUTDOWN. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    102 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.11  Kernel Panic 
    If  MICROSAR  OS  recognizes  an  inconsistent  internal  state  it  enters  the  kernel  panic 
    mode. In such cases, the OS does not know how to correctly continue execution. Even a 
    regular shutdown cannot be reached. E.g.: 
    >  The protection hook itself causes errors 
    >  The shutdown hook itself causes errors 
    MICROSAR OS goes into freeze as fast as possible 
    1.  Disable all interrupts 
    2.  Inform the application about the kernel panic by calling the Os_PanicHook() (see 
    5.2.13) 
    3.  Enter an endless loop 
     
     
     
    Caution 

      >  The OS cannot recover from kernel panic. 
    >  ProtectionHook() is not called 
    >  ErrorHook() is not called 
    >  There is no stack switch. The Os_PanicHook() runs on the current active stack 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    103 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.12  Generate callout stubs 
    3.12.1  Description 
    MICROSAR  OS  offers  the  feature  to  generate  the  function  bodies  of  all  configured  OS 
    hook functions (all global hooks and application specific hooks). 
    The function bodies are generated into the file “Os_Callout_Stubs.c”. 
    3.12.2  Activation 
    The Configuration attribute “OsGenerateCalloutStubs” has to be set to TRUE. 
    3.12.3  Usage 
    Once the C-File  has been generated it may be altered by the user.  Code parts between 
    certain  special  comments  are  permanent  and  won’t  get  lost  between  two  generation 
    processes. 
    If  a  hook  is  switched off,  the  corresponding function  body  is  also  removed.  But  the user 
    code (between the special comments) is preserved. Once the hook is switched on again, 
    the preserved user code is also restored. 
     
     
     
    Example 
    FUNC(void, OS_STARTUPHOOK_CODE) StartupHook(void) 
      { 
    /*********************************************************************** 
     * DO NOT CHANGE THIS COMMENT!           <USERBLOCK OS_Callout_Stubs_StartupHook> 
     **********************************************************************/ 
     
       /* user code starts here */ 
       /* code between those comments is preserved even if the file is newly generated  
          Or even if the hook is switched off in the meanwhile */ 
     
    /*********************************************************************** 
     * DO NOT CHANGE THIS COMMENT!           </USERBLOCK> 
     **********************************************************************/ 
     

     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    104 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    3.13  Exception Context Manipulation 
    3.13.1  Description 
    MICROSAR OS offers the feature to read and modify the interrupted context in case of a 
    hardware  exception.  This  feature  shall  be  applied  in  ProtectionHook  in  the  combination 
    with PRO_IGNORE_EXCEPTION as the return value. One typical use case for this feature 
    is to recover from an ECC error in memory. 
    3.13.2  Usage 
    The following figure shows the usage of this feature. 
     
    Figure 3-3  Usage of manipulating exception context 
    Inside  ProtectiohHook  the  user  first  needs  to  call  Os_GetExceptionContext  to  read  the 
    previous  context.  Then  the  context  may  be  investigated  and  modified  according  to  user 
    requirements. For instance, the program counter may be adapted to the instruction, which 
    is  to  be  executed  directly  after  the  exception.  Note  that  the  content  of  the  context  is 
    depending on the platform. In general, the context contains all the processor registers and 
    some other relevant information. More detailed information can be found in the static code, 
    where the type Os_ExceptionContextType is defined. Finally, the modified context can be 
    written  back  via  Os_SetExceptionContext.  When  ProtectionHook  returns  with 
    PRO_IGNORE_EXCEPTION, the processor continues its execution with the manipulated 
    context. 
     
     
    Note 
    Currently this feature is supported on PowerPC and TriCore platform. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    105 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
     
     
    Caution 
    This feature may only be used within ProtectionHook when the error status is either 
      E_OS_PROTECTION_MEMORY or E_OS_PROTECTION_EXCEPTION 
     
     
     
    3.14  Category 0 Interrupts 
    3.14.1  Description 
    MICROSAR  OS  implements  category  0  ISRs  to  have  minimal  interrupt  latency  time 
    especially in SC2 or SC4 systems. This is an extension to the OS standard. 
    3.14.2  Usage 
    3.14.2.1  Implement Category 0 ISRs 
    MICROSAR  OS  offers  a  macro  for  implementing  a  category  0  ISR.  This  is  a  similar 
    mechanism like the macro for a category 2 ISR defined by the AUTOSAR standard. 
    MICROSAR OS abstracts the needed compiler keywords. 
     
     
    Implement a category 0 ISR 

      OS_ISR0(<MyCategory0ISR>) 


     
     
     
    3.14.2.2  Nesting of Category 0 ISRs 
    Since category 0 ISRs are directly called from interrupt vector table without any OS pro- 
    and epilogue, automatic nesting of category 0 ISRs cannot be supported. 
    The configuration attribute “OsIsrEnableNesting” is ignored for category 0 ISRs. 
    Nevertheless  the  interrupts  may  be  enabled  during  a  category  0  ISR  to  allow  interrupt 
    nesting but OS API functions cannot be used for this purpose. The application has to use 
    compiler intrinsic functions or inline assembler statements. 
     
     
    Example 
    OS_ISR0(<MyCategory0ISR>) 
      { 
       __asm(EI); /* enable nesting of this ISR */ 
     
       __asm(DI); /* disable nesting before leaving the function */ 

     
     
     
    3.14.2.3  Category 0 ISRs before StartOS 
    There  may  be  the  need  to  activate  and  serve  category  0  ISRs  before  the  OS  has  been 
    started. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    106 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    The following sequence should be implemented: 
    >  Call Os_InitMemory 
    >  Call Os_Init (within the function the basic interrupt controller settings are initialized 
    e.g. priorities of interrupt sources). 
    >  Enable the interrupt sources of category 0 ISRs by directly manipulating the control 
    registers in the interrupt controller. 
    >  Enable the interrupts by directly manipulating the global interrupt flag and / or current 
    interrupt priority to allow the category 0 ISRs 
    3.14.2.4  Locations where category 0 ISRs are locked 
    Category 0 interrupts are disabled OS internally for very short times only. 
    The following list mentions the locations of these locks: 
    >  Inside APIs that cause a context switch e.g. TerminateTask 
    >  Partial termination due to exception handled by ProtectionHook 
    >  On Interrupt, Exception and Trap entry and return 
    >  OS initialization routines inside Os_Init and StartOS 
    3.14.3  Notes on Category 0 ISRs 
     
     
    Expert Knowledge 

      On platforms which have no automatic stack switch upon interrupt request there will be 
    no stack switch at all if a category 0 ISR occurs. Thus the stack consumption of a 
    category 0 ISR should be added to all stacks which can be consumed by category 0 
    ISRs (see 2.3 for an overview). 
     
     
     
     
     
    Expert Knowledge 

      Category 0 ISRs are consuming timing protection budgets (execution budgets and 
    locking times) of the interrupted Task or category 2 ISR 
     
     
     
     
     
    Note 
    Although the interrupt priorities are initialized by MICROSAR OS there is no API to 
      enable or acknowledge category 0 ISRs. The interrupt control registers have to be 
    accessed directly. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    107 
    based on template version 6.0.1 









    Technical Reference MICROSAR OS 
     
     
    Caution 
    If the timing protection interrupt occurs during the runtime of a category 0 ISR, its 
      execution (the timing protection violation handling/protection hook) is delayed until the 
    category 0 ISR has finished. 
     
     
     
     
     
    Caution 
    MICROSAR OS does not allow OS API usage within category 0 ISRs. 
      If any OS API is called anyway, MICROSAR OS is not able to detect this and the called 
    API may not work as expected. 
     
     
     
     
     
    Caution 
    Category 0 ISRs are always executed with trusted rights on supervisor level. 
     
     
     
     
     
     
    Caution 
    A category 0 ISR may never lower the interrupt priority of the CPU or the interrupt 
      controller. 
     
     
     
     
     
    Caution 
    Category 0 ISRs may still occur in case of a shutdown of the OS or even in case the 
      OS has entered the panic hook. 
     
     
     
     
     
    Caution 
    Be aware that a category 0 ISR will interrupt category 2 ISRs even if they are 
      configured to be non-nestable! 
     
     
     
     
     
    Caution 
    If the owner application of a category 0 ISR is terminated for any reason, assigned 
      category 0 ISRs are not disabled. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    108 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Caution 
    The macro “OS_ISR0” abstracts the appropriate compiler keyword for implementing 
      the interrupt service routine. Thus the compiler generates code which safes and restore 
    a subset of the general purpose registers. 
    In certain usecases e.g. usage of the FPU or nested interrupts it may require the user 
    application to save and restore more registers. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    109 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    3.15  Floating Point Context Extension 
    3.15.1  Description 
    If several tasks or ISRs use FPU operations, there is the need to save 
    and restore dedicated FPU registers upon context switches. 
    e.g. If a task, which uses the FPU, is preempted by another task or ISR which also uses 
    the FPU as well. 
     
    MICROSAR OS offers the feature to configure save and restoration of the related floating-
    point registers upon context switch. 
    3.15.2  Usage 
    The parameter OsFpuUsage determines the scale of the feature: 
    >  ALL: Dedicated FPU registers are saved upon each context switch 
    >  INDIVIDUAL: Dedicated FPU registers are saved only for selected tasks or ISRs 
    >  NONE: No dedicated FPU registers are saved upon context switches 
    The FPU configuration must be already set up by the user for each core before Os_Init() is 
    called. 
     
     
    Note 
    On platforms with dedicated FPU registers the OsFpuUsage values ALL and INDIVIDUAL 
      require additional memory and runtime for FPU context handling. 
    These platforms are: 
    >  ARM Cortex-A 
    >  ARM Cortex-R 
    >  ARM Cortex-M 
    >  Power PC 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    110 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    3.16  User defined processor state 
    MICROSAR OS offers the user the possibility to change the processor state according to 
    his needs by altering the flags which are NOT under control of the OS.  
    The OS never changes such flags but it saves and restores them during a context switch. 
     
     
    Note 
    State register flags which are under control of the OS can be looked up in the 
      corresponding platform HSI chapter (see 4.2). 
     
     
     
    3.17  Interrupt Mapping 
    3.17.1  Description 
    MICROSAR OS offers the user the possibility to map certain interrupts to a hardware 
    defined type.  
    These interrupts are routed to the respective hardware specific interrupt controller. 
     
     
    Note 
    Currently this feature is only supported on TriCore platform and ARM platform 
      derivative Traveo and Traveo2 families. 
     
     
     
    3.17.2  Usage 
    The parameter OsIsrInterruptMapping is used to map an ISR to a supported interrupt type. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    111 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4  Integration 
    4.1 
    Compiler Optimization Assumptions 
    MICROSAR OS makes the following assumptions for compiler optimization: 
    >  Inlining of functions is active 
    >  Not used functions are removed 
    >  If statements with a constant condition (due to configuration) are optimized 
    4.1.1 
    Compile Time 
    To shorten the compile time of the OS the following measures can be taken within the OS 
    configuration: 
    Systems without active memory 
    Set “OsGenerateMemMap” to “EMPTY” 
    protection (SC1/SC2) 
    Systems with memory protection 
    Set “OsGenerateMemMap” to “COMPLETE” and 
    (SC3/SC4) 
    "OsGenerateMemMapForThreads” to “FALSE” 
     
    4.2 
    Hardware Software Interfaces (HSI) 
    The  following  chapter  describes  the  Hardware-Software  Interface  for  the  supported 
    processor families of the MICROSAR OS. 
    The HSI describes all hardware registers which are used by the OS. Such registers must 
    not be altered by user software. 
    Included  within  the  HSI  is  the  context  of  the  OS. The  context  is  the  sum  of  all  registers 
    which are preserved upon a task switch and ISR execution. 
    Additionally platform specific characteristics of the OS are described here. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    112 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.2.1 
    TriCore Aurix Family 
    4.2.1.1 
    Context 
      A0-A15 
      D0-D15 
      PSW 
      PCXI 
      DPR0L, DPR0H 
     
     
    Note 
    The register A8 is exclusively used by the OS to hold the pointer to the current thread. 
      Thus any addressing modes which would use A8 register are not possible. 
     
     
     
    4.2.1.2 
    Core Registers 
      ICR 
      SYSCON 
      PCXI 
      FCX 
      LCX 
      PSW 
      PC 
      DBGSR 
      DPRxL, DPRxH 
      CPRxL, CPRxH 
      DPREx 
      DPWEx 
      CPXEx 
    4.2.1.3 
    Interrupt Registers 
      INT_SRC0 – INTSRC255 (Aurix TC2xx) 
      INT_SRC0 – INTSRC1023 (Aurix TC3xx) 
    4.2.1.4 
    GPT Registers 
      T2, T3, T6 
      T2CON, T3CON, T6CON 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    113 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
      CAPREL 
    4.2.1.5 
    STM Registers 
      TIM0, TIM5, TIM6 
      CMCON 
      CAP 
      CMP0, CMP1 
    4.2.1.6 
    Aurix Special Characteristics 
      The exception handler for trap class 1 is implemented by the OS 
      The exception handler for trap class 6 is implemented by the OS 
     
     
    Caution 

      The TriCore Hardware enforces that a configured MPU region must be followed by at 
    least 15 padding bytes before the next region may be started. 
    MICROSAR OS obey to this rule within the generated linker scripts. For other 
    additional configured MPU regions the user has to take care to fulfill this requirement 
     
     
     
    Start Address of MPU Region
    End Address of MPU Region
    At least 15 padding bytes
    Start Address of adjacent MPU Region
    End Address of adjacent MPU Region
     
    Figure 4-1  Padding bytes between MPU regions 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    114 
    based on template version 6.0.1 






    Technical Reference MICROSAR OS 
     
     
    Caution 
    Due to MPU granularity all start addresses and end addresses of configured MPU 
      regions must be a multiple of 8. 
    MICROSAR OS programs the MPU to grant access to the memory region between 
    start address and end address. 
    >  Access to configured start address itself is granted 
    >  Access to configured end address is prohibited 
     
     
     
     
     
    Caution 
    MICROSAR OS does not use the System MPU to achieve freedom of interference 
      between cores. 
    This has to be done by the application. 
    The system MPU has to be initialized by a lockstep core. It must not be accessed by 
    non-lockstep cores. 
     
     
     
     
     
    Note 
    All stack sizes shall be configured to be a multiple of 8 
     
     
     
     
     
     
    Expert Knowledge 
    For proper context management exception handling the LCX should be initialized 
      during startup code that it does not point to the last available CSA. 
    In this way some CSAs are reserved which can be used within the context exception 
    handling for further function calls. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    115 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Caution with HighTec (GNU) Compiler 
    The interrupt vector table (used in BIV) and exception vector table (used in BTV) must 
      be aligned manually in the user linker script. 
    The following example shows how the interrupt vector table (of Core0) can be included 
    and aligned to a 0x2000 byte boundary: 
    . = ALIGN(8192); 
    #define OS_LINK_INTVEC_CODE 
    #include "Os_Link_Core0.ld" 
    The following example shows how the exception vector table (of Core0) can be 
    included and aligned to a 0x100 byte boundary: 
    . = ALIGN(256); 
    #define OS_LINK_EXCVEC_CODE 
    #include "Os_Link_Core0.ld" 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    116 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.2.1.7 
    PSW handling 
    PSW.S bit handling 
    MICROSAR OS sets the safety task identifier bit to 1 for trusted 
    software parts and to 0 for non-trusted software parts. 
    PSW.IS bit handling 
    MICROSAR OS sets the interrupt stack bit to 1. 
    Thus automatic hardware stack switch is not supported. 
    PSW.GW bit handling 
    MICROSAR OS sets the global address register write permission to 0. 
    Write permission to A0, A1, A8 and A9 are not allowed. 
    PSW.CDE bit handling 
    MICROSAR OS sets the call depth enable bit to 1 upon start of a 
    thread. 
    Call depth counting is enabled. 
    PSW.CDC bits handling  MICROSAR OS sets the call depth counter to 1 upon start of a thread. 
     
    4.2.1.8 
    Configuration of Interrupt Sources 
    Special care must be taken when configuring the attribute “OsIsrInterruptSource”. 
    Within the TriCore platform this attribute specifies the offset of the Interrupt Router SRC 
    register of a specific interrupt source. 
    The offset is relative to the interrupt router register base address and must be specified as 
    16-bit value. 
     
     
    Caution 
    The offset must always be a multiple of four. During OS initialization, an exception is 
     
    raised if the offset is not a multiple of four. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    117 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.2 
    RH850 Family 
    4.2.2.1 
    Context 
      R1 ... R31 
      PC 
      PSW 
      PMR 
      LP 
      SP 
      EIPC, EIPSW 
      FPSR, FPEPC 
      ASID 
      MPLA0, MPUA0 
    4.2.2.2 
    Core Registers 
      PC 
      PSW 
      PMR 
      LP 
      SP 
      ASID 
      SCCFG 
      SCBP 
      EIPC 
      EIPSW 
      EIWR 
      FPSR 
      FPEPC 
      EBASE 
      INTBP 
      INTCFG 
      CTPC 
      EIIC 
      FEIC 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    118 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
      FEPC 
      FEPSW  
      HTCFG0 
     
     
     
    Note 

      The register EIWR is exclusively used by the OS to hold the pointer to the current 
    thread. 
     
     
     
    4.2.2.3 
    MPU Registers 
      MPM 
      MPRC 
      MPLA0 ... MPLA15 
      MPUA0 ... MPUA15 
      MPAT0 ... MPAT15 
    4.2.2.4 
    INTC Registers 
      EIC0 ... EIC511 
      IBD0 … IBD511 
      FEINTFMSK0 
      FEINTFMSK1 
    4.2.2.5 
    Inter Processor Interrupt Control Registers 
      IPIR_CH0 
      IPIR_CH1 
      IPIR_CH2 
      IPIR_CH3 
    4.2.2.6 
    Timer TAUJ Registers 
      TAUJnCDR 
      TAUJnCNT 
      TAUJnCMUR 
      TAUJnCSR 
      TAUJnCSC 
      TAUJnTE 
      TAUJnTE0 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    119 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
      TAUJnTE1 
      TAUJnTS 
      TAUJnTS0 
      TAUJnTS1 
      TAUJnTT 
      TAUJnTT0 
      TAUJnTT1 
      TAUJnTO 
      TAUJnTO0 
      TAUJnTO1 
      TAUJnTOE 
      TAUJnTOE0 
      TAUJnTOE1 
      TAUJnTOL 
      TAUJnTOL0 
      TAUJnTOL1 
      TAUJnRDT 
      TAUJnRDT0 
      TAUJnRDT1 
      TAUJnRSF 
      TAUJnRSF0 
      TAUJnRSF1 
      TAUJnRSF2 
      TAUJnCMOR 
      TAUJnTPS 
      TAUJnTPS0 
      TAUJnBRS 
      TAUJnBRS0 
      TAUJnBRS1 
      TAUJnTOM 
      TAUJnTOM0 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    120 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
      TAUJnTOM1 
      TAUJnTOC 
      TAUJnTOC0 
      TAUJnTOC1 
      TAUJnRDE 
      TAUJnRDE0 
      TAUJnRDE1 
      TAUJnRDM 
      TAUJnRDM0 
      TAUJnRDM1 
    4.2.2.7 
    Timer STM Registers 
      STMnCKSEL 
      STMnTS 
      STMnTT 
      STMnCSTR 
      STMnSTR 
      STMnSTC 
      STMnIS 
      STMnRM 
      STMnCNT0L 
      STMnCNT0H 
      STMnCMP0AL 
      STMnCMP0AH 
      STMnCMP0BL 
      STMnCMP0BH 
      STMnCMP0CL 
      STMnCMP0CH 
      STMnCMP0DL 
      STMnCMP0DH 
      STMnCNT1 
      STMnCMP1A 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    121 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
      STMnCMP1B 
      STMnCMP1C 
      STMnCMP1D 
      STMnCNT2 
      STMnCMP2A 
      STMnCMP2B 
      STMnCMP2C 
      STMnCMP2D 
      STMnCNT3 
      STMnCMP3A 
      STMnCMP3B 
      STMnCMP3C 
      STMnCMP3D 
    4.2.2.8 
    Timer OSTM Registers 
      OSTMnCMP 
      OSTMnCNT 
      OSTMnTO 
      OSTMnTOE 
      OSTMnTE 
      OSTMnTS 
      OSTMnTT 
      OSTMnCTL 
      OSTMnEMU 
    4.2.2.9 
    RH850 Special Characteristics 
     
     
    Note 

      >  The exception handler for TRAP1 (offset = 0x50) is implemented by the OS. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    122 
    based on template version 6.0.1 








    Technical Reference MICROSAR OS 
     
     
    Note 

      In SC3 / SC4 systems 
    >  The exception handler for TRAP0 (offset = 0x40) is implemented by the OS. 
    >  The exception handler for MIP/MDP (offset = 0x90) is implemented by the OS. 
     
     
     
     
     
    Caution 

      The MPU in RH850 has a granularity of 4 bytes. Each data section must have 4 bytes 
    address alignement. 
     
     
     
     
     
    Caution 

      Due to MPU granularity the start address of any configured MPU region must be a 
    multiple of 4 bytes. 
    The end address of any configured MPU region must be the address of the last valid 
    Byte of the section. 
    MICROSAR OS programs the MPU to grant access to the memory region from start 
    address and end address. 
     
     
     
     
     
    Note 
    All stack sizes shall be configured to be a multiple of 4 bytes. 
     
     
     
     
     
     
    Note 

      Tiny data area (TDA) and zero data area (ZDA) addressing are not supported. 
     
     
     
     
     
    Note 

      For multicore-core derivatives, the stack used before StartOS should be linked into the 
    respective core local RAM areas. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    123 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    4.2.2.10  PSW Register Handling 
    PSW.EBV 
    MICROSAR OS sets PSW.EBV to 1 upon Os_Init(). 
    PSW.UM 
    MICROSAR OS sets PSW.UM to 0 for trusted software parts and to 1 for non-
    trusted software parts. 
    PSW.NP 
    MICROSAR OS sets PSW.NP to 1 to disable FE level interrupts and to 0 to 
    enable FE level interrupts. 
    PSW.ID 
    MICROSAR OS sets PSW.ID to 1 to disable EI level interrupts and to 0 to 
    enable EI level interrupts. 
    PSW.CU0 
    MICROSAR OS sets PSW.CU0  to 1 in order to support FPU. 
     
    4.2.2.11  Instructions 
     
     
     
    Caution 
    > The instructions "trap 16" … “trap 31” used for TRAP1 are exclusively used by the 
      OS. 
     
     
     
     
     
    Caution 

      In SC3 / SC4 systems 
    >  The instructions "trap 0" … “trap 15” used for TRAP0 are exclusively used by the 
    OS. 
    >  The instruction "syscall" is not supported and therefore shall not be used. 
     
     
     
    4.2.2.12  Exception and Interrupt Cause Address 
     
     
    Note
     
      The exception and interrupt cause address from EIPC and FEPC is stored in register 
    CTPC when unhandled EIINT, unhandled SYSCALL, MIP/MDP exception (SC3/SC4) 
    or unhandled core exception is reported. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    124 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.3 
    Power PC Family 
     
    4.2.3.1 
    Context 
      R2 
      R13-R31 
      PID 
      SP 
      PC 
      LR 
      MSR 
      INTC_CPR[0|1|2] 
      SPEFSCR5 
     
    4.2.3.2 
    Core Registers 
      SPRG0, SPRG1 
      SRR0, SRR1 
      IVPR 
      PIR 
      SIR5 
      IVOR0 – 355 
     
    4.2.3.3 
    Interrupt Registers 
      INTC_BCR5 
      INTC_MCR5 
      INTC_CPRn 
      INTC_IACKRn 
      INTC_EOIRn 
      INTC_SSCIRn 
      INTC_PSRn 
     
     
                                                
    5 Only used if the register is available on hardware. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    125 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.3.4 
    PIT Registers 
      PIT_MCR 
      PIT_LDVALn 
      PIT_CVALn 
      PIT_TCTRLn 
      PIT_TFLGn 
     
    4.2.3.5 
    STM Registers 
      STM_CR 
      STM_CNT 
      STM_CCRn 
      STM_CIRn 
      STM_CMPn 
     
    4.2.3.6 
    MPU Registers 
    Core MPU 
    System MPU 
    >  CMPU_MAS0 
    >  SMPU_CESR0 
    >  CMPU_MAS1 
    >  SMPU_RGDn_WRDn  
    >  CMPU_MAS2 
    (number of used region words depends on 
    system MPU hardware) 
    >  CMPU_MAS3 
    >  CMPU_MPU0CSR0 
     
    4.2.3.7 
    SEMA4 Registers 
      SEMA42_GATE0 
     
    4.2.3.8 
    MC_ME Registers 
      MC_ME_MCTL 
      MC_MC_CCTLn 
      MC_ME_CADDRn 
     
    4.2.3.9 
    SSCM Registers 
      SSCM_DPMBOOT 
      SSCM_DPMKEY 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    126 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    4.2.3.10  Power PC Special Characteristics 
      The exception handler for Machine check is implemented by the OS  
      The exception handler for Data Storage is implemented by the OS  
      The exception handler for Instruction Storage is implemented by the OS  
      The exception handler for External Input is implemented by the OS  
      The exception handler for Program is implemented by the OS  
      The exception handler for System call is implemented by the OS 
     
     
     
    Note 
    The register SPRG0 is exclusively used by the OS to hold the identifier of the current 
      thread. 
    The register SPRG1 is exclusively used by the OS to hold the address of the 
    INTC_CPR register. 
    The register SEMA42_GATE0 is exclusively used by the OS to provide mutual 
    exclusion in multicore systems for spinlock handling. 
    Thus these registers must not be used otherwise. 
     
     
     
     
     
    Caution 

      Due to MPU granularity all start addresses of configured MPU regions for the 
    SystemMPU must be a multiple of 32. The configured end addresses must be a 
    multiple of 32 minus one byte. 
    MICROSAR OS programs the MPU to grant access to the memory region between 
    start address and end address. 
    >  Access to configured start address and end address itself is granted 
     
     
     
     
     
    Note 
    For the CoreMPU, no restrictions on start address and end address apply. 
      MICROSAR OS programs the MPU to grant access to the memory region between 
    start address and end address. 
    >  Access to configured start address and end address itself is granted 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    127 
    based on template version 6.0.1 








    Technical Reference MICROSAR OS 
     
     
    Note 
    All stack sizes shall be configured to be a multiple of 8 
     
     
     
     
     
     
    Caution 

      MICROSAR OS assumes that Power PC multi core derivatives are booted as a master 
    / slave system (as described in 2.15.4). 
     
     
     
     
     
    Note 

      For System MPU regions only the format FMT1 is supported to setting up the 
    SMPUx_RGDn_WORD2. 
     
     
     
     
     
    Note 

      MICROSAR OS does not change the target chip mode of register MC_ME_MCTL. 
    Furthermore, user software may change this register. 
     
     
     
     
     
    Caution 

      If the user software changes the target chip mode of register MC_ME_MCTL, it must 
    ensure that all running cores are allowed to run in the new target chip mode by setting 
    appropriate flags in MC_ME_CCTLn. 
     
     
     
     
     
    Note 
    Only 32-Bit GPR registers are saved during context switch. 
     
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    128 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.3.11  Derivative Special Characteristics 
    The following table shows special characeristics of the MICROSAR OS for different Power 
    PC derivative groups. 
    MPC564xL 
    >  Only LS-Mode supported 
    MPC567xK 
    >  Only LS-Mode supported 
    MPC577xC 
    >  Stacks for physical core 0 need to be mapped to PRAMC_0 
    >  Stacks for physical core 0 need to be mapped to PRAMC_1 
     
    4.2.3.12  MSR Handling 
    MSR.SPV bit handling 
    MICROSAR OS sets the SPV bit to 1 upon start of a thread. 
    MSR.EE bit handling 
    MICROSAR OS sets the external interrupt enable bit to 0 for non-
    interruptible threads without TimingProtection supervision, and to 1 for 
    interruptible or TimingProtection supervised threads. 
    MSR.PR bit handling 
    MICROSAR OS sets the problem state bit to 0 for trusted software 
    parts and to 1 for non-trusted software parts. 
    MSR.ME bit handling 
    MICROSAR OS sets the machine check enable bit to 1. 
    Asynchronous Machine Check interrupts are enabled. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    129 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.2.4 
    ARM Family 
    4.2.4.1 
    Cortex-R derivatives 
     
     
     
    Cortex-R Limitations  
    MICROSAR OS does not support the configuration of ISRs with parameter 
      OsIsrEnableNesting = TRUE in combination with timing protection (SC2 or SC4). 
     
     
     
    4.2.4.1.1 
    Generic Cortex-R 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    Context FPU Register 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    130 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.2 
    Traveo Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  IRQPLM 
    Context FPU Register 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
    Bootrom Registers 
    >  UNLOCK 
    >  CNFG 
    >  UNDEFINACT 
    >  SVCINACT 
    >  PABORTINACT 
    >  DABORTINACT 
    INTC Registers 
    >  NMIST 
    >  IRQST 
    >  NMIVAn 
    >  IRQVAn 
    >  NMIPLn 
    >  IRQPLn 
    >  NMIS 
    >  NMIR 
    >  IRQSn 
    >  IRQRn 
    >  IRQCESn 
    >  IRQCERn 
    >  NMIHC 
    >  IRQHC 
    >  UNLOCK 
    FRT Registers 
    >  TCDT 
    >  TCCS 
    >  TCCSC 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    131 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    >  TCCSS 
    Output Compare Registers 
    >  OCCP0, OCCP1 
    >  OCS 
    >  OCSC 
    >  OCSS 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    132 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.3 
    Ultrascale Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  ICCPMR 
    Context FPU Registers 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
    INTC Registers 
    >  ICCICR 
    >  ICCBPR 
    >  ICCIAR 
    >  ICCEOIR 
    >  ICDDCR 
    >  ICDISRn 
    >  ICDISERn 
    >  ICDICERn 
    >  ICDISPRn 
    >  ICDICPRn 
    >  ICDIPRn 
    >  ICDIPTRn 
    >  ICDSGIR 
    TTC Registers 
    >  Clock_Control 
    >  Counter_Control 
    >  Counter_Value 
    >  Interval_Counter 
    >  Match_1_Counter 
    >  Match_2_Counter 
    >  Match_3_Counter 
    >  Interrupt_Register 
    >  Interrupt_Enable 
    >  Event_Control_Timer 
    >  Event_Register 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    133 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.4 
    TI AR 16xx 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    Context FPU Registers 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
    INTC Registers 
    >  FIRQPR 
    >  CHANNCTRL 
    >  REQENASET 
    >  REQENACLR 
    >  INTREQ 
    RTI Registers 
    >  Global Control 
    >  Timebase Control 
    >  Capture Control  
    >  Compare Control 
    >  Counter 0/1 
    >  Up Counter 0/1 
    >  Compare Up Counter 0/1 
    >  Capture Free Running Counter 0/1 
    >  Capture Up Counter 0/1 
    >  Compare 0/1/2/3 
    >  Update Compare 0/1/2/3 
    >  Timebase Low Compare 
    >  Timebase High Compare 
    >  Set Interrupt Enable 
    >  Clear Interrupt Enable 
    >  Interrupt Flag 
    Software Interrupt 
    >  MSS_RCM_SWIRQA 
    Registers 
    >  MSS_RCM_SWIRQB 
    >  MSS_RCM_SWIRQC 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    134 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.5 
    TI TMS570x 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    Context FPU Registers 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
    INTC Registers 
    >  FIRQPR 
    >  CHANNCTRL 
    >  REQENASET 
    >  REQENACLR 
    >  INTREQ 
    RTI Registers 
    >  Global Control 
    >  Timebase Control 
    >  Capture Control  
    >  Compare Control 
    >  Counter 0/1 
    >  Up Counter 0/1 
    >  Compare Up Counter 0/1 
    >  Capture Free Running Counter 0/1 
    >  Capture Up Counter 0/1 
    >  Compare 0/1/2/3 
    >  Update Compare 0/1/2/3 
    >  Timebase Low Compare 
    >  Timebase High Compare 
    >  Set Interrupt Enable 
    >  Clear Interrupt Enable 
    >  Interrupt Flag 
    Software Interrupt 
    >  SSIR1 
    Registers 
    >  SSIVEC 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    135 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.6 
    Renesas R-Car H3 (Cortex-R7) 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  ICCPMR 
    Context FPU Registers 
    >  S0-S31 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  TPIDRURO 
    MPU Registers 
    >  DRBAR 
    >  DRSR 
    >  DRACR 
    >  RGNR 
    Core GIC Registers 
    >  ICCICR 
    >  ICCPMR 
    >  ICCBPR 
    >  ICCIAR 
    >  ICCEOIR 
    >  ICCRPR 
    >  ICCHPIR 
    >  ICCIIDR 
    >  ICDDCR 
    >  ICDICTR 
    >  ICDIIDR 
    >  ICDISERn 
    >  ICDICERn 
    >  ICDISPRn 
    >  ICDICPRn 
    >  ICDABRn 
    >  ICDIPRn 
    >  ICDIPTRn 
    >  ICDICFRn 
    >  PPISR 
    >  SPISRn 
    >  ICDSGIR 
    >  PIDR0 ... PIDR4 
    >  CIDR0 ... CIDR3 
    INTC-RT Registers 
    >  GICC_CTLR 
     
    >  GICC_PMR 
    >  GICC_BPR 
    >  GICC_IAR 
    >  GICC_EOIR 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    136 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    >  GICC_RPR 
    >  GICC_HPPIR 
    >  GICC_ABPR 
    >  GICC_AIAR 
    >  GICC_AEOIR 
    >  GICC_AHPPIR 
    >  GICC_APR0 
    >  GICC_NSAPR0 
    >  GICC_IIDR 
    >  GICC_DIR 
    >  GICD_CTLR 
    >  GICD_TYPER 
    >  GICD_IIDR 
    >  GICD_IGROUPRn 
    >  GICD_ISENABLERn 
    >  GICD_ICENABLERn 
    >  GICD_ISPENDRn 
    >  GICD_ICPENDRn 
    >  GICD_ISACTIVERn 
    >  GICD_ICACTIVERn 
    >  GICD_IPRIORITYRn 
    >  GICD_ITARGETSRn 
    >  GICD_ICFGRn 
    >  GICD_PPISR 
    >  GICD_SPISRn 
    >  GICD_SGIR 
    >  GICD_CPENDSGIRn 
    >  GICD_SPENDSGIRn 
    >  GICD_PIDR0 ... GICD_PIDR7 
    >  GICD_CIDR0 ... GICD_CIDR3 
    Timer Unit (TMU) 
    >  TSTRm (m = 0 ... 4) 
    Registers 
    >  TCORn (n = 0 ... 14) 
    >  TCNTn (n = 0 ... 14) 
    >  TCRn (n = 0 ... 14) 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    137 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.1.7 
    PSR Handling 
    PSR.M bit handling 
    MICROSAR OS sets the mode state bits according to the trusted state 
    of the running software parts. 
    PSR.T bit handling 
    The Thumb execution state bit is left unchanged during runtime. This 
    bit is controlled by hardware. 
    PSR.F bit handling 
    MICROSAR OS will alter the I-Bit to enable or disable FIQ interrupts 
    during runtime. 
    PSR.I bit handling 
    MICROSAR OS will alter the I-Bit to enable or disable IRQ interrupts 
    during runtime. 
    PSR.A bit handling 
    MICROSAR OS lefts the A-Bit unchanged after reset. If the hadware 
    supports imprecise data exceptions, this bit is part of the context and 
    could be altered during context switch (e.g. Killing). 
    PSR.J bit handling 
    The Jazelle execution state bit is left unchanged during runtime. This 
    bit is controlled by hardware. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    138 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.2 
    Cortex-A derivatives 
     
    Generic Cortex-A 
    iMX6 Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    Context FPU Register 
    >  S0-S64 
    >  FPSCR 
    >  FPEXC 
    Core Registers 
    >  SCTLR 
    >  VBAR 
    INTC Registers 
    >  ICCICR 
    >  ICCBPR 
    >  ICCIAR 
    >  ICCEOIR 
    >  ICDDCR 
    >  ICDISRn 
    >  ICDISERn 
    --- 
    >  ICDICERn 
    >  ICDISPRn 
    >  ICDICPRn 
    >  ICDIPRn 
    >  ICCPMR 
    >  ICDIPTRn 
    >  ICDSGIR 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    139 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.3 
    Cortex-M derivatives 
     
    4.2.4.3.1 
    Generic Cortex-M 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  CONTROL  
    >  BASEPRI 
    Core Registers 
    >  MPIDR 
    >  PRIMASK 
    >  FAULTMASK 
    >  CCR 
    >  SHPR1 
    >  SHPR2 
    >  SHPR3 
    >  SHCSR 
    >  SYST_CSR 
    >  SYST_RVR 
    >  SYST_CVR 
    >  SYST_CALIB 
    Core MPU 
    >  MPU_TYPE 
    Registers 
    >  MPU_CTRL 
    (Optional) 
    >  MPU_RNR 
    >  MPU_RBAR 
    >  MPU_RASR 
    INTC Registers 
    >  SHPR 
    >  NVIC_ISER 
    >  NVIC_ICER 
    >  NVIC_ISPR 
    >  NVIC_ICPR 
    >  NVIC_IABR 
    >  NVIC_IPR 
    >  ICSR 
    >  VTOR 
    >  STIR 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    140 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.3.2 
    ATSAMv7x Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  CONTROL  
    >  BASEPRI 
    Core Registers 
    >  MPIDR 
    >  PRIMASK 
    >  FAULTMASK 
    >  CCR 
    >  SHPR1 
    >  SHPR2 
    >  SHPR3 
    >  SHCSR 
    >  SYST_CSR 
    >  SYST_RVR 
    >  SYST_CVR 
    >  SYST_CALIB 
    Core MPU 
    >  MPU_TYPE 
    Registers 
    >  MPU_CTRL 
    >  MPU_RNR 
    >  MPU_RBAR 
    >  MPU_RASR 
    INTC Registers 
    >  SHPR 
    >  NVIC_ISER 
    >  NVIC_ICER 
    >  NVIC_ISPR 
    >  NVIC_ICPR 
    >  NVIC_IABR 
    >  NVIC_IPR 
    >  ICSR 
    >  VTOR 
    >  STIR 
    RTT Registers 
    >  RTT_MR 
    >  RTT_SR 
    >  RTT_AR 
    >  RTT_VR 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    141 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.3.3 
    S32K14x Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  CONTROL  
    >  BASEPRI 
    Core Registers 
    >  MPIDR 
    >  PRIMASK 
    >  FAULTMASK 
    >  CCR 
    >  SHPR1 
    >  SHPR2 
    >  SHPR3 
    >  SHCSR 
    >  SYST_CSR 
    >  SYST_RVR 
    >  SYST_CVR 
    >  SYST_CALIB 
    System MPU 
    >  SMPU_CESR 
    Registers 
    >  SMPU_RGDn_WORD0 
    >  SMPU_RGDn_WORD1 
    >  SMPU_RGDn_WORD2 
    >  SMPU_RGDn_WORD3 
    >  SMPU_RGDAAC0 
    INTC Registers 
    >  SHPR 
    >  NVIC_ISER 
    >  NVIC_ICER 
    >  NVIC_ISPR 
    >  NVIC_ICPR 
    >  NVIC_IABR 
    >  NVIC_IPR 
    >  ICSR 
    >  VTOR 
    >  STIR 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    142 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.3.4 
    TDA2x 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  CONTROL  
    >  BASEPRI 
    Core Registers 
    >  MPIDR 
    >  PRIMASK 
    >  FAULTMASK 
    >  CCR 
    >  SHPR1 
    >  SHPR2 
    >  SHPR3 
    >  SHCSR 
    >  SYST_CSR 
    >  SYST_RVR 
    >  SYST_CVR 
    >  SYST_CALIB 
    INTC Registers 
    >  SHPR 
    >  NVIC_ISER 
    >  NVIC_ICER 
    >  NVIC_ISPR 
    >  NVIC_ICPR 
    >  NVIC_IABR 
    >  NVIC_IPR 
    >  ICSR 
    >  VTOR 
    >  STIR 
    IPU Registers 
    >  CORTEXM4_CTRL_REG 
    >  CORTEXM4_RW_PID1 
    Spinlock Registers 
    >  SPINLOCK_SYSCONFIG 
    >  SPINLOCK_SYSTATUS 
    >  SPINLOCK_LOCK_REG_0 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    143 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.2.4.3.5 
    Traveo 2 Family 
    Context Registers 
    >  R4-R11 
    >  PC 
    >  LR 
    >  SP 
    >  PSR 
    >  CONTROL  
    >  BASEPRI 
    Core Registers 
    >  MPIDR 
    >  PRIMASK 
    >  FAULTMASK 
    >  CCR 
    >  SHPR1 
    >  SHPR2 
    >  SHPR3 
    >  SHCSR 
    >  SYST_CSR 
    >  SYST_RVR 
    >  SYST_CVR 
    >  SYST_CALIB 
    Core MPU 
    >  MPU_TYPE 
    Registers 
    >  MPU_CTRL 
    (Optional) 
    >  MPU_RNR 
    >  MPU_RBAR 
    >  MPU_RASR 
    INTC Registers 
    >  SHPR 
    >  NVIC_ISER 
    >  NVIC_ICER 
    >  NVIC_ISPR 
    >  NVIC_ICPR 
    >  NVIC_IABR 
    >  NVIC_IPR 
    >  ICSR 
    >  VTOR 
    >  STIR 
    >  CPUSS_CM4_INT_CTL 
    >  CPUSS_CM4_INT0_STATUS 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    144 
    based on template version 6.0.1 






    Technical Reference MICROSAR OS 
    4.2.4.4 
    ARM Special Characteristics 
     
      The exception handler for Supervisor Call is implemented by the OS  
      The exception handler for Undefined Instruction is implemented by the OS 
      The exception handler for Prefetch Abort is implemented by the OS 
      The exception handler for Data Abort is implemented by the OS 
     
     
     
    Caution 
    Due to MPU hardware restriction the sizes of MPU regions and stack sizes must be 
      configured with power of 2 values. 
     
     
     
     
     
    Caution 
    The MPU configuration must not contain the regions with the number higher than the 
      number of available MPU regions minus 2. One region with the highest number is 
    always reserved for the stack protection.  
    E.g. if 16 regions are available, only the region numbers from 0 to 14 (inclusive) are 
    allowed. 
     
     
     
     
     
    Caution with UltraScale derivatives 

      The exception vector table of each core must be located in tightly coupled RAM 
    memory at address 0x0. 
    Either the debugger or the startup code has to copy the exception vector table from 
    ROM section “OS_EXCVEC_CORE<Core Id>_CODE” to address 0x0. 
    During OS startup OS code assumes that the exception vector table has already been 
    copied. 
     
     
     
     
     
    Caution with S32K derivatives 
    Region 0 of the System MPU is reserved for debugging functionality and could not be 
      written by the core. This region is not available for user configuration. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    145 
    based on template version 6.0.1 







    Technical Reference MICROSAR OS 
     
     
    Caution with Cortex-M derivatives exception vector table address 

      To avoid memory violations directly after boot phase, the exception vector table has to 
    be linked correctly (derivative specific) by the user linker script. 
    e.g. ATSAMv7 Derivative expects that section OS_INTVEC_CORE<Core Id>_CODE is 
    linked to address 0x00400000 (first available internal flash address). 
     
     
     
     
     
     
    Limitations in TI derivatives with VIM interrupt controller 
    MICROSAR OS has limited interrupt priority support because VIM interrupt controllers 
      do not provide interrupt priority levels: 
      No ISR can be interrupted by another ISR, no matter which category it has 
    configured 
      Interrupt resources disable all ISRs 
      Provided interrupt APIs disable or enable always all ISRs 
     
     
     
     
     
    Caution with GCC compiler 
    If the feature “Stack Usage Measurement” is activated and one of the OS stacks 
      (managed by the OS) is applied before calling Os_Init, then the optimization option 
    tree-loop-distribute-patterns needs to be disabled. 
     
     
     
     
     
    Note for Cortex-M derivatives with GCC compiler 
    The interrupt vector tables are in the sections with the name 
      “<Core_Name>_VectorTable_Section”. These sections need to be 128 bytes aligned. 
     
     
     
     
     
    Caution with TDA2x derivatives 
    MICROSAR OS expects that register CORTEXM4_RW_PID1 is initialized with the 
      physical core id before starting.  
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    146 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    4.3 
    Memory Mapping Concept 
    MICROSAR OS uses the AUTOSAR MemMap mechanism to locate its own variables but 
    also application variables. 
     
     
     
    Note 
    To use the OS memory mapping concept within the AUTOSAR MemMap mechanism 
      the generated OS file “Os_MemMap.h” has to be included into “MemMap.h”. 
    It should be included after the inclusion of the MemMap headers of all other basic 
    software components. 
     
     
     
    4.3.1 
    Provided MemMap Section Specifiers 
    MICROSAR  OS  uses  and  specifies  section  specifiers  as  described  in  the  AUTOSAR 
    specification of memory mapping. All section specifiers have one of the following forms: 
    OS_START_SEC_<SectionType>[_<InitPolicy>][_<Alignment>] 
    OS_STOP_SEC_<SectionType>[_<InitPolicy>][_<Alignment>] 
     
     
     
    Note 

      Due to clarity and understanding this chapter does only refer to section specifiers that 
    shall be handled by the application. 
    The OS internally used section specifiers are not listed here. 
     
     
     
    SectionType 
    InitPolicy 
    Alignment 
    <Callout>_CODE 


    NONAUTOSAR_CORE<Core Id>_CONST 

    UNSPECIFIED 
    NONAUTOSAR_CORE<Core Id>_VAR 
    NOINIT 
    UNSPECIFIED 
    <ApplicationName>_VAR 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <ApplicationName>_VAR_FAST 

    BOOLEAN 
    NOINIT 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <ApplicationName>_VAR_NOCACHE 

    BOOLEAN 
    NOINIT 
    8BIT 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    147 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <ApplicationName>_CONST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <ApplicationName>CONST_FAST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
     
    SectionType 
    InitPolicy 
    Alignment 
    <Task/IsrName>_VAR 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <Task/IsrName>_VAR_FAST 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <Task/IsrName>_CONST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    <Task/IsrName>_CONST_FAST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
     
    SectionType 
    InitPolicy 
    Alignment 
    GLOBALSHARED_VAR 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    148 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    GLOBALSHARED_VAR_FAST 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    GLOBALSHARED_VAR_NOCACHE 

    BOOLEAN 
    NOINIT 
    8BIT 
    ZERO_INIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    GLOBALSHARED_CONST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    GLOBALSHARED_CONST_FAST 

    BOOLEAN 
    8BIT 
    16BIT 
    32BIT 
    UNSPECIFIED 
    APPSHARED_0X<application bitmask>_VAR_NOCACHE 
    NOINIT 
    UNSPECIFIED 
    CORESHARED_0X<core bitmask>_VAR_NOCACHE 
    NOINIT 
    UNSPECIFIED 
    Table 4-1   Provided MemMap Section Specifiers 
     
     
     
    Note 

      The < application bitmask >: Is a bitmask that specifes all OS applications which are 
    sharing the section. 
     
     
     
     
     
    Note 

      The < core bitmask >: Is a bitmask that specifes all cores which are sharing the 
    section. 
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    149 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    4.3.1.1 
    Usage of MemMap Macros 
     
     
    Example 

    #define OS_START_SEC_MyAppl_VAR_FAST_NOINIT_UNSPECIFIED 
      #include “MemMap.h” 
    uint16 MyApplicationVariable; 
    #define OS_STOP_SEC_MyAppl_VAR_FAST_NOINIT_UNSPECIFIED 
    #include “MemMap.h” 
     
    This code snippet puts the user variable into an OS application section. 
     
     
     
    4.3.1.2 
    Resulting sections 
    The usage of the above described macros will result in the following memory sections: 
    SectionType 
    Content / Description 
    OS_CODE 
    >  OS Code 
    OS_INTVEC_CODE 
    >  Interrupt vector table in case the system needs 
    one generic vector table for all cores 
    OS_INTVEC_CORE<Core Id>_CODE 
    >  Interrupt vector table of one specific core 
    OS_EXCVEC_CORE<Core Id>_CODE 
    >  Exception vector table of one core 
    Table 4-2   MemMap Code Sections Descriptions 
    The  resulting  sections  for  callouts  are  generated  in  dependency  of  the  configuration 
    attribute “/MICROSAR/Os/OsOS/OsGenerateMemMap”. 
    OsGenerateMemMap 
    Section 
    Content 
    USERCODE_AND_STAC OS_USER_CORE<Core Id>_CODE 
    >  Code of all Tasks, 
    KS_GROUPED_PER_C
    ISRs and all other 
    ORE 
    user callouts which 
    are mapped on one 
    core. 
    COMPLETE 
    OS_<Callout>_CODE 
    >  Code of one Task or 
    one ISR or one OS 
    Hook or other callouts. 
    Table 4-3   MemMap Callout Code Sections Descriptions 
     
     
     
    Note 

      The MPU may be set up to grant execution from the whole address space. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    150 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    SectionType 
    Content / Description 
    OS_CONST 
    >  OS constant data 
    OS_CONST_FAST 
    >  OS constant data for fast memory 
    OS_INTVEC_CONST 
    >  Interrupt vector table in case the system needs 
    one generic vector table for all cores 
    OS_CORE<Core Id>_CONST 
    >  OS constant data related to one specific core 
    OS_CORE<Core Id>_CONST_FAST 
    >  OS constant data related to one specific for fast 
    memory 
    OS_INTVEC_CORE<Core Id>_CONST 
    >  Interrupt vector table of one specific core 
    OS_EXCVEC_CORE<Core Id>_CONST 
    >  Exception vector table of one core 
    OS_NONAUTOSAR_CORE<Core Id>_CONST  >  OS constant data of a non-AUTOSAR core 
    OS_NONAUTOSAR_CORE<Core 
    >  OS constant data of a non-AUTOSAR core with 
    Id>_CONST_FAST 
    shord addressing 
    OS_GLOBALSHARED_CONST 
    >  Constants which shall be shared among core 
    boundaries 
    OS_GLOBALSHARED_CONST_FAST 
    >  Constants which shall be shared among core 
    boundaries and which use short addressing 
    accesses (e.g. by base address pointer) 
    OS_<Task/IsrName>_CONST 
    >  Thread specific constants 
    OS_<Task/IsrName>_CONST_FAST 
    >  Thread specific constants which use short 
    addressing accesses (e.g. by base address 
    pointer) 
    OS_<ApplicationName>_CONST 
    >  Application specific constants 
    OS_<ApplicationName>_CONST_FAST 
    >  Application specific constants which use short 
    addressing accesses (e.g. by base address 
    pointer) 
    Table 4-4   MemMap Const Sections Descriptions 
     
     
     
    Note 
    The MPU may be set up to grant read access to const sections from all runtime 
      contexts (trusted and non-trusted) 
     
     
     
    Section 

    ent
    on
    C

    OS_VAR_NOCACHE 
    OS global variables. All cores may 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    151 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    OS_VAR_NOCACHE_NOINIT 
    have to access these variables. 
    OS_VAR_FAST_NOCACHE 
    OS_VAR_FAST_NOCACHE_NOINIT 
    OS_CORE<Core Id>_VAR 
    OS core local variables. These 
    variables are never accessed from 
    OS_CORE<Core Id>_VAR_FAST 
    foreign cores. 
    OS_CORE<Core Id>_VAR_NOINIT 
    OS_CORE<Core Id>_VAR_FAST_NOINIT 
    OS_CORE<Core Id>_VAR_NOCACHE 
    OS_CORE<Core Id>_VAR_FAST_NOCACHE 
    OS_CORE<Core Id>_VAR_NOCACHE_NOINIT 
    OS_CORE<Core Id>_VAR_FAST_NOCACHE_NOINIT 
    OS_PUBLIC_CORE<Core Id>_VAR_NOINIT 
    OS core local variables. These 
    variables may also be accessed 
    OS_PUBLIC_CORE<Core Id>_VAR_FAST_NOINIT 
    from foreign cores 
    OS_APPSHARED_0X<application 
    OS optimized spinlock variables. 
    bitmask>_VAR_NOCACHE_NOINIT 
    Only OS applications specified by 
    <application bitmask> have access 
    to them. 
    OS_CORESHARED_0X<core 
    OS Standard/Optimized spinlock 
    bitmask>_VAR_NOCACHE_NOINIT 
    variables. 
    IOC data structures. 
    All cores wich are specified by <core 
    bitmask> have access to them. 
    OS_NONAUTOSAR_CORE<Core Id>_VAR 
    User core local variables of non-
    AUTOSAR cores. Access to these 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_FAST 
    from foreign cores may be allowed. 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_NOINIT 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_FAST_NOINIT 
     
    Section 

    ent
    on
    C

    OS_GLOBALSHARED_VAR 
    User global shared variables. All 
    cores have access to them. 
    OS_GLOBALSHARED_VAR_FAST 
    OS_GLOBALSHARED_VAR_NOINIT 
    OS_GLOBALSHARED_VAR_FAST_NOINIT 
    OS_GLOBALSHARED_VAR_ZERO_INIT 
    OS_GLOBALSHARED_VAR_NOCACHE 
    OS_GLOBALSHARED_VAR_FAST_NOCACHE 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    152 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    OS_GLOBALSHARED_VAR_NOCACHE_NOINIT 
    OS_GLOBALSHARED_VAR_FAST_NOCACHE_NOINIT 
    OS_GLOBALSHARED_VAR_NOCACHE_ZERO_INIT 
    OS_<ApplicationName>_VAR 
    User application private variables. 
    Only application members and 
    OS_<ApplicationName>_VAR_FAST 
    other trusted software may have 
    OS_<ApplicationName>_VAR_NOINIT 
    access to them. 
    OS_<ApplicationName>_VAR_FAST_NOINIT 
    OS_<ApplicationName>_VAR_FAST_ZERO_INIT 
    OS_<ApplicationName>_VAR_NOCACHE 
    OS_<ApplicationName>_VAR_FAST_NOCACHE 
    OS_<ApplicationName>_VAR_NOCACHE_NOINIT 
    OS_<ApplicationName>_VAR_FAST_NOCACHE_NOINIT 
    OS_<ApplicationName>_VAR_NOCACHE_ZERO_INIT 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    153 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    Section 

    ent
    on
    C

    OS_<Task/IsrName>_VAR 
    User thread private 
    variables. Only the owning 
    OS_<Task/IsrName>_VAR_FAST 
    thread and other trusted 
    OS_<Task/IsrName>_VAR_NOINIT 
    software may have 
    OS_<Task/IsrName>_VAR_FAST_NOINIT 
    access to them 
    OS_<Task/IsrName>_VAR_ZERO_INIT 
    OS_BARRIER_CORE<Core Id>_VAR_NOCACHE_NOINIT 
    OS synchronization 
    barriers. Only the OS 
    OS_BARRIER_CORE<Core Id>_VAR_FAST_NOCACHE_NOINIT 
    must have access to 
    them. They will be 
    accessed from all cores 
    OS_CORESTATUS_CORE<Core Id>_VAR_ NOCACHE_NOINIT 
    Startup state of each 
    physical core. Only the 
    OS_CORESTATUS_CORE<Core 
    OS must have access to 
    Id>_VAR_FAST_NOCACHE_NOINIT 
    them. They will be written 
    by the master core and 
    the owning core itself, and 
    read from all cores. 
    Table 4-5   MemMap Variable Sections Descriptions 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    154 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    The  resulting  sections  for  stacks  are  generated  in  dependency  of  the  configuration 
    attribute “/MICROSAR/Os/OsOS/OsGenerateMemMap”. 
    OsGenerateMemMap 
    Section 
    Content 
    USERCODE_AND_STAC OS_STACK_CORE<Core Id>_VAR_NOINIT 
    Contains all stacks of 
    KS_GROUPED_PER_C
    one core. 
    ORE 
    Only the current 
    running software has 
    access to the stack. 
    Software which runs on 
    a foreign core must not 
    have access to it. 
    COMPLETE 
    OS_STACK_<StackName>_VAR_NOINIT 
    Contains one OS 
    stack. 
    Only the current 
    running software has 
    access to the stack. 
    Software which runs on 
    a foreign core must not 
    have access to it. 
    Table 4-6   MemMap Variable Stack Sections Descriptions 
     
     
     
    Notes 
    Sections which contain the keyword “FAST” are intended to be linked into fast RAM. 
      Sections which contain the keyword “NOCACHE” must never be linked into cacheable 
    memory. 
    Sections which contain the keyword “NOINIT” contain non-initialized variables. 
    Sections which contain the keyword “ZERO_INIT” contain zero initialized variables. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    155 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.3.1.3 
    Access Rights to Variable Sections 
    The table shows the recommended access rights to the sections. 
    Section 
     
    n

     
    no 
    re 
    re 
     
    ed

    ore
    re
    t
     
    co 
    co 
    C
     
     
     
    co
    l
     l
    gn
    gn
    rus
    ca
    ca
    rei
    rei
    n t
    Lo
    rustedT
    Lo
    rustedt
    Fo
    rustedt
    Fo
    no
    OS_VAR_NOCACHE 
    OS_VAR_NOCACHE_NOINIT 
    RW 
    RO 
    RW 
    RO 
    OS_VAR_FAST_NOCACHE 
    OS_VAR_FAST_NOCACHE_NOINIT 
    OS_CORE<Core Id>_VAR 
    OS_CORE<Core Id>_VAR_FAST 
    OS_CORE<Core Id>_VAR_NOINIT 
    OS_CORE<Core Id>_VAR_FAST_NOINIT 
    RW 
    RO 
    RO 
    RO 
    OS_CORE<Core Id>_VAR_NOCACHE 
    OS_CORE<Core Id>_VAR_FAST_NOCACHE 
    OS_CORE<Core Id>_VAR_NOCACHE_NOINIT 
    OS_CORE<Core Id>_VAR_FAST_NOCACHE_NOINIT 
    OS_PUBLIC_CORE<Core Id>_VAR_NOINIT 
    RW 
    RO 
    RW 
    RO 
    OS_PUBLIC_CORE<Core Id>_VAR_FAST_NOINIT 
    OS_NONAUTOSAR_CORE<Core Id>_VAR 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_FAST 
    RW 
    RO 
    RW 
    RO 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_NOINIT 
    OS_NONAUTOSAR_CORE<Core Id>_VAR_FAST_NOINIT 
    OS_GLOBALSHARED_VAR 
    OS_GLOBALSHARED_VAR_FAST 
    OS_GLOBALSHARED_VAR_NOINIT 
    OS_GLOBALSHARED_VAR_FAST_NOINIT 
    OS_GLOBALSHARED_VAR_ZERO_INIT 
    RW 
    RW 
    RW 
    RW 
    OS_GLOBALSHARED_VAR_NOCACHE 
    OS_GLOBALSHARED_VAR_FAST_NOCACHE 
    OS_GLOBALSHARED_VAR_NOCACHE_NOINIT 
    OS_GLOBALSHARED_VAR_FAST_NOCACHE_NOINIT 
    OS_GLOBALSHARED_VAR_NOCACHE_ZERO_INIT 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    156 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    Section 
     
    n

     
    no 
    re 
    re 
     
    ed

    ore
    re
    t
     
    co 
    co 
    C
     
     
     
    co
    l
     l
    gn
    gn
    rust 
    ca
    ca
    rei
    rei
    Lo
    rustedT
    Lo
    rustedt
    Fo
    rustedt
    Fo
    non
    OS_<ApplicationName>_VAR 
    OS_<ApplicationName>_VAR_FAST 
    OS_<ApplicationName>_VAR_NOINIT 
    OS_<ApplicationName>_VAR_FAST_NOINIT 
    OS_<ApplicationName>_VAR_FAST_ZERO_INIT 
    RW 
    RW 
    RW 
    RO 
    OS_<ApplicationName>_VAR_NOCACHE 
    OS_<ApplicationName>_VAR_FAST_NOCACHE 
    OS_<ApplicationName>_VAR_NOCACHE_NOINIT 
    OS_<ApplicationName>_VAR_FAST_NOCACHE_NOINIT 
    OS_<ApplicationName>_VAR_NOCACHE_ZERO_INIT 
    OS_<Task/IsrName>_VAR 
    OS_<Task/IsrName>_VAR_FAST 
    OS_<Task/IsrName>_VAR_NOINIT 
    RW 
    RW 
    RW 
    RO 
    OS_<Task/IsrName>_VAR_FAST_NOINIT 
    OS_<Task/IsrName>_VAR_ZERO_INIT 
    OS_BARRIER_CORE<Core Id>_VAR_NOCACHE_NOINIT 
    RW 
    RO 
    RW 
    RO 
    OS_BARRIER_CORE<Core Id>_VAR_FAST_NOCACHE_NOINIT 
    OS_CORESTATUS_CORE<Core Id>_VAR_ NOCACHE_NOINIT 
    OS_CORESTATUS_CORE<Core 
    RW 
    RO 
    RW 
    RO 
    Id>_VAR_FAST_NOCACHE_NOINIT 
    Table 4-7   Recommended Section Access Rights 
     
     
    Note 
    The access to the stack section is handled completely by MICROSAR OS 
     
     
     
     
     
     
    Note 
    The table is only valid for cores which have the same diagnostic level. Cores with a 
      lower diagnostic level must never interact with data from a core with a higher diagnostic 
    level. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    157 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.3.1.4 
    Access Rights to Shared Data Sections 
    Section 
    Access Rights 
    OS_APPSHARED_0X<application 
    Only applications which are specified by the 
    bitmask>_VAR_NOCACHE_NOINIT 
    <application bitmask> shall have read / write 
    access. 
    The bitmasks of applications may be looked up 
    in “Os_Types_Lcfg.h” > "ApplicationType" 
    OS_CORESHARED_0X<core 
    Only cores which are specified by the <core 
    bitmask>_VAR_NOCACHE_NOINIT 
    bitmask> shall have read / write access. 
    The bitmasks of cores may be looked up in 
    “Os_Hal_Lcfg.h” > "CoreIdType" 
    Table 4-8   Recommended Spinlock Section Access Rights 
    4.3.2 
    Link Sections 
    Once  variables  have  been  put  into  OS  sections  (by  usage  of  the  section  specifiers 
    described in 4.3.1.1) the sections would have to be linked. 
    Therefore  MICROSAR  OS  generates  linker  command  files  which  utilize  the  linkage  of 
    those sections. 
    Linker Command Filename 
    Content 
    Os_Link_<Core>.<FileSuffix> 
    All data and code sections which are bound to a 
    core 
    Os_Link.<FileSuffix> 
    All data and code sections which are global 
    Os_Link_<Core>_Stacks.<FileSuffix> 
    all stacks of a core 
    Table 4-9   List of Generated Linker Command Files 
     
     
    Note 
    <Core> is the logical core ID 
      <FileSuffix> is the suffix for linker command files. It depends on the used compiler. 
     
     
     
    4.3.2.1 
    Pre-Process Linker Command Files 
    The generated linker command files uses C pre-processor statements. Some Linkers don’t 
    understand pre-processor statements. These Linkers require a pre-processing step on the 
    linker command files. 
    Windriver DiabData 
    The pre-processor should be used on command line to pre-process 
    the linker command files e.g.: 
    dcc.exe –P Os_Link.dld –o Os_Link_new.dld 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    158 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
    4.3.2.2 
    Simple Linker Defines 
    The following defines are used to select groups of OS sections from the linker command 
    files. 
    Select OS code 
    OS_LINK_CODE 
    Select an interrupt vector table 
    OS_LINK_INTVEC_CODE 
    Select an exception vector table 
    OS_LINK_EXCVEC_CODE 
    Select user callouts (Tasks, ISRs, Hooks) 
    OS_LINK_CALLOUT_CODE 
    Select constants related to an interrupt vector table 
    OS_LINK_INTVEC_CONST 
    Select constants related to an exception vector table 
    OS_LINK_EXCVEC_CONST 
    Select OS stacks 
    OS_LINK_KERNEL_STACKS 
     
     
     
    Example 

    #define OS_LINK_INTVEC_CODE 
      #include Os_Link_Core0.lsl 
     
    Selects the interrupt vector table from the included linker command file for linking. 
     
     
     
    4.3.2.3 
    Hierachical Linker Defines 
    The linker command files are intended to be included into a main linker command file. 
    Single sections or group of sections can be selected for linkage by usage of C-like defines. 
    This mechanism is similar to the MemMap mechanism of AUTOSAR. 
    The linker defines of MICROSAR OS uses a hierarchical syntax. 
    The more one walks down in the hierarchy the less sections are selected. 
     
     
     
    Note 
    Once one have made the decision for a specific hierarchical level one will have to stick 
      to this level throughout the linker defines group. Otherwise there may be multiple 
    section definitions. 
     
     
     
    4.3.2.4 
    Selecting OS constants 
    These are hierarchical linker defines 
    Prefix 
    Optional Hierarchy level 1 
    OS_LINK_CONST_KERNEL 
    _NEAR 
    _FAR 
    Table 4-10   OS constants linker define group 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    159 
    based on template version 6.0.1 






    Technical Reference MICROSAR OS 
     
     
    Example 

    #define OS_LINK_CONST_KERNEL 
      #include Os_Link_Core0.lsl 
     
    Selects all OS constants. 
     
     
     
     
     
    Example 

    #define OS_LINK_CONST_KERNEL_NEAR 
      #include Os_Link_Core0.lsl 
     
    Selects all near addressable OS constants only. 
     
     
     
    4.3.2.5 
    Selecting OS variables 
    These are hierarchical linker defines 
    Prefix 
    Optional Hierarchy 
    Optional 
    Optional 
    level 1 
    Hierarchy level  Hierarchy level 3 

    OS_LINK_VAR_KERNEL 
    _NEAR 
    _CACHE 
    _INIT 
    _FAR 
    _NOCACHE 
    _NOINIT 
    Table 4-11   OS variables linker define group 
     
     
    Example 

    #define OS_LINK_VAR_KERNEL 
      #include Os_Link_Core0.lsl 
     
    Selects all OS variables. 
     
     
     
     
     
    Example 

    #define OS_LINK_VAR_KERNEL_NEAR_CACHE 
      #include Os_Link_Core0.lsl 
     
    Selects all OS variables which are near addressable and cacheable. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    160 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    4.3.2.6 
    Selecting special OS Variables 
    These are hierarchical linker defines 
    Prefix 
    Optional Hierarchy level 1 
    OS_LINK_KERNEL_BARRIERS 
    _NEAR 
    OS_LINK_KERNEL_CORESTATUS 
    _FAR 
    OS_LINK_KERNEL_TRACE 
    Table 4-12   OS Barriers and Core status linker define group 
     
     
     
    Example 

    #define OS_LINK_KERNEL_BARRIERS 
      #include Os_Link_Core0.lsl 
     
    Selects all OS Barriers. 
     
     
     
     
     
    Example 

    #define OS_LINK_KERNEL_CORESTATUS 
      #include Os_Link_Core0.lsl 
     
    Selects all OS core state variables. 
     
     
     
    Prefix 
    Optional Hierarchy level  Owner Bitmask 
    Optional 

    Hierarchy level 

    OS_LINK_VAR 
    _APPSHARED 
    _0X<application bitmask>  _NEAR 
    _CORESHARED 
    _0X<core bitmask> 
    _FAR 
     
     
     
    Example 

    #define OS_LINK_VAR_APPSHARED 
      #include Os_Link.lsl 
     
    Selects all OS application shared variables 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    161 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    4.3.2.7 
    Selecting User Constant Sections 
    These are hierarchical linker defines 
    Prefix 
    Optional Hierarchy level 1 
    Owner Name 
    Optional Hierarchy level 2 
    OS_LINK_CONST 
    _APP 
    <Owner Name> 
    _TASK 
    _NEAR 
    _ISR 
    _FAR 
    _GLOBALSHARED 
    --- 
    Table 4-13   User constants linker define group 
     
     
    Example 

    #define OS_LINK_CONST_APP_<ApplicationName> 
     
    #include Os_Link_Core0.lsl 
     
    Selects all constants which belong to the OS application <ApplicationName> 
     
     
     
     
     
    Example 

    #define OS_LINK_CONST_ISR_<ISRName>_FAR 
     
    #include Os_Link_Core0.lsl 
     
    Selects all constants which belong to the ISR <ISRName> which have far addressing 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    162 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.3.2.8 
    Selecting User Variable Sections 
    These are hierarchical linker defines 
    Prefix 
    Optional Hierarchy 
    Owner Name 
    Optional Hierarchy 
    Optional Hierarchy 
    Optional Hierarchy 
    level 1 
    level 2 
    level 3 
    level 4 
    OS_LINK_VAR 
    _APP 
    <Owner Name> 
    _INIT 
    _TASK 
    _NEAR 
    _CACHE 
    _NOINIT 
    _ISR 
    _FAR 
    _NOCACHE 
    _ZEROINIT 
    _GLOBALSHARED 
    --- 
    Table 4-14   User variables linker define group 
     
     
    Example 

    #define OS_LINK_VAR_APP_<ApplicationName> 
     
    #include Os_Link_Core0.lsl 
     
    Selects all variables which belong to the OS application <ApplicationName> 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    163 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Example 

    #define OS_LINK_VAR_APP_<ApplicationName>_FAR_CACHE_INIT 
     
    #include Os_Link_Core0.lsl 
     
    Selects all variables which belong to the OS application <ApplicationName> which have far addressing, are cacheable and are 
    initialized 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    164 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    4.3.3 
    Section Symbols 
    The linker command files described in 4.3.2 also generate section start and stop symbols 
    which  can  be  used  to  configure  start  and  end  addresses  of  MPU  regions,  peripheral 
    regions or access check region objects. 
    The generated linker section start and stop symbols have the following syntax: 
    _OS_<SectionType>_START 
    _OS_<SectionType>_END 
     
     
     
    Note 
    For platform RH850 with compiler Green Hills the linker symbols which are used in 
     
    configurator must omit the underscore prefix: 
    OS_<SectionType>_START 
    OS_<SectionType>_END 
     
     
     
     
     
     
    Example 
    Const data which belongs to section OS_MyAppl_CONST is included within the 
    symbols
     
     
    _OS_MyAppl_CONST_START 
    _OS_MyAppl_CONST_END 
    Data which belongs to section OS_MyAppl_VAR_FAST is included within the symbols 
    _OS_MyAppl_VAR_FAST_START 
    _OS_MyAppl_VAR_FAST_END 
    Data which belongs to section OS_MyTask_VAR_FAST is included within the symbols 
    _OS_MyTask_VAR_FAST_START 
    _OS_MyTask_VAR_FAST_END 
     
     
     
     
     
     
    Note 
    For ARM compiler, the OS generator will not generate section start and stop symbols. 
     
    However, the ARM linker will provide region-related symbols with special patterns (e.g. 
    Image$$region_name$$Base or Load$$region_name$$Base), which can be used to 
    configure start and end addresses of MPU regions, peripheral regions or access check 
    region objects. Detailed information about the region-related symbols can be found in 
    the user guide of the ARM compiler. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    165 
    based on template version 6.0.1 





    Technical Reference MICROSAR OS 
    4.3.3.1 
    Aggregation of Data Sections 
    Additional start and  stop linker symbols are generated which  contain  all data sections of  
    applications,  tasks  and  ISRs.  These  symbols  can  be  used  to  configure  start  and  end 
    addresses of MPU regions, peripheral regions or access check region objects. 
    These start and stop linker symbols have the syntax: 
    _OS_<SectionOwner>_VAR_ALL_START 
    _OS_<SectionOwner>_VAR_ALL_END 
    <SectionOwner> is name of applications, tasks and CAT2 ISRs used in configurator. 
     
     
     
    Note 
    For platform RH850 with compiler Green Hills the linker symbols which are used in 
     
    configurator must omit the underscore prefix: 
    OS_<SectionOwner>_VAR_ALL_START 
    OS_<SectionOwner>_VAR_ALL_END 
     
     
     
     
     
     
    Example 
    All data sections which belong to application “MyAppl” are included within the symbols 
     
    _OS_MyAppl_VAR_ALL_START  
    _OS_MyAppl_VAR_ALL_END 
    All data sections which belong to task “MyTask” are included within the symbols 
    _OS_MyTask_VAR_ALL_START  
    _OS_MyTask_VAR_ALL_END 
    All data sections which belong to CAT2 ISR “MyISR” are included within the symbols 
    _OS_MyISR_VAR_ALL_START  
    _OS_MyISR_VAR_ALL_END 
     
     
     
    4.4 
    Static Code Analysis 
     
     
    Note 
    When running tools for static code analysis (e.g. MISRA, MSSV), the pre-processor 
      definition OS_STATIC_CODE_ANALYSIS has to be set during analysis. It switches off 
    compiler specific keywords and inline assembler parts. Typically code analysis tools 
    cannot deal with such code parts. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    166 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.5 
    Configuration of X-Signals 
    This chapter describes how X-Signals are configured for cross core API calls. 
    1.  Add an “OsCoreXSignalChannel” to an “OsCore” object. This core will be the sender of 
    the X-Signal. 
    2.  Specify the queue size of the channel with the “OsCoreXSignalChannelSize” attribute. 
    3.  Add an X-Signal receiver ISR. It must be of category 2. 
    4.  Assign this ISR to be the X-Signal receiver 
    “OsCore/OsCoreXSignalChannelReceiverIsr”. 
    5.  Configure an appropriate interrupt priority for the receiver ISR (see the following 
    chapters for details on your used platform). The configured priority must follow the 
    rules listed in Table 3-3. 
    6.  Choose an appropriate interrupt source for the receiver ISR (see the following 
    chapters for details on your used platform). 
    7.  Add the "OsIsrXSignalReceiver" to the receiver ISR and select the provided APIs 
    (callable from the sender core) with the "OsIsrXSignalReceiverProvidedApis" attribute. 
     
     
    Note 
    The DaVinci Configurator provides solving actions which support the correct 
      configuration of X-Signals. 
     
     
     
    4.5.1 
    TriCore Aurix Family 
    Logical Priority 
    A low number for OsIsrInterruptPriority attribute means a low 
    logical priority 
    X-Signal ISR Interrupt Priority 
    Beside the rules listed in Table 3-3 the OsIsrInterruptPriority 
    can be chosen freely. 
    X-Signal ISR Interrupt Source 
    Any interrupt source, which is not used by other modules, may 
    be used for the X-Signal ISR. 
    The offset of the SRC register of the used interrupt source has 
    to be specified for OsIsrInterruptSource. 
     
    4.5.2 
    RH850 Family 
    Logical Priority 
    A low number for OsIsrInterruptPriority attribute means a high 
    logical priority 
    X-Signal ISR Interrupt Priority 
    Beside the rules listed in Table 3-3 the OsIsrInterruptPriority 
    can be chosen freely. 
    X-Signal ISR Interrupt Source 
    Only interrupt sources of type INTIPIRn can be used. Available 
    sources INTIPIRn are listed in the hardware manual of used 
    derivative. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    167 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.5.3 
    Power PC Family 
    Logical Priority 
    A low number for OsIsrInterruptPriority attribute means a low 
    logical priority 
    X-Signal ISR Interrupt Priority 
    Beside the rules listed in Table 3-3 the OsIsrInterruptPriority 
    can be chosen freely. 
    X-Signal ISR Interrupt Source 
    Any Interrupt source of the available software interrupts may 
    be used. 
     
    4.5.4 
    ARM Family 
     
    NVIC Interrupt Controller – TDA2x 
    GIC Interrupt Controller 
    Logical Priority 
    A low number for OsIsrInterruptPriority attribute means a high logical priority 
    X-Signal ISR 
    Beside the rules listed in Table 3-3 the OsIsrInterruptPriority can be chosen 
    Interrupt Priority 
    freely. 
    X-Signal ISR 
    Interrupt source 19 has to be used for  The interrupt sources 0..15 have to be 
    Interrupt Source 
    the X-Signal ISRs. 
    used for the X-Signal ISR. 
     
    4.5.5 
    VTT OS 
    Logical Priority 
    A low number for OsIsrInterruptPriority attribute means a low 
    logical priority 
    X-Signal ISR Interrupt Priority 
    Beside the rules listed in Table 3-3 the OsIsrInterruptPriority 
    can be chosen freely. 
    X-Signal ISR Interrupt Source 
    Any interrupt source, which is not used by other modules, may 
    be used for the X-Signal ISR. 
     
    4.6 
    OS generated objects 
    In  dependency  of  its  configuration  MICROSAR  OS  may  add  other  OS  configuration 
    objects to it. 
    4.6.1 
    System Application 
    Type 
    OsApplication 
    Name 
    SystemApplication_<CoreName> 
    Condition 
    Is added when the OsCore <CoreName> is configured to be an 
    AUTOSAR core. 
    Features 
    >  A system application contains the OS objects 
    >  IdleTask_<CoreName> 
    >  TpCounter_<CoreName> 
    >  XSignalIsr_<CoreName> 
    >  CounterIsr_TpCounter_<CoreName> 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    168 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    4.6.2 
    Idle Task 
    Type 
    OsTask 
    Name 
    IdleTask_<CoreName> 
    Condition 
    Is added when the OsCore <CoreName> is configured to be an 
    AUTOSAR core. 
    Features 
    >  Has the lowest priority of all tasks assigned to the same core. 
    >  Is fully preemptive. 
    >  Is implemented by the OS 
     
     
     
    Idle Task Priority 
    The generator has a special treatment for the idle task. The idle task has the virtual 
      priority 0xFFFFFFFF to differentiate it from regular tasks. It will be generated to have 
    the lowest priority, even if there are tasks configured with priority 0. 
     
     
     
     
     
    User Code Execution  
    The idle task is implemented by the OS to simplify scheduling and idle treatment. The 
      OS does not rely on execution of the idle task. Implement an additional task with 
    priority 0, if user code execution during idle time is needed. 
     
     
     
    4.6.3 
    Timer ISR 
    Type 
    OsIsr 
    Name 
    CounterIsr_<CoreName> 
    Condition 
    Is added if a hardware OsCounter is configured to have a driver 
    (attribute “OsCounterDriver”). 
    Features 
    >  Is Implemented by the OS. 
    >  Handles the system timer counter, alarms and scheduletables 
    which are assigned to the core. 
     
    4.6.4 
    System Timer Counter 
    Type 
    OsCounter 
    Name 
    SystemTimer 
    Condition 
    Is added optionally within the recommended configuration. 
    Features 
    >  Is used for OSEK backward compatibility 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    169 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.6.5 
    Timing Protection Counter 
    Type 
    OsCounter 
    Name 
    TpCounter_<CoreName> 
    Condition 
    Is added when OsTask/IsrTimingProtection parameters are configured 
    on the core. 
    Features 
    >  Handles all times related to timing protection 
     
    4.6.6 
    Timing protection ISR 
    Type 
    OsIsr 
    Name 
    CounterIsr_TpCounter_<CoreName> 
    Condition 
    Is added when OsTask/IsrTimingProtection parameters are configured 
    on the core. 
    Features 
    >  Interrupt service routine of the timing protection feature 
     
    4.6.7 
    Resource Scheduler 
    Type 
    OsResource 
    Name 
    RES_SCHEDULER_<CoreName> 
    Condition 
    For each core the resource scheduler is added when 
    OsUseResScheduler is set to TRUE. 
    Features 
    >  Is automatically assigned to all tasks of core <CoreName> 
     
    4.6.8 
    X-Signal ISR 
    Type 
    OsIsr 
    Name 
    XSignalIsr_<CoreName> 
    Condition 
    Is added when an X-Signal channel is configured on the core. 
    Features 
    >  Handles cross core requests. 
     
    4.6.9 
    IOC Spinlocks 
    Type 
    OsSpinlock 
    Name 
    IocSpinlock_<IOC Name> 
    Condition 
    Is added when an IOC is configured which requires cross core 
    communication. 
    Features 
    >  Each IOC has its own spinlock to reduce core wait times 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    170 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.7 
    VTT OS Specifics 
    4.7.1 
    Configuration 
    As described in [6] all VTT configuration parameters are derived from the hardware target. 
    The only exceptions are the ISR objects for the VTT OS. 
      ISRs  from  other  Vector  MICROSAR  BSW  vVIRTUALtarget  driver  modules  (e.g. 
    VTTCan) are inserted automatically by the respective BSW module. 
      ISRs from other modules and user ISRs have to be added separately. 
      Interrupt levels for all ISRs have to be configured manually. VTT OS knows interrupt 
    levels from 1 to 200 (where 1 is the lowest priority and 200 the highest). 
    4.7.2 
    CANoe Interface 
    A  VTT  OS  is  simulated  within  the  CANoe  simulation  software.  There  are  a  set  of  API 
    functions which are capable to communicate with CANoe (e.g. sending a message on the 
    CAN bus). 
    These API functions are prefixed with “CANoeAPI_”. 
    The available set of API functions can be looked up in the delivered header “CANoeApi.h”. 
    4.7.2.1 
    Idle Task behavior with VTT OS 
    Any  idle  task  which  runs  within  the  VTT  OS  must  call  the  function 
    “CANoeAPI_ConsumeTicks” (see description in CANoeApi.h). 
     
     
    Caution 
    If the call of “CANoeAPI_ConsumeTicks” is missing within the idle task, the CANoe 
      windows application won’t respond any longer! 
     
     
     
    There are two possible solutions which solves this problem: 
    1.  The OS generated idle task (see 4.6.2) calls this function by default. The application 
    has to ensure that this idle task is entered cyclically. 
    2.  It may be that the OS idle task is never executed, because there is a higher priority 
    application  idle  task.  This  application  idle  task  must  implement  a  cyclic  call  of 
    “CANoeAPI_ConsumeTicks” instead of the OS idle task. 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    171 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.8 
    POSIX OS Specifics 
    4.8.1 
    Configuration 
    POSIX OS configuration parameters are not derived from the hardware target. 
    A  virtual  interrupt  controller  is  implemented  in  order  to  simulate  the  hardware  behaviour. 
    The maximum configurable values are: 
      1000 Interrupt sources. 
      100 Interrupt levels (ascending priority). 
    4.8.2 
    Posix Interface 
    The set of used POSIX libraries are included in the file: Os_Hal_Compiler_Gcc_types.h. 
    The recommended POSIX standard version is at least IEEE Std 1003.1-2008.  
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    172 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.9 
    User include files 
    Within some features of MICROSAR OS it may be necessary to provide foreign data types 
    to the OS. 
    This can be done by referencing user headers within the OS configuration. 
    The  features  “IOC”  and  “trusted  functions  stub  generation”  are  relying  on  such  include 
    mechanisms. 
     
    Configuration 
    Content 
    IOC 
    IOC include files are configured with 
    The headers have to provide 
    the IOC attribute 
    >  Definitions of foreign OS data 
    "OsIocIncludeHeader“. 
    types which are used within IOC 
    A list of include files may be specified 
    communication. 
    here. 
    Trusted 
    Include files which are needed for 
    The headers have to provide 
    Functions 
    trusted function feature are configured  >  The definitions of foreign OS data 
    within the application attribute 
    types which are used as trusted 
    “OsAppCalloutStubsIncludeHeader”. 
    functions parameters or return 
    A list of include files may be specified 
    values. 
    here. 
     
     
     
    Caution 
    All user include files need to implement a double inclusion preventer! 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    173 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    4.10  Preprocessing of assembler language files 
    Dependent  on  the  hardware  platform,  MICROSAR  OS  may  use  preprocessing  of 
    assembly  language  files.  However,  some  of  the  supported  compiler  tool  chains  do  not 
    allow to preprocess assembly language files with the normal C preprocessor. Thererfore, 
    the compiler or the assembler may state some error messages. 
    In such a case, another preprocessor may be used.  
     
     
     
    Example 
    The following compiler toolsuite does not support preprocessing of assembly language 
      files: TI compiler (Texas Instuments). 
    The following tool of the GNU compiler collection has shown to work correctly on the 
    files delivered with MICROSAR OS: 
    cpp (tdm-1) 4.9.2 
    It should be used in the following way: 
    cpp.exe -P -DOS_CFG_DERIVATIVEGROUP_<YourDerivativeGroup>  
            -DOS_CFG_COMPILER_TEXASINSTRUMENTS  
            -I$(PATH_OS_IMPLEMENTATION) -I$(PATH_OS_GENDATA) 
            <YourAssemblyFile>.asm -o $(PATH_OUTPUT) 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    174 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    4.11  Configuration of Interrupt Mapping 
    This chapter outlines the support for configuring the interrupt mapping of certain interrupts 
    to a hardware defined type. 
    4.11.1  TriCore Aurix Family 
    Supported Interrupt Type 
    DMA 
    ISR Category 
    Category 2 must be used 
    Supported on derivative families  All 
     
    After mapping an interrupt to the DMA, the DMA Interrupt controller is initialized by the OS 
    and the interrupt is routed to the controller. The configuration of the DMA controller must 
    be done by the user. 
    The  mapped  interrupt  is  not  in  the  generated  core  interrupt  vector  table  and  an 
    UnhandledInterrupt handler is generated. 
    4.11.2  ARM Family 
    4.11.2.1  Traveo 
    Supported Interrupt Type 
    FIQ 
    ISR Category 
    Category 0 must be used 
    Supported on derivative families  Traveo 
     
    After mapping an interrupt to FIQ, the interrupt is added to the generated FIQ interrupt  
    Vector table. 
    4.11.2.2  Traveo 2 
    Supported Interrupt Type 
    CoreInternal, CoreExternalIRQ0..CoreExternalIRQ7 
    ISR Category 
    Any 
    Supported on derivative families  Traveo 2 
     
    The  Interrupt  Mapping  feature  on  Traveo  2  is  used  to  map  Core  external  peripheral 
    interrupt sources to one of the 8 CoreExternalIRQ channels. 
    After mapping an interrupt to any CoreExternalIRQ channel, the interrupt is added to the 
    generated System Interrupt Vector Table. An interrupt mapped to a CoreInternal interrupt 
    type will be treated as a normal core local interrupt source. 
    4.12  Stack Summary 
    The  DaVinci  configurator  provides  an  overview  of  all  internal  calculated  stacks  in  a 
    seperated table in /MICROSAR/Os/OsOS/OsStackSummary. 
    For example, this overview table  can be used to determine which  task uses which  stack 
    and how the size is configured. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    175 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
     
     
    Note 
    This stack summary is automatically created and updated during configuration by the 
      OS generator. Manual configuration of stacks in this summary is not supported. 
    The size must be configured at the stack size parameter of the container which is 
    referenced as user (e.g. OsTaskStackSize). 
     
     
     
     
     
    Basic Knowledge 
    For shared stacks the biggest configured stack size of all users is used to set up the 
      stack size in the summary. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    176 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5  API Description 
    This chapter lists all API service functions which are provided by MICROSAR OS. 
    5.1 
    Specified OS services 
    The  OS  provides  the  following  services  which  are  specified  within  the  AUTOSAR  OS 
    specification. 
    5.1.1 
    StartCore 
    Prototype 
    void StartCore (CoreIdType CoreID, StatusType *Status) 
    Parameter 
    CoreID [in] 
    The core to start. 
    Status [out] 
    Status code. 
    Return code 
    void 
    >  E_OK No Error. E_OS_ID (EXTENDED status:) 
    >  - Core ID is invalid. 
    >  - Core is no AUTOSAR core. E_OS_ACCESS (EXTENDED status:) The 
    function was called after starting the OS. E_OS_STATE (EXTENDED 
    status:) The Core is already activated. 
    Functional Description 
    OS service StartCore(). 
    Particularities and Limitations 
    >  Pre-Condition: Supervisor mode. Pre-Condition: Given object pointer(s) are valid. 
    Starts the core given by CoreID that is controlled by the AUTOSAR OS. This API is allowed to be used from 
    AUTOSAR and non-AUTOSAR cores.  
    Call context 
    >  - 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-1   StartCore 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    177 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.2 
    StartNonAutosarCore 
    Prototype 
    void StartNonAutosarCore (CoreIdType CoreID, StatusType *Status) 
    Parameter 
    CoreID  
    The core to start. 
    Status [out] 
    Status code. 
    Return code 
    void 
    E_OK No Error. E_OS_ID (EXTENDED status:) Core ID is invalid. 
    E_OS_STATE (EXTENDED status:) The Core is already activated. 
    Functional Description 
    OS service StartNonAutosarCore(). 
    Particularities and Limitations 
    Pre-Condition: Supervisor mode. 
    Starts the core given by CoreID that is not controlled by the AUTOSAR OS.  
    Call context 
    >  - 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-2   StartNonAutosarCore 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    178 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.3 
    GetCoreID 
    Prototype 
    CoreIdType GetCoreID (void) 
    Parameter 
    void 
    none 
    Return code 
    CoreIdType 
    Unique ID of the calling core. 
    Functional Description 
    OS service GetCoreID(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Returns the unique logical core identifier of the core on which the function is called. The mapping of 
    physical cores to logical CoreIDs is implementation specific. This API is allowed to be used from AUTOSAR 
    cores only. If the API is required on a non-AUTOSAR core, it is possible to configure the core as an 
    AUTOSAR core but start it as a non-AUTOSAR core using the StartNonAutosarCore() API.  
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-3   GetCoreID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    179 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.4 
    GetNumberOfActivatedCores 
    Prototype 
    uint32 GetNumberOfActivatedCores (void) 
    Parameter 
    void 
    none 
    Return code 
    uint32 
    Number of cores activated by the StartCore() function. 
    Functional Description 
    OS service GetNumberOfActivatedCores(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The function returns the number of cores activated by the StartCore() function. AUTOSAR specifies this 
    function to be usable from task and ISR call level. But this function does not explicitly perform any call 
    context checks. There is no need to, because it is a primitive getter function.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-4   GetNumberOfActivatedCores 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    180 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.5 
    GetActiveApplicationMode 
    Prototype 
    AppModeType GetActiveApplicationMode (void) 
    Parameter 
    void 
    none 
    Return code 
    AppModeType 
    Current Application Mode 
    Functional Description 
    OS service GetActiveApplicationMode(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service returns the current application mode.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-5   GetActiveApplicationMode 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    181 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.6 
    StartOS 
    Prototype 
    void StartOS (AppModeType Mode) 
    Parameter 
    Mode [in] 
    The application mode in which the OS shall start. 
    Return code 
    void 
    none 
    Functional Description 
    OS service StartOS(). 
    Particularities and Limitations 
    >  Pre-Condition: Supervisor mode. Pre-Condition: Os_Init() has been called before. 
    Starts the operating system in a given application mode.  
    Call context 
    >  - 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-6   StartOS 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    182 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.7 
    ShutdownOS 
    Prototype 
    void ShutdownOS (StatusType Error) 
    Parameter 
    Error  
    Error code which shall be passed to the ShutdownHook() 
    Return code 
    void 
    none 
    Functional Description 
    OS service ShutdownOS(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This function shall shutdown the core on which it was called. Only allowed in trusted applications. In case 
    that ShutdownOS() is called from an invalid context, OS_STATUS_CALLEVEL is reported via the 
    ProtectionHook.  
    Call context 
    >  TASK|ISR2|ERRHOOK|STARTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-7   ShutdownOS 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    183 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.8 
    ShutdownAllCores 
    Prototype 
    void ShutdownAllCores (StatusType Error) 
    Parameter 
    Error [in] 
    This is the error code which shall be passed to the ShutdownHook(). 
    Return code 
    void 
    none 
    Functional Description 
    OS service ShutdownAllCores(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Propagates a shutdown request to all started AUTOSAR cores and performs a shutdown itself afterwards. 
    Only allowed in trusted applications.  
    Call context 
    >  TASK|ISR2|ERRHOOK|STARTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-8   ShutdownAllCores 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    184 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.9 
    ControlIdle 
    Prototype 
    StatusType ControlIdle (CoreIdType CoreID, IdleModeType IdleMode) 
    Parameter 
    CoreID [in] 
    Selects the core which idle mode is set 
    IdleMode [in] 
    The mode which shall be performed during idle time 
    Return code 
    StatusType 
    E_OK No error. E_OS_ID (EXTENDED status): Invalid core and/or invalid 
    IdleMode. E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service ControlIdle(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This API allows the caller to select the idle mode action which is performed during idle time of the OS (e.g. if 
    no Task/ISR is active). The real idle modes are hardware dependent and not standardized. The default idle 
    mode on each core is IDLE_NO_HALT.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Non-Reentrant 
    Table 5-9   ControlIdle 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    185 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.10  GetSpinlock 
    Prototype 
    StatusType GetSpinlock (SpinlockIdType SpinlockId) 
    Parameter 
    SpinlockId [in] 
    The spinlock which shall be locked. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid SpinlockID. 
    E_OS_INTERFERENCE_DEADLOCK (EXTENDED status:) Spinlock 
    already occupied by a task/ISR of the same core. 
    E_OS_NESTING_DEADLOCK (EXTENDED status:) Invalid Spinlock 
    allocation order. E_OS_CALLEVEL (EXTENDED status:) Called from 
    invalid context. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    Functional Description 
    OS service GetSpinlock(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Allocates the requested spinlock for the caller. If it is already locked, the function performs active around 
    until the spinlock becomes available again.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-10   GetSpinlock 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    186 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.11  ReleaseSpinlock 
    Prototype 
    StatusType ReleaseSpinlock (SpinlockIdType SpinlockId) 
    Parameter 
    SpinlockId [in] 
    The spinlock which shall be released. 
    Return code 
    StatusType 
    E_OK No error. E_OS_ID (EXTENDED status:) Invalid SpinlockID. 
    E_OS_STATE (EXTENDED status:) The caller is not the owner of the given 
    spinlock. E_OS_NOFUNC (EXTENDED status:) The caller tries to release a 
    spinlock while another spinlock has to be released before. E_OS_RESOURCE 
    (EXTENDED status:) Spinlock and Resource API not used in LIFO order. 
    E_OS_ACCESS (Service Protection:) Caller's access rights are not sufficient. 
    This error may occur in combination with trusted functions. 
    Functional Description 
    OS service ReleaseSpinlock(). 
    Particularities and Limitations 
    Pre-Condition: None 
    ReleaseSpinlock releases a spinlock variable that was occupied before. Before terminating a task/ISR all 
    spinlock variables that have been occupied with GetSpinlock() shall be released. The error 
    E_OS_CALLEVEL is already checked by E_OS_STATE. See Os_SpinlockRelease() for details.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-11   ReleaseSpinlock 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    187 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.12  TryToGetSpinlock 
    Prototype 
    StatusType TryToGetSpinlock (SpinlockIdType SpinlockId, TryToGetSpinlockType 
    *Success) 
    Parameter 
    SpinlockId [in] 
    The spinlock which shall be locked. 
    Success [out] 
    The result of the allocation attempt. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid SpinlockID. 
    E_OS_INTERFERENCE_DEADLOCK (EXTENDED status:) Spinlock 
    already occupied by a task/ISR of the same core. 
    E_OS_NESTING_DEADLOCK (EXTENDED status:) Invalid Spinlock 
    allocation order. E_OS_CALLEVEL (EXTENDED status:) Called from 
    invalid context. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    Functional Description 
    OS service TryToGetSpinlock(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Allocates the requested spinlock for the caller. If it is already locked, the function returns.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-12   TryToGetSpinlock 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    188 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.13  DisableAllInterrupts 
    Prototype 
    void DisableAllInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service DisableAllInterrupts().. 
    Particularities and Limitations 
    Pre-Condition: Not already in DisableAllInterrupts() sequence. 
    Disables category 1 and category 2 ISRs. If timing protection is configured, the timing protection interrupt is 
    not affected.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-13   DisableAllInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    189 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.14  EnableAllInterrupts 
    Prototype 
    void EnableAllInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service EnableAllInterrupts(). 
    Particularities and Limitations 
    Pre-Condition: In DisableAllInterrupts() sequence. 
    Restores the state saved by DisableAllInterrupts(). 
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-14   EnableAllInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    190 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.15  SuspendAllInterrupts 
    Prototype 
    void SuspendAllInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service SuspendAllInterrupts(). 
    Particularities and Limitations 
    Pre-Condition: Not in DisableAllInterrupts() sequence. 
    Saves the recognition status of all interrupts and disables all interrupts for which the hardware supports 
    disabling. This API can be called nested.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-15   SuspendAllInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    191 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.16  ResumeAllInterrupts 
    Prototype 
    void ResumeAllInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service ResumeAllInterrupts(). 
    Particularities and Limitations 
    >  Pre-Condition: In SuspendAllInterrupts() sequence.Pre-Condition: Correct nesting sequence of suspend 
    interrupt API. 
    Restores the recognition status of all interrupts saved by the SuspendAllInterrupts() service.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-16   ResumeAllInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    192 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.17  SuspendOSInterrupts 
    Prototype 
    void SuspendOSInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service SuspendOSInterrupts(). 
    Particularities and Limitations 
    Pre-Condition: Not in DisableAllInterrupts() sequence. 
    Saves the recognition status of interrupts of category 2 and disables the recognition of these interrupts. This 
    API can be called nested.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-17   SuspendOSInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    193 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.18  ResumeOSInterrupts 
    Prototype 
    void ResumeOSInterrupts (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    OS service ResumeOSInterrupts(). 
    Particularities and Limitations 
    >  Pre-Condition: In SuspendOSInterrupts() sequence.Pre-Condition: Correct nesting sequence of suspend 
    interrupt API. 
    Restores the recognition status of interrupts saved by the SuspendOSInterrupts() service.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|ALARMHOOK|PROTH
    OOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-18   ResumeOSInterrupts 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    194 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.19  ActivateTask 
    Prototype 
    StatusType ActivateTask (TaskType TaskID) 
    Parameter 
    TaskID [in] 
    The task which shall be activated. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_LIMIT Too many task activations. E_OS_ID 
    (EXTENDED status:) Invalid TaskID. E_OS_CALLEVEL (EXTENDED 
    status:) Called from invalid context. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. E_OS_ACCESS (Service 
    Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given task's owner application is not accessible. 
    Functional Description 
    OS service ActivateTask(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The task TaskID is transferred from the SUSPENDED state into the READY state. The operating system 
    ensures that the task code is being executed from the first statement.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-19   ActivateTask 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    195 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.20  TerminateTask 
    Prototype 
    StatusType TerminateTask (void) 
    Parameter 
    void 
    none 
    Return code 
    StatusType 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_RESOURCE (EXTENDED status:) Task still occupies resources. 
    E_OS_SPINLOCK (EXTENDED status:) Task still holds spinlocks. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service TerminateTask(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service causes the termination of the calling task. The calling task is transferred from the RUNNING 
    state into the SUSPENDED state. This service only returns in case it detects an error.  
    Call context 
    >  TASK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-20   TerminateTask 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    196 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.21  ChainTask 
    Prototype 
    StatusType ChainTask (TaskType TaskID) 
    Parameter 
    TaskID [in] 
    The task which shall be activated. 
    Return code 
    StatusType 
    >  E_OS_LIMIT Too many task activations. E_OS_CALLEVEL (EXTENDED 
    status:) Called from invalid context. E_OS_RESOURCE (EXTENDED 
    status:) Task still occupies resources. E_OS_SPINLOCK (EXTENDED 
    status:) Task still holds spinlocks. E_OS_ID (EXTENDED status:) Invalid 
    TaskID. E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given task's owner application is not accessible. 
    Functional Description 
    OS service ChainTask(). 
    Particularities and Limitations 
    Pre-Condition: None 
    After termination of the calling task the given task is activated. This service only returns in case it detects an 
    error.  
    Call context 
    >  TASK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-21   ChainTask 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    197 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.22  Schedule 
    Prototype 
    StatusType Schedule (void) 
    Parameter 
    void 
    none 
    Return code 
    StatusType 
    E_OK No Error. E_OS_CALLEVEL (EXTENDED status:) The service was 
    called from any context which is not allowed. E_OS_RESOURCE 
    (EXTENDED status:) The service was called from a task which holds an OS 
    resource. E_OS_SPINLOCK (EXTENDED status:) The service was called 
    from a task which holds a spinlock. E_OS_DISABLEDINT (Service Protection:) 
    The service was called with disabled interrupts. 
    Functional Description 
    OS service Schedule(). 
    Particularities and Limitations 
    Pre-Condition: Interrupts are enabled. 
     
    Call context 
    >  TASK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-22   Schedule 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    198 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.23  GetTaskID 
    Prototype 
    StatusType GetTaskID (TaskRefType TaskID) 
    Parameter 
    TaskID [out] 
    The current task ID. 
    Return code 
    StatusType 
    E_OK No error. E_OS_CALLEVEL (EXTENDED status:) Called from invalid 
    context. E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is 
    NULL. E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. 
    Functional Description 
    OS service GetTaskID(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Returns the ID of the task which is currently RUNNING on the local core.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-23   GetTaskID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    199 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.24  GetTaskState 
    Prototype 
    FUNC(StatusType, OS_CODE) GetTaskState (TaskType TaskID, 
    TaskStateRefType State) 
    Parameter 
    TaskID [in] 
    The task to be queried. 
    State [out] 
    The task's state. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_CALLEVEL (EXTENDED status:) Called from 
    invalid context. E_OS_ID (EXTENDED status:) Invalid TaskID. 
    E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is NULL. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given task's owner application is not accessible. 
    Functional Description 
    OS service GetTaskState(). 
    Particularities and Limitations 
    Pre-Condition: The given task has to be assigned to the current core. 
    Returns the current scheduling state of a task (RUNNING, READY, ...).  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-24   GetTaskState 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    200 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.25  GetISRID 
    Prototype 
    ISRType GetISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    >  Identifier of running ISR INVALID_ISR If called from 
    >  - invalid call-context, 
    >  - from a task or 
    >  - a hook which was called inside a task context. 
    Functional Description 
    OS service GetISRID(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Return the identifier of the currently executing ISR.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-25   GetISRID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    201 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.26  SetEvent 
    Prototype 
    StatusType SetEvent (TaskType TaskID, EventMaskType Mask) 
    Parameter 
    TaskID [in] 
    The task which shall be modified. 
    Mask [in] 
    The events which shall be set. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid TaskID. 
    E_OS_ACCESS (EXTENDED status:) 
    >  - Task is no extended task. (Service Protection:) 
    >  - Task's owner application is not accessible. 
    >  - Caller's access rights are not sufficient. E_OS_STATE (EXTENDED 
    status:) Events cannot be set as the referenced task is in the SUSPENDED 
    state. E_OS_CALLEVEL (Service Protection:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. 
    Functional Description 
    OS service SetEvent(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The events of the given task are set according to the given event mask.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-26   SetEvent 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    202 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.27  ClearEvent 
    Prototype 
    StatusType ClearEvent (EventMaskType Mask) 
    Parameter 
    Mask [in] 
    The events which shall be set. 
    Return code 
    StatusType 
    E_OK No error. E_OS_ACCESS (EXTENDED status:) Task is no extended 
    task. E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service ClearEvent(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The events of the calling task are cleared according to the given event mask.  
    Call context 
    >  TASK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-27   ClearEvent 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    203 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.28  GetEvent 
    Prototype 
    StatusType GetEvent (TaskType TaskID, EventMaskRefType Mask) 
    Parameter 
    TaskID [in] 
    The task which shall be queried. 
    Mask [out] 
    Events which are set. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_PARAM_POINTER (EXTENDED status:) Given 
    pointer is NULL. E_OS_ID (EXTENDED status:) Invalid TaskID. 
    E_OS_ACCESS (EXTENDED status:) 
    >  - Task is no extended task. (Service Protection:) 
    >  - Task's owner application is not accessible. 
    >  - Caller's access rights are not sufficient. E_OS_STATE (EXTENDED 
    status:) Referenced task is in SUSPENDED state. E_OS_CALLEVEL 
    (EXTENDED status:) Called from invalid context. E_OS_DISABLEDINT 
    (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service GetEvent(). 
    Particularities and Limitations 
    Pre-Condition: Task is assigned to the current core. 
    This service returns the state of all event bits of the given task, not the events that the task is waiting for.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-28   GetEvent 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    204 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.29  WaitEvent 
    Prototype 
    StatusType WaitEvent (EventMaskType Mask) 
    Parameter 
    Mask [in] 
    Mask of the events waited for. 
    Return code 
    StatusType 
    E_OK No error. E_OS_ACCESS (EXTENDED status:) Task is no extended 
    task. E_OS_RESOURCE (EXTENDED status:) Task still occupies resources. 
    E_OS_SPINLOCK (EXTENDED status:) Task still holds spinlocks. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service WaitEvent(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The state of the current task is set to WAITING, unless at least one of the given events is set.  
    Call context 
    >  TASK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-29   WaitEvent 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    205 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.30  IncrementCounter 
    Prototype 
    StatusType IncrementCounter (CounterType CounterID) 
    Parameter 
    CounterID [in] 
    The counter to be incremented. 
    Return code 
    StatusType 
    >  E_OK No Error. E_OS_ID (EXTENDED status:) CounterID is not a valid 
    software counter ID. E_OS_CALLEVEL (EXTENDED status:) Called from 
    invalid context. E_OS_CORE (EXTENDED status:) The given object 
    belongs to a foreign core. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given counter's owner application is not accessible. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. 
    Functional Description 
    OS service IncrementCounter(). 
    Particularities and Limitations 
    Pre-Condition: None 
     
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-30   IncrementCounter 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    206 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.31  GetCounterValue 
    Prototype 
    StatusType GetCounterValue (CounterType CounterID, TickRefType Value) 
    Parameter 
    CounterID [in] 
    The counter to be read. 
    Value [out] 
    Contains the current tick value of the counter. 
    Return code 
    StatusType 
    >  E_OK No Error. E_OS_ID (EXTENDED status:) Invalid CounterID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is NULL. 
    E_OS_ACCESS (Service Protection:) 
    >  - Counter's owner application is not accessible. 
    >  - Caller's access rights are not sufficient. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service GetCounterValue(). 
    Particularities and Limitations 
    Pre-Condition: None 
     
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-31   GetCounterValue 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    207 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.32  GetElapsedValue 
    Prototype 
    FUNC(StatusType, OS_CODE) GetElapsedValue (CounterType CounterID, 
    TickRefType Value, TickRefType ElapsedValue) 
    Parameter 
    CounterID [in] 
    The counter to be read. 
    Value [in,out] 
    **in:** The previously read tick value of the counter. 
    **out:** The current tick value of the counter. 
    ElapsedValue [out] 
    The difference to the previous read value. 
    Return code 
    StatusType 
    >  E_OK No Error. E_OS_ID (EXTENDED status:) Invalid CounterID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_VALUE (EXTENDED status:) The given Value was not valid. 
    E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is NULL. 
    E_OS_ACCESS (Service Protection:) 
    >  - Counter's owner application is not accessible. 
    >  - Caller's access rights are not sufficient. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service GetElapsedValue(). 
    Particularities and Limitations 
    Pre-Condition: None 
     
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-32   GetElapsedValue 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    208 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.33  GetAlarmBase 
    Prototype 
    FUNC(StatusType, OS_CODE) GetAlarmBase (AlarmType AlarmID, 
    AlarmBaseRefType Info) 
    Parameter 
    AlarmID [in] 
    Reference to the alarm element. 
    Info [out] 
    Contains information about the counter on successful return. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid AlarmID. 
    E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is NULL. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given task's owner application is not accessible. 
    Functional Description 
    OS service GetAlarmBase(). 
    Particularities and Limitations 
    Pre-Condition: Given object pointer(s) are valid. 
    The system service GetAlarmBase reads the alarm base characteristics. The return value Info is a structure 
    in which the information of data type AlarmBaseType is stored.  
    Call context 
    >  TASK|ISR2|PRETHOOK|POSTTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-33   GetAlarmBase 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    209 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.34  GetAlarm 
    Prototype 
    FUNC(StatusType, OS_CODE) GetAlarm (AlarmType AlarmID, 
    TickRefType Tick) 
    Parameter 
    AlarmID [in] 
    Reference to the alarm element. 
    Tick [out] 
    Relative value in ticks before the alarm expires. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_NOFUNC Alarm is not in use. E_OS_ID 
    (EXTENDED status:) Invalid AlarmID. E_OS_PARAM_POINTER 
    (EXTENDED status:) Given pointer is NULL. E_OS_CALLEVEL 
    (EXTENDED status:) Called from invalid context. E_OS_DISABLEDINT 
    (Service Protection:) Caller is in interrupt API sequence. E_OS_ACCESS 
    (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given task's owner application is not accessible. 
    Functional Description 
    OS service GetAlarm(). 
    Particularities and Limitations 
    The given alarm is assigned to the local core. 
    It is up to the application to decide whether for example a CancelAlarm may still be useful. If AlarmID is not 
    in use, Tick is not defined. Allowed on task level, ISR, and in several hook routines.  
    Call context 
    >  TASK|ISR2|PRETHOOK|POSTTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-34   GetAlarm 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    210 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.35  SetRelAlarm 
    Prototype 
    StatusType SetRelAlarm (AlarmType AlarmID, TickType Increment, TickType Cycle) 
    Parameter 
    AlarmID [in] 
    Reference to the alarm element. 
    Increment [in] 
    Relative value in ticks. 
    Cycle [in] 
    Cycle value in case of cyclic alarm. In case of single alarms, cycle shall be 
    zero. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Alarm is already in use. E_OS_ID 
    (EXTENDED status:) Invalid AlarmID. E_OS_VALUE Returned if: 
    >  - Value of increment is zero 
    >  - (EXTENDED status:) Value of Increment outside of the admissible limits 
    (lower than zero or greater than maxallowedvalue). 
    >  - (EXTENDED status:) Value of Cycle unequal to 0 and outside of the 
    admissible counter limits (less than mincycle or greater than 
    maxallowedvalue). E_OS_CALLEVEL (EXTENDED status:) Called from 
    invalid context. E_OS_DISABLEDINT (Service Protection:) Caller is in 
    interrupt API sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given alarm's owner application is not accessible. other See 
    Os_XSigSend_SetRelAlarm() and Os_XSigRecv_SetRelAlarm(). 
    Functional Description 
    OS service SetRelAlarm(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The system service occupies the alarm AlarmID element. After increment ticks have elapsed, the task 
    assigned to the alarm AlarmID is activated or the assigned event (only for extended tasks) is set or the 
    alarm-callback routine is called.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-35   SetRelAlarm 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    211 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.36  SetAbsAlarm 
    Prototype 
    StatusType SetAbsAlarm (AlarmType AlarmID, TickType Start, TickType Cycle) 
    Parameter 
    AlarmID [in] 
    Reference to the alarm element. 
    Start [in] 
    Absolute value in ticks. 
    Cycle [in] 
    Cycle value in case of cyclic alarm. In case of single alarms, cycle shall be 
    zero. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Alarm is already in use. E_OS_ID 
    (EXTENDED status:) Invalid AlarmID. E_OS_VALUE (EXTENDED status:) 
    Returned if: 
    >  - Value of Start outside of the admissible counter limit (less than zero or 
    greater than maxallowedvalue). 
    >  - Value of Cycle unequal to 0 and outside of the admissible counter limits 
    (less than mincycle or greater than maxallowedvalue). E_OS_CALLEVEL 
    (EXTENDED status:) Called from invalid context. E_OS_DISABLEDINT 
    (Service Protection:) Caller is in interrupt API sequence. E_OS_ACCESS 
    (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given alarm's owner application is not accessible. other See 
    Os_XSigSend_SetAbsAlarm() and Os_XSigRecv_SetAbsAlarm(). 
    Functional Description 
    OS service SetAbsAlarm(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The system service occupies the alarm AlarmID element. When start ticks are reached, the task assigned 
    to the alarm AlarmID is activated or the assigned event (only for extended tasks) is set or the alarm-callback 
    routine is called.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-36   SetAbsAlarm 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    212 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.37  CancelAlarm 
    Prototype 
    StatusType CancelAlarm (AlarmType AlarmID) 
    Parameter 
    AlarmID [in] 
    Reference to the alarm element. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_NOFUNC Alarm is not in use. E_OS_ID 
    (EXTENDED status:) Invalid AlarmID. E_OS_CALLEVEL (EXTENDED 
    status:) Called from invalid context. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. E_OS_ACCESS (Service 
    Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given alarm's owner application is not accessible. 
    Functional Description 
    OS service CancelAlarm(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The system service cancels the alarm AlarmID.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-37   CancelAlarm 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    213 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.38  GetResource 
    Prototype 
    StatusType GetResource (ResourceType ResID) 
    Parameter 
    ResID [in] 
    The resource which shall be occupied. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid ResID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_CORE (EXTENDED status:) The given object belongs to a foreign 
    core. E_OS_ACCESS (EXTENDED status:) 
    >  - Statically assigned priority of the caller is higher than the calculated ceiling 
    priority. 
    >  - Attempt to get a resource which is already occupied. (Service Protection:) 
    >  - Caller's access rights are not sufficient. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service GetResource(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This API serves to enter critical sections in the code. A critical section shall always be left using 
    ReleaseResource(). 
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-38   GetResource 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    214 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.39  ReleaseResource 
    Prototype 
    StatusType ReleaseResource (ResourceType ResID) 
    Parameter 
    ResID [in] 
    The resource which shall be released. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid ResID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_CORE (EXTENDED status:) The given object belongs to a foreign 
    core. E_OS_NOFUNC (EXTENDED status:) 
    >  - Attempt to release a resource which has not been occupied by the caller 
    before. 
    >  - Attempt to release a nested resource in wrong order. E_OS_SPINLOCK 
    (EXTENDED status:) Spinlock and Resource API not used in LIFO order. 
    E_OS_ACCESS (EXTENDED status:) 
    >  - Attempt to release a resource which has a lower ceiling priority than the 
    statically assigned priority of the caller. (Service Protection:) 
    >  - Caller's access rights are not sufficient. E_OS_DISABLEDINT (Service 
    Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service ReleaseResource(). 
    Particularities and Limitations 
    This API is the counterpart of GetResource() and serves to leave critical sections in the code.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-39   ReleaseResource 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    215 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.40  StartScheduleTableRel 
    Prototype 
    StatusType StartScheduleTableRel (ScheduleTableType ScheduleTableID, TickType 
    Offset) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table to be started. 
    Offset [in] 
    The relative offset when the schedule table shall be started. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Schedule table has already been started. 
    E_OS_ID (EXTENDED status:) Invalid ScheduleTableID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_VALUE (EXTENDED status:) Offset is bigger than 
    (OsCounterMaxAllowedValue - InitialOffset) or is equal to zero 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service StartScheduleTableRel(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The schedule table is started at a relative offset to the current time.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-40   StartScheduleTableRel 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    216 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.41  StartScheduleTableAbs 
    Prototype 
    StatusType StartScheduleTableAbs (ScheduleTableType ScheduleTableID, TickType 
    Start) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table to be started 
    Start [in] 
    The absolute time when the schedule table shall be started 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Schedule table has already been started. 
    E_OS_ID (EXTENDED status:) Invalid ScheduleTableID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_VALUE (EXTENDED status:) Offset is bigger than 
    OsCounterMaxAllowedValue E_OS_DISABLEDINT (Service Protection:) 
    Caller is in interrupt API sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service StartScheduleTableAbs(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The schedule table is started at an absolute time.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-41   StartScheduleTableAbs 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    217 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.42  StopScheduleTable 
    Prototype 
    StatusType StopScheduleTable (ScheduleTableType ScheduleTableID) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table to be stopped. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_NOFUNC Schedule table has already been 
    stopped. E_OS_ID (EXTENDED status:) Invalid ScheduleTableID. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service StopScheduleTable(). 
    Particularities and Limitations 
    Pre-Condition: None 
    The schedule table is stopped immediately.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-42   StopScheduleTable 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    218 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.43  NextScheduleTable 
    Prototype 
    StatusType NextScheduleTable (ScheduleTableType ScheduleTableID_From, 
    ScheduleTableType ScheduleTableID_To) 
    Parameter 
    ScheduleTableID_From [in]  The ID of the schedule table which is requested to stop at its end 
    ScheduleTableID_To [in] 
    The ID of the schedule table which starts after the other one has stopped 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_NOFUNC Schedule table ScheduleTableID_From 
    has not been started. E_OS_STATE Schedule table ScheduleTableID_To 
    has already been requested to start at the end of another schedule table. 
    E_OS_ID (EXTENDED status:) Invalid ScheduleTableID_From/To. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API 
    sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service NextScheduleTable(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Requests the switch of schedule table processing from one schedule table to another after the first one has 
    reached its end.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-43   NextScheduleTable 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    219 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.44  GetScheduleTableStatus 
    Prototype 
    FUNC(StatusType, OS_CODE) GetScheduleTableStatus 
    ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table for which the status shall be requested. 
    ScheduleStatus [out] 
    Reference to ScheduleTableStatusType. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_ID (EXTENDED status:) Invalid ScheduleTableID 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_PARAM_POINTER (EXTENDED status:) ScheduleStatus is a 
    pointer to null. E_OS_DISABLEDINT (Service Protection:) Caller is in 
    interrupt API sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service GetScheduleTableStatus(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service queries the state of a schedule table (also with respect to synchronization).  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-44   GetScheduleTableStatus 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    220 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.45  StartScheduleTableSynchron 
    Prototype 
    StatusType StartScheduleTableSynchron (ScheduleTableType ScheduleTableID) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table which shall start synchronously 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Schedule table ScheduleTableID has 
    already been started. E_OS_ID (EXTENDED status:) Invalid 
    ScheduleTableID. E_OS_CORE (EXTENDED status:) The given object 
    belongs to a foreign core. E_OS_CALLEVEL (EXTENDED status:) Called 
    from invalid context. E_OS_DISABLEDINT (Service Protection:) Caller is in 
    interrupt API sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service StartScheduleTableSynchron(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service starts an explicitly synchronized schedule table synchronously. As a result the schedule table 
    enters the state SCHEDULETABLE_WAITING and waits for a synchronization count to be provided.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-45   StartScheduleTableSynchron 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    221 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.46  SyncScheduleTable 
    Prototype 
    StatusType SyncScheduleTable (ScheduleTableType ScheduleTableID, TickType 
    Value) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table to the synchronized 
    Value [in] 
    The current value of the synchronization counter 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE The state of the schedule table 
    ScheduleTableId is equal to SCHEDULETABLE_STOPPED or 
    SCHEDULETABLE_NEXT. E_OS_ID (EXTENDED status:) Invalid 
    ScheduleTableID. E_OS_CORE (EXTENDED status:) The given object 
    belongs to a foreign core. E_OS_CALLEVEL (EXTENDED status:) Called 
    from invalid context. E_OS_VALUE (EXTENDED status:) The Value is out 
    of range E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service SyncScheduleTable(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service provides the schedule table with a synchronization count and starts the synchronization.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-46   SyncScheduleTable 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    222 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.47  SetScheduleTableAsync 
    Prototype 
    StatusType SetScheduleTableAsync (ScheduleTableType ScheduleTableID) 
    Parameter 
    ScheduleTableID [in] 
    The ID of the schedule table which shall no longer be synchronized. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_STATE Current state of ScheduleTableID is 
    SCHEDULETABLE_STOPPED, SCHEDULETABLE_NEXT or 
    SCHEDULETABLE_WAITING. E_OS_ID (EXTENDED status:) 
    >  - Invalid ScheduleTableID. 
    >  - OsScheduleTblSyncStrategy of ScheduleTableID is not equal to 
    EXPLICIT E_OS_CORE (EXTENDED status:) The given object belongs to 
    a foreign core. E_OS_CALLEVEL (EXTENDED status:) Called from invalid 
    context. E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt 
    API sequence. E_OS_ACCESS (Service Protection:) 
    >  - Caller's access rights are not sufficient. 
    >  - Given schedule table's owner application is not accessible. 
    Functional Description 
    OS service SetScheduleTableAsync(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service stops the synchronization of a schedule table.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-47   SetScheduleTableAsync 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    223 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.48  GetApplicationID 
    Prototype 
    ApplicationType GetApplicationID (void) 
    Parameter 
    void 
    none 
    Return code 
    ApplicationType 
    Identifier of the OS-Application. 
    Functional Description 
    OS service GetApplicationID(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service determines the OS-Application where the caller (Task/ISR/Hook) originally belongs to (was 
    configured to). All system objects (e.g. system hooks, idle task, ...) belong to kernel applications. Kernel 
    applications are regular applications and have valid identifiers. Therefore INVALID_OSAPPLICATION is 
    never returned because there is always a valid application active.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-48   GetApplicationID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    224 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.49  GetCurrentApplicationID 
    Prototype 
    ApplicationType GetCurrentApplicationID (void) 
    Parameter 
    void 
    none 
    Return code 
    ApplicationType 
    Identifier of the OS-Application. 
    Functional Description 
    OS service GetCurrentApplicationID(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service determines the OS-Application where the caller (Task/ISR/Hook) of the service is currently 
    executing. Note that, if the caller is not within a CallTrustedFunction() call, the value is equal to the result of 
    GetApplicationID(). 
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-49   GetCurrentApplicationID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    225 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.50  GetApplicationState 
    Prototype 
    StatusType GetApplicationState (ApplicationType Application, 
    ApplicationStateRefType Value) 
    Parameter 
    Application [in] 
    The OS-Application from which the state is requested. 
    Value [out] 
    The current state of the application. 
    Return code 
    StatusType 
    E_OK No error. E_OS_ID (EXTENDED status:) Invalid Application. 
    E_OS_PARAM_POINTER (EXTENDED status:) Given pointer is NULL. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service GetApplicationState(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service returns the current state of an OS-Application.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PRETHOOK|POSTTHOOK|STARTHOOK|SHUTHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-50   GetApplicationState 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    226 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.51  CheckObjectAccess 
    Prototype 
    ObjectAccessType CheckObjectAccess (ApplicationType ApplID, ObjectTypeType 
    ObjectType, Os_ObjectIdType ObjectID) 
    Parameter 
    ApplID [in] 
    OS-Application identifier. 
    ObjectType [in] 
    Type of the following parameter. 
    ObjectID [in] 
    The object to be examined. 
    Return code 
    ObjectAccessType 
    >  ACCESS if the ApplID has access to the object. NO_ACCESS If: 
    >  - ApplID doesn't have access to the object. 
    >  - ApplID is invalid. 
    >  - ObjectID is invalid. 
    Functional Description 
    OS service CheckObjectAccess(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service determines if the OS-Application, given by ApplID, is allowed to use the IDs of a Task, 
    Resource, Counter, Alarm or Schedule Table in API calls.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-51   CheckObjectAccess 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    227 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.52  CheckObjectOwnership 
    Prototype 
    ApplicationType CheckObjectOwnership (ObjectTypeType ObjectType, 
    Os_ObjectIdType ObjectID) 
    Parameter 
    ObjectType [in] 
    Type of the following parameter. 
    ObjectID [in] 
    The object to be examined. 
    Return code 
    ApplicationType 
    Identifier of the owner OS-Application. INVALID_OSAPPLICATION if the object 
    does not exist. 
    Functional Description 
    OS service CheckObjectOwnership(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service determines to which OS-Application a given Task, ISR, Counter, Alarm or Schedule Table 
    belongs.  
    Call context 
    >  TASK|ISR2|ERRHOOK|PROTHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-52   CheckObjectOwnership 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    228 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.53  AllowAccess 
    Prototype 
    StatusType AllowAccess (void) 
    Parameter 
    void 
    none 
    Return code 
    StatusType 
    E_OK No error. E_OS_STATE The application is not in the restarting state. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_DISABLEDINT (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service AllowAccess(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service sets the state of the current OS-Application from APPLICATION_RESTARTING to 
    APPLICATION_ACCESSIBLE.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-53   AllowAccess 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    229 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.54  TerminateApplication 
    Prototype 
    StatusType TerminateApplication (ApplicationType Application, RestartType 
    RestartOption) 
    Parameter 
    Application [in] 
    The identifier of the OS-Application to be terminated. If the caller belongs to 
    Application the call results in a self-termination. 
    RestartOption [in] 
    Either RESTART for doing a restart of the OS-Application or NO_RESTART if 
    OS-Application shall not be restarted. 
    Return code 
    StatusType 
    >  E_OK No errors E_OS_STATE The state of Application does not allow 
    terminating it: 
    >  - The application is already terminated. 
    >  - The application is restarting AND the caller does not belong to the 
    application. 
    >  - The application is restarting AND the caller does belong to the application 
    AND the RestartOption is RESTART. E_OS_ID (EXTENDED status:) 
    Application was not valid. E_OS_VALUE (EXTENDED status:) 
    RestartOption was neither RESTART nor NO_RESTART. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_ACCESS (EXTENDED status:) The caller belongs to a non-trusted 
    OS-Application AND the caller does not belong to given Application 
    TerminateApplication() shall return E_OS_ACCESS. E_OS_DISABLEDINT 
    (Service Protection:) Caller is in interrupt API sequence. 
    Functional Description 
    OS service TerminateApplication(). 
    Particularities and Limitations 
    Pre-Condition: None 
    This service terminates the OS-Application to which the calling Task/ISR/application specific error hook 
    belongs.  
    Call context 
    >  TASK|ISR2|ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-54   TerminateApplication 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    230 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.55  CallTrustedFunction 
    Prototype 
    StatusType CallTrustedFunction (TrustedFunctionIndexType FunctionIndex, 
    TrustedFunctionParameterRefType FunctionParams) 
    Parameter 
    FunctionIndex [in] 
    Index of the function to be called. 
    FunctionParams [in] 
    Pointer to the parameters for the function. If no parameters are provided, a 
    NULL pointer has to be passed. 
    Return code 
    StatusType 
    >  E_OK No error. E_OS_SERVICEID No function defined for this index. 
    E_OS_CALLEVEL (EXTENDED status:) Called from invalid context. 
    E_OS_ACCESS (EXTENDED status:) The given object belongs to a 
    foreign core. E_OS_ACCESS (Service Protection:) 
    >  - Owner application is not accessible. 
    Functional Description 
    OS service CallTrustedFunction(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Each trusted OS-Application may export services which are callable from other OS-Applications.  
    Call context 
    >  TASK|ISR2 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-55   CallTrustedFunction 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    231 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.56  Check Task Memory Access 
    Prototype 
    FUNC(AccessType, OS_CODE) CheckTaskMemoryAccess( 
      TaskType TaskID, 
      MemoryStartAddressType Address, 
      MemorySizeType Size 

    Parameter 
    TaskID 
    ID of task 
    Address 
    Start address of checked address range 
    Size 
    Size of checked address range 
    Return code 
    AccessType 
    Returns the access rights of the Task to the given address range 
    Functional Description 
    The service distinguishes the memory access rights of a given Task. 
    Particularities and Limitations 
    >  The access checks are based upon the “OsAccessCheckRegion” configuration objects. 
    >  The return value of this functions is typically used with the AUTOSAR OS specified macros 
    >  OSMEMORY_IS_READABLE 
    >  OSMEMORY_IS_WRITEABLE 
    >  OSMEMORY_IS_EXECUTABLE 
    >  OSMEMORY_IS_STACKSPACE 
    Table 5-56   API Service CheckTaskMemoryAccess 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    232 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.57  Check ISR Memory Access 
    Prototype 
    FUNC(AccessType, OS_CODE) CheckISRMemoryAccess( 
      ISRType ISRID, 
      MemoryStartAddressType Address, 
      MemorySizeType Size 

    Parameter 
    ISRID 
    ID of category 2 ISR 
    Address 
    Start address of checked address range 
    Size 
    Size of checked address range 
    Return code 
    AccessType 
    Returns the access rights of the ISR to the given address range 
    Functional Description 
    The service distinguishes the memory access rights of a given category 2 ISR 
    Particularities and Limitations 
    >  The access checks are based upon the “OsAccessCheckRegion” configuration objects. 
    >  The return value of this functions is typically used with the AUTOSAR OS specified macros 
    >  OSMEMORY_IS_READABLE 
    >  OSMEMORY_IS_WRITEABLE 
    >  OSMEMORY_IS_EXECUTABLE 
    >  OSMEMORY_IS_STACKSPACE 
    Table 5-57   API Service CheckISRMemoryAccess 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    233 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.58  OSErrorGetServiceId 
    Prototype 
    OSServiceIdType OSErrorGetServiceId (void) 
    Parameter 
    void 
    none 
    Return code 
    OSServiceIdType 
    none 
    Functional Description 
    OS service OSErrorGetServiceId(). 
    Particularities and Limitations 
    Pre-Condition: None 
    Provides the service identifier where the error has been risen.  
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-58   OSErrorGetServiceId 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    234 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.59  OSError_Os_DisableInterruptSource_ISRID 
    Prototype 
    ISRType OSError_Os_DisableInterruptSource_ISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ISRID of a faulty Os_DisableInterruptSource call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-59   OSError_Os_DisableInterruptSource_ISRID 
    5.1.60  OSError_Os_EnableInterruptSource_ISRID 
    Prototype 
    ISRType OSError_Os_EnableInterruptSource_ISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ISRID of a faulty Os_EnableInterruptSource call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-60   OSError_Os_EnableInterruptSource_ISRID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    235 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.61  OSError_Os_EnableInterruptSource_ClearPending 
    Prototype 
    boolean OSError_Os_EnableInterruptSource_ClearPending (void) 
    Parameter 
    void 
    none 
    Return code 
    boolean 
    Requested parameter value. 
    Functional Description 
    Returns parameter ClearPending of a faulty Os_EnableInterruptSource call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-61   OSError_Os_EnableInterruptSource_ClearPending 
    5.1.62  OSError_Os_ClearPendingInterrupt_ISRID 
    Prototype 
    ISRType OSError_Os_ClearPendingInterrupt_ISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ISRID of a faulty Os_ClearPendingInterrupt call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-62   OSError_Os_ClearPendingInterrupt_ISRID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    236 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.63  OSError_Os_IsInterruptSourceEnabled_ISRID 
    Prototype 
    ISRType OSError_Os_IsInterruptSourceEnabled_ISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ISRID of a faulty Os_IsInterruptSourceEnabled call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-63   OSError_Os_IsInterruptSourceEnabled_ISRID 
    5.1.64  OSError_Os_IsInterruptSourceEnabled_IsEnabled 
    Prototype 
    boolean * OSError_Os_IsInterruptSourceEnabled_IsEnabled (void) 
    Parameter 
    void 
    none 
    Return code 
    boolean * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IsEnabled of a faulty Os_IsInterruptSourceEnabled call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-64   OSError_Os_IsInterruptSourceEnabled_IsEnabled 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    237 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.65  OSError_Os_IsInterruptPending_ISRID 
    Prototype 
    ISRType OSError_Os_IsInterruptPending_ISRID (void) 
    Parameter 
    void 
    none 
    Return code 
    ISRType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ISRID of a faulty Os_IsInterruptPending call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-65   OSError_Os_IsInterruptPending_ISRID 
    5.1.66  OSError_Os_IsInterruptPending_IsPending 
    Prototype 
    boolean * OSError_Os_IsInterruptPending_IsPending (void) 
    Parameter 
    void 
    none 
    Return code 
    boolean * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IsPending of a faulty Os_IsInterruptPending_IsPending call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-66   OSError_Os_IsInterruptPending_IsPending 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    238 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.67  OSError_CallTrustedFunction_FunctionIndex 
    Prototype 
    TrustedFunctionIndexType OSError_CallTrustedFunction_FunctionIndex (void) 
    Parameter 
    void 
    none 
    Return code 
    TrustedFunctionIndexType  Requested parameter value. 
    Functional Description 
    Returns parameter FunctionIndex of a faulty CallTrustedFunction call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-67   OSError_CallTrustedFunction_FunctionIndex 
    5.1.68  OSError_CallTrustedFunction_FunctionParams 
    Prototype 
    TrustedFunctionParameterRefType OSError_CallTrustedFunction_FunctionParams 
    (void) 
    Parameter 
    void 
    none 
    Return code 
    TrustedFunctionParameterRefType  Requested parameter value. 
    Functional Description 
    Returns parameter FunctionParams of a faulty CallTrustedFunction call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-68   OSError_CallTrustedFunction_FunctionParams 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    239 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.69  OSError_CallNonTrustedFunction_FunctionIndex 
    Prototype 
    Os_NonTrustedFunctionIndexType OSError_CallNonTrustedFunction_FunctionIndex 
    (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_NonTrustedFunctionIndexType  Requested parameter value. 
    Functional Description 
    Returns parameter FunctionIndex of a faulty CallTrustedFunction call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-69   OSError_CallNonTrustedFunction_FunctionIndex 
    5.1.70  OSError_CallNonTrustedFunction_FunctionParams 
    Prototype 
    Os_NonTrustedFunctionParameterRefType 
    OSError_CallNonTrustedFunction_FunctionParams (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_NonTrustedFunctionParameterRefType  Requested parameter value. 
    Functional Description 
    Returns parameter FunctionParams of a faulty CallNonTrustedFunction call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-70   OSError_CallNonTrustedFunction_FunctionParams 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    240 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.71  OSError_StartScheduleTableRel_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_StartScheduleTableRel_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty StartScheduleTableRel call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-71   OSError_StartScheduleTableRel_ScheduleTableID 
    5.1.72  OSError_StartScheduleTableRel_Offset 
    Prototype 
    TickType OSError_StartScheduleTableRel_Offset (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Offset of a faulty StartScheduleTableRel call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-72   OSError_StartScheduleTableRel_Offset 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    241 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.73  OSError_StartScheduleTableAbs_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_StartScheduleTableAbs_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty StartScheduleTableAbs call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-73   OSError_StartScheduleTableAbs_ScheduleTableID 
    5.1.74  OSError_StartScheduleTableAbs_Start 
    Prototype 
    TickType OSError_StartScheduleTableAbs_Start (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Start of a faulty StartScheduleTableAbs call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-74   OSError_StartScheduleTableAbs_Start 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    242 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.75  OSError_StopScheduleTable_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_StopScheduleTable_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty StopScheduleTable call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-75   OSError_StopScheduleTable_ScheduleTableID 
    5.1.76  OSError_NextScheduleTable_ScheduleTableID_From 
    Prototype 
    ScheduleTableType OSError_NextScheduleTable_ScheduleTableID_From (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID_From of a faulty NextScheduleTable call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-76   OSError_NextScheduleTable_ScheduleTableID_From 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    243 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.77  OSError_NextScheduleTable_ScheduleTableID_To 
    Prototype 
    ScheduleTableType OSError_NextScheduleTable_ScheduleTableID_To (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID_To of a faulty NextScheduleTable call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-77   OSError_NextScheduleTable_ScheduleTableID_To 
    5.1.78  OSError_StartScheduleTableSynchron_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_StartScheduleTableSynchron_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty StartScheduleTableSynchron call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-78   OSError_StartScheduleTableSynchron_ScheduleTableID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    244 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.79  OSError_SyncScheduleTable_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_SyncScheduleTable_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty SyncScheduleTable call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-79   OSError_SyncScheduleTable_ScheduleTableID 
    5.1.80  OSError_SyncScheduleTable_Value 
    Prototype 
    TickType OSError_SyncScheduleTable_Value (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Value of a faulty SyncScheduleTable call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-80   OSError_SyncScheduleTable_Value 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    245 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.81  OSError_SetScheduleTableAsync_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_SetScheduleTableAsync_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty SetScheduleTableAsync call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-81   OSError_SetScheduleTableAsync_ScheduleTableID 
    5.1.82  OSError_GetScheduleTableStatus_ScheduleTableID 
    Prototype 
    ScheduleTableType OSError_GetScheduleTableStatus_ScheduleTableID (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleTableID of a faulty GetScheduleTableStatus call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-82   OSError_GetScheduleTableStatus_ScheduleTableID 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    246 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.83  OSError_GetScheduleTableStatus_ScheduleStatus 
    Prototype 
    ScheduleTableStatusRefType OSError_GetScheduleTableStatus_ScheduleStatus (void) 
    Parameter 
    void 
    none 
    Return code 
    ScheduleTableType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ScheduleStatus of a faulty GetScheduleTableStatus call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-83   OSError_GetScheduleTableStatus_ScheduleStatus 
     
    5.1.84  OSError_IncrementCounter_CounterID 
    Prototype 
    CounterType OSError_IncrementCounter_CounterID (void) 
    Parameter 
    void 
    none 
    Return code 
    CounterType 
    Requested parameter value. 
    Functional Description 
    Returns parameter CounterID of a faulty IncrementCounter call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-84   OSError_IncrementCounter_CounterID 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    247 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.85  OSError_GetCounterValue_CounterID 
    Prototype 
    CounterType OSError_GetCounterValue_CounterID (void) 
    Parameter 
    void 
    none 
    Return code 
    CounterType 
    Requested parameter value. 
    Functional Description 
    Returns parameter CounterID of a faulty GetCounterValue call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-85   OSError_GetCounterValue_CounterID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    248 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.86  OSError_GetCounterValue_Value 
    Prototype 
    TickRefType OSError_GetCounterValue_Value (void) 
    Parameter 
    void 
    none 
    Return code 
    TickRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Value of a faulty GetCounterValue call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-86   OSError_GetCounterValue_Value 
    5.1.87  OSError_GetElapsedValue_CounterID 
    Prototype 
    CounterType OSError_GetElapsedValue_CounterID (void) 
    Parameter 
    void 
    none 
    Return code 
    CounterType 
    Requested parameter value. 
    Functional Description 
    Returns parameter CounterID of a faulty GetElapsedValue call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-87   OSError_GetElapsedValue_CounterID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    249 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.88  OSError_GetElapsedValue_Value 
    Prototype 
    TickRefType OSError_GetElapsedValue_Value (void) 
    Parameter 
    void 
    none 
    Return code 
    TickRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Value of a faulty GetElapsedValue call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-88   OSError_GetElapsedValue_Value 
    5.1.89  OSError_GetElapsedValue_ElapsedValue 
    Prototype 
    TickRefType OSError_GetElapsedValue_ElapsedValue (void) 
    Parameter 
    void 
    none 
    Return code 
    TickRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ElapsedValue of a faulty GetElapsedValue call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-89   OSError_GetElapsedValue_ElapsedValue 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    250 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.90  OSError_TerminateApplication_Application 
    Prototype 
    ApplicationType OSError_TerminateApplication_Application (void) 
    Parameter 
    void 
    none 
    Return code 
    ApplicationType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Application of a faulty TerminateApplication call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-90   OSError_TerminateApplication_Application 
    5.1.91  OSError_TerminateApplication_RestartOption 
    Prototype 
    RestartType OSError_TerminateApplication_RestartOption (void) 
    Parameter 
    void 
    none 
    Return code 
    RestartType 
    Requested parameter value. 
    Functional Description 
    Returns parameter RestartOption of a faulty TerminateApplication call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-91   OSError_TerminateApplication_RestartOption 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    251 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.92  OSError_GetApplicationState_Application 
    Prototype 
    ApplicationType OSError_GetApplicationState_Application (void) 
    Parameter 
    void 
    none 
    Return code 
    ApplicationType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Application of a faulty GetApplicationState call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-92   OSError_GetApplicationState_Application 
    5.1.93  OSError_GetApplicationState_Value 
    Prototype 
    ApplicationStateRefType OSError_GetApplicationState_Value (void) 
    Parameter 
    void 
    none 
    Return code 
    ApplicationStateRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Value of a faulty GetApplicationState call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-93   OSError_GetApplicationState_Value 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    252 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.94  OSError_GetSpinlock_SpinlockId 
    Prototype 
    SpinlockIdType OSError_GetSpinlock_SpinlockId (void) 
    Parameter 
    void 
    none 
    Return code 
    SpinlockIdType 
    Requested parameter value. 
    Functional Description 
    Returns parameter SpinlockId of a faulty GetSpinlock call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-94   OSError_GetSpinlock_SpinlockId 
    5.1.95  OSError_ReleaseSpinlock_SpinlockId 
    Prototype 
    SpinlockIdType OSError_ReleaseSpinlock_SpinlockId (void) 
    Parameter 
    void 
    none 
    Return code 
    SpinlockIdType 
    Requested parameter value. 
    Functional Description 
    Returns parameter SpinlockId of a faulty ReleaseSpinlock call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-95   OSError_ReleaseSpinlock_SpinlockId 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    253 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.96  OSError_TryToGetSpinlock_SpinlockId 
    Prototype 
    SpinlockIdType OSError_TryToGetSpinlock_SpinlockId (void) 
    Parameter 
    void 
    none 
    Return code 
    SpinlockIdType 
    Requested parameter value. 
    Functional Description 
    Returns parameter SpinlockId of a faulty TryToGetSpinlock call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-96   OSError_TryToGetSpinlock_SpinlockId 
    5.1.97  OSError_TryToGetSpinlock_Success 
    Prototype 
    TryToGetSpinlockType const * OSError_TryToGetSpinlock_Success (void) 
    Parameter 
    void 
    none 
    Return code 
    TryToGetSpinlockType 
    Requested parameter value. 
    const * 
    Functional Description 
    Returns parameter Success of a faulty TryToGetSpinlock call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-97   OSError_TryToGetSpinlock_Success 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    254 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.98  OSError_ControlIdle_CoreID 
    Prototype 
    CoreIdType OSError_ControlIdle_CoreID (void) 
    Parameter 
    void 
    none 
    Return code 
    CoreIdType 
    Requested parameter value. 
    Functional Description 
    Returns parameter CoreID of a faulty ControlIdle call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-98   OSError_ControlIdle_CoreID 
     
    5.1.99  OSError_Os_GetExceptionContext_Context 
    Prototype 
    Os_ExceptionContextRefType OSError_Os_GetExceptionContext_Context (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_ExceptionContextRefType  Requested parameter value. 
    Functional Description 
    Returns parameter Context of a faulty Os_GetExceptionContext call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-99   OSError_Os_GetExceptionContext_Context 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    255 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.100 OSError_Os_SetExceptionContext_Context 
    Prototype 
    Os_ExceptionContextRefType OSError_Os_SetExceptionContext_Context (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_ExceptionContextRefType  Requested parameter value. 
    Functional Description 
    Returns parameter Context of a faulty Os_SetExceptionContext call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-100  OSError_Os_SetExceptionContext_Context 
    5.1.101 OSError_ControlIdle_IdleMode 
    Prototype 
    IdleModeType OSError_ControlIdle_IdleMode (void) 
    Parameter 
    void 
    none 
    Return code 
    IdleModeType 
    Requested parameter value. 
    Functional Description 
    Returns parameter IdleMode of a faulty ControlIdle call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-101  OSError_ControlIdle_IdleMode 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    256 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.102 OSError_IocSend_IN 
    Prototype 
    void const * OSError_IocSend_IN (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IN of a faulty IocSend call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-102  OSError_IocSend_IN 
    5.1.103 OSError_IocWrite_IN 
    Prototype 
    void const * OSError_IocWrite_IN (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IN of a faulty IocWrite call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-103  OSError_IocWrite_IN 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    257 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.104 OSError_IocSendGroup_IN 
    Prototype 
    void const * OSError_IocSendGroup_IN (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IN of a faulty IocSendGroup call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-104  OSError_IocSendGroup_IN 
    5.1.105 OSError_IocWriteGroup_IN 
    Prototype 
    void const * OSError_IocWriteGroup_IN (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter IN of a faulty IocWriteGroup call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-105  OSError_IocWriteGroup_IN 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    258 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.106 OSError_IocReceive_OUT 
    Prototype 
    void const * OSError_IocReceive_OUT (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter OUT of a faulty IocReceive call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-106  OSError_IocReceive_OUT 
    5.1.107 OSError_IocRead_OUT 
    Prototype 
    void const * OSError_IocRead_OUT (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter OUT of a faulty IocRead call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-107  OSError_IocRead_OUT 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    259 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.108 OSError_IocReceiveGroup_OUT 
    Prototype 
    void const * OSError_IocReceiveGroup_OUT (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter OUT of a faulty IocReceiveGroup call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-108  OSError_IocReceiveGroup_OUT 
    5.1.109 OSError_IocReadGroup_OUT 
    Prototype 
    void const * OSError_IocReadGroup_OUT (void) 
    Parameter 
    void 
    none 
    Return code 
    void const * 
    Requested parameter value. 
    Functional Description 
    Returns parameter OUT of a faulty IocReadGroup call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-109  OSError_IocReadGroup_OUT 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    260 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.110 OSError_StartOS_Mode 
    Prototype 
    AppModeType OSError_StartOS_Mode (void) 
    Parameter 
    void 
    none 
    Return code 
    AppModeType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Mode of a faulty StartOS call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-110  OSError_StartOS_Mode 
    5.1.111 OSError_ActivateTask_TaskID 
    Prototype 
    TaskType OSError_ActivateTask_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty ActivateTask call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-111   OSError_ActivateTask_TaskID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    261 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.112 OSError_ChainTask_TaskID 
    Prototype 
    TaskType OSError_ChainTask_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty ChainTask call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-112  OSError_ChainTask_TaskID 
    5.1.113 OSError_GetTaskID_TaskID 
    Prototype 
    TaskRefType OSError_GetTaskID_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty GetTaskID call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-113  OSError_GetTaskID_TaskID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    262 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.114 OSError_GetTaskState_TaskID 
    Prototype 
    TaskType OSError_GetTaskState_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty GetTaskState call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-114  OSError_GetTaskState_TaskID 
    5.1.115 OSError_GetTaskState_State 
    Prototype 
    TaskStateRefType OSError_GetTaskState_State (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskStateRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter State of a faulty GetTaskState call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-115  OSError_GetTaskState_State 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    263 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.116 OSError_SetEvent_TaskID 
    Prototype 
    TaskType OSError_SetEvent_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty SetEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-116  OSError_SetEvent_TaskID 
    5.1.117 OSError_SetEvent_Mask 
    Prototype 
    EventMaskType OSError_SetEvent_Mask (void) 
    Parameter 
    void 
    none 
    Return code 
    EventMaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Mask of a faulty SetEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-117  OSError_SetEvent_Mask 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    264 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.118 OSError_ClearEvent_Mask 
    Prototype 
    EventMaskType OSError_ClearEvent_Mask (void) 
    Parameter 
    void 
    none 
    Return code 
    EventMaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Mask of a faulty ClearEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-118  OSError_ClearEvent_Mask 
    5.1.119 OSError_GetEvent_TaskID 
    Prototype 
    TaskType OSError_GetEvent_TaskID (void) 
    Parameter 
    void 
    none 
    Return code 
    TaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter TaskID of a faulty GetEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-119  OSError_GetEvent_TaskID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    265 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.120 OSError_GetEvent_Mask 
    Prototype 
    EventMaskRefType OSError_GetEvent_Mask (void) 
    Parameter 
    void 
    none 
    Return code 
    EventMaskRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Mask of a faulty GetEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-120  OSError_GetEvent_Mask 
    5.1.121 OSError_WaitEvent_Mask 
    Prototype 
    EventMaskType OSError_WaitEvent_Mask (void) 
    Parameter 
    void 
    none 
    Return code 
    EventMaskType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Mask of a faulty WaitEvent call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-121  OSError_WaitEvent_Mask 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    266 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.122 OSError_GetAlarmBase_AlarmID 
    Prototype 
    AlarmType OSError_GetAlarmBase_AlarmID (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmType 
    Requested parameter value. 
    Functional Description 
    Returns parameter AlarmID of a faulty GetAlarmBase call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-122  OSError_GetAlarmBase_AlarmID 
    5.1.123 OSError_GetAlarmBase_Info 
    Prototype 
    AlarmBaseRefType OSError_GetAlarmBase_Info (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmBaseRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Info of a faulty GetAlarmBase call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-123  OSError_GetAlarmBase_Info 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    267 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.124 OSError_GetAlarm_AlarmID 
    Prototype 
    AlarmType OSError_GetAlarm_AlarmID (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmType 
    Requested parameter value. 
    Functional Description 
    Returns parameter AlarmID of a faulty GetAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-124  OSError_GetAlarm_AlarmID 
    5.1.125 OSError_GetAlarm_Tick 
    Prototype 
    TickRefType OSError_GetAlarm_Tick (void) 
    Parameter 
    void 
    none 
    Return code 
    TickRefType 
    Requested parameter value. 
    Functional Description 
    Returns parameter Tick of a faulty GetAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-125  OSError_GetAlarm_Tick 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    268 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.126 OSError_SetRelAlarm_AlarmID 
    Prototype 
    AlarmType OSError_SetRelAlarm_AlarmID (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmType 
    Requested parameter value. 
    Functional Description 
    Returns parameter AlarmID of a faulty SetRelAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-126  OSError_SetRelAlarm_AlarmID 
    5.1.127 OSError_SetRelAlarm_increment 
    Prototype 
    TickType OSError_SetRelAlarm_increment (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter increment of a faulty SetRelAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-127  OSError_SetRelAlarm_increment 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    269 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.128 OSError_SetRelAlarm_cycle 
    Prototype 
    TickType OSError_SetRelAlarm_cycle (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter cycle of a faulty SetRelAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-128  OSError_SetRelAlarm_cycle 
    5.1.129 OSError_SetAbsAlarm_AlarmID 
    Prototype 
    AlarmType OSError_SetAbsAlarm_AlarmID (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmType 
    Requested parameter value. 
    Functional Description 
    Returns parameter AlarmID of a faulty SetAbsAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-129  OSError_SetAbsAlarm_AlarmID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    270 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.130 OSError_SetAbsAlarm_start 
    Prototype 
    TickType OSError_SetAbsAlarm_start (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter start of a faulty SetAbsAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-130  OSError_SetAbsAlarm_start 
    5.1.131 OSError_SetAbsAlarm_cycle 
    Prototype 
    TickType OSError_SetAbsAlarm_cycle (void) 
    Parameter 
    void 
    none 
    Return code 
    TickType 
    Requested parameter value. 
    Functional Description 
    Returns parameter cycle of a faulty SetAbsAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-131  OSError_SetAbsAlarm_cycle 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    271 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.132 OSError_CancelAlarm_AlarmID 
    Prototype 
    AlarmType OSError_CancelAlarm_AlarmID (void) 
    Parameter 
    void 
    none 
    Return code 
    AlarmType 
    Requested parameter value. 
    Functional Description 
    Returns parameter AlarmID of a faulty CancelAlarm call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-132  OSError_CancelAlarm_AlarmID 
    5.1.133 OSError_GetResource_ResID 
    Prototype 
    ResourceType OSError_GetResource_ResID (void) 
    Parameter 
    void 
    none 
    Return code 
    ResourceType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ResID of a faulty GetResource call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-133  OSError_GetResource_ResID 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    272 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.134 OSError_ReleaseResource_ResID 
    Prototype 
    ResourceType OSError_ReleaseResource_ResID (void) 
    Parameter 
    void 
    none 
    Return code 
    ResourceType 
    Requested parameter value. 
    Functional Description 
    Returns parameter ResID of a faulty ReleaseResource call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-134  OSError_ReleaseResource_ResID 
    5.1.135 OSError_Os_GetUnhandledIrq_InterruptSource 
    Prototype 
    Os_InterruptSourceIdRefType OSError_Os_GetUnhandledIrq_InterruptSource (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_InterruptSourceIdRefType  Requested parameter value. 
    Functional Description 
    Returns parameter InterruptSource of a faulty Os_GetUnhandledIrq call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-135  OSError_Os_GetUnhandledIrq_InterruptSource 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    273 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.1.136 OSError_Os_GetUnhandledExc_ExceptionSource 
    Prototype 
    Os_ExceptionSourceIdRefType OSError_Os_GetUnhandledExc_ExceptionSource (void) 
    Parameter 
    void 
    none 
    Return code 
    Os_ExceptionSourceIdRefType  Requested parameter value. 
    Functional Description 
    Returns parameter ExceptionSource of a faulty Os_GetUnhandledExc call. 
    Particularities and Limitations 
    Pre-Condition: None 
    --no details-- 
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-136  OSError_Os_GetUnhandledExc_ExceptionSource 
    5.1.137 OSError_BarrierSynchronize_BarrierID 
    Prototype 
    Os_BarrierIdType OSError_BarrierSynchronize_BarrierID(void) 
    Parameter 
    void 
    none 
    Return code 
    Os_BarrierIdType 
    Requested parameter value 
    Functional Description 
    Returns parameter BarrierID of a faulty Os_BarrierSynchronize call. 
    Particularities and Limitations 
    >  Pre-Condition: None  
    Call context 
    >  ERRHOOK 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-137  OSError_BarrierSynchronize_BarrierID 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    274 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2 
    Additional OS services 
    The OS provides the following additional services which are not part of the AUTOSAR OS 
    specification. 
    5.2.1 
    Os_GetVersionInfo 
    Prototype 
    void Os_GetVersionInfo (Std_VersionInfoType *versioninfo) 
    Parameter 
    versioninfo [out] 
    Version information (decimal coded). 
    Return code 
    void 
    none 
    Functional Description 
    AUTOSAR Get Version Information API. 
    Particularities and Limitations 
    Given object pointer(s) are valid. 
    Returns the Published information of MICROSAR OS.  
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-138  Os_GetVersionInfo 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    275 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.2 
    Peripheral Access API 
    The  API  consists  of  read,  write  and  bit  manipulating  functions  for  8,  16  and  32  bit 
    accesses. 
    5.2.2.1 
    Read Functions 
    Prototype 
    FUNC(uint8, OS_CODE) Os_ReadPeripheral8( 
      Os_PeripheralIdType PeripheralID, 
      P2CONST(uint8, AUTOMATIC, OS_APPL_DATA) Address 

    FUNC(uint16, OS_CODE) Os_ReadPeripheral16( 
      Os_PeripheralIdType PeripheralID, 
      P2CONST(uint16, AUTOMATIC, OS_APPL_DATA) Address 

    FUNC(uint32, OS_CODE) Os_ReadPeripheral32( 
      Os_PeripheralIdType PeripheralID, 
      P2CONST(uint32, AUTOMATIC, OS_APPL_DATA) Address 

    Parameter 
    PeripheralID 
    The ID of a configured peripheral region. 
    The symbolic name may be passed here. 
    Address 
    The address of the peripheral register which shall be read. 
    Return code 
    uint8 
    uint16 
    The content of the peripheral register which has been passed in the Address 
    parameter. 
    uint32 
    Functional Description 
    The function distinguishes the address range of the passed peripheral region. It checks whether the 
    parameter “Address” is within this range. Then it checks whether the calling OS application has access 
    rights to the passed peripheral region. 
    If all checks did pass the API returns the content of the passed address 
    Particularities and Limitations 
    >  If one of the performed checks within the API is not passed the OS treats it as a memory protection 
    violation. The ProtectionHook() is called. 
    >  The data alignment of the “Address” parameter is not checked by the service function. Misaligned 
    accesses may lead to exceptions. 
    Table 5-139  Read Peripheral API 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    276 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Note 
    The former names of the API functions osReadPeripheral8(), osReadPeripheral16() 
      and osReadPeripheral32() may also be used (the OS is backward compatible). 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    277 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.2.2 
    Write Functions 
    Prototype 
    FUNC(void, OS_CODE) Os_WritePeripheral8( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint8, AUTOMATIC, OS_APPL_DATA) Address, 
      uint8 Value 

    FUNC(void, OS_CODE) Os_WritePeripheral16( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint16, AUTOMATIC, OS_APPL_DATA) Address, 
      uint16 Value 

    FUNC(void, OS_CODE) Os_WritePeripheral32( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint32, AUTOMATIC, OS_APPL_DATA) Address, 
      uint32 Value 

    Parameter 
    PeripheralID 
    The ID of a configured peripheral region. 
    The symbolic name may be passed here. 
    Address 
    The address of the peripheral register which shall be written. 
    Value uint8 
    Value uint16 
    Value which shall be written to the peripheral register. 
    Value uint32 
    Return code 
    void 
    none 
    Functional Description 
    The function distinguishes the address range of the passed peripheral region. It checks whether the 
    parameter “Address” is within this range. Then it checks whether the calling OS application has access 
    rights to the passed peripheral region. 
    If all checks did pass the OS writes the Value into the peripheral register. 
    Particularities and Limitations 
    >  If one of the performed checks within the API is not passed the OS treats it as a memory protection 
    violation. The ProtectionHook() is called. 
    >  The data alignment of the “Address” parameter is not checked by the service function. Misaligned 
    accesses may lead to exceptions. 
    Table 5-140  Write Peripheral APIs 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    278 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
     
     
    Note 
    The former names of the API functions osWritePeripheral8(), osWritePeripheral16() 
      and osWritePeripheral32() may also be used (the OS is backward compatible). 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    279 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.2.3 
    Bitmask Functions 
    Prototype 
    FUNC(void, OS_CODE) Os_ModifyPeripheral8( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint8, AUTOMATIC, OS_APPL_DATA) Address, 
      uint8 ClearMask, 
      uint8 SetMask 

    FUNC(void, OS_CODE) Os_ModifyPeripheral16( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint16, AUTOMATIC, OS_APPL_DATA) Address, 
      uint16 ClearMask, 
      uint16 SetMask 

    FUNC(void, OS_CODE) Os_ModifyPeripheral32( 
      Os_PeripheralIdType PeripheralID, 
      P2VAR(uint32, AUTOMATIC, OS_APPL_DATA) Address, 
      uint32 ClearMask, 
      uint32 SetMask 

    Parameter 
    PeripheralID 
    The ID of a configured peripheral region. 
    The symbolic name may be passed here. 
    Address 
    The address of the peripheral register which shall be modified. 
    ClearMask uint8 
    ClearMask uint16  The mask for the AND operation. 
    ClearMask uint32 
    SetMask uint8 
    SetMask uint16 
    The mask for the OR operation. 
    SetMask uint32 
    Return code 
    void 
    none 
    Functional Description 
    The function distinguishes the address range of the passed peripheral region. It checks whether the 
    parameter “Address” is within this range. Then it checks whether the calling OS application has access 
    rights to the passed peripheral region. 
    If all checks did pass the OS performs the following operation: 
    Address = (Address & ClearMask) | SetMask; 
    Particularities and Limitations 
    >  If one of the performed checks within the API is not passed the OS treats it as a memory protection 
    violation. The ProtectionHook() is called. 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    280 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    >  The data alignment of the “Address” parameter is not checked by the service function. Misaligned 
    accesses may lead to exceptions. 
    Table 5-141  Bitmask Peripheral API 
     
     
    Note 
    The former names of the API functions osModifyPeripheral8(), osModifyPeripheral16() 
      and osModifyPeripheral32() may also be used (the OS is backward compatible). 
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    281 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.3 
    Pre-Start Task 
    Prototype 
    FUNC(void, OS_CODE) Os_EnterPreStartTask(void) 
    Parameter 
    none 
    Return code 
    none 
    Functional Description 
    The function schedules and dispatches to the pre-start task. The core is initialized that non-trusted function 
    calls can be used safely within this task. 
    Particularities and Limitations 
    >  Has to be called on a core which is started as an AUTOSAR core. 
    >  The core which calls this function must have a configured pre-start task. 
    >  Must only be called once. 
    >  Must be called prior to StartOS() but after Os_Init()  
    Table 5-142  API Service Os_EnterPreStartTask 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    282 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.4 
    Non-Trusted Functions (NTF) 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_CallNonTrustedFunction( 
      Os_NonTrustedFunctionIndexType FunctionIndex, 
      Os_NonTrustedFunctionParameterRefType FunctionParams 

    Parameter 
    FunctionIndex 
    The Index of the non-trusted function. 
    FunctionParams 
    Pointer to parameters which are passed to the non-trusted function. 
    Return code 
    E_OK 
    No error. 
    E_OS_SERVICEID 
    No function defined for this index. 
    E_OS_CALLEVEL  
    Called from invalid context. (EXTENDED status) 
    E_OS_ACCESS  
    The given object belongs to a foreign core. (EXTENDED status) 
    E_OS_ACCESS  
    Owner OS application is not accessible. (Service Protection) 
    E_OS_SYS_NO_NTFSTACK  
    No further NTF-Stacks available. (EXTENDED status) 
    Functional Description 
    Performs a call to the non-trusted function passed in „FunctionIndex“. 
    Particularities and Limitations 
    >  The non-trusted function will not be able to return any values. It has no access rights to the data 
    structure of the caller referenced by the “FunctionParams” parameter. 
    >  This API service may be called with disabled interrupts. 
    Table 5-143  Call Non-Trusted Function API 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    283 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.5 
    Fast Trusted Functions 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_CallFastTrustedFunction 

      Os_FastTrustedFunctionIndexType FunctionIndex, 
      Os_FastTrustedFunctionParameterRefType FunctionParams 

    Parameter 
    FunctionIndex 
    Index of the function to be called. 
    FunctionParams 
    Pointer to the parameters for the function. 
    If no parameters are provided a NULL pointer has to be passed. 
    Return code 
    E_OK 
    No error. 
    E_OS_SERVICEID 
    No function defined for this index. 
    Functional Description 
    Performs a call to the fast trusted function passed in „FunctionIndex“. 
    Particularities and Limitations 
    >  May be called with interrupts disabled 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    284 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    5.2.6 
    Interrupt Source API 
    5.2.6.1 
    Disable Interrupt Source 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_DisableInterruptSource( 
      ISRType ISRID 

    Parameter 
    ISRID 
    The ID of a category 2 ISR. 
    Return code 
    E_OK 
    No error. 
    E_OS_ID 
    ISRID is not a valid category 2 ISR identifier (EXTENDED status) 
    E_OS_CALLEVEL 
    Wrong call context of the API function (EXTENDED status) 
    E_OS_ACCESS 
    The calling application is not the owner of the ISR passed in ISRID (Service 
    Protection) 
    Functional Description 
    MICROSAR OS disables the interrupt source by modifying the interrupt controller registers. 
    Particularities and Limitations 
    >  May be called for category 2 ISRs only. 
    Table 5-144  API Service Os_DisableInterruptSource 
     
     
     
    Caution 

      Depending on target platform (e.g. ARM platforms), the ISR may still become active 
    although Os_DisableInterruptSource has returned E_OK. 
    This may be caused by hardware racing conditions e.g. when the interrupt is requested 
    immediately before the effect of Os_DisableInterruptSource becomes active. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    285 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.6.2 
    Enable Interrupt Source 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_EnableInterruptSource( 
      ISRType ISRID, 
      boolean ClearPending 

    Parameter 
    ISRID 
    The ID of a category 2 ISR. 
    ClearPending 
    Defines whether the pending flag shall be cleared (TRUE) or not (FALSE). 
    Return code 
    E_OK 
    No error. 
    E_OS_ID 
    ISRID is not a valid category 2 ISR identifier ID (EXTENDED status) 
    E_OS_CALLEVEL  
    Wrong call context of the API function (EXTENDED status) 
    E_OS_VALUE  
    The parameter “ClearPending” is not a boolean value (EXTENDED status) 
    E_OS_ACCESS  
    The calling application is not the owner of the ISR passed in ISRID (Service 
    Protection) 
    Functional Description 
    MICROSAR OS enables the interrupt source by modifying the interrupt controller registers. Additionally it 
    may clear the interrupt pending flag 
    Particularities and Limitations 
    >  May be called for category 2 ISRs only 
    Table 5-145  API Service Os_EnableInterruptSource 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    286 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    5.2.6.3 
    Clear Pending Interrupt 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_ClearPendingInterrupt( 
      ISRType ISRID 

    Parameter 
    ISRID 
    The ID of a category 2 ISR. 
    Return code 
    E_OK 
    No errors 
    E_OS_ID 
    ISRID is not a valid category 2 ISR identifier (EXTENDED status) 
    E_OS_CALLEVEL 
    Wrong call context of the API function (EXTENDED status) 
    E_OS_ACCESS 
    The calling application is not the owner of the ISR passed in ISRID (Service 
    Protection) 
    Functional Description 
    MICROSAR OS clears the interrupt pending flag by modifying the interrupt controller registers. 
    Particularities and Limitations 
    >  May be called for category 2 ISRs only 
    Table 5-146  API Service Os_ClearPendingInterrupt 
     
     
     
    Note 

      In order to minimize the risk of spurious interrupts, Os_ClearPendingInterrupt shall be 
    called only after the ISR (IsrId) has been disabled and before it is enabled again. 
     
     
     
     
     
    Note 

      The API service tries to clear the pending flag only. The interrupt cause has to be reset 
    by the application software. Otherwise the flag may be set again immediately after it 
    has been cleared by the API. This may be the case e.g. with level triggered ISRs. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    287 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.6.4 
    Check Interrupt Source Enabled 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_IsInterruptSourceEnabled( 
      ISRType ISRID, 
      P2VAR(boolean, AUTOMATIC, OS_VAR_NOINIT) IsEnabled 

    Parameter 
    ISRID 
    The ID of a category 2 ISR. 
    IsEnabled 
    Defines wether the source of the ISR is enabled (TRUE) or not (FALSE) 
    Return code 
    E_OK 
    No errors 
    E_OS_ID 
    ISRID is not a valid category 2 ISR identifier (EXTENDED status) 
    E_OS_CALLEVEL 
    Wrong call context of the API function (EXTENDED status) 
    E_OS_ACCESS 
    The calling application is not the owner of the ISR passed in ISRID (Service 
    Protection) 
    E_OS_PARAM_POINTER  Given pointer parameter (isEnabled) is NULL (EXTENDED status) 
    Functional Description 
    MICROSAR OS checks if the interrupt source is enabled reading the interrupt controller registers and 
    update the boolean addressed by IsEnabled accordingly 
    Particularities and Limitations 
    >  May be called for category 2 ISRs only 
    Table 5-147  API Service Os_IsInterruptSourceEnabled 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    288 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.6.5 
    Check Interrupt Pending 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_IsInterruptPending( 
      ISRType ISRID, 
      P2VAR(boolean, AUTOMATIC, OS_VAR_NOINIT) IsPending 

    Parameter 
    ISRID 
    The ID of a category 2 ISR. 
    IsPending 
    Defines wether the ISR has been already 
    requesterd (TRUE) or not (FALSE) 
    Return code 
    E_OK 
    No errors 
    E_OS_ID 
    ISRID is not a valid category 2 ISR identifier 
    (EXTENDED status) 
    E_OS_CALLEVEL 
    Wrong call context of the API function 
    (EXTENDED status) 
    E_OS_ACCESS 
    The calling application is not the owner of the 
    ISR passed in ISRID (Service Protection) 
    E_OS_PARAM_POINTER 
    Given pointer parameter (isPending) is NULL 
    (EXTENDED status) 
    E_OS_SYS_UNIMPLEMENTED_FUNCTIONALITY Hardware does not support to check if there are 
    pending interrupts 
    Functional Description 
    MICROSAR OS checks if the ISR has been already requested,  reading the interrupt controller registers 
    and update the boolean addressed by IsPending accordingly 
    Particularities and Limitations 
    >  May be called for category 2 ISRs only 
    Table 5-148  API Service Os_IsInterruptPending 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    289 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.7 
    Detailed Error API 
    5.2.7.1 
    Get detailed Error 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_GetDetailedError( 
      Os_ErrorInformationRefType ErrorRef 

    Parameter 
    ErrorRef 
    Output parameter of type Os_ErrorInformationRefType 
    Return code 
    E_OK 
    No error. 
    E_OS_CALLEVEL 
    Called from invalid context. (EXTENDED status) 
    E_OS_PARAM_POINTER Given parameter pointer is NULL. (EXTENDED status) 
    Functional Description 
    Returns error information of the last error occurred on the local core. 
    Particularities and Limitations 
    >  The ErrorRef output parameter is a struct which holds the 8 bit AUTOSAR error code, the detailed error 
    code and the service ID of the causing API service. 
    Table 5-149  API Service Os_GetDetailedError 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    290 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.7.2 
    Unhandled Interrupt Requests 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_GetUnhandledIrq( 
      Os_InterruptSourceIdRefType InterruptSource 

    Parameter 
    InterruptSource 
    Output parameter of type Os_InterruptSourceIdRefType 
    Return code 
    E_OK 
    No error. 
    E_OS_CORE 
    Called from a non-AUTOSAR core (EXTENDED status) 
    E_OS_PARAM_POINTER Null pointer passed as argument (EXTENDED status) 
    E_OS_STATE 
    No unhandled interrupt reported since start up (EXTENDED status) 
    Functional Description 
    In case of an unhandled interrupt request the triggering interrupt source can be distinguished with this 
    service. 
    Particularities and Limitations 
    >  The return value of this function may be interpreted differently for different controller families. 
    Table 5-150  API Service Os_GetUnhandledIrq 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    291 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.7.3 
    Unhandled Exception Requests 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_GetUnhandledExc( 
      Os_ExceptionSourceIdRefType ExceptionSource 

    Parameter 
    ExceptionSource 
    Output parameter of type Os_ExceptionSourceIdRefType 
    Return code 
    E_OK 
    No error. 
    E_OS_CORE 
    Called from a non-AUTOSAR core (EXTENDED status) 
    E_OS_PARAM_POINTER Null pointer passed as argument (EXTENDED status) 
    E_OS_STATE 
    No unhandled exception reported since start up. (EXTENDED status) 
    Functional Description 
    In case of an unhandled exception request the triggering exception source can be distinguished with this 
    service. 
    Particularities and Limitations 
    >  The return value of this function may be interpreted differently for different controller families. 
    Table 5-151  API Service Os_GetUnhandledExc 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    292 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    5.2.8 
    Stack Usage API 
    All Service API functions which calculate stack usage are working in the same way. 
    >  The service performs error checks: 
    >  validity of passed parameters 
    >  existence of OS Hook routine (if hook stacks are queried) 
    >  cross core checks (when stack sizes are queried of stacks which are located on a 
    foreign core) 
    >  if one of these checks fails, the OS initiates error handling (ErrorHook() is called) 
    >  Calculates the maximum stack usage of the queried stack since call of StartOS() 
    >  Returns the stack usage in bytes 
    >  Stack Usage API services may be called from any context 
    >  Stack Usage API services may be used cross core 
    Stack usage service API Prototypes 
    Parameter 
    FUNC(uint32, OS_CODE) Os_GetTaskStackUsage (TaskType TaskID) 
    Task ID 
    FUNC(uint32, OS_CODE) Os_GetISRStackUsage (ISRType IsrID) 
    ISR ID 
    FUNC(uint32, OS_CODE) Os_GetKernelStackUsage (CoreIdType CoreID) 
    Core ID 
    FUNC(uint32, OS_CODE) Os_GetStartupHookStackUsage(CoreIdType CoreID) 
    Core ID 
    FUNC(uint32, OS_CODE) Os_GetErrorHookStackUsage (CoreIdType CoreID) 
    Core ID 
    FUNC(uint32, OS_CODE) Os_GetShutdownHookStackUsage(CoreIdType CoreID) 
    Core ID 
    FUNC(uint32, OS_CODE) Os_GetProtectionHookStackUsage(CoreIdType CoreID) 
    Core ID 
    Table 5-152  Overview: Stack Usage Functions 
     
     
     
    Caution 
    Any stack usage function must not be used cross core with interrupts disabled. 
     
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    293 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    5.2.9 
    RTE Interrupt API 
    MICROSAR OS provides optimized interrupt en-/disable functions for exclusive usage by 
    the RTE module of Vector. 
     
    API Name 
    Alias (for backward 
    Comment 
    compatibility) 
    Os_DisableLevelAM() 
    osDisableLevelAM() 
    non nestable service to disable all category 
    2 interrupts callable from any mode 
    Os_DisableLevelKM() 
    osDisableLevelKM() 
    non nestable service to disable all category 
    2 interrupts callable from kernel mode 
    Os_DisableLevelUM() 
    osDisableLevelUM() 
    non nestable service to disable all category 
    2 interrupts callable from user mode 
    Os_EnableLevelAM() 
    osEnableLevelAM() 
    non nestable service to enable all category 
    2 interrupts callable from any mode 
    Os_EnableLevelKM() 
    osEnableLevelKM() 
    non nestable service to enable all category 
    2 interrupts callable from kernel mode 
    Os_EnableLevelUM() 
    osEnableLevelUM() 
    non nestable service to enable all category 
    2 interrupts callable from user mode 
    Os_DisableGlobalAM()  osDisableGlobalAM() 
    non nestable service to disable all interrupts 
    callable from any mode 
    Os_DisableGlobalKM()  osDisableGlobalKM() 
    non nestable service to disable all interrupts 
    callable from kernel mode 
    Os_DisableGlobalUM()  osDisableGlobalUM() 
    non nestable service to disable all interrupts 
    callable from user mode 
    Os_EnableGlobalAM() 
    osEnableGlobalAM() 
    non nestable service to enable all interrupts 
    callable from any mode 
    Os_EnableGlobalKM() 
    osEnableGlobalKM() 
    non nestable service to enable all interrupts 
    callable from kernel mode 
    Os_EnableGlobalUM() 
    osEnableGlobalUM() 
    non nestable service to enable all interrupts 
    callable from user mode 
     
     
     
    Caution 
    RTE interrupt handling functions should not be used by the application and are listed 
      here to avoid naming collisions. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    294 
    based on template version 6.0.1 




    Technical Reference MICROSAR OS 
    5.2.10  Time Conversion Macros 
    Based  on  counter  configuration  attributes  conversion  macros  are  generated  which  are 
    capable to convert from time into counter ticks and vice versa. 
    There are a set of conversion macros for each configured OS counter 
     
     
    Caution 
    The conversion macros embody multiplication operations which may lead to a data 
      type overflow. The macros are not capable to detect these overflows 
     
     
     
     
     
     
    Caution 
    Although the results of the macros are mathematically rounded the result will still be an 
      integer (e.g. results smaller than 0.5 are used as 0). 
     
     
     
    5.2.10.1  Convert from Time into Counter Ticks 
    OS_NS2TICKS_<Counter Name>(x) 
    x is given in nanoseconds 
    OS_US2TICKS_<Counter Name>(x) 
    x is given in microseconds 
    OS_MS2TICKS_<Counter Name>(x) 
    x is given in milliseconds 
    OS_SEC2TICKS_<Counter Name>(x) 
    x is given in seconds 
    Table 5-153  Conversion Macros from Time to Counter Ticks 
    5.2.10.2  Convert from Counter Ticks into Time 
    OS_TICKS2NS_<Counter Name>(x) 
    The result is in nanoseconds 
    OS_TICKS2US_<Counter Name>(x) 
    The result is in microseconds 
    OS_TICKS2MS_<Counter Name>(x) 
    The result is in milliseconds 
    OS_TICKS2SEC_<Counter Name>(x) 
    The result is in seconds 
    Table 5-154  Conversion Macros from Counter Ticks to Time 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    295 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.11  OS Initialization 
    Prototype 
    FUNC(void, OS_CODE) Os_Init(void) 
    Parameter 
    none 
    Return code 
    none 
    Functional Description 
    The function performs all the basic OS initialization which includes 
    >  Variable initialization 
    >  Interrupt controller initialization 
    >  System MPU initialization in SC3 and SC4 systems (if supported by platform) 
    >  Synchronization barriers in multi core systems 
    Particularities and Limitations 
    >  A function call to this service must be available on all available cores (even for cores which are intended 
    to be a non-AUTOSAR core) 
    >  After call of Os_Init() the AUTOSAR interrupt API may be used. 
    >  After Call of Os_Init() the API GetCoreID may be used. 
    >  Pre-Condition: 
    >  Os_Init may only be called if the interrupts are globally disabled. 
    >  Either disable the interrupts by using the global flag or, in case of Cortex M platform, disable 
    the interrupts by setting the highest possible interrupt level (BASEPRI register). 
    Table 5-155  API Service Os_Init 
     
    Prototype 
    FUNC(void, OS_CODE) Os_InitMemory(void) 
    Parameter 
    none 
    Return code 
    none 
    Functional Description 
    >  This is an API function which is provided within all BSWs of Vector. It initializes variables of the BSW. 
    Within the OS module this function is currently empty 
    Particularities and Limitations 
    >  This service must be called on all available cores (even for cores which are intended to be a non-
    AUTOSAR core) 
    Table 5-156  API Service Os_InitMemory 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    296 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    5.2.12  Timing Hooks 
    Implementation of all timing hooks must conform to the following guidelines: 
    >  They are expected to be implemented as a macro. 
    >  Reentrancy is possible on multicore systems with different caller core IDs. 
    >  Calls of any operating system API functions are prohibited within the hooks. 
     
     
    Note 
    All hooks are called from within an OS API service. Interrupts are disabled 
     
     
     
     
    5.2.12.1  Timing Hooks for Activation 
    5.2.12.1.1  Task Activation 
    Macro 
    #define OS_VTH_ACTIVATION(TaskId, DestCoreId, CallerCoreId) 
    Parameter 
    TaskId 
    Identifier of the task which is activated 
    DestCoreId 
    Identifier of the core on which the task is activated 
    CallerCoreId 
    Identifier of the core which performs the activation (has called ActivateTask(), has 
    called ChainTask() or has performed an alarm/schedule table action to activate a 
    task) 
    Return code 
    none 
    Functional Description 
    This hook is called on the caller core when that core has successfully performed the activation of TaskId on 
    the destination core. On single core systems both core IDs are identical. 
    Particularities and Limitations 
    >  Due to internal implementation DestCoreId and CallerCoreId are always the same. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    297 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.1.2  Task Activation Exeeding Limit 
    Macro 
    #define OS_VTH_ACTIVATION_LIMIT(TaskId, DestCoreId, CallerCoreId) 
    Parameter 
    TaskId 
    Identifier of the task which is activated 
    DestCoreId 
    Identifier of the core on which the task is activated 
    CallerCoreId 
    Identifier of the core which performs the activation (has called ActivateTask(), has 
    called ChainTask() or has performed an alarm/schedule table action to activate a 
    task) 
    Return code 
    none 
    Functional Description 
    This hook is called on the caller core when that core has failed the activation of TaskId on the destination 
    core because number of activations exceeds the limit. 
    Particularities and Limitations 
    >  Due to internal implementation DestCoreId and CallerCoreId are always the same. 
     
     
    5.2.12.1.3  Set Event 
    Macro 
    #define OS_VTH_SETEVENT(TaskId, EventMask, StateChanged, 
    DestCoreId, CallerCoreId) 
    Parameter 
    TaskId 
    Identifier of the task which receives this event 
    EventMask 
    A bit mask with the events which shall be set 
    StateChanged 
    TRUE: The task state has changed from WAITING to READY  
    FALSE: The task state hasn’t changed 
    DestCoreId 
    Identifier of the core on which the task receives the event 
    CallerCoreId 
    Identifier of the core which performs the event setting (has called SetEvent() or 
    performed an alarm/schedule table action to set an event) 
    Return code 
    none 
    Functional Description 
    This hook is called on the caller core when that core has successfully performed the event setting on the 
    destination core. 
    Particularities and Limitations 
    >  Due to internal implementation DestCoreId and CallerCoreId are always the same. 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    298 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.1.4  Wait Event Not Waiting  
    Macro 
    #define OS_VTH_WAITEVENT_NOWAIT(TaskId, EventMask, DestCoreId, 
    CallerCoreId) 
    Parameter 
    TaskId 
    Identifier of the task which is waiting for the event 
    EventMask 
    A bit mask with the events for which the task is waiting 
    DestCoreId 
    Identifier of the core on which the task is waiting for the event 
    CallerCoreId 
    Identifier of the core which performs the wait event (has called WaitEvent()) 
    Return code 
    none 
    Functional Description 
    This hook is called on the caller core when that core has successfully performed the wait event call on the 
    destination core and the events waiting are already set and calling task stays in state RUNNING. 
    Particularities and Limitations 
    >  Due to internal implementation DestCoreId and CallerCoreId are always the same. 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    299 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.1.5  Timing Hook for Context Switch 
    Macro 
    #define OS_VTH_SCHEDULE(FromThreadId, FromThreadReason, 
    ToThreadId, ToThreadReason, CallerCoreId) 
    Parameter 
    FromThreadId 
    Identifier of the thread (task, ISR) which has run on the caller core before the 
    switch took place 
    FromThreadReason  OS_VTHP_TASK_TERMINATION 
    >  The thread is a task, which has just been terminated. 
    OS_VTHP_ISR_END 
    >  The thread is an ISR, which has reached its end. 
    OS_VTHP_TASK_WAITEVENT 
    >  The thread is a task, which waits for an event. 
    OS_VTHP_TASK_WAITSEMA 
    >  The thread is a task, which waits for the release of a semaphore. 
    OS_VTHP_THREAD_PREEMPT 
    >  The thread is interrupted by another one, which has higher priority. 
    ToThreadId 
    The identifier of the thread, which runs from now on 
    ToThreadReason 
    OS_VTHP_TASK_ACTIVATION 
    >  The thread is a task, which was activated. 
    OS_VTHP_ISR_START 
    >  The thread is an ISR, which now starts execution. 
    OS_VTHP_TASK_SETEVENT 
    >  The thread is a task, which has just received an event it was 
    waiting for. It resumes execution right behind the call of 
    WaitEvent(). 
    OS_VTHP_TASK_GOTSEMA 
    >  The thread is a task, which has just got the semaphore it was 
    waiting for. 
    OS_VTHP_THREAD_RESUME: 
    >  The thread is a task or ISR, which was preempted before and 
    becomes running again as all higher priority tasks and ISRs do not 
    run anymore. 
    CallerCoreId 
    Identifier of the core which performs the thread switch 
    Return code 
    none 
    Functional Description 
    This hook is called on the caller core when that core in case it performs a thread switch (from one task or  
    ISR to another task or ISR). On single core systems both core IDs are always identical. 
    Particularities and Limitations 
    >  None 
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    300 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2  Timing Hooks for Locking Purposes 
    5.2.12.2.1  Get Resource 
    Macro 
    #define OS_VTH_GOT_RES(ResId, CallerCoreId) 
    Parameter 
    ResId 
    Identifier of the resource which has been taken 
    CallerCoreId 
    Identifier of the core where GetResorce() was called 
    Return code 
    none 
    Functional Description 
    The OS calls this hook on a successful call of the API function GetResource(). The priority of the calling 
    task or ISR has been increased so that other tasks and ISRs on the same core may need to wait until they 
    can be executed. 
    Particularities and Limitations 
    >  none 
     
    5.2.12.2.2  Release Resource 
    Macro 
    #define OS_VTH_REL_RES(ResId, CallerCoreId) 
    Parameter 
    ResId 
    Identifier of the resource which has been released 
    CallerCoreId 
    Identifier of the core where ReleaseResorce() was called 
    Return code 
    None 
    Functional Description 
    The OS calls this hook on a successful call of the API function ReleaseResource(). The priority of the 
    calling task or ISR has been decreased so that other tasks and ISRs on the same core may become 
    running as a result. 
    Particularities and Limitations 
    >  none 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    301 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2.3  Request Spinlock 
    Macro 
    #define OS_VTH_REQ_SPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been requested 
    CallerCoreId 
    Identifier of the core where GetSpinlock() was called 
    Return code 
    none 
    Functional Description 
    The OS calls this hook on any attempt to get a spinlock. The calling task or ISR may end up in entering a 
    busy waiting loop. In such case other tasks or ISRs of lower priority have to wait until this task or ISR has 
    taken and released the spinlock. 
    Particularities and Limitations 
    >  The hook is not called for optimized spinlocks  
    >  The hook is called only on multicore operating system implementations 
     
    5.2.12.2.4  Request Internal Spinlock 
    Macro 
    #define OS_VTH_REQ_ISPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been requested 
    CallerCoreId 
    Identifier of the core where the internal spinlock was requested 
    Return code 
    none 
    Functional Description 
    The OS calls this hook on any attempt to get a spinlock for the OS itself. The OS may end up in entering a 
    busy waiting loop. In such case other program parts on this core have to wait until the OS has taken and 
    released the spinlock. 
    Particularities and Limitations 
    >  Only called for Spinlocks which used internally by the OS 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    302 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2.5  Get Spinlock 
    Macro 
    #define OS_VTH_GOT_SPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been taken 
    CallerCoreId 
    Identifier of the core where GetSpinlock() or TryToGetSpinlock() were called 
    Return code 
    none 
    Functional Description 
    The OS calls this hook whenever a spinlock has successfully been taken. 
    If a previosly attempt of getting the spinlock  was not successful immediately (entered busy waiting loop), 
    this hook means that the core leaves the busy waiting loop. 
    From now on no other thread may get the spinlock until the current task or ISR has released it. 
    Particularities and Limitations 
    >  The hook is not called for optimized spinlocks  
    >  The hook is called only on multicore operating system implementations 
     
    5.2.12.2.6  Get Internal Spinlock 
    Macro 
    #define OS_VTH_GOT_ISPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been taken 
    CallerCoreId 
    Identifier of the core where the internal spinlock has been taken 
    Return code 
    None 
    Functional Description 
    The OS calls this hook whenever a spinlock has successfully been taken by the OS itself. 
    If a previosly attempt of getting the spinlock  was not successful immediately (entered busy waiting loop), 
    this hook means that the core leaves the busy waiting loop. 
    From now on no other thread may get the spinlock until the OS has released it. 
    Particularities and Limitations 
    >  Only called for Spinlocks which used internally by the OS 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    303 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2.7  Release Spinlock 
    Macro 
    #define OS_VTH_REL_SPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been released 
    CallerCoreId 
    Identifier of the core where ReleaseSpinlock() was called 
    Return code 
    none 
    Functional Description 
    The OS calls this hook on a release of a spinlock. Other tasks and ISR may take the spinlock now. 
    Particularities and Limitations 
    >  The hook is not called for optimized spinlocks  
    >  The hook is called only on multicore operating system implementations 
     
    5.2.12.2.8  Release Internal Spinlock 
    Macro 
    #define OS_VTH_REL_ISPINLOCK(SpinlockId, CallerCoreId) 
    Parameter 
    SpinlockId 
    Identifier of the spinlock which has been released 
    CallerCoreId 
    Identifier of the core where the internal spinlock has been released 
    Return code 
    none 
    Functional Description 
    The OS calls this hook on a release of a spinlock. Other tasks and ISR may take the spinlock now. 
    Particularities and Limitations 
    >  Only called for Spinlocks which used internally by the OS 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    304 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2.9  Disable Interrupts 
    Macro 
    #define OS_VTH_DISABLEDINT(IntLockId, CallerCoreId) 
    Parameter 
    IntLockId 
    OS_VTHP_CAT2INTERRUPTS: 
    Interrupts have been disabled by means of the current interrupt level. That 
    interrupt level has been changed in order to disable all category 2 interrupts, 
    which also prevents task switch and alarm/schedule table management. 
    OS_VTHP_ALLINTERRUPTS: 
    Interrupts have been disabled by means of the global interrupt enable/disable 
    flag. Additionally to the effects described above, also category 1 interrupts are 
    disabled. 
    CallerCoreId 
    Identifier of the core where interrupts are disabled 
    Return code 
    none 
    Functional Description 
    The OS calls this hook if the application has called an API function to disable interrupts. 
    The parameter IntLockId describes whether category 1 interrupts may still occur. Mind that the two types of 
    interrupt locking (as described by the IntLockId) are independent from each other so that the hook may be 
    called twice before the hook OS_VTH_ENABLEDINT is called, dependent on the application. 
    Particularities and Limitations 
    >  The hook is not called for operating system internal interrupt locks 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    305 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.12.2.10 Enable Interrupts 
    Macro 
    #define OS_VTH_ENABLEDINT(IntLockId, CallerCoreId) 
    Parameter 
    IntLockId 
    OS_VTHP_CAT2INTERRUPTS 
    >  Interrupts had been disabled by means of the current interrupt level 
    until this hook was called. The OS releases this lock right after the 
    hook has returned. 
    OS_VTHP_ALLINTERRUPTS 
    >  Interrupts had been disabled by means of the global interrupt 
    enable/disable flag before this hook was called. The OS releases this 
    lock right after the hook has returned. 
    CallerCoreId 
    Identifier of the core where interrupts are disabled 
    Return code 
    None 
    Functional Description 
    The OS calls this hook if the application has called an API function to enable interrupts. Mind that the two 
    types of interrupt locking (as described by the IntLockId) are independent from each other so that interrupts 
    may still be disabled by means of the other locking type after this hook has returned. 
    Particularities and Limitations 
    >  The hook is not called for operating system internal interrupt locks 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    306 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.13  PanicHook 
    Prototype 
    FUNC(void, OS_PANICHOOK_CODE) Os_PanicHook(void) 
    Parameter 
    none 
    Return code 
    none 
    Functional Description 
    Called upon kernel panic mode. 
    Particularities and Limitations 
    >  Trusted access rights 
    >  Interrupts are disabled 
    >  No OS API service calls are allowed 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    307 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.14  Barriers 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_BarrierSynchronize( 
      Os_BarrierIdType BarrierID 

    Parameter 
    BarrierID 
    The barrier to which rhe task shall be synchronized. 
    Return code 
    E_OK 
    No error 
    E_OS_ID 
    Invalid BarrierID (EXTENDED status) 
    E_OS_CALLEVEL 
    Called from invalid context (EXTENDED status) 
    E_OS_SYS_NO_BARRIER_PARTICIPANT  >  The given barrier is not configured for the local core 
    (EXTENDED status) 
    >  Task is not configured to participate the barrier 
    (EXTENDED status) 
    Functional Description 
    Synchronize the calling task at the barrier given in "BarrierID".  
    The calling task is blocked until all other participating tasks call this API with the same "BarrierID". 
    Particularities and Limitations 
    >  none 
    Call context 
    >  Task 
    Table 5-157  Barriers 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    308 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.15  Exception Context Manipulation 
    5.2.15.1  Os_GetExceptionContext 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_GetExceptionContext( 
      Os_ExceptionContextRefType Context 

    Parameter 
    Context 
    Current exception context. 
    Return code 
    E_OK 
    No error 
    E_OS_PARAM_POINTER 
    given pointer is a NULL_PTR (EXTENDED status) 
    E_OS_CALLEVEL 
    Called from invalid context (EXTENDED status) 
    E_OS_SYS_UNIMPLEMENTED_FUNCTIONALITY  Context manipulation is not supported on this 
    hardware (EXTENDED status) 
    Functional Description 
    Getter function for the exception context. 
    Returns the context structure of the thread interrupted by an exception. 
    Particularities and Limitations 
    >  none 
    Call context 
    >  ProtectionHook 
    Table 5-158  Os_GetExceptionContext 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    309 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.2.15.2  Os_SetExceptionContext 
    Prototype 
    FUNC(StatusType, OS_CODE) Os_SetExceptionContext( 
      Os_ExceptionContextRefType Context 

    Parameter 
    Context 
    Context to set. 
    Return code 
    E_OK 
    No error 
    E_OS_PARAM_POINTER 
    given pointer is a NULL_PTR (EXTENDED status) 
    E_OS_CALLEVEL 
    Called from invalid context (EXTENDED status) 
    E_OS_SYS_UNIMPLEMENTED_FUNCTIONALITY  Context manipulation is not supported on this 
    hardware (EXTENDED status) 
    Functional Description 
    Setter function for the exception context. 
    Writes the given context into the exception context structure. 
    Particularities and Limitations 
    >  none 
    Call context 
    >  ProtectionHook 
    Table 5-159  Os_SetExceptionContext 
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    310 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    5.3 
    Calling Context Overview 
    The  following  table  gives  an  overview  about  the  valid  context  for  MICROSAR  OS 
    additional API service calls. 
     
    Calling Context 
    S
     
     
     
     
    R
    R

    ok

     O
     
    S
     

    I
    SI

    c

     
    ok
    ba
    k
    l
    Hook 
    asT
    c
     
     1 
     2 
     Hoo
     Hoo
    l
    art of
    k
    n Ho
    on
    t
    bal
    ory
    ory
    k
    p Ho
    w
    it
    art t
    al
     
    as
    c
    e S

    g
    g
    as
    do
    r
    or Hook
    tT
    t
    m Ca
    S
    API Service
    r
    eT
    ar
    ote
    e-
    C c
     
    as
    r
    r
    os
    tartu
    hu
    l
    r
    efo
    r
    T
    Cate
    Cate
    E
    P
    P
    S
    S
    A
    P
    B
    P
    IO
    Peripheral Access APIs 

     








     

     
    Os_EnterPreStartTask 
     
     
     
     
     
     
     
     
     
     

     
     
    Os_CallNonTrustedFunction 

     

     
     
     
     
     
     
     
     

     
    Os_DisableInterruptSource 

     

     
     
     
     
     
     
     
     
     
     
    Os_EnableInterruptSource 

     

     
     
     
     
     
     
     
     
     
     
    Os_ClearPendingInterrupt 

     

     
     
     
     
     
     
     
     
     
     
    Os_GetDetailedError 
     
     
     

     
     
     
     
     
     
     
     
     
    Os_GetUnhandledIrq 

     








     
     
     
    Os_GetUnhandledExc 

     








     
     
     
    Stack Usage APIs 

     








     
     
     
    Time Conversion Macros 

     








     
     
     
    Os_Init 
     
     
     
     
     
     
     
     
     
     

     
     
    CheckISRMemoryAccess 

     


     
     
     
     
     

     
     
     
    CheckTaskMemoryAccess 

     


     
     
     
     
     

     
     
     
    CallTrustedFunction 

     

     
     
     
     
     
     
     
     

     
    Os_CallFastTrustedFunction 

     

     
     
     
     
     
     
     
     

     
    Os_BarrierSynchronize 

     
     
     
     
     
     
     
     
     
     
     
     
    Os_GetExceptionContext 
     
     
     
     
     
     
     
     
     

     
     
     
    Os_SetExceptionContext 
     
     
     
     
     
     
     
     
     

     
     
     
    Table 5-160  Calling Context Overview 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    311 
    based on template version 6.0.1 



    Technical Reference MICROSAR OS 
    6  Configuration 
    MICROSAR OS is configured with Vectors “DaVinci Configurator”. 
    The  descriptions  of  all  OS  configuration  attributes  are  described  with  tool  tips  within  the 
    configuration tool. 
    They can easily be look up during configuration of the OS component. 
     
     
     
    Note 
    The configuration with OIL (OSEK implementation language) is not supported. 
     
     
     
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    312 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    7  Glossary 
    Term 
    Description 
    Non-trusted function (NTF)  A non-trusted function is a functional service provided by a non-
    trusted OS application. 
    It runs in the non-privileged mode of the processor with restricted 
    memory rights. 
    Application 
    Any software parts that uses the OS. This may include other 
    software modules or customer software (don’t confuse this with the 
    OS-application object). 
    Pre-start task 
    An OS task which may run before StartOS has been called. Within 
    the pre-start task the usage of non-trusted functions is allowed. 
    OS-application 
    An OS object of type application. 
    Category 2 Lock Level 
    The priority of the highest category 2 ISR 
    Category 1 Lock Level 
    The priority of the highest category 1 ISR 
    TP Lock Level 
    The priority the timing protection interrupt 
    X-Signal 
    MICROSAR OS mechanism which realizes cross core service APIs. 
    Kernel Panic 
    An inconsistent state of the OS results in kernel panic mode. The 
    OS does not know how to proceed correctly. It goes into freeze as 
    fast as possible (interrupts are disabled, the panic hook is called 
    and afterwards an endless loop is entered). 
    Thread 
    Umbrella Term for OS Task, OS hooks and OS ISR objects 
     
     
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    313 
    based on template version 6.0.1 


    Technical Reference MICROSAR OS 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
    © 2018 Vector Informatik GmbH 
    Version 2.19.0 
    314 
    based on template version 6.0.1 

    Document Outline


    1.3.159 - TechnicalReference_PduR

    MICROSAR PDU Router

    1.3.161 - TechnicalReference_PduRs


     
     
     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR PDU Router 
    Technical Reference 
     
    DaVinci Configurator 
    Version 3.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Erich Schondelmaier, Gunnar Meiss, Sebastian 
    Waldvogel, Florian Röhm 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR PDU Router 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Erich Schondelmaier  2012-12-20  
    1.00.00 
    Initial version based on PduR Technical 
    Reference  
    Erich Schondelmaier  2012-07-12 
    2.00.00 
    Adapted to AUTOSAR 4.0.3  
    Erich Schondelmaier  2012-10-15 
    2.01.00 
    TP Gateway 
    IF Gateway 
    Gunnar Meiss 
    2012-11-21 
    2.02.00 
    AR4-285: Support PduRRoutingPathGroups 
    Erich Schondelmaier  2013-02-07 
    2.02.01 
    Adapted Tp- API description 
    Erich Schondelmaier  2013-02-15 
    2.02.02 
    Added some ASR deviations  
    ESCAN00064126 
    Erich Schondelmaier  2013-03-19 
    2.03.00 
    ESCAN00064364 AR4-325: Post-Build 
    Loadable  
    Added Cancel- Receive/ Transmit Support  
    Erich Schondelmaier  2014-04-15 
    2.04.00 
    Added TP routing with variable addresses 
    (MetaData Handling) 
    Added Threshold “0” support 
    Erich Schondelmaier  2014-04-15 
    2.04.01 
    Support  the  StartOfReception  API  (with  the 
    PduInfoType),  
    TxConfirmation  and  RxIndication  according 
    ASR4.1.2 
    Erich Schondelmaier  2014-09-01 
    2.05.00 
    Added SecOC to the Interface Overview 
    Extended  Tp  Gateway  Routing  behavior 
    description 
    Updated Configuration Variant 
    Sebastian Waldvogel  2015-02-23 
    2.06.00 
    FEAT-1057:  Added  documentation  about 
    configuration  of  range  routing  paths  and 
    functional requests gateway 
    Sebastian Waldvogel  2015-05-11 
    2.06.01 
    FEAT-1057: Improvements of documentation 
    Florian Röhm 
    2015-07-30 
    2.07.00 
    FEAT-109:  Added  documentation  for  PduR 
    switching feature and N:1 routing paths 
    Florian Röhm 
    2016-01-16 
    2.08.00 
    FEAT-1485:  Added  documentation  for  1:N 
    and N:1 transport protocol routing paths 
    Gunnar Meiss 
    2016-02-25 
    2.08.00 
    FEAT-1631:  Trigger  Transmit  API  with 
    SduLength In/Out according to ASR4.2.2 
    Erich Schondelmaier  2016-03-17 
    2.08.00 
    added limitation: 
    -  The  Polling  Mode  cannot  be  used  for  N:1 
    routings. 
    -  Cancel  Transmit  for  N:1  routing  paths  is 
    only  supported  if  a  Tx  Confirmation  is 
    enabled. 
    -  Removed  limitation:  N:1  interface  routing 
    paths suppport only for lower layer CanIf.   
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Florian Röhm 
    2016-04-01 
    2.08.01 
    Removed empty chapters 
    Erich Schondelmaier,  2016-08-10 
    3.00.00 
    Shared/Dedicated Buffer support 
    Florian Röhm 
    Memory mapping extension 
    Sebastian Waldvogel  2016-11-24 
    3.00.00 
    Smart Learning (Switching) 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_PDURouter.pdf 
    4.0.3 
    [2]   AUTOSAR 
    AUTOSAR_SWS_PDURouter.pdf. 
    4.1.1 
    [3]   AUTOSAR 
    AUTOSAR_SWS_PDURouter.pdf 
    4.1.2 
    [4]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
    [5]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [6]   AUTOSAR 
    AUTOSAR_SWS_SAEJ1939TransportLayer.pdf 
    1.5.0 
    [7]   Vector 
    TechnicalReference_CanIf.pdf 
    6.02.00 
    [8]   Vector 
    TechnicalReference_<CAN Driver>.pdf 

    [9]   AUTOSAR 
    TechnicalReference_CanTp.pdf 
    2.00.00 
     
    This technical reference describes the general use of the PduR basis software module.  
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Contents 
    1 
    Component History .................................................................................................... 10 
    2 
    Introduction................................................................................................................. 11 
    2.1 
    Architecture Overview ...................................................................................... 12 
    3 
    Functional Description ............................................................................................... 14 
    3.1 

    Features .......................................................................................................... 14 
    3.2 
    Interfaces to adjacent modules of the PDUR .................................................... 15 
    3.3 
    Initialization ...................................................................................................... 15 
    3.4 
    States .............................................................................................................. 15 
    3.5 
    Error Handling .................................................................................................. 15 
    3.5.1 

    Development Error Reporting ........................................................... 15 
    3.6 
    Interface Layer Gateway .................................................................................. 15 
    3.6.1 

    Data Provision .................................................................................. 15 
    3.6.1.1 

    Direct data provision ...................................................... 15 
    3.6.1.2 
    Trigger transmit data provision ....................................... 16 
    3.6.2 
    FIFO Queue ..................................................................................... 16 
    3.6.3 
    Buffer Configurations ....................................................................... 16 
    3.6.3.1 

    No Buffer ....................................................................... 16 
    3.6.3.2 
    Direct Data Provision FIFO ............................................ 16 
    3.6.3.3 
    Trigger Transmit Data Provision FIFO ............................ 16 
    3.6.3.4 
    Trigger Transmit Data Provision Single Buffer ................ 16 
    3.6.4 
    Shared Tx Buffer Pool support ......................................................... 17 
    3.6.5 
    Timing aspects ................................................................................. 17 
    3.6.6 
    Dynamic DLC Routing ...................................................................... 17 
    3.6.7 
    Transport protocol low level routing .................................................. 17 
    3.6.8 
    Smart Learning (Switching) .............................................................. 19 
    3.6.8.1 
    Configuration ................................................................. 20 
    3.6.8.2 
    Example ......................................................................... 23 
    3.6.9 
    Queue overflow notification callback ................................................ 24 
    3.7 
    Transport Protocol Gateway ............................................................................. 26 
    3.7.1 

    Multi-Routing .................................................................................... 26 
    3.7.2 
    TP Threshold ................................................................................... 26 
    3.7.2.1 
    Restrictions .................................................................... 27 
    3.7.2.2 
    Threshold “0” ................................................................. 27 
    3.7.3 
    Tx Buffer Handling ........................................................................... 27 
    3.7.3.1 
    Tx Buffer Usage Types ................................................... 28 
    3.7.3.1.1 

    Dedicated Tx Buffer ................................... 28 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    3.7.3.1.2 
    Shared Tx Buffer ........................................ 28 
    3.7.3.1.3 
    Local Tx Buffer Pool ................................... 29 
    3.7.3.1.4 
    Global Tx Buffer Pool ................................. 29 
    3.7.3.2 
    Example Configuration ................................................... 29 
    3.7.3.3 
    Tx Buffer Length Configuration ...................................... 30 
    3.7.3.4 
    Amount of Tx Buffer ....................................................... 30 
    3.7.3.5 
    Tx Buffer Selection Algorithm ......................................... 31 
    3.7.4 
    TP Queue ........................................................................................ 31 
    3.7.5 
    Error Handling .................................................................................. 31 
    3.7.6 
    Meta Data Handling ......................................................................... 32 
    4 
    Integration ................................................................................................................... 33 
    4.1 

    Scope of Delivery ............................................................................................. 33 
    4.1.1 

    Static Files ....................................................................................... 33 
    4.1.2 
    Dynamic Files .................................................................................. 33 
    4.2 
    Critical Sections ............................................................................................... 34 
    4.3 
    Memory Section ............................................................................................... 34 
    4.4 
    Type Definitions ............................................................................................... 34 
    5 
    API Description ........................................................................................................... 35 
    5.1 

    Services provided by PDUR ............................................................................. 35 
    5.1.1 

    PduR_Init ......................................................................................... 35 
    5.1.2 
    PduR_InitMemory ............................................................................ 35 
    5.2 
    Services ........................................................................................................... 36 
    5.2.1 

    PduR_GetVersionInfo ...................................................................... 36 
    5.2.2 
    PduR_GetConfigurationId ................................................................ 36 
    5.2.3 
    PduR_EnableRouting ....................................................................... 36 
    5.2.4 
    PduR_DisableRouting ...................................................................... 37 
    5.3 
    Communication Interface ................................................................................. 38 
    5.3.1 

    PduR_<GenericUp>Transmit ........................................................... 38 
    5.3.2 
    PduR_<GenericLo>RxIndication ...................................................... 38 
    5.3.3 
    PduR_<GenericLo>TriggerTransmit ................................................. 39 
    5.3.4 
    PduR_<GenericLo>TxConfirmation ................................................. 40 
    5.4 
    Transport Protocol ........................................................................................... 41 
    5.4.1 

    PduR_<GenericUpTp>ChangeParameter ........................................ 41 
    5.4.2 
    PduR_<GenericUpTp>CancelReceive ............................................. 41 
    5.4.3 
    PduR_<GenericUpTp>CancelTransmit ............................................ 42 
    5.4.4 
    PduR_<GenericLoTp>StartOfReception .......................................... 43 
    5.4.5 
    PduR_<GenericLoTp>CopyRxData ................................................. 43 
    5.4.6 
    PduR_<GenericLoTp>CopyTxData .................................................. 44 
    5.4.7 
    PduR_<GenericLo>TpTxConfirmation ............................................. 45 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.4.8 
    PduR_<GenericLo>TpRxIndication .................................................. 46 
    5.4.9 
    PduR_<GenericUpTp>Transmit ....................................................... 47 
    5.5 
    Service Ports ................................................................................................... 48 
    5.5.1 

    Complex Device Driver Interaction ................................................... 48 
    6 
    Configuration .............................................................................................................. 49 
    6.1 

    Use Case Configuration: Communication interface range gateway .................. 49 
    6.1.1 
    Step-by-step configuration ............................................................... 50 
    6.1.2 
    Optional configuration variants / options ........................................... 54 
    6.2 
    Use Case Configuration: Functional requests gateway routing ........................ 56 
    6.2.1 
    Step-by-step configuration ............................................................... 57 
    6.3 
    Use Case Configuration: N:1 routing path ........................................................ 63 
    7 
    AUTOSAR Standard Compliance............................................................................... 65 
    7.1 

    Deviations ........................................................................................................ 65 
    7.2 
    Limitations........................................................................................................ 66 
    7.2.1 

    General ............................................................................................ 66 
    8 
    Glossary and Abbreviations ...................................................................................... 67 
    8.1 

    Glossary .......................................................................................................... 67 
    8.2 
    Abbreviations ................................................................................................... 68 
    9 
    Contact ........................................................................................................................ 70 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.1 Architecture Overview ....................................................... 12 
    Figure 2-2 
    Interfaces to adjacent modules of the PDUR ............................................ 13 
    Figure 3-1 
    Example routing path configurations: Every ECU transmits to every other 
    ECU (via N:M routing paths) or ECU0 can exclusively broadcast to all 
    other ECUs. Other ECUs can only reach ECU0 ........................................ 19 

    Figure 3-2 
    Network specific assignment of PduRRouting path sources and 
    destinations to a PduRConnection ............................................................ 20 

    Figure 3-3 
    Example Extended CAN ID layout ............................................................ 21 
    Figure 3-4 
    Example switching network topology ........................................................ 23 
    Figure 3-5 
    Example Standard CAN ID layout ............................................................. 23 
    Figure 3-6 
    Example switching EcuC configuration - PduRConnection ....................... 23 
    Figure 3-7 
    Example switching EcuC configuration - 
    PduRSaTaFromMetaDataCalculationStrategy .......................................... 24 

    Figure 3-8 Overflow notification callback configuration ......................................................... 25 
    Figure 3-9 
    Configured Tp Buffer with possible Threshold ranges ............................... 27 
    Figure 10 Buffer pool configuration ...................................................................................... 29 
    Figure 11 Shared buffer pool ................................................................................................ 29 
    Figure 6-1 
    Meta data routing with CanIf ..................................................................... 49 
    Figure 6-2 
    CanIf / PduR range routing example overview .......................................... 50 
    Figure 6-3 
    Example functional requests gateway network architecture ...................... 56 
    Figure 6-4 
    Functional request gateway architecture ................................................... 56 
    Figure 6-5: example N:1 routing path configuration .............................................................. 63 
    Figure 6-6 
    EcuC configuration of (mixed) N:1 / 1:N routing paths .............................. 64 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 10 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 14 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 15 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 15 
    Table 3-4  
    Example FIB content after reception of Pdus from source 0x00 and 0x02 19 
    Table 3-5 How to get the associated gateway routing path ................................................... 25 
    Table 4-1  
    Static files ................................................................................................. 33 
    Table 4-2  
    Generated files ......................................................................................... 34 
    Table 4-3  
    Type definitions ......................................................................................... 34 
    Table 5-1  
    PduR_Init .................................................................................................. 35 
    Table 5-2  
    PduR_InitMemory ..................................................................................... 36 
    Table 5-3  
    PduR_GetVersionInfo ............................................................................... 36 
    Table 5-4  
    PduR_GetConfigurationId ......................................................................... 36 
    Table 5-5  
    PduR_EnableRouting ............................................................................... 37 
    Table 5-6  
    PduR_DisableRouting .............................................................................. 37 
    Table 5-7  
    PduR_<GenericUp>Transmit .................................................................... 38 
    Table 5-8  
    PduR_<GenericLo>RxIndication............................................................... 39 
    Table 5-9  
    PduR_<GenericLo>TriggerTransmit ......................................................... 39 
    Table 5-10  
    PduR_<GenericLo>TxConfirmation .......................................................... 40 
    Table 5-11  
    PduR_<GenericUpTp>ChangeParameter ................................................ 41 
    Table 5-12  
    PduR_<GenericUpTp>CancelReceive...................................................... 42 
    Table 5-13  
    PduR_<GenericUpTp>CancelTransmit ..................................................... 42 
    Table 5-14  
    PduR_<GenericLoTp>StartOfReception ................................................... 43 
    Table 5-15  
    PduR_<GenericLoTp>CopyRxData .......................................................... 44 
    Table 5-16  
    PduR_<GenericLoTp>CopyTxData .......................................................... 45 
    Table 5-17  
    PduR_<GenericLo>TpTxConfirmation ...................................................... 46 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Table 5-18  
    PduR_<GenericLo>TpRxIndication .......................................................... 46 
    Table 5-19  
    PduR_<GenericUpTp>Transmit ................................................................ 47 
    Table 6-1  
    Example range routings ............................................................................ 50 
    Table 6-2  
    Example functional diagnostic request routing .......................................... 57 
    Table 8-1  
    Glossary ................................................................................................... 68 
    Table 8-2  
    Abbreviations ............................................................................................ 69 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 

    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
      MICROSAR 4 Base  
    2.00 
      AUTOSAR 4.0.3 
    2.01 
      TP Gateway 
      IF Gateway 
    2.02 
      Routing Path Groups 
    2.03 
      Post-Build Loadable 
    5.00 
      Changed  StartOfReception, TpRxIndication and 
    TpTxConfirmation APIs according to AUTOSAR 4.1.2 
      Added TP routing with variable addresses 
      Meta-Data support 
    6.00 
      Post-Build Selectable 
    7.00 
      CAN-FD 
    8.00 
      PduR Switching 
      N:1 Interface routing path support 
    9.00 
      1:N/N:1 transport protocol routing path support 
    Table 1-1   Component history 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    10 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module PDUR as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    PRE-COMPILE [SELECTABLE]  
    POST-BUILD-LOADABLE [SELECTABLE] 
    Vendor ID: 
    PDUR_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    PDUR_MODULE_ID   
    51 decimal 
    (according to ref. [5]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
     
     
    The  main  task  of  the  PDU  Router  module  is  to  abstract  from  the  type  of  bus  
    access (Interface layer and TP layer) and from the bus type itself.  
    Since the PDU Router module has to route Rx and Tx PDUs to and from the  upper- and  
    lower-    layers  and  any  software   component  uses  its  own  handle  space,  multiple  
    routing tables  are  required.  The  PDU  Router  uses  the  input  handle  as  an  index  to  
    the  related routing table. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    11 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    2.1 
    Architecture Overview 
     Figure 2-1 shows where the PDUR is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.1 Architecture Overview   
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    12 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Figure  2-2  shows the interfaces to adjacent modules of the  PDUR.  These interfaces are 
    described in chapter 5.  
     class Architecture
    CanTp
    FrArTp
    DoIp
    J1939Tp
    FrTp
    CanNm
    J1939Dcm
    Det
    <UpTp>
    IpduM
    Bsw M
    J1939Rm
    <LoTp>
    PduR
    LdCom
    FrNm
    <LoIf>
    Dcm
    CanIf
    SoAd
    J1939Nm
    <UpIf>
    Com
    LinIf
    FrIf
    SecOC
    CddPduRUpperLayerContribution
    CddPduRLow erLayerContribution
     
     
    Figure 2-2  Interfaces to adjacent modules of the PDUR 
     
    Applications do not access the services of the BSW modules directly. They use the service 
    ports provided by the BSW modules via the RTE. The service ports provided by the PDUR 
    are listed in chapter 0 and are defined in [1]. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    13 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    PDUR. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
      Table 3-1   Supported AUTOSAR standard conform features  
      Table 3-2   Not supported AUTOSAR standard conform features 
    For further information of not supported features see also chapter 0. 
    Vector Informatik provides further PDUR functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
      Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Pre compile and Post build time configuration variant 
    I-PDU transmission and reception 
    Cancel-Receive/Transmit support 
    Change Parameter support 
    1:1 routing between upper- and lower-layer communication interface modules 
    1:1 routing between upper- and lower-layer transport protocol modules 
    1:1 Interface Gateway Routing 
    1:N Interface Gateway Routing 
    1:1 Transport protocol Gateway Routing 
    1:N Transport protocol Gateway Routing (single and multiframe Tp messages) 
    Complex device driver ( CDD ) support 
    Routing Path Groups 
    Debugging support (optional feature) 
    Table 3-1   Supported AUTOSAR standard conform features 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    Link time configuration  
    1:N fan-out from the same upper layer PDU (IF/ Tp) 
    Zero cost operation 
    Minimum Routing (Reduced state) 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    14 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Table 3-2   Not supported AUTOSAR standard conform features 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    N:1 Interface routing path capability 
    PduR Switching: Smart learning of routing path destinations depending on received Pdus 
    1:N and N:1 transport protocol single- and multiframe routing path capability 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.2 
    Interfaces to adjacent modules of the PDUR 
    The  PDU  Router  provides  generic  communication  interfaces  and transport protocol APIs 
    for any lower and upper layer module.  
    3.3 
    Initialization 
    Before  the  PduR  can  be  used  it  has  to  be  initialized  by  PduR_Init()  which  performs  the 
    basic initialization. Initialization is normally driven by the Communication Manager.  If this 
    software  component  is  not  available  a  similar  component  has  to  be  provided  by  the 
    integrator. 
    3.4 
    States 
    The  PduR  is  initially  not  activated.  Basic  RAM  arrays  are  initialized  with  the  call  of 
    PduR_InitMemory or with the startup code of your ECU. If PduR_Init() is called with valid 
    parameters, the PduR is in the state “PduR_IsInitialized” and the communication can start. 
    3.5 
    Error Handling 
    3.5.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [4],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter PDUR_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported PDUR ID is 51. 
    3.6 
    Interface Layer Gateway 
    3.6.1 
    Data Provision 
    3.6.1.1 
    Direct data provision 
    For  Direct  Data  Provision  routing  paths  the  data  will  be  copied  by  the  PduR  to  the 
    destination module in the transmit API call. If a FIFO queue is configured, the data might 
    be queued and will then be transmitted in the Tx Confirmation context. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    15 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    3.6.1.2 
    Trigger transmit data provision 
    For  Trigger  Transmit  Data  Provision  routing  paths  the  data  will  be  copied  by  the 
    destination module
     in the trigger transmit API call. This is useful if the destination module 
    always wants to fetch the latest data available (single buffer configuration) or it has specific 
    timing requirements when it needs to provide the data. 
    3.6.2 
    FIFO Queue 
    A FIFO is used if loss of I-PDU instances is critical. In case of several parallel transmitting 
    FIFO queues, the order of transmission depends upon the bus access of the lower layer 
    and not on the relative order of I-PDU reception. One FIFO queue therefore only cares for 
    a FIFO based sorting of the instances of its own queued I-PDUs.  
    The queue depth can be configured for each routing path independently. 
    If the transmission of an I-PDU failed (negative return value of the interface layer transmit 
    request),  the  PDU  Router  removes  the  I-PDUs  instance  from  the  queue  and  retries  the 
    transmission with the next instance – until the queue is empty or the transmission request 
    is accepted. 
    In case of a buffer overrun, all queued I-PDU instances of the affected queue are removed 
    and the newly received I-PDU is transmitted. 
     
     
    EcuC structural changes with PduR version 9.00.00 
    The PduRTxBufferDepth has been removed and was replaced by the 
      PduRDestPduQueueDepth parameter. 
     
     
    3.6.3 
    Buffer Configurations 
    3.6.3.1 
    No Buffer 
    No buffering will be used if the PduRDestPduQueueDepth is not configured. 
    3.6.3.2 
    Direct Data Provision FIFO 
    A  FIFO  queue  will  be  used  if  the  data  provision  is  set  to  direct  transmission  and  the 
    PduRDestPduQueueDepth is larger than zero. 
    3.6.3.3 
    Trigger Transmit Data Provision FIFO 
    A  FIFO  will  be  used  if  the  data  provision  is  set  to  trigger  transmit  and  the 
    PduRDestPduQueueDepth is larger than one. 
    3.6.3.4 
    Trigger Transmit Data Provision Single Buffer 
    A  single  buffer  will  be  used  if  the  data  provision  is  set  to  trigger  transmit  and  the 
    PduRDestPduQueueDepth is one.  
    Last  is  best  semantics  apply.  Values  in  the  buffer  will  be  overwritten  so  that  a  Trigger 
    Transmit call always gets the latest data from the buffer. It is necessary to specify default 
    values for the buffer, as the Trigger Transmit API can be called before any new data was 
    written to the buffer. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    16 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    3.6.4 
    Shared Tx Buffer Pool support 
    The  Interface  Layer  Gateway  supports  shared  Tx  Buffer.  Tx  Buffer  can  be  assigned  to 
    multiple routing paths at once. This is useful for routing paths which are not active at the 
    same time. Thus, RAM consumption can be reduced. 
    3.6.5 
    Timing aspects 
    The  PDU  Router  triggers  the  transmission  of  I-PDU  instances  to  be  routed  as  soon  as 
    possible. If the queue is empty, a reception will directly cause a transmission request to the 
    interface layer.  If the queue is occupied, the I-PDU instance will  be added to the queue. 
    Queued  I-PDU  instances  are  transmitted  within  the  Tx  confirmation  of  the  preceding 
    instance.  This  queuing behavior can cause bursts on the destination channel (especially 
    CAN)  if  several  queue  instances  are  queued  and  if  the  driver  layer  does  not  free  the 
    hardware queue. 
    The  PDU  Router  does  not  provide  a  mechanism  to  implement  a  rate  conversion  (e.g. 
    change the cycle time from the source to the destination channel). A rate conversion can 
    be  implemented  (at  extra  runtime  costs)  by  signal  routing  paths  using  the  COM  signal 
    gateway. 
    3.6.6 
    Dynamic DLC Routing 
    With PduR version 9.00.00 and later there is no restriction for the dynamic length routing 
    for gateway routing paths.  All lengths between 0 and the configured PDU length can be 
    routed. The length can be adapted dynamically during runtime. 
     
     
    Caution 
    A Pdu with a DLC larger than the configured Pdu length will be truncated to the length 
      of the smallest available buffer of this routing path. 
     
     
    3.6.7 
    Transport protocol low level routing 
    If the TP segments (N-PDUs) on the source and the destination network are identical, it is 
    possible to route TP I-PDUs using the interface layer gateway (“low-level” routing). If low-
    level  routing  is  used,  the  (former)  N-PDU  is  no  longer  accessible  to  the  TP  layer  and 
    therefore seen as an I-PDU by the PDU Router module. 
    The advantage of low-level routing is that it is executed in the context of the interface layer 
    RxIndication and therefore introduces a minimal routing latency.  
    Low-level routing has, however, several drawbacks which might cause that a high-level TP 
    routing is more adequate: 
      TP protocol conversion is not possible as the frame-layout and the flow-control 
    handling must be the same on the source and the destination network. 
      No forwarding of routed TP I-PDUs to the local DCM is possible as it may be required 
    for functional requests. 
      Eventual loss of TP parameters, such as the STmin timing and the block size, due to 
    bursts on the destination bus. Bursts are a result of queued I-PDUs which were 
    transmitted in the TxConfirmation of the previous I-PDU.  
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    17 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
      A buffer overrun in the FiFo queue causes the queue to be flushed and therefore 
    corrupts the TP communication. The TP layer gateway can avoid buffer overflows if the 
    receiving TP connection supports a dynamic block size adaptation. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    18 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    3.6.8 
    Smart Learning (Switching) 
    The  PduR  routing  path  relations  are  statically  configured  and  cannot  be  modified  during 
    runtime.  In  case  ECUs  will  be  attached  to  different  networks  during  assembly  or  a  huge 
    amount  of  possible  routing  relations  will  be  required,  the  dynamic  learning  of  routing 
    relations can be used. 
    The switching functionality is based on a dynamic RAM table, the forwarding information 
    base (FIB) inside the PduR. This RAM table stores the location (network) of the different 
    ECUs and will be used to direct the routings to the correct destination. The identification of 
    the communication partners is done by a source- and target address which is determined 
    based  on  the  PDU  meta  data.  The  FIB  is  updated  with  the  related  location  (called 
    connection) on reception of every participating PDU.  
    Source address  Learned destination location/connection 
    0x00 
    Connection 2 
    0x01 
    <not yet learned> 
    0x02 
    Connection 0 
    … 
    … 
    Table 3-4   Example FIB content after reception of Pdus from source 0x00 and 0x02 
    On  reception  of  every  PDU  a  lookup  in  the  FIB  is  done  to  check  whether  the 
    location/connection  of  the  target  address  is  already  known.  If  the  target  address 
    destination  (FIB  source  address)  is  not  yet  known,  the  PDU  will  be  broadcasted  to  all 
    destinations  of  the  respective  routing  path.  In  case  the  target  address  destination  was 
    already learned by the gateway, the PDU will be routed to the learned destination instead 
    of the broadcasting. 
    From the technical point of view the switching functionality is an add-on for the static PduR 
    routing path relations. The standard PduR routing paths are used to describe all required 
    routing relations which are necessary if no dynamic learning is available. This means that 
    the routing paths must be configured in a way that the PDUs are broadcasted to all desired 
    networks which have possible destination ECUs connected. This is typically a 1:N routing 
    path  which  performs  a  broadcasting  of  the  PDU.  The  switching  add-on  suppresses  the 
    routing to the individual destinations based on the FIB information. In case the destination 
    of a single PDU / target address is not yet known, the PDU will be routed to all destinations 
    of  the  1:N  routing  path.  In  case  the  destination  is  already  learned,  the  routing  to  all 
    destinations except the learned one is suppressed. 
    Gateway ECU
    Gateway ECU
    ECU0
    ECU1
    ECU2
    ECU0
    ECU1
    ECU2
    CAN0
    CAN1
    CAN2
        
    CAN0
    CAN1
    CAN2
     
    Figure 3-1  Example routing path configurations: Every ECU transmits to every other ECU (via N:M routing paths) 
    or ECU0 can exclusively broadcast to all other ECUs. Other ECUs can only reach ECU0 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    19 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    An  important  concept  for  the  smart  learning  functionality  is  the  usage  of  communication 
    interface  range  routing  paths  where  multiple  PDUs  can  be  routed  with  a  single  routing 
    path. For the examples this means that only three N:M or 1:N/N:1 routing paths have to be 
    configured  between  the  networks.  The  range  filters  of  the  Rx  CAN  range  Pdus  can  be 
    used to define the concrete CAN ID range to be routed via the routing paths. For further 
    information see chapter 6.1. 
    The memorization of the source / target address locations/networks is done on the basis of 
    the actual extracted source / and target addresses which are based on the CAN ID of the 
    routed range PDUs.  
     
     
    Caution 
    The PduR switching feature is only supported for MetaData Pdus. Therefore the 
      referenced routing paths in a PduR Connection must be MetaData routing paths. 
    Currently only the CanIf supports the MetaData feature. 
     
     
     
    The  switching  functionality  is  automatically  enabled  for  all  PDUs  associated  to  a 
    PduRDataPlane (see chapter 3.6.8.1).  
    All entries of the FIB will be set to ‘not yet learned’ during initialization of the PduR. This is 
    the  only  way  to  completely  ‘unlearn’  the  FIB  table. A  relearning  is  possible  by  receiving 
    messages with the corresponding source address on some other channel. The PduR will 
    then update the connection/location of this address. 
      
    3.6.8.1 
    Configuration 
    The  configuration  and  activation  of  the  switching  functionality  is  done  within  the  EcuC 
    container  /MICROSAR/PduR/PduRRoutingTables/PduRDataPlaneTable.  By  adding  a  new  
    PduRDataPlane an independent FIB RAM table will be instantiated. Therefore it is possible 
    to configure multiple different independent smart learning / switching behaviors in a single 
    gateway. 
    Within a PduRDataPlane the PduRDataPlane/PduRConnection containers are used to assign 
    the  static  PduR  routing  path  sources  and  destinations  to  a  network  (location).  A 
    PduRConnection represents a single network.  
    Gateway ECU
    Connection_CAN0
    Connection_CAN1
    Connection_CAN1
    ECU0
    ECU1
    ECU2
    CAN0
    CAN1
    CAN2
     
    Figure 3-2  Network specific assignment of PduRRouting path sources and destinations to a PduRConnection 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    20 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Reference all related PduRRoutingPath/PduRSrcPdu and PduRRoutingPath/PduRDestPdu of 
    a single network to the PduRConnection by the references PduRConnection/PduRSrcPduRef 
    and PduRConnection/PduRDestPduRef. 
     
    The 
    behavior 
    of 
    the 
    switching 
    logic 
    itself 
    is 
    configured 
    in 
    the 
    PduRDataPlane/PduRSwitchingStrategy/PduRSaTaSwitchingStrategy 
    container. 
    The 
    currently available strategy is based on source- and target addresses as described above. 
    Within the PduRSaTaSwitchingStrategy different strategies are supported to determine the 
    source- and target address of the PDUs: 
      PduRLinearTaToSaCalculationStrategy 
    The target address is the CAN ID (contained in the Pdu meta data). The source 
    address is calculated by masking the target address and adding a linear offset.  
    For PDUs referenced by PduRAddOffsetSrcPduRef: 
        source address = (target address + offset) & mask 
    For PDUs referenced by PduRSubtractOffsetSrcPduRef: 
        source address = (target address - offset) & mask 
      PduRSaTaFromMetaDataCalculationStrategy 
    The source and target address is directly read from the CAN ID contained in the meta 
    data. The bit access will occur on the logical CAN ID extracted from the meta data.  
    The source address bit position is defined by the PduRSaStartBitPosition and 
    PduRSaEndBitPosition parameters. The target address bit position is defined by the 
    PduRTaStartBitPosition and PduRTaEndBitPosition parameters. 
    Example bit position configuration of the CAN ID layout shown in Figure 3-3: 
    PduRSaStartBitPosition: 0 
    PduRSaEndBitPosition:   9 
    PduRTaStartBitPosition: 10 
    PduRTaEndBitPosition:   19 
    Message ID (29 bit)
    <Reserved>
    Target Address
    Source Address
    9bit
    10bit
    10bit
     
     
    Figure 3-3  Example Extended CAN ID layout 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    21 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
     
     
    EcuC structural changes with PduR version 9.00.00  
     
      PduRConnection 
    In the previous versions the PduRConnection/PduRSrcPduRef and 
    PduRConnection/PduRDestPduRef parameters were used to separate between 
    request and response routing paths. A separation between request and response 
    routing paths does not exist anymore. Instead the references are now just used for 
    network to PduRSrcPdu / PduRDestPdu mapping. 
    An automated migration of the PduRConnection references is not possible. Please 
    add missing references manually. 
     
    PduRLinearMappingStrategy 
    In the previous versions the mapping between request and response PDUs was 
    configured in the 
    PduRDataPlane/PduRDataPlaneMappingStrategy/PduRLinearMappingStrategy 
    container. This container will be automatically migrated to the new location 
    PduRDataPlane/PduRSwitchingStrategy/PduRSaTaSwitchingStrategy/PduRSaTa
    CalculationStrategy/PduRLinearTaToSaCalculationStrategy. As described 
    above the separation between request and response routing paths by the 
    PduRConnection/PduRSrcPduRef and PduRConnection/PduRDestPduRef does not 
    exist anymore. Rather the new references 
    PduRLinearTaToSaCalculationStrategy/PduRAddOffsetSrcPduRef and 
    PduRLinearTaToSaCalculationStrategy/PduRSubtractOffsetSrcPduRef were 
    introduced. PduRAddOffsetSrcPduRef must reference all PduRSrcPdus where the 
    offset shall be added to the target address to determine the related source address. 
    PDUs where the offset shall be subtracted must be referenced with the 
    PduRSubtractOffsetSrcPduRef references. 
    The AddOffset- and SubtractOffsetSrcPduRef references are automatically 
    migrated. Former PduRSrcPdu referenced by PduRConnection/PduRDestPduRef are 
    migrated to PduRAddOffsetSrcPduRef. Former PduRSrcPdu referenced by 
    PduRConnection/PduRSrcPduRef are migrated to PduRSubtractOffsetSrcPduRef. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    22 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    3.6.8.2 
    Example 
    Network topology is as shown in Figure 3-4. The CAN ID layout is as shown in Figure 3-5. 
    Strategy  PduRSaTaFromMetaDataCalculationStrategy  used  (see  chapter  3.6.8.1).  Routing 
    path configuration as shown in Figure 3-1 (every ECU can broadcast to the other ECUs).  
    Gateway ECU
    FIB
    ECU0
    Routing  logic
    ECU1
    address = 0x4
    address = 0x2
    ECU2
    address = 0x3
    CAN 0
    CAN 1
    CAN 2
     
    Figure 3-4  Example switching network topology 
    Message ID (11 bit)
    <Reserved>
    Target Address
    Source Address
    3bit
    4bit
    4bit
     
    Figure 3-5  Example Standard CAN ID layout 
     
    Figure 3-6  Example switching EcuC configuration - PduRConnection 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    23 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
     
    Figure 3-7  Example switching EcuC configuration - PduRSaTaFromMetaDataCalculationStrategy 
    Example communication sequence and FIB contents: 
     
    1. ECU0 transmits the range Pdu with CAN ID 0x034
    Source Address  Learned location 
    This  means  ECU0  uses  its  address  as  source 
    … 
    … 
    address (0x4), and addresses ECU2 with the target 
    0x02
    address  0x3.  The  PDU  will  be  broadcasted  to 
     
    <not yet learned> 
    CAN1 and CAN2 and the location of ECO0 address  0x03 
    <not yet learned> 
    is updated in the FIB.
    0x04 
    Connection_CAN0 
     
    … 
    … 
     
    2. ECU2  responds  to  the  initial  PDU  of  ECU0  with  a 
    Source Address  Learned location 
    PDU  with  CAN  ID  0x043.  The  PDU  will  only  be 
    … 
    … 
    routed  to  CAN0  because  the  location  of  the  target 
    0x02 
    <not yet learned> 
    address (0x4) was already learned by the first PDU 
    0x03
    of  ECU0.  Additionally  the  location  of  ECU2  is 
     
    Connection_CAN2 
    updated in the FIB.
    0x04 
    Connection_CAN0 
     
    … 
    … 
     
    3. Finally ECU1 transmits a PDU with CAN ID 0x032
    Source Address  Learned location 
    The PDU will only be routed to CAN2 because the 
    … 
    … 
    location  of  the  target  address  (0x3)  was  already 
    0x02 
    Connection_CAN1 
    learned. The FIB gets updated with the location of 
    ECU1.
    0x03 
    Connection_CAN2 
     
    0x04 
    Connection_CAN0 
    … 
    … 
     
    3.6.9 
    Queue overflow notification callback 
    The  PDU  Router  supports  a  Queue  overflow  notification  callback.  In  case  of  a 
    communication interface routing with unfavorable  FIFO  configuration or if the destination 
    bus  is  not  available  (e.g.  bus  off)  a  buffer  overflow  can  occur.  In  this  case  the  FIFO  is 
    flushed.  
    Additionally  a  callback  could  be  configured  to  capture  this  event  and  perform  error 
    handling. See Figure 3-8 Overflow notification callback configuration. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    24 
    based on template version 4.9.2 







    Technical Reference MICROSAR PDU Router 
     
     
    Enable Feature overflow notification callback 

      
    PduR_QueueOverflowNotification activates / deactivates a PduR 
    communication interface TxBuffer overflow notification. 
    >  Set an individual error notification module name by using 
    PduR_ErrorNotificationModuleName parameter. This parameter is optional 
    and can be left empty. ‘ErrorNotification’ is used as default value. 
     
    If the feature is enabled two additional source files are generated to the Gendata folder. 
    A <ErrorNotification>_Cbk.h file and a _<ErrorNotification>_Cbk.c template file. The 
    template contains the error notification function which must be implemented. 
    >  Implement the error notification function and remove the template 
    underscore. 
    Figure 3-8 Overflow notification callback configuration 
    During runtime the error notification is called by the PDU Router in case of a FIFO 
    overflow. The lower layer interface handle is passed to the notification callback. 
     
     
    How to get the associated gateway routing path 
      
     
    >  Open the Find view and enter the destination PDU name with the 
    associated handle. Syntax: value == destination PDU name 
    >  Right click on the PDU Router destination container in the result view and 
    open the reference using the “Show referenced item in” dialog. 
     
     
     
    Table 3-5 How to get the associated gateway routing path 
     
     
    Caution 
    The error notification function is called in the interrupt context! Please keep the error 
      handling short.  
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    25 
    based on template version 4.9.2 




    Technical Reference MICROSAR PDU Router 
    3.7 
    Transport Protocol Gateway 
    The TP layer gateway allows high-level routing of TP I-PDUs.  
    In order to reduce runtime and memory consumption, the gateway supports the so called 
    routing on-the-fly (for 1:1, 1:N and N:1 single and multiframe routing paths). Depending on 
    the  “Threshold”  configuration  of  each  routing  path,  the  gateway  starts  with  the 
    transmission on the destination network before the reception has completed on the source 
    network.  
    Since AUTOSAR 4 the PduR copies the data within the PduR_<LoTp>_CopyRxData() call. 
    So  the  PduR  module  always  knows  how  much  buffer  is  still  available  and  provides  the 
    complete size to the Tp module. The PduR is not limited to linear buffer boundaries like in 
    AUTOSAR 3, so the PduR data rate is very efficient.  
    The  Tp  module  will  never  get  more  buffer  within  one  PduR_<LoTp>_CopyRxData()  call 
    than the PduR provides to the Tp module. Therefore the Tp modules should not try to copy 
    more data than the provided buffer length. 
    3.7.1 
    Multi-Routing 
    The  PduR  supports  N:1  and  1:N  routing paths  for  both  single-  and multiframes.  Each  of 
    these routing paths will only occupy a single Tx Buffer at runtime (if no FIFO behavior is 
    required). For details on the queuing behavior refer to chapter 3.7.4. 
     
     
    Note 
    1:N gateway routing paths which involve an upper layer destination must be configured 
      as a store and forward routing path. 
     
     
     
    3.7.2 
    TP Threshold 
    The Threshold value is used to… 
      … define the fill level of the buffer where the transmission is triggered on the 
    destination bus.  
      … exclude buffers from the selection during runtime. This could be helpful to ensure 
    that small buffers which are configured for single frames are not taken into account for 
    long multi messages. If the Threshold is larger than the buffer size it is ensured that 
    the PduR will not use this buffer to perform the routing. 
     
     
    Note 
    Small buffers can also be excluded from the selection at runtime using the 
      dedicated/shared Tx Buffer pool support. All suitable buffers can be assigned to the 
    respective routing paths. Only these assigned buffers will be used at runtime. The 
    assigned buffers can also be shared between multiple other routing paths. 
    See chapter 3.7.3 for details. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    26 
    based on template version 4.9.2 



    Section 1 
    Section 2 
    MetaData FF 
    CFs 
    CF size- 1 
       
       
    Technical Reference MICROSAR PDU Router 
    3.7.2.1 
    Restrictions 
    The setting of the TP Threshold is restricted for CanTp, LinTp and FrArTp routing paths. 
    Threshold values in the shaded sections of Figure 3-9 are not allowed to be configured for 
    these kind of gateway routings.  
    Each PduR_<LoTp>_CopyRxData() call requires that a complete consecutive frame (CF) 
    will be copied to the buffer. If not enough buffer is available the Tp tries again to get more 
    buffer.  But  the  PduR still  cannot  dequeue  data  because  the  threshold  is  not  reached.  In 
    this situation there will never be enough buffer space and the routing will be aborted with a 
    timeout.  
    The DaVinci Configurator validates this and provides appropriate Solving-Actions to set a 
    suitable Threshold. The recommended values are adapted to the boundaries.  
    If just the largest buffer of Figure 3-9 should be used for a routing the Threshold must be 
    set to Section 2. If the routing should have both buffer options the Threshold level must be 
    set somewhere in Section 1.  
     
    Figure 3-9  Configured Tp Buffer with possible Threshold ranges 
     
    3.7.2.2 
    Threshold “0” 
    Since  ASR  4.1.2  the  PduR  module  supports  a  Threshold  of  “0”.  This  means  that  the 
    transmission  will  be  triggered  immediately.  The  first  frame  of  some  Transport  Protocol 
    modules (J1939Tp and FrTp) does not contain data but it is required that the transmission 
    will  be  triggered  nevertheless.  For  further  details  refer  for  example  the  J1939Tp 
    specification [6]. 
    3.7.3 
    Tx Buffer Handling 
    Diagnostic communication usually does not take place within all ECUs at the same time. 
    Therefore a TP routing path typically has no dedicated assigned buffer. In order to reduce 
    the amount of RAM required for queues, the Tx buffers are assigned dynamically to active 
    TP routing paths and can be reused in different routing paths automatically.  
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    27 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
    If a buffer is assigned to a routing path during runtime, this buffer is exclusively reserved 
    for this routing. If all available buffers are occupied, no further routing is possible and the 
    PduR  signalizes  the  state  “BUFREQ_E_NOT_OK”  towards  the  TP  module.  It  will  then 
    create an appropriate flow-control frame depending on its capabilities. 
    The PduR supports a ring buffer mechanism. Due to the AUTOSAR 4 architecture long TP 
    messages  can  now  be  routed  through  a  small  PduRTxBuffer,  especially  if  the  source 
    and destination bus have the same data rate. 
    The PduRTxBuffer will be released during initialization of the PduR module and after a 
    routing has terminated either successfully or with an error. They can then be allocated by 
    other PduRDestPdus again. 
    The PduR supports multiple Tx Buffer assignment strategies to support different usecases. 
    3.7.3.1 
    Tx Buffer Usage Types 
    A PduRTxBuffer can either be referenced by zero, one or multiple PduRDestPdus.  
     
     
    Note 
    If a PduRDestPdu references at least one PduRTxBuffer, it has only access to this pool 
      of buffers and cannot use the global Tx Buffer pool of unassigned PduRTxBuffers. 
     
     
    3.7.3.1.1 
    Dedicated Tx Buffer 
    If a PduRTxBuffer is referenced by only one PduRDestPdu, it is called a dedicated Tx 
    Buffer. The buffer can only be used by this PduRDestPdu. 
    Dedicated  Tx  Buffers  accelerate  the  buffer  search  algorithm  as  the  amount  of  available 
    PduRTxBuffer is more limited compared to a global Tx Buffer Pool use case. 
    Dedicated  Tx  Buffer  can  be  used  to  ensure  the  availability  of  suitable  Tx  Buffers  and 
    optimize the buffer for certain bus architectures. 
     
     
    Expert Knowledge 
    Routing of a functional request is a typical use case for a dedicated buffer. For a short 
      diagnostic request it is required to avoid searching for a buffer in the global Tx buffer 
    pool. If a dedicated buffer is assigned to the PduRDestPdu, this buffer will be used 
    during runtime.  
     
     
    Note 
    Dedicated Tx Buffers raise the RAM consumption. Every Tx Buffer allocates its needed 
      memory in RAM. This memory will not be shared with any other routing path.  
    3.7.3.1.2 
    Shared Tx Buffer 
    If  a  PduRTxBuffer  is  referenced  by  multiple  PduRDestPdus,  it  is  a  shared  Tx  buffer 
    which can be used by all corresponding PduRDestPdus.  
    If  the  Tx  buffer  is  currently  used  by  a  PduRDestPdu,  it  can’t  be  used  by  any  other 
    PduRDestPdu until the processing of the active routing path is finished.  
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    28 
    based on template version 4.9.2 







    Technical Reference MICROSAR PDU Router 
     
     
    Expert Knowledge 
    A buffer pool configuration avoids that a non-suitable buffer is used for a routing during 
      runtime. 
     
     
    It is also possible to share Tx Buffers between communication interface and transport 
    protocol routings. Keep in mind that an allocated buffer is locked until the routing is 
    finished.  
    3.7.3.1.3 
    Local Tx Buffer Pool 
    If  one  PduRDestPdu  references  more  than  one  PduRTxBuffer,  it  is  called  a  local  Tx 
    Buffer  Pool.  These  can  either  be  dedicated  PduRTxBuffer  or  they  can  be  shared  with 
    other PduRDestPdus. A mix of dedicated and shared PduRTxBuffers is supported. 
    The corresponding routing path can only request the referenced PduRTxBuffers. 
    3.7.3.1.4 
    Global Tx Buffer Pool 
    A PduRTxBuffer which is not referenced by any PduRDestPdu is part of the global Tx 
    Buffer  pool.  It  can  be  used  by  any  PduRDestPdu  which  has  not  referenced  any 
    PduRTxBuffer. 
    3.7.3.2 
    Example Configuration 
    In the example shown in Figure 10 the buffer 3 belongs to the global Tx Buffer Pool and 
    Buffer 1 and 2 are dedicated Tx Buffers of Routing 1 (local Tx Buffer Pool). Routing 2 does 
    not have a buffer reference. This routing will use buffer 3 from the global Tx Buffer Pool. 
     
     
    Figure 10 Buffer pool configuration 
     
    Figure  11  shows  a  shared  buffer  pool  configuration.  Buffer  1  and  2  are  shared  between 
    Routing 1 and 2. 
     
     
    Figure 11 Shared buffer pool 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    29 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
     
     
    Caution 
    If Routing 1 uses Buffer 1 and Buffer 2, Routing 2 will not get a buffer until Buffers are 
      released. Use shared buffer pool configurations carefully.  
     
     
     
    3.7.3.3 
    Tx Buffer Length Configuration 
    The  length  of  each  buffer  element  is  configured  individually  and  therefore  allows  fine 
    adaptations  according  to  the  use  case.  First  of  all,  the  length  of  the  configured  buffer 
    depends on the Threshold of the configured routing paths. If the gateway assigns a buffer 
    element to a routing path it is required that the buffer has at least the size of the Threshold. 
    Increase the PduRTxBuffer length to adapt a high bus load on the reception side to a lower 
    bandwidth on the transmit side. 
    Due to the ring-buffer mechanism it is not required that a buffer element with the size of 
    the largest expected TP I-PDU is configured. A buffer smaller than the routed I-PDU can 
    result  in  wait-frames  or  a  buffer-overflow  if  the  destination  connection  is  slower  than  the 
    source connection. A buffer overflow can be avoided if the receiving TP connection allows 
    dynamic adaptation of the block size (BS) (e.g. CanTp connection with BS greater 0). If a 
    BS of 0 is used by some of the source TP connections, the configured buffer length should 
    be dimensioned in a way that buffer overflows are avoided.  
     
     
    Note 
    It might make sense to configure a small Tp buffer (e.g. 7 bytes) to allow single 
      frame routings without occupying a larger and therefore more “expensive” buffer 
    for  this  task.  This  is  applicable  for  both  local  and  global  Tx  Buffer  Pool 
    configuration. Dedicated assigned TxBuffer can be used to avoid this problem. 
     
     
     
     
     
    Note 
    If Meta Data Support is enabled please consider that the MetaDataLength must be 
      copied to the Tp Buffer additionally. The MetaDataLength should be taken into account 
    during the Tp buffer configuration. 
     
     
     
    3.7.3.4 
    Amount of Tx Buffer 
    The Tp gateway requires at least one buffer element to allow the routing of Tp I-PDUs.  
    The number of buffer elements that have to be configured depends on the number of TP I-
    PDUs that shall be routed at the same time.  
    For each 1:N and N:1 routing path only one buffer element is  occupied at runtime. More 
    than one buffer element will be occupied if a FIFO behavior is desired. 
    As  the  buffer  elements  are  not  assigned  to  a  routing  path  statically,  the  number  of 
    configured buffer elements can be smaller than the number of routing paths.  
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    30 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    3.7.3.5 
    Tx Buffer Selection Algorithm 
    The PduR uses the following rules to choose one of the configured Tx buffers: 
      If the size of the incoming I-PDU is smaller than the configured TP Threshold the 
    smallest available buffer is used that can hold the entire I-PDU. 
      If the size of the incoming I-PDU is larger than the configured TP Threshold it uses the 
    smallest Tx buffer which can hold the entire I-PDU. If such a buffer is not availabe it 
    will use the largest available buffer which has a size larger than the TpThreshold.  
      If all buffer are occupied, the buffer request is rejected and the TP I-PDU is not routed. 
    3.7.4 
    TP Queue 
    Every  destination  PDU  can  be  configured  to  use  a  queue  to  buffer  the TP  I-PDUs.  The 
    amount  of  I-PDUs  which  will  be  buffered  can  be  configured  with  the  Dest  PDU  Queue 
    Depth parameter.  
    The  Queue  supports  FIFO  behavior.  This  means  that  the  first  started  source  TP 
    connection is transmitted to the destination first. 
    TP Queues are supported for the following routing paths: 
      1:1 routing path 
      1:N routing path (Queue Depth must be equal for all destinations) 
      N:1 routing path (Queue Depth must be equal for all DestPdus which reference the 
    one common destination global PDU) 
    Multiple I-PDUs from different source connections can be received at once on N:1 routing 
    paths, as long as the TP Queue is not full. For routing paths with only one possible source 
    Tp connection (1:1, 1:N), only one I-PDU can be received at once. If the transmission on 
    the  destination  side  is  delayed,  multiple  I-PDU  instances  which  were  received  on  the 
    source Tp connection are stored in the queue. 
    The  default  value  for  the  Dest  Pdu  Queue  Depth  is  2.  This  corresponds  to  the  back-to-
    back routing behavior. After one TP I-PDU was received successfully it is transmitted to the 
    destination  and  another  instance  of  the  I-PDU  can  be  received  on  the  same  TP 
    connection. Basically every queue with a depth greater than one can store multiple TP I-
    PDUs.  
    A  TP  queue  does  not  reserve  the  actual  memory  location  for  the  Pdu.  This  is  done 
    dynamically  at  runtime.  TP  buffer  will  be  assigned  to  the  queue,  if  it  requests  to  store  a 
    new I-PDU. In case there are no suitable TP buffer available, the StartOfReception call will 
    be rejected. 
    3.7.5 
    Error Handling 
    If one of the source or destination TP components that are involved in a TP data transfer 
    stops  its  transmission  or  reception  due  to  an  error  (e.g.  a  timeout  has  occurred),  the 
    corresponding  TP-routing  relation  and  buffer-element  will  be  released.  The  next  buffer 
    request on the not yet aborted Tp connection will return "BUFREQ_E_NOT_OK" and will 
    release the Tp connection. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    31 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
     
     
    Info 
    There is no AUTOSAR mechanism which notifies the other TP component side of an 
      error during the reception or transmission. 
     
     
     
    3.7.6 
    Meta Data Handling 
    Since  ASR  4.1.2  the  StartOfReception()  API  was  extended  by  the  “PduInfoPtr”.  This 
    parameter can be used to transmit Meta Data. 
    In case of a gateway routing the payload provided in the “PduInfoPtr” will be ignored by the 
    PduR.  Just  Meta  Data  are  buffered  and  transmitted  via  the  <LL>_Transmit  function.  In 
    case of forwarding to an upper layer module (e.g.  DCM  or CDD ) the payload and Meta 
    Data  will  be  forwarded  and  the  upper  layer  must  extract  the  Meta  Data  according  the 
    configured Meta Data length. 
     
     
    Caution 
    The length of the “PduInfoPtr” does not contain the “MetaDataLength” information. The 
      length parameter represents the I-PDU total length. Each module must copy the 
    MetaData from the ”PduInfoPtr” according the configured “MetaDataLength”. Do not 
    use
     the length of the “PduInfoPtr” to copy “MetaData” from the “PduInfoPtr”. 
     
     
     
     
     
    Caution 
    The lower layer module must provide the complete payload in the CopyRxData() 
      function  
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    32 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR PDUR into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the PDUR contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File 
    Source Code  Description 
    Name  Delivery 
    PduR.c 
     
    This is the source file of the PDUR 
    PduR.h 
     
    This is the header file of PDUR 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    PduR_Cfg.h   
    This file contains: 
     global constant macros 
     global function macros 
     global data types and structures 
     global data prototypes 
     global function prototypes 
    of CONFIG-CLASS PRE-COMPILE data. 
    PduR_Lcfg.h 
    This file contains: 
     global constant macros 
     global function macros 
     global data types and structures 
     global data prototypes 
     global function prototypes 
    of CONFIG-CLASS LINK data. 
    PduR_Lcfg.c 
    This file contains: 
     local constant macros 
     local function macros 
     local data types and structures 
     local data prototypes 
     local data 
     global data 
    of CONFIG-CLASS LINK and PRE-COMPILE data. 
    PduR_PBcfg.h 
    This file contains: 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    33 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    File Name 
    Description 
     global constant macros 
     global function macros 
     global data types and structures 
     global data prototypes 
     global function prototypes 
    of CONFIG-CLASS POST-BUILD data. 
    PduR_PBcfg.c 
    This file contains: 
     local constant macros 
     local function macros 
     local data types and structures 
     local data prototypes 
     local data 
     global data 
    of CONFIG-CLASS POST-BUILD data. 
    PduR_Types.h  This file contains types and defines for the PduR. 
    PduR_<Up>.h    This is the interface header of the PduR to an Upper Layer Module.  
    PduR_<Lo>.h 
    This is the interface header of the PduR to a Lower Layer Module 
    Table 4-2   Generated files 
    4.2 
    Critical Sections 
    The critical section PDUR_EXCLUSIVE_AREA_0 has to lock global interrupts to protect 
    common critical sections. 
    4.3 
    Memory Section  
    With PDUR_START_SEC_BUFFER_VAR_NOINIT_8BIT and   
    PDUR_STOP_SEC_BUFFER_VAR_NOINIT_8BIT large Tx buffer can be mapped into an 
    own memory section. 
    4.4 
    Type Definitions 
    The types defined by the PDUR are described in this chapter. 
    Type Name 
    C-Type  Description 
    Value Range 
    PduR_RoutingPathGroupIdType  uint16 
    Identification of the routing path 
    unsigned int 
    group. Routing path groups are 
    defined in the  
    PDU router configuration. 
    Table 4-3   Type definitions 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    34 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    5  API Description 
    5.1 
    Services provided by PDUR 
    5.1.1 
    PduR_Init 
    Prototype 
    void PduR_Init (const PduR_PBConfigType* ConfigPtr) 
    Parameter 
    ConfigPtr 
    >  NULL_PTR in the PDUR_CONFIGURATION_VARIANT_PRECOMPILE 
    >  Pointer to the PduR configuration data in the 
    PDUR_CONFIGURATION_VARIANT_POSTBUILD_LOADABLE and 
    PDUR_CONFIGURATION_VARIANT_POSTBUILD_SELECTABLE 
    Return code 
    void 
    none 
    Functional Description 
    This function initializes the PDU Router and performs configuration consistency checks. If the initialization 
    is performed successfully the PDU Router is in the state PduR_IsInitialized else not PduR_IsInitialized. 
    Particularities and Limitations 
    The function is used by the Ecu State Manager 
    Caution 
    PduR_Init shall not pre-empt any PDU Router function.  
     
    Call Context 
    The function must be called on task level. To avoid problems calling the PDU Router module uninitialized it 
    is important that the PDU Router module is initialized before interfaced modules. 
    Table 5-1   PduR_Init 
    5.1.2 
    PduR_InitMemory 
    Prototype 
    void PduR_InitMemory (void) 
    Parameter 
    void 
    none 
    Return code 
    void 
    none 
    Functional Description 
    The function initializes variables, which cannot be initialized with the startup code. 
    Particularities and Limitations 
    The function is called by the application. 
    Call Context 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    35 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    The function must be called on task level. 
    Table 5-2   PduR_InitMemory 
    5.2 
    Services 
    5.2.1 
    PduR_GetVersionInfo 
    Prototype 
    void PduR_GetVersionInfo (Std_VersionInfoType* versioninfo) 
    Parameter 
    versioninfo 
    Pointer to where to store the version information of the PDU Router. 
    Return code 
    void 
    none 
    Functional Description 
    Returns the version information of the PDU Router. 
    Particularities and Limitations 
    The function is called by the application. 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-3   PduR_GetVersionInfo 
    5.2.2 
    PduR_GetConfigurationId 
    Prototype 
    uint32 PduR_GetConfigurationId (void) 
    Parameter 
    void 
    none 
    Return code 
    uint32 
    uint32 
    Functional Description 
    Provides the unique identifier of the PDU Router configuration. 
    Particularities and Limitations 
    The function is called by the application. 
    Call Context 
    The function can be called on interrupt and task level. 
    Table 5-4   PduR_GetConfigurationId 
    5.2.3 
    PduR_EnableRouting 
    Prototype 
    void PduR_EnableRouting (PduR_RoutingPathGroupIdType id) 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    36 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Parameter 
    id 
    Identification of the routing path group. Routing path groups are defined in the 
    PDU router configuration. 
    Return code 
    void 
    none 
    Functional Description 
    This function enables a routing path group. If the routing path group does not exist or is already enabled, 
    the function returns with no action. 
    Particularities and Limitations 
    The function is called by the BSW Mode Manager. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_EnableRouting or PduR_DisableRouting calls for the same id. 
    Table 5-5   PduR_EnableRouting 
    5.2.4 
    PduR_DisableRouting 
    Prototype 
    void PduR_DisableRouting (PduR_RoutingPathGroupIdType id) 
    Parameter 
    id 
    Identification of the routing path group. Routing path groups are defined in the 
    PDU router configuration. 
    Return code 
    void 
    none 
    Functional Description 
    This function disables a routing path group. If the routing path group does not exist or is already disabled, 
    the function returns with no action. 
    Particularities and Limitations 
    The function is called by the BSW Mode Manager. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_EnableRouting or PduR_DisableRouting calls for the same id. 
    Table 5-6   PduR_DisableRouting 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    37 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.3 
    Communication Interface  
    5.3.1 
    PduR_<GenericUp>Transmit 
    Prototype 
    Std_ReturnType PduR_<GenericUp>Transmit (PduIdType id, PduInfoType* 
    info) 
    Parameter 
    id 
    ID of the <GenericUp> I-PDU to be transmitted 
    info 
    Payload information of the I-PDU (pointer to data and data length) 
    Return code 
    Std_ReturnType 
    Std_ReturnType 
    E_OK The request was accepted by the PDU Router and by the destination 
    layer. 
    E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the info is not valid 
    or the request was not accepted by the destination layer. 
    Functional Description 
    The function serves to request the transmission of a Communication Interface I-PDU. The PDU Router 
    evaluates the upper layer I-PDU handle and performs appropriate handle and port conversion. The call is 
    routed to a lower communication interface module using the appropriate I-PDU handle of the destination 
    layer. 
    Particularities and Limitations 
    The function is called by an upper layer. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericUp>Transmit calls for the same upper layer id. 
    Table 5-7   PduR_<GenericUp>Transmit 
    5.3.2 
    PduR_<GenericLo>RxIndication 
    Prototype 
    void PduR_<GenericLo>RxIndication (PduIdType id, const PduInfoType* 
    info) 
    Parameter 
    id 
    Handle ID of the received <GenericLo> I-PDU. 
    info 
    Payload information of the received I-PDU (pointer to data and data length). 
    Return code 
    void 
    none 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    38 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Functional Description 
    The function is called by a lower communication interface to indicate the complete reception of a lower 
    communication interface I-PDU. The PDU Router evaluates the lower communication interface I-PDU 
    handle and performs appropriate handle and port conversion. The call is routed to an upper communication 
    interface module using the appropriate I-PDU handle of the destination layer. 
    Particularities and Limitations 
    The function is called by a lower communication interface module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLo>RxIndication calls for the same a lower communication interface id. 
    Table 5-8   PduR_<GenericLo>RxIndication 
    5.3.3 
    PduR_<GenericLo>TriggerTransmit 
    Prototype 
    void PduR_<GenericLo>TriggerTransmit (PduIdType id, PduInfoType* info) 
    Parameter 
    id 
    Handle ID of the <GenericLo> I-PDU that will be transmitted. 
    info 
    Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall be 
    copied, and the available buffer size in SduLengh. On return, the service will 
    indicate the length of the copied SDU data in SduLength. 
    Return code 
    Std_ReturnType 
    E_OK: The SDU has been copied and the SduLength indicates the number of 
    copied bytes. 
    E_NOT_OK: No data has been copied, because PduR is not initialized or 
    TxPduId is not valid or PduInfoPtr is NULL_PTR or SduDataPtr is NULL_PTR 
    or SduLength is too small. 
    Functional Description 
    The function is called by a lower layer communication interface to request the TX I-PDU data before 
    transmission. The PDU Router evaluates the lower layer communication interface I-PDU handle and 
    performs appropriate handle and port conversion. The call is routed to an upper IF module using the 
    appropriate I-PDU handles of the destination layer. 
    Particularities and Limitations 
    The function is called by a lower layer communication interface 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLo>TriggerTransmit calls for the same id. 
    Table 5-9   PduR_<GenericLo>TriggerTransmit 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    39 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.3.4 
    PduR_<GenericLo>TxConfirmation 
    Prototype 
    void PduR_<GenericLo>TxConfirmation (PduIdType id) 
    Parameter 
    id 
    Handle ID of the transmitted lower layer communication interface I-PDU. 
    Return code 
    void 
    none 
    Functional Description 
    The function is called by a lower communication interface to confirm the complete transmission of a lower 
    communication interface I-PDU. The PDU Router evaluates the lower communication interface I-PDU 
    handle and performs appropriate handle and port conversion. The call is routed to an upper layer 
    communication interface module using the appropriate I-PDU handle of the destination layer. 
    Particularities and Limitations 
    The function is called by a lower communication interface module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLo>TxConfirmation calls for the same lower layer communication interface id. 
    Table 5-10   PduR_<GenericLo>TxConfirmation 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    40 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.4 
    Transport Protocol 
    This  chapter  describes  the  interfaces  provided  to  Upper  Layers  (e.g.  Dcm,  ApplTp  and 
    Cdds). Replace the tag <UpTp> by the MSN of the Upper Layer. 
     
    5.4.1 
    PduR_<GenericUpTp>ChangeParameter 
    Prototype 
    Std_ReturnType PduR_<GenericUpTp>ChangeParameter (PduIdType id, 
    TPParameterType parameter, uint16 value) 
    Parameter 
    id 
    ID of the <UpTp> I-PDU where the parameter has to be changed 
    parameter 
    The TP parameter that shall be changed. 
    value 
    The new value for the TP parameter. 
    Return code 
    Std_ReturnType 
    Std_ReturnType 
    E_OK: The parameter was changed successfully.  
    E_NOT_OK: The parameter change was rejected. 
    Functional Description 
    The function serves to change a specific transport protocol parameter (e.g. block-size). 
    The PDU Router evaluates the <UpTp> I-PDU handle and performs appropriate handle and port 
    conversion. The call is routed to a lower TP module using the appropriate I-PDU handle of the destination 
    layer. 
    Particularities and Limitations 
    The function is called by <UpTp>. 
    Call Context 
    This function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<UpTp>ChangeParameter calls for the same id. 
    Table 5-11   PduR_<GenericUpTp>ChangeParameter 
    5.4.2 
    PduR_<GenericUpTp>CancelReceive 
    Prototype 
    Std_ReturnType PduR_<GenericUpTp>CancelReceive (PduIdType id) 
    Parameter 
     id 
    ID of the RX <GenericUp> I-PDU to be cancelled 
    Return code 
    Std_ReturnType 
    Std_ReturnType 
    E_OK:       Cancellation was executed successfully by the destination module.  
    E_NOT_OK:  Cancellation was rejected by the destination module. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    41 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Functional Description 
    The function serves to cancel the reception of a TP layer I-PDU. 
    The PDU Router evaluates the upper layer transport protocol I-PDU handle and performs appropriate 
    handle and port conversion. The call is routed to a lower TP module using the appropriate I-PDU handle of 
    the destination layer. 
    Particularities and Limitations 
    The function is called by an upper layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericUpTp>CancelReceive calls for the same upper layer id. 
    Table 5-12   PduR_<GenericUpTp>CancelReceive 
    5.4.3 
    PduR_<GenericUpTp>CancelTransmit 
    Prototype 
    Std_ReturnType PduR_<GenericUpTp>CancelTransmit (PduIdType id) 
    Parameter 
    id 
    ID of the TX upper layer I-PDU of the routing that must be cancelled in the 
    lower layer 
    Return code 
    Std_ReturnType 
    Std_ReturnType 
    E_OK The cancellation request was accepted by the PDU Router and by the 
    TP layer. 
    E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the request was not accepted by the TP layer. 
    Functional Description 
    The function serves to cancel the transmission of a TP layer I-PDU. 
    The PDU Router evaluates the upper layer transport protocol I-PDU handle and performs appropriate 
    handle and port conversion. The call is routed to a lower TP module using the appropriate I-PDU handle of 
    the destination layer. 
    Particularities and Limitations 
    The function is called by an upper layer transport protocol module  
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericUpTp>CancelTransmit calls for the same upper layer id. 
    Table 5-13   PduR_<GenericUpTp>CancelTransmit 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    42 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.4.4 
    PduR_<GenericLoTp>StartOfReception 
    Prototype 
    BufReq_ReturnType PduR_<GenericLoTp>StartOfReception (PduIdType id, 
    PduInfoType info, PduLengthType TpSduLength, PduLengthType* 
    bufferSizePtr) 
    Parameter 
    id 
    ID of the <GenericLo> I-PDU that will be received. 
    info 
    Pointer to the buffer (SduDataPtr) contains MetaData if this feature is enabled.  
    TpSduLength 
    Length of the entire <GenericLo> TP SDU which will be received 
    bufferSizePtr 
    Pointer to the receive buffer in the receiving module. 
     This parameter will be used to compute Block Size (BS) in the transport 
    protocol module. 
    Return code 
    BufReq_ReturnType 
    BufReq_ReturnType BUFREQ_OK Connection has been accepted. 
    bufferSizePtr indicates the available receive buffer. 
    BUFREQ_E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the info is not valid 
    or the request was not accepted by the upper layer. 
    or no buffer is available 
    Functional Description 
    This function will be called by the lower layer at the start of receiving an I-PDU. The I-PDU might be 
    fragmented into multiple N-PDUs (FF with one or more following CFs) or might consist of a single N-PDU 
    (SF). 
    Particularities and Limitations 
    The function is called by lower layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLoTp>StartOfReception calls for the same lower layer transport protocol id. 
    Table 5-14   PduR_<GenericLoTp>StartOfReception 
    5.4.5 
    PduR_<GenericLoTp>CopyRxData 
    Prototype 
    BufReq_ReturnType PduR_<GenericLoTp>CopyRxData (PduIdType id, 
    PduInfoType* info, PduLengthType* bufferSizePtr) 
    Parameter 
    id 
    ID of the lower layer transport protocol I-PDU that will be received. 
    info 
    Pointer to the buffer (SduDataPtr) and its length (SduLength) containing the 
    data to be copied by PDU Router module in case of gateway or upper layer 
    module in case of reception. 
    bufferSizePtr 
    Available receive buffer after data has been copied. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    43 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Return code 
    BufReq_ReturnType 
    BufReq_ReturnType 
    BUFREQ_OK Buffer request accomplished successful. 
    BUFREQ_E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the info is not valid 
    or the request was not accepted by the upper layer. 
    or the request length to copy is greater than the remaining buffer size 
    BUFREQ_E_OVFL The upper TP module is not able to receive the number of 
    bytes. The request was not accepted by the upper layer. 
    Functional Description 
    This function is called by the lower layer transport protocol if data has to be copied to the receiving module. 
    Parallel routing of several I-PDU is possible. 
    Particularities and Limitations 
    The function is called by lower layer transport protocol 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLoTp>CopyRxData calls for the same lower layer transport protocol id. 
    Table 5-15   PduR_<GenericLoTp>CopyRxData 
    5.4.6 
    PduR_<GenericLoTp>CopyTxData 
    Prototype 
    BufReq_ReturnType PduR_<GenericLoTp>CopyTxData (PduIdType id, 
    PduInfoType* info, RetryInfoType* retry, PduLengthType* 
    availableDataPtr) 
    Parameter 
     
    id 
    ID of the lower layer I-PDU that will be transmitted. 
    info 
    Pointer to the destination buffer and the number of bytes to copy. 
    In case of gateway the PDU Router module will copy otherwise the source 
    upper layer module will copy the data. If not enough transmit data is available, 
    no data is copied. The transport protocol module will retry. 
    A size of copy size of “0” can be used to indicate state changes in the retry 
    parameter. 
    retry 
    retry not supported yet, is always a NULL_PTR. 
    availableDataPtr 
    Indicates the remaining number of bytes that are available in the PDU Router 
    Tx buffer. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    44 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Return code 
    BufReq_ReturnType 
    BufReq_ReturnType 
    BUFREQ_OK The data has been copied to the transmit buffer successful. 
    BUFREQ_E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the info is not valid 
    or the request was not accepted by the upper layer and no data has been 
    copied. 
    BUFREQ_E_BUSY The request cannot be processed because the TX data is 
    not available and no data has been copied. The TP layer might retry later the 
    copy process. 
    Functional Description 
    This function is called by a lower layer transport protocol module to query the transmit data of an I-PDU 
    segment. 
    Particularities and Limitations 
    The function is called by a lower layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLoTp>CopyTxData calls for the same a lower layer transport protocol module id. 
    Table 5-16   PduR_<GenericLoTp>CopyTxData 
    5.4.7 
    PduR_<GenericLo>TpTxConfirmation 
    Prototype 
    void PduR_<GenericLo>TpTxConfirmation (PduIdType id, Std_ReturnType 
    result) 
    Parameter 
    id 
    ID of the <GenericLo> I-PDU that will be transmitted. 
    result 
    Result of the TP transmission 
    E_OK            The TP transmission has been completed successfully. 
    E_NOT_OK   PduR_Init() has not been called 
                           or the transmission was aborted 
                           or the id is not valid 
                           or the id is not forwarded 
                           or the request was not accepted by the destination upper layer. 
    Return code 
    void 
    none 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    45 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    Functional Description 
    The function is called by a lower layer transport protocol module to confirm a successful transmission of a 
    lower layer transport protocol module TX SDU or to report an error that occurred during transmission. The 
    PDU Router evaluates the lower layer transport protocol module I-PDU handle and performs appropriate 
    handle and port conversion. The call is routed to an upper TP module using the appropriate I-PDU handle 
    of the destination layer. 
    Particularities and Limitations 
    The function is called by a lower layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLo>TpTxConfirmation calls for the same the lower layer transport protocol module id. 
    Table 5-17   PduR_<GenericLo>TpTxConfirmation 
    5.4.8 
    PduR_<GenericLo>TpRxIndication 
    Prototype 
    void PduR_<GenericLo>TpRxIndication (PduIdType id, Std_ReturnType 
    result) 
    Parameter 
    id 
    ID of the <GenericLo> I-PDU that will be received. 
    result 
    Result of the TP reception 
    E_OK          The TP reception has been completed successfully. 
    E_NOT_OK PduR_Init() has not been called 
                        or the reception was aborted  
                        or the id is not valid 
                        or the id is not forwarded 
                        or the request was not accepted by the destination upper layer. 
    Return code 
    void 
    none 
    Functional Description 
    The function is called by the lower layer transport protocol module to indicate the complete reception of a 
    lower layer transport protocol module SDU or to report an error that occurred during reception. The PDU 
    Router evaluates the lower layer transport protocol module I-PDU handle and performs appropriate handle 
    and port conversion. The call is routed to an upper TP module using the appropriate I-PDU handle of the 
    destination layer. 
    Particularities and Limitations 
    The function is called by a lower layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericLo>TpRxIndication calls for the same lower layer transport protocol module. 
    Table 5-18   PduR_<GenericLo>TpRxIndication 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    46 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.4.9 
    PduR_<GenericUpTp>Transmit 
    Prototype 
    Std_ReturnType PduR_<GenericUpTp>Transmit (PduIdType id, PduInfoType* 
    info) 
    Parameter 
    id 
    ID of the upper layer I-PDU that have to be transmitted 
    info 
    Payload information of the I-PDU (pointer to data and data length) 
    Return code 
    Std_ReturnType 
    Std_ReturnType 
    E_OK The request was accepted by the PDU Router and by the destination 
    layer. 
    E_NOT_OK PduR_Init() has not been called 
    or the id is not valid 
    or the id is not forwarded in this identity 
    or the info is not valid 
    or the request was not accepted by the TP layer. 
    Functional Description 
    The function serves to request the transmission of a TP layer I-PDU. 
    The PDU Router evaluates the incoming I-PDU ID and performs appropriate ID and port conversion. The 
    call is routed to the TP layer using the appropriate I-PDU handle of the destination layer. 
    Particularities and Limitations 
    The function is called by an upper layer transport protocol module. 
    Call Context 
    The function can be called on interrupt and task level and has not to be interrupted by other 
    PduR_<GenericUpTp>Transmit calls for the same an upper layer transport protocol module id. 
    Table 5-19   PduR_<GenericUpTp>Transmit 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    47 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    5.5 
    Service Ports 
    5.5.1 
    Complex Device Driver Interaction  
    Besides  the  AUTOSAR  modules,  Complex  Device  Drivers  (CDD)  are  also  possible  as 
    upper  layer  and  lower  transport  protocol  or  communication  interface  modules  for  the 
    PduR. When a callout function of the PduR is invoked from a lower or upper layer module 
    for a PDU that is transmitted or received by a CDD, the PduR invokes the corresponding 
    target function of the CDD. If all PDUs transmitted or received by a CDD are referenced by 
    communication interface modules, the CDD requires a communication interface API.  If all 
    PDUs transmitted or received by a CDD are referenced by transport protocol modules, the 
    CDD requires a transport protocol API. 
    A  CDD  can  either  require  a  communication  interface  API  or  it  can  require  a  transport 
    protocol API but not both. The API functions provided by the PduR for the CDD interaction 
    contain the CDD’s name. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    48 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    6  Configuration 
    6.1 
    Use Case Configuration: Communication interface range gateway 
    The PduR routing paths configuration is typically focused on the routing of dedicated Pdus 
    and  their  bus-specific  representation  (e.g.  the  concrete  CAN  ID,  DLC,  …).  For  some 
    network  and  communication  architectures  it  might  be  helpful  to  avoid  the  dedicated 
    configuration of all possible and required PduR routing paths. Especially if a huge amount 
    of  Pdus  shall  be  routed  between  networks,  the  PduR  routing  paths  configuration  gets 
    extensive, error-prone and requires a lot of hardware resources (ROM / RAM). 
    To overcome this situation, so called range-routings could be used. For the routing of a full 
    Pdu range between two networks just single PduR routing path needs to be configured. 
    Technically, the range-routing is based on the usage of MetaData information appended to 
    the  Pdu  data  field.  During  Pdu  reception  the  related  bus  interface  module  stores  all 
    required  Pdu  meta  information  (the  CAN  ID)  in  the  MetaData  part  of  the  Pdu  data  field. 
    The  PduR  itself  performs  the  routing  of  the  full  Pdu  data  field,  including  the  MetaData. 
    During  transmission  the  related  bus  interface  module  uses  the  MetaData  information  for 
    dynamic  adaptation  (the  CAN  ID)  of  the  transmitted  bus  Pdu.  The  range  of  the  routed 
    Pdus is defined by the bus interface specific Rx Pdu range. In case of CanIf,  the CAN ID 
    Rx filter is used to define the range. Figure 6-1 visualizes the range-routing technique. 
     
    PduR
    CanIf
    Store Rx 
    Use stored CAN ID 
    CAN ID in 
    from meta data for 
    Payload
    CAN ID
    MetaData
    meta data
    transmission
    Pdu
    CAN ID
    Pdu
    CAN ID
    Rx ID mask 
    filter
    Routed CAN ID is identical
     
    Figure 6-1  Meta data routing with CanIf 
     
     
    Limitations 
    There are some limitations when using the described range-routing technique: 
       Available for CAN only  
     No CAN ID conversion possible 
     No length conversion possible 
     No dynamic PDU lengths possible  
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    49 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
    6.1.1 
    Step-by-step configuration 
     
     
    Configuration Example 

      All following step-by-step instructions are based on this range-routing example: 
    CAN ID  CAN ID  DLC  Source network /  Destination network(s) / channel(s) 
    code 

    mask 
    channel 
    0x700 
    0x708 

    CAN0 
    CAN1, CAN2 
    0x708 
    0x708 

    CAN1 
    CAN0 
    0x708 
    0x708 

    CAN2 
    CAN0 
    Table 6-1   Example range routings 
    The CAN ID range is defined by the condition 
    <received CAN-ID> & <mask> == <code> & <mask> 
     
    The following step-by-step configurations steps will result in the following CanIf / PduR 
    range routing architecture shown in Figure 6-2. 
    1:N routing path
    PduR
    Tx FIFO 
    Tx FIFO 
    Tx FIFO 
    Tx FIFO 
    CAN1
    CAN2
    CAN2_to_C
    CAN1_to_C
    AN0
    AN0
    CanIf
    Rx range
    Rx range
    ID
    0x700
    ID
    0x708
    mask 0x708
    mask 0x708
    CAN0 Rx
    CAN1 Tx
    CAN2 Tx
    CAN1 Rx
    CAN2 Rx
    CAN0 Tx
     
    Figure 6-2  CanIf / PduR range routing example overview 
     
     
     
     
    Derived model elements / Validation and solving actions 

      During project setup the EcuC configuration will be automatically derived from the 
    provided input files. Therefore some of the following manual configuration steps are 
    redundant. In this case, please extend or adapt the existing configuration containers 
    and parameters to the described step-by-step configuration. 
    Parameters and containers which will be created and configured by background-
    validations are not described explicitly. Please finalize all manual configuration steps 
    before solving the open validations results. Use the provided solving actions. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    50 
    based on template version 4.9.2 




    Technical Reference MICROSAR PDU Router 
     
     
    Create global Pdus 

        Create global Pdus for every required range routing source and destination channel. 
    Global Pdu container: /MICROSAR/EcuC/EcucPduCollection/Pdu 
     Create and configure a MetaData length. 2 bytes are required for standard CAN IDs, 
    4 bytes are required for extended CAN identifiers. 
    MetaData length: /MICROSAR/EcuC/EcucPduCollection/Pdu/MetaDataLength 
     Configure the Pdu length to the Pdu payload length. 
    Pdu length: /MICROSAR/EcuC/EcucPduCollection/Pdu/PduLength 
    For the example configuration this results in the following global Pdu configuration: 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    51 
    based on template version 4.9.2 






    Technical Reference MICROSAR PDU Router 
     
     
    Create CanIf Rx Pdus  

        Create a CanIf Rx Pdu for every required range routing source channel. 
    CanIf Rx Pdu container: /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg 
     Configure the Rx CAN ID range by the CAN ID code and the CAN ID mask 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanId  
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdMask 
    The CAN ID range is defined by the filter condition 
    <received CAN-ID> & <mask> == <code> & <mask> 
     Configure the CAN ID type (standard or extended) and the DLC with the parameters  
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdType 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduDlc 
     Reference the related channel specific Rx global Pdu created in the previous steps 
    with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduRef 
      Reference the related CAN channel hardware receive object (HRH) used for 
    reception of the range Pdus with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduHrhIdRef 
     Assign the PduR as upper layer user with the parameter /MICROSAR/CanIf/ 
    CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduUserRxIndicationUL 
     
    For the example configuration this results in the following CanIf Rx Pdu configuration: 
     
     
     
     
     
     
    Create CanIf Tx Pdus 

        Create a CanIf Tx Pdu for every required range routing destination channel. 
    CanIf Tx Pdu container: /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg 
     Configure the Tx CAN ID used for prioritization of this dynamic Tx Pdu against other 
    static Pdus with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduCanId 
    Use the highest priority CAN ID of the routing range for this prioritization ID. 
      Configure the CAN DLC with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduDlc 
     Reference the related global Pdu created in the previous steps with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduRef 
     Reference the related channel specific CanIf Tx buffer object used for transmission 
    of the range Pdus with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduBufferRef 
     
    For the example configuration this results in the following CanIf Tx Pdu configuration: 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    52 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
     
     
    Create PduR routing paths 

      Finally create the PduR routing paths connecting the CanIf Rx and Tx range Pdus. A 
    single PduR routing path for every channel specific range routing is required. 
     Create a PduR routing path: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath 
     Reference the related channel specific Rx global Pdu at the routing path source: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRSrcPdu/PduRSrcPduRef 
     Reference the related channel specific Tx global Pdu at the routing path destination: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRDestPdu/PduRDestPduRef 
     
    For the example configuration this results in the following PduR routing path 
    configuration: 
    RoutingPath 
    RoutingPath Source 
    RoutingPath Destination(s) 
    Global Pdu 
    Global Pdu(s) 
    RP_RangeRouting_ RxRangePdu_CAN0 
    TxRangePdu_CAN0_to_CAN1, 
    CAN0_to_CAN1_2 
    TxRangePdu_CAN0_to_CAN2 
    RP_RangeRouting_ RxRangePdu_CAN1 
    TxRangePdu_CAN1_to_CAN0 
    CAN1_to_CAN0 
    RP_RangeRouting_ RxRangePdu_CAN2 
    TxRangePdu_CAN2_to_CAN0 
    CAN2_to_CAN0 
     
     
     
     
     
     
    For further details regarding the PduR communication interface gateway, please refer 
    to chapter 3.6. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    53 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
    6.1.2 
    Optional configuration variants / options 
     
     
    [Optional] Configure PduR FIFO routing 

      In case the sequence of successive routed range Pdus shall be retained, a 
    FIFO queue must be configured within the PduR. 
      Create PduR Tx buffer (FIFO) for every range routing destination channel: 
    /MICROSAR/PduR/PduRRoutingTables/PduRTxBufferTable/PduRTxBuffer 
      Configure the Tx buffer length to the length of the routed global Pdu 
    (including the MetaData length): 
    /MICROSAR/PduR/PduRRoutingTables/PduRTxBufferTable/PduRTxBuffer/Pdu
    RPduMaxLength 
      Configure the Tx buffer depth to the maximum expected amount of queued 
    Pdus (see also chapter 3.6.2):  
    /MICROSAR/PduR/PduRRoutingTables/PduRTxBufferTable/PduRTxBuffer/Pdu
    RTxBufferDepth 
     
     
      Reference the created Tx buffers at the related PduR range routing paths: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/P
    duRDestPdu/PduRDestTxBufferRef 
     
      
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    54 
    based on template version 4.9.2 







    Technical Reference MICROSAR PDU Router 
     
     
    [Optional] CAN priority inversion 

        Enable the CanIf feature „Cancellation of PDUs and requeueing” in order to 
    avoid inner priority inversion: 
    /MICROSAR/CanIf/CanIfCtrlDrvCfg/CanIfCtrlDrvTxCancellation 
     
     
      Enable the CAN driver feature „Multiplexed Transmission“ in order to avoid 
    external priority inversion: 
    /MICROSAR/<CAN_Platform>/Can/CanGeneral/CanMultiplexedTransmission 
     
     
     
    If this feature is enabed, multiple hardware objects are used for 
    transmission of a single logical Tx object. 
    Hint: These features are not supported by all CAN controllers. Please refer to  
    [7] and [8]. 
     
     
     
     
    [Optional] Alternative CanIf Rx range configuration method 

      Depending on the required CAN ID range, the range can also be configured using an 
    upper- and lower layer ID using the following container / parameters: 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdRange 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdRange/CanIfR
    xPduCanIdRangeLowerCanId 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdRange/CanIfR
    xPduCanIdRangeUpperCanId 
     
     
     
    In case of this alternative range configuration method, the previously used range 
    configuration parameters must not be used: 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanId 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdMask 
     
     
    For further details about the CanIf and CAN driver modules, please refer to [7] and [8]. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    55 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
    6.2 
    Use Case Configuration: Functional requests gateway routing 
    Gateway  ECUs  typically  include  diagnostic  services,  handling  physical  and  functional 
    addressed  requests  used  by  external  diagnostic  tools  during  the  development, 
    manufacturing and service. 
    Functionally addressed request messages are a kind of broadcast requests which shall be 
    processed  by  all  (or  a  dedicated  set  of)  ECUs. Typically  this  includes  the  gateway  ECU 
    itself  as  well.  In  case  the  ECUs  are  distributed  on  multiple  CAN  networks,  the  gateway 
    ECU  needs  to  handle  the  broadcasting  of  the  request  messages  to  the  connected  sub-
    network as well as the handling of the functional requests by the gateway-own diagnostic 
    handler. 
    Gateway ECU
    Diagnostic  handler
    ECU A
    Diagnostic 
    Diagnostic 
    ECU B
    handler
    Tool
    Diagnostic 
    handler
    functional  requests
    CAN 0
    CAN 1
    CAN 2
      
    Figure 6-3  Example functional requests gateway network architecture 
    To realize the gateway behavior as visualized in Figure 6-3, a PduR 1:N transport protocol 
    gateway could be configured, as shown in Figure 6-4. 
    Dcm
    Service  handler
    PduR
    1:N routing path
    CanTp
    Physical request 
    Functional request  handler
    handler
    CanIf
    Physical request / 
    Functional request 
    response message
    message
     
    Figure 6-4  Functional request gateway architecture 
     
     
    Handling of physically addressed diagnostic messages 
     
    Routing of physically addressed diagnostic messages is not focus of this chapter. 
      Please refer to chapter 6.1 introducing range-routing paths which could be used for 
    efficient and simple routing of physically addressed diagnostic messages. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    56 
    based on template version 4.9.2 







    Technical Reference MICROSAR PDU Router 
    6.2.1 
    Step-by-step configuration 
     
     
    Configuration Example 

      All following step-by-step instructions are based on the following functional diagnostic 
    routing example: 
    Functional diagnostic 
    DLC  Source network / 
    Destination network(s) / 
    request ID 
    channel 
    channel(s) 
    0x7DF 

    CAN0 
    CAN1, CAN2 
    Table 6-2  
    Example functional diagnostic request routing 
     
     
     
     
    Derived model elements / Validation and solving actions 

      During project setup the EcuC configuration will be automatically derived from the 
    provided input files. Therefore some of the following manual configuration steps are 
    redundant. In this case, please extend or adapt the existing configuration containers 
    and parameters to the described step-by-step configuration. 
    Parameters and containers which will be created and configured by background-
    validations are not described explicitly. Please finalize all manual configuration steps 
    before solving the open validations results. Use the provided solving actions. 
     
     
     
     
     
    Create global Pdus / Sdus 
        Create two global Pdus for the received functional request. The first global Pdu 
    interconnects the CanIf and CanTp receive paths. The second global Pdu (Sdu) 
    interconnects the CanTp, PduR and the related diagnostic handler (e.g. Dcm). 
    Global Pdu container: /MICROSAR/EcuC/EcucPduCollection/Pdu 
    This step is optional if the own functional request routing path was automatically 
    derived based on input files during project setup. 
     Create a pair of global Pdus (Pdu and Sdu) for every destination channel where the 
    functional requests shall be routed to. 
      Configure the Pdu length to the CAN frame length of the functional request 
    message. The length of the Sdu (interconnection between CanTp, PduR and the 
    related diagnostic handler) shall be the length of transport protocol payload.  
    Pdu length: /MICROSAR/EcuC/EcucPduCollection/Pdu/PduLength 
     
    For the example configuration this results in the following global Pdu configuration:
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    57 
    based on template version 4.9.2 






    Technical Reference MICROSAR PDU Router 
    Create CanIf Rx Pdus  
      The following steps are optional if the own functional request routing path was 
    automatically derived based on input files during project setup. 
     
     Create a CanIf Rx Pdu for the functional diagnostic request message. 
    CanIf Rx Pdu container: /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg 
     Configure the static Rx CAN ID of the functional request message 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanId 
     Configure the CAN ID type (standard or extended) and the DLC with the parameters  
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdType 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduDlc 
     Reference the related functional request Rx global Pdu created in the previous 
    steps with the parameter  
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduRef 
      Reference the related CAN channel hardware receive object (HRH) used for 
    reception of the functional request message with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduHrhIdRef 
     Assign the CanTp as upper layer user with the parameter /MICROSAR/CanIf/ 
    CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduUserRxIndicationUL 
     
    For the example configuration this results in the following CanIf Rx Pdu configuration:
     
     
     
     
     
     
    Create CanIf Tx Pdus 

        Create a CanIf Tx Pdu for every destination channel where the functional requests 
    shall be routed to: 
    CanIf Tx Pdu container: /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg 
     Configure the static Tx CAN ID of the functional request message with the 
    parameter  
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduCanId 
      Configure the CAN DLC with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduDlc 
     Reference the related functional request Tx global Pdu created in the previous steps 
    with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduRef 
     Reference the related channel specific CanIf Tx buffer object used for transmission 
    of the functional request message with the parameter 
    /MICROSAR/CanIf/CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduBufferRef 
     Assign the CanTp as upper layer user with the parameter /MICROSAR/CanIf/ 
    CanIfInitCfg/CanIfTxPduCfg/CanIfTxPduUserTxConfirmationUL 
     
    For the example configuration this results in the following CanIf Tx Pdu configuration: 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    58 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
    Create CanTp Rx channel  
    The following steps are optional if the own functional request routing path was 
      automatically derived based on input files during project setup. 
     Create a CanTp Rx channel for the functional request  
    CanTp Rx channel container: /MICROSAR/CanTp/CanTpConfig/CanTpChannel 
     Create a CanTp Rx N-Sdu container below the previously created Rx channel: 
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpRxNSdu 
     Reference the related global Pdu (Sdu, interconnecting the CanTp, PduR and 
    diagnostic handler) created in the previous steps with the parameter  
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpRxNSdu/CanTpRxNSduRef 
     Configure the Rx Sdu as functional communication type with the parameter 
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpRxNSdu/CanTpRxTaType 
     
     
     
     Reference the related global Pdu (interconnecting the CanIf and CanTp) created in 
    the previous steps with the parameter /MICROSAR/CanTp/CanTpConfig/ 
    CanTpChannel/CanTpRxNSdu/CanTpRxNPdu/CanTpRxNPduRef 
     
     
    For further information regarding the CanTp timing configuration parameters please 
    refer to [9]. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    59 
    based on template version 4.9.2 






    Technical Reference MICROSAR PDU Router 
     
     
    Create CanTp Tx channels
     
        Create a CanTp Tx channel for every destination channel where the functional 
    requests shall be routed to. 
    CanTp Tx channel container: /MICROSAR/CanTp/CanTpConfig/CanTpChannel 
      Set the channel mode of the created Tx channel to half-duplex mode: 
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpChannelMode 
     
     
     Create a CanTp Tx N-Sdu container below the previously created Tx channel: 
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu 
     Reference the related global Pdu (Sdu, interconnecting the CanTp, PduR and 
    diagnostic handler) created in the previous steps with the parameter  
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxNSduRef 
     Configure the Tx Sdu as functional communication type with the parameter 
    /MICROSAR/CanTp/CanTpConfig/CanTpChannel/CanTpTxNSdu/CanTpTxTaType 
     
     
     
     
     Reference the related global Pdu (interconnecting the CanIf and CanTp) created in 
    the previous steps with the parameter /MICROSAR/CanTp/CanTpConfig 
    /CanTpChannel/CanTpTxNSdu/CanTpTxNPdu/CanTpTxNPduRef 
     
     
    For further information regarding the CanTp timing configuration parameters please 
    refer to [9]. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    60 
    based on template version 4.9.2 





    Technical Reference MICROSAR PDU Router 
     
     
    Create a PduR TP buffer 

      The following steps are optional if sufficient TP buffers are already configured. 
     Create a new PduR TP buffer which will be used for the TP gateway routing of the 
    functional request messages. 
    /MICROSAR/PduR/PduRRoutingTables/PduRTpBufferTable/PduRTpBuffer 
     Configure the size of TP buffer to the TP payload length of the functional requests. 
    In case of CanTp the buffer size must be at least 7 bytes. 
     
     
    Please refer to chapter 3.7.3 for further details regarding the TP buffer configuration. 
     
     
     
     
    Create / Extend PduR routing path 

      Finally create a PduR 1:N routing path. This 1:N routing path shall route the received 
    functional diagnostic requests to the gateway-own diagnostic application and all 
    connected destination channels.  
    In case the functional request routing path for the gateway-own diagnostic application 
    was derived automatically the first steps describing the creation of a routing path can 
    be skipped. Proceed with the configuration of the additional routing destinations. 
     Create the PduR routing path: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath 
     Reference the related functional request Rx global Pdu (Sdu, interconnecting the 
    CanTp, PduR and diagnostic handler) at the routing path source: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRSrcPdu/PduRSrcPduRef 
    and the routing path destination: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRDestPdu/PduRDestPduRef 
    This step is optional if the own functional request routing path was automatically 
    derived based on input files during project setup. 
     Add a new routing destination to the previously created routing path for every 
    destination channel the functional requests shall be routed to 
    PduR routing path destination: /MICROSAR/PduR/ 
    PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/PduRDestPdu 
    and reference the related functional request Tx global Pdu (Sdu) at the new routing 
    path destination: 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRDestPdu/PduRDestPduRef 
     Configure the TP threshold value of the created gateway routing path to the value 1. 
    Please refer to chapter 3.7.2 for further details of the TP threshold configuration. 
    /MICROSAR/PduR/PduRRoutingTables/PduRRoutingTable/PduRRoutingPath/Pd
    uRDestPdu/PduRTpThreshold  
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    61 
    based on template version 4.9.2 




    Technical Reference MICROSAR PDU Router 
    For the example configuration this results in the following PduR routing path 
    configuration: 
    RoutingPath 
    RoutingPath Source 
    RoutingPath Destination(s) Global 
    Global Pdu 
    Pdu(s) 
    RP_FuncReq_CAN
    RxSdu_FuncReq_CAN0  RxSdu_FuncReq_CAN0  
    0_to_CAN1_2 
    (gateway-own diagnostic application), 
    TxSdu_FuncReq_CAN1, 
    TxSdu_FuncReq_CAN2 
     
     
     
     
     
     
     
     
    For further details about the CanIf and CanTp modules, please refer to [7] and [9]. 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    62 
    based on template version 4.9.2 




    Technical Reference MICROSAR PDU Router 
    6.3 
    Use Case Configuration: N:1 routing path 
    N:1  routing  paths  are  not  specified  by  AUTOSAR.  The  multiplicity  of  a  PduRSrcPdu 
    container is defined to one. Therefore N single 1:1/1:M routing paths (mixture of 1:M/N:1 
    routing paths is supported) referencing the same global Pdu in one of their PduRDestPdu 
    container  must  be  configured.  Every  PduRSrcPdu  container  must  reference  their  own 
    global PDU, duplicates are not allowed. Whereas more than one PduRDestPdu container 
    may  reference  the  same  global  PDU  to  support  the  N:1  routing  feature.  An  example 
    configuration is shown in Figure 6-5. Both configured routing paths are 1:2 routing paths, 
    but  both  routing  paths  refer  to  the  same  global  PDU  in  one  of  their  two  PduRDestPdu 
    container. That makes them also a 2:1 routing path. The data flow is shown in Figure 6-6. 
    The names refer to the example configuration in Figure 6-5. 
     
     
     
    Cancel Transmit for N:1 routing paths is only supported if a Tx Confirmation is enabled. 
     
     
     
     
     
     
     
     
    Figure 6-5: example N:1 routing path configuration 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    63 
    based on template version 4.9.2 



    Technical Reference MICROSAR PDU Router 
     
    Figure 6-6  EcuC configuration of (mixed) N:1 / 1:N routing paths 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    64 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    7  AUTOSAR Standard Compliance 
    7.1 
    Deviations 
     The API PduR_<User:LoTp>StartOfReception is implemented according to 
    SWS_PduR_00507 ASR 4.1.2 [3]  
     The PduR does not provide the return value  “BUFREQ_E_BUSY” for the function 
    PduR_<User:LoTp>StartOfReception like specified in Requirement PDUR507 in  [1].  
     The parameter list contains a PduInfoType 
     
     The API PduR_<User:LoTp>RxIndication is implemented according to 
    SWS_PduR_00375 ASR 4.1.2 [3] 
     Result type changed to Std_ReturnType 
     
     The API PduR_<User:LoTp>TxConfirmation is implemented according to 
    SWS_PduR_00381 ASR 4.1.2 [3] 
     Result type changed to Std_ReturnType 
     
     The PduR does not provide the return value “BUFREQ_E_BUSY” for the function 
    PduR_<User:LoTp>CopyRxData like specified in Requirement PDUR512 in [1]. The API 
    is implemented according to SWS_PduR_00512 ASR 4.1.1 [2] 
     
     If the PduR_<Lo>StartOfReception is called with an I-PDU ID that is already in process, 
    the PDU Router does not forward the call to the upper module 
     
     In case a transport protocol module reports PduR_<LoTp>TxConfirmation with result 
    other than NTFRSLT_OK the PDUR does not forward the result in the 
    <Up>_TpTxConfirmation to the source upper layer module due to optimization reason. 
     
     The PduR does not support the retry parameter in the PduR_<LoTp>CopyTxData like 
    specified in Requirement PDUR518 in [1] 
     
     State Management: PDUR_REDUCED is not used 
     
     PduR does not return any value if a routing path group is disabled 
     
     PduR does not clear the buffers if a routing path group is disabled 
     
     The header files does not contain software and specification version number 
     
     If the routing path group id does not exist, then the PDUR call the DET instate of return 
    with no action. [PDUR0716] 
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    65 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    7.2 
    Limitations 
    Since 8-bit micro controllers are out of scope in AUTOSAR, PDUR has been optimized for 
    the  usage  on  16-  and  32-bit  controllers.  Therefore  the  target  system  must  be  able  to 
    provide atomic read and write accesses to 16-bit variables. 
     
    7.2.1 
    General 
      Link-time configuration support 
      Multiple Configuration support 
      1:N fan-out from the same upper layer PDU 
      N:1 fan-in to the same upper layer PDU 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    66 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    8  Glossary and Abbreviations 
    8.1 
    Glossary 
    Term 
    Description 
    BSWMD 
    The BSWMD is a formal notation of all information belonging to a certain 
    BSW artifact (BSW module or BSW cluster) in addition to the 
    implementation of that artifact. 
    Buffer 
    A buffer in a memory area located in the RAM. It is an memory area 
    reserved by the application for data storage. 
    Callback function 
    This is a function provided by an application. E.g. the CAN Driver calls a 
    callback function to allow the application to control some action, to make 
    decisions at runtime and to influence the work of the driver. 
    Cfg5 
    DaVinci Configurator 
    Channel 
    A channel defines the assignment (1:1) between a physical 
    communication interface and a physical layer on which different modules 
    are connected to (either CAN or LIN). 1 channel consists of 1..X 
    network(s). 
    Component 
    CAN Driver, Network Management ... are software COMPONENTS in 
    contrast to the expression module, which describes an ECU. 
    Confirmation 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'confirmation' a service provider informs a 
    service user about the result of a preceding service request of the service 
    user. Notification by the CAN Driver on asynchronous successful 
    transmission of a CAN message. 
    Critical section 
    A critical section is a sequence of instructions where mutual exclusion 
    must be ensured. Such a section is called 'critical' because shared data is 
    modified within it. 
    Electronic Control 
    Also known as ECU. Small embedded computer system consisting of at 
    Unit 
    least one CPU and corresponding periphery which is placed in one 
    housing. 
    Event 
    An exclusive signal which is assigned to a certain extended task. An 
    event can be used to send binary information to an extended task. The 
    meaning of events is defined by the application. Any task can set an 
    event for an extended task. The event can only be cleared by the task 
    which is assigned to the event. 
    Gateway 
    A gateway is designed to enable communication between different bus 
    systems, e.g. from CAN to LIN. 
    Indication 
    A service primitive defined in the ISO/OSI Reference Model (ISO 7498). 
    With the service primitive 'indication' a service provider informs a service 
    user about the occurrence of either an internal event or a service request 
    issued by another service user. Notification of application in case of 
    events in the Vector software components, e.g. an asynchronous 
    reception of a CAN message. 
    Interrupt 
    Processor-specific event which can interrupt the execution of a current 
    program section. 
    Interrupt service 
    The function used for direct processing of an interrupt. 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    67 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    routine 
    Network 
    A network defines the assignment (1:N) between a logical communication 
    grouping and a physical layer on which different modules are connected 
    to (either CAN or LIN). One network consists of one channel, Y networks 
    consists of 1..Z channel(s). We say network if we talk about more than 
    one bus. 
    Overrun 
    Overwriting data in a memory with limited capacity, e.g. queued message 
    object. 
    Post-build 
    This type of configuration is possible after building the software module or 
    the ECU software. The software may either receive parameters of its 
    configuration during the download of the complete ECU software resulting 
    from the linkage of the code, or it may receive its configuration file that 
    can be downloaded to the ECU separately, avoiding a re-compilation and 
    re-build of the ECU software modules. In order to make the post-build 
    time re-configuration possible, the re-configurable parameters shall be 
    stored at a known memory location of ECU storage area. 
    Schedule table 
    Table containing the sequence of LIN message identifiers to be 
    transmitted together with the message delay. 
    Signal 
    A signal is responsible for the logical transmission and reception of 
    information depending on the restrictions of the physical layer. The 
    definition of the signal contents is part of the database given by the 
    vehicle manufacturer. Signals describe the significance of the individual 
    data segments within a message.  Typically bits, bytes or words are used 
    for data segments but individual bit combinations are also possible. In the 
    CAN data base, each data segment is assigned a symbolic name, a 
    value range, a conversion formula and a physical unit, as well as a list of 
    receiving nodes. 
    Transport Protocol 
    Some information that must be transferred over the CAN/LIN bus does 
    not fit into individual message frames because the data length exceeds 
    the maximum of 8 bytes. In this case, the sender must divide up the data 
    into a number of messages. Additional information is necessary for the 
    receiver to put the data together again. 
    Use case 
    A model of the usage by the user of a system in order to realize a single 
    functional feature of the system. 
    Table 8-1   Glossary 
    8.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    BSWMD 
    Basic Software Module Description 
    CAN 
    Controller Area Network protocol originally defined for use as a 
    communication network for control applications in vehicles. 
    CDD 
    Complex Device Driver 
    COM 
    Communication 
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    68 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    DCM 
    Diagnostic Communication Manager 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    DLC 
    Data Length Code, Number of data bytes of a CAN message 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    ECUC 
    ECU Configuration 
    FIFO 
    First In First Out 
    HIS 
    Hersteller Initiative Software 
    ID 
    Identifier (e.g. Identifier of a CAN message) 
    ISR 
    Interrupt Service Routine 
    LIN 
    Local Interconnect Network 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    MSN 
    Module shortname 
    PDU 
    Protocol Data Unit 
    PDUR 
    PDU Router 
    RAM 
    Random Access Memory 
    ROM 
    Read-Only Memory 
    RTE 
    Runtime Environment 
    SDU 
    Segmented Data Unit 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    TP 
    Transport Protocol 
    Table 8-2   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    69 
    based on template version 4.9.2 


    Technical Reference MICROSAR PDU Router 
    9  Contact 
    Visit our website for more information on 
     
      News 
      Products 
      Demo software 
      Support 
      Training data 
      Addresses 
     
    www.vector.com 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 3.00.00 
    70 
    based on template version 4.9.2 

    Document Outline


    1.3.162 - TechnicalReference_Rte

    MICROSAR RTE

    1.3.164 - TechnicalReference_RteAnalyzer

    MICROSAR RTE Analyzer

    1.3.166 - TechnicalReference_RteAnalyzers


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR RTE Analyzer 
    Technical Reference 
     
      
    Version 1.0.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Sascha Sommer 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR RTE Analyzer 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Sascha Sommer 
    2015-09-25 
    0.5 
    Initial creation for RTE Analyzer 0.5.0 
    Sascha Sommer 
    2016-02-26 
    0.6 
    Update for RTE Analyzer 0.6.0 
    Sascha Sommer 
    2016-07-07 
    0.7 
    Described Configuration Feedback and 
    Template Variant Check 
    Sascha Sommer 
    2016-10-20 
    0.8 
    Configuration Feedback extensions 
    Sascha Sommer 
    2017-03-23 
    0.9 
    Updated for RTE Analyzer 0.9.0 
    Charu Pathni 
    Removed BETA disclaimer 
    Fixed chapter numbering 
    Sascha Sommer 
    2017-05-09 
    1.0 
    Update for RTE Analyzer 1.0.0 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   ISO 
    ISO/IEC 9899:1990, Programming languages -C 
    Second 
    edition 
    [2]   AUTOSAR 
    AUTOSAR_SWS_RTE.pdf 
    4.2.2 
     
     
    Scope of the Document 
    This technical reference describes the general use of the MICROSAR RTE Analyzer static 
    code  analysis  tool.  This  document  is  relevant  for  developers  that  want  to  integrate  a 
    generated RTE into an ECU with functional safety requirements. All aspects that concern 
    the generation of the RTE are described in the technical reference of the RTE. 
     
     
     
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    Contents 
     
    1 
    RTE Analyzer History ................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    3 
    Functional Description ................................................................................................. 8 
    4 
    RTE Analysis and Integration .................................................................................... 10 
    4.1 

    Scope of Delivery ............................................................................................. 10 
    4.1.1 

    Static Files ....................................................................................... 10 
    4.1.2 
    Dynamic Files .................................................................................. 12 
    4.2 
    Restrictions ...................................................................................................... 13 
    4.3 
    RTE Analyzer Command Line Options ............................................................. 13 
    4.4 
    Analysis Report Contents ................................................................................. 14 
    4.4.1 

    Analyzed Files .................................................................................. 14 
    4.4.2 
    Configuration Parameters ................................................................ 14 
    4.4.3 
    Findings ........................................................................................... 15 
    4.4.4 
    Configuration Feedback ................................................................... 22 
    4.4.5 
    Template Variant Check ................................................................... 24 
    4.5 
    Integration into DaVinci CFG............................................................................ 24 
    5 
    Glossary and Abbreviations ...................................................................................... 28 
    5.1 

    Glossary .......................................................................................................... 28 
    5.2 
    Abbreviations ................................................................................................... 28 
    6 
    Additional Copyrights ................................................................................................ 29 
    7 
    Contact ........................................................................................................................ 30 
     
     
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    Tables 
    Table 1-1  
    RTE Analyzer history .................................................................................. 6 
    Table 3-1  
    Supported  features .................................................................................... 9 
    Table 4-1  
    Static files ................................................................................................. 11 
    Table 4-2  
    Assumed platform type sizes .................................................................... 12 
    Table 4-3  
    Generated files ......................................................................................... 13 
    Table 4-4  
    RTE Analyzer Command Line Options ...................................................... 14 
    Table 4-5  
    Analysis parameters that are extracted from the configuration .................. 15 
    Table 4-6  
    RTE Analyzer Findings ............................................................................. 22 
    Table 5-1  
    Glossary ................................................................................................... 28 
    Table 5-2  
    Abbreviations ............................................................................................ 28 
    Table 6-1  
    Free and Open Source Software Licenses ............................................... 29 
    Figures 
    Figure 4-1 
    Project menu ............................................................................................ 25 
    Figure 4-2 
    External generation steps ......................................................................... 25 
    Figure 4-3 
    Code generation ....................................................................................... 26 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    1  RTE Analyzer History 
    The  RTE  Analyzer  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the RTE Analyzer.  
    RTE Analyzer 
    New Features 
    Version 
    0.5.0 
    Initial version of MICROSAR RTE Analyzer for MICROSAR RTE 4.9.x 
    Supported Features: 

    Detection of RTE code that cannot be compiled 

    Detection of Out Of Bounds write accesses within RTE APIs 

    Detection of Interrupt Lock API sequence mismatches within RTE 
    APIs 

    Detection of Unreachable RTE APIs and runnables 

    Detection of RTE variables that are accessed from concurrent 
    execution contexts without protection 

    Detection of concurrent calls to non-reentrant APIs within the RTE 

    Detection of variables that are accessed from multiple cores and 
    that are not mapped to non-cacheable memory sections 

    Detection of non-typesafe interfaces to the BSW and SWCs where 
    a call with a wrong parameter might cause out of bounds writes by 
    the RTE or a called runnable/BSW API. 

    Detection of recursive call sequences 
    0.6.0 
    Updated for MICROSAR RTE 4.10.x 
    0.6.1 
    Updated for MICROSAR RTE 4.11.x 
    0.7.0 
    Updated for MICROSAR RTE 4.12.x 
    New optimized Range Analysis algorithm 
    Added Configuration Feedback 
    Added Template Variant Check 
    0.8.0 
    Extended Configuration Feedback 
    Findings that are expected to always occur were moved to the 
    configuration feedback section in the Analysis report 
    RTE Analyzer now automatically extracts the number of bytes written by 
    the COM signal reception APIs from the generated MICROSAR COM 
    sources 
    RTE Analyzer now automatically extracts the size of the buffer that is 
    passed by the NVM module from the generated MICROSAR NVM 
    sources 
    RTE Analyzer now checks for memcpy with overlapping source and 
    destination 
    0.9.0 
    Compilation support is now included in MicrosarIRAnalyzer 
    Added new checks for flags and overlapping memcpy arguments 
    1.0.0 
    First major release 
    Table 1-1   RTE Analyzer history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    2  Introduction 
    This  document  describes  the  static  code  analysis  tool  MICROSAR  RTE  Analyzer. 
    MICROSAR  RTE  Analyzer  is  part  of  MICROSAR  Safe  RTE.  MICROSAR  Safe  RTE 
    provides  an  AUTOSAR  RTE  generator  that  is  developed  with  an  ISO26262  compliant 
    development process, to allow the usage of the generated RTE code within an ECU with 
    functional safety requirements. 
    MICROSAR  RTE  Analyzer  analyzes  the  generated  RTE  code  for  errors  with  a  special 
    emphasis on sporadic runtime errors that are hard to detect during ECU integration tests. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    3  Functional Description 
    The  features  listed  in  the  following  table  cover  the  complete  functionality  of  MICROSAR 
    RTE Analyzer. 
     
    Supported Features 
    Compilation check for RTE code 
    Detection of disallowed inline assembly usage in RTE APIs 
    Detection of template variants that are not allowed for SafeRTE 
    Detection of template combinations that are not allowed for SafeRTE 
    Detection of accesses to invalid pointers in RTE APIs 
    Detection of out of bounds write accesses in RTE APIs 
    Detection of memcpy operations with overlapping pointers in RTE APIs 
    Detection of global RTE variables that are not initialized 
    Detection of interrupt lock API sequence mismatches in RTE APIs 
    Detection of OS APIs that are wrongly called with locked interrupts in RTE APIs 
    Detection of data consistency APIs that are called from the wrong context in RTE APIs 
    Detection of RTE variables that are accessed from concurrent execution contexts without 
    protection 
    Detection of RTE variables that are accessed from multiple cores and that are not mapped to 
    non-cacheable memory sections 
    Detection of concurrent calls to non-reentrant APIs within RTE APIs 
    Configuration Feedback for scheduling properties 
    Configuration Feedback for executable entities 
    Configuration Feedback for unreachable RTE APIs and entities 
    Configuration Feedback for RTE APIs that require a valid COM buffer configuration 
    Configuration Feedback for RTE APIs that require a valid NVM buffer configuration 
    Automatic verification of COM buffer assumptions for MICROSAR COM 
    Automatic verification of NVM buffer assumptions for MICROSAR NVM 
    Configuration Feedback for non-typesafe interfaces to the BSW and SWCs where a call with a 
    wrong parameter might cause out of bounds writes by the RTE or a called runnable/BSW API 
    Configuration Feedback for RTE APIs for which a call from a wrong context might cause data 
    consistency problems 
    Configuration Feedback for RTE APIs that are blocking 
    Configuration Feedback for RTE APIs that communicate with other ECUs 
    Configuration Feedback for RTE APIs with queues 
    Configuration Feedback for RTE APIs with alive timeout handling 
    Configuration Feedback for RTE APIs with invalidation handling 
    Configuration Feedback for RTE APIs with never received handling 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    Supported Features 
    Configuration Feedback for RTE APIs with initial value handling 
    Configuration Feedback for RTE APIs with E2E transformer handling 
    Configuration Feedback for RTE APIs with data conversion  
    Configuration Feedback for RTE APIs that access non-volatile memory 
    Configuration Feedback for exclusive areas 
    Configuration Feedback for connections 
    Configuration Feedback for recursive calls 
    Configuration Feedback for spinlocks that need to protect from task interruptions 
    RTE Analyzer Configuration generation by DaVinci CFG 
    Analysis report generation 
    Configuration Feedback Generation for QM and ASIL partitions 
    Table 3-1   Supported  features 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    4  RTE Analysis and Integration 
    This chapter gives necessary information  about  the content  of the delivery,  the usage of 
    MICROSAR RTE Analyzer and a description of the generated report. 
    4.1 
    Scope of Delivery 
    The delivery contains the files which are described in the chapters 4.1.1 and 4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    MicrosarRteAnalyzer.exe 
    MICROSAR RTE Analyzer command line frontend 
    MicrosarRteAnalyzerCfgGen.exe 
    MICROSAR RTE Analyzer configuration file generator 
    (automatically invoked by DaVinci CFG during RTE 
    generation) 
    Settings_RteAnalyzer.xml 
    DaVinci CFG adaption module 
    TechnicalReference_RteAnalyzer.pdf 
    This document 
    MicrosarIRAnalyzer.exe 
    Analysis backend (used internally by 
    MicrosarRteAnalyzer.exe) 
    License_Artistic.txt 
    Perl license 
    License_LLVM.txt 
    LLVM/CLANG license 
    Com.h 
    Stub Com header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Compiler.h 
    Stub Compiler header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Compiler_Cfg.h 
    Stub Compiler_Cfg header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    ComStack_Cfg.h 
    Stub ComStack_Cfg header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    ComStack_Types.h 
    Stub ComStack_Types header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Det.h 
    Stub Det header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    E2EXf.h 
    Stub E2EXf header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Float.h 
    Stub Float header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Ioc.h 
    Stub Ioc header (used internally by 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    10 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    File Name 
    Description 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    LdCom.h 
    Stub LdCom header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    MemMap.h 
    Stub MemMap header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    NvM.h 
    Stub NvM header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Os.h 
    Stub Os header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Os_MemMap.h 
    Stub Os_MemMap header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Platform_Types.h 
    Stub Platform_Types header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Std_Types.h 
    Stub Std_Types header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    String.h 
    Stub String header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Xcp.h 
    Stub Xcp header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    XcpProf.h 
    Stub XcpProf header (used internally by 
    MicrosarRteAnalyzer.exe for standalone RTE 
    verification) 
    Vstdlib.h 
    Stub VStdlib header (used internally by 
    MicroarRteAnalyzer.exe to extract the COM signal 
    lengths) 
    Table 4-1   Static files 
     
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    11 
    based on template version 5.12.0 



    Technical Reference MICROSAR RTE Analyzer 
    RTE Analyzer assumes the following maximum data type sizes: 
     
    Type 
    Size in Bits 
    sint8 

    uint8 

    sint16 
    16 
    uint16 
    16 
    sint32 
    32 
    uint32 
    32 
    sint64 
    64 
    uint64 
    64 
    float32 
    32 
    float64 
    64 
    enum 
    32 
    Table 4-2   Assumed platform type sizes 
     
     
     
    Caution 
    If the sizes of the platform types exceed the sizes described Table 4-2, contact Vector 
      as the size of the data types is used for the data consistency checks. 
     
     
     
     
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci CFG to the RteAnalyzer 
    subdirectory when the RTE is generated. 
    File Name 
    Description 
    RteAnalyzerConfiguration.json  Configuration file for MICROSAR RTE Analyzer. 
    <BSW>.c 
    These files contain stub implementations for the schedulable 
    entities that call all available RTE APIs. 
    TestControl.c 
    This file contains stubs for the BSW calls to the RTE. 
    <SWC>.c 
    These files contain stub implementations for the runnables that 
    call all available RTE APIs. 
    Com_Cfg.h 
    This file contains the configuration for the stub COM module. 
    LdCom_Cfg.h 
    This file contains the configuration for the stub LDCOM module. 
    Os_Cfg.h 
    This file contains the configuration for the stub OS module. 
    Ioc_Cfg.h 
    This file contains the IOC configuration for the stub OS module. 
    Xcp_Cfg.h 
    This file contains the configuration for the stub XCP module. 
    NvM_Cfg.h 
    This file contains the configuration for the stub NVM module. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    12 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    File Name 
    Description 
    E2EXf_Cfg.h 
    This file contains the configuration for the stub E2EXf module. 
    Table 4-3   Generated files 
    Besides  the  files  that  are  generated  by  DaVinci  CFG,  RTE  Analyzer  generates  the 
    following files when invoked from the commandline. 
    File Name 
    Description 
    AnalysisReport.txt 
    Report that contains the results of the static code analysis and 
    analysis assumptions that need to be reviewed by the user of 
    MICROSAR RTE Analyzer. 
     
    4.2 
    Restrictions  
    MICROSAR RTE Analyzer uses a Compiler front end in order to compile the input source 
    files. This  Compiler front  end  requires ANSI-C  90  [1]  conform  source  code.  Some  target 
    compilers implement specific  language  extensions  which  might  prevent  MICROSAR 
    RTE Analyzer    from    compiling    the    code successfully. The  Vector  BSW code  does  not 
    contain  such  language  extensions.  However,  these  extensions  may  be  included  via 
    customer  header  files.  In  such  a  case  the  customer  shall  take  care  that  these  language 
    extensions  are  encapsulated  via  the  preprocessor  for  the  MICROSAR  RTE  Analyzer 
    execution.  The  corresponding  preprocessor  switches  can  be  specified  via  the  command 
    line when calling MICROSAR RTE Analyzer. 
     
    4.3 
    RTE Analyzer Command Line Options 
    The  frontend  RTE  Analyzer  starts  the  static  code  analysis.  It  can  be  started  on  the 
    command  line  once  the  RTE  and  the  MICROSAR  RTE  Analyzer  configuration  were 
    generated by DaVinci CFG. 
    Option 
    Description 
    –c <config> 
    Selects the configuration file of the project that shall be analyzed. 
     
    -I <dir> 
    Add directory name <dir> to include file search path 
    -D <name>[=<value>]  Defines macro with name <name> and value <value> 
    –o <path> 
    Selects the directory to which the analysis report will be written 
    -e 
    Extended Configuration Feedback. If not set, the Configuration 
    Feedback will not include RTE functionality in OS Applications with 
    SafetyLevel QM or OS Applications for which no SafetyLevel is 
    configured in the ECUC module. 
    -d 
    Disable analysis of COM and NVM generation data 
    -j 
    Number of threads for compilation. Defaults to the number of 
    processors. 
    -V 
    Shows the version 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    13 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    –h 
    Shows the command line help 
    -w 
    Windows version (64Bit or 32Bit) 
    Table 4-4   RTE Analyzer Command Line Options 
    Example: 
    MicrosarRteAnalyzer.exe -c RteAnalyzerConfiguration.json –o 
    Reports  
     
    4.4 
    Analysis Report Contents 
    RTE Analyzer prints errors that prevent the analysis of the system to the console. 
    When  RTE  Analyzer  was  executed  without  errors,  an  analysis  report  is  written  to  the 
    output directory that contains potential problems within the generated RTE. 
    These problems are only listed in the report and not printed to the console. 
    As not every detected violation necessarily leads to an error in the ECU, the final decision 
    whether an issue is critical or not is up to the user of RTE Analyzer. 
    Besides the detected constraint violations, the analysis report also contains assumptions 
    about the system that were derived from the configuration. 
    These assumptions need to be verified by the user of RTE Analyzer. 
     
    4.4.1 
    Analyzed Files 
    The report starts with the version of the analysis report, the time of the analysis and the 
    name of the windows user that initiated the analysis. 
    Moreover the analyzed files are  listed. It needs to be assured that  the correct files were 
    analyzed and no file is missing. 
     
    4.4.2 
    Configuration Parameters 
    MICROSAR  RTE  Analyzer  relies  on  configuration  parameters  from  DaVinci  CFG  to 
    determine the scheduling properties of the individual tasks and BSW callbacks. 
    These parameters need to be reviewed because a wrong parameter might lead to missed 
    data consistency problems. 
    The report contains the following parameters  that  need to be checked against  the target 
    system. 
     
    Parameter 
    Description 
    MaxAtomicMemoryAccess 
    Describes the maximum number of bytes for 
    variable accesses up to which the compiler 
    will emit an atomic access instruction. 
    BswOsApplication 
    Describes the OS Application from which the 
    RTE Callbacks (Rte_COMCbk, Rte_LdCom, 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    14 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    Parameter 
    Description 
    Rte_GetMirror, Rte_SetMirrors, …) 
    are called. 
    OsApplications 
    Lists the OS Applications in the system 
    OsApplicationName 
    Name of the OS Application 
    CoreId 
    ID of the Core that contains the OS 
    Application 
    IsTrusted 
    Describes if the OS Application runs without 
    MPU (IsTrusted == 1) or with MPU (IsTrusted 
    == 0) 
    SafetyLevel 
    SafetyLevel of the OS Application: QM, 
    ASIL_A, ASIL_B, ASIL_C, ASIL_D 
    Tasks 
    List of OS Tasks that are assigned to the OS 
    Application 
    TaskName 
    Name of the OS Task 
    Priority 
    Priority of the OS Task 
    Preemption 
    Preemption setting of the OS Task 
    Callbacks 
    List of callbacks that are assigned to the 
    BswOsApplication 
    CallbackName 
    Name of the callback 
    ExecutedOnTaskLevel 
    Describes if the callback is called from a task 
    (1) or from an ISR (0). 
    Table 4-5   Analysis parameters that are extracted from the configuration 
     
     
    4.4.3 
    Findings 
    RTE  Analyzer  currently  reports  the  findings  described  in  Table  4-6.  The  description 
    describes the possible findings in more detail and the actions that need to be taken when 
    they are contained in the analysis report. 
     
    ID 
    Headline 
    Description 
    11000 
    Unsupported integer to pointer conversion  RTE code uses an integer value that was 
    casted to a pointer type. 
    Example: 
     
    uint8* ptr = 0xdeadbeef; 
    *ptr = 5; 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    11001 
    Unsupported inline assembly 
    RTE code uses inline assembly. 
    Example: 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    15 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
     
    asm("add %al, (%rax)"); 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    11006 
    Unsupported path to pointer target 
    The pointer analysis detected a code 
    construct that it cannot handle. This code 
    construct must not be used in RTE code. 
    Contact Vector. 
    11007 
    Unsupported usage of memcpy or memset  Memcpy or memset is used through an 
    indirect function call. This code construct 
    must not be used in RTE code. Contact 
    Vector. 
    11009 
    Unsupported instruction 
    An instruction was encountered.  This 
    code construct must not be used in RTE 
    code. Contact Vector. 
    12000 
    Potential out of bounds write 
    A pointer that was already used in the 
    preparation of the analysis is outside of 
    the assumptions that were used during 
    the preparations. 
    Example: 
     
    typedef struct { 
       uint8* a; 
       uint8* b; 
    } struct_t; 
     
    struct_t s; 
     
    uint8** ptr = &s.a; 
    ptr[1][0] = 7; 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    12001 
    Potential null pointer write 
    An RTE API writes to a pointer that may 
    be null. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    12002 
    Potential out of bounds write 
    An RTE API writes outside of the bounds 
    of a variable. 
    Example: 
     
    uint8 a[5]; 
    a[5] = 1; 
     
    This code construct must not be used in 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    16 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    the RTE code. Contact Vector. 
    12003 
    Potential access of invalid pointer 
    An RTE API accesses an invalid pointer. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13000 
    Unexpected lock sequence 
    A lock function is not followed by an 
    appropriate unlock function. 
    Example: 
     
    SuspendAllInterrupts(); 
    a = 5; 
    ResumeOSInterrupts(); 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13001 
    Different lock states for loop 
    A function uses different lock states in 
    different loop iterations. 
    Example: 
     
    for (i = 0; i < 20; i++) 

        if (i == 5) 
       { 
            DisableAllInterupts(); 
        } 
        if (i == 6) 
        { 
            EnableAllInterrupts(); 
        } 

     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13002 
    Different lock states for call 
    A call may be done with and without prior 
    locking. 
    Example: 
     
    if (a == 0) 

       DisableAllInterrupts(); 

    Function(); 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13003 
    Different lock states for recursive call 
    A recursive function changes the lock 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    17 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    state prior to the next recursion. 
    Example: 
     
    void func() 

        DisableAllInterrupts(); 
        func(); 
        EnableAllInterrupts(); 

     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13004 
    Different lock states for return 
    A function may return a with different lock 
    state. 
    Example: 
     
    DisableAllInterrupts(); 
    if (a) 

       return; 

    EnableAllInterrupts(); 
    return; 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13005 
    Task or ISR returns with locked interrupts 
    A RTE Task or callback returns with 
    locked interrupts in at least one code 
    branch. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13006 
    OS API called with locked interrupt 
    An OS API e.g. WaitEvent is called with 
    locked interrupts. This is prohibited by the 
    OS specification. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13007 
    OS API called with disabled interrupts 
    An OS API e.g. SuspendOSInterrupts 
    is called within a section that is locked 
    with DisableAllInterrupts. This is 
    prohibited by the OS specification. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13008 
    OS API called in wrong context 
    An optimized MICROSAR interrupt lock 
    API is called from the wrong context. E.g. 
    an optimized lock API for trusted OS 
    application is called from an untrusted 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    18 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    application. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13009 
    Accesses can interrupt each other 
    RTE Analyzer detected that a variable is 
    accessed from multiple tasks that can 
    interrupt each other. The variable is not 
    protected by an OS API e.g. interrupt 
    lock or spinlock. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13010 
    Non-reentrant function with non-constant 
    RTE Analyzer checks the RTE for 
    handle 
    concurrent calls to BSW APIs. If the 
    reentrancy depends on the handle, the 
    handle needs to be constant so that it can 
    be analyzed by RTE Analyzer. This code 
    construct must not be used in the RTE 
    code. Contact Vector. 
    13011 
    Non-reentrant function invoked 
    RTE Analyzer detects concurrently called 
    concurrently 
    functions for which the caller would have 
    needed to assure non-reentrant calls. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    13012 
    Different resources used on same core 
    The RTE code uses different resources to 
    protect the same variable. If a variable 
    needs to be protected from concurrent 
    accesses in multiple tasks, the same 
    resource needs to be used for all 
    accesses. This code construct must not 
    be used in the RTE code. Contact Vector. 
    13013 
    Different spinlocks used 
    The RTE code uses different spinlocks to 
    protect the same variable on a single 
    core. If a variable needs to be protected 
    from concurrent accesses on multiple 
    cores, the same spinlock needs to be 
    used for all accesses. This code construct 
    must not be used in the RTE code. 
    Contact Vector. 
    13014 
    Not all accesses protected with resource 
    The RTE code does not always use 
    resources to protect a variable. If a 
    variable needs to be protected from 
    concurrent accesses in multiple tasks, the 
    same resource needs to be used for all 
    accesses. This code construct must not 
    be used in the RTE code. Contact Vector. 
    13015 
    Bitfield write access without interrupt locks  The RTE uses interrupt locks to prevent 
    read modify write problems in bitfields. 
    RTE Analyzer detected an access without 
    locks. This code construct must not be 
    used in the RTE code. Contact Vector. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    19 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    13017 
    Lock type cannot be nested 
    The RTE uses a non-nestable interrupt 
    lock nestedly. This code construct must 
    not be used in the RTE code. Contact 
    Vector.  
    13018 
    Lock uses unsupported handle parameter 
    The RTE uses a nonconstant handle for 
    spinlocks or resources. This code 
    construct must not be used in the RTE 
    code. Contact Vector. 
    14000 
    Unmatched memory section 
    A memory section was not closed 
    correctly. Example: 
     
    #define RTE_START_SEC_VAR 
    #include “MemMap.h” 
    uint8 var; 
    #define RTE_STOP_SEC_CONST 
    #include “MemMap.h” 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    14001 
    Variable not mapped to memory section 
    A variable is declared without being 
    mapped to a memory section. 
     
    Example: 
     
    uint8 var; 
     
    #define RTE_START_SEC_VAR 
    #include “MemMap.h” 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    14002 
    Variable not mapped to NOCACHE 
    A variable that is accessed from multiple 
    memory section 
    cores is not mapped to a NOCACHE 
    memory section. This may lead to data 
    consistency problems. 
    Example: 
     
    #define RTE_START_SEC_VAR 
    #include “MemMap.h” 
     
    uint8 var; 
     
    #define RTE_STOP_SEC_VAR 
    #include “MemMap.h” 
     
    This code construct must not be used in 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    20 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    the RTE code. Contact Vector. 
    16000 
    Missing task info 
    The configuration contains no task 
    settings for the task. Possible reason: a 
    function ends with the name func and is 
    missdetected as OS Task by RTE 
    Analyzer. Rename the function or ignore 
    the message. 
    17000 
    Potential illegal memcpy 
    Memcpy is called with overlapping source 
    and destination arguments. 
    Example: 
     
    Rte_MemCpy(dst, dst, 5); 
     
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    17001 
    Potential illegal memcpy (undeterminable)  Memcpy may be called with overlapping 
    source and destination arguments. The 
    size could not be resolved. This code 
    construct must not be used in the RTE 
    code. Contact Vector. 
    20000 
    Use of uninitialized variables 
    RTE code reads variables that are not 
    initialized in Rte_Start or 
    Rte_InitMemory. This code construct 
    must not be used in the RTE code. 
    Contact Vector. 
    20001 
    Inconsistent handling of never received 
    RTE code accesses never received flags 
    flags 
    that are not set on the sending side.  
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    20002 
    Inconsistent handling of invalidate flags 
    RTE code accesses invalidate flags that 
    are not set on the sending side. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    20003 
    Inconsistent handling of update flags 
    RTE code accesses invalidate flags that 
    are not set on the sending side. 
    This code construct must not be used in 
    the RTE code. Contact Vector. 
    20004 
    Inconsistent handling of idle flags 
    RTE code accesses idle flags in an 
    unsupported way. This code construct 
    must not be used in the RTE code. 
    Contact Vector. 
    20005 
    Inconsistent handling of overflow flags 
    RTE code accesses overflow flags in an 
    unsupported way. This code construct 
    must not be used in the RTE code. 
    Contact Vector. 
    20006 
    Inconsistent handling of call completed 
    RTE code accesses call completed flags 
    flags 
    in an unsupported way. This code 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    21 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    ID 
    Headline 
    Description 
    construct must not be used in the RTE 
    code. Contact Vector. 
    Table 4-6   RTE Analyzer Findings 
    4.4.4 
    Configuration Feedback 
    The  findings  from  chapter  4.4.3  describe  inconsistencies  within  the  generated  RTE. 
    However,  also  a  consistently  generated  RTE  may  violate  functional  safety  requirements 
    when  the  generated  RTE  does  not  match  the  intentions  of  the  user  e.g.  when  wrong 
    configuration parameters were chosen for the intended use case.  
    Therefore, during development of the RTE Generator a safety analysis is performed on all 
    input  parameters  of  the  generator  in  order  to  detect  functionality  for  which  a  slightly 
    different  configuration  leads  to  the  generation  of  APIs  with  compatible  C  signature  but 
    different runtime behavior. 
    RTE Analyzer lists the  detected functionality in the analysis report, so that an integration 
    test  as  required  by  ISO26262  can  confirm  that  only  the  intended  and  no  unintended 
    functionality is implemented in the generated RTE. 
    This also makes it  possible to use MICROSAR RTE Generator in  combination with  non-
    TCL1 configuration tools as unintended configuration modifications by the tool will lead to 
    an unexpected configuration feedback.  
    By  default  the  configuration  feedback  is  only  printed  for  the  OS  Applications  with  ASIL 
    safety  levels.  When  the  –e  configuration  switch  is  enabled,  the  RTE  functionality  in  OS 
    Applications with SafetyLevel QM  is  also  included. Analysis report contains the following 
    information: 
      Function may be called recursively - The software design contains e.g. configured 
    client  server  calls  that  may  lead  to  recursive  calls.  ISO26262  recommends  that 
    recursion is not used in the software design and implementation. 
      Uncalled function - A function e.g. a server runnable without connected client was 
    encountered during the analysis. Functions that are not called are not analyzed by 
    RTE Analyzer. Assure that the function is not called in the target system, either. 
      Call  with  non-typesafe  parameters  -  Some  APIs  contain  pointers  that  are  not 
    typesafe  e.g.  because  the  parameter  type  is  a  pointer  to  the  base  type  and  the 
    function writes more than a single element of this type. The parameter may also be 
    a void pointer type. RTE Analyzer lists these functions so that it can be verified that 
    the passed buffer matches the expectations of the called function. Please note that 
    the buffer that is listed by RTE Analyzer might be larger than the actual number of 
    bytes that are written by the called function. 
      COM call with non-typesafe parameters – The COM APIs for data reception are not 
    typesafe. It has to be assured, that COM does not write more bytes than expected 
    by  the  RTE.  If  MICROSAR  COM  is  used,  RTE  Analyzer  extracts  the  number  of 
    written bytes from the generated COM sources. 
      NVM  callback  with  non-typesafe  parameters  – The  NVM  GetMirror  callback  does 
    not have typesafe parameters. It has to be assured that the buffer that is passed by 
    the  NVM  is  not  smaller  than  the  number  of  bytes  that  are  written  by  the  RTE.  If 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    22 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    MICROSAR  NVM  is  used,  RTE  Analyzer  extracts  the  available  number  of  bytes 
    from the generated NVM sources. 
      API  for  Safe  component  must  not  be  called  from  wrong  context  -  The  RTE 
    generator  disables  task  priority  optimizations  for  partitions  with  an  ASIL  Safety 
    Level. If an API is used only on a single task according to the configuration, the RTE 
    generator  optimizes  nevertheless.  RTE Analyzer  lists  these APIs  so  that  it  can  be 
    confirmed that the APIs are not accidently called from a runnable for which no port 
    access was configured in the configuration. 
      Non-Queued connections – This contains list of all non-queued intra-ECU sender-
    receiver  connections  between  Rte_Write,  Rte_IWrite,  Rte_Read, 
    Rte_DRead, Rte_IRead. 
      Queued  connections  –  This  contains  list  of  all  queued  intra-ECU  sender-receiver 
    communication connections between Rte_Send and Rte_Receive. 
      Inter-runnable  connections  –  This  contains  list  of  all  inter-runnable  variable 
    connections. 
      External connections – This contains list of all the APIs and server runnables that 
    communicate with other ECUs. 
      Switch-mode  connections  –  This  contains  list  of  all  mode  connections  between 
    Rte_Switch and Rte_Mode. 
      Exclusive areas – This contains list of all exclusive areas and their implementation 
    methods.  This  includes  explicit  and  implicit  exclusive  areas.  The  implementation 
    methods need to be set according to the requirements of the application.  
      Initial values of APIs – This contains list of all the APIs that  return an initial value. 
    The calling runnable needs to handle the initial value. When RteAnalyzer was able 
    to extract the initial value from the code, the value is also printed.  
      Blocking  APIs  –  This  contains  list  of  all  APIs  that  are  blocking.  These  may 
    unexpectedly delay the calling function. 
      Executable Entities – This contains list of all the executable entities. The entities are 
    listed together with the tasks in which they are executed. 
      APIs with special return values – This contains list of all the APIs that return special 
    error  codes  such  as  RTE_E_MAX_AGE_EXCEEDED,  RTE_E_INVALID  and 
    RTE_E_NEVER_RECEIVED. 
      APIs with queues – This contains the list of APIs with queues along with the queue 
    sizes.  
      APIs with E2E transformers – This contains the list of APIs that read or write data 
    with the help of the E2E transformer. The communication partner needs to handle 
    the converted data. 
      Reentrant Executable Entities – This contains list of all executable entities that are 
    called reentrantly. This is based on the core id, priority and the preemption setting 
    of the tasks in which the entity is executed. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    23 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
      APIs  using  data  conversion  –  This  contains  list  of  all  the  APIs  that  do  data 
    conversion. The communication partner needs to handle the converted data. 
      APIs  that  may  use  NVM  –  This  contains  list  of  all  Per  Instance  Memories  and 
    sender-receiver APIs that access NV Block SWCs. The NVM module needs to be 
    configured correctly. 
    Please  note  that  the  configuration  feedback  describes  the  actual  properties  of  the  code. 
    This can be different from the configured values, especially if the APIs are generated for 
    unconnected ports. 
    Example: 
    An 
    unconnected 
    Rte_Read 
    API 
    is 
    configured 
    to 
    return 
    RTE_E_NEVER_RECEIVED.  According  to  the  RTE  specification,  the  return  value  is 
    RTE_E_UNCONNECTED  independently  of  the  never  received  handling,  therefore  the 
    generated API has no code to return RTE_E_NEVER_RECEIVED and the analysis report 
    does not list the API in the “APIs with special return values” section. 
    The safety manual describes how the configuration feedback can be used for integration 
    testing. 
    4.4.5 
    Template Variant Check 
    MICROSAR  RTE  Generator  is  a  template  based  code  generator.  During  generation, 
    MICROSAR RTE Generator  calculates checksums for the template sequences that were 
    used to generate the RTE APIs. The delivery of the generator contains a list of checksums 
    that were approved for the usage in an ECU with functional safety requirements. 
    MICROSAR  RTE  Analyzer  checks  that  the  template  sequences  that  were  used  to 
    generate the analyzed RTE are within the allowed sequences. 
    Please contact  Vector if the analysis report lists  template variants that are not  within  the 
    allowed ones. 
     
    4.5 
    Integration into DaVinci CFG 
    Since  MICROSAR  RTE  Analyzer  checks  the  consistency  of  the  generated  RTE  it  is 
    convenient to run MICROSAR RTE Analyzer automatically after the data is generated. To 
    integrate MICROSAR RTE Analyzer into DaVinci CFG, an external generation step can be 
    configured. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    24 
    based on template version 5.12.0 




    Technical Reference MICROSAR RTE Analyzer 
     
    Figure 4-1  Project menu 
    Start DaVinci CFG and select the menu “Project”. Next select the menu item “Settings”. 
     
    To  add  a  new  external  generation  step,  select  “External  Generation  Steps”.  This  will 
    display the following window: 
     
    Figure 4-2  External generation steps 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    25 
    based on template version 5.12.0 




    Technical Reference MICROSAR RTE Analyzer 
    Click on the Add button with the “+” symbol and enter the MICROSAR RTE Analyzer path 
    e.g.  
    $(SipRootPath)/Misc/RteAnalyzer/MicrosarRteAnalyzer.exe 
    and command line arguments e.g. 
    -c $(GenDataFolder)/RteAnalyzer/RteAnalyzerConfiguration.json -o 
    $(GenDataFolder)/RteAnalyzer/Reports 
    For Virtual Target, $(GenDataVTTFolder) needs to be used. 
     
     
     
    Note 
    It is required to set a working directory for a post generation step. 
     
     
     
     
     
    Now  the  external  generation  step  needs  to  be  configured  to  be  run  after  the  DaVinci 
    Generators. To configure this click on the item “Code Generation”. 
     
    Figure 4-3  Code generation 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    26 
    based on template version 5.12.0 



    Technical Reference MICROSAR RTE Analyzer 
    Now select the MICROSAR RTE Analyzer Generation Step and enable it by checking the 
    check box in front of it. Additionally MICROSAR RTE Analyzer should be run after DaVinci 
    CFG  generated  the  data.  Therefore  it  is  necessary  to  move  it  after  the  DaVinci  Code 
    Generation using the Down button with the “” symbol. 
    Now MICROSAR RTE Analyzer will be automatically executed after the DaVinci CFG has 
    generated the data. 
     
     
    Note 
    MICROSAR RTE Analyzer will also be executed if the data was not successfully 
      generated. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    27 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    5  Glossary and Abbreviations 
    5.1 
    Glossary 
    Term 
    Description 
    DaVinci CFG   
    DaVinci Configurator 5: The BSW and RTE Configuration Editor. 
    Table 5-1   Glossary 
     
     
    5.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    COM 
    Communication 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    E2EXF 
    E2E Transformer 
    HIS 
    Hersteller Initiative Software 
    ISR 
    Interrupt Service Routine 
    LDCOM 
    Efficient COM for Large Data 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    PPORT 
    Provide Port 
    RPORT 
    Require Port 
    RTE 
    Runtime Environment 
    SRS 
    Software Requirement Specification 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    Table 5-2   Abbreviations 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    28 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    6  Additional Copyrights 
     
    MICROSAR RTE Analyzer contains Free and Open Source Software (FOSS). The  
    following table lists the files which contain this software, the kind and version of the FOSS,  
    the license under which this FOSS is distributed and a reference to a license file which  
    contains the original text of the license terms and conditions. The referenced license files  
    can be found in the directory of MICROSAR RTE Analyzer.  
      
     
    File 
    FOSS 
    License 
    License Reference 
    MicrosarRteAnalyzer.exe 
    Perl 5.20.2 
    Artistic License 
    License_Artistic.txt   
    MicrosarRteAnalyzerCfgGen.exe 
    MicrosarIRAnalyzer.exe 
    llvm 3.6.2 
    LLVM 
    License_LLVM.txt 
     
    vssa r343 
    License 
    Clang 3.6.2 
    Table 6-1   Free and Open Source Software Licenses 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    29 
    based on template version 5.12.0 


    Technical Reference MICROSAR RTE Analyzer 
    7  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    30 
    based on template version 5.12.0 

    Document Outline


    1.3.167 - TechnicalReference_Rtes


     
     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR RTE 
    Technical Reference 
     
      
    Version 4.15.0 
     
     
     
     
     
     
     
     
     
     
    Author 
    PES1.3 
    Status 
    Released 
     
     
     
     
     
     


    Technical Reference MICROSAR RTE 
    Document Information 
    History 
    Author 
    Date 
    Version  Remarks 
    Bernd Sigle 
    2005-11-14  2.0.0 
    Document completely reworked and adapted to 
    AUTOSAR RTE  
    Bernd Sigle 
    2006-04-20  2.0.1 
    API description for Rte_IRead / Rte_IWrite added, 
    description of used OS/COM services added 
    Bernd Sigle 
    2006-07-11  2.0.2 
    API description for Rte_Receive / Rte_Send added; 
    Adaptation to RTE SWS 1.0.0 Final 
    Martin Schlodder  2006-11-02  2.0.3 
    Separation of RTE and target package 
    Martin Schlodder  2006-11-15  2.0.4 
    Client/Server communication 
    Martin Schlodder  2006-12-21  2.0.5 
    Serialized client/server communication 
    Martin Schlodder  2007-01-17  2.0.6 
    Array data types 
    Martin Schlodder  2007-02-14  2.0.7 
    Added exclusive areas, removed description of 
    TargetPackages 
    Bernd Sigle 
    2007-02-19  2.0.8 
    Added transmission acknowledgement  handling and 
    minor rework of the document  
    Bernd Sigle 
    2007-04-25  2.0.9 
    Added Rte_IStatus 
    Martin Schlodder  2007-04-27  2.0.10 
    Added IRV and Const/Enum 
    Martin Schlodder  2007-05-01  2.1.0 
    Completed documentation for Version 2.2 
    Bernd Sigle 
    Bernd Sigle 
    2007-07-27  2.1.1 
    Added Rte_InitMemory, Rte_IWriteRef Runnable. 
    Added description of runnable activation offset und 
    updated picture of MICROSAR architecture.  
    Martin Schlodder  2007-08-03  2.1.2 
    Added description of template update. 
    Martin Schlodder  2007-11-16  2.1.3 
    Added warning regarding IWrite / IrvIWrite.           
    Bernd Sigle 
    Added API descriptions of VFB trace hooks. 
    Updated data type info for nested types. 
    Martin Schlodder  2008-02-06  2.1.4 
    Updated descriptions on template merging and task 
    Bernd Sigle 
    mapping.                                                                
    Added description of Rte_Pim, Rte_CData, 
    Rte_Calprm and Rte_Result.                                
    Added support of string data type.                      
    Updated command line argument description.     
    Added NvRAM mapping description.                    
    Added chapter about compiler abstraction and 
    memory mapping. 
    Hannes Futter 
    2008-03-11  2.1.5 
    Additional command line switches to support direct 
    generation on xml and dcf files. 
    Bernd Sigle 
    2008-03-26  2.2.0 
    Updated description of NV Memory Mapping and 
    Chapter about limitations added.                       
    Chapter about compiler and memory abstraction 
    updated.                                                              
    Support for AUTOSAR Release 3.0 added. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Bernd Sigle 
    2008-04-16  2.3.0 
    Added description about A2L file generation and 
    updated command line options and example calls to 
    cover also the AUTOSAR XML input files. 
    Bernd Sigle 
    2008-07-16  2.4.0 
    Removed limitations for multiple instantiation and 
    compatibility mode support. 
    Bernd Sigle 
    2008-08-13  2.5.0 
    Added description of indirect APIs Rte_Port, Rte_Ports 
    and Rte_NPorts. Added description of platform 
    dependent resource calculation. 
    Bernd Sigle 
    2008-10-23  2.6.0 
    Added description of memory protection support. 
    Bernd Sigle 
    2009-01-23  2.7.0 
    Added description of mode management APIs 
    Rte_Mode and Rte_Switch and updated description of 
    Rte_Feedback.                                                      
    Added description of Rte_Invalidate and 
    Rte_IInvalidate and added new Com APIs.           
    Added additional runnable trigger events and removed 
    section for runnables without trigger, which is no 
    longer supported.                                             
    Deviation for [rte_sws_2648] added.                                
    Usage of new document template 
    Bernd Sigle 
    2009-03-26  2.8.0 
    Removed limitations for unconnected ports and for 
    data type generation. 
    Sascha Sommer  2009-08-11  2.9.0 
    Added description about usage of basic / extended 
    Bernd Sigle 
    task 
    Added description of command line parameter -v 
    Sascha Sommer  2009-10-22  2.10.0 
    Added a warning for VFB trace hooks that prevent 
    Bernd Sigle  
    macro optimizations 
    Explained that the Activation task attribute has to be 
    set for basic tasks 
    Init-Runnables no longer need to have a special suffix 
    Explained the new periodic trigger implementation 
    dialog. 
    Server runnables with CanBeInvokedConcurrently set 
    to false do not need to be mapped to tasks when the 
    calling clients cannot interrupt each other 
    Resource Usage is now listed in a HTML report 
    Updated version of referenced documents and of 
    supported AUTOSAR release. 
    Updated examples with new workspace file extension. 
    Added new defines for memory mapping. 
    Bernd Sigle 
    2010-04-09  2.11.0 
    Added description of user header file Rte_UserTypes.h 
    Updated component history and interface functions to 
    the OS. Added pictures of Rte Interfaces and Rte 
    Include Structure. Updated picture of MICROSAR 
    architecture. Rework of chapter structure. 
    Bernd Sigle 
    2010-05-25  2.11.1 
    Added description of RTE optimization mode 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Bernd Sigle 
    2010-05-26  2.12.0 
    Added new measurement chapter, added description 
    Sascha Sommer 
    of COM Rx Filter, macros for access of invalid value, 
    initial value, lower and upper limit, added support of   
    minimum start interval and second array passing 
    variant. Support of AUTOSAR Release 3.1 (RTE SWS 
    2.2.0) 
    Bernd Sigle 
    2010-07-22  2.13.0 
    Added online calibration support. Removed limitation 
     
    of missing transmission error detection 
    Bernd Sigle 
    2010-09-28  2.13.1 
    Added more detailed description of extended record 
     
    data type compatibility rule 
    Bernd Sigle 
    2010-11-23  2.14.0 
    Removed obsolete command line parameters –bo, –bc 
     
    and –bn. 
    Stephanie Schaaf        
    2011-07-25  2.15.0 
    Added general support of AUTOSAR Release 3.2.1 
    Bernd Sigle 
    (RTE SWS 2.4.0).  
    Sascha Sommer  
    Added support of never received status. 
    Added support of S/R update handling. 
    Mentioned that –g c and –g i ignore service 
    components when –m specifies an ECU project. 
    Explained RTE usage with Non-Trusted BSW     
    Added hint for FUNC_P2CONST() problems 
    Explained measurement of COM signals 
    Stephanie Schaaf   2012-01-25  2.16.0 
    Enhanced command line interface (support for several 
    Bernd Sigle 
    generation modes in one command line call, optional 
    Sascha Sommer 
    command line parameter –m) 
    Split of RTE into OS Application specific files 
    Byte arrays no longer need to be mapped to signals 
    groups 
    Allow configuration of Schedule() calls in non-
    preemptive tasks 
    Bernd Sigle 
    2012-05-18  2.17.0 
    Corrected description how the Rte_IsUpdated API can 
    be enabled 
    Bernd Sigle 
    2012-09-18  2.18.0 
    Added general support of AUTOSAR Release 3.2.2 
    (RTE SWS 2.5.0). 
    Added support of non-queued N:1 S/R communication    
    Bernd Sigle 
    2012-08-28  3.90.0 
    AUTOSAR 4.0.3 support, DaVinci Configurator 5 
    support  
    Bernd Sigle 
    2012-12-11  4.0.0 
    Updated API descriptions concerning 
    RTE_E_UNCONNECTED  return code 
    Added description of Rte_UserTypes.h file which is 
    now also generated with the template mechanism 
    Stephanie Schaaf  2013-03-26  4.1.0 
    Added support of Rte_MemSeg.a2l file 
    Added description of –o sub option for A2L file path 
    Bernd Sigle 
    2013-06-14  4.1.1 
    Added Multi-Core support (S/R communication) 
    Added support of Inter-Runnable Variables with 
    composite data types 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Katharina Benkert  2013-10-30  4.2.0 
    Added support for arrays of dynamic data length 
    Stephanie Schaaf 
    (Rte_Send/Rte_Receive) 
    Sascha Sommer 
    Added support for parallel generation for multiple 
    Bernd Sigle 
    component types 
    Multicore support 
    Added support for SchM Contract Phase Generation 
    Added support for Nv Block SWCs 
    Katharina Benkert  2014-02-06  4.3.0 
    Added support of VFB Trace Client Prefixes 
    Sascha Sommer 
    Optimized Multicore support without IOCs 
    Stephanie Schaaf 
    Memory Protection support for Multicore systems 
    Inter-ECU sender/receiver communication, queued 
    sender/receiver communication and mapped 
    client/server calls are no longer limited to the BSW 
    partition 
    Added support of Development Error Reporting 
    Added support of registering XCP Events in the XCP 
    module configuration 
    Stephanie Schaaf  2014-06-17  4.4.0 
    Support for unconnected client ports for synchronous 
    Bernd Sigle 
    C/S communication 
    Inter-Ecu C/S communication using SOME/IP 
    Transformer 
    Support for PR-Ports 
    S/R Serialization using SOME/IP Transformer and E2E 
    Transformer 
    Support LdCom 
    Bernd Sigle 
    2014-08-13  4.4.1 
    Described decimal coding of the version defines and 
    the return code of SchM_GetVersionInfo 
    Added chapter about additional copyrights of FOSS 
    Bernd Sigle 
    2014-09-12  4.4.2 
    Minor format changes only 
    Bernd Sigle 
    2014-08-13  4.5.0 
    Support Postbuild-Selectable for variant data 
    mappings and variant COM signals 
    Support E2E Transformer for Inter-Ecu C/S 
    communication 
    Support tasks mappings where multiple runnable or 
    schedulable entities using different cycle times or 
    activation offsets are mapped to a single Basic Task. 
    The realization uses OS Schedule Tables 
    Support Rte_DRead API 
    Enhanced support for PR-Ports 
    Support ServerArgumentImplPolicy = use 
    ArrayBaseType 
    Explicit order of ModeDeclarationGroups 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Bernd Sigle 
    2014-12-08  4.6.0 
    Support of PR Mode Ports 
    Support of PR Nv Ports 
    Support of bit field data types (CompuMethods with 
    category BITFIELD_TEXTTABLE) 
    Runtime optimized copying of large data 
    Support for SW-ADDR-METHOD on RAM blocks of 
    NvRAM SWCs 
    Bernd Sigle 
    2015-02-20  4.7.0 
    Support of background triggers 
    Support of data prototype mappings 
    Support of bit field text table mappings 
    Support of union data types 
    Support of UTF16 data type serialization in the 
    SOME/IP transformer 
    Runtime optimization in the generated RTE code by 
    usage of optimized interrupt locking APIs of the 
    MICROSAR OS  
    Support of further E2E profiles for data transformation 
    with the SOME/IP and E2E transformer 
    Support of OS counters with tick durations smaller 
    than 1µs 
    Bernd Sigle 
    2015-07-26  4.8.0 
    Support of COM based Transformer ComXf  
    Support of different strategies for writing NV data in Nv 
    Block SWCs  
    Support of C/S Interfaces for Nv Block SWCs  
    SWC Template generation provides user sections for 
    documentation of runnable entities  
    Wide character support in paths  
    Improved counter selection for operating systems with 
    multiple OS applications  
    Support of optimized macro implementation for 
    SchM_Enter and SchM_Exit  
    Enhanced OS Spinlock support  
    Enable optimizations in QM partitions 
    Bernd Sigle 
    2016-01-04  4.9.0 
    Support of BSW multiple partition distribution 
    Support of activation reason for runnable entities 
    (Rte_ActivatingEvent) 
    Support for initialization of send buffers for implicit S/R 
    communication 
    Generation of VFB Trace Hook calls only if hooks are 
    configured 
    Support of 64 events per task if supported by the 
    MICROSAR OS 
    Support of subelement mapping for Rx-GroupSignals 
    Support for RteUseComShadowSignalApi 
    Updated CFG5 figures 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Bernd Sigle 
    2016-02-23  4.10.0 
    AUTOSAR 4.2.2 support 
    Enhanced SomeIpXf support 
    Support of literal prefix 
    Migration to new Vector CI 
    Bernd Sigle 
    2016-05-13  4.11.0 
    Support of application data types of category map, 
    Sascha Sommer 
    curve and axis 
    Selection of COM signal timeout source (Swc / Signal)  
    Support of 1:n Inter-ECU S/R with transmission 
    acknowledgement 
    Support E2EXf for primitive byte arrays without 
    serializer 
    Autonomous error responses for Inter-ECU C/S with 
    SomeIpXf 
    Described mapping of SWCs to OS Applications. 
    Bernd Sigle 
    2016-07-14  4.12.0 
    Support of connections between Nv ports and S/R 
     
    ports 
    Support of Diagnostic Data Transformation (DiagXf) 
    Support of Data Conversion between integer data 
    types on network signals and floating point data types 
    on SWC ports 
    Support of counters from different partitions that are 
    assigned to the same core 
    Updated RTE and SWC include structure 
    Sascha Sommer  2016-11-21  4.13.0 
    Described CompuScale limitation 
    Extended multicore documentation 
    Bernd Sigle 
    2017-03-28  4.14.0 
    Support of Transformer Error Handling 
    Sascha Sommer 
    Updated DET error codes and Service IDs 
    Minor improvements. 
    Patrick Alschbach  2017-06-08  4.15.0 
    Data conversion for signals of signal groups 
    Katharina Benkert 
    Minor improvements. 
    Table 1-1   History of the document 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Reference Documents 
    No. 
    Title 
    Version 
    [1]   
    AUTOSAR_SWS_RTE.pdf 
    4.2.2 
    [2]   
    AUTOSAR_EXP_VFB.pdf  
    4.2.2 
    [3]   
    AUTOSAR_SWS_COM.pdf 
    4.2.2 
    [4]   
    AUTOSAR_SWS_OS.pdf 
    4.2.2 
    [5]   
    AUTOSAR_SWS_NVRAMManager.pdf 
    4.2.2 
    [6]   
    AUTOSAR_SWS_ECU_StateManager.pdf 
    4.2.2 
    [7]   
    AUTOSAR_SWS_StandardTypes.pdf 
    4.2.2 
    [8]   
    AUTOSAR_SWS_PlatformTypes.pdf 
    4.2.2 
    [9]   
    AUTOSAR_SWS_CompilerAbstraction.pdf 
    4.2.2 
    [10]  
    AUTOSAR_SWS_MemoryMapping.pdf 
    4.2.2 
    [11]  
    AUTOSAR_TPS_SoftwareComponentTemplate.pdf 
    4.2.2 
    [12]  
    AUTOSAR_TPS_SystemTemplate.pdf 
    4.2.2 
    [13]  
    AUTOSAR_TPS_ECUConfiguration.pdf 
    4.2.2 
    [14]  
    AUTOSAR_TR_Glossary.pdf 
    4.2.2 
    [15]  
    AUTOSAR_TPS_BSWModuleDescriptionTemplate.pdf 
    4.2.2 
    [16]  
    AUTOSAR_SWS_XCP.pdf 
    4.2.2 
    [17]  
    AUTOSAR_SWS_ DefaultErrorTracer.pdf 
    4.2.2 
    [18]  
    AUTOSAR_SWS_LargeDataCOM.pdf 
    4.2.2 
    [19]  
    AUTOSAR_SWS_SOMEIPTransformer.pdf 
    4.2.2 
    [20]  
    AUTOSAR_SWS_COMBasedTransformer.pdf 
    4.2.2 
    [21]  
    AUTOSAR_SWS_E2ETransformer.pdf 
    4.2.2 
    [22]  
    Vector DaVinci Configurator Online help 
     
    [23]  
    Vector DaVinci Developer Online help 
     
    [24]  
    AUTOSAR Calibration User Guide 
    1.0 
    Table 1-2   Reference documents 
     
     
    Scope of the Document 
    This document describes the MICROSAR RTE. It assumes that the reader is familiar with 
    the  AUTOSAR  architecture,  especially  the  software  component  (SWC)  design 
    methodology  and  the AUTOSAR  RTE  specification.  It  also  assumes  basic  knowledge  of 
    some basic software (BSW) modules like AUTOSAR Os, Com, LdCom, Transformer,  NvM 
    and  EcuM.  The  description  of  those  components  is  not  part  of  this  documentation.  The 
    related documents are listed in Table 1-2. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    Please note 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 

    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Contents 
    1 
    Component History .................................................................................................... 16 
    2 
    Introduction................................................................................................................. 21 
    2.1 
    Architecture Overview ...................................................................................... 22 
    3 
    Functional Description ............................................................................................... 25 
    3.1 

    Features .......................................................................................................... 25 
    3.1.1 
    Deviations ........................................................................................ 27 
    3.1.2 
    Additions/ Extensions ....................................................................... 28 
    3.1.3 
    Limitations ........................................................................................ 28 
    3.2 
    Initialization ...................................................................................................... 29 
    3.3 
    AUTOSAR ECUs ............................................................................................. 29 
    3.4 
    AUTOSAR Software Components.................................................................... 29 
    3.5 
    Runnable Entities ............................................................................................. 29 
    3.6 
    Triggering of Runnable Entities ........................................................................ 30 
    3.6.1 

    Time Triggered Runnables ............................................................... 30 
    3.6.2 
    Data Received Triggered Runnables ................................................ 31 
    3.6.3 
    Data Reception Error Triggered Runnables ...................................... 31 
    3.6.4 
    Data Send Completed Triggered Runnables .................................... 31 
    3.6.5 
    Mode Switch Triggered Runnables ................................................... 31 
    3.6.6 
    Mode Switched Acknowledge Triggered Runnables ......................... 31 
    3.6.7 
    Operation Invocation Triggered Runnables ...................................... 32 
    3.6.8 
    Asynchronous Server Call Return Triggered Runnables .................. 32 
    3.6.9 
    Init Triggered Runnables .................................................................. 32 
    3.6.10 
    Background Triggered Runnables .................................................... 32 
    3.7 
    Exclusive Areas ............................................................................................... 33 
    3.7.1 

    OS Interrupt Blocking ....................................................................... 33 
    3.7.2 
    All Interrupt Blocking ........................................................................ 34 
    3.7.3 
    OS Resource ................................................................................... 34 
    3.7.4 
    Cooperative Runnable Placement .................................................... 34 
    3.8 
    Error Handling .................................................................................................. 35 
    3.8.1 

    Development Error Reporting ........................................................... 35 
    4 
    RTE Generation and Integration ................................................................................ 38 
    4.1 

    Scope of Delivery ............................................................................................. 38 
    4.2 
    RTE Generation ............................................................................................... 39 
    4.2.1 

    Command Line Options ................................................................... 39 
    4.2.2 
    RTE Generator Command Line Options ........................................... 39 
    4.2.3 
    Generation Path ............................................................................... 41 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    10 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.3 
    MICROSAR RTE generation modes ................................................................ 41 
    4.3.1 

    RTE Generation Phase .................................................................... 41 
    4.3.2 
    RTE Contract Phase Generation ...................................................... 43 
    4.3.3 
    Template Code Generation for Application Software Components ... 45 
    4.3.4 
    VFB Trace Hook Template Code Generation .................................... 46 
    4.4 
    Include Structure .............................................................................................. 47 
    4.4.1 

    RTE Include Structure ...................................................................... 47 
    4.4.2 
    SWC Include Structure ..................................................................... 48 
    4.4.3 
    BSW Include Structure ..................................................................... 49 
    4.5 
    Compiler Abstraction and Memory Mapping ..................................................... 50 
    4.5.1 
    Memory Sections for Calibration Parameters and Per-Instance 
    Memory ............................................................................................ 52 

    4.5.2 
    Memory Sections for Software Components .................................... 53 
    4.5.3 
    Compiler Abstraction Symbols for Software Components and RTE .. 54 
    4.6 
    Memory Protection Support ............................................................................. 55 
    4.6.1 

    Partitioning of SWCs ........................................................................ 55 
    4.6.2 
    OS Applications ................................................................................ 55 
    4.6.3 
    Partitioning Architecture ................................................................... 56 
    4.6.4 
    Conceptual Aspects ......................................................................... 59 
    4.6.5 
    Memory Protection Integration Hints ................................................ 60 
    4.7 
    Multicore support ............................................................................................. 61 
    4.7.1 

    Partitioning of SWCs ........................................................................ 61 
    4.7.2 
    BSW in Multicore Systems ............................................................... 61 
    4.7.3 
    Service BSW in Multicore Systems .................................................. 62 
    4.7.4 
    IOC Usage ....................................................................................... 63 
    4.8 
    BSW Access in Partitioned systems ................................................................. 63 
    4.8.1 

    Inter-ECU Communication ............................................................... 63 
    4.8.2 
    Client Server Communication ........................................................... 64 
    5 
    API Description ........................................................................................................... 65 
    5.1 

    Data Type Definition ......................................................................................... 65 
    5.1.1 
    Invalid Value ..................................................................................... 66 
    5.1.2 
    Upper and Lower Limit ..................................................................... 66 
    5.1.3 
    Initial Value....................................................................................... 66 
    5.2 
    API Error Status ............................................................................................... 67 
    5.3 
    Runnable Entities ............................................................................................. 68 
    5.3.1 

    <RunnableEntity> ............................................................................ 68 
    5.3.2 
    Runnable Activation Reason ............................................................ 69 
    5.4 
    SWC Exclusive Areas ...................................................................................... 70 
    5.4.1 

    Rte_Enter ......................................................................................... 70 
    5.4.2 
    Rte_Exit ........................................................................................... 71 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    11 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.5 
    BSW Exclusive Areas ...................................................................................... 72 
    5.5.1 

    SchM_Enter ..................................................................................... 72 
    5.5.2 
    SchM_Exit ........................................................................................ 73 
    5.6 
    Sender-Receiver Communication .................................................................... 74 
    5.6.1 

    Rte_Read ......................................................................................... 74 
    5.6.2 
    Rte_DRead ...................................................................................... 75 
    5.6.3 
    Rte_Write ......................................................................................... 76 
    5.6.4 
    Rte_Receive .................................................................................... 77 
    5.6.5 
    Rte_Send ......................................................................................... 78 
    5.6.6 
    Rte_IRead ........................................................................................ 79 
    5.6.7 
    Rte_IWrite ........................................................................................ 80 
    5.6.8 
    Rte_IWriteRef .................................................................................. 81 
    5.6.9 
    Rte_IStatus ...................................................................................... 82 
    5.6.10 
    Rte_Feedback .................................................................................. 83 
    5.6.11 
    Rte_IsUpdated ................................................................................. 84 
    5.7 
    Data Element Invalidation ................................................................................ 85 
    5.7.1 

    Rte_Invalidate .................................................................................. 85 
    5.7.2 
    Rte_IInvalidate ................................................................................. 86 
    5.8 
    Mode Management .......................................................................................... 87 
    5.8.1 

    Rte_Switch ....................................................................................... 87 
    5.8.2 
    Rte_Mode ........................................................................................ 88 
    5.8.3 
    Enhanced Rte_Mode ....................................................................... 89 
    5.8.4 
    Rte_SwitchAck ................................................................................. 90 
    5.9 
    Inter-Runnable Variables .................................................................................. 91 
    5.9.1 

    Rte_IrvRead ..................................................................................... 91 
    5.9.2 
    Rte_IrvWrite ..................................................................................... 92 
    5.9.3 
    Rte_IrvIRead .................................................................................... 93 
    5.9.4 
    Rte_IrvIWrite .................................................................................... 94 
    5.10 
    Per-Instance Memory ....................................................................................... 95 
    5.10.1 

    Rte_Pim ........................................................................................... 95 
    5.11 
    Calibration Parameters .................................................................................... 96 
    5.11.1 

    Rte_CData ....................................................................................... 96 
    5.11.2 
    Rte_Prm ........................................................................................... 97 
    5.12 
    Client-Server Communication .......................................................................... 98 
    5.12.1 

    Rte_Call ........................................................................................... 98 
    5.12.2 
    Rte_Result ....................................................................................... 99 
    5.13 
    Indirect API .................................................................................................... 100 
    5.13.1 

    Rte_Ports ....................................................................................... 100 
    5.13.2 
    Rte_NPorts .................................................................................... 101 
    5.13.3 
    Rte_Port ......................................................................................... 102 
    5.14 
    RTE Lifecycle API .......................................................................................... 103 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    12 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.14.1 
    Rte_Start ........................................................................................ 103 
    5.14.2 
    Rte_Stop ........................................................................................ 103 
    5.14.3 
    Rte_InitMemory .............................................................................. 104 
    5.15 
    SchM Lifecycle API ........................................................................................ 105 
    5.15.1 

    SchM_Init ....................................................................................... 105 
    5.15.2 
    SchM_Deinit .................................................................................. 105 
    5.15.3 
    SchM_GetVersionInfo .................................................................... 106 
    5.16 
    VFB Trace Hooks ........................................................................................... 107 
    5.16.1 

    Rte_[<client>_]<API>Hook_<cts>_<ap>_Start ............................... 107 
    5.16.2 
    Rte_[<client>_]<API>Hook_<cts>_<ap>_Return ............................ 108 
    5.16.3 
    SchM_[<client>_]<API>Hook_<Bsw>_<ap>_Start ......................... 109 
    5.16.4 
    SchM_[<client>_]<API>Hook_<Bsw>_<ap>_Return ...................... 110 
    5.16.5 
    Rte_[<client>_]ComHook_<SignalName>_SigTx ............................ 111 
    5.16.6 
    Rte_[<client>_]ComHook_<SignalName>_SigIv ............................ 112 
    5.16.7 
    Rte_[<client>_]ComHook_<SignalName>_SigGroupIv .................. 113 
    5.16.8 
    Rte_[<client>_]ComHook_<SignalName>_SigRx .......................... 114 
    5.16.9 
    Rte_[<client>_]ComHook<Event>_<SignalName> ......................... 115 
    5.16.10  Rte_[<client>_]Task_Activate ......................................................... 116 
    5.16.11  Rte_[<client>_]Task_Dispatch ........................................................ 116 
    5.16.12  Rte_[<client>_]Task_SetEvent ....................................................... 117 
    5.16.13  Rte_[<client>_]Task_WaitEvent ...................................................... 117 
    5.16.14  Rte_[<client>_]Task_WaitEventRet ................................................ 118 
    5.16.15  Rte_[<client>_]Runnable_<cts>_<re>_Start .................................. 118 
    5.16.16  Rte_[<client>_]Runnable_<cts>_<re>_Return ............................... 119 
    5.17 
    RTE Interfaces to BSW .................................................................................. 120 
    5.17.1 

    Interface to COM / LDCOM ............................................................ 120 
    5.17.2 
    Interface to Transformer ................................................................. 121 
    5.17.3 
    Interface to OS ............................................................................... 122 
    5.17.4 
    Interface to NVM ............................................................................ 123 
    5.17.5 
    Interface to XCP ............................................................................. 123 
    5.17.6 
    Interface to SCHM ......................................................................... 124 
    5.17.7 
    Interface to DET ............................................................................. 124 
    6 
    RTE Configuration .................................................................................................... 125 
    6.1 

    Configuration Variants .................................................................................... 125 
    6.2 
    Task Configuration ......................................................................................... 125 
    6.3 
    Memory Protection and Multicore Configuration ............................................. 127 
    6.4 
    NV Memory Mapping ..................................................................................... 130 
    6.5 
    RTE Generator Settings ................................................................................. 131 
    6.6 
    Measurement and Calibration ........................................................................ 132 
    6.7 
    Optimization Mode Configuration ................................................................... 136 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    13 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    6.8 
    VFB Tracing Configuration ............................................................................. 137 
    6.9 
    Exclusive Area Implementation ...................................................................... 138 
    6.10 
    Periodic Trigger Implementation ..................................................................... 139 
    6.11 
    Resource Calculation ..................................................................................... 141 
    7 
    Glossary and Abbreviations .................................................................................... 142 
    7.1 

    Glossary ........................................................................................................ 142 
    7.2 
    Abbreviations ................................................................................................. 142 
    8 
    Additional Copyrights .............................................................................................. 144 
    9 
    Contact ...................................................................................................................... 145 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    14 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Illustrations 
    Figure 2-1  
    AUTOSAR architecture ............................................................................. 22 
    Figure 2-2  
    Interfaces to adjacent modules of the RTE ............................................... 24 
    Figure 4-1  
    RTE Include Structure .............................................................................. 47 
    Figure 4-2  
    SWC Include Structure ............................................................................. 48 
    Figure 4-3  
    BSW Include Structure ............................................................................. 49 
    Figure 4-4  
    Trusted RTE Partitioning example ............................................................ 56 
    Figure 4-5  
    Non-trusted RTE Partitioning example ...................................................... 57 
    Figure 6-1  
    Mapping of Runnables to Tasks .............................................................. 126 
    Figure 6-2  
    Assignment of a Task to an OS Application ............................................. 128 
    Figure 6-3  
    OS Application Configuration .................................................................. 129 
    Figure 6-4  
    Mapping of Per-Instance Memory to NV Memory Blocks ........................ 130 
    Figure 6-5  
    RTE Generator Settings.......................................................................... 131 
    Figure 6-6  
    Measurement and Calibration Generation Parameters ........................... 132 
    Figure 6-7  
    SWC Calibration Support Parameters .................................................... 134 
    Figure 6-8  
    CalibrationBufferSize Parameter ............................................................. 135 
    Figure 6-9  
    A2L Include Structure ............................................................................. 135 
    Figure 6-10  
    Optimization Mode Configuration ............................................................ 136 
    Figure 6-11  
    VFB Tracing Configuration ...................................................................... 137 
    Figure 6-12  
    Exclusive Area Implementation Configuration ......................................... 138 
    Figure 6-13  
    Periodic Trigger Implementation Configuration ....................................... 139 
    Figure 6-14  
    HTML Report .......................................................................................... 140 
    Figure 6-15  
    Configuration of platform settings ........................................................... 141 
    Tables 
    Table 1-1  
    History of the document .............................................................................. 7 
    Table 1-2  
    Reference documents ................................................................................. 8 
    Table 1-1  
    Component history.................................................................................... 20 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 27 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 28 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 28 
    Table 3-4  
    Service IDs ............................................................................................... 36 
    Table 3-5  
    Errors reported to DET ............................................................................. 37 
    Table 4-1  
    Content of Delivery ................................................................................... 38 
    Table 4-2  
    DVCfgCmd Command Line Options ......................................................... 39 
    Table 4-3  
    RTE Generator Command Line Options ................................................... 41 
    Table 4-4  
    Generated Files of RTE Generation Phase ............................................... 42 
    Table 4-5  
    Generated Files of RTE Contract Phase ................................................... 43 
    Table 4-6  
    Generated Files of RTE Template Code Generation ................................. 45 
    Table 4-7  
    Generated Files of VFB Trace Hook Code Generation ............................. 46 
    Table 4-8  
    Compiler abstraction and memory mapping .............................................. 51 
    Table 4-9  
    Compiler abstraction and memory mapping for non-cacheable variables . 51 
    Table 7-1  
    Glossary ................................................................................................. 142 
    Table 7-2  
    Abbreviations .......................................................................................... 143 
    Table 8-1  
    Free and Open Source Software Licenses ............................................. 144 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    15 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
     
    Component Version  New Features 
    2.3 
     Complex hierarchical data types like arrays of records 
     Optimization: Depending on the configuration the Rte_Read API is 
    generated as macro if possible 
    2.4 
     String data type (Encoding ISO-8859-1) 
     SWC local calibration parameters (Rte_CData) 
     Optimization: Depending on the configuration the Rte_Write API is 
    generated as macro if possible 
     Generation of unmapped client runnables enabled 
     Asynchronous C/S communication (Rte_Result) 
    2.5 
     Support of AUTOSAR 3.0 Revision 0001 
     Access to calibration element prototypes of calibration components 
    (Rte_Calprm) 
     Access to Per-Instance Memory (Rte_Pim) 
     SWC implementation template generation (command line option -g i) 
    and Contract Phase generation (command line option -g c)  for a 
    complete ECU 
    2.6 
     Intra-ECU timeout handling for synchronous C/S communication 
     Parallel access of synchronous and asynchronous server calls to an 
    operation of one server port 
     Generation of an ASAM MCD 2MC / ASAP2 compatible A2L file 
    fragment for calibration parameters and Per-Instance Memory 
    2.7 
     Multiple instantiation of software components 
     Compatibility mode 
     Object code software components 
    2.8 
     Indirect APIs (Rte_Ports, Rte_NPorts and Rte_Port) 
     Port API Option 'EnableTakeAddress' 
     Platform dependent resource calculation. 
    2.9 
     Memory protection (OS with scalability class SC3/SC4) 
    2.10 
     Mode management including mode switch triggered runnable entities 
    and mode dependent execution of runnable entities. (Rte_Switch, 
    Rte_Mode and Rte_Feedback for mode switch acknowledge) 
     Data element invalidation (Rte_Invalidate and Rte_IInvalidate) 
     Data reception error triggered runnable entities for invalidated and 
    outdated data elements 
     Multiple cyclic triggers per runnable entity 
     Multiple OperationInvokedEvent triggers for the same runnable entity 
    with compatible operations 
     Extended A2L file generation for calibration parameters and Per-
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    16 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Component Version  New Features 
    Instance Memory for user defined attributes (A2L-ANNOTATION) 
    2.11 
     Signal Fan-In 
     Unconnected provide ports 
     Generation of unreferenced data types 
     Evaluation of COM return codes 
    2.12 
     Basic task support (automatically selection) 
     Several optimizations (e.g. unneeded interrupt locks and Schedule() 
    call removed)  
     Enhanced error reporting with help messages (-v command line 
    option) 
     Support of acknowledgement only mode for transmission and mode 
    switch notification 
     Usage of compiler library functions (e.g. memcpy) removed 
     Template file update mechanism also introduced for Rte_MemMap.h 
    and Rte_Compiler_Cfg.h 
    2.13 
     Unconnected require ports 
     Basic task support (manual selection) 
     Init-Runnables no longer have name restrictions  
     Automatic periodic trigger generation can be disabled e.g. useful for 
    Schedule Table support 
     HTML Report including resource usage  
     Explicit selection of task role (Application / BSW Scheduler / Non Rte) 
     Runnables with CanBeInvokedConcurrently set to false no longer 
    require a mapping, if they are not called concurrently. 
    2.14 
     Support composite data types where not all primitive members require 
    an invalid value 
     Support inclusion of user header file 'Rte_UserTypes.h' 
    2.15 
     Optimized runnable scheduling to reduce latency times 
     Allow implementation template generation for service components, 
    complex device drivers and EcuAbstraction components 
     Optimization mode (minimize RAM consumption /  minimize execution 
    time) 
    2.16 
     MinimumStartInterval attribute (runnable de-bouncing) 
     Measurement support for S/R communication, Interrunnable variables 
    and mode communication. Extended A2L File generation and support 
    of new ASAM MCD 2MC / ASAP2 standard. Measurement with 
    XcpEvents 
     Com Filter (NewDiffersOld, Always) 
     Invalid value accessible from application 
     Support of second array passing variant 
    2.17 
     Online calibration support 
     Support transmission error detection 
     Support of extended record data type compatibility for S/R 
    communication with different record layout on sender and receiver side  
    2.18 
     Enhanced implicit communication support 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    17 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Component Version  New Features 
    2.19 
     Support of AUTOSAR 3.2 Revision 0001 
     Support never received status 
     Support S/R update handling (Rte_IsUpdated based on AUTOSAR 
    4.0) 
     Enhanced measurement support (Inter-Ecu S/R communication) 
     Selective file generation (only if file content is modified) 
     Support for Non-Trusted BSW 
    2.20 
     Enhanced command line interface (support for several generation 
    modes in one call, optional command line parameter –m) 
     Split of generated RTE into OS Application specific files 
     Byte arrays no longer need to be mapped to signal groups 
     Allow configuration of Schedule() calls in non-preemptive tasks 
     Generation of MISRA justification comments  
    2.21 
     Support of SystemSignals and SystemSignalGroups using the same 
    name 
     Support of hexadecimal coded enumeration values 
    2.22 
     Support of AUTOSAR 3.2 Revision 0002 
     Support S/R update handling according AUTOSAR 3.2.2 
     Support N:1 S/R communication 
     Support unconnected calibration R-Ports 
     Enhanced initial value handling  
    3.90 
     Support of AUTOSAR 4.0 Revision 0003 
    4.0 
     Support of pointer implementation data types 
     Support of ‘On Transition’ triggered runnable entities 
     Support of data type symbol attribute 
     Support of component type symbol attribute 
     Template generation mechanism added for Rte_UserTypes.h 
    4.1 
     Support of Rte_MemSeg.a2l 
     Enhanced command line interface (path for A2L files selectable) 
    4.1.1 
     Multi-Core support (S/R communication) 
     Support of Inter-Runnable Variables with composite data types 
    4.2 
     Support for arrays of dynamic data length (Rte_Send/Rte_Receive) 
     Support for parallel generation for multiple component types 
     Multi-Core support: 
      C/S communication 
      Mode communication without ModeDisablings and ModeTriggers 
      Inter-ECU S/R communication 
     Support mapping of individual OperationInvoked triggers 
     Support of SchM Contract Phase Generation 
     Support of Nv Block SWCs 
    4.3 
     Support of VFB Trace Client Prefixes 
     Enhanced Memory Protection support 
      Memory Protection support for Multi-Core systems 
      Inter-ECU sender/receiver communication is no longer limited to the 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    18 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Component Version  New Features 
    BSW partition 
      Mapped client/server calls are no longer limited to the BSW partition 
      Queued sender/receiver communication is no longer limited to the 
    BSW partition 
     Optimized Multi-Core support without IOCs 
     Support of Development Error Reporting 
     Support of registering XCP Events in the XCP module configuration 
    4.4 
     Support for unconnected client ports for synchronous C/S 
    communication 
     Inter-Ecu C/S communication using SOME/IP Transformer 
     Support for PR-Ports 
     S/R Serialization using SOME/IP Transformer and E2E Transformer 
     Support LdCom 
     Improved support for 3rd Party OS interoperability especially regarding 
    OS Counter handling 
    4.5 
     Support Postbuild-Selectable for variant data mappings and variant 
    COM signals 
     Support E2E Transformer for Inter-Ecu C/S communication 
     Support tasks mappings where multiple runnable or schedulable 
    entities using different cycle times or activation offsets are mapped to a 
    single Basic Task. The realization uses OS Schedule Tables 
     Support Rte_DRead API 
     Enhanced support for PR-Ports 
     Support ServerArgumentImplPolicy = use ArrayBaseType 
     Support for Mode Declaration Groups with Explicit Order 
    4.6 
     Support of PR Mode Ports 
     Support of PR Nv Ports 
     Support of bit field data types (CompuMethods with category 
    BITFIELD_TEXTTABLE) 
     Runtime optimized copying of large data 
     Support for SW-ADDR-METHOD on RAM blocks of NvRAM SWCs 
    4.7 
     Support of background triggers 
     Support of data prototype mappings 
     Support of bit field text table mappings 
     Support of union data types 
     Support of UTF16 data type serialization in the SOME/IP transformer 
     Runtime optimization in the generated RTE code by usage of 
    optimized interrupt locking APIs of the MICROSAR OS  
     Support of further E2E profiles for data transformation with the 
    SOME/IP and E2E transformer 
     Support of OS counters with tick durations smaller than 1µs 
    4.8 
     Support of COM based Transformer ComXf  
     Support of different strategies for writing NV data in Nv Block SWCs  
     Support of C/S Interfaces for Nv Block SWCs  
     SWC Template generation provides user sections for documentation of 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    19 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Component Version  New Features 
    runnable entities  
     Wide character support in paths  
     Improved counter selection for operating systems with multiple OS 
    applications  
     Support of optimized macro implementation for SchM_Enter and 
    SchM_Exit  
     Enhanced OS Spinlock support  
     Enable optimizations in QM partitions 
    4.9 
     Support of BSW multiple partition distribution 
     Support of activation reason for runnable entities 
    (Rte_ActivatingEvent) 
     Support for initialization of send buffers for implicit S/R communication 
     Generation of VFB Trace Hook calls only if hooks are configured 
     Support of 64 events per task if supported by the MICROSAR OS 
     Support of subelement mapping for Rx-GroupSignals 
     Support for RteUseComShadowSignalApi 
    4.10 
     AUTOSAR 4.2.2 support 
     Enhanced SomeIpXf support 
     Support of literal prefix 
     Support of VFB Trace Hooks for APIs of unconnected Ports 
     Support for NvMAutomaticBlockLength parameter 
     Support of E2E profiles 1 and 2 for SomeIpXf and E2EXf 
     Support of E2E profiles 4, 5 and 6 for ComXf and E2EXf 
    4.11 
     Support of application data types of category map, curve and axis 
     Selection of COM signal timeout source (Swc / Signal) 
     Support of 1:n Inter-ECU S/R with transmission acknowledgement 
     Support E2EXf for primitive byte arrays without serializer 
     Autonomous error responses for Inter-ECU C/S with SomeIpXf 
    4.12 
     Support of connections between Nv ports and S/R ports 
     Support of Diagnostic Data Transformation (DiagXf) 
     Support of Data Conversion between integer data types on network 
    signals and floating point data types on SWC ports 
     Support of counters from different partitions that are assigned to the 
    same core 
    4.13 
     Added support for SpinlockLockMethod RES_SCHEDULER 
     Several improvements and bugfixes 
    4.14 
     Support of Transformer Error Handling for S/R communication 
    4.15 
     Support of Data conversion for signals of signal groups 
    Table 1-1   Component history 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    20 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    2  Introduction 
    The  MICROSAR  RTE  generator  supports  RTE  and  contract  phase  generation. 
    Additionally, application template code can be generated for software components and for 
    VFB trace hooks. 
    This document describes the MICROSAR RTE generation process, the RTE configuration 
    with DaVinci Configurator and the RTE API. 
    Chapter  3  gives  an  introduction  to  the  MICROSAR  RTE.  This  brief  introduction  to  the 
    AUTOSAR  RTE  can  and  will  not  replace  an  in-depth  study  of  the  overall  AUTOSAR 
    methodology  and  in  particular  the AUTOSAR  RTE  specification,  which  provides  detailed 
    information on the concepts of the RTE. 
    In  addition  chapter  3  describes deviations, extensions and  limitations  of  the  MICROSAR 
    RTE compared to the AUTOSAR standard. 
    The RTE  generation process including the command line parameters of the MICROSAR 
    RTE generator is described in chapter 4. This chapter also gives hints for integration of the 
    generated  RTE  code  into  an  ECU  project.  In  addition  it  describes  the  memory  mapping 
    and compiler abstraction related to the RTE and finally, chapter 4.6 describes the memory 
    protection support of the RTE including hints for integration with the OS.   
    The  RTE  API  description  in  chapter  5  covers  the  API  functionality  implemented  in  the 
    MICROSAR RTE. 
    The description of  the  RTE  configuration  in chapter  6  covers the task mapping,  memory 
    mapping  and  the  code  generation  settings  in  DaVinci  Configurator.  A  more  detailed 
    description  of  the  configuration  tool  including  the  configuration  of  AUTOSAR  software 
    components and compositions and their integration in an ECU project can be found in the 
    online help of the DaVinci Configurator [22]. 
     
    Supported AUTOSAR Release*:  

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    RTE_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    RTE_MODULE_ID 
    2 decimal 
    AR Version: 
    RTE_AR_RELEASE_MAJOR_VERSION 
    AUTOSAR Release  
    RTE_AR_RELEASE_MINOR_VERSION 
    version               
    RTE_AR_RELEASE_REVISION_VERSION 
    decimal coded 
    SW Version: 
    RTE_SW_MAJOR_VERSION 
    MICROSAR RTE 
    RTE_SW_MINOR_VERSION 
    version               
    RTE_SW_PATCH_VERSION 
    decimal coded 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation.  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    21 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    2.1 
    Architecture Overview 
    The RTE is the realization of the interfaces of the AUTOSAR Virtual Function Bus (VFB) 
    for  a  particular  ECU.  The  RTE  provides  both  standardized  communication  interfaces  for 
    AUTOSAR software  components  realized by  generated RTE APIs and it also  provides a 
    runtime environment for the component code – the runnable entities. The RTE triggers the 
    execution  of  runnable  entities  and  provides  the  infrastructure  services  that  enable 
    communication  between  AUTOSAR  SWCs.  It  is  acting  as  a  broker  for  accessing  basic 
    software modules including the OS and communication services. 
    The  following  figure  shows  where  the  MICROSAR  RTE  is  located  in  the  AUTOSAR 
    architecture. 
     
     
    Figure 2-1   AUTOSAR architecture 
     
    RTE functionality overview: 
      Execution of runnable entities of SWCs on different trigger conditions 
      Communication mechanisms between SWCs (Sender/Receiver and Client/Server) 
      Mode Management 
      Inter-Runnable communication and exclusive area handling 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    22 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
      Per-Instance Memory and calibration parameter handling 
      Multiple instantiation of SWCs 
      OS task body and COM / LDCOM callback generation 
      Automatic configuration of parts of the OS, NvM and COM / LDCOM dependent of the 
    needs of the RTE 
      Assignment of SWCs to different memory partitions/cores 
     
    SchM functionality overview:  
      Execution of cyclic triggered schedulable entities (BSW main functions)  
      Exclusive area handling for BSW modules 
      OS task body generation 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    23 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
     composite structure Component
    Interfaces to SWCs and BSW Moduls
    «EmbeddedInterface»
    «EmbeddedInterface»
    RTE::S/R (explicit)
    RTE::Mode Handling
    +  Rte_Write_<p>_<o>([IN  Rte_Instance  <instance>,] IN  <data>)()  :Std_ReturnType
    +  Rte_Switch_<p>_<o>([IN  Rte_Instance  <instance>,] IN  <mode>)()  :Std_ReturnType
    +  Rte_Read_<p>_<o>([IN Rte_Instance <instance>,] OUT <data>)()  :Std_ReturnType
    +  Rte_Mode_<p>_<o>([IN  Rte_Instance  <instance>])()  :Std_ReturnType
    +  Rte_Send_<p>_<o>([IN Rte_Instance <instance>,] IN <data> [,IN  uint16 <length>])()  :Std_ReturnType
    +  Rte_Mode_<p>_<o>([IN  Rte_Instance  <instance>,] OUT previous, OUT next)()  :<currentmode>
    +  Rte_Receive_<p>_<o>([IN Rte_Instance <instance>,] OUT <data> [,OUT uint16 <length>])()  :Std_ReturnType
    +  Rte_SwitchAck_<p>_<o>([IN  Rte_Instance  <instance>])()  :<currentmode>
    +  Rte_Feedback_<p>_<o>([IN Rte_Instance <instance>])()  :Std_ReturnType
    +  Rte_Invalidate_<p>_<o>([IN Rte_Instance <instance>])()  :Std_ReturnType
    +  Rte_IsUpdated_<p>_<o>([IN Rte_Instance <instance>])()  :boolean
    «EmbeddedInterface»
    RTE::C/S
    «EmbeddedInterface»
    +  Rte_Call_<p>_<o>([IN  Rte_Instance  <instance>,] <data_1> ... <data_n>)()  :Std_ReturnType
    RTE::S/R (implicit)
    +  Rte_Result_<p>_<o>([IN  Rte_Instance  <instance>,] <data_1> ... <data_n>)()  :Std_ReturnType
    +  Rte_IWrite_<re>_<p>_<o>([IN  Rte_Instance  <instance>,] IN  <data>)()  :void
    +  Rte_IWriteRef_<re>_<p>_<o>([IN Rte_Instance <instance>])()  :<return ref>
    +  Rte_IRead_<re>_<p>_<o>([IN Rte_Instance <instance>])()  :<return>
    «EmbeddedInterface»
    +  Rte_IStatus_<re>_<p>_<o>([IN Rte_Instance <instance>])()  :Std_ReturnType
    RTE::Indirect API
    +  Rte_IInvalidate_<re>_<p>_<o>([IN Rte_Instance <instance>])()
    +  Rte_Port_<p>([IN  Rte_Instance  <instance>])()  :Rte_PortHandle_<i>_<R/P>
    +  Rte_Ports_<pi>_<R/P>([IN  Rte_Instance  <instance>])()  :Rte_PortHandle_<i>_<R/P>
    «provide optionally»
    +  Rte_NPorts_<pi>_<R/P>([IN  Rte_Instance  <instance>])()  :uint8
    «EmbeddedInterface»
    RTE::Inter-Runnable Variable
    +  Rte_IrvWrite_<v([IN  Rte_Instance  <instance>,] IN  <data>)()  :void
    «EmbeddedInterface»
    +  Rte_IrvRead_<v>([IN Rte_Instance <instance>])()  :<return>
    «provide optionally»
    RTE::Calibration Parameter
    +  Rte_IrvIWrite_<re>_<v([IN  Rte_Instance  <instance>,] IN  <data>)()  :void
    +  Rte_CData_<c>([IN  Rte_Instance  <instance>])()  :<parameter>
    +  Rte_IrvIRead_<re>_<v>([IN Rte_Instance <instance>])()  :<return>
    +  Rte_Prm_<p>_<c>([IN  Rte_Instance  <instance>])()  :<parameter>
    «provide optionally»
    «EmbeddedInterface»
    RTE::Exclusiv e Area
    «EmbeddedInterface»
    «provide optionally»
    +  Rte_Enter_<ea>([IN  Rte_Instance  <instance>])()  :void
    RTE::Per-Instance Memory
    «provide optionally»
    +  Rte_Exit_<ea>([IN  Rte_Instance  <instance>])()  :void
    +  Rte_Pim_<p>([IN  Rte_Instance  <instance>])()  :<pim>
    «EmbeddedInterface»
    «provide optionally»
    «EmbeddedInterface»
    SchM::Exclusiv e Area
    RTE::Error Handling
    +  SchM_Enter_<ea>([IN  Rte_Instance  <instance>])()  :void
    +  Rte_HasOverlayedError(Std_ReturnType)  :boolean
    +  SchM_Exit_<ea>([IN  Rte_Instance  <instance>])()  :void
    «provide optionally» +  Rte_ApplicationError(Std_ReturnType)  :Std_ReturnType
    +  Rte_IsInfrastructureError(Std_ReturnType)  :boolean
    «provide optionally»
    «provide optionally»
    «provide optionally»
    Module
    RTE
    «use optionally»
    «provide optionally»
    «use optionally»
    «use optionally»
    Interfaces to Os
    Interfaces to Com
    «EmbeddedInterface»
    «EmbeddedInterface»
    «EmbeddedInterface»
    Used Interfaces::Os
    RTE::COM Callback
    Prov ided Interfaces::
    +  ActivateTask(TaskType)  :StatusType
    +  Rte_COMCbk_<SignalName>()  :void
    Memory Initialization
    +  CancelAlarm(AlarmType)  :StatusType
    +  Rte_COMCbkRxTOut_<SignalName>()  :void
    +  Rte_InitMemory()  :void
    +  ChainTask(TaskType)  :StatusType
    +  Rte_COMCbkTAck_<SignalName>()  :void
    +  ClearEvent(EventMaskType)  :StatusType
    +  Rte_COMCbkTxTOut_<SignalName>()  :void
    +  DisableAllInterrupts()  :void
    +  Rte_COMCbkTErr_<SignalName>()  :void
    +  EnableAllInterrupts()  :void
    +  Rte_COMCbkInv_<SignalName>()  :void
    +  GetEvent(TaskType, EventMaskType*)  :StatusType
    +  GetResource(ResourceType)  :StatusType
    «provide optionally»
    +  GetTaskID(TaskType*)  :StatusType
    +  IocRead_<iocid>(OUT <data>)()  :Std_ReturnType
    +  IocReadGroup_<iocid>(OUT <data0>,..., OUT <data_n>)()  :Std_ReturnType
    «EmbeddedInterface»
    +  IocReceive_<iocid>(OUT <data>)()  :Std_ReturnType
    Used Interfaces::Com
    Interfaces to Xcp
    +  IocSend_<iocid>[_<sid>](IN <data>)()  :Std_ReturnType
    +  Com_SendDynSignal(Com_SignalIdType, const void*, uint16)  :uint8
    +  IocWrite_<iocid>[_<sid>](IN <data>)()  :Std_ReturnType
    «EmbeddedInterface»
    +  Com_SendSignal(Com_SignalIdType, const void*)  :uint8
    +  IocWriteGroup_<iocid>[_<sid>](IN <data0>,..., IN <data_n>)()  :Std_ReturnType
    Used Interfaces::Xcp
    +  Com_UpdateShadowSignal(Com_SignalIdType, const void*)  :void
    +  ReleaseResource(ResourceType)  :StatusType
    +  Com_SendSignalGroup(Com_SignalGroupIdType)  :uint8
    +  ResumeOSInterrupts()  :void
    +  Xcp_Event(uint8)  :void
    +  Com_ReceiveDynSignal(Com_SignalIdType, void*, uint16*)  :uint8
    +  Schedule()  :StatusType
    +  Com_ReceiveSignal(Com_SignalIdType, void*)  :uint8
    +  SetEvent(TaskType, EventMaskType)  :StatusType
    +  Com_ReceiveShadowSignal(Com_SignalIdType, void*)  :uint8
    +  SetRelAlarm(AlarmType, TickType, TickType)  :StatusType
    +  Com_ReceiveSignalGroup(Com_SignalGroupIdType)  :uint8
    +  SuspendOSInterrupts()  :void
    +  Com_InvalidateSignal(Com_SignalIdType)  :uint8
    +  TerminateTask()  :StatusType
    +  Com_InvalidateSignalGroup(Com_SignalGroupIdType)  :uint8
    +  WaitEvent(EventMaskType)  :StatusType
    Interfaces to EcuM
                                         Interfaces to NvM
    «EmbeddedInterface»
    «EmbeddedInterface»
    «EmbeddedInterface»
    RTE::Lifecycle
    SchM::Lifecycle
    RTE::Nv M Callback
    +  Rte_Start()  :Std_ReturnType
    +  SchM_Init([IN SchM_ConfigType ConfigPtr])()  :void
    +  Rte_GetMirror_<b>_<d>(void*)  :Std_ReturnType
    +  Rte_Stop()  :Std_ReturnType
    +  SchM_Deinit()  :void
    +  Rte_SetMirror_<b>_<d>(const void*)  :Std_ReturnType
    +  SchM_GetVersionInfo(Std_VersionInfoType*)  :void
     
     
    Figure 2-2   Interfaces to adjacent modules of the RTE 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    24 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    RTE. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
      Table 3-1   Supported AUTOSAR standard conform features 
      Table 3-2   Not supported AUTOSAR standard conform features 
    Vector Informatik provides further RTE functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
      Table 3-3   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    Explicit S/R communication (last-is-best)  [API: Rte_Read, Rte_Write] 
    Explicit S/R communication (queued polling)  [API: Rte_Receive, Rte_Send] 
    Variable length arrays 
    Explicit S/R communication (queued blocking)  [API: Rte_Receive] 
    Implicit S/R communication  [API:Rte_IRead, Rte_IWrite, Rte_IWriteRef] 
    Timeout handling (DataReceiveErrorEvent) [API: Rte_IStatus] 
    Data element invalidation [API: Rte_Invalidate, Rte_IInvalidate] 
    Intra-Ecu S/R communication 
    Inter-Ecu S/R communication 
    1:N S/R communication (including network signal Fan-Out) 
    N:1 S/R communication (non-queued, pure network signal Fan-In or pure Intra-Ecu) 
    C/S communication (synchronous, direct calls)  [API: Rte_Call] 
    C/S communication (synchronous, scheduled calls)  [API: Rte_Call] 
    C/S communication (asynchronous calls)  [API: Rte_Call] 
    C/S communication (asynchronous) [API: Rte_Result] 
    Intra-Ecu C/S communication 
    Inter-Ecu C/S communication using SOME/IP Transformer 
    N:1 C/S communication 
    Explicit exclusive areas [API: Rte_Enter, Rte_Exit] 
    Implicit exclusive areas  
    Explicit Inter-Runnable Variables [API: Rte_IrvRead, Rte_IrvWrite]  
    Implicit Inter-Runnable Variables [API: Rte_IIrvRead, Rte_IIrvWrite] 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    25 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Supported AUTOSAR Standard Conform Features 
    Transmission ack. status (polling and blocking) [API: Rte_Feedback] 
    Runnable category 1a, 1b und 2 
    RTE Lifecycle-API [API: Rte_Start, Rte_Stop] 
    Nv Block Software Components 
    Runnable to task mapping 
    Data element to signal mapping 
    Task body generation 
    VFB-Tracing 
    Multiple trace clients 
    ECU-C import / export 
    Automatic OS configuration according the needs of the RTE (basic and extended task support)  
    Automatic COM / LDCOM configuration according the needs of the RTE 
    Primitive data types 
    Composite data types 
    Data reception triggered runnables entities (DataReceivedEvent) 
    Cyclic triggered runnable entities (TimingEvent) 
    Data transmission triggered runnable entities (DataSendCompletionEvent) 
    Data reception error triggered runnables entities (DataReceiveErrorEvent) 
    Mode switch acknowledge triggered runnable entities (ModeSwitchedAckEvent) 
    Mode switch triggered runnable entities (ModeSwitchEvent) 
    Background triggered runnable and scheduleable entities (BackgroundEvent) 
    Contract phase header generation 
    Port access to services (Port defined argument values) 
    Port access to ECU-Abstraction 
    Compatibility mode 
    Per-Instance Memory [API: Rte_Pim] 
    Multiple instantiation on ECU-level 
    Indirect API [API: Rte_Port, Rte_NPorts, Rte_Ports] 
    SWC internal calibration parameters [API: Rte_CData] 
    Shared calibration parameters (CalprmComponentType) [API: Rte_Prm] 
    Mode machine handling [API: Rte_Mode/Rte_Switch] 
    Mode switch ack. status (polling and blocking) [API: Rte_SwitchAck] 
    Multi-Core support (S/R communication, C/S communication, Mode communication (partially)) 
    Memory protection 
    Unconnected ports 
    COM-Filter (NewDiffersOld, Always) 
    Measurement (S/R-Communication, Mode-Communication, Inter-Runnable Variables) 
    Runnable de-bouncing (Minimum Start Interval)  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    26 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Supported AUTOSAR Standard Conform Features 
    Online calibration support  
    Never received status  
    S/R update handling [API: Rte_IsUpdated] 
    Contract Phase Header generation for BSW-Scheduler 
    PR-Ports 
    Optimized S/R communication [API: Rte_DRead] 
    Variant Handling support (Postbuild selectable for variant data mappings and COM signals) 
    Data prototype mapping 
    Subelement mapping for Rx GroupSignals 
    Bit field texttable mapping 
    Activation reason for runnable entities (no support for multicore and memory protection) 
    RteUseComShadowSignalApi 
    Service BSW multiple partition distribution  
    S/R and C/S Serialization using SOME/IP Transformer 
    LdCom Support  
    ComXf Support  
    E2E Transformer Support  
    Transformer Error Handling for S/R  
    Initialization of send buffers for implicit S/R communication  
    Data conversion (limited to S/R communication with integer network signal(s) mapped to floating 
    point data types on SWC ports, compu methods of type LINEAR or IDENTICAL and data type 
    policy LEGACY or OVERRIDE) 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    COM-Filter (only partially supported) 
    Measurement (Client-Server arguments) 
    external Trigger (via port) [API: Rte_Trigger] 
    Inter-Runnable Trigger (SWC internal) [API: Rte_IrTrigger] 
    Tx-Ack for implicit communication [API: Rte_IFeedback] 
    BSW-Scheduler Mode Handling [API: SchM_Mode, SchM_Switch, SchM_SwitchAck] 
    external Trigger between BSW modules [API: SchM_Trigger] 
    BSW-Scheduler Trigger [API: SchM_ActMainFunction] 
    BSW-Scheduler Calibration Parameter Access [API: SchM_CData] 
    BSW-Scheduler queued S/R communication [API: SchM_Send, SchM_Receive] 
    BSW-Scheduler C/S communication [API: SchM_Call, SchM_Result] 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    27 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Not Supported AUTOSAR Standard Conform Features 
    BSW-Scheduler Per-Instance Memory Access [API: SchM_Pim] 
    Enhanced Rte Lifecycle API [API: Rte_StartTiming] 
    Post Build Variant Sets 
    Debugging and Logging Support 
    Variant Handling support (Pre-Compile variability, Postbuild variability for Connectors and 
    ComponentPrototypes)  
    Multi-Core support (Mode communication with ModeSwitchTriggers or ModeDisablings, 
    Rte_ComSendSignalProxyImmediate, RteIocInteractionReturnValue=RTE_COM) 
    Activation reason in multicore and memory protection systems 
    Restarting of partitions 
    Re-scaling of ports / Data conversion (only partially supported) 
    Pre-Build data set generation phase 
    Post-Build data set generation phase 
    Initialization of PerInstanceMemories 
    Asynchronous Mode Handling 
    MC data support 
    Generated BSWMD 
    Range checks 
    RTE memory section initialization strategies 
    Configuration of coherency groups for implicit communication 
    Immediate Buffer update for implicit communication 
    External configuration switch strictConfigurationCheck 
    ScaleLinear and ScaleLinearTexttable CompuMethods with more than one CompuScale  
    Table 3-2   Not supported AUTOSAR standard conform features 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Rte_InitMemory API function. See Chapter 5.14.3 for details. 
    Init-Runnables. See Chapter 3.6.9 for details. 
    VFB Trace Hooks for SchM APIs. See Chapter 5.16.3 and 5.16.4 for details. 
    Measurement support for mode communication. See Chapter 6.6 for details. 
    Measurement with XCP Events. See Chapter 6.6 for details. 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.1.3 
    Limitations 
    There are no known limitations. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    28 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3.2 
    Initialization 
    The  RTE  is  initialized  by  calling  Rte_Start.  Initialization  is  done  by  the  ECU  State 
    Manager (EcuM). 
    The Basis Software Scheduler (SchM) is initialized by calling  SchM_Init. Initialization is 
    done by the ECU State Manager (EcuM). 
    3.3 
    AUTOSAR ECUs 
    Besides  the  basic  software  modules  each AUTOSAR  ECU  has  a  single  instance  of  the 
    RTE  to  manage  the  application  software  of  the  ECU.  The  application  software  is 
    modularized and assigned to one or more AUTOSAR software components (SWC). 
    3.4 
    AUTOSAR Software Components 
    AUTOSAR  software  components  (SWC)  are  described  by  their  ports  for  communication 
    with  other  SWCs  and  their  internal  behavior  in  form  of  runnable  entities  realizing  the 
    smallest schedulable code fragments in an ECU.  
    The following communication paradigms are supported for port communication: 
      Sender-Receiver (S/R): queued and last-is-best, implicit and explicit 
      Client-Server (C/S): synchronous and asynchronous 
      Mode communication 
      Calibration parameter communication 
    S/R and C/S communication may occur Intra-ECU or between different ECUs (Inter-ECU). 
    Mode communication and calibration parameters can only be accessed ECU internally. 
    In addition to Inter-SWC communication over ports, the description of the internal behavior 
    of  SWCs  contains  also  means  for  Intra-SWC  communication  and  synchronization  of 
    runnable entities. 
      Inter-Runnable Variables  
      Per-Instance Memory 
      Exclusive Areas 
      Calibration Parameters 
    The description of the internal behavior of SWCs finally contains all information needed for 
    the handling of runnable entities, especially the events upon which they are triggered. 
    3.5 
    Runnable Entities 
    All  application  code  is  organized  into  runnable  entities,  which  are  triggered  by  the  RTE 
    depending  on  certain  conditions.  They  are  mapped  to  OS  tasks  and  may  access  the 
    communication and data consistency mechanisms provided by the SWC they belong to.  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    29 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    The  trigger  conditions  for  runnable  entities  are  described  below,  together  with  the 
    signature  of  the  runnable  entities  that  results  from  these  trigger  conditions.  A  detailed 
    description  of  the  signature  of  runnable  entities  may  be  found  in  section  5.3  Runnable 
    Entities.
     
    3.6 
    Triggering of Runnable Entities 
    AUTOSAR has introduced the concept of RTEEvents to trigger the execution of runnable 
    entities. The following RTEEvents are supported by the MICROSAR RTE: 
      TimingEvent  
      DataReceivedEvent 
      DataReceiveErrorEvent 
      DataSendCompletedEvent 
      OperationInvokedEvent 
      AsynchronousServerCallReturnsEvent 
      ModeSwitchEvent 
      ModeSwitchedAckEvent 
      InitEvent 
      BackgroundEvent 
     
    The RTEEvents can lead to two different kinds of triggering: 
      Activation of runnable entity 
      Wakeup of waitpoint 
    Activation  of  runnable  entity  starts  a  runnable  entity  at  its  entry  point  while 
    wakeup of waitpoint resumes runnable processing at a waitpoint. The second is not 
    possible  for  all  RTEEvents  and  needs  an  RTE  API  to  setup  this  waitpoint  inside  the 
    runnable entity code. 
    Depending on the existence of a waitpoint, runnable entities are categorized into category 
    1  or  category  2  runnables.  A  runnable  becomes  a  category  2  runnable  if  at  least  one 
    waitpoint exists. 
     
    3.6.1 
    Time Triggered Runnables 
    AUTOSAR  defines  the  TimingEvent  for  periodic  triggering  of  runnable  entities.  The 
    TimingEvent  can  only  trigger  a  runnable  entity  at  its  entry  point.  Consequently  there 
    exists no API to set up a waitpoint for a TimingEvent. The signature of a time triggered 
    runnable is: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    30 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3.6.2 
    Data Received Triggered Runnables 
    AUTOSAR  defines  the  DataReceivedEvent  to  trigger  a  runnable  entity  on  data 
    reception  (queued  or  last-is-best)  or  to  continue  reception  of  queued  data  in  a  blocking 
    Rte_Receive  call.  Both  intra  ECU  and  inter  ECU  communication  is  supported.  Data 
    reception triggered runnables have the following signature: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    3.6.3 
    Data Reception Error Triggered Runnables 
    AUTOSAR  defines  the  DataReceiveErrorEvent  to  trigger  a  runnable  entity  on  data 
    reception  error. A  reception  error  could  be  a  timeout  (aliveTimeout)  or  an  invalidated 
    data  element.  The  DataReceiveErrorEvent  can  only  trigger  a  runnable  entity  at  its 
    entry  point.  Consequently  there  exists  no  API  to  set  up  a  waitpoint  for  a 
    DataReceiveErrorEvent. The signature of a data reception error triggered runnable is: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    3.6.4 
    Data Send Completed Triggered Runnables 
    AUTOSAR  defines  the  DataSendCompletedEvent  to  signal  a  successful  or  an 
    erroneous transmission of explicit S/R communication. The DataSendCompletedEvent 
    can either trigger the execution of a runnable entity or continue a runnable, which waits at 
    a waitpoint for the transmission status or the mode switch in  a blocking  Rte_Feedback 
    call.  Both  intra  ECU  and  inter  ECU  communication  is  supported.  Data  send  completed 
    triggered runnables have the following signature: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    3.6.5 
    Mode Switch Triggered Runnables 
    AUTOSAR defines the ModeSwitchEvent to trigger a runnable entity on either entering 
    or  exiting  of  a  specific  mode  of  a mode  declaration  group. The  ModeSwitchEvent  can 
    only trigger a runnable entity at its entry point. Consequently there exists no API to set up 
    a waitpoint for a ModeSwitchEvent. The signature of a mode switch triggered runnable 
    is: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    3.6.6 
    Mode Switched Acknowledge Triggered Runnables 
    AUTOSAR defines the ModeSwitchedAckEvent to signal a successful mode transition. 
    The  ModeSwitchedAckEvent  can  either  trigger  the  execution  of  a  runnable  entity  or 
    continue a runnable, which  waits at  a waitpoint for the mode transition status. Only intra 
    ECU  communication  is  supported.  Runnables  triggered  by  a  mode  switch  acknowledge 
    have the following signature: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    31 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3.6.7 
    Operation Invocation Triggered Runnables 
    The OperationInvokedEvent is defined by AUTOSAR to always trigger the execution 
    of a runnable entity. The signature of server runnables depends on the parameters defined 
    at the C/S port. Its general appearance is as follows: 
    {void|Std_ReturnType} <Runnable>([IN Rte_Instance inst] {,paramlist}*) 
     
    The  return  value  depends  on  application  errors  being  assigned  to  the  operation  that  the 
    runnable  represents.  The  parameter  list  contains  input  in/output  and  output  parameters. 
    Input  parameters  for  primitive  data  type  are  passed  by  value.  Input  parameters  for 
    composite data types and all in/output  and output  parameters independent  whether they 
    are primitive or composite types are passed by reference. The string data type is handled 
    like a composite type. 
     
    3.6.8 
    Asynchronous Server Call Return Triggered Runnables 
    The  AsynchronousServerCallReturnsEvent  signals  the  end  of  an  asynchronous 
    server  execution  and  triggers  either  a  runnable  entity  to  collect  the  result  by  using 
    Rte_Result or resumes the waitpoint of a blocking Rte_Result call. 
    The runnables have the following signature: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
     
    3.6.9 
    Init Triggered Runnables 
    Initialization runnables are called once during startup and have the following signature: 
    void <RunnableName>([IN Rte_Instance instance]) 
     
    3.6.10  Background Triggered Runnables 
    Background  triggered  runnables  have  to  be  mapped  to  tasks  with  lowest  priority.  The 
    runnables are called by the RTE in an endless loop – in the background – when no other 
    runnable runs. The signature of a background triggered runnable is: 
    void <RunnableName>([IN Rte_Instance instance] 
       
     
         [,IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    32 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    3.7 
    Exclusive Areas 
    An exclusive area (EA) can be used to protect either only a part of runnable code (explicit 
    EA access) or the complete runnable code (implicit EA access). AUTOSAR specifies four 
    implementation methods which are configured during ECU configuration of the RTE. See 
    also Chapter 6.9. 
      OS Interrupt Blocking 
      All Interrupt Blocking 
      OS Resource 
      Cooperative Runnable Placement 
    All of them have to ensure that the current runnable is not preempted while executing the 
    code inside the exclusive area.  
    The  MICROSAR  RTE  analyzes  the  accesses  to  the  different  RTE  exclusive  areas  and 
    eliminates redundant ones if that is possible e.g. if runnable entities accessing the same 
    EA they cannot preempt each other and can therefore be dropped. 
     
    Info 
    For SchM exclusive areas the automatic optimization is currently not supported. 
      Optimization must be done manually by setting the implementation method to NONE. 
    In addition the implementation of the Exclusive Area APIs for the SchM can be set to 
    CUSTOM. In that case the RTE generator doesn’t generate the SchM_Enter and 
    SchM_Exit APIs. Instead of the APIs have to be implemented manually by the 
    customer.  
     
     
    Caution 
    If the user selects implementation method NONE or CUSTOMER it is in the responsibility 
      of the user that the code between the SchM_Enter and SchM_Exit still provides 
    exclusive access to the protected area. 
     
     
     
    3.7.1 
    OS Interrupt Blocking 
    When an exclusive area uses the implementation method  OS_INTERRUPT_BLOCKING, it 
    is 
    protected 
    by 
    calling 
    the 
    OS 
    APIs 
    SuspendOSInterrupts() 
    and  
    ResumeOSInterrupts(). The OS does not allow the invocation of event and resource 
    handling  functions  while  interrupts  are  suspended.  This  precludes  calls  to  any  RTE API 
    that  is  based  upon  an  explicitly  modeled  waitpoint  (blocking  Rte_Receive, 
    Rte_Feedback,  Rte_SwitchAck  or  Rte_Result API)  as  well  as  synchronous  server 
    calls (which sometimes use waitpoints that are not explicitly modeled or other rescheduling 
    points).  Additionally,  all  APIs  that  might  trigger  a  runnable  entity  on  the  same  ECU  or 
    cause a blocking queue access to be released are forbidden, as well as exclusive areas 
    implemented as OS Resource. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    33 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3.7.2 
    All Interrupt Blocking 
    When an exclusive area uses the implementation method ALL_INTERRUPT_BLOCKING, it 
    is 
    protected 
    by 
    calling 
    the 
    OS  APIs 
    SuspendAllInterrupts() 
    and  
    ResumeAllInterrupts(). The OS does not allow the invocation of event and resource 
    handling  functions  while  interrupts  are  suspended.  This  precludes  calls  to  any  RTE API 
    that  is  based  upon  an  explicitly  modeled  waitpoint  (blocking  Rte_Receive, 
    Rte_Feedback,  Rte_SwitchAck  or  Rte_Result API)  as  well  as  synchronous  server 
    calls (which sometimes use waitpoints that are not explicitly modeled or other rescheduling 
    points).  Additionally,  all  APIs  that  might  trigger  a  runnable  entity  on  the  same  ECU  or 
    cause a blocking queue access to be released are forbidden, as well as exclusive areas 
    implemented as OS Resource. 
    3.7.3 
    OS Resource 
    An  exclusive  area  using  implementation  method  OS_RESOURCE  is  protected  by  OS 
    resources entered and released via GetResource() / ReleaseResource()calls, which 
    raise the task priority so that no other task using the same resource may run. The OS does 
    not  allow  the  invocation  of  WaitEvent()  while  an OS  resource  is  occupied. This  again 
    precludes  calls  to  any  RTE API  that  is  based  upon  an  explicitly  modeled  waitpoint  and 
    synchronous server calls. 
    3.7.4 
    Cooperative Runnable Placement 
    For exclusive areas with implementation method COOPERATIVE_RUNNABLE_PLACEMENT, 
    the RTE generator only applies a check whether any of the tasks accessing the exclusive 
    area are able to preempt any other task of that group. This  again precludes calls to any 
    RTE API that is based upon an explicitly modeled waitpoint and synchronous server calls. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    34 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    3.8 
    Error Handling 
    3.8.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError() as specified in [21], if development error reporting is enabled in the 
    RteGeneration  parameters  (i.e.  by  setting  the  parameters  DevErrorDetect  and  /  or 
    DevErrorDetectUninit). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). The reported RTE ID is 2. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  chapter  5.  The 
    following table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    SchM_Init 
    0x01 
    SchM_Deinit 
    0x03 
    SchM_Enter 
    0x04 
    SchM_Exit 
    0x13 
    Rte_Send 
    0x14 
    Rte_Write 
    0x15 
    Rte_Switch 
    0x16 
    Rte_Invalidate 
    0x17 
    Rte_Feedback 
    0x18 
    Rte_SwitchAck 
    0x19 
    Rte_Read 
    0x1A 
    Rte_DRead 
    0x1B 
    Rte_Receive 
    0x1C 
    Rte_Call 
    0x1D 
    Rte_Result 
    0x1F 
    Rte_CData 
    0x20 
    Rte_Prm 
    0x28 
    Rte_IrvRead 
    0x29 
    Rte_IrvWrite 
    0x2A 
    Rte_Enter 
    0x2B 
    Rte_Exit 
    0x2C 
    Rte_Mode 
    0x30 
    Rte_IsUpdated 
    0x70 
    Rte_Start 
    0x71 
    Rte_Stop 
    0x90 
    Rte_COMCbkTAck_<sn> 
    0x91 
    Rte_COMCbkTErr_<sn> 
    0x92 
    Rte_COMCbkInv_<sn> 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    35 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Service ID 
    Service 
    0x93 
    Rte_COMCbkRxTOut_<sn> 
    0x94 
    Rte_COMCbkTxTOut_<sn> 
    0x95 
    Rte_COMCbk_<sg> 
    0x96 
    Rte_COMCbkTAck_<sg> 
    0x97 
    Rte_COMCbkTErr_<sg> 
    0x98 
    Rte_COMCbkInv_<sg> 
    0x99 
    Rte_COMCbkRxTOut_<sg> 
    0x9A 
    Rte_COMCbkTxTOut_<sg> 
    0x9B 
    Rte_SetMirror_<b>_<d> 
    0x9C 
    Rte_GetMirror_<b>_<d> 
    0x9D 
    Rte_NvMNotifyJobFinished_<b>_<d> 
    0x9E 
    Rte_NvMNotifyInitBlock_<b>_<d> 
    0x9F 
    Rte_COMCbk_<sn> 
    0xA0 
    Rte_LdComCbkRxIndication_<sn> 
    0xA6 
    Rte_LdComCbkTriggerTransmit_<sn> 
    0xA7 
    Rte_LdComCbkTxConfirmation_<sn> 
    0xF0 
    Rte_Task 
    0xF1 
    Rte_IncDisableFlags 
    0xF2 
    Rte_DecDisableFlags 
    Table 3-4   Service IDs 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    36 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    RTE_E_DET_ILLEGAL_NESTED_EX
    The same exclusive area was called nested or exclusive 
    CLUSIVE_AREA 
    areas were not exited in the reverse order they were 
    entered 
    RTE_E_DET_UNINIT 
    Rte/SchM is not initialized 
    RTE_E_DET_MODEARGUMENT 
    Rte_Switch was called with an invalid mode parameter 
    RTE_E_DET_TRIGGERDISABLECOU Counter of mode disabling triggers is in an invalid state 
    NTER 
    RTE_E_DET_MODESTATE 
    Mode machine is in an invalid state 
    RTE_E_DET_MULTICORE_STARTUP  Initialization of the master core before all slave cores 
    were initialized 
    RTE_E_DET_ILLEGAL_SIGNAL_ID 
    RTE callback was called for a signal that is not active in 
    the current variant. 
    RTE_E_DET_ILLEGAL_VARIANT_CR SchM_Init called with wrong variant 
    ITERION_VALUE 
    RTE_E_DET_BLOCKSIZECHECK 
    Nv Block size mismatch between RTE and NvM 
    Table 3-5   Errors reported to DET 
     
    The  error  RTE_E_DET_UNINIT  will  only  be  reported  if  the  parameter 
    DevErrorDetectUninit is enabled. The reporting of all other errors can be enabled by 
    setting the parameter DevErrorDetect. 
     
     
    Caution 
    If DevErrorDetect is enabled in multicore systems, the DET module needs to  
      provide a multicore reentrant Det_ReportError method. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    37 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4  RTE Generation and Integration 
    This  chapter  gives  necessary  information  about  the  content  of  the  delivery,  the  RTE 
    generation process including a description about the different RTE generation modes and 
    finally information how to integrate the MICROSAR RTE into an application environment of 
    an ECU.  
    4.1 
    Scope of Delivery 
    The delivery of the RTE contains no static RTE code files. The RTE module is completely 
    generated  by  the  MICROSAR  RTE  Generator. After  the  installation,  the  delivery  has  the 
    following content: 
    Files 
    Description 
    DVCfgRteGen.exe                         
    Command line MICROSAR RTE generator 
    (including several DLLs and XML files) 
    MicrosarRteGen.exe 
    MICROSAR RTE File generator  
    Rte.jar 
    DaVinci Configurator 5 adaptation modules 
    Settings_Rte.xml 
    Rte_Bswmd.arxml 
    BSWMD file for MICROSAR RTE 
    TechnicalReference_Asr_Rte.pdf 
    This documentation 
    ReleaseNotes_MICROSAR_RTE.htm  Release Notes 
    Table 4-1   Content of Delivery 
     
    Info 
    The RTE Configuration Tool DaVinci Developer is not part of MICROSAR RTE / BSW 
      installation package. It has to be installed separately.  
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    38 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.2 
    RTE Generation 
    The  MICROSAR  RTE  generator  can  be  called  either  from  the  command  line  application 
    DVCfgCmd.exe or directly from within the DaVinci Configurator.  
    4.2.1 
    Command Line Options 
    Option 
    Description 
    --project <file> 
    –p <file> 
    Specifies the absolute path to the DPA project file. 
    --generate 
    -g 
    Generate the given project specified in <file>. 
    --moduleToGenerate 
    -m <module>  Specifies the module definition references, which 
    should be generated by the -g switch. Separate 
    multiple modules by a ','.  
    E.g. /MICROSAR/Rte, /MICROSAR/Nm 
    --genArg=”<module>: <params>”  
    Passes the specified parameters <params> to the 
    generator of the specified module <module>. For 
    details of the possible parameters of the RTE module 
    see Table 4-3.  
    --help 
    -h 
    Displays the general help information of 
    DVCfgCmd.exe 
    Table 4-2   DVCfgCmd Command Line Options 
    4.2.2 
    RTE Generator Command Line Options 
    Option 
    Description 
    –m <obj> 
    Selects the DaVinci model object, where <obj> is either 
    <ECUProjectName> or <ComponentTypeName>.   
    Note: If –g i or –g c are selected, which accepts both, 
    <ComponentTypeName> or <ECUProjectName> and the 
    configuration contains such objects with the same name, the 
    component type object takes preference over the ECU project. 
    When the workspace contains only a single ECUProject or a single 
    ComponentType, the -m parameter can be omitted. 
    With the –m parameter also multiple component types can be selected, 
    delimited with semicolons. 
    –g [r|c|i|h] 
    Selects generation of the RTE with the following sub options: 
    r  Selects RTE generation for the ECU project specified via option -
    m <ECUProjectName>. This is the default option. Therefore –g is 
    equal to –g r. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    39 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    c  Selects RTE contract phase header generation for a single 
    component type or BSW module if -m 
    <ComponentTypeName/BswModuleName> or for multiple 
    component types and BSW modules if –m 
    <ComponentType1Name/BswModule1Name>; 
    <ComponentType2Name/BswModule2Name> or for all non- 
    service component types and BSW modules of an ECU project if 
    -m <ECUProjectName>
     
    i  Selects implementation template generation for a single 
    component type if -m <ComponentTypeName> or for multiple 
    component types if –m 
    <ComponentType1Name>;<ComponentType2Name> or for all 
    non- service component types of an ECU project if -m 
    <ECUProjectName>. 
    The optional –f <file> parameter specifies the file name to use 
    for the implementation template file. If the –f <file> parameter 
    is not given, or –m contains an ECU project name, the filename 
    defaults to <ComponentTypeName>.c. 
    Already existing implementation files are updated and a backup is 
    created. 
     
    h  Selects VFB trace hook template generation for the ECU project 
    specified via option -m <ECUProjectName>. 
    The optional –f <file> parameter specifies the file name to use 
    for the VFB trace hook template file. If the –f <file> parameter 
    is not given, the filename defaults to 
    VFBTraceHook_<ECUProjectName>.c. 
    Already existing implementation files are updated and a backup is 
    created. 
     
     
    This parameter can be used more than one time to generate several 
    modes in one step. 
    –o <path> 
    Output path for the generated files.  
    -o r=<path> 
    If more than one generation mode is active, a special path can be 
    -o c=<path> 
    specified for each generation mode by assigning the path to the 
    -o i=<path> 
    character that is used as sub option for the –g parameter. 
    -o h=<path> 
    Furthermore the path for the application header files in the RTE 
    -o s=<path> 
    generation mode can be selected via option –o s=<path>. By default 
    -o a=<path> 
    they are generated into the subdirectory “Components”. 
    The path for A2L files can be specified with the option –o a=<path>. 
    These files are generated into the RTE directory by default. 
    Note: The <path> configured with -o parameter overwrites the path 
    which is specified in the dpa project file. 
    –f <file> 
    Optional parameter to specify the output file name for options –g i 
    and –g h. 
    Note: For option –g i the output file name can only be specified if –m 
    specifies a component type. The output file name cannot be specified 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    40 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    when –m specifies multiple component types. 
    -v 
    Enables verbose mode which includes help information for error, 
    warning and info messages. 
    –h 
    Displays the general help information. 
    Table 4-3   RTE Generator Command Line Options 
    4.2.3 
    Generation Path 
    The RTE output files are generated into the path  which is either specified within the dpa 
    project  file  or  which  is  specified  in  the  –o  command  line  option.  If  several  generation 
    modes are activated in parallel, for each phase a special path can be specified with the –o 
    command line option. 
    In RTE generation phase (command line option –g or –g r), the component type specific 
    application  header  files  are  generated  into  the  subdirectory  Components.  This 
    subdirectory  can  be  changed  in  the  RTE  generation  phase  with  the  option  –o 
    “s=<path>”. In addition the directory for the A2L files, which are generated into the RTE 
    directory by default, can be specified with the option –o “a=<path>”. 
    4.3 
    MICROSAR RTE generation modes 
    The sections give an overview of the files generated by the MICROSAR RTE generator in 
    the different RTE generation modes and some examples how the command line call looks 
    like. 
    4.3.1 
    RTE Generation Phase 
    The following files are generated by the RTE generation: (Option –g or –g r) 
    File 
    Description 
    Rte_<ComponentType>.h 
    Application header file, which has to be included into the SWC 
    code. This header file is the only file to be included in the 
    component code. It is generated to the Components subdirectory 
    by default. 
    Rte_<ComponentType>_Type.h  Application type header file. This header file contains SWC specific 
    type definitions. It is generated to the Components subdirectory 
    by default. 
    SchM_<BswModule>.h 
    Module interlink header file, which has to be included into the BSW 
    module code. 
    SchM_<BswModule>_Type.h 
    Module interlink types header file. This header file contains BSW 
    module specific type definitions.  
    <ComponentType>_MemMap.h  Template contains SWC specific part of the memory mapping. It is 
    generated to the Components subdirectory by default. 
    Rte.c 
    Generated RTE 
    Rte_<OsApplication>.c 
    OsApplication specific part of the generated RTE (only generated 
     
    when OsApplications are configured) 
    Rte_PBCfg.c 
    The RTE post build data set configuration file contains the data 
    structures for the postbuild RTE initialization. 
    Rte.h 
    RTE internal declarations 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    41 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Rte_Main.h 
    Header file for RTE lifecycle API 
    Rte_Cfg.h 
    Configuration file for the RTE  
    Rte_Cbk.h 
    Contains prototypes for COM callbacks 
    Rte_Hook.h 
    Contains relevant information for VFB tracing 
    Rte_Type.h 
    Contains the application defined data type definitions and RTE 
    internal data types 
    Rte_DataHandleType.h 
    The RTE data handle types header file contains the data handle 
     
    type declarations required for the component data structures. 
    Rte_PBCfg.h 
    The RTE post build data set configuration header contains the 
    declarations for the data structures that are used for the postbuild 
    RTE initialization. 
    Rte_UserTypes.h 
    Template which is generated if either user defined data types are 
    required for Per-Instance memory or if a data type is used by the 
    RTE but generation is skipped with the typeEmitter attribute. 
    Rte_MemMap.h 
    Template contains RTE specific part of the memory mapping 
    Rte_Compiler_Cfg.h 
    Template contains RTE specific part of the compiler abstraction 
    usrostyp.h 
    Template which is only generated if memory protection support is 
    enabled. In that case this file is included by the MICROSAR OS. 
    Rte.oil 
    OS configuration for the RTE 
    Rte_Needs.ecuc.arxml 
    Contains the RTE requirements on BSW module configuration for 
    Os, Com, LdCom, Xcp and NvM.    
    Rte.a2l 
    A2L file containing CHARACTERISTIC and MEASUREMENT 
     
    objects for the generated RTE 
    Rte_MemSeg.a2l 
    A2L file containing MEMORY_SEGMENT objects for the 
    generated RTE 
    Rte_rules.mak, 
    Make files according to the AUTOSAR make environment proposal 
    Rte_defs.mak, 
    are generated into the mak subdirectory. 
    Rte_check.mak, 
    Rte_cfg.mak 
    Rte.html 
    Contains information about RAM / CONST consumption of the 
    generated RTE as well as a listing of all triggers and their OS 
    events and alarms. 
    Table 4-4   Generated Files of RTE Generation Phase 
     
    Example: 
     
    DVCfgCmd -p "InteriorLight.dpa" –m /MICROSAR/Rte –g 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    42 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.3.2 
    RTE Contract Phase Generation 
    The following files are generated by the RTE contract phase generation: (Option –g c) 
    File 
    Description 
    Rte_<ComponentType>.h 
    Application header file, which must be included into the SWC 
    code. This header file is the only file to be included in the 
    component code.  
    Rte_<ComponentType>_Type.h  Application type header file. This header file contains SWC specific 
    type definitions. 
    <ComponentType>_MemMap.h  Template contains SWC specific part of the memory mapping. 
    Rte.h 
    RTE internal declarations 
    Rte_Type.h 
    Contains the application defined data type definitions and RTE 
    internal data types 
    Rte_DataHandleType.h 
    The RTE data handle types header file contains the data handle 
    type declarations required for the component data structures. 
    Rte_UserTypes.h 
    Template which is generated if either user defined data types are 
    required for Per-Instance memory or if a data type is used by the 
    RTE but generation is skipped with the typeEmitter attribute. 
    Rte_MemMap.h 
    Template contains RTE specific part of the memory mapping 
    Rte_Compiler_Cfg.h 
    Template contains RTE specific part of the compiler abstraction 
    SchM_<BswModule>.h 
    Module interlink header file, which has to be included into the BSW 
    module code. 
    SchM_<BswModule>_Type.h 
    Module interlink types header file. This header file contains BSW 
    module specific type definitions. 
    Table 4-5   Generated Files of RTE Contract Phase 
     
    Example: 
     
    DVCfgCmd -p "InteriorLight.dpa"  
        -m /MICROSAR/Rte  
        –g  
        --genArg=”Rte: -g c –m SenderComponent” 
     
    The  generated  header  files  are  located  in  a  component  type  specific  subdirectory.  The 
    application  header  file  must  be  included  in  each  source  file  of  a  SWC  implementation, 
    where the RTE API for that specific SWC type is used.  
    The  application  header  file  created  in  the  RTE  contract  phase  can  be  used  to  compile 
    object code components, which can be linked to an RTE generated in the RTE generation 
    phase. The application header files are generated in RTE compatibility mode.   
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    43 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    Caution 
    During the RTE generation phase an optimized header file is generated. This optimized 
      header file should be used when compiling the source code SWCs during the ECU 
    build process. 
    The usage of object code SWCs, which are compiled with the application header files 
    of the contract phase, require an “Implementation Code Type” for SWCs set to “object 
    code” in order to tell the RTE generator in the RTE generation phase NOT to create 
    optimized RTE API accesses but compatible ones.  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    44 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.3.3 
    Template Code Generation for Application Software Components 
    The following file is generated by the implementation template generation: (Option –g i) 
    File 
    Description 
    <FileName>.c 
    An implementation template is generated if the –g i option is 
    selected. The –f option specifies the name of the generated c file. 
    If no name is selected the default name <ComponentTypeName>.c 
    is used. 
    Table 4-6   Generated Files of RTE Template Code Generation 
     
    Example: 
     
    DVCfgCmd -p "InteriorLight.dpa"  
        –m /MICROSAR/Rte  
        –g  
        --genArg=”Rte: -g i –m SenderComponent -f Component1.c” 
     
    The  generated  template  files  contain  all  empty  bodies  of  the  runnable  entities  for  the 
    selected component type. It also contains the include directive for the application header 
    file. In addition, the available RTE API calls are included in comments. 
     
    Caution 
    When the destination file of the SWC template code generation is already available, 
      code that is placed within the user code sections marked by “DO NOT CHANGE”-
    comments is transferred unchanged to the updated template file. 
    Additionally, a numbered backup of the original file is made before the new file is 
    written.  
    The preservation of runnable code is done by checking for the runnable symbol. This 
    implies that after a change of the name of a runnable the runnable implementation is 
    preserved, while a change of the symbol results in a new empty function for the 
    runnable. 
    Code that was removed during an update is kept in the “removed code” section at the 
    bottom of the implementation file and in the numbered backups. 
    The template update is particularly useful when e.g. access to some interfaces has 
    been added or removed from a runnable, because then the information of available 
    APIs is updated by the generation process without destroying the implementation. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    45 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.3.4 
    VFB Trace Hook Template Code Generation 
    The following file is generated by the VFB trace hook template generation: (Option –g h) 
    File 
    Description 
    <FileName>.c 
    An implementation template of the VFB trace hooks is generated if 
    the –g h option is selected. The –f option specifies the name of 
    the generated c file. If no name is selected the default name 
    VFBTraceHook_< ECUProjectName >.c is used.  
    Table 4-7   Generated Files of VFB Trace Hook Code Generation 
    Example: 
     
    DVCfgCmd -p "InteriorLight.dpa"  
        –m /MICROSAR/Rte  
        –g  
        --genArg=”Rte: -g h –f VFBTraceHook_myEcu.c” 
     
    Caution 
    When the destination file of the VFB trace hook template generation is already 
      available, code that is placed within the user code sections marked by “DO NOT 
    CHANGE” comments is transferred unchanged to the updated template file. 
    Additionally, a numbered backup of the original file is made before the new file is 
    written. 
    The preservation of trace hook code is done by checking for the trace hook name. 
    When the name of a hook changes, e.g. because the name of a data element 
    changed, then the code of the previous trace hook is removed. 
    Code that was removed during an update is kept in the “removed code” section at the 
    bottom of the implementation file and in the numbered backups. 
    The template update is particularly useful when some trace hooks have been added or 
    removed due to changed interfaces or OS usage. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    46 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.4 
    Include Structure 
    4.4.1 
    RTE Include Structure 
     class RTE Include Structure
    Legend
    Generated RTE C File
    Generated RTE Header Files
    Com.h
    Rte_Cbk.h
    Header Files of other Modules
    Xcp.h
    SchM_<Bsw>.h
    «include»
    «include»
    «include»
    «include»
    Os.h
    «include»
    «include» «include»
    «include»
    «include»
    Rte_<Swc>.h
    «include»
    Ioc.h
    «include»
    «include»
    Rte.c
    «include»
    «include»
    SchM_<Bsw>_Type.h
    «include»
    «include»
    «include»
    Rte_<Swc>_Type.h
    <Swc>_MemMap.h
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    «include»
    Rte_Type.h
    Rte_Hook.h
    «include»
    «include»
    Rte_DataHandleType.h
    «include»
    «include»
    «include»
    «include»
    «include»
    MemMap.h
    Rte_Main.h
    Rte.h
    Rte_Cfg.h
    «include»
    «include»
    Rte_MemMap.h
    «include»
    «include»
    «include»
    «include»
    «include»
    Rte_PBCfg.h
    Det.h
    Std_Types.h
    Rte_UserTypes.h
    «include»
    «include»
    Platform_Types.h
    Compiler_Cfg.h
    Compiler.h
    «include»
    «include»
    Rte_Compiler_Cfg.h
     
    Figure 4-1   RTE Include Structure 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    47 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.4.2 
    SWC Include Structure 
    The  following  figure  shows  the  include  structure  of  a  SWC  with  respect  to  the  RTE 
    dependency. All other header files which might be included by the SWC are not shown. 
     class Sw c Include Structure
    Legend
    User SWC Implementation File(s)
    Generated RTE Header Files
    Header Files of other Modules
    <Swc>.c
    1..*
    «include»
    Rte_<Swc>.h
    Com.h
    «include»
    «include»
    «include»
    «include»
    Os.h
    <Swc>_MemMap.h
    Rte_<Swc>_Type.h
    «include»
    Rte_DataHandleType.h
    «include»
    «include»
    «include»
    Rte_Type.h
    Rte_MemMap.h
    «include»
    «include»
    «include»
    MemMap.h
    Rte.h
    Rte_UserTypes.h
    «include»
     
    Figure 4-2   SWC Include Structure 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    48 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.4.3 
    BSW Include Structure 
    The  following  figure  shows  the  include  structure  of  a  BSW  module  with  respect  to  the 
    SchM dependency. All other header files which might be included by the BSW module are 
    not shown.   
     class Bsw  Include Structure
    Legend
    BSW Module File(s)
    Generated RTE Header Files
    Header Files of other Modules
    <Bsw>.c
    1..*
    «include»
    SchM_<Bsw>.h
    «include»
    «include»
    Os.h
    SchM_<Bsw>_Type.h
    «include»
    Rte_PBCfg.h
    «include»
    «include»
    Rte.h
    Rte_Type.h
     
    Figure 4-3   BSW Include Structure 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    49 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.5 
    Compiler Abstraction and Memory Mapping  
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The following two tables contain the memory section names and the compiler abstraction 
    definitions defined for the RTE and illustrate their assignment among each other. 
    Compiler Abstraction   
    Definitions 
     
    E
     
     
    A
    R
    T
     
    T I
    OD
    A
    A
    T I
    NI
     
    C
    V
    D
     
    _
    _
    _
     
    NI

    O_
    I
    k>
    l>
     
    L
    L
    L
     
    R

    T I
    N
     
    c
     
    a
    E
    P
    P
    P
    C
    P
    P
    P
     
    A
     
    O_
    I
    lo
    l>
    T
    R
    E
    N
    OI
    R
    Z

    N
    m>
    a

     
    OD
    A
    A
    A
    A
    A
    _
    I
    I
    N
    _
    N
    _
    OI
    _
    mB

    S
    T_<
    E
    C
    >_
    >
    >_
    V
    D
     
    ZE
     
    _
    _
    _
    _
    R
    I_ R N_ R <Pi_ a <C_ S
    S
    E
    L
    L
    L
    R
    A
    A
    A
    R
    ON
    OD
    V
    R
    V
    R
    V
    R
    v
    R
    C
    C
    P
    P
    P
    Memory Mapping 
    A
    A
    A
    A
    N
    A
    ON
    ON
    OD
    P
    P
    P
    V_ >_ V_ >_ V_ >_ V_ <_ V_ C_ >_ C_ C_ >_ A_ <SWC_ <SWC_ <SWC_ A_ A_
    Sections 
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    TE
    R
    <Swc
    R
    <Swc
    R
    <Swc
    R
    R
    R
    R
    <Swc
    R
    R
    <Swc
    R
    R
    R
    R
    R
    R
    RTE_START_SEC_VAR_ZERO_INIT_8BIT  
                                           
    RTE_STOP_SEC_VAR_ZERO_INIT_8BIT 
    RTE_START_SEC_VAR_ZERO_INIT_UNSPECIFIED 
                                           
    RTE_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_ZERO_INIT_UNSPECIFIED1                                         
    RTE_STOP_SEC_VAR_<OsAppl>_ZERO_INIT_UNSPECIFIED1 
    <Swc>_START_SEC_VAR_ZERO_INIT_UNSPECIFIED 
                                           
    <Swc>_STOP_SEC_VAR_ZERO_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_INIT_UNSPECIFIED 
                                           
    RTE_STOP_SEC_VAR_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_INIT_UNSPECIFIED1 
                                           
    RTE_STOP_SEC_VAR_<OsAppl>_INIT_UNSPECIFIED1 
    <Swc>_START_SEC_VAR_INIT_UNSPECIFIED 
                                           
    <Swc>_STOP_SEC_VAR_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_NOINIT_UNSPECIFIED 
                                           
    RTE_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_NOINIT_UNSPECIFIED1 
                                           
    RTE_STOP_SEC_VAR_<OsAppl>_NOINIT_UNSPECIFIED1 
    <Swc>_START_SEC_VAR_NOINIT_UNSPECIFIED 
                                           
    <Swc>_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<Pim>_UNSPECIFIED 
                                           
    RTE_STOP_SEC_VAR_<Pim>_UNSPECIFIED 
    RTE_START_SEC_<NvRamBlock>                    
                                           
    RTE_STOP_SEC_<NvRamBlock> 
    RTE_START_SEC_VAR_<Cal>_UNSPECIFIED 
                                           
    RTE_STOP_SEC_VAR_<Cal>_UNSPECIFIED 
    RTE_START_SEC_CONST_UNSPECIFIED 
                                           
    RTE_STOP_SEC_CONST_UNSPECIFIED 
    <Swc>_START_SEC_CONST_UNSPECIFIED 
                                           
    <Swc>_STOP_SEC_CONST_UNSPECIFIED 
                                                
    1 This memory mapping sections are only used if memory protection support is enabled 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    50 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    RTE_START_SEC_CONST_<Cal>_UNSPECIFIED 
                                           
    RTE_STOP_SEC_CONST_<Cal>_UNSPECIFIED 
    RTE_START_SEC_CODE                                 
                                           
    RTE_STOP_SEC_CODE  
    <Swc>_START_SEC_CODE                            
                                           
    <Swc>_STOP_SEC_CODE  
    RTE_START_SEC_APPL_CODE           
                                           
    RTE_STOP_SEC_APPL_CODE 
    Table 4-8   Compiler abstraction and memory mapping 
    Compiler Abstraction     E
    Definitions  HC
     
    A
    E
     
     
    H
    OC
    E
    C
    N
    H
    A
     
    _
    C
    TI
    A
    OC
    N
     
    NI
    OC
    _
    N
    TI
     
    O_
    _
    R
    T
    N
    I
    N
    OI
     
    ZE_
    I_
    N_
    R
    R
    R
    Memory Mapping 
    A
    A
    A
    V_
    V_
    V_
    Sections 
    TE
    TE
    TE
    R
    R
    R
    RTE_START_SEC_VAR_NOCACHE_ZERO_INIT_8BIT                  
       
     
    RTE_STOP_SEC_VAR_NOCACHE_ZERO_INIT_8BIT 
    RTE_START_SEC_VAR_GLOBALSHARED_NOCACHE_ZERO_INIT_8BIT 
       
     
    RTE_STOP_SEC_VAR_GLOBALSHARED_NOCACHE_ZERO_INIT_8BIT 
    RTE_START_SEC_VAR_NOCACHE_ZERO_INIT_UNSPECIFIED 
       
     
    RTE_STOP_SEC_VAR_NOCACHE_ZERO_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_NOCACHE_ZERO_INIT_UNSPECIFIED 
       
     
    RTE_STOP_SEC_VAR_<OsAppl>_NOCACHE_ZERO_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_NOCACHE_INIT_UNSPECIFIED       
     
       
    RTE_STOP_SEC_VAR_NOCACHE_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_NOCACHE_INIT_UNSPECIFIED 
     
       
    RTE_STOP_SEC_VAR_<OsAppl>_NOCACHE_INIT_UNSPECIFIED 
    RTE_START_SEC_VAR_NOCACHE_NOINIT_UNSPECIFIED 
     
     
     
    RTE_STOP_SEC_VAR_NOCACHE_NOINIT_UNSPECIFIED 
    RTE_START_SEC_VAR_<OsAppl>_NOCACHE_NOINIT_UNSPECIFIED 
     
     
     
    RTE_STOP_SEC_VAR_<OsAppl>_NOCACHE_NOINIT_UNSPECIFIED 
    Table 4-9   Compiler abstraction and memory mapping for non-cacheable variables 
    The memory mapping sections and compiler abstraction defines specified in Table 4-9 are 
    only  used  for  variables  which  are  shared  between  different  cores  on  multicore  systems. 
    These variables must be linked into non-cacheable memory. 
    The RTE specific parts of Compiler_Cfg.h and MemMap.h depend on the configuration 
    of the RTE. Therefore the MICROSAR RTE generates templates for the following files:  
      Rte_Compiler_Cfg.h 
      Rte_MemMap.h 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    51 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    They can be included into the common files and should be adjusted by the integrator like 
    the common files too. 
    4.5.1 
    Memory Sections for Calibration Parameters and Per-Instance Memory 
    The variable part of the memory abstraction defines for calibration parameters <Cal> and 
    Per-Instance Memory <Pim> depends on the configuration. The following table shows the 
    attributes, which have to be defined in DaVinci Developer in order to assign a calibration 
    parameter  or  a  Per-Instance  Memory  to  one  of  the  configured  groups.  The  groups 
    represented by the enumeration values of the attributes can be configured in the attribute 
    definition  dialog  in  DaVinci  Developer  without  any  naming  restrictions.  Only  the  name  of 
    the attribute itself is predefined as described in the table below.   
    Object Type 
    Attribute Name 
    Attribute Type 
    Calibration Parameter 
    PAR_GROUP_CAL 
    Enumeration 
    Calibration Element Prototype  PAR_GROUP_EL 
    Enumeration 
    Per-Instance Memory 
    PAR_GROUP_PIM 
    Enumeration 
    NvBlockDataPrototype 
    PAR_GROUP_NVRAM 
    Enumeration 
     
    Details of configuration and usage of User-defined attributes can be found in the DaVinci 
    Online Help [23].    
    Example for Calibration Parameters: 
    If  the  attribute  PAR_GROUP_CAL  contains  e.g.  the  enumeration  values  CalGroupA  and 
    CalGroupB and calibration parameters are assigned to those groups, the RTE generator 
    will create the following memory mapping defines: 
    RTE_START_SEC_CONST_CalGroupA_UNSPECIFIED 
    RTE_STOP_SEC_CONST_CalGroupA_UNSPECIFIED 
    RTE_START_SEC_CONST_CalGroupB_UNSPECIFIED 
    RTE_STOP_SEC_CONST_CalGroupB_UNSPECIFIED 
     
    In addition the following memory mapping defines are generated, if the calibration method 
    Initialized RAM is enabled (see also Chapter 6.6): 
    RTE_START_SEC_VAR_CalGroupA_UNSPECIFIED 
    RTE_STOP_SEC_VAR_CalGroupA_UNSPECIFIED 
    RTE_START_SEC_VAR_CalGroupB_UNSPECIFIED 
    RTE_STOP_SEC_VAR_CalGroupB_UNSPECIFIED 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    52 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Example for Per-Instance Memory: 
    If  the  attribute  PAR_GROUP_PIM  contains  e.g.  the  enumeration  values  PimGroupA  and 
    PimGroupB and Per-Instance Memory is assigned to those group, the RTE generator will 
    create the following memory mapping defines:  
    RTE_START_SEC_VAR_PimGroupA_UNSPECIFIED 
    RTE_STOP_SEC_VAR_PimGroupA_UNSPECIFIED 
    RTE_START_SEC_VAR_PimGroupB_UNSPECIFIED 
    RTE_STOP_SEC_VAR_PimGroupB_UNSPECIFIED 
    4.5.2 
    Memory Sections for Software Components 
    The  MICROSAR  RTE  generator  generates  specific  memory  mapping  defines  for  each 
    SWC type which allows to locate SWC specific code, constants and variables in different 
    memory segments. 
    The  variable  part  <Swc>  is  the  camel  case  software  component  type  name.  The  RTE 
    implementation  template  code  generator  (command  line  option  –g  i)  uses  the  SWC 
    specific sections to locate the runnable entities in the appropriate memory section. 
    The SWC type specific parts of MemMap.h depend on the configuration. The MICROSAR 
    RTE generator creates a template for each SWC according the following naming rule:  
      <Swc>_MemMap.h 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    53 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.5.3 
    Compiler Abstraction Symbols for Software Components and RTE 
    The RTE generator uses SWC specific defines for the compiler abstraction. 
    The  following  define  is  used  in  RTE  generated  SW-C  implementation  templates  in  the 
    runnable entity function definitions.  
    <Swc>_CODE 
     
    In addition, the following compiler abstraction defines are available for the SWC developer. 
    They can be used to declare SWC specific function code, constants and variables. 
    <Swc>_CODE 
    <Swc>_CONST 
    <Swc>_VAR_NOINIT 
    <Swc>_VAR_INIT 
    <Swc>_VAR_ZERO_INIT 
     
    If  the  user  code  contains  variable  definitions,  which  are  passed  to  the  RTE  API  by 
    reference in order to be modified by the RTE (e.g. buffers for reading data elements) the 
    RTE uses the following define to specify the distance to the buffer.     
    RTE_APPL_VAR                 (RTE specific) 
     
    If the user code contains variable or constant definitions, which are passed to the RTE API 
    as  pure  input  parameter  (e.g.  buffers  for  sending  data  elements)  the  RTE  uses  the 
    following define to specify the distance to the variable or constant.   
    RTE_<SWC>_APPL_DATA       (SWC specific) 
    RTE_APPL_DATA               (RTE specific) 
     
    All these SWC and RTE specific defines for the compiler abstraction might be adapted by 
    the integrator. The configured distances have to fit with the distances of the buffers and the 
    code of the application.   
     
    Caution 
    The template files <Swc>_MemMap.h, Rte_MemMap.h and Rte_Compiler_Cfg.h 
      have to be adapted by the integrator depending on the used compiler and hardware 
    platform especially if memory protection is enabled.  
    When the files are already available during RTE generation, the code that is placed 
    within the user code sections marked by “DO NOT CHANGE”-comments is transferred 
    unchanged to the updated template files. The behavior is the same as for template 
    generation of other files like SWC template generation. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    54 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    4.6 
    Memory Protection Support 
    The MICROSAR RTE supports memory protection as an extension to the AUTOSAR RTE 
    specification. Therefore the memory protection support of the Operating System provides 
    the  base  functionality.  The  support  is  currently  limited  to  the  Vector  MICROSAR  OS 
    because the RTE requires read access to the data from all partitions what is not required 
    by AUTOSAR. Moreover when trusted functions are used, the RTE uses wrapper functions 
    that are only generated by MICROSAR OS. These wrapper functions can be implemented 
    manually  by  following  the  Chapter  „Providing  Trusted  Functions“  of  the  AUTOSAR  SWS 
    OS (Version 4.0-4.3).  
    4.6.1 
    Partitioning of SWCs 
    The partitioning of SWCs to memory areas can be done in DaVinci CFG. The partitioning 
    is based on assignment of tasks to OS applications, which is part of the OS configuration 
    process.  
    There exists the restriction that all Runnable Entities of a single SWC have to be assigned 
    to  the  same  OS  application.  This  restriction  and  the  assignment  of  tasks  to  OS 
    applications  indirectly  assign  SWCs  to  OS  applications.  This  is  the  basis  for  grouping 
    SWCs  to  different  memory  partitions.  Additional  information  about  memory  protection 
    configuration can be found in Chapter 6.3. 
    4.6.2 
    OS Applications 
    The operating system supports different scalability classes (SC). Only in SC3 and SC4 the 
    memory  protection  mechanism  is  available.  Therefore  the  configuration  of  the  required 
    scalability  class  is  the  first  step  to  enable  memory  partitioning.  The  second  step  is  the 
    assignment  of  SWCs to  partitions  (OS  applications)  which  is done  by  assigning  tasks  to 
    OS applications as described above. 
    The OS supports two types of OS applications: 
      Non-Trusted 
      Trusted 
    Non-Trusted OS applications run with enabled memory protection, trusted OS applications 
    with disabled memory protection. 
     
     
    Caution 
    Enable the error hook and the protection hook in the OS in order to get informed about 
      MPU violations and misusage of the OS. 
     
     
    Both  types  are  supported  by  the  MICROSAR  RTE  and  can  be  selected  in  the  OS 
    application configuration dialog or directly in the OS configuration tool.  
     
     
    Caution 
    If no assignment of tasks to OS applications exist memory protection is disabled. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    55 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.6.3 
    Partitioning Architecture 
    When  memory  protection  is  used,  one  or  more  SWCs  can  be  assigned  to  an  OS 
    application but it is not allowed to split up a SWC between two or more OS applications. 
    That means that all runnables of a SWC have to be assigned to tasks, which belong to the 
    same OS application.  It is the responsibility of the RTE to transfer the data of S/R and the 
    arguments of C/S port interfaces over the protection boundaries.  
    Caution 
    Client-Server invocations implemented as direct function calls should be used inside 
      one OS application only.  
     
    The MICROSAR RTE itself and the BSW can either run in a trusted OS application or in a 
    non-trusted OS application. Both architectures are described below. 
    4.6.3.1 
    Trusted RTE and BSW 
    trusted application
    trusted application
    Non-trusted
    application
    AUTOSAR
    Software
    Software
    Software
    Software
    Component
    Component
    Component
    Software
    Component
    ..............
    MICROSAR RTE
    Service 
    Component
    Communication
    Complex
    Device Driver
    Ecu Abstraction
    Operating
    System
    Basic Software
    trusted/non-trusted
    application
    ECU-Hardware
     
    Figure 4-4   Trusted RTE Partitioning example 
     
    This architecture overview assumes that the RTE and the BSW modules that are used by 
    the  RTE  run  in  one  or  more  trusted  OS  applications.  Application  software  components 
    (SWC) above the RTE can either be trusted or non-trusted. When this architecture is used, 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    56 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    the RTE uses trusted functions so that non-trusted SWCs can access the BSW and SWCs 
    in  other  OS  applications.  In  this  architecture,  Rte_Start()  has  to  be  called  from  a 
    trusted task and the Com module needs to run in trusted context, too. The RTE will use the 
    same OS application as the BSW Scheduler tasks.  
    An architecture where the BSW modules and the RTE are assigned to a non-trusted OS 
    application is described in the next chapter. 
    4.6.3.2 
    Non-Trusted RTE and BSW 
    non-trusted
    trusted application
    Non-trusted
    application
    application
    AUTOSAR
    Software
    Software
    Software
    Software
    Component
    Component
    Component
    Software
    Component
    ..............
    MICROSAR RTE
    Service 
    Component
    Communication
    Complex
    Device Driver
    Ecu Abstraction
    Operating
    System
    Basic Software
    trusted/non-trusted
    application
    ECU-Hardware
     
    Figure 4-5   Non-trusted RTE Partitioning example 
     
    This architecture overview assumes that the BSW modules below the RTE, as well as the 
    RTE itself run in a single non-trusted OS application. The SWCs above the RTE can either 
    be assigned to the same non-trusted OS application as the BSW or they can be assigned 
    to one or more other non-trusted or trusted OS applications. Every OS application has its 
    own buffers which are only written by runnables that run in the same OS application. The 
    RTE does not use trusted functions in this architecture. Therefore it is possible to create a 
    system where all SWCs and the BSW are assigned to non-trusted OS applications and all 
    runnables/tasks always run with enabled memory protection.  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    57 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    The  non-trusted  RTE  architecture  is  automatically  chosen  when  the  RTE  configuration 
    fulfills the following criterions: 
      The tasks that contain the BSW modules are known by the RTE. This can be achieved 
    by configuring them as BSW Scheduler tasks (See chapter 6.2)
      All BSW Scheduler tasks are assigned to the same non-trusted OS application (further 
    referred to as BSW OS Application). It is assumed that this is also the OS application 
    that initializes the RTE by calling Rte_Start. The application tasks can either be 
    assigned to the BSW OS Application or to other non-trusted or trusted OS 
    applications. 
      There are no mode connections with mode disabling dependencies or mode triggers 
    between different OS Applications. 
      There are no direct client/server calls across OS applications 
     
    No special limitations apply to SWCs that are assigned to the same OS application as the 
    BSW.  Moreover,  the  following  RTE  features  can  also  be  used  by  SWCs  in  other  OS 
    applications:  
      direct or buffered inter-runnable variables 
      per-instance memories 
      SWC local calibration parameters 
      access to calibration software components 
      queued and nonqueued intra-ECU sender/receiver communication (when there is only 
    a single sender partition) 
      inter-ECU sender/receiver communication (see also chapter 4.8.1) 
      direct client/server calls to runnables within the same OS application 
      mapped client/server calls to runnables in the same and different OS applications (see 
    also chapter 4.8.2) 
      reading modes with the Rte_Mode API 
      explicit and implicit exclusive areas 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    58 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.6.4 
    Conceptual Aspects 
    For intra OS application communication no additional RTE interaction is required. Special 
    memory  protection  handling  is  required  only  if  communication  between  different  OS 
    applications exists. In that case, the RTE has to provide means to transfer data over the 
    protection boundaries. The only possibility is the usage of trusted function calls inside the 
    generated RTE code. Those trusted function calls are expensive concerning code usage 
    and runtime. Therefore the usage of trusted function calls should be minimized if possible.  
    The  MICROSAR  RTE  generator  uses  trusted  function  calls  only  if  necessary.  In  some 
    cases the usage of trusted function calls can be avoided by assigning the RTE buffers to 
    the  appropriate  OS  application.   The  Vector  MICROSAR  OS  only  provides  write  access 
    protection but doesn’t support read access protection. This behavior is the basis to avoid 
    trusted function calls, because the writing OS application can be seen as the owner of the 
    memory buffer. Only a simple assignment of the buffer to the appropriate OS application is 
    necessary. This also makes it possible to completely avoid trusted function calls when the 
    “Non-trusted RTE“ architecture (chapter 4.6.3.2) is chosen. 
    Only if the memory assignment cannot be used, the RTE needs trusted functions to cross 
    the protection boundaries.  
    For that purpose, the RTE generator uses the OS application of the BSW Scheduler tasks 
    as its own OS application, which always needs to be trusted. The trusted functions called 
    by the RTE are assigned to that trusted OS application. In addition to the communication 
    between SWCs of different OS applications, there also exists communication between the 
    COM BSW module and the RTE. Especially the notifications of the COM  are done in an 
    undefined call context. The MICROSAR RTE assumes that the calls of the COM callbacks 
    are done from the OS application that contains the BSW Scheduler tasks. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    59 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.6.5 
    Memory Protection Integration Hints 
    4.6.5.1 
    Enabling of Memory Protection support 
    Please  make  sure  that  memory  protection  is  enabled  by  assigning  tasks  to  OS 
    applications and by selecting scalability class SC3 or SC4 in the OS configuration. 
    4.6.5.2 
    Memory mapping in Linker Command File 
    If  memory  protection  is  enabled,  the  RTE  generator  creates  additional  OS  application 
    specific  memory  sections  for  variables:  In  addition,  the  user  has  to  split  up  his  Per-
    Instance Memory (PIM) sections to the different OS applications. These additional memory 
    sections  have  to  be  mapped  in  the  linker  command  file  to  the  appropriate  memory 
    segments. See OS and compiler / linker manual for details. 
    The individual memory sections are listed in chapter 4.5. 
    The standard RTE memory section defines need to be mapped to the same segments as 
    the BSW. 
    OS  Application  specific  parts  of  the  RTE  implementation  are  generated  to  separate 
    Rte_<OsApplicationName>.c files. 
    4.6.5.3 
    OS Configuration extension 
    In addition to the RTE extensions in the OS configuration which are done automatically by 
    the RTE generator, the following steps have to be done by the Integrator. 
    All OS objects, used by BSW modules e.g. ISRs, BSW-Tasks, OS resources, alarms etc. 
    have  to  be  assigned  to  an  OS  application.  COM  callbacks  have  to  run  in  the  same  OS 
    application  as  the  RTE/BSW  Scheduler  tasks.  Dependent  on  the  implementation  of  the 
    COM Stack, the tasks or ISRs, which call the COM callbacks must therefore be assigned 
    to the right OS application.  
    In the OS configuration of an SC3 or SC4 OS,  the tasks must explicitly allow access by 
    other OS applications. Due to possible calls of ActivateTask or SetEvent inside RTE 
    implemented COM callbacks, the accessing BSW OS applications for all application tasks, 
    which are affected by these calls need to be configured. This is automatically done when 
    the  RTE  configuration  contains  all  BSW  Scheduler  tasks.  Otherwise,  the  configuration 
    needs to be extended by the integrator. 
    If  the  RTE  configuration  contains  not  all  BSW  Scheduler  tasks,  also  the  OS  application 
    that  sets  up  the tasks  and  alarms  by  calling  Rte_Start  needs  to  be  configured for  the 
    task and alarm objects in the OS configuration. 
    This configuration extension has to be done in the OS configuration tool. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    60 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.7 
    Multicore support 
    Similar  to  the  mapping  of  SWCs  to  partitions  with  different  memory  access  rights,  the 
    MICROSAR RTE also supports the mapping of  SWCs to partitions on different  cores for 
    parallel execution. 
    4.7.1 
    Partitioning of SWCs 
    The  mapping  of  SWCs  to  cores  happens  with  the  help  of  OS  Applications  like  in  the 
    memory protection use case. The user has to assign runnables to tasks and tasks to OS 
    Applications  in  order  to  map  SWCs  to  partitions.  The  OS  Applications  can  then  be 
    assigned  to  one  of  the  cores  of  the  ECU.  SWCs  can  only  be  assigned  to  a  single  OS 
    Application. This means that  all runnables  of a SWC  need to be mapped to tasks within 
    the same OS Application. If a SWC contains only server runnables that are not mapped to 
    a task, the SWC can be mapped with the help of an ECUC partition. See chapter 6.3. 
    When  two  SWCs  on  different  cores  communicate  with  each  other,  the  RTE  will 
    automatically apply data consistency mechanisms. 
    4.7.2 
    BSW in Multicore Systems 
    The  MICROSAR  RTE  assumes  that  all  BSW  modules  with  direct  RTE  interaction  (e.g. 
    COM and NVM) are located in a single BSW OS Application on a single  BSW core. The 
    only  exceptions  are  BSW  modules  like  OS  and  ECUM  that  need  to  be  available  on  all 
    cores and service BSW like the WdgM with special multicore support. See chapter 4.7.3 
    for details. The BSW OS Application is the OS Application that contains the tasks with the 
    schedulable entities. The RTE assumes that all COM and NVM callbacks are called from 
    this BSW OS Application. 
    All  RTE  Lifecycle  APIs  (Rte_Start(),  Rte_Stop(),  Rte_InitMemory(), 
    SchM_Init(), SchM_Deinit()) have to be called on all cores. 
    Cyclic triggered runnables will start to run as soon as Rte_Start() is called on the BSW 
    core. 
    It is recommended to use only a single BSW OS Application per core. The RTE will then 
    configure  the  access  rights  so  that  Rte_Start()  can  be  called  from  the  core  specific 
    BSW OS application. 
      
    Caution 
    The RTE will start the scheduling of cyclic triggered runnable entities as soon as 
      Rte_Start() is called on the BSW Core. Therefore, Rte_Start() on the BSW core 
    should only be invoked when the Rte_Start() calls on all other cores finished 
    execution. This is checked with a DET check. Moreover, initialization runnables on the 
    other cores need to be blocked from execution until the RTE on the BSW core is 
    finished. This can for example be done by calling Rte_Start() from a nonpreemptive 
    task and by polling a variable on the BSW code that signals the termination of 
    Rte_Start() on the master core. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    61 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.7.3 
    Service BSW in Multicore Systems 
    The  MICROSAR  RTE  supports  BSW  multiple  partition  distribution.  This  requires  service 
    BSW modules which provide partition specific service SWC descriptions. The BSW main 
    function in  such a distributed system can have  multiple triggers and each trigger  can be 
    mapped to a different task on a different core.  
    The following example shows a possible configuration for the BSW module WdgM: 
    Service SWC:  WdgMCore0 
      Runnable Entity: WdgM_Mainfunction 
      Periodical Trigger: TriggerCore0 e.g. 5ms  
      mapped to TaskCore0 in PartitionBSWCore0 on Core 0 
      Service SWC implicitly mapped to Core 0 
      Runnable Entity: WdgM_CheckPointReached 
      OperationInvocation Trigger 
      unmapped 
    Service SWC: WdgMCore1 
      Runnable Entity: WdgM_Mainfunction 
      Periodical Trigger: TriggerCore1 e.g. 1ms  
      mapped to TaskCore1 in PartitionBSWCore1 on Core 1 
      Service SWC implicitly mapped to Core 1 
      Runnable Entity: WdgM_CheckPointReached 
      OperationInvocation Trigger 
      unmapped 
    Service SWC: WdgMCore1ASIL 
     Service SWC explicitly mapped to PartitionCore1ASIL                                                  
    because of the missing task mapping for WdgM_Mainfunction 
      Runnable Entity: WdgM_CheckPointReached 
      OperationInvocation Trigger 
      unmapped 
     
    Application  SWCs  can  call  the  partition  local  C/S  operation  CheckPointReached.  If  the 
    server runnables are not mapped like in the example above, the RTE can implement the 
    Rte_Call API  by a direct function call. The BSW function  WdgM_CheckPointReached 
    needs  to  be  implemented  multicore  reentrant  and  therefore  requires  specific  multicore 
    support. 
    Also the WdgM_Mainfunction needs to be implemented multicore reentrant because it is 
    called periodically by the RTE from different cores.  
     
    Caution 
    Service BSW modules distributed on different cores requires specific multicore support 
      of the BSW module. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    62 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    4.7.4 
    IOC Usage 
    In multicore systems, the OS provides Inter OS-Application Communicator (IOC) Objects 
    for  the  communication  between  the  individual  cores.  However,  on  many  systems  the 
    memory of the different cores can also be accessed without IOCs. This is the case when 
    the  RTE  variables  that  are  used  for  communication  are  mapped  to  non-cacheable  RAM 
    and when they can either be accessed atomically or when the accesses are protected with 
    a spinlock. Moreover in case of memory protection, this is only possible when a variable is 
    only written by a single partition and when the variable can be read by the other partitions. 
    The MICROSAR RTE Generator tries to avoid IOCs so that it can use the same variables 
    for intra and inter partition communication. Moreover spinlocks are only used for variables 
    that cannot be accessed atomically. 
    If the RTE variables cannot be mapped to globally readable, shared, non-cacheable RAM 
    the  usage  of  IOCs  can  be  enforced  with  the  EnforceIoc  parameter  in  the 
    RteGeneration parameters. 
     
    Caution 
    RTE variables that are mapped to NOCACHE memory sections need to be mapped to 
      non-cacheable RAM. See also chapter 4.5. 
     
    4.8 
    BSW Access in Partitioned systems 
    When  the  SWCs  are  assigned  to  different  OS  Applications,  only  the  SWCs  that  are 
    assigned  to  the  BSW  OS  Application  can  access  the  BSW  directly.  SWCs  that  are 
    assigned to other cores or partitions do not always have the required access rights. The 
    same is true for runnable entities that are directly called by the BSW through client/server 
    interfaces. The RTE can transparently provide proxy code for such BSW accesses but the 
    user needs to map the SendSignal proxy and the server runnables to tasks in which they 
    can be executed. 
    4.8.1 
    Inter-ECU Communication 
    IOCs or additional global RTE variables are automatically inserted by the RTE generator 
    when data needs to be sent from a partition without BSW to another ECU. This is required 
    because the COM APIs cannot be called directly in this case. 
    Instead, the RTE provides a schedulable entitiy  Rte_ComSendSignalProxyPeriodic, 
    which periodically calls the COM APIs when a partition without BSW transmitted data. 
    The schedulable entity Rte_ComSendSignalProxyPeriodic should be mapped to the 
    same task as Com_MainFunctionTx  with a lower position in task so that  it can update 
    the signals before they are transmitted by COM. Rte_ComSendSignalProxyPeriodic 
    will be scheduled with the same cycle time as Com_MainFunctionTx. For this, the RTE 
    generator reads the period from the COM configuration.  
    For  the  reception  of  signals  no  special  handling  is  required.  The  RTE  will  automatically 
    forward the received data to the appropriate partition in the COM notifications. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    63 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    4.8.2 
    Client Server Communication 
    Also client server calls between SWCs in different partitions are possible. 
    In order to execute the server runnable in another partition, the server runnable needs to 
    be  mapped  to  a  task.  The  RTE  will  then  make  the  server  arguments  available  in  the 
    partition of the server runnable, execute the server runnable in the context of its task and 
    return the results to the calling partition. 
    Direct  client  server  calls  to  servers  on  other  cores  are  not  possible  because  this  would 
    enforce that the server is executed in the context of the client core. This would lead to data 
    consistency problems for RTE APIs that only provide buffer pointers like Rte_Pim(). The 
    RTE  cannot  use  IOCs  for  these  APIs  because  the  actual  buffer  update  is  done  by  the 
    application code. 
    You can instruct the RTE to generate a context switch. You can decide this over the task 
    mapping of a function trigger. 
    If you consider RTE calls which originate from the same partition as the server runnable, a 
    context switch into the task of the server runnable may not be required. Here, doing a task 
    switch would mean an additional overhead which can be avoided.  
    Therefore  it  is  also  possible  to  configure  an  additional  server  port  prototype  for  clients 
    which are local to the server partition. The triggers from both server ports can then trigger 
    the same server runnable. However, only  the  trigger  from  the  port  that  is  connected  
    to    foreign  partitions needs  to  be mapped onto  a  task. As  a  consequence,  the  RTE  can 
    implement calls from partition local clients as efficient direct function calls. 
    Please take into account, that this is only allowed when the server runnable is not invoked 
    concurrently  or  marked  as  “can  be  invoked  concurrently”.  In  addition,  you  can  use 
    Exclusive Areas to protect the runnable against concurrent access problems. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    64 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    5  API Description 
    The  RTE API functions  used  inside  the  runnable  entities  are  accessible  by  including  the 
    SWC application header file Rte_<ComponentType>.h. 
     
    Info 
    The following API descriptions contain the direction qualifier IN, OUT and INOUT. They 
      are intended as direction information only and shall not be used inside the application 
    code. 
     
    Depending  on  the  configuration,  some  APIs  are  efficiently  implemented  as  function-like 
    macros. This  implementation introduces  restrictions  on how the APIs  can be used in  the 
    software-component. E.g. it is not possible to take the address of a macro in C. 
    The  macro  implementation  may  also  lead  to  unwanted  compiler  optimizations  regarding 
    concurrent accesses of variables. If a variable is accessed multiple times (e.g. by calling 
    the Rte_Read API in a loop), the compiler may not be aware that the value of the variable 
    may change at any time and optimize away the subsequent accesses. 
     
    Info 
    If it is not possible for the implementation of a software-component to use a function-
      like macro of a port API, the Port API Option enableTakeAddress can be used to 
    force the generation of a “C” function. 
     
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Data Type Definition 
    The MICROSAR RTE has special handling for the implementation data types,  which are 
    defined in Std_Types.h and Platform_Types.h (see [7] and [8] for details). The RTE 
    generator assumes that these data types are available and therefore skips the generation 
    of type definitions.  
    In addition implementation data types where the typeEmitter attribute is set to a value 
    different to RTE or where the value is not empty the RTE generator also skips generation 
    of  the  type  definition.  In  this  case  the  user  has  to  adopt  the  generated  template  file 
    Rte_UserTypes.h which should contain the type definitions for the skipt implementation 
    data types because the RTE itself needs the type definition. 
    All other primitive or composite application and implementation data types are generated 
    by  the  RTE  generator.  This  includes  the  data  types  which  are  assigned  to  a  SWC  by  a 
    definition of an IncludedDataTypeSet. 
    Floating  point  data  types  with  double  precision  may  not  be  used  for  data  elements  with 
    external  connectivity,  because  the  MICROSAR  COM  layer  lacks  support  for  64  bit  data 
    types. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    65 
    based on template version 3.5 





    Technical Reference MICROSAR RTE 
    5.1.1 
    Invalid Value 
    The MICROSAR RTE provides access to the invalid value of a primitive data type. It can 
    be accessed with the following macro:  
    InvalidValue_<literalPrefix><DataType> 
     
    Caution 
    Because the macro does not contain the Rte_ prefix, care must be taken not to define 
      data types conflicting with any other symbols defined by the RTE or the application 
    code. The optional literalPrefix can be used to resolve conflicts. 
     
    5.1.2 
    Upper and Lower Limit 
    The range of the primitive application data types is specified by an upper and a lower limit. 
    These limits are accessible from the application by using the following macro if the limits 
    are specified: 
    <literalPrefix><DataType>_LowerLimit 
    <literalPrefix><DataType>_UpperLimit 
     
    Caution 
    Because the macro does not contain the Rte_ prefix, care must be taken not to define 
      data types conflicting with any other symbols defined by the RTE or the application 
    code. The optional literalPrefix can be used to resolve conflicts. 
     
    5.1.3 
    Initial Value 
    Like the limits also the initial value of an un-queued data element of an S/R port prototype 
    is accessible from the application: 
    Rte_InitValue_<PortPrototype>_<DataElementPrototype> 
     
    Caution 
    The initial value of an Inter-Ecu S/R communication might be changed by the post-build 
      capabilities of the communication stack. Please note that the macro of the RTE still 
    provides the original initial value defined at pre-compile time. Please don’t use the 
    macro if the initial value will be changed in the communication stack at post-build time. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    66 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.2 
    API Error Status 
    Most of the RTE APIs provide an error status in the API return code. For easier evaluation 
    the MICROSAR RTE provides the following status access macros: 
    Rte_IsInfrastructureError(status) 
    Rte_HasOverlayedError(status) 
    Rte_ApplicationError(status) 
     
    The macros can be used inside the runnable entities for evaluation of the RTE API return 
    code.  The 
    boolean 
    return  code  of  the  Rte_IsInfrastructure  and 
    Rte_HasOverlayedError  macros  indicate  if  either  the  immediate  infrastructure  error 
    flag (bit 7) or the overlay error flag (bit 6) is set. 
    The  Rte_ApplicationError  macro  returns  the  application  errors  without  overlayed 
    errors. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    67 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.3 
    Runnable Entities 
    Runnable entities are configured in DaVinci and must be implemented by the user. DaVinci 
    features  the  generation  of  a  template  file  containing  the  empty  bodies  of  all  runnable 
    entities that are configured for a specific component type. 
    5.3.1 
    <RunnableEntity> 
     
    Prototype 
    void <RunnableEntity> ( [IN Rte_Instance instance][,                 
    IN Rte_ActivatingEvent_<RunnableEntity> activation]) 
    {Std_ReturnType|void} <ServerRunnable> ( [IN Rte_Instance instance] {, 
    IN type [*]inputparam}* {, OUT type *outputparam}* ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    activation 
    The activation parameter can be used to get the actual activation 
    reason of the runnable entity if the runnable has multiple possible 
    trigger conditions (e.g. different cyclic triggers or a cyclic trigger and a 
    data reception trigger). 
    Note: This is an optional parameter depending on the configuration of 
    an activation reason at the runnable entity. It is only reasonable if 
    more than one runnable trigger (RTE Event) is configured. 
    [*]inputparam, *outputparam 
    Parameters are only present for server runnables, i.e. runnable 
    entities triggered by an OperationInvokedEvent. Input (IN) parameters 
    are passed by value (primitive types) or reference (composite and 
    string types), output (OUT) parameters are always passed by 
    reference. 
    Return code 
    RTE_E_OK 
    Server runnables return RTE_E_OK for successful operation 
    execution if an application error is referenced by the operation 
    prototype. Application errors are defined at the client/server port 
    interface. 
    RTE_E_<interf>_<error> 
    Server runnables may return an application error (in the range of 1 to 
    63) if the operation execution was not successful. Application errors 
    are defined at the client/server port interface and are referenced by 
    the operation prototype. 
    Existence 
    If configured in DaVinci. 
    Functional Description 
    The user function <RunnableEntity>() is the specific implementation of a runnable entity of a 
    software component and has to be provided by the user. It is called from the MICROSAR RTE.  
    The first prototype form with no return value and the optional instance parameter is valid for the following 
    trigger conditions: 
      TimingEvent: Triggered on expiration of a configured timer.   
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    68 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
      DataReceivedEvent: Triggered on reception of a data element.  
      DataReceiveErrorEvent: Triggered on reception error of a data element.  
      DataSendCompletionEvent: Triggered on successful transmission of a data element. 
      ModeSwitchEvent: Triggered on entering or exiting of a mode of a mode declaration group. 
      ModeSwitchedAckEvent: Triggered on completion of a mode switch of a mode declaration group. 
      AsynchronousServerCallReturnsEvent: Triggered on finishing of an asynchronous server call. The 
    Rte_Result() API shall be used to get the out parameters of the server call. 
      InitEvent: Triggered on startup of the RTE. 
      BackgroundEvent: Triggered by the RTE in an endless loop – in the background – when no other 
    runnable runs. 
    The optional activation parameter is valid for all above described trigger conditions with the exception of 
    the InitEvent. 
    The second prototype form is valid for server runnables:    
      OperationInvokedEvent: Triggered on invocation of the operation in a C/S port interface (server 
    runnable). A return value is only present if application errors are referenced by the implemented 
    operation. The parameter list is directly derived from the configured operation prototype with the 
    addition of the optional instance parameter. 
    The configuration of the trigger conditions can be done in the runnable entities tab of the component type 
    configuration. 
    Call Context 
    The call context of server runnables depends on the task mapping. Server runnables mapped to a task 
    are executed in the context of this task, unmapped server runnables are executed in the context of the 
    task that invoked the operation. All other runnables are invoked by the RTE in the context of the task the 
    runnables are mapped to. 
    Caution 
    The relative priority of the assigned OS tasks is responsible for the call sequence 
      of Init-Runnables. The RTE ensures that the Init-Runnable is called before any 
    other runnable mapped to the same task, but does not enforce that all Init-
    Runnables have been executed before any other runnable is called. To make sure 
    that all Init-Runnables are executed before any other runnable is called, all Init-
    Runnables should be mapped to the task with the highest priority. 
     
     
    5.3.2 
    Runnable Activation Reason 
    If the activation reason is configured the actual reason can be evaluated with the following 
    generated define 
    Rte_ActivatingEvent_<RunnabaleEntity>_<Reason> 
    where _<RunnabaleEntity> is the symbol attribute of the Runnable and <Reason> is the 
    symbolic name of activation reason. The return type of the macro depends on the highest 
    configured bit position for all trigger conditions of a runnable entity. It is uint8, uint16 or 
    unit32. 
    Caution 
    Currently it is not supported to define a runnable activation reason over partition 
      boundaries in multicore and memory protection systems. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    69 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.4 
    SWC Exclusive Areas 
    5.4.1 
    Rte_Enter 
     
    Prototype 
    void Rte_Enter_<ExclusiveArea> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 

     
    Existence 
    This API exists when at least one runnable has configured explicit access 
    (canEnterExclusiveArea) to an exclusive area of a component. 
    Functional Description 
    The function Rte_Enter_<ea>() implements explicit access to the exclusive area. The exclusive 
    area is defined in the context of a component type and may be accessed by all runnables of that 
    component, either implicitly or explicitly via this API. 
    This function is the counterpart of Rte_Exit_<ea>(). Each call to Rte_Enter_<ea>() must be 
    matched by a call to Rte_Exit_<ea>() in the same runnable entity. One exclusive area must not 
    be entered more than once at a time, but different exclusive areas may be nested, as long as they 
    are left in reverse order of entering them. 
    For restrictions on using exclusive areas with different implementations, see section 3.6.10. 
    Call Context 
    This function can be used inside runnable entities. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    70 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.4.2 
    Rte_Exit 
     
    Prototype 
    void Rte_Exit_<ExclusiveArea> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 

     
    Existence 
    This API exists when at least one runnable has configured explicit access 
    (canEnterExclusiveArea) to an exclusive area of a component. 
    Functional Description 
    The function Rte_Exit_<ea>() implements releasing of an explicit entered exclusive area. The 
    exclusive area is defined in the context of a component type and may be accessed by all runnables 
    of that component, either implicitly or explicitly via this API. 
    This function is the counterpart of Rte_Enter_<ea>(). Each call to Rte_Enter_<ea>() must 
    be matched by a call to Rte_Exit_<ea>() in the same runnable entity. One exclusive area must 
    not be entered more than once at a time, but different exclusive areas may be nested, as long as 
    they are left in reverse order of entering them. 
    For restrictions on using exclusive areas with different implementations, see section 3.6.10. 
    Call Context 
    This function can be used inside runnable entities. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    71 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.5 
    BSW Exclusive Areas 
    5.5.1 
    SchM_Enter 
     
    Prototype 
    void SchM_Enter_<Bsw>_<ExclusiveArea> ( void ) 
    Parameter 

     
    Return code 

     
    Existence 
    This API exists when at least one schedulable entity has configured access 
    (canEnterExclusiveArea) to an exclusive area in the internal behavior of the BSW module 
    description. 
    Functional Description 
    The function SchM_Enter_<bsw>_<ea>() implements access to the exclusive area. The 
    exclusive area is defined in the context of a BSW module and may be accessed by all schedulable 
    entities of that module via this API. 
    This function is the counterpart of SchM_Exit_<bsw>_<ea>(). Each call to 
    SchM_Enter_<bsw>_<ea>() must be matched by a call to SchM_Exit_<bsw>_<ea>() in the 
    same schedulable entity. One exclusive area must not be entered more than once at a time, but 
    different exclusive areas may be nested, as long as they are left in reverse order of entering them. 
    For restrictions on using exclusive areas with different implementation methods, see section 3.6.10. 
    Call Context 
    This function can be used inside a schedulable entity in Task or Interrupt context. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    72 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.5.2 
    SchM_Exit 
     
    Prototype 
    void SchM_Exit_<Bsw>_<ExclusiveArea> ( void ) 
    Parameter 

     
    Return code 

     
    Existence 
    This API exists when at least one schedulable entity has configured access 
    (canEnterExclusiveArea) to an exclusive area in the internal behavior of the BSW module 
    description. 
    Functional Description 
    The function SchM_Exit_<bsw>_<ea>() implements releasing of the exclusive area. The 
    exclusive area is defined in the context of a BSW module and may be accessed by all schedulable 
    entities of that module via this API. 
    This function is the counterpart of SchM_Enter_<bsw>_<ea>(). Each call to 
    SchM_Enter_<bsw>_<ea>() must be matched by a call to SchM_Exit_<bsw>_<ea>() in the 
    same schedulable entity. One exclusive area must not be entered more than once at a time, but 
    different exclusive areas may be nested, as long as they are left in reverse order of entering them. 
    For restrictions on using exclusive areas with different implementation methods, see section 3.6.10. 
    Call Context 
    This function can be used inside a schedulable entity in Task or Interrupt context. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    73 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6 
    Sender-Receiver Communication 
    5.6.1 
    Rte_Read 
     
    Prototype 
    Std_ReturnType Rte_Read_<p>_<d> ( [IN Rte_Instance instance,] OUT <DataType> *data                              
    [, OUT Rte_TransformerError transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    *data 
    The output <data> is passed by reference. The <DataType> is 
    the type, specified at the data element prototype in the SWC 
    description.  
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    RTE_E_OK 
    Data read successfully.  
    RTE_E_UNCONNECTED 
    Indicates that the receiver port is not connected. 
    RTE_E_INVALID 
    An invalidated signal has been received by the RTE.  
    RTE_E_MAX_AGE_EXCEEDED 
    Indicates a timeout, detected by the COM module in case of 
    inter ECU communication, if an aliveTimeout is specified.  
    RTE_E_NEVER_RECEIVED 
    No data received since system start. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured direct (explicit) access in the role  
    dataReceivePointByArgument for the data element in the DaVinci configuration and the referenced data 
    element prototype is configured without queued communication (isQueued=false).  
    Functional Description 
    The function Rte_Read_<p>_<d>() supplies the current value of the data element. This API can be used 
    for explicit read of S/R data with isQueued=false. After startup Rte_Read provides the initial value. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    74 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.2 
    Rte_DRead 
     
    Prototype 
    <DataType> Rte_DRead_<p>_<d> ( [IN Rte_Instance instance][, OUT Rte_TransformerError 
    transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    <DataType> 
    The return value contains the current value of the data element. 
    The <DataType> is the (primitive) type, specified at the data 
    element prototype in the SWC description. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured direct (explicit) access in the role 
    dataReceivePointByValue for the data element in the DaVinci configuration and the referenced data 
    element prototype is configured without queued communication (isQueued=false).  
    Functional Description 
    The function Rte_DRead_<p>_<d>() supplies the current value of the data element. This API can be used 
    for explicit read of S/R data with isQueued=false. After startup or if the receiver port is unconnected, 
    Rte_DRead provides the initial value. The API is only available for primitive data types. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    75 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.3 
    Rte_Write 
     
    Prototype 
    Std_ReturnType Rte_Write_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> data            
    [, OUT Rte_TransformerError transformerError] ) 
    Std_ReturnType Rte_Write_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> *data           
    [, OUT Rte_TransformerError transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    data 
    The input data <data> for primitive data types without string 
    types is passed by value. The <DataType> is the type, specified 
    at the data element prototype in the SWC description.  
    *data 
    The input data <data> for string types and composite data types 
    is passed by reference. The <DataType> is the type, specified 
    at the data element prototype in the SWC description.  
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    RTE_E_OK 
    Data passed to communication services successfully.  
    RTE_E_COM_STOPPED 
    An infrastructure communication error was detected by the RTE. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured direct (explicit) access to the data element in 
    the DaVinci configuration and the referenced data element prototype is configured without queued 
    communication (isQueued=false).  
    Functional Description 
    The function Rte_Write_<p>_<d>() can be used for explicit transmission of S/R data with 
    isQueued=false.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    76 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.4 
    Rte_Receive 
     
    Prototype 
    Std_ReturnType Rte_Receive_<p>_<d> ( [IN Rte_Instance instance,] OUT <DataType> *data              
    [, OUT uint16 *length][, OUT Rte_TransformerError transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    *data 
    The output <data> is passed by reference. The <DataType> is 
    the type, specified at the data element prototype in the SWC 
    description.  
    *length 
    In case of an array with variable number of elements, the 
    dynamic length <length> is returned. 
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    RTE_E_OK 
    Data read successfully.  
    RTE_E_UNCONNECTED 
    Indicates that the receiver port is not connected. 
    RTE_E_NO_DATA 
    A non-blocking call returned no data due to an empty receive 
    queue. No other error occurred. 
    RTE_E_TIMEOUT 
    Returned by a blocking call after the timeout has expired. No 
    data returned and no other error occurred. The argument buffer 
    is not changed. 
    RTE_E_LOST_DATA 
    Indicates that some incoming data has been lost due to an 
    overflow of the receive queue. This is not an error of the data 
    returned in the out parameter. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured polling or waiting access to the data element 
    in the DaVinci configuration and the referenced data element prototype is configured with queued 
    communication (isQueued=true).  
    Functional Description 
    The function Rte_Receive_<p>_<d>() supplies the oldest value stored in the reception queue of the data 
    element. This API can be used for explicit read of S/R data with isQueued=true.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    77 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.5 
    Rte_Send 
     
    Prototype 
    Std_ReturnType Rte_Send_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> data             
    [, OUT Rte_TransformerError transformerError] ) 
    Std_ReturnType Rte_Send_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> *data            
    [, IN uint16 length] [, OUT Rte_TransformerError transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    data 
    The input data <data> for primitive data types without string 
    types is passed by value. The <DataType> is the type, specified 
    at the data element prototype in the SWC description.  
    *data 
    The input data <data> for string types and composite data types 
    is passed by reference. The <DataType> is the type, specified 
    at the data element prototype in the SWC description.  
    length 
    In case of an array with variable number of elements, the input 
    data <length> specifies the dynamic array length. 
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    RTE_E_OK 
    Data passed to communication services successfully.  
    RTE_E_COM_STOPPED 
    An infrastructure communication error was detected by the RTE.  
    RTE_E_LIMIT 
    The submitted data has been discarded because the receiver 
    queue is full. Relevant only to intra ECU communication. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the data element in the DaVinci 
    configuration and the referenced data element prototype is configured with queued communication 
    (isQueued=true).  
    Functional Description 
    The function Rte_Send_<p>_<d>() can be used for explicit transmission of S/R data with 
    isQueued=true.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    78 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.6 
    Rte_IRead 
     
    Prototype 
    <DataType> Rte_IRead_<r>_<p>_<d> ( [IN Rte_Instance instance] ) 
    <DataType> *Rte_IRead_<r>_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    Instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <DataType> 
    The return value contains the buffered data for primitive data types. 
    <DataType> is the type, specified at the data element prototype in the 
    SWC description 
    <DataType> * 
    The return value contains a reference to the buffered data for string 
    types and composite data types. <DataType> is the type, specified at 
    the data element prototype in the SWC description 
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) access to the data 
    element in the DaVinci configuration.  
    Functional Description 
    The function Rte_IRead_<r>_<p>_<d>() supplies the value of the data element, stored in a 
    buffer before starting of the runnable entity. This API can be used for buffered (implicit) read of S/R 
    data with isQueued=falseAfter startup Rte_IRead provides the initial value. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    79 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.6.7 
    Rte_IWrite 
     
    Prototype 
    void Rte_IWrite_<r>_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> data ) 
    void Rte_IWrite_<r>_<p>_<d> ( [IN Rte_Instance instance,] IN <DataType> *data ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    data 
    The input data <data> for primitive data types without string types is 
    passed by value. The <DataType> is the type, specified at the data 
    element prototype in the SWC description.  
    *data 
    The input data <data> for string types and composite data types is 
    passed by reference. The <DataType> is the type, specified at the 
    data element prototype in the SWC description.  
    Return code 

     
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) access to the data 
    element in the DaVinci configuration.  
    Functional Description 
    The function Rte_IWrite_<r>_<p>_<d>() can be used for buffered transmission of S/R data 
    with isQueued=false. Note, that the actual transmission is performed and therefore visible for 
    other runnable entities after the runnable entity has been terminated.  
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    Caution 
    When implicit write access to a data element has been configured for a runnable, the 
      runnable has to update the data element at least once during its execution time using 
    the Rte_IWrite API or writing to the location returned by the Rte_IWriteRef API. 
    Otherwise, the content of the data element is undefined upon return from the runnable. 
    Only when the parameter RteInitializeImplicitBuffers is set to true, the RTE will send 
    the last sent data again when Rte_IWrite or Rte_IWriteRef are not called in the 
    runnable. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    80 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.6.8 
    Rte_IWriteRef 
     
    Prototype 
    <DataType> *Rte_IWriteRef_<r>_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    Instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <DataType> * 
    The return value contains a reference to the buffered data. 
    <DataType> is the type, specified at the data element prototype in the 
    SWC description 
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) access to the data 
    element in the DaVinci configuration.  
    Functional Description 
    The function Rte_IWriteRef_<r>_<p>_<d>() can be used for buffered transmission of S/R 
    data with isQueued=false. Note, that the actual transmission is performed and therefore visible 
    for other runnable entities after the runnable entity has been terminated.  
    The returned reference can be used by the runnable entity to directly update the corresponding 
    data elements. This is especially useful for data elements of composite types. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    Caution 
    When implicit write access to a data element has been configured for a runnable, the 
      runnable has to update the data element at least once during its execution time using 
    the Rte_IWrite API or writing to the location returned by the Rte_IWriteRef API. 
    Otherwise, the content of the data element is undefined upon return from the runnable. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    81 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.9 
    Rte_IStatus 
     
    Prototype 
    Std_ReturnType Rte_IStatus_<r>_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    RTE_E_OK 
    Data read successfully.  
    RTE_E_UNCONNECTED 
    Indicates that the receiver port is not connected. 
    RTE_E_INVALID 
    An invalidated signal has been received by the RTE.  
    RTE_E_MAX_AGE_EXCEEDED  Indicates a timeout, detected by the COM module in case of inter ECU 
    communication, if an aliveTimeout is specified.  
    RTE_E_NEVER_RECEIVED 
    No data received since system start.  
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) access to the data 
    element in the DaVinci configuration and if either  
      data element outdated notification (aliveTimeout > 0) or  
      data element invalidation is activated for this data element or 
      the attribute handleNeverReceived is configured. 
    Functional Description 
    The function Rte_IStatus_<r>_<p>_<d>() returns the status of the data element which can be read 
    with Rte_IRead.  
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). Usage in 
    other runnables of the same SWC is forbidden! 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    82 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.10  Rte_Feedback 
     
    Prototype 
    Std_ReturnType Rte_Feedback_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    RTE_E_NO_DATA 
    No data transmitted, when the feedback API was attempted (non-
    blocking call only).  
    RTE_E_UNCONNECTED  Indicates that the sender port is not connected. 
    RTE_E_TIMEOUT 
    A timeout notification was received from COM before any error 
    notification (Inter-ECU only).  
    RTE_E_COM_STOPPED  The last transmission was rejected when either Rte_Send / Rte_Write 
    API was called and the COM was stopped or an error notification from 
    COM was received before any timeout notification (Inter-ECU only).   
    RTE_E_TRANSMIT_ACK  A “transmission acknowledgement” has been received. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured explicit access to the data element 
    in the DaVinci configuration of a runnable entity and in addition the transmission acknowledgement 
    is enabled at the communication specification. Furthermore, polling or waiting acknowledgment 
    mode has to be specified for the same data element. If a timeout is specified, timeout monitoring 
    for waiting acknowledgment access is enabled. 
    Functional Description 
    The function Rte_Feedback_<p>_<d>() can be used to read the transmission status for explicit 
    S/R communication. It indicated the status of data, transmitted by Rte_Write() and 
    Rte_Send() calls. Depending on the configuration, the API can be either blocking or non-blocking. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    83 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.6.11  Rte_IsUpdated 
     
    Prototype 
    boolean Rte_IsUpdated_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    TRUE 
    Data element has been updated since last read.  
    FALSE 
    Data element has not been updated since last read.  
    Existence 
    This API exists, if the runnable entity of a SWC has configured explicit access to the data element 
    in the DaVinci configuration of a runnable entity and in addition the EnableUpdate attribute is 
    enabled at the communication specification. 
    Functional Description 
    The function Rte_IsUpdated_<p>_<d>() returns if the data element has been updated since 
    the last read or not. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    84 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.7 
    Data Element Invalidation 
    5.7.1 
    Rte_Invalidate 
     
    Prototype 
    Std_ReturnType Rte_Invalidate_<p>_<d> ( [IN Rte_Instance instance]                      
    [, OUT Rte_TransformerError transformerError] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    transformerError 
    Optional OUT parameter if transformerErrorHandling is 
    enabled. 
    Return code 
    RTE_E_OK 
    No error occurred.  
    RTE_E_COM_STOPPED 
    The RTE could not perform the operation because the COM 
    service is currently not available (inter ECU communication 
    only). 
    Existence 
    This API exists, if the runnable entity of a SWC has configured explicit and non-queued access to the data 
    element in the DaVinci configuration of a runnable entity and in addition the data element invalidation is 
    enabled at the communication specification (CanInvalidate=true).  
    Functional Description 
    The function Rte_Invalidate_<p>_<d>() can be used to set the transmission data invalid for explicit 
    non-queued S/R communication. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    85 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.7.2 
    Rte_IInvalidate 
     
    Prototype 
    void Rte_IInvalidate_<r>_<p>_<d> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 

     
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) access to the data 
    element in the DaVinci configuration of a runnable entity and in addition the data element 
    invalidation is enabled at the communication specification (CanInvalidate=true).  
    Functional Description 
    The function Rte_IInvalidate_<r>_<p>_<d>() can be used to set the transmission data 
    invalid for implicit (buffered) S/R communication. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    86 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.8 
    Mode Management 
    5.8.1 
    Rte_Switch 
     
    Prototype 
    Std_ReturnType Rte_Switch_<p>_<m> ( [IN Rte_Instance instance,]                           
    IN Rte_ModeType_<ModeDeclarationGroup> mode ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    mode 
    The next mode. It is of type Rte_ModeType_<m>, where <m> is the 
    name of the mode declaration group.   
    Return code 
    RTE_E_OK 
    Mode switch trigger passed to the RTE successfully.  
     
    RTE_E_LIMIT 
    The submitted mode switch has been discarded because the mode 
    queue is full. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the mode declaration 
    group prototype in the DaVinci configuration.  
    Functional Description 
    The function Rte_Switch_<p>_<m>() can be used to trigger a mode switch of the specified 
    mode declaration group prototype.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    87 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.8.2 
    Rte_Mode 
     
    Prototype 
    Rte_ModeType_<ModeDeclarationGroup> Rte_Mode_<p>_<m> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    RTE_TRANSITION_<mg>  This return code is returned if the mode machine is in a mode 
    transition.  
    RTE_MODE_<mg>_<m> 
    This value is returned if the mode machine is not in a transition.     
    <m> indicates the currently active mode. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the mode declaration 
    group prototype in the DaVinci configuration and the enhanced Mode API is not active. 
    Functional Description 
    The function Rte_Mode_<p>_<m>() provides the current mode of a mode declaration group 
    prototype.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    88 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.8.3 
    Enhanced Rte_Mode 
     
    Prototype 
    Rte_ModeType_<ModeDeclarationGroup> Rte_Mode_<p>_<m> ( [IN Rte_Instance instance],    
    OUT Rte_ModeType_<ModeDeclarationGroup> previousMode,                               
    OUT Rte_ModeType_<ModeDeclarationGroup> nextMode ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    previousMode 
    The previous mode is returned if the mode machine is in a transition. 
    nextMode   
    The next mode is returned if the mode machine is in a transition. 
    Return code 
    RTE_TRANSITION_<mg>  This return code is returned if the mode machine is in a mode 
    transition.  
    RTE_MODE_<mg>_<m> 
    This value is returned if the mode machine is not in a transition.     
    <m> indicates the currently active mode. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the mode declaration 
    group prototype in the DaVinci configuration and the enhanced Mode API is active. 
    Functional Description 
    The function Rte_Mode_<p>_<m>() provides the current mode of a mode declaration group 
    prototype. In addition it provodes the previous mode and the next mode if the mode machine is in 
    transition.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    89 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.8.4 
    Rte_SwitchAck 
     
    Prototype 
    Std_ReturnType Rte_SwitchAck_<p>_<m> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    RTE_E_NO_DATA 
    No mode switch triggered, when the switch ack API was attempted 
    (non-blocking call only).  
    RTE_E_TIMEOUT 
    No mode switch processed within the specified timeout time, when the 
    switch ack API was attempted (blocking call only).  
    RTE_E_TRANSMIT_ACK  The mode switch acknowledgement has been received. 
    RTE_E_UNCONNECTED  Indicates that the mode provide port is not connected. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the mode declaration 
    group prototype in the DaVinci configuration of a runnable entity and in addition the mode switch 
    acknowledgement is enabled at the mode switch communication specification. Furthermore, polling 
    or waiting acknowledgment mode has to be specified for the same mode declaration group 
    prototype. If a timeout is specified, timeout monitoring for waiting acknowledgment access is 
    enabled. 
    Functional Description 
    The function Rte_SwitchAck_<p>_<m>() can be used to read the mode switch status of a 
    specific mode declaration group prototype. It indicated the status of a mode switch, triggered by an 
    Rte_Switch call. Depending on the configuration, the API can be either blocking or non-blocking. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    90 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.9 
    Inter-Runnable Variables 
    5.9.1 
    Rte_IrvRead 
     
    Prototype 
    <DataType> Rte_IrvRead_<r>_<v> ( [IN Rte_Instance instance] ) 
    void Rte_IrvRead_<r>_<v> ([IN Rte_Instance instance,]  OUT <DataType> *data) 
    Parameter 
    Instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    *data 
    The output <data> is passed by reference for composite data types. 
    The <DataType> is the type of the Inter-Runnable Variable specified in 
    the SWC description. 
    Return code 
    <DataType> 
    The return value contains the current content of the Inter-Runnable 
    Variable of primitive data types. The <DataType> is the type of the 
    Inter-Runnable Variable specified in the SWC description. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured direct (explicit) read access to the 
    Inter-Runnable Variable in the SWC configuration.  
    Functional Description 
    The function Rte_IrvRead_<r>_<v>() supplies the current value of the Inter-Runnable Variable. 
    This API is used to read direct (explicit) Inter-Runnable VariablesAfter startup Rte_IrvRead 
    provides the configured initial value. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    91 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.9.2 
    Rte_IrvWrite 
     
    Prototype 
    void Rte_IrvWrite_<r>_<v> ( [IN Rte_Instance instance,] IN <DataType> data ) 
    void Rte_IrvWrite_<r>_<v> ( [IN Rte_Instance instance,] IN <DataType> *data ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    data 
    The input data <data> is passed by value for primitive data types. The 
    <DataType> is the type of the Inter-Runnable Variable specified in the 
    SWC description.  
    *data 
    The input data <data> for composite data types is passed by 
    reference. The <DataType> is the type of the Inter-Runnable Variable 
    specified in the SWC description.  
    Return code 

     
    Existence 
    This API exists, if the runnable entity of a SWC has configured direct (explicit) write access to the 
    Inter-Runnable Variable in the SWC configuration.  
    Functional Description 
    The function Rte_IrvIWrite_<r>_<v>() can be used for updating direct (explicit) access Inter-
    Runnable Variables. The update is performed immediately. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    92 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.9.3 
    Rte_IrvIRead 
     
    Prototype 
    <DataType> Rte_IrvIRead_<r>_<v> ( [IN Rte_Instance instance] ) 
    <DataType> *Rte_IrvIRead_<r>_<v> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <DataType> 
    The return value contains the buffered content of the Inter-Runnable 
    Variable for primitive data types. The <DataType> is the type of the 
    Inter-Runnable Variable specified in the SWC description. 
    <DataType> * 
    The return value contains a reference to the buffered content of the 
    Inter-Runnable Variable for composite data types. The <DataType> is 
    the type of the Inter-Runnable Variable specified in the SWC 
    description.  
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) read access to the 
    Inter-Runnable Variable in the SWC configuration.  
    Functional Description 
    The function Rte_IrvIRead_<r>_<v>() supplies the value of the Inter-Runnable Variable, 
    stored in a buffer before the runnable entity is started. This API is used to read the buffered 
    (implicit) Inter-Runnable VariableAfter startup Rte_IrvIRead provides the configured initial 
    value. 
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    93 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.9.4 
    Rte_IrvIWrite 
     
    Prototype 
    void Rte_IrvIWrite_<r>_<v> ( [IN Rte_Instance instance,] IN <DataType> data ) 
    void Rte_IrvIWrite_<r>_<v> ( [IN Rte_Instance instance,] IN <DataType> *data) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    data 
    The input data <data> is passed by value for primitive data types. The 
    <DataType> is the type of the Inter-Runnable Variable specified in the 
    SWC description.  
    *data 
    The input data <data> is passed by reference for composite data 
    types. The <DataType> is the type of the Inter-Runnable Variable 
    specified in the SWC description.  
    Return code 

     
    Existence 
    This API exists, if the runnable entity of a SWC has configured buffered (implicit) write access to 
    the Inter-Runnable Variable in the SWC configuration.  
    Functional Description 
    The function Rte_IrvIWrite_<r>_<v>() can be used for updating buffered (implicit) Inter-
    Runnable Variables. Note, that the actual update is performed and therefore visible for other 
    runnable entities after the runnable entity has been terminated.  
    Call Context 
    This function can be used inside the runnable <r> of an AUTOSAR software component (SWC). 
    Usage in other runnables of the same SWC is forbidden! 
     
    Caution 
    When buffered (implicit) write access to an Inter-Runnable Variable has been 
      configured for a runnable, the runnable has to update the Inter-Runnable variable at 
    least once during its execution time using the Rte_IrvIWrite API. Otherwise, the 
    content of the Inter-Runnable Variable may become undefined upon return from the 
    runnable. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    94 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.10  Per-Instance Memory 
    5.10.1  Rte_Pim 
     
    Prototype 
    <C-type> *Rte_Pim_<n> ( [IN Rte_Instance instance] ) 
    <DataType> *Rte_Pim_<n> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <C-Type> * 
    If the configured data type of the Per-Instance Memory is specified by 
    any C type string, a reference to the PIM of the C-type is returned. 
    <DataType> * 
    If the configured DataType of the Per-Instance Memory is an 
    AUTOSAR DataType, a reference to the PIM of this AUTOSAR type is 
    returned. If the data type is known and completely described, the RTE 
    generator knows the size of the PIM variable and is able to generate 
    the PIM variables in a specific optimized order.   
    Existence 
    This API exists for each specified Per-Instance Memory specified for an AUTOSAR application 
    SWC. 
    Functional Description 
    The function Rte_Pim_<n>() can be used to access Per-Instance Memory.  Note: If several 
    runnable entities have concurrent access to the same Per-Instance Memory, the user has to 
    protect the accesses by using implicit or explicit exclusive areas.  
    Call Context 
    This function can be used inside all runnable entities of the AUTOSAR software component (SWC) 
    specifying the Per-Instance Memory. 
     
    Caution 
    When the Per–Instance Memory uses no AUTOSAR data type and is also not based 
      on a standard data type like e.g. uint8 the RTE generator cannot create the type 
    definition for this type.   
    In this case the user has to provide a user header file Rte_UserTypes.h which 
    should contain the type definitions for the Per-Instance Memory allowing the RTE 
    generator to allocate the Per-Instance memory.  
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    95 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.11  Calibration Parameters 
    5.11.1  Rte_CData 
     
    Prototype 
    <DataType> Rte_CData_<cp> ( [IN Rte_Instance instance] ) 
    <DataType> *Rte_CData_<cp> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <DataType> 
    For primitive data types the return value contains the content of the 
    calibration parameter. The return value is of type <DataType>, which 
    is the type of the calibration element prototype. 
    <DataType> * 
    For composite data types and string types the return value contains 
    the reference to the calibration parameter. The return value is of type 
    <DataType>, which is the type of the calibration element prototype. 
    Existence 
    This API exists for each calibration element prototype specified for an AUTOSAR application SWC. 
    Functional Description 
    The function Rte_CData_<cp>() can be used to access SWC local calibration parameters. 
    Depending on the configuration the Rte_CData API returns a SWC type specific (shared) or SWC 
    instance specific (perInstance) calibration parameter.  
    Call Context 
    This function can be used inside all runnable entities of the AUTOSAR software component (SWC) 
    specifying the calibration parameters. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    96 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.11.2  Rte_Prm 
     
    Prototype 
    <DataType> Rte_Prm_<p>_<cp> ( [IN Rte_Instance instance] ) 
    <DataType> *Rte_Prm_<p>_<cp> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    <DataType> 
    For primitive data types the return value contains the content of the 
    calibration parameter. The return value is of type <DataType>, which 
    is the type of the calibration element prototype. 
    <DataType> * 
    For composite data types and string types the return value contains 
    the reference to the calibration parameter. The return value is of type 
    <DataType>, which is the type of the calibration element prototype. 
    Existence 
    This API exists for each calibration element prototype specified for a calibration software 
    component. 
    Functional Description 
    The function Rte_Prm_<p>_<cp>() can be used to access the instance specific calibration 
    element prototypes of a calibration component.  
    Call Context 
    This function can be used inside all runnable entities of the AUTOSAR software component (SWC) 
    specifying access to calibration element prototypes of calibration components via calibration ports. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    97 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.12  Client-Server Communication 
    5.12.1  Rte_Call 
     
    Prototype 
    Std_ReturnType Rte_Call_<p>_<o> ( [IN Rte_Instance instance,]                          
    {IN type [*]inputparam,}* {OUT type *outputparam,}* {INOUT type *inoutputparam,}* ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    [*]inputparam, *outputparam, 
    The number and type of parameters is determined by the 
    *inoutputparam, 
    operation prototype. Input (IN) parameters are passed by value 
    (primitive types) or reference (composite and string types), 
    output (OUT) and input-output (INOUT) parameters are always 
    passed by reference. 
    Return code 
    RTE_E_OK 
    Operation executed successfully. 
    RTE_E_UNCONNECTED 
    Indicates that the client port is not connected. 
    RTE_E_LIMIT 
    The operation is invoked while a previous invocation has not yet 
    terminated. Relevant only for asynchronous calls. 
    RTE_E_COM_STOPPED 
    An infrastructure communication error was detected by the RTE. 
    Relevant only to external communication. 
    RTE_E_TIMEOUT 
    Returned by a synchronous call after the timeout has expired 
    and no other error occurred. The arguments are not changed. 
    RTE_E_<interf>_<error> 
    Server runnables may return an application error if the operation 
    execution was not successful. Application errors are defined at 
    the client/server port interface and are references by the 
    operation prototype. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured access to the operation prototype in the 
    DaVinci configuration. 
    Functional Description 
    The function Rte_Call_<p>_<o>() invokes the server operation <o> with the specified parameters. If 
    Rte_Call returns with an error, the INOUT and OUT parameters are unchanged.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    98 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.12.2  Rte_Result 
     
    Prototype 
    Std_ReturnType Rte_Result_<p>_<o> ( [IN Rte_Instance instance,]                        
    {OUT type *outputparam,}* {INOUT type *inoutputparam,}* ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different 
    instances in case of multiple instantiation. 
    Note: This is an optional parameter depending on the 
    configuration of supportsMultipleInstantiation 
    attribute. 
    *outputparam, *inoutputparam 
    The number and type of parameters is determined by the 
    operation prototype. The output (OUT) and input-output 
    (INOUT) parameters are always passed by reference. 
    Return code 
    RTE_E_OK 
    Operation executed successfully. 
    RTE_E_UNCONNECTED 
    Indicates that the client port is not connected. 
    RTE_E_NO_DATA 
    The result of the asynchronous operation invocation is not 
    available. Relevant only for non-blocking call. 
    RTE_E_COM_STOPPED 
    An infrastructure communication error was detected by the RTE. 
    Relevant only to external communication. 
    RTE_E_TIMEOUT 
    The result of the asynchronous operation invocation is not 
    available in the specified time. Relevant only for blocking call. 
    RTE_E_<interf>_<error> 
    Server runnables may return an application error if the operation 
    execution was not successful. Application errors are defined at 
    the client/server port interface and are references by the 
    operation prototype. 
    RTE_E_SOFT_TRANSFORMER_ERROR  An error during transformation occurred which shall be notified 
    to the SWC but still produces valid data as output. 
    RTE_E_HARD_TRANSFORMER_ERROR  An error during transformation occurred which produces invalid 
    data as output. 
    Existence 
    This API exists, if the runnable entity of a SWC has configured polling or waiting access to an asynchronous 
    invoked operation of a C/S port interface. 
    Functional Description 
    The function Rte_Result_<p>_<o>() provides the result of asynchronous C/S calls. In case of a polling 
    call, the API returns the OUT parameters if the result is already available while for asynchronous calls the 
    API waits until the server runnable has finished the execution or a timeout occurs. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    99 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.13  Indirect API 
    5.13.1  Rte_Ports 
     
    Prototype 
    Rte_PortHandle_<i>_<R/P> Rte_Ports_<i>_<P/R> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    Rte_PortHandle_<i>_<R/P>  The API returns a pointer to the first port data structure of the port 
    data structure array.    
    Existence 
    This API exists, if the indirect API is configured at the Component Type. 
    Functional Description 
    The function Rte_Ports_<i>_<R/P> returns an array containing the port data structures of all 
    require ports indicated by the API extension <R> or provide ports indicated by <P> of the port 
    interface specified by <i> in order to allow indirect access of the port APIs via the port handle (e.g. 
    iteration over all ports of the same interface). 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    100 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.13.2  Rte_NPorts 
     
    Prototype 
    uint8 Rte_NPorts_<i>_<P/R> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    uint8 
    The API returns the size of the port data structure array provided by 
    Rte_Ports. 
    Existence 
    This API exists, if the indirect API is configured at the component type. 
    Functional Description 
    The function Rte_NPorts_<i>_<R/P> returns the number of array entries (port data structures) 
    of all require ports indicated by the API extension <R> or provide ports indicated by <P> of the port 
    interface specified by <i>.  
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    101 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.13.3  Rte_Port 
     
    Prototype 
    Rte_PortHandle_<i>_<R/P> Rte_Port_<p> ( [IN Rte_Instance instance] ) 
    Parameter 
    instance 
    Instance handle, used to distinguish between the different instances in 
    case of multiple instantiation. 
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 
    Rte_PortHandle_<i>_<R/P>  The API returns a pointer to a port data structure.   
    Existence 
    This API exists, if the indirect API is configured at the component type. 
    Functional Description 
    The function Rte_Port_<p> returns the port data structure of the port specified by <p>. It allows 
    indirect API access via the port handle. 
    Call Context 
    This function can be used inside a runnable entity of an AUTOSAR software component (SWC). 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    102 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.14  RTE Lifecycle API 
    The lifecycle API functions are declared in the RTE lifecycle header file Rte_Main.h 
    5.14.1  Rte_Start 
     
    Prototype 
    Std_ReturnType Rte_Start ( void ) 
    Parameter 

     
    Return code 
    RTE_E_OK 
    RTE initialized successfully.  
    RTE_E_LIMIT 
    An internal limit has been exceeded.  
    Functional Description 
    The RTE lifecycle API function Rte_Start allocates and initializes system resources and 
    communication resources used by the RTE.  
    Call Context 
    This function has to be called by the ECU state manager after basic software modules have been 
    initialized especially OS and COM. It has to be called on every core that is used by the RTE. The 
    call on the core that contains the BSW will start the triggering of all cyclic runnables. Therefore 
    Rte_Start on the other cores has to be executed first. 
     
    5.14.2  Rte_Stop 
     
    Prototype 
    Std_ReturnType Rte_Stop ( void ) 
    Parameter 

     
    Return code 
    RTE_E_OK 
    RTE initialized successfully.  
    RTE_E_LIMIT 
    A resource could not be released.  
    Functional Description 
    The RTE lifecycle API function Rte_Stop releases system resources and communication 
    resources used by the RTE and shutdowns the RTE. After Rte_Stop is called no runnable entity 
    must be processed. The API only stops cyclic functionality. It does not terminate any tasks, 
    therefore runnables may still be running after Rte_Stop was called. 
    Call Context 
    This function has to be called by the ECU state manager on every core that is used by the RTE. 
    The call on the core that contains the BSW will stop the triggering of the cyclic runnables. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    103 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.14.3  Rte_InitMemory 
     
    Prototype 
    void Rte_InitMemory ( void ) 
    Parameter 

     
    Return code 

     
    Functional Description 
    The API function Rte_InitMemory is a MICROSAR RTE specific extension and should be used 
    to initialize RTE internal state variables if the compiler does not support initialized variables.  
    Call Context 
    This function has to be called before the ECU state manager calls the initialization functions of 
    other BSW modules especially the AUTOSAR COM module.  It has to be called on all cores that 
    are used by the RTE. 
     
    Caution 
    Rte_InitMemory API is a Vector extension to the AUTOSAR standard and may not be 
      supported by other RTE generators. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    104 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.15  SchM Lifecycle API 
    The lifecycle API functions are declared in the RTE lifecycle header file Rte_Main.h 
    5.15.1  SchM_Init 
     
    Prototype 
    void SchM_Init ( [IN SchM_ConfigType ConfigPtr] ) 
    Parameter 
    ConfigPtr  
    Pointer to the Rte_Config_<VariantName> data structure that shall be 
    used for the RTE initialization of the active variant in case of a 
    postbuild selectable configuration. The parameter is omitted in case 
    the project contains no postbuild selectable variance. 
    Return code 

     
    Functional Description 
    This function initializes the BSW Scheduler and resets the timers for all cyclic triggered schedulable 
    entities (main functions). Note that all main functions calls are activated upon return from this 
    function. 
    Call Context 
    This function has to be called by the ECU state manager from task context. The OS has to be 
    initialized before as well as those BSW modules for which the SchM provides triggering of 
    schedulable entities (main functions). The API has to be called on all cores that are used by the 
    RTE.  
     
    5.15.2  SchM_Deinit 
     
    Prototype 
    void SchM_Deinit ( void ) 
    Parameter 

     
    Return code 

     
    Functional Description 
    This function finalizes the BSW Scheduler and stops the timer which triggers the main functions. 
    Call Context 
    This function has to be called by the ECU state manager from task context. It has to be called on 
    all cores that are used by the RTE. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    105 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.15.3  SchM_GetVersionInfo 
     
    Prototype 
    void SchM_GetVersionInfo (Std_VersionInfoType *versioninfo ) 
    Parameter 
    versioninfo 
    Pointer to where to store the version information of this module. 
    Return code 

     
    Existence 
    This API exists if RteSchMVersionInfoApi is enabled. 
    Functional Description 
    SchM_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of 
    the component. 
    The versions are decimal-coded. 
    Call Context 
    The function can be called on interrupt and task level. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    106 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16  VFB Trace Hooks  
    The  RTE’s  “VFB  tracing”  mechanism  allows  to  trace  interactions  of  the  AUTOSAR 
    software  components  with  the  VFB. The  choice  of  events  resides  with  the user  and  can 
    range  from  none  to  all.  The  “VFB  tracing”  functionality  is  designed  to  support  multiple 
    clients  for  each  event.  If  one  or  multiple  clients  are  specified  for  an  event,  the  trace 
    function  without  client  prefix  will  be  generated  followed  by  the  trace  functions  with  client 
    prefixes in alphabetically ascending order.  
    5.16.1  Rte_[<client>_]<API>Hook_<cts>_<ap>_Start 
     
    Prototype 
    void Rte_[<client>_]<API>Hook_<cts>_<ap>_Start ( [IN const Rte_CDS_<cts>* inst,] 
    params ) 
    Parameter 
    Rte_CDS_<cts>* inst 
    The instance specific pointer of type Rte_CDS_<cts> is used to 
    distinguish between the different instances in case of multiple 
    instantiation.  
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    params 
    The parameters are the same as the parameters of the <API>. See 
    the corresponding API description for details. 
    Return code 

     
    Existence 
    This VFB trace hook exists if the global and the hook specific configuration switches are enabled. 
    Functional Description 
    This VFB trace hook is called inside the RTE APIs directly after invocation of the API. The user has 
    to provide this hook function if it is enabled in the configuration. The placeholder <API> represents 
    one of the following APIs: 
    Enter, Exit, Write, Read, Send, Receive, Invalidate, SwitchAck, Switch, Call, Result, IrvWrite, 
    IrvRead  
    The <AccessPoint> is defined as follows: 
      Enter, Exit: <ExclusiveArea> 
      Write, Read, Send, Receive, Feedback, Invalidate: 
    <PortPrototype>_<DataElementPrototype> 
      Switch, SwitchAck: <PortPrototype>_<ModeDeclarationGroupPrototype>        
      Call, Result: <PortPrototype>_<OperationPrototype> 
      IrvWrite, IrvRead: <InterRunnableVariable> 
    Call Context 
    This function is called inside the RTE API. The call context is the context of the API itself. Since 
    APIs can only be called in runnable context, the context of the trace hooks is also the runnable 
    entity of an AUTOSAR software component (SWC). 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    107 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.16.2  Rte_[<client>_]<API>Hook_<cts>_<ap>_Return 
     
    Prototype 
    void Rte_[<client>_]<API>Hook_<cts>_<ap>_Return ( [IN const Rte_CDS_<cts> *inst,] 
    params ) 
    Parameter 
    Rte_CDS_<cts>* inst 
    The instance specific pointer of type Rte_CDS_<cts> is used to 
    distinguish between the different instances in case of multiple 
    instantiation.  
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute.  
    params 
    The parameters are the same as the parameters of the API. See the 
    corresponding API description for details. 
    Return code 

     
    Existence 
    This VFB trace hook exists if the global and the hook specific configuration switches are enabled. 
    Functional Description 
    This VFB trace hook is called inside the RTE APIs directly before leaving the API. The user has to 
    provide this hook function if it is enabled in the configuration. The placeholder <API> represents 
    one of the following APIs: 
    Enter, Exit, Write, Read, Send, Receive, Invalidate, Feedback, Switch, SwitchAck, Call, Result, 
    IrvWrite, IrvRead 
     The <AccessPoint> is defined as follows: 
      Enter, Exit: <ExclusiveArea> 
      Write, Read, Send, Receive, Feedback, Invalidate: 
    <PortPrototype>_<DataElementPrototype> 
      Switch, SwitchAck: <PortPrototype>_<ModeDeclarationGroupPrototype>        
      Call, Result: <PortPrototype>_<OperationPrototype> 
      IrvWrite, IrvRead: <InterRunnableVariable> 
    Call Context 
    This function is called inside the RTE API. The call context is the context of the API itself. Since 
    APIs can only be called in runnable context, the context of the trace hooks is also the runnable 
    entity of an AUTOSAR software component (SWC). 
     
    Caution 
    The RTE generator tries to prevent overhead by sometimes implementing the Rte_Call 
      API as macro that does a direct runnable invocation. If VFB trace hooks are enabled 
    for such an Rte_Call API or for the called server runnable, these optimizations are no 
    longer possible. 
    Also macro optimizations for Rte_Read, Rte_DRead, Rte_Write, Rte_IrvRead and 
    Rte_IrvWrite APIs are disabled when VFB tracing for that APIs is enabled. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    108 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    Caution 
    The RTE does not call VFB trace hooks for the following APIs because they are 
      intended to be implemented as macros. 
     Implicit S/R APIs: Rte_IWrite, Rte_IWriteRef, Rte_IRead, Rte_IStatus, 
    Rte_IInvalidate 
     Implicit Inter-Runnable Variables: Rte_IrvIWrite, Rte_IrvIRead 
     Per-instance Memory and calibration parameter APIs: Rte_Pim, Rte_CData, 
    Rte_Prm 
     Indirect APIs: Rte_Ports, Rte_Port, Rte_NPorts 
     RTE Life-Cycle APIs: Rte_Start, Rte_Stop 
     
    5.16.3  SchM_[<client>_]<API>Hook_<Bsw>_<ap>_Start 
     
    Prototype 
    void SchM_[<client>_]<API>Hook_<bsw>_<ap>_Start ( params ) 
    Parameter 
    params 
    The parameters are the same as the parameters of the <API>. See 
    the corresponding API description for details. 
    Return code 

     
    Existence 
    This VFB trace hook exists if the global and the hook specific configuration switches are enabled. 
    Functional Description 
    This VFB trace hook is called inside the RTE APIs directly after invocation of the API. The user has 
    to provide this hook function if it is enabled in the configuration. The placeholder <API> represents 
    one of the following APIs: 
    Enter, Exit  
    The <AccessPoint> is defined as follows: 
      Enter, Exit: <ExclusiveArea> 
    Call Context 
    This function is called inside the RTE API. The call context is the context of the API itself. Since 
    APIs can be called from a BSW function, the context of the trace hooks depends on the context of 
    the BSW function. 
     
    Caution 
    The SchM Hook APIs are a Vector extension to the AUTOSAR standard and may not 
      be supported by other RTE generators. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    109 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.16.4  SchM_[<client>_]<API>Hook_<Bsw>_<ap>_Return 
     
    Prototype 
    void SchM_[<client>_]<API>Hook_<bsw>_<ap>_Return ( params ) 
    Parameter 
    params 
    The parameters are the same as the parameters of the <API>. See 
    the corresponding API description for details. 
    Return code 

     
    Existence 
    This VFB trace hook exists if the global and the hook specific configuration switches are enabled. 
    Functional Description 
    This VFB trace hook is called inside the RTE APIs directly before leaving the API. The user has to 
    provide this hook function if it is enabled in the configuration. The placeholder <API> represents 
    one of the following APIs: 
    Enter, Exit  
    The <AccessPoint> is defined as follows: 
      Enter, Exit: <ExclusiveArea> 
    Call Context 
    This function is called inside the RTE API. The call context is the context of the API itself. Since 
    APIs can be called from a BSW function, the context of the trace hooks depends on the context of 
    the BSW function. 
     
    Caution 
    The SchM Hook APIs are a Vector extension to the AUTOSAR standard and may not 
      be supported by other RTE generators. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    110 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.5  Rte_[<client>_]ComHook_<SignalName>_SigTx 
     
    Prototype 
    void Rte_[<client>_]ComHook_<SignalName>_SigTx ( <DataType> *data ) 
    Parameter 
    <DataType>* data 
    Pointer to data to be transmitted via the COM API.  
    Note: <DataType> is the application specific data type of Rte_Send, 
    Rte_Write or Rte_IWrite.  
    Return code 

     
    Existence 
    This VFB trace hook exists, if at least one data element prototype of a port prototype has to be 
    transmitted over a network (Inter-Ecu) and the global and the hook specific configuration switches 
    are enabled.  
    Functional Description 
    This hook is called just before the RTE invokes Com_SendSignal or 
    Com_UpdateShadowSignal.    
    Call Context 
    This function is called inside the RTE APIs Rte_Send and Rte_Write. The call context is the 
    context of the API itself. Since APIs can only be called in runnable context, the context of the trace 
    hooks is also the runnable entity of an AUTOSAR software component.  
    If buffered communication (Rte_IWrite) is used, the call context is the task of the mapped 
    runnable.  
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    111 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.6  Rte_[<client>_]ComHook_<SignalName>_SigIv 
     
    Prototype 
    void Rte_[<client>_]ComHook_<SignalName>_SigIv ( void ) 
    Parameter 

     
    Return code 

     
    Existence 
    This VFB trace hook exists, if at least one data element prototype of a port prototype has to be 
    transmitted over a network (Inter-Ecu) and the global and the hook specific configuration switches 
    are enabled. In addition the canInvalidate attribute at the UnqueuedSenderComSpec of the 
    data element prototype must be enabled. 
    Functional Description 
    This hook is called just before the RTE invokes Com_InvalidateSignal.    
    Call Context 
    This function is called inside the RTE APIs Rte_Invalidate. The call context is the context of the 
    API itself. Since APIs can only be called in runnable context, the context of the trace hooks is also 
    the runnable entity of an AUTOSAR software component.  
    If buffered communication (Rte_IInvalidate) is used, the call context is the task of the mapped 
    runnable.  
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    112 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.7  Rte_[<client>_]ComHook_<SignalName>_SigGroupIv 
     
    Prototype 
    void Rte_[<client>_]ComHook_<SignalGroupName>_SigGroupIv ( void ) 
    Parameter 

     
    Return code 

     
    Existence 
    This VFB trace hook exists, if at least one data element prototype of a port prototype is composite 
    and has to be transmitted over a network (Inter-Ecu) and the global and the hook specific 
    configuration switches are enabled. In addition the canInvalidate attribute at the 
    UnqueuedSenderComSpec of the data element prototype must be enabled. 
    Functional Description 
    This hook is called just before the RTE invokes Com_InvalidateSignalGroup.    
    Call Context 
    This function is called inside the RTE APIs Rte_Invalidate. The call context is the context of the 
    API itself. Since APIs can only be called in runnable context, the context of the trace hooks is also 
    the runnable entity of an AUTOSAR software component.  
    If buffered communication (Rte_IInvalidate) is used, the call context is the task of the mapped 
    runnable.  
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    113 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.8  Rte_[<client>_]ComHook_<SignalName>_SigRx 
     
    Prototype 
    void Rte_[<client>_]ComHook_<SignalName>_SigRx ( <DataType> *data ) 
    Parameter 
    <DataType>* data 
    Pointer to the data received via the COM API.  
    Note: <DataType> is the application specific data type of 
    Rte_Receive, Rte_Read, Rte_DRead or Rte_IRead.  
    Return code 

     
    Existence 
    This VFB trace hook exists, if at least one data element prototype of a port prototype has to be 
    received from a network and the global and hook specific configuration switches are enabled.  
    Functional Description 
    This VFB Trace Hook is called after the RTE invokes Com_ReceiveSignal or 
    Com_ReceiveShadowSignal. 
    Call Context 
    This function is called inside the RTE API Rte_Read or Rte_DRead. The call context is the 
    context of the API itself. Since this API can only be called in runnable context, the context of the 
    trace hooks is also the runnable entity of an AUTOSAR software component. 
    If buffered communication (Rte_IRead) is used, the call context is the task of the mapped 
    runnable.  
    If queued communication is configured (Rte_Receive), the call of the Com API is called inside the 
    COM callback after reception. In this case, the context of the trace hook is the context of the COM 
    callback.  
    Note: This could be the task context or the interrupt context! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    114 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.9  Rte_[<client>_]ComHook<Event>_<SignalName> 
     
    Prototype 
    void Rte_[<client>_]ComHook<Event>_<SignalName> ( void ) 
    Parameter 

     
    Return code 

     
    Existence 
    This VFB trace hook is called inside the <Event> specific COM callback, directly after the 
    invocation by COM and if the global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates the start of a COM callback. <Event> depends on the type of the 
    callback.  
      empty string:  Rte_COMCbk_<SignalName> 
      TxTOut           Rte_COMCbkTxTOut_<SignalName> 
      RxTOut          Rte_COMCbkRxTOut_<SignalName> 
      TAck              Rte_COMCbkTAck_<SignalName> 
      TErr               Rte_COMCbkTErr_<SignalName> 
      Inv                 Rte_COMCbkInv_<SignalName> 
    Call Context 
    This function is called inside the context of the COM callback. 
    Note: This could be the task context or the interrupt context! 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    115 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.10 Rte_[<client>_]Task_Activate 
     
    Prototype 
    void Rte_[<client>_]Task_Activate ( TaskType task ) 
    Parameter 
    task 
    The same parameter is also used to call the OS API ActivateTask 
    Return code 

     
    Existence 
    This VFB trace hook is called by the RTE immediately before the invocation of the OS API 
    ActivateTask and if the global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates the call of ActivateTask of the OS. 
    Call Context 
    This function is called inside Rte_Start and in the context RTE API functions which trigger the 
    execution of a runnable entity where the runnable is mapped to a basic task. For API functions, the 
    call context is the runnable context.    
     
    5.16.11 Rte_[<client>_]Task_Dispatch 
     
    Prototype 
    void Rte_[<client>_]Task_Dispatch ( TaskType task ) 
    Parameter 
    task 
    The parameter indicates the task to which was started (dispatched) by 
    the OS 
    Return code 

     
    Existence 
    This VFB trace hook exists for each configured RTE task and is called directly after the start if the 
    global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates the call activation of a task by the OS. 
    Call Context 
    The call context is the task. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    116 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.12 Rte_[<client>_]Task_SetEvent 
     
    Prototype 
    void Rte_[<client>_]Task_SetEvent ( TaskType task, EventMaskType event ) 
    Parameter 
    task 
    The same parameter is also used to call the OS API SetEvent 
    event 
    The same parameter is also used to call the OS API SetEvent 
    Return code 

     
    Existence 
    This VFB trace hook is called by the RTE immediately before the invocation of the OS API 
    SetEvent and if the global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates the call of SetEvent. 
    Call Context 
    This function is called inside RTE API functions and in COM callbacks. For API functions, the call 
    context is the runnable context.  
    Note: For COM callbacks the context could be the task context or the interrupt context! 
     
    5.16.13 Rte_[<client>_]Task_WaitEvent 
     
    Prototype 
    void Rte_[<client>_]Task_WaitEvent ( TaskType task, EventMaskType event ) 
    Parameter 
    task 
    The same parameter is also used to call the OS API WaitEvent 
    event 
    The same parameter is also used to call the OS API WaitEvent 
    Return code 

     
    Existence 
    This VFB trace hook is called by the RTE immediately before the invocation of the OS API 
    WaitEvent and if the global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates the call of WaitEvent. 
    Call Context 
    This function is called inside RTE API functions and in generated task bodies. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    117 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.14 Rte_[<client>_]Task_WaitEventRet 
     
    Prototype 
    void Rte_[<client>_]Task_WaitEventRet ( TaskType task, EventMaskType event ) 
    Parameter 
    task 
    The same parameter is also used to call the OS API WaitEvent 
    event 
    The same parameter is also used to call the OS API WaitEvent 
    Return code 

     
    Existence 
    This VFB trace hook is called by the RTE immediately after returning from the OS API WaitEvent 
    and if the global and the hook specific configuration switches are enabled.  
    Functional Description 
    This trace hook indicates leaving the call of WaitEvent. 
    Call Context 
    This function is called inside RTE API functions and in generated task bodies. 
     
    5.16.15 Rte_[<client>_]Runnable_<cts>_<re>_Start 
     
    Prototype 
    void Rte_[<client>_]Runnable_<cts>_<re>_Start ( [IN const Rte_CDS_<cts> *inst] ) 
    Parameter 
    Rte_CDS_<cts>* inst 
    The instance specific pointer of type Rte_CDS_<cts> is used to 
    distinguish between the different instances in case of multiple 
    instantiation.  
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 

     
    Existence 
    This VFB trace hook is called for all mapped runnable entities if the global and the hook specific 
    configuration switches are enabled.  
    Functional Description 
    This trace hook indicates invocation of the runnable entity. It is called just before the call of the 
    runnable entity and allows for example measurement of the execution time of a runnable together 
    with the counterpart Rte_[<client>_]Runnable_<cts>_<re>_Return. 
    Call Context 
    This function is called inside RTE generated task bodies. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    118 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.16.16 Rte_[<client>_]Runnable_<cts>_<re>_Return 
     
    Prototype 
    void Rte_[<client>_]Runnable_<cts>_<re>_Return ( [IN const Rte_CDS_<cts> *inst] ) 
    Parameter 
    Rte_CDS_<cts>* inst 
    The instance specific pointer of type Rte_CDS_<cts> is used to 
    distinguish between the different instances in case of multiple 
    instantiation.  
    Note: This is an optional parameter depending on the configuration of 
    supportsMultipleInstantiation attribute. 
    Return code 

     
    Existence 
    This VFB trace hook is called for all mapped runnable entities if the global and the hook specific 
    configuration switches are enabled.  
    Functional Description 
    This trace hook indicates invocation of the runnable entity. It is called just after the call of the 
    runnable entity and allows for example measurement of the execution time of a runnable together 
    with the counterpart Rte_[<client>_]Runnable_<cts>_<re>_Start.  
    Call Context 
    This function is called inside RTE generated task bodies. 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    119 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    5.17  RTE Interfaces to BSW  
    The RTE has standardized Interfaces to the following basic software modules  
      COM / LDCOM 
      Transformer (COMXF, SOMEIPXF, E2EXF) 
      NVM 
      DET 
      OS 
      XCP 
      SCHM 
    The actual used API’s of these BSW modules depend on the configuration of the RTE. 
     
    5.17.1  Interface to COM / LDCOM 
    Used COM API 
    Com_SendSignal 
    Com_SendDynSignal 
    Com_SendSignalGroup 
    Com_SendSignalGroupArray 
    Com_UpdateShadowSignal 
    Com_ReceiveSignal 
    Com_ReceiveDynSignal 
    Com_ReceiveSignalGroup 
    Com_ReceiveSignalGroupArray 
    Com_ReceiveShadowSignal 
    Com_InvalidateSignal 
    Com_InvalidateSignalGroup 
     
    Used LDCOM API 
    LdCom_IfTransmit (early versions of MICROSAR LDCOM) 
    LdCom_Transmit 
     
    The RTE generator provides COM / LDCOM callback functions for signal notifications. The 
    generated callbacks, which are called inside the COM layer, have to be configured in the 
    COM  /  LDCOM  configuration  accordingly.  The  necessary  callbacks  are  defined  in  the 
    Rte_Cbk.h header file.  
     
    Caution 
    The RTE generator assumes that the context of COM / LDCOM callbacks is either a 
      task context or an interrupt context of category 2.  
    It is explicitly NOT allowed that the call context of a COM / LDCOM callback is an 
    interrupt of category 1.   
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    120 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    In  order  to  access  the  COM  /  LDCOM  API  the  generated  RTE  includes  the 
    Com.h/LdCom.h header file if necessary.   
    During  export  of  the  ECU  configuration  description  the  necessary  COM  /  LDCOM 
    callbacks  are  exported  into  the  COM  /  LDCOM  section  of  the  ECU  configuration 
    description. 
     
    5.17.2  Interface to Transformer 
    Used Transformer API 
    ComXf_<transformerId> 
    ComXf_Inv_<transformerId> 
    SomeIpXf_<transformerId> 
    SomeIpXf_Inv_<transformerId> 
    E2EXf_<transformerId> 
    E2EXf_Inv_<transformerId> 
     
    Caution 
    The RTE generator does not support configurable transformer chains. Only the 
      SomeIpXf and the ComXf are supported as first transformer in the chain. The E2EXf as 
    second transformer is optional dependent on the configuration. 
      
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    121 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.17.3  Interface to OS 
    In  general,  the  RTE  may  use  all  available  OS  API  functions  to  provide  the  RTE 
    functionality  to  the  software  components. The  following  table  contains  a  list  of  used  OS 
    APIs of the current RTE implementation.    
    Used OS API 
    SetRelAlarm 
    CancelAlarm 
    StartScheduleTableRel  
    NextScheduleTable 
    StopScheduleTable 
    SetEvent 
    GetEvent 
    ClearEvent 
    WaitEvent 
    GetTaskID 
    GetCoreID 
    ActivateTask 
    Schedule 
    TerminateTask 
    ChainTask 
    GetResource 
    ReleaseResource 
    GetSpinlock 
    ReleaseSpinlock 
    DisableAllInterrupts 
    EnableAllInterrupts 
    SuspendAllInterrupts 
    ResumeAllInterrupts 
    SuspendOSInterrupts 
    ResumeOSInterrupts 
    CallTrustedFunction (MICROSAR OS specific) 
    IocWrite 
    IocRead 
    IocWriteGroup  
    IocReadGroup 
    IocSend 
    IocReceive  
     
    In order to access the OS API the generated RTE includes the Os.h header file.   
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    122 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    The OS configuration needed by the RTE is stored in the file  Rte_Needs.ecuc.arxml 
    which is created during the RTE Generation Phase. 
    For  legacy  systems  the  OS  configuration  is  also  stored  in  Rte.oil.  This  file  is  an 
    incomplete OIL file and contains only the RTE relevant configuration. It should be included 
    in an OIL file used for the OS configuration of the whole ECU. 
     
    Caution 
    The generated files Rte_Needs.ecuc.arxml and Rte.oil file must not be 
      changed! 
     
    5.17.4  Interface to NVM 
    The RTE generator provides NvM callback functions for synchronous copying of the mirror 
    buffers  to  and  from  the  NvM.  The  generated  callbacks,  which  are  called  inside  the 
    NvM_MainFunction,  have  to  be  configured  in  the  NvM  configuration  accordingly.  The 
    necessary callbacks are defined in the Rte_Cbk.h header file.  
     
    Caution 
    The RTE generator assumes that the call context of NvM callbacks is the task which 
      calls the NvM_MainFunction.   
     
    During  export  of  the  ECU  configuration  description  the  necessary  NVM  callbacks  are 
    exported into the NVM section of the ECU configuration description. 
    5.17.5  Interface to XCP 
    In addition to the usage of the Com and the OS module as described by AUTOSAR, the 
    MICROSAR  RTE  generator  optionally  can  also  take  advantage  of  the  MICROSAR  XCP 
    module. 
    This  makes  it  possible  to  configure  the  RTE  to  trigger  XCP  Events  when  certain 
    measurement points are reached. 
    This  for  example  also  allows  the  measurement  of  buffers  for  implicit  sender/receiver 
    communication when a runnable entity is terminated. 
    Measurement is described in detail in chapter 6.6 Measurement and Calibration. 
    When measurement with XCP Events is enabled, the RTE therefore includes the header 
    Xcp.h and calls the Xcp_Event API to trigger the events. 
    Used Xcp API 
    Xcp_Event 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    123 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    5.17.6  Interface to SCHM 
    In 
    multicore 
    and 
    memory 
    protection 
    systems, 
    the 
    schedulable 
    entity 
    Rte_ComSendSignalProxyPeriodic is provided by the RTE and is used to access the 
    COM  from  OS  Applications  without  BSW.  This  schedulable  entity  needs  to  be  called 
    periodically by the SCHM. 
    See chapter 4.8.1 for details.  
    Provided Schedulable Entity 
    Rte_ComSendSignalProxyPeriodic 
     
    5.17.7  Interface to DET 
    The RTE generator reports development errors to the DET, if development error detection 
    is enabled. 
    See chapter 3.8.1 for details. 
    Used DET API 
    Det_ReportError 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    124 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    6  RTE Configuration 
    The RTE specific configuration in DaVinci Configurator encompasses the following parts: 
      assignment of runnables to OS tasks 
      assignment of OS tasks to OS applications (memory protection/multicore support) 
      assignment of Per-Instance Memory to NV memory blocks 
      selection of the exclusive area implementation method 
      configuration of the periodic triggers 
      configuration of measurement and calibration 
      selection of the optimization mode  
      selection of required VFB tracing callback functions 
      configuration of the built-in call to the RTE generator 
      platform dependent resource calculation 
    6.1 
    Configuration Variants 
    The RTE supports the configuration variants 
      VARIANT-PRE-COMPILE 
      VARIANT-POST-BUILD-SELECTABLE 
    The configuration classes of the  RTE parameters depend on the supported configuration 
    variants. For their definitions please see the Rte_bswmd.arxml file. 
    6.2 
    Task Configuration 
    Runnable  Entities  triggered  by  any  kind  of  RTE  Event  e.g.  TimingEvent  have  to  be 
    mapped to tasks. Only server runnables (triggered by an OperationInvokedEvent) that 
    either  have  their  CanBeInvokedConcurrently  flag  enabled  or  that  are  called  from 
    tasks  that  cannot  interrupt  each  other  do  not  need  to  be  mapped.  For  optimization 
    purposes  they  can  be  called  directly  and  are  then  executed  in  the  context  of  the  calling 
    runnable (client). 
    The task configuration within DaVinci Configurator also contains some attributes which are 
    part of the OS configuration. The parameters are required to control RTE generation.  
    The creation of tasks is done in OS Configuration Editor in the in the DaVinci Configurator. 
    The Task Mapping Assistant has to be used to assign the triggered functions (runnables 
    and schedulable entities) to the tasks.   
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    125 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
     
     
    Figure 6-1   Mapping of Runnables to Tasks 
     
    The  MICROSAR  RTE  supports  the  generation  of  both  BASIC  and  EXTENDED  tasks.  The 
    Task  Type  can  either  be  selected  or  the  selection  is  done  automatically  if  AUTO  is 
    configured. 
     
    A  basic  task  can  be  used  when  all  runnables  of  the  task  are  triggered  by  one  or  more 
    identical triggers. 
    A typical example for this might be several cyclic triggered runnables that share the same 
    activation offset and cycle time. 
    There  is  also  the  possibility  to  select  Task  Typ  BASIC  if  all  runnables  of  a  task  are 
    triggered  cyclically  but  have  different  cycle  times  or  different  activation  offsets. The  RTE 
    realizes the basic task with the help of OS Schedule Tables. 
    Moreover another prerequisite for basic task usage is that the mapped runnables do not 
    use APIs that require a waitpoint, like a blocking Rte_Feedback(). 
    If  the above described  conditions  are  not fulfilled  an  extended  task  has  to  be  used. The 
    extended task can wait for different runnable trigger conditions e.g. data reception trigger, 
    cyclic triggers or mode switch trigger.  
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    126 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    Caution 
    When RTE events that trigger a runnable are fired multiple times before the actual 
      runnable invocation happens and when the runnable is mapped to an extended task, 
    the runnable is invoked only once. 
    However, if the runnable is mapped to a basic task, the same circumstances will cause 
    multiple task activations and runnable invocations. Therefore, for basic tasks, the task 
    attribute Activation in the OS configuration has to be set to the maximum number of 
    queued task activations. If Activation is too small, additional task activations may result 
    in runtime OS errors. To avoid the runtime error the number of possible Task Activation 
    should be increased. 
     
    6.3 
    Memory Protection and Multicore Configuration 
    For  memory  protection  or  multicore  support  the  tasks  have  to  be  assigned  to  OS 
    applications.  The  following  figures  show  the  configuration  of  OS  applications  and  the 
    assignment of OS tasks. For multicore support also the Core ID has to be configured for 
    the OS application. When a runnable/trigger of a SWC is mapped to a task, the SWC is 
    automatically assigned to the same OS application as the task. In case the SWC contains 
    only  runnables  that  are  not  mapped  to  a  task,  the  SWC  can  be  assigned  to  an  ECUC 
    partition 
    with 
    the 
    parameter 
    EcuC/EcucPartitionCollection/EcucPartition/EcucPartitionSoftwareComponentInstanceRef. 
    For  every  OS  application,  an  ECUC  partition  can  be  created.  It  then  needs  to  be 
    referenced  by  the  OS  application  with  the  Os/OsApplication/OsAppEcucPartitionRef 
    parameter.  Besides  the  assignment  of  SWCs  to  OS  applications,  the  ECUC  partition 
    provides  a  parameter  to  configure  the  safety  level  of  the  partition  (QM  or  ASIL_A  to 
    ASIL_D). The RTE generator uses this parameter to enable additional task priority based 
    optimizations for QM partitions.  
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    127 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
     
     
    Figure 6-2   Assignment of a Task to an OS Application 
     
    Caution 
    Make sure that the operating system is configured with scalability class SC3 or SC4.  
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    128 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
     
    Figure 6-3   OS Application Configuration 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    129 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.4 
    NV Memory Mapping 
    Each instance of a Per-Instance Memory, which has configured Needs memory mapping 
    can be mapped to an NV memory block of the NvM.  
    The Per-Instance Memory (PIM) is used as mirror buffer for the NV memory block. During 
    startup, the EcuM calls NvM_ReadAll, which initializes the configured PIM with the value 
    of  the  assigned  NV  memory  block.  During  shutdown,  NvM_WriteAll  stores  the  current 
    value of the PIM buffer in the corresponding NV memory block.  
    The  RTE  configurator  provides  support  for  manual  mapping  of  already  existing  NV 
    memory  blocks  or  automatically  generation  of  NV  memory  blocks  and  mapping  for  all 
    PIMs. 
    The  RTE  has  no  direct  Interface  to  the  NvM  in  the  source  code.  There  exists  only  an 
    Interface on configuration level. The RTE configurator has to configure the following parts 
    of the NvM configuration. 
      Address of PIM representing the RAM mirror of the NV memory block. 
      Optionally the address of calibration parameter for default values. 
      Optionally the size of the PIM in bytes if available during configuration time. 
     
    The  following  figure  shows  the  Memory  Mapping  in  DaVinci  Configurator  where 
    assignment of Per-Instance Memory to NV memory blocks can be configured.  
       
     
    Figure 6-4   Mapping of Per-Instance Memory to NV Memory Blocks 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    130 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.5 
    RTE Generator Settings 
    The  following  figure  shows  how  the  MICROSAR  RTE  Generator  has  to  be  enabled  for 
    code generation within the DaVinci Configurator. 
      
    Figure 6-5   RTE Generator Settings 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    131 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.6 
    Measurement and Calibration 
    The  MICROSAR  RTE  generator  supports  the  generation  of  an  ASAM  MCD-2MC 
    compatible  description  of  the  generated  RTE  that  can  be  used  for  measurement  and 
    calibration  purposes.  When  measurement  or  calibration  is  enabled  the  RTE  generator 
    generates  a  file  Rte.a2l  that  contains  measurement  objects  for  sender/receiver  ports, 
    per-instance  memories  and  inter-runnable  variables.  Calibration  parameters  are 
    represented as characteristic objects. 
     
     
    Figure 6-6   Measurement and Calibration Generation Parameters 
     
    The switch A2L Version controls the ASAM MCD-2MC standard to which the Rte.a2l file 
    is compliant. Version 1.6.0 is recommended as it supports a symbol link attribute that can 
    be used by the measurement and calibration tools to automatically obtain the address of a 
    characteristic or measurement object in the compiled and linked RTE code. 
    What  measurements  and  characteristics  are  listed  in  the  Rte.a2l  file  depends  on  the 
    measurement  and  calibration  settings  of  the  individual  port  interfaces,  per-instance 
    memories,  inter-runnable variables and calibration parameters and if the variable can be 
    measured  in  general.  For  example,  measurement  is  not  possible  for  queued 
    communication as described in the RTE specification. When “Calibration Access” is set to 
    “NotAccessible”, an object will not be listed in the Rte.a2l file. 
    Within  the  Rte.a2l  file,  the  measurement  objects  are  grouped  by  SWCs.  When  inter-
    ECU sender/receiver communication shall be measured, the groups will also contain links 
    to  measurement  objects  with  the  name  of  the  COM  signal  handle.  These  measurement 
    objects have to be provided by the COM. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    132 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    Furthermore, the generated Rte.a2l is only a partial A2L file. It is meant to be included in 
    the MODULE block of a skeleton A2L file with the ASAM MCD-2MC /include command. 
    This  makes  it  possible  to  specify  additional  measurement  objects,  for  example  from  the 
    COM, and IF_DATA blocks directly in the surrounding A2L file. 
     
    In order to also allow the measurement of implicit buffers for inter-ECU communication, the 
    MICROSAR RTE generator supports measurement  with the help of XCP Events. This is 
    controlled  by  the  flag  “Use  XCPEvents”.  When  XCP  Events  are  enabled,  the  RTE 
    generator  triggers  an  XCP  Event  that  measures  the  implicit  buffer  after  a  runnable  with 
    implicit  inter-ECU  communication  is  terminated  and  before  the  data  is  sent.  “Use 
    XCPEvents” also enables the generation of one XCP Event at the end of every task that 
    can be used to trigger the measurement of other objects. 
     
    The  RTE  generator  automatically  adds  the  XCP  Events  to  the  configuration  of  the  XCP 
    module. The Event IDs are then automatically calculated by the XCP module. 
    The  definitions  for  the  Events  are  generated  by  the  XCP  module  into  the  file 
    XCP_events.a2l.  This  file  can  be  included  in  the  DAQ  section  of  the  IF_DATA  XCP 
    section in the skeleton A2L file. 
     
    The  MICROSAR  RTE  supports  three  different  online  calibration  methods,  which  can  be 
    selected globally for the whole ECU. They differ in their kind how the APIs Rte_CData and 
    Rte_Prm access the calibration parameter. By default the online calibration is switched off. 
    The following configuration values can be selected: 
      None                                                                                                                 
      Single Pointered                                                                                                                 
      Double Pointered                                                                                                                
      Initialized RAM 
     
    In  addition  to  the  ECU  global  selection  of  the  method  the  online  calibration  have  to  be 
    activated for each component individually by setting the Calibration Support switch. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    133 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
      
    Figure 6-7   SWC Calibration Support Parameters 
     
    For each component with activated Calibration Support memory segments are generated 
    into the file Rte_MemSeg.a2l. This file can be included in the MOD_PAR section in the 
    skeleton A2L  file.  This  makes  it  possible  to  specify  additional  memory  segments  in  the 
    surrounding A2L file. 
    If  the  method  Initialized  RAM  is  selected,  segments  for  the  Flash  data  section  and  the 
    RAM  data  section  of  each  calibration  parameter  are  generated.  The  Flash  sections  are 
    mapped to the corresponding RAM sections. 
    If the Single Pointered or Double Pointered method is enabled, only memory segments for 
    the  Flash  data  sections  are  listed  in  the  Rte_MemSeg.a2l.  In  addition  a  segment  for  a 
    RAM  buffer  is  generated,  when  the  Single  Pointered  method  is  used  and  a 
    CalibrationBufferSize is set. This parameter specifies the size of the RAM buffer in 
    byte. If it is set to 0, no RAM buffer will be created. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    134 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
     
    Figure 6-8   CalibrationBufferSize Parameter 
    The  following  figure  shows  a  possible  include  structure  of  an A2L  file.  In  addition  to  the 
    fragment A2L files that are generated by the RTE generator other parts (e.g. generated by 
    the BSW) can be included in the skeleton A2L file. 
     
     
    Figure 6-9   A2L Include Structure 
     
    For more details about the creation of a complete A2L file see [24]. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    135 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.7 
    Optimization Mode Configuration 
    A  general  requirement  to  the  RTE  generator  is  production  of  optimized  RTE  code.  If 
    possible  the  MICROSAR  RTE  Generator  optimizes  in  different  optimization  directions  at 
    the same time. Nevertheless, sometimes it isn’t possible to do that. In that case the default 
    optimization direction is “Minimum RAM Consumption”. The user can change this behavior 
    by manually selection of the optimization mode.   
      Minimum RAM Consumption (MEMORY) 
      Minimum Execution Time (RUNTIME) 
     
    The  following  figure  shows  the  Optimization  Mode  Configuration  in  DaVinci  Configurator.  
     
    Figure 6-10  Optimization Mode Configuration 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    136 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    6.8 
    VFB Tracing Configuration 
    The  VFB  Tracing  feature  of  the  MICROSAR  RTE  may  be  enabled  in  the  DaVinci 
    Configrator as shown in the following picture. 
     
     
    Figure 6-11   VFB Tracing Configuration 
     
    You may open an already generated Rte_Hook.h header file from within this dialog. This 
    header file contains the complete list of all available trace hook functions, which can be 
    activated independently. You can select and copy the names and insert these names into 
    the trace function list of this dialog manually or you can import a complete list from a file. If 
    you want to enable all trace functions you can import the trace functions from an already 
    generated Rte_Hook.h. The VFB Trace Client Prefix defines an additional prefix for all 
    VFB trace functions to be generated. With this approach it is for example possible to 
    enable additionally trace functions for debugging (Dbg) and diagnostic log and trace (Dlt) 
    at the same time. 
     
    Info 
    All enabled trace functions have to be provided by the user. Section 4.3.4 describes 
      how a template for VFB trace hooks can be generated initially or updated after 
    configuration changes. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    137 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.9 
    Exclusive Area Implementation 
    The implementation method for exclusive areas can be set in the DaVinci Configurator as 
    shown in the following picture. 
     
     
    Figure 6-12  Exclusive Area Implementation Configuration 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    138 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    6.10  Periodic Trigger Implementation 
    The  runnable  activation  offset  and  the  trigger  implementation  for  cyclic  runnable  entities 
    may be set in the ECU project editor as shown in the following picture. 
     
     
    Figure 6-13  Periodic Trigger Implementation Configuration 
     
    Caution 
    Currently it is not supported to define an activation offset and a trigger implementation 
      per trigger. The settings can only be made for the complete runnable with potential 
    several cyclic triggers.  
     
    The activation offset specifies at what time relative to the start of the RTE the runnable / 
    main function is triggered for the first time. 
    Trigger  implementation  can  either  be  set  to  Auto  or  None.  When  it  is  set  to  the  default 
    setting  Auto,  the  RTE  generator  will  automatically  generate  and  set  OS  alarms  that  will 
    then trigger the runnables  /  main functions. When trigger implementation is set  to  None, 
    the  RTE  generator only creates the tasks and events  for triggering the runnables  / main 
    functions. It is then the responsibility of the user to periodically activate the basic task to 
    which a runnable / main function is mapped or to send an event when the runnable / main 
    function is mapped to an extended task.  
    This  feature  can  also  be  used  to  trigger  cyclic  runnable  entities  /  main  functions  with  a 
    schedule table. This allows the synchronization with FlexRay. 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    139 
    based on template version 3.5 




    Technical Reference MICROSAR RTE 
    To ease the creation of such a schedule table, the generated report Rte.html contains a 
    trigger listing. The listing contains the triggered runnables / main functions, their tasks and 
    the used events and alarms. 
     
    Figure 6-14  HTML Report 
     
    If  the  OS  alarm  column  for  a  trigger  is  empty,  the  runnable  /  main  function  needs  to  be 
    triggered  manually.  In  the  example  above,  this  is  the  case  for  all  runnables  except  for 
    RunnableCyclic. 
    The row for Runnable2 does not contain an event because this runnable is mapped to a 
    basic task. 
    To  manually  implement  the  cyclic  triggers,  one  could  for  example  create  a  repeating 
    schedule table in the OS configuration with duration 10 that uses a counter with a tick time 
    of  one  millisecond.  An  expiry  point  at  offset  0  would  then  need  to  contain  SETEVENT 
    actions  for  the  runnables  Runnable1  and  Runnable3  and  an  ACTIVATETASK  action  for 
    Runnable2. 
    Moreover further expiry points with the offsets 2, 4, 6, 8 are needed to activate Runnable1 
    and Runnable2 and another expiry point with offset 5 is needed to activate Runnable3. 
     
    Caution 
    When the trigger implementation is set to none, the settings for the cycle time and the 
      activation offset are no longer taken into account by the RTE. It is then the 
    responsibility of the user to periodically trigger the runnables / main functions at the 
    configured times. Moreover the user also has to make sure that this triggering does not 
    happen before the RTE is completely started. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    140 
    based on template version 3.5 



    Technical Reference MICROSAR RTE 
    6.11  Resource Calculation 
    The RTE generator generates the file Rte.html containing the RAM and CONST usage of 
    the generated RTE. The RTE generator makes the following assumptions. 
      Size of a pointer: 2 bytes. The default value of the RTE generator can be changed with 
    the parameter Size Of RAM Pointer in the EcuC module. 
      Size of the OS dependent data type TaskType: 1 byte 
      Size of the OS dependent data type EventMaskType: 1 byte 
      Padding bytes in structures and arrays are considered according to the configured 
    parameters Struct Alignment and Struct In Array Alignment in the EcuC 
    module for NvM blocks. 
      Size of a boolean data type: 1 byte (defined in PlatformTypes.h)  
     
    The  pointer  size  and  the  alignment  parameters  can  be  found  in  the  container 
    EcuC/EcucGeneral in the Basic Editor of DaVinci Configurator. 
     
     
     
    Figure 6-15  Configuration of platform settings 
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    141 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    DaVinci DEV 
    DaVinci Developer: The SWC Configuration Editor. 
    DaVinci CFG 
    DaVinci Configurator: The BSW and RTE Configuration Editor. 
    Table 7-1   Glossary 
    The AUTOSAR  Glossary  [14]  also  describes  a  lot  of  important  terms,  which  are  used  in 
    this document. 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    Com 
    Communication Layer 
    ComXf 
    Com based Transformer 
    C/S 
    Client-Server 
    E2E 
    End-to-End Communication Protection 
    E2EXf 
    End-to-End Transformer 
    EA 
    Exclusive Area 
    ECU 
    Electronic Control Unit 
    EcuM 
    ECU State Manager 
    FOSS 
    Free and Open Source Software 
    HIS 
    Hersteller Initiative Software 
    IOC 
    Inter OS-Application Communicator 
    ISR 
    Interrupt Service Routine 
    MICROSAR 
    Microcontroller Open System Architecture (Vector’s  AUTOSAR solution) 
    NvM 
    Non-volatile Memory Manager 
    PIM 
    Per-Instance Memory 
    OIL 
    OSEK Implementation Language 
    OSEK 
    Open Systems and their corresponding Interfaces for Electronics in 
    Automotive  
    RE 
    Runnable Entity 
    SE 
    Schedulable Entity 
    RTE 
    Runtime Environment 
    SchM 
    Schedule Manager 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    142 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    SOME/IP 
    Scalable service-oriented middleware over IP 
    SomeIpXf 
    SOME/IP Transformer 
    S/R 
    Sender-Receiver 
    SWC 
    Software Component 
    SWS 
    Software Specification 
    VFB 
    Virtual Functional Bus 
    Table 7-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    143 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    8  Additional Copyrights 
    The MICROSAR RTE Generator  contains Free and Open Source Software (FOSS). The 
    following table lists the files which contain this software, the kind and version of the FOSS, 
    the  license  under  which  this  FOSS  is  distributed  and  a  reference  to  a  license  file  which 
    contains the original text of the license terms and conditions. The referenced license files 
    can be found in the directory of the RTE Generator. 
     
    File 
    FOSS 
    License 
    License Reference 
    MicrosarRteGen.exe  Perl 5.20.2 
    Artistic License 
    License_Artistic.txt   
    Newtonsoft.Json.dll 
    Json.NET 6.0.4  MIT License 
    License_JamesNewton-King.txt 
    Rte.jar 
    flexjson 2.1 
    Apache License V2.0  License_Apache-2.0.txt 
    Table 8-1   Free and Open Source Software Licenses 
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    144 
    based on template version 3.5 


    Technical Reference MICROSAR RTE 
    9  Contact 
    Visit our website for more information on 
     
      News 
      Products 
      Demo software 
      Support 
      Training data 
      Addresses 
     
    www.vector.com 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 4.15.0 
    145 
    based on template version 3.5 

    Document Outline


    1.3.168 - TechnicalReference_SipModificationChecker

    SIP Modification Checker

    1.3.169 - TechnicalReference_SipModificationChecker_ind

    Page 1
    Page 2
    Page 3
    Page 4
    Page 5
    Page 6
    Page 7
    Page 8
    Page 9
    Page 10
    Page 11

    1.3.170 - TechnicalReference_SipModificationCheckers

     
     
     
     
     
     
     
     
     
     
     
     
    SIP Modification Checker 
    Technical Reference 
     
     
    Version 1.00.00 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Markus Schwarz 
    Status 
    Released 
     
     
     
     
     

    Technical Reference SIP Modification Checker 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Markus Schwarz 
    2014-05-07 
    1.00.00 
    Initial version 
     
     
     
     
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]    
     
     
    Scope of the Document  
    This technical reference describes the general use of the tool SipModificationChecker. 
     
     
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    2 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    Contents 
    1 
    Component History ...................................................................................................... 5 
    2 
    Introduction................................................................................................................... 6 
    2.1 

    Overview ............................................................................................................ 6 
    2.2 
    Background ........................................................................................................ 6 
    2.3 
    Workflow ............................................................................................................ 7 
    2.3.1 

    At Vector ............................................................................................ 7 
    2.3.2 
    At Tier1/OEM ..................................................................................... 7 
    3 
    Functional Description ................................................................................................. 8 
    3.1 

    Command Line Usage ....................................................................................... 8 
    3.1.1 

    Console Output .................................................................................. 8 
    3.1.2 
    Return Error Codes ............................................................................ 8 
    3.1.3 
    Report Creation .................................................................................. 9 
    3.2 
    Integration .......................................................................................................... 9 
    4 
    Glossary and Abbreviations ...................................................................................... 10 
    4.1 

    Glossary .......................................................................................................... 10 
    4.2 
    Abbreviations ................................................................................................... 10 
    5 
    Contact ........................................................................................................................ 11 
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    3 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    Illustrations 
    Figure 2-1 
    Workflow at Vector ...................................................................................... 7 
    Figure 2-2 
    Workflow at Tier1/OEM ............................................................................... 7 
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 5 
    Table 3-1  
    Command Line ErrorCodes ........................................................................ 8 
    Table 7-1  
    Glossary ................................................................................................... 10 
    Table 7-2  
    Abbreviations ............................................................................................ 10 
     
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    4 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00.00 
     Initial Version 
     
     
    Table 1-1   Component history 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    5 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    2  Introduction 
    This document describes the functionality of the tool SipModifcationChecker. 
    2.1 
    Overview 
    The SipModifcationChecker is a tool that supports the Tier1 and OEM to determine if and 
    where the (source code) files delivered from Vector were unintentionally changed.  
    The SipModifcationChecker  
    >  is a command line based tool. 
    >  checks sources below a user-selectable root directory against information given in a 
    reference file. 
    >  checks if and which of the relevant delivered files are contained below that directory. 
    >  checks if and which files have been modified. 
    >  reports the “modification state” as ERRORLEVEL and within a HTML report. 
    2.2 
    Background 
    This tool aims to find changes that were  unintendedly introduced by the customer in the 
    delivered Vector source code. 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    6 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    2.3 
    Workflow 
    2.3.1 
    At Vector 
    >  Vector creates the list of relevant files, i.e. all (source code) files that are relevant to 
    not be modified  
    >  Vector calculates a check code for each of these files and creates the 
    SipCheckCodeFile 
    >  Vector delivers the embedded sources, the SipCheckCodeFile and the 
    SipModifcationChecker 
    Deliv ery
    WP
    SourceCode
    +SubSet
    WP
    SipCheckCodeFile
    RelevantFiles
    «based on»
    Tool
    «create»
    SipModifcationChecker
    Vector
     
    Figure 2-1  Workflow at Vector 
    2.3.2 
    At Tier1/OEM 
    >  The Tier1/OEM run the SipModifcationChecker, configure their root path and load the 
    SipCheckCodeFile from Vector. The tool provides information if the local sources found 
    below the selected root directory are un-modified. 
    Deliv ery
    WP
    WP
    SourceCode
    UsedSourceCode
    +CurrentCode
    SipCheckCodeFile
    check for modification
    +Reference
    Tool
    SipModifcationChecker
    «use»
    Customer
     
    Figure 2-2  Workflow at Tier1/OEM 
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    7 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    3  Functional Description 
    3.1 
    Command Line Usage 
    The analysis can be executed from command line. 
    Syntax: 
    SipModificationChecker <rootPath> <referenceFile> 
    rootPath:      path to the directory that is used as base for analysis 
    referenceFile: path to the provided reference file 
     
    Example: 
    SipModificationChecker c:\Example\CodeRootPath 
    C:\Example\SipModificationChecker.xml 
     
    If the rootPath or the referenceFile do not exist, the tool outputs a command line message 
    and returns a ProcessError. 
    Otherwise the tool checks all files provided in referenceFile if they can be found below the 
    rootPath and if they have local modifications compared to the delivery. 
     
    3.1.1 
    Console Output   
    The tool outputs the results in the console: 
    => Result: 
       115/310 files are OK (unmodified) 
       185/310 files are NOT OK (i.e. they have been modified) 
       10/310 files are not found in given directory 
       Refer to HTML for details 
    => ERROR 
     
    3.1.2 
    Return Error Codes  
    The tool sets the environmental variable ERRORLEVEL depending on its result: 
    Return Code 
    Value  Description 
    Ok 

    All referenced files are found. 
    They have no modifications. 
    Warning 

    Not all referenced files are found. 
    All found files have no modifications. 
    Error 
    10 
    There is at least one file with modifications. 
    ProcessError 
    20 
    The check could not be performed as the input data is not valid 
    (rootPath and/or referenceFile do not exist) 
    Table 3-1   Command Line Error Codes 
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    8 / 11 
    based on template version 5.7.1 



    Technical Reference SIP Modification Checker 
    3.1.3 
    Report Creation 
    In  addition  to  the  returned  error  code,  the  tool  creates  a  HTML  report  that  indicates  the 
    status of each file. 
    Example: 
     
     
     
    The  HTML  report  is  located  in  the  same  directory  as  referenceFile.  It  is  named  like  the 
    referenceFile extended with “_Report.html”. 
    Example: 
    The Reference File C:\Example\SipModificationChecker.xml  
    leads to report C:\Example\SipModificationChecker_Report.html 
    3.2 
    Integration 
    It  is  recommended  to  integrate  this  tooling  into  the  build  environment  to  get  early 
    notifications of modified sources. This also prevents that the different sources are used for 
    build and check.  
    Use the returned ERRORLEVEL to react on modified files, e.g. abort the build process or 
    inform the user within the build report. 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    9 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    4  Glossary and Abbreviations 
    4.1 
    Glossary 
    Term 
    Description 
     
     
     
     
    Table 4-1   Glossary 
    4.2 
    Abbreviations 
    Abbreviation 
    Description 
    SIP 
    Software Integration Package 
     
     
    Table 4-2   Abbreviations 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    10 / 11 
    based on template version 5.7.1 

    Technical Reference SIP Modification Checker 
    5  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    2014, Vector Informatik GmbH 
    Version: 1.00.00 
    11 / 11 
    based on template version 5.7.1 

    1.3.171 - TechnicalReference_VStdLib_GenericAsr

    MICROSAR VStdLib

    1.3.173 - TechnicalReference_VStdLib_GenericAsrs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR VStdLib 
    Technical Reference 
     
    Generic implementation of the Vector Standard Library 
    Version 1.00.01 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Torsten Kercher 
    Status 
    Released 
     
     
     
     
     
     
     
     



    Technical Reference MICROSAR VStdLib 
    Document Information 
     
    History 
    Author 
    Date 
    Version 
    Remarks 
    Torsten Kercher 
    2015-05-04 
    1.00.00 
    Creation 
    Torsten Kercher 
    2016-04-12 
    1.00.01 
    Update to new CI, no changes in content 
     
     
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    1.6.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
    3.2.0 
     
     
     
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    Contents 
    1 
    Component History ...................................................................................................... 5 
    2 
    Introduction................................................................................................................... 6 
    2.1 

    Architecture Overview ........................................................................................ 6 
    3 
    Functional Description ................................................................................................. 8 
    3.1 

    Features ............................................................................................................ 8 
    3.2 
    Initialization and Main Functions ........................................................................ 8 
    3.3 
    Error Handling .................................................................................................... 8 
    4 
    Integration ..................................................................................................................... 9 
    4.1 

    Scope of Delivery ............................................................................................... 9 
    4.2 
    Include Structure ................................................................................................ 9 
    4.3 
    Critical Sections ................................................................................................. 9 
    4.4 
    Compiler Abstraction and Memory Mapping ..................................................... 10 
    4.5 
    Integration Hints ............................................................................................... 11 
    5 
    API Description ........................................................................................................... 12 
    5.1 

    Type Definitions ............................................................................................... 12 
    5.2 
    Services provided by VStdLib .......................................................................... 12 
    5.3 
    Services used by VStdLib ................................................................................ 22 
    6 
    Configuration .............................................................................................................. 23 
    6.1 

    Configuration Variants ...................................................................................... 23 
    6.2 
    Manual Configuration in Header File ................................................................ 23 
    7 
    Abbreviations .............................................................................................................. 25 
    8 
    Contact ........................................................................................................................ 26 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 6 
    Figure 2-2 
    Interfaces to adjacent modules ................................................................... 7 
    Figure 4-1 
    Include Structure ........................................................................................ 9 
     
     
    Tables 
    Table 1-1  
    Component history...................................................................................... 5 
    Table 3-1  
    Service IDs ................................................................................................. 8 
    Table 3-2  
    Errors reported to DET ............................................................................... 8 
    Table 4-1  
    Static files ................................................................................................... 9 
    Table 4-2  
    Compiler Abstraction and Memory Mapping ............................................. 10 
    Table 5-1  
    VStdLib_GetVersionInfo ........................................................................... 12 
    Table 5-2  
    VStdLib_MemClr ...................................................................................... 13 
    Table 5-3  
    VStdLib_MemClrMacro ............................................................................. 14 
    Table 5-4  
    VStdLib_MemSet ...................................................................................... 15 
    Table 5-5  
    VStdLib_MemSetMacro ............................................................................ 16 
    Table 5-6  
    VStdLib_MemCpy ..................................................................................... 17 
    Table 5-7  
    VStdLib_MemCpy16 ................................................................................. 18 
    Table 5-8  
    VStdLib_MemCpy32 ................................................................................. 19 
    Table 5-9  
    VStdLib_MemCpy_s ................................................................................. 20 
    Table 5-10  
    VStdLib_MemCpyMacro ........................................................................... 21 
    Table 5-11  
    VStdLib_MemCpyMacro_s ....................................................................... 22 
    Table 5-12  
    Services used by VStdLib ......................................................................... 22 
    Table 6-1  
    General configuration ............................................................................... 24 
    Table 7-1  
    Abbreviations ............................................................................................ 25 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
    Creation of the component. 
    2.00 
    Detach the component from core-based implementations, give optimized 
    routines and support operations on large data (> 65535 bytes). 
    Table 1-1   Component history 
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 



    Technical Reference MICROSAR VStdLib 
    2  Introduction 
    This  document  describes  the  functionality,  API  and  configuration  of  the  generic  Vector 
    Standard Library (VStdLib).  
     
    Supported AUTOSAR Release*: 
    4.x 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    VSTDLIB_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    VSTDLIB_MODULE_ID 
    255 decimal 
    (according to [1]) 
    * For the precise AUTOSAR Release 4.x please see the release specific documentation. 
     
    The  VStdLib  provides  a  hardware  independent  implementation  of  memory  manipulation 
    services used by several MICROSAR BSW components. 
    2.1 
    Architecture Overview 
    The following figure shows where the VStdLib is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview   
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    The next figure shows the interfaces to adjacent modules of the VStdLib. These interfaces 
    are described in chapter 5.  
     class Module Structure
    Module
    MICROSAR BSW
    module
    Module
    «use»
    Det
    «EmbeddedInterface»
    VStdLib
    «realize»
    +  VStdLib_GetVersionInfo()
    +  VStdLib_MemClr()
    +  VStdLib_MemClrLarge()
    «EmbeddedInterface»
    +  VStdLib_MemClrMacro()
    Det
    +  VStdLib_MemCpy()
    Module
    +  VStdLib_MemCpy_s()
    +  Det_ReportError()
    «use
    +  VStdLib_MemCpy16()
    optionally»
    +  VStdLib_MemCpy16Large()
    «realize»
    VStdLib
    +  VStdLib_MemCpy32()
    «EmbeddedInterface»
    «use
    +  VStdLib_MemCpy32Large()
    (Compiler) Library
    optionally»
    +  VStdLib_MemCpyLarge()
    +  VStdLib_MemCpyLarge_s()
    +  VStdLib_MemCpyMacro()
    +  VStdLib_MemCpyMacro_s()
    +  VStdLib_MemSet()
    +  VStdLib_MemSetLarge()
    «realize»
    +  VStdLib_MemSetMacro()
    Module
    (Compiler) Library
     
    Figure 2-2  Interfaces to adjacent modules 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    3  Functional Description 
    This chapter describes the general function of the component. 
    3.1 
    Features 
    The Vector Standard Library gives a standard interface for memory initialization and copy 
    services as described in  section 5.2. It provides a hardware independent implementation 
    of  this  interface,  but  also  allows  the  mapping  to  project  specific  implementations  for 
    optimization reasons. 
    3.2 
    Initialization and Main Functions 
    No initialization is necessary and no main functions are provided. 
    3.3 
    Error Handling 
    3.3.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter VSTDLIB_DEV_ERROR_REPORT == STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported VStdLib ID is 255. The service IDs identify the services which are described 
    in section 5.2. The following table presents the service IDs and the related services: 
    Service ID 
    Service 
    VSTDLIB_SID_MEM_SET (0x00) 
    VStdLib_MemClr(), VStdLib_MemSet() 
    VSTDLIB_SID_MEM_COPY (0x01) 
    VStdLib_MemCpy() 
    VSTDLIB_SID_MEM_COPY_16 (0x02) 
    VStdLib_MemCpy16() 
    VSTDLIB_SID_MEM_COPY_32 (0x03) 
    VStdLib_MemCpy32() 
    VSTDLIB_SID_MEM_COPY_S (0x04) 
    VStdLib_MemCpy_s() 
    VSTDLIB_SID_GET_VERSION_INFO (0x05) 
    VStdLib_GetVersionInfo() 
    Table 3-1   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    VSTDLIB_E_PARAM_POINTER (0x01) 
    API service used with NULL pointer parameter. 
    VSTDLIB_E_PARAM_SIZE (0x02) 
    VStdLib_MemCpy_s() used with invalid 
    destination size parameter. 
    Table 3-2   Errors reported to DET 
    3.3.2 
    Production Code Error Reporting 
    No production code error reporting is supported. 
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    4  Integration 
    This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  VStdLib 
    into an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the VStdLib contains following static files. There are no dynamic files. 
    File Name 
    Description 
    vstdlib.c 
    This is the source file of the VStdLib. 
    vstdlib.h 
    This is the header file that contains the public API. 
    VStdLib_Cfg.h  This is the configuration header file, see chapter 6 for details. 
    Table 4-1   Static files 
    4.2 
    Include Structure 
     class IncludeStructure
    MemMap.h
    Std_Types.h
    «include»
    «include»
    «include»
    vstdlib.c
    vstdlib.h
    VStdLib_Cfg.h
    «include»
    «include»
    «include»
    Det.h
     
    Figure 4-1  Include Structure 
    4.3 
    Critical Sections 
    No critical sections are implemented. 
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 

    based on template version 5.9.0 



    Technical Reference MICROSAR VStdLib 
    4.4 
    Compiler Abstraction and Memory Mapping 
    The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
    definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
    assigned to a memory section. 
    The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
    definitions of the VStdLib and illustrates their assignment among each other. 
     
    Compiler Abstraction 
     Definitions 
     
     
     
     
     
     
    Memory Mapping  
    Sections 

    VSTDLIB_CODE
    VSTDLIB_APPL_VAR
    VSTDLIB_VAR_FAR
    VSTDLIB_START_SEC_CODE 
     
     
     
    VSTDLIB_STOP_SEC_CODE 
    Table 4-2   Compiler Abstraction and Memory Mapping 
    The VStdLib declares no global variables or constants thus only a general CODE section 
    is provided for the memory mapping that is abstracted by VSTDLIB_CODE. 
    Due to the AUTOSAR compiler and memory abstraction the location of individual data and 
    the  width  of  pointers  are  not  known  during  development  time.  Hence  the  compiler 
    abstraction  definition  VSTDLIB_APPL_VAR  refers  to  variables  which  are  defined  by  the 
    application and not handled by the VStdLib memory mapping. 
    The function implementation of all memory manipulation services as described in section 
    5.2  abstracts  all  pointer  arguments  (independently  of  the  target  type)  with 
    VSTDLIB_VAR_FAR  to  allow  that  all  data  can  be  handled  by  far  accesses.  The  macro 
    implementation performs an in-place access, thus the unaltered pointer class of the caller 
    is used. 
     
     
     
    Note 
    For most 32bit MCUs it is not necessary to give any qualifiers with VSTDLIB_VAR_FAR 
      to change the pointer class  as these platforms commonly use 32bit pointers that can 
    address  the  whole  memory  by  default.  Please  note  that  both  RAM  and  ROM  are 
    accessed with this qualifier and an external implementation (see section 6.2.1) has to 
    be used if distinct pointers have to be qualified individually on the used target platform. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    10 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    4.5 
    Integration Hints 
    >  Avoid overlapping destination and source memory areas  when using the copy services 
    as this may lead to unexpected results. 
    >  Consider  side  effects  if  macros  are  used:  If  either  destination  or  source  pointer  is 
    retrieved using a call to a function, this function  might  be  invoked for nCnt times. It  is 
    recommended to use temporary pointers to avoid any side effects. 
    >  The  VStdLib  is  optimized  for  32-bit  MCUs.  When  using  a  controller  with  a  smaller  bit 
    width it is highly recommended to use an external implementation that is optimized for 
    this  architecture  (see  VSTDLIB_USE_LIBRARY_FUNCTIONS  in  section  6.2.1).  If  large 
    data  support  is  not  necessary  define  each  VSTDLIB_RUNTIME_OPTIMIZATION  and 
    VSTDLIB_SUPPORT_LARGE_DATA to STD_OFF as an alternative. 
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    11 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5  API Description 
    See Figure 2-2 for an interfaces overview. 
    5.1 
    Type Definitions 
    The  nCnt  parameter  of  all  memory  manipulation  services  is  of  type  VStdLib_CntType 
    that  equals  uint32_least  if  VSTDLIB_SUPPORT_LARGE_DATA  is  defined  to  STD_ON 
    (default setting) or uint16_least if it is explicitly defined to STD_OFF. 
     
    5.2 
    Services provided by VStdLib 
     
    5.2.1 
    VStdLib_GetVersionInfo 
    Prototype 
    void VStdLib_GetVersionInfo (Std_VersionInfoType *versioninfo) 
    Parameter 
    versioninfo [out] 
    Pointer to where to store the version information, must not be NULL. 
    Return code 
    void 
    none 
    Functional Description 
    Returns the version information of this module. 
    Returns version information, vendor ID and AUTOSAR module ID of the component. 
    Particularities and Limitations 
    The parameter 'versioninfo' has to be valid and reference an object of type Std_VersionInfoType. 
    Configuration Variant(s): VSTDLIB_VERSION_INFO_API == STD_ON 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-1   VStdLib_GetVersionInfo 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    12 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.2 
    VStdLib_MemClr 
    Prototype 
    void VStdLib_MemClr (void *pDst, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to be initialized, must not be NULL. 
    nCnt [in] 
    Number of bytes to initialize, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Initializes memory to zero. 
    Sets nCnt bytes starting at pDst to zero. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Configuration Variant(s): This service is implemented externally if VSTDLIB_USE_LIBRARY_FUNCTIONS 
    == STD_ON, else it is realized by a call to VStdLib_MemSet() with 'nPattern' == 0. The compatible definition 
    VStdLib_MemClrLarge() exists additionally (and solely) if VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-2   VStdLib_MemClr 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    13 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.3 
    VStdLib_MemClrMacro 
    Prototype 
    void VStdLib_MemClrMacro (AnyPtrType *pDst, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Any typed pointer to the memory location to be initialized, must be aligned 
    corresponding to its type and not be NULL. 
    nCnt [in] 
    Number of blocks to initialize, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Initializes memory to zero (macro implementation). 
    Sets nCnt blocks starting at pDst to zero (block-size is given by the type of pDst). 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Call context 
    >  ANY 
    >  This macro is Synchronous 
    >  This macro is Reentrant 
    Table 5-3   VStdLib_MemClrMacro 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    14 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.4 
    VStdLib_MemSet 
    Prototype 
    void VStdLib_MemSet (void *pDst, uint8 nPattern, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to be initialized, must not be NULL. 
    nPattern [in] 
    The character to be used to initialize the memory. 
    nCnt [in] 
    Number of bytes to initialize, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Initializes memory to a specified pattern. 
    Sets nCnt bytes starting at pDst to the character nPattern. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Configuration Variant(s): This service is implemented externally if VSTDLIB_USE_LIBRARY_FUNCTIONS 
    == STD_ON. The compatible definition VStdLib_MemSetLarge() exists additionally (and solely) if 
    VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-4   VStdLib_MemSet 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    15 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.5 
    VStdLib_MemSetMacro 
    Prototype 
    void VStdLib_MemSetMacro (AnyPtrType *pDst, AnyIntType nPattern, 
    VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Any typed pointer to the memory location to be initialized, must be aligned 
    corresponding to its type and not be NULL. 
    nPattern [in] 
    The pattern to be used to initialize the memory (consider the correlation 
    between its type and the type of pDst). 
    nCnt [in] 
    Number of blocks to initialize, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Initializes memory to a specified pattern (macro implementation). 
    Sets nCnt blocks starting at pDst to nPattern (block-size is given by the type of pDst). 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Call context 
    >  ANY 
    >  This macro is Synchronous 
    >  This macro is Reentrant 
    Table 5-5   VStdLib_MemSetMacro 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    16 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.6 
    VStdLib_MemCpy 
    Prototype 
    void VStdLib_MemCpy (void *pDst, const void *pSrc, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to copy to, must not be NULL. 
    pSrc [in] 
    Pointer to the memory location to copy from, must not be NULL. 
    nCnt [in] 
    Number of bytes to copy, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Copies data from one memory location to another. 
    Copies nCnt bytes starting at pSrc to another memory location starting at pDst. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Configuration Variant(s): This service is implemented externally if VSTDLIB_USE_LIBRARY_FUNCTIONS 
    == STD_ON. The compatible definition VStdLib_MemCpyLarge() exists additionally (and solely) if 
    VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-6   VStdLib_MemCpy 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    17 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.7 
    VStdLib_MemCpy16 
    Prototype 
    void VStdLib_MemCpy16 (uint16 *pDst, const uint16 *pSrc, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to copy to, 16-bit aligned and not NULL. 
    pSrc [in] 
    Pointer to the memory location to copy from, 16-bit aligned and not NULL. 
    nCnt [in] 
    Number of 16-bit blocks to copy, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Copies data from one memory location to another. 
    Copies nCnt 16-bit blocks starting at pSrc to another memory location starting at pDst. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Configuration Variant(s): This service is implemented externally if VSTDLIB_USE_LIBRARY_FUNCTIONS 
    == STD_ON. The compatible definition VStdLib_MemCpy16Large() exists additionally (and solely) if 
    VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-7   VStdLib_MemCpy16 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    18 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.8 
    VStdLib_MemCpy32 
    Prototype 
    void VStdLib_MemCpy32 (uint32 *pDst, const uint32 *pSrc, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to copy to, 32-bit aligned and not NULL. 
    pSrc [in] 
    Pointer to the memory location to copy from, 32-bit aligned and not NULL. 
    nCnt [in] 
    Number of 32-bit blocks to copy, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Copies data from one memory location to another. 
    Copies nCnt 32-bit blocks starting at pSrc to another memory location starting at pDst. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Configuration Variant(s): This service is implemented externally if VSTDLIB_USE_LIBRARY_FUNCTIONS 
    == STD_ON. The compatible definition VStdLib_MemCpy32Large() exists additionally (and solely) if 
    VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-8   VStdLib_MemCpy32 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    19 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.9 
    VStdLib_MemCpy_s 
    Prototype 
    void VStdLib_MemCpy_s (void *pDst, VStdLib_CntType nDstSize, const void *pSrc, 
    VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Pointer to the memory location to copy to, must not be NULL. 
    nDstSize [in] 
    Maximum number of bytes to modify in the destination (typically the size of the 
    destination object). 
    pSrc [in] 
    Pointer to the memory location to copy from, must not be NULL. 
    nCnt [in] 
    Number of bytes to copy. 
    Return code 
    void 
    none 
    Functional Description 
    Verifies the destination size and copies data from one memory location to another. 
    Uses VStdLib_MemCpy() to copy nCnt bytes starting at pSrc to another memory location starting at pDst, if 
    nDstSize is greater than or equal to nCnt. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nDstSize' have to define a valid memory area. 
    Configuration Variant(s): The compatible definition VStdLib_MemCpyLarge_s() exists additionally (and 
    solely) if VSTDLIB_SUPPORT_LARGE_DATA == STD_ON. 
    Call context 
    >  ANY 
    >  This function is Synchronous 
    >  This function is Reentrant 
    Table 5-9   VStdLib_MemCpy_s 
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    20 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.10  VStdLib_MemCpyMacro 
    Prototype 
    void VStdLib_MemCpyMacro (AnyPtrType *pDst, AnyPtrType *pSrc, VStdLib_CntType 
    nCnt) 
    Parameter 
    pDst [out] 
    Any typed pointer to the memory location to copy to, must be aligned 
    corresponding to its type and not be NULL. 
    pSrc [in] 
    Any typed pointer to the memory location to copy from, must be aligned 
    corresponding to its type and not be NULL. 
    nCnt [in] 
    Number of blocks to copy, pDst must be valid for this amount. 
    Return code 
    void 
    none 
    Functional Description 
    Copies data from one memory location to another (macro implementation). 
    Copies nCnt blocks starting at pSrc to another memory location starting at pDst (block-size is given by the 
    type of pDst). 
    Particularities and Limitations 
    The parameters 'pDst' and 'nCnt' have to define a valid memory area. 
    Call context 
    >  ANY 
    >  This macro is Synchronous 
    >  This macro is Reentrant 
    Table 5-10   VStdLib_MemCpyMacro 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    21 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    5.2.11  VStdLib_MemCpyMacro_s 
    Prototype 
    void VStdLib_MemCpyMacro_s (AnyPtrType *pDst, VStdLib_CntType nDstSize, 
    AnyPtrType *pSrc, VStdLib_CntType nCnt) 
    Parameter 
    pDst [out] 
    Any typed pointer to the memory location to copy to, must be aligned 
    corresponding to its type and not be NULL. 
    nDstSize [in] 
    Maximum number of blocks to modify in the destination (typically the size of 
    the destination object). 
    pSrc [in] 
    Any typed pointer to the memory location to copy from, must be aligned 
    corresponding to its type and not be NULL. 
    nCnt [in] 
    Number of blocks to copy. 
    Return code 
    void 
    none 
    Functional Description 
    Verifies the destination size and copies data from one memory location to another (macro implementation). 
    Uses VStdLib_MemCpyMacro() to copy nCnt blocks starting at pSrc to another memory location starting at 
    pDst (block-size is given by the type of pDst), if nDstSize is greater than or equal to nCnt. 
    Particularities and Limitations 
    The parameters 'pDst' and 'nDstSize' have to define a valid memory area. 
    Call context 
    >  ANY 
    >  This macro is Synchronous 
    >  This macro is Reentrant 
    Table 5-11   VStdLib_MemCpyMacro_s 
     
    5.3 
    Services used by VStdLib 
    The following table lists used services that are provided by other components. For details 
    about prototypes and functionality refer to the documentation of the providing component. 
    Component 
    API 
    DET 
    Det_ReportError() 
    (Compiler) Library 
    Refer to section 6.2.2 
    Table 5-12   Services used by VStdLib 
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    22 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    6  Configuration 
    The Vector Standard Library is solely configured manually in a header file. 
    6.1 
    Configuration Variants 
    The VStdLib supports following configuration variants: 
    >  VARIANT-PRE-COMPILE 
    6.2 
    Manual Configuration in Header File 
    The configuration of the VStdLib is done statically within the file “VStdLib_Cfg.h”. 
     
    6.2.1 
    General configuration 
    Attribute Name 
    Values 
    Description 
    Default value 
    is typed bold 
    VSTDLIB_USE_LIBRARY_FUNCTIONS  STD_ON 
    If set to STD_ON all memory manipulation routines 
    STD_OFF 
    are mapped to external functions (e.g. compiler 
    libraries or other implementations that are 
    optimized for the target platform). This requires 
    additional configuration, refer to section 6.2.2. 
    If set to STD_OFF generic functions provided by 
    the VStdLib are used. 
    VSTDLIB_RUNTIME_OPTIMIZATION 
    STD_ON 
    If set to STD_ON optimized routines are used to 
    STD_OFF 
    increase the performance of the memory 
    manipulation functions (increases code size). 
    If set to STD_OFF code efficient routines are used 
    that increase runtime. 
    This setting is only relevant if VSTDLIB_USE_ 
    LIBRARY_FUNCTIONS == STD_OFF. 
    VSTDLIB_USE_JUMPTABLES 
    STD_ON 
    If set to STD_ON jump tables are used to increase 
    STD_OFF 
    the performance of the memory manipulation 
    functions (runtime efficient in general). 
    If set to STD_OFF the jump tables are replaced by 
    loops. Use this setting if the compiler generates no 
    efficient code for the jump tables. 
    This setting is only relevant if 
    VSTDLIB_USE_LIBRARY_FUNCTIONS == 
    STD_OFF and VSTDLIB_RUNTIME_ 
    OPTIMIZATION == STD_ON. 
    VSTDLIB_DEV_ERROR_DETECT 
    STD_ON 
    If set to STD_ON the development error detection is 
    STD_OFF 
    enabled. In this case the pointer arguments of all 
    global module functions provided by the VStdLib 
    are checked. If any NULL_PTR is passed, these 
    functions return without performing any action. 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    23 
    based on template version 5.9.0 



    Technical Reference MICROSAR VStdLib 
    VSTDLIB_DEV_ERROR_REPORT 
    STD_ON 
    If set to STD_ON the development error reporting is 
    STD_OFF 
    enabled (requires VSTDLIB_DEV_ERROR_ 
    DETECT == STD_ON). In this case the function 
    Det_ReportError() is called if any error is 
    detected. 
    VSTDLIB_VERSION_INFO_API 
    STD_ON 
    If set to STD_ON the function 
    STD_OFF 
    VStdLib_GetVersionInfo() is provided. 
    VSTDLIB_DUMMY_STATEMENT(v) 
    e.g. (v) = (v)  Expression that is used for dummy statements to 
    (void)(v) 
    avoid compiler warnings about unused identifiers. 
    Leave this definition empty to disable the usage of 
    dummy statements. 
    Table 6-1   General configuration 
     
    6.2.2 
    Additional configuration when using library functions 
    If  VSTDLIB_USE_LIBRARY_FUNCTIONS  ==  STD_ON  it  is  necessary  to  specify  library 
    functions  to  be  used  for  the  memory  manipulations.  See  the  corresponding  section  in 
    “VStdLib_Cfg.h” for details and an example mapping. 
     
     
     
    Caution 
    If the external functionality is not able to handle more than 65535 bytes it is necessary 
      to define VSTDLIB_SUPPORT_LARGE_DATA to STD_OFF. 
     
    It  has  to  be  ensured  that  the  specified  functions  are  able  to  copy  from  and  to  all 
    memory  locations  independently  of  the  pointer  length.  The  specified  functions  must 
    behave synchronously. 
     
     
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    24 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    7  Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface   
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    HIS 
    Hersteller Initiative Software 
    MCU 
    Microcontroller Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR solution) 
    SWS 
    Software Specification 
    VStdLib 
    Vector Standard Library 
    Table 7-1   Abbreviations 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    25 
    based on template version 5.9.0 


    Technical Reference MICROSAR VStdLib 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2016 Vector Informatik GmbH 
    Version 1.00.01 
    26 
    based on template version 5.9.0 

    Document Outline


    1.3.174 - TechnicalReference_WdgIf

    MICROSAR WDGIF

    1.3.176 - TechnicalReference_WdgIfs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR WDGIF 
    Technical Reference 
     
      
    Version 1.2.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Christian Leder, Rene Isau 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR WDGIF 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Christian Leder, 
    2016-03-16 
    1.0.0 
    First version of the migrated WdgIf 
    Rene Isau 
    Technical Reference 
    Christian Leder 
    2016-07-13 
    1.1.0 
    Update after introduction of native CFG5 
    generator 
    Christian Leder 
    2017-01-09 
    1.2.0 
    Update after removing state combiner 
    automatic mode 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_WatchdogInterface.pdf 
    V2.3.0 
    [2]   Vector 
    Safety Manual 
     
    Informatik 
    [3]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.4.0 
     
     
     
    Caution 
    We  have  configured  the  programs  in  accordance  with  your  specifications  in  the 
      questionnaire.  Whereas  the  programs  do  support  other  configurations  than  the  one 
    specified  in  your  questionnaire,  Vector´s  release  of  the  programs  delivered  to  your 
    company  is  expressly  restricted  to  the  configuration  you  have  specified  in  the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Contents 
    1 
    Component History ...................................................................................................... 6 
    2 
    Introduction................................................................................................................... 7 
    2.1 
    Architecture Overview ........................................................................................ 8 
    2.2 
    Basic Functionality of the WdgIf ....................................................................... 10 
    3 
    Functional Description ............................................................................................... 11 
    3.1 

    Features .......................................................................................................... 11 
    3.1.1 

    Deviations ........................................................................................ 11 
    3.1.2 
    Additions/ Extensions ....................................................................... 12 
    3.2 
    Operation in Multi-Core Systems ..................................................................... 12 
    3.2.1 
    Independent Watchdog Devices ....................................................... 13 
    3.2.2 
    WdgIf with a State Combiner ............................................................ 14 
    3.2.2.1 
    Checking the Slave Trigger Pattern ................................ 16 
    3.2.2.2 
    Operation of the State Combiner.................................... 17 
    3.2.2.2.1 

    Synchronous Mode .................................... 17 
    3.2.2.2.2 
    Asynchronous Mode .................................. 19 
    3.2.2.3 
    Worst Case Delay .......................................................... 21 
    3.2.2.4 
    Worst Case Evaluations ................................................. 23 
    3.2.2.5 
    Optimal Timing ............................................................... 27 
    3.2.2.6 
    Start-up Phase ............................................................... 28 
    3.2.2.7 
    Changing the Monitoring Period During Runtime ........... 28 
    3.2.2.7.1 

    Changing the Monitoring Period in 
    Synchronous Mode .................................... 28 

    3.2.2.7.2 
    Changing the Monitoring Period in 
    Asynchronous Mode .................................. 29 

    3.2.2.8 
    Shared Memory ............................................................. 29 
    3.2.2.9 
    Limitations of the State Combiner Implementation ......... 29 
    3.3 
    Memory Sections ............................................................................................. 30 
    3.3.1 

    Code and Constants ........................................................................ 30 
    3.3.2 
    Module Variables ............................................................................. 30 
    3.3.2.1 

    Module Variables with MICROSAR Os Gen6 / 
    AUTOSAR Os version 4.0 .............................................. 30 

    3.3.2.2 
    Module Variables with MICROSAR Os Gen7 / 
    AUTOSAR Os version 4.2 .............................................. 31 

    3.4 
    Error Handling .................................................................................................. 32 
    3.4.1 

    Development Error Reporting ........................................................... 32 
    4 
    Integration ................................................................................................................... 33 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    4.1.1 
    Static Files ....................................................................................... 33 
    4.1.2 
    Dynamic Files .................................................................................. 33 
    5 
    API Description ........................................................................................................... 34 
    5.1 

    Type Definitions ............................................................................................... 34 
    5.2 
    State Combiner Type Definitions ...................................................................... 35 
    5.3 
    Services provided by WdgIf ............................................................................. 38 
    5.3.1 

    WdgIf_SetMode ............................................................................... 38 
    5.3.2 
    WdgIf_SetTriggerCondition .............................................................. 38 
    5.3.3 
    WdgIf_SetTriggerWindow ................................................................ 39 
    5.3.4 
    WdgIf_GetVersionInfo ...................................................................... 39 
    5.4 
    Services used by WdgIf ................................................................................... 40 
    6 
    Configuration .............................................................................................................. 42 
    6.1 

    Configuration Variants ...................................................................................... 42 
    6.2 
    Integration with MICROSAR / fully AUTOSAR compliant Wdg drivers .............. 42 
    6.3 
    Configuring the State Combiner ....................................................................... 43 
    6.3.1 

    Configuration for Synchronous Mode ............................................... 43 
    6.3.2 
    Configuration for Asynchronous Mode ............................................. 44 
    7 
    Glossary and Abbreviations ...................................................................................... 45 
    7.1 

    Glossary .......................................................................................................... 45 
    7.2 
    Abbreviations ................................................................................................... 46 
    8 
    Contact ........................................................................................................................ 47 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.x Architecture Overview ......................................................... 8 
    Figure 2-2 
    Watchdog Manager Stack in an AUTOSAR environment ............................ 9 
    Figure 2-3 
    Layered structure of the Watchdog Interface ............................................ 10 
    Figure 3-1 
    WdgM Stack on a multi-core system using WdgIf to address 
    independent watchdogs for each core ...................................................... 13 

    Figure 3-2 
    WdgM Stack on a multi-core system using the State Combiner for a 
    combined core reaction ............................................................................ 14 

    Figure 3-3 
    Master and slave run synchronously with a sufficient offset to avoid jitter 
    effects (example 1) ................................................................................... 18 

    Figure 3-4 
    Master and slave run synchronously with a sufficient offset (example 2)... 18 
    Figure 3-5 
    Master and slave run synchronously with a sufficient offset (example 3)... 19 
    Figure 3-6 
    Master and slave drifting apart although they have the same configured 
    period (Pm = Ps) ........................................................................................ 20 

    Figure 3-7 
    Master and slave do not drift from each other but jitter effects occur......... 21 
    Figure 3-8 
    Slave skipping one trigger is not necessarily detected by master in 
    asynchronous mode ................................................................................. 21 

    Figure 3-9 
    Worst case delay of the State Combiner ................................................... 23 
    Figure 3-10 
    Worst case evaluation Case 2 .................................................................. 24 
    Figure 3-11 
    Worst case evaluation Case 4 .................................................................. 26 
    Figure 3-12 
    Start-up phase, master starts before slave ............................................... 28 
    Figure 3-13 
    Start-up phase, master starts before slave ............................................... 29 
    Tables 
    Table 1-1 
    Component history...................................................................................... 6 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 11 
    Table 3-2  
    Not supported AUTOSAR standard conform features ............................... 11 
    Table 3-3  
    Features provided beyond the AUTOSAR standard .................................. 12 
    Table 3-4  
    Combinations for worst case evaluation .................................................... 23 
    Table 3-5  
    Code and Constants ................................................................................. 30 
    Table 3-6  
    WdgIf constants ........................................................................................ 30 
    Table 3-7  
    Module variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 . 30 
    Table 3-8  
    Module variables MICROSAR Os Gen7 / AUTOSAR Os version 4.2 ........ 31 
    Table 3-9  
    Service IDs ............................................................................................... 32 
    Table 3-10  
    Errors reported to DET ............................................................................. 32 
    Table 4-1  
    Static files ................................................................................................. 33 
    Table 4-2  
    Generated files ......................................................................................... 33 
    Table 5-1  
    WdgIf Type Definitions .............................................................................. 35 
    Table 5-2  
    State Combiner Type Definitions ............................................................... 37 
    Table 5-3  
    WdgIf_SetMode ........................................................................................ 38 
    Table 5-4  
    WdgIf_SetTriggerCondition ....................................................................... 39 
    Table 5-5  
    WdgIf_SetTriggerWindow ......................................................................... 39 
    Table 5-6  
    WdgIf_GetVersionInfo ............................................................................... 40 
    Table 5-7  
    Services used by the WdgIf ...................................................................... 41 
    Table 7-1  
    Glossary ................................................................................................... 45 
    Table 7-2  
    Abbreviations ............................................................................................ 46 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
    Migration of the WdgIf to Vector Informatik GmbH 
    2.00 
    Introduction of native CFG5 generator 
    2.01 
    Removing manual state combine mode 
    Table 1-1 
    Component history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module WdgIf as specified in [1]. 
     
    Supported AUTOSAR Release*: 
    4.0.1 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    WDGIF_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    WDGIF_MODULE_ID  
    43 decimal 
    (according to ref. [3]) 
    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
    This user manual describes the Watchdog Interface (WdgIf), which is part of the Watchdog 
    Manager  Stack,  which  is  part  of  the AUTOSAR  ECU Abstraction  Layer. The main WdgIf 
    functionality  consists  of  linking  one  or  more  Watchdog  drivers  (Wdg)  to  the  overlying 
    Watchdog Manager module (WdgM). 
    For  multi-core  systems,  the  WdgIf  additionally  offers  the  State  Combiner  functionality  to 
    allow several WdgM instances, each running on a separate processor core, to share and 
    trigger  a  single  watchdog  device.  The  WdgIf  was  developed  according  to  AUTOSAR 
    version 4.0.1 [1].  
    The  WdgIf  is  compatible  with  this  AUTOSAR  version,  but  not  fully  compliant.  For  the 
    deviations, see section Deviations. In any case, if the WdgIf is used with AUTOSAR 4.0.1 
    or another version, all requirements described in the Safety Manual [2] must be fulfilled. 
    This user manual does not cover safety-related topics. For safety-related requirements for 
    the integration and the application of the WdgIf, refer to the Safety Manual [2]. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    2.1 
    Architecture Overview 
    The following figure shows where the WdgIf is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.x Architecture Overview  
    The WdgM Stack consists of the hardware-independent modules Watchdog Manager and 
    Watchdog Interface (blue rectangle) and a hardware-dependent module Watchdog driver. 
    Figure 2-2 shows the WdgM Stack with its modules in an AUTOSAR environment. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 




    Technical Reference MICROSAR WDGIF 
     
    Figure 2-2  Watchdog Manager Stack in an AUTOSAR environment 
    The  WdgM  controls,  through  the  WdgIf  and  the  Wdg,  the  hardware-implemented 
    watchdogs, which can be one or more internal or external watchdog devices. 
     
     
    Note 
    A watchdog device requires a hardware-dependent Wdg driver. 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    2.2 
    Basic Functionality of the WdgIf 
    The WdgIf is a platform-independent software module and provides an interface to one or 
    more  Watchdog  driver  modules  for  the  WdgM.  The  WdgM  addresses  the  watchdog 
    devices  through  the  WdgIf  using  a  device  index  parameter  (DeviceIndex).  The 
    DeviceIndex is used by the WdgIf to refer to a specific Wdg driver instance. 
    Figure 2-3 shows the layered structure of the Wdg Stack. The attached watchdog device 
    can be internal or external. 
     
     
    Figure 2-3  Layered structure of the Watchdog Interface 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    10 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    3  Functional Description 
    3.1 
    Features 
    The features listed in the following tables cover the complete functionality specified for the 
    WdgIf. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Not supported AUTOSAR standard conform features 
    Vector Informatik provides further WdgIf functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-3   Features provided beyond the AUTOSAR standard 
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    The WdgIf provides uniform access to services of the underlying watchdog drivers like mode 
    switching and setting trigger conditions. 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations 
    The following features specified in [1] are not supported: 
    Not Supported AUTOSAR Standard Conform Features 
    No deviations. 
    Table 3-2   Not supported AUTOSAR standard conform features 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    11 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    The  WdgIf  module  checks  for  development  errors  independently  from  the  configuration 
    parameter WdgIfDevErrorDetect but reports to the AUTOSAR module Development Error 
    Tracer (DET) only if WdgIfDevErrorDetect is set to true. 
    In case of multi-core systems, the WdgIf supports the State Combiner functionality which is not 
    specified by AUTOSAR. 
    If the State Combiner functionality is used, then the WdgIf calls the functions GetSpinlock() 

    ReleaseSpinlock() 
    (if 
    configuration 
    parameter 
    WdgIfStateCombinerUseOsSpinlock 
    is 
    true) 
    or 
    the 
    functions 
    Appl_GetSpinlock()  /  Appl_ReleaseSpinlock()  (if  configuration  parameter 
    WdgIfStateCombinerUseOsSpinlock is false) in order to use spinlock functionality for 
    inter-core synchronization. For details, see section Services used by WdgIf. 
    Table 3-3   Features provided beyond the AUTOSAR standard 
    3.2 
    Operation in Multi-Core Systems 
    The WdgIf can also be integrated into multi-core systems. During the configuration of the 
    WdgIf on  several  cores,  it  is  important  to  consider  how  to  connect  each WdgM  instance 
    running on a processor core to the correct Wdg driver module or modules via the WdgIf. 
    There are two possible approaches for configuring the WdgIf for a multi-core system: 
    >  Independent watchdog devices  
    Configuring the WdgIf module so, that the WdgM instances running on different 
    processor cores trigger its own watchdog device independently from the other cores. 
    An example of such a system is a multi-core processor which has one internal 
    watchdog device for each core. A fault on a certain core results in a watchdog reaction 
    from the core's own watchdog device. Depending on its setup this might be a 
    processor reset or only a single core reset. 
    >  WdgIf with a State Combiner  
    Configuring the WdgIf module with a State Combiner so that the WdgM instances 
    running on different processor cores can share one watchdog device and use it to 
    cause a reset in case of an irreparable error. The watchdog device will be triggered 
    only if no WdgM instance reports any error.  
    An example is a multi-core processor with an external watchdog connected to it. A 
    fault on any processor core results in a watchdog reset. 
     
     
    Note 
    A combination of the two approaches above is also possible. 
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    12 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    3.2.1 
    Independent Watchdog Devices 
    The WdgIf  is  configured  to enable each Watchdog  stack  instance running  on  a  separate 
    processor core to trigger its own watchdog device independently from the Watchdog stack 
    instances  running  on  the  other  cores. Whether  the  watchdog  device causes a processor 
    reset  or  a  core  reset  depends  on  the  device's  configuration.  In  this  case,  the  Watchdog 
    stack  instance  running  on  each  processor  core  is  acting  as  if  it  is  running  on  an 
    independent single-core system. Configuring this scenario is also very similar to the single-
    core configuration. However, it needs to be ensured that the watchdog device for a certain 
    core is connected to the correct WdgM instance. Furthermore, the configuration parameter 
    WdgIfUseStateCombiner must be set to false. 
     deployment WdgM stack on multi-core - independent core reaction
    «device»
    Microcontroller - independent core reaction
    independet core reaction
    «device»
    «device»
    core 0
    core 1
    WdgM
    WdgM
    WdgIf
    WdgIf
    Wdg
    Wdg
    «device»
    «device»
    int Wdg 0
    int Wdg 1
     
    Figure 3-1  WdgM Stack on a multi-core system using WdgIf to address independent watchdogs for each core 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    13 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    3.2.2 
    WdgIf with a State Combiner 
    The State Combiner is a platform-independent piece of software that is implemented as 
    an optional feature of the WdgIf module. Its purpose is to enable WdgM instances running 
    on different processor cores to share one watchdog device. The State Combiner acts as 
    following: 
    >  If  an  error  during  the  WdgM  supervision  is  detected  on  a  core,  then  the  WdgM 
    instance  on  this  core  requests  a  reset,  which  the  State  Combiner  retransmits  to  the 
    watchdog device. 
    >  Furthermore, the State Combiner monitors the trigger pattern of the WdgM instances 
    in order to detect runtime errors such as trigger omissions (e.g. one of the processor 
    cores stopped working) or too frequent triggers (e.g. due to scheduling problems, an 
    WdgM instance is invoked too frequently). 
    >  The State Combiner triggers the watchdog device only if none of the WdgM instances 
    requests a reset and the trigger patterns of all WdgM instances are correct. 
    >  The  State  Combiner  feature  can  be  enabled  by  setting  the  configuration  parameter 
    WdgIfUseStateCombiner to true. 
     deployment WdgM stack on multi-core - combined core reaction
    «device»
    Microcontroller - combined core reaction
    combined core reaction
    «device»
    «device»
    «device»
    «device»
    core 0
    core 1
    core 2
    core 3
    WdgM
    WdgM
    WdgM
    WdgM
    WdgIf
    WdgIf
    WdgIf
    WdgIf
    State Combiner 
    State Combiner 
    State Combiner 
    (master)
    (slav e)
    (slav e)
    write core
    read state of
    write core 1
    2 state
    slave cores
    state
    Wdg ext.
    Wdg int.
    «device»
    Shared Memory
    «device»
    Wdg int.
    «device»
    Wdg ext.
     
    Figure 3-2  WdgM Stack on a multi-core system using the State Combiner for a combined core reaction 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    14 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    If enabled, the State Combiner instance on one processor core is configured to work in 
    master mode, which triggers the actual watchdog device, while State Combiner instances 
    on the other processor cores are configured to work in slave mode. In the following the 
    State Combiner instance configured to work in master mode is referred to as master and 
    the State Combiner instance(s) configured to work in slave mode as slave(s). The slaves 
    do  not  trigger  a  watchdog  device  but  only  communicate  with  the  master  via  shared 
    memory. The master triggers the actual watchdog device if the global status of the WdgM 
    instances on all cores is other than STOPPED. Therefore, as soon as the WdgM instance 
    on at least one core has reached the global status STOPPED (i.e. an irreparable error was 
    detected), the watchdog device is – depending on the configuration – reset or not triggered 
    anymore. 
     
     
    Note 
    The State Combiner is not visible to the upper layer, i.e. the WdgM instances on each 
      processor core. 
     
     
    The trigger process in case of a State Combiner is as follows: 
    >  The  WdgM  instance  on  a  processor  core  sends  a  trigger  request  to  its  underlying 
    WdgIf  instance.  No  watchdog  device  is  triggered,  but  the  corresponding  State 
    Combiner instance is invoked - either the master or a slave. 
    >  The slave does not trigger but rather signals to the master the trigger request from the 
    upper layer. 
    >  If the slave detects an error, it will send a reset request to the State Combiner.  
    >  Based on the trigger pattern of the slave (the sequence of the slave's trigger request 
    signals  over  a  certain  period  of  time),  the  master  evaluates  whether  the  slave  is 
    running correctly. 
    >  The master triggers the actual watchdog device if: 
    >  the master's overlying WdgM instance requested a valid watchdog trigger, 
    >  no  slave  requested  a  reset  (no  error  reported  by  the  slave's  overlying  WdgM 
    instance), and  
    >  the trigger pattern of each slave is correct (based on the configuration). 
     
    The  following  must  be  configured  so  that  the  State  Combiner  is  used  by  the  overlying 
    WdgM instances to trigger a single watchdog device for all processor cores: 
    >  The WdgM instance running on the processor core that controls the physical watchdog 
    device must be configured to send a trigger request to the master. (In the WdgIf’s ECU 
    configuration,  the  WdgIfDeviceRef  parameter  must  be  linked  to  a 
    WdgIfStateCombinerMaster  container  of  WdgIf  instead  of  a  WdgIfDevice 
    container.) The trigger  condition value  of  the WdgM  needs to be set  up according to 
    the actual watchdog device. 
    >  The WdgM instances running on the other processor cores must be configured to send 
    a trigger request to a slave. (In the WdgIf’s ECU configuration, the WdgIfDeviceRef 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    15 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    parameter  must  be  linked  to  a  WdgIfStateCombinerSlave  container  of  WdgIf 
    instead of a WdgIfDevice container.)  
     
     
    Note 
    The  trigger  condition  value  for  a  slave  can  be  configured  arbitrary.  The  only 
      requirement is not configuring the value with 0. 
     
     
    >  The  master  must  be  configured  to  trigger  the  watchdog  device.  (In  the WdgIf’s  ECU 
    configuration  the  parameter  WdgIfStateCombinerMasterWdgRef  must  reference 
    the watchdog device’s driver.) The trigger condition value with which the driver will be 
    triggered is given by the overlying WdgM and retransmitted to the watchdog device by 
    the master. 
    >  Following this configuration, the master checks the trigger requests of each slave and 
    triggers  the  watchdog  device  only  if  each  slave  triggers  correctly,  no  slave  explicitly 
    requested a reset, and the master was triggered correctly. 
    >  A reset occurs in the following cases: 
    >  The WdgM instance triggering the master requests  a reset  – the reset  request  is 
    immediately retransmitted to the watchdog device. 
    >  The  WdgM  instance  triggering  a  slave  requests  a  reset  –  the  reset  request  is 
    retransmitted to the watchdog device with the next invocation of the master. 
    >  The  master  detects  a  shared  memory  corruption  –  it  checks  the  shared  memory 
    each time it is invoked – then the master immediately sends a reset request to the 
    watchdog device. 
    3.2.2.1 
    Checking the Slave Trigger Pattern 
    Checking the trigger pattern of the slaves by the master is based on slave trigger counters 
    which  are  stored  in  shared  memory.  Each  counter  contains  the  number  of  triggers  for  a 
    specific slave. The slave increases its trigger counter each time it is being invoked with a 
    valid trigger request by its overlying WdgM instance. The master checks the slave trigger 
    counter  once  per  master  period  or  once  per  a  multiple  of  the  master  period.  This 
    multiplicity  factor  is  called  reference  cycle  and  the  duration of  time  in  which  the master 
    checks a slave once is called check interval. E.g., if the master checks a slave each time 
    the master is invoked, then the reference cycle is 1 and the check interval is one master 
    period;  if  the  master  checks  the  slave  every  other  time  the  master  is  invoked,  then  the 
    reference cycle is 2 and the check interval is 2 times the master period. 
    The master expects that the slave increases its trigger counter in every check interval by a 
    certain  number.  This  number  depends  on  the  master  period,  the  slave  period  and  their 
    ratio  to  one  another.  The  increase  of  the  slave  trigger  counter  must  be  at  least  1. 
    Otherwise the error case of a total slave outage cannot be detected. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    16 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
     
     
    Note 
    The reference cycle as well as the number of expected slave triggers might be different 
      for each slave. 
     
     
     
    3.2.2.2 
    Operation of the State Combiner 
    There  are  two  possible  operation  modes  –  synchronous  or  asynchronous  mode.  In  the 
    synchronous  mode  a  check  interval  exists  such  that  the  number  of  slave  invocations  in 
    one check interval is always constant. Therefore the master can be configured to expect a 
    constant number of slave trigger counter increments. In the asynchronous mode no such 
    constant check interval exists and the number of slave invocations in one check interval is 
    variable.  Therefore  the  master  can  only  expect  that  the  number  of  slave  counter 
    increments lies within a configured interval. 
    3.2.2.2.1 
    Synchronous Mode 
    Synchronous mode is given if a check interval can be chosen in which the number of slave 
    triggers is always constant. This is the case if both following conditions apply: 
    >  No  drifting.  The  master  and  slave  invocations  do  not  drift  apart.  The  ratio  between 
    master and slave period remains constant. 
    >  Sufficient  invocation  offset.  The  slave  invocation  is  done  with  a  sufficient  offset  from 
    the master invocation so that their invocation order is not affected by jitter (jitter effects 
    are avoided).  
    The jitter effects can be avoided if the offset between master and slave invocations is 
    greater than the sum of the maximum possible jitter of the master invocation (jm) and 
    the maximum possible jitter of the slave invocation (js). Note that these are the jitters of 
    the respective WdgM main functions invoking master and slave. Two offsets need to 
    be considered: 
    >  The offset from the master invocation in which the master checks the slave to the 
    next slave invocation must be greater than jm + js. 
    >  The  offset  from  the  slave  invocation  to  the  next  master  invocation  in  which  the 
    master checks this slave must be greater than jm + js as well. 
    The benefit of the synchronous mode is the shorter interval in which the master can check 
    the number of slave triggers (leading to a shorter reaction time) as well as the guaranteed 
    detection  of  all  slave  trigger  errors.  Furthermore,  if  the  jitter  becomes  bigger  than  the 
    configured offset, this will be detected as an error. 
    The  drawback  of  the  synchronous  mode  is  that  if  the  timing  of  the  system  must  be 
    changed during runtime (e.g. low power mode), then the ratio between master and slave 
    invocation period must remain the same. 
    Following scenarios illustrate typical examples of the synchronous mode. 
    Figure  3-3  depicts  an  example  of  a  scenario  where  master  and  slave  have  the  same 
    period (Pm = Ps). The master checks the slave once in each master period (reference cycle 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    17 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGIF 
    is  1)  and  it  expects  exactly  one  slave  triggering.  The  offset  is  sufficient  to  avoid  jitter 
    effects. 
     
    Figure 3-3  Master and slave run synchronously with a sufficient offset to avoid jitter effects (example 1) 
    Figure 3-4 shows an example of a scenario where the slave's period is a multiple of the 
    master's  period  (in  the  example  Ps  =  2*Pm).  As  a  consequence,  the  number  of  slave 
    triggers  within  the  check  interval  (reference  cycle  is  2)  is  always  constant  –  one  in  this 
    example. The offset is sufficient to avoid jitter effects. 
     
     
    Note 
    When  master  and  slave  periods  are  referred  in  this  text,  the  configured  periods  are 
      meant. Due to jitter, the actual periods might, of course, be slightly different. However, it 
    is important that the conditions for synchronous mode apply. 
     
     
     
     
    Figure 3-4  Master and slave run synchronously with a sufficient offset (example 2) 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    18 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    Figure 3-5 shows an example of a scenario where the master's period is a multiple of the 
    slave's  period  (in  the  example  Pm  =  2*Ps). Again,  the  number  of  slave  triggers  within  a 
    master's check interval (reference cycle is 1) is always constant – two in this example. 
     
     
    Figure 3-5  Master and slave run synchronously with a sufficient offset (example 3) 
    The Synchronous Mode is strongly recommended, because it results in the most accurate 
    slave  monitoring  that  can  be  reached  with  a  software  State  Combiner  as  well  as  in  the 
    shortest  worst  case  reaction  time  in  case  of  slave  trigger  errors.  Furthermore,  it  detects 
    every kind of trigger error because the exact number of expected triggers is known. 
    3.2.2.2.2 
    Asynchronous Mode 
    Asynchronous  mode  is  given  if  the  synchronous  mode  cannot  be  applied  –  in 
    asynchronous  mode  no  check  interval  can  be  chosen  such  that  the  number  of  slave 
    triggers is constant in each check interval. This is the case if at least one of the following 
    applies: 
    >  Drifting. Master and Slave invocations drift from one another. 
    >  Insufficient  invocation  offset  resulting  in  jitter  effects.  The  offset  between  master  and 
    slave  invocations  is  such  that  the  jitter  effects  result  in  a  variable  invocation  pattern 
    (number of slave triggers changes between check intervals). 
    As a consequence, the master can only check whether the actual number of slave triggers 
    is within a certain interval. 
    The benefit of the asynchronous mode is that if the timing of the system must be changed 
    during runtime, then the ratio between master and slave invocation period need not remain 
    the same. In this case, the State Combiner is usually configured to compute the expected 
    number of slave triggers dynamically. 
    The drawback of the asynchronous mode is the necessity of introducing a tolerance when 
    checking  the  slaves  –  the  number  of  expected  slave  triggers  lies  within  an  interval. This 
    results in a greater reference cycle and in potentially overlooking slave trigger errors. 
    Simple  scenarios  for  each  of  the  two  reasons  that  lead  to  asynchronous  mode  are 
    discussed below. After that,  one  examples  illustrating the drawback of the asynchronous 
    mode – the potential overlooking of trigger errors – are presented. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    19 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGIF 
    Scenario 1: Asynchronous Mode due to Drifting 
    Master and slave invocations drift from each other. 
     
    Figure 3-6  Master and slave drifting apart although they have the same configured period (Pm = Ps) 
    In this example, the master period and the slave period have the same configured length 
    but their clocks drift with some rate Δ (positive or negative). The master must check once 
    in  n  master  periods  whether  the  number  of  slave  triggers  is  within  an  interval  [tr1; 
    tr2]. 
     
     
    Note 
    The exact reference cycle n and the interval of the number of expected slave triggers 
      depend on the master and slave periods. With increasing jitter the reference cycle also 
    increases. 
     
     
    Scenario 2: Asynchronous Mode due to Insufficient Offset (Jitter) 
    Master  and  slave  do  not  drift  apart.  But  they  are  invoked  at  the  same  points  of  time  or 
    close enough to one another so that the jitter affects their sequence. This is illustrated in 
    Figure 3-7. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    20 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGIF 
    Figure 3-7  Master and slave do not drift from each other but jitter effects occur 
    In this case, the master and slave are running synchronously, but due to the jitter and the 
    insufficient  offset  between  master  and  slave  invocations  the  trigger  pattern  is 
    unpredictable. For the master and a slave running with the same period the same values 
    are derived as for the asynchronous scenario with drifting above – the master checks the 
    slave  once  in  every  second  master  period  (reference  cycle  is  2)  and  the  number  of 
    expected slave triggers lies in the interval between 1 and 3 inclusively.  
    Example of Overlooking Trigger Errors: Slave Trigger Omissions 
    Figure 3-8 shows an example of how a trigger omission can be overlooked by the master. 
    Let the expected slave trigger counter interval be [1; 2]. During the first check interval, 
    the  slave  is  invoked  correctly  (as  expected  by  the  master).  During  the  second  check 
    interval, the slave should have triggered two times, but one trigger is omitted – the master 
    cannot detect this trigger error, since the trigger counter interval is not violated. The third 
    check interval shows zero triggers and this is out of the interval, hence the trigger error is 
    detected. 
     
     
    Note 
    In this example, a minimum of two consecutive slave invocation omissions will always 
      be detected by the master. 
     
     
     
     
    Figure 3-8  Slave skipping one trigger is not necessarily detected by master in asynchronous mode 
    Note 
    Due  to  the  drawbacks,  using  the  asynchronous  mode  should  be  avoided  and,  if 
      possible, the synchronous mode should be used! 
     
     
    3.2.2.3 
    Worst Case Delay 
    The delay of the State Combiner is defined as the duration from the point in time when a 
    failure  occurs  on  the  slave  and  the  point  in  time  when  this  failure  is  escalated  to  the 
    watchdog device by the master. The failure on the slave can be a failure detected by the 
    WdgM running on the slave’s core or a failure which results in erroneous triggering of the 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    21 
    based on template version 5.12.0 






    Technical Reference MICROSAR WDGIF 
    slave. Here, a failure on the slave is a slave trigger outage, i.e. discontinuation of the slave 
    triggers, and the worst case delay refers to this slave trigger error only. 
     
     
    Note 
    Drifting  of  the  slave  triggering  might  lead  to  a  longer  detection  time  (in  both, 
      synchronous  and  asynchronous  mode)  or  might  be  overlooked  by  the  master  (in 
    asynchronous mode only). Occasional slave trigger omissions might be overlooked by 
    the master only in asynchronous mode, but they are detected in synchronous mode. 
     
     
    Note 
    Reset  requests  from  the  slave  are  detected  by  the  master  at  the  end  of  the  current 
      master  period (and  not at  the  end  of  the current  check  interval)  in  both, synchronous 
    and asynchronous mode. 
     
     
     
    The upper limit for the worst case delay of the State Combiner (WCD) in synchronous 
    mode is the double maximum duration of the check interval: WCD < 2*n*Tm, where Tm is 
    the WdgM  configuration  parameter WdgMTriggerWindowCondition  set  on the master 
    core and n is the reference cycle with which the master checks the slave.  
     
     
    Note 
    Tm  is  the  worst  case  actual  period  of  invocation  of  the  master’s 
      WdgM_MainFunction(), and it is limited by the watchdog device. Tm can also 
    be  expressed  as  the  configured  master  invocation  period  plus  the  maximum 
    possible jitter of this invocation: Tm = Pm + jm. 
     
     
    The  worst  case  scenario  happens  under  the  following  conditions  (illustrated  in  Figure 
    3-9).  
    The  slave  is  triggered  shortly  after  the  master  has  successfully  checked  the  slave 
    triggers. However, the slave fails right afterwards and is not being triggered anymore, it is 
    not  able  to  directly  inform  the  master  of  a  failure  either. At  the  end  of  the  current  check 
    interval the master still evaluates the slave as OK if the number of slave triggers is within 
    the expected interval  despite the trigger error. Yet, the next  time the master core checks 
    the slave core, it detects that the slave has stopped triggering (at the end of the third check 
    interval shown in the figure). 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    22 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    Figure 3-9  Worst case delay of the State Combiner 
    Note 
    Slave trigger errors that do not lead to violation of the expected number of slave 
      triggers interval cannot be detected by the master! 
     
     
    3.2.2.4  Worst Case Evaluations 
    The  WdgIf  Fault  Reaction  Time  does  not  depend  on  the  monitoring  feature,  but  on  the 
    following three aspects: 
    >  whether a State Combiner is used or not, 
    >  whether an immediate reset or discontinuing of triggers is configured, 
    >  whether the fault is detected in the master application SW or a slave application SW (if 
    a State Combiner is used). 
    There exist 6 different combinations of the three aspects listed above: 
    Case   State Combiner used   Escalation kind  
    Fault occurs in  
    1  
    Yes  
    Immediate Reset  
    Master SW application 
    2  
    Yes  
    Immediate Reset  
    Slave SW application 
    3  
    Yes  
    Discontinuing of Triggers  Master SW application 
    4  
    Yes  
    Discontinuing of Triggers  Slave SW application 
    5  
    No  
    Immediate Reset  
    n/a 
    6  
    No  
    Discontinuing of Triggers  n/a  
    Table 3-4   Combinations for worst case evaluation 
    The WdgIf Fault Reaction Time of every combination is discussed in the following: 
     
    Case 1 - State Combiner, immediate reset, fault in master,  Case 5 - No State Combiner, 
    immediate reset: 
    The WdgIf  escalates  the  reset  request  immediately  to  the Wdg  device. The WdgIf  Fault 
    Reaction  Time  for  case  1  and  case  5  is  always  0  (in  any  case,  there  is  no  more  cycle 
    consumed - not counting the code execution). 
    Case 2 - State Combiner, immediate reset, fault in slave: 
    >  The  slave  writes  an  immediate  reset  request  to  the  shared  memory  of  the  State 
    Combiner. 
    >  The master reads the request at the next call of WdgM_MainFunction() and initiates 
    the immediate reset. 
    The worst case happens 
    >  when the master calls its WdgM_MainFunction(), 
    >  the slave writes the reset request immediately afterwards and 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    23 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    >  the  master  calls  its  WdgM_MainFunction()  with  max.  possible  delay 
    (WdgMTriggerConditionValue(master)). 
    >  As 
    Figure 
    3-10 
    shows, 
    the 
    WdgIf 
    Fault 
    Reaction 
    Time 
    is 
    WdgMTriggerConditionValue(master). 
    Slave writes
    reset request
    Master
    re
    r
    t
    initiates reset
    e
    et
    as
    va
    as
    M
    lS
    M
    iont ion
    ion
    c
    tc
    t
    n
    n
    c
    Master
    n
    Fu
    Fu
    Fu
    ain
    ain
    ain
    _M
    _M
    _M
    gM
    gM
    d
    d
    gM
    d
    W
    W
    W
    Slave
    WdgMTriggerConditionValue(master)
    WdgM Fault Reaction Time
    WdgIf Fault Reaction Time
     
    Figure 3-10  Worst case evaluation Case 2 
    Case  3  -  State  Combiner,  discontinuing  of  triggers,  fault  in  master,  Case  6  -  No  State 
    Combiner, discontinuing of triggers:  
    There is no action or delay on the WdgIf level. The WdgIf Fault Reaction Time for case 3 
    and case 6 is always 0 (in any case, there is no more cycle consumed - not counting the 
    code execution). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    24 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    Case 4 - State Combiner, discontinuing of triggers, fault in slave: 
    >  The slave discontinues triggering. 
    >  With  every  call  of  WdgM_MainFunction()  on  master  side,  the  master  checks  how 
    often the slave has triggered since the previous check. 
    >  As  soon  as  the  number  of  slave  triggers  is  outside  the  expected  range,  the  master 
    initiates  an  immediate  reset.  (This  is  not  necessarily  with  the  next  call  of 
    WdgM_MainFunction() on master side.) 
    The worst case happens when 
    >  the master checks the number of triggers on slave side since the previous check, 
    >  the  slave  sends  an  allowed  number  of  triggers  (with  respect  to  the  next  check  on 
    master side) immediately afterwards, 
    >  the WdgM Fault Reaction Time ends and the slave discontinues triggering immediately 
    afterwards. 
     
     
    Note 
    Then the WdgIf Fault Reaction Time is (almost): 
              
             2 * WdgIfStateCombinerReferenceCycle * WdgMTriggerConditionValueMaster, 
     
    where WdgIfStateCombinerReferenceCycle is the number of 
    WdgMSupervisionCycle on master side between two checks of slave triggers. 
     
     
    Figure 3-11 demonstrates this: 
    >  WdgIfStateCombinerReferenceCycle is 2, 
    >  the  slave  sends  an  allowed  number  of  triggers  for  the  1st  check  interval  (i.e.  one 
    trigger) before the end of the WdgIf Fault Reaction Time,  
    >  the  master  checks  the  slave  triggers  every  2nd  call  of  WdgM_MainFunction  (every 
    2nd WdgMTriggerConditionValue (TM)), 
    >  the discontinuing of slave triggers is detected at the end of the 2nd check interval. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    25 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Master checks
    Master checks
    Master checks
    slave triggers
    slave triggers
    slave triggers
    (ok)
    and initiates
    re
    r
    r
    t
    et
    e
    Trigger
    t
    reset
    as
    as
    as
    M
    ev
    discontinuation
    M
    a
    M
    l
    ion
    S
    t
    iont
    ion
    c
    t
    c
    n
    iont
    c
    n
    Master
    c
    n
    Fu
    n
    Fu
    Fu
    ain
    Fu
    re
    r
    t
    ain
    e
    s
    ts
    ain
    ain
    a
    a
    _M
    n M
    n M
    o
    _M
    i
    oi
    _M
    tc
    tc
    gM
    _M
    n
    n
    uF
    gM
    d
    uF
    gM
    gM
    ni
    d
    ni
    d
    W
    d
    a
    W
    a
    _M
    _M
    W
    W
    M
    M
    Slave
    g
    g
    d
    d
    W
    W
    TM
    TM
    TM
    TM
    1st Check Interval
    2nd Check Interval
    WdgM Fault Reaction Time
    WdgIf Fault Reaction Time
     
    Figure 3-11  Worst case evaluation Case 4 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    26 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    3.2.2.5 
    Optimal Timing 
    The  optimal  timing  results  in  minimal  worst  case  delay.  It  can  be  reached  when  the 
    reference  cycle  is  minimal  –  which  is  1.  This  applies  for  both,  synchronous  and 
    asynchronous mode. 
    Following  must  apply  so  that  the  optimal  reference  cycle  of  1  can  be  reached  in 
    synchronous mode. The period of the WdgM main function invoking the master (Pm) is a 
    multiple of the period of the WdgM main function invoking the slave (Ps). If Pm = n * Ps, 
    where n = 1, 2, 3,…, then the master can check the slave in each master period. 
    >  Example (synchronous mode): 
    >  Master: Pm = 20ms 
    >  Slave: Ps = 10ms 
    Within one cycle of the master exactly 2 triggers of the slave are expected.  
    The worst case delay WCD to a failure in the slave is 40 ms. 
    The  following  must  apply  so  that  the  optimal  reference  cycle  of  1  can  be  reached  in 
    asynchronous mode. The master period must be longer than the slave period 
    Example (asynchronous mode): 
    >  Master: Pm =  21ms  
    >  Slave: Pm 18ms 
    Within n = 1 cycles of the master (at most 21 ms) are 1 to 2 ticks of the slave expected. 
    The WCD for a failure in the slave is 2 * n * Tm = 42 ms. 
     
     
    Note 
    Even with the optimal ratio between periods the drawbacks of the asynchronous mode 
      described in chapter Asynchronous Mode apply. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    27 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGIF 
    3.2.2.6 
    Start-up Phase 
    If  the  slave  starts  together  with  or  after  the  master,  then  the  parameter 
    WdgIfStateCombinerStartUpSyncCycles  shall  be  set  to  some  positive  value  n  so 
    that the master starts evaluating the slave triggering not from the first time the master is 
    invoked after start up, but after the first n master periods. 
     
     
    Note 
    n  must  be  big  enough  so  that  the  master  starts  evaluating  the  slaves  as  soon  as 
      possible after the slaves started; and small enough so that the master does not start to 
    evaluate before the slaves started. 
     
     
    A typical start-up phase setup is illustrated in Figure 3-12: 
     
    Figure 3-12  Start-up phase, master starts before slave 
    The  slave  (running  on  some  processor  core  B)  starts  later  than  the  master  (running  on 
    processor core A). The WdgIfStateCombinerStartUpSyncCycles parameter is set to 
    2 so that the master starts checking the slave after the slave has started. Before the slave 
    starts,  the  master  triggers  the  watchdog  device  only  according  to  the  trigger  requests  of 
    the master’s overlying main function. Note, however, that if a slave’s main function detects 
    a  failure  and  explicitly  requests  a  reset,  then  the  master  reacts  even  during  the  start-up 
    phase and retransmits the reset request to the watchdog device. 
    3.2.2.7 
    Changing the Monitoring Period During Runtime 
    Changing the monitoring period means that either the processor frequency or the period of 
    invocation of master or slave is changed. 
    3.2.2.7.1 
    Changing the Monitoring Period in Synchronous Mode 
    If the monitoring period in a synchronous mode needs to be changed, several things need 
    to be considered. The number of slave triggers within one check interval must remain the 
    same and 
    >  the  change  of  the  monitoring  period  must  be  made  simultaneously  on  master  and 
    slave. 
    It is recommended that such a monitoring period change is not made while any instance of 
    the WdgM Stack is being executed. 
    Figure 3-13 shows an example of monitoring period change in synchronous mode. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    28 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
     
    Figure 3-13  Start-up phase, master starts before slave 
    3.2.2.7.2 
    Changing the Monitoring Period in Asynchronous Mode 
    If the monitoring period in asynchronous mode needs to be changed, several things have 
    to be considered. 
    If  the  State  Combiner  is  configured  in  asynchronous  mode,  then  for  any  change  of  the 
    master period or slave period the following restriction applies: 
    >  After the change the slave must not violate the interval of expected number of triggers. 
    In order to meet the previous restriction following recommendations apply: 
    >  It is recommended that the ratio between master and slave period remains the same. 
    >  It  is  recommended  that  the  monitoring  period  change  is  done  simultaneously  for 
    master and slave. 
    >  It  is  recommended  that  such  a  monitoring  period  change  is  not  made  while  any 
    instance of the WdgM Stack is being executed. 
    3.2.2.8 
    Shared Memory 
    The  State  Combiner  instances  use  shared  memory  to  communicate.  Every  counter 
    increment of every slave is written to this memory area. The master reads out the shared 
    memory  in  order  to  check  the  counter  increments  against  the  expected  counter 
    increments. The slave’s trigger requests increment the respective slave’s trigger counter in 
    shared  memory. A  reset  request  from  the  slave  is  also  stored  in  the  shared  memory  to 
    inform the master. All data in the shared memory is also stored with inverse value in order 
    to ensure the detection of memory corruption. 
    Access to the shared memory is protected against concurrent access. The shared memory 
    is  only  written  by  the  slaves  and  only  read  by  the  master.  This  is  achieved  by  a 
    mutex/semaphore that is configured for this shared memory block. 
    3.2.2.9 
    Limitations of the State Combiner Implementation 
    The State Combiner layer has the following limitations: 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    29 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    >  Only  one  watchdog  device  can  be  connected  to  the  master  and  be  triggered.  Other 
    watchdog devices can, however, be directly connected with any WdgIf instance (ECU 
    description container WdgIfDevice) and not via State Combiner. 
    3.3 
    Memory Sections 
    3.3.1 
    Code and Constants 
    Following memory sections need to be set up for WdgIf's code: 
    Section 
    Description 
    WDGIF_START_SEC_CODE / 
    Set up manually, e.g. in MemMap.h. 
    WDGIF_STOP_SEC_CODE 
    Table 3-5   Code and Constants 
    Following memory sections need to be set up for WdgIf's constants: 
    Section 
    Description 
    WDGIF_START_SEC_CONST_ 
    Set up manually, e.g. in MemMap.h. 
    UNSPECIFIED /  
    WDGIF_STOP_SEC_CONST_ 
    UNSPECIFIED 
    Table 3-6   WdgIf constants 
    3.3.2 
    Module Variables 
    Following  memory  sections  need  to  be  set  up  for  WdgIf’s  module  variables  if  the  State 
    Combiner functionality is used (otherwise the WdgIf uses no global variables): 
    3.3.2.1 
    Module Variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 
    Section 
    Description 
    WDGIF_START_SEC_VAR_8BIT / 
    If the configuration parameter 
    WDGIF_STOP_SEC_VAR_8BIT, 
    WdgIfGlobalMemoryAppTaskRef is set, then these 
     
    sections are renamed according to the configured OS 
    WDGIF_START_SEC_VAR_16BIT /  application (the prefix "WDGIF_" is converted to 
    WDGIF_STOP_SEC_VAR_16BIT 
    "<OSApp>_", where <OSApp> is the name of the OS 
    application) and generated as part of WdgIf_MemMap.h. 
    Otherwise they need to be set up manually, e.g. in 
    MemMap.h. 
    WDGIF_GLOBAL_SHARED_START_S
    These sections are always assigned in the generated file 
    EC_VAR_ 
    WdgIf_MemMap.h to OS sections and renamed to: 
    UNSPECIFIED / 
    WDGIF_GLOBAL_SHARED_STOP_SE
    GlobalShared_START_SEC_VAR_UNSPECIFIED / 
    C_VAR_ 
    GlobalShared_STOP_SEC_VAR_UNSPECIFIED 
    UNSPECIFIED 
    If other assignment is required, then they need to be set 
    up manually, e.g. in MemMap.h. 
    Table 3-7   Module variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    30 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    3.3.2.2 
    Module Variables with MICROSAR Os Gen7 / AUTOSAR Os version 4.2 
    Section 
    Description 
    WDGIF_START_SEC_VAR_8BIT / 
    If the configuration parameter 
    WDGIF_STOP_SEC_VAR_8BIT, 
    WdgIfGlobalMemoryAppTaskRef is set, then these 
     
    sections are renamed according to the configured OS 
    WDGIF_START_SEC_VAR_16BIT /  application (the prefix "WDGIF_START_SEC" is converted 
    WDGIF_STOP_SEC_VAR_16BIT 
    to "OS_START_SEC_<OSApp>” and "WDGIF_STOP_SEC" 
    is converted to "OS_STOP_SEC_<OSApp> ", where 
    <OSApp> is the name of the OS application) and 
    generated as part of WdgIf_MemMap.h. Otherwise they 
    need to be set up manually, e.g. in MemMap.h. 
    WDGIF_GLOBAL_SHARED_START_S
    These sections are always assigned in the generated file 
    EC_VAR_ 
    WdgIf_MemMap.h to OS sections and renamed to: 
    UNSPECIFIED / 
    WDGIF_GLOBAL_SHARED_STOP_SE
    OS_START_SEC_GLOBALSHARED_VAR_UNSPECIFIED 
    C_VAR_ 
    / OS_STOP_SEC_GLOBALSHARED_VAR_UNSPECIFIED 
    UNSPECIFIED 
    If other assignment is required, then they need to be set 
    up manually, e.g. in MemMap.h. 
    Table 3-8   Module variables MICROSAR Os Gen7 / AUTOSAR Os version 4.2 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    31 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    3.4 
    Error Handling 
    3.4.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [1],  if  development  error  reporting  is  enabled  (i.e. 
    pre-compile parameter WdgIf_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported WdgIf ID is 43 (decimal). 
    The  reported  service  IDs  identify  the  services  which  are  described  in  chapter  5.3.  The 
    following table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x01u 
    WdgIf_SetMode 
    0x02u 
    WdgIf_SetTriggerCondition 
    0x03u 
    WdgIf_GetVersionInfo 
    0x04u 
    WdgIf_SetTriggerWindow 
    Table 3-9   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x01u 
    API service called with wrong device index parameter 
    0x02u 
    API service called with NULL_PTR as parameter 
    Table 3-10   Errors reported to DET 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    32 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    4  Integration 
    The delivery of the WdgIf contains the files which are described in the chapters 4.1.1 and 
    4.1.2: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    WdgIf.c 
    WdgIf implementation 
    WdgIf.h 
    WdgIf API definitions and function declarations 
    WdgIf_Types.h 
    WdgIf type definitions 
    WdgIf_Cfg.h 
    Type definitions for the configuration data in generated files 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the WdgIf generator. 
    File Name 
    Description 
    WdgIf_Lcfg.c 
    Generated configuration of the component. 
    WdgIf_Lcfg.h 
    Generated header file for the configuration of the component. 
    WdgIf_Cfg_Features.h 
    This file contains all preprocessor options for the component. 
    WdgIf_MemMap.h 
    This file contains memory sections relevant for the State Combiner 
    functionality . 
    Table 4-2   Generated files 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    33 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    5  API Description 
    This section describes the types, functions and interfaces that are imported or provided by 
    the WdgIf software layer. 
    5.1 
    Type Definitions 
    This  section  describes  the  types  of  the  parameters  passed  to  the  API  functions  of  the 
    WdgIf. 
    Type Name 
    C-Type 
    Description 
    Value Range 
    WdgIf_InterfaceFunctions c-struct 
    Provides 
    Std_ReturnType 
    Type 
    pointers to the  (*Wdg_SetMode_AR) 
    platform-
    (WdgIf_ModeType) 
    specific APIs.  void 
    (*Wdg_SetTriggerCondition_AR) 
    (uint16) 
    WdgIf_InterfaceFunctions c-struct 
    Connects 
    const 
    PerWdgDeviceType 
    platform-
    WdgIf_InterfaceFunctions 
    dependent 
    Type* WdgFunctions 
    functions  to  a   
    physical 
    Pointers to the platform-specific watchdog 
    watchdog 
    in  driver functions. 
    order  to  allow 
    several 
    Note: If the State Combiner is enabled, 
    watchdogs  of  the NULL pointer is set instead of a 
    the 
    same  pointer to the driver functions. 
    platform 
    to  uint8 WdgInstance  
    work 
     
    simultaneousl Index of the physical watchdog instance 

    (e.g.,  within this platform. 
    external 
    Note: If the State Combiner is enabled, 
    watchdogs). 
    the parameter WdgInstance is used to 
    address the State Combiner instance 
    instead of a physical watchdog device. 
    Note: This parameter is used only if the 
    State Combiner is used (preprocessor 
    switch WDGIF_USE_STATECOMBINER is 
    STD_ON). 
    WdgIf_InterfaceType 
    c-struct 
    Main 
    WdgIf  const uint8 NumOfWdgs 
    configuration   
    structure 
    Number of watchdogs supported in the 
    WdgIf 
    const 
    WdgIf_InterfaceFunctions 
    PerWdgDeviceType* 
    WdgFunctionsPerDevice 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    34 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Reference to the watchdog driver 
    functions and watchdog device instances 
    const 
    WdgIf_StateCombinerConfigType 
    *WdgIfStateCombinerConfig 
     
    Pointer to State Combiner common 
    specific configuration data. 
    Part of the structure only if State combiner 
    is used (WDGIF_USE_STATECOMBINER is 
    STD_ON). 
    WdgIf_ModeType 
    enum 
    Mode  of  the  WDGIF_OFF_MODE 
    Watchdog 
     
    Watchdog disabled 
    WDGIF_SLOW_MODE 
     
    Long timeout period (slow triggering) 
    WDGIF_FAST_MODE 
     
    Short timeout period (fast triggering) 
    Table 5-1   WdgIf Type Definitions 
    5.2 
    State Combiner Type Definitions 
    This section describes the State Combiner types in case the State Combiner functionality 
    is enabled. 
    Type Name 
    C-Type  Description 
    Value Range 
    WdgIf_StateCombiner c-struct  State Combiner global 
    uint16 SlaveCounterValue 
    SharedMemory 
    shared data. Read by 
     
    the master and written 
    Current slave’s trigger counter 
    by all slave devices. 
    value. 
    Contains the current 
    uint16 
    WindowStart and 
    SlaveCounterValue_INV 
    Timeout values of the 
    slave devices and the 
     
    Counter values. This is  Inverted value of the current 
    an array with an element  Timeout of the slave’s trigger 
    for each slave. 
    request. 
    WdgIf_StateCombiner c-struct  Configuration  structure  uint16 
    SlaveTriggerPatternTy
    for  configuring  State  WdgIfStateCombinerReference
    pe 
    Combiner.  This  is  an  Cycle 
    array with an element for   
    each slave. 
    Defines the reference cycle with 
    which the master will check the 
    slave. 
    uint16 
    WdgIfStateCombinerSlaveIncr
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    35 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    ementsMin 
     
    Minimal number of expected slave 
    triggers in one master check 
    interval. 
    uint16 
    WdgIfStateCombinerSlaveIncr
    ementsMax 
     
    Maximal number of expected slave 
    triggers in one master check 
    interval. 
    WdgIf_StateCombiner c-struct  State 
    Combiner  uint8 
    ConfigType 
    configuration structure 
    WdgIfStateCombinerNumberOfS
    laves 
     
    Number of slaves configured for the 
    State Combiner. 
    WdgIf_StateCombinerSpinlock
    IdType 
    WdgIfStateCombinerSpinlockI

     
    Spinlock ID for synchronizing the 
    access to the shared memory 
    section. 
    uint16 
    WdgIfStateCombinerStartUpSy
    ncCycles 
     
    Number of master cycles during 
    start-up in which the master does 
    not check the slave triggers. 
    const 
    WdgIf_InterfaceFunctionsTyp

    *WdgIfStateCombinerFunction

     
    Pointer to the functions of the 
    watchdog device driver connected to 
    the master. 
    WdgIf_StateCombinerSharedMe
    mory 
    *WdgIfStateCombinerSData 
     
    Pointer to the shared memory. 
     
     
     
    const  
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    36 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    WdgIf_StateCombinerSlaveTri
    ggerPatternType 
    Type  
    **WdgIfStateCombinerSlaveTr
    iggerPattern 
      
    Pointer to an array of data for State 
    Combiner configuration. One 
    element for each slave.  
    Table 5-2   State Combiner Type Definitions 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    37 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    5.3 
    Services provided by WdgIf 
    5.3.1 
    WdgIf_SetMode 
    Prototype 
    Std_ReturnType WdgIf_SetMode ( uint8 DeviceIndex, WdgIf_ModeType Mode) 
    Parameter 
    DeviceIndex 
    Identifies the watchdog instance 
    Mode 
    WDGIF_OFF_MODE: Watchdog disabled 
    WDGIF_SLOW_MODE: Long timeout period (slow triggering) 
    WDGIF_FAST_MODE: Short timeout period (fast triggering) 
    Return code 
    Std_ReturnType 
    E_OK:            API finished successfully 
    E_NOT_OK: An error occurred during execution 
    Functional Description 
    This function maps the SetMode service to the corresponding physical watchdog implementation 
    according to the parameter DeviceIndex. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant.  
    Expected Caller Context 
    >  This service is expected to be called in task context. 
    Table 5-3   WdgIf_SetMode 
    5.3.2 
    WdgIf_SetTriggerCondition 
    Prototype 
    Std_ReturnType WdgIf_SetTriggerCondition ( uint8 DeviceIndex, uint16 Timeout) 
    Parameter 
    DeviceIndex 
    Identifies the watchdog instance 
    Timeout 
    Timeout value in milliseconds for setting the trigger 
    Return code 
    Std_ReturnType 
    E_OK:            API finished successfully 
    E_NOT_OK: An error occurred during execution 
    Functional Description 
    This function maps the SetTriggerCondition service to the corresponding physical watchdog 
    according to the parameter DeviceIndex. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    38 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant.  
    Expected Caller Context 
    >  This service is expected to be called in task context. 
    Table 5-4   WdgIf_SetTriggerCondition 
    5.3.3 
    WdgIf_SetTriggerWindow 
    Prototype 
    Std_ReturnType WdgIf_SetTriggerWindow 
    uint8 DeviceIndex, 
    uint16 WindowStart, 
    uint16 Timeout 

    Parameter 
    DeviceIndex 
    Identifies the watchdog instance 
    WindowStart 
    Minimum time until next watchdog service is allowed in milliseconds 
    Timeout 
    Timeout value in milliseconds for setting the trigger 
    Return code 
    Std_ReturnType 
    E_OK:            API finished successfully 
    E_NOT_OK: An error occurred during execution 
    Functional Description 
    This function maps the SetTriggerWindow service to the corresponding physical watchdog according to 
    the parameter DeviceIndex. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant.  
    Expected Caller Context 
    >  This service is expected to be called in task context. 
    Table 5-5   WdgIf_SetTriggerWindow 
    5.3.4 
    WdgIf_GetVersionInfo 
    Prototype 
    void WdgIf_GetVersionInfo ( Std_VersionInfoType* VersionInfoPtr) 
    Parameter 
    VersionInfoPtr 
    Pointer to where to store the version information of this module 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    39 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    Return code 
    -- 
    -- 
    Functional Description 
    WdgIf_GetVersionInfo returns the version information of this module. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant.  
    >  This function is only available if preprocessor switch WDGIF_VERSION_INFO_API set to 
    STD_ON. 
    Expected Caller Context 
    >  This service is expected to be called in task context. 
    Table 5-6   WdgIf_GetVersionInfo 
    5.4 
    Services used by WdgIf 
    In  Table  5-7  services  provided  by  other  components,  which  are  used  by  the  WdgIf  are 
    listed.  For  details  about  prototype  and  functionality  refer  to  the  documentation  of  the 
    providing component. 
    The  external  functions  must  not  degrade  the  quality  level  of  the  WdgIf.  Hence,  the 
    possibility to use wrapper functions is provided so that either: 
    >  the wrapper function calls the external function (e.g. context switch), or 
    >  the wrapper function provides an alternative implementation of the external function. 
     
     
    Note 
    In  case  of  using  wrapper  functions,  these  must  be  implemented  according  to  the 
      required quality level of the system (e.g. ASIL D). 
    All wrapper functions have the prefix “Appl_”. 
     
     
    Component 
    Function 
    Description 
    OS 
    GetSpinlock() /  
    If the State Combiner functionality is used 
    ReleaseSpinlock() 
    (preprocessor option 
    WDGIF_USE_STATECOMBINER is STD_ON) 
    and if the preprocessor option 
    WDGIF_STATECOMBINER_USE_OS_SPIN_LO
    CK is STD_ON, these OS functions are used in 
    order to synchronize the State Combiner 
    instances running on different processor 
    cores. The declaration is included with Os.h. 
    Note: If these functions do not meet the target 
    quality level of the system, then the wrapper 
    functions Appl_GetSpinlock() and 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    40 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    Appl_ReleaseSpinlock() must be used. 
    Note: These functions use the spinlock ID 
    configured with the configuration parameter 
    WdgIfStateCombinerSpinlockID. This 
    spinlock must be initialized before the WdgIf is 
    invoked for the first time (i.e. the overlying 
    WdgM main function is invoked for the first 
    time after system start-up). 
    Appl_Spinlo
    Appl_GetSpinlock() /  
    If the State Combiner functionality is used 
    ck 
    Appl_ReleaseSpinlock()  (preprocessor option 
    WDGIF_USE_STATECOMBINER is STD_ON) 
    and if the preprocessor option 
    WDGIF_STATECOMBINER_USE_OS_SPIN_LO
    CK is STD_OFF, these user defined functions 
    are used in order to synchronize the State 
    Combiner instances running on different 
    processor cores.  
    The expected declarations are included with 
    Appl_Spinlock.h: Std_ReturnType 
    Appl_GetSpinlock (uint32 ID); 
    Std_ReturnType 
    Appl_ReleaseSpinlock (uint32 int 
    ID); 
    Note: These functions use the spinlock ID 
    configured with configuration parameter 
    WdgIfStateCombinerSpinlockID. This 
    spinlock must be initialized before the WdgIf is 
    invoked for the first time (i.e. the overlying 
    WdgM main function is invoked for the first 
    time after system start-up). 
    Table 5-7   Services used by the WdgIf 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    41 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    6  Configuration 
    This section describes the configuration of the WdgIf. Only link time configuration is used 
    for the WdgIf. 
    6.1 
    Configuration Variants 
    The WdgIf supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the WdgIf parameters depend on the supported configuration 
    variants. For their definitions please see the WdgIf_bswmd.arxml file. 
    The WdgIf can be configured using the following tool:  
    >  DaVinci Configurator 5 (AUTOSAR 4 packages only). Parameters are explained within 
    the tool.  
    The outputs of the configuration and generation process are the configuration source files. 
    6.2 
    Integration with MICROSAR / fully AUTOSAR compliant Wdg drivers 
    In  order  to  integrate  the WdgIf  with  a  MICROSAR  /  fully AUTOSAR-compliant  watchdog 
    driver the WdgIfDevice must be configured as following: 
    Driver-API as specified by AUTOSAR: 
    >  Only the AUTOSAR parameter WdgIfDriverRef has to be configured by referencing 
    either a watchdog driver directly (WdgGeneral) or a WdgIfStateCombinerMaster 
    or 
    WdgIfStateCombinerSlave. 
    All 
    other 
    parameters 
    (WdgIfDeviceIncludeFile, 
    WdgIfDeviceSetMode 
    and 
    WdgIfDeviceSetTriggerCondition)  will  be  updated  automatically.  If  a 
    WdgIfStateCombinerSlave  is  referenced  the  parameters  mentioned  above  does 
    not have to be configured. 
    Driver-API as not specified by AUTOSAR: 
    >  The 
    parameters  (WdgIfDeviceIncludeFile,  WdgIfDeviceSetMode  and 
    WdgIfDeviceSetTriggerCondition)  must  be  configured  to  satisfy  the  driver’s 
    need.    
     
     
    Note 
    If the WdgM is the caller of the WdgIf (i.e. function WdgIf_SetTriggerWindow() is 
      used  to  service  the  watchdog  device),  the  parameter  WindowStart 
    (WdgMTriggerWindowStart)  has  no  effect,  because  it  cannot  be  passed  to  an 
    AUTOSAR-compliant driver. It is then good practice to set it to 0, because this would 
    be the functional meaning of its absence. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    42 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGIF 
    6.3 
    Configuring the State Combiner 
    The  State  Combiner  allows  to  configure  the  reference  cycle  and  the  expected  counter 
    increments interval for each slave. 
    >  Allows the user to determine and configure the values for reference cycle and number 
    of expected triggers per trigger. Can be used to optimize reaction time. 
    >  Does not allow changing the master or slave period unless the ratio between them 
    stays the same. 
    >  The State Combiner checks whether the number of slave triggers corresponds to the 
    configuration – the system integrator must make sure that the configured values are 
    correct! 
    6.3.1 
    Configuration for Synchronous Mode 
    In order to configure the State Combiner for synchronous mode following parameters must 
    be configured in the ECU description: 
    >  Set WdgIfUseStateCombiner to true (enable State Combiner). 
    >  Set  WdgIfStateCombinerReferenceCycle  to  the  expected  number  of  slave 
    triggers. 
    >  Set  WdgIfStateCombinerSlaveIncrementsMin  to  the  constant  number  of 
    expected slave triggers. 
    >  Set  WdgIfStateCombinerSlaveIncrementsMax  to  the  constant  number  of 
    expected slave triggers as well. 
     
     
    Note 
    The last three parameters are set for each slave. 
     
     
     
     
     
    Note 
    WdgIfStateCombinerSlaveIncrementsMin and 
      WdgIfStateCombinerSlaveIncrementsMax must have the same value for 
    synchronous mode! 
     
     
    Example scenario 1: Assume that the necessary conditions for synchronous mode apply, 
    the  master  period  is  20ms  and  the  slave  period  is  20ms.  The  following  configuration  is 
    recommended for the State Combiner: 
    >  WdgIfUseStateCombiner = true 
    >  WdgIfStateCombinerReferenceCycle = 1 
    >  WdgIfStateCombinerSlaveIncrementsMin = 1 
    >  WdgIfStateCombinerSlaveIncrementsMax = 1 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    43 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGIF 
    Example scenario 2: Assume that the necessary conditions for synchronous mode apply, 
    the  master  period  is  20ms  and  the  slave  period  is  40ms.  The  following  configuration  is 
    recommended for the State Combiner: 
    >  WdgIfUseStateCombiner = true 
    >  WdgIfStateCombinerReferenceCycle = 2 
    >  WdgIfStateCombinerSlaveIncrementsMin = 1 
    >  WdgIfStateCombinerSlaveIncrementsMax = 1 
    Example scenario 3: Assume that the necessary conditions for synchronous mode apply, 
    the  master  period  is  30ms  and  the  slave  period  is  10ms.  The  following  configuration  is 
    recommended for the State Combiner: 
    >  WdgIfUseStateCombiner = true 
    >  WdgIfStateCombinerReferenceCycle = 1 
    >  WdgIfStateCombinerSlaveIncrementsMin = 3 
    >  WdgIfStateCombinerSlaveIncrementsMax = 3 
    6.3.2 
    Configuration for Asynchronous Mode 
    If the State Combiner is configured for asynchronous mode, then the reference cycle and 
    the maximum and the minimum numbers of expected slave triggers are entered as part of 
    the configuration. Following needs to be configured: 
    >  WdgIfUseStateCombiner to true (enable State Combiner). 
    >  WdgIfStateCombinerReferenceCycle to the required value. 
    >  WdgIfStateCombinerSlaveIncrementsMin to the required value. 
    >  WdgIfStateCombinerSlaveIncrementsMax to the required value. 
     
     
    Note 
    The last three parameters have to be set for each slave. 
     
     
     
    Example scenario:  
    Assume that the necessary conditions for asynchronous mode apply, the master period is 
    20ms  and  the  slave  period  is  20ms.  Jitter  for  both  master  and  slave  is  maximum  2ms. 
    Following configuration is optimal for the State Combiner: 
    >  WdgIfUseStateCombiner = true 
    >  WdgIfStateCombinerReferenceCycle = 2 
    >  WdgIfStateCombinerSlaveIncrementsMin = 1 
    >  WdgIfStateCombinerSlaveIncrementsMax = 3 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    44 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    <infix> 
    A placeholder with this name is interpreted as follows: 
    >  In case of AUTOSAR 4 compatible environment the <infix> 
    placeholder consists of the vendor ID and device name string 
    of the configured Watchdog driver. 
    >  In case of AUTOSAR 3 compatible environment the <infix> 
    placeholder consists of the device name string of the 
    configured Watchdog driver. 
    Check interval 
    The duration between two consecutive points in time when the master 
    checks a slave trigger counter. It is the reference cycle multiplied by the 
    master invocation period. 
    Master 
    State Combiner instance which is configured to work in master mode. 
    Slave 
    State Combiner instance which is configured to work in slave mode. 
    Master / Slave 
    In the WdgM Stack, this is the point in time when the 
    invocation 
    WdgM_MainFunction of the overlying WdgM is invoked – this main 
    function eventually calls the master / slave. 
    Reference cycle 
    The number of master periods between two consecutive checks of the 
    slave by the master. One means that the master checks a slave each 
    time the master is invoked; two means that the master checks a slave 
    every second time the master is invoked, etc. Note that for each slave the 
    reference cycle can be different. See also check interval. 
    Slave trigger errors 
    They are: 
    >  slave invocation omissions, 
    >  slave invocation drifting, 
    >  too frequent slave invocations and 
    >  unscheduled triggers. 
    Trigger counter 
    A variable in shared memory for each slave which starts from 0 and is 
    being incremented by its slave each time the slave is invoked with a 
    trigger request. 
    Number of slave 
    The number of trigger requests of a slave during a given period of time. 
    triggers 
    Table 7-1   Glossary 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    45 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    AUTOSAR 
    AUTOSAR (AUTomotive Open System ARchitecture) is a worldwide 
    development partnership of car manufacturers, suppliers and other 
    companies from the electronics, semiconductor and software industry. 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    ECU 
    Electronic Control Unit 
    MCU 
    Microcontroller Unit  
    WCD 
    Worst Case Delay 
    Wdg 
    Watchdog Driver 
    WdgIf 
    Watchdog Interface 
    WdgM 
    Watchdog Manager 
    Table 7-2   Abbreviations 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    46 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGIF 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    47 
    based on template version 5.12.0 

    Document Outline


    1.3.177 - TechnicalReference_WdgM

    MICROSAR WDGM

    1.3.179 - TechnicalReference_WdgMs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR WDGM 
    Technical Reference 
     
      
    Version 1.2.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Christian Leder, Daniel Richter 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR WDGM 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Daniel Richter, 
    2016-02-12  1.0.0 
    First version of the migrated WdgM Technical 
    Christian Leder 
    Reference 
    Christian Leder 
    2016-07-13  1.1.0 
    Update after introduction of native CFG5 generator 
    Christian Leder 
    2017-03-01  1.2.0 
    Mode Port functionality added 
    Timebase source OsCounter added 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_WatchdogManager.pdf 
    V2.0.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_WatchdogInterface.pdf 
    V2.3.0 
    [3]   AUTOSAR 
    AUTOSAR_SWS_WatchdogDriver.pdf 
    V2.3.0 
    [4]   Vector 
    TechnicalReference_WdgIf.pdf 
    V1.0.0 
    Informatik 
    [5]   Vector 
    Safety Manual 
     
    Informatik 
    [6]   ISO 
    Road vehicles – Functional safety 
    ISO 
    26262-
    1:2011(E) 
    [7]   AUTOSAR 
    AUTOSAR_TR_BSWModuleList.pdf 
    V1.4.0 
     
     
     
    Caution 
    We  have  configured  the  programs  in  accordance  with  your  specifications  in  the 
      questionnaire.  Whereas  the  programs  do  support  other  configurations  than  the  one 
    specified  in  your  questionnaire,  Vector´s  release  of  the  programs  delivered  to  your 
    company  is  expressly  restricted  to  the  configuration  you  have  specified  in  the 
    questionnaire. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Contents 
    1 
    Component History ...................................................................................................... 8 
    2 
    Introduction................................................................................................................... 9 
    2.1 
    Architecture Overview ...................................................................................... 10 
    2.2 
    Use Cases ....................................................................................................... 13 
    2.3 
    Basic Functionality of the WdgM ...................................................................... 14 
    2.3.1 

    Supervised Entity and Program Flow Supervision ............................ 14 
    2.3.2 
    Program Flow Supervision ............................................................... 15 
    2.3.3 
    Deadline Supervision ....................................................................... 16 
    2.3.4 
    Alive Supervision ............................................................................. 20 
    2.3.5 
    More Details on Checkpoints and Transitions................................... 23 
    2.3.6 
    Global Transitions ............................................................................ 24 
    2.3.7 
    Global Transitions and Program Flow .............................................. 26 
    2.3.7.1 

    Example of an Incorrect Global Transition Split .............. 26 
    2.3.7.2 
    Example of an Incorrect Program Split in the Middle of 
    an Entity ......................................................................... 26 

    2.3.8 
    WdgM Supervision Cycle ................................................................. 27 
    2.3.9 
    Fault Detection Time Evaluation ....................................................... 29 
    2.3.9.1 
    Alive Supervision Fault Detection Time .......................... 30 
    2.3.9.2 
    Deadline Supervision Fault Detection Time .................... 31 
    2.3.9.3 
    Program Flow Supervision Fault Detection Time ............ 32 
    2.3.10 
    Fault Reaction Time Evaluation ........................................................ 34 
    2.3.10.1 

    Alive Supervision Fault Reaction Time ........................... 34 
    2.3.10.2 
    Deadline Supervision Fault Reaction Time ..................... 35 
    2.3.10.3 
    Program Flow Supervision Fault Reaction Time ............. 35 
    2.3.11 
    Reset Path and Safe State ............................................................... 36 
    2.3.12 
    WdgM Local Entity State .................................................................. 37 
    2.3.13 
    WdgM Global State .......................................................................... 39 
    2.3.14 
    Basic Operation of the WdgM Stack ................................................. 39 
    2.4 
    WdgM in Multi-Core Systems ........................................................................... 41 
    2.4.1 
    State Combiner ................................................................................ 44 
    2.4.2 
    AUTOSAR Debugging ..................................................................... 45 
    3 
    Functional Description ............................................................................................... 47 
    3.1 

    Features .......................................................................................................... 47 
    3.1.1 
    Deviations from the AUTOSAR 4.0.1 Watchdog Manager ................ 48 
    3.1.1.1 

    Entities, Checkpoints and Transitions ............................ 48 
    3.1.1.2 
    Watchdog and Reset ..................................................... 50 
    3.1.1.3 
    API ................................................................................. 50 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    3.1.2 
    Additions/ Extensions ....................................................................... 50 
    3.2 
    Initialization ...................................................................................................... 51 
    3.3 
    Memory Sections ............................................................................................. 53 
    3.3.1 
    Memory Sections Details ................................................................. 54 
    3.3.2 
    Code and Constants ........................................................................ 55 
    3.3.3 
    Module Variables ............................................................................. 55 
    3.3.3.1 

    Module Variables with MICROSAR Os Gen6 / 
    AUTOSAR Os version 4.0 .............................................. 55 

    3.3.3.2 
    Module Variables with MICROSAR Os Gen7 / 
    AUTOSAR Os version 4.2 .............................................. 56 

    3.3.4 
    Supervised Entity Variables .............................................................. 57 
    3.3.4.1 

    Supervised Entity Variables with MICROSAR Os 
    Gen6 / AUTOSAR Os version 4.0 .................................. 57 

    3.3.4.2 
    Supervised Entity Variables with MICROSAR Os 
    Gen7 / AUTOSAR Os version 4.2 .................................. 57 

    3.4 
    Timing Setup .................................................................................................... 58 
    3.4.1 
    Deadline Measurement and Tick Counter ........................................ 60 
    3.5 
    Using Checkpoints in Interrupts ....................................................................... 62 
    3.6 
    Integration into a Multi-Core System ................................................................ 63 
    3.7 
    States .............................................................................................................. 63 
    3.8 
    Main Functions ................................................................................................ 63 
    3.9 
    Error Handling .................................................................................................. 63 
    3.9.1 

    Development Error Reporting ........................................................... 63 
    3.9.2 
    Production Code Error Reporting ..................................................... 65 
    4 
    Integration ................................................................................................................... 66 
    4.1 

    Scope of Delivery ............................................................................................. 66 
    4.1.1 

    Static Files ....................................................................................... 66 
    4.1.2 
    Dynamic Files .................................................................................. 66 
    4.2 
    Critical Sections ............................................................................................... 67 
    5 
    API Description ........................................................................................................... 68 
    5.1 

    Type Definitions ............................................................................................... 68 
    5.2 
    Services provided by WdgM ............................................................................ 69 
    5.2.1 

    WdgM_Init ........................................................................................ 69 
    5.2.2 
    WdgM_GetVersionInfo ..................................................................... 70 
    5.2.3 
    WdgM_SetMode .............................................................................. 70 
    5.2.4 
    WdgM_ActivateSupervisionEntity ..................................................... 71 
    5.2.5 
    WdgM_DeactivateSupervisionEntity ................................................ 72 
    5.2.6 
    WdgM_MainFunction ....................................................................... 73 
    5.2.7 
    WdgM_GetMode .............................................................................. 74 
    5.2.8 
    WdgM_GetLocalStatus .................................................................... 75 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    5.2.9 
    WdgM_GetGlobalStatus .................................................................. 75 
    5.2.10 
    WdgM_CheckpointReached ............................................................. 76 
    5.2.11 
    WdgM_PerformReset ....................................................................... 76 
    5.2.12 
    WdgM_GetFirstExpiredSEID ............................................................ 77 
    5.2.13 
    WdgM_GetFirstExpiredSEViolation .................................................. 78 
    5.2.14 
    WdgM_UpdateTickCount ................................................................. 78 
    5.3 
    Services used by WdgM .................................................................................. 79 
    5.4 
    Configurable Interfaces .................................................................................... 81 
    5.4.1 

    Notifications ..................................................................................... 81 
    5.4.1.1 

    Global state callback ...................................................... 81 
    5.4.1.2 
    Local state change notification ....................................... 83 
    5.5 
    Service Ports ................................................................................................... 84 
    5.5.1 

    Client Server Interface ..................................................................... 84 
    5.5.1.1 

    Provide Ports on WdgM Side ......................................... 84 
    5.5.1.1.1 

    Port Prototype for 
    WdgM_AliveSupervision ............................ 84 

    5.5.1.1.2 
    Port Prototype for WdgM_LocalStatus ....... 85 
    5.5.1.1.3 
    Port Prototype for WdgM_General ............. 85 
    5.5.1.2 
    Require Ports on WdgM Side ......................................... 86 
    5.5.1.2.1 

    Port Prototype for 
    WdgM_LocalStatusCallbackInterface......... 86 

    5.5.1.2.2 
    Port Prototype for 
    WdgM_GlobalStatusCallbackInterface ....... 86 

    5.5.1.3 
    Mode Ports on WdgM for Status Reporting .................... 86 
    6 
    Configuration .............................................................................................................. 87 
    6.1 

    Configuration Variants ...................................................................................... 87 
    6.2 
    WdgM Configuration Verification ...................................................................... 87 
    6.2.1.1 
    Installing the WdgM Verifier ........................................... 89 
    6.2.1.2 
    Creation of WdgM Info Files ........................................... 89 
    6.2.1.3 
    Verifier Compilation ........................................................ 90 
    6.2.1.4 
    Verifier Run .................................................................... 91 
    7 
    Glossary and Abbreviations ...................................................................................... 93 
    7.1 

    Glossary .......................................................................................................... 93 
    7.2 
    Abbreviations ................................................................................................... 96 
    8 
    Contact ........................................................................................................................ 97 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Figures 
    Figure 2-1 
     AUTOSAR 4.x Architecture Overview ...................................................... 10 
    Figure 2-2 
     Watchdog Manager Stack in an AUTOSAR environment ......................... 11 
    Figure 2-3 
     Layered structure of the Watchdog Manager ........................................... 12 
    Figure 2-4 
     Example of a simple supervised entity with a control flow ........................ 15 
    Figure 2-5 
     Example of a simple supervised entity with deadlines .............................. 17 
    Figure 2-6 
     Example of multiple outgoing transitions with deadlines .......................... 18 
    Figure 2-7 
     Example of a the case where only one of several outgoing transitions 
    has a deadline .......................................................................................... 19 

    Figure 2-8 
     A task being monitored during one WdgM supervision cycle (20ms) ........ 22 
    Figure 2-9 
     A task being monitored during two WdgM supervision cycles (40ms)....... 23 
    Figure 2-10 
     Global transition between two supervised entities .................................... 25 
    Figure 2-11 
     Incorrect global transition split ................................................................. 26 
    Figure 2-12 
     Incorrect program split in the middle of an entity ...................................... 27 
    Figure 2-13 
     WdgM supervision cycle .......................................................................... 28 
    Figure 2-14 
     Alive supervision fault detection time ....................................................... 31 
    Figure 2-15 
     Deadline supervision fault detection time ................................................. 32 
    Figure 2-16 
     Program flow supervision fault detection time .......................................... 33 
    Figure 2-17 
     Primary and secondary reset path of the WdgM ...................................... 36 
    Figure 2-18 
     Modified state machine ............................................................................ 38 
    Figure 2-19 
     Example of an WdgM Stack configuration ............................................... 40 
    Figure 2-20 
     Behavior of the WdgM Stack ................................................................... 41 
    Figure 2-21 
     WdgM Stack on a multi-core system configured for independent core 
    reaction ..................................................................................................... 43 

    Figure 2-22 
     WdgM Stack on a multi-core system using the State Combiner for a 
    combined core reaction ............................................................................ 44 

    Figure 2-23 
     Dynamic Behavior on a multi-core system using the State Combiner for 
    a combined core reaction.......................................................................... 45 

    Figure 3-1 
     Start phase of the WdgM ......................................................................... 51 
    Figure 3-2 
     Memory usage of the WdgM .................................................................... 54 
    Figure 3-3 
     Time base of WdgM ................................................................................. 59 
    Figure 3-4 
     WdgM Tick source selection for deadline supervision .............................. 61 
    Figure 5-1 
     Expected interfaces to external modules ................................................. 80 
    Figure 6-1 
     Workflow of the WdgM Configuration Verifier build .................................. 87 
     
    Tables 
    Table 1-1 
    Component history...................................................................................... 8 
    Table 2-1  
    WdgM Local Entity Stats ........................................................................... 37 
    Table 2-2  
    Names of configuration fields .................................................................... 38 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 48 
    Table 3-2  
    Features provided beyond the AUTOSAR standard .................................. 50 
    Table 3-3  
    Code and Constants ................................................................................. 55 
    Table 3-4  
    WdgM constants ....................................................................................... 55 
    Table 3-5  
    Module variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 . 56 
    Table 3-6  
    Module variables MICROSAR Os Gen7 / AUTOSAR Os version 4.2 ........ 57 
    Table 3-7  
    Supervised Entity Variables MICROSAR Os Gen6 / AUTOSAR Os 
    version 4.0 ................................................................................................ 57 

    Table 3-8  
    Supervised Entity Variables MICROSAR Os Gen7 / AUTOSAR Os 
    version 4.2 ................................................................................................ 57 

    Table 3-9  
    Configuration Parameters ......................................................................... 60 
    Table 3-10  
    Service IDs ............................................................................................... 64 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Table 3-11  
    Errors reported to DET ............................................................................. 65 
    Table 3-12  
    Errors reported to DEM ............................................................................. 65 
    Table 4-1  
    Static files ................................................................................................. 66 
    Table 4-2  
    Generated files ......................................................................................... 66 
    Table 5-1  
    Type definitions ......................................................................................... 69 
    Table 5-2  
    WdgM_Init ................................................................................................ 70 
    Table 5-3  
    WdgM_GetVersionInfo .............................................................................. 70 
    Table 5-4  
    WdgM_SetMode ....................................................................................... 71 
    Table 5-5  
    WdgM_ActivateSupervisionEntity ............................................................. 72 
    Table 5-6  
    WdgM_DeactivateSupervisionEntity ......................................................... 73 
    Table 5-7  
    WdgM_MainFunction ................................................................................ 74 
    Table 5-8  
    WdgM_GetMode ...................................................................................... 75 
    Table 5-9  
    WdgM_GetLocalStatus ............................................................................. 75 
    Table 5-10  
    WdgM_GetGlobalStatus ........................................................................... 76 
    Table 5-11  
    WdgM_CheckpointReached ..................................................................... 76 
    Table 5-12  
    WdgM_PerformReset ............................................................................... 77 
    Table 5-13  
    WdgM_GetFirstExpiredSEID .................................................................... 78 
    Table 5-14  
    WdgM_GetFirstExpiredSEViolation .......................................................... 78 
    Table 5-15  
    WdgM_UpdateTickCount .......................................................................... 79 
    Table 5-16  
    Services used by the WdgM ..................................................................... 79 
    Table 5-17  
    Global state callback ................................................................................. 82 
    Table 5-18  
    Local state change notification .................................................................. 83 
    Table 5-19
    alive_<WdgMSupervisedEntityShortname>_<WdgMCheckpointShortname> 84 
    Table 5-20  
    alive_<WdgMSupervisedEntityShortname> .............................................. 85 
    Table 5-21  
    individual_<WdgMSupervisedEntityShortname> ...................................... 85 
    Table 5-22  
    global_<WdgMGlobalMemoryAppTaskRefShortname> / global_WdgM .... 86 
    Table 5-23  
    localStateChangeCbk_<WdgMSupervisedEntityShortname> ................... 86 
    Table 5-24  
    localStateChangeCbk_<WdgMSupervisedEntityShortname> ................... 86 
    Table 7-1  
    Glossary ................................................................................................... 95 
    Table 7-2  
    Abbreviations ............................................................................................ 96 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    1.00 
    Migration of the WdgM to Vector Informatik GmbH 
    2.00 
    Introduction of native CFG5 generator 
    2.01 
    Support mode ports and OsCounters as timebase 
    Table 1-1 
    Component history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module WdgM as specified in [1]. 
     
    Supported AUTOSAR Release*: 
    4.0.1 
    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    WDGM_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    WDGM_MODULE_ID  
    13 decimal 
    (according to ref. [7]) 
    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
     
    The Watchdog (Wdg) Stack provides software modules to monitor the correct functioning 
    of safety-relevant activities in systems with software modules of mixed criticality, such as 
    >  newly developed safety-related functions, 
    >  legacy functions, and 
    >  basic software. 
    The Wdg Stack is designed to be used in automotive ECUs. 
    The Wdg Stack has three software modules: 
    >  Watchdog Manager (WdgM) 
    >  Watchdog Interface (WdgIf) 
    >  Watchdog Driver (Wdg) 
    The WdgM can run on single-core and multi-core systems. 
    This user manual describes the WdgM, which is an AUTOSAR basic software module that 
    is  part  of  the  AUTOSAR  service  layer.  The  WdgM  checks  the  logical  program  flow  and 
    temporal  behavior  of  the  program  flow  of  safety-relevant  functions.  Safety-relevant 
    functions  use  checkpoint  calls  to  send  life  signs  to  the  WdgM.  Internal  or  external 
    watchdog hardware is used independently from the system CPU to monitor 
    >  if the system is still alive, 
    >  if the system functions properly, and  
    >  if the system shows the correct temporal behavior and logical program flow. 
    The  WdgM  was  developed  according  to  AUTOSAR  version  4.0.1  [1].  The  WdgM  is 
    compatible  with  this  AUTOSAR  version,  but  not  fully  compliant.  For  the  deviations,  see 
    section Deviations from the AUTOSAR 4.0.1 Watchdog Manager. If the WdgM is used in 
    safety-related  systems  with  AUTOSAR  4.0.1  or  another  version,  all  requirements 
    described in the Safety Manual [5] must be fulfilled. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 

    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    This user manual does not cover safety-related topics. For safety-related requirements for 
    the integration and the application of the WdgM, refer to the Safety Manual [5]. 
    2.1 
    Architecture Overview 
    The following figure shows where the WdgM is located in the AUTOSAR architecture. 
     
    Figure 2-1   AUTOSAR 4.x Architecture Overview  
    The WdgM Stack consists of the hardware-independent modules Watchdog Manager (blue 
    rectangle) and Watchdog Interface and a hardware-dependent module Watchdog Driver. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    10 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    Figure 2-2 shows the WdgM Stack with its modules in an AUTOSAR environment. 
     
    Figure 2-2   Watchdog Manager Stack in an AUTOSAR environment 
     
    The  WdgM  controls,  through  the  WdgIf  and  the  Wdg,  the  hardware-implemented 
    watchdogs, which can be one or more internal or external watchdog devices. 
     
     
     
    Note 
    A watchdog device requires a hardware-dependent Wdg driver. 
     
     
     
     
    Figure 2-3 shows the layered structure of the WdgM Stack. The attached watchdog device 
    can be internal or external. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    11 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-3   Layered structure of the Watchdog Manager 
     
    The  WdgM  monitors  the  program  flow  and  timing  constraints  of  so-called  supervised 
    entities (SE). The SEs are software entities (like application software) that are supervised 
    by the WdgM. When the WdgM detects  a violation of the  preconfigured program flow or 
    the timing constraints, it takes a number of configurable actions to log that violation and/or 
    go to a safe state (for details, see Section Basic Functionality of the WdgM). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    12 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    2.2 
    Use Cases 
    The WdgM monitors the user software at runtime and compares the preconfigured logical 
    and  temporal  constraints  with  the  actual  logical  and  temporal  behavior.  The  WdgM  can 
    monitor the following violations: 
    >  timing violation (checked by deadline supervision and alive supervision) 
    >  program flow violation (checked by logical monitoring) 
    The  WdgM  periodically  triggers  the  watchdog  device  through  its  interface  (WdgIf)  and 
    driver layer (Wdg). When the WdgM detects  a  fault  in  the  program flow  or  timing then it 
    stops the watchdog triggering,  or it initiates a reset  of the microcontroller  immediately or 
    after a delay, depending on the WdgM configuration. 
    The WdgM monitors the following software and hardware faults: 
    >  The supervised entity is executed, but the execution was not requested. 
    >  The supervised entity was not executed, but the execution was requested. 
    >  The execution of the supervised entity started too early or too late. 
    >  The execution time of a supervised entity or part of a supervised entity or many 
    supervised entities is longer or shorter than expected. 
    >  The program flow of a supervised entity or part of a supervised entity or many 
    supervised entities differs from expected program flow. 
    The reaction of the WdgM to detected faults can be configured as follows: 
    >  WdgM sends information about the detected fault. 
    >  WdgM initiates a reset of the microcontroller after a watchdog timeout. 
    >  WdgM initiates an immediate reset of the microcontroller. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    13 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    2.3 
    Basic Functionality of the WdgM 
    As  described  in AUTOSAR  [1],  the WdgM  is  a  basic  software  module  that  monitors  the 
    program flow of supervised entities (SE). 
    2.3.1 
    Supervised Entity and Program Flow Supervision 
    A  supervised  entity  is  a  software  part  that  is  monitored  by  the WdgM.  There  is  no  fixed 
    relationship  between  supervised  entities  and  the  architectural  building  blocks  in 
    AUTOSAR. 
    The  checkpoints  mark  important  steps  during  the  execution  of  an  algorithm.  At  the 
    checkpoint, a supervised entity calls the function WdgM_CheckpointReached() directly 
    (if no runtime environment is present) or with a wrapper function (if a runtime environment 
    is present) being provided by the runtime environment. The checkpoints are connected by 
    transitions. Local transitions bind Checkpoints to a closed graph. These graphs represent 
    the program flow. 
    The  WdgM  knows  which  program  flow  is  correct  and  decides  if  a  supervised  entity 
    behaves as expected or violates the predefined rules. 
    The  question  of  how  to  identify  the  checkpoints  for  an  algorithm  is  a  trade-off  between 
    performance and code block size per checkpoint: 
    >  The  more  checkpoints  an  algorithm  has,  the  better  is  the  representation  of  the  code 
    structure. But this has an adverse effect on performance. 
    >  However,  if  an  algorithm  has  only  a  few  checkpoints,  then  there  are  code  segments 
    and program flow branches that are not represented. In this case, performance will be 
    better, but not everything will be monitored. 
    A supervised entity can represent an algorithm, a function, or – in the case of an operating 
    system – an entire task. In the AUTOSAR definition, a supervised entity can be distributed 
    over more  than one task or application. There can be several supervised entities for the 
    same  task.  However,  the WdgM  implementation does  not  support the distribution  of  one 
    supervised  entity  over  more  than  one  task  or  application  when  they  run  in  different 
    contexts.  The  WdgM  expects  that  at  least  one  supervised  entity  and  at  least  one 
    checkpoint are defined. 
    Figure  2-4  shows  the  example  of  a  simple  supervised  entity  called 
    temperature_control: 
    >  Supervised  entity  temperature_control  has  six  checkpoints  (illustrated  by  oval 
    boxes), which are connected by directed transitions (illustrated by arrows). 
    >  As  can  be  seen  in  Figure  2-4,  it  is  possible  to  reach  the  checkpoint 
    temperature_needs_correction after the checkpoint read_temperature. 
    >  However,  reaching  the  checkpoint  heater_adjusted_successfully  after  the 
    checkpoint read_temperature would be a violation of the program flow. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    14 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
    Figure 2-4   Example of a simple supervised entity with a control flow 
     
    2.3.2 
    Program Flow Supervision 
     
     
     
    Note 
    Program Flow Supervision can only be used if the WDG add-on for program flow and 
      deadline supervision is licensed. 
    (“WdgM_ProgramFlowAndDeadlineMonitoring”) 
     
     
     
    Control (program) flow supervision is highly recommended by ISO 26262-6 (7.4.14). Apart 
    from its main feature, which is to detect logical errors in the monitored algorithms, program 
    flow supervision increases the probability of detecting illegal program counter jumps within 
    the whole system. 
    In  addition  to  the  specification  by  AUTOSAR,  it  is  possible  to  tolerate  program  flow 
    violations  within  a  supervised  entity  for  a  certain  amount  of  supervision  cycles.  It  is 
    possible  to  define  a  program  flow  reference  cycle  (a  multiple  of  the  WdgM  supervision 
    cycle) and a tolerance, which is a number of program flow reference cycles, during which 
    program  flow  violations  should  be  tolerated  for  the  supervised  entity.  If  a  program  flow 
    violation  is  detected  for  more  program  flow  reference  cycles  than  the  defined  tolerance, 
    then the supervised entity changes its status from FAILED to EXPIRED. 
    The  necessary  configuration  parameters  to  tolerate  program  flow  violations  of  a 
    supervised entity are: 
    >  WdgMFailedProgramFlowRefCycleTol:  This  parameter  contains  the  acceptable 
    amount of program flow violations for this supervised entity. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    15 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    >  WdgMProgramFlowReferenceCycle:  This  parameter  contains  the  amount  of 
    supervision  cycles  to  be  used  as  reference  by  the  program  flow  supervisions  of  this 
    supervised entity. 
     
     
     
    Note 
    The program flow reference cycle for a supervised entity starts with the first detected 
      program  flow  violation  and  not  with  the WdgM  startup.  Hence,  the  first  program  flow 
    reference  cycle  starts  with  the  transition  of  the  supervised  entity  from  status  OK  to 
    FAILED.  If  no  program  flow  violation  is  detected  for  a  whole  program  flow  reference 
    cycle  within  the  tolerance  then  the  supervised  entity  recovers  and  changes  its  status 
    from  FAILED  to  OK.  Otherwise,  if  the  tolerance  is  exhausted  and  the  program  flow 
    violations continue, then the supervised entity changes its status to EXPIRED. It can be 
    said that the program flow reference cycle is processed only during the status FAILED 
    –  it  starts  with  the  first  detected  program  flow  violation.  The  program  flow  reference 
    cycle  is  restarted  with  each  following  transition  from  OK  to  FAILED,  and  it  is  not 
    processed during the status OK, EXPIRED or DEACTIVATED. 
     
     
     
    2.3.3 
    Deadline Supervision 
     
     
     
    Note 
    Deadline Supervision can only be used if the WDG add-on for program flow and 
      deadline supervision is licensed. 
    (“WdgM_ProgramFlowAndDeadlineMonitoring”) 
     
     
     
    The main purpose of deadline  supervision is to check the temporal, dynamic behavior of 
    the supervised entity. However, it would also strongly increase the probability of detecting 
    random  jumps  or  irregular  updates  of  the  timebase  tick  counter,  which  might  otherwise 
    degrade system integrity without being discovered. 
    The temporal behavior of the supervised entities can be monitored by assigning deadlines 
    to transitions. 
    >  A  deadline  is  defined  through  a  maximum  deadline  (parameter  WdgMDeadlineMax) 
    and a minimum deadline (parameter WdgMDeadlineMin). The destination checkpoint 
    of a transition should not be reached before the minimum time or after the maximum 
    time after which  the source  checkpoint of that  transition was reached. Otherwise  the 
    WdgM  will  detect  a  deadline  violation.  Apart  from  a  maximum  deadline  time  it  is 
    strongly recommended to use a minimum deadline time as well, where applicable. This 
    allows  discovering  timebase  tick  counter  errors  implicitly.  Deadlines  are  good  for 
    discovering  crashed  tasks  or  infinite  loops.  If  the  destination  checkpoint  is  never 
    reached because the task ended with an error or is stuck in a loop, this would cause a 
    deadline violation. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    16 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    >  A deadline is assigned to an already defined transition by specifying the same source 
    and  destination  checkpoints  as  for  the  transition.  The  corresponding  deadline 
    parameters are WdgMDeadlineStartRef and WdgMDeadlineStopRef. 
    >  For  local  transitions,  the  source  and  destination  checkpoints  belong  to  the  same 
    supervised entity. 
    >  For  global  transitions,  the  source  and  destination  checkpoints  belong  to  different 
    supervised entities. 
    An example of a supervised entity with deadlines defined for its transitions is given below. 
    The  first  deadline  is  defined  to  have  a  minimum  of  0  and  a  maximum  of  2  (seconds). 
    Hence,  CP1  must  be  reached  no  later  than  2  seconds  after  CP0.  The  second  deadline 
    implies that CP2 must be reached no earlier than 1 and no later than 3 seconds after CP1. 
    Otherwise a deadline violation will be detected. 
     
     
    Figure 2-5   Example of a simple supervised entity with deadlines 
     
     
     
    Note 
    Deadline violation is detected 
      >  when the next checkpoint is reached outside the defined deadline or 
    >  within the WdgM_MainFunction() if the next checkpoint is not reached at all (or 
    has not been reached yet) and the maximum deadline has already expired 
     
     
     
    A  slightly  more  complex  situation  is  when  several  transitions  go  out  of  the  same 
    checkpoint.  In  this  case,  deadline  violations  are  detected  in  the  same  manner  when  the 
    next  checkpoint  is  reached  outside  the  defined  deadlines.  However,  if  none  of  the  next 
    checkpoints  is  reached,  the  WdgM_MainFunction()  detects  a  deadline  violation  only 
    after the maximum of maximum deadlines of all outgoing transitions has elapsed, which is 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    17 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    seconds after reaching CP0, shown in Figure 2-6. If the program gets stuck after CP0, the 
    deadline violation is detected within the next main function that is executed not earlier than 
    5 seconds after reaching CP0. 
     
    Figure 2-6   Example of multiple outgoing transitions with deadlines 
    A special case is a hybrid situation when some of the outgoing transitions have deadlines 
    and others do not. In this case, the main function detects a deadline violation if none of the 
    next checkpoints is reached within the maximum of configured deadlines in order to detect 
    blocked supervised entities. No deadline violation will be detected after the maximum has 
    expired, however, if the checkpoint without deadline is reached before the main function. If 
    none  of  the  CP1,  CP2  is  reached  after  CP0  (Figure  2-7),  then  the  next 
    WdgM_MainFunction()  (executed  at  least  2  seconds  after  CP0  is  reached)  detects  a 
    deadline  violation.  If,  however,  CP1  is  reached  after  2  seconds,  but  before  the  next 
    WdgM_MainFunction(), no deadline violation would be detected. 
     
     
     
    Note 
    To avoid this ambiguous situation it is a good practice to define deadlines for all 
      outgoing transitions of a checkpoint (or for none of them). 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    18 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-7   Example of a the case where only one of several outgoing transitions has a deadline 
    The rules for deadline violation detection also apply to global transitions or to the case of 
    local transitions mixed with global transitions at a checkpoint. 
    In  addition  to  the  specification  by  AUTOSAR,  it  is  possible  to  tolerate  also  deadline 
    violations  within  a  supervised  entity  for  a  certain  amount  of  supervision  cycles.  It  is 
    possible define a deadline reference cycle (a multiple of the WdgM supervision cycle) and 
    a  tolerance,  which  is  a  number  of  deadline  reference  cycles,  during  which  deadline 
    violations should be tolerated for the supervised entity. If a deadline violation is detected 
    for more deadline reference cycles than the defined tolerance, then the supervised entity 
    changes its status from FAILED to EXPIRED. 
    The  necessary  configuration  parameters  to  tolerate  deadline  violations  of  a  supervised 
    entity are: 
    >  WdgMFailedDeadlineRefCycleTol: This parameter contains the acceptable 
    amount of violated deadlines for this supervised entity. 
    >  WdgMDeadlineReferenceCycle: This parameter contains the amount of 
    supervision cycles to be used as reference by the deadline supervisions of this 
    supervised entity. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    19 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
     
    Note 
    The  deadline  reference  cycle  for  a  supervised  entity  starts  with  the  first  detected 
      deadline violation and not with the WdgM start up. Hence, the first deadline reference 
    cycle starts with the transition of the supervised entity from the status OK to FAILED. If 
    no  deadline  violation  is  detected  for  a  whole  deadline  reference  cycle  within  the 
    tolerance, then the supervised entity recovers and changes its status from FAILED to 
    OK. Otherwise, if the tolerance is exhausted and the deadline violations continue, then 
    the supervised entity changes its status to EXPIRED. It can be said that the deadline 
    reference  cycle  is  processed  only  during  the  status  FAILED  –  it  starts  with  the  first 
    detected  deadline  violation.  The  deadline  reference  cycle  is  restarted  with  each 
    following  transition  from  OK  to  FAILED,  and  it  is  not  processed  during  the  status  OK, 
    EXPIRED or DEACTIVATED. 
     
     
     
    2.3.4 
    Alive Supervision 
    Aliveness monitors the frequency of hits of checkpoints. For example, the algorithm could 
    expect a sensor to report its measurements on a regular basis, and a certain task needs to 
    process this data periodically. If a task stops reporting (alive sign is lost or too infrequent) 
    or starts reporting too often, then the aliveness of that task is violated. 
    Alive  supervision  is  associated  with  a  checkpoint  in  a  supervised  entity.  If  you  need  to 
    monitor only the frequency with which a task is called, you can define a supervised entity 
    that contains only one checkpoint with the corresponding aliveness parameters. 
     
     
     
    Note 
    Irregular  calls  of  the  WdgM  main  function  or  the  omission  of  calls  of 
      WdgM_CheckPointReached() would most likely result in aliveness violation. When 
    alive supervision for a checkpoint is activated, then that checkpoint must be regularly 
    called  for  the  entire  period  during  which  the  supervised  entity  is  active,  otherwise 
    aliveness  violation  will  be  detected.  In  the  first  supervision  cycle,  the  alive  counter 
    evaluation 
    can 
    be 
    suppressed 
    by 
    the 
    parameter 
    WdgMFirstCycleAliveCounterReset. 
     
     
     
    It  is  important  to  consider  which  aliveness  parameters  are  better  for  a  specific  situation. 
    The example below shows how to choose the appropriate alive supervision parameters: 
    >  WdgMExpectedAliveIndications: 
    Defines how many alive indications (checkpoint reached calls) are expected within one 
    supervision reference cycle. 
    >  WdgMSupervisionReferenceCycle: 
    Defines  the  supervision  reference  cycle  length  as  a  number  of  supervision  cycles 
    (WdgMSupervisionCycle). 
    >  WdgMMinMargin: 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    20 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    Defines the lower tolerance of expected alive indications. 
    >  WdgMMaxMargin: 
    Defines the upper tolerance of expected alive indications. 
    >  Hence, the allowed number of indications is in the range 
    [WdgMExpectedAliveIndications - WdgMMinMargin, 
    WdgMExpectedAliveIndications + WdgMMaxMargin] 
     
     
     
    Note 
    In contrast to the deadline and program flow reference cycle the alive supervision cycle 
      begins  with  the  WdgM  startup.  The  alive  supervision  in  the  very  first  cycle  can  be 
    influenced  by  the  parameter  WdgMFirstCycleAliveCounterReset.  This  is 
    because  each  alive  counter  is  evaluated  once  per  supervision  reference  cycle.  This 
    means  that  the  supervision  reference  cycle  is  processed  from  the  system  startup  on 
    and  during  the  status  OK  and  FAILED  of  the  corresponding  supervised  entity.  If  the 
    supervised entity is in the status EXPIRED, then the supervision reference cycle is not 
    needed  anymore.  If  the  supervised  entity  is  in  the  status  DEACTIVATED,  then  the 
    supervision reference cycle is frozen. It is restarted if the supervised entity is activated 
    again. 
     
     
     
    There  are  several  ways  for  monitoring  the  task  given  in  the  example  above.  Below,  one 
    variant is given: 
    Set 
    >  WdgMExpectedAliveIndications=1 
    >  WdgMSupervisionReferenceCycle=1 
    >  WdgMMinMargin=1 
    >  WdgMMaxMargin=0 
    This means the WdgM should expect 1 or 0 (WdgMExpectedAliveIndications - 
    WdgMMinMargin) occurrences within one supervised reference cycle, which is fixed to 
    20ms (which is one WdgM supervision cycle). 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    21 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-8   A task being monitored during one WdgM supervision cycle (20ms) 
    However,  if  the  task  stops  being  executed  it  will  not  be  detected,  because  zero  alive 
    indications per supervised reference cycle  are  tolerated. Therefore, this choice of  setting 
    aliveness parameters is not very good. 
    Below, a second variant is given: 
    Set 
    >  WdgMExpectedAliveIndications=2 
    >  WdgMSupervisionReferenceCycle=2 
    >  WdgMMinMargin=1 
    >  WdgMMaxMargin=0 
    This  means  the  WdgM  should  expect  1  or  2  alive  indications  within  one  supervised 
    reference cycle, which is fixed to 40ms (and which is two WdgM supervision cycles). 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    22 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
     
    Figure 2-9   A task being monitored during two WdgM supervision cycles (40ms) 
    This configuration solves the problem of detecting the disappearance of the task. However, 
    the reaction time for error detection doubles from 20 to 40ms. 
    A  third  variant  would  be  to  set  the  supervision  reference  cycle  to  the  least  common 
    multiple of the WdgM supervision cycle and the task period. In the example given above 
    this  would  be  60ms  (three WdgM  supervision  cycles).  In  this  case,  we  expect  exactly  2 
    alive indications. Hence, the minimum and maximum margins are both 0. 
     
     
    Note 
    The  task  period  and  the  WdgM  supervision  cycle  must  be  synchronized  and  started 
      with an offset to each other (e.g. scheduled in an operating system). 
     
     
     
    2.3.5 
    More Details on Checkpoints and Transitions 
    Every supervised entity has one initial checkpoint. The number of end checkpoints can be 
    zero, one or more than one. If the supervised entity contains only one single checkpoint, 
    then  it  should  be  both  an  initial  and  an  end  checkpoint.  Local  transitions  are  defined  by 
    their  source  and  destination  checkpoints,  which  must  belong  to  the  same  supervised 
    entity. 
    Those 
    local 
    transitions 
    are 
    specified 
    in 
    the 
    parameters 
    WdgMInternalTransitionSourceRef and WdgMInternalTransitionDestRef. 
    After initialization of the WdgM, all supervised entities are passive. 
     
     
     
    Note 
    This has nothing to do with the supervised entity state 
      WDGM_LOCAL_STATUS_DEACTIVATED. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    23 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    A supervised entity becomes active when its local initial checkpoint has been called. In the 
    example of the supervised entity temperature_control (see Section Supervised Entity 
    and Program Flow Supervision 
    and Figure 2-4), the initial checkpoint is read_temperature. 
    Only  if  the  supervised  entity  is  active,  its  checkpoints  (other  than  the  initial  checkpoint) 
    may be reached, otherwise a program flow violation occurs. Reaching an end checkpoint, 
    the supervised entity is set to passive state, and it can be activated again only through the 
    initial checkpoint. 
     
    Reaching  the  initial  checkpoint  again  after  the  supervised  entity  has  been  activated  is  a 
    program flow violation. 
     
    Local reflexive transitions (from a checkpoint to itself) are allowed only if configured. The 
    reflexive transitions cannot be defined for local initial or local end checkpoints. 
     
    Local initial checkpoints are not allowed to have local incoming transitions. 
     
    Local end checkpoints are not allowed to have local outgoing transitions. 
     
    2.3.6 
    Global Transitions 
    It  is  possible  to  represent  program  flow  dependencies  between  supervised  entities  by 
    using  so-called  global  transitions.  Global  transitions  are  defined  for  the  WdgM 
    configuration by their source and destination checkpoints, which must belong to different 
    supervised 
    entities 
    and 
    which 
    are 
    specified 
    by 
    the 
    parameters 
    WdgMExternalCheckpointInitialRef  and  WdgMExternalCheckpointFinalRef. 
    The end checkpoint of a supervised entity is usually connected to the initial checkpoint of 
    another  supervised  entity,  expressing  a  logical  dependency  between  them.  However, 
    global transitions are allowed between any two checkpoints of any two supervised entities. 
    One  must  keep  in  mind  several  things  when  defining  a  global  transition  between  two 
    arbitrary checkpoints: 
    >  If  the  source  of  the  global  transition  is  not  a  local  end  checkpoint,  then  the  source 
    entity  will  remain  active.  Program  flow  violation  would  occur  if  its  initial  checkpoint 
    were reached again. 
    >  If the destination checkpoint of the global transition is not a local initial checkpoint, the 
    destination entity may not be active. Program flow violation would occur if a non-initial 
    checkpoint of an inactive supervised entity were reached. 
    >  Exactly one global initial checkpoint must be defined. The first global transition passed 
    must have that checkpoint as a source. 
    >  It is possible to define one or several global end checkpoints or none. Once the global 
    end  checkpoint  served  as  a  destination  checkpoint  of  a  global  transition,  no  more 
    global  transitions  are  allowed  (unless  they  are  started  with  the  global  initial 
    checkpoint). 
    Figure 2-10 shows a global transition between two supervised entities: 
    >  The pressure_sensor_task gets the pressure value. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    24 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    >  The  control_pressure_task  calculates  a  reaction  and  reacts  to  the  measured 
    pressure.  However,  it  can  start  only  after  the  first  task  (pressure_sensor_task) 
    has finished and after the pressure value has been obtained. This relation is shown by 
    a global transition (see dotted arrow). 
    >  Some transitions in Figure 2-10 have comments that show deadlines in milliseconds. 
    >  Deadlines can also be defined for global transitions (see dotted arrow), where 1..5ms 
    means that the second task (control_pressure_task) should start not later than 
    5ms, but not earlier than 1ms after the first task has finished. 
     
    Figure 2-10   Global transition between two supervised entities 
     
     
     
    Note 
    Global transitions between supervised entities that are assigned to different processor 
      cores are not supported. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    25 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    2.3.7 
    Global Transitions and Program Flow 
    In general the, program flow does not differ between local and global transitions. But what 
    seems  intuitive  for  local  transitions  might  not  be  so  obvious  for  global  transitions.  This 
    section gives examples that show the usage of local and global transitions with a focus on 
    program flow split. 
    From  the  perspective  of  the  WdgM,  the  program  flow  is  the  consecutive  reaching  of 
    checkpoints.  The  start  of  each  program  flow  must  be  a  local  initial  checkpoint.  The 
    program  flow  propagates  through  local  transitions  within  the  boundaries  of  a  supervised 
    entity  and  through  global  transitions  within  the  boundaries  of  the  whole  system.  The 
    program flow might eventually come to an end at a local end checkpoint, or never come to 
    an end if a program flow loop occurs. 
    A very important feature is that it is not allowed to split the program flow. This means that 
    the program flow is allowed to take only one transition at each checkpoint from which more 
    than one local or global transition comes out. 
    2.3.7.1 
    Example of an Incorrect Global Transition Split 
    Figure 2-11 shows that after checkpoint cp0_1 the program flow must decide to take either 
    the  global  transition  cp1_0  or  cp2_0.  Reaching  cp2_0  immediately  after  reaching  cp1_0 
    would result in a program flow violation. 
     
    Figure 2-11   Incorrect global transition split 
    2.3.7.2 
    Example of an Incorrect Program Split in the Middle of an Entity 
    Figure 2-12 shows another example. Let us assume that the program flow reaches cp0_0 
    and then cp0_1. Afterward the program flow decides to take the global transition reaching 
    cp1_0 instead of taking the local transition. Now, if the local transition took place afterward 
    (by  reaching  cp0_2),  a  program  flow  violation  would  occur.  However,  cp0_2  can  be 
    reached via the global transition if the program flow comes from cp1_1. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    26 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
    Figure 2-12   Incorrect program split in the middle of an entity 
     
     
     
    Note 
    It  is  easy  to  create  configurations  with  complex  global  transitions  that  do  not  make 
      much sense in a real system. For example, if "jumping out" of a supervised entity from 
    a  checkpoint  that  is  not  a  local  end  checkpoint,  one  must  keep  in  mind  that  this 
    supervised  entity  is  still  active  (local  activity  flag  is  still  true),  and  it  cannot  be 
    restarted by reaching its local initial checkpoint again. Thus, it is recommended to use 
    global  transitions  carefully  and  let  them  start  only  at  local  end  checkpoints  of  a 
    supervised entity and end at a local initial checkpoint of some other entity. Exceptions 
    to  this  must  be  analyzed  thoroughly,  with  respect  to  the  program  flow  and  the  local 
    activity of both supervised entities. 
     
     
     
    2.3.8 
    WdgM Supervision Cycle 
    The  supervision  cycle  is  the  time  period  in  which  the  cyclic  supervision  algorithm  is 
    executed.  At  the  end  of  each  supervision  cycle,  the  main  function, 
    WdgM_MainFunction(), is called. This function evaluates the checkpoint data gathered 
    in  the  previous  period  and  triggers  the  Watchdog  if  no  violation  has  been  detected. 
    Function WdgM_MainFunction() also checks for violations depending on the reference 
    cycle defined for the respective monitoring feature. 
    Example:  If  WdgMProgramFlowReferenceCycle=3,  then  the  check  for  program  flow 
    violation is done in every third call of WdgM_MainFunction(). 
    The  shorter  this  period  and  the  reference  cycles,  the  shorter  the  reaction  time  of  the 
    WdgM, but the more processor time is consumed. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    27 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
     
     
    Note 
    Aliveness  supervision  is  strongly  connected  to  this  period.  The  expected  number  of 
      alive  indications  for  a  certain  checkpoint  refers  to  the  last  supervision  cycle 
    (configurable  for  the  checkpoint),  which  is  expressed  in  the  number  of  supervision 
    cycles. 
     
     
     
    Figure 2-13 shows a time span with 3 supervision cycles. In each cycle, CP1 and CP2 are 
    hit once. Once the WdgM main function is called, the window for the next watchdog trigger 
    is defined by WdgMTriggerWindowStart and WdgMTriggerConditionValue. 
     
    Figure 2-13   WdgM supervision cycle 
     
     
     
    Note 
    For the scheduling of WdgM_MainFunction() calls, the integrator shall set 
      >  WdgMTicksPerSecond, 
    >  WdgMSupervisionCycle, 
    >  WdgMTriggerWindowStart (per Wdg Trigger Mode), and 
    >  WdgMTriggerConditionValue (per Wdg Trigger Mode) 
    according to the system requirements. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    28 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    2.3.9 
    Fault Detection Time Evaluation 
    The WdgM distinguishes between the fault detection time and the fault reaction time
    >  The  fault  detection  time  spans  from  the  occurrence  of  an  error  to  the  point  in  time 
    when  that  error  is  detected  and  communicated  to  the  system  (via  DET  or  callback 
    functions). 
    >  The fault reaction time spans from the detection of an error to the actual system reset. 
    If  a  program flow  violation  or  a  deadline  violation  occurs,  the  source  checkpoint  and  the 
    destination checkpoint report to the WdgM when hit. At the end of the current supervision 
    cycle,  the  WdgM  main  function,  WdgM_MainFunction(),  is  called  and  the  violation  is 
    detected  (i.e.  the  configured  destination  checkpoint  was  hit  too  late  or  not  at  all)  and 
    communicated to the system. 
    If  an  alive  counter  violation  occurs,  it  is  also  the  main  function  that  detects  and 
    communicates  the  violation  at  the  end  of  the  supervision  reference  cycle  of  the  alive 
    supervision. 
    The  shortest  fault  detection  and  reaction  time  can  be  achieved  by  configuring  an 
    immediate  reset.  However,  the  time  still  depends  on  what  occurs  first  in  a  supervision 
    cycle, the fault or the hit of the checkpoint. 
     
     
     
    Note 
    The time from fault occurrence to the system's safety reaction is the sum of 
      >  WdgM Fault Detection Time, 
    >  WdgM Fault Reaction Time, 
    >  WdgIf Fault Reaction Time and 
    >  Wdg Fault Reaction Time. 
     
     
    The WdgM fault detection time is evaluated differently for the various monitoring features 
    as shown in this section. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    29 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
    2.3.9.1 
    Alive Supervision Fault Detection Time 
    Assume  that  a  fault  occurs  that  leads  to  an  alive  counter  violation.  The  WdgM  fault 
    detection time is the sum of the time spans 
    >  from the fault to the scheduled call of the next checkpoint that is monitored and 
    >  from this checkpoint to the next call of WdgM_MainFunction() with alive 
    supervision. 
     
     
    Note 
    The multiple of supervision cycle that performs an alive supervision is defined by 
      WdgMSupervisionReferenceCycle. 
     
     
     
     
    Note 
    If zero calls of a checkpoint within an alive supervision interval are allowed, then 
      missing checkpoint calls cannot be detected. The fault detection time is then infinite. 
     
     
    The worst case for a given configuration happens when 
    >  the time between the calls of WdgM_MainFunction() is always 
    WdgMTriggerConditionValue, 
    >  WdgM_MainFunction() with alive supervision is called, 
    >  all checkpoints scheduled for the alive supervision interval are passed immediately 
    afterwards, and 
    >  the fault happens immediately after the last checkpoint. 
     
     
     
    Note 
    Then the maximum fault detection time is almost: 
     
    2 ∗  WdgMTriggerConditionValue  ∗  WdgMSupervisionReferenceCycle 
     
     
     
    For  WdgMSupervisionReferenceCycle  =  2,  the  fault  detection  time  is  (almost)  4  * 
    WdgMTriggerConditionValue. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    30 
    based on template version 5.12.0 







    Technical Reference MICROSAR WDGM 
    n n
    n
    oi
    n oi
    n
    o
    io si
    n
    si
    n
    is
    t v
    io v
    ion iv
    er
    t er
    p
    p
    t er
    nc u
    ctio
    u
    ctio
    c p
    s
    n
    nc s
    n
    us
    e
    n
    v
    e
    i
    vi
    ev
    al
    Passed
    Fu
    al
    Missed
    Fu
    i
    al
    h
    Fu
    t
    h
    i
    in
    ti
    in
    ht
    ainFu
    i
    W
    checkpoint
    W
    checkpoint
    Ma
    ainFu
    Ma
    ain W
    _M
    _M
    gM_
    gM_
    _M
    gM
    gM
    d
    Wd
    Wd
    d
    gM
    d
    W
    W
    W
    TriggerCondition
    TriggerCondition
    TriggerCondition
    TriggerCondition
    Value (1st 
    Value (2nd 
    Value (3rd 
    Value (4th 
    supervision cycle)
    supervision cycle)
    supervision cycle)
    supervision cycle)
    alive supervision interval
    alive supervision interval
    WdgM fault detection time
     
    Figure 2-14   
    Alive supervision fault detection time 
    2.3.9.2 
    Deadline Supervision Fault Detection Time 
    Assume  that  a  fault  occurs  that  leads  to  a  deadline  violation.  The WdgM  fault  detection 
    time is the sum of the time spans 
    >  from the fault to the end of the current deadline interval set by the previous checkpoint 
    and 
    >  from the end of the current deadline interval to the next call of 
    WdgM_MainFunction() at the end of a supervision cycle. 
    The worst case for a given configuration happens when 
    >  the time between the calls of WdgM_MainFunction() is always 
    WdgMTriggerConditionValue, 
    >  a new supervision cycle starts and 
    >  a checkpoint is passed immediately afterwards (setting a new deadline interval for the 
    next checkpoint), and 
    >  the fault happens immediately after the checkpoint. 
    Then the fault detection time comprises 
    >  (almost all of) the supervision cycle where the fault occurred, 
    >  all supervision cycles up to the supervision cycle where the deadline interval ends, 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    31 
    based on template version 5.12.0 







    Technical Reference MICROSAR WDGM 
    >  including the complete supervision cycle where the deadline interval ends, because 
    the fault is detected at the end of this supervision cycle. 
     
     
     
    Note 
    Then the maximum fault detection time is almost: 
     
    (𝑛𝑟 + 1) ∗  WdgMTriggerConditionValue  
    Where the end of the deadline interval is 𝑛𝑟 supervision cycles after the successfully 
    passed checkpoint. 
     
     
     
    For 𝑛𝑟 = 3, the Fault Detection Time is (almost) 4 * WdgMTriggerConditionValue. 
    n
    n
    n
    n
    n
    ctio
    ctio
    ctio
    ctio
    n
    n
    n
    n
    ctio
    End of
    n
    Fu
    Passed
    Fu
    Fu
    Fu
    deadline
    Fu
    in
    in
    in
    in
    checkpoint
    interval
    in
    Ma
    Ma
    Ma
    Ma
    Ma
    gM_
    gM_
    gM_
    gM_
    gM_
    Wd
    Wd
    Wd
    Wd
    Wd
    TriggerCondition
    TriggerCondition
    TriggerCondition
    TriggerCondition
    Value (1st 
    Value (2nd 
    Value (3rd 
    Value (4th 
    supervision cycle)
    supervision cycle)
    supervision cycle)
    supervision cycle)
    WdgM fault detection time
     
    Figure 2-15   
    Deadline supervision fault detection time 
    2.3.9.3 
    Program Flow Supervision Fault Detection Time 
    Assume  that  a  fault  occurs  that  leads  to  a  program  flow  violation.  The  WdgM  fault 
    detection time is the sum of the time spans 
    >  from the fault to the call of the next but unscheduled checkpoint and 
    >  from this checkpoint to the next call of WdgM_MainFunction() at the end of the 
    current supervision cycle. 
    The worst case for a given configuration happens when 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    32 
    based on template version 5.12.0 








    Technical Reference MICROSAR WDGM 
    >  the time between the calls of WdgM_MainFunction() is always 
    WdgMTriggerConditionValue, 
    >  a new supervision cycle starts, 
    >  a scheduled checkpoint is passed immediately afterwards and 
    >  the fault happens immediately afterwards. 
     
     
     
    Note 
    Then the maximum fault detection time is almost: 
     
    (𝑠𝑐 + 1) ∗  WdgMTriggerConditionValue  
    Where the unscheduled checkpoint is passed 𝑠𝑐 supervision cycles after the scheduled 
    checkpoint. 
     
     
     
    For 𝑠𝑐 = 2, the fault detection time is (almost) 3 * WdgMTriggerConditionValue. 
    n
    n
    n
    n
    ctio
    ctio
    ctio
    ctio
    n
    n
    n
    n
    Fu
    Scheduled
    Fu
    Fu
    Unscheduled
    Fu
    in
    in
    in
    in
    checkpoint
    checkpoint
    Ma
    Ma
    Ma
    Ma
    gM_
    gM_
    gM_
    gM_
    Wd
    Wd
    Wd
    Wd
    TriggerCondition
    TriggerCondition
    TriggerCondition
    Value (1st 
    Value (2nd 
    Value (3rd 
    supervision cycle)
    supervision cycle)
    supervision cycle)
    WdgM fault detection time
     
    Figure 2-16   
    Program flow supervision fault detection time 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    33 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    2.3.10  Fault Reaction Time Evaluation 
    The WdgM fault reaction time is evaluated differently for the various monitoring features as 
    shown in this section. 
     
     
     
    Note 
    This section does not discuss Wdg device resets due to a WdgM error (like DET 
      errors). The section does also not discuss resets using Appl_Mcu_PerformReset(). 
     
     
     
    The WdgM fault reaction time spans 
    >  from the end of the WdgM fault detection time 
    >  to the error escalation to the WdgIf (excluding the processes performed in WdgIf). 
    The error is escalated to the WdgIf through 
    >  a call of WdgIf_SetTriggerWindow(DeviceIndex, 0,0) (if 
    WDGM_IMMEDIATE_RESET is STD_ON) or 
    >  discontinuing of the Wdg device triggers (if WDGM_IMMEDIATE_RESET is STD_OFF). 
    The following assumptions take place here: 
    >  A violation from a fault continues until the error is escalated. Discontinuing a violation 
    before error escalation results in a recovery to OK. 
    >  Each monitored supervised entity is active all the time. Deactivation of a supervised 
    entity aborts the monitoring of this supervised entity. Activation of a supervised entity 
    resumes the monitoring with OK.   
    The WdgM fault reaction times of the different monitoring features do not affect each other 
    (except  that  the  error  escalation  of  one  monitoring  violation  aborts  all  other  monitoring 
    violations). 
     
    2.3.10.1  Alive Supervision Fault Reaction Time 
    If  a  call  of  WdgM_MainFunction()ends  the  fault  detection  time  and  starts  the  fault 
    reaction time, then  
    the error is escalated by WdgM_MainFunction() i supervision cycles later,  
    where 
     
    i 

    (WdgMSupervisionReferenceCycle 

    WdgMFailedSupervisionRefCycleTol) 

    WdgMExpiredSupervisionCycleTol. 
     
    In 
    the 
    worst 
    case, 
    every 
    supervision 
    cycle 
    has 
    the 
    length 
    of 
    WdgMTriggerConditionValue. 
    The 
    fault 
    reaction 
    time 
    is 
    then 
    WdgMTriggerConditionValue * i, where i is as defined above. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    34 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    2.3.10.2  Deadline Supervision Fault Reaction Time 
    If  a  call  of  WdgM_MainFunction()  ends  the  fault  detection  time  and  starts  the  fault 
    reaction time, then  
    the error is escalated by WdgM_MainFunction() i supervision cycles later, 
    where  
     
    i  =  (WdgMDeadlineReferenceCycle  *  WdgMFailedDeadlineRefCycleTol)  + 
    WdgMExpiredSupervisionCycleTol. 
     
    In 
    the 
    worst 
    case, 
    every 
    supervision 
    cycle 
    has 
    the 
    length 
    of 
    WdgMTriggerConditionValue. 
    The 
    fault 
    reaction 
    time 
    is 
    then 
    WdgMTriggerConditionValue * i, where i is as defined above. 
     
    2.3.10.3  Program Flow Supervision Fault Reaction Time 
    If  a  call  of  WdgM_MainFunction()  ends  the  fault  detection  time  and  starts  the  fault 
    reaction time, then 
    the error is escalated by WdgM_MainFunction() i supervision cycles later, 
    where  
    i 

    (WdgMProgramFlowReferenceCycle 

    WdgMFailedProgramFlowRefCycleTol) 

    WdgMExpiredSupervisionCycleTol. 
     
    In 
    the 
    worst 
    case, 
    every 
    supervision 
    cycle 
    has 
    the 
    length 
    of 
    WdgMTriggerConditionValue. 
    The 
    fault 
    reaction 
    time 
    is 
    then 
    WdgMTriggerConditionValue * i, where i is as defined above. 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    35 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    2.3.11  Reset Path and Safe State 
    The safe state is entered as a result of an MCU reset. The WdgM builds its functionality on 
    a reliable and robust reset path. The WdgM default reset path uses the Watchdog Device 
    itself through the WdgIf. The Watchdog Device can be either an external chip or an MCU-
    internal controller. The system integrator can additionally set a secondary path by adding 
    the  parameter  WDGM_SECOND_RESET_PATH  =  STD_ON.  The  secondary  reset  path  is 
    used when the Watchdog Interface returns an error response. This error response can be 
    caused by communication errors to the external Watchdog device. 
     
    Figure 2-17   Primary and secondary reset path of the WdgM 
    The WdgM uses the primary reset path for a regular Watchdog-initiated reset and also for 
    an immediate MCU reset. The primary reset path is the preferred path, because it is part of 
    the  WdgM  software  and  thus  safe.  The  MCU  driver  with  the  AUTOSAR  function 
    Appl_Mcu_PerformReset() must guarantee freedom from interference. 
    The secondary reset path is optional. It is used when the primary reset path signals a fault. 
    The WdgM safe state is the MCU reset state. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    36 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
     
    Note 
    The WdgM safe state is not necessarily the system safe state. 
     
     
     
    The WdgM can invoke the safe state in two ways: 
    >  MCU reset after watchdog timeout by discontinuing watchdog triggering. 
    >  Immediate MCU reset by an immediate  watchdog reset. The immediate reset  can be 
    configured. 
    2.3.12  WdgM Local Entity State 
    Every  supervised  entity  has  a  local  state  that  expresses  the  occurrence  of  detected 
    violations: 
    State 
    Description 
    OK 
    No violation has been detected 
    FAILED 
    A violation has been detected, the reset is pending within a delay time (maybe 0 
    ticks) and the violation repeats. 
    EXPIRED 
    A violation has repeated throughout the delay time. A reset is inevitable. 
    Table 2-1   WdgM Local Entity Stats 
    AUTOSAR allows configuring a tolerance delay after an alive counter violation has been 
    detected.  See  [1]  for  detailed  information.  AUTOSAR  does  not  allow  configuring  such 
    tolerances  for  program  flow  and  deadline  violations.  The WdgM  allows  configuring  such 
    tolerances for all three monitoring features described below: 
    >  Once a violation has been detected, the WdgM changes its state from  OK to FAILED 
    and starts a so-called tolerance time, which is configured as follows: 
    The tolerance time is the supervision reference cycle (according to the monitoring feature) 
    multiplied by a supervision reference cycle tolerance value. 
    >  As  long  as  the  violation  repeats  within  the  tolerance  time  at  least  every  supervision 
    reference cycle, the WdgM stays in the state FAILED. 
    >  If  the  violation  does  not  occur  in  a  supervision  reference  cycle  within  the  tolerance 
    delay,  the  WdgM  returns  to  the  state  OK  as  if  no  violation  had  happened.  Only  the 
    status change is logged. 
    >  If  the  violation  has  repeated  to  the  end  of  the  tolerance  time,  the  WdgM  enters  the 
    state EXPIRED. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    37 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
    Figure 2-18   Modified state machine 
     
     
     
    Note 
    The AUTOSAR implementation can be simulated for deadline and program flow 
      violations with 
    reference cycle = reference cycle tolerance = 0 
     
     
     
    The exact names of the configuration fields for the tolerance delay are: 
    Monitoring 
    Reference Cycle 
    Reference Cycle Tolerance 
    Alive Supervision 
    WdgMSupervisionReferenceCycle  WdgMFailedSupervisionRefCycleTol 
    Program Flow 
    WdgMProgramFlowReferenceCycle  WdgMFailedProgramFlowRefCycleTol 
    Supervision 
    Deadline Supervision 
    WdgMDeadlineReferenceCycle 
    WdgMFailedDeadlineRefCycleTol 
    Table 2-2   Names of configuration fields 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    38 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    2.3.13  WdgM Global State 
    The  local  states  are  periodically  summarized  in  a  WdgM  global  state.  If  all  supervised 
    entities have the state OK, then the global state is OK. When at least one supervised entity 
    changes to the state FAILED, then the global state becomes FAILED. When at least one 
    supervised  entity  changes  to  the  state  EXPIRED,  the  global  state  becomes  EXPIRED. 
    Once the global state is EXPIRED, the WdgM continues the delay until it enters the state 
    STOPPED. This is when the WdgM stops triggering the Watchdog (or resets it). The delay 
    is the supervision cycle multiplied by the configurable expired supervision cycle tolerance 
    (parameter WdgMExpiredSupervisionCycleTol). 
    Once in the state STOPPED, the WdgM brings the system to the safe state by performing a 
    system reset through the WdgIf module and, thus, through the watchdog device(s) in the 
    system. If the preprocessor option WDGM_SECOND_RESET_PATH is set to STD_ON and the 
    WdgIf reports a failure, then the system goes into a safe state through the MCU module. 
     
     
     
    Note 
    In a multi-core system, each Watchdog Manager instance running on a particular 
      processor core builds a separate global state independently of the other processor 
    cores. 
     
     
     
    2.3.14  Basic Operation of the WdgM Stack 
    The  WdgM  is  the  upper  layer  of  the  WdgM  Stack.  As  described  above,  the  WdgM  is 
    responsible  for  monitoring  applications  through  preconfigured  supervised  entities.  The 
    result of this monitoring is usually translated into servicing one or more watchdog devices 
    through  the  rest  of  the WdgM  Stack  –  the Watchdog  Interface  (WdgIf)  and  one  or  more 
    Watchdog Drivers (Wdg). 
    Figure 2-19 shows a possible WdgM Stack configured to run on a microcontroller with two 
    watchdog devices, an internal and an external one. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    39 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-19   Example of an WdgM Stack configuration 
    Figure 2-20 shows the behavior of the WdgM Stack. 
    First, the Wdg drivers configured in the system are initialized. Then the WdgM is initialized, 
    and it calls the SetMode functions of each configured driver during its initialization. During 
    runtime,  the  monitored  applications  report  to  the  WdgM  by  calling  the  function 
    WdgM_CheckpointReached() or directly via RTE. During this call, the program flow and 
    part  of  the  deadline  supervision  is  evaluated  (see  compute  SE  local  state  #1  in  Figure 
    2-20).  
    In  each  supervision  cycle,  WdgM_MainFunction()  is  called.  It  evaluates  the 
    status  of  each  supervised  entity,  the  rest  of  deadline  supervision  and  alive  supervision 
    (see compute SE local states #2 in Figure 2-20) and, based on this, it computes the global 
    state. Depending on the global state,  the configured watchdogs are  either serviced,  or a 
    reset  is  deliberately  caused.  The  latter  is  done  either  by  omitting  the  servicing  or  by 
    instructing  the  watchdog  to  make  a  reset  right  away  (for  more  information  refer  to 
    parameter WdgMImmediateReset). 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    40 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-20   Behavior of the WdgM Stack 
    2.4 
    WdgM in Multi-Core Systems 
    The WdgM can be used in single-core and multi-core systems. Each processor core to be 
    monitored  by  the  WdgM  runs  a  separate  WdgM  instance.  This  is  as  if  we  had  several 
    independent  WdgM  Stacks  running  on  the  processor  cores.  It  is  not  necessary  that  the 
    WdgM Stack runs on each processor core. It can be configured to run on a subset of them 
    only where monitoring of supervised entities is required. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    41 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Each WdgM instance runs independently of the others and must be initialized with its own 
    configuration. It has its own time base and calls the WdgM_MainFunction() separately. 
    If  the  WdgM  is  configured  to  run  on  a  multi-core  system,  then  an  internal  preprocessor 
    option  (WDGM_MULTICORE_USAGE)  is  automatically  set  to  STD_ON. Thus,  the  embedded 
    code can handle several processor cores. Otherwise, this option is set to STD_OFF, which 
    optimizes the code for a single-core system. The optimizations are done even if the WdgM 
    is configured to run only on one core in a multi-core environment. 
    In order to configure the WdgM (ECU description file) to run on several processor cores in 
    a  multi-core  system,  a  separate  WdgMConfigSet  container  needs  to  be  configured  for 
    each core. The WdgMConfigSet container has a WdgMMode subcontainer (note, that only 
    one is allowed), which identifies the processor core that it is configured to run on only one 
    core of a multi-core system. 
    Note,  that  the WdgMGeneral  container  which  contains  general  configuration  parameters 
    as  well  as  the  supervised  entities  in  the  system  is  one  for  all  configured  cores.  Each 
    supervised entity can be used on one core only and must have a unique ID in the system. 
    As  the  WdgM  instances  run  independently  on  the  different  processor  cores,  each 
    supervised entity in the system is configured for one processor core and can be used only 
    on  that  core.  Global  transitions  between  supervised  entities  are  allowed  only  for 
    supervised entities running on the same processor core. 
    There are 2 different concepts on how the WdgM Stack can react to detected violations, 
    the independent and combined core reaction concept. 
    The  independent  core  reaction  concept  says  that  each  WdgM  instance  controls  one  or 
    more  watchdogs.  It  builds  an  independent  global  state  and  decides  on  triggering  its 
    watchdog(s) or causing a deliberate reset. Whether a processor core reset or system reset 
    is issued, depends on the hardware configuration and not on the WdgM. 
    Figure 2-21 shows the operation of the WdgM on a multi-core system (independent core 
    reaction). 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    42 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
     deployment WdgM stack on multi-core - independent core reaction
    «device»
    Microcontroller - independent core reaction
    independet core reaction
    «device»
    «device»
    core 0
    core 1
    WdgM
    WdgM
    WdgIf
    WdgIf
    Wdg
    Wdg
    «device»
    «device»
    int Wdg 0
    int Wdg 1
     
    Figure 2-21   
    WdgM Stack on a multi-core system configured for independent core reaction 
    The  combined  core  reaction  concept  declares,  that  each  WdgM  instance  independently 
    builds a global state of its processor core and the several global states are then combined 
    >  either by hardware (e.g. a special hardware module in the microcontroller reading the 
    states of the internal watchdog devices of each processor core) 
    >  by software (e.g. a special watchdog driver that is called on each processor core and 
    that combines the status of each core into a single reaction) 
    Combining the WdgM status on each core in hardware is strongly hardware- dependent, 
    and its applicability can vary from microcontroller to microcontroller. 
    Combining the WdgM status on each core in software can be done with the feature State 
    Combiner of the underlying WdgIf module. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    43 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    2.4.1 
    State Combiner 
    The  State  Combiner  is  a  special  hardware-independent  peace  of  software  that  is 
    implemented  as  an  additional  feature  of  the  WdgIf  module.  On  one  core,  the  State 
    Combiner  is  configured  to  work  in  master  mode  in  order  to  control  the  actual  watchdog 
    device. The instances of the State Combiner on the other cores are configured to work in 
    slave mode. They do not trigger but communicate with the master State Combiner only via 
    shared  memory.  The  State  Combiner  on  the  master  core  will  only  allow  triggering  the 
    actual  watchdog  device  if  the  global  status  of  the WdgM  instances  on  all  cores  is  other 
    than STOPPED. In other words, as soon as at least one core has detected an irreparable 
    error and requests a reset, the actual watchdog device will not be serviced anymore (or an 
    explicit  reset  will  be  initiated  depending  on  the  ECUC  description  parameter 
    WdgMImmediateReset). 
     deployment WdgM stack on multi-core - combined core reaction
    «device»
    Microcontroller - combined core reaction
    combined core reaction
    «device»
    «device»
    «device»
    «device»
    core 0
    core 1
    core 2
    core 3
    WdgM
    WdgM
    WdgM
    WdgM
    WdgIf
    WdgIf
    WdgIf
    WdgIf
    State Combiner 
    State Combiner 
    State Combiner 
    (master)
    (slav e)
    (slav e)
    write core
    read state of
    write core 1
    2 state
    slave cores
    state
    Wdg ext.
    Wdg int.
    «device»
    Shared Memory
    «device»
    Wdg int.
    «device»
    Wdg ext.
     
    Figure 2-22   
    WdgM Stack on a multi-core system using the State Combiner for a combined core reaction 
    Figure  2-23  shows  the  dynamic  behavior  of  a  WdgM  running  on  2  cores  with  a  State 
    Combiner for a combined core reaction. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    44 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 2-23   Dynamic Behavior on a multi-core system using the State Combiner for a combined core reaction 
    For more information on the State Combiner refer to the WdgIf User Manual [4]. 
     
    2.4.2 
    AUTOSAR Debugging 
    AUTOSAR Debugging allows debugging the WdgM module by granting it access to certain 
    module  internal  variables.  This AUTOSAR  feature  is  extended  for  the  WdgM  by  adding 
    special  functions  that  make  the  debugging  process  or  tracing  detected  by  the  WdgM 
    violations easier. 
    Variables accessible for debugging: 
    >  The local monitoring status of each supervised entity is accessible through the API 
    WdgM_GetLocalStatus() 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    45 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    >  WdgMConfigPtr -> WdgMSupervisedEntityRef[SEID] 
    .EntityStatusGRef -> LocalMonitoringStatus 
    >  The global monitoring status: accessible through the API 
    WdgM_GetGlobalStatus() or WdgMConfigPtr -> DataGRef -> 
    GlobalMonitoringStatus 
    >  The alive counters of each checkpoint of a supervised entity: WdgMConfigPtr -> 
    WdgMSupervisedEntityRef[SEID].WdgMCheckpointRef[CPID]. 
    WdgMAliveLRef -> AliveCounter 
    >  The time when the initial CP of an SE has been reached: WdgMConfigPtr-> 
    WdgMSupervisedEntityRef[SEID].EntityStatusLRef -> 
    RememberedInitialCheckpointTime 
    >  The time when the most recent CP of an SE has been reached: WdgMConfigPtr -> 
    WdgMSupervisedEntityRef[SEID].EntityStatusLRef -> 
    RememberedCheckpointTime 
    >  The most recently reached CP of an SE: WdgMConfigPtr -> 
    WdgMSupervisedEntityRef[SEID].EntityStatusLRef -> RememberedCheckpointId 
     
     
    Note 
    SEID is the ID of an SE. CPID is the ID of a CP. WdgMConfigPtr is a pointer to the 
      configuration with which the WdgM was initialized. 
     
     
     
    Additional debugging feature (not defined in AUTOSAR): 
    >  The  function  WdgM_  WdgM_GetFirstExpiredSEViolation()  provides  a  way  to  detect 
    what  kind  of  violation caused  the first  SE  in  the  system  to  change  its  local  status  to 
    WDGM_LOCAL_STATUS_EXPIRED:  program  flow,  deadline,  alive  supervision  or  a 
    combination between them. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    46 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    3  Functional Description 
    The  WdgM  monitors  safety-relevant  applications  on  the  ECU.  The  WdgM  is  a  basic 
    software  module  at  the  service  layer  of  the  standardized  basic  software  architecture  of 
    AUTOSAR. The WdgM monitors the program flow of a configurable  number of  so-called 
    supervised  entities  (SE).  When  the  WdgM  detects  a  violation  of  the  preconfigured 
    temporal  or  logical  constraints  in  the  program  flow,  it  takes  a  number  of  configurable 
    actions to log the fault and to go to a safe state after a configurable time delay. The safe 
    state is reached by resetting the watchdog or by omitting watchdog triggering. 
    Every supervised entity has a defined control flow. Significant points in this control flow are 
    represented by checkpoints (CP). This means the control flow can be modeled as a graph, 
    with  the  checkpoints  being  the  nodes  and  the  pieces  of  code  in  between  being  the 
    transitions (see Figure 2-4 for an example). 
    The WdgM configuration defines the allowed transitions between the checkpoints, and the 
    timing constraints for these transitions 
    >  within every supervised entity (local transitions) 
    >  between checkpoints of different supervised entities (global transitions) 
    The supervised entities have to report to the WdgM when they have reached a checkpoint. 
    Thus, the developer has to insert calls at the checkpoints that pass this information to the 
    WdgM. 
    The WdgM  functionality  partially  deviates  from  the AUTOSAR  requirements.  For  details, 
    refer to Section Deviations from the AUTOSAR 4.0.1 Watchdog Manager. 
    3.1 
    Features 
    The features listed in the following tables cover the functionality specified for the WdgM. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    Vector  Informatik  provides  further  WdgM  functionality  beyond  the  AUTOSAR  standard. 
    The corresponding features are listed in the table 
    >  Table 3-2   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    >  
    Services to initialize the WdgM 
    >  Functionality for: 
    >  Alive Supervision 
    >  Deadline Supervision 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    47 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    Supported AUTOSAR Standard Conform Features 
    >  Program Flow Supervision 
    Table 3-1   Supported AUTOSAR standard conform features 
     
     
    Caution 
    Deadline Supervision and Program Flow Supervision can only be used if the additional 
      feature “WdgM_ProgramFlowAndDeadlineMonitoring” is licensed. 
    (See also sections Deadline Supervision and Program Flow Supervision) 
     
     
     
    3.1.1 
    Deviations from the AUTOSAR 4.0.1 Watchdog Manager 
    The  WdgM  is  compatible  with  the  AUTOSAR  4.0.1  Watchdog  Manager,  but  not  fully 
    compliant. This has the following reasons: 
    >  The  AUTOSAR  specification  does  not  define  functionality  comprehensively  and 
    precisely enough for implementation (e.g. global transitions). 
    >  The AUTOSAR specification does not contain certain functionality (e.g. program flow, 
    deadline supervision recovering). 
    >  The AUTOSAR specification defines an approach that  is very complex to be handled 
    by the user or consumes too much run time (WdgM mode switching). 
    >  The  AUTOSAR  specification  does  not  fully  consider  safety  requirements  (e.g. 
    windowed Watchdog Trigger). 
    Below you can find the deviations from the AUTOSAR 4.0.1 Watchdog Manager in detail: 
    3.1.1.1 
    Entities, Checkpoints and Transitions 
    >  For  periodical  watchdog  triggering  at  least  one  supervised  entity  and  one  checkpoint 
    should be defined. 
    >  In contrast to AUTOSAR, local activity flags of the supervised entities are set back to 
    FALSE every time an end checkpoint of this supervised entity is reached as specified 
    in later versions of the WdgM. Analogously, the global activity flag is set back to FALSE 
    as soon as a global end checkpoint is reached. 
    >  Local  initial  checkpoints  cannot  have  incoming  local  transitions,  but  they  can  have 
    incoming global transitions. 
    >  Local  end  checkpoints  cannot  have  outgoing  local  transitions,  but  they  can  have 
    outgoing global transitions. 
    >  If global transitions are used, then there must be exactly one global initial checkpoint. 
    >  The  global  initial  checkpoint  should  be  called  before  any  other  global  checkpoint  is 
    invoked. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    48 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    >  If a non-initial checkpoint of a supervised entity is reached and this supervised entity is 
    not  active,  then  this  is  considered  to  be  a  program  flow  violation  in  this  supervised 
    entity. 
    >  If a checkpoint is the source for a local and a global transition, then only one of the two 
    transitions  can  occur.  The  other  one  is  considered  a  program  flow  violation.  This  is 
    because  the  program  flow  cannot  split  into  2  paths.  If,  for  example,  a  new  task  is 
    started from a CP1 (global transition to CPnew) and the original task continues (local 
    transition to CP2), then the sequence following the sequences of checkpoint hits is not 
    allowed: 
    >  CP -> CPnew -> CP2 and 
    >  CP -> CP2 -> CPnew. 
    >  If a local initial checkpoint is the destination checkpoint for a global transition, then the 
    checkpoint must be hit by following the global transition. There is a dilemma, though: If 
    several  supervised  entities  form  a  cycle  of  transitions,  with  each  supervised  entity 
    entered via a global transition from the previous supervised entity, then there is no way 
    to start the cycle, because no local initial checkpoint is allowed to be hit in a way other 
    than via the global transition. The solution is an exception in the WdgM: A local initial 
    checkpoint can be hit, not coming through the global transition, if it is also the global 
    initial checkpoint. 
    >  As  in  AUTOSAR,  the  WdgM  needs  a  time  source  in  order  to  measure  transition 
    deadlines. Whereas AUTOSAR does not define the source for ticks, the WdgM allows 
    the user to choose between three tick sources: 
    >  Internal software source 
    >  External tick source 
    >  OsCounter source 
    For details see Section Deadline Measurement and Tick Counter. 
    The  checkpoint  and  entity  identifiers  are  zero-based  and  increase  the  list  of  integer 
    numbers without gaps. 
    >  Deadline  supervision  is  bound  to  program  flow.  Only  if  program  flow  transitions  are 
    configured, it is possible to configure transition deadlines. 
    >  The local/global end checkpoint does not need to be defined. 
    >  Either zero or maximum one global initial checkpoint can be configured. So there can 
    be zero or one global graph. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    49 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    3.1.1.2 
    Watchdog and Reset 
    >  For safety reasons, the WdgM uses the primary watchdog reset as an immediate reset 
    (WDGM_IMMEDIATE_RESET  =  STD_ON).  In  contrast,  the  AUTOSAR  Watchdog 
    Manager uses the external function Mcu_PerformReset(). 
    The 
    WdgM 
    does 
    not 
    support 

    partition 
    reset 
    with 
    BswM_WdgM_RequestPartitionReset(). 
    3.1.1.3 
    API 
    >  The WdgM function WdgM_SetMode() switches the trigger mode only. This relates to 
    the fields 
    >  WdgMTriggerConditionValue 
    >  WdgMTriggerWindowStart (not used – shall be configured with 0) 
    >  WdgMWatchdogMode 
    >  It does not change the set of supervised entities. This can be simulated by activating 
    and deactivating different sets of supervised entities for different modes. 
    >  For safety and complexity reasons, the function WdgM_DeInit() is not implemented. 
    >  The status reporting mechanism is configurable.  
    On one hand mode ports can be used to notify applications / SWCs etc. about status 
    changes as specified in AUTOSAR. On the other hand the WdgM can be configured to 
    use direct callback notification to report a local and global state change. 
    >  The  WdgM  checks  the  configuration  independently  of  the  WdgMDevErrorDetect 
    parameter. This parameter enables/disables only the DET reporting. 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Functionality for multi-core handling 
    The WdgM allows tolerance delay for all three monitoring features. In AUTOSAR, this is 
    restricted to alive supervision. Tolerance delay allows recovering from program flow and deadline 
    violations as well as from alive counter violations. 
    The interpretation of the AUTOSAR parameter WdgMExpiredSupervisionCycleTol 
    implements a delay of (WdgMExpiredSupervisionCycleTol + 2) supervision cycles. The 
    WdgM implements a delay of WdgMExpiredSupervisionCycleTol supervision cycles. This 
    allows configuring no delay, with the tolerance value set to 0. 
    The WdgM provides the following function in addition to the AUTOSAR Debugging features: 
    WdgM_GetFirstExpiredSEViolation(). 
    The WdgM provides the functions WdgM_DeactivateSupervisionEntity() and 
    WdgM_ActivateSupervisionEntity() for deactivating and activating of the SE. These 
    functions are not AUTOSAR 4.0.1 compatible. 
    Table 3-2   Features provided beyond the AUTOSAR standard 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    50 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    3.2 
    Initialization 
    In  a  safety-related  system,  the  initialization  of  the  Watchdog  device  should  be  done  as 
    soon  as  possible  after  system  start  (at  least  before  a  QM  task  may  compromise  the 
    initialization  process).  The  Watchdog  device  starts  the  counter  for  the  next  expected 
    trigger. 
     
     
     
    Note 
    The  ways  how  the  Watchdog  device  is  initialized,  configured,  and  how  it  reacts  are 
      platform-dependent and can be different. See the corresponding Watchdog Driver User 
    Manual 
     
     
    The  time  between  the  initialization  of  the  Wdg  and  the  first  triggering  in  function 
    WdgM_MainFunction()  (supervision  cycle  0)  must  match  the  Watchdog  requirements. 
    This  time  can  be  adapted  in  the  Wdg  configuration  by  changing  the  initial  Wdg  trigger 
    window to meet the operating system start time requirements (see Figure 3-1). 
     
    Figure 3-1   Start phase of the WdgM 
    The y-axis in  Figure  3-1  shows the Wdg  counter value,  which  is reset after each trigger. 
    Then  the  countdown  runs  until  the  Wdg  is  triggered  again  (within  the  Wdg  initial  trigger 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    51 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    window  or Trigger  window)  or  0  (Wdg  reset  level)  is  reached  (i.e.  the  window  has  been 
    missed) so that a reset is performed. 
     
     
     
    Note
     
      
    Not  all  hardware  platforms  can  configure  a  different  trigger  time  for  the  first 
    supervision cycle (cycle 0). 
    >  In  the  first  supervision  cycle,  the  alive  counter  evaluation  can  be  suppressed  by 
    the parameter WDGM_FIRSTCYCLE_ALIVECOUNTER_RESET. 
    >  The  functions  WdgM_Init()  and  WdgM_MainFunction()  functions  can  be 
    placed inside a task, too. 
    >  The function Wdg_<...>_Init() can be placed before main(). 
    >  For  a  multi-core  system  the  WdgM_Init()  function  must  be  called  on  each 
    processor core once, with the valid configuration for this processor core. 
    >  The  WdgM_MainFunction()  called  periodically  on  each  processor  core,  on 
    which WdgM is running, with the configured period for this processor core. 
     
     
     
    After  the  execution  of  function  WdgM_Init()  the  supervision  of  configured  entities  is 
    activated and the checkpoints can be executed (called). 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    52 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
    3.3 
    Memory Sections 
    Memory  segmentation  into  sections  is  especially  important  when  memory  protection  is 
    used in the system. 
    The WdgM uses three basic RAM data sections: 
    1.  Memory sections for local data of every SE: This section contains local information 
    about  every  supervised  entity  and,  if  defined,  also  the  alive  counters.  These 
    variables are used by the WdgM_CheckpointReached() function and are part of the 
    private SWC (task, application) memory and written only in the context of this SWC. 
     
     
    Note 
      
    The WdgM does not protect this memory section. 
    >  For  a  multi-core  system,  the  local  data  section  for  a  SE  must  be 
    accessible from the core for which this SE is configured. 
     
     
     
    2.  Memory sections for global data: This section contains the WdgM global data such 
    as WdgM global status and timebase tick counter. It is a WdgM private memory.  
     
     
    Note 
    In  the  AUTOSAR  environment,  where  QM  and  safety-related  modules  are 
      used together, the WdgM global data should be placed in a so-called trusted 
    memory section to guarantee its safety and integrity. 
    >  For a multi-core system, the global data section is configured per mode, 
    i.e. separately for each processor core, on which the WdgM is running. 
     
     
     
    3.  Memory sections for global shared data: This section contains data such as the last 
    active  entity.  This  memory  must  be  writable  for  all  SWCs  using  the 
    WdgM_CheckpointReached()  function  and  for  the  WdgM_Init()  function.  As 
    this  is  a  memory  where  all  the  QM  SWCs  could  write,  the  WdgM  variables  are 
    protected  (stored  double-inverted)  by  the  WdgM  itself.  The  WdgM  checks  the 
    correctness of these variables with read operations. If a fault is detected, the WdgM 
    initiates a reset 
     
     
    Note 
    For a multi-core system, where several cores are configured for the WdgM, 
      the global shared section must be accessible by each of these cores. 
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    53 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 3-2   Memory usage of the WdgM 
    3.3.1 
    Memory Sections Details 
    Local entity memory:  
    Local  entity  data  is  supervised  entity  private  data.  This  is  the  data  where  the  function 
    WdgM_CheckpointReached()  writes.  The  WdgM  configuration  generator  provides 
    defines so that the status variables of every supervised entity can be placed in a separate 
    RAM 
    section. 
    The 
    declaration 
    of 
    every 
    entity 
    starts 
    with 
    defines 
    WDGM_SEi_START_SEC_VAR_* and ends with WDGM_SEi_STOP_SEC_VAR_*, where i is 
    the  ID  of  the  supervised  entity.  Theses  defines  are  in  the  generated  file 
    WdgM_OsMemMap.h. Hence, it must be included in the file MemMap.h. 
    If  the  entity  is  linked  to  an  OS  application  (through  its  ECU  description  parameter 
    WdgMAppTaskRef),  then  the  supervised  entity  data  is  placed  in  a  section  embedded  in 
    appl_name_START_SEC_VAR_* 
    and 
    appl_name_STOP_SEC_VAR_* 
    or 
    OS_START_appl_name_VAR_*  and  OS_STOP_appl_name_VAR  (if  MICROSAR  OS  as 
    of  version  Gen7),  where  appl_name  is  the  name  of  the  application.  In  this  case,  the 
    integrator must make sure to include the file Os_MemMap.h in file MemMap.h after the file 
    WdgM_OSMemMap.h. 
    Global  memory:  Global  data  are  private  WdgM  variables.  The  memory  mapping  defines 
    are WDGM_GLOBAL_START_SEC_VAR_* and WDGM_GLOBAL_STOP_SEC_VAR_*.  
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    54 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    This section can be mapped to an OS application (through its ECU description parameter 
    WdgMGlobalMemoryAppTaskRef). 
    For 
    this 
    mapping, 
    defines 
    appl_name_START_SEC_VAR_* 
    and 
    appl_name_STOP_SEC_VAR_* 
    or 
    OS_START_appl_name_VAR_*  and  OS_STOP_appl_name_VAR  (if  MICROSAR  OS  as 
    of version Gen7) are used, where appl_name is the name of the application. In this case, 
    the integrator must make sure to include the file Os_MemMap.h in file MemMap.h after the 
    WdgM_OSMemMap.h. 
    As  this  section  is  internally  not  protected  by  the  WdgM,  it  should  be  in  a  memory  area 
    where it cannot be corrupted. 
    Global shared memory: Global shared data should be placed in a RAM section where all 
    tasks  can  read  and  write  to  that  data.  For  a  multi-core  system,  the  global  shared  data 
    section must be accessible by each processor core. 
    The  memory  mapping  defines  are  WDGM_GLOBAL_SHARED_START_SEC_VAR_*  and 
    WDGM_GLOBAL_SHARED_STOP_SEC_VAR_*.  These  variables  are  internally  protected  by 
    the 
    WdgM. 
    For 
    this 
    mapping, 
    defines 
    GlobalShared_START_SEC_VAR_NOINIT_UNSPECIFIED 
    and 
    GlobalShared_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
    or 
    OS 
    OS_START_SEC_GLOBALSHARED_VAR_NOINIT_UNSPECIFIED 
    and 
    OS_STOP_SEC_GLOBALSHARED_VAR_NOINIT_UNSPECIFIED  (if  MICROSAR  OS  as  of 
    version Gen7) are used. 
    3.3.2 
    Code and Constants 
    Following memory sections need to be set up for WdgM’s code: 
    Section 
    Description 
    WDGM_START_SEC_CODE / 
    Set up manually, e.g. in MemMap.h. 
    WDGM_STOP_SEC_CODE 
     
     
    Table 3-3   Code and Constants 
    Following memory sections need to be set up for WdgM’s constants: 
    Section 
    Description 
    WDGM_START_SEC_CONST_32BIT / 
    Set up manually, e.g. in MemMap.h. 
    WDGM_STOP_SEC_CONST_32BIT  
     
    WDGM_START_SEC_CONST_UNSPECIFIED / 
    WDGM_STOP_SEC_CONST_UNSPECIFIED 
    Table 3-4   WdgM constants 
    3.3.3 
    Module Variables 
    3.3.3.1 
    Module Variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 
    Following memory sections need to be set up for WdgM’s module variables: 
    Section 
    Description 
    WDGM_GLOBAL_START_SEC_VAR_32BIT_ 
    If 
    the 
    ECU 
    description 
    parameter 
    COREn_PRIVATE / 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    55 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Section 
    Description 
    WDGM_GLOBAL_STOP_SEC_VAR_32BIT_ 
    WdgMGlobalMemoryAppTaskRef 
    is  set, 
    COREn_PRIVATE 
    then these sections are renamed according to 
    WDGM_GLOBAL_START_SEC_VAR_NOINIT_ 
    the  configured  OS  application  (prefix 
    UNSPECIFIED_COREn_PRIVATE / 
    “WDGM_GLOBAL_” 
    is 
    converted 
    to 
    WDGM_GLOBAL_STOP_SEC_VAR_NOINIT_ 
    “<OSApp>_”,  where  <OSApp>  is  the  name  of 
    UNSPECIFIED_COREn_PRIVATE 
    the OS application; suffix “_COREn_PRIVATE” 
    is  removed)  and  generated  as  part  of 
    WdgM_OsMemMap.h.  Otherwise  they  need  to 
    be set manually, e.g. in MemMap.h. 
    The suffix ”_COREn_PRIVATE“ corresponds to 
    the processor core for which the OS 
    application is configured. 
    WDGM_GLOBAL_SHARED_START_SEC_VAR_ 
    These sections are always assigned in the 
    NOINIT_UNSPECIFIED / 
    generated file WdgM_OsMemMap.h to OS 
    WDGM_GLOBAL_SHARED_STOP_SEC_VAR_ 
    sections and renamed to: 
    NOINIT_UNSPECIFIED 
    GlobalShared_START_SEC_VAR_UNSPECI
    FIED / 
    GlobalShared_STOP_SEC_VAR_UNSPECIF
    IED 
    WDGM_START_SEC_VAR_NOINIT_16BIT / 
    Set up manually, e.g. in MemMap.h. Used only 
    WDGM_STOP_SEC_VAR_NOINIT_16BIT 
    for AUTOSAR Debugging. Must be read/write 
    WDGM_START_SEC_VAR_NOINIT_8BIT / 
    accessible from the WdgM main functions 
    WDGM_STOP_SEC_VAR_NOINIT_8BIT 
    executed on each processor core. 
     
    Table 3-5   Module variables with MICROSAR Os Gen6 / AUTOSAR Os version 4.0 
    3.3.3.2 
    Module Variables with MICROSAR Os Gen7 / AUTOSAR Os version 4.2 
    Following memory sections need to be set up for WdgM’s module variables: 
    Section 
    Description 
    WDGM_GLOBAL_START_SEC_VAR_32BIT_ 
    If 
    the 
    ECU 
    description 
    parameter 
    COREn_PRIVATE / 
    WdgMGlobalMemoryAppTaskRef 
    is  set, 
    WDGM_GLOBAL_STOP_SEC_VAR_32BIT_ 
    then these sections are renamed according to 
    COREn_PRIVATE 
    the 
    configured 
    OS 
    application. 
    WDGM_GLOBAL_START_SEC_VAR_NOINIT_ 
    “WDGM_GLOBAL_START_SEC_ 

    UNSPECIFIED_COREn_PRIVATE / 
    WDGM_GLOBAL_STOP_SEC_”  is  converted  to 
    WDGM_GLOBAL_STOP_SEC_VAR_NOINIT_ 
    UNSPECIFIED_COREn_PRIVATE
    ”OS_START_SEC_“<OSApp>_ 

     
    OS_STOP_SEC_“<OSApp>_”,  where  <OSApp> 
    is  the  name  of  the  OS  application;  suffix 
    “_COREn_PRIVATE”  is  removed.  This  is 
    generated as part of WdgM_OsMemMap.h.  
    WDGM_GLOBAL_SHARED_START_SEC_VAR_ 
    These sections are always assigned in the 
    NOINIT_UNSPECIFIED / 
    generated file WdgM_OsMemMap.h to OS 
    WDGM_GLOBAL_SHARED_STOP_SEC_VAR_ 
    sections and renamed to: 
    NOINIT_UNSPECIFIED 
    OS_START_SEC_GLOBALSHARED_VAR_NOIN
    IT_UNSPECIFIED / 
    OS_STOP_SEC_GLOBALSHARED_VAR_NOINI
    T_UNSPECIFIED 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    56 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Section 
    Description 
    WDGM_START_SEC_VAR_NOINIT_16BIT / 
    Set up manually, e.g. in MemMap.h. Used only 
    WDGM_STOP_SEC_VAR_NOINIT_16BIT 
    for AUTOSAR Debugging. Must be read/write 
    WDGM_START_SEC_VAR_NOINIT_8BIT / 
    accessible from the WdgM main functions 
    WDGM_STOP_SEC_VAR_NOINIT_8BIT 
    executed on each processor core. 
     
    Table 3-6   Module variables MICROSAR Os Gen7 / AUTOSAR Os version 4.2 
     
    3.3.4 
    Supervised Entity Variables 
    3.3.4.1 
    Supervised Entity Variables with MICROSAR Os Gen6 / AUTOSAR Os 
    version 4.0 

    Following memory sections need to be set up for WdgM’s supervised entity variables: 
    Section 
    Description 
    WDGM_SEi_START_SEC_VAR_NOINIT 
    If the ECU description parameter 
    _32BIT_COREn_PRIVATE / 
    WdgMAppTaskRef corresponding to supervised 
    WDGM_SEi_STOP_SEC_VAR_NOINIT_ 
    entity with ID “i” configured for core ID “n” is set, 
    32BIT_COREn_PRIVATE 
    then these sections are renamed according to the 
    WDGM_SEi_START_SEC_VAR_NOINIT 
    configured OS application (prefix “WDGM_SEi_” is 
    _UNSPECIFIED_COREn_PRIVATE / 
    converted to “<OSApp>_”, where <OSApp> is the 
    WDGM_SEi_STOP_SEC_VAR_NOINIT_ 
    name of the OS application; suffix 
    UNSPECIFIED_COREn_PRIVATE 
    “_COREn_PRIVATE” is removed) and generated as 
    part of WdgM_OsMemMap.h. 
    Table 3-7   Supervised Entity Variables MICROSAR Os Gen6 / AUTOSAR Os version 4.0 
    3.3.4.2 
    Supervised Entity Variables with MICROSAR Os Gen7 / AUTOSAR Os 
    version 4.2 

    Following memory sections need to be set up for WdgM’s supervised entity variables: 
    Section 
    Description 
    WDGM_SEi_START_SEC_VAR_NOINIT 
    If the ECU description parameter WdgMAppTaskRef 
    _32BIT_COREn_PRIVATE / 
    corresponding to supervised entity with ID “i” 
    WDGM_SEi_STOP_SEC_VAR_NOINIT_ 
    configured for core ID “n” is set, then these sections 
    32BIT_COREn_PRIVATE 
    are renamed according to the configured OS 
    WDGM_SEi_START_SEC_VAR_NOINIT 
    application. 
    _UNSPECIFIED_COREn_PRIVATE / 
    “WDGM_SEi_START_SEC_ / 
    WDGM_SEi_STOP_SEC_VAR_NOINIT_ 
    WDGM_SEi_STOP_SEC_” is converted to 
    UNSPECIFIED_COREn_PRIVATE 
    ”OS_START_SEC_“<OSApp>_/ 
    OS_STOP_SEC_“<OSApp>_”, where <OSApp> is the 
    name of the OS application; suffix 
    “_COREn_PRIVATE” is removed. This is generated 
    as part of WdgM_OsMemMap.h. 
    Table 3-8   Supervised Entity Variables MICROSAR Os Gen7 / AUTOSAR Os version 4.2 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    57 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
    3.4 
    Timing Setup 
    This  chapter  describes  the  WdgM  timing  configuration  parameters.  The  timing  of  the 
    WdgM is defined by 
    >  the calling period of function WdgM_MainFunction() 
    >  the count period of the WdgM tick counter (for deadline supervision) 
    Every time when the function WdgM_MainFunction() is invoked 
    >  the alive counters are evaluated 
    >  running deadlines are checked for violations 
    >  checkpoint fault indications are evaluated and, finally 
    >  the WdgM global status of all supervised entities is calculated 
     
     
     
    Note 
    The  time  period  during  which  the  function  WdgM_MainFunction()  is  called,  is  the 
      WdgM  supervision  cycle.  This  cycle  time  is  also  used  for  the  periodic  setting  of  the 
    trigger  condition  of  the  Watchdog  device.  The  period  of  this  cycle  determines  the 
    shortest WdgM  reaction  time.  For  example:  If  the WdgM  reaction  time  should  be  not 
    more than 10 ms, the supervision cycle time should be set to 10 ms or shorter. 
     
     
     
     
     
    Note 
    For  a  multi-core  system,  the  calling  period  and  the  count  period  might  be  configured 
      differently for the WdgM instance running on each core. For reasons of simplicity, this 
    section covers the case for one processor core only. The WdgM instances in a multi-
    core core setup act independently of each other. 
     
     
     
    Figure 3-3 shows the WdgM timing configuration parameters. The parameters can be set 
    by a Configuration Tool. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    58 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 3-3   Time base of WdgM 
    Two configuration parameters shown in Figure 3-3 are used by the System Environment 
    only. The Scheduler uses these parameters and periodically calls 
    >  function WdgM_MainFunction() and 
    >  if defined, also function WdgM_UpdateTickCounter() 
     
    All the other parameters are used by the WdgM and Wdg. 
    Configuration Parameter 
    Description 
    WdgMSupervisionCycle 
    This  parameter  defines  the  time  period  in  which  the  WdgM 
    performs  cyclic  supervision.  This  is  the  time  period  in  which 
    function  WdgM_MainFunction()  is  called.  The  user  of  this 
    parameter  is  the  system  environment  that  periodically  calls 
    function WdgM_MainFunction(). 
    WdgMTicksPerSecond 
    This  parameter  defines  the  frequency  by  which  the  WdgM  tick 
    counter is incremented. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    59 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Configuration Parameter 
    Description 
    >  
    If  the  external  tick  counter  is  selected,  the  user  of  this 
    parameter  is  the  system  environment  that  periodically  calls 
    function WdgM_UpdateTickCount(). 
    >  If the OsCounter is selected, the user has to configure an 
    OsCounter and reference the OsCounter from the 
    WdgMOsCounterRef. The parameter WdgMTicksPerSecond 
    will be configured automatically according to the OsCounter 
    configuration. 
    >  If  the  internal  software  timebase  is  selected,  the  user  only 
    has to configure the WdgMSupervisionCylce. The parameter 
    WdgMTicksPerSecond  will  be  configured  automatically 
    according to the supervision cylce configuration. 
    >  The parameter WdgMTicksPerSecond must not be zero. 
    WdgMTriggerWindowStart 
    This parameter is actually not used and should be set to 0. 
    WdgMTriggerConditionValue 
    This parameter defines, for all supervision cycles (except for the 
    first),  the  upper  limit  of  the  Watchdog  trigger  window.  If  the 
    Watchdog  is  not  triggered  in  time,  a  reset  is  caused.  This 
    parameter is in milliseconds. The user is the WdgM. 
    Table 3-9   Configuration Parameters 
    3.4.1 
    Deadline Measurement and Tick Counter 
    The transition time between two checkpoints is measured in ticks. The tick counter delivers 
    a time base for deadline supervision. The tick counter is the smallest deadline time unit for 
    the WdgM. There are three possible tick sources (see Figure 3-4   WdgM  Tick 
    source 
    selection for deadline supervision): 
    >  Internal software tick source: The tick source is software-based where the internal 
    counter is incremented every time the WdgM main function 
    (WdgM_MainFunction()) is called. If the internal software tick source is selected, the 
    frequency (WdgMTicksPerSecond) is the same as WdgM_MainFunction() is called. 
    >  External tick source: The tick must be counted externally by calling the WdgM function 
    WdgM_UpdateTickCount().  If  the  external  tick  source  is  selected,  the  system 
    integrator  is  responsible  for  calling  this  function  on  a  regular  basis.  The  WdgM 
    internally checks if the number of ticks corresponds with the supervision cycle. 
    >  OsCounter:  The  Os  is  responsible  for  the  counter.  If  the  OsCounter  is  selected  as 
    source,  the  system  integrator  is  responsible  for  configuring  the  OsCounter  properly. 
    The WdgM  internally  checks  if  the number of  ticks  corresponds with  the  supervision 
    cycle. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    60 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
     
    Note 
    The tick source can be selected by setting the parameter WdgMTimebaseSource. The 
      default parameter value is WDGM_INTERNAL_SOFTWARE_TICK. 
     
     
     
     
    Note 
    When you configure a multi-core system, it is possible to select only one tick source for 
      all the processor cores. However, ticks per second can be different. 
     
     
     
     
    WdgM
    System API:
    WdgM_UpdateTickCount()
    internal software
    external software
    Timebase
    OsCounter
    Os
    Parameter Switch
    WdgM_TimebaseSource
     
    Figure 3-4   WdgM Tick source selection for deadline supervision 
    The  ticks  per  second  must  be  configured  for  the  WdgM  to  translate  the  monitored 
    deadlines from seconds (as stored in the AUTOSAR ECU description files) to WdgM ticks. 
    This conversion is done during configuration generation for the WdgM, with the deadlines 
    being stored in the generated configuration as WdgM ticks. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    61 
    based on template version 5.12.0 




    Technical Reference MICROSAR WDGM 
     
     
    Note
     
      
    Non-integer ticks are not allowed. If a deadline cannot be converted into an integer 
    number of WdgM ticks, the WdgM configuration generator will report an error. 
    >  For  an  internal  software  tick  source  and  an  external  tick  source  the  internal  tick 
    counter is initialized to 1. 
    Examples 
    >  Let a WdgM tick be 2 ms. If a deadline is 3 ms, it cannot be converted to WdgM 
    ticks without loss of accuracy. It will be between 1 and 2 WdgM ticks. 
    >  Let  a  WdgM  tick  be  1  ms  (i.e.  the  parameter  WdgMTicksPerSecond  is  set  to 
    1000).  A  deadline  of  0.002s=2ms  is  then  translated  to  2  WdgM  ticks.  But  a 
    deadline of 0.0005s=0.5ms cannot be translated to an integer number of WdgM 
    ticks. 
     
     
     
     
    Note 
    There  is  a trade-off  between  the WdgM  tick  resolution  and  performance. The  shorter 
      the  tick  length,  the  finer  the  deadlines  that  can  be  monitored.  However,  the 
    performance 
    gets 
    worse 
    due 
    to 
    more 
    frequent 
    calls 
    to 
    the 
    WdgM_UpdateTickCount() function. 
     
     
    3.5 
    Using Checkpoints in Interrupts 
    Generally,  the  call  of  the  function  WdgM_CheckpointReached()  is  not  restricted  to  a 
    specific  context.  However,  if  it  is  called  from  an  interrupt,  the  system  designer  must  be 
    aware of the following: 
    >  All  checkpoints  of  the  supervised  entity  which  runs  in  the  interrupt  context  must  be 
    called  from  the  same  interrupt  and  never  outside  of  it.  This  is  because  the  function 
    WdgM_CheckpointReached() is allowed to interrupt itself only if called for different 
    supervised entities. 
    >  The runtime of the function WdgM_CheckpointReached() must be considered. Note 
    that  the  runtime  can  vary  depending  on  the  platform  and  the  complexity  of  the 
    referenced supervised entity. 
    >  The function WdgM_CheckpointReached() requests to disable/enable interrupts (by 
    calling  e.g.  SchM_Exit_WdgM()/SchM_Enter_WdgM())  –  the  usage  of 
    disable/enable interrupt routines must be allowed out of the interrupt context. 
    >  The  interrupt  context  must  have  read/write  access  to  the  global  shared  memory 
    (memory mapping defines WDGM_GLOBAL_SHARED_START_SEC_VAR_NOINIT_*). 
    >  The  interrupt  context  must  have  read/write  access  to  referenced  supervised  entity 
    local  memory  (memory  mapping  defines  WDGM_SEn_START_SEC_VAR_NOINIT_*, 
    where 

    is 
    the 
    supervised 
    entity 
    ID 
    provided 
    to 
    the 
    function 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    62 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    WdgM_CheckpointReached()). The  same rules  apply  to  this  SE local memory  –  it 
    might  be  write  accessible  from  contexts  which  have  the  same  quality  level  as  the 
    interrupt context or higher, but it must be protected from all other contexts. 
    3.6 
    Integration into a Multi-Core System 
    The WdgM can be used on a single core and on multiple cores simultaneously. In order to 
    achieve  this  task  in  a  more  generic  and  hardware-independent  way  inter-core 
    communication  is  avoided.  Each  processor  core  on  which  the  WdgM  needs  to  do  its 
    monitoring  runs  a  separate  WdgM  instance.  Each WdgM  instance  controls  one  or  more 
    watchdogs. It builds an independent global state and decides on triggering its watchdogs 
    or causing a deliberate reset. Everything that is valid for single-core integration is valid for 
    multi-core usage as well. However, each core must be handled as a separate processor. 
    The integration specifics for a multi-core system are as follows: 
    >  Each  processor  core  runs  the  WdgM_Init()  function  separately  with  its  own 
    configuration. 
    >  The configuration for each processor core (which contains only its settings, supervised 
    entities,  etc.)  is  generated  in  a  separate  configuration  structure.  However,  the 
    preprocessor options are common for all cores. 
    >  Each  processor  core  executes  the  WdgM_MainFunction()  separately  and 
    periodically. The period for each processor core might be different and depends on the 
    configuration. 
    >  The global memory data is configured separately for each processor core and must be 
    accessible  from  this  core  and  the  application  that  is  responsible  for  running  the 
    WdgM_MainFunction(). 
    >  The global shared memory section must be accessible by all processor cores. 
    3.7 
    States 
    See WdgM Local Entity State (2.3.12) and WdgM Global State (2.3.13). 
    3.8 
    Main Functions 
    See WdgM Supervision Cycle (2.3.8). 
    3.9 
    Error Handling 
    3.9.1 
    Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Appl_Det_ReportError() as specified in [2], if development error reporting is enabled 
    (i.e. pre-compile parameter WdgM_DEV_ERROR_DETECT==STD_ON). 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Appl_Det_ReportError (). 
    The reported WdgM ID is 13. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    63 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    WdgM_Init 
    0x02 
    WdgM_GetVersionInfo 
    0x03 
    WdgM_SetMode 
    0x05 
    WdgM_ActivateSupervisionEntity 
    0x06 
    WdgM_DeactivateSupervisionEntity 
    0x08 
    WdgM_MainFunction 
    0x0B 
    WdgM_GetMode 
    0x0C 
    WdgM_GetLocalStatus 
    0x0D 
    WdgM_GetGlobalStatus 
    0x0E 
    WdgM_CheckpointReached 
    0x0F 
    WdgM_PerformReset 
    0x10 
    WdgM_GetFirstExpiredSEID 
    0x12 
    WdgM_UpdateTickCount 
    0x13 
    WdgM_GetFirstExpiredSEViolation 
    Table 3-10   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    (0x10u) 
    API service called if WdgM uninitialized  
    (0x11u) 
    API service WdgM_Init() called with wrong parameter  
    (0x12u) 
    API service WdgM_SetMode() called with wrong parameter  
    (0x13u) 
    API service WdgM_Init() called and no supervised entity is configured 
    API service called with wrong supervised entity id  
    (0x14u) 
    API service called with NULL_PTR as parameter  
    (0x15u) 
    API service WdgM_Init() called and a trigger mode is erroneously configured to 
    be OFF and OFF mode is not allowed  
    (0x16u) 
    API service WdgM_Init() called and on checkpoint is configured in a supervised 
    entity  
    API service WdgM_CheckpointReached() called with wrong checkpoint id  
    (0x17u) 
    Not used  
    (0x28u) 
    API  service  WdgM_MainFunction()  detected  'stuck-in'  or  'negative  jump'  of 
    timebase tick counter or timebase tick counter is out of configured range  
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    64 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Error Code 
    Description 
    (0x29u) 
    API services WdgM_MainFunction() or WdgM_CheckpointReached is called and 
    local / global status is undefined  
    (0x2Au) 
    API services of WdgIf called and return value is E_NOT_OK  
    (0x2Bu) 
    API service WdgM_MainFunction() detected memory corruption  
    (0x2Cu) 
    API service WdgM_MainFunction() called while already invoked  
    (0x2Du) 
    Supervised entity shall be deactivate while supervised entity is active  
    (0x2Eu) 
    API service and invalid processor core id is determined within the service  
    Table 3-11   Errors reported to DET 
    3.9.2 
    Production Code Error Reporting 
    By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
    Appl_Dem_ReportErrorStatus()  as  specified  in  [3],  if  production  error  reporting  is 
    enabled (i.e. pre-compile parameter WDGM_DEM_REPORT==STD_ON). 
    If  another  module  is  used  for  production  code  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Appl_Dem_ReportErrorStatus (). 
    The errors reported to DEM are described in the following table: 
    Error Code 
    Description 
    WDGM_E_IMPROPER_CALLER  Service WdgM Set Mode called with invalid 
    caller id. 
    WDGM_E_MONITORING 
    Monitoring has failed (a watchdog reset will 
    occur). 
    Table 3-12   Errors reported to DEM 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    65 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    4  Integration 
    This chapter gives necessary information for the integration of the MICROSAR WdgM into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the WdgM contains the files which are described in the chapters 4.1.1 and 
    4.1.2. 
    4.1.1 
    Static Files 
    File Name 
    Description 
    WdgM.c 
    Implementation of the WdgM, defines the API for the Service Layer of 
    the BSW-Layer. 
    WdgM_Checkpoint.c 
    Implementation  of  the  WdgM,  defines  the  API  for  the  Application 
    Layer. 
    WdgM.h 
    Header file of the WdgM, provides API function declarations. 
    WdgM_Cfg.h 
    Provides  defines  and  declarations  for  the  WdgM  configuration 
    identifiers. 
    Table 4-1   Static files 
    4.1.2 
    Dynamic Files 
    The dynamic files are generated by the configuration tool DaVinci Configurator. 
    File Name 
    Description 
    WdgM_PBcfg.c 
    This  file  contains  the  main  configuration  structure  with  the  default 
    name WdgMConfig_Mode0. This configuration name should be used 
    by 
    the 
    initialization 
    function, 
    i.e. 
    by 
    call 
    WdgM_Init(&WdgMConfig_Mode0).  If  necessary,  the  non-
    standard AUTOSAR  name WdgMConfig_Mode0  can  be renamed  to 
    WdgMConfigSet in the Configuration Tool (e.g., DaVinci). 
    WdgM_PBcfg.h 
    The file contains the declaration of the WdgM configuration. 
    WdgM_OSMemMap.h 
    The file contains defines of all used / necessary memory sections. 
    WdgM_Cfg_Features.h  The file contains WdgM precompile directives. 
    Table 4-2   Generated files 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    66 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    4.2 
    Critical Sections 
    The WdgM implements the following critical section: 
    >  WDGM_EXCLUSIVE_AREA_0: This critical section is used to protect all uninterruptable 
    sequences. It shall lock all interrupt sources and task switches. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    67 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    5  API Description 
    The WdgM  software  module  is  the  top  level  layer  of  the  Watchdog  Manager  Stack. The 
    WdgM  software  module  contains  the  core  functionality  with  supervised  entity  state 
    machines  and  calculation  of  the  WdgM  global  state.  The  WdgM  communicates  on  one 
    side through its user API with the Application Layer (optionally using RTE) and through its 
    system API with the Basic Software Components (BSW) and, on the other side, with the 
    WdgIf layer. 
    5.1 
    Type Definitions 
    The types defined by the WdgM are described in this chapter. 
    Type Name 
    C-Type  Description 
    Value Range 
    WdgM_ConfigType 
    struct 
    This  is  the  type  for  the  WdgM  configuration  N/A 
    structure. This structure is generated by the 
    WdgM configuration generator. 
    WdgM_Supervised 
    uint16 
    This is the type for an individual supervised  0...65534 
    EntityIdType 
    entity for the Watchdog Manager. 
    Note: 
    If 
    configuration 
    parameter 
    WDGM_USE_RTE  is  set  to  STD_ON,  then 
    this  type  is  imported,  otherwise  it  is 
    generated. 
    WdgM_Checkpoint 
    uint16 
    This  is  the  type  for  a  checkpoint  in  the  0...65534 
    IdType 
    context of a supervised entity for the WdgM. 
    Note: 
    If 
    configuration 
    parameter 
    WDGM_USE_RTE  is  set  to  STD_ON,  then 
    this  type  is  imported,  otherwise  it  is 
    generated. 
    WdgM_ModeType 
    uint8 
    This is the type for the ID of a trigger mode  0...255 
    that  was  configured  for  the  WdgM.  The 
    current  trigger  mode  can  be  retrieved  with 
    WdgM_GetMode(). 
    Note: 
    If 
    configuration 
    parameter 
    WDGM_USE_RTE  is  set  to  STD_ON,  then  this 
    type is imported, otherwise it is generated. 
    WdgM_LocalStatus
    uint8 
    This is the type for the local monitoring state  WDGM_LOCAL_STATUS
    Type 
    of a supervised entity. The current local state  _OK = 0 
    of  a  supervised  entity  can  be  retrieved  with  WDGM_LOCAL_STATUS
    WdgM_GetLocalStatus(). 
    _FAILED = 1 
    Note: 
    If 
    configuration 
    parameter  WDGM_LOCAL_STATUS
    WDGM_USE_RTE  is  set  to  STD_ON,  then  _EXPIRED = 2 
    this  type  is  imported,  otherwise  it  is 
    generated. 
    WDGM_LOCAL_STATUS
    _DEACTIVATED = 4 
    WdgM_GlobalStatus uint8 
    This  is  the  type  for  the  global  monitoring  WDGM_GLOBAL_STATU
    Type 
    state.  It  summarizes  the  local  states  of  all  S_OK = 0, 
    supervised entities. The current global state  WDGM_GLOBAL_STATU
    can 
    be 
    retrieved 
    with  S_FAILED = 1, 
    WdgM_GetGlobalStatus(). 
    WDGM_GLOBAL_STATU
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    68 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Type Name 
    C-Type  Description 
    Value Range 
    Note: 
    If 
    configuration 
    parameter  S_EXPIRED = 2, 
    WDGM_USE_RTE  is  set  to  STD_ON,  then  WDGM_GLOBAL_STATU
    this  type  is  imported,  otherwise  it  is  S_STOPPED = 3, 
    generated. 
    WDGM_GLOBAL_STATU
    S_DEACTIVATED = 4 
    Std_VersionInfo 
    struct 
    This  is  the  parameter  type  of  function  N/A 
    Type 
    WdgM_GetVersionInfo() 
    WdgM_Violation 
    uint8 
    Used with AUTOSAR Debugging (parameter  WDGM_VIOLATION_NO
    Type 
    WdgMAutosarDebugging). This parameter is  NE: No violations 
    the 
    parameter 
    type 
    of 
    function  WDGM_VIOLATION_PF: 
    WdgM_GetFirstExpiredSEViolation() 
    Program flow violation 
    WDGM_VIOLATION_DM: 
    Deadline 
    supervision 
    violation 
    WDGM_VIOLATION_AS: 
    Alive supervision violation 
    WDGM_VIOLATION_PF_
    DM:  Program  flow  and 
    deadline 
    supervision 
    violations 
    WDGM_VIOLATION_PF_
    AS:  Program  flow  and 
    alive supervision violations 
    WDGM_VIOLATION_DM_
    AS:  Deadline  supervision 
    and 
    alive 
    supervision 
    violations 
    WDGM_VIOLATION_PF_
    DM_AS:  Program  flow, 
    deadline  supervision  and 
    alive 
    supervision 
    violationsmonitoring  and 
    alive supervision violations 
    Table 5-1   Type definitions 
    5.2 
    Services provided by WdgM 
    5.2.1 
    WdgM_Init 
    Prototype 
    void WdgM_Init(const WdgM_ConfigType* WdgMConfigPtr) 
    Parameter 
    WdgMConfigPtr 
    Pointer to post-build configuration data 
    Return code 
    void  
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    69 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    The  WdgM_Init()  function  initializes  the  WdgM.  After  the  execution  of  this  function,  monitoring  is 
    activated according to the configuration of ConfigPtr. This function can be used during monitoring, too, 
    but note that all pending violations are lost. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  This service is expected to be called in application context. 
    Table 5-2   WdgM_Init 
    5.2.2 
    WdgM_GetVersionInfo 
    Prototype 
    void WdgM_GetVersionInfo (Std_VersionInfoType* VersionInfo) 
    Parameter 
    VersionInfo 
    Pointer to where to store the version information of the WdgM module. 
    Return code 
    void 
     
    Functional Description 
    The WdgM_GetVersionInfo()  function  returns  information  about  the  version  of  this  module.  This  includes 
    the module ID, the vendor ID, and the vendor-specific version number. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Table 5-3   WdgM_GetVersionInfo 
    5.2.3 
    WdgM_SetMode 
    Prototype 
    Std_ReturnType WdgM_SetMode (WdgM_ModeType Mode, uint16 CallerID) 
    Parameter 
    Mode 
    The ID of the Trigger Mode to which the WdgM must be set. 
    CallerID 
    ID  of  the  caller  allowed  to  call  the  function  WdgM_SetMode().  The 
    allowed caller is defined in the configuration. The caller ID is checked if 
    WdgMDefensiveBehavior is true. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    70 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Return code 
    Std_ReturnType 
    E_OK: The new Trigger Mode has been successfully set. 
    E_NOT_OK: The setting of the new Trigger Mode failed. 
    Functional Description 
    This functions sets the Trigger Mode of the WdgM. The WdgM Trigger Mode is a set of Watchdog trigger 
    times  and  Watchdog  mode.  The  WdgM  can  have  one  or  more  Trigger  Modes  for  every  watchdog.  In 
    contrast to AUTOSAR, where the Mode represents a set of entities with all entity-specific parameters, the 
    WdgM Trigger Mode only sets the following parameters: 
    >  WdgMTriggerConditionValue  
    >  WdgMTriggerWindowStart 
    >  WdgMWatchdogMode 
    Note: A change  to  trigger  mode with ID Mode sets all configured  watchdogs to the trigger mode  with  ID 
    Mode. As a consequence, all watchdogs must have configured the same number of Trigger Modes. 
    This function can be used to increase the WdgM supervision cycle in an MCU sleep mode. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is asynchronous. 
    >  This function is reentrant. 
    Table 5-4   WdgM_SetMode 
    5.2.4 
    WdgM_ActivateSupervisionEntity 
    Prototype 
    Std_ReturnType WdgM_ActivateSupervisionEntity (WdgM_SupervisedEntityIdType 
    SEID) 
    Parameter 
    SEID 
    Supervised entity identifier. 
    Return code 
    Std_ReturnType 
    E_OK: Marking the supervised entity for activation was successful. 
    E_NOT_OK: Marking the supervised entity for activation failed. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    71 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    The  function  marks  an  entity  for  activation.  An  entity  can  only  be  activated  when  its  local  state  is 
    WDGM_LOCAL_STATUS_DEACTIVATED. The activation itself happens at the end of the supervision cycle 
    inside the WdgM_MainFunction(). 
    Note: 
    >  
    This function can degrade system safety. The activation of entity supervision in safety-related products 
    needs special attention to avoid unintended supervised entity deactivation. 
    >  In  the  same  call  of  WdgM_MainFunction(),  first  the  local  states  of  all  supervised  entities  and  the 
    global state are set, then the supervised entity is activated. 
    >  After SE activation the function WdgM_GetLocalStatus() can be used to check the SE local state. 
    >  This function is only available if the preprocessor switch WdgMEntityDeactivationEnabled is set 
    to true and if the entity option WdgMEnableEntityDeactivation is set to true. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is asynchronous. 
    >  This function is reentrant (for different SEID). 
    >  This function is an extension of the AUTOSAR specification 
    Table 5-5   WdgM_ActivateSupervisionEntity 
    5.2.5 
    WdgM_DeactivateSupervisionEntity 
    Prototype 
    Std_ReturnType WdgM_DeactivateSupervisionEntity (WdgM_SupervisedEntityIdType 
    SEID) 
    Parameter 
    SEID 
    ID of the supervised entity to be deactivated. Range [0...N] 
    Return code 
    Std_ReturnType 
    E_OK: Marking the supervised entity for deactivation was successful. 
    E_NOT_OK: Marking the supervised entity for deactivation failed. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    72 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    The  function  marks  an  entity  for  deactivation.  An  entity  can  only  be  deactivated  when  its  local  state  is 
    WDGM_LOCAL_STATUS_OK or WDGM_LOCAL_STATUS_FAILED. The deactivation itself happens at the end 
    of  the  supervision  cycle  inside  the  WdgM_MainFunction().  When  an  entity  is  deactivated  then  its 
    checkpoints are not evaluated anymore and the entity local state is WDGM_LOCAL_STATUS_DEACTIVATED. 
    Note: 
    >  
    When an entity is deactivated, the global transitions to this entity are not evaluated. 
    >  Using this function can degrade system safety. The deactivation of entity supervision in safety-related 
    products needs special attention to avoid unintended supervised entity deactivation. 
    >  The  function  WdgM_DeactivateSupervisionEntity()  can  deactivate  a  supervised  entity  only 
    before its initial checkpoint was passed or after its end checkpoint was passed. The focus here is on 
    entities that are spread over more than one supervision cycle. 
    Note: The local program flow of a supervised entity may span over more than one supervision cycle. 
    Those  active  entities  cannot  be  deactivated  while  running.  Deactivating  active  SEs  leads  to  a  DEM 
    error report. 
    >  In the same call of WdgM_MainFunction(), first the supervised entity is deactivated, then the local 
    states of all supervised entities and the global state are set. 
    >  After  SE  deactivation  the  function  WdgM_GetLocalStatus()  can  be  used  to  check  the  SE  local 
    state. 
    >  This function is only available if the preprocessor switch WdgMEntityDeactivationEnabled is set 
    to true and if the entity option WdgMEnableEntityDeactivation is set to true. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is asynchronous. 
    >  This function is reentrant (for different SEID). 
    >  This function is an extension of the AUTOSAR specification 
    Table 5-6   WdgM_DeactivateSupervisionEntity 
    5.2.6 
    WdgM_MainFunction 
    Prototype 
    void WdgM_MainFunction(void) 
    Parameter 
    void 
     
    Return code 
    void 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    73 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    This function evaluates monitoring data gathered from the hit checkpoints in all supervised entities during 
    the supervision cycle. Depending on the violation found (if there is any), the 
    >  local state of the supervised entities and 
    >  the WdgM global state 
    are determined again. 
    Depending on the resulting global state: 
    >  the Wdg is triggered, or 
    >  the Wdg trigger discontinues (safe state), or 
    >  the Wdg is reset (safe state). 
    The  function  must  run  at  the  end  of  every  supervision  cycle.  It  may  be  called  by  the  Basic  Software 
    Scheduler or a task with a fixed period time. 
    The WdgM_MainFunction() function is not reentrant. To prevent data inconsistency when it is interrupted 
    by itself (e.g. due to schedule overload), the function checks if it is executed concurrently. If this function is 
    started before its last instance has finished, it raises a development error. 
    Note: 
    >  Alive counter violations are detected at the end of every alive supervision reference cycle, 
    >  Program flow violations are detected at the end of every supervision cycle, 
    >  Continued program flow violations are detected at the end of every program flow supervision cycle. 
    >  Deadline violations are detected at the end of every supervision cycle, 
    >  Continued of deadline violations are detected at the end of every deadline supervision cycle. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This service is always available. 
    Table 5-7   WdgM_MainFunction 
    5.2.7 
    WdgM_GetMode 
    Prototype 
    Std_ReturnType WdgM_GetMode(WdgM_ModeType* Mode) 
    Parameter 
    Mode 
    Pointer to the current Trigger Mode ID of the Watchdog Manager 
    Return code 
    Std_ReturnType 
    E_OK: Current Trigger Mode successfully returned. 
    E_NOT_OK: Returning current Trigger Mode failed. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    74 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    Returns the current Trigger Mode of the WdgM. The WdgM Trigger Mode represents one Watchdog trigger 
    time and mode setting. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Table 5-8   WdgM_GetMode 
    5.2.8 
    WdgM_GetLocalStatus 
    Prototype 
    Std_ReturnType WdgM_GetLocalStatus (WdgM_SupervisedEntityIdType SEID, 
    WdgM_LocalStatusType* Status) 
    Parameter 
    SEID 
    Identifier of the supervised entity whose monitoring state is returned. 
    Status 
    Pointer to the local monitoring state of the given supervised entity. 
    Return code 
    Std_ReturnType 
    E_OK: Current monitoring state successfully returned. 
    E_NOT_OK: Returning the current monitoring state failed. 
    Functional Description 
    Returns the monitoring state of the given supervised entity. 
    Note: The WdgM updates the state inside the WdgM_MainFunction() every supervision cycle. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Table 5-9   WdgM_GetLocalStatus 
    5.2.9 
    WdgM_GetGlobalStatus 
    Prototype 
    Std_ReturnType WdgM_GetGlobalStatus (WdgM_GlobalStatusType* Status) 
    Parameter 
    Status 
    Pointer to global monitoring state of the WdgM. 
    Return code 
    Std_ReturnType 
    E_OK: Current global monitoring state successfully returned. 
    E_NOT_OK: Returning the current global monitoring state failed. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    75 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    Returns the global monitoring state of the WdgM. 
    Note: The WdgM updates the state inside the WdgM_MainFunction() every supervision cycle. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is reentrant. 
    Table 5-10   WdgM_GetGlobalStatus 
    5.2.10  WdgM_CheckpointReached 
    Prototype 
    Std_ReturnType WdgM_CheckpointReached (WdgM_SupervisedEntityIdType SEID, 
    WdgM_CheckpointIdType CheckpointID) 
    Parameter 
    SEID 
    Identifier of the supervised entity that reports a checkpoint. 
    CheckpointID 
    Identifier of the checkpoint within a supervised entity that has been reached. 
    Return code 
    Std_ReturnType 
    E_OK: Checkpoint monitoring successful. 
    E_NOT_OK: Checkpoint monitoring fault. Returned in the following cases 
    >  WDGM_E_NO_INIT: Uninitialized WdgM (DET code 0x10) 
    >  WDGM_E_PARAM_SEID:  Wrong  Id  number  of  the  supervised  entity 
    (DET code 0x13) 
    >  WDGM_E_CPID: Invalid checkpoint ID number (DET code 0x16) 
    >  WDGM_E_PARAM_STATE:  Invalid  WdgM  state.  Reset  will  be  invoked 
    (DET code 0x29). 
    Functional Description 
    Indicates to the WdgM that a checkpoint within a supervised entity has been reached. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is reentrant (in the context of a different supervised entity). 
    Table 5-11   WdgM_CheckpointReached 
    5.2.11  WdgM_PerformReset 
    Prototype 
    Std_ReturnType WdgM_PerformReset(void) 
    Parameter 
    void 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    76 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Return code 
    Std_ReturnType 
    E_OK: This value will not be returned because the reset is activated, and the 
    routine does not return. 
    E_NOT_OK: The function has failed. 
    Functional Description 
    Instructs the WdgM to cause an immediate watchdog reset. 
    Note: 
    This function is hardware-dependent. Some watchdogs do not support an immediate reset. Check the Wdg 
    Driver documentation. 
    This  function  can  require  direct  access  to  hardware  registers.  Access  to  hardware  registers  can  be 
    dependent  on  hardware  platforms  and  software  architectures.  Hence,  the  application  that  calls 
    WdgM_PerformReset() must have the corresponding access rights. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >   Other particularities, limitations, post-conditions, pre-conditions 
    Table 5-12   WdgM_PerformReset 
    5.2.12  WdgM_GetFirstExpiredSEID 
    Prototype 
    Std_ReturnType WdgM_GetFirstExpiredSEID (WdgM_SupervisedEntityIdType* SEID) 
    Parameter 
    SEID 
    A pointer to a variable that stores the ID of the first SE which has made a 
    transition to the state WDGM_LOCAL_STATUS_EXPIRED or 0 if the function did 
    not execute correctly. 
    Return code 
    Std_ReturnType 
    E_OK: The function could extract the record for the first expired supervised 
    entity successfully. 
    E_NOT_OK: An error was detected (input parameter or memory corruption of 
    the record) 
    Functional Description 
    This  function  returns  the  ID  of  the  first  SE  that  reached  the  expired  state  and,  thus,  is  potentially 
    responsible for a system reset. It must be executed after at least one SE  reached the expired state, e.g. 
    after a reset, otherwise the returned result might not be correct. 
    Note:  The  record  for  the  first  expired  SE  is  stored  double  inverse  (so  that  memory  corruption  can  be 
    detected)  and  in  a  variable  section  that  is  not  initialized  (to  preserve  the  data  after  a  reset,  but  this  also 
    means that there is initially no valid entry). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    77 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Table 5-13   WdgM_GetFirstExpiredSEID 
    5.2.13  WdgM_GetFirstExpiredSEViolation 
    Prototype 
    Std_ReturnType WdgM_GetFirstExpiredSEViolation (WdgM_ViolationType* 
    ViolationType) 
    Parameter 
    ViolationType 
    A pointer to a variable that stores the violation type that caused the first SE to 
    make a transition to state WDGM_LOCAL_STATUS_EXPIRED or 0 if the function 
    did not execute correctly. This parameter shows if the violation was a program 
    flow violation, a deadline supervision violation, an alive counter violation, or a 
    combination between them. 
    Return code 
    Std_ReturnType 
    E_OK:  The  function  was  able  to  successfully  extract  the  record  for  the  first 
    violation type. 
    E_NOT_OK: An  error  was  detected  (input  parameter  or  memory  corruption  of 
    the record). 
    Functional Description 
    This function returns the violation type of the first supervised entity which reached the expired state – and 
    thus is potentially responsible for a system reset. It must be executed after at least one supervised entity 
    reached the expired state, e.g. after a reset, otherwise the returned result might not be correct. Note, that 
    the record for the violation type is stored double inverse (so that memory corruption can be detected) and 
    in  a  variable  section  which  is  not  initialized  (to  preserve  the  data  after  a  reset,  but  this  also  means  that 
    initially there is no valid entry). 
    This function is enabled with the configuration option WdgMAutosarDebugging. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Specify if it might be called from interrupt context 
    Table 5-14   WdgM_GetFirstExpiredSEViolation 
    5.2.14  WdgM_UpdateTickCount 
    Prototype 
    void WdgM_UpdateTickCount(void) 
    Parameter 
    void 
     
    Return code 
    void 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    78 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    This  function  increments  the  WdgM  timebase  tick  counter  by  one.  When  the  precompile  configuration 
    parameter WdgMTimebaseSource is set to WDGM_EXTERNAL_TICK, then this function needs to be called 
    periodically from outside the WdgM. 
    The timebase tick counter delivers the time base for deadline supervision. In the AUTOSAR environment. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  This function can be called, for example, from a task with fixed time period and high priority. 
    Expected Caller Context 
    >  Specify if it might be called from interrupt context 
    Table 5-15   WdgM_UpdateTickCount 
    5.3 
    Services used by WdgM 
    In  the  following  table  services  provided  by  other  components,  which  are  used  by  the 
    WdgM are listed. For details about prototype and functionality refer to the documentation 
    of the providing component. 
    Component 
    API 
    Det 
    Det_ReportError() 
    Dem 
    Dem_ReportErrorStatus() 
    Mcu 
    Mcu_PerformReset() 
    Os 
    GetCoreID() 
    SchM 
    >  SchM_Enter_WdgM_WDGM_EXCLUSIVE_AREA_0 
    >  SchM_Exit_WdgM_WDGM_EXCLUSIVE_AREA_0 
    WdgIf 
    >  WdgIf_SetMode() 
    >  WdgIf_SetTriggerCondition() 
    Table 5-16   Services used by the WdgM 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    79 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
    Figure 5-1   Expected interfaces to external modules 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    80 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
     
     
    Note 
    If the precompile switches 
      >  WdgMDevErrorDetect 
    >  WdgMDemReport 
    >  WdgMUseOsSuspendInterrupt 
    >  WdgMImmediateReset 
    >  WDGM_SECOND_RESET_PATH 
    are set to FALSE, the WdgM module does not call the corresponding function(s). 
     
     
     
     
    Note 
    The  functions  listed  in  the  table  above  may  not  meet  the  required  quality  level  and, 
      thus, must be wrapped in order to ensure freedom from interference with the WdgM. 
    The  integrator  must  implement  the  Appl_...()  functions  according  to  his  safety 
    requirements. 
     
     
     
     
    Note 
    The  system  integrator  must  revise  the  necessity  of  the  expected  interfaces. A  called 
      external function may degrade the quality level of the WdgM below the required quality 
    level. 
     
     
    5.4 
    Configurable Interfaces 
    5.4.1 
    Notifications 
    At  its  configurable  interfaces  the  WdgM  defines  notifications  that  can  be  mapped  to 
    callback functions provided by other modules. The mapping is not statically defined by the 
    WdgM  but  can  be  performed  at  configuration  time.  The  function  prototypes  that  can  be 
    used  for  the  configuration  have  to  match  the  appropriate  function  prototype  signatures, 
    which are described in the following sub-chapters. 
    5.4.1.1 
    Global state callback 
    Prototype 
    void WdgM_GlobalStateChangeCbk (WdgM_GlobalStatusType new_state); 
    Parameter 
    new_state 
    Contains the global state after the global state change. 
    Note: In a multi-core system, the global state callback function can be set up 
    for each processor core separately. 
    Return code 
    void 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    81 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Functional Description 
    If  WDGM_STATE_CHANGE_NOTIFICATION  ==  STD_ON  and  the  WdgM  global  state  changes,  then  the 
    callback  routine  defined  by  the  parameter  WdgMGlobalStateChangeCbk  is  called.  The  name  of  the 
    function can be arbitrary. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  May be called from task level. 
    Table 5-17   Global state callback 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    82 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    5.4.1.2 
    Local state change notification 
    Prototype 
    void WdgM_LocalStateChangeCbk (WdgM_LocalStatusType new_state); 
    Parameter 
    new_state 
    Contains the local state after the local state change. 
    Return code 
    void 
     
    Functional Description 
    If WDGM_STATE_CHANGE_NOTIFICATION == STD_ON and the local state of a supervised entity changes, 
    then the callback routine defined by the parameter  WdgMLocalStateChangeCbk is called. The name of 
    the function can be arbitrary (but of course different for each supervised entity). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs' (chapter 3.9.1) 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Call context 
    >  May be called from task level. 
    Table 5-18   Local state change notification 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    83 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    5.5 
    Service Ports 
    A single SWC description file (WdgM_swc.arxml) is generated by the WdgM configuration 
    generator. 
    For 
    each 
    referenced 
    OsApplication 
    (referenced 
    by 
    WdgMGlobalMemoryAppTaskRef  and  WdgMAppTaskRef)  a  separate  component  type 
    element  is  generated  (named  WdgM_<OsApplication>)  within.  If  no  OsApplication  is 
    referenced at all, only one component type is generated (named WdgM). 
    5.5.1 
    Client Server Interface 
    A client server interface is related to a Provide Port at the server side and a Require Port 
    at client side. 
    The following client server interfaces with corresponding operations are available: 
    >  WdgM_AliveSupervision 
    >  WdgM_LocalStatus 
    >  WdgM_General 
    If status reporting mechanism is configured to WDGM_USE_MODE_SWITCH_PORTS: 
    >  WdgM_IndividualMode 
    >  WdgM_GlobalMode 
    If status reporting mechanism is configured to WDGM_USE_NOTIFICATIONS: 
    >  WdgM_LocalStatusCallbackInterface 
    >  WdgM_GlobalStatusCallbackInterface 
    5.5.1.1 
    Provide Ports on WdgM Side 
    At  the  Provide  Ports  of  the  WdgM  the  API  functions  described  in  5.2  are  available  as 
    Runnable Entities. The Runnable Entities are invoked via operations. The mapping from a 
    SWC client call to an operation is performed by the RTE. In this mapping the RTE adds 
    port defined argument values to the client call of the SWC, if configured. 
    The  following  sub-chapters  present  the  Provide  Ports  defined  for  the  WdgM  and  the 
    operations defined for the Provide Ports,  the API functions related to the  operations  and 
    the port defined argument values to be added by the RTE. 
    5.5.1.1.1 
    Port Prototype for WdgM_AliveSupervision 
    There are two possibilities for creation of a client server port prototype: 
    >  For 
    each 
    checkpoint 
    (if 
    parameter 
    WdgMGenerateCPIdAsPortDefinedArgument is set to STD_ON) 
    alive_<WdgMSupervisedEntityShortname>_<WdgMCheckpointShortname> 
    With this client server port prototype the following operation can be invoked: 
    Operation 
    API Function 
    Port Defined Argument Values 
    CheckpointReached 
    WdgM_CheckpointReached 
    WdgM_SupervisedEntityIdType 
    SEID, 
    WdgM_CheckpointIdType CPID 
    Table 5-19  alive_<WdgMSupervisedEntityShortname>_<WdgMCheckpointShortname> 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    84 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    >  For 
    each 
    supervised 
    entity 
    (if 
    parameter 
    WdgMGenerateCPIdAsPortDefinedArgument is set to STD_OFF) 
    alive_<WdgMSupervisedEntityShortname> 
    With this client server port prototype the following operation can be invoked: 
    Operation 
    API Function 
    Port Defined Argument Values 
    CheckpointReached 
    WdgM_CheckpointReached 
    WdgM_SupervisedEntityIdType 
    SEID 
    Table 5-20   alive_<WdgMSupervisedEntityShortname> 
    5.5.1.1.2 
    Port Prototype for WdgM_LocalStatus 
    For each supervised entity a client server port prototypes is created: 
     
    localStatus_<WdgMSupervisedEntityShortname> 
    With this client server port prototype the following operation can be invoked: 
    Operation 
    API Function 
    Port Defined Argument Values 
    GetLocalStatus 
    WdgM_GetLocalStatus 
    WdgM_SupervisedEntityIdType 
    SEID 
    Table 5-21   individual_<WdgMSupervisedEntityShortname> 
    5.5.1.1.3 
    Port Prototype for WdgM_General 
    This client server port prototype is created only once per core. 
    If an OsApplication is referenced by WdgMGlobalMemoryAppTaskRef, the following port 
    prototype is created: 
     
    general_Core< WdgMModeCoreAssignment > 
    If no OsApplication is referenced, the following port prototype is created 
     
    general 
    The related client server interface is WdgM_GlobalMode. No port defined argument values 
    are added. With this client server port prototype the following operations can be invoked: 
    Operation 
    API Function 
    Condition 
    GetMode 
    WdgM_GetMode 

    GetGlobalStatus 
    WdgM_GetGlobalStatus 

    GetLocalStatus 
    WdgM_GetLocalStatus 

    PerformReset 
    WdgM_PerformReset 

    SetMode 
    WdgM_SetMode 
     
    GetFirstExpiredSEID 
    WdgM_GetFirstExpiredSEID 

    GetFirstExpiredSEViolation 
    WdgM_GetFirstExpiredSEViolation 
    AUTOSAR Debugging enabled 
    ActivateSupervisionEntity 
    WdgM_ActivateSupervisionEntity 
    EntityDeactivation enabled 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    85 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    Operation 
    API Function 
    Condition 
    DeactivateSupervisionEntity 
    WdgM_DeactivateSupervisionEntity 
    UpdateTickCount 
    WdgM_UpdateTickCount 
    Timebase is EXTERNAL_TICK 
    Table 5-22   global_<WdgMGlobalMemoryAppTaskRefShortname> / global_WdgM 
    5.5.1.2 
    Require Ports on WdgM Side 
    At its Require Ports the WdgM calls operations. These operations have to be provided by 
    the SWCs by means of Runnable Entities. These runnable entities implement the callback 
    functions expected by the WdgM. 
    The following sub-chapter present the Require Ports defined for the WdgM, the operations 
    that are called from the WdgM and the related notifications, which are described in chapter 
    5.4. 
    5.5.1.2.1 
    Port Prototype for WdgM_LocalStatusCallbackInterface 
    If a callback function is configured for a supervised entity (WdgMLocalStateChangeCbk), 
    for each of those supervised entities a client server port prototypes is created: 
     
    localStateChangeCbk_<WdgMSupervisedEntityShortname> 
    With this client server port prototype the following operation shall be invoked: 
    Operation 
    Notification 
    LocalStatusCallback 
    Local state change notification 
    Table 5-23   localStateChangeCbk_<WdgMSupervisedEntityShortname> 
    5.5.1.2.2 
    Port Prototype for WdgM_GlobalStatusCallbackInterface 
    If  a  callback  function  is  configured  for  a  mode  (WdgMGlobalMemoryAppTaskRef),  for 
    each of those modes (/ cores) a client server port prototypes is created: 
     
    globalStateChangeCbk_Core<WdgMModeCoreAssignment> 
    With this client server port prototype the following operation shall be invoked: 
    Operation 
    Notification 
    GlobalStatusCallback 
    Global state change notification 
    Table 5-24   localStateChangeCbk_<WdgMSupervisedEntityShortname> 
    5.5.1.3 
    Mode Ports on WdgM for Status Reporting 
    If the WdgM has Mode Ports configured, the WdgM informs applications, SWCs, etc. via 
    these Mode Ports about status changes. 
    For each supervised entity a mode port prototypes is created: 
     
    mode_<WdgMSupervisedEntityShortname> 
    For each ConfigSet / Core a mode prototype is created: 
     
    globalmode_Core<WdgMModeCoreAssignment> 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    86 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    6  Configuration 
    6.1 
    Configuration Variants 
    The WdgM supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the WdgM parameters depend on the supported configuration 
    variants. For their definitions please see the WdgM_bswmd.arxml file. 
    The WdgM can be configured using the following tool:  
    >  DaVinci Configurator 5 (AUTOSAR 4 packages only). Parameters are explained within 
    the tool.  
    The outputs of the configuration and generation process are the configuration source files. 
    6.2 
    WdgM Configuration Verification 
    The WdgM Verifier is a tool for the verification of the generated WdgM configuration. The 
    WdgM  Verifier  is  delivered  as  a  DLL  (wdgm_verifier.dll)  that  must  be  compiled  with  the 
    configuration  files  produced  by  the  generator  and  the  files  produced  by  the  XSLT 
    Processor. The compilation result is a Windows Verifier.exe program. Running the Verifier 
    generates a report file (verifier_report.txt) that contains the result of the verification. 
    Figure 6-1 shows the workflow of the WdgM Verifier build.  
     
    Figure 6-1   Workflow of the WdgM Configuration Verifier build 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    87 
    based on template version 5.12.0 





    Technical Reference MICROSAR WDGM 
     
     
    Note 
    The WdgM generator is not ASIL D, therefore its output cannot be trusted, hence 
      additional checks are required by use of the WdgM Verifier. 
     
     
     
     
    Note 
    The Verifier is only content of the delivery if the WdgM is ordered in safe context. 
     
     
     
     
     
     
    Practical Procedure 
    The verification process consists of the following steps, which are explained in detail in 
      the following sections: 
    >  creation of WdgM Info files out of the ECU Description file (for the Verifier 
    build), 
    >  build (compilation) of the Verifier, 
    >  Verifier run and manual check of the Verifier report, 
    >  manual checks (which cannot be performed by the Verifier) and 
    >  check of system specifications against the WdgM Info files. 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    88 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    6.2.1.1 
    Installing the WdgM Verifier 
    To run the WdgM Verifier an XSLT Processor and a working gcc environment are required. 
    The XSLT Processor is part of the delivery and located at “external\Misc\Wdg\xsltproc” and 
    contains of following files: 
    >  iconv.dll, 
    >  libexslt.dll, 
    >  libxml2.dll, 
    >  libxslt.dll, 
    >  zlib1.dll, 
    >  xsltproc.exe. 
    The recommended way to install gcc is to install the MinGW environment with the provided 
    installer  program  (MinGW-5.1.6.exe  –  located  at  “external\Misc\Wdg\MinGW”)  for 
    Windows 7. To install gcc proceed as follows: 
    1.  Start  the  installer  program,  accept  the  license  terms  and  click  “Next”  until  you  are 
    prompted to select a configuration. 
    2.  When  prompted,  select  Minimal  configuration.  There  is  no  need  to  select  any  check 
    boxes. 
    3.  Complete the installation process after accepting the default settings. 
    4.  Having  installed  gcc,  add  the  c:\MinGW\bin  directory  to  your  search  path  by 
    entering  the  command  set  PATH=%PATH%;c:\MinGW\bin  in  a  command  prompt 
    window.  Alternatively  you  can  edit  Environment  Variables  in  the  System  Properties 
    dialog (Start > Control Panel > System). 
    To  verify  that  gcc  is  working,  open  a  new  command  prompt  window  and  enter  gcc  -- 
    version to let gcc show its version number. 
    6.2.1.2 
    Creation of WdgM Info Files 
    This section describes how to extract the ECU description information for the verification. 
    The extraction results are the files 
    >  wdgm_verifier_info.h and 
    >  wdgm_verifier_info.c. 
    They  contain  the  ECU  description  information.  For  extracting  the  ECU  description 
    information, the integrator shall use the XSLT processor named "xsltproc.exe" (included in 
    the  delivery).  Further  the  following  XSL  stylesheets  shall  be  applied  for  the  information 
    extraction: 
    >  verify_wdgm_header.xsl and 
    >  verify_wdgm_source.xsl 
    The XSL stylesheets use XSLT 1.0 features only. 
    The integrator shall extract the ECU description information as follows: 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    89 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    >  apply verify_wdgm_header.xsl to the ECU description file and store the output to 
    wdgm_verifier_info.h. 
    >  apply verify_wdgm_source.xsl to the ECU description file and store the output to the 
    file wdgm_verifier_info.c. 
    In case of xsltproc.exe, the syntax is: 
    >  xsltproc.exe verify_wdgm_header.xsl ECU-description-file >wdgm_verifier_info.h 
    >  xsltproc.exe verify_wdgm_source.xsl ECU-description-file >wdgm_verifier_info.c 
     
     
     
    Note 
    The verifier tool and all necessary files are located at 
      “external\Generators\Wdg\Wdgm_Verifier”. 
     
     
     
    6.2.1.3 
    Verifier Compilation 
    The WdgM Verifier executable Verifier.exe is created as follows. 
    The integrator shall use a compiler/linker that fulfills the requirements in  [ISO26262], part 
    8, clause 11.4. Gcc 3.4.5 was tested, which fulfills the ISO26262 requirements. 
    The  gcc  compiler  is  part  of  the  delivery  if  the  WdgM  was  ordered  in  safe  context.  It  is 
    highly recommended to use the delivered compiler. 
    For the compilation process, the following files must be compiled and linked: 
    >  Generated C file: WdgM_PBcfg.c 
    >  Generated WdgM “Info file” (XSLT result): wdgm_verifier_info.c 
    >  Files from the WdgM verifier package: 
    >  wdgm_verifier.dll 
    >  libwdgm_verifierdll.a 
    The  compiled files  include  the following  files  (more files may  be  required for  compilation 
    depending on the environment and configuration options): 
    >  WdgM header files: 
    >  WdgM.h 
    >  WdgM_Cfg.h 
    >  WdgIf header file WdgIf_Types.h 
    >  Created WdgM "Info file" (XSLT result): wdgm_verifier_info.h 
    >  Generated WdgM header files: 
    >  WdgM_Cfg_Features.h 
    >  WdgM_OSMemMap.h 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    90 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    >  WdgM_PBcfg.h 
    >  Files from the WdgM Stack package: 
    >  wdgm_verifier.h 
    >  wdgm_verifier_types.h 
    >  wdgm_verifier_version.h 
    >  List of platform specific files: 
    >  Compiler.h 
    >  Compiler_Cfg.h 
    >  MemMap.h 
    >  Os.h 
    >  Os_MemMap.h 
    >  Platform_Types.h 
    >  Std_Types.h 
    >  Rte_Compiler_Cfg.h (if RTE is used) 
    >  Rte_MemMap.h (if RTE is used) 
    >  Rte_Type.h (if RTE is used) 
    The set of include commands (-I path) for all include paths to these files is referred to as 
    verify-includes. 
     
     
    Expert Knowledge 
    The syntax for the compilation call is: 
      gcc -Wall wdgm_verifier_info.c WdgM_PBcfg.c verify-includes –L dll-path –l 
    wdgm_verifier -o Verifier.exe 
    where  
    >  verify-includes is a placeholder for the path(s) of include files as described 
    above and 
    >  dll-path is a placeholder for the path where wdgm_verifier.dll and 
    libwdgm_verifierdll.a are located. 
    In case of an error free application of the compiler/linker the output is a WdgM Verifier 
    executable named Verifier.exe. 
     
     
    6.2.1.4 
    Verifier Run 
    After  the  WdgM  Verifier  executable  has  been  built,  it  has  to  be  executed.  The  WdgM 
    Verifier writes a verification report to standard output 'stdout'. This report must be reviewed 
    as stated in this section and manual verification check hast to be performed as described 
    in the Safety Manual [5]. 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    91 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
    The integrator shall run the WdgM Verifier executable as follows: 
    >  Verifier.exe >verifier_report.txt. 
     
     
    Caution 
    All other steps listed in section 6.2 are described in the Safety Manual [5]. 
     
     
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    92 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    7  Glossary and Abbreviations 
    7.1 
    Glossary 
    Term 
    Description 
    Alive Indications 
    An  indication  provided  by  a  supervised  entity  alive  counter  to  signal  its 
    aliveness to the WdgM. 
    Alive Supervision 
    A  kind  of  WdgM  monitoring  (supervision)  that  checks  if  a  Supervised 
    Entity is executed sufficiently often and not too often. 
    Checkpoint 
    A  point  in  the  control  flow  of  a  supervised  entity  where  the  activity  is 
    reported to the WdgM. 
    Closed Graph 
    A closed graph is a directed graph where every checkpoint is reachable, 
    starting from the local initial Checkpoint. 
    Configuration Tool 
    A tool used for creating a WdgM configuration, e.g., DaVinci Configurator 
    Pro. 
    Container 
    Refers  to  the  AUTOSAR  term  "container".  Represents  a  structure  with 
    different parameters. 
    Deadline Supervision  Kind of WdgM monitoring (supervision) that checks if the execution time 
    between two Checkpoints is lower or higher as the configured limits. 
    Destination 
    End point of a transition. 
    Checkpoint 
    End Checkpoint 
    The  last  checkpoint  that  is  monitored  for  a  supervised  entity.  After 
    passing  the  End  Checkpoint,  the  WdgM  expects  that  the  entity  is  not 
    monitored.  To  start  the  monitoring  again  the  Initial  checkpoint  must  be 
    passed first. A supervised entity can have zero or more End Checkpoints. 
    Error 
    Discrepancy  between  a  computed,  observed  or  measured  value  or 
    condition,  and  the  true,  specified  or  theoretically  correct  value  or 
    condition. 
    Failure 
    Termination of the ability of an element, to perform a function as required. 
    Fault 
    Abnormal condition that can cause an element or an item to fail. 
    Fault Detection Time  See. WdgM Fault Detection Time. 
    Fault Reaction Time 
    The Fault Reaction Time is the WdgM Fault Reaction Time plus the Wdg 
    Fault Reaction Time. 
    Global Monitoring 
    Status  that  summarizes  the  Local  Monitoring  Status  of  all  supervised 
    Status 
    entities. 
    Global Transition 
    A  global  transition  is  a  transition  between  two  checkpoints  in the  logical 
    program  flow  (i.e.  source  and  destination  checkpoint),  where  the 
    checkpoints belong to different supervised entities. 
    Initial Checkpoint 
    The  first  checkpoint  that  is  monitored  in  the  supervised  entity.  The 
    monitoring  of  a  supervised  entity  must  start  at  this  Checkpoint.  A 
    supervised entity has exactly one Initial Checkpoint. 
    Local Monitoring 
    Status  that  represents  the  current  result  of  supervision  of  a  single 
    Status 
    supervised entity. 
    Local Transition 
    A Local Transition is the transition between two checkpoints (i.e. source 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    93 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    and  destination  checkpoint)  in  the  logical  program  flow  in  the  same 
    supervised entity. 
    Program Flow 
    Kind  of  WdgM  monitoring  (supervision)  that  checks  if  the  inspected 
    Monitoring 
    software is executed in a predefined sequence. This sequence is defined 
    by the user and collected in the WdgM configuration. 
    WdgM Fault 
    The time-span from the occurrence of a fault to the detection of the fault 
    Detection Time 
    by  the  WdgM.  The  detection  of  a  fault  is  indicated  by  a  change  of  the 
    state WDGM_LOCAL_STATE_OK  or WDGM_GLOBAL_STATE_OK  to  a 
    different state. 
    WdgM Tick 
    Tick  counter  is  used  for  deadline  supervision  time  measurement. 
    (Counter) 
    Depending  on  the  parameter  WdgMTimebaseSource  the  tick  counter  is 
    incremented by 1 for each supervision cycle or, for higher precision, with 
    the API function WdgM_UpdateTickCounter() or with a hardware counter. 
    Safe State 
    The Safe State is the operating mode of an item without an unreasonable 
    level of risk [6], part1). 
    Watchdog 
    The  software  module  consisting  of  Watchdog  Manager,  Watchdog 
    Manager Stack 
    Interface and Watchdog Driver. 
    Watchdog 
    The  hardware-independent  upper  software  layer  of  the  Watchdog 
    Manager 
    Manager Stack. 
    (WdgM) 
    Watchdog 
    The  hardware-independent  middle  software  layer  of  the  Watchdog 
    Interface 
    Manager Stack. 
    (WdgIf) 
    Watchdog Driver 
    The  hardware-dependent  lowest  layer  of  the Watchdog  Manager  Stack. 
    (Wdg) 
    Controls the Watchdog device. 
    Source Checkpoint 
    Start point of a transition. 
    Supervised Entity 
    A software entity that is monitored by the WdgM. Each supervised entity 
    has  exactly  one  identifier.  A  supervised  entity  denotes  a  collection  of 
    checkpoints  within  a  software  component  or  basic  software  module. 
    There  may  be  zero,  one  or  more  supervised  entities  in  a  software 
    component  or  basic  software  module.  Each  entity  has  a  state  that  is 
    based  on  the  states reported from  all  its  checkpoints.  All  checkpoints  of 
    one entity belong to the same memory context. 
    Supervision Cycle 
    The time period of the WdgM in which the cyclic supervision algorithm is 
    performed. 
    Supervision 
    The number of supervision cycles used as a reference by Alive, Deadline 
    Reference Cycle 
    and  Program  Flow  Supervision  for  periodic  supervision.  Every  kind  of 
    supervision has its own reference cycle. 
    Timebase Tick 
    The  WdgM  measures  the  deadline  of  a  Transition  in  timebase  ticks  (In 
    the context of this document also referred to as WdgM tick). 
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    94 
    based on template version 5.12.0 



    Technical Reference MICROSAR WDGM 
     
     
    Note 
    The timebase tick can be provided by the following sources: 
     
    >  WdgM itself (main function) 
    >  Component OS 
    >  External source 
     
     
     
    Trigger Mode 
    The  WdgM  Trigger  Mode  is  a  set  of  Watchdog  trigger  times  and 
    Watchdog  mode.  One  Trigger  Mode  is  a  group  of  the  following  three 
    parameters: 
    >  WdgMTriggerWindowStart 
    >  WdgMTriggerConditionValue 
    >  WdgMWatchdogMode 
    Each Watchdog device can have one or more Trigger Modes. 
    Watchdog Device 
    The  Watchdog  Device  is  the  hardware  part  which  represents  the 
    watchdog  functionality.  It  can  be  an  internal  watchdog  integrated  on  the 
    MCU chip, or it can be an external watchdog device outside the MCU. 
    Table 7-1   Glossary 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    95 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    7.2 
    Abbreviations 
    Abbreviation 
    Description 
    API 
    Application Programming Interface 
    ASIL 
    Automotive Safety Integrity Level 
    AUTOSAR 
    Automotive Open System Architecture 
    BSW 
    Basis Software 
    BswM 
    Basic Software Module 
    CP 
    Checkpoint 
    CPID 
    Checkpoint Id 
    DEM 
    Diagnostic Event Manager 
    DET 
    Development Error Tracer 
    EAD 
    Embedded Architecture Designer 
    ECU 
    Electronic Control Unit 
    EDF 
    ECU Description File 
    HIS 
    Hersteller Initiative Software 
    ISO 
    International Organization for Standardization 
    MCU 
    Microcontroller Unit 
    MICROSAR 
    Microcontroller Open System Architecture (the Vector AUTOSAR 
    solution) 
    QM 
    Quality Managed Software (software development process) 
    RTE 
    Runtime Environment 
    SCHM 
    Schedule Manager module (according AUTOSAR 4.0.1) 
    SE 
    Supervised entity 
    SEID 
    Supervised Entity Identifier 
    SW-C, SWC 
    Software Component 
    Wdg 
    Watchdog Driver 
    WdgIf 
    Watchdog Interface 
    WdgM 
    Watchdog Manager 
    SWS 
    Software Specification 
    Wdg 
    Watchdog 
    Table 7-2   Abbreviations 
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    96 
    based on template version 5.12.0 


    Technical Reference MICROSAR WDGM 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.2.0 
    97 
    based on template version 5.12.0 

    Document Outline


    1.3.180 - TechnicalReference_XCP

    MICROSAR XCP

    1.3.182 - TechnicalReference_XCPs


     
     
     
     
     
     
     
     
     
     
     
     
    MICROSAR XCP 
    Technical Reference 
     
      
    Version 1.0.0 
     
     
     
     
     
     
     
     
     
     
     
    Authors 
    Andreas Herkommer 
    Status 
    Released 
     
     
     
     
     
     



    Technical Reference MICROSAR XCP 
    Document Information 
    History 
    Author 
    Date 
    Version 
    Remarks 
    Andreas Herkommer  2017-02-13 
    1.00.00 
    Initial Version 
    Reference Documents 
    No. 
    Source 
    Title 
    Version 
    [1]   AUTOSAR 
    AUTOSAR_SWS_XCP.pdf 
    2.3.0 
    [2]   AUTOSAR 
    AUTOSAR_SWS_DET.pdf 
    3.4.1 
    [3]   AUTOSAR 
    AUTOSAR_SWS_DEM.pdf 
    5.2.0 
    [4]   AUTOSAR 
    AUTOSAR_BasicSoftwareModules.pdf 
    V1.0.0 
    [5]   ASAM 
    ASAM_XCP_Part2-Protocol-Layer-Specification_V1-1-
    V1.1 
    0.pdf 
    Scope of the Document 
    This document describes the features, APIs, and integration of the XCP Protocol Layer. 
    This document does not cover the XCP Transport Layers for CAN, FlexRay and Ethernet, 
    which are available at Vector Informatik.   
    Further  information  about  XCP  on  CAN,  FlexRay  and  Ethernet  Transport  Layers  can  be 
    found in their documentation. 
    Please  also  refer  to  “The  Universal  Measurement  and  Calibration  Protocol  Family” 
    specification by ASAM e.V. 
    The XCP Protocol Layer is a hardware independent protocol that can be ported to almost 
    any  hardware.  Due  to  there  are  numerous  combinations  of  micro  controllers,  compilers 
    and memory models it cannot be guaranteed that it will run properly on any of the above 
    mentioned combinations. 
    Please  note  that  in  this  document  the  term  Application  is  not  used  strictly  for  the  user 
    software but also for any higher software layer, like e.g. a Communication Control Layer. 
    Therefore, Application refers to any of the software components using XCP. 
    The API of the functions is described in a separate chapter at the end of this document.  
     
     
    Info
     
    The source code of the XCP Protocol Layer, configuration examples and 
      documentation are available on the Internet at www.vector-informatik.de in a functional 
    restricted form. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
     
     
    Caution 
    We have configured the programs in accordance with your specifications in the 
      questionnaire. Whereas the programs do support other configurations than the one 
    specified in your questionnaire, Vector´s release of the programs delivered to your 
    company is expressly restricted to the configuration you have specified in the 
    questionnaire. 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Contents 
    1 
    Component History .................................................................................................... 10 
    2 
    Introduction................................................................................................................. 11 
    2.1 

    Architecture Overview ...................................................................................... 11 
    3 
    Functional Description ............................................................................................... 13 
    3.1 

    Features .......................................................................................................... 13 
    3.1.1 

    Deviations ........................................................................................ 13 
    3.1.2 
    Additions/ Extensions ....................................................................... 15 
    3.2 
    Initialization ...................................................................................................... 15 
    3.3 
    States .............................................................................................................. 15 
    3.4 
    Main Functions ................................................................................................ 16 
    3.5 
    Block Transfer Communication Model .............................................................. 16 
    3.6 
    Slave Device Identification ............................................................................... 17 
    3.6.1 

    XCP Station Identifier ....................................................................... 17 
    3.6.2 
    XCP Generic Identification ............................................................... 17 
    3.7 
    Seed & Key ...................................................................................................... 17 
    3.8 
    Checksum Calculation ..................................................................................... 18 
    3.8.1 

    Custom CRC calculation .................................................................. 18 
    3.9 
    Memory Access by Application ......................................................................... 18 
    3.9.1 

    Memory Read and Write Protection ................................................. 18 
    3.9.2 
    Special use case “Type Safe Copy” ................................................. 19 
    3.10 
    Event Codes .................................................................................................... 19 
    3.11 
    Service Request Messages ............................................................................. 20 
    3.12 
    User Defined Command ................................................................................... 20 
    3.13 
    Synchronous Data Transfer ............................................................................. 20 
    3.13.1 

    Synchronous Data Acquisition (DAQ) ............................................... 20 
    3.13.2 
    DAQ Timestamp ............................................................................... 21 
    3.13.3 
    Power-Up Data Transfer .................................................................. 21 
    3.13.4 
    Data Stimulation (STIM) ................................................................... 22 
    3.13.5 
    Bypassing ........................................................................................ 22 
    3.13.6 
    Data Acquisition Plug & Play Mechanisms ....................................... 22 
    3.13.7 
    Event Channel Plug & Play Mechanism ........................................... 23 
    3.13.8 
    Send Queue ..................................................................................... 23 
    3.13.9 
    Data consistency .............................................................................. 23 
    3.14 
    The Online Data Calibration Model .................................................................. 24 
    3.14.1 

    Page Switching ................................................................................ 24 
    3.14.2 
    Page Switching Plug & Play Mechanism .......................................... 24 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    3.14.3 
    Calibration Data Page Copying ........................................................ 24 
    3.14.4 
    Freeze Mode Handling ..................................................................... 24 
    3.15 
    Flash Programming .......................................................................................... 25 
    3.15.1 

    Flash Programming by the ECU’s Application .................................. 25 
    3.15.2 
    Flash Programming Plug & Play Mechanism ................................... 25 
    3.15.3 
    Flash Programming with a Flash Kernel ........................................... 26 
    3.16 
    Multi Core Support ........................................................................................... 26 
    3.16.1 

    Type Safe Copy ............................................................................... 26 
    3.16.2 
    DAQ/STIM with Multi Core ............................................................... 27 
    3.17 
    En- / Disabling the XCP module ....................................................................... 27 
    3.18 
    XCP measurement during the post event time ................................................. 28 
    3.19 
    Error Handling .................................................................................................. 28 
    3.19.1 

    Development Error Reporting ........................................................... 28 
    3.19.2 
    Production Code Error Reporting ..................................................... 30 
    4 
    Integration ................................................................................................................... 31 
    4.1 

    Scope of Delivery ............................................................................................. 31 
    4.1.1 

    Static Files ....................................................................................... 31 
    4.1.2 
    Templates – user modifiable ............................................................. 31 
    4.1.3 
    Dynamic Files .................................................................................. 31 
    4.1.4 
    Generated a2l files ........................................................................... 31 
    4.2 
    Critical Sections ............................................................................................... 32 
    4.2.1 

    XCP_EXCLUSIVE_AREA_0 ............................................................ 32 
    4.2.2 
    XCP_EXCLUSIVE_AREA_1 ............................................................ 32 
    4.2.3 
    XCP_EXCLUSIVE_AREA_2 ............................................................ 32 
    5 
    API Description ........................................................................................................... 33 
    5.1 

    Type Definitions ............................................................................................... 33 
    5.2 
    Services provided by XCP ............................................................................... 33 
    5.2.1 

    Xcp_InitMemory ............................................................................... 33 
    5.2.2 
    Xcp_Init ............................................................................................ 34 
    5.2.3 
    Xcp_Event ....................................................................................... 34 
    5.2.4 
    Xcp_StimEventStatus ...................................................................... 35 
    5.2.5 
    Xcp_MainFunction ........................................................................... 36 
    5.2.6 
    Xcp_SendEvent ............................................................................... 36 
    5.2.7 
    Xcp_PutChar.................................................................................... 37 
    5.2.8 
    Xcp_Print ......................................................................................... 38 
    5.2.9 
    Xcp_Disconnect ............................................................................... 38 
    5.2.10 
    Xcp_SendCrm .................................................................................. 39 
    5.2.11 
    Xcp_GetVersionInfo ......................................................................... 39 
    5.2.12 
    Xcp_ModifyProtectionStatus ............................................................ 40 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    5.2.13 
    Xcp_GetSessionStatus .................................................................... 40 
    5.2.14 
    Xcp_GetXcpDataPointer .................................................................. 41 
    5.3 
    Services provided by the XCP Protocol Layer and called by the XCP 
    Transport Layer ................................................................................................ 42 
    5.3.1 

    Xcp_TlRxIndication .......................................................................... 42 
    5.3.2 
    Xcp_TlTxConfirmation ...................................................................... 42 
    5.3.3 
    Xcp_SetActiveTl ............................................................................... 43 
    5.3.4 
    Xcp_GetActiveTl .............................................................................. 43 
    5.4 
    XCP Transport Layer Services called by the XCP Protocol Layer .................... 44 
    5.4.1 

    <Bus>Xcp_Send .............................................................................. 44 
    5.4.2 
    <Bus>Xcp_SendFlush ..................................................................... 45 
    5.4.3 
    <Bus>Xcp_TlService ........................................................................ 45 
    5.5 
    Application Services called by the XCP Protocol Layer .................................... 46 
    5.5.1 

    XcpAppl_GetTimestamp .................................................................. 46 
    5.5.2 
    XcpAppl_GetPointer......................................................................... 47 
    5.5.3 
    XcpAppl_GetIdData ......................................................................... 48 
    5.5.4 
    XcpAppl_GetSeed ........................................................................... 48 
    5.5.5 
    XcpAppl_Unlock ............................................................................... 49 
    5.5.6 
    XcpAppl_CalibrationWrite ................................................................ 50 
    5.5.7 
    XcpAppl_MeasurementRead ........................................................... 50 
    5.5.8 
    XcpAppl_CheckReadAccess ............................................................ 51 
    5.5.9 
    XcpAppl_CheckProgramAccess....................................................... 51 
    5.5.10 
    XcpAppl_UserService ...................................................................... 52 
    5.5.11 
    XcpAppl_OpenCmdIf ....................................................................... 52 
    5.5.12 
    XcpAppl_SendStall .......................................................................... 53 
    5.5.13 
    XcpAppl_DisableNormalOperation ................................................... 54 
    5.5.14 
    XcpAppl_StartBootLoader ................................................................ 54 
    5.5.15 
    XcpAppl_Reset ................................................................................ 55 
    5.5.16 
    XcpAppl_ProgramStart .................................................................... 55 
    5.5.17 
    XcpAppl_FlashClear ........................................................................ 56 
    5.5.18 
    XcpAppl_FlashProgram ................................................................... 57 
    5.5.19 
    XcpAppl_DaqResume ...................................................................... 57 
    5.5.20 
    XcpAppl_DaqResumeStore ............................................................. 58 
    5.5.21 
    XcpAppl_DaqResumeClear ............................................................. 59 
    5.5.22 
    XcpAppl_CalResumeStore............................................................... 59 
    5.5.23 
    XcpAppl_GetCalPage ...................................................................... 60 
    5.5.24 
    XcpAppl_SetCalPage ....................................................................... 60 
    5.5.25 
    XcpAppl_CopyCalPage .................................................................... 61 
    5.5.26 
    XcpAppl_SetFreezeMode ................................................................ 62 
    5.5.27 
    XcpAppl_GetFreezeMode ................................................................ 62 
    5.5.28 
    XcpAppl_CalculateChecksum .......................................................... 63 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    5.5.29 
    XcpAppl_ConStateNotification ......................................................... 64 
    5.5.30 
    XcpAppl_MemCpy ........................................................................... 64 
    5.6 
    Services used by XCP ..................................................................................... 65 
    6 
    Configuration .............................................................................................................. 66 
    6.1 

    Configuration Variants ...................................................................................... 66 
    7 
    Glossary and Abbreviations ...................................................................................... 67 
    7.1 

    Abbreviations ................................................................................................... 67 
    8 
    Contact ........................................................................................................................ 69 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Illustrations 
    Figure 2-1 
    AUTOSAR 4.1 Architecture Overview ....................................................... 11 
    Figure 2-2 
    Interfaces to adjacent modules of the XCP ............................................... 12 
    Figure 3-1 
    Connection State Machine ........................................................................ 16 
    Figure 3-2 
    Data consistency ...................................................................................... 23 
    Figure 3-3 
    Application of Xcp_Event function on Multi Core systems ......................... 27 
     
    Tables 
    Table 1-1  
    Component history.................................................................................... 10 
    Table 3-1  
    Supported AUTOSAR standard conform features ..................................... 13 
    Table 3-2  
    Deviations from AUTOSAR standard conform features ............................. 13 
    Table 3-3  
    Deviations from ASAM standard conform features .................................... 15 
    Table 3-4  
    Features provided beyond the AUTOSAR standard .................................. 15 
    Table 3-5  
    States ....................................................................................................... 15 
    Table 3-6  
    Event codes .............................................................................................. 20 
    Table 3-7  
    Service IDs ............................................................................................... 29 
    Table 3-8  
    Errors reported to DET ............................................................................. 29 
    Table 3-9  
    Errors reported to DEM ............................................................................. 30 
    Table 4-1  
    Static files ................................................................................................. 31 
    Table 4-2  
    Templates ................................................................................................. 31 
    Table 4-3  
    Generated files ......................................................................................... 31 
    Table 5-1  
    Type definitions ......................................................................................... 33 
    Table 5-2  
    Xcp_ChannelStruct ................................................................................... 33 
    Table 5-3  
    Xcp_InitMemory ........................................................................................ 34 
    Table 5-5  
    Xcp_Event ................................................................................................ 35 
    Table 5-6  
    Xcp_StimEventStatus ............................................................................... 36 
    Table 5-7  
    Xcp_MainFunction .................................................................................... 36 
    Table 5-8  
    Xcp_SendEvent ........................................................................................ 37 
    Table 5-9  
    Xcp_PutChar ............................................................................................ 38 
    Table 5-10  
    Xcp_Print .................................................................................................. 38 
    Table 5-11  
    Xcp_Disconnect ........................................................................................ 39 
    Table 5-12  
    Xcp_SendCrm .......................................................................................... 39 
    Table 5-13  
    Xcp_GetVersionInfo .................................................................................. 40 
    Table 5-14  
    Xcp_ModifyProtectionStatus ..................................................................... 40 
    Table 5-15  
    Xcp_GetSessionStatus ............................................................................. 41 
    Table 5-16  
    Xcp_GetXcpDataPointer ........................................................................... 41 
    Table 5-17  
    Xcp_TlRxIndication ................................................................................... 42 
    Table 5-18  
    Xcp_TlTxConfirmation .............................................................................. 43 
    Table 5-19  
    Xcp_SetActiveTl ....................................................................................... 43 
    Table 5-20  
    Xcp_GetActiveTl ....................................................................................... 44 
    Table 5-21  
    <Bus>Xcp_Send ....................................................................................... 45 
    Table 5-22  
    <Bus>Xcp_SendFlush .............................................................................. 45 
    Table 5-23  
    <Bus>Xcp_TlService ................................................................................ 46 
    Table 5-24  
    XcpAppl_GetTimestamp ........................................................................... 47 
    Table 5-25  
    XcpAppl_GetPointer ................................................................................. 48 
    Table 5-26  
    XcpAppl_GetIdData .................................................................................. 48 
    Table 5-27  
    XcpAppl_GetSeed .................................................................................... 49 
    Table 5-28  
    XcpAppl_Unlock ....................................................................................... 50 
    Table 5-29  
    XcpAppl_CalibrationWrite ......................................................................... 50 
    Table 5-30  
    XcpAppl_MeasurementRead .................................................................... 51 
    Table 5-31  
    XcpAppl_CheckReadAccess .................................................................... 51 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Table 5-32  
    XcpAppl_CheckProgramAccess ............................................................... 52 
    Table 5-33  
    XcpAppl_UserService ............................................................................... 52 
    Table 5-34  
    XcpAppl_OpenCmdIf ................................................................................ 53 
    Table 5-35  
    XcpAppl_SendStall ................................................................................... 54 
    Table 5-36  
    XcpAppl_DisableNormalOperation ........................................................... 54 
    Table 5-37  
    XcpAppl_StartBootLoader ........................................................................ 55 
    Table 5-38  
    XcpAppl_Reset ......................................................................................... 55 
    Table 5-39  
    XcpAppl_ProgramStart ............................................................................. 56 
    Table 5-40  
    XcpAppl_FlashClear ................................................................................. 57 
    Table 5-41  
    XcpAppl_FlashProgram ............................................................................ 57 
    Table 5-42  
    XcpAppl_DaqResume .............................................................................. 58 
    Table 5-43  
    XcpAppl_DaqResumeStore ...................................................................... 59 
    Table 5-44  
    XcpAppl_DaqResumeClear ...................................................................... 59 
    Table 5-45  
    XcpAppl_CalResumeStore ....................................................................... 60 
    Table 5-46  
    XcpAppl_GetCalPage ............................................................................... 60 
    Table 5-47  
    XcpAppl_SetCalPage ............................................................................... 61 
    Table 5-48  
    XcpAppl_CopyCalPage ............................................................................ 62 
    Table 5-49  
    XcpAppl_SetFreezeMode ......................................................................... 62 
    Table 5-50  
    XcpAppl_GetFreezeMode......................................................................... 63 
    Table 5-51  
    XcpAppl_CalculateChecksum ................................................................... 64 
    Table 5-52  
    XcpAppl_ConStateNotification .................................................................. 64 
    Table 5-53  
    XcpAppl_MemCpy .................................................................................... 65 
    Table 5-54  
    Services used by the XCP ........................................................................ 65 
    Table 7-1  
    Abbreviations ............................................................................................ 68 
     
     
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 

    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    1  Component History 
    The  component  history  gives  an  overview  over  the  important  milestones  that  are 
    supported in the different versions of the component.  
    Component Version  New Features 
    [ 1.00.xx ] 
    Initial Version of re-factored AR4 Protocol Layer  
    Table 1-1   Component history 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    10 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    2  Introduction 
    This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
    module XCP as specified in [1].  
     
    Supported AUTOSAR Release*: 

    Supported Configuration Variants: 
    pre-compile 
    Vendor ID: 
    XCP_VENDOR_ID 
    30 decimal 
    (= Vector-Informatik, 
    according to HIS) 
    Module ID: 
    XCP_MODULE_ID   
    26 decimal 
    (according to ref. [4]) 
    * For the detailed functional specification please also refer to the corresponding AUTOSAR SWS. 
     
     
    2.1 
    Architecture Overview 
    The following figure shows where the XCP is located in the AUTOSAR architecture. 
     
    Figure 2-1  AUTOSAR 4.1 Architecture Overview  
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    11 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
     
    The following figure shows the interfaces to adjacent modules of the XCP. The interfaces 
    of the XCP Protocol Layer and the application call-back header are described in chapter 5.  
     class Module Structure Adj acency
    Must be implemented 
    Application
    by the user
    XcpAppl
    XCP
    DET
    XcpOnCan
    XcpOnFr
    XcpOnTcpIp
    CanIf
    FrIf
    SoAd
     
    Figure 2-2  Interfaces to adjacent modules of the XCP 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    12 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    3  Functional Description 
    3.1 
    Features 
    The  Universal  Measurement  and  Calibration  Protocol  (XCP)  is  standardized  by  the 
    European ASAM  working  committee  for  standardization  of  interfaces  used  in  calibration 
    and measurement data acquisition. XCP is a higher level protocol used for communication 
    between  a  measurement  and  calibration  system  (MCS,  i.e.  CANape)  and  an  electronic 
    control unit (ECU). The implementation supports the ASAM XCP 1.1 Specification. 
    The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
    listed in the tables 
    >  Table 3-1   Supported AUTOSAR standard conform features  
    >  Table 3-2   Deviations from AUTOSAR standard conform features 
    >  Table 3-3   Deviations from ASAM standard conform features 
    Vector Informatik provides further XCP functionality beyond the AUTOSAR standard. The 
    corresponding features are listed in the table 
    >  Table 3-4   Features provided beyond the AUTOSAR standard 
     
    The following features specified in [1] are supported: 
    Supported AUTOSAR Standard Conform Features 
    ASAM XCP Version 1.1 
    Table 3-1   Supported AUTOSAR standard conform features 
    3.1.1 
    Deviations 
    The following features specified in [1] are not or only partly supported: 
    Category 
    Description 
    ASR 
    Version 

    Functional 
    The following features are not supported: 
    4.2.2 
      The command GET_SLAVE_ID 
      A CDD as transport layer 
    API 
    The following APIs are not provided by XCP: 
    4.2.2 
      Xcp_SetTransmissionMode 
    API 
    The API Xcp_<Module>TriggerTransmit is only supported for 
    4.2.2 
    transport layer FrIf. 
    Table 3-2   Deviations from AUTOSAR standard conform features 
     
    Category 
    Description 
    ASAM 
    Version 

    Functional  1.6.4.1.2.4 Get general information on DAQ processor: 
    1.1 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    13 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
      Bitwise stimulation is not supported 
    Functional  1.6.4.2 Static DAQ list configuration (stat): 
    1.1 
      Static DAQ lists are not supported; only dynamic DAQ lists are 
    supported 
    Functional  1.7.2.3 Interleaved Communication Model: 
    1.1 
      Multiple request messages are not allowed to be transmitted by the 
    XCP master before receiving the corresponding response 
    message 
    Functional  1.6.5.2.4 Set Data Format before Programming: 
    1.1 
      Only the default programming format is supported, therefore the 
    command PROGRAM_FORMAT is not supported 
    Functional  1.6.5.2.2 Get specific information for a sector: 
    1.1 
      The command GET_SECTOR_INFO does not return a Program 
    Sequence Number 
    Functional  1.6.5.2.7 Program Verify: 
    1.1 
      The command PROGRAM_VERIFY is not supported 
    Functional  Daq configuration: 
    1.1 
      Number of DAQ lists is limited to 0xFF 
      Maximum DTO length is limited to 0xFF 
      DAQ does not support address extension 
      DAQ-list and event channel prioritization is not supported 
      DAQ bit offset not supported 
      The resume bits in DAQ lists are not set (no indication in response 
    of command GET_DAQ_LIST_MODE) 
    Functional  5.1.10  ODT Optimization: 
    1.2 
      The ODT Optimization is not supported 
    Functional  1.2 Table of Event Codes: 
    1.1 
      XCP does not send any event packet natively. If required, the 
    implementation has to be added to application 
    Functional  Overload indication by an event is not supported 
    1.1 
    Functional  1.3 Table of Service Request Codes (SERV): 
    1.1 
      The Service Request SERV_RESET is not supported 
    Functional  1.6.1.2.9 Build Checksum over memory range: 
    1.1 
      The checksum type XCP_CRC_16 or XCP_CRC_32 is only supported 
    if the checksum calculation is forwarded to a AUTOSAR CRC 
    module 
      Maximum checksum block size is 0xFFFF 
    Functional  1.6.3 Page Switching Commands (PAG): 
    1.1 
      The command GET_PAGE_INFO is not supported 
      The command GET_SEGMENT_INFO is not supported 
      Only one segment and two pages are supported 
    Functional  Seed and Key: 
    1.1 
      The seed size and key size must be equal or less MAX_CTO-2 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    14 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional  Consistency only supported on ODT level. 
    1.1 
    Functional  No other identification field type supported than “absolute ODT number”. 
    1.1 
    Table 3-3   Deviations from ASAM standard conform features 
    3.1.2 
    Additions/ Extensions 
    The following features are provided beyond the AUTOSAR standard: 
    Features Provided Beyond The AUTOSAR Standard 
    Support of CAN-FD 
    Support transmission and reception of DTO on multiple cores simultaneously. 
    Table 3-4   Features provided beyond the AUTOSAR standard 
    3.2 
    Initialization 
    The XCP gets initialized by call of the following services: 
      5.2.1 Xcp_InitMemory 
      5.2.2 Xcp_Init 
    Xcp_InitMemory has to be called if memory is not initialized by start-up code. 
    The EcuM takes care of initialization, if no EcuM is used these functions have to be called 
    by application in correct order. 
    3.3 
    States 
    The  XCP’s  connection  state  machine  is  shown  in  Figure  3-1,  comprises  the  following 
    states:  
    State Name 
    Description 
    XCP_CON_STATE_DISCONNECTED In this state neither CTO nor DTO messages can be received or 
    transmitted, except of the Connect CTO. 
    XCP_CON_STATE_CONNECTED 
    In this state communication is fully supported. 
     
    XCP_CON_STATE_RESUME 
    In this state CTO messages (except of Connection CTO) are 
     
    rejected, whereas DTO messages can be received and 
    transmitted. 
    Table 3-5   States 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    15 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
     stm Connection State Machine
    Initial
    Xcp_Init
    Resume Mode
    [OFF]
    [ON]
    DISCONNECTED
    Xcp_CmdStd_Connect
    CONNECTED
    RESUME
    Xcp_CmdStd_Connect
    Xcp_Disconnect
     
    Figure 3-1  Connection State Machine 
    The  states  can  be  changed  by  the  XCP  master  by  sending  the  CTOs  Connect  and 
    Disconnect. Additionally, the connection can be broken by the service: 
      5.2.9 Xcp_Disconnect 
    3.4 
    Main Functions 
    The Xcp provides a MainFunction: 
      5.2.5 Xcp_MainFunction 
    It must be called cyclically and performs the following tasks: 
    >  Checksum calculation which is done asynchronously in configurable chunks to prevent 
    extensive runtime 
    >  Resume Mode Handling 
    The  Xcp  MainFunction  is  normally  called  by  the  SchM.  If  you  use  a  3rd  party  SchM  you 
    must configure it accordingly such that the function is called cyclically. 
    3.5 
    Block Transfer Communication Model 
    In  the  standard  communication  model,  each  request  packet  is  responded  by  a  single 
    response packet or an error packet. To speed up memory uploads, downloads and flash 
    programming the XCP commands UPLOAD, DOWNLOAD and PROGRAM support a block transfer 
    mode similar to ISO/DIS 15765-2. 
    In  the  Master  Block  Transfer  Mode  can  the  master  transmit  subsequent  (up  to  the 
    maximum block size MAX_BS) request packets to the slave without getting any response 
    in between. The slave responds after transmission of the last request packet of the block. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    16 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    In Slave Block Transfer Mode the slave can respond subsequent (there is no limitation) to 
    a request without additional requests in between. 
    The Block Transfer Mode is  limited to a block size of 255 Bytes. On bus systems with a 
    large  max  CTO  (e.g.  254  Bytes)  this  Mode  might  be  counterproductive  and  should  stay 
    disabled. 
    3.6 
    Slave Device Identification 
    3.6.1 
    XCP Station Identifier 
    The  XCP  station  identifier  is  an ASCII  string  that  identifies  the  ECU’s  software  program 
    version. 
    The  MCS  can  interpret  this  identifier  as  file  name  for  the  ECU  database.  The  ECU 
    developer  should  change  the  XCP  station  identifier  with  each  program  change. This  will 
    prevent  database  mix-ups  and  grant  the  correct  access  of  measurement  and  calibration 
    objects  from  the  MCS  to  the  ECU.  Another  benefit  of  the  usage  of  the  XCP  station 
    identifier is the automatic assignment of the correct ECU database at program start of the 
    MCS via the plug & play mechanism. The plug & play mechanism prevents the user from 
    selecting the wrong ECU database. 
    3.6.2 
    XCP Generic Identification 
    The XCP provides a generic mechanism for identification by the GET_ID command. For this 
    purpose a call-back exist which can be implemented by the user to provide the requested 
    information (see 5.5.3 XcpAppl_GetIdData). 
    3.7 
    Seed & Key 
    The  seed  and  key  feature  allows  individual  access  protection  for  calibration,  flash 
    programming,  synchronous  data  acquisition  and  data  stimulation.  The  MCS  requests  a 
    seed  (a  few  data  bytes)  from  the  ECU  and  calculates  a  key  based  on  a  proprietary 
    algorithm and sends it back to the ECU. 
    If  Seed  &  Key  is  enabled  in  the  configuration  tool  the  following  APIs  need  to  be 
    implemented by the user: 
      5.5.4 XcpAppl_GetSeed 
      5.5.5 XcpAppl_Unlock 
    The  XcpAppl_GetSeed  call-back  function  returns  a  seed  that  is  transferred  to  the  MCS. 
    The  XcpAppl_Unlock  call-back  function  has  to  verify  a  received  key  based  on  the  seed 
    and then return the resource that shall be unlocked. 
    The  protection  state  can  also  individually  be  modified  by  the  application.  The  following 
    service can be used for this purpose: 
      5.2.12 Xcp_ModifyProtectionStatus 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    17 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
     
     
    Note 
    Annotation for the usage of CANape: 
      The calculation of the key is done in a DLL, which is developed by the ECU 
    manufacturer and which must be located in the EXEC directory of CANape. CANape 
    can access the ECU only if the ECU accepts the key. If the key is not valid, the ECU 
    stays locked. 
     
     
    3.8 
    Checksum Calculation 
    The  XCP  Protocol  Layer  supports  calculation  of  a  checksum  over  a  specific  memory 
    range. The XCP Protocol Layer supports all XCP ADD algorithms and the CRC16CCITT 
    checksum  calculation  algorithm.  If  the  AUTOSAR  CRC  Module  is  used  also  the  XCP 
    CRC32 algorithm can be used. 
    If checksum calculation is enabled the background task has to be called cyclically. 
    3.8.1 
    Custom CRC calculation 
    The Protocol Layer also allows the calculation of the CRC by the application. For this the 
    call-back is called: 
      5.5.28 XcpAppl_CalculateChecksum 
    This call-back can either calculate the checksum synchronously and return XCP_CMD_OK or 
    it  can  trigger  the  calculation  and  return  XCP_CMD_PENDING  for  asynchronous  calculation  of 
    the checksum. In each case the response frame has to be assembled. 
    3.9 
    Memory Access by Application 
    Memory  access  to measure  or  to  calibrate  variables  is  performed by  two  call-backs  that 
    can  be  modified  by  the  user  to  his  needs.  Please  note  that  these API  are  only  used  for 
    polling  access  by  default.  DAQ/STIM  uses  direct  memory  access  out  of  performance 
    reasons. 
    DAQ/STIM 
    access 
    via 
    these 
    call-backs 
    can 
    be 
    enabled 
    by 
    /MICROSAR/Xcp/XcpGeneral/XcpDAQMemAccessByApplication. 
    The following call-backs are  called by the Protocol Layer whenever a memory access is 
    performed: 
      5.5.6 XcpAppl_CalibrationWrite 
      5.5.7 XcpAppl_MeasurementRead 
    These APIs  can  be  used  to  perform  the  memory  access  synchronously,  asynchronously 
    (e.g.  for  EEPROM  access),  and  they  can  deny  the  memory  access,  depending  on  the 
    return value. 
    3.9.1 
    Memory Read and Write Protection 
    Memory protection can easily be performed by the two above mentioned call-backs 
    returning XCP_ERR_ACCESS_DENIED. 
    Additionally the configuration switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpMemoryReadProtection enables the call-
    back: 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    18 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
      5.5.8 XcpAppl_CheckReadAccess 
    This call-back is required for other services like CRC calculation to check the requested 
    memory size beforehand. 
    As Flash programming uses a different memory access mechanism, a different set of call-
    backs is used. 
    The configuration switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming/XcpProgrammingWriteProtection enables 
    the call-back: 
      5.5.9 XcpAppl_CheckProgramAccess 
    This call-back can be used to check the memory range whenever a flash segment is 
    cleared or programmed. 
    3.9.2 
    Special use case “Type Safe Copy” 
    The above mentioned APIs will also be used if the feature “Type Safe Copy” is enabled. If 
    this is the case polling as well as DAQ/STIM measurement will use these functions to 
    read/write data. The template code for these functions performs read/write access in an 
    atomic way for basic data types (e.g. uint16 / uint32). 
    3.10  Event Codes 
    The slave device may report events by sending asynchronous event packets (EV), which 
    contain event codes, to the master device. The transmission is not guaranteed due to the 
    fact that these event packets are not acknowledged. 
    The  transmission  of  event  codes  is  enabled  with  the  configuration  switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpAsynchMessage/XcpEventCodes. The transmission is done 
    by the service: 
      5.2.6 Xcp_SendEvent. 
    The event codes can be found in the following table. 
    Event 
    Code  Description 
    XCP_EVC_RESUME_MODE 
    0x00 
    The slave indicates that it is starting in RESUME 
    mode. 
    XCP_EVC_CLEAR_DAQ 
    0x01 
    The slave indicates that the DAQ configuration in 
    non-volatile memory has been cleared. 
    XCP_EVC_STORE_DAQ 
    0x02 
    The slave indicates that the DAQ configuration has 
    been stored into non-volatile memory. 
    XCP_EVC_STORE_CAL 
    0x03 
    The slave indicates that the calibration data has 
    been stored. 
    XCP_EVC_CMD_PENDING 
    0x05 
    The slave requests the master to restart the time-
    out detection. 
    XCP_EVC_DAQ_OVERLOAD 
    0x06 
    The slave indicates an overload situation when 
    transferring DAQ lists. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    19 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    XCP_EVC_SESSION_TERMINATED 
    0x07 
    The slave indicates to the master that it 
    autonomously decided to disconnect the current 
    XCP session. 
    XCP_EVC_TIME_SYNC 
    0x08 
    Transfer of externally triggered timestamp. 
    XCP_EVC_STIM_TIMEOUT 
    0x09 
    Indication of a STIM timeout. 
    XCP_EVC_SLEEP 
    0x0A 
    Slave entering SLEEP mode. 
    XCP_EVC_WAKE_UP 
    0x0B 
    Slave leaving SLEEP mode. 
    XCP_EVC_USER 
    0xFE 
    User-defined event. 
    XCP_EVC_TRANSPORT 
    0xFF 
    Transport layer specific event. 
    Table 3-6   Event codes 
    3.11  Service Request Messages  
    The slave device may request some action to be performed by the master device. This is 
    done by the transmission of a Service  Request  Packet  (SERV) that  contains the service 
    request  code.  The  transmission  of  service  request  packets  is  asynchronous  and  not 
    guaranteed because these packets are not acknowledged. 
    The service request messages can be sent by the following functions: 
      5.2.7 Xcp_PutChar 
      5.2.8 Xcp_Print 
    3.12  User Defined Command 
    The  XCP  Protocol  allows  having  a  user  defined  command  with  an  application  specific 
    functionality. 
    The 
    user 
    defined 
    command 
    is 
    enabled 
    by 
    setting 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpUserDefinedCommand and upon reception of 
    the  user  command  the  following  callback  function  is  called  by  the  XCP  command 
    processor: 
      5.5.10 XcpAppl_UserService 
    3.13  Synchronous Data Transfer 
    3.13.1  Synchronous Data Acquisition (DAQ) 
    The 
    synchronous 
    data 
    transfer 
    can 
    be 
    enabled 
    with 
    the 
    container 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim.  In  this mode,  the  MCS  configures  tables  of 
    memory  addresses  in  the  XCP  Protocol  Layer.  These  tables  contain  pointers  to 
    measurement objects, which have been configured previously for the measurement in the 
    MCS. Each configured table is assigned to an event channel. 
    The function Xcp_Event(x) has to be called for each event channel with the corresponding 
    event  channel  number  as  parameter.  The  application  has  to  ensure  that  Xcp_Event  is 
    called with the correct cycle time. Note that the event channel numbers are given by the 
    GenTool  by  configuring  /MICROSAR/Xcp/XcpConfig/XcpEventChannel.  Symbolic  name 
    values for each event channel are generated by the GenTool. 
    The  ECU  automatically  transmits  the  current  value  of  the  measurement  objects  via 
    messages to the MCS, when the function Xcp_Event is executed in the ECU’s code with 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    20 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    the corresponding event channel number. This means that the data can be  transmitted at 
    any particular point of the ECU code when the data values are valid. 
    The data acquisition mode can be used in multiple configurations that are described within 
    the next chapters. 
     
     
     
    Note 
    Annotation for the usage of CANape: 
      It is recommended to enable both data acquisition plug & play mechanisms to detect 
    the DAQ settings. 
     
     
     
    3.13.2  DAQ Timestamp 
    There are two methods to generate timestamps for data acquisition signals. 
    1. By the MCS tool on reception of the message 
    2. By the ECU (XCP slave) 
    The time precision of the MCS tool is adequate for the most applications; however, some 
    applications  like  the  monitoring  of  the  OSEK  operating  system  or  measurement  on 
    FlexRay  with  an  event  cycle  time  smaller  than  the  FlexRay  cycle  time  require  higher 
    precision timestamps. In such cases, ECU generated timestamps are recommended. 
    The timestamp must be implemented in a call-back which returns the current value: 
      5.5.1 XcpAppl_GetTimestamp 
    There are several possibilities to implement such a timestamp: 
    >  16bit Counter variable, incremented by software in a fast task (.e.g. 1ms task) for 
    applications where such a resolution is sufficient and returned in the above mentioned 
    call-back. 
    >  32bit General Purpose Timer of the used µC, configured to a certain repetition rate 
    (e.g. 1µs increment) for applications that require a high resolution of the timestamp 
    and returned in the above mentioned call-back. 
    The  resolution  and  increment  value  of this  timer  must  be  configured  in  the  configuration 
    tool accordingly. 
    3.13.3  Power-Up Data Transfer  
    Power-up data transfer (also called resume mode) allows automatic data transfer (DAQ) of 
    the  slave  directly  after  power-up.  Automotive  applications  would  e.g.  be  measurements 
    during cold start. 
    The slave and the master have to store all the necessary communication parameters for 
    the  automatic  data  transfer  after  power-up.  Therefore  the  following  functions  have  to  be 
    implemented in the slave. 
      5.5.19 XcpAppl_DaqResume 
      5.5.20 XcpAppl_DaqResumeStore 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    21 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
      5.5.21 XcpAppl_DaqResumeClear  
    To 
    use 
    the 
    resume 
    mode 
    the 
    compiler 
    switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpResumeMode has to be enabled. 
    Keep  also  in  mind that  the  Xcp_MainFunction  has  to be  called  cyclically  in  order for  the 
    resume mode to work. If Resume Mode is enabled by the MCS tool the before mentioned 
    call-back XcpAppl_DaqResumeStore is called by the Xcp_MainFunction. 
     
     
     
    Note 
    Annotation for the use of CANape: 
      Start the resume mode with the menu command Measurement | Start and push the 
    button “Measure offline” on the dialog box. 
     
     
     
    3.13.4  Data Stimulation (STIM)  
    Synchronous Data Stimulation is the inverse mode of Synchronous Data Acquisition. 
    The  STIM  processor  buffers  incoming  data  stimulation  packets.  When  an  event  occurs 
    (Xcp_Event  is  called),  which  triggers  a  DAQ  list  in  data  stimulation  mode,  the  buffered 
    data is transferred to the slave device’s memory. 
    To 
    use 
    data 
    stimulation 
    (STIM) 
    the 
    configuration 
    switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpSynchronousDataStimulation  has  to  be 
    enabled. 
    3.13.5  Bypassing  
    Bypassing  can  be  realized  by  making  use  of  Synchronous  Data Acquisition  (DAQ)  and 
    Synchronous Data Stimulation (STIM) simultaneously. 
    State-of-the-art Bypassing also requires the administration of the bypassed functions. This 
    administration has to be performed in a MCS like e.g. CANape. 
    Also  the  slave  should  perform  plausibility  checks  on  the  data  it  receives  through  data 
    stimulation.  The  borders  and  actions  of  these  checks  are  set  by  standard  calibration 
    methods. No special XCP commands are needed for this. 
    3.13.6  Data Acquisition Plug & Play Mechanisms 
    The XCP Protocol Layer comprises two plug & play mechanisms for data acquisition: 
    >  General information on the DAQ processor   
    >  General information on DAQ processing resolution   
    The general information on the DAQ processor contains: 
    >  General properties of DAQ lists 
    >  Total number of available DAQ lists and event channels 
    The general information on the DAQ processing resolution contains: 
    >  Granularity and maximum size of ODT entries for both directions 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    22 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    >  Information on the time stamp mode 
    3.13.7  Event Channel Plug & Play Mechanism 
    The  XCP  Protocol  Layer  supports  a  plug  &  play  mechanism  that  allows  the  MCS  to 
    automatically detect  the available  event  channels in the slave. The associated service  is 
    enabled by /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpGetDAQEventInfo. 
    If this option is enabled the MCS can read the configured Event Channels from the XCP 
    Slave. 
    3.13.8  Send Queue 
    The Send Queue is used to store measurement values until they can be transmitted on the 
    bus. The Send Queue size can be configured in the configuration tool. It is defined by the 
    parameter  /MICROSAR/Xcp/XcpConfig/XcpCoreDefinition/XcpSendQueueSize.  Please  be 
    aware that in a Multi Core system multiple Send Queues may be configured. Each Core 
    the  Xcp_Event  function  is  called  on  requires  its  own  Send  Queue.  The  sizes  may  vary, 
    depending on the number of measurement values on each Core. See chapter 3.16 Multi 
    Core Support.
     
    3.13.9  Data consistency 
    The  XCP  supports  a  data  consistency  on  ODT  level.  If  a  consistency  on  DAQ  level  is 
    required, interrupts must be disabled prior calling Xcp_Event and enabled again after the 
    function  returns.  The  following  example  demonstrates  the  integrity  on  ODT  level  by 
    showing the XCP ODT frames as sent on the bus. Two Events (x, y) are configured with 
    DAQ list DAQ1 assigned to Event(x) and DAQ list DAQ2 assigned to Event(y). A call of the 
    Xcp_Event  function  with  the  respective  event  channel  number  will  then  trigger  the 
    transmission of the associated DAQ list. 
    Example1: a call of Xcp_Event(x) is interrupted by a call of Xcp_Event(y). This is allowed 
    as  long  as  the  interrupt  locks  are  provided  by  the  Schedule  Manager  (default  with 
    MICROSAR stack). 
    Example2:  a  call  of  Xcp_Event(x)  is  interrupted  by  a  call  of  Xcp_Event(x). As  a  result  a 
    DAQ  list  is  interrupted  by  itself.  This  is  not  allowed  and  must  be  prevented  by  data 
    consistency on DAQ level. For this use a interrupt lock when calling Xcp_Event() 
     
    DAQ1 
    DAQ2 
     
     
     
     
     
     ODT0 
     ODT3 
     
     ODT1 
     
     ODT4 
     
     
     
     
     ODT2 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     Example1 
     ODT0 
     ODT1 
     ODT3 
     ODT4 
     ODT2 
     
     
     Example2 
     ODT0 
     ODT1 
     ODT0 
     ODT1 
     ODT2 
     ODT2 
    Figure 3-2 Data consistency 
    Note  on  Multi  Core  systems:  It  is  in  the  responsibility  of  the  user  to  assign  only 
    measurement values relevant for the Core to the corresponding Event Channel called on 
    the specific Core. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    23 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    3.14  The Online Data Calibration Model 
    3.14.1  Page Switching 
    The  MCS  can  switch  between  a  flash  page  and  a  RAM  page.  The  XCP  command 
    SET_CAL_PAGE is used to activate the required page. The page switching is enabled with 
    the /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching definition. 
    The following application callback functions have to be implemented: 
      5.5.23 XcpAppl_GetCalPage 
      5.5.24 XcpAppl_SetCalPage 
     
     
    Note 
    Annotation for the use of CANape: 
      Open the dialog XCP Device Setup with the menu command Tools|Driver 
    Configuration. Go to the tab “FLASH”. Activate page switching. Enter a flash selector 
    value e.g. 1 and a Ram selector e.g. 0. 
     
     
     
    3.14.2  Page Switching Plug & Play Mechanism 
    The MCS can be automatically configured if the page switching plug & play mechanism is 
    used. This mechanism comprises 
    >  General information about the paging processor 
    The  page  switching  plug  &  play  mechanism  is  enabled  with  the  switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpGeneralPagingInfo. 
    3.14.3  Calibration Data Page Copying 
    Calibration data page copying is performed by the XCP command COPY_CAL_PAGE. To 
    enable 
    this 
    feature 
    the 
    compiler 
    switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpCopyPage has to be enabled. 
    For  calibration  data  page  copying  the  following  application  callback  function  has  to  be 
    provided by the application: 
      5.5.25 XcpAppl_CopyCalPage 
    3.14.4  Freeze Mode Handling 
    Freeze mode handling is performed by the XCP commands SET_SEGMENT_MODE and 
    GET_SEGMENT_MODE. 
    To 
    enable 
    this 
    feature 
    the 
    parameter 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpFreezeMode has to be enabled. 
    For freeze mode handling the following application callback functions have to be provided 
    by the application: 
      5.5.26 XcpAppl_SetFreezeMode 
      5.5.27 XcpAppl_GetFreezeMode 
      5.5.22 XcpAppl_CalResumeStore 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    24 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    3.15  Flash Programming  
    There are two methods available for the programming of flash memory. 
    >  Flash programming by the ECU’s application 
    >  Flash programming with a flash kernel 
    Depending on the hardware it might not be possible to reprogram an internal flash sector, 
    while a program is running from another sector. In this case the usage of a special flash 
    kernel is necessary. 
    3.15.1  Flash Programming by the ECU’s Application 
    If  the  internal  flash  has  to  be  reprogrammed  and  the  microcontroller  allows  to 
    simultaneously  reprogram  and  execute  code  from  the  flash  the  programming  can  be 
    performed with the ECU’s application that contains the XCP. This method is also used for 
    the programming of external flash. 
    The  flash  programming  is  done  with  the  following  XCP  commands  PROGRAM_START, 
    PROGRAM_RESET,  PROGRAM_CLEAR,  PROGRAM,  PROGRAM_NEXT,  PROGRAM_MAX,  PROGRAM_RESET, 
    1
    PROGRAM_FORMAT1, PROGRAM_VERIFY . 
    The  flash  prepare,  flash  program  and  the  clear  routines  are  platform  dependent  and 
    therefore have to be implemented by the application. 
      5.5.15 XcpAppl_Reset 
      5.5.16 XcpAppl_ProgramStart 
      5.5.17 XcpAppl_FlashClear 
      5.5.18 XcpAppl_FlashProgram 
    The 
    flash 
    programming 
    is 
    enabled 
    with 
    the 
    switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming. 
     
     
    Note 
    Annotation for the usage of CANape: 
      Open the dialog XCP Device Setup with the menu command Tools|Driver 
    Configuration. Go to the tab “FLASH” and select the entry “Direct” in the flash kernel 
    drop down list. 
     
     
     
    3.15.2  Flash Programming Plug & Play Mechanism 
    The  MCS  (like  e.g.  CANape)  can  get  information  about  the  Flash  and  the  Flash 
    programming process from the ECU. The following information is provided by the ECU: 
    >  Number of sectors, start address or length of each sector 
    >  The program sequence number, clear sequence number and programming method 
    >  Additional information about compression, encryption 
                                                
    1 Command not supported 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    25 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    The  flash  programming  plug  &  play  mechanism  is  enabled  with  the  switch 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming/XcpSector. 
    3.15.3  Flash Programming with a Flash Kernel 
    A  flash  kernel  has  to  be  used  for  the  flash  programming  if  it  is  not  possible  to 
    simultaneously  reprogram  and  execute  code  from  the  flash.  Even  though  the 
    reprogrammed sector and the sector the code is executed from are different sectors. 
    The application callback function 
      5.5.13 XcpAppl_DisableNormalOperation 
      5.5.14 XcpAppl_StartBootLoader 
    is  called  prior  to  the  flash  kernel  download  in  the  RAM.  Within  this  function  the  normal 
    operation of the ECU has to be stopped and the flash kernel download can be prepared. 
    Due  to  the  flash  kernel  is  downloaded  in  the  RAM  typically  data  gets  lost  and  no  more 
    normal operation of the ECU is possible. 
    The  flash  programming  with  a  flash  kernel  is  enabled  with  the  switch 
    /MICROSAR/Xcp/XcpGeneral/XcpBootloaderDownload. 
     
     
     
    Note 
    Annotation for the usage of CANape: 
      The  flash  kernel  is  loaded  by  CANape  into  the  microcontroller’s  RAM  via  XCP 
    whenever  the  flash  memory  has  to  be  reprogrammed.  The  flash  kernel  contains  the 
    necessary  flash  routines,  its  own  CAN-Driver  and  XCP  Protocol  implementation  to 
    communicate via the CAN interface with CANape. 
    Every flash kernel must be customized to the microcontroller and the flash type being 
    used. CANape already includes some flash kernels for several microcontrollers. There 
    is  also  an  application  note  available  by  Vector  Informatik  GmbH  that  describes  the 
    development of a proprietary flash kernel. 
    Open the dialog XCP Device Setup with the menu command Tools|Driver 
    Configuration. Go to the tab “FLASH”, and select in the ‘flash kernel’ drop down list, the 
    corresponding fkl file for the microcontroller being used. 
     
     
     
    3.16  Multi Core Support 
    3.16.1  Type Safe Copy 
    The  XCP  Protocol  Layer  supports  a  feature  called  “Type  Safe  Copy”  which  provides 
    atomic access to aligned uint16 and uint32 measurement values. This is important on multi 
    core platforms where one core is accessing a measurement value while the XCP is trying 
    to do the same running from another core. The Type Safe Copy is used for polling while 
    DAQ/STIM usually use direct memory access and copy byte wise. 
    With this option disabled, all access to measurement values is performed byte wise which 
    is not an atomic operation. 
    The following points must be taken into consideration when enabling this option: 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    26 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    >  This option allows the XCP to only read/write basic data types used on another core; it 
    cannot provide data consistency on ODT level. 
    >  This option has a slightly higher runtime. 
    >  Some MCS tools perform an optimization by grouping measurement values. This 
    option must be disabled; otherwise they do not represent unique data types anymore. 
    3.16.2  DAQ/STIM with Multi Core 
    It  is  possible  to  execute  the  Xcp_Event  function  on  a  different  Core.  This  must  be 
    configured  in  the  configuration  tool  accordingly.  For  each  Core  the  XCP  is  used  on  the 
    following  Container  must  be  created:  /MICROSAR/Xcp/XcpConfig/XcpCoreDefinition.  The 
    correct  Core  Definition  must  be  referenced  for  each  configured  Event  Channel: 
    /MICROSAR/Xcp/XcpConfig/XcpEventChannel/XcpEventChannelCoreRef.  An  Event  Channel 
    can only be called on the Core it is configured for; otherwise a DET error is thrown. 
    The  following  picture  shows  the  architecture  behind  the  Multi  Core  support  and  the  way 
    the Xcp_Event function is called on each Core: 
     act Activ ity
    OsTask
    OsTask BSW
    Application
    OsTask
    Core
    Core
    Utility Core
    Calculation of Application 
    Data
    Calculation of Utility Data
    Collecting Data 
    «datastore»
    Xcp_Ev ent(5ms_ApplicationCore)
    Lock free Core 
    Specific Queue

    Xcp_MainFunction (Trigger 
    Sequential Transmission)
    ActivityFinal
    Collecting Data 
    «datastore»
    Xcp_Ev ent(5ms_UtilityCore)
    Lock free Core 
    Specific Queue

    ActivityFinal
    ActivityFinal
     
    Figure 3-3  Application of Xcp_Event function on Multi Core systems 
    3.17  En- / Disabling the XCP module 
    The macro XCP_ACTIVATE/XCP_DEACTIVATE can be used to en- or disable the XCP module 
    during  run  time.  Thus  the  XCP  functionality  can  be  controlled  by  the  application.  These 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    27 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
    macros control the protocol and transport layer together, i.e. enabling or disabling them as 
    a whole. It is recommended to perform a Xcp_Disconnect() API call to bring the XCP in a 
    save state before it is disabled. 
    3.18  XCP measurement during the post event time 
    In use cases where there is no further communication request except XCP measurement 
    the session state of the XCP can be determined to prevent an early shutdown of the ECU. 
    For this purpose the following API exist: 
      5.2.13 Xcp_GetSessionStatus 
    An example implementation that is called cyclically could look like the following example: 
    Example 

     
      uint16 sessionState; 
     
      sessionState = Xcp_GetSessionStatus(); 
      if( 0 != (sessionState & XCP_SESSION_CONNECTED) ) 
      { 
        /* Is the xcp actively used? */ 
        if( 0 != (sessionState & (XCP_SESSION_DAQ | XCP_SESSION_POLLING)) ) 
        { 
          /* Yes, reload timer */ 
          swTimer = XCPAPPL_TIMEOUT_TIMER_RELOAD; 
        } 
      } 
     
      if( swTimer > 0 ) 
      { 
        /* No timeout so far */ 
        swTimer--; 
      } 
      else 
      { 
        /* Timer timeout happened, release xcp communication request */ 
      } 

     
     
    Please  note  that  polling  requests  may  happen erratically. Therefore  it  is  important  not  to 
    choose the timeout value XCP_TIMEOUT_TIMER_RELOAD too small. 
     
    3.19  Error Handling 
    3.19.1  Development Error Reporting 
    By  default,  development  errors  are  reported  to  the  DET  using  the  service 
    Det_ReportError()  as  specified  in  [2],  if  development  error  reporting  is  enabled: 
    /MICROSAR/Xcp/XcpGeneral/XcpDevErrorDetect. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    28 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
    reporting the error can be configured by the integrator, but must have the same signature 
    as the service Det_ReportError(). 
    The reported XCP ID is 26. 
    The  reported  service  IDs  identify  the  services  which  are  described  in  5.2.  The  following 
    table presents the service IDs and the related services: 
    Service ID 
    Service 
    0x00 
    Xcp_Init 
    0x03 
    Xcp_SendEvent 
    0x04 
    Xcp_PutChar 
    0x05 
    Xcp_Print 
    0x06 
    Xcp_Disconnect 
    0x07 
    Xcp_SendCrm 
    0x08 
    Xcp_GetXcpDataPointer 
    0x0A 
    Xcp_GetVersionInfo 
    0x0B 
    Xcp_TlRxIndication 
    0x0C 
    Xcp_TlTxConfirmation 
    0x0E 
    Xcp_GetSessionStatus 
    0x0F 
    Xcp_SetActiveTl 
    0x10 
    Xcp_GetActiveTl 
    0x14 
    Xcp_ModifyProtectionStatus 
    0xC8 
    Xcp_MainFunction 
    0xC9 
    Xcp_Event 
    0xFD 
    Xcp_StimEventStatus 
    Table 3-7   Service IDs 
    The errors reported to DET are described in the following table: 
    Error Code 
    Description 
    0x0A 
    API service Xcp_Init() called with wrong parameter. 
    0x0B 
    API service used with an invalid channel identifier or channel was not configured 
    for the functionality of the calling API. 
    0x0C 
    API service used with an invalid event channel identifier or event channel was 
    not configured for the functionality of the calling API. 
    0x0D 
    API service used with invalid pointer parameter (NULL). 
    0x0E 
    API service used with an invalid channel identifier or channel was not configured 
    for the functionality of the calling API. 
    0x10 
    API service used without module initialization. 
    0x11 
    The service Xcp_Init() is called while the module is already initialized. 
    0x12 
    The service Xcp_Event() is called with a wrong channel id on a wrong core. 
    Table 3-8   Errors reported to DET 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    29 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
     
    3.19.2  Production Code Error Reporting 
    The errors reported to DEM are described in the following table: 
    Error Code 
    Description 

    No production errors are reported by the XCP. 
    Table 3-9   Errors reported to DEM 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    30 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    4  Integration 
    This chapter gives necessary information for the integration of  the MICROSAR  XCP  into 
    an application environment of an ECU. 
    4.1 
    Scope of Delivery 
    The delivery of the  XCP contains the files which are described in the chapters  4.1.1 and 
    4.1.3: 
    4.1.1 
    Static Files 
    File Name 
    Description 
    Xcp.c 
    This is the source file of the XCP. It contains the XCP protocol layer. 
    Xcp.h 
    This is the header file. It contains global declarations. 
    Xcp_Priv.h 
    This is the private header file. It contains declarations only relevant for the XCP 
    itself. 
    Xcp_Types.h  This is the type definition header file. It contains type definitions used by the XCP. 
    Table 4-1   Static files 
    4.1.2 
    Templates – user modifiable 
    File Name 
    Description 
    XcpAppl.c 
    This is the source file of the application call-back. This file usually must be 
    modified by the user to his needs. 
    XcpAppl.h 
    This is the header file of the application call-backs. It contains global declarations. 
    Table 4-2   Templates 
    4.1.3 
    Dynamic Files 
    The dynamic files are generated by the configuration tool. 
    File Name 
    Description 
    Xcp_Cfg.h 
    XCP Protocol Layer configuration file. 
    Xcp_Lcfg.c 
    Parameter definition for the XCP Protocol Layer. 
    Xcp_Lcfg.h 
    External declarations for the parameters. 
    Table 4-3   Generated files 
    4.1.4 
    Generated a2l files 
    The GenTool also generates multiple a2l files which can be used in the MCS tool for easier 
    integration. The following files are generated: 
      XCP.a2l (general protocol layer settings) 
      XCP_daq.a2l (DAQ specific settings) 
      XCP_events.a2l (DAQ event info) 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    31 
    based on template version 6.0.1 



    Technical Reference MICROSAR XCP 
      XCP_Checksum.a2l (Checksum information) 
     
    Example Master.a2l: 
     

     
    ... 
    /begin IF_DATA XCP 
      /include XCP.a2l 
      /begin DAQ 
        /include XCP_daq.a2l 
        /include XCP_events.a2l 
        /include XCP_checksum.a2l 
        ... 
      /end DAQ 
      /include CanXCPAsr.a2l 
    /end IF_DATA 
    ... 
    /include bsw.a2l 
    ... 
     
     
     
     
    4.2 
    Critical Sections 
    The XCP protocol layer makes use of three critical  sections in  order to protect functions 
    that are not re-entrant. The following sections are used: 
      XCP_EXCLUSIVE_AREA_0 
      XCP_EXCLUSIVE_AREA_1 
      XCP_EXCLUSIVE_AREA_2 
    The individual exclusive areas must not be allowed to interrupt each other. The areas are 
    used for the following cases: 
    4.2.1 
    XCP_EXCLUSIVE_AREA_0 
    This exclusive area is used to protect non-reentrant functions. This critical section covers 
    calls to several sub-functions and can have a long run-time. 
    4.2.2 
    XCP_EXCLUSIVE_AREA_1 
    This exclusive area is used by Xcp_Event during DAQ measurement. It is used to provide 
    data integrity on ODT level and its duration is dependent on the MAX_DTO parameter, i.e. 
    can be short on CAN and long on Ethernet. 
    4.2.3 
    XCP_EXCLUSIVE_AREA_2 
    This exclusive area is used by Xcp_Event during STIM measurement. It is used to provide 
    data integrity on ODT level and its duration is dependent on the MAX_DTO parameter, i.e. 
    can be short on CAN and long on Ethernet. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    32 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    5  API Description 
    For an interfaces overview please see Figure 2-2. 
    5.1 
    Type Definitions 
    The types defined by the XCP are described in this chapter. 
    Type Name 
    C-Type  Description 
    Xcp_TimestampType 
    c-type 
    This is a type used for timestamp values. Its size is depending 
     
    on the configuration in the tool and can be uint8, uint16 or 
    uint32. 
    Table 5-1   Type definitions 
    Xcp_ChannelStruct 
    Struct Element Name  C-Type  Description 
    Xcp_ChannelStruct 
    c-type 
    This is a complex structure containing all the configuration 
     
    data of the XCP. This structure needs to be stored in NVM for 
    resume mode. 
    Table 5-2   Xcp_ChannelStruct 
    5.2 
    Services provided by XCP 
    5.2.1 
    Xcp_InitMemory 
    Prototype 
    void Xcp_InitMemory ( void ) 
    Parameter 


    Return code 


    Functional Description 
    This service initializes the XCP Protocol Layer memory. It must be called from the application program 
    before any other XCP function is called. This is only required if the Startup Code does not initialize the 
    memory with zero. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The global interrupts have to be disabled while this service function is executed. This function should be 
    called during initialization of the ECU before the interrupts have been enabled. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    33 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-3   Xcp_InitMemory 
    5.2.2 
    Xcp_Init 
    Prototype 
    void Xcp_Init ( void ) 
    Parameter 


    Return code 


    Functional Description 
    This service initializes the XCP Protocol Layer and its internal variables. It must be called from the 
    application program before any other XCP function is called (except of Xcp_InitMemory). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    Expected Caller Context 
    >  Task level 
    4   Xcp_Init 
    5.2.3 
    Xcp_Event 
    Prototype 
    uint8 Xcp_Event ( uint16 EventChannel ) 
    Parameter 
    EventChannel 
    Number of event channels to process. 
    The event channel numbers have to start at 0 and have to be continuous. The 
    range is: 0..x 
    Return code 
    uint8 
    XCP_EVENT_NOP : Inactive (DAQ not running, Event not configured) 
    XCP_EVENT_DAQ : DAQ active */ 
    XCP_EVENT_DAQ_OVERRUN : DAQ queue overflow, data lost 
    XCP_EVENT_STIM : STIM active 
    XCP_EVENT_STIM_OVERRUN : STIM data not available 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    34 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional Description 
    Calling Xcp_Event with a particular event channel number triggers the sampling and transmission of all 
    DAQ lists that are assigned to this event channel. 
    The event channels are defined by the ECU developer in the application program. An MCS (e.g. CANape) 
    must know about the meaning of the event channel numbers. These are usually described in the tool 
    configuration files or in the interface specific part of the ASAM MC2 (ASAP2) database. 
    Example: 
    A motor control unit may have a 10ms, a 100ms and a crank synchronous event channel. In this case, the 
    three Xcp_Event calls have to be placed at the appropriate locations in the ECU’s program: 
    Xcp_Event (XcpConf_XcpEventChannel_10ms); /* 10ms cycle */ 
    xcp_Event (XcpConf_XcpEventChannel_100ms); /* 100ms cycle */ 
    xcp_Event (XcpConf_XcpEventChannel_Crank); /* Crank synchronous cycle */ 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant (for different Event Channel). 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    >  Data acquisition has to be enabled  
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim 
    Expected Caller Context 
    >  Task and interrupt level 
     
    Table 5-5   Xcp_Event 
    5.2.4 
    Xcp_StimEventStatus 
    Prototype 
    uint8 Xcp_StimEventStatus ( uint16 EventChannel, uint8 Action ) 
    Parameter 
    EventChannel 
    Event channel number. 
    Action 
    STIM_CHECK_ODT_BUFFER : check ODT buffer 
    STIM_RESET_ODT_BUFFER : reset ODT buffer 
    Return code 
    uint8 
    XCP_NO_STIM_DATA_AVAILABLE : stimulation data not available 
    XCP_STIM_DATA_AVAILABLE : new stimulation data is available 
    Functional Description 
    Check if data stimulation (STIM) event can perform or delete the buffers. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    35 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    >  Data acquisition has to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpSynchronousDataStimulation 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-6   Xcp_StimEventStatus 
    5.2.5 
    Xcp_MainFunction 
    Prototype 
    void Xcp_MainFunction ( void ) 
    Parameter 


    Return code 


    Functional Description 
    If the XCP command for the calculation of the memory checksum has to be used for large memory areas, it 
    might not be appropriate to block the processor for a long period of time. Therefore, the checksum 
    calculation is divided into smaller sections that are handled in the Xcp_MainFunction. 
    Additionally, the main function handles persisting requests. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has been initialized correctly 
    Expected Caller Context 
    >  Task level 
    Table 5-7   Xcp_MainFunction 
     
    5.2.6 
    Xcp_SendEvent 
    Prototype 
    void Xcp_SendEvent ( Xcp_ChannelType XcpChannel, uint8 EventCode, uint8 
    *EventData, uint8 Length ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    36 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    EventCode 
    The event code of the message to send. 
    EventData 
    A pointer to the string of the event to send. 
    Length 
    The length of the event data. 
    Return code 


    Functional Description 
    Transmission of event codes via event packets (EV). 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    >  Event Codes has to be enabled: /MICROSAR/Xcp/XcpCmdConfig/XcpAsynchMessage/XcpEventCodes 
    Expected Caller Context 
    >  Task level 
    Table 5-8   Xcp_SendEvent 
    5.2.7 
    Xcp_PutChar 
    Prototype 
    void Xcp_PutChar ( Xcp_ChannelType XcpChannel, uint8 *Character ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Character 
    The char to send. 
    Return code 


    Functional Description 
    Put a char into a service request packet (SERV). 
    The service request packet is transmitted if either the maximum packet length is reached (the service 
    request message packet is full) or the character 0x00 is in the service request packet. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    >  Service Request Message has to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpAsynchMessage/XcpServiceRequestMessage 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    37 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-9   Xcp_PutChar 
    5.2.8 
    Xcp_Print 
    Prototype 
    void Xcp_Print ( Xcp_ChannelType XcpChannel, uint8 *Str ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Str 
    The 0 terminated string to send. 
    Return code 


    Functional Description 
    Transmission of a service request packet (SERV). 
    The string str is sent via service request packets. The string has to be terminated by 0x00. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    >  Service Request Message has to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpAsynchMessage/XcpServiceRequestMessage 
    Expected Caller Context 
    >  Task level 
    Table 5-10   Xcp_Print 
    5.2.9 
    Xcp_Disconnect 
    Prototype 
    void Xcp_Disconnect ( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 


    Functional Description 
    If the XCP slave is connected to a XCP master a call of this function discontinues the connection (transition 
    to disconnected state). If the XCP slave is not connected this function performs no action. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    38 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The XCP Protocol Layer has been initialized correctly and XCP is in connected state. 
    Expected Caller Context 
    >  Task level 
    Table 5-11   Xcp_Disconnect 
    5.2.10  Xcp_SendCrm 
    Prototype 
    void Xcp_SendCrm ( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 


    Functional Description 
    Transmission of a command response packet (RES), or error packet (ERR) if no other packet is pending. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has been initialized correctly, XCP is in connected state and a command 
    packet (CMD) has been received. 
    Expected Caller Context 
    >  Task level 
    Table 5-12   Xcp_SendCrm 
    5.2.11  Xcp_GetVersionInfo 
    Prototype 
    void Xcp_GetVersionInfo ( Std_VersionInfoType *versionInfo ) 
    Parameter 
    versionInfo 
    Pointer to the location where the Version information shall be stored. 
    Return code 


    Functional Description 
    Xcp_GetVersionInfo() returns version information, vendor ID and AUTOSAR module ID of the component. 
    The versions are BCD-coded. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    39 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is reentrant. 
    >  The version info API has to be enabled: /MICROSAR/Xcp/XcpGeneral/XcpVersionInfoApi 
    Expected Caller Context 
    >  Task level 
    Table 5-13   Xcp_GetVersionInfo 
    5.2.12  Xcp_ModifyProtectionStatus 
    Prototype 
    void Xcp_ModifyProtectionStatus ( Xcp_ChannelType XcpChannel, uint8 AndState, 
    uint8 OrState ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    AndState 
    The following flags: XCP_RM_CAL_PAG, XCP_RM_DAQ, XCP_RM_STIM 
    and XCP_RM_PGM can be used to clear the protection state of the respective 
    resource. The modified state is persistent until Xcp_Init. 
    OrState 
    The following flags: XCP_RM_CAL_PAG, XCP_RM_DAQ, XCP_RM_STIM 
    and XCP_RM_PGM can be used to set the protection state of the respective 
    resource. The modified state is persistent until Xcp_Init. 
    Return code 


    Functional Description 
    This method can be used to enable or disable the protection state of an individual resource during runtime. 
    The newly set protection state is persistent until the next call of the Xcp_Init function where all flags are set 
    again. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  Seed&Key has to be enabled: /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpSeedKey 
    Expected Caller Context 
    >  Task level 
    Table 5-14   Xcp_ModifyProtectionStatus 
     
    5.2.13  Xcp_GetSessionStatus 
    Prototype 
    uint16 Xcp_GetSessionStatus ( Xcp_ChannelType XcpChannel ) 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    40 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 
    uint16 
    The function returns a bit mask with the following flags: 
    XCP_SESSION_CONNECTED: The XCP is in state connected. 
    XCP_SESSION_POLLING: A polling measurement is ongoing. 
    XCP_SESSION_DAQ: A DAQ measurement is active. 
    Functional Description 
    This service can be used to get the session state of the XCP Protocol Layer. The session state is returned 
    as a bit mask where the individual bits can be tested. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  Session Status API has to be enabled: /MICROSAR/Xcp/XcpGeneral/XcpSessionStatusAPI 
    Expected Caller Context 
    >  Task level 
    Table 5-15   Xcp_GetSessionStatus 
    5.2.14  Xcp_GetXcpDataPointer 
    Prototype 
    uint16 Xcp_GetXcpDataPointer ( Xcp_ChannelStructPtr * pXcpData ) 
    Parameter 
    pXcpData 
    Pointer to XCP channel information. 
    Return code 


    Functional Description 
    This service can be used to get the complete XCP data. This is required for flash programming with a flash 
    kernel. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  Bootloader Download has to be enabled: /MICROSAR/Xcp/XcpGeneral/XcpBootloaderDownload 
    Expected Caller Context 
    >  Task level 
    Table 5-16   Xcp_GetXcpDataPointer 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    41 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    5.3 
    Services provided by the XCP Protocol Layer and called by the XCP Transport 
    Layer 

     
    5.3.1 
    Xcp_TlRxIndication 
    Prototype 
    void Xcp_TlRxIndication ( Xcp_ChannelType XcpChannel, unt8 *CmdPtr ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    CmdPtr 
    Pointer to the XCP protocol message, which must be extracted from the XCP 
    protocol packet. 
    Return code 


    Functional Description 
    Every time the XCP Transport Layer receives a XCP CTO Packet this function has to be called. 
    The parameter is a pointer to the XCP protocol message, which must be extracted from the XCP protocol 
    packet. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-17   Xcp_TlRxIndication 
    5.3.2 
    Xcp_TlTxConfirmation 
    Prototype 
    void Xcp_TlTxConfirmation ( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 


    Functional Description 
    The XCP Protocol Layer does not call <Bus>Xcp_Send again, until Xcp_TlTxConfirmation has 
    confirmed the successful transmission of the previous message. Xcp_TlTxConfirmation transmits 
    pending data acquisition messages by calling <Bus>Xcp_Send again.  
    Note that if Xcp_TlTxConfirmation is called from inside <Bus>Xcp_Send a recursion occurs, which 
    assumes enough space on the call stack. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    42 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-18   Xcp_TlTxConfirmation 
    5.3.3 
    Xcp_SetActiveTl 
    Prototype 
    void Xcp_SetActiveTl ( Xcp_ChannelType XcpChannel, uint8 MaxCto, uint16 MaxDto, 
    uint8 ActiveTl ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    MaxCto 
    Max CTO used by the respective XCP Transport Layer 
    MaxDto 
    Max DTO used by the respective XCP Transport Layer 
    ActiveTl 
    XCP_TRANSPORT_LAYER_CAN: XCP on CAN Transport Layer 
    XCP_TRANSPORT_LAYER_FR: XCP on Fr Transport Layer 
    XCP_TRANSPORT_LAYER_ETH: XCP on Ethernet Transport Layer 
    Return code 


    Functional Description 
    This service is used by the XCP Transport Layers to set the Transport Layer to be used by the XCP 
    Protocol Layer 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-19   Xcp_SetActiveTl 
    5.3.4 
    Xcp_GetActiveTl 
    Prototype 
    uint8 Xcp_GetActiveTl ( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    43 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Return code 
    uint8 
    XCP_TRANSPORT_LAYER_CAN: XCP on CAN Transport Layer 
    XCP_TRANSPORT_LAYER_FR: XCP on Fr Transport Layer 
    XCP_TRANSPORT_LAYER_ETH: XCP on Ethernet Transport Layer 
    Functional Description 
    This service is used by the XCP Transport Layers to get the currently active Transport Layer used by the 
    XCP Protocol Layer 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-20   Xcp_GetActiveTl 
     
    5.4 
    XCP Transport Layer Services called by the XCP Protocol Layer 
     
    5.4.1 
    <Bus>Xcp_Send 
    Prototype 
    void <Bus>Xcp_Send ( Xcp_ChannelType XcpChannel, uint8 len, uint8 *msg ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    len 
    Length of message data 
    msg 
    Pointer to message 
    Return code 


    Functional Description 
    Requests for the transmission of a command transfer object (CTO) or data transfer object (DTO). 
    Xcp_TlTxConfirmation must be called after the successful transmission of any XCP message. The 
    XCP Protocol Layer will not request further transmissions otherwise. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    44 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-21   <Bus>Xcp_Send 
     
    5.4.2 
    <Bus>Xcp_SendFlush 
    Prototype 
    void <Bus>Xcp_SendFlush( Xcp_ChannelType XcpChannel, uint8 FlushType ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    FlushType 
    This is one of the following: 
    XCP_FLUSH_CTO: To flush CTO messages. 
    XCP_FLUSH_DTO: To flush DTO message. 
    XCP_FLUSH_ALL: To flush either message. 
    Return code 


    Functional Description 
    Flush the transmit buffer. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-22   <Bus>Xcp_SendFlush 
    5.4.3 
    <Bus>Xcp_TlService 
    Prototype 
    uint8 <Bus>Xcp_TlService( Xcp_ChannelType XcpChannel, uint8 *pCmd ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    pCmd 
    Pointer to transport layer command string 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    45 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Return code 
    uint8 
    XCP_CMD_OK : Done 
    XCP_CMD_PENDING :  Call Xcp_SendCrm() when done 
    XCP_CMD_SYNTAX : Error 
    XCP_CMD_BUSY : not executed 
    XCP_CMD_UNKNOWN :  not implemented optional command 
    XCP_CMD_OUT_OF_RANGE : command parameters out of range 
    Functional Description 
    Transport Layer specific commands are processed within the XCP Transport Layer. 
    Particularities and Limitations 
    >  Service ID: see table 'Service IDs'  
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-23   <Bus>Xcp_TlService 
     
    5.5 
    Application Services called by the XCP Protocol Layer 
    The prototypes of the functions that are required by the XCP Protocol Layer can be found 
    in the XcpAppl header. 
    The  XCP  Protocol  Layer  provides  application  callback  functions  in  order  to  perform 
    application and hardware specific tasks. 
    Note: All services within this chapter are called from task or interrupt level. All services are 
    not reentrant. 
     
    5.5.1 
    XcpAppl_GetTimestamp 
    Prototype 
    Xcp_TimestampType XcpAppl_GetTimestamp( void ) 
    Parameter 


    Return code 
    Xcp_TimestampType  The timestamp which is either uint8, uint16 or uint32, depending on 
    configuration. 
    Functional Description 
    Returns the current timestamp. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    46 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  DAQ and timestamp feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim 
    /MICROSAR/Xcp/XcpGeneral/XcpTimestampType 
    Expected Caller Context 
    >  Task level 
    Table 5-24   XcpAppl_GetTimestamp 
    5.5.2 
    XcpAppl_GetPointer 
    Prototype 
    Xcp_AddressPtrType XcpAppl_GetPointer( Xcp_ChannelType XcpChannel, uint8 
    AddrExt, const Xcp_AddressPtrType Addr ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    AddrExt 
    8 bit address extension 
    Addr 
    32 bit address 
    Return code 
    Xcp_AddressPtrType 
    Pointer to the address specified by the parameters 
    Functional Description 
    This function converts a memory address from XCP format (32-bit address plus 8-bit address extension) to 
    a C style pointer. An MCS like CANape usually reads this memory addresses from the ASAP2 database or 
    from a linker map file. 
    The address extension may be used to distinguish different address spaces or memory types. In most 
    cases, the address extension is not used and may be ignored. 
    This function is used to convert an address from the MCS tool. 
    Example:  
    The following code shows an example of a typical implementation of XcpAppl_GetPointer: 
    Xcp_AddressPtrType XcpAppl_GetPointer( Xcp_ChannelType XcpChannel, uint8 AddrExt, uint32 Addr ) 

      return (Xcp_AddressPtrType)Addr; 

    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  DAQ and timestamp feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim 
    /MICROSAR/Xcp/XcpGeneral/XcpTimestampType 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    47 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-25   XcpAppl_GetPointer 
    5.5.3 
    XcpAppl_GetIdData 
    Prototype 
    uint32 XcpAppl_GetIdData( uint8 **Data, uint8 Id ) 
    Parameter 
    Data 
    Pointer to location where address pointer to Id data is stored. 
    Id 
    Identification of the requested information/identification 
    Return code 
    uint32 
    Length of the MAP file names 
    Functional Description 
    Returns a pointer to identification information as requested by the Xcp Master. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Get ID feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpGetIdGeneric 
    Expected Caller Context 
    >  Task level 
    Table 5-26   XcpAppl_GetIdData 
    5.5.4 
    XcpAppl_GetSeed 
    Prototype 
    uint8 XcpAppl_GetSeed( const uint8 Resource, uint8 *Seed ) 
    Parameter 
    Resource 
    Resource for which the seed has to be generated 
    XCP_RM_CAL_PAG :   to unlock the resource calibration/paging 
    XCP_RM_DAQ :  to unlock the resource data acquisition 
    XCP_RM_STIM :  to unlock the resource stimulation 
    XCP_RM_PGM :  to unlock the resource programming 
    Seed 
    Pointer to RAM where the seed has to be generated to. 
    Return code 
    uint8 
    The length of the generated seed that is returned by seed. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    48 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional Description 
    Generate a seed for the appropriate resource. 
    The seed has a maximum length of MAX_CTO-2 bytes. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Seed&Key feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpSeedKey 
    Expected Caller Context 
    >  Task level 
    Table 5-27   XcpAppl_GetSeed 
    5.5.5 
    XcpAppl_Unlock 
    Prototype 
    uint8 XcpAppl_Unlock( const uint8 *Key, const uint8 Length ) 
    Parameter 
    Key 
    Pointer to key. 
    Length 
    Length of the key. 
    Return code 
    uint8 
    0 : if the key is not valid 
    XCP_RM_CAL_PAG : to unlock the resource calibration/paging 
    XCP_RM_DAQ : to unlock the resource data acquisition 
    XCP_RM_STIM : to unlock the resource stimulation 
    XCP_RM_PGM : to unlock the resource programming 
    Functional Description 
    Functional Description 
    Check the key and return the resource that has to be unlocked. 
    Only one resource may be unlocked at one time. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Seed&Key feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpSeedKey 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    49 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-28   XcpAppl_Unlock 
    5.5.6 
    XcpAppl_CalibrationWrite 
    Prototype 
    uint8 XcpAppl_CalibrationWrite( Xcp_AddressPtrType Dst, uint8 *Src, uint8 Size 
    ) 
    Parameter 
    Dst 
    Destination address as integer. 
    Src 
    Pointer to source of data. 
    Size 
    Size of data to copy from Src to Dst. 
    Return code 
    uint8 
    XCP_CMD_DENIED :   if access is denied 
    XCP_CMD_PENDING : access is performed asynchronously (e.g. EEPROM) 
    XCP_CMD_OK : if access is granted 
    Functional Description 
    Functional Description 
    Check addresses for valid write access and copy data from source to destination. 
    Particularities and Limitations 
    >  This function can be synchronous and asynchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-29   XcpAppl_CalibrationWrite 
    5.5.7 
    XcpAppl_MeasurementRead 
    Prototype 
    uint8 XcpAppl_MeasurementRead( uint8 *Dst, Xcp_AddressPtrType Src, uint8 Size ) 
    Parameter 
    Dst 
    Pointer to destination address 
    Src 
    Source address of data as integer 
    Size 
    Size of data to copy from Src to Dst. 
    Return code 
    uint8 
    XCP_CMD_DENIED :   if access is denied 
    XCP_CMD_PENDING : access is performed asynchronously (e.g. EEPROM) 
    XCP_CMD_OK : if access is granted 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    50 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional Description 
    Functional Description 
    Check addresses for valid read access and copy data from source to destination. 
    Particularities and Limitations 
    >  This function can be synchronous and asynchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-30   XcpAppl_MeasurementRead 
    5.5.8 
    XcpAppl_CheckReadAccess 
    Prototype 
    uint8 XcpAppl_CheckReadAccess( Xcp_ChannelType XcpChannel, Xcp_AddressPtrType 
    Address, uint32 Size ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Address 
    Destination address to check. 
    Size 
    Size of data to check. 
    Return code 
    uint8 
    XCP_CMD_DENIED :   if access is denied 
    XCP_CMD_OK : if access is granted 
    Functional Description 
    Functional Description 
    Check addresses for valid read access. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Read Protection feature need to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpMemoryReadProtection 
    Expected Caller Context 
    >  Task level 
    Table 5-31   XcpAppl_CheckReadAccess 
    5.5.9 
    XcpAppl_CheckProgramAccess 
    Prototype 
    uint8 XcpAppl_CheckProgramAccess( Xcp_AddressPtrType Address, uint32 Size ) 
    Parameter 
    Address 
    Destination address to check. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    51 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Size 
    Size of data to check. 
    Return code 
    uint8 
    XCP_CMD_DENIED :   if access is denied 
    XCP_CMD_OK : if access is granted 
    Functional Description 
    Functional Description 
    Check addresses for valid write flash access. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task level 
    Table 5-32   XcpAppl_CheckProgramAccess 
    5.5.10  XcpAppl_UserService 
    Prototype 
    uint8 XcpAppl_UserService( uint8 *Cmd ) 
    Parameter 
    Cmd 
    Pointer to command string 
    Return code 
    uint8 
    XCP_CMD_OK : if command is accepted. 
    XCP_CMD_PENDING :  if command is performed asynchronously. 
    XCP_CMD_SYNTAX :   if command is not accepted. 
    Functional Description 
    Functional Description 
    Application specific user command. 
     
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  User command feature need to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpUserDefinedCommand 
    Expected Caller Context 
    >  Task level 
    Table 5-33   XcpAppl_UserService 
    5.5.11  XcpAppl_OpenCmdIf 
    Prototype 
    uint8 XcpAppl_OpenCmdIf( Xcp_ChannelType XcpChannel, uint8 *Cmd, uint8 
    *Response, uint8 *Length ) 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    52 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Cmd 
    Pointer to command string 
    Response 
    Pointer to response string 
    Length 
    Pointer to response length 
    Return code 
    uint8 
    XCP_CMD_OK : if command is accepted. 
    XCP_CMD_PENDING :  if command is performed asynchronously. 
    XCP_CMD_UNKNOWN :  if command is not accepted. 
    Functional Description 
    Functional Description 
    Call back that can be used to extend the XCP commands of the XCP protocol layer.   
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  User command feature need to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpOpenCommandInterface 
    Expected Caller Context 
    >  Task level 
    Table 5-34   XcpAppl_OpenCmdIf 
    5.5.12  XcpAppl_SendStall 
    Prototype 
    uint8 XcpAppl_SendStall( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 
    uint8 
    0 : Reject sending of new message. 
    1 : continue processing. 
    Functional Description 
    Functional Description 
    Resolve a transmit stall condition in Xcp_Putchar or Xcp_SendEvent. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Service request Messages feature need to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpAsynchMessage/XcpServiceRequestMessage 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    53 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-35   XcpAppl_SendStall 
    5.5.13  XcpAppl_DisableNormalOperation 
    Prototype 
    uint8 XcpAppl_DisableNormalOperation( Xcp_AddressPtrType Address, uint16 Size ) 
    Parameter 
    Address 
    Address (where the flash kernel is downloaded to) 
    Size 
    Size (of the flash kernel) 
    Return code 
    uint8 
    XCP_CMD_OK: 
    download of flash kernel confirmed 
    XCP_CMD_DENIED: download of flash kernel refused 
    Functional Description 
    Functional Description 
    Prior to the flash kernel download has the ECU’s normal operation to be stopped in order to avoid 
    misbehavior due to data inconsistencies. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Bootloader download feature need to be enabled: 
    /MICROSAR/Xcp/XcpGeneral/XcpBootloaderDownload 
    Expected Caller Context 
    >  Task level 
    Table 5-36   XcpAppl_DisableNormalOperation 
    5.5.14  XcpAppl_StartBootLoader 
    Prototype 
    uint8 XcpAppl_StartBootLoader( void ) 
    Parameter 


    Return code 
    uint8 
    This function should not return. 
    XCP_CMD_OK : 
    positive response 
    XCP_CMD_BUSY : 
    negative response 
    Functional Description 
    Functional Description 
    Start of the boot loader. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    54 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Bootloader download feature need to be enabled: 
    /MICROSAR/Xcp/XcpGeneral/XcpBootloaderDownload 
    Expected Caller Context 
    >  Task level 
    Table 5-37   XcpAppl_StartBootLoader 
    5.5.15  XcpAppl_Reset 
    Prototype 
    void XcpAppl_Reset( void ) 
    Parameter 


    Return code 


    Functional Description 
    Perform an ECU reset after reprogramming of the application. 
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Programming feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming 
    Expected Caller Context 
    >  Task level 
    Table 5-38   XcpAppl_Reset 
    5.5.16  XcpAppl_ProgramStart 
    Prototype 
    uint8 XcpAppl_ProgramStart( void ) 
    Parameter 


    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    55 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Return code 
    uint8 
    XCP_CMD_OK : Preparation done 
    XCP_CMD_PENDING : Call Xcp_SendCrm() when done 
    XCP_CMD_ERROR : Flash programming not possible 
    Functional Description 
    Prepare the ECU for flash programming. 
     
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Programming feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming 
    Expected Caller Context 
    >  Task level 
    Table 5-39   XcpAppl_ProgramStart 
    5.5.17  XcpAppl_FlashClear 
    Prototype 
    uint8 XcpAppl_FlashClear( uint8 *Address, uint32 Size ) 
    Parameter 
    Address 
    Address of memory area to clear 
    Size 
    Size of memory area to clear 
    Return code 
    uint8 
    XCP_CMD_OK : Flash memory erase done 
    XCP_CMD_PENDING :   Call Xcp_SendCrm() when done 
    XCP_CMD_ERROR : Flash memory erase error 
    Functional Description 
    Clear the flash memory, before the flash memory will be reprogrammed. 
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Programming feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    56 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-40   XcpAppl_FlashClear 
    5.5.18  XcpAppl_FlashProgram 
    Prototype 
    uint8 XcpAppl_FlashProgram( const uint8 *Data, uint8 *Address, uint8 Size ) 
    Parameter 
    Data 
    Pointer to data. 
    Address 
    Address of memory to store data at. 
    Size 
    Size of data. 
    Return code 
    uint8 
    XCP_CMD_OK : Flash memory programming finished 
    XCP_CMD_PENDING : Flash memory programming in progress. 
     
    Xcp_SendCrm has to be called when done. 
    Functional Description 
    Program the cleared flash memory. 
     
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Programming feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpProgramming 
    Expected Caller Context 
    >  Task level 
    Table 5-41   XcpAppl_FlashProgram 
    5.5.19  XcpAppl_DaqResume 
    Prototype 
    uint8 XcpAppl_DaqResume( Xcp_ChannelType XcpChannel, Xcp_ChannelStruct *Channel 
    ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Channel 
    Pointer to dynamic DAQ list structure 
    Return code 
    uint8 
    Boolean flag whether valid DAQ list was restored. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    57 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional Description 
    Resume the automatic data transfer. 
    The whole dynamic DAQ list structure that had been stored in non-volatile memory within the service 
    XcpAppl_DaqResumeStore(..) has to be restored to RAM. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpResumeMode 
    Expected Caller Context 
    >  Task level 
    Table 5-42   XcpAppl_DaqResume 
    5.5.20  XcpAppl_DaqResumeStore 
    Prototype 
    void XcpAppl_DaqResumeStore( Xcp_ChannelType XcpChannel, const 
    Xcp_ChannelStruct *Channel, uint8 MeasurementStart ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Channel 
    Pointer to dynamic DAQ list structure 
    MeasurementStart 
    If > 0 then set flag to start measurement during next init 
    Return code 


    Functional Description 
    This application callback service has to store the whole dynamic DAQ list structure in non-volatile 
    memory for the DAQ resume mode. Any old DAQ list configuration that might have been stored in non-
    volatile memory before this command, must not be applicable anymore. 
    After a cold start or reset the dynamic DAQ list structure has to be restored by the application callback 
    service XcpAppl_DaqResume(..)when the flag MeasurementStart is > 0. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpResumeMode 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    58 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-43   XcpAppl_DaqResumeStore 
    5.5.21  XcpAppl_DaqResumeClear 
    Prototype 
    void XcpAppl_DaqResumeClear( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 


    Functional Description 
    The whole dynamic DAQ list structure that had been stored in non-volatile memory within the service 
    XcpAppl_DaqResumeStore(..) has to be cleared. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpDaqAndStim/XcpResumeMode 
    Expected Caller Context 
    >  Task level 
    Table 5-44   XcpAppl_DaqResumeClear 
    5.5.22  XcpAppl_CalResumeStore 
    Prototype 
    boolean XcpAppl_CalResumeStore( Xcp_ChannelType XcpChannel ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    Return code 
    boolean 
    If true the calibration page was stored. 
    Functional Description 
    This application callback service has to store the current calibration data in non-volatile memory for the 
    resume mode. 
    After a cold start or reset the calibration data has to be restored by the application. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    59 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpFreezeMode 
    Expected Caller Context 
    >  Task level 
    Table 5-45   XcpAppl_CalResumeStore 
    5.5.23  XcpAppl_GetCalPage 
    Prototype 
    uint8 XcpAppl_GetCalPage( uint8 Segment, uint8 Mode ) 
    Parameter 
    Segment 
    Logical data segment number 
    Mode 
    Access mode 
    The access mode can be one of the following values: 
    1 : ECU access 
    2 : XCP access 
    Return code 
    uint8 
    Logical data page number 
    Functional Description 
    This function returns the logical number of the calibration data page that is currently activated for the 
    specified access mode and data segment. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching 
    Expected Caller Context 
    >  Task level 
    Table 5-46   XcpAppl_GetCalPage 
    5.5.24  XcpAppl_SetCalPage 
    Prototype 
    uint8 XcpAppl_SetCalPage( uint8 Segment, uint8 Page, uint8 Mode ) 
    Parameter 
    Segment 
    Logical data segment number 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    60 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Page 
    Logical data page number 
    Mode 
    Access mode 
    The access mode can be one of the following values: 
    1 : ECU access the given page will be used by the slave device application 
    2 : XCP access the slave device XCP driver will access the given page 
    Both flags may be set simultaneously or separately. 
    Return code 
    uint8 
    XCP_CMD_OK : Operation completed successfully 
    XCP_CMD_PENDING : Call Xcp_SendCrm() when done 
    XCP_CRC_OUT_OF_RANGE : segment out of range (only one segment 
    supported) 
    XCP_CRC_PAGE_NOT_VALID : Selected page not available 
    XCP_CRC_PAGE_MODE_NOT_VALID : Selected page mode not available 
    Functional Description 
    Switch pages, e.g. from reference page to working page.  
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching 
    Expected Caller Context 
    >  Task level 
    Table 5-47   XcpAppl_SetCalPage 
    5.5.25  XcpAppl_CopyCalPage 
    Prototype 
    uint8 XcpAppl_CopyCalPage( uint8 SrcSeg, uint8 SrcPage, uint8 DestSeg, uint8 
    DestPage ) 
    Parameter 
    SrcSeg 
    Source segment. 
    SrcPage 
    Source page. 
    DestSeg 
    Destination segment. 
    DestPage 
    Destination page. 
    Return code 
    uint8 
    XCP_CMD_OK : Operation completed successfully 
    XCP_CMD_PENDING : Call XcpSendCrm() when done 
    XCP_CRC_PAGE_NOT_VALID : Page not available 
    XCP_CRC_SEGMENT_NOT_VALID : Segment not available 
    XCP_CRC_WRITE_PROTECTED : Destination page is write protected. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    61 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Functional Description 
    Copying of calibration data pages. 
    The pages are copied from source to destination. 
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    >  /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpCopyPage 
    Expected Caller Context 
    >  Task level 
    Table 5-48   XcpAppl_CopyCalPage 
    5.5.26  XcpAppl_SetFreezeMode 
    Prototype 
    void XcpAppl_SetFreezeMode( uint8 Segment, uint8 Mode ) 
    Parameter 
    Segment 
    Segment to set freeze mode 
    Mode 
    New freeze mode 
    Return code 


    Functional Description 
    Setting the freeze mode of a certain segment. Application must store the current freeze mode of each 
    segment. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    >  /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpFreezeMode 
    Expected Caller Context 
    >  Task level 
    Table 5-49   XcpAppl_SetFreezeMode 
    5.5.27  XcpAppl_GetFreezeMode 
    Prototype 
    uint8 XcpAppl_GetFreezeMode( uint8 Segment ) 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    62 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Parameter 
    Segment 
    Segment to read freeze mode 
    Return code 
    uint8 
    Return the current freeze mode, set by XcpAppl_SetFreezeMode(). 
    Functional Description 
    Reading the freeze mode of a certain segment. Application must store the current freeze mode of each 
    segment and report it by the return value of this function. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    >  /MICROSAR/Xcp/XcpCmdConfig/XcpPageSwitching/XcpFreezeMode 
    Expected Caller Context 
    >  Task level 
    Table 5-50   XcpAppl_GetFreezeMode 
    5.5.28  XcpAppl_CalculateChecksum 
    Prototype 
    uint8 XcpAppl_CalculateChecksum( uint8 *MemArea, uint8 *Result, uint32 Length ) 
    Parameter 
    MemArea 
    Address pointer to memory area 
    Result 
    Pointer to response string 
    Length 
    Length of mem area, used for checksum calculation 
    Return code 
    uint8 
    XCP_CMD_OK : CRC calculation performed successfully 
    XCP_CMD_PENDING : Pending response, triggered by call of 
    Xcp_SendCrm 
    XCP_CMD_DENIED : CRC calculation not possible 
    Functional Description 
    Normally the XCP uses internal checksum calculation functions. If the internal checksum calculation 
    does not fit the user requirements this call-back can be used to calculate the checksum by the 
    application. 
    Particularities and Limitations 
    >  This function is asynchronous if it returns XCP_CMD_PENDING. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    >  Resume Mode feature needs to be enabled: 
    >  /MICROSAR/Xcp/XcpCmdConfig/XcpStandard/XcpCRC/XcpCustomCRC 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    63 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Expected Caller Context 
    >  Task level 
    Table 5-51   XcpAppl_CalculateChecksum 
    5.5.29  XcpAppl_ConStateNotification 
    Prototype 
    uint8 XcpAppl_ConStateNotification( Xcp_ChannelType XcpChannel, uint8 
    ConnectionState ) 
    Parameter 
    XcpChannel 
    The channel number in multi client mode. 
    ConnectionState 
    The new connection state (XCP_CON_STATE_RESUME, 
    XCP_CON_STATE_DISCONNECTED, XCP_CON_STATE_CONNECTED). 
    Return code 


    Functional Description 
    Notifies the application that the connection state has changed and which the new state is. 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-52   XcpAppl_ConStateNotification 
    5.5.30  XcpAppl_MemCpy 
    Prototype 
    uint8 XcpAppl_MemCpy( uint8 * Dst, const uint8 * Src, uint16 Size ) 
    Parameter 
    Dst 
    The destination where the data is copied to. 
    Src 
    The source where the data is copied from. 
    Size 
    The number of byte to be copied. 
    Return code 


    Functional Description 
    Copies data from source to destination. 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    64 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    Particularities and Limitations 
    >  This function is synchronous. 
    >  This function is non-reentrant. 
    >  The XCP Protocol Layer has to be initialized correctly. 
    Expected Caller Context 
    >  Task and interrupt level 
    Table 5-53   XcpAppl_MemCpy 
    5.6 
    Services used by XCP 
    In the following table services provided by other components, which are used by the XCP 
    are  listed.  For details about  prototype and functionality refer to the documentation of  the 
    providing component. 
    Component 
    API 
    DET 
    Det_ReportError 
    OS 
    GetCoreID 
    Table 5-54   Services used by the XCP 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    65 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    6  Configuration 
    6.1 
    Configuration Variants 
    The XCP supports the configuration variants 
    >  VARIANT-PRE-COMPILE 
    The configuration classes of the XCP parameters depend on the supported configuration 
    variants. For their definitions please see the Xcp_bswmd.arxml file. 
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    66 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    7  Glossary and Abbreviations 
    7.1 
    Abbreviations 
    Abbreviation 
    Description 
    A2L 
    File Extension for an ASAM 2MC Language File 
    AML 
    ASAM 2 Meta Language 
    API 
    Application Programming Interface 
    ASAM 
    Association for Standardization of Automation and Measuring Systems 
    BYP 
    BYPassing 
    CAN 
    Controller Area Network 
    CAL 
    CALibration 
    CANape 
    Calibration  and  Measurement  Data  Acquisition  for  Electronic  Control 
    Systems 
    CMD 
    Command 
    CTO 
    Command Transfer Object 
    DAQ 
    Synchronous Data Acquistion 
    DLC 
    Data Length Code ( Number of data bytes of a CAN message ) 
    DLL 
    Data link layer 
    DTO 
    Data Transfer Object 
    ECU 
    Electronic Control Unit 
    ERR 
    Error Packet 
    EV 
    Event packet 
    ID 
    Identifier (of a CAN message) 
    Identifier 
    Identifies a CAN message 
    ISR 
    Interrupt Service Routine 
    MCS 
    Master Calibration System 
    Message 
    One or more signals are assigned to each message. 
    ODT 
    Object Descriptor Table 
    OEM 
    Original equipment manufacturer (vehicle manufacturer) 
    PAG 
    PAGing 
    PID 
    Packet Identifier 
    PGM 
    Programming 
    RAM 
    Random Access Memory 
    RES 
    Command Response Packet 
    ROM 
    Read Only Memory 
    SERV 
    Service Request Packet 
    STIM 
    Stimulation 
    TCP/IP 
    Transfer Control Protocol / Internet Protocol 
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    67 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    UDP/IP 
    Unified Data Protocol / Internet Protocol 
    USB 
    Universal Serial Bus 
    XCP 
    Universal Measurement and Calibration Protocol 
    VI 
    Vector Informatik GmbH 
    Table 7-1   Abbreviations 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    68 
    based on template version 6.0.1 


    Technical Reference MICROSAR XCP 
    8  Contact 
    Visit our website for more information on 
     
    >  News 
    >  Products 
    >  Demo software 
    >  Support 
    >  Training data 
    >  Addresses 
     
    www.vector.com 
     
     
    © 2017 Vector Informatik GmbH 
    Version 1.0.0 
    69 
    based on template version 6.0.1 

    Document Outline


    1.3.183 - UserManual_AUTOSAR_Calibration

    User Manual AUTOSAR Calibration

    1.3.185 - UserManual_AUTOSAR_Calibrations









     
     
     
    User Manual 
     
      AUTOSAR Calibration 
     
      Measuring and Calibrating of AUTOSAR 
    Applications with XCP and CANape 
     
      Version 1.0 
     
     
    English 
     

     
     
     
    Imprint 
     
    Vector Informatik GmbH 
    Ingersheimer Straße 24 
    D-70499 Stuttgart 
     
    Vector reserves the right to modify any information and/or data in this user documentation without notice. This documentation nor any of 
    its parts may be reproduced in any form or by any means without the prior written consent of Vector. To the maximum extent permitted 
    under law, all technical data, texts, graphics, images and their design are protected by copyright law, various international treaties and 
    other applicable law. Any unauthorized use may violate copyright and other applicable laws or regulations. 
     Copyright 2013, Vector Informatik GmbH. Printed in Germany. 
    All rights reserved. 
     

    User Manual AUTOSAR Calibration  
    Contents 
    Contents 
    1 
    Introduction 
    3 
    1.1 
    Purpose of the AUTOSAR Calibration User Manual 

    1.2 
    About This User Manual 

    1.2.1 
    Certification 

    1.2.2 
    Warranty 

    1.2.3 
    Support 

    1.2.4 
    Trademarks 

    2 
    Introduction to AUTOSAR 
    7 
    2.1 
    Background 

    2.2 
    Approach 

    2.3 
    Basic Concept 
    10 
    2.4 
    Architecture 
    11 
    3 
    Measuring and Calibrating of ECU Software 
    13 
    3.1 
    Basics 
    14 
    3.2 
    XCP Driver 
    15 
    3.2.1 
    Measurement Modes 
    17 
    3.2.2 
    Autoselection and Software Version Check of the A2L File 
    18 
    3.2.3 
    Online Calibration 
    19 
    3.2.4 
    Page Switching 
    19 
    3.2.5 
    Bypassing 
    20 
    3.2.6 
    Resume Mode 
    21 
    3.3 
    A2L File 
    22 
    3.3.1 
    Structure 
    23 
    3.3.2 
    Mode of Functioning 
    32 
    4 
    OEM 
    33 
    4.1 
    Objective 
    34 
    4.2 
    Content of the Performance Specifications 
    34 
    4.3 
    Measurement Task 
    34 
    4.4 
    Calibration Task 
    35 
    4.5 
    XCP Features 
    35 
    5 
    Supplier 
    36 
    5.1 
    Preface 
    37 
    5.2 
    Requirements 
    37 
    5.3 
    Definition of Measurement and Calibration Parameters 
    37 
    5.3.1 
    Measuring and Calibrating of AUTOSAR Software Components 
    38 
    5.3.2 
    Measuring of Ports and Variables 
    38 
    5.3.3 
    XCP Events 
    39 
    5.3.4 
    Software Component with Calibration Parameters 
    40 
    5.3.5 
    Calibration Parameters for Multiple Software Components 
    40 
    5.3.6 
    Configuration of the RTE (Runtime Environment) 
    41 
    5.3.7 
    Measuring and Calibrating Without the Support of the RTE 
    41 
    5.3.8 
    Debugging of the BSW (Basic Software) 
    42 
    © Vector Informatik GmbH 
    Version 1.0 
    - I - 

    User Manual AUTOSAR Calibration 
    Contents 
    5.4 
    Configuration of the XCP Module 
    42 
    5.4.1 
    DAQ List Configuration 
    43 
    5.4.2 
    Tool-Driven DAQ Timestamp Option 
    44 
    5.4.3 
    XCP Event Information 
    44 
    5.4.4 
    Software Version Check 
    44 
    5.4.5 
    Use of the XCP Component in the Implementation 
    46 
    5.4.6 
    Recommendations for the Configuration of the XCP Module 
    46 
    5.5 
    Configuration of the Driver Modules 
    48 
    5.5.1 
    CAN Module MICROSAR XCP 
    48 
    5.6 
    Configuration of the Memory Management 
    48 
    5.6.1 
    Configuration for Resume Mode 
    48 
    5.7 
    Creating an A2L File 
    49 
    5.7.1 
    Creation of a Master A2L File 
    49 
    5.7.2 
    Expansion of the Master A2L File 
    51 
    5.7.3 
    Working with ASAP2 Tool-Set 
    52 
    5.7.4 
    Working with CANape and the ASAP2 Editor 
    54 
    5.8 
    Fast Access to the ECU Via the VX Module 
    55 
    5.9 
    Additional Topics 
    56 
    6 
    Delivery Test/Quick Start 
    57 
    7 
    CANape Introduction 
    58 
    7.1 
    Creation of a Project 
    59 
    7.2 
    Device Configuration 
    60 
    7.2.1 
    Devices 
    61 
    7.2.2 
    Networks 
    62 
    7.2.3 
    Vector Hardware 
    62 
    7.2.4 
    XCP Features in CANape 
    63 
    7.3 
    Online Measurement Configuration 
    64 
    7.3.1 
    Measurement Options 
    64 
    7.3.2 
    Measurement Signals 
    65 
    7.3.3 
    Recorder List 
    67 
    7.3.4 
    Event List 
    69 
    7.4 
    Working with Parameter Set Files 
    69 
    7.5 
    Dataset Management 
    70 
    7.5.1 
    Tool-Based in CANape 11.0 and Higher 
    70 
    7.6 
    Offline Evaluation 
    72 
    7.7 
    Flashing 
    74 
    8 
    Addresses 
    75 
    9 
    Abbreviations 
    76 
     
    © Vector Informatik GmbH 
    Version 1.0 
    - II - 

    User Manual AUTOSAR Calibration  
    Introduction 
    1  Introduction 
    In this chapter you will find the following information: 
    1.1 
    Purpose of the AUTOSAR Calibration User Manual 
     page 4 
    1.2 
    About This User Manual 
     page 5 
     
    Certification 
     
    Warranty 
     
    Support 
     
    Trademarks 
      
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 3 - 


    User Manual AUTOSAR Calibration  
    Introduction 
    1.1  Purpose of the AUTOSAR Calibration User Manual 
    AUTOSAR Standard  The AUTOSAR Standard describes methods that enable standardized development 
    of reusable and replaceable software components within vehicles. This approach 
    minimizes the development effort for electronic control unit (ECU) software. The 
    software is then optimized using CANape. 
    Calibration and 
    Since the software developer cannot yet optimize the parameters for a control 
    measurement 
    algorithm of the ECU at the time of implementation, these parameters are defined in 
    parameters 
    the software as calibration parameters. The calibration parameters are ultimately 
    variables in the source code that reside in RAM memory and remain unchanged by 
    the algorithm itself. They can then be calibrated using CANape. To record the effects 
    of the calibration process, additional measurement parameters are defined in the 
    software. These parameters are also variables in the source code and reside in RAM 
    memory. In contrast to calibration parameters, however, measurement parameters 
    are continually changed by the ECU algorithm and reflect the current value. This 
    makes the effects of the calibration process visible and allows the behavior of the 
    ECU to be optimized. For example, the wheel speed (calibration parameter) of a 
    driving dynamics control system is changed and the measuring equipment measures 
    the corresponding sensor values (measurement parameters) in order to acquire the 
    change in behavior of the algorithm. 
    CCP/XCP protocols 
    In order to access the ECU-internal measurement and calibration parameters during 
    with A2L file 
    runtime, the CCP and XCP protocols are used. A fundamental component of these 
    address-oriented protocols is an A2L file. This file facilitates data handling, since it 
    enables the symbolic selection of data objects independent from their memory 
    addresses in the ECU. Thus, it is possible to access ECU-internal parameters using 
    symbolic names. The measurement, calibration, and diagnostics system (CANape) 
    maintains the link between the ECU-internal addresses and the associated symbolic 
    names. For this, a separate A2L file is required for each ECU. Figure 1-1 shows the 
    integration of the A2L file in the MCD system. 
    Figure 1-1: Integration 
    of the A2L file in the 
    MCD system 

     
    ECU-independent 
    An ECU-independent concept for measuring and calibrating AUTOSAR applications 
    concept 
    is needed for the development of ECUs based on the AUTOSAR Standard. The 
    AUTOSAR Calibration user manual describes a standardized procedure for 
    implementing and calibrating an ECU according to AUTOSAR. 
    Structure of this 
    The document begins with a brief introduction of the AUTOSAR Standard. Aspects of 
    document 
    Measuring and Calibrating of ECU Software are then explained. 
     
    The OEM chapter serves as a checklist for OEMs when creating performance 
    specifications. It briefly explains the details that must be communicated to the supplier 
    in order to realize the desired measurement task. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 4 - 

    User Manual AUTOSAR Calibration  
    Introduction 
     
    The Supplier chapter describes the procedure on the part of the supplier. It describes 
    details for configuring MICROSAR XCP and the software components of AUTOSAR. 
    It also explains the process of generating the A2L file. 
     
    The Delivery Test/Quick Start chapter then explains how CANape can be used to 
    perform a simple delivery test of the A2L file. This can additionally be used as a 
    CANape Quick Start for the OEM. 
     
    The final CANape Introduction chapter describes the path from project creation to 
    flashing of optimized parameters in CANape. 
    1.2  About This User Manual 
    To Find information 
    This user manual provides you with the following access help: 
    quickly 

    At the beginning of each chapter you will find a summary of the contents. 

    The header shows in which chapter of the manual you are. 

    The footer shows the version of the manual. 

    At the end of the user manual you will find a list of abbreviations to look-up used 
    abbreviations. 
      
    Conventions 
    In the two tables below you will find the notation and icon conventions used 
    throughout the manual. 
      
     
    Style 
    Utilization 
     
    bold 
    Fields/blocks, user/surface interface elements, window- and 
    dialog names of the software, special emphasis of terms. 
    [OK]   
    Push buttons in square brackets 
    File|Save 
    Notation for menus and menu entries 
     
    MICROSAR 
    Legally protected proper names and marginal notes. 
     
    Source Code  File and directory names, source code, class and object 
    names, object attributes and values 
     
    Hyperlink 
    Hyperlinks and references. 
     
    <Ctrl>+<S> 
    Notation for shortcuts. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 5 - 






    User Manual AUTOSAR Calibration  
    Introduction 
      
     
    Symbol 
    Utilization 
     
    This icon indicates notes and tips that facilitate your work. 
     
     
    This icon warns of dangers that could lead to damage. 
     
     
    This icon indicates more detailed information. 
     
     
    This icon indicates examples. 
     
     
    This icon indicates step-by-step instructions. 
     
      
    1.2.1  Certification 
    Quality 
    Vector Informatik GmbH has ISO 9001:2008 certification. The ISO standard is a 
    management system  globally recognized standard. 
      
    1.2.2  Warranty 
    Restriction of 
    We reserve the right to modify the contents of the documentation or the software 
    warranty 
    without notice. Vector disclaims all liabilities for the completeness or correctness of 
    the contents and for damages which may result from the use of this documentation. 
      
    1.2.3  Support 
      
    Need support? 
    You can get through to our hotline by calling 
    +49 (0)711 80670-200 
    or you can send a problem report to canape-support@vector.com. 
      
    1.2.4  Trademarks 
    Protected 
    All brand names in this documentation are either registered or non-registered 
    trademarks 
    trademarks of their respective owners. 
      
     
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 6 - 

    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
    2  Introduction to AUTOSAR 
    In This Chapter You Will Find the Following Information: 
    2.1 
    Background 
     page 8 
    2.2 
    Approach 
     page 9 
    2.3 
    Basic Concept 
     page 10 
    2.4 
    Architecture 
     page 11 
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 7 - 

    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
    2.1  Background 
    AUTOSAR 
    AUTOSAR (AUTomotive Open System ARchitecture) is a working group of 
    automobile manufacturers and suppliers whose objective is to establish a joint 
    industry standard for automotive E/E (electrics/electronics) architectures. 
    Main objectives 
    The main objectives of this effort are: 

    Management of the increasing E/E complexity 

    Improved flexibility for updates and modifications 

    Scalability to different vehicle and platform variants 

    Improved reliability and quality of E/E systems 

    Ability to identify errors in early phases of development 

    Reusability of functions irrespective of the supplier 

    Standardized model tools and code generators 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 8 - 



    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
    2.2  Approach 
    AUTOSAR elements  Figure 2-1 shows the AUTOSAR approach. The individual elements are explained in 
    more detail below. 
    Figure 2-1: Concept of 
    AUTOSAR1 

     
    AUTOSAR SW-C 
    The AUTOSAR software components form the framework of an application that runs 
    on the AUTOSAR infrastructure. 
      
    Reference: The interfaces of the AUTOSAR software components are described in 
    more detail on http://www.autosar.org/index.php?p=1&up=2&uup=1&uuup=0. 
     
      
    SW-C Description 
    The software component description is provided by AUTOSAR, for example, for 
    defining interfaces. 
    Virtual Functional 
    The VFB describes all communication mechanisms of AUTOSAR at an abstract level. 
    Bus (VFB) 
                                                          
    1 Source of figure: AUTOSAR Technical Overview V2.2.2 R3.2 Rev 1 
    © Vector Informatik GmbH 
    Version 1.0 
    - 9 - 


    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
    System Constraint 
    In order to integrate software components into a network of an ECU, AUTOSAR 
    and ECU 
    provides descriptions for entire systems or for configurations and signals of individual 
    Descriptions 
    ECUs. 
    Runtime 
    The RTE implements the functionality of the VFB of a particular ECU. However, it can 
    Environment (RTE) 
    delegate a portion to the basic software. 
    Basic Software 
    The basic software provides the infrastructural functionality of the ECU. 
    (BSW) 
      
    2.3  Basic Concept 
    Communication via 
    The communication between the individual components takes place via the Virtual 
    VFB 
    Functional Bus (VFB). At this stage, there is not yet any memory management of the 
    ECUs. The VFB is used both within the ECU and across ECUs and has no 
    knowledge of the bus technology used. This enables replacement of the application 
    software, regardless of the bus technology used. Figure 2-2 shows the 
    communication flow of the Virtual Functional Bus. 
      
     
    Figure 2-2: Communication flow of the VFB 
      
    Running of the 
    As soon as all relevant objects have been defined, they are mapped to the ECU. The 
    components 
    VFB is implemented using an ECU-specific Runtime Environment (RTE) and, 
    together with the operating system, takes over the running of the components. 
    Consistence of 
    Software components, here e.g., Left Door and Right Door, consist of: 
    software components  >  Ports: These serve as the interface for communication with other software 
    components. They can act either as sender/receiver or client/server. The ports 
    are interconnected using connectors

    Runnables: Each atomic SW-C contains one or more runnables. These 
    represent the runnable portion of the software component and reference functions 
    and procedures. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 10 - 


    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
    2.4  Architecture 
    Layers 
    The AUTOSAR architecture essentially has seven different layers (see Figure 2-3)
    The top and bottom layers are not explained in detail here as they do not belong to 
    the basic software. 
    Figure 2-3: Overview of 
    AUTOSAR layers 

     
    Microcontroller 
    The Microcontroller Abstraction Layer is the lowest software layer of the basic 
    Abstraction Layer 
    software architecture and provides the upper layers their independence from the 
    actual microcontroller. 
    ECU Abstraction 
    The purpose of the ECU Abstraction Layer is to ensure the independence of higher 
    Layer 
    layers from the actual ECU. 
    Service Layer 
    The Service Layer is the highest layer of the basic software. It contains the operating 
    system and assumes functions such as the network and NVRAM management and 
    diagnostic services. 
    Complex Device 
    The device driver layer controls special sensors and actuators via direct access to the 
    Drivers 
    microcontroller. This involves sensors with special time conditions, for example, that 
    supply fuel injection to paths. 
    Runtime 
    As middleware, the Runtime Environment (RTE) integrates different applications with 
    Environment 
    the basic software. It organizes the communication and data exchange between the 
    two layers and manages the running of the runnables. Because all layers are 
    described exactly, the application software can be implemented independent of the 
    hardware and without knowledge of how the other layers behave. The communication 
    between the layers takes place via ports defined beforehand. 
     
    The following Figure 2-4 shows the complete AUTOSAR ECU software architecture. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 11 - 


    User Manual AUTOSAR Calibration  
    Introduction to AUTOSAR 
     
    Figure 2-4: AUTOSAR software architecture2 
                                                          
    2 Source of figure: AUTOSAR Technical Overview V2.2.2 R3.2 Rev 1 
    © Vector Informatik GmbH 
    Version 1.0 
    - 12 - 

    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3  Measuring and Calibrating of ECU Software 
    In This Chapter You Will Find the Following Information: 
    3.1 
    Basics 
     page 14 
    3.2 
    XCP Driver 
     page 15 
     
    Measurement Modes 
     
    Autoselection and Software Version Check of the A2L File 
     
    Online Calibration 
     
    Page Switching 
     
    Bypassing 
     
    Resume Mode 
    3.3 
    A2L File 
     page 22 
     
    Structure 
     
    Mode of Functioning 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 13 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3.1  Basics 
    Challenge 
    Variables in the source code are implemented as measurement and calibration 
    parameters in the ECU software. The task of the calibration engineer is to measure 
    and calibrate these parameters so that the behavior of the ECU is optimized. To 
    make the calibration process convenient, calibration tools such as the MCD tool 
    (Measurement, Calibration, Diagnostics) CANape are used. This type of tool requires 
    an XCP driver and an A2L file for communicating with the ECU. The XCP driver 
    enables the access to ECU-internal parameters during runtime. The A2L file, in turn, 
    links the symbolic name of a measurement or calibration parameter with its memory 
    address. In this way, the calibration engineer can calibrate individual calibration 
    parameters with CANape without having to know the memory address of the 
    parameter. 
      
     
    Figure 3-1: Measurement and calibration process 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 14 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3.2  XCP Driver 
    Protocol 
    The XCP driver – such as MICROSAR XCP – is a further development of the CCP 
    driver and can be used universally for different bus systems. It involves a protocol 
    based on the single master/multi-slave principle. An XCP master, such as CANape, is 
    able to communicate simultaneously with various XCP slaves. These include, for 
    example, the ECU or HIL/SIL systems. Figure 3-2 shows the slave connection via 
    XCP. 
      
     
    Figure 3-2: Communication possibilities of an XCP master such as CANape 
      
    Communication via 
    CANape communicates with the ECU via the XCP driver. The A2L file is an important 
    A2L file 
    component of this communication. From this file, the XCP master reads all 
    information that is important for the communication setup and sequence. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 15 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
     
    Figure 3-3: Single master/multi-slave concept 
      
    Transfer objects 
    In the XCP protocol, a distinction is made between "Command Transfer Objects 
    (CTO)" and "Data Transfer Objects (DTO)" (see Figure 3-3). The Object Description 
    Table (ODT) describes the mapping of the DTOs and memory of the slave. The 
    reception of a CTO signals the slave to run a certain service. The transmission of a 
    DTO is used for event-triggered reading and writing of objects from the memory of the 
    XCP slave. For this, DAQ (Data Acquisition) lists are created from multiple ODTs in 
    order to send the measurement values to the master at the same time that an event 
    occurs. The events are defined using event channels and take over, with the help of 
    defined time bases, the timing for task-synchronous transmission of measurement 
    data. 
    Dynamic 
    With XCP it is possible to configure the DAQ lists both statically as well as 
    configuration of DAQ  dynamically. In the case of static configuration, the maximum number of DAQ lists, 
    lists 
    ODT tables, and ODT entries per DAQ list is fixed at compile time. With dynamic 
    DAQ lists, on the other hand, only the maximum memory size is specified at compile 
    time. This enables more efficient memory utilization since the size of the DAQ lists is 
    defined individually. If necessary, it also allows more measurement signals to be 
    measured compared to the static configuration. In addition, implementation in the 
    XCP driver is significantly easier because specifications such as the maximum 
    number of ODTs is eliminated. The dynamic configuration is therefore the only mode 
    supported. 
    XCP features 
    The XCP protocol also enables use of some optional XCP features. These must be 
    explicitly implemented and therefore be known to the supplier. The rest of this section 
    presents the following XCP features in more detail: Measurement Modes, 
    Autoselection and Software Version Check of the A2L File, Online Calibration, Page 
    Switching, Bypassing and Resume Mode. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 16 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3.2.1  Measurement Modes 
    Measurement modes  The XCP protocol enables two different measurement modes: Polling and DAQ 
    measurement. Both variants are briefly explained here. 
      
    Polling 
    Polling is the simplest measurement mode of the XCP protocol. In this mode, the 
    XCP master uses an XCP command (SHORT_UPLOAD) to poll the measurement 
    values in a uniform time base. The measurement data are not equidistant in this 
    mode. If there is a high bus load, the measurement parameter may be transferred 
    with a time lag. Figure 3-4 shows the communication sequence for the polling 
    measurement mode. 
      
     
    Figure 3-4: Communication sequence for the polling measurement mode 
      
    DAQ 
    The DAQ measurement mode uses an optimized method in order to access ECU-
    internal values. In DAQ measurement mode, the XCP master groups the 
    measurement and calibration parameters to be measured in ODTs and assigns these 
    to the corresponding DAQ events before the start of the measurement. During the 
    measurement, the XCP slave transmits the measurement values when the cyclic 
    DAQ event or asynchronous DAQ event occurs without further requests to the master 
    (see also the XCP Driver section). 
     
    In the DAQ measurement mode, a distinction is also made between the Consistency 
    ODT
     and Consistency DAQ modes. In the first case, the measurement data of an 
    ODT are consistent. In the second case, the DAQ list as a whole is consistent, but not 
    every ODT as a single entity. The measurement data can therefore be split between 
    two ODTs. Figure 3-5 presents the communication sequence of the DAQ 
    measurement mode in a trace. 
      
    Note: Only the Consistency ODT is currently supported by MICROSAR. 
     
      
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 17 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
     
    Figure 3-5: Communication sequence for the DAQ measurement mode 
      
    Timestamps 
    If there are stringent requirements for time accuracy of the measurement values, 
    generation of the timestamp directly in the ECU is recommended. In the DAQ 
    measurement mode, the XCP driver also transfers the timestamp for each occurring 
    event so that the measurement is not falsified by the running time of the transfer to 
    the MCD tool. However, the throughput of measurement values is meanwhile 
    reduced. Because the timestamps represent an additional load on the bus, their 
    generation can also be controlled via the MCD tool. 
     
    With a CAN bus, for example, it should be possible to disable the timestamp. With 
    Ethernet, the timestamp is of little importance. 
     
    Timestamps are mandatory on FlexRay when a cycle time is used that is faster than 
    the FlexRay bus cycle. 
      
    3.2.2  Autoselection and Software Version Check of the A2L File 
    Software version 
    CANape provides the option of checking the software version. This means that a 
    check 
    check is made based on certain information to determine whether die A2L file 
    integrated in CANape corresponds to the current software version of the connected 
    ECU. The option also exists to select the A2L file automatically using an XCP protocol 
    command. 
     
    CANape can use the following information for the software version check: 

    XCP Station Identifier (protocol command GET_ID) 

    EPK check 

    Checksum of code segments in the ECU (CANape 11.0 and higher) 
    XCP station identifier  The "XCP Station Identifier" (GET_ID) represents the name of the A2L file during the 
    software version check. This describes the software version in a meaningful way 
    (e.g., EcuName_V1-2-0.a2l). CANape can use this identifier to check whether the 
    correct A2L file is loaded or load the appropriate A2L file automatically. 
    EPK check 
    The EPK identifier (EPROM identifier) is a character string that is present in the ECU 
    © Vector Informatik GmbH 
    Version 1.0 
    - 18 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    as well as in the database. The address in the ECU where this identifier can be found 
    is specified in the database. This character string can, in turn, designate the software 
    version based on the project name and its version. 
    Checksum 
    The checksum of code segments (memory segments with ECU code) can be 
    calculated for the HEX file and the ECU. On the basis of the checksum it can be 
    determined if the HEX file, the A2L file, and the software on the ECU are compatible 
    with respect to version. This approach assumes that the HEX file and the A2L file are 
    viewed as a unit. 
    Application of the 
    The described procedures can be applied independently of one another. Each 
    procedures 
    individual procedure increases the assurance that you are working with correct data. 
    For example, it is possible to have the A2L file selected automatically based on the 
    "XCP Station Identifier" and to additionally use the check based on EPK identifier. 
      
    3.2.3  Online Calibration 
    Prerequisite 
    This section introduces the most important terms regarding online calibration. Online 
    calibration enables optimization of the calibration parameters of the ECU algorithm 
    during runtime so that the effects of the change can be directly measured. A 
    prerequisite for this is availability of sufficient RAM memory. 
    Calibration concepts 
    Two different calibration concepts are available for calibrating with XCP and 
    AUTOSAR: 

    InitRAM 

    AUTOSAR Single Pointered 
      
    Reference: Additional information on the topic of calibration concepts can be found in 
    the respective AUTOSAR specification AUTOSAR_SWS_RTE, chapter "Calibration". 
     
      
    3.2.4  Page Switching 
    Switchover of 
    Calibration parameters normally reside in FLASH memory and are copied to RAM 
    memory segment 
    memory, if required. Depending on the implementation, some ECUs provide the 
    pages between RAM  option of page switching, i.e., the XCP switchover of memory segment pages 
    and FLASH 
    between RAM and FLASH. With the help of this feature, calibration parameters can 
    be calibrated and the possibility exists to quickly switch back to the values stored in 
    FLASH memory. This XCP mechanism is independent of the calibration concept 
    used. 
    Logical structure of 
    In principle, the memory is logically structured in segments. These specify where the 
    the memory in 
    calibration parameters reside. Each segment can, in turn, have multiple pages. A 
    segments 
    page describes the same data at the same address, but with different properties or 
    values (see Figure 3-6). 
    © Vector Informatik GmbH 
    Version 1.0 
    - 19 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    Figure 3-6: Physical 
    layout of the memory 

     
    Assignment 
    The assignment of the algorithm to a page within a segment must be unambiguous at 
    all times. In addition, only one page at a time may be active in a segment. This page 
    is the so-called "active page for the ECU in this segment".  
    Access 
    The page that the ECU or the XCP driver accesses can be controlled individually. The 
    active page for the XCP access is called the “active page for the XCP access in this 
    segment”. 
    Commands  
    In order to use page switching, the ECU must support the XCP commands 
    GET_CAL_PAGE and SET_CAL_PAGE. 
     
    With the GET_CAL_PAGE command, the master asks the slave which page of a 
    segment is currently active. With the SET_CAL_PAGE command, on the other hand, 
    the master can define which page the master itself or the ECU algorithm accesses. 
      
    3.2.5  Bypassing 
    Changes to the ECU  With the help of the bypassing feature, changes to the ECU algorithm can be made 
    algorithm 
    without calibration and subsequent flashing of the software. 
    Implementation 
    To implement bypassing, at least 2 XCP events as well as writable access to the ECU 
    RAM via XCP are required. The events must differ in their direction (STIM, DAQ). 
    Figure 3-7 shows the use of bypassing. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 20 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
     
    Figure 3-7: Use of bypassing 
     
    Signal path: 
    1.  Reception of signals of the ECU (DAQ) 
    2.  Transmission of signals as input of the model 
    3.  Transmission of events back to the XCP master 
    4.  Transmission of events back to the ECU (STIM) 
    Calibration path: 
    5.  Calibration of the ECU (XCP) 
    6.  Calibration of the model with XCP 
     
    Reference: The ASAM XCP Version 1.1 Part 1 - Overview specification, section 1.3 
    BYPASSING (BYP), explains in detail all other functions and implementations on the 
     
    topic of bypassing. 
      
    3.2.6  Resume Mode 
    Automatic data 
    Resume mode enables automatic data transfer to take place directly after switching 
    transfer 
    on the ECU. This mode is commonly used to start recording and evaluating data as 
    soon as the ECU starts. Resume mode supports both the STIM and DAQ directions. 
    The RESUME_SUPPORTED flag in the DAQ properties must be set appropriately in the 
    A2L file. 
    Commands 
    With the START_STOP_DAQ_LIST command (select), the master can select a DAQ 
    list as part of a DAQ list configuration that the slave stores in non-volatile memory. 
    The master then sends to the slave the configuration ID that the master has itself 
    calculated and stored. The slave then knows that it will store the DAQ lists in non-
    volatile memory as soon as the STORE_DAQ_REQ_RESUME command is transmitted 
    to it. The configuration ID is also stored in non-volatile memory so that the slave can 
    return it upon the GET_STATUS command. Via the GET_STATUS command, the 
    master finds out whether a slave is in resume mode. Prior to storing, the slave deletes 
    the previous content of the non-volatile memory. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 21 - 




    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
     
     
    After each start of the slave, it sends the EV_RESUME_MODE command to the master. 
    This command contains the following data: 
    Figure 3-8: Data of the 
    EV_RESUME_MODE 
    command 

     
    Communication 
    The communication sequence between the master and slave can be tracked in Figure 
    sequence 
    3-9. 
    Figure 3-9: 
    Communication 
    sequence between 
    master and slave 

     
      
    Reference: Additional XCP commands and information regarding resume mode can 
    be found in the ASAM XCP Version 1.1 Part 1 - Overview specification. 
     
      
    3.3  A2L File 
    Goal 
    The A2L file has been specified by the Association for Standardization of Automation 
    and Measuring Systems (ASAM) with the goal of defining compatible and replaceable 
    modules for electronics development in the automotive industry. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 22 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    Figure 3-10: ASAM 
    interfaces 

     
      
    ECU description file 
    The description file of the ECU for configuring the models and the layout of the 
    calibratable and measurable objects supplies the ASAP2 (ASAM MCD 2MC) interface 
    in the form of the A2L file. Finally, the data exchange between the MCD system and 
    the ECU is specified via the ASAM MCD 1MC (ASAP1b) interface. 
      
    3.3.1  Structure 
    Modular structure 
    The A2L file has a modular structure, which enables the replacement of individual 
    modules without having to adapt the entire A2L file. Figure 3-11 shows this modular 
    structure. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 23 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    Figure 3-11: Structure 
    of the A2L file 

     
    4 major parts 
    The project-relevant data at the start of the A2L file are defined using the PROJECT 
    keyword and form the framework of the A2L file. These also include the ECU 
    description that can be described with the MODULE keyword and divided into 4 major 
    parts: 

    AML 

    General ECU Implementation 

    IF_DATA 

    A2L Objects 
     
    These parts are explained in more detail below. 
      
    3.3.1.1 
    AML 
    Interface-specific 
    The first part defines the interface-specific parameters. It yields the framework of the 
    parameters 
    IF_DATA area that is defined using the A2ML metalanguage with the AML keyword. 
    The AML is generally configured once since the specification of a driver and the 
    corresponding features is also performed once. 
      
    Reference: Detailed information regarding the metalanguage can be found in the 
    ASAP2 specification ASAM MCD-2 MC, chapter 5. 
     
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 24 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3.3.1.2 
    General ECU Implementation 
    ECU description 
    This part of the A2L file specifies the ECU description. Here, standardized structures 
    of the ECU and the general description are defined using the MOD_COMMON and 
    MOD_PAR keywords. This part of the A2L file also generally remains unchanged since 
    the structures of the ECU are set. The keywords are now briefly presented: 
    MOD_COMMON 
    The MOD_COMMON keyword describes the internal structures of the ECU. The 
    possibility exists to define certain parameters for the complete ECU. For example, if a 
    standard byte order exists, this can be specified for the complete device in this area. 
    Example: 
     
     
    /begin MOD_COMMON "" 
      BYTE_ORDER MSB_LAST 
      … 
    /end MOD_COMMON 
     
    MOD_PAR 
    The MOD_PAR keyword describes the ECU-specific description data such as the 
    EPROM identifier or the memory segments. 
    Example: 
     
     
    /begin MOD_PAR "Comment" 
      ADDR_EPK 0x12345 
      EPK "EPROM identifier test" 
      /begin MEMORY_SEGMENT  Data0001 "Data segment" DATA 
       FLASH INTERN 0x30000 0x1000 -1 -1 -1 -1 -1  
      /end MEMORY_SEGMENT    
      SYSTEM_CONSTANT "CONTROLLERx CONSTANT1" "0.99" 
    /end MOD_PAR 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 25 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    3.3.1.3 
    IF_DATA 
    Communication 
    Next, the communication interface is specified using the IF_DATA keyword. This is 
    interface 
    only adapted if, for example, certain XCP commands are also to be used afterwards. 
    IF_DATA 
    The IF_DATA keyword describes the interface-specific data, such as protocol layer or 
    DAQ lists. These can also be defined directly as a subcategory for diverse A2L 
    objects. 
    Example: 
     
     
    /begin IF_DATA XCP 
      /begin PROTOCOL_LAYER 
        … 
      /end PROTOCOL_LAYER 
      /begin DAQ 
        … 
      /end DAQ 
      /begin XCP_ON_CAN 
        … 
      /end XCP_ON_CAN 
    /end IF_DATA 
     
     
    DAQ configuration 
    The DAQ configuration is an essential component of the XCP protocol and will 
    therefore be presented again in more detail. The configuration is made under the DAQ 
    keyword in the IF_DATA section, and the individual events are defined under this 
    point. 
      
    Reference: More detailed information regarding the definition of events can be found 
    in the ASAM XCP Version 1.1 Part 1 - Overview specification, section 1.1.1.5 Event 
     
    Channels. 
      
    Specification of DAQ  Table 3-1: Specification of DAQ lists in the IF_DATA section compares the static and 
    lists 
    dynamic DAQ configuration in the A2L file. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 26 - 

    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
      
    XCP (static) 
    XCP (dynamic) 
    Explanation 
    /begin DAQ 
    /begin DAQ 
     
      STATIC 
      DYNAMIC 
    DAQ configuration 
      RESUME_SUPPORTED 
      RESUME_SUPPORTED 
    Resume mode is supported 
      /begin DAQ_LIST 
       
     
        0x0 
       
    DAQ list number 
        DAQ_LIST_TYPE DAQ 
       
    Direction (DAQ | STIM) 
        MAX_ODT 0xB 
       
    Maximum ODTs 
        MAX_ODT_ENTRIES 0x7     
    Maximum entries in an ODT 
        FIRST_PID 0x3 
       
    Packet designator 
        EVENT_FIXED 0x0 
       
    Event channel is permanently 
    specified 
      /end DAQ_LIST 
     
     
      /begin EVENT 
    /begin EVENT 
     
        "10 ms Liste 1" 
        "10 ms Liste 1"  Name of the event channel 
        "10 ms Lis" 
        "10 ms Lis" 
    Brief name of the event channel 
        0x0000 
        0x0000 
    Number of the event channel 
    Direction (DAQ | STIM) 
        DAQ 
        DAQ 
    Direction (DAQ | STIM) 
        0x01 
        0x01 
    Maximum of DAQ lists 
        0x0A 
        0x0A 
    Sampling period (0 corresponds to 
    non-cyclic) 
        0x06 
        0x06 
    Time base(0x06 corresponds to 1ms) 
        0x00 
        0x00 
    Priority 
      /end EVENT 
      /end EVENT 
     
    /end DAQ 
    /end DAQ 
     
    Table 3-1: Specification of DAQ lists in the IF_DATA section 
     
    Default event 
    It is recommended to assign at least one default event to each measurement and 
    calibration parameter in order to ensure that the objects will be measured at the 
    correct time in each case (example in next section under A2L Objects | Measurement 
    parameters)
    . With the help of this assignment, the drag & drop feature of the display 
    windows in CANape can be used optimally. If a default event is not defined, the 
    measurement mode must be changed manually by polling the appropriate event. 
      
    3.3.1.4 
    A2L Objects 
    Specification of 
    The last part contains the A2L objects. The measurement and calibration parameters 
    parameters and 
    are specified here using various parameters and keywords. In this area, changes may 
    keywords 
    occur even after completion of the A2L file since, for example, measurement 
    parameters will also be added during the course of the project. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 27 - 

    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
      
    Measurement 
    The measurement parameters are defined using the MEASUREMENT keyword. Some 
    parameters 
    parameter values are optional (labeled in []), while other values, such as the name, 
    are mandatory. 
     
    Prototype: 
    /begin MEASUREMENT 
        ident  Name 
        string  LongIdentifier 
        datatype  Datatype 
        ident  Conversion 
        uint  Resolution 
        float  Accuracy 
        float  LowerLimit 
        float  UpperLimit 
        [-> ANNOTATION]* 
        [-> ARRAY_SIZE] 
        [-> BIT_MASK] 
        [-> BIT_OPERATION] 
        [-> BYTE_ORDER] 
        [-> DISCRETE] 
        [-> DISPLAY_IDENTIFIER] 
        [-> ECU_ADDRESS] 
        [-> ECU_ADDRESS_EXTENSION] 
        [-> ERROR_MASK] 
        [-> FORMAT] 
        [-> FUNCTION_LIST] 
        [-> IF_DATA]* 
        [-> LAYOUT] 
        [-> MATRIX_DIM] 
        [-> MAX_REFRESH] 
        [-> PHYS_UNIT] 
        [-> READ_WRITE] 
        [-> REF_MEMORY_SEGMENT] 
        [-> SYMBOL_LINK] 
        [-> VIRTUAL] 
    /end MEASUREMENT 
    © Vector Informatik GmbH 
    Version 1.0 
    - 28 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
      
    Example: 
     
     
    /begin MEASUREMENT 
      FP_LED 
      "Raw value target driving program" 
      UBYTE NonDim_2p0 0 0 0 10 
      ECU_ADDRESS 0xD000B47C 
      ECU_ADDRESS_EXTENSION 0x0 
      /begin IF_DATA XCP 
        /begin DAQ_EVENT VARIABLE 
          /begin DEFAULT_EVENT_LIST 
            EVENT 0001 
          /end DEFAULT_EVENT_LIST 
        /end DAQ_EVENT 
      /end IF_DATA 
    /end MEASUREMENT 
      
    Calibration 
    The calibration parameters are specified in the A2L file using the CHARACTERISTIC 
    parameters 
    keyword. In this case, as well, there are optional parameter values [] and mandatory 
    parameter values. 
     
    Prototype: 
    /begin CHARACTERISTIC  ident  Name 
        string  LongIdentifier 
        enum  Type 
        ulong  Address 
        ident  Deposit 
        float  MaxDiff 
        ident  Conversion 
        float  LowerLimit 
        float  UpperLimit 
        [-> ANNOTATION]* 
        [-> AXIS_DESCR]* 
        [-> BIT_MASK] 
        [-> BYTE_ORDER] 
        [-> CALIBRATION_ACCESS] 
        [-> COMPARISON_QUANTITY] 
        [-> DEPENDENT_CHARACTERISTIC] 
        [-> DISCRETE] 
        [-> DISPLAY_IDENTIFIER] 
        [-> ECU_ADDRESS_EXTENSION] 
        [-> EXTENDED_LIMITS] 
        [-> FORMAT] 
        [-> FUNCTION_LIST] 
        [-> GUARD_RAILS] 
        [-> IF_DATA]* 
        [-> MAP_LIST] 
        [-> MATRIX_DIM] 
        [-> MAX_REFRESH] 
        [-> NUMBER] 
    © Vector Informatik GmbH 
    Version 1.0 
    - 29 - 


    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
        [-> PHYS_UNIT] 
        [-> READ_ONLY] 
        [-> REF_MEMORY_SEGMENT] 
        [-> STEP_SIZE] 
        [-> SYMBOL_LINK] 
        [-> VIRTUAL_CHARACTERISTIC] 
    /end CHARACTERISTIC 
      
    Example: 
     
     
    /begin CHARACTERISTIC Pehp_IDATA.T_FP_delay 
      "Time for transition from target to actual driving program 
    HPP" 
      VALUE 0xA01350CC UWORD_COL_DIRECT 0 ms_f10 0 60000 
    ECU_ADDRESS_EXTENSION 0x0 
      EXTENDED_LIMITS 0 60000 
      BYTE_ORDER MSB_LAST 
      FORMAT "%6.0" 
    /end CHARACTERISTIC 
      
    Conversion rules 
    Frequently, conversion rules are additionally defined for measurement or calibration 
    parameters if, for example, an object is to be converted to a physical unit. The 
    COMPU_METHOD keyword is used for this. 
     
    Prototype: 
    /begin COMPU_METHOD  ident  Name 
        string  LongIdentifier 
        enum  ConversionType 
        string  Format 
        string  Unit 
        [-> COEFFS] 
        [-> COEFFS_LINEAR] 
        [-> COMPU_TAB_REF] 
        [-> FORMULA] 
        [-> REF_UNIT] 
        [-> STATUS_STRING_REF] 
    /end COMPU_METHOD 
     
     
    There are various conversion types for this: 
    IDENTICAL 
    Raw value and physical value are identical, no conversion is necessary 
    FORM 
    A formula is used for the conversion (to be specified with the FORMULA keyword) 
    LINEAR 
    Conversion is made linearly according to f(x)=ax+b  
    (a and b are specified using the COEFFS_LINEAR keyword) 
    RAT_FUNC 
    Conversion is made using a rational function: 
    f(x) = (axx+bx+c)/(dxx+ex+f) 
    a, b, c, d, e, f are specified using the COEFFS keyword. 
    TAB_INTP 
    Conversion table with interpolation 
    TAB_NOINTP 
    Conversion table without interpolation 
    TAB_VERB 
    Verbal conversion table 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 30 - 



    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
    Example: 
     
     
    /begin COMPU_METHOD NonDim_2p0_a "" 
      RAT_FUNC "%5.0" "-" 
      COEFFS 2 1 0 0 4 1 
    /end COMPU_METHOD 
      
    Groups 
    Hierarchy levels are realized in the A2L file using groups. In a project with many 
    measurement and calibration parameters, these can be subdivided and categorized. 
    The possibility also exists to define subgroups. This makes the A2L file easier to view 
    in CANape. 
     
    Prototype: 
    /begin GROUP  ident  GroupName 
        string  GroupLongIdentifier 
        [-> ANNOTATION]* 
        [-> FUNCTION_LIST] 
        [-> IF_DATA]* 
        [-> REF_CHARACTERISTIC] 
        [-> REF_MEASUREMENT] 
        [-> ROOT] 
        [-> SUB_GROUP] 
    /end GROUP 
      
    Example: 
     
    /begin GROUP Maps "Calibration Maps" 
     
     ROOT 
      /begin SUB_GROUP 
        WorkingPoint 
      /end SUB_GROUP 
      /begin REF_CHARACTERISTIC 
        KF1 KF2 KF3 KF4 KF5 KF6 KF7 KF8 
        TestKennfeld map1_8_8_uc map4_80_uc map5_82_uc 
      /end REF_CHARACTERISTIC 
    /end GROUP 
      
    Structures 
    The A2L Specification contains no keyword for structures. CANape identifies these 
    based on analysis of the object name. 
     
    The valid syntax for structures in the A2L has the following appearance: 
    "." for objects (e.g., "TestStructStruct1.TestStruct2.s1") 
    "[]" for arrays (e.g., "TestStructStruct1.TestStruct2.s1[0]") 
    © Vector Informatik GmbH 
    Version 1.0 
    - 31 - 




    User Manual AUTOSAR Calibration  
    Measuring and Calibrating of ECU Software 
      
    Example: 
     
     
    /begin CHARACTERISTIC Test1.s0 "" 
      VALUE 0x2080D0 __ULONG_S 0 Test1.s0.CONVERSION 0 4294967295 
      ECU_ADDRESS_EXTENSION 0x0 
      EXTENDED_LIMITS 0 4294967295 
      FORMAT "%.15" 
    /end CHARACTERISTIC 
      
    Reference: Detailed information on the meaning of individual parameters can be 
    found in the ASAP2 specification ASAM MCD-2 MC under the respective keyword. 
     
      
    3.3.2  Mode of Functioning 
     
      
    Figure 3-12: Mode of functioning of the A2L 
      
    Engine speed as 
    Figure 3-12 illustrates the mode of functioning of an A2L file. The engine speed is 
    example 
    read out here as an example. Via the A2L file, the measurement and calibration 
    system (CANape) learns which memory address contains the engine speed and how 
    the ASAM MCD 1MC interface must be parameterized. The read-out raw value is 
    then converted to a physical value using a conversion rule described in the A2L file. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 32 - 

    User Manual AUTOSAR Calibration  
    OEM 
    4  OEM 
    In This Chapter You Will Find the Following Information: 
    4.1 
    Objective 
     page 34 
    4.2 
    Content of the Performance Specifications 
     page 34 
    4.3 
    Measurement Task 
     page 34 
    4.4 
    Calibration Task 
     page 35 
    4.5 
    XCP Features 
     page 35 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 33 - 

    User Manual AUTOSAR Calibration  
    OEM 
    4.1  Objective 
    Checklist for 
    This chapter serves as a checklist for creating performance specifications. The OEM 
    performance 
    must ensure that the indicated items are incorporated in the performance 
    specifications 
    specifications after careful consideration and as needed. 
      
    4.2  Content of the Performance Specifications 
     
    The content of the performance specifications must define the desired requirements 
    for the supplier. These can be divided into mandatory and optional requirements. 
    Mandatory 

    Delivery of an A2L compatible with the software version 
    Requirements 

    Configured XCP driver 

    Preconfigured CANape project 
    Optional 

    Build environment that can generate the A2L 
    Requirements 

    Delivery of a linker MAP file 
     
    The delivery of a linker MAP file has the advantage that new measurement and 
    calibration parameters can be incorporated directly into the A2L file. If a request to 
    measure additional objects arises during the course of a measurement task, the 
    memory addresses are known and these can be added. 
      
    4.3  Measurement Task 
    Information to be 
    To realize the mandatory requirements relating to the measurement task, the supplier 
    communicated 
    requires some information, such as the category of the measurement parameters. 
    Various details about the DAQ configuration are also relevant both for the configured 
    XCP driver and for the A2L file. 
     
    Specifically, information on the following items must be communicated to the supplier: 

    Category of the measurement parameters 
    >  Software component 
    >  Basic software 
    >  BSW module (e.g., COM, CanNm) 
    >  Runtime monitoring 

    Event-triggered measuring via DAQ 
    >  Static or dynamic DAQ lists 
    Vector recommends dynamic DAQ lists in order to make more efficient use of 
    the memory and, if necessary, to allow more signals to be measured. 
    >  Definition of DAQ event time base  
    >  Use of timestamps 
    >  Use of DAQ default events 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 34 - 

    User Manual AUTOSAR Calibration  
    OEM 
    4.4  Calibration Task 
    Items to be 
    The calibration task also affects the mandatory requirements (A2L file, XCP driver) for 
    considered 
    the supplier. The following items should be carefully considered here: 

    Location of the calibration parameters 
    >  Software component 
    >  NVRAM 

    Optimized "going online" 
    The accesses to the ECU are decreased when "going online" is optimized. An 
    upload operation is performed only if differences between the data in the memory 
    image and the ECU are identified. This procedure accelerates the "going online". 
    For optimized "going online", the use of a memory image is required. The 
    memory image is described on the basis of memory segments, which contain 
    only calibration parameters. In addition, the checksum calculation must be 
    implemented in the ECU. 
    Optimized "going online" is also a prerequisite for offline calibration and the use of 
    dataset management. 

    Use of a flashable HEX file (with calibrated calibration parameters from CANape) 
      
    4.5  XCP Features 
    Features to be 
    The XCP Driver section explained some aspects and features of the XCP protocol. 
    supported 
    Specifically, the following were explained: Measurement Modes, Autoselection and 
    Software Version Check of the A2L File, Online Calibration, Page Switching, 
    Bypassing, and Resume Mode. It is important here that the OEM communicates to 
    the supplier which of these features are to be supported by the XCP driver. 
     
    It is recommended to incorporate the following XCP features in the performance 
    specifications: 

    Polling and DAQ measurement modes 

    Autoselection of A2L and the software version check 

    Online calibration 

    Resume mode 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 35 - 

    User Manual AUTOSAR Calibration  
    Supplier 
    5  Supplier 
    In This Chapter You Will Find the Following Information: 
    5.1 
    Preface 
     page 37 
    5.2 
    Requirements 
     page 37 
    5.3 
    Definition of Measurement and Calibration Parameters 
     page 37 
     
    Measuring and Calibrating of AUTOSAR Software Components 
     
    Measuring of Ports and Variables 
     
    XCP Events 
     
    Software Component with Calibration Parameters 
     
    Calibration Parameters for Multiple Software Components 
     
    Configuration of the RTE (Runtime Environment) 
     
    Measuring and Calibrating Without the Support of the RTE 
     
    Debugging of the BSW (Basic Software) 
    5.4 
    Configuration of the XCP Module 
     page 42 
     
    DAQ List Configuration 
     
    Tool-Driven DAQ Timestamp Option 
     
    XCP Event Information 
     
    Software Version Check 
     
    Use of the XCP Component in the Implementation 
     
    Recommendations for the Configuration of the XCP Module 
    5.5 
    Configuration of the Driver Modules 
     page 48 
     
    CAN Module MICROSAR XCP 
    5.6 
    Configuration of the Memory Management 
     page 48 
     
    Configuration for Resume Mode 
    5.7 
    Creating an A2L File 
     page 49 
     
    Creation of a Master A2L File 
     
    Expansion of the Master A2L File 
     
    Working with ASAP2 Tool-Set 
     
    Working with CANape and the ASAP2 Editor 
    5.8 
    Fast Access to the ECU Via the VX Module 
     page 55 
    5.9 
    Additional Topics 
     page 56 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 36 - 

    User Manual AUTOSAR Calibration  
    Supplier 
    5.1  Preface 
    Certain functions and  The measurement and calibration task assigned by the OEM is carried out in the 
    configurations for 
    implementation of the ECU software. When AUTOSAR-compliant software modules 
    AUTOSAR 
    are used, the modules must be configured appropriately and certain functions must 
    be implemented. 
     
    This chapter explains procedures for implementing the requirements for the ECU 
    software. The description refers to the MICROSAR product. 
     
    The first part describes the configuration of software components (SW-C), the 
    MICROSAR RTE, and the MICROSAR BSW module. 
     
    This is followed by a brief overview of the integration of the XCP slave. The XCP 
    slave is provided by the XCP module. 
     
    The final part describes the creation of the A2L description file, which will be a central 
    component of the CANape configuration. 
      
    5.2  Requirements 
    Software 
    The following software components at least starting with the following versions are 
    components 
    required for the descriptions: 

    Vector Informatik DaVinci Developer 3.0.110 (SP5) 

    Vector Informatik DaVinci Configurator 4.1.1.2 

    Vector Informatik ASAP2 Tool-Set 7.0 

    Vector Informatik CANape 10.0 SP4 

    Vector MICROSAR Basic Software starting with Release 14 including 
    MICROSAR XCP and MICROSAR RTE 
      
    5.3  Definition of Measurement and Calibration Parameters 
    Via software 
    The measurement and calibration parameters for the measurement and calibration 
    components 
    task of the OEM are usually located in the software components (SW-C). These 
    parameters are defined with configuration tools, such as the DaVinci Developer. 
    Configuration of the RTE is also required for this. 
    Without RTE 
    Other measurement and calibration parameters can also be provided without the 
    support of AUTOSAR interfaces. A brief explanation is given in the Measuring and 
    Calibrating Without the Support of the RTE section. 
    Via A2L file 
    In addition, measurement parameters can also be added to the measurement 
    configuration within the AUTOSAR basic software. This is done by inserting known 
    measurement parameters from the basic software into the A2L file. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 37 - 




    User Manual AUTOSAR Calibration  
    Supplier 
    5.3.1  Measuring and Calibrating of AUTOSAR Software Components 
    Measurable objects 
    Measurable objects can be configured using a configuration tool, such as the DaVinci 
    Developer. Measurable objects include data elements (data elements) of 
    application and service ports (application port interfaces), variables for 
    communication between runnables (inter-runnable variables), and calibration 
    parameters (calibration parameters). 
     
     
    Figure 5-1: SW-C connected to ports 
    Figure 5-2: SW-C with parameters for measuring/calibrating 
    Calibration access 
    The objects indicated above can be made measurable by setting Calibration Access 
    to ReadOnly in the DaVinci Developer. The ReadWrite setting enables the writing of 
    objects with CANape. The writing of calibration parameters occurs in the common 
    "Calibration" use case of CANape. The writing of other data elements can be 
    configured but is not recommended. This is because the write access is not exclusive, 
    which means that information can be overwritten again. 
    Figure 5-3: 
    Measurement and 
    calibration option for an 
    object (e.g., data 
    element) 

     
    Specifying calibration  The AUTOSAR Standard provides the option of specifying calibration parameters. 
    parameters 
    Two variants are differentiated. 
    Calibration parameters can be defined within a software component. These are then 
    also available only for this software component. 
    The second variant is the use of a calibration software component that can provide 
    calibration parameters for multiple software components. 
      
    5.3.2  Measuring of Ports and Variables 
    Configuration of the 
    Data elements to be measured must be configured appropriately with the help of the 
    data elements 
    Calibration & Measurement Support. For measuring, Calibration Access must be 
    set to ReadOnly
     
    The following data elements can be measured: 

    Sender/Receiver Ports 

    Client/Server Ports (RTE not currently supported) 

    Inter-Runnable Variables 

    Calibration Parameters 
     
    For Sender and Receiver Ports, the data elements can be easily configured for 
    calibrating via the Properties
    © Vector Informatik GmbH 
    Version 1.0 
    - 38 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    Figure 5-4: 
    Configuration of a 
    sender/receiver port 

     
    Special case: Data 
    Sender/Receiver Ports for which a Data Mapping is defined represent a special 
    Mapping 
    case. For these ports, a direct (explicit) access and a buffered (implicit) access can 
    be configured as shown in Figure 5-5. 
    Figure 5-5: Access 
    definition of a port 

     
     
    Ports that have explicit access configured can only be measured using the BSW 
    module COM. On the other hand, ports whose access was configured as buffered 
    can be measured using the RTE as well as the BSW module COM. 
    The measurement parameters are typically already preconfigured. 
      
    5.3.3  XCP Events 
    RTE support 
    The RTE supports the generation of XCP events. For one thing, an event is created 
    for each task. These events are used to measure variables of the runnables that are 
    run within the task. The following should be noted in this regard: 

    The RTE generates XCP events at the end of each task. An XCP event thus does 
    not have a direct relation to the running of a Runnable. It is therefore common 
    that a Runnable does not run continuously between XCP events. 

    If XCP events are generated by the RTE, the DAQ measurement mode must also 
    be activated in the XCP module. 

    It must thereby be anticipated that the XCP events of the RTE will be called very 
    often. 

    The generated XCP events are not cyclic, so it is not possible to make a definitive 
    statement about the expected bus load. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 39 - 



    User Manual AUTOSAR Calibration  
    Supplier 
     
    For another thing, the RTE also generates XCP events for the above-mentioned 
    access to buffered ports. By means of the description in the A2L file, it is ensured that 
    these ports are measured fixed with the generated event. 
      
    5.3.4  Software Component with Calibration Parameters 
    External access  
    The definition of calibration parameters (Calibration Parameter) makes it 
    possible to change a calibration parameter within the software component externally 
    via XCP. 
     
    Within the software component, access to this calibration parameter is read-only. 
    However, outside of the SW-C, the possibility exists to change this calibration 
    parameter. 
      
     
    Figure 5-6: Properties of a calibration parameter 
      
     
    A calibration parameter consists of a data type and an initial value. The scope 
    (Scope) and the measurement and calibration access can be configured. 
    Note: For additional information about these parameters, refer to the online help for 
    the DaVinci Developer. 
     
      
    5.3.5  Calibration Parameters for Multiple Software Components 
    Calibration-type 
    A calibration-type software component is used to provide calibration parameters for 
    software component 
    multiple software components. 
     
    This type of software component has only calibration ports (Calibration Ports), 
    that provide calibration parameters for other SW-Cs and act as a sender port. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 40 - 




    User Manual AUTOSAR Calibration  
    Supplier 
      
     
    Representation of a calibration software component in DaVinci Developer: 
     
     
    Figure 5-7: Graphic interface 
     
    Figure 5-8: List with the configured ports 
     
    Each calibration port, in turn, contains calibration parameters. These calibration 
    parameters are handled in just the same way as calibration parameters within a 
    software component. 
      
    5.3.6  Configuration of the RTE (Runtime Environment) 
    RTE support 
    The support of the RTE is required in order to measure and calibrate software 
    necessary 
    components using the XCP protocol. The MICROSAR RTE Generator provides this 
    measurement and calibration support. 
      
    Reference: For an explanation of the activation of the measurement and calibration 
    support, refer to the technical reference TechnicalReference_Asr_Rte, page 102ff. 
     
      
    Online calibration 
    CANape currently supports the following online calibration procedures: 
    procedures 

    Initialized RAM 
    supported by 
    CANape 

    Single Pointered 
    Initialized RAM 
    The standard calibration procedure with CANape is "Initialized RAM". This procedure 
    is suitable when the ECU has sufficient RAM memory for all calibration parameters to 
    be calibrated. 
    Single Pointered 
    The advantage of the "Single Pointered" calibration concept is that not all calibration 
    parameters constantly have a copy in the RAM memory. Therefore, this procedure 
    must be chosen when RAM memory capacity is limited. 
     
    When the ECU source code is generated by the DaVinci Developer, A2L fragments 
    are also generated. The integration of the created A2L fragments Rte.a2l and 
    Rte_XcpEvents.a2l is described in more detail in the Creating an A2L File section. 
      
    5.3.7  Measuring and Calibrating Without the Support of the RTE 
    Points to be 
    The possibility exists to use measurement and calibration even without the support of 
    considered 
    the RTE. 
     
    The following points must be noted in this regard: 

    Measurement via DAQ events requires that corresponding XCP events be 
    programmed and then described in the A2L file. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 41 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    Example: Integrating an XCP event within a runnable 
     
     
    FUNC(void, RTE_CTAPMCU_APPL_CODE) RCtApMy_Algo(void) 

      // Perform algorithm within my runnable 
      ... 
     
      // Trigger user defined XCP Event 
      XcpEvent(12); 

     

    For online calibration, a separate implementation of the calibration method 
    ("Initialized RAM" or AUTOSAR "Single Pointered") is required. 

    Calibration and measurement requires one or more A2L files that are created 
    manually or with an external program (e.g., ASAP2 Creator or TargetLink). These 
    A2L files must be merged with the A2L files generated by the Vector tools. The 
    ASAP2 Merger program can be used for this (see description in the Creating an 
    A2L File 
    section on page 49). 
      
    5.3.8  Debugging of the BSW (Basic Software) 
    Modules which 
    MICROSAR AMD allows measuring BSW internal status information using XCP in 
    provide 
    order to ease debugging. For this purpose MICROSAR AMD provides measurement 
    measurement 
    parameters for by different MICROSAR modules such as COM, CANNM or CANTP. 
    parameters 
    Generating the A2L 
    For generating the A2L information GENy creates automatically the A2L fragments 
    information 
    bsw.a2l and bsw_xcp_events.a2l required for the A2L. 
      
    Reference: Information for configuration and detailed instructions are provided in the 
    User Manual AMD. 
     
      
    5.4  Configuration of the XCP Module 
    Configuration tool 
    The XCP module is configured with the GENy software component configuration tool. 
    GENy 
    The source code for the XCP slave implementation is then generated based on this 
    configuration. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 42 - 



    User Manual AUTOSAR Calibration  
    Supplier 
     
    Figure 5-9: Settings in GENy 
      
    Reference: Information and instructions on configuring the module can be found in 
    the TechnicalReference_XCP_Protocol_Layer document. 
     
      
    Preface 
    The most important configuration parameters are described below. In addition, the 
    optional XCP features Measurement Modes and Autoselection and Software Version 
    Check of the A2L File 
    are described in the context of the XCP module. 
      
    5.4.1  DAQ List Configuration 
    Implementation only 
    The XCP module currently has only the implementation for dynamic DAQ lists. 
    for dynamic DAQ 
    Predefined DAQ lists (static DAQ lists) are currently not supported by the XCP 
    lists 
    module. Static DAQ lists are not suitable for use of an XCP slave within an 
    AUTOSAR software stack. For one thing, these require an unnecessarily large 
    amount of memory. For another thing, when very many XCP events are implemented, 
    the maximum possible number of static lists may be exceeded if a fixed assignment is 
    used. 
    Amount of memory 
    The amount of memory provided for the DAQ configuration can be specified in the 
    space 
    XCP module. 
     
    The following formula can be used for the calculation: 
    Memory space f or D
      AQ c
      onfigurat ion [ bytes]  5max. n
       umber of
      m
      easuremen s
     t ignals per
     
    m
      easure  
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 43 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    5.4.2  Tool-Driven DAQ Timestamp Option 
    Additional options for  As described previously in the Measurement Modes section, the possibility exists to 
    timestamps 
    use a timestamp of the ECU. To do so, this must be supported in the XCP driver. As 
    an additional option, the XCP driver can also supply the timestamp as a matter of 
    principle (timestamp fixed) or on request. The size of the timestamp (1, 2, 4 bytes per 
    event) should be chosen after careful consideration. 
      
    Example:  
    The ECU uses a 1 µs counter for generating the DAQ timestamps. Only a 2-byte 
     
    timestamp is chosen. 
    As a result, the timestamp overflows every 65 ms. So that the MCD tool can 
    recognize an overflow, at least one signal that supplies a measurement value and 
    thus also a timestamp at a more frequent interval than 65 ms must be measured in 
    the measurement setup. 
      
    5.4.3  XCP Event Information 
    XCP slave to XCP 
    XCP event information can be provided in two ways by the XCP slave. Either by a 
    master 
    generated A2L file that contains the configured events or by the XCP command 
    GET_DAQ_EVENT_INFO which provides the event information directly from the ECU. 
    In both cases the event information has to be configured in the generation tool 
    accordingly. 
      
    Caution: If the GET_DAQ_EVENT_INFO feature is activated in the XCP module, the 
    automatically generated events of the RTE are not taken into consideration. 
     
      
    Recommendation: 
     
    No RTE events are 
    If no RTE events are used, the functionality of the XCP event information can be 
    used: 
    used. However, attention must be paid that all events that are implemented are 
    described (including those of the BSW component). 
    RTE events are 
    Due to the fact that the GET_DAQ_EVENT_INFO feature overwrites all events defined 
    used: 
    in A2L files, deactivation of this feature is recommended if RTE events are used. In 
    this case the generated fragment XCP_events.a2l can be inserted into the master 
    A2L file (see the Creating an A2L File section). 
      
    5.4.4  Software Version Check 
    Aspects for 
    The possibilities for checking the software version were previously presented in the 
    implementation 
    Autoselection and Software Version Check of the A2L File section. Aspects for the 
    implementation are explained here. 
      
    XCP Station 
    The Station Identifier should be centrally defined in an appropriate way and 
    Identifier (protocol 
    afterwards only integrated. This can be achieved as follows: 
    command GET_ID) 

    Do not perform a manual configuration of the XCP identifier in GENy. 

    Create a "User Defined" configuration containing, for example: 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 44 - 




    User Manual AUTOSAR Calibration  
    Supplier 
    Example:  
    user_cfg.h: 
    /* Standard commands */ 
     
    #define kXcpStationIdLength 7u 
    extern CONST(XcpCharType, XCP_CONST) kXcpStationId[]; 
    user_cfg.c: 
    CONST(XcpCharType, XCP_CONST) kXcpStationId[] = "EcuName_V1-2-
    0"; 
      
     
    If this information is integrated in the build process, the Station Identifier 
    EcuName_V1-2-0 is used. 
      
    EPK check 
    It is recommended that the EPK identifier be generated automatically and consistently 
    with every compilation both in the source code and in the A2L file. 
    Ideally, the EPK is stored at a constant address in the ECU. This could look like this 
    in the source code: 
      
    Example:  
    __attribute__((section("calflash_signature"))) const char 
     
    epk[26] = "EcuName V1.2.0 01.03.2012"; 
      
     
    In the A2L file, the EPK identifier must also be implemented accordingly. For the 
    above example in the ECU software, the entry in the A2L file looks like: 
      
    Example:  
     
     
        /begin MOD_PAR "EcuName" 
               ADDR_EPK 0x350002 
              EPK "EcuName V1.2.0 01.03.2012" 
        /end MOD_PAR 
      
    Checksum of code 
    So that CANape can calculate the checksum of code segments, some information is 
    segments in the 
    required. First, the code segments must be defined in the A2L file. Second, CANape 
    ECU (CANape 11.0 
    requires a HEX file that also contains the code segments. 
    and higher) 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 45 - 


    User Manual AUTOSAR Calibration  
    Supplier 
    5.4.5  Use of the XCP Component in the Implementation 
     
    Figure 5-10: Interaction of the XCP module with AUTOSAR application 
     
    Interaction of XCP 
    1.  For DAQ measurements, the basic software or the application calls the 
    module with 
    XcpEvent function. 
    AUTOSAR 
    application 
    2.  The initialization routine of the application (within DriverInitTwo) calls 
    XcpInit. 
    3.  The scheduler of the basic software calls XcpBackground periodically. 
    4.  By means of the CanXcp functions, the application can be informed about CAN-
    specific events. 
      
    Procedure for use 

    All modules that require the XCP component must include the XcpProf.h 
    header file. 

    The XCP component must be initialized in the initialization routine of the software 
    by calling the XcpInit function. 

    A desired XCP service within the application can be used by calling a function, for 
    example XcpEvent (channel) with a corresponding channel/event number. 
      
    5.4.6  Recommendations for the Configuration of the XCP Module 
    Check important 
    In general, every configuration parameter of the XCP module should be checked with 
    parameters 
    respect to its setting. Important parameters that should be assigned a different value 
    than the default value are described below. These can also be seen again directly in 
    GENy in Figure 5-9. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 46 - 

    User Manual AUTOSAR Calibration  
    Supplier 
    General Settings 
    XCP Station Identifier 
    Manual specification of the file name of the 
    A2L file without the file name extension. Use 
    of the automatic name adaptation described 
    in the Software Version Check section is 
    recommended. 
     
    Event Codes 
    Activate option. 
     
    Development Error Detection 
    Activate option during the development. 
    Table 5-1: Recommendations for the Configuration of the XCP Module: General Settings 
      
    Synchronous Data 
    Synchronous Data Acquisition (DAQ)  Activate option (see the DAQ List 
    Acquisition (DAQ) 
    Configuration section) 
     
    Memory Size 
    A memory size of 2048 bytes has proven to 
    be adequate. The memory is reserved and 
    used exclusively for the DAQ configuration 
    and the Send Queue for the resume mode. 
     
    Prescaler 
    Activate option. 
     
    Write DAQ multiple 
    Activate option if CAN is not used as 
    Transport Layer. 
     
    Resume Mode 
    Activate option if the OEM requires this in the 
    performance specifications. If activated, the 
    memory size should be rechecked, since the 
    Send Queue should have appropriate 
    capacity. 
     
    General Info 
    Activate option. 
     
    STIM 
    Activate option if the OEM requires the 
    bypassing feature in the performance 
    specifications. 
     
    DAQ Timestamp 
    Activate option (see the Tool-Driven DAQ 
    Timestamp Option 
    section). 
     
    Fixed Timestamp 
    Activate option if CAN is not used as 
    Transport Layer. 
     
    Timestamp Size 
    Selection should be greater than or equal to 
    WORD (2 bytes). 
     
    Timestamp Unit + Ticks per Unit 
    The time unit for the timestamp should be less 
    than the smallest event cycle time. 
    Table 5-2: Recommendations for the Configuration of the XCP Module: DAQ 
      
    Block Transfer 
    Block Upload 
    Activate option. 
     
    Block Download 
    Activate option. 
     
    MIN_ST for Block Download 
    Check whether the ECU can process the 
    blocks on time without a loss of data. 
    Otherwise, a wait time should be configured 
    here. 
    Table 5-3: Recommendations for the Configuration of the XCP Module: Block Transfer 
      
    Checksum 
    Checksum 
    Activate option. 
     
    AUTOSAR CRC Module Support 
    Recommended if the AUTOSAR module is 
    present. 
    Table 5-4: Recommendations for the Configuration of the XCP Module: Checksum 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 47 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    5.5  Configuration of the Driver Modules 
    5.5.1  CAN Module MICROSAR XCP 
    Configuration 
    The CAN module MICROSAR XCP is configured with the GENy Software Component 
    Configuration tool. 
    The CAN messages for the XCP communication can be specified for MICROSAR 
    XCP. 
    The module is also responsible for creating the CanXCPAsr.a2l file. 
      
    Reference: Additional information is provided in the Technical Reference XCP 
    Protocol Layer 
    document. 
     
      
    5.6  Configuration of the Memory Management 
    NVM module 
    The AUTOSAR Standard provides an NVM module for the memory management. 
    Measuring and calibrating generally have no direct points of contact with the memory 
    management. 
     
    The sole use case for configuring the NVM with regard to the XCP module is the use 
    of Resume Mode. 
      
    5.6.1  Configuration for Resume Mode 
    Implementation 
    For implementation of Resume Mode, the XCP driver must store its DAQ 
    configuration in a non-volatile memory. Two pieces of information must be stored for 
    resume mode: first, the fact that the mode is active and, second, the DAQ 
    configuration itself. 
     
    For this a memory block large enough for the configuration is configured in the NVM 
    module. Its size can be derived from the buffer size configured in the XCP module. 
    Buffer size 
    The following formula can be used to calculate the buffer size: 
    Event
    1
    Signal
    Buffer s
      ize  Buffer t ime  

    (Measureme
    s
     
    nt ignal
     ,j)  Size of
      t he t imestamp


    cycle t ime
    Eventi 
     
    i
    i
    j
    API methods 
    The API methods provided by the NVM module can then be used in order to save and 
    load the configuration in the XCP module. This program part is not generated 
    automatically and must be programmed. 
      
    Reference: The methods to be implemented can be referenced in the Technical 
    Reference XCP Protocol Layer 
    document. 
     
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 48 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    5.7  Creating an A2L File 
    To complete the A2L  The A2L description file contains all relevant information regarding the ECU. This 
    file, merge all 
    information is generated from various generators during the creation process. 
    relevant information 
    Information, such as the physical address, which is not available until the ECU 
    regarding the ECU 
    application has been created, is also needed. 
     
    All parts must be merged to ultimately obtain a complete A2L description file. The 
    addresses in the A2L file then still have to be updated. 
     
    Ideally, this process is incorporated into the automated creation process of the ECU 
    application. 
      
    5.7.1  Creation of a Master A2L File 
    Note: MICROSAR XCP provides a _Master.a2l file as a template in the delivery 
    folder …\Misc\McData. All A2L files generated by Vector tools can be found in 
     
    …\GenData folder. 
      
    Goal 
    A master A2L file that merges all partial databases into one is required. This master 
    file can then be used as a template for the file to be created. The objective is to 
    ultimately obtain a single file containing all information. 
    Project-specific 
    This master A2L file is very project-specific. The information for an A2L file is created 
    master A2L file 
    by different generators. Some information is also added manually. For this reason, 
    the master A2L file is not created automatically. 
      
     
    Figure 5-11: Process for creating a master A2L file (example) 
      
    include commands  The general structure of an A2L file is already described in Figure 3-11: Structure of 
    the A2L file. To merge the individual A2L fragments, include commands are used. 
    These are inserted accordingly to the modular structure (AML, General ECU 
    Implementation, IF_DATA and A2L Objects). 
    © Vector Informatik GmbH 
    Version 1.0 
    - 49 - 

    User Manual AUTOSAR Calibration  
    Supplier 
     
    To allow the merge of the individual memory segments running smoothly, project-
    specific adaptions must be made in the master A2L file. These are marked 
    with // TODO: 
    Adaption of include  For the below-named include commands the file paths may have to be adapted. 
    commands 
    Generally remove the appropriate includes if not required in the project. 
    Use of a text editor 
    The simplest procedure is to use a text editor to create and adapt the master A2L file. 
      
    Master A2L file 
    ASAP2_VERSION 1.60 
    /begin PROJECT ExampleProject "" 
      /begin MODULE MyModuleName "" 
    AML 
        /begin A2ML 
          ... 
          block "IF_DATA" taggedunion if_data { 
            ... 
          }; 
          ... 
          //TODO: Include AML Information if required. 
        /end A2ML 
         
    General ECU 
        /begin MOD_COMMON "" 
    implementation 
          // TODO: Set the Byte Order of the ECU as defined by the 
    ECUC module MSB_FIRST or MSB_LAST and configure the byte 
    alignment used in this project. 
        /end MOD_COMMON 
         
        /begin MOD_PAR "" 
        /include "GenData\Rte\Rte_MemSeg.a2l
        // TODO: Add or include MEMORY_SEGMENT information here. 
        /end MOD_PAR 
         
    IF_DATA 
        /begin IF_DATA XCP 
          /include "GenData\XCP.a2l
          /begin DAQ 
            // TODO: Add or include further a2l file splitter that 
    provide XCP Events. 
            /include "GenData\XCP_daq.a2l
            /include "GenData\XCP_events.a2l
            /include "Misc\McData\Dlt_Events.a2l
            /include "GenData\Bsw\bsw_xcp_events.a2l
            /include "GenData\Rte\Rte_XcpEvents.a2l
           /end DAQ 
          /include "GenData\CanXCPAsr.a2l
        /end IF_DATA 
         
    © Vector Informatik GmbH 
    Version 1.0 
    - 50 - 



    User Manual AUTOSAR Calibration  
    Supplier 
    A2L objects 
        // TODO: Add or include further a2l splitter that provide 
    measurement objects. 
        /include "Misc\McData\Dlt.a2l 
        /include "GenData\Bsw\bsw.a2l
        /include "GenData\Rte\Rte.a2l
        /include "GenData\AmdRtm.a2l
         
     
      /end MODULE 
    /end PROJECT 
      
    5.7.2  Expansion of the Master A2L File 
    Include commands  A good approach for incorporating additional contents into the A2L file is the 
    expansion of the master A2L file using include commands. Copying additional 
    information directly and inserting it without include commands is not recommended. 
    Integrating of ECU 
    The A2L elements MOD_COMMON and MOD_PAR are best described in additional A2L 
    information (General  files, which are manually integrated in the A2L file via an include command. 
    ECU 
    Implementation) 
    These include instructions are already inserted in the master file and accompany 
    the AUTOSAR Calibration user manual. 
    Integrating of 
    Some parts of the IF_DATA information are created by generators. These parts are 
    interface data 
    integrated via an include command. If additional manual information is to be added, 
    (Interface Data) 
    the creation of additional A2L files is recommended. These must be integrated in the 
    IF_DATA at the appropriate points. The merging of IF_DATA information from 
    various A2L files using the ASAP2 Merger is not supported. 
    The include instruction UserDefinedXcpEvents.a2l in the master file adds 
    manually defined XCP events to the IF_DATA section, for example. 
    Integrating of A2L 
    Partial databases containing measurement and calibration parameters are integrated 
    objects 
    most commonly. These files can be created, for example, by generators such as 
    (measurement and 
    Simulink, TargetLink, or the ASAP2 Creator. 
    calibration 
    Another example is the basic software, which also contains measurable objects. 
    parameters) 
    These files can be integrated manually using an additional include command, with 
    the help of the ASAP2 Tool-Set or the ASAP2 Editor. 
      
    Note: A file can only be added manually using an include command if the file 
    structure permits this. A complete A2L file cannot be added via include. 
     
      
    Example: A2L fragment – Inserting via include command possible 
     
     
        /CHARACTERISTIC 
        … 
        /MEASUREMENT 
        … 
    © Vector Informatik GmbH 
    Version 1.0 
    - 51 - 





    User Manual AUTOSAR Calibration  
    Supplier 
      
    Example: Complete A2L file – Inserting possible only via ASAP2 Merger 
     
     
    /begin PROJECT ExampleProject "" 
      /begin MODULE MyModuleName "" 
        /CHARACTERISTIC 
        … 
        /MEASUREMENT 
        … 
      /end MODULE 
    /end PROJECT 
      
    5.7.3  Working with ASAP2 Tool-Set 
    5.7.3.1 
    Merging of Additional A2L Files 
    Procedure for 
    A complete A2L file (as in the above example) cannot be embedded in the master 
    complete A2L files 
    A2L file using an include command. These types of A2L files can be merged using 
    the ASAP2 Merger program, which is part of the ASAP2 Tool-Set. 
      
     
    Figure 5-12: Integrating of A2L objects 
      
    Reference: The use of the ASAP2 Merger and its possible settings in the INI file are 
    described in the ASAP2 Tool-Set user manual. 
     
      
    Example:  
    The generated Extern1.a2l and ExternN.a2l files are imported into the master A2L file 
     
    Master.a2l as a slave. The result of the merging is then written to the 
    ECU_merged.a2l file. Necessary settings are provided with the merger.ini file. 
    The merger.ini file must be present since the ASAP2 Merger adopts the setting 
    from this file at each command line call. 
    Command Line Call: 
    ASAP2Merger.exe -m Master.a2l -s Extern1.a2l -s ExternN.a2l -o 
    ECU_Merged.a2l -p "<INI_PATH>\merger.ini" 
    Merger.ini 
    [OPTIONS] 
    MERGE_GROUP_CONTENTS = 1  // The contents of groups with the 
    same name will be merged 
    © Vector Informatik GmbH 
    Version 1.0 
    - 52 - 





    User Manual AUTOSAR Calibration  
    Supplier 
    DISABLE_SUFFIXES = 1      // Do not create suffixes for 
    imported objects 
      
    5.7.3.2 
    Update of the Addresses in the A2L File 
    Necessity 
    It is necessary to update the measurement and calibration parameters in an A2L file 
    because the addresses of objects are not known until after the program code is 
    created (after compilation). 
    Further benefit 
    The update step can also be used to create, with the help of the master A2L file, a 
    complete A2L file that no longer has any Includes. The advantage of doing this is 
    that afterwards only one file has to be worked with and all partial databases do not 
    always have to be separately copied. 
    Figure 5-13: Update of 
    the addresses in the 
    A2L file 

     
      
    Reference: The use of the ASAP2 Updater and its possible settings in the INI file are 
    described in the ASAP2 Tool-Set user manual. 
     
      
    Note: The _Updater.ini file can be found in the delivery folder …\Misc\McData. 
    It is supplied with the AUTOSAR Calibration user manual. 
     
      
    Template 
    The _Updater.ini file is provided as a template, which is indicated by the 
    _Updater.ini 
    underscore. 
    Necessary adaption 
    The _Updater.ini file needs to be adapted in any case, e.g. at least the 
    MAP_FORMAT must be specified. The array notation in [ ] is necessary because it is 
    used by MICROSAR that way. 
      
    Example:  
    The Master.a2l file is read in and the addresses of the measurement and 
     
    calibration parameters are updated and written to the ECU.a2l file. The addresses 
    for the update are taken from the demo.elf file. Information of the update operation 
    is also written in the a2l.log file. Necessary settings are provided with the 
    updater.ini file. The ASAP2 Updater also always requires an updater.ini file. 
    Command Line Call: 
    ASAP2Updater.exe -I Master.a2l -O ECU.a2l -A demo.elf -L 
    a2l.log -T "<INI_PATH>\Updater.ini" 
    updater.ini: 
    [OPTIONS] 
    MAP_FORMAT=31 // Use ELF 32 Bit 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 53 - 




    User Manual AUTOSAR Calibration  
    Supplier 
    5.7.3.3 
    Step by Step Instructions with the ASAP2 Tool-Set 
    Recommendation 
    The use of the ASAP2 Tool-Set is recommended because this can be integrated in an 
    automatic generation process. The address update and the export of the database 
    can be integrated as a post-build task. 
      
    STEP 1: A2L fragment generation 
    So that A2L fragments are generated, the corresponding generators must be 
     
    configured. This is done by integrating these into the build process. 
    It must be ensured that the created A2L fragments are stored are a fixed location. 
     
    STEP 2: Manual creation of A2L fragments 
    Information that the A2L file must subsequently contain but that is not automatically 
    generated must be manually created. 
     
    STEP 3: Adaptation of the master A2L file 
    A master A2L file must be created. In the process, the paths of the include 
    commands must be adapted accordingly. 
     
    STEP 4: Merging of additional A2L files 
    If complete A2L files must be integrated, the Merger of the ASAP2 Tool-Set must be 
    used. For this, the Merger must be called with appropriate parameters for each 
    additional complete A2L file. 
     
    STEP 5: Update of the addresses and export of the final file 
    The final step is to configure the creation of the final A2L file. For this, the ASAP2 
    Updater is incorporated into the build process, which updates the addresses of the 
    measurement and calibration parameters. At the same time, a new final A2L 
    containing all included A2L fragments is created. 
     
    STEP 6: Use of the A2L file in CANape 
    Following completion of these steps, a current A2L file should now be generated 
    automatically when the ECU software is created. 
    This final A2L file can then be used in CANape. 
      
    5.7.4  Working with CANape and the ASAP2 Editor 
    Use exported 
    CANape and the ASAP2 Editor support an interactive procedure for carrying out the 
    databases without 
    actions described above. In this procedure, however, it must be ensured that the 
    include commands 
    master file with its include commands remains intact. The master A2L file should 
    therefore not be specified as a database for the ECU directly in CANape. Instead, an 
    exported database that contains no more include instructions must always be used. 
      
    Caution: When saving, the ASAP2 Editor overwrites the existing A2L file and 
    removes thereby the includes. For this reason always store only a copy. 
     
      
    INI-file 
    All project-specific settings of CANape are stored in the CANape.ini. Changes to 
    the configuration can be easily made via the user interface in CANape. 
      
    Note: The _CANape.ini file can be found in the delivery folder …\Misc\McData. It 
    is supplied with the AUTOSAR Calibration user manual. 
     
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 54 - 


    User Manual AUTOSAR Calibration  
    Supplier 
    Template 
    The _CANape.ini file is provided as a template, which is indicated by the 
    underscore. The necessary presettings, such as for the export important notation [ ] of 
    arrays is already preconfigured to facilitate the implementation. 
      
    5.7.4.1 
    Step by Step Instruction 
    STEP 1: A2L fragment generation 
    So that A2L fragments are generated, the corresponding generators must be 
     
    configured. This is done by integrating these into the build process. 
    It must be ensured that the created A2L fragments are stored are a fixed location. 
     
    STEP 2: Manual creation of A2L fragments 
    Information that the A2L file must subsequently contain but that is not automatically 
    generated must be manually created. 
     
    STEP 3: Insert INI file 
    Copy the definite CANape.ini file to the directory of the master A2L file. 
     
    STEP 4: Adaptation of the master A2L file 
    A master A2L file must be created. In the process, the paths of the include 
    commands must be adapted accordingly. 
     
    STEP 5: Start the ASAP2 Editor 
    Start the ASAP2 Editor and load the master A2L. The ASAP2 Editor will be used to 
    create the final A2L file. 
     
    STEP 6: Merging of additional A2L files 
    The ASAP2 Editor can merge content from existing A2L databases. If complete, A2L 
    files must be integrated; the import functionality can be used. Either use File | Import 
    or File | Add partial database from the application menu. 
     
    STEP 7: Update of the addresses 
    The address update requires a configured MAP file. A MAP file can be added via the 
    database properties. After assigning a MAP file, the address can be updated via the 
    application menu File | Update addresses
     
    STEP 8: Create final A2L file to use in CANape 
    The master A2L file should not be altered with the ASAP2 Editor. A new A2L file 
    should be generated instead. This can be achieved by saving into a new database 
    using the application menu entry File|Save as
    This final A2L file can then be used in CANape. 
      
    5.8  Fast Access to the ECU Via the VX Module 
    Great measurement 
    An VX module is a scalable solution with maximum performance for measurement 
    bandwidth 
    and calibration tasks. The use of VX measurement hardware enables a greater 
    measurement bandwidth. The system forms the interface between the ECU and a 
    measurement and calibration tool such as CANape. For a high data throughput with 
    minimum runtime effects on the ECU, the data access occurs via microcontroller-
    specific data trace and debug interfaces. The VX module is connected to the PC 
    using XCP on Ethernet. The VX measurement hardware is connected to the ECU via 
    a POD (Plug-On Device). 
    © Vector Informatik GmbH 
    Version 1.0 
    - 55 - 


    User Manual AUTOSAR Calibration  
    Supplier 
    Application notes 
    For information on general integration of a VX module (VX1000), refer to the following 
    application notes: 

    AN-IMC-1-016 VX1000: Getting Started with Nexus JTAG and MPC5554 

    AN-IMC-1-013 VX1000: Getting Started with Infineon XC2000 

    AN-IMC-1-014 VX1000: Getting Started with Infineon TriCore 
      
    Note: These documents are available from the Vector Download Center. 
     
      
    5.9  Additional Topics 
    Items to consider 
    The following items require additional consideration: 

    Memory protection unit, ISO26262, Thread safety 

    Limiting of runtime of a task or runnable 

    MultiThreading 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 56 - 




    User Manual AUTOSAR Calibration  
    Delivery Test/Quick Start 
    6  Delivery Test/Quick Start 
    Objectives 
    This chapter describes a delivery test for the A2L file created by the supplier. 
    However, it can also be used as a CANape Quick Start for the OEM. 
    Test of the A2L file 
    To ensure the completeness and the functionality of the delivered A2L file, a simple 
    delivery test can be performed with the help of CANape. If the A2L file is incomplete 
    or corrupt, an error appears when the file is inserted. If the insertion is successful, a 
    few measurement signals can be added to display windows for the test and a 
    measurement started. If no error appears, the A2L file is functional. 
      
    Perform delivery test (step by step instruction): 
    1.  Copy the A2L file to an empty directory and connect the hardware. 
     
    2.  Start CANape from this directory (right-click on canape32.exe | Properties | Run 
    in  insert directory of the A2L file). 
    3.  Use a drag & drop operation to move the A2L file to CANape. 
    If an error message appears, the A2L file is incomplete or corrupt. Otherwise, the 
    ECU is shown as online. 
    4.  Open the Symbol Explorer 
     and expand the database under Devices
    5.  Select individual measurement and calibration parameters, use drag & drop to 
    move them onto the empty display page (see Figure 6-1), and choose suitable 
    measurement and calibration windows. 
     
    Figure 6-1: Dragging measurement and calibration parameters onto display page 
    6.  Start the measurement and calibrate the calibration parameters. 
    7.  Check the required XCP features in the corresponding settings (for more detailed 
    information on each feature, refer to the CANape online help or the XCP Features 
    in CANape 
    section). 
    The delivery test is successful if no error message occurs, meaningful 
    measurement values are displayed in the display windows, calibration parameters 
    can be calibrated, and all desired XCP features can be found. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 57 - 

    User Manual AUTOSAR Calibration  
    CANape Introduction 
    7  CANape Introduction 
    In This Chapter You Will Find the Following Information: 
    7.1 
    Creation of a Project 
     page 59 
    7.2 
    Device Configuration 
     page 60 
     
    Devices 
     
    Networks 
     
    Vector Hardware 
     
    XCP Features in CANape 
    7.3 
    Online Measurement Configuration 
     page 64 
     
    Measurement Options 
     
    Measurement Signals 
     
    Recorder List 
     
    Event List 
    7.4 
    Working with Parameter Set Files 
     page 69 
    7.5 
    Dataset Management 
     page 70 
     
    Tool-Based in CANape 11.0 and Higher 
    7.6 
    Offline Evaluation 
     page 72 
    7.7 
    Flashing 
     page 74 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 58 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    7.1  Creation of a Project 
    First steps 
    A CANape project is created either using the selection dialog after starting CANape or 
    in CANape itself via File | New project. Once a project name has been defined in the 
    first step, CANape suggests a project directory structure in the second step, in which 
    the project name is a subdirectory. 
    Figure 7-1: Creating the 
    project directory 

     
    Working directory 
    This serves as a working directory for CANape and should be changed as required. It 
    typically contains the following: 

    The CANape.ini initialization file, i.e., the global configuration of the project 

    Several configuration files (*.cna), i.e., local configurations for individual 
    measurement and calibration tasks 

    A subdirectory in which the measurement files are stored 

    For each ECU: 
    >  A subdirectory containing the A2L file 
    >  A subdirectory in which its parameter set files are stored 
    >  Other subdirectories, depending on the devices used (e.g., external 
    measurement equipment modules) 
    Definition of the 
    After the desired project directory structure has been specified, the new project is 
    devices 
    opened. The next step is to define the devices. An ECU description file in A2L format 
    or a diagnostic driver in ODX/CDD format is generally required for this. In the end, a 
    complete project has at least one configuration file (*.cna), the corresponding 
    initialization file (*.ini), and at least one ECU description file (*.a2l). 
     
    Figure 7-2 shows the recommended project directory structure. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 59 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Figure 7-2: Project 
    directory 

     
    Prototype version 
    Folders for the project-relevant files are created for each prototype version release 
    release 
    X.Y of an ECU. The CANape configuration file (*.cna) and the canape.ini file are 
    located in folders in the CANape 10 SP4 subdirectory. The Hex file, the databases 
    (*.a2l, *.cdd), and the network files (e.g., *.axml) are inserted as subfolders for 
    each prototype version release. In addition, the measurement, parameter set, and 
    script files are stored in their own folders. 
      
    7.2  Device Configuration 
    Settings 
    The settings for devicesnetworks, and channels can be modified and individual 
    devices and networks can be added in the device configuration. The device 
    configuration is accessed via the 
     icon or using Device | Device configuration
    Graphic 
    The device configuration can also be represented graphically using the Device 
    representation 
    window. Double-clicking the individual icons opens the corresponding part of the 
    Device Configuration or the Database Editor. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 60 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
     
    Figure 7-3: Device window in CANape 11.0 
      
    7.2.1  Devices 
    Creating new 
    The Devices subitem of the Device Configuration displays all the created devices. 
    devices 
    Here, new ECUs can be created from a database or the MCD3 server, or completely 
    new ECUs can be created. In the latter case, CANape generates an A2L body that 
    the user must still configure and complete using the ASAP2 Editor. Besides the XCP 
    and CCP devices, diagnostic drivers or databases can also be used. An example of 
    integrating a diagnostic database and of using panels for this can found in the 
    installation directory of CANape under Examples | ODX. A new device can be 
    created directly by dragging and dropping the database in CANape. 
    Bus monitoring 
    For the bus monitoring, the databases of the CAN bus (*.dbc), FlexRay bus 
    (*.fibex), and LIN bus (*.ldf) can be integrated in CANape. In the AUTOSAR 
    context, the possibility exists to use an AUTOSAR system description file (*.arxml) 
    in the case of the CAN or FlexRay bus. 
    Configuration 
    Corresponding dialog pages are available for configuring each created device. 
    Additional information regarding the configuration options can be found in the 
    CANape online help. Depending on the device status, the icon changes from green 
    (online) to yellow (offline) or red (inactive). 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 61 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
     
    Figure 7-4: Device configuration 
      
    7.2.2  Networks 
    Listing 
    The Networks subitem lists all networks available in the current configuration. 
    Configuration 
    The following networks can be created in CANape: CAN, LIN, ETH, K-Line, FlexRay, 
    and MOST. The networks are configured on the corresponding dialog pages. 
      
    7.2.3  Vector Hardware 
    Configuration of the 
    The configuration of the hardware is performed using the Vector Hardware. It can be 
    hardware 
    opened using Device | Vector hardware configuration or in the Channels | Vector 
    section in the Device Configuration. 
     
    The appropriate hardware can be assigned to the respective channels using 
    Application | CANape. In so doing, the physical channel number does not have to 
    match the logical channel number. The possibility also exists to change the number of 
    channels for a particular bus system. 
      
     
    Figure 7-5: Vector Hardware Config 
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 62 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    7.2.4  XCP Features in CANape 
    Timestamp 
    The use of a timestamp can be specified in the Device Configuration in subitem 
    Protocol | Event List of the device. Depending on the implementation in the ECU, 
    the option also exists here to require a timestamp of the slave. 
      
     
    Figure 7-6: Timestamp in the device configuration 
      
    Resume mode 
    Whether or not resume mode is supported is indicated in the Expert settings of the 
    DAQ Lists subitem. 
    Autoselection/ 
    The autoselection and the software version check of the A2L file can also be set in 
    software version 
    the device configuration. This option can be found in the Database subitem. 
    check 
     
    If the "Page Switching" or "Checksum calculation" options are used, these can be 
    found under Memory Segments of the device (see Figure 7-7). 
    Online help 
    All XCP features are described in more detail in the CANape online help. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 63 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
     
    Figure 7-7: Page switching in the device window 
      
    7.3  Online Measurement Configuration 
    Call 
    The complete measurement is configured in the online measurement configuration. It 
    is called via the 
     icon or using Measurement | Measurement Configuration
    Display windows and  Various display windows are available in order to display the measurement and 
    pages 
    calibration parameters. These windows are described in detail in the CANape online 
    help. In addition, several display pages can be created to enable a well-organized 
    complete configuration. 
      
    7.3.1  Measurement Options 
    Behavior of the 
    The behavior of the measurement can be configured in the measurement options of 
    measurement 
    the measurement configuration. For example, the handling with polling signals during 
    the measurement or the size of the measurement buffer can be adapted. In addition, 
    a comment template for newly created measurement files can be specified here. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 64 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Figure 7-8: MDF 
    measurement comment 
    template 

     
      
    7.3.2  Measurement Signals 
    Measureable signals  All signals of the measurement configuration are listed on this page. Signals of the 
    database can be selected using Edit | Insert Signal. Only the signals that are 
    contained in the measurement signal list or in the display windows of CANape are 
    measured. The option also exists to deactivate signals for individual measurements 
    instead of deleting and adding them again. For the case that a signal is to be 
    measured but not recorded, i.e., for performance and memory space reasons, the 
    Recorder option can be deactivated. 
    Measurement modes  The measurement mode of the measurement signals leaves some of the 
    configuration options up to the user. The most commonly used measurement modes 
    are: 

    Event: In event mode, the ECU sends the current measurement value of a signal 
    autonomously. The possible events and DAQ lists are defined in the ECU and 
    described in the A2L file. 

    Polling: In polling mode, the measurement values of a signal are returned 
    asynchronously on request and according to the polling rate of the ECU. This 
    process is well suited for slower measurements when there are no requirements 
    for synchronous polling. 

    Cyclic: In XCP and CCP, the cyclic measurement mode corresponds to the event 
    measurement mode. A data reduction can be achieved based on its cycle time. 

    On key: When a key (combination) is entered, the signal is requested (polling). 

    On trigger: When a trigger event occurs (StartTrigger, StopTrigger, 
    LastTriggerFinished), CANape measures the desired signal (polling). 

    On event: When a particular system event occurs (e.g., measurement start), the 
    signal is measured (polling). 
    Measurement rate 
    The measurement rate is displayed to the right of the displayed measurement mode 
    in the measurement configuration of the measurement signals. It indicates the 
    recording rate in polling or cyclic mode. The rate is specified as a time interval 
    between two measurement values, in milliseconds. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 65 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Bus utilization 
    The bus utilization and the measurement events for the selected device are listed at 
    the bottom of the measurement configuration. Here the bar indicates the percentage 
    utilization of the individual event time bases and the bus. 
    Online help 
    In addition to the signals of the individual databases, additional measurement signals 
    such as global variables can also be incorporated into the measurement 
    configuration. For more detailed information on this, refer to the CANape online help. 
      
     
    Figure 7-9: Measurement configuration: Measurement signals list 
      
    Inserting signals 
    With the help of the Symbol Explorer 
    , individual measurement signals can be 
    inserted directly in a display window using a drag & drop operation. These are 
    automatically added to the measurement signal list. 
    Shortening rule 
    To improve the readability of long measurement signal names in the Symbol Explorer, 
    a shortening rule can be specified using Tools | Options, section Display | Object 
    Names

    © Vector Informatik GmbH 
    Version 1.0 
    - 66 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Figure 7-10: Setting of 
    a name shortening rule 

     
     
    This indicates the start of the signal name only and is limited in the display to the last 
    part after the specified separator. 
    Figure 7-11: Example 
    for use of a name 
    shortening rule 

     
      
    7.3.3  Recorder List 
    Definitions/Settings 
    The recorder list in the measurement configuration provides an overview of the 
    defined recorders. The option exists to deactivate individual recorders in order to 
    realize different measurement tasks. The setting of the file name of the MDF file can 
    be made individually for each recorder. Here, it is possible to use different macros in 
    order, for example, to record the time of day in the file name. Under the Options 
    area, various settings can be made for each recorder. A detailed explanation of these 
    settings can be found in the CANape online help. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 67 - 



    User Manual AUTOSAR Calibration  
    CANape Introduction 
     
    Figure 7-12: Measurement configuration: Recorder list 
      
    Trigger of recordings  In addition to the most straightforward measurement in which all signals are recorded 
    over the entire measurement period, the possibility also exists to trigger the recording 
    of individual signals by certain events. These are defined in more detail in the Trigger 
    area. 
      
     
    Figure 7-13: Trigger condition 
      
    Start events 
    The selection menu of the [New] button can be used to select various start events. 
    The following categories are available for selection here: 

    System events (messages from the PC or the ECU) 

    Signal events (values from active measurement) 

    Keyboard events (operator inputs) 
    Stop event 
    These events are also available again as a stop event. However, a time limitation can 
    also be chosen as a stop event. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 68 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Assign signals to 
    The measurement signals that are recorded by this recorder are indicated under All 
    recorders 
    recorder signals. Signals can be assigned to individual recorders so that these are 
    recorded only when the trigger condition occurs. 
      
    7.3.4  Event List 
    Overall event list 
    The Event list section of the Measurement Configuration lists all events with their 
    properties. Here it can be seen whether the event is an ECU event or a general 
    system event. The defined trigger events are also displayed here. 
    Definition of new 
    New events are defined using the context menu. These are then available in the 
    events 
    measurement signal list as a measurement mode so that, for example, a signal is 
    measured only after a particular key has been pressed. 
      
     
    Figure 7-14: Measurement configuration - Event list 
     
    7.4  Working with Parameter Set Files 
    Purposes for saving 
    CANape offers the option to perform online calibration of calibration parameters and 
    parameter set files 
    to save these as a parameter set file. These files are then used mainly for two 
    purposes: 
     

    For saving the current version and for documenting and/or exchanging parameter 
    values 
    Different options are available for selection for saving the calibration parameters. 
    First, the parameters of a single calibration window can be saved by selecting 
    Save in the popup menu of the Calibration window. Second, all the parameters of 
    all Calibration windows can also be saved. This can be done using Calibration | 
    Save all calibration windows
    . In addition, the possibility exists to select 
    © Vector Informatik GmbH 
    Version 1.0 
    - 69 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    particular parameters via a filter (Calibration | Save parameter set as). 
     

    In order to bring the system to a defined state 
    Several functions are also available for loading a parameter set file. Calibration 
    parameters in a particular calibration window can also be opened here by 
    selecting Load in the popup menu of the Calibration window. Particular 
    calibration parameters can also be selected using Calibration | Load parameter 
    set from

      
    7.5  Dataset Management 
    Definition of dataset 
    A dataset is a set of various parameters at a particular point in time within the edit 
    history. It normally contains all parameters that belong to an ECU and is represented 
    via the following files: 

    Database file (A2L file) 

    Memory image content (HEX file) 

    Parameter set file (only for datasets from the eCDM system) 
     
    The dataset is the central object for the versioning and configuring of parameters. 
      
    7.5.1  Tool-Based in CANape 11.0 and Higher 
    Dataset 
    In CANape 11.0, a convenient dataset management tool has been introduced. The 
    management 
    [Dataset Management] can be called via the device configuration. Here, various 
    datasets of an ECU can be added. New datasets (A2L+HEX, HEX or uncoded) can 
    be added on the Datasets tab using the 
     icon. Additional settings are available in 
    the context menu. The Timestamps tab shows the snapshots of the calibration 
    history and indicates their timestamp. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 70 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Figure 7-15: Dataset 
    management in 
    CANape 11.0 

     
    Working with multiple  The datasets are then displayed and can be activated in the Symbol Explorer. This 
    datasets 
    provides a convenient means for working with multiple datasets within a project. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 71 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Figure 7-16: Dataset 
    management in the 
    Symbol Explorer 

     
    Demo project 
    The Examples folder of the CANape installation directory contains a demo project 
    named Datasets_Thesaurus, which illustrates the use of the dataset management 
    using an example. 
      
    7.6  Offline Evaluation 
    Read in 
    For purposes of offline evaluation, measurement data can be read in using Analysis | 
    measurement data 
    Show values from measurement file
    Measurement File 
    The Measurement File Manager (can also be opened via the Analysis menu item) 
    Manager 
    shows all loaded MDF files as well as the virtual MDF channels. Several possible 
    settings are available in the toolbar of the Measurement File Manager. These are 
    described in detail in the CANape online help. 
    Data Mining 
    An automatic procedure for offline evaluation of loaded MDF files is available under 
    Analysis | Data Mining. The option exists, for example, to find the times at which the 
    speed exceed 3000 rpm. In so doing, it is possible to evaluate multiple measurement 
    files with measurement signal names as identical as possible in a single search. 
    These are specified in the File filter list section. The option of using wildcards 
    (*.mdf) is also available. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 72 - 


    User Manual AUTOSAR Calibration  
    CANape Introduction 
    Calculation methods 
    The calculation methods are configured in the Methods section. The following are 
    available for selection here: 

    Function (based on user-defined functions that are created in the function editor 
    or from the global function library) 

    MATLAB/Simulink model (based on MATLAB/Simulink models that are available 
    as DLL) 

    Arithmetic condition (based on user-defined criteria) 

    Script (defined in the Functions Editor) 
    Definition of 
    Figure 7-17 shows the definition of an algebraic condition. The time range to be 
    algebraic conditions 
    evaluated can be set under Extended
      
     
    Figure 7-17: Data Mining: Creating an algebraic condition 
      
    Naming analysis files  The desired file name of the analysis file can be entered in the Options section. The 
    name can contain various macros that can be inserted using the corresponding 
    button. 
    Further settings 
    In addition, it is possible to limit the number of hits per file. It is useful to specify a 
    creation date of the file to be searched if only the measurement data starting from a 
    certain date are to be evaluated. 
    Output in CSV format  The results can also be output in CSV format for further analysis. The desired 
    separator for the measurement data should be indicated in the selection menu in this 
    section. 
    © Vector Informatik GmbH 
    Version 1.0 
    - 73 - 

    User Manual AUTOSAR Calibration  
    CANape Introduction 
      
    Executing scripts 
    Scripts that are executed before starting the analysis, before the analysis of each file, 
    after the analysis of each file, or after finishing the complete analysis can also be 
    specified. 
    Example of Data 
    A detailed example of Data Mining can be found in the installation directory of 
    Mining 
    CANape under Examples | DataMining
      
    7.7  Flashing 
    Flash tools 
    Other Flash tools, such as vFlash can be opened from CANape. 
    Online help 
    Additional information on the topic of flashing with CANape can be found in the 
    CANape online help. 
      
    © Vector Informatik GmbH 
    Version 1.0 
    - 74 - 

    User Manual AUTOSAR Calibration  
    Addresses 
    8  Addresses 
    Addresses on Vector  Please find the contacts of Vector Informatik GmbH and all subsidiaries worldwide 
    homepage 
    via: 
    http://www.vector.com/vi_addresses_en.html  
      
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 75 - 

    User Manual AUTOSAR Calibration  
    Abbreviations 
    9  Abbreviations 
    Abbreviation 
    Description 
    ASAM 
    Association for Standardization of Automation and Measuring Systems 
    AUTOSAR  
    AUTomotive Open System ARchitecture 
    BSW 
    Basic software 
    CSA 
    Common Software Architecture 
    CTO 
    Command Transfer Object 
    DAQ 
    Data Acquisition  
    DTO 
    Command Transfer Object 
    E/E Architecture 
    Electrical/electronic architecture 
    EPK 
    EPROM-Kennung (EPROM identifier) 
    EPROM 
    Erasable Programmable Read Only Memory 
    MCD System 
    Measurement Calibration, and Diagnostics System 
    ODT 
    Object Description Table 
    RTE 
    Runtime Environment 
    SW-C 
    Software Component 
    VFB 
    Virtual Function Bus  
     
    © Vector Informatik GmbH 
    Version 1.0 
    - 76 - 


     
     
    Get more Information! 
    Visit our Website for: 
    > News 
    > Products 
    > Demo Software 
    > Support 
    > Training Classes 
    > Addresses 
     
     
     
     
     
     
     
     
    www.vector.com 

     
     
     

    Document Outline


    1.3.186 - XCP_ReferenceBook_V3.0_EN

    XCP – The Standard Protocol for ECU Development

    1.3.188 - XCP_ReferenceBook_V3.0_ENs


    XCP – The Standard Protocol
    for ECU Development
    Fundamentals and Application Areas
    Andreas Patzer | Rainer Zaiser

    Andreas Patzer | Rainer Zaiser
    XCP – The Standard Protocol for ECU Development

    Date December 2016
    Reproduction only with expressed permission from 
    Vector Informatik GmbH, Ingersheimer Str. 24, 70499 Stuttgart, Germany
    © 2016 by Vector Informatik GmbH. All rights reserved. This book is only intended for personal use, but not 
    for technical or commercial use. It may not be used as a basis for contracts of any kind. All information in this 
    book was compiled with the greatest possible care, but Vector Informatik does not assume any guarantee or 
    warranty whatsoever for the correctness of the information it contains. The liability of Vector Informatik is 
    excluded, except for malicious intent or gross negligence, to the extent that laws do not make it legally liable. 
      
    Information contained in this book may be protected by copyright and / or patent rights. Product names of 
    software, hardware and other product names that are used in this book may be registered brands or otherwise 
    protected by branding laws, regardless of whether or not they are identified as registered brands.

    XCP
    The Standard Protocol
    for ECU Development
    Fundamentals and Application Areas
    Andreas Patzer, Rainer Zaiser 
    Vector Informatik GmbH

    Table of Contents
    Introduction ........................................................................................................................................... 7
    1  Fundamentals of the XCP Protocol ...........................................................................................13
    1.1  XCP Protocol Layer ................................................................................................................ 19
      

    1.1.1  Identification Field ........................................................................................................21
      
    1.1.2  Timestamp .....................................................................................................................21
      
    1.1.3  Data Field ...................................................................................................................... 22
    1.2  Exchange of CTOs .................................................................................................................. 22
      
    1.2.1  XCP Command Structure .......................................................................................... 22
      
    1.2.2  CMD ................................................................................................................................ 25
      
    1.2.3  RES .................................................................................................................................. 28
      
    1.2.4  ERR .................................................................................................................................. 28
      
    1.2.5  EV .................................................................................................................................... 29
      
    1.2.6  SERV ............................................................................................................................... 29
      
    1.2.7  Calibrating Parameters in the Slave ....................................................................... 29
    1.3  Exchanging DTOs – Synchronous Data Exchange ......................................................... 32
      
    1.3.1  Measurement Methods: Polling versus DAQ ......................................................... 33
      
    1.3.2  DAQ Measurement Method ...................................................................................... 34
      
    1.3.3  STIM Calibration Method ........................................................................................... 42
      
    1.3.4  XCP Packet Addressing for DAQ and STIM ........................................................... 43
      
    1.3.5  Bypassing = DAQ + STIM ........................................................................................... 45
      
    1.3.6  Time Correlation and Synchronization ................................................................... 45
    1.4  XCP Transport Layers ...........................................................................................................49
      
    1.4.1  CAN ................................................................................................................................. 49
      
    1.4.2  CAN FD .......................................................................................................................... 52
      
    1.4.3  FlexRay ........................................................................................................................... 54
      
    1.4.4  Ethernet ......................................................................................................................... 57
      
    1.4.5  SxI .................................................................................................................................... 59
      
    1.4.6  USB ................................................................................................................................ 60
      
    1.4.7  LIN .................................................................................................................................. 60
    1.5  XCP Services ............................................................................................................................ 61
      
    1.5.1  Memory Page Swapping .............................................................................................61
      
    1.5.2  Saving Memory Pages – Data Page Freezing ....................................................... 63
      
    1.5.3  Flash Programming ..................................................................................................... 63
      
    1.5.4  Automatic Detection of the Slave ........................................................................... 65
      
    1.5.5  Block Transfer Mode for Upload, Download and Flashing .................................66
      
    1.5.6  Cold Start Measurement ........................................................................................... 67
      
    1.5.7  Security Mechanisms with XCP ................................................................................68

    2  ECU Description File A2L .............................................................................................................71
    2.1  Setting Up an A2L File for an XCP Slave ......................................................................... 74
    2.2  Manually Creating an A2L File
     ............................................................................................ 75
    2.3  A2L Contents versus ECU Implementation
     ..................................................................... 76
    3  Calibration Concepts ................................................................................................................... 79
    3.1  Parameters in Flash .............................................................................................................. 80
    3.2  Parameters in RAM
     ................................................................................................................82
    3.3  Flash Overlay
     ...........................................................................................................................84
    3.4  Dynamic Flash Overlay Allocation
     .....................................................................................85
    3.5  RAM Pointer Based Calibration Concept per AUTOSAR
     .............................................86
      
    3.5.1  Single Pointer Concept ...............................................................................................86
      
    3.5.2  Double Pointer Concept .............................................................................................88
    3.6  Flash Pointer Based Calibration Concept .......................................................................89
    4  Application Areas of XCP ............................................................................................................ 91
     
    4.1  Model in the Loop (MIL) ....................................................................................................... 93
    4.2  Software in the Loop (SIL)
     .................................................................................................. 94
    4.3  Hardware in the Loop (HIL)
     .................................................................................................95
    4.4  Rapid Control Prototyping (RCP)
     ...................................................................................... 97
    4.5 Bypassing
     ..................................................................................................................................98
    4.6  Shortening Iteration Cycles with Virtual ECUs
     ........................................................... 101
    5  Example of an XCP Implementation ......................................................................................105
     
    5.1  Description of Functions ....................................................................................................108
    5.2  Parameterization of the Driver
     ........................................................................................ 110
    6  Protocol Development Overview ..............................................................................................111
     
    6.1  XCP Version 1.1 (2008) ......................................................................................................... 112
    6.2  XCP Version 1.2 (2013)
     .......................................................................................................... 112
    6.3  XCP Version 1.3 (2015)
    .......................................................................................................... 113
    The Authors..................................................................................................................................... 114
    Table of Abbreviations and Acronyms
     .....................................................................................116
    Literature
     ........................................................................................................................................ 117
    Web Addresses
    ............................................................................................................................... 117
    Table of Figures
     .............................................................................................................................118
    Appendix – XCP Solutions at Vector
     ......................................................................................120
    Index
     ................................................................................................................................................. 122

    Introduction
    7
    Introduction
    In optimal parameterization (calibration) of electronic ECUs, you calibrate parameter values 
    during the system runtime and simultaneously acquire measured signals. The physical con­
    nection between the development tool and the ECU is via a measurement and calibration 
    protocol. XCP has become established as a standard here.
    First, the fundamentals and mechanisms of XCP will be explained briefly and then the appli­
    cation areas and added value for ECU calibration will be discussed.
    First, some facts about XCP:
    >  XCP signifies “Universal Measurement and Calibration Protocol”. The “X” stands for the 
    variable and interchangeable transport layer.
    >  It was standardized by an ASAM working committee (Association for Standardisation of 
    Automation and Measuring Systems). ASAM is an organization of automotive OEMs, sup­
    pliers and tool producers.
    >  XCP is the protocol that succeeds CCP (CAN Calibration Protocol).
    >  The conceptual idea of the CAN Calibration Protocol was to permit read and write access 
    to internal ECU data over CAN. XCP was developed to implement this capability via dif­
    ferent transmission media. Then one speaks of XCP on CAN, XCP on FlexRay or XCP on 
    Ethernet. 
    >  The primary applications of XCP are measurement and calibration of internal ECU para­
    meters. Here, the protocol offers the ability to acquire measured values “event synchro­
    nous” to processes in ECUs. This ensures consistency of the data between one another.
    To visualize the underlying idea, we initially view the ECU and the software running in it as a 
    black box. In a black box, only the inputs into the ECU (e.g. CAN messages and sensor  values) 
    and the output from the ECU (e.g. CAN messages and actuator drives) are acquired. Details 
    about the internal processing of algorithms are not immediately apparent and can only be 
    determined from an analysis of the input and output data. 
    Now imagine that you had a look into the behavior of your ECU with every computation 
    cycle. At any time, you could acquire detailed information on how the algorithm is running. 
    You would no longer have a black box, but a white box instead with a full view of internal 
    processes. That is precisely what you get with XCP! 
    What contribution can XCP make for the overall development process? To check the func­
    tionality of the attained development status, the developer can execute the code repeatedly. 
    In this way, the developer finds out how the algorithm behaves and what might be opti­
    mized. It does not matter here whether a compiled code runs on a specific hardware or 
    whether it is developed in a model­based way and the application runs in the form of a 
    model.
    A central focus is on the evaluation of the algorithm process. For example, if the algorithm 
    is running as a model in a development environment, such as Simulink from The MathWorks, 
    it is helpful to developers if they can also acquire intermediate results to their applications, 
    in order to obtain findings about other changes. In the final analysis, this method enables 
    nothing other than read access to parameters so that they can be visualized and analyzed – 

    8
    Introduction
    and all of this at model runtime or retrospectively after a time­limited test run has been 
    completed. A write access is needed if parameterizations are changed, e.g. if the propor­
    tional component of a PID controller is modified to adapt the algorithm behavior to the 
     system under control. Regardless of where your application runs – focal points are always 
    the detailed analysis of algorithm processes and optimization by changes to the 
    parameterization.
    This generalization can be made: The algorithms may exist in any type of executable form 
    (code or model description). Different systems may be used as the runtime environment 
    (Simulink, as DLL on the PC, on a rapid prototyping platform, in the ECU etc.). Process flows 
    are analyzed by read access to data and acquisition of its time­based flow. Parameter sets 
    are modified iteratively to optimize algorithms. To simplify the representation, the acquisi­
    tion of data can be externalized to an external PC­based tool, although it is understood here 
    that runtime environments themselves can even offer analysis capabilities.
    Runtime Environment
    Application
    Communication
    PC Tool
    Figure 1: 
    Operating System
    Fundamental 
    communication with 

    a runtime environment
    The type of runtime environment and the form of communication generally differ from one 
    another considerably. The reason is that the runtime environments are developed by differ­
    ent producers and are based on different solution approaches. Different types of protocols, 
    configurations, measurement data formats, etc. make it a futile effort to try to exchange 
    parameter sets and results in all development steps. In the end, however, all of these solu­
    tions can be reduced to read and write access at runtime. And there is a standard for this: 
    XCP.
    XCP is an ASAM standard whose Version 1.0 was released in 2003. The acronym ASAM 
    stands for “Association for Standardisation of Automation and Measuring Systems.” Sup­
    pliers, vehicle OEMs and tool manufacturers are all represented in the ASAM working group. 
    The purpose of the XCP working group is to define a generalized measurement and calibra­
    tion protocol that can be used independent of the specific transport medium. Experience 
    gained from working with CCP (CAN Calibration Protocol) flowed into the development as 
    well.
    XCP was defined based on the ASAM interfaces model. The following figure shows a mea­
    surement and calibration tool’s interfaces to the XCP Slave, to the description file and the 
    connection to a higher­level automation system. 

    Introduction
    9
    Upper Level
    Automation System
    ASAM MCD-3 MC
    Measurement and
    ASAM
    Calibration System
    MCD-2 MC
    *.A2L
    XCP Driver
    ECU Description File
    ASAM MCD-1 MC
    XCP Driver
    ECU 
    Figure 2: 
    The Interface Model 
    of ASAM

    Interface 1: “ASAM MCD-1 MC” between ECU and measurement & calibration system
    This interface describes the physical and the protocol­specific parts. Strictly speaking, a dis­
    tinction was made between interfaces ASAP1a and ASAP1b here. The ASAP1b interface, 
    however, never received general acceptance and for all practical purposes it has no relevance 
    today. The XCP protocol is so flexible that it can practically assume the role of a general 
    manufacturer­independent interface. For example, today all measurement and calibration 
    hardware manufacturers offer systems (xETK, VX1000, etc.) which can be connected via 
    the XCP on Ethernet standard. An ASAP1b interface – as it was still described for CCP – is 
    no longer necessary. 
    Interface 2: “ASAM MCD-2 MC” A2L ECU description file 
    As already mentioned, XCP works in an address­oriented way. Read or write accesses to 
    objects are always based on an address entry. Ultimately, however, this would mean that 
    the user would have to search for his ECU objects in the Master based on the address. That 
    would be extremely inconvenient. To let users work with symbolic object names, for example, 
    a file is needed that describes the relationship between the object name and the object 
    address. The next chapter is devoted to this A2L description file.
    Interface 3: “ASAM MCD-3 MC” automation interface 
    This interface is used to connect another system to the measurement and calibration tool, 
    e.g. for test bench automation. The interface is not further explained in this document, 
    because it is irrelevant to understanding XCP. 

    10
    Introduction
    XCP is based on the Master­Slave principle. The ECU is the Slave and the measurement and 
    calibration tool is the Master. A Slave may only communicate with one Master at any given 
    time; on the other hand, the Master can simultaneous communicate with many Slaves.
    Master
    Bus
    Figure 3: 
    An XCP Master can 
     simultaneously 

    Slave
    Slave
    Slave
    Slave
     communicate  with   
    multiple Slaves
    To be able to access data and configurations over the entire development process, XCP 
    must be used in every runtime environment. Fewer tools would need to be purchased, oper­
    ated and maintained. This would also eliminate the need for manual copying of configura­
    tions from one tool to another, a process that is susceptible to errors. This would simplify 
    iterative loops, in which results from later work steps are transferred back to prior work 
    steps. 
    But let us turn our attention away from what might be feasible to what is possible today: 
    everything! XCP solutions are already used in a wide variety of work environments. It is the 
    intention of this book to describe the main properties of the measurement and calibration 
    protocol and introduce its use in the various runtime environments. What you will not find in 
    this book: neither the entire XCP specification in detailed form, nor precise instructions for 
    integrating XCP drivers in a specific runtime environment. It explains the relationships, but 
    not the individual protocol and implementation details. Internet links in the appendix refer 
    to openly available XCP driver source code and sample implementations, which let you 
    understand and see how the implementation is made. 
    Screenshots of the PC tool used in this book were prepared using the CANape measurement 
    and calibration tool from Vector. Other process flows are also explained based on CANape, in ­
    cluding how to create an A2L file and even more. With a cost­free demo version, which is avail­
    able to you in the Download Center of the Vector website at www.vector.com/canape_demo, 
    you can see for yourself

    1 Fundamentals of the XCP Protocol
    13
    1 Fundamentals of the XCP Protocol

    14
    1 Fundamentals of the XCP Protocol
    Interface 1 of the ASAM interfaces model describes sending and receiving commands and 
    data between the Slave and the Master. To achieve independence from a specific physical 
    transport layer, XCP was subdivided into a protocol layer and a transport layer. 
    CAN
    Ethernet FlexRay
    SxI
    USB
    ...
    Figure 4: Subdivision of the XCP protocol into protocol layer and  transport layer
    Depending on the transport layer, one refers to XCP on CAN, XCP on Ethernet, etc. The 
    extendibility to new transport layers was proven as early as 2005 when XCP on FlexRay 
    made its debut. The current version of the XCP protocol is Version 1.3, which was approved 
    in 2015.
    Adherence to the following principles was given high priority in designing the protocol:
    >  Minimal resource usage in the ECU
    >   Efficient  communication
    >  Simple Slave implementation 
    >  Plug­and­play configuration with just a small number of parameters
    >   Scalability

    1 Fundamentals of the XCP Protocol
    15
    A key functionality of XCP is that it enables read and write access to the memory of the 
    Slave. 
    Read access lets users measure the time response of an internal ECU parameter. ECUs are 
    systems with discrete time behavior, whose parameters only change at specific time inter­
    vals: only when the processor recalculates the value and updates it in RAM. One of the great 
    strengths of XCP lies in acquiring measured values from RAM which change synchronously 
    to process flows or events in the ECU. This lets users evaluate direct relationships between 
    time­based process flows in the ECU and the changing values. These are referred to as 
    event­synchronous measurements. The related mechanisms will be explained later in detail.
    Write access lets the user optimize parameters of algorithms in the Slave. The accesses are 
    address­oriented, i.e. the communication between Master and Slave references addresses in 
    memory. So, the measurement of a parameter is essentially implemented as a request of 
    the Master to the Slave: “Give me the value of memory location 0x1234”. Calibration of a 
    parameter – the write access – to the Slave means: “Set the value at address 0x9876 to 5”.
    An XCP Slave does not absolutely need to be used in ECUs. It may be implemented in differ­
    ent environments: from a model­based development environment to hardware­in­the­loop 
    and software­in­the­loop environments to hardware interfaces that are used to access ECU 
    memory via debug interfaces such as JTAG, NEXUS and DAP.
    Simulink
    Slave
    Prototype or
    ECU Hardware
    Slave
    Measurement/
    XCP
    Calibration 
    Master
    Slave
    PC
    Hardware*
    EXE/DLL
    Slave
    HIL/SIL Systems
    Figure 5: 
    XCP Slaves can be 

    Slave
    used in many 
    different runtime 

    * Debug Interfaces, Memory Emulator ...
    environments

    16
    1 Fundamentals of the XCP Protocol
    How can algorithms be optimized using read and write access to the ECU and what bene­
    fits does this offer? To be able to modify individual parameters at runtime in the ECU, there 
    must be access to them. Not every type of memory permits this process. It is only possible 
    to perform a read and write access to memory addresses in RAM (intentionally excluding 
    the EEPROM here). The following is a brief summary of the differences between individual 
    memory technologies: knowledge of them is very important to understanding over the fur­
    ther course of this book.
    Memory Fundamentals
    Today, flash memories are usually integrated in the microcontroller chips for ECUs and are 
    used for long­term storage of code and data, even without power supply. The special aspect 
    of a flash memory is that read and write access to individual bytes is indeed possible at any 
    time, but writing of new contents can only be done blockwise, usually in rather large blocks. 
    Flash memories have a limited life, which is specified in terms of a maximum number of era­
    sure cycles (depending on the specific technology the maximum may be up to one million 
    cycles). This is also the maximum number of write cycles, because the memory must always 
    be erased as a block before it can be written again. The reason for this lies in the memory 
    structure: electrons are “pumped” via tunnel diodes. A bit is stored at a memory location as 
    follows: electrons must be transported into the memory location over an electrically insulating 
    layer. Once the electrons are then behind the insulating layer, they form an electric field with 
    their charge, which is interpreted as a 1 when reading the memory location. If there are no 
    electrons behind the layer, the cell information is interpreted as a 0. A 1 can indeed be set in 
    this way, but not a 0. Setting to 0 (= erasing the 1) is performed in a separate erasing routine, 
    in which electrons existing behind the insulating layer are discharged. However, for architec­
    tural reasons, such an erasing routine does not just act on single bytes, rather only on the 
    group or block level. Depending on the architecture, blocks of 128 or 256 bytes are usually used. 
    If one wishes to overwrite a byte within such a block, the entire block must first be erased. 
    Then the entire contents of the block can be written back.
    When this erasing routine is repeated multiple times, the insulating layer (“Tunnel Oxide Film”) 
    can be damaged. This means that the electrons could slowly leak away, changing some of the 
    information from 1 to 0 over the course of time. Therefore, the number of allowable flash 
    cycles is severely limited in an ECU. In the production ECU, it is often only on the order of  single 
    digit numbers. This restriction is monitored by the Flash Boot Loader, which uses a counter to 
    keep track of how many flash operations have already been executed. When the specified 
    number is exceeded, the Flash Boot Loader rejects another flash request.
    A RAM (Random Access Memory) requires a permanent power supply; otherwise it loses its 
    contents. While flash memory serves the purpose of long­term storage of the application, 
    the RAM is used to buffer computed data and other temporary information. Shutting off 
    the power supply causes the RAM contents to be lost. In contrast to flash memory, it is easy 
    to read and write to RAM. 

    1 Fundamentals of the XCP Protocol
    17
    This fact is clear: if parameters need to be changed at runtime, it must be assured that they 
    are located in RAM. It is really very important to understand this circumstance. That is why 
    we will look at the execution of an application in the ECU based on the following example: 
    In the application, the y parameters are computed from the sensor values x. 
    // Pseudo­code representation
    a = 5;
    b = 2;
    y = a * x + b;
    If the application is flashed in the ECU, the controller handles this code as follows after 
    booting: the values of the x parameters correspond to a sensor value. At some time point, 
    the application must therefore poll the sensor value and the value is then stored in a mem­
    ory location assigned to the x parameters. Since this value always needs to be rewritten at 
    runtime, the memory location can only lie in RAM. 
    The parameter y is computed. The values a and b, as factor and offset, are included as infor­
    mation in flash memory. They are stored as constants there. The value of y must also be 
    stored in RAM, because once again that is the only place where write access is pos sible. At 
    precisely which location in RAM the parameters x and y are located, or where a and b lie in 
    flash, is set in the compiler/linker run. This is where objects are allocated to unique addresses. 
    The relationship between object name, data type and address is documented in the linker­
    map file. The linker­map file is generated by the Linker run and can exist in different formats. 
    Common to all formats, however, is that they contain the object name and address at a 
    minimum. 
    In the example, if the offset b and factor a depend on the specific vehicle, the values of a and 
    b must be individually adapted to the specific conditions of the vehicle. This means that the 
    algorithm remains as it is, but the parameter values change from vehicle to vehicle.
    In the normal operating mode of an ECU, the application runs from the flash memory. It 
    does not permit any write accesses to individual objects. This means that parameter values 
    which are located in the flash area cannot be modified at runtime. If a change to parameter 
    values should be possible during runtime, the parameters to be modified must lie in RAM 
    and not in flash. Now, how do the parameters and their initial values make their way into 
    RAM? How does one solve the problem of needing to modify more parameters than can be 
    simultaneously stored in RAM? These issues lead us to the topic of calibration concepts (see 
    chapter 3).

    18
    1 Fundamentals of the XCP Protocol
    Summary of XCP fundamentals
    Read and write accesses to memory contents are available with the mechanisms of the XCP 
    protocol. The accesses are made in an address­oriented way. Read access enables measure­
    ment of parameters from RAM, and write access enables calibration of the parameters in 
    RAM. XCP permits execution of the measurement synchronous to events in the ECU. This 
    ensures that the measured values correlate with one another. With every restart of a 
     measurement, the signals to be measured can be freely selected. For write access, the 
    parameters to be calibrated must be stored in RAM. This requires a calibration concept
    This leads to two important questions:
    >  How does the user of the XCP protocol know the correct addresses of the measurement 
    and calibration parameters in RAM?
    >  What does the calibration concept look like?
    The first question is answered in chapter 2 “ECUs description file A2L”. The topic of the cali­
    bration concept is addressed in chapter 3.
     

    1.1 XCP Protocol Layer
    19
    1.1 XCP Protocol Layer
    XCP data is exchanged between the Master and Slave in a message­based way. The entire 
    “XCP message frame” is embedded in a frame of the transport layer (in the case of XCP on 
    Ethernet with UDP in a UDP packet). The frame consists of three parts: the XCP header, the 
    XCP packet and the XCP tail. 
    In the following figure, part of a message is shown in red. It is used to send the current XCP 
    frame. The XCP header and XCP tail depend on the transport protocol.
    XCP Message (Frame)
    XCP Header
    XCP Packet
    XCP Tail
    PID FILL
    DAQ
    TIMESTAMP
    DATA
    Identification
    Timestamp
    Data 
    Figure 6: 
    Field
    Field
    Field
    XCP packet
    The XCP packet itself is independent of the transport protocol used. It always contains three 
    components: “Identification Field”, “Timestamp Field” and the current data field “Data 
    Field”. Each Identification Field begins with the Packet Identifier (PID), which identifies the 
    packet. 
    The following overview shows which PIDs have been defined:
    PID for frames 
    PID for frames
    from Master to Slave
    from Slave to Master 
    0xFF
    0xFF
    RES
    0xFE
    ERR
    CMD
    ....
    0xFD
    EV
    0xC0
    0xFC
    SERV
    0xBF
    0xFB
    absolute or
    absolute or
    relative
    ....
    relative
    ODT number
    ....
    ODT number
    for STIM 
    for DAQ 
    0x00
    0x00
    Figure 7: Overview of XCP Packet Identifier (PID)

    20
    1 Fundamentals of the XCP Protocol
    Communication via the XCP packet is subdivided into one area for commands (CTO) and 
    one area for sending synchronous data (DTO). 
    XCP Master
    XCP Driver
    CTO
    DTO
    CMD
    RES
    ERR
    EV
    SERV
    DAQ
    STIM
    Command / Response / Error / 
    DAQ
    STIM
    Event / Service Request Processor 
    Processor
    Processor
    Bypass
    XCP Handler
    PGM
    CAL
    DAQ
    STIM
    Resources
    Figure 8: 
    XCP Slave
    XCP communication 
    model with CTO/DTO

    The acronyms used here stand for
    CMD 
    Command Packet  
    sends commands 
    RES 
    Command Response Packet 
    positive response
    ERR 
    Error 
    negative response
    EV 
    Event Packet 
    asynchronous event
    SERV  
    Service Request Packet 
    service request
    DAQ 
    Data AcQuisition 
    send periodic measured values
    STIM 
    Stimulation 
    periodic stimulation of the Slave
    Commands are exchanged via CTOs (Command Transfer Objects). The Master initiates con­
    tact in this way, for example. The Slave must always respond to a CMD with RES or ERR. 
    The other CTO messages are sent asynchronously. The Data Transfer Objects (DTO) are 
    used to exchange synchronous measurement and stimulation data.

    1.1 XCP Protocol Layer
    21
    1.1.1 Identification Field
    XCP Packet
    PID FILL
    DAQ
    TIMESTAMP
    DATA
    Identification Field
    Figure 9: 
    Message identification

    When messages are exchanged, both the Master and Slave must be able to determine which 
    message was sent by the other. This is accomplished in the identification field. That is why 
    each message begins with the Packet Identifier (PID).
    In transmitting CTOs, the PID field is fully sufficient to identify a CMD, RES or other CTO 
    packet. In Figure 7, it can be seen that commands from the Master to the Slave utilize a PID 
    from 0xC0 to 0xFF. The XCP Slave responds or informs the Master with PIDs from 0xFC to 
    0xFF. This results in a unique allocation of the PIDs to the individually sent CTOs.
    When DTOs are transmitted, other elements of the identification field are used (see chap­
    ter 1.3.4 “XCP Packet Addressing for DAQ and STIM”).
    1.1.2 Timestamp
    XCP Packet
    PID FILL
    DAQ
    TIMESTAMP
    DATA
    Figure 10: 
    Timestamp

    DTO packets use timestamps, but this is not possible in transmission of a CTO message. The 
    Slave uses the timestamp to supply time information with measured values. That is, the 
    Master not only has the measured value, but also the time point at which the measured 
    value was acquired. The amount of time it takes for the measured value to arrive at the 
    Master is no longer important, because the relationship between the measured value and 
    the time point comes directly from the Slave. 
    Transmission of a timestamp from the Slave is optional. This topic is discussed further in  
    ASAM XCP Part 2 Protocol Layer Specification. 

    22
    1 Fundamentals of the XCP Protocol
    1.1.3 Data Field 
    XCP Packet
    PID FILL
    DAQ
    TIMESTAMP
    DATA
    Figure 11: 
    Data Field
    Data field in the 
    XCP packet

    Finally, the XCP packet also contains the data stored in the data field. In the case of CTO 
    packets, the data field consists of specific parameters for the different commands. DTO 
    packets contain the measured values from the Slave and when STIM data is sent the values 
    from the Master.
    1.2 Exchange of CTOs 
    CTOs are used to transmit both commands from the Master to the Slave and responses 
    from the Slave to the Master.
    1.2.1 XCP Command Structure
    The Slave receives a command from the Master and must react to it with a positive or neg­
    ative response. The communication structure is always the same here:
    Command (CMD):
    Position 
    Type Description

    BYTE 
    Command Packet Code CMD
    1..MAX_CTO­1 
    BYTE 
    Command specific Parameters
    A unique number is assigned to each command. In addition, other specific parameters may 
    be sent with the command. The maximum number of parameters is defined as MAX_CTO­1 
    here. MAX_CTO indicates the maximum length of the CTO packets in bytes. 
    Positive response:
    Position 
    Type Description

    BYTE 
    Command Positive Response Packet Code = RES 0xFF
    1..MAX_CTO­1 
    BYTE 
    Command specific Parameters 

    1.2 Exchange of CTOs 
    23
    Negative response:
    Position 
    Type Description

    BYTE 
    Error Packet Code = 0xFE

    BYTE 
    Error code
    2..MAX_CTO­1  BYTE 
    Command specific Parameters
    Specific parameters can be transmitted as supplemental information with negative 
    responses as well and not just with positive responses. One example is when the connection 
    is made between Master and Slave. At the start of a communication between Master and 
    Slave, the Master sends a connect request to the Slave, which in turn must respond posi­
    tively to produce a continuous point­to­point connection.
    Master à Slave:  Connect 
    Slave à Master:  Positive Response 
    Connect command:
    Position 
    Type Description

    BYTE 
    Command Code = 0xFF

    BYTE Mode 
     
     
    00 = Normal
     
     
    01 = user defined
    Mode 00 means that the Master wishes XCP communication with the Slave. If the Master 
    uses 0xFF 0x01 when making the connection, the Master is requesting XCP communication 
    with the Slave. Simultaneously, it informs the Slave that it should switch to a specific – user­
    defined – mode. 
    Positive response of the Slave:
    Position 
    Type Description

    BYTE 
    Packet ID: 0xFF

    BYTE RESOURCE

    BYTE COMM_MODE_BASIC

    BYTE 
    MAX_CTO, Maximum CTO size [BYTE]

    WORD 
    MAX_DTO, Maximum DTO size [BYTE]
    6 BYTE 
    XCP Protocol Layer Version Number (most significant byte only)
    7 BYTE 
    XCP Transport Layer Version Number (most significant byte only)
    The positive response of the Slave can assume a somewhat more extensive form. The Slave 
    already sends communication­specific information to the Master when making the connec­
    tion. RESOURCE, for example, is information that the Slave gives on whether it supports 
    such features as page switching or whether flashing over XCP is possible. With MAX_DTO, 
    the Slave informs the Master of the maximum packet length it supports for transfer of the 
    measured values, etc. You will find details on the parameters in ASAM XCP Part 2 Protocol 
    Layer Specification.

    24
    1 Fundamentals of the XCP Protocol
    XCP permits three different modes for exchanging commands and reactions between 
     Master and Slave: Standard, Block and Interleaved mode.
    Standard Mode
    Block Mode
    Interleaved Mode
    Master
    Slave
    Master
    Slave
    Master
    Slave
    Request k
    Request k
    Request k
    Part1
    Part2
    MIN_ST
    Request k+1
    Part3
    MAX_BS
    Response k
    Response k
    Request k+1
    Response k
    Request k+1
    Response k+1
    Response k+1
    Part1
    Response k+1
    Part2
    Part3
    Time
    Time
    Time
    Figure 12: The three modes of the XCP protocol: Standard, Block and  Interleaved mode
    In the standard communication model, each request to a Slave is followed by a single 
    response. Except with XCP on CAN, it is not permitted for multiple Slaves to react to a com­
    mand from the Master. Therefore, each XCP message can always be traced back to a unique 
    Slave. This mode is the standard case in communication.
    The block transfer mode is optional and saves time in large data transfers (e.g. upload or 
    download operations). Nonetheless, performance issues must be considered in this mode in 
    the direction of the Slave. Therefore, minimum times between two commands (MIN_ST) 
    must be maintained and the total number of commands must be limited to an upper limit 
    MAX_BS. Optionally, the Master can read out these communication settings from the Slave 
    with GET_COMM_MODE_INFO. The aforementioned limitations do not need to be observed 
    in block transfer mode in the direction of the Master, because performance of the PC nearly 
    always suffices to accept the data from a microcontroller.
    The interleaved mode is also provided for performance reasons. But this method is also 
    optional and – in contrast to block transfer mode – it has no relevance in practice.
     

    1.2 Exchange of CTOs 
    25
    1.2.2 CMD 
    XCP CTO Packet
    PID
    DATA
    Data Field
    Identification Field
    Timestamp Field
    empty for CTO
    Figure 13: Overview of the CTO packet structure
    The Master sends a general request to the Slave over CMD. The PID (Packet Identifier) field 
    contains the identification number of the command. The additional specific parameters are 
    transported in the data field. Then the Master waits for a reaction of the Slave in the form 
    of a RESponse or an ERRor.
    XCP is also very scalable in its implementation, so it is not necessary to implement every 
    command. In the A2L file, the available CMDs are listed in what is known as the XCP  
    IF_DATA. If there is a discrepancy between the definition in the A2L file and the implemen­
    tation in the Slave, the Master can determine, based on the Slave’s reaction, that the Slave 
    does not even support the command. If the Master sends a command that is not imple­
    mented in the Slave, the Slave must acknowledge with ERR_CMD_UNKNOWN and no fur­
    ther activities are initiated in the Slave. This lets the Master know quickly that an optional 
    command has not been implemented in the Slave. 
    Some other parameters are included in the commands as well. Please take the precise 
    details from the protocol layer specification in document ASAM XCP Part 2. 
     
    The commands are organized in groups: Standard, Calibration, Page, Programming and 
    DAQ measurement commands. If a group is not needed at all, its commands do not need to 
    be implemented. If the group is necessary, certain commands must always be available in 
    the Slave, while others from the group are optional.
    The following overview serves as an example. The SET_CAL_PAGE and GET_CAL_PAGE 
    commands in the page switching group are identified as not optional. This means that in an 
    XCP Slave that supports page switching at least these two commands must be imple­
    mented. If page switching support is unnecessary in the Slave, these commands do not need 
    to be implemented. The same applies to other commands.

    26
    1 Fundamentals of the XCP Protocol
    Standard commands:
    Command 
    PID Optional
    CONNECT 
    0xFF No
    DISCONNECT 
    0xFE No
    GET_STATUS 
    0xFD No
    SYNCH 
    0xFC No
    GET_COMM_MODE_INFO  0xFB Yes
    GET_ID 
    0xFA Yes
    SET_REQUEST 
    0xF9 Yes
    GET_SEED 
    0xF8 Yes
    UNLOCK 
    0xF7 Yes
    SET_MTA 
    0xF6 Yes
    UPLOAD 
    0xF5 Yes
    SHORT_UPLOAD 
    0xF4 Yes
    BUILD_CHECKSUM 
    0xF3 Yes
    TRANSPORT_LAYER_CMD  0xF2 Yes
    USER_CMD 
    0xF1 Yes
    Calibration commands:
    Command 
    PID Optional
    DOWNLOAD 
    0xF0 No
    DOWNLOAD_NEXT 
    0xEF Yes
    DOWNLOAD_MAX 
    0xEE Yes
    SHORT_DOWNLOAD 
    0xED Yes
    MODIFY_BITS 
    0xEC Yes
    Standard commands:
    Command 
    PID Optional
    SET_CAL_PAGE 
    0xEB No
    GET_CAL_PAGE 
    0xEA No
    GET_PAG_PROCESSOR_INFO 0xE9  Yes
    GET_SEGMENT_INFO 
    0xE8 Yes
    GET_PAGE_INFO 
    0xE7 Yes
    SET_SEGMENT_MODE 
    0xE6 Yes
    GET_SEGMENT_MODE 
    0xE5 Yes
    COPY_CAL_PAGE 
    0xE4 Yes

    1.2 Exchange of CTOs 
    27
    Periodic data exchange – basics:
    Command 
    PID Optional
    SET_DAQ_PTR 
    0xE2 No
    WRITE_DAQ 
    0xE1 No
    SET_DAQ_LIST_MODE 
    0xE0 No
    START_STOP_DAQ_LIST 
    0xDE No
    START_STOP_SYNCH 
    0xDD No
    WRITE_DAQ_MULTIPLE 
    0xC7 Yes
    READ_DAQ 
    0xDB Yes
    GET_DAQ_CLOCK 
    0xDC Yes
    GET_DAQ_PROCESSOR_INFO 0xDA  Yes
    GET_DAQ_RESOLUTION_INFO 0xD9 
    Yes
    GET_DAQ_LIST_INFO 
    0xD8 Yes
    GET_DAQ_EVENT_INFO 
    0xD7 Yes
    Periodic data exchange – static configuration: 
    Command 
    PID Optional
    CLEAR_DAQ_LIST 
    0xE3 No
    GET_DAQ_LIST_INFO 
    0xD8 Yes
    Periodic data exchange – dynamic configuration: 
    Command 
    PID Optional
    FREE_DAQ 
    0xD6 Yes
    ALLOC_DAQ 
    0xD5 Yes
    ALLOC_ODT 
    0xD4 Yes
    ALLOC_ODT_ENTRY 
    0xD3 Yes

    28
    1 Fundamentals of the XCP Protocol
    Flash programming:
    Command 
    PID Optional
    PROGRAM_START 
    0xD2 No
    PROGRAM_CLEAR 
    0xD1 No
    PROGRAM 
    0xD0 No
    PROGRAM_RESET 
    0xCF No
    GET_PGM_PROCESSOR_INFO 0xCE 
    Yes
    GET_SECTOR_INFO 
    0xCD Yes
    PROGRAM_PREPARE 
    0xCC Yes
    PROGRAM_FORMAT 
    0xCB Yes
    PROGRAM_NEXT 
    0xCA Yes
    PROGRAM_MAX 
    0xC9 Yes
    PROGRAM_VERIFY 
    0xC8 Yes
    1.2.3 RES 
    If the Slave is able to successfully comply with a Master’s request, it gives a positive acknowl­
    edge with RES. 
    Position 
    Type Description

    BYTE 
    Packet Identifier = RES 0xFF
    1..MAX_CTO­1 
    BYTE 
    Command response data
    You will find more detailed information on the parameters in ASAM XCP Part 2 Protocol 
    Layer Specification.
    1.2.4 ERR 
    If the request from the Master is unusable, it responds with the error message ERR and an 
    error code. 
    Position 
    Type Description

    BYTE 
    Packet Identifier = ERR 0xFE

    BYTE 
    Error code
    2..MAX_CTO­1  BYTE 
    Optional error information data
    You will find a list of possible error codes in ASAM XCP Part 2 Protocol Layer Specification.

    1.2 Exchange of CTOs 
    29
    1.2.5 EV 
    If the Slave wishes to inform the Master of an asynchronous event, an EV can be sent to do 
    this. Its implementation is optional.
    Position 
    Type Description

    BYTE 
    Packet Identifier = EV 0xFD

    BYTE 
    Event code
    2..MAX_CTO­1  BYTE 
    Optional event information data
    You will find more detailed information on the parameters in ASAM XCP Part 2 Protocol 
    Layer Specification.
    Events will be discussed much more in relation to measurements and stimulation. This has 
    nothing to do with the action of the XCP Slave that initiates sending of an EVENT. Rather it 
    involves the Slave reporting a disturbance such as the failure of a specific functionality.
    1.2.6 SERV 
    The Slave can use this mechanism to request that the Master execute a service. 
    Position 
    Type Description

    BYTE 
    Packet Identifier = SERV 0xFC

    BYTE 
    Service request code
    2..MAX_CTO­1  BYTE 
    Optional service request data
    You will find the Service Request Code table in ASAM XCP Part 2 Protocol Layer 
    Specification. 
    1.2.7 Calibrating Parameters in the Slave
    To change a parameter in an XCP Slave, the XCP Master must send the parameter’s loca­
    tion as well as the value itself to the Slave.
    XCP always defines addresses with five bytes: four for the actual address and one byte for 
    the address extension. Based on a CAN transmission, only seven useful bytes are available 
    for XCP messages. For example, if the calibrator sets a 4­byte value and wants to send both 
    pieces of information in one CAN message, there is insufficient space to do this. Since a 
    total of nine bytes are needed to transmit the address and the new value, the change can­
    not be transmitted in one CAN message (seven useful bytes). The calibration request is 
    therefore made with two messages from Master to Slave. The Slave must acknowledge 
    both messages and in sum four messages are exchanged.


    30
    1 Fundamentals of the XCP Protocol
    The following figure shows the communication between Master and Slave, which is neces­
    sary to set a parameter value. The actual message is located in the line with the envelope 
    symbol. The interpretation of the message is shown by “expanding” it with the mouse. 
     
    Figure 14: Trace example from a calibration process in CANape
    In the first message of the Master (highlighted in blue in Figure 14), the Master sends the  
    command SET_MTA to the Slave with the address to which a new value should be written. 
    In the second message, the Slave gives a positive acknowledge to the command with 
    Ok:SET_MTA.
    The third message DOWNLOAD transmits the hex value as well as the valid number of 
    bytes. In this example, the valid number of bytes is four, because it is a float value. The Slave 
    gives another positive acknowledge in the fourth message.
    This completes the current calibration process. In the Trace display, you can recognize a ter­
    minating SHORT_UPLOAD – a special aspect of CANape, the measurement and calibration 
    tool from Vector. To make sure that the calibration was performed successfully, the value is 
    read out again after the process and the display is updated with the read­out value. This lets 
    the user directly recognize whether the calibration command was implemented. This com­
    mand also gets a positive acknowledge with Ok:SHORT_UPLOAD. 
    When the parameter changes in the ECU’s RAM, the application processes the new value. A 
    reboot of the ECU, however, would lead to erasure of the value and overwriting of the value 
    in RAM with the original value from the flash (see chapter 3 “Calibration Concepts”). So, 
    how can the modified parameter set be permanently saved?


    1.2 Exchange of CTOs 
    31
    Essentially, there are two possibilities: 
    A) Save the parameters in the ECU
    The changed data in RAM could for example be saved in the ECU’s EEPROM: either auto­
    matically when ramping down the ECU, or manually by the user. A prerequisite is that the 
    data can be stored in a nonvolatile memory of the Slave. In an ECU, this would be the 
    EEPROM or flash. ECUs with thousands of parameters, however, are seldom able to provide 
    so much unused EEPROM memory space, so this method is rare.
    Another possibility is to write the RAM parameters back into the ECU’s flash memory. This 
    method is relatively complex. A flash memory must first be erased before it can be rewrit­
    ten. This, in turn, can only be done as a block. Consequently, it is not simply a matter of writ­
    ing back individual bytes. You will find more on this topic in chapter 3 “Calibration 
    Concepts”. 
    B) Save the parameters in the form of a file on the PC
    It is much more common to store the parameters on the PC. All parameters – or subsets of 
    them – are stored in the form of a file. Different formats are available for this; the simplest 
    case is that of an ASCII text file, which only contains the name of the object and its value. 
    Other formats also permit saving other information, such as findings about the maturity 
    level of the parameter of the history of revisions. 
    Scenario: After finishing his or her work, the calibrator wishes to enjoy a free evening. So, the 
    calibrator saves the executed changes in the ECU’s RAM in the form of a parameter set file 
    on a PC. The next day, the calibrator wants to continue working where he or she left off. The 
    calibrator starts the ECU. Upon booting, the parameters are initialized in RAM. However, 
    the ECU does this using values stored in flash. This means that the changes of the previous 
    day are no longer available in the ECU. To now continue where work was left off on the pre­
    vious day, the calibrator transfers the contents of the parameter set file to the ECU’s RAM 
    by XCP using the DOWNLOAD command.
    Figure 15: Transfer of a parameter set file to an ECU’s RAM


    32
    1 Fundamentals of the XCP Protocol
    Saving parameter set file in hex files and flashing
    Flashing an ECU is another way to change the parameters in flash. They are then written to 
    RAM as new parameters when the ECU is booted. A parameter set file can also be trans­
    ferred to a C or H file and be made into the new flash file with another compiler/linker run. 
    However, depending on the parameters of the code, the process of generating a flashable 
    hex file could take a considerable amount of time. In addition, the calibrator might not have 
    any ECU source code – depending on the work process. That would prevent this method 
    from being available to the calibrator. 
    As an alternative, the calibrator can copy the parameter set file into the existing flash file.
    Figure 16: Hex window
    In the flash file, there is a hex file that contains both the addresses and the values. Now a 
    parameter file can be copied to a hex file. To do this, CANape takes the address and the 
    value from the parameter set file and updates the parameter value at the relevant location 
    in the hex file. This results in a new hex file, which contains the changed parameter values. 
    However, this Hex file must now possibly run through further process steps to obtain a flash­
    able file. One recurring problem here is the checksums, which the ECU checks to determine 
    whether it received the data correctly. If the flashable file exists, it can be flashed in the ECU 
    and after the reboot the new parameter values are available in the ECU. 
    1.3 Exchanging DTOs – Synchronous Data Exchange 
    As depicted in Figure 8, DTOs (Data Transfer Objects) are available for exchanging synchro­
    nous measurement and calibration data. Data from the Slave are sent to the Master by 
    DAQ – synchronous to internal events. This communication is subdivided into two phases: 
    In an initialization phase, the Master communicates to the Slave which data the Slave 
    should send for different events. After this phase, the Master initiates the measurement in 
    the Slave and the actual measurement phase begins. From this point in time, the Slave 
    sends the desired data to the Master, which only listens until it sends a “measurement stop” 
    to the Slave. Triggering of measurement data acquisition and transmission is controlled by 
    events in the ECU.


    1.3 Exchanging DTOs – Synchronous Data Exchange 
    33
    The Master sends data to the Slave by STIM. This communication also consists of two 
    phases:
    In the initialization phase, the Master communicates to the Slave which data it will send to 
    the Slave. After this phase, the Master sends the data to the Slave and the STIM processor 
    saves the data. As soon as a related STIM event is triggered in the Slave, the data is trans­
    ferred to the application memory. 
    1.3.1 Measurement Methods: Polling versus DAQ 
    Before explaining how event­synchronous, correlated data is measured from a Slave, here is 
    a brief description of another measurement method known as Polling. It is not based on 
    DTOs, but on CTOs instead. Actually, this topic should be explained in a separate chapter, 
    but a description of polling lets us derive, in a very elegant way, the necessity of DTO­based 
    measurement, so a minor side discussion at this point makes sense. 
    The Master can use the SHORT_UPLOAD command to request the value of a measurement 
    para meter from the Slave. This is referred to as polling. This is the simplest case of a 
    measure ment: sending the measured value of a measurement parameter at the time at 
    which the SHORT_UPLOAD command has been received and executed. 
    In the following example, the measurement parameter “Triangle” is measured from the 
    Slave: 
    Figure 17: 
    Address information 
    of the parameter 
     “Triangle” from the  
    A2L file

    The address 0x60483 is expressed as an address with five bytes in the CAN frame: one byte 
    for the address extension and four bytes for the actual address.


    34
    1 Fundamentals of the XCP Protocol
    Figure 18: Polling communication in the CANape Trace window
    The XCP specification sets a requirement for polling: that the value of each measurement 
    parameter must be polled individually. For each value to be measured via polling, two mes­
    sages must go over the bus: the Master’s request to the Slave and the Slave’s response to 
    the Master.
    Besides this additional bus load, there is another disadvantage of the polling method: When 
    polling multiple data values, the user normally wants the data to correlate to one another. 
    However, multiple values that are measured sequentially with polling do not necessarily 
    stand in correlation to one another, i.e. they might not originate from the same ECU com­
    puting cycle. 
    This limits the suitability of polling for measurement, because it produces unnecessarily high 
    data traffic and the measured values are not evaluated in relation to the process flows in 
    the ECU. 
    So, an optimized measurement must solve two tasks:
    >   Bandwidth  optimization during the measurement
    >  Assurance of data correlation
    This task is handled by the already mentioned DAQ method. DAQ stands for Data Acquisi­
    tion and it is implemented by sending DTOs (Data Transfer Objects) from the Slave to the 
    Master.
    1.3.2 DAQ Measurement Method 
    The DAQ method solves the two problems of polling as follows:
    >  The correlation of measured values is achieved by coupling the acquisition of measured 
    values to the events in the ECU. The measured values are not acquired and transferred 
    until it has been assured that all computations have been completed.
    >  To reduce bus load, the measurement process is subdivided into two phases: In a configu­
    ration phase, the Master communicates which values it is interested in to the Slave and 
    the second phase just involves transferring the measured values of the Slave to the 
    Master. 


    1.3 Exchanging DTOs – Synchronous Data Exchange 
    35
    How can the acquisition of measured values now be coupled to processes in the ECU?  Figure 
    19 shows the relationship between calculation cycles in the ECU and the changes in para­
    meters X and Y.
    Calculation
    Calculation
    Calculation
    cycle n
    cycle n+1
    cycle n+2
    time
    10
      8
      6
      4  2  0
    10
      8
      6
      4  2  0
    E1
    E1
    E1
    Read sensor X
    Calculate Y = X
    Figure 19: 
    Events in the ECU

    Let’s have a look at the sequence in the ECU: When event E1 (= end of computation cycle) is 
    reached, then all parameters have been acquired and calculations have been made. This 
    means that all values must match one another and correlate at this time point. This means 
    that we use an event­synchronous measurement method. This is precisely what is imple­
    mented with the help of the DAQ mechanism: When the algorithm in the Slave reaches the 
    “Computational cycle completed” event, the XCP Slave collects the values of the measure­
    ment parameters, saves them in a buffer and sends them to the Master. This assumes that 
    the Slave knows which parameters should be measured for which event. 
    An event does not absolutely have to be a cyclic, time­equidistant event, rather in the case 
    of an engine controller, for example, it might be angle­synchronous. This makes the time 
    interval between two events dependent on the engine rpm. A singular event, such as activa­
    tion of a switch by the driver, is also an event that is not by any means equidistant in time. 
    The user selects the signals. Besides the actual measurement object, the user must select 
    the underlying event for the measurement parameters. The events as well as the possible 
    assignments of the measurement objects to the events must be stored in the A2L file.
    Figure 20: 
    Event definition 
    in an A2L




    36
    1 Fundamentals of the XCP Protocol
    In the normal case, it does not make any sense to be able to simultaneously assign a mea­
    sured value to multiple events. Generally, a parameter is only modified within a single cycle 
    (e.g. only at 10­ms intervals) and not in multiple cycles (e.g. at 10­ms and 100­ms 
    intervals). 
    Figure 21: 
    Allocation of 
    “Triangle” to possible 

    events in the A2L
    Figure 21 shows that the “Triangle” parameter can in principle be measured with the 1 ms,  
    10 ms and 100 ms events. The default setting is 10 ms.
    Measurement parameters are allocated to events in the ECU during measurement configu­
    ration by the user.
    Figure 22: 
    Selecting events 
     (measurement  mode) 
    for each measurement 
    parameter

    After configuring the measured signals, the user starts the measurement. The XCP Master 
    lists the desired measurement parameters in what are known as DAQ lists. In these lists, the 
    measured signals are each allocated to selected events. This configuration information is 
    sent to the Slave before the actual start of measurement. Then the Slave knows which 
    addresses it should read out and transmit when an event occurs. This distribution of the 
    measurement into a configuration phase and a measurement phase was already mentioned 
    at the very beginning of this chapter. 
    This solves both problems that occur in polling: bandwidth is used optimally, because the 
    Master no longer needs to poll each value individually during the measurement and the 
     measured values correlate with one another. 


    1.3 Exchanging DTOs – Synchronous Data Exchange 
    37
    Figure 23: Excerpt from the CANape Trace window of a DAQ measurement
    Figure 23 illustrates an example of command­response communication (color highlighting) 
    between Master and Slave (overall it is significantly more extensive and is only shown in part 
    here for reasons of space). This involves transmitting the DAQ configuration to the Slave. 
    Afterwards, the measurement start is triggered and the Slave sends the requested values 
    while the Master just listens. 
    Until now, the selection of a signal was described based on its name and allocation to a 
    measurement event. But how exactly is the configuration transferred to the XCP Slave?
    Let us look at the problem from the perspective of memory structure in the ECU: The user 
    has selected signals and wishes to measure them. So that sending a signal value does not 
    require the use of an entire message, the signals from the Slave are combined into message 
    packets. The Slave does not create this definition of the combination independently, or else 
    the Master would not be able to interpret the data when it received the messages. There­
    fore, the Slave receives an instruction from the Master describing how it should distribute 
    the values to the messages. 
    The sequence in which the Slave should assemble the bytes into messages is defined in what 
    are known as Object Description Tables (ODTs). The address and object length are impor­
    tant to uniquely identify a measurement object. An ODT provides the allocations of RAM 
    contents from the Slave to assemble a message on the bus. According to the communica­
    tion model, this message is transmitted as a DAQ DTO (Data Transfer Object).

    38
    1 Fundamentals of the XCP Protocol
    RAM Cells
    ODT
    0
    address, length
    1
    address, length
    2
    address, length
    3
    address, length
    ...
    PID 0
    1
    2
    3 ...
    Figure 24: 
    ODT: Allocation of RAM 
    addresses to DAQ DTO

    Stated more precisely, an entry in an ODT list references a memory area in RAM by the 
    address and length of the object. 
    After receiving the measurement start command, at some point an event occurs that is 
    associated with a measurement. The XCP Slave begins to acquire the data. It combines the 
    individual objects into packets and sends them on the bus. The Master reads the bus mes­
    sage and can interpret the individual data, because it has defined the allocation of individ­
    ual objects to packets itself and therefore it knows their relationships. 
    However, each packet has a maximum number of useful bytes, which depends on the trans­
    port medium that is used. In the case of CAN, this amounts to seven bytes. If more data 
    needs to be measured, an ODT is no longer sufficient. If two or more ODTs need to be used 
    to transmit the measured values, then the Slave must be able to copy the data into the cor­
    rect ODT and the Master must be able to uniquely identify the received ODTs. If multiple 
    measurement intervals of the ECU are used, the relationship between ODT and measure­
    ment interval must also be uniquely identifiable. 

    1.3 Exchanging DTOs – Synchronous Data Exchange 
    39
    The ODTs are combined into DAQ lists in the XCP protocol. Each DAQ list contains a num­
    ber of ODTs and is assigned to an event.
    ODT #2 0 address, length
    1 address, length
    ODT #1 0 address, length
    2 address, length
    1 address, length
    ODT #0 0 address, length
    3 address, length
    2 address, length
    1 address, length ...
    PID=2 0
    1
    2
    3
    ...
    3 address, length
    2 address, length
    ...
    PID=1 0
    1
    2
    3
    ...
    3 address, length
    ...
    PID=0 0
    1
    2
    3
    ...
    Figure 25: 
    DAQ list with three ODTs

    For example, if the user uses two measurement intervals (= two different events in the 
    ECU), then two DAQ lists are used as well. One DAQ list is needed per event used. Each DAQ 
    list contains the entries related to the ODTs and each ODT contains references to the values 
    in the RAM cells.
    It is also possible for the Slave to transfer time information. A DAQ list represents the val­
    ues belonging to a specific time event. Before these values in the Slave are recorded, the 
    point in time of the event is noted and transferred within the first ODT. The timestamp is 
    implemented using a counter. The time interval at which the counter is incremented is spec­
    ified in the A2L. 
    DAQ lists are subdivided into the types: static, predefined and dynamic. 


    40
    1 Fundamentals of the XCP Protocol
    Static DAQ lists:
    If the DAQ lists and ODT tables are permanently defined in the ECU, as is familiar from CCP, 
    they are referred to as static DAQ lists. There is no definition of which measurement para­
    meters exist in the ODT lists, rather only the framework that can be filled (in contrast to 
    this, see predefined DAQ lists).
    In static DAQ lists, the definitions are set in the ECU code and are described in the A2L. 
     Figure 26 shows an excerpt of an A2L, in which static DAQ lists are defined: 
    Figure 26: 
    Static DAQ lists

    In the above example, there is a DAQ list with the number 0, which is allocated to a 10­ms 
    event and can carry a maximum of two ODTs. The DAQ list with the number 1 has four ODTs 
    and is linked to the 100 ms event.
    The A2L matches the contents of the ECU. In the case of static DAQ lists, the number of 
    DAQ lists and the ODT lists they each contain are defined with the download of the applica­
    tion into the ECU. If the user now attempts to measure more signals with an event than fit 
    in the allocated DAQ list, the Slave in the ECU will not be able to fulfill the requirements and 
    the configuration attempt is terminated with an error. It does not matter that the other 
    DAQ list is still fully available and therefore actually still has transmission capacity.
    Predefined DAQ lists:
    Entirely predefined DAQ lists can also be set up in the ECU. However, this method is practi­
    cally never used in ECUs due to the lack of flexibility for the user. It is different for analog 
    measurement systems which transmit their data by XCP: Flexibility is unnecessary here, 
    since the physical structure of the measurement system remains the same over its life.

    1.3 Exchanging DTOs – Synchronous Data Exchange 
    41
    Dynamic DAQ lists: 
    A special aspect of the XCP protocol are the dynamic DAQ lists. It is not the absolute param­
    eters of the DAQ and ODT lists that are permanently defined in the ECU code here, but just 
    the parameters of the memory area that can be used for the DAQ lists. The advantage is 
    that the measurement tool has more latitude in putting together the DAQ lists and it can 
    manage the structure of the DAQ lists dynamically.
    Various functions especially designed for this dynamic management are available in XCP 
    such as ALLOC_ODT which the Master can use to define the structure of a DAQ list in the 
    Slave.
    MIN_DAQ + DAQ_COUNT
    DAQ1
    DAQ0
    ALLOC_DAQ
    ALLOC_ODT_ENTRY
    ODT_ENTERIES_COUNT
    T
    OC_OD
    ALL
    GRANULARITY_ODT_ENTRY_SIZE_DAQ
    Figure 27: 
    ODT_COUNT
    Dynamic DAQ lists
    In putting together the DAQ lists, the Master must be able to distinguish whether dynamic 
    or static DAQ lists are being used, how the parameters and structures of the DAQ lists look, 
    etc.



    42
    1 Fundamentals of the XCP Protocol
    1.3.3 STIM Calibration Method
    The XCP calibration method was already introduced in the chapter about exchanging CTOs. 
    This type of calibration exists in every XCP driver and forms the basis for calibrating objects 
    in the ECU. However, no synchronization exists between sending a calibration command and 
    an event in the ECU.
    In contrast to this, the use of STIM is not based on exchanging CTOs, rather on the use of 
    DTOs with communication that is synchronized to an event in the Slave. The Master must 
    therefore know to which events in the Slave it can even synchronize at all. This information 
    must also exist in the A2L. 
    Figure 28: Event for DAQ and STIM
    If the Master sends data to the Slave by STIM, the XCP Slave must be informed of the loca­
    tion in the packets at which the calibration parameters can be found. The same mechanisms 
    are used here as are used for the DAQ lists.

    1.3 Exchanging DTOs – Synchronous Data Exchange 
    43
    1.3.4 XCP Packet Addressing for DAQ and STIM 
    Addressing of the XCP packets was already discussed at the beginning of this chapter. Now 
    that the concepts of DAQ, ODT and STIM have been introduced, XCP packet addressing will 
    be presented in greater detail. 
    During transmission of CTOs, the use of a PID is fully sufficient to uniquely identify a packet; 
    however, this is no longer sufficient for transmitting measured values. The following figure 
    offers an overview of the possible addressing that could occur with the DTOs:
    XCP DTO Packet
    Identification Field
    Timestamp Field
    Data Field
    PID
    PID DAQ
    TS
    PID
    DAQ
    TS
    Figure 29: 
    PID FILL
    DAQ
    TIMESTAMP
    DATA
    Structure of the 
    XCP packet for 

    DTO transmissions
    Transmission type: “absolute ODT numbers”
    Absolute means that the ODT numbers are unique throughout the entire communication – 
    i.e. across all DAQ lists. In turn, this means that the use of absolute ODT numbers assumes 
    a transformation step that utilizes a so­called “FIRST_PID for the DAQ list.
    If a DAQ list starts with the PID j, then the PID of the first packet has the value j, the second 
    packet has the PID value j + 1, the third packet has the PID value j + 2, etc. Naturally, the 
    Slave must ensure here that the sum of FIRST_PID + relative ODT number remains below 
    the PID of the next DAQ list.
    DAQ­list: 0 
    ≤ PID ≤ k
    DAQ­list: k + 1  ≤ PID ≤ m
    DAQ­list: m + 1 ≤ PID ≤ n
    etc.

    44
    1 Fundamentals of the XCP Protocol
    In this case, the identification field is very simple:
    Identification Field
    PID
    Figure 30: 
    absolute ODT number
    Identification field with absolute 
    ODT numbers

    Transmission type: “relative ODT numbers and absolute DAQ lists numbers”
    In this case, both the DAQ lists number and the ODT number can be transmitted in the Iden­
    tification Field. However, there is still space left over in the number of bytes that is available 
    for the information:
    Identification Field
    PID DAQ
    absolute DAQ list number
    Figure 31: 
    relative ODT number
    ID field with relative ODT and absolute 
    DAQ numbers (one byte)

    In the figure, one byte is available for the DAQ number and one byte for the ODT number.
    The maximum number of DAQ lists can be transmitted using two bytes: 
    Identification Field
    PID
    DAQ
    absolute DAQ list number
    Figure 32: 
    relative ODT number
    ID field with relative ODT and absolute 
    DAQ numbers (two bytes)


    1.3 Exchanging DTOs – Synchronous Data Exchange 
    45
    If it is not possible to send three bytes, it is also possible to work with four bytes by using a 
    fill byte:
    Identification Field
    PID FILL
    DAQ
    absolute DAQ list number
    for alignement
    Figure 33: 
    ID field with relative ODT and 
    relative ODT number
    absolute DAQ numbers as well as 
    fill byte (total of four bytes)
    How does the XCP Master now learn which method the Slave is using? First, by the entry in 
    the A2L and second by the request to the Slave to determine which communication version 
    it has implemented.
    The response to the GET_DAQ_PROCESSOR_INFO request also sets the DAQ_KEY_BYTE 
    that the Slave uses to inform the Master which transmission type is being used. If not only 
    DAQ is being used, but also STIM, the Master must use the same method for STIM that the 
    Slave uses for DAQ.
    1.3.5 Bypassing = DAQ + STIM 
    Bypassing can be implemented by joint use of DAQ and STIM (see Figure 8) and it repre­
    sents a special form of a rapid prototyping solution. For a deeper understanding, however, 
    further details are necessary, so this method is not explained until chapter 4.5 “Bypassing”.
    1.3.6. Time Correlation and Synchronization
    Various mechanisms are available to the Master for correlating the timestamp of the mea­
    surement data of a Slave to the timestamps of other measurement data. In the simplest 
    form of a Slave implementation, the Slave features a clock and can access its value at any 
    time. The DAQ timestamps sent by the XCP Slave are based on this clock. Here, the Slave 
    transfers the time information in the first ODT of each DAQ event. The Slave retrieves the 
    timestamp at the point in time at which the event was initiated and at which it copies the 
    measurement data from RAM. 
    The correlation of this clock to other clocks is unknown to the Master, as the DAQ messages 
    require an undefined amount of time to reach the Master from the Slave. The clocks can be 
    correlated using the GET_DAQ_CLOCK command. Before the start of measurement, and 
    usually at regular intervals, the Master sends the GET_DAQ_CLOCK command and the 

    46
    1 Fundamentals of the XCP Protocol
    Slave responds with the current value of the Slave clock. Since the Master knows the point 
    in time at which it sent the command, it can calculate a time offset between the Master 
    clock and the Slave clock using the timestamp of the Slave and the point in time the com­
    mand was sent. 
    Naturally, this method is also afflicted with inaccuracies if the run time of the GET_DAQ_CLOCK 
    command is not precisely defined or the point in time at which the clocks are read in the 
    Master and Slave cannot be determined precisely when sending/receiving the command. 
    This is why version 1.3 of the XCP specification provides improved methods enabling correla­
    tion of the Master and Slave clocks with a precision of just a few microseconds.
    1.3.6.1 Multicast
    For better correlation of the clocks of multiple Slaves to one another, the Master reads the 
    clocks of multiple Slaves at the same time. For this purpose, the Master sends a command 
    to all Slaves which are accessible using the same transport medium. Each Slave records the 
    point in time at which it receives the command and transfers the value to the Master. To 
    achieve maximum precision, two requirements must be fulfilled to the greatest degree 
    possible:
    On the one hand, the Slave implementation should ensure (as in the past) that the record­
    ing of the timestamp is initiated as soon as possible upon receipt of the command. On the 
    other hand, the latency times between the Slaves and the Master should be the same to the 
    greatest degree possible.
    The GET_DAQ_CLOCK_MULTICAST command is available for this purpose. The Slave 
    responds with an EV_TIME_SYNC message, in which the timestamp is transferred. 
    XCP Slave
    XCP Master
    XCP Slave Clock
    free running
    GET_DAQ_CLOCK_MULTICAST
    EV_TIME_SYNC
    GET_DAQ_CLOCK_MULTICAST
    EV_TIME_SYNC
    Figure 34: 
    t
    XCP Slave with 
    free-running clock


    1.3 Exchanging DTOs – Synchronous Data Exchange 
    47
    1.3.6.2. Grandmaster Clock
    A further solution involves the time of the Slave already being synchronized/coordinated 
    with another clock, the so­called grandmaster clock.
    First, an explanation of the terms “synchronized” and “coordinated”:
    Stated simply, two clocks are synchronized with one another if they supply the identical 
    timestamp when they are read at the same time.
    In contrast, clocks which are coordinated to one another do not necessarily need to sup­
    ply the same timestamp. In both clocks, 1 second is exactly the same length.
    IEEE 1588 with PTP (Precision Time Protocol) is used. In the first step, the XCP Master must 
    know whether the Slave is linked to an external clock. As there can be more than one grand­
    master clock in an overall system, information on the exact clock to which the Slave is linked 
    must be available to the XCP Master. 
    XCP Slave
    XCP Master
    XCP Slave Clock
    synchronized to a
    Grandmaster Clock
    Grandmaster Clock
    e.g. 
    IEEE 1588
    GET_DAQ_CLOCK_MULTICAST
    EV_TIME_SYNC
    GET_DAQ_CLOCK_MULTICAST
    EV_TIME_SYNC
    t
    Figure 35: The clock of the XCP Slave is synchronized with the grandmaster clock

    48
    1 Fundamentals of the XCP Protocol
    The XCP standard supports additional scenarios which can only briefly be sketched out here 
    briefly. Further details can be found in the XCP specifications. 
    >  Should it be possible to coordinate the XCP Slave clock with the external clock, but  
    not synchronize them, there will be an offset between the grandmaster clock and  
    the Slave clock. The XCP Master can request the details from the Slave using the TIME_
    CORRELATION_PROPERTIES command. 
    >  The free­running clock of the Slave cannot be synchronized with a grandmaster clock, but 
    there is another clock in the Slave, e.g. a clock synchronized with the grandmaster clock in 
    the Ethernet PHY of the Slave. If the Master receives both times at the same point in time, 
    it can correlate the DAQ timestamp of the free­running clock with the grandmaster clock 
    and its own time domain. 
    >  Another scenario arises when there is a free­running clock of the XCP Slave and an ECU 
    clock and the DAQ timestamps originate from the ECU clock. This is the case when an 
    external XCP Slave, such as the VX1000 measurement and calibration hardware is used 
    from Vector, is used. 
    >  If all of the sketched solutions are combined, a total of three different clocks are involved: 
    the free­running Slave clock, a clock which is synchronized with a grandmaster clock and 
    the ECU clock. 
    >   In the last scenario, there is no Slave clock, but there is an ECU clock which is synchronized 
    with a grandmaster clock.
    Synchronization between the DAQ timestamps and the Master domain time can be realized 
    for all scenarios in the Master using the XCP mechanisms.

    1.4 XCP Transport Layers 
    49
    1.4 XCP Transport Layers 
    A main requirement in designing the XCP protocol was that it must support different trans­
    port layers. At the time this document was defined, the following layers had been defined: 
    XCP on CAN, FlexRay, Ethernet, SxI and USB. The bus systems CAN, LIN and FlexRay are 
    explained on the Vector E­Learning platform, as well as an introduction to AUTOSAR. For 
    details see the website www.vector­elearning.com.
    1.4.1 CAN 
    XCP was developed as a successor protocol of the CAN Calibration Protocols (CCP) and 
    must absolutely satisfy the requirements of the CAN bus. The communication over the CAN 
    bus is defined by the associated description file. Usually the DBC format is used, but in some 
    isolated cases the AUTOSAR format ARXML is being used too. 
    A CAN message is identified by a unique CAN identifier. The communication matrix is defined 
    in the description file: Who sends which message and how are the eight useful bytes of the 
    CAN bus being used? The following figure illustrates the process: 
    Data
    CAN 
    CAN
    CAN
    CAN
    Frame
    Node A
    Node B
    Node C
    Node D
    ID=0x12
    Sender
    Receiver
    ID=0x34
    Sender
    Receiver
    Receiver
    ID=0x52
    Receiver
    Sender
    ID=0x67
    Receiver
    Receiver
    Sender
    Receiver
    ID=0xB4
    Receiver
    Sender
    Figure 36: 
    Definition of which 

    ID=0x3A5
    Sender
    Receiver
    Receiver
    Receiver
    bus nodes send which 
    messages

    The message with ID 0x12 is sent by CAN node A and all other nodes on the bus receive this 
    message. In the framework of acceptance testing, CAN nodes C and D conclude that they 
    do not need the message and they reject it. CAN node B, on the other hand, determines that 
    its higher­level layers need the message and they provide them via the Rx buffer. The CAN 
    nodes are interlinked as follows:

    50
    1 Fundamentals of the XCP Protocol
    CAN Node A
    CAN Node B
    Host
    Host
    CAN Interface
    CAN Interface
    Tx
    Rx
    Tx
    Rx
    Buffer
    Buffer 
    Buffer
    Buffer 
    Acceptance
    Acceptance
    Test
    Test
    Send
    Receive
    Send
    Receive
    CAN
    Receive
    Send
    Receive
    Send
    Acceptance
    Acceptance
    Test
    Test
    Rx
    Tx
    Rx
    Tx
    Buffer 
    Buffer
    Buffer 
    Buffer
    CAN Interface
    CAN Interface
    Host
    Host
    Figure 37: 
    CAN Node C
    CAN Node D
    Representation of a 
    CAN network

    The XCP messages are not described in the communication matrix! If measured values are 
    sent from the Slave via dynamic DAQ lists, e.g. with the help of XCP, the messages are 
    assembled according to the signals selected by the user. If the signal selection changes, the 
    message contents change as well. Nonetheless, there is a relationship between the commu­
    nication matrix and XCP: CAN identifiers are needed to transmit the XCP messages over 
    CAN. To minimize the number of CAN identifiers used, the XCP communication is limited to 
    the use of just two CAN identifiers that are not being used in the DBC for “normal” commu­
    nication. One identifier is needed to send information from the Master to the Slave; the 
    other is used by the Slave for the response to the Master.
    The excerpt from the CANape Trace window shows the CAN identifiers that are used under 
    the “ID” column. In this example, just two different identifiers are used: 554 as the ID for the 
    message from Master to Slave (direction Tx) and 555 for sending messages from the Slave 
    to the Master (direction Rx). 


    1.4 XCP Transport Layers 
    51
    Figure 38: Example of XCP-on-CAN communication
    In this example, the entire XCP communication is handled by the two CAN identifiers 554 
    and 555. These two IDs may not be allocated for other purposes in this network. 
    The CAN bus transmits a maximum of eight useful bytes per message. In the case of XCP, 
    however, we need information on the command used or the sent response. This is provided 
    in the first byte of the CAN useful data. This means that seven bytes are available per CAN 
    message for transporting useful data. 
    XCP on CAN Message (Frame)
    XCP Packet
    XCP Tail
    XCP Header
    empty for CAN PID FILL DAQ TIMESTAMP
    DATA
    FILL
    Control Field
    Control Field
     empty for CAN
    for CAN
    Figure 39: Representation of an XCP-on-CAN message
    In CANape, you will find an XCP­on­CAN demo with the virtual ECU XCPsim. You can learn 
    about more details of the standard in ASAM XCP on CAN Part 3 Transport Layer 
    Specification.

    52
    1 Fundamentals of the XCP Protocol
    1.4.2 CAN FD
    CAN FD (CAN with flexible data rate) is an extension of the CAN protocol developed by  
    Robert Bosch GmbH. Its primary difference to CAN involves extending the useful data from 
    8 to  64 bytes. CAN FD also offers the option of sending the useful data at a higher data 
    rate. After the arbitration phase, the data bytes are sent at a higher transmission rate than 
    during the arbitration phase. This covers the need for greater bandwidth in automotive net­
    works while preserving valuable experience gained from CAN development.
    The XCP­on­CAN­FD specification was defined in the XCP­on­CAN description of the XCP 
    standard, Version 1.2 (June 2013). 
    F
    r1
    K
    O
    r0
    S
    IDE
    EDL
    BRS
    ESI
    DLC
    Data
    CRC
    elim.
    AC
    elim.
    EOF
    IFS
    tifier
     D
    Iden
    CK
    CRC D
    A
    1
    11
    1
    1
    1
    1
    1
    1
    4
    0…512
    17/21
    1
    1
    1
    7
    3
    Arbitration phase
    Data phase
    Arbitration phase
    (standard bit rate)
    (optional high bit rate)
    (standard bit rate)
    EDL = Extended Data Length:
    ESI = Error State Indicator:
     
    CAN (dominant (0) = CAN frame
     
    Dominant (0) = CAN FD node is error active
     
    Recessive (1) = CAN FD frame
     
    Recessive (1) = CAN FD node is error passive
    BRS = Bit Rate Switch:
     
    CAN FD data phase starts immediately at sampling point of BRS:
     
    Dominant (0) = No change of bit rate for data phase
     
    Recessive (1) = Change to higher bit rate for data phase
    Figure 40: Illustration of a CAN FD frame
    Despite the largely similar modes of operation, this protocol requires extensions and modifi­
    cations to the hardware and software. Among other things, CAN FD introduces three new 
    bits to the control field:
    >  Extended Data Length (EDL)
    >  Bit Rate Switch (BRS) 
    >  Error State Indicator (ESI)

    1.4 XCP Transport Layers 
    53
    A recessive EDL bit (high level) distinguishes frames in extended CAN­FD format from those 
    in standard CAN format, because they are identified by a dominant EDL bit (low level). Sim­
    ilarly, a recessive BRS bit causes the transmission of the data field to be switched to the 
    higher bit rate. The ESI bit identifies the error state of a CAN FD node. Another four bits 
    make up what is known as the Data Length Code (DLC), which represents the extended 
    useful data length as a possible value of 12, 16, 20, 24, 32, 48 and 64 bytes. 
    The use of XCP on CAN FD assumes that a second transmission rate has been defined for 
    the useful data in the A2L file. This is fully transparent to the user, who gets a complete A2L 
    parameterization. A measurement configuration in the XCP Master considers the maximum 
    packet length, and the user does not need to make any other settings. 
    CAN FD is supported in CANape, Version 12.0 and higher. Every CAN hardware product from 
     Vector which begins with “VN” supports the CAN FD transport protocol.

    54
    1 Fundamentals of the XCP Protocol
    1.4.3 FlexRay
    A basic idea in the development of FlexRay was to implement a redundant system with 
    deterministic time behavior. The connection redundancy was achieved by using two chan­
    nels: channel A and channel B. If multiple FlexRay nodes (= ECUs) are redundantly intercon­
    nected and one branch fails, the nodes can switch over to the other channel to make use of 
    the connection redundancy. 
    Node K
    Node L
    Node M
    Node N
    Node O
    CH A
    CH B
    Figure 41: Nodes K and L are redundantly interconnected
    Deterministic behavior is achieved by transmitting data within defined time slots. Also 
    defined here is which node sends which content in which time slot. These time slots are com­
    bined to form one cycle. The cycles repeat here, as long as the bus is active. The assembly of 
    the time slots and their transport contents (who sends what at which time) is known as 
    scheduling. 
    Node K
    Node L
    Node M
    Slot
    Direction Frame
    Slot
    Direction Frame
    Slot
    Direction Frame
    1
    Tx
    a
    1
    Tx
    a
    1
    Tx
    a
    3
    Rx
    x
    3
    Rx
    b
    3
    Rx
    x
    Frame: a
    Frame: b
    Frame: x
    Frame: a
    Frame: b
    Frame: x
    Slot 1
    Slot 2
    Slot 3
    Slot 1
    Slot 2
    ...
    Real-time
    t1
    t2
    t3
    t4
    t5
    t6
    Communication Cycle
    Next Communication Cycle
    Figure 42: Communication by slot definition

    1.4 XCP Transport Layers 
    55
    In the first communication cycle, node K sends frame a in slot 1. The scheduling is also stored 
    in the software of nodes L and M. Therefore, the contents of frame a are passed to the next 
    higher communication levels. 
    Scheduling is consolidated in a description file. This is not a DBC file, as in the case of CAN, 
    rather it is a FIBEX file. FIBEX stands for “Field Bus Exchange Format” and could also be 
    used for other bus systems. However, its current use is practically restricted to the descrip­
    tion of the FlexRay bus. FIBEX is an XML format and the XCP­on­FlexRay specification 
    relates to FIBEX Version 1.1.5 and FlexRay specification Version 2.1.
    Cycles
    Slot
    ECU
    Channel
    0
    1
    2
    3
    4
    5
    6
    ...
    63
    A
    b [rep: 1] 
    b [rep: 1] 
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
     1
    Node K
    ent
    B
    b [rep: 1] 
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    b [rep: 1]
    egm
    A
    c [rep: 4]
    x [rep: 2]
    y [rep: 4]
    x [rep: 2]
    c [rep: 4]
    x [rep: 2]
    y [rep: 4]
    x [rep: 2]
     2
    Node M
    B
    tatic S
    A
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1] 
    a [rep: 1]
    S
     3
    Node L
    B
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1] 
    d [rep: 1]
    Node L
    A
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1] 
    n [rep: 1]
     4
    Node O
    B
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1] 
    m [rep: 1]
    Node N
    A
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1] 
    r [rep: 1]
    ent
     5
    B
    egm
    A
     6
    ic S
    Node K
    B
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    o [rep: 1]
    Node M
    A
    t [rep: 2]
    p [rep: 4]
    t [rep: 2]
    t [rep: 2]
    p [rep: 4]
    t  [rep: 2]
    ynam
    D

    B
    Node L
    A
     u [rep: 4] 
     u [rep: 4]
     7
    Node L
    B
    v [rep: 8]
    A
    Node O
    B
    w [rep: 4] 
    w [rep: 4]
    Figure 43: Representation of a FlexRay communication matrix
    Another format for describing bus communication has been defined as a result of the devel­
    opment of AUTOSAR solutions: the AUTOSAR Description File, which is available in XML for­
    mat. The definition of XCP­on­FlexRay was taken into account in the AUTOSAR 4.0 specifi­
    cation. However, at the time of publication of this book this specification has not yet been 
    officially approved and therefore it will not be discussed further. 
    Due to other properties of the FlexRay bus, it is not sufficient to just give the slot number as 
    a reference to the contents. One reason is that multiplexing is supported: whenever a cycle 
    is repeated, the transmitted contents are not necessarily the same. Multiplexing might spec­
    ify that a certain piece of information is only sent in the slot in every second pass. 

    56
    1 Fundamentals of the XCP Protocol
    Instead of indicating the pure slot number, “FlexRay Data Link Layer Protocol Data Unit 
    Identifiers” (FLX_LPDU_ID) are used, which can be understood as a type of generalized Slot 
    ID. Four pieces of information are needed to describe such an LPDU:
    >  FlexRay Slot Identifier (FLX_SLOT_ID)
    >  Cycle Counter Offset (OFFSET)
    >  Cycle Counter Repetition (CYCLE_REPETITION)
    >  FlexRay Channel (FLX_CHANNEL)
    LPDU_ID
    ...
    Channel A
    ... ...
    Channel B
    ycle ID
    C . . . . . . . . . .
      .  . . ...
    .
    . . . . .
    . .. .. .. .. .. .. .. .. ..
    .. .. .. .. ..
    .. . . . . . . . . .   .  . . . . . . .
    . .. .. .. .. .. .. .. .. ..
    .
    ...
    . .. .. .. ..
    ... ...
    ... ...
    ...
    Figure 44: 
    Slot ID
    Representation of the 
    FlexRay LPDUs

    Scheduling also has effects on the use of XCP on FlexRay, because it defines what is sent 
    precisely. This cannot be readily defined in XCP; not until the measurement runtime does the 
    user define which measured values are sent by assembling signals. This means that it is only 
    possible to choose which aspect of XCP communication can be used in which LPDU: CTO or 
    DTO from Master to Slave or from Slave to Master.
    The following example illustrates this process: the XCP Master may send a command (CMD) 
    in slot n and Slave A gives the response (RES) in slot n + 2. XCP­on­FlexRay messages are 
    always defined using LPDUs.
    The A2L description file is needed for access to internal ECU parameters; the objects with 
    their addresses in the ECU are defined in this file. In addition, the FIBEX file is necessary, so 
    that the XCP Master knows which LPDUs it may send and to which LPDUs the XCP Slaves 
    send their responses. Communication between XCP Master and XCP Slave(s) can only func­
    tion through combination of the two files, i.e. by having an A2L file reference a FIBEX file.

    1.4 XCP Transport Layers 
    57
    Excerpt of an A2L with XCP­on­FlexRay parameter setting:
     …
    /begin XCP_ON_FLX
     … 
    „XCPsim.xml“
    „Cluster_1“
     … 
    In this example, “XCPsim.xml” is the reference from the A2L file to the FIBEX file. 
    XCP-dedicated LPDU_IDs
    ...
    Channel A
    ... ...
    Channel B
    ycle ID
    C . . . . . . . . . .
      .  . . ...
    .
    . . . . .
    . .. .. .. .. .. .. .. .. ..
    .. .. .. .. ..
    .. . . . . . . . . .   .  . . . . . . .
    . .. .. .. .. .. .. .. .. ..
    .
    ...
    . .. .. .. ..
    ... ...
    ... ...
    Figure 45: 
    ...
    Allocation of XCP 
    Slot ID
    communication 
    to LPDUs
    You can read more details about XCP on FlexRay in CANape’s Online Help. Supplied with 
    CANape is the FIBEX Viewer, which lets users conveniently view the scheduling. It is easy to 
    allocate the XCP messages to the LPDUs by making driver settings for the XCP­on­FlexRay 
    device in CANape.
    The protocol is explained in detail in ASAM XCP on FlexRay Part 3 Transport Layer Specifi­
    cation. You will find an XCP­on­FlexRay demo in CANape with the virtual ECU XCPsim. The 
    demo requires real Vector FlexRay hardware.
    1.4.4 Ethernet
    XCP on Ethernet can be used with either TCP/IP or UDP/IP. TCP is a protected transport 
    protocol on Ethernet, in which the handshake method is used to detect any loss of a packet. 
    In case of packet loss, TCP organizes a repetition of the packet. UDP does not offer this pro­
    tection mechanism. If a packet is lost, UDP does not offer any mechanisms for repeated 
    sending of the lost packet on the protocol level. 
    Not only can XCP on Ethernet be used with real ECUs, it can also be used for measurement 
    and calibration of virtual ECUs. Here, a virtual ECU is understood as the use of code that 
    would other wise run in the ECU as an executable program (e.g. DLL) on the PC. Entirely dif­
    ferent resources are available here compared to an ECU (CPU, memory, etc.). 

    58
    1 Fundamentals of the XCP Protocol
    But first the actual protocol will be discussed. IP packets always contain the addresses of 
    the sender and receiver. The simplest way to visualize an IP packet is as a type of letter that 
    contains the addresses of the recipient and the sender. The addresses of individual nodes 
    must always be unique. A unique address comprises the IP address and port number. 
    XCP on Ethernet (TCP/IP and UDP/IP) Message (Frame)
    XCP Header
    XCP Packet
    XCP Tail
    empty for Ethernet
    (TCP/IP and UDP/IP)
    LEN
    CTR
    PID FILL DAQ
    TIMESTAMP
    DATA
    Control Field
    Length (LEN)
    Control Field
    for Ethernet
    empty for Ethernet
    (TCP/ IP and UDP/IP)  
    (TCP&IP and UDP&IP)
    Figure 46: XCP packet with TCP/IP or UDP/IP
    The header consists of a Control Field with two words in Intel format (= four bytes). These 
    words contain the length (LEN) and a counter (CTR). LEN indicates the number of bytes in 
    the XCP packet. The CTR is used to detect the packet loss. UDP/IP is not a protected proto­
    col. If a packet is lost, this is not recognized by the protocol layer. Packet loss is monitored by 
    counter information. When the Master sends its first message to the Slave, it generates a 
    counter number that is incremented with each additional transmission of a frame. The Slave 
    responds with the same pattern: It increments its own counter with each frame that it 
    sends. The counters of the Slave and the Master operate independently of one another. 
    UDP/IP is well suited for sending measured values. If a packet is lost, then the measured 
     values it contains are lost, resulting in a measurement gap. If this occurs infrequently, the 
    loss might just be ignored. But if the measured data is to be used as the basis for fast con­
    trol, it might be advisable to use TCP/IP.
    An Ethernet packet can transport multiple XCP packets, but an XCP packet may never 
    exceed the limits of a UDP/IP packet. In the case of XCP on Ethernet, there is no “Tail”, i.e. 
    an empty control field.

    1.4 XCP Transport Layers 
    59
    Detection of XCP-on-Ethernet Slaves
    With version 1.3 of the XCP standard, an expansion for XCP Slave detection was defined 
    specifically for XCP on Ethernet. 
    The Master can detect the XCP Slaves using the GET_SLAVE_ID command. Here, the  Master 
    broadcasts a multicast message (IPv4) with the IP address 239.255.0.0 on port 5556. 
    Regardless of whether or not an XCP Slave already has a connection to a Master, the Slave 
    must process the request and return a response. 
    The response of the Slave contains, among other things:
    >  The IP address (IPv4)
    >  The port number 
    >  TCP, UDP or both
    >  Information on the status of whether or not there is already a connection to an XCP 
    Master
    You will find more detailed information on the protocol in ASAM XCP on Ethernet Part 3 
    Transport Layer Specification. In CANape, you will also find an XCP on Ethernet demo with 
    the virtual ECU XCPsim or with virtual ECUs in the form of DLLs, which have been imple­
    mented by Simulink models and the Simulink Coder.
    1.4.5 SxI 
    SxI is a collective term for SPI or SCI. Since they are not buses, but instead are controller 
    interfaces which are only suited for point­to­point connections, there is no addressing in this 
    type of transmission. The communication between any two nodes runs either synchronously 
    or asynchronously.
    XCP on Sxl Message (Frame)
    XCP Header
    XCP Packet
    XCP Tail
    LEN
    CTR
    PID FILL DAQ
    TIMESTAMP
    DATA
    FILL
    CS
    Control Field
    Length (LEN)
    Control Field
    for SxI 
    for SxI
    Checksum (CS)
    Figure 47: XCP-on-SxI packet
    The XCP header consists of a control field with two pieces of information: the length LEN 
    and the counter. The length of these parameters may be in bytes or words (Intel format). 
    LEN indicates the number of bytes of the XCP packet. The CTR is used to detect the loss of 
    a packet. This is monitored in the same way as for XCP on Ethernet: with counter informa­

    60
    1 Fundamentals of the XCP Protocol
    tion. Under certain circumstances it may be necessary to add fill bytes to the packet, e.g. if 
    SPI is used in WORD or DWORD mode or to avoid the message being shorter than the 
     minimal packet length. These fill bytes are appended in the control field.
    You will find more detailed information on the protocol in ASAM XCP on SxI Part 3 Transport 
    Layer Specification.
    1.4.6 USB 
    Currently, XCP on USB has no practical significance. Therefore, no further mention will be 
    made of this topic; rather we refer you to ASAM documents that describe the standard: 
    ASAM XCP on USB Part 3 Transport Layer Specification.
    1.4.7 LIN 
    At this time, ASAM has not yet defined an XCP­on­LIN standard. However, a solution exists 
    from Vector (XCP­on­LIN driver and CANape as XCP­on­LIN Master), which violates neither 
    the LIN nor the XCP specification and is already being used on some customer projects. For 
    more detailed information, please contact Vector.

    1.5 XCP Services
    61
    1.5 XCP Services
    This chapter contains a listing and explanation of other services that can be realized over 
    XCP. They are all based on the already described mechanisms of communication with the 
    help of CTOs and DTOs. Some XCP services have already been explained, e.g. synchronous 
    data acquisition/stimulation and read/write access to device memory. 
    The XCP specification does indeed uniquely define the different services; at the same time it 
    indicates whether the service always needs to be implemented or whether it is optional. For 
    example, an XCP Slave must support “Connect” for the Master to set up a connection. On 
    the other hand, flashing over XCP is not absolutely necessary and the XCP Slave does not 
    need to support it. This simply depends on the requirements of the project and the software. 
    All of the services described in this chapter are optional. 
    1.5.1 Memory Page Switching 
    As already explained in the description of calibration concepts, parameters are normally 
    located in flash memory and are copied to RAM as necessary. Some calibration concepts 
    offer the option of switching memory segment pages from RAM and Flash. XCP describes a 
    somewhat more general, generic approach, in which a memory segment may contain multi­
    ple switchable pages. Normally, this consists of a RAM page and a flash page. But multiple 
    RAM pages or the lack of a flash page are conceivable as well. 
    For a better understanding of the XCP commands for page switching, the concepts of sec­
    tor, segment and page will be explained once again at this point.
    XCP access
    Segment 1
    t 1
    Segment 1
    Segment 1
     2
    Page 0
    Page 1
    Page 2
    egmem
    S
    tor
    ec
    S
    ECU access
    Segment 0
    t 0
    Page 0
     1
    egmem
    S
    tor
    ec
    S
     0
    tor
    ec
    address
    S
    Figure 48: 
    Memory representation


    62
    1 Fundamentals of the XCP Protocol
    From an XCP perspective, the memory of a Slave consists of a continuous memory that is 
    addressed with a 40­bit width. The physical layout of the memory is based on sectors. 
    Know ledge of the flash sectors is absolutely necessary in flashing, because the flash mem­
    ory can only be erased a block at a time. 
    The logical structure is based on what are known as segments; they describe where calibra­
    tion data is located in memory. The start address and parameters of a segment do not have 
    to be aligned with the start addresses and parameters of the physical sectors. Each seg­
    ment can be subdivided into multiple pages. The pages of a segment describe the same 
    parameters at the same addresses. The values of these parameters and read/write rights 
    can be controlled individually for each page. 
    The allocation of an algorithm to a page within a segment must always be unique. Only one 
    page may be active in a segment at any given time. This page is known as the “active page 
    for the ECU in this segment.” The particular page that the ECU and the XCP driver actively 
    access can be individually switched. No interdependency exists between these settings. Sim­
    ilar to the naming convention for the ECU, the active page for XCP access is referred to as 
    the “active page for XCP access in this segment“. 
    In turn, this applies to each individual segment. Segments must be listed in the A2L file and 
    each segment gets a number that is used to reference the segment. Within an XCP Slave, 
    the SEGMENT_NUMBER must always begin at 0 and it is then incremented in consecutive 
    numbers. Each segment has at least one page. The pages are also referenced by numbers. 
    The first page is PAGE 0. One byte is available for the number, so that a maximum of 255 
    pages can be defined per segment. 
    The Slave must initialize all pages for all segments. The Master uses the command  
    GET_CAL_PAGE to ask the Slave which page is currently active for the ECU and which page 
    for XCP access. It can certainly be the case that mutual blocking may be necessary for the 
    accesses. For example, the XCP Slave may not access a page, if this page is currently active 
    for the ECU. As mentioned, there may be a dependency – but not necessarily. It is a question 
    of how the Slave has been implemented. 
    If the Slave supports the optional commands GET_CAL_PAGE and SET_CAL_PAGE, then it 
    also supports what is known as page switching. These two commands let the Master poll 
    which pages are currently being used and if necessary it can switch pages for the ECU and 
    XCP access. The XCP Master has full control over switching of pages. The XCP Slave cannot 
    initiate switching by itself. But naturally the Master must respect any restrictions of the 
    Slave implementation. 
    What is the benefit of switching?
    First, switching permits very quick changing of entire parameter sets – essentially a before­
    and­after comparison. Second, the plant remains in a stable state, while the calibrator per­
    forms extensive parameter changes on another page in the ECU. This prevents the plant 
    from going into a critical or unstable state, e.g. due to incomplete datasets during para­
    meter setting. 


    1.5 XCP Services
    63
    1.5.2 Saving Memory Pages – Data Page Freezing 
    When a calibrator calibrates parameters on a page, there is the conceptual ability in XCP to 
    save the data directly in the ECU. This involves saving the data of a RAM page to a page in 
    nonvolatile memory. If the nonvolatile memory is flash, it must be taken into account that 
    the segment start address and the segment size might not necessarily agree with the flash 
    sectors, which represents a problem in erasing and rewriting the flash memory (see ASAM 
    XCP Part 2 Protocol Layer Specification).
    1.5.3 Flash Programming 
    Flashing means writing data in an area of flash memory. This requires precise knowledge of 
    how the memory is laid out. A flash memory is subdivided into multiple sectors (physical sec­
    tions), which are described by a start address and a length. To distinguish them from one 
    another, they each get a consecutive identification number. One byte is available for this 
    number, resulting in a maximum of 255 sectors. 
    SECTOR_NUMBER [0, 1, 2 … 255]
    The information about the flash sectors is also part of the A2L data set.
    Figure 49: 
    Representation 
    of driver settings 
    for the flash area


    64
    1 Fundamentals of the XCP Protocol
    Flashing can be implemented using what are referred to as “flash kernels”. A flash kernel is 
    executable code that is sent to the Slave’s RAM area before the actual flashing; the kernel 
    then handles communication with the XCP Master. It might contain the algorithm that is 
    responsible for erasing the flash memory. For security and space reasons, very frequently 
    this code is not permanently stored in the ECU’s flash memory. Under some circumstances, 
    a converter might be used, e.g. if checksum or similar computations need to be performed.
    Flashing with XCP roughly subdivides the overall flash process into three areas:
    >  Preparation (e.g. for version control and therefore to check whether the new contents can 
    even be flashed)
    >  Execution (the new contents are sent to the ECU) 
    >  Post­processing (e.g. checksum checking etc.)
    In the XCP standard, the primary focus is directed to the actual execution of flashing. Any­
    one who compares this operation to flashing over diagnostic protocols will discover that the 
    process­specific elements, such as serial number handling with meta­data, are supported in 
    a rather spartan fashion in XCP. Flashing in the development phase was clearly the main 
    focus in its definition and not the complex process steps that are necessary in end­of­line 
    flashing.
    Therefore, what is important in the preparation phase is to determine whether the new con­
    tents are even relevant to the ECU. There are no special commands for version control. 
    Rather the practice has been to support those commands specific to the project. 
    The following XCP commands are available:
    PROGRAM_START: Beginning of the flash procedure
    This command indicates the beginning of the flash process. If the ECU is in a state that does 
    not permit flashing (e.g. vehicle speed > 0), the XCP Slave must acknowledge with an ERRor. 
    The actual flash process may not begin until the PROGRAM_START has been successfully 
    acknowledged by the Slave.
    PROGRAM_CLEAR: Call the current flash memory erasing routine 
    Before flash memory can be overwritten with new contents, it must first be cleared. The call 
    of the erasing routine via this command must be implemented in the ECU or be made avail­
    able to the ECU with the help of the flash kernel.
    PROGRAM_FORMAT: Select the data format for the flash data 
    The XCP Master uses this command to define the format (e.g. compressed or encrypted) in 
    which the data are transmitted to the Slave. If the command is not sent, the default setting 
    is non­compressed and non­encrypted transmission.
    PROGRAM: Transfer the data to the XCP Slave
    For the users who are very familiar with flashing via diagnostics: this command corresponds 
    to TRANSFERDATA in diagnostics. Using this command, data is transmitted to the XCP 
    Slave, which is then stored in flash memory.

    1.5 XCP Services
    65
    PROGRAM_VERIFY: Request to check the new flash contents
    The Master can request that the Slave perform an internal check to determine whether the 
    new contents are OK. 
    PROGRAM_RESET: Reset request to the Slave
    Request by the Master to the Slave to execute a Reset. Afterwards, the connection to the 
    Slave is always terminated and a new CONNECT must be sent.
    1.5.4 Automatic Detection of the Slave 
    The XCP protocol lets the Master poll the Slave about its protocol­specific properties. A 
    number of commands are available for this.
    GET_COMM_MODE_INFO
    The response to this command gives the Master information about the various communica­
    tion options of the Slave, e.g. whether it supports block transfer or interleaved mode or 
    which minimum time intervals the Master must maintain between requests in these modes. 
    GET_STATUS
    The response to this request returns all current status information of the Slave. Which 
    resources (calibration, flashing, measurement, etc.) are supported? Are any types of mem­
    ory activities (DAQ list configuration, etc.) still running currently? Are DTOs (DAQ, STIM) 
    being exchanged right now?
    GET_DAQ_PROCESSOR_INFO
    The Master gets general information, which it needs to know about the Slave limitations: 
    number of predefined DAQ lists, available DAQ lists and events, etc.
    GET_DAQ_RESOLUTION_INFO
    Other information about the DAQ capabilities of the Slave is exchanged via this command: 
    maximum number of parameters for an ODT for DAQ and for STIM, granularity of the ODT 
    entries, number of bytes in timestamp transmission, etc.
    GET_DAQ_EVENT_INFO
    When this command is used, the call is made once per ECU event. Information is transmit­
    ted here on whether the event can be used for DAQ, STIM or DAQ/STIM, whether the event 
    occurs periodically and if so which cycle time it has, etc.

    66
    1 Fundamentals of the XCP Protocol
    1.5.5 Block Transfer Mode for Upload, Download and Flashing 
    In the “normal” communication mode, each command from the Master is acknowledged by 
    a response of the Slave. However, in some cases it may be desirable, for performance rea­
    sons, to use what is referred to as the block transfer mode. 
    Master
    Slave
    Request k
    Part1
    Part2
    MIN_ST
    Part3
    MAX_BS
    Response k
    Request k+1
    Time
    Figure 50: 
    Representation of the block transfer mode

    The use of such a method accelerates the procedure when transmitting large amounts of 
    data (UPLOAD, SHORT_UPLOAD, DOWNLOAD, SHORT_DOWNLOAD and PROGRAM). The 
    Master can find out whether the Slave supports this method with the request GET_COMM_
    MODE_INFO. You will find more on this in ASAM XCP Part 2 Protocol Layer Specification.

    1.5 XCP Services
    67
    1.5.6 Cold Start Measurement (during Power-On) 
    Even with the capabilities of XCP described to this point, it would be impossible to imple­
    ment an event­driven measurement that can in practice be executed early in the ECU’s start 
    phase. The reason is that the measurement must be configured before the actual measure­
    ment takes place. If one attempts to do this, the ECU’s start phase has long been over by 
    the time the first measured values are transmitted. The approach that is used to overcome 
    this problem is based on a simple idea. 
    It involves separating the configuration and the measurement in time. After the configura­
    tion phase, the measurement is not started immediately; rather the ECU is shut down. After 
    a reboot, the XCP Slave accesses the existing configuration directly and immediately begins 
    to send the first messages. The difficulties associated with this are obvious: the configura­
    tion of the DAQ lists is stored in RAM, and therefore the information no longer exists after 
    a reboot. 
    To enable what is known as the RESUME mode to enable a Cold Start Measurement, a non­
    volatile memory is needed in the XCP Slave which preserves its data even when it is not 
    being supplied with power. EEPROMs are used in this method. In this context, it is irrelevant 
    whether it is a real EEPROM or one that is emulated by a flash memory.
    You will find more details in ASAM XCP Part 1 Overview Specification in the chapter 1.4.2.2 
    “Advanced Features”.

    68
    1 Fundamentals of the XCP Protocol
    1.5.7 Security Mechanisms with XCP 
    An unauthorized user should be prevented as much as possible from being able to make a 
    connection to an ECU. The “seed & key” method is available for checking whether or not a 
    connection attempt is authorized. The three different access types can be protected by seed 
    & key: measurement / stimulation, calibration and flashing.
    The “seed  &  key” method operates as follows: in the connect request by the Master, the 
    Slave sends a random number (= seed) to the Master. Now, the Master must use an algo­
    rithm to generate a response (= key). The key is sent to the Slave. The Slave also computes 
    the expected response and compares the key of the Master with its own result. If the two 
    results agree, both the Master and Slave have used the same algorithm. Then the Slave 
    accepts the connection to the Master. If there is no agreement, the Slave declines commu­
    nication with the Master.
    Normally, the algorithm is available as a DLL in the Master. So, if a user has the “seed & key” 
    DLL and the A2L file, nothing stands in the way of accessing the ECU’s memory. When the 
    ECU is approaching a production launch, the XCP driver is often deactivated. A unique 
    sequence of individual diagnostic commands is usually used to restore XCP access to the 
    ECU. This makes the XCP driver largely available even in production vehicles, but it is nor­
    mally deactivated to protect against unauthorized manipulation of the ECU (see ASAM XCP 
    Part 2 Protocol Layer Specification). 
    Whether or not seed & key or deactivation of the XCP driver is used in a project is implemen­
    tation­specific and independent of the XCP specification. 

    2 ECU Description File A2L
    71
    2 ECU Description File A2L 



    72
    2 ECU Description File A2L
    One reason why an A2L file is needed has already been named: to allocate symbolic names 
    to addresses. For example, if a software developer has implemented a PID controller and 
    assigned the names P1, I1 and D1 in his application for the proportional, integral and differ­
    ential components, then the calibrator should be able to access these parameters with their 
    symbolic names. Let us take the following figure as an example:
    Figure 51: 
    Parameters in a calibration window

    The user can conveniently modify values using symbolic names. Another example is provided 
    by viewing signal variables that are measured from the ECU:
    Figure 52: Signal response over time
    In the legend, the user can read the logical names of the signals. The addresses at which the 
    parameters were located in the ECU are of secondary importance in the offline analysis of 
    values. Naturally, the correct address is needed to request the values in the ECU, but the 
    numeric value of the address itself is of no importance to the user. The user uses the logical 
    name for selection and visualization purposes. That is, the user selects the object by its 
    name and the XCP Master looks for the associated address and data type in the A2L.

    2 ECU Description File A2L
    73
    Another attribute of a parameter might be the definition of a minimum or maximum value. 
    The value of the object would then have to lie within these limits. Imagine that you as the 
    software developer define a parameter that has a direct effect on a power output stage. 
    You must now prevent the user – whatever the user’s reasons might be – from configuring 
    the output stage that would result in catastrophic damage. You can accomplish this by 
    defining minimum and maximum values in the A2L to limit the permitted values. 
    Rules for conversion between physical and raw values are also defined in the A2L. You can 
    visualize a simple example of such a conversion rule in a sensor that has an 8­bit value. The 
    numeric values output by the sensor lie between 0 and 255, but you wish to see the value as 
    a percentage value. Mapping of the sensor value [0 … 255] to [0 … 100 %] is performed with 
    a conversion rule, which in turn is stored in the A2L. If an object is measured, which exists as 
    a raw value in the ECU and is also transmitted as such, the measurement and calibration 
    tool uses the stored formula and visualizes the physical value.
    Besides scalar parameters, characteristic curves and maps are frequently used. Some might 
    utilize a proximity sensor such as a Hall sensor, which determines distance as a function of 
    magnetic field strength and you may wish to use this distance value in your algorithm. The 
    magnetic field and distance value do not run linear to one another. This nonlinearity of 
     values would make formulation of the algorithm unnecessarily difficult. With the help of a 
    characteristic curve, you can first linearize the values before you input the values into your 
    algorithm as input variables.
    Another application area for characteristic maps is their use as substitutes for complex 
    computations. For example, if there is a relationship y = f(x) and the function f is associated 
    with a lot of computing effort, it is often simpler to simply compute the values over the 
    potential range of x in advance and store the results in the form of a table (= characteristic 
    curve). If the value x is now in the ECU, the value y does not need to be computed at the con­
    troller’s runtime, rather the map returns the result y to the input variable x. It may be neces­
    sary to interpolate between two values, but that would be the extent of the calculations. 
    How is this characteristic curve stored in memory? Are all x values input first and then all y 
    values? Or does storage follow the pattern: x1, y1; x2, y2; x3, y3 …? Since various options are 
    available, the type of memory storage is defined in a storage scheme in the A2L. 
    The convenience for the user comes from the ability to work with symbolic names for param­
    eters, the direct look at the physical values and access to complex elements such as charac­
    teristic maps, without having to concern oneself with complex storage schemes.
    Another advantage is offered by the communication parameters. They are also defined in 
    the A2L. In the communication between the measurement and calibration tool and the ECU, 
    the parameter set from the A2L is used. The A2L contains everything that the measurement 
    and calibration tool needs to communicate with the ECU. 

    74
    2 ECU Description File A2L
    2.1 Setting Up an A2L File for an XCP Slave 
    The A2L file is an ASCII­readable file, which describes the following with the help of 
    keywords:
    >  Interface­specific parameters between measurement and calibration tool and A2L file 
    (the description is located at the beginning of the A2L file and is located in what is referred 
    to as the AML tree),
    >  Communication to the ECU,
    >  Storage scheme for characteristic curves and maps (keyword RECORD_LAYOUT),
    >  Conversion rules for converting raw values to physical values (keyword COMPU_METHOD),
    >  Measurement parameters (keyword MEASUREMENT),
    >  Calibration parameters (keyword CHARACTERISTIC) and
    >  Events that are relevant for triggering a measurement keyword EVENT),
    A summary of parameters and measurement parameters is made with the help of groups 
    (keyword GROUP).
    Example of a measurement parameter with the name “Shifter_B3”:
        /begin MEASUREMENT Shifter_B3 „Single bit signal (bit from a byte shifting)“
          UBYTE HighLow 0 0 0 1
          READ_WRITE
          BIT_MASK 0x8
          BYTE_ORDER MSB_LAST
          ECU_ADDRESS 0x124C02
          ECU_ADDRESS_EXTENSION 0x0
          FORMAT „%.3“
          /begin IF_DATA CANAPE_EXT
            100
            LINK_MAP „byteShift“ 0x124C02 0x0 0 0x0 1 0x87 0x0
            DISPLAY 0 0 20
          /end IF_DATA
        /end MEASUREMENT
    Example of a parameter map with the name KF1:
        /begin CHARACTERISTIC KF1 „8*8 BYTE no axis“
          MAP 0xE0338 __UBYTE_Z 0 Factor100 0 2.55
          ECU_ADDRESS_EXTENSION 0x0
          EXTENDED_LIMITS 0 2.55
          BYTE_ORDER MSB_LAST
          BIT_MASK 0xFF
          /begin AXIS_DESCR
            FIX_AXIS NO_INPUT_QUANTITY BitSlice.CONVERSION 8 0 7
            EXTENDED_LIMITS 0 7

    2.1 Setting Up an A2L File for an XCP Slave
    75
            READ_ONLY
            BYTE_ORDER MSB_LAST
            FORMAT „%.0“
            FIX_AXIS_PAR_DIST 0 1 8
          /end AXIS_DESCR
          /begin AXIS_DESCR
            FIX_AXIS NO_INPUT_QUANTITY BitSlice.CONVERSION 8 0 7
            EXTENDED_LIMITS 0 7
            READ_ONLY
            BYTE_ORDER MSB_LAST
            FORMAT „%.0“
            FIX_AXIS_PAR_DIST 0 1 8
          /end AXIS_DESCR
          /begin IF_DATA CANAPE_EXT
            100
            LINK_MAP „map3_8_8_uc“ 0xE0338 0x0 0 0x0 1 0x87 0x0
            DISPLAY 0 0 255
          /end IF_DATA
          FORMAT „%.3“
        /end CHARACTERISTIC
    The ASCII text is not easy to understand. You will find a description of its structure in ASAM 
    XCP Part 2 Protocol Layer Specification in chapter 2.
    The sections below describe how to create an A2L. Let us focus on the actual contents of an 
    A2L and their meanings and leave the details of the A2L description language to an editor. 
    The A2L Editor that is supplied with CANape is used here. 
    2.2 Manually Creating an A2L File
    The A2L mainly describes the contents of the memory of the XCP Slave. The contents depend 
    on the application in the Slave, which was developed as C code. After the compiler/linker run 
    of the application code, important elements of an A2L file already exist in the linker­map file: 
    the names of the objects, their data types and memory addresses. Still lacking are the 
    parameters for communication between XCP Master and Slave. Other information is usually 
    needed such as minimum and maximum values of parameters, conversion rules, storage 
    schemes for characteristic maps etc.
    Let us begin by creating an empty A2L and the communication parameters: If you wish to 
    create an A2L that describes an ECU with an XCP­on­CAN interface, for example, you cre­
    ate a new device in CANape and select XCP on CAN as the interface. Then you can supple­
    ment this with other communication­specific information (e.g. CAN identifiers). After saving 
    the file, you have an A2L that contains the entire communication content of the A2L. Still 
    lacking are the definitions of the actual measurement and calibration parameters. 

    76
    2 ECU Description File A2L
    In the A2L Editor, the linker­map file is associated to the A2L. In a selection dialog, the user 
    can now select those parameters from the map file which it needs in the A2L: scalar 
     measurement and calibration parameters, characteristic curves and maps. The user can 
    gradually add the desired parameters to the A2L step by step and group them. Other object­
    specific information is also added using the editor. 
    What should be done when you modify your code, recompile it and link it? It is highly proba­
    ble that the addresses of objects will change. Essentially, it is not necessary to generate a 
    new A2L. If you wish to have objects just added to the code also be available in the A2L, you 
    must of course add them to the A2L. Address updating is always necessary in the A2L. This 
    is done with the editor; it searches for the relevant entry in the linker­map file based on the 
    name of the A2L object, reads out the address and updates it in the A2L.
    If your application changes very dynamically – objects are renamed, data types are adapted, 
    parameters are deleted and others added – then the manual work method is impractical. To 
    generate an A2L from a C code, other tools are available for automatic processing. 
    On the Vector homepage you will find information on the “ASAP2 Tool­Set“ with which you 
    can automate the generation of A2Ls from the source code in a batch process.
    2.3 A2L Contents versus ECU Implementation
    When an XCP Master tool reads in an A2L that does not fully match the ECU, misunder­
    standings in the communication might occur. For example, another value related to time­
    stamp resolution might be in the A2L file that differs from the value implemented in the 
    ECU. If this is the case, the problem must be detected and solved. The user gets support 
    from the Master, who can poll the Slave via the protocol to determine what was really imple­
    mented in the Slave. 
    XCP offers a number of functions that were developed for automatic detection of the Slave. 
    Of course, this assumes that automatic detection is implemented in the Slave. If the Master 
    polls the Slave and the Slave’s responses do not agree with the parameter set of the A2L 
    description file, the Master must decide which settings to use. In CANape, the information 
    that is read out by the Slave is given a higher priority than the information from the A2L.

    2.3 A2L Contents versus ECU Implementation
    77
    Here is an overview of possible commands that are used to find out something about the 
    XCP implementation in the Slave:
    GET_DAQ_PROCESSOR_INFO
    Returns general information on the DAQ lists: MAX_DAQ, MAX_EVENT_CHANNEL, 
    MIN_DAQ
    GET_DAQ_RESOLUTION_INFO 
    Maximum parameter of an ODT entry for DAQ/STIM, time interval information
    GET_DAQ_EVENT_INFO (Event_channel_number)
    Returns information for a specific time interval: Name and resolution of the time interval, 
    number of DAQ lists that may be assigned to this time interval …
    GET_DAQ_LIST_INFO (DAQ_List_Number)
    Returns information on the selected DAQ list: MAX_ODT, MAX_ODT_ENTRIES exist as pre­
    defined DAQ lists …

    3 Calibration Concepts
    79
    3 Calibration Concepts

    80
    3 Calibration Concepts
    ECU parameters are constant parameters that are adapted and optimized during the 
    development of the ECU or an ECU variant. This is an iterative process, in which the optimal 
    value of a parameter is found by repeated measurements and changes. 
    The calibration concept answers the question of how parameters in the ECU can be changed 
    during an ECU’s development and calibration phases. There is not one calibration concept 
    that exists, rather several. Which concept is utilized usually depends very much on the capa­
    bilities and resources of the microcontroller that is used. 
    Normally, parameters are stored in the production ECU’s flash memory. The underlying pro­
    gram variables are defined as constants in the software. To make parameters modifiable at 
    runtime during an ECU’s development, additional RAM memory is needed.
    A calibration concept is concerned with such questions as these: How do the parameters ini­
    tially find their way from flash to RAM? How is the microcontroller’s access to RAM rerouted? 
    What does the solution look like when there are more parameters than can be simultane­
    ously stored in RAM? How are the parameters copied back into flash? Are changes to the 
    parameters persistent, i.e. are they preserved when the ECU is turned off?
    A distinction is made between transparent and non­transparent calibration concepts. Trans­
    parent means that the calibration tool does not need to be concerned with the above 
     questions, because all necessary mechanisms are implemented in the ECU. 
    Several methods are briefly introduced in the following.
    3.1 Parameters in Flash
    The software developer defines in the source code whether a parameter is a variable or a 
    constant, i.e. whether a parameter is stored in flash or in RAM memory.
    C code example: 
    const float factor = 0.5; 
    The “factor” parameter represents a constant with the value 0.5. During compiling and link­
    ing of the code, memory space is provided in flash for the “factor” object. The object is allo­
    cated an address that lies in the data area of the flash memory. The value 0.5 is found at 
    the relevant address in the hex file and the address appears in the linker­map file.
    The simplest conceivable calibration concept involves modifying the value in C code, gener­
    ating a new hex file and flashing. However, this method is very laborious, because every 
    value change must be made in code, resulting in the need for a compiler/linker run with sub­
    sequent flashing. An alternative approach would be to only modify the value in the hex file 
    and then reflash this file. Every calibration tool is capable of doing this. It is referred to as 
    “offline calibration” of the hex file, which is a very commonly used method.

    3.1 Parameters in Flash
    81
    Under some circumstances, with certain compilers it may be necessary to explicitly ensure 
    that parameters are always also stored in flash memory and not integrated in the code, for 
    example and therefore do not appear at all in the linker­map file. Usually, one does not want 
    to leave to chance where a constant is created in flash memory. The necessary means for 
    accomplishing this are almost always compiler­specific pragma instructions. To prevent the 
    compiler from embedding them in the code, it is generally sufficient to use the “volatile” 
    attribute for constant parameters. A typical definition of a flash constant appears as in the 
    following example:
     
    C code example: 
    #pragma section “FLASH_Parameter”
    volatile const float factor = 0.5;
    It is normally not possible to calibrate parameters in flash online. Indeed, most microcon­
    trollers are able to program their flash themselves, which is necessary for the purposes of 
    re­programming in the field. Nonetheless, flash memory always has the property of being 
    organized into larger blocks (sectors), which can only be erased as a whole. It is practically 
    impossible to flash just individual parameters, because the ECU normally does not have the 
    resources to buffer the rest of the sector and reprogram it. In addition, this process would 
    take too much time.
    Some ECUs have the ability to store data in what is known as an EEPROM memory. In con­
    trast to flash memories, EEPROM memories can erase and program each memory cell indi­
    vidually. The amount of available EEPROM memory is always considerably less than the 
    available flash memory and it is usually limited to just a few kilobytes. EEPROM memory is 
    often used to store programmable parameters in the service shop or to implement a persis­
    tence mechanism in the ECU, e.g. for the odometer. Online calibration would be conceivable 
    here, but it is seldom used, because access to EEPROM cells is relatively slow and during the 
    booting process EEPROM parameters are usually copied over to RAM memory, where it is 
    possible to access them directly. ECUs which have no EEPROM memory often implement 
    what is known as an EEPROM emulation. In this method, multiple small flash sectors are 
    used in alternation to record parameter changes, so that the last valid value can always be 
    determined. Online calibration would also be conceivable with this method.
    In both cases, the relevant memory accesses would then be intercepted in the software 
    components of the XCP driver and implemented with the software routines of the EEPROM 
    or the EEPROM emulation. The Vector XCP Professional driver offers the software hooks 
    needed for this.

    82
    3 Calibration Concepts
    3.2 Parameters in RAM
    The most frequently used approach to modifying parameters at runtime (“online calibra­
    tion”) is to create the parameters in the available RAM memory. 
    C code example: 
    #pragma section “RAM_Parameter”
    volatile float factor = 0.5; 
    This defines the parameter “factor” as a RAM variable with the initial value 0.5. During com­
    piling and linking of the code, memory space is reserved for the object “factor” in RAM and 
    the associated RAM address appears in the linker­map file. The initial value 0.5 is stored in 
    flash memory and at the relevant location in the hex file. The addresses of the initial values 
    in flash memory are defined by parameterization of the linker, but they do not appear in the 
    linker­map file. 
    During booting of the ECU, all RAM variables are initialized once with their initial values 
    from flash memory. This is usually executed in the start­up code of the compiler producer 
    and the application programmer does not need to be concerned with it. The application uses 
    the values of parameters located in RAM and they can be modified via normal XCP memory 
    accesses. 
    From the perspective of the ECU software, calibration parameters in RAM are always still 
    unchangeable, i.e. the application itself does not change them. Many compilers discover this 
    fact by code analysis and simply optimize the necessary RAM memory space away. Nor­
    mally, it is therefore also necessary to prevent the compiler from optimizing by using the 
    “volatile” attribute.
    From the perspective of the calibration tool, the RAM area in which the parameters are 
    located is referred to as calibration RAM (memory that can be calibrated). 
    FLASH
    RAM
    Calibration RAM
    Parameters
    Figure 53: 
    Initial parameter setting in RAM

    The calibration RAM does not need to consist of a fully contiguous RAM area. It may also be 
    distributed into multiple areas or even in any desired way. Nonetheless, it offers significant 
    advantages for organizing the parameters in just a few contiguous RAM areas and isolating 
    them from other RAM parameters such as changing state variables and intermediate 
    results. This is especially important if offline calibration of the calibration RAM with a hex 
    file should be enabled. At the user’s request, the calibration tool must be able to load the 

    3.2 Parameters in RAM
    83
    parameters that were modified offline into the ECU during the transition from offline cali­
    bration to online calibration. 
    This case occurs very frequently. For example, when calibrators reconnect with their ECU on 
    the next work day, they want to resume work at the point at which they stopped the evening 
    before. However, booting of the ECU causes the flashed contents to be copied to the RAM 
    as an initial dataset. To let users resume with work accomplished on the previous day, the 
    parameter set file saved the previous evening in the ECU’s RAM must be loaded. This load­
    ing process may be time optimized by limiting the number of necessary transmissions to a 
    minimum. It is advantageous here if the tool can quickly and reliably determine – by forming 
    a checksum over larger contiguous areas – whether there are differences. If there are no dif­
    ferences between the calibration RAM contents in the ECU and the file modified using the 
    tool, this area does not need to be transferred. If the memory area with the calibration 
    parameters is not clearly defined, or if it includes parameters that are modified by the ECU 
    software, a checksum calculation always shows a difference and the parameter values are 
    transmitted, either from the ECU to the XCP Master or in a reverse direction. Depending on 
    the transmission speed and amount of data, this transmission could take several minutes. 
    Another advantage of clearly defined memory segments is that the memory area for initial 
    values in flash memory can be used for offline calibration. The contents of the flash memory 
    are defined using flashable hex files. If the calibration tool knows the location of parameters 
    in the hex file, it can modify their values and implement new initial values in the ECU by 
    flashing the modified hex file. 
    The calibration tool not only needs to know the location of parameters in RAM, but also the 
    initial values in flash. A prerequisite is that the RAM memory segment must be initialized by 
    copying from an identically laid out memory segment in flash, as is the usual practice in 
    most compilers/linkers. If the addresses of parameters in RAM are in the A2L file, it is only 
    necessary to let the tool know the offset to the start address of the calibration RAM, which 
    it must add to get to the start address of the relevant flash area. This offset then applies to 
    each individual parameter in the A2L. 
    The calibration tool can then either generate flashable hex files for this area itself, or it can 
    place them directly on the original hex files of the linker to modify the initial values of para­
    meters in the hex file.

    84
    3 Calibration Concepts
    3.3 Flash Overlay
    Many microcontrollers offer options for overlaying memory areas in flash with internal or 
    external RAM. This process is referred to as flash emulation or flash overlay. A lot is possible, 
    from the use of a Memory Management Unit all the way to dedicated mechanisms that pre­
    cisely serve this purpose. In this case the parameters are created as parameters in flash just 
    as in calibration concept 1. This method offers enormous advantages compared to the 
    described calibration concept 2 “Parameters in RAM”:
    >  No distinction is made between flash and RAM addresses. The flash addresses are always 
    located in the A2L file, the hex file and linker­map file. This produces clear relationships, 
    the hex file is directly flashable and the A2L file matches it exactly.
    >  The overlay can be activated or deactivated as a whole, which enables lightning­quick 
    swapping between values in flash and those in RAM. They are referred to as the RAM page 
    and the flash page of a memory segment. XCP supports control of memory page switch­
    ing with special commands. 
    >  The memory pages might be switched separately, e.g. for XCP access and ECU access, i.e. 
    XCP could access a memory page while the ECU software works with the other page. This 
    permits such operations as downloading of the offline calibration data to RAM, while the 
    ECU is still working with the flash data; this avoids potential inconsistencies that could be 
    problematic on a running ECU.
    >  The overlay with RAM does not need to be complete and it can be adapted to the applica­
    tion case. It is possible to work with less RAM than with flash. More on this later.
    A typical procedure for connecting the calibration tool to the ECU with the subsequent 
    download of values that were calibrated offline appears as follows:
    Connects to the ECU 
    CONNECT
    Connects XCP Master to RAM page 
    SET_CAL_PAGE XCP to RAM
    Checksum calculation 
    CALC_CHECKSUM
    When a difference has been detected in the checksum calculation over the RAM area, first 
    the user is normally asked how to proceed. Should the contents of ECU RAM be sent to the 
    Master, or should the contents of a file on the Master page be sent to the ECU’s RAM? If the 
    user decides to write the offline changes to the ECU, the subsequent process appears as 
    follows:
    ECU should use the dataset of the flash page  SET_CAL_PAGE ECU to FLASH
    Copy file from Master to the RAM page  
    DOWNLOAD …
    ECU should use the dataset of the RAM page  SET_CAL_PAGE ECU to RAM
    Afterwards, the memory page is always switched over to RAM, so that parameters can be  
    modified. But the user can also explicitly indicate which memory page should be active in the 
    ECU. For example, the behavior of the RAM parameter set can be compared to that of the 
    flash parameter set, or in an emergency it can be switched back to a proven parameter set 
    in flash at lightning speed.

    3.4 Dynamic Flash Overlay Allocation
    85
    3.4 Dynamic Flash Overlay Allocation
    The concepts for calibration RAM described so far are unproblematic if sufficient RAM is 
    available for all parameters. But what if the total number of parameters does not fit into 
    the available RAM area? 
    Here, it is advisable to overlay flash with RAM dynamically and do not overlay the affected 
    flash memory with RAM until the actual write access to a parameter. This procedure can 
    occur with a certain granularity and – depending on the implementation – it may be trans­
    parent to the calibration tool from the XCP perspective. If the XCP driver detects a write 
    access to flash in the ECU which would lead to a change, a part of calibration RAM is used 
    to copy over the relevant part of flash and activate the overlay mechanism for this part. This 
    involves allocating the RAM, i.e. in a fixed layout and it is identified as utilized. However, the 
    resources of the calibration RAM are limited. During the calibration process, RAM area that 
    has already been allocated is no longer released, so the available calibration RAM dwindles 
    with further requests. If the RAM resources are used up and a new allocation is required, the 
    user is informed of the exhausted RAM resources. The user is offered the option of flashing 
    or saving the changes made up to that point. This frees up the allocated RAM area again 
    and the user can once again calibrate. The variant in which the ECU autonomously flashes 
    the previously changed parameters is usually ruled out here for the reasons already cited in 
    calibration concept “Parameter in Flash”.
    In some cases, the download of a parameter set created offline might not be executable due 
    to insufficient RAM resources. The only alternative is to flash it. The user can always cancel 
    the changes from the tool and this releases the allocated RAM blocks again.
    In this concept, page switching between the RAM and flash pages is also possible without 
    any limitations. The parameters should be organized together in flash according to function, 
    so that the available RAM blocks can be used as efficiently as possible. The software devel­
    oper then specifies that the parameters, which belong together thematically, also lie in a 
    contiguous memory area. After copying to RAM, the parameters needed for tuning the par­
    ticular function are fully ready for use. 

    86
    3 Calibration Concepts
    3.5 RAM Pointer Based Calibration Concept per AUTOSAR
    This concept does not require necessarily the use of an AUTOSAR operating system; it can 
    even be used in a different environment – e.g. without an operating system. The concept 
    exhibits a key similarity to the previous concept. The primary difference is that the substitu­
    tion of flash for RAM is not implemented by hardware mechanisms, but by software mech­
    anisms instead. The calibration parameters are always referenced by pointers from the ECU 
    software. Flash or RAM contents are accessed by changing this pointer. The flash parame­
    ters to be modified are copied to a defined block with available RAM. This method can be 
    implemented fully transparently from the XCP perspective, just as in the previous method. 
    As an alternative, the user of the calibration tool can explicitly select the parameters to be 
    modified by preselecting the desired parameters. The advantage of this is that resource uti­
    lization and loading is visible to the user and the user is not surprised by a lack of memory in 
    the midst of working.
    3.5.1 Single Pointer Concept
    The pointer table is located in RAM. When booting the ECU, all pointers indicate the para­
    meter values in flash. The location and parameters of the calibration RAM are indeed known, 
    but it does not yet contain any parameter values after booting. Initially, the application 
    works entirely from flash.
    FLASH
    Pointertable
    RAM
    Parameters
    Figure 54: 
    Initial situation after booting

    When the user selects a parameter from the A2L file for the first time after booting and 
    wishes to write access it, this triggers a copying operation within the ECU first. The XCP 
    Slave determines that the address to which the access should be made is located in the 
    flash area, and it copies the parameter value to the calibration RAM. A change is also made 
    in the pointer table to ensure that the application no longer gets the parameter value from 
    flash, but instead from the RAM area: 

    3.5 RAM Pointer Based Calibration Concept per AUTOSAR
    87
    FLASH
    Pointertable
    RAM
    Parameters
    Figure 55: 
    Pointer change and copying to RAM

    The application continues to get the parameter value via the pointer table. But since the 
    pointer indicates the RAM address, the value is retrieved from there. As a result, the user can 
    change the parameter value via XCP and observe the effects of the change in the measure­
    ment. The disadvantage of this method is that an entry in a pointer table must be available 
    for each parameter and in turn the method is associated with substantial additional RAM 
    memory requirements for the pointer table. 
    The next figure illustrates the problem. Three parameters of a PID controller (P, I and D) are 
    contained in an ECU’s flash area. The RAM addresses and parameter values in RAM are also 
    already changed in the pointer table.
    Parameter
    Flash
    Pointertable
    RAM
    Address
    Content
    Address
    Address
    Content
    P
    0x0000100A  0x11
    0x000A100A
    0x000A100A 0x44
    I
    0x000012BC  0x22
    0x000A100B
    0x000A100B 0x55
    D
    0x00007234  0x33
    0x000A100C
    0x000A100C 0x66
    Figure 56: Pointer table for individual parameters
    Calibration concepts are very important, because RAM resources are scarce. Large RAM 
    pointer tables would make a concept self­defeating. 
    To avoid having to create a pointer for each individual parameter and having the method be 
    used as such, the parameters can be combined into structures. This requires just one pointer 
    per structure. When the user selects a parameter, not only is this parameter copied to RAM, 
    but so is the entire associated structure. The granularity of the structures is of key impor­
    tance here. With large structures only a few pointers are necessary. In turn, this means that 
    with the decision for a specific parameter, a rather large associated structure is copied to 
    the RAM area and this can cause the limits of calibration RAM space to be reached quickly.

    88
    3 Calibration Concepts
    Example: 
    The calibration RAM should be 400 bytes in size. Four structures are defined in the software 
    with the following parameters:
    Structure A: 250 bytes
    Structure B: 180 bytes
    Structure C: 120 bytes
    Structure D: 100 bytes
    When the user selects a parameter from structure A, the 250 bytes are copied from flash to 
    the calibration RAM, and the user has XCP access to all parameters located in structure A. 
    If the calibration task is limited to the parameters of this structure, the calibration RAM is 
    fully sufficient. However, if the user selects another parameter located in a different struc­
    ture, e.g. structure C, these 120 bytes must also be copied to the calibration RAM. Since the 
    calibration RAM can handle 400 bytes, the user can access all parameters of structures A 
    and C simultaneously.
    If another selected parameter is not located in structure C, but rather in structure B, the 180 
    bytes of structure B would have to be copied to RAM in addition to the 250 bytes of struc­
    ture A. However, since the space in RAM is inadequate for this, the user indeed has access to 
    the parameters of structure A, but not to the data of structure B, because the ECU cannot 
    execute the copy command.
    You can learn more about how this approach works in CANape. Start CANape with the 
     “AUTOSAR Single Pointered Demo” project. You will find more information on its use in 
     CANape on the “Introduction” page of the project.
    You will find a source code example under the “Demos” category at the Vector Download 
    Center. A code example on how to use the calibration concept is contained in the “XCP  Sample 
    Implementation” under <Installation DIR>\Samples\CAN\CAN MPC55xx\XCPDemo.
    3.5.2 Double Pointer Concept
    A disadvantage of the single pointer concept is that memory page switching is not easy to 
    implement. The calibration tool could simply describe the pointer table completely for page 
    swapping, but this is not feasible in a short period of time without resulting in temporary 
    inconsistencies and side effects. A tool­transparent implementation would double the mem­
    ory space requirement for the pointer table, because when switching the memory page into 
    flash, a copy of the previous pointer table would have to be created with RAM pointers.
    For applications with large pointer tables, a transparent implementation or a fully consis­
    tent switching, there is the option of extending the method to a double pointer concept. To 
    explain how this is done, we return once again to the initial RAM setting. 

    3.5 RAM Pointer Based Calibration Concept per AUTOSAR
    89
    Figure 57 represents the pointer table. It lies in RAM. As already mentioned, this table must 
    be copied from flash into RAM. As a result, this table lies in flash memory. If another pointer 
    is now used (a table pointer), which points to either the pointer table in RAM or in flash, one 
    arrives at a double pointer solution. 
    FLASH
    RAM
    Pointertable
    FLASH
    Pointertable
    RAM
    Tablepointer
    Figure 57: 
    Double pointer concept

    The parameter values are initially accessed via the table pointer. If the table pointer indi­
    cates the pointer table in RAM, the application essentially accesses the actual parameters 
    via the contents of the RAM pointer table. The low access speed and the creation of more 
    program code are disadvantages of this solution.
    3.6 Flash Pointer Based Calibration Concept 
    This method was patented several years ago by the company ZF Friedrichshafen under the 
    name “InCircuit2” and bears a strong resemblance to the pointer­based concept of AUTOSAR. 
    Here too, the application in the ECU accesses parameter data using a pointer table. How­
    ever, this pointer table is not located in RAM, but in flash instead. Changes to the pointer 
    table can therefore only be made by flash programming. A tool­transparent implementation 
    is not possible. The advantage lies in the RAM memory that is saved since it no longer con­
    tains the pointer table.
    You can find out how this approach works in CANape. Start CANape with the “InCircuit2” 
    project. You will find more information on its use in CANape on the “Introduction” page of 
    the project.

    4 Application Areas of XCP
    91
    4 Application Areas of XCP

    92
    4 Application Areas of XCP
    When ECU calibrators think about the use of XCP, they are usually fixated on use of the pro­
    tocol in the ECU.
    Simulink
    Slave
    Prototype or
    ECU Hardware
    Slave
    Measurement/
    XCP
    Calibration 
    Master
    Slave
    PC
    Hardware*
    EXE/DLL
    Slave
    HIL/SIL Systems
    Slave
    Figure 58: 
    Application areas and 

    * Debug Interfaces, Memory Emulator ...
    application cases
    In a survey of development processes, one encounters many different solution approaches 
    for the development of electronics and software. HIL (Hardware in the Loop), SIL (Software 
    in the Loop) and Rapid Prototyping are keywords here and they describe different scenarios. 
    They always have a “plant” and a “controller” in common. 
    Manipulated  Disturbance 
    Offset
    Variable
    Variable
    Reference Variable
    Controller
    Plant
    Controlled Variable
    (Set Value)
    (Actual Value)
    Figure 59: Plants and controllers
    In the context of automotive development, the controller is represented by the ECU and the 
    plant is the physical system to be controlled such as the transmission, engine, side mirrors, 
    etc.
    The rough subdivision is made between different development approaches according to 
    whether the controller or the plant runs in real or simulated mode. Some combinations will 
    be described in greater detail. 

    4.1 MIL: Model in the Loop 
    93
    4.1 Model in the Loop (MIL) 
    Simulink
    Controller Model
    Plant Model
    Figure 60: 
    Model in the Loop 
    in Simulink

    In this development environment, both the controller and the plant are simulated as a 
    model. In the example shown, both models run in Simulink as the runtime environment. The 
    capabilities of the Simulink runtime environment are available to you for analyzing the 
    behavior. 
    To realize the convenience of a measurement and calibration tool like CANape in an early 
    development phase, an XCP Slave can be integrated in the controller model. In an authoring 
    step, the Slave generates the A2L that matches the model and the user already has the full 
    range of convenient operating features with visualization of process flows in graphic win­
    dows, access to characteristic curves and maps and much more.
    Simulink
    Controller Model
    Plant Model
    CANape
    Simulink
    Figure 61: 
    XCP Server
    CANape as measurement 
    A2L
    and calibration tool 
    with Simulink models

    Neither a code generation step nor instrumentation of the model is necessary for this. Time­
    stamps are also included with transmissions over XCP. CANape completely adapts to the 
    time behavior of the Simulink runtime environment here. Whether the model is running 
    faster or slower than in real time is of no consequence. For example, if the functional devel­
    oper uses the Simulink Debugger in the model to step through the model, CANape still takes 
    the time transmitted via XCP as the reference time.

    94
    4 Application Areas of XCP
    4.2 Software in the Loop (SIL) 
    Simulink
    Controller Model
    Plant Model
    Code Generation
    Controller Model
    Figure 62: 
    Windows DLL
    Software in the Loop 
    with Simulink 

    environment
    In this development step, code is generated from the model of the controller, which is then 
    used in a PC­based runtime environment. Naturally, the controller may also have been devel­
    oped without any sort of model­based approach. The plant continues to be simulated. XCP 
    can be used to measure and calibrate the controller. If the controller originates from a 
     Simulink model, a code generation step (Simulink Coder with the target “CANape”) is used 
    to generate the C code for a DLL and the associated A2L. If the Controller development is 
    conducted based on manually written code, it is embedded in a C++ project that is delivered 
    with CANape.
    After compiling and linking, the DLL is used in the CANape context. With the support of the 
    XCP connection, the algorithms in the DLL can be measured and calibrated exactly as if the 
    application were already integrated in an ECU.
    Simulink
    Controller Model
    Plant Model
    Code generation
    Controller Model
    CANape
    Windows DLL
    A2L
    Figure 63: 
    CANape as SIL 
    development platform




    4.3 HIL: Hardware in the Loop
    95
    4.3 Hardware in the Loop (HIL) 
    Many different kinds of HIL systems are available. They range from very simple, cost­effec­
    tive systems all the way to very large and expensive expansion stages. The following figure 
    shows the rough concept:
    Controller Model
    HIL Platform
    I/O
    Plant Model
    ECU
    Figure 64: 
    HIL solution
    The controller algorithm runs in a microcontroller platform (e.g. the ECU), while the plant 
    continues to be simulated. Depending on the parameters and the complexity of the plant 
    and the necessary I/O, requirements of the HIL platform and the associated costs can rise 
    steeply. Since the ECU runs in real time, the model of the plant must also be computed in 
    real time.
    To now introduce XCP for optimization appears trivial, because another ECU is being added. 
    The whole system looks like this:
    Controller Model
    A2L
    HIL Platform
    I/O
    CANape
    Plant Model
    Figure 65: 
    HIL with CANape 

    ECU
    as measurement and 
     calibration  tool

    From CANape, the user has access to the algorithms in the ECU over XCP. 



    96
    4 Application Areas of XCP
    The Vector Tool CANoe is also used by many customers as a HIL system. With CANoe, a HIL 
    system might look like this:
    CANoe RT User PC
    Ethernet
    CANoe RT Server
    CAN
    LIN
    Plant Model
    MOST
    A2L
    FlexRay
    Digital I/O
    Analog I/O
    XCP
    CANape
    ECU
    Figure 66: 
    CANoe as HIL system

    The ability to access XCP data directly from CANoe for testing purposes results in the fol­
    lowing variant as well:
    CANoe RT User PC
    A2L
    Ethernet
    CANoe RT Server
    CAN
    LIN
    Plant Model
    XCP
    MOST
    FlexRay
    Digital I/O
    Analog I/O
    Figure 67: 
    CANoe as HIL system 
    with XCP access 

    ECU
    to the ECU
    Here the model of the plant runs on the CANoe real­time server. At the same time, XCP 
    access to the ECU is also realized from CANoe. This gives a tool simultaneous access to the 
    plant and the controller. 



    4.3 HIL: Hardware in the Loop
    97
    To round out the picture, yet another HIL solution option should be mentioned. The plant 
    might also run as a DLL in CANape. This gives the user full access to the plant and to the 
    controller over XCP. 
    ECU
    CANape
    Plant Model
    A2L
    Windows DLL
    XCP
    Plant
    A2L
    XCP
    ECU
    Figure 68: CANape as HIL solution
    4.4 Rapid Control Prototyping (RCP) 
    In this development phase, the control algorithm runs on real­time hardware instead of an 
    ECU. This situation often occurs when the necessary ECU hardware is not yet available. 
     Several platforms come in question as suitable hardware: from simple evaluation boards all 
    the way to special automotive­level hardware solutions, depending on which additional 
    requirements need to be fulfilled. Here too, integration with XCP helps in setting up an OEM­
    independent tool chain.
    Controller Model
    CANape
    EVA Board
    A2L
    XCP
    I/O
    Plant
    Figure 69: Solution for Rapid Control Prototyping
    The concepts “Rapid” and “Prototyping” describe the task very well. The aim is to develop a 
    functional prototype as quickly as possible, to use and test it in the runtime environment. 
    This just requires simple work steps throughout the entire process.

    98
    4 Application Areas of XCP
    In the literature, the RCP approach is frequently subdivided into two areas: fullpassing and 
    bypassing.
    As depicted in Figure 69, the entire controller runs on separate real­time hardware. This 
    method is known as fullpassing, because the entire controller runs on the controller hard­
    ware. It must have the necessary I/O to be able to interface with the plant. Very often, it is 
    only possible to fulfill technical requirements for the I/O with suitable power electronics. 
    It is not only the I/O that represents a challenge; often functional elements of the ECU soft­
    ware (e.g. network management) are needed to enable functionality in a more complex net­
    work. However, if a complete ECU is used for Rapid Control Prototyping instead of a general 
    controller platform, the complexity of the flash process, the size of the overall software, etc. 
    all work against the requirement for “rapid” development. 
    In summary: the use of an entire ECU as the runtime environment for the controller offers 
    the advantage that the necessary hardware and software infrastructure for the plant exists. 
    The disadvantage lies in the high degree of complexity. The concept of bypassing was devel­
    oped to exploit the advantages of the ECU infrastructure without being burdened by the 
    disadvantages of high complexity.
    4.5 Bypassing 
    When bypassing occurs, data is recorded from the ECU and processed outside the ECU, and 
    the result is written back to the ECU. As both measurement and writing to the ECU must 
    occur in sync with the ECU processes, DAQ and STIM mechanisms are used. At least two 
    DAQ lists are required, one with the DAQ direction (from Slave to Master) and one with the 
    STIM direction (from Master to Slave).
    In Figure 70, the ECU is connected to the plant. The necessary I/O and software compo­
    nents are available in the ECU. In the bypassing hardware, an algorithm A1 runs, which 
    occurs in Version A of the ECU. A1 is a new variant of the algorithm and should now be tried 
    out on the real plant.





    4.5 Bypassing
    99
    ECU
    A2L
    XCP
    Bypassing Hardware
    CANape
    Bypassing
    Hardware
    A2L
    XCP
    I/O
    Controller Model
    ECU
    Plant
    Figure 70: Basic principle of bypassing
    The bypassing hardware (a VN8900 device in the figure) and the ECU are interconnected 
    over XCP. One goal here is to get the data needed for algorithm A1 from the ECU by DAQ; 
    another goal is to stimulate the results of A1 back into the ECU. The following figure illus­
    trates the schematic flow:
    Bypassing Hardware
    Algorithm A’
    2.
    Bypassing
    Coordinator
    3.
    1. XCP 4.
    Algorithm A
    ECU
    Figure 71: 
    Bypassing flow

    Depicted in the ECU is a blue function block in which the algorithm A runs. To ensure that A1 
    can now be used, the data enters algorithm A as an input variable and it is measured from 
    the ECU by DAQ. 
    Step 1: In the ECU, the data is recorded and sent to the bypassing tool before the original 
    function is calculated in the ECU. Normally, the input data in functions A and A1 is are 
    identical. 
    Step 2: The data transferred via DAQ is now transferred to algorithm A1.
    Step 3: The results of the calculation of algorithm A1 are transferred to the bypassing tool. 
    Step 4: The data is transferred into the ECU via STIM. The ECU calculates algorithm A dur­
    ing this time. If the stimulated results are available and calculation of algorithm A is com­





    100
    4 Application Areas of XCP
    plete, the values calculated in the ECU are typically overwritten by the stimulated values of 
    algorithm A1.
    This makes it possible to use the value computed by algorithm A1 and not from A in the 
    ECU’s overall control process. This method permits using a combination of the rapid substi­
    tution of algorithms on the bypassing hardware that incorporates the I/O and the ECU’s 
    basic software. 
    Of course, performance limits of the transport protocol also affect bypassing. If short 
    bypassing times are needed, access to the ECU by DAQ and STIM may also be performed via 
    the controller’s debugging or trace interfaces. The Vector VX1000 measurement and cali­
    bration hardware converts the data into an XCP­on­Ethernet data stream from the control­
    ler interface. In this process, up to one megabyte of data can be transported into the ECU.
    XCP
    Bypassing Hardware
    Bypassing
    CANape
    Hardware
    A2L
    XCP
    Measurement & Calibration
    Hardware VX1000
    Debugging and 
    Trace Interface
    I/O
    Controller Model
    ECU
    Plant
    Figure 72: Bypassing with real-time bypassing hardware and fast ECU access
    In the figure, ECU access occurs via XCP on Ethernet, and calculation of the bypass algo­
    rithm occurs on separate bypassing hardware (VN8900 network interface) with a real­time 
    operating system. This means that the variance of the calculation time is considerably 
    smaller than with calculation on a laptop, as the processing time is not affected by other 
    applications.

    4.6 Shortening Iteration Cycles with Virtual ECUs
    101
    4.6 Shortening Iteration Cycles with Virtual ECUs 
    Stimulation with data is necessary to optimize the algorithm in the ECU with the help of 
    XCP. This can be done in the ECU in the framework of test drives. But there is yet another 
    solution that is available with XCP, in which the algorithm does not run on an ECU; rather it 
    runs on the PC in the form of executable code or as a model in Simulink in the form of a 
     “virtual ECU.” This virtual ECU does not need to run in real time, because in this case no con­
    nection to a real system exists. It can run significantly faster – depending on the PC’s com­
    puting power. 
    The algorithm is stimulated by a previously logged measurement file, which contains all 
     signals that are needed as input signals for the algorithm. The connection to CANape is set 
    up over XCP. The user can perform the parameterization and measurement configuration. 
    Afterwards, execution is started. Here the data from the test drive is fed into the algorithm 
    as stimulation and the desired measurement parameters from the application are simulta­
    neously measured out and saved to a measurement file. 
    Para-
    MDF
    meter
    test drive
    Application
    5. Analyze
    1. Set parameters
    2. Start
    Simulink/
    CANape
    DLL
    3. Send test drive data
    4. Measurement data
    Slave
    New
    MDF
    Figure 73: 
    Short calibration cycles 
    with virtual ECUs


    102
    4 Application Areas of XCP
    After the calculation has been completed, a new measurement file is available to the user 
    for analysis of ECU behavior. The length of time of the new measurement file precisely 
    matches the length of the input measurement file. If the duration of a test drive is one hour, 
    the algorithm on the PC might calculate the entire test drive in just a few seconds. Then a 
    measurement result exists, which corresponds to a test of one hour duration. Based on the 
    data analysis, the user makes decisions about parameterization and the iteration cycle is 
    repeated. 
     
    CANape
    Application as EXE or DLL on PC
    Parameterization
    Set values in
    via XCP
    workspace  
    Start
    Start
    Send measurement
    Calculate model
    data
    Receive new
    Send measurement 
    measurement data
    values from the model
    Analyze the
    End model calculation
    new data 
    New software version
    Figure 74: 
    Process flow with 
     virtual  ECUs

    To shorten the iteration cycles, the algorithm is always stimulated with the same data. That 
    makes the results with different parameters much more comparable, because the results 
    are only influenced by the parameters that differ.
    This process can of course be automated. The integrated script language of CANape per­
    forms an analysis of the measurement results, from which parameter calibration settings 
    are derived and automatically executed. It is also possible to have the process controlled by 
    an external optimization tool such as MATLAB over the CANape automation interface.

    5 Example of an XCP Implementation
    105
    5 Example of an XCP Implementation

    106
    5 Example of an XCP Implementation
    To make it possible for an ECU to communicate over XCP, it is necessary to integrate an XCP 
    driver in the ECU’s application. The example described below is of the XCP driver which you 
    can download free of charge at the Download Center of the Vector website (www.vector.
    com/xcp­driver). This packet also contains some sample implementations for various trans­
    port layers and target platforms. The driver consists of the protocol­Layer with the basic 
    functionality needed for measurement and calibration. It does not include features such as 
    Cold Start Measurement, Stimulation or flashing. You can purchase a full implementation 
    as a product that is integrated in the Vector CANbedded or AUTOSAR environment.
    The XCP protocol layer is placed over the XCP transport layer, which in turn is based on the 
    actual bus communication. The implementation of the XCP protocol layer only consists of a 
    single C file and a few H files (xcpBasix.c, xcpBasic.h, xcp_def.h and xcp_cfg.h). The examples 
    include implementations for various transport layers, e.g. Ethernet and RS232. In the case of 
    CAN, the transport layer is normally very simple and the various XCP message types are 
    mapped directly to CAN messages. There are then separate fixed identifiers for the Tx and 
    Rx directions.
    The software interface between the transport and protocol layers is very simple. It contains 
    just a few functions:
    >  When the Slave receives an XCP message over the bus, it first arrives in the communica­
    tion driver, which routes the message to the XCP transport layer. The transport layer 
    informs the protocol layer about the message with the function call XcpCommand().
    >  If the XCP protocol layer wishes to send a message (e.g. a response to an XCP command 
    from the Master or a DAQ message), the message is routed to the transport layer by a call 
    of the ApplXcpSend() function.
    >  The transport layer informs the protocol layer that the message was successfully sent by 
    the function call XcpSendCallBack().

    5 Example of an XCP Implementation
    107
    Application
    ointer
    etP
    vent
    ackground
    cpG
    cpE
    cpInit
    cpB
    pplX
    X
    X
    X
    A
    XCP Protocol Layer
    and
    end
    alback
    pplication – XCP Transport Layer Interface 
    m
    A
    cpS
    om
    endC
    pplX
    cpC
    A
    cpS
    X
    X
    XCP Transport Layer
    Physical Layer
    Figure 75: 
    Incorporating 

    Bus
    the XCP Slave 
    in the ECU code

    The interface between the application and the protocol layer can only be implemented via 
    four functions:
    >  The application activates the XCP driver with the help of XcpInit(). This call is made once 
    in the starting process.
    >  With XcpEvent(), the application informs the XCP driver that a certain event has occurred 
    (e.g. “End of a computational cycle reached”).
    >  The call XcpBackground() lets the XCP driver execute certain activities in background (e.g. 
    calculation of a checksum).
    >  Since the addresses in A2L files are always defined as 40­bit values (32­bit address, 8­bit 
    address extension), the XCP driver uses the function ApplXcpGetPointer() to obtain a 
    pointer from a A2L­conformant address.
    These interfaces are sufficient to integrate basic functionalities for measurement and cali­
    bration. Other interfaces are only needed for extended functions such as page switching, 
    identification or seed & key. They are described in detail in documentation for the driver.

    108
    5 Example of an XCP Implementation
    5.1 Description of Functions
    void XcpInit (void)
    Task:  
    Initialize the XCP driver.
    Description:  
    The application activates the XCP driver with XcpInit(). This command must be executed 
    exactly once before any sort of XCP driver function may be called.
    void XcpEvent (BYTE event)
    Task:
    The application informs the XCP driver about which event occurred. A unique event number 
    is assigned to each event here. 
    Description:
    In setting up the measurement configuration in the measurement and calibration tool, the 
    user selects which measured values should be synchronously acquired with which events. The 
    information on measured values and events originates from the A2L. The desired measure­
    ment configuration is communicated to the XCP driver in the form of DAQ lists. 
    Example of an event definition in an engine controller:
    XcpEvent (1); 
    // Event 1 stands for the 10­ms task
    XcpEvent (2); 
    // Event 2 stands for the 100­ms task
    XcpEvent (5); 
    // Event 5 stands for the 1­ms task
    XcpEvent (8); 
    // Event 8 is used for ignition angle synchronous measurements
    BYTE XcpBackground (void)
    Task:
    Execute background activities of the XCP driver. 
    Description:
    This function should be called periodically in a background or idle task. It is used by the  
    XCP driver, for example, to compute the checksum, because the computation of a longer 
    checksum in XcpCommand() could take an unacceptably long time. With each call of 
     XcpBackground(), a partial checksum of 256 bytes is computed. The duration of a checksum 
    computation therefore depends on the call frequency of XcpBackground(). There are no 
    other requirements for the call frequency or periodicity. The return value 1 indicates that a 
    checksum computation is currently running. 

    5.1 Description of Functions
    109
    void XcpCommand (DWORD* pCommand)
    Task:
    Interpret an XCP command.
    Description:
    This function must be called each time the transport layer receives a XCP frame. The para­
    meter is a pointer to the frame. 
    void ApplXcpSend (BYTE len, BYTE *msg)
    Task:
    Transfer a frame to be sent to the transport layer.
    Description:
    With this call, the protocol layer sends a message to the transport layer for transmission to 
    the Master. The call XcpSendCallBack implements a handshake method between the proto­
    col and transport layers. 
    BYTE XcpSendCallBack (void)
    Task:
    The protocol layer uses this callback to inform the transport layer that the last message 
    that was transferred to ApplXcpSend() was successfully transmitted.
    Description:
    The protocol layer does not call an ApplXcpSend() command until XcpSendCallBack() indi­
    cates that the prior message was successfully transmitted. XcpSendCallBack() returns the 
    value 0 (FALSE) if the XCP driver is in idle. If there are more frames to be sent, ApplX­
    cpSend() is called directly from XcpSendCallBack(). 
    BYTE *ApplXcpGetPointer (BYTE addr_ext, DWORD addr)
    Task:
    Convert an A2L­conformant address to a pointer.
    Description:
    The function maps the 40­bit A2L­conformant addressing (32­bit address + 8­bit address 
    extension) that is sent by the XCP Master to a valid pointer. The address extension can be 
    used, for example, to distinguish different address areas or memory types.

    110
    5 Example of an XCP Implementation
    5.2 Parameterization of the Driver
    In many respects, the XCP driver is scalable and parameterizable to properly handle the 
    wide variety of functional content, transport protocols and target platforms. All settings are 
    made in the parameter file xcp_cfg.h. In the simplest case, they appear as follows:
    /* Define protocol parameters */
    #define kXcpMaxCTO     8      /* Maximum CTO Message Length */
    #define kXcpMaxDTO     8      /* Maximum DTO Message Length */
    #define C_CPUTYPE_BIGENDIAN   /* byte order Motorola */
    /* Enable memory checksum */
    #define XCP_ENABLE_CHECKSUM
    #define kXcpChecksumMethod XCP_CHECKSUM_TYPE_ADD14
    /* Enable calibration */
    #define XCP_ENABLE_CALIBRATION
    #define XCP_ENABLE_SHORT_UPLOAD
    /* Enable data acquisition */
    #define XCP_ENABLE_DAQ                   
    #define kXcpDaqMemSize (512) /* Memory space reserved for DAQ */
    #define XCP_ENABLE_SEND_QUEUE
    For a CAN transport layer, the appropriate CTO and DTO parameters of eight bytes are set. 
    The driver must know whether it is running on a platform with Motorola or Intel byte order, 
    in this case a Motorola­CPU (Big Endian). The remaining parameters activate the function­
    alities: measurement, calibration and checksum computation. The algorithm for checksum 
    computation is configured (here summing of all bytes into a DWORD) and the parameter of 
    the available memory is indicated for the measurement (here 512 bytes). The memory is pri­
    marily needed to store the DAQ lists and to buffer the data during the measurement. The 
    parameter therefore determines the maximum possible number of measurement signals. In 
    the driver documentation you will find more detailed information on estimating the neces­
    sary parameters.

    6 Protocol Development Overview
    111
    6 Protocol Development Overview

    112
    6 Protocol Development Overview
    The following overview shows some of the essential developments of the XCP protocol, 
    which was standardized in 2003. 
    6.1. XCP Version 1.1 (2008)
    >  Description of the same XCP interface using two different physical interfaces within the 
    same A2L (e.g. “XCP on Vehicle CAN” and “XCP on Calibration CAN”)
    >  The new command WRITE_DAQ_MULTIPLE makes it possible to accelerate configuration 
    of the Slave. Two ODTs appearing in succession in a DAQ list can be communicated in a 
    single step. 
    >  High time synchronization via “TIMESTAMP_EVENT.” Timestamp information is communi­
    cated by the Slave. The trigger can be initiated via an external synchronization cable. 
    >  Compression of embedded A2L files
    All expansions are optional. XCP 1.1 is thus compatible with XCP 1.0.
    6.2. XCP Version 1.2 (2013)
    >   Parameters in the A2L for the definition of the required ECU resources via XCP­DAQ mea­
    surement configurations (e.g. RAM usage, CPU execution time and required transfer band­
    width for CAN or Ethernet). The XCP Master can access the parameters, calculate 
    resource usage for the measurement and warn the user if overshooting occurs. 
    >  Prioritization control by the Master for transfer of the measurement data via CAN. The 
    objective here is to not disturb the necessary communication flow of the vehicle CAN to 
    the greatest degree possible. 
    >  Calculation of the required bandwidth and limits for the transfer of data via TCP or UDP
    >  Description of XCP on CAN FD
    All expansions are optional. XCP 1.2 is thus compatible with XCP 1.1.

    6.3. XCP Version 1.3 (2015)
    113
    6.3. XCP Version 1.3 (2015)
    >  Improvement of the time correlation of XCP Slaves using multicast solutions found on the 
    same network 
    >   Time synchronization between XCP Slave timestamp and external clock, e.g. via IEEE 1588
    >  Checking of the bypassing data flow and error handling
    All expansions are optional. XCP 1.3 is thus compatible with XCP 1.2.


    114
    The Authors
    The Authors
     
     
    Andreas Patzer
    Mr. Patzer graduated in Electrical Engineering from the Technical University of 
    Karlsruhe. In his studies he specialized in measurement and control engineering 
    and information and industrial engineering. In 2003, he joined Vector Informatik 
    GmbH in Stuttgart. Andreas Patzer has supported XCP projects from the very 
    start, since XCP was standardized by ASAM e.V. in the same year he was hired.
    He currently manages the Customer Relations and Services area as a team 
    leader for the Measurement & Calibration product line.


    The Authors
    115
     
    Rainer Zaiser
    Mr. Zaiser has a degree in Electrical Engineering from the University of 
    Stuttgart. After graduating, he came directly to Vector Informatik GmbH in 
    autumn 1988, where he has helped to create many of the standards that have 
    become established in the automotive industry such as DBC, MDF, CCP, A2L 
    and to a large extent XCP. From the start, he headed up the Measurement & 
    Calibration and Network Interfaces product lines.

    116
    Table of Abbreviations and Acronyms
    Table of Abbreviations and Acronyms 
    A2L  
    File extension for an ASAM 2MC language file
    AML  
    ASAM 2 Meta Language
    ASAM  
    Association for Standardisation of Automation and Measuring Systems
    BYP  
    Bypassing
    CAL  
    Calibration
    CAN  
    Controller Area Network
    CCP  
    CAN Calibration Protocol
    CMD  
    Command
    CS  
    Checksum
    CTO  
    Command Transfer Object
    CTR  
    Counter
    DAQ  
    Data Acquisition, Data Acquisition Packet
    DTO  
    Data Transfer Object
    ECU  
    Electronic Control Unit
    ERR  
    Error Packet
    EV  
    Event Packet
    FIBEX 
    Field Bus Exchange Format 
    LEN  
    Length
    MCD  
    Measurement Calibration and Diagnostics
    MTA  
    Memory Transfer Address
    ODT  
    Object Descriptor Table
    PAG  
    Paging
    PGM  
    Programming
    PHY 
     Physical Layer respectively description of the chip connecting a link layer 
    device to a physical medium, for example Ethernet PHY 
    PID  
    Packet Identifier
    PTP 
    Precision Time Protocol 
    RES  
    Command Response Packet
    SERV  
    Service Request Packet
    SPI  
    Serial Peripheral Interface
    STD  
    Standard
    STIM  
    Data Stimulation Packet
    TCP/IP  
    Transfer Control Protocol / Internet Protocol
    TS  
    Timestamp
    UDP/IP  
    Unified Data Protocol / Internet Protocol
    USB  
    Universal Serial Bus
    XCP  
    Universal Measurement and Calibration Protocol
    Download 
    Sending of data from Master to Slave 
    Upload 
    Sending of data from Slave to Master

    Literature & Web Addresses
    117
    Literature
    XCP is specified by ASAM (Association for Standardisation of Automation and Measuring 
    Systems). 
    You will find details on the protocol and on ASAM at: www.asam.net
    Web Addresses
    Standardization committees:
    >  ASAM, XCP protocol­specific documents, A2L specification, www.asam.net
    Supplier of development software:
    >  MathWorks, information on MATLAB, Simulink and Simulink Coder, www.mathworks.com 
    >  Vector Informatik GmbH, demo version of CANape, free of charge and openly available 
    XCP driver (basic version), comprehensive information on the topics of ECU calibration, 
    testing and simulation, www.vector.com

    118
    Table of Figures
    Table of Figures 
    Figure 1: Fundamental communication with a runtime environment ..........................................8
    Figure 2: The Interface Model of ASAM............................................................................................... 9
    Figure 3: An XCP Master can simultaneously communicate with multiple Slaves ..................10
    Figure 4: Subdivision of the XCP protocol into protocol layer and transport layer ................14
    Figure 5: XCP Slaves can be used in many different runtime environments ............................15
    Figure 6: XCP packet ..............................................................................................................................19
    Figure 7: Overview of XCP Packet Identifier (PID) .........................................................................19
    Figure 8: XCP communication model with CTO/DTO ....................................................................20
    Figure 9: Message identification .........................................................................................................21
    Figure 10: Timestamp ............................................................................................................................21
    Figure 11: Data field in the XCP packet ............................................................................................22
    Figure 12: The three modes of the XCP protocol: Standard, Block and Interleaved mode ...24
    Figure 13: Overview of the CTO packet structure ..........................................................................25
    Figure 14: Trace example from a calibration process .....................................................................30
    Figure 15: Transfer of a parameter set file to an ECU’s RAM .....................................................31
    Figure 16: Hex window ..........................................................................................................................32
    Figure 17: Address information of the parameter “Triangle” from the A2L file ......................33
    Figure 18: Polling communication in the CANape Trace window ................................................34
    Figure 19: Events in the ECU ...............................................................................................................35
    Figure 20: Event definition in an A2L .................................................................................................35
    Figure 21: Allocation of “Triangle” to possible events in the A2L ................................................36
    Figure 22: Selecting events (measurement mode) for each measurement parameter .........36
    Figure 23: Excerpt from the CANape Trace window of a DAQ measurement .........................37
    Figure 24: ODT: Allocation of RAM addresses to DAQ DTO .........................................................38
    Figure 25: DAQ list with three ODTs ..................................................................................................39
    Figure 26: Static DAQ lists ...................................................................................................................40
    Figure 27: Dynamic DAQ lists ..............................................................................................................41
    Figure 28: Event for DAQ and STIM ...................................................................................................42
    Figure 29: Structure of the XCP packet for DTO transmissions..................................................43
    Figure 30: Identification field with absolute ODT numbers ..........................................................44
    Figure 31: ID field with relative ODT and absolute DAQ numbers (one byte) .........................44
    Figure 32: ID field with relative ODT and absolute DAQ numbers (two bytes) ......................44
    Figure 33:  ID field with relative ODT and absolute DAQ numbers as well as fill byte 
    (total of four bytes) ............................................................................................................45
    Figure 34: XCP Slave with free­running clock  .................................................................................46
    Figure 35: The clock of the XCP Slave is synchronized with the grandmaster clock  .............47
    Figure 36: Definition of which bus nodes send which messages .................................................49
    Figure 37: Representation of a CAN network ..................................................................................50
    Figure 38: Example of XCP­on­CAN communication .....................................................................51
    Figure 39: Representation of an XCP­on­CAN message ...............................................................51
    Figure 40: Illustration of a CAN FD frame ........................................................................................52
    Figure 41: Nodes K and L are redundantly interconnected ...........................................................54
    Figure 42: Communication by slot definition ...................................................................................54
    Figure 43: Representation of a FlexRay communication matrix..................................................55
    Figure 44: Representation of the FlexRay LPDUs ...........................................................................56

    Table of Figures
    119
    Figure 45: Allocation of XCP communication to LPDUs ................................................................57
    Figure 46: XCP packet with TCP/IP or UDP/IP ................................................................................58
    Figure 47: XCP­on­SxI packet ..............................................................................................................59
    Figure 48: Memory representation .....................................................................................................61
    Figure 49: Representation of driver settings for the flash area ..................................................63
    Figure 50: Representation of the block transfer mode ..................................................................66
    Figure 51: Parameters in a calibration window ...............................................................................72
    Figure 52: Signal response over time .................................................................................................72
    Figure 53: Initial parameter setting in RAM .....................................................................................82
    Figure 54: Initial situation after booting ...........................................................................................86
    Figure 55: Pointer change and copying to RAM ..............................................................................87
    Figure 56: Pointer table for individual parameters .........................................................................87
    Figure 57: Double pointer concept ......................................................................................................89
    Figure 58: Application areas and application cases .......................................................................92
    Figure 59: Plants and controllers ........................................................................................................92
    Figure 60: Model in the Loop in Simulink ..........................................................................................93
    Figure 61: CANape as measurement and calibration tool with Simulink models ...................93
    Figure 62: Software in the Loop with Simulink environment .......................................................94
    Figure 63: CANape as SIL development platform ..........................................................................94
    Figure 64: HIL solution ...........................................................................................................................95
    Figure 65: HIL with CANape as measurement and calibration tool ...........................................95
    Figure 66: CANoe as HIL system .........................................................................................................96
    Figure 67: CANoe as HIL system with XCP access to the ECU ...................................................96
    Figure 68: CANape as HIL solution .....................................................................................................97
    Figure 69: RCP solution .........................................................................................................................97
    Figure 70: Basic principle of bypassing ..............................................................................................99
    Figure 71: Bypassing flow .....................................................................................................................99
    Figure 72: Bypassing with real­time bypassing hardware and fast ECU access ................. 100
    Figure 73: Short calibration cycles with virtual ECUs ................................................................. 101
    Figure 74: Process flow with virtual ECUs ..................................................................................... 102
    Figure 75: Incorporating the XCP Slave in the ECU code .......................................................... 107

    120
    Appendix – XCP Solutions at Vector
    Appendix – XCP Solutions at Vector
    Vector made a significant effort in giving shape to the XCP standard. Its extensive know­
    how and vast experience were utilized to provide comprehensive XCP support:
    Tools
    >  The primary use area of CANape is in optimal parameterization (calibration) of electronic 
    control units (ECUs). During the system’s runtime, you calibrate parameter values and 
    simultaneously acquire measured signals. The physical interface between CANape and the 
    ECU is over XCP (for all standardized transport protocols) or CCP. 
    >  Complete tool chain for generating and managing the necessary A2L description files 
    (ASAP2 Tool-Set and CANape with the ASAP2 Editor).
    >   You  use  CANoe.XCP to access internal ECU values for testing and analysis tasks.
    ECU Interfaces
    The VX1000 measurement and calibration hardware offers the option of equipping ECUs 
    with an XCP­on­Ethernet interface. This involves connecting a Plug on Device (POD) to the 
    ECU for direct access to the controller, e.g. over DAP, JTAG, Nexus, etc. The POD transmits 
    the data to a base module, which operates as an XCP Slave and provides the data to the 
    XCP Master on the PC over XCP on Ethernet. This makes it unnecessary to have an XCP 
    Slave in the ECU. The user benefits from a high measurement data throughput rate of up to 
    50 MByte/s and short measurement intervals of less than 15 µs.
    Embedded Software
    Communication modules with separate transport layers for CAN, FlexRay and Ethernet:
     XCP  Basic – free download at www.vector.com/xcp­driver, only contains basic XCP func­
    tions. Configuration of the XCP protocol and modification of the transport layer are per­
    formed manually in the source code. You need to integrate XCP Basic in your project 
    yourself.
    >  XCP Professional – contains useful extensions to the ASAM specification and enables tool­
    based configuration. Available for Vector CANbedded basic software.
    >  MICROSAR XCP – contains the functional features of XCP Professional and is based on 
    AUTOSAR specifications. Available for Vector MICROSAR basic software.
    Services
    >  Consultation for using XCP in your projects 
     Integration of XCP in your ECU
    Training
    >  You can learn about the underlying mechanisms and models of the protocol in the “XCP 
    Fundamentals Seminar”.
    >   In  the  “CANape with XCP on FlexRay Workshop” you learn about FlexRay fundamentals 
    and the special aspects of XCP on FlexRay are explained, in particular dynamic bandwidth 
    management.


    Special XCP Support by CANape
    121
    Special XCP Support by CANape
    CANape was the first MCD tool to support the XCP 1.0 specification and was also the first 
    XCP on FlexRay Master on the market.
    A special technical feature of XCP on FlexRay is dynamic bandwidth management. Here, 
    CANape identifies the available bandwidth provided for XCP in the FlexRay ClusterP and it 
    allocates this bandwidth to the momentary application data traffic dynamically and very 
    efficiently. The available bandwidth is thereby optimally used for XCP communication. 
    Moreover, CANape has a DLL interface. It enables support of XCP on any desired (user­
    defined) transport layer. This lets you integrate any desired test instrumentation or proprie­
    tary protocols in CANape. A code generator supports you in creating the XCP­specific share 
    of such a driver.

    122
    Index
    Index
    A
    F
    A2L 
    9, 10, 25, 35, 40, 42, 56, 57, 62, 63, 68,  FIBEX 
    55 – 57
    71 – 76, 94, 108, 109, 116
    Flash memory 
    16, 17, 61 – 64, 67
    Address extension 
    29, 33, 38, 107, 109
    FLX_CHANNEL 
    56
    AML 
    25, 74, 116
    FLX_LPDU_ID 
    56
    ASAM 
    7 – 9, 60, 116
    FLX_SLOT_ID 
    56
    ASAP2 Tool­Set 
    76
    Fullpassing 
    98
    B
    G
    Bandwith optimization 
    34
    GET_CAL_PAGE 
    25, 62
    Bus load 
    34
    GET_DAQ_EVENT_INFO 
    65, 77
    BYP 
    116
    GET_DAQ_LIST_INFO 
    77
    Bypassing 
    45, 98, 100
    GET_DAQ_PROCESSOR_INFO 
    45, 65, 77
    GET_DAQ_RESOLUTION_INFO 
    65, 77
    C
    Grandmaster clock 
    47, 48
    CAN 
    7, 8, 14, 24, 29, 33, 38, 49, 50, 51, 55, 
     75, 116
    H
    CAN FD 
    52
    HIL 
    92, 95 – 97
    CCP 
    7, 8, 40, 49, 116
    CMD 
    25, 56, 116
    I
    CTO 
    21, 22, 25, 116
    IEEE 1588 
    47
    CTR 
    58, 59, 116
    IF_DATA 
    25
    CYCLE_REPETITION 
    56
    K
    D
    Commands 
    25
    DAQ 
    22, 32 – 45, 65, 67, 77, 99, 100, 106,  Compile 
    76, 80, 82, 94
    108, 116
    DAQ_KEY_BYTE 
    45
    L
    DBC 
    49
    Linking 
    80, 94
    Double Pointer Concept 
    88
    LPDU 
    56
    DOWNLOAD 
    30, 31, 66
    DTO 
    21, 22, 33, 37, 116
    M
    Maturity level 
    31 
    E
    MIL 
    93
    ECU 
    9, 74, 98, 99, 116
    MTA 
    30, 116
    ECU description file A2L 
    72 – 77
    Multicast 46, 
    113
    EEPROM 
    16, 31, 67
    ERR 
    25, 28, 116
    O
    Ethernet 57 – 59
    ODT 
    37 – 41, 43, 44, 65, 77, 116
    EV 
    29, 116
    OFFSET 
    56
    Event 
    35, 38 – 40, 42,65, 67, 77, 108

    Index
    123
    P
    PAG 
    116
    Page 
    61 – 63
    Page switching 
    62, 63
    Parameter 
    85
    PGM 
    116
    PID 
    8, 19, 21, 25, 43, 116
    Polling 
    33, 34, 36
    PTP 
    47
    R
    RAM 
    16 – 18, 30, 31, 37, 39, 63, 67, 80, 82, 
    85, 86, 88
    Reboot 
    32
    RES 
    21, 28, 56, 116
    S
    Sector  
    61 – 63
    Segment 
    61 – 63
    SEGMENT_NUMBER 
    62
    SERV 
    29, 116
    SET_CAL_PAGE 
    25, 62
    SET_MTA 
    30
    SHORT_UPLOAD 
    30, 33, 66
    SIL 
    92, 94
    Single Pointer Concept 
    86
    STIM 
    33, 42, 43, 45, 65, 77, 100, 116
    Stimulation 
    29, 68, 101
    T
    Task 
    108
    TCP/IP 
    57, 58, 116
    U
    UDP/IP 
    57, 58, 116
    USB 
    60, 116
    V
    Virtual ECU 
    101
    Volatile 81, 82
    VX1000 
    100

    Get More Information
    Visit our Website for:
    > News
    > Products
    > Demo Software
    > Support
    > Trainings Classes
    > Addresses 
    16
    /20
    0 | 12
    www.vector.com
    V3.

    Document Outline


    1.3.189 -

    MICROSAR RTE Release Notes

    MICROSAR RTE Release Notes

    Copyright (c) 2017 Vector Informatik GmbH. All rights reserved.


    Table of contents

    MICROSAR RTE 4.15.0 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.14.0 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.13.1 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.13.0 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.12.1 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.12.0 - DaVinci Developer Version 3.13.x
    MICROSAR RTE 4.11.0 - DaVinci Developer Version 3.12.x
    MICROSAR RTE 4.10.0 - DaVinci Developer Version 3.12.x
    MICROSAR RTE 4.9.0 - DaVinci Developer Version 3.12.x
    MICROSAR RTE 4.8.1 - DaVinci Developer Version 3.11.x
    MICROSAR RTE 4.8.0 - DaVinci Developer Version 3.11.x
    MICROSAR RTE 4.7.1 - DaVinci Developer Version 3.10.x
    MICROSAR RTE 4.7.0 - DaVinci Developer Version 3.10.x
    MICROSAR RTE 4.6.0 - DaVinci Developer Version 3.9.x
    MICROSAR RTE 4.5.0 - DaVinci Developer Version 3.9.x
    MICROSAR RTE 4.4.2 - DaVinci Developer Version 3.8.x
    MICROSAR RTE 4.4.1 - DaVinci Developer Version 3.8.x
    MICROSAR RTE 4.4.0 - DaVinci Developer Version 3.8.x
    MICROSAR RTE 4.3.0 - DaVinci Developer Version 3.7.x
    MICROSAR RTE 4.2.1 - DaVinci Developer Version 3.6.x
    MICROSAR RTE 4.2.0 - DaVinci Developer Version 3.6.x
    MICROSAR RTE 4.1.3 - DaVinci Developer Version 3.5.x
    MICROSAR RTE 4.1.2 - DaVinci Developer Version 3.5.x
    MICROSAR RTE 4.1.1 - DaVinci Developer Version 3.5.x
    MICROSAR RTE 4.1.0 - DaVinci Developer Version 3.5.x
    MICROSAR RTE 4.0.0 - DaVinci Developer Version 3.4.x
    MICROSAR RTE 3.90.0 - DaVinci Developer Version 3.3.x
    MICROSAR RTE 2.22.0 - DaVinci Developer Version 3.3.x
    MICROSAR RTE 2.21.0 - DaVinci Developer Version 3.2.x
    MICROSAR RTE 2.20.1 - DaVinci Developer Version 3.1.x
    MICROSAR RTE 2.20.0 - DaVinci Developer Version 3.1.x
    MICROSAR RTE 2.19.1 - DaVinci Developer Version 3.0 (SP5)
    MICROSAR RTE 2.19.0 - DaVinci Developer Version 3.0 (SP5)
    MICROSAR RTE 2.18.2 - DaVinci Developer Version 3.0 (SP4)
    MICROSAR RTE 2.18.1 - DaVinci Developer Version 3.0 (SP4)
    MICROSAR RTE 2.18.0 - DaVinci Developer Version 3.0 (SP4)
    MICROSAR RTE 2.17.6 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.5 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.4 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.3 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.2 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.1 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.17.0 - DaVinci Developer Version 3.0 (SP3)
    MICROSAR RTE 2.16.1 - DaVinci Developer Version 3.0 (SP2)
    MICROSAR RTE 2.16.0 - DaVinci Developer Version 3.0 (SP2)
    MICROSAR RTE 2.15.5 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.15.4 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.15.3 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.15.2 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.15.1 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.15.0 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.14.0 - DaVinci Developer Version 3.0 (SP1)
    MICROSAR RTE 2.13.0 - DaVinci Developer Version 3.0
    MICROSAR RTE 2.12.1 - DaVinci Tool Suite Version 2.3 (SP7)
    MICROSAR RTE 2.12.0 - DaVinci Tool Suite Version 2.3 (SP7)
    MICROSAR RTE 2.11.0 - DaVinci Tool Suite Version 2.3 (SP6)
    MICROSAR RTE 2.10.3 - DaVinci Tool Suite Version 2.3 (SP5)
    MICROSAR RTE 2.10.2 - DaVinci Tool Suite Version 2.3 (SP5)
    MICROSAR RTE 2.10.1 - DaVinci Tool Suite Version 2.3 (SP5)
    MICROSAR RTE 2.10.0 - DaVinci Tool Suite Version 2.3 (SP5)
    MICROSAR RTE 2.9.4 - DaVinci Tool Suite Version 2.3 (SP4)
    MICROSAR RTE 2.9.3 - DaVinci Tool Suite Version 2.3 (SP4)
    MICROSAR RTE 2.9.2 - DaVinci Tool Suite Version 2.3 (SP4)
    MICROSAR RTE 2.9.1 - DaVinci Tool Suite Version 2.3 (SP4)
    MICROSAR RTE 2.9.0 - DaVinci Tool Suite Version 2.3 (SP4)
    MICROSAR RTE 2.8.1 - DaVinci Tool Suite Version 2.3 (SP3)
    MICROSAR RTE 2.8.0 - DaVinci Tool Suite Version 2.3 (SP3)
    MICROSAR RTE 2.7.1 - DaVinci Tool Suite Version 2.3 (SP2)
    MICROSAR RTE 2.7.0 - DaVinci Tool Suite Version 2.3 (SP2)
    MICROSAR RTE 2.6.5 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.6.4 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.6.3 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.6.2 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.6.1 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.6.0 - DaVinci Tool Suite Version 2.3 (SP1)
    MICROSAR RTE 2.5.0 - DaVinci Tool Suite Version 2.3
    MICROSAR RTE 2.4.2 Beta - DaVinci Tool Suite Version 2.3 Beta
    MICROSAR RTE 2.4.1 Beta - DaVinci Tool Suite Version 2.3 Beta
    MICROSAR RTE 2.4.0 Beta - DaVinci Tool Suite Version 2.3 Beta
    MICROSAR RTE 2.3.0 - DaVinci Tool Suite Version 2.2 (SP3)
    MICROSAR RTE 2.2.4 - DaVinci Tool Suite Version 2.2 (SP2)
    MICROSAR RTE 2.2.2 - DaVinci Tool Suite Version 2.2 (SP1)
    MICROSAR RTE 2.2.1 - DaVinci Tool Suite Version 2.2
    Additional Information

    MICROSAR RTE 4.15.0 - DaVinci Developer Version 3.13.x

    RTE features

    • Support Data Conversion for Signals of Signal Groups
    • Allow usage of Activation Reason if the trigger communication does not cross partition boundaries
    • Support hexadecimal numbers as initial values for data types with compu methods (ESCAN00094837)

    Fixed issues

    • Runnables with mode disablings not called (ESCAN00094571)
    • RTE generator reports use of undefined property (ESCAN00094590)
    • Compiler error: Missing Rte_ts type definition (ESCAN00094683)
    • Compiler error: Missing Rte_QReturnType typedef (ESCAN00094685)
    • Reception of variable length signals not possible in variant projects (ESCAN00094686)
    • Protection hook is called when data is transferred between partition boundaries for queued sender-receiver communication and the BSW runs trusted (ESCAN00094756)
    • RTE13001 when negative hexadecimal init values are assigned to signed integers sint8 and sint16 (ESCAN00093877)
    • Configuration tool reports Rte90005 exception because of java.lang.ClassCastException (ESCAN00094781)
    • RTE49999 AST: Property is undefined (ESCAN00094870)
    • Compiler error: Use of undeclared identifier 'Rte_AckFlags' (ESCAN00094889)
    • Compiler error: Assignment of incompatible init value constant in case a receiver only receives a data element subset (ESCAN00094942)
    • Undefined A2L data type in record layout for axis application data type mapped to array implementation data type (ESCAN00094945)
    • Compiler error: too many Rte_CalprmRom_ initializers. (ESCAN00095034)
    • Compiler error: Unnamed buffer passed to Com_ReceiveSignalGroupArray (ESCAN00095230)
    • Compiler error: data conversion in fan-out scenario (ESCAN00095160)
    • Missing variable initialization for implicit connections with external and internal receivers (ESCAN00095460)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.14.0 - DaVinci Developer Version 3.13.x

    RTE features

    • Support for Transformer Error Handling
    • Improve counter handling to support different OS versions
    • Code optimizations (removed unused code)
    • Enhanced consistency checks

    Fixed issues

    • RTE01069 error in case a BSW module provides core service SWCs with mapped server runnables (ESCAN00091373)
    • Rte generator generates multiple Com_SendSignal/LdCom_Transmit calls to send a server response to an external client (ESCAN00093575)
    • Empty tempfolder is not deleted after RTE generation (ESCAN00093722)
    • Linker error: Generation of duplicated MainFunctions if component instance name is equal to the name of a basis software module (ESCAN00093929)
    • Compiler error: Missing Rte_CS_ClientQueue variable (ESCAN00094127)
    • Compiler error: Using user defined types as 'IOC Data Types' with Gen7 Os (ESCAN00094152)
    • Compiler error: Missing parameter for trusted function calls when Gen7 Os is used (ESCAN00094163)
    • RTE generator generates RTE_< OsSystemApplication >.c when Gen7 Os is used (ESCAN00094164)
    • RTE Analyzer reports missing prototypes for implicit inter runnable variables (ESCAN00094171)
    • Unexpected error occurs when component type descriptions contain dollar characters (ESCAN00094241)
    • Wrong calculated init and invalid values for data types with compu methods of type Scale-LinearAndTextTable (ESCAN00094320)
    • Compiler warning: Imcompatible type for initializer of component data structure (ESCAN00094400)
    • Wrong error message during generation for non-trusted SWCs and sender-receiver communication (ESCAN00094431
    • Compiler error: Missing Ioc-Container for sender-receiver communication in a single core system (ESCAN00094444)
    • Incorrect value for COM signal size when data conversion is used (ESCAN00094474)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.13.1 - DaVinci Developer Version 3.13.x

    Fixed issues

    • E2EXF reports errors of E2E state machine settings for transformers used on sender side (ESCAN00093041)
    • RTE generator generates unused Rte_TrustedCom_SendSignal (ESCAN00093048)
    • User code for Transformer MemMap.h and Compiler_Cfg.h is not backed up (ESCAN00093176)
    • DiagXf does not support Record of Array (ESCAN00093125)
    • RTE generator does not create IOCs in the OS configuration for single core systems (ESCAN00093127)
    • Compiler error: Missing retTransformer variable (ESCAN00092977)
    • E2EXF reports unique DataId value as not unique (ESCAN00093380)
    • MISRA deviation: MISRA-C:2004 Rule 1.1 and 5.1 (ESCAN00093382)
    • Wrong generated MemMap.h file for Gen7 Os (ESCAN00093463)
    • RTE Analyzer fails due to duplicated mainfunction (ESCAN00093309)
    • RTE49999 when SWC template generation tries to delete write protected files (ESCAN00093539)
    • Compiler error: Compilation error due to missing sender extension for IOCs (ESCAN00093540)
    • Wrong Det error during Rte_Start in Multi Core Systems (ESCAN00093562)
    • Data consistency problems due to usage of wrong interrupt lock APIs (ESCAN00093570)
    • The IOC const WriteOutParameters causes error in build (ESCAN00093569)
    • Compiler error: Use of undeclared identifier 'waitingTask' (ESCAN00093647)
    • Generation of RTE Analyzer stubs fails due to invalid characters in object descriptions (ESCAN00093650)
    • Compiler error: CheckDetErrorContinue function call uses optimized away trigger disabling flag (ESCAN00093653)
    • Compiler error: Redefinition of Sender/Receiver data element declaration (ESCAN00093654)
    • E2EXF uses wrong values for EndToEndTransformationComSpecProps attributes (ESCAN00093655)
    • Compiler error: Redefinition of enumeration data type (ESCAN00093656)
    • Compiler error: Opening and closing comment tokens in descriptions (ESCAN00093657)
    • Compiler error: Rte_InitMemory uses missing OS_CORE_ID define (ESCAN00093659)
    • E2EXF uses wrong values for EndToEndTransformationComSpecProps attributes (ESCAN00093668)
    • Data consistency problems because IOC API is called reentrantly in case of IOC queues with queue size 1 (ESCAN00093745)
    • Data consistency problems because IOC API is called concurrently in case of signal fan-in (ESCAN00093744)
    • Compiler error: Missing lengthBuffer variable (ESCAN00093752)
    • Compiler error: Rte_ComSendSignalProxyPeriodic accesses missing variable (ESCAN00093765)
    • Support propagation of transformed init values for unqueued S/R using DiagXf (ESCAN00093761)
    • Compiler warning: Unused ret variable (ESCAN00093773)
    • Issue error message if E2EXf is used in combination with implicit communication (ESCAN00093944)
    • Compiler error: Redefinition of data handle entry in component data structure for PR Ports using implicit communication (ESCAN00094010)
    • Compiler error: OS event not created for inactive/unconnected server runnables (ESCAN00093494)
    • Linker error: Unresolved external symbol *Xf_Init (ESCAN00094036)
    • Compiler error: invalid data type for data conversion (ESCAN00093964)
    • Compiler error: 'Rte_Idle_' is not a member of 'Rte_ClientIdleFlagsType' (ESCAN00094065)
    • Compiler error: Missing extern declaration for Rte_InitState (ESCAN00094026)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.13.0 - DaVinci Developer Version 3.13.x

    RTE features

    • Support for SpinlockLockMethod LOCK_WITH_RES_SCHEDULER
    • Enhanced support for MICROSAR OS (Generation 7)
    • Enhanced VTT support
    • Support for CyclicTriggerImplementation=None when schedule tables are used
    • MISRA improvements
    • Improved support for large arrays that are used for sender-receiver communication

    Fixed issues

    • Compiler error: Pim variable name conflicts with parameter name of server runnable in RteAnalyzer stub (ESCAN00091780)
    • Invalidation of N to 1 data element does not work (ESCAN00092136)
    • Rte does not map core specific application variables in respective areas accessible only by the specific cores (ESCAN00092359)
    • Wrong Data Type for OsScheduleTable counter variable (ESCAN00092481)
    • Both function and macro are generated for Rte_SwitchAck in case of an unconnected port (ESCAN00092489)
    • Wrong on transition triggered runnable activation (ESCAN00092503)
    • Rte invalidate triggers protection hook (ESCAN00092513)
    • Compiler error: Missing Rte_QIndexType (ESCAN00092674)
    • Rte_IStatus returns wrong return value in case no write access exists (ESCAN00092773)
    • Hooks for Rte_Switch and Rte_SwitchAck are not generated for unconnected ports (ESCAN00092851)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.12.1 - DaVinci Developer Version 3.13.x

    Fixed issues

    • Compiler error: empty data conversion (ESCAN00091259)
    • Compiler error: multiple variable declarations for data conversion in task (ESCAN00091277)
    • Compiler warning: unreferenced local variable for data conversion in task (ESCAN00091367)
    • Missing RAM initialization for Calibration Parameter (ESCAN00091477)
    • Use of uninitialized value in case no core with id 0 exists (ESCAN00091629)
    • RTE Validator creates wrong error message when a Background Trigger and a MICROSAR OS (Generation 7) is used (ESCAN00091781)
    • Add support for SpinlockLockMethod LOCK_WITH_RES_SCHEDULER (ESCAN00091839)
    • RTE950005 when the configuration contains AR3 modules (ESCAN00091872)
    • Missing Union Type field in SomeIpXf Transformer condition (ESCAN00092091)
    • Wrong generated MemMap sections for Gen7 OS (ESCAN00092157)
    • Wrong MemMap section for calibration SWCs (ESCAN00092183)
    • Wrong handling of trusted function parameters for OUT and INOUT parameters for OS Core 7 (ESCAN00092221)
    • Protection hook is called when OUT or INOUT arguments are written in a server runnable and the BSW runs trusted (ESCAN00092222)
    • Nonqueued sender receiver API returns uninitialized values in case NvBlock descriptors are not mapped to NvBlock (ESCAN00092224)
    • Nonqueued sender receiver API returns uninitialized value in case of connections to external and internal receivers when data transformation is used (ESCAN00092263)
    • RTE generation aborts with an error message when a PIM is used without AUTOSAR data type (ESCAN00092332)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.12.0 - DaVinci Developer Version 3.13.x

    RTE features

    • Support of connections between Nv ports and S/R ports
    • Support of Diagnostic Data Transformation (DiagXf)
    • Support of Data Conversion between integer data types on network signals and floating point data types on SWC ports
    • Support of counters from different partitions that are assigned to the same core

    Fixed issues

    • Unexpected error for Client/Server call chains with unmapped server runnables (ESCAN00090304)
    • Inter partition Rte_Call triggers Protection Hook (ESCAN00090432)
    • Autonomous error responses are also sent in case of E2EXf hard errors (ESCAN00090459)
    • Unrecognized invalid task mapping for basic tasks (ESCAN00090551)
    • RteInitializeImplicitBuffers leads to uninitialized value error during RTE generation (ESCAN00090569)
    • Missing length checks for retransformer (SomeIpXf) (ESCAN00090570)
    • Compiler error: Wrong initialization for NV Block Descriptor without defined init value (ESCAN00090575)
    • RTE reports unexpected error in case basic tasks with multiple cyclic triggers are used (ESCAN00091165)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.11.0 - DaVinci Developer Version 3.12.x

    RTE features

    • Support of application data types of category map, curve and axis
    • Selection of COM Timeout Source (SWC or SIGNAL)
    • Support of 1:n Inter-ECU S/R with transmission acknowledgement enabled
    • Support E2EXf for primitive byte arrays without serializer
    • Autonomous error responses for Inter-ECU C/S with SomeIpXf
    • Support Sub-Element Mapping for Nv Ports
    • Support of VTT DualTarget Generation with MICROSAR OS (Generation 7)

    Fixed issues

    • Compiler error: Wrong extern declaration of RTE buffers for optimized macro implementation in Sub-Element Mapping use case (ESCAN00089303)
    • Implicit read accesses for NV port leads to uninitialized value error during RTE generation (ESCAN00089205)
    • NV Block SWC without NV Block Descriptors leads to generator error (ESCAN00089894)
    • OnDataSendCompleted event fired twice (ESCAN00089500)
    • Compiler error: "& requires l-value" for RTE_PTR2ARRAYBASETYPE_PASSING in Rte_IWrite macro (ESCAN00089384)
    • SomeIpXf uses wrong compiler abstraction in type cast (ESCAN00089261)
    • Measurement Support for NV PR Ports fails (ESCAN00089798)
    • RTE - An unexpected error occurred (ESCAN00090240)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.10.0 - DaVinci Developer Version 3.12.x

    RTE features

    • General support of AUTOSAR 4.2.2
    • Trigger Transmit API with SduLength In/Out according to AUTOSAR 4.2.2
    • Support of MICROSAR OS (Generation 7)
    • Support of literal prefix for SWCs
    • Support for VFB Trace Hooks for APIs of unconnected Ports
    • Support for NvMAutomaticBlockLength parameter of MICROSAR NvM
    • Enhanced SomeIpXf support
    • Support of E2E profiles 1 and 2 for SomeIpXf and E2EXf
    • Support of E2E profiles 4, 5 and 6 for ComXf and E2EXf
    • MISRA improvements
    • Improved SWC Template Generation (added array data type as comment)

    Fixed issues

    • RTE generator still does not support transformed signals without Developer Workspace (ESCAN00087532)
    • Incorrect initialization of NvM variable (ESCAN00087588)
    • Implicit read accesses for NV port leads to uninitialized value error during RTE generation (ESCAN00087848)
    • Compiler error: Empty macro implementation for IRead API (ESCAN00087956)
    • Activation reason does not always work for asynchronous server call return triggered runnables (ESCAN00087989)
    • Compiler warning: internalIndexNextMode is set but never used (ESCAN00088002)
    • Generator error in case of NvBlock SWCs with runnables when no NvM service component exists (ESCAN00088006)
    • RTE generator aborts with RTE49999 SystemSignal 'Name' sent externally via SignalPort 'Name2' has no mapped COM/LDCOM signal! (ESCAN00088060)
    • Compiler error: undeclared identifier 'Rte_ActivationReasonType' (ESCAN00088078)
    • LdCom TriggerTransmit Callback do not return the propagated init value (ESCAN00088124)
    • Compiler error: RTE code accesses implicit buffer that does not exist (ESCAN00088128)
    • Compiler error: Data transformation with queued communication and variable size arrays (ESCAN00088284)
    • RTE - An unexpected error occurred (ESCAN00088297)
    • Missing NvM MainFunction task mapping leads to unexpected RTE error message (ESCAN00088318)
    • Compiler warning: conversion from 'uint16' to 'PduLengthType', possible loss of data (ESCAN00088461)
    • Compiler error: pointers to different types (ESCAN00088506)
    • RTE Generator aborts generation with RTE01119 Unsupported port interface mapping on Client/Server connection (ESCAN00088528)
    • Compiler error: Runnable hook does not consider ServerArgumentImplPolicy (ESCAN00088566)
    • Rte_Read / Rte_IStatus return wrong status when the first received values are invalid and if the init value equals the invalid value (ESCAN00088615)
    • Compiler error: duplicated definition of implicit inter-runnable variable (ESCAN00088719)
    • Compiler error: syntax error - token "," inserted before "*" (ESCAN00088894)
    • Compiler warning: argument is incompatible to parameter type for operation invoked runnables (ESCAN00088934)
    • Wrong default memory sections for NvBlock parameter groups (ESCAN00088966)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.9.0 - DaVinci Developer Version 3.12.x

    RTE features

    • Support of BSW multiple partition distribution
    • Support of activation reason for runnable entities (Rte_ActivatingEvent)
    • Support for initialization of send buffers for implicit S/R communication
    • Generation of VFB Trace Hook calls only if hooks are configured
    • Support of 64 events per task if supported by the MICROSAR OS
    • Support of sub-element mapping for Rx-GroupSignals
    • Support for RteUseComShadowSignalApi
    • MISRA improvements
    • Transformer improvements

    Fixed issues

    • Null pointer exception when complex data mapping exists for a primitive signal (ESCAN00084967)
    • Missing target of reference OsTaskAccessingApplication (value=BSWApplication) (ESCAN00085623)
    • Rte VFB Trace hooks with client prefix are not generated (ESCAN00085725)
    • Compiler error: variable 'ret' (Std_ReturnType of Rte_Feedback) is used before set (ESCAN00085853)
    • Dynamic length signals cannot be received (ESCAN00085877)
    • Rte_SwitchAck uses wrong / old VFB trace hook names starting with Rte_FeedbackHook (ESCAN00085901)
    • RTE generator does not support transformed signals without Developer Workspace (ESCAN00085971)
    • Missing OnDataSendCompletion event for sender/receiver communication without reader (ESCAN00086053)
    • Compiler error: Rte_ComSendSignalProxyPeriodic not declared (ESCAN00086065)
    • Compiler error: Missing Rte_MemCpy32 (ESCAN00086066)
    • Missing buffer for unqueued S/R inter-ECU communication in Rte_Type.h (ESCAN00086105)
    • Missing OnDataReception event for NV data element (ESCAN00086145)
    • Compiler warning: Return value of Rte_Feedback API is possibly uninitialized (ESCAN00086169)
    • Rte_Read returns inconsistent NV block data during reset to default data (ESCAN00086212)
    • Rte_Feedback returns wrong transmission acknowledgement state (ESCAN00086213)
    • Rte_Receive reports RTE_E_LOST_DATA wrongly in case of external communication (ESCAN00086215)
    • Rte_Read returns wrong RTE_E_NEVER_RECEIVED status or Rte_IsUpdated returns wrong status (ESCAN00086216)
    • Invalid multiplicity error after creation of OsScheduleTables during calculation (ESCAN00086320)
    • Compiler error: Syntax error in Rte_Call API for inter-ECU client/server connections (ESCAN00086363)
    • AST Property 'ImplementedByRte' is undefined (ESCAN00086381)
    • Runnable with multiple cyclic triggers is not triggered due to a wrong mode disabling condition (ESCAN00086400)
    • SuspendOSInterrupts called twice (ESCAN00086404)
    • Rte_Read returns incorrect return code: RTE_E_UNCONNECTED (ESCAN00086475)
    • Rte_SwitchAck returns incorrect return code after initialization (ESCAN00086502)
    • Unprotected bitfield write in Rte_Result (ESCAN00086553)
    • Compiler error: Missing Rte_QAddElement (ESCAN00086630)
    • Compiler error: Syntax error in Rte_Hook.h (ESCAN00086632)
    • Synchronous C/S call from ServerRunnable called by NvBlockSWC returns wrong return value (ESCAN00086726)
    • osDisableLevelKM called from user mode (ESCAN00086751)
    • Waiting task list not mapped to NOCACHE section (ESCAN00086752)
    • Server Runnable called by NvMNotifyJobFinished or NvMNotifyInitBlock callback is not executed in the context of the task it is mapped to (ESCAN00086791)
    • Compiler error: Conversion of record types not possible for 1:N FanIn with incompatible data types (ESCAN00086916)
    • Rte_Read / Rte_IStatus don't return RTE_E_OK when HandleNeverReceived is active (ESCAN00086995)
    • Non nestable interrupt locks called nestedly for inter-ECU C/S communication (ESCAN00086999)
    • Inter-ECU transmits do not work when the sender is not within the BSW partition (ESCAN00087001)
    • Inter ECU C/S communication does not work from non BSW core (ESCAN00087002)
    • Non nestable interrupt locks called nestedly for implicit reads with handle invalid keep or never received (ESCAN00087007)
    • Rte_Read / Rte_IStatus don't return RTE_E_OK when HandleInvalidKeep is active (ESCAN00087025)
    • NullPointerException in Rte generator during calculation after deleting existing tasks (ESCAN00087124)
    • Optimizations are not disabled for ASIL D partitions (ESCAN00087288)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.8.1 - DaVinci Developer Version 3.11.x

    RTE features

    • Support for platform settings in VTT DualTarget use case
    • MISRA improvements

    Fixed issues

    • Compiler error due to missing include of NvM.h (ESCAN00084659)
    • Compiler error: Wrong initializer for NvBlockSWCs in systems with OsApplications (ESCAN00084792)
    • RTE generator creates a single alarm for schedulable entity triggers that are mapped to different tasks (/cores) (ESCAN00084937)
    • SOMEIPXF: Wrong min size checks for unions that contain elements with different sizes in RX path (ESCAN00085076)
    • Compiler error: wrong access to missing serializedUnionLength variable in SOMEIPXF (ESCAN00085085)
    • Wrong return value for unconnected Rte_Read (ESCAN00085093)
    • Com group signal settings are not synchronized in case of signal group degradation (ESCAN00085281)
    • Compiler error: Duplicated Rte_COMCbk in case of variant signals (ESCAN00085371)
    • Rte_Read / Rte_IStatus don't return RTE_E_NEVER_RECEIVED when the first received values are invalid and if the initial value equals the invalid value (ESCAN00085471)
    • Rte_Read returns incorrect status for connected ports without read access (ESCAN00085586)
    • Compiler error: Wrong declarations in case of N:1 S/R communication with invalidation enabled and multiple OsApplications (ESCAN00085595)
    • Wrong event handling for Data Reception Triggers for NV data elements mapped to NvBlockDescriptors of complex type (ESCAN00085687)
    • Rte_SwitchAck returns RTE_E_NO_DATA instead of RTE_E_TIMEOUT on timeout (ESCAN00085688)
    • Rte_IStatus returns incorrect status (ESCAN00085694)
    • Rte_Receive reports RTE_E_LOST_DATA wrongly (ESCAN00085736)
    • Rte_Read reports RTE_E_NEVER_RECEIVED wrongly (ESCAN00085737)
    • Wrong initialization of NvBlock mirror buffer in Rte_NvMNotifyInitBlock function (ESCAN00085738)
    • Rte_IsUpdated reports IsUpdated status wrongly (ESCAN00085739)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.8.0 - DaVinci Developer Version 3.11.x

    RTE features

    • Support of COM based Transformer ComXf
    • Support of different strategies for writing NV data in Nv Block SWCs
    • Support of C/S Interfaces for Nv Block SWCs
    • SWC Template generation provides user sections for documentation of runnable entities
    • Wide character support in paths
    • Improved counter selection for operating systems with multiple OS applications
    • Support of optimized macro implementation for SchM_Enter and SchM_Exit
    • Enhanced OS Spinlock support
    • Enable optimizations in QM partitions
    • Improved command line handling regarding paths which spaces and '-' signs
    • MISRA improvements

    Fixed issues

    • Generation error: GenAPI error for record elements with init values TRUE/FALSE (ESCAN00083111)
    • Use of uninitialized value in concatenation when a data constraint with [0,0] exists (ESCAN00083589)
    • Asynchronous Rte_Call API for inter-ECU C/S communication without timeout does not check LdCom_IfTransmit return value (ESCAN00083611)
    • Compiler error: access to missing task variable in Rte_Call API (ESCAN00083765)
    • Compiler error: Missing structure for .Rte_CallCompleted access (ESCAN00083779)
    • Compiler error: duplicate members in TxUpdateFlagsType (ESCAN00083791)
    • Receiver that is not mapped to the BSW partition reads invalid data (ESCAN00083832)
    • Mode Declaration Groups with EXPLICIT_ORDER do not work correctly (ESCAN00083841)
    • Compiler error: Unconnected IWriteRef accesses unknown UNDEFINED structure element (ESCAN00083854)
    • Generator reports invalid array access (ESCAN00083943)
    • Compiler error: Missing initializer for NV data element (ESCAN00084379)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.7.1 - DaVinci Developer Version 3.10.x

    RTE features

    • Allow generation of RTE for unconnected P-Ports without initial value
    • Support for implicit/explicit OS ScheduleTable synchronization strategy
    • Improve OS counter selection for operating systems with multiple OS applications

    Fixed issues

    • Compiler error: Undeclared identifier Rte__AckFlags (ESCAN00081744)
    • OsScheduleTable generation is prevented by incorrect error message (ESCAN00082156)
    • Wrong order of modes for ModeDeclarationGroup of category EXPLICIT_ORDER (ESCAN00082564)
    • Wrong XcpEvent time stamp unit (ESCAN00082628)
    • Rte_Read / Rte_IStatus don't return RTE_E_INVALID before the first reception of a COM signal / signal group when the initial value equals the invalid value (ESCAN00082764)
    • Generator reports use of uninitialized values (ESCAN00082888, ESCAN00082918)
    • Compiler error: Missing extern declaration for queued sender-/receiver buffer (ESCAN00082942)
    • Failing uninit Det check due to wrong condition (ESCAN00083162)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.7.0 - DaVinci Developer Version 3.10.x

    RTE features

    • Support of background triggers
    • Support of data prototype mappings
    • Support of bit field text table mappings
    • Support of union data types
    • Support of UTF16 data type serialization in the SOME/IP transformer
    • Runtime optimization in the generated RTE code by usage of optimized interrupt locking APIs of the MICROSAR OS
    • Support of further E2E profiles for data transformation with the SOME/IP and E2E transformer
    • Support of OS counters with tick durations smaller than 1s
    • Buffer optimization for implicit communication in the same preemption area
    • Further use cases where macro optimized APIs are used
    • Support of data types with local type references using compu methods
    • Several enhancements in command line parameter processing

    Fixed issues

    • Add support for connection of data types with compu method to data types without compu method (ESCAN00081084)
    • Missing on data reception trigger in case of NvRAM SWCs (ESCAN00081085)
    • Missing identifier in Rte_Read macro definition (ESCAN00081148)
    • Mismatching memory sections for declaration and extern declaration (ESCAN00081221)
    • Compiler error: Empty data structures for mode management (ESCAN00081311)
    • Compiler warning: Rte_Mode API is generated twice (ESCAN00081313)
    • Wrong generated OS Application references to OsScheduleTables (ESCAN00081435)
    • Generator error: No OperationPort found for client (ESCAN00081520)
    • Wrong NvMRomBlockDataAddress added to the NvM configuration (ESCAN00081525)
    • Missing error message leads to wrong-generated task body in special use-case (ESCAN00081531)
    • Missing prototypes for server runnables in case of direct server calls over OS application boundaries (ESCAN00081646)
    • Compiler error: Missing Rte_Mode API (ESCAN00081676)
    • Wrong initialization of Rte_ModeQueue with enhanced Mode API (ESCAN00081748)
    • Wrong error message that a Port Data Structure is needed for a PR-Port (ESCAN00081757)
    • Rte_InitMemory assigned to NO_INIT instead of INIT_MEMORY (ESCAN00081821)
    • Calibration parameters using application data types do not consider data constraints and compu method in A2L generation (ESCAN00081911)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.6.0 - DaVinci Developer Version 3.9.x

    RTE features

    • Enhanced PR port support. Now bi-directional ports can also be used for Nv ports and mode ports.
    • Support of bit field data types (CompuMethods with category BITFIELD_TEXTTABLE)
    • Runtime optimized copying of large data
    • Support for SW-ADDR-METHOD on RAM blocks of NvRAM SWCs
    • Add support for multiple Nv mappings per element of Nv block descriptors
    • Several enhancements of the SOME/IP transformer support
    • Enhanced RTE / OS interaction regarding TickTime configuration based on RteExpectedTickDuration configuration parameter

    Fixed issues

    • Compiler error: Missing function Rte_Task_SetEvent (ESCAN00077993)
    • Compiler warning: unused variable within Rte_InitMemory() (ESCAN00078602)
    • Compiler error: WaitEvent call without arguments (ESCAN00078781)
    • NV-Ports in combination with atomic SWCs (ESCAN00079443)
    • Null pointer exception for SchM only configurations with COM/LDCOM (ESCAN00079503)
    • Compiler warning: implicit main function declaration (ESCAN00079558)
    • Missing Interrupt Unlock for Implicit IOC accesses (ESCAN00079628)
    • Generator error when no SystemTimer is configured (ESCAN00079904)
    • Compiler error: Wrong typedef order for pointer data types (ESCAN00079916)
    • RTE Generator creates NvBlock with the name UNDEFINED (ESCAN00080227)
    • Wrong buffer name for NV Ports with missing port access (ESCAN00080377)
    • Missing check for secondsPerTick values smaller than 1s for MICROSAR OS Counters (ESCAN00080404)
    • Wrong error message that the configuration contains no counter with sufficient resolution if a non MICROSAR OS is used (ESCAN00080405)
    • Incomplete propagation of NV mapping (ESCAN00080447)
    • Wrong Rte_IWrite/Rte_IInvalidate macro generation for unconnected ports of multi instantiated SWCs (ESCAN00080726)
    • Compiler error: Multiple Instantiated SWCs with Implicit Communication (ESCAN00080878)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.5.0 - DaVinci Developer Version 3.9.x

    RTE features

    • Extended support for PR-Ports (Buffer overlaying for explicit S/R communication)
    • Added OS schedule table support for implementation of cyclic triggered executable entities. This allows mapping of multiple cyclic triggers with different cycle times and offset into a basic task.
    • E2E protection for C/S inter ECU communication using profile 4
    • Post-Build Selectable (Identity Manager)
    • Support Rte_DRead API (DataReceivePointByValue)
    • Improved handling of mode request type maps and mode declaration groups
    • Support compatibility for mode port interfaces using mode declaration group prototypes with different short names
    • Support for uint64 and sint64 Implementation Data Types as AUTOSAR Platform Types
    • Support for ServerArgumentImplPolicy = useArrayBaseType

    Fixed issues

    • Can't handle Utf-8 character in DVRteGenPath from Settings_Rte.xml file (ESCAN00078713)
    • Compiler error: Undeclared variables used by SOME/IP Transformer (only for Client/Server communication) due to merge scenario (ESCAN00078938)
    • SOME/IP Transformer doesn't convert between AUTOSAR size indicator and SOME/IP length indicator (relevant for variable arrays) (ESCAN00079000)
    • Trigger Transmit callback doesn't send initial values / valid SOME/IP messages if LdCom_IfTransmit() wasn't called previously by the RTE (ESCAN00079003)
    • Invalid usage of same transformer for implementation data type and application data type (mapped to same implementation data type) (ESCAN00079185)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.4.2 - DaVinci Developer Version 3.8.x

    Fixed issues

    • Linker error: missing Rte_TrustedCom* function (ESCAN00077991)
    • RTE49999 An unexpected error occurred for Asynchronous Client/Server calls (ESCAN00078067)
    • Null Pointer Exception during Rte calculation when no sw component instances exist (ESCAN00078070)
    • Compiler error: (void)SetRelAlarm(UNDEFINED (ESCAN00078128)
    • Compiler error: Missing declaration for Rte_CalprmInitRam (ESCAN00078208)
    • Rx variables of Com receive signal proxy (only multicore and memory protection use case without IOCs) are not initialized at runtime (ESCAN00078290)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.4.1 - DaVinci Developer Version 3.8.x

    RTE features

    • Support for application ports at service components

    Fixed issues

    • RTE 49999 warning and compilation error when Inter-ECU client/server communication is used (ESCAN00076662)
    • Initial reception of invalid signals does not invalidate never received and is updated status (ESCAN00076685)
    • Generator error: wide character in print (ESCAN00076804)
    • Compiler error: Wrong initialization of Inter-Runnable Variables of composite data types in memory protected EcuC (ESCAN00076850)
    • Invalid handling of application datatypes with compu method that are mapped to float implementation datatypes (ESCAN00076908)
    • Wrong transformer buffer size calculation for string data types that are part of a array element (ESCAN00077031)
    • Enhanced Mode API returns wrong previous and next mode during transition at provide ports (ESCAN00077099)
    • Compiler error: Rte_Call API accesses missing task variable (ESCAN00077186)
    • Internal Generator Error: Deep recursion in PropagateServerRunnableInformation (ESCAN00077388)
    • Compiler error: Incompatible type in assignment (ESCAN00077480)
    • Compiler error: Rte_Type.h contains structure definitions without name (ESCAN00077571)
    • RxInvalidate flags are not reset in COM callback on data reception if they are realized by IOCs (ESCAN00077629)
    • Do not reuse cached SystemInfo when it was generated without ECUC (ESCAN00077671)
    • DataSendCompletion Event is fired too early in case of 1:N communication with external receiver (ESCAN00077770)
    • Rte Generator creates ComFilterAlgorithm parameter without value (ESCAN00077823)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.4.0 - DaVinci Developer Version 3.8.x

    RTE features

    • Inter-Ecu C/S Communication using SOME/IP transformation
    • S/R Serialization using SOME/IP and optionally E2E transformation
    • Support LdCom
    • Basic support for PR-Ports. Currently no buffer overlaying is implemented. The read and write APIs of the PR-Port uses separate buffers.
    • Support for unconnected client ports for synchronous C/S communication
    • Support for data constraints on type reference data type
    • Improved support for 3rd Party OS interoperability especially regarding OS Counter handling

    Fixed issues

    • SetEvent/ActivateTask in Rte_Call triggers the ProtectionHook (ESCAN00074746)
    • Compiler error: Missing Rte_MemClr in case of inter-ECU sender/receiver communication from partitions without BSW (ESCAN00074763)
    • Compiler error: duplicate function SchM_GetVersionInfo (ESCAN00074940)
    • Additional generator error when complex constants are used in combination with different data types (ESCAN00075122)
    • RTE49999 error message in case hex constants are used as init value for float data elements (ESCAN00075129)
    • Validator aborts due to null pointer dereference in case the mandatory SupportsMultipleInstantation attribute is missing (ESCAN00075572)
    • RTE generator does not report all unconnected client ports (ESCAN00075616)
    • RTE generator issues an error when RteXcpEventSupport is enabled (ESCAN00076005)
    • Internal Generator Error when unconnected client ports are used (ESCAN00076184)
    • Unwanted generation of begin and end tags for Xcp checksum block of A2L memory segments (ESCAN00076298)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.3.0 - DaVinci Developer Version 3.7.x

    RTE features

    • Memory Protection support:
      • Memory protection can now also be used in multi core ECUs
      • Inter-ECU sender/receiver communication, queued sender/receiver communication and mapped client/server calls are no longer limited to the BSW partition
      • Added warning message for directly invoked C/S calls from trusted to non-trusted partitions
    • Multi Core support:
      • Several optimizations regarding inter core communication e.g. usage of shared non-cachable memory instead of OS IOCs
    • SWC Template Generator:
      • If a server runnable is invoked by the Diagnostic Communication Manager (Dcm) and E_NOT_OK is specified as application error in the port interface description the generated runnable returns this negative return code and no longer RTE_E_OK.
      • The backup files *.bak are only generated if there are changes in the template code.
    • Added support for transmission acknowledge handling for 1:N communication if only one external receiver exists
    • Runtime Optimization: Remove unnecessary interrupt locks
    • Added support for the Development Error Tracer (Det)
    • Added support for multiple VFB trace hook clients
    • Enhanced Nv Block length calculation which also considers padding bytes by evaluation of alignment configuration
    • Speed Optimization of the RTE Generator
    • Enhanced XCP Event handling

    Fixed issues

    • Closed negative interval bound is shifted by +1 (ESCAN00071792)
    • Lower and upper limit of data constraints are inverted (ESCAN00071798)
    • Fixed generator error "[Internal Error] Use of uninitialized value in numeric ne" (ESCAN00072085)
    • Remove duplicated "_" characters from calculated ECUC objects (ESCAN00072087)
    • Fixed compiler error: Missing member in Rte_CS_ClientQueueType (ESCAN00072245)
    • Fixed compiler error: Missing member in Rte_ClientIdleFlagsType (ESCAN00072258)
    • Fixed compiler error: else without if in Rte_Call API (ESCAN00072517)
    • Fixed compiler error: Wrong Rte_IRead return type in case of signal group degradation (ESCAN00072628)
    • Implementation method "All Interrupt Blocking" for RTE exclusive areas only disables OS interrupts of category 2 (ESCAN00072640)
    • Conversion of ranges with open negative boundary/boundaries to closed one(s) is off by 1 (ESCAN00072737)
    • Assertions fail for certain implementation/application data types with data constraint boundary "-#INF"/"#INF" (ESCAN00072839)
    • CompuMethod of type "Use Physical To Internal" might give wrong limits, invalid values and init values (ESCAN00072841)
    • Fixed wrong generation of interrupt locks in Com Callback (ESCAN00072960)
    • Fixed wrong calculation of ComSignalType for signals with dynamic length. UINT8_N was set but UINT8_DYN should be used (ESCAN00073116)
    • Fixed compiler error: RTE doesn't generate RxInvalidate flags (ESCAN00073241)
    • Fixed Null Pointer Exception during Rte calculation when an annotation has no origin (ESCAN00073758)
    • Enhanced Mode API returns wrong previous mode (ESCAN00073815)
    • Fixed compiler error: Redefinition of variable for a Rom Block of a NV Block Descriptor (ESCAN00073877)
    • Superfluous interrupt unlock function in case of implicit communication with never received handling (ESCAN00074110)

    Limitations of AUTOSAR 4.x support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.2.1 - DaVinci Developer Version 3.6.x

    Fixed issues

    • Fixed crashes of the RTE generator caused by wrong access to license library (ESCAN00072158)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.2.0 - DaVinci Developer Version 3.6.x

    RTE features

    • Enhanced Multi-Core support:
      • C/S communication over core boundaries
      • Inter-Ecu S/R communication from the slave cores
      • Mode reception from the slave cores
    • Support of NV block software component types
    • Support of SchM Contract Phase Generation
    • Enhanced command line interface which allows generation of multiple component templates or contract phase header files for a list of SWCs and/or BSW modules
    • Support of array data types with dynamic length for queued S/R communication (Rte_Send/Rte_Receive)
    • Runtime optimization in the generated RTE code by usage of optimized interrupt locking APIs of the MICROSAR OS
    • Generation of scaling (factor and offset) and unit information for data types into the generated component templates
    • Support additional unmapped triggers for mapped server runnables
    • Support for queued intra-Ecu N:1 S/R communication added
    • Enhanced configuration consistency checks

    Fixed issues

    • Padding bytes of record data types for queued S/R communications are not considered (ESCAN00068117)
    • Generation not possible when there are multiple tasks with schedulable entities on the same core (ESCAN00068557)
    • Compiler error: missing Rte_TxAck_ struct entry (ESCAN00068931)
    • Rte generator aborts with unexpected exit code (ESCAN00068978)
    • Server runnable is called with invalid arguments (ESCAN00069402)
    • Compiler error: Missing or invalid flag declarations in case of memory protection (ESCAN00069513)
    • Client/Server operation unexpectedly returns RTE_E_TIMEOUT (ESCAN00069574)
    • Function declaration and macro are both generated for Rte_Send (ESCAN00069729)
    • Rte generator aborts generation when an enumeration data type contains no enumeration literals (ESCAN00069512)
    • Rte_IrvRead returns wrong data in case inter runnable variables are not used inter runnables (ESCAN00070123)
    • Missing function prototype in application header for unconnected send ports (ESCAN00070715)
    • Compiler error: Extended task that only contains init runnables (ESCAN00071119)
    • RTE Generator crashes while comparing two array implementation data types with different array size semantic (ESCAN00071210)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.1.3 - DaVinci Developer Version 3.5.x

    Fixed issues

    • Removed check if upper limit > lower limit. The requirement [rte_sws_7176] was removed in AUTOSAR 4.0.3 (ESCAN00072740)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.1.2 - DaVinci Developer Version 3.5.x

    Fixed issues

    • Padding bytes of record data types for queued S/R communications are not considered (ESCAN00068117)
    • Generation not possible when there are multiple tasks with schedulable entities on the same core (ESCAN00068557)
    • Compiler error: missing Rte_TxAck_ struct entry (ESCAN00068931)
    • Rte generator aborts with unexpected exit code (ESCAN00068978)
    • Rte generator aborts generation when an enumeration data type contains no enumeration literals (ESCAN00069512)
    • Client/Server operation unexpectedly returns RTE_E_TIMEOUT (ESCAN00069574)
    • Function declaration and macro are both generated for Rte_Send (ESCAN00069729)
    • Rte_IrvRead returns wrong data in case inter runnable variables are not used inter runnables (ESCAN00070123)
    • Missing function prototype in application header for unconnected send ports (ESCAN00070715)
    • Compiler error: Extended task that only contains init runnables (ESCAN00071119)
    • RTE Generator crashes while comparing two array implementation data types with different array size semantic (ESCAN00071210)
    • Closed negative interval bound is shifted by +1 (ESCAN00071792)
    • Lower and upper limit of data constraints are inverted (ESCAN00071798)
    • Remove duplicated "_" characters from calculated ECUC objects (ESCAN00072087)
    • Fixed compiler error: Missing member in Rte_CS_ClientQueueType (ESCAN00072245)
    • Fixed compiler error: else without if in Rte_Call API (ESCAN00072517)
    • Fixed compiler error: Wrong Rte_IRead return type in case of signal group degradation (ESCAN00072628)
    • Implementation method "All Interrupt Blocking" for RTE exclusive areas only disables OS interrupts of category 2 (ESCAN00072640)
    • Conversion of ranges with open negative boundary/boundaries to closed one(s) is off by 1 (ESCAN00072737)
    • CompuMethod of type "Use Physical To Internal" might give wrong limits, invalid values and init values (ESCAN00072841)
    • Fixed wrong generation of interrupt locks in Com Callback (ESCAN00072960)
    • Enhanced Mode API returns wrong previous mode (ESCAN00073815)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.1.1 - DaVinci Developer Version 3.5.x

    RTE features

    • Support of Multi-Core (S/R communication over core boundaries)
    • Support of Inter-Runnable Variables with composite data types

    Fixed issues

    • RTE generator reports use of uninitialized values (ESCAN00067990)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.1.0 - DaVinci Developer Version 3.5.x

    RTE features

    • Support of measurement and calibration for calibration software component types
    • Support of A2L segment generation for online calibration method "Initialized RAM"
    • Support of calibration buffer generation
    • Support of OsSchedulePoint setting for init runnables
    • Support of reference data types that reference platform types
    • Cycle time in the generated A2L is now set for XcpEvents of cyclic triggered runnables
    • Improved commandline handling
    • Support for Configurator 5 licensing mechanism
    • Generated files are reported in Configurator 5 now
    • Automatically calculated parameters are greyed in Configurator 5 now
    • Generation is prevented in the postbuild phase now
    • Several improvements in the checks and validation rules
    • MISRA enhancements

    Fixed issues

    • Fixed limits for float values in generated A2L file (ESCAN00065206)
    • Fixed enumeration literal in generated A2L file (ESCAN00066289)
    • Fixed order of matrix dimensions in generated A2L file (ESCAN00066810)
    • Fixed compiler error when init runnables call servers on other tasks (ESCAN00065417)
    • Fixed triggering of runnables with cyclic triggers that are mapped to BSW Scheduler tasks (ESCAN00065738)
    • Fixed generation of enumeration literals (ESCAN00066097)
    • Fixed that OnEntry triggered runnables are no longer triggered for the wrong mode (ESCAN00066296)
    • Fixed runnable triggering for OnTransition triggers (ESCAN00067234)
    • Fixed compiler error due to inconsistency between COM configuration and RTE COM callback generation (ESCAN00066956)
    • Fixed compiler error in case of implicit communication (ESCAN00066549)
    • Fixed RTE generator crash with null pointer exception when configuration contains ComponentTypes but no ComponentInstances (ESCAN00065829)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 4.0.0 - DaVinci Developer Version 3.4.x

    RTE features

    • Support of 'On Transition' triggered runnable entities
    • Support of component type symbol name
    • Support of data type symbol name
    • Support of pointer implementation data types
    • Generation of 'Rte_UserTypes.h' with RTE template mechanism
    • Completed support of unconnected ports for AUTOSAR 4 by introduction of the return codes RTE_E_UNCONNECTED
    • BSW exclusive area implementation method 'CUSTOM' was introduced, which allows manual implementation of the SchM exclusive area APIs SchM_Enter and SchM_Exit in a separate file
    • Add support for different EcuC package structures
    • Support of compatibility mode for AUTOSAR 4
    • Several improvements in the checks and validation rules
    • Update NvM configuration for mapped per instance memories
    • Optimized generator memory usage for data elements with many subelements
    • MISRA enhancements

    Fixed issues

    • Incomplete support of RTE Exclusive Area Implementation method ALL_INTERRUPT_BLOCKING leads to wrong validation results (ESCAN00062257)
    • Generated A2L file may lead to plausibility check warnings in MC tools (ESCAN00063135)
    • RTE generator aborts with an internal error when the RTE Generator was called with a composition or a calibration SW component type (ESCAN00062200)
    • Enhanced Rte_Mode API reports an inconsistent state (ESCAN00062543)
    • Template update for _MemMap.h does not work (ESCAN00061678)
    • Compile error when multiple instantiated SWCs uses calibration require ports (ESCAN00063506)
    • Compile error may occur when Rte_IsUpdated function is used with indirect API (ESCAN00063620)
    • IRead and IStatus APIs return wrong values in case of unconnected ports (ESCAN00063829)
    • Mode disablings are not initialized correctly (ESCAN00062339)
    • RTE generator aborts with an error on Japanese Windows (ESCAN00062831)
    • RTE generator reports use of uninitialized values (ESCAN00062817)
    • RTE generator does not remove obsolete objects from the ECUC configuration (ESCAN00062525)

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 3.90.0 - DaVinci Developer Version 3.3.x

    RTE features

    • Support of AUTOSAR 4.0.3

    Limitations of AUTOSAR 4.0 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 2.22.0 - DaVinci Developer Version 3.3.x

    RTE features

    • General support of AUTOSAR 3.2.2 (RTE SWS 2.5.0)
    • Support of Rte_IsUpdated API. Configuration is now independent of the E2E support.
    • Support of non-queued N:1 Intra-Ecu S/R communication
    • Allow unconnected calibration R-Ports
    • Initial value can be omitted, if the initial value is defined at the connected port

    Fixed issues

    • Runnables with mode disabling dependencies are not triggered (ESCAN00059438)
    • Fixed internal error in RTE Generator caused by configurations containing unconnected calibration parameter P-Ports (ESCAN00060622)
    • Fixed compile error when measurement is enabled for ports with implicit access (ESCAN00060815)
    • Fixed compile errors when mapping primitive byte arrays to Com signals (ESCAN00060835)
    • Fixed wrong generated function prototype for Rte_CData API when RTE_PTR2ARRAYBASETYPE_PASSING is active and a string or array calibration parameter is accessed in an object code SWC or uses multiple instantiation (ESCAN00061640)

    Limitations of AUTOSAR 3.2.2 support

    • See TechnicalReference_Asr_Rte.pdf for details.

    (top)


    MICROSAR RTE 2.21.0 - DaVinci Developer Version 3.2.x

    RTE features

    • Added support for hexadecimal coded enumeration values
    • Add support for SystemSignals that use the same name as SystemSignalGroups

    Fixed issues

    • Fixed linker error caused by wrong entries in Calibration Parameter Handle Section in special configuration variants (ESCAN00057382)
    • Fixed linker error caused by missing Rte_IsUpdated API if object code SWCs are used in a special configuration variant (ESCAN00057845)
    • Fixed wrong default mapping for SWC specific constant memory sections (ESCAN00058272)
    • Removed wrong and not required MISRA justifications for preprocessor defines (ESCAN00058459)
    • Fixed missing OS Alarm references in OS Application configuration during EcuC-Synchronization in case of memory protection support is enabled (ESCAN00058629)
    • Fixed wrong calls of Com_SendSignal / Com_SendSignalGroup with wrong handle ID in special fan-in use case (ESCAN00057764)

    (top)


    MICROSAR RTE 2.20.1 - DaVinci Developer Version 3.1.x

    Fixed issues

    • Fixed wrong initialization of binary coded strings (ESCAN00056860)

    (top)


    MICROSAR RTE 2.20.0 - DaVinci Developer Version 3.1.x

    RTE features

    • The call of Schedule() API in non-preemptive Basic Tasks has been made configurable.
    • Added MISRA justifications in the source code of the generated RTE code.
    • Enhanced memory protection support:
      • The generated RTE code is split into OS Application specific files.
      • The generated file 'usrostyp.h' uses now also the template mechanism and can be modified by the user.
      • Additional SWC specific memory mapping section defines were added for variables and can be used in the SWC code. In case of memory protection a default mapping to OS Application specific memory sections of the OS is created.
    • Enhanced command line interface:
      • The RTE generator was extended to support generation of multiple generation modes in one command line call. This improvement speeds up generation and makes the command line interface easier and more powerful.
      • If the configuration contains only one ECU-Project or only one Software Component Type the command line parameter -m is no longer required.
    • Byte arrays no longer need to be mapped to COM signal groups. An optional mapping to primitive COM signals of type UINT8_N has been implemented as specified in AUTOSAR 3.2.1. This support was previously only available for string types.
    • Added support of binary coded string data types (non-printable characters)
    • Optimizations:
      • Further removement of unnecessary interrupt locks
      • Handling of mode disabling dependencies was optimized

    Fixed issues

    • Fixed compiler warning when a server is triggered by multiple operations with different but compatible interfaces (ESCAN00053739)
    • Fixed wrong return code of Rte_Receive API during very first read of a queued data element (ESCAN00054769)
    • Fixed Rte_XcpEvents.a2l which contained wrong MAX_DAQ_LIST settings (ESCAN00054211)
    • Fixed wrong generated OS configuration leading to an OS runtime error when OS resources are used by runnables on the BSW Scheduler tasks (ESCAN00054157)
    • Added missing check that prevents that signal groups are mapped to different record types in case of fan-in (ESCAN00056005)
    • Fixed compilation error caused by variable redefinitions when fan-in is used in combination with memory protection (ESCAN00056006)

    (top)


    MICROSAR RTE 2.19.1 - DaVinci Developer Version 3.0 (SP5)

    RTE features

    • Enhanced memory protection support:
      • C/S communication over memory protection boundaries can now also be done with unmapped server runnables leading to a direct function call. In that case the RTE Generator creates a warning message.
      • Allow usage of mode machines in the non BSW OS Applications when the BSW is non-trusted.
    • Optimization in generated RTE code by removal of superfluous interrupt locks if 'Minimize Execution Time' is configured and mode disabling dependencies are used.

    Fixed issues

    • Fixed compile error when measurement is enabled for unconnected ports in case of memory protection (ESCAN00052919)
    • Fixed missing interrupt locks for implicit inter-runnable variables (ESCAN00052957)
    • Fixed wrong reported mode of Rte_Mode API during initialization (ESCAN00053108)
    • Fixed invalid runnable triggers for runnables which are disabled in the init mode of a mode machine (ESCAN00053110)
    • Fixed compile error due to structure mismatch in special configuration of online calibration method initialized RAM (ESCAN00053211)

    (top)


    MICROSAR RTE 2.19.0 - DaVinci Developer Version 3.0 (SP5)

    RTE features

    • General support of AUTOSAR 3.2.1 (RTE SWS 2.4.0)
    • Support of Rte_IsUpdated API based on AUTOSAR 4.0
    • Support Never-Received status in Rte_Read and Rte_IStatus API
    • Support of selective file generation. This generation mode can be enabled by setting 'BoardConditionalGenerating' in the general settings. If this mode is enabled, only files are generated when the content is different compared to previous generated files.
    • Enhanced measurement support:
      • Measurement of Inter-Ecu S/R communication. This requires that measurement objects for COM Signals with the naming convention Com_< SignalName > are available in the A2L file.
      • Optimized XcpEvent ID allocation to avoid conflicts with BSW measurement XcpEvent IDs
    • Enhanced SWC Template Generation:
      • Support of E2E Protection Wrapper API
      • Generated Rte_IWrite calls initialize the implicit S/R buffers with the configured initial value. By default this initialization code is disabled. It can be enabled with the preprocessor switch RTE_INIT_IMPLICIT_BUFFERS.
    • Optimization in generated RTE code by removal of superfluous interrupt locks for atomic signal and signal group access operations.
    • Several optimizations and enhancements in the memory protection support e.g. support of non-trusted BSW. See Technical Reference for details.

    Fixed issues

    • Harmonized values returned by the UpperLimit and LowerLimit defines and added some missing ones (ESCAN00048418)
    • Fixed compilation error caused by a missing check if an init runnable contains a wait point (ESCAN00051267)
    • Added missing void cast of unused return value for XcpEvent() calls, which causes MISRA violation 16.10 in configurations where measurement with XcpEvent support is enabled (ESCAN00050023)
    • Fixed compilation error caused by missing internal Rte_MemClr function. The compilation error only occurs when minimum start interval is used and other configuration variants which need the same internal function are not configured (ESCAN00050730)
    • Fixed compilation error caused by Init-Runnables which uses implicit S/R communication and are mapped to extended tasks (ESCAN00051059)
    • Fixed linker error caused by missing Rte_Read/Rte_Receive API for unconnected port (ESCAN00051089)
    • Fixed compilation error caused by missing status variable (ESCAN00051490)
    • Fixed invalid and missing measurement and characteristic references in A2L groups (ESCAN00050851)
    • Fixed wrong generated error message 'Use of uninitialized value in concatenation (.) or string' in some special configuration variants (ESCAN00048927)
    • Fixed wrong optimization for multiple implicit accesses within the same task (ESCAN00052147)
    • Fixed wrong optimization which may lead to missing ResumeOSInterrupts() calls in task bodies with implicit S/R data access in special cases (ESCAN00052426)

    Limitations of AUTOSAR 3.x support

    • Inter-ECU C/S communication is not supported.

    (top)


    MICROSAR RTE 2.18.2 - DaVinci Developer Version 3.0 (SP4)

    Fixed issues

    • Fixed wrong calls of Com_SendSignal / Com_SendSignalGroup with wrong handle ID in special fan-in use case (ESCAN00057764)

    (top)


    MICROSAR RTE 2.18.1 - DaVinci Developer Version 3.0 (SP4)

    RTE features

    • Added check for server runnables that are configured with minimum start interval which is not allowed.

    Fixed issues

    • Fixed compilation error due to access to an invalidate flag that is not declared in case of an unconnected receiver port and enabled measurement support (ESCAN00050471)
    • Fixed compilation error when alive timeout is used in combination with memory protection (ESCAN00050643)
    • Minimum start interval code is not initialized properly when memory protection is used (ESCAN00050645)
    • Fixed compilation error when invalidation is used for external signals and when memory protection is enabled (ESCAN00050646)
    • Fixed buffer overflow during initialization when the value of a constant is out of base type range (ESCAN00050820)

    (top)


    MICROSAR RTE 2.18.0 - DaVinci Developer Version 3.0 (SP4)

    RTE features

    • Support of implicit API behavior according AUTOSAR 3.x using task specific buffers for runtime optimization.
    • Support for symbolic name values with module short name prefixes for COM handles used in the interface between RTE and COM.
    • Optimization in generated RTE Code: Reduced number of OS Events needed for identical trigger condition in case of DataReceivedEvents or DataReceptionErrorEvents.

    Fixed issues

    • Fixed compile/link error due to wrong indirect API generation in some specific configuration variants (ESCAN00046908)
    • Fixed compile warning caused by missing type casts in the generated RTE code. The warning may occur depending on the used compiler and only in special configurations where asynchronous C/S communication or implicit S/R communication together with string or array data types is used (ESCAN00047830)
    • Fixed compilation error due to wrong generated Rte_Call API in special configuration variant (ESCAN00048109)
    • Fixed wrong optimization for runnables triggered on Tx acknowledge of Inter-ECU communication which may lead to a delayed execution of the runnable. The wrong behavior depends on the task mapping of the involved runnable entities (ESCAN00048452)

    (top)


    MICROSAR RTE 2.17.6 - DaVinci Developer Version 3.0 (SP3)

    Fixed issues

    • Fixed compilation error due to access to an invalidate flag that is not declared in case of an unconnected receiver port and enabled measurement support (ESCAN00050471)
    • Fixed compilation error when alive timeout is used in combination with memory protection (ESCAN00050643)
    • Minimum start interval code is not initialized properly when memory protection is used (ESCAN00050645)
    • Fixed compilation error when invalidation is used for external signals and when memory protection is enabled (ESCAN00050646)
    • Fixed buffer overflow during initialization when the value of a constant is out of base type range (ESCAN00050820)
    • Fixed invalid and missing measurement and characteristic references in A2L groups (ESCAN00050851)
    • Fixed linker error caused by missing Rte_Read/Rte_Receive API for unconnected port (ESCAN00051089)
    • Fixed compilation error caused by a missing check if an init runnable contains a wait point (ESCAN00051267)
    • Fixed missing interrupt locks for implicit inter-runnable variables (ESCAN00052957)
    • Fixed wrong reported mode of Rte_Mode API during initialization (ESCAN00053108)
    • Fixed invalid runnable triggers for runnables which are disabled in the init mode of a mode machine (ESCAN00053110)
    • Fixed compile error due to structure mismatch in special configuration of online calibration method initialized RAM (ESCAN00053211)
    • Fixed compiler warning when a server is triggered by multiple operations with different but compatible interfaces (ESCAN00053739)
    • Fixed Rte_XcpEvents.a2l which contained wrong MAX_DAQ_LIST settings (ESCAN00054211)
    • Fixed wrong return code of Rte_Receive API during very first read of a queued data element (ESCAN00054769)
    • Added missing check that prevents that signal groups are mapped to different record types in case of fan-in (ESCAN00056005)
    • Fixed linker error caused by wrong entries in Calibration Parameter Handle Section in special configuration variants (ESCAN00057382)
    • Runnables with mode disabling dependencies are not triggered (ESCAN00059438)
    • Fixed wrong calls of Com_SendSignal / Com_SendSignalGroup with wrong handle ID in special fan-in use case (ESCAN00057764)
    • Fixed wrong RTE generation caused by missing data mappings of signal groups when dcf format and AUTOSAR 3.1.4 is used with Signal-Group Degradation feature (ESCAN00060016)

    (top)


    MICROSAR RTE 2.17.5 - DaVinci Developer Version 3.0 (SP3)

    RTE features

    • Optimization in generated RTE code by removal of superfluous interrupt locks for atomic signal and signal group access operations.
    • The generated SWC template code (command line option -g i) contains Rte_IWrite calls for all implicit data write accesses of a runnable entity. By default this initialization code is disabled. It can be enabled with the preprocessor switch RTE_INIT_IMPLICIT_BUFFERS.
    • Added check for server runnables that are configured with minimum start interval which is not allowed.

    Fixed issues

    • Added missing void cast of unused return value for XcpEvent() calls, which causes MISRA violation 16.10 in configurations where measurement with XcpEvent support is enabled (ESCAN00050023)
    • Harmonized values returned by the UpperLimit and LowerLimit defines and added some missing ones (ESCAN00048418, ESCAN00048443)
    • Fixed compile warning caused by missing type casts in the generated RTE code. The warning may occur depending on the used compiler and only in special configurations where asynchronous C/S communication or implicit S/R communication together with string or array data types is used (ESCAN00047830)
    • Fixed compilation error due to wrong generated Rte_Call API in special configuration variant (ESCAN00048109)
    • Fixed wrong optimization for runnables triggered on Tx acknowledge of Inter-ECU communication which may lead to a delayed execution of the runnable. The wrong behavior depends on the task mapping of the involved runnable entities (ESCAN00048452)
    • Fixed compilation error caused by missing internal Rte_MemClr function. The compilation error only occurs when minimum start interval is used and other configuration variants which need the same internal function are not configured (ESCAN00050730)

    (top)


    MICROSAR RTE 2.17.4 - DaVinci Developer Version 3.0 (SP3)

    RTE features

    • Enhanced measurement and calibration support: Added scaling information (Factor, Offset and Unit) and description to the generated A2L file.

    (top)


    MICROSAR RTE 2.17.3 - DaVinci Developer Version 3.0 (SP3)

    Fixed issues

    • Fixed compile error when measurement is activated for an unconnected provide port with enabled transmission acknowledge handling (ESCAN00047654)
    • Fixed missing volatile keyword for primitive calibration parameters (ESCAN00047633)
    • Fixed wrong usage of minimum start interval for multiple runnables with the same triggers even if not configured for all (ESCAN00047458)
    • Fixed wrong generated A2L file containing invalid COMPU_METHOD for Enumeration Datatypes without Enumerator (ESCAN00047354)
    • Fixed compile error/warning if measurement is activated for a data element prototype of an unconnected port prototype (ESCAN00046717)
    • Fixed usage of wrong GroupSignal IDs for SignalGroups in case of signal fan-in on the same cluster (ESCAN00047704)
    • Fixed compilation error compilation caused by several COM callback functions with the same name in case of configured PDU fan-in/fan-out (ESCAN00047713)

    (top)


    MICROSAR RTE 2.17.2 - DaVinci Developer Version 3.0 (SP3)

    RTE features

    • Added support for pure "documentation ports". Data elements are no longer require initial values when they have no port access, are not connected and no measurement support is configured.

    Fixed issues

    • Fixed compiler warning "Useless assignment to variable . Assigned value not used." if synchronous operation invocation is configured for a C/S interface where additional application errors exist (ESCAN00045763)
    • Fixed compile error caused by non-deterministic RTE generation which may lead to inconsistencies between OS and RTE configuration in some mode management configurations (ESCAN00046352)

    (top)


    MICROSAR RTE 2.17.1 - DaVinci Developer Version 3.0 (SP3)

    Fixed issues

    • Fixed invalid array accesses when RTE_PTR2ARRAYBASETYPE_PASSING array passing schema is selected (ESCAN00045373)

    (top)


    MICROSAR RTE 2.17.0 - DaVinci Developer Version 3.0 (SP3)

    RTE features

    • Support of online calibration methods 'Initialized Ram', 'Single Pointered' and 'Double Pointered'.
    • Support of extended record data type compatibility rule for S/R communication with different record layouts on sender and receiver side. Now it's allowed to have a subset of the record elements on receiver side even if the sender provides more elements. In addition it's no longer required to have the same order of the record elements on both sides of the communication.
    • Support of Tx-Timeout and Tx-Error notification callbacks of COM. Note: Now also on transmission error the 'On Data Send Completion' triggered runnables are activated. The SW-C runnable code has to call the Rte_Feedback API to distinguish between a positive transmission acknowledgement or a transmission error.

    Fixed issues

    • Fixed wrong activated alive timeout handling if alive timeout was configured as real value '0.0' (ESCAN00043201)
    • Fixed compilation error if RTE VFB trace hooks in Rte_Switch API are used (ESCAN00044080)
    • RTE code generation aborts due to missing runnable trigger when the runnable has configured a minimum start interval (ESCAN00044176)
    • Reset alive timeout status also on reception of an invalid signal when the invalid handling mechanism is configured to 'keep' (ESCAN00044180)

    Limitations of AUTOSAR 3.x support

    • Inter-ECU C/S communication is not supported.

    (top)


    MICROSAR RTE 2.16.1 - DaVinci Developer Version 3.0 (SP2)

    Fixed issues

    • Fixed usage of wrong GroupSignal IDs for SignalGroups in case of signal fan-in on the same cluster (ESCAN00047704)
    • Fixed compilation error compilation caused by several COM callback functions with the same name in case of configured PDU fan-in/fan-out (ESCAN00047713)

    (top)


    MICROSAR RTE 2.16.0 - DaVinci Developer Version 3.0 (SP2)

    RTE features

    • Support of AUTOSAR 3.1 (RTE SWS 2.2.0)
    • Support of 'minimum start interval' for runnable entities (runnable debouncing)
    • Support of Rx data filter (COM-Filter) 'NewDiffersOld' and 'Always'
    • Enhanced measurement and calibration support:
      • Measurement of Intra-Ecu S/R communication (implicit and explicit)
      • Measurement of Inter-Ecu S/R communication (implicit only)
      • Measurement of Inter-Runnable Variables
      • Measurement of mode machine states
      • Additional structure in A2L file
      • Selection of A2L standard version (V1.51 and V1.6)
      • Support of XcpEvent based measurement
    • Support of invalid value access macro generation

    Fixed issues

    • Fixed compilation error for string data elements of unconnected receive ports when implicit communication is used (ESCAN00042349)

    Limitations of AUTOSAR 3.x support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.

    (top)


    MICROSAR RTE 2.15.5 - DaVinci Developer Version 3.0 (SP1)

    RTE features

    • Added support for Windows 7

    Fixed issues

    • Fixed compiler warning when a server is triggered by multiple operations with different but compatible interfaces (ESCAN00053739)
    • Fixed wrong return code of Rte_Receice API during very first read of a queued data element (ESCAN00054769)
    • Fixed missing interrupt locks for implicit inter-runnable variables (ESCAN00052957)
    • Fixed wrong reported mode of Rte_Mode API during initialization (ESCAN00053108)
    • Fixed invalid runnable triggers for runnables which are disabled in the init mode of a mode machine (ESCAN00053110)
    • Fixed linker error caused by missing Rte_Read/Rte_Receive API for unconnected port (ESCAN00051089)
    • Fixed compilation error when invalidation is used for external signals and when memory protection is enabled (ESCAN00050646)
    • Fixed compile warning caused by missing type casts in the generated RTE code. The warning may occur depending on the used compiler and only in special configurations where asynchronous C/S communication or implicit S/R communication together with string or array data types is used (ESCAN00047830)
    • Fixed missing UpperLimit and LowerLimit defines (ESCAN00048418)
    • Fixed wrong optimization for runnables triggered on Tx acknowledge of Inter-ECU communication which may lead to a delayed execution of the runnable. The wrong behavior depends on the task mapping of the involved runnable entities (ESCAN00048452)
    • Fixed missing volatile keyword for primitive calibration parameters (ESCAN00047633)
    • Fixed wrong generated A2L file containing invalid COMPU_METHOD for Enumeration Datatypes without Enumerator (ESCAN00047354)
    • Fixed compiler warning "Useless assignment to variable . Assigned value not used." if synchronous operation invocation is configured for a C/S interface where additional application errors exist (ESCAN00045763)
    • Fixed compile error caused by non-deterministic RTE generation which may lead to inconsistencies between OS and RTE configuration in some mode management configurations (ESCAN00046352)
    • Fixed compilation error if RTE VFB trace hooks in Rte_Switch API are used (ESCAN00044080)

    (top)


    MICROSAR RTE 2.15.4 - DaVinci Developer Version 3.0 (SP1)

    RTE features

    • Optimization in generated RTE Code: Enhanced support for speed optimized bit access

    Fixed issues

    • Fixed OS runtime error when OS resources are used by runnables on the BSW Scheduler tasks (ESCAN00054157)

    (top)


    MICROSAR RTE 2.15.3 - DaVinci Developer Version 3.0 (SP1)

    Fixed issues

    • Fixed compilation error due to wrong generated Rte_Call API in special configuration variant (ESCAN00048109)
    • Fixed compilation error caused by a missing check if an init runnable contains a wait point (ESCAN00051267)

    (top)


    MICROSAR RTE 2.15.2 - DaVinci Developer Version 3.0 (SP1)

    RTE features

    • Optimization in generated RTE Code: Support for speed optimized bit access dependent on new RTE configuration switch 'Optimization Mode'

    Fixed issues

    • Fixed missing data element initialization for signal fan-in (ESCAN00042875)
    • Fixed missing trace hooks for client server communication (ESCAN00041826)

    (top)


    MICROSAR RTE 2.15.1 - DaVinci Developer Version 3.0 (SP1)

    Fixed issues

    • Fixed wrong generated RTE which may lead to compiler warnings due to generation of unneeded functions in some mode management configurations (ESCAN00042573)
    • Added missing check if different receivers use different invalidation settings (ESCAN00042733)
    • DaVinci DLL updated which contains fixes for multi-ECU use cases and also for signal multiplexing

    (top)


    MICROSAR RTE 2.15.0 - DaVinci Developer Version 3.0 (SP1)

    RTE features

    • Support implementation template generation for service components, complex device drivers and EcuAbstraction components if -m parameter contains a single SWC type
    • Optimization in generated RTE Code: Optimized runnable scheduling to reduce latency times of communication between SWCs

    Fixed issues

    • Fixed wrong mode handling for multiple instantiated software components which uses R-Mode ports (ESCAN00041459)
    • Fixed wrong lost of signal data in case of a signal fan-in for composite data element prototypes (ESCAN00042144)
    • Fixed multiple activation error of an extended task in OS in specific mode management configuration (ESCAN00042044)

    (top)


    MICROSAR RTE 2.14.0 - DaVinci Developer Version 3.0 (SP1)

    RTE features

    • Support complex data types where not all primitive members require an invalid value.
    • Support inclusion of user header file 'Rte_UserTypes.h' allows type definitions for Per-Instance memory, which doesn't use an AUTOSAR data type. Inclusion of this header file can be enabled by setting the preprocessor switch 'RTE_ENABLE_USER_DATATYPES' during compilation.
    • Optimization in generated RTE Code: Reduced number of OS Events needed for identical trigger conditions.

    Fixed issues

    • Compile errors for port connections with different but compatible record types (ESCAN00040001)
    • Missing Per-Instance memory declarations in 'Rte_Type.h' when multiple instantiation is used (ESCAN00040668)
    • Missing check for implicit APIs when a mapped server runnable is called from a client on the same task (ESCAN00040701)
    • Internal error during RTE generation if mode disablings and mode switch triggers are used in special configuration (ESCAN00041128)
    • Use initial value of the receiver if sender and receiver have configured different initial values (ESCAN00041176)

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Runnable debouncing is not supported.

    (top)


    MICROSAR RTE 2.13.0 - DaVinci Developer Version 3.0

    RTE features

    • Support of unconnected require ports for S/R, mode and asynchronous C/S communication.
    • Support of deactivation switch for automatic OS alarm generation for cyclic runnable triggers. This allows usage of OS schedule tables for user specific trigger implementation.
    • Support of explicit configured OS task types. In addition to the automatic selection by the RTE generator the user can select basic or extended task type manually.
    • Support of explicit configured task types (application task, BSW-Scheduler task and non-RTE task). Only application tasks are generated by the RTE generator.
    • Support configuration dependent 'constant' generation.
    • Generation of a HTML Report for the generated RTE.
    • Enable VFB trace hooks for direct function call optimized Rte_Call API.
    • Content of the 'Description' tab in DaVinci Developer is written to the generated SWC templates.
    • Speed optimization of the RTE generator in several generation modes e.g. in Ecu-C synchronization mode.
    • Optimization in generated RTE Code:
      • Macro implementation for direct Inter-Runnable Variables if possible.
      • Removal of superfluous interrupt locks for atomic copy operations.
      • Allow direct function calls also for server runnables with "canbeInvokedConcurrently" = false.
      • Remove unused data types in SWC template for better overview in the generated templates.

    Fixed issues

    • Use 'volatile' memory qualifier for calibration parameters (ESCAN00038866)
    • Cyclic Triggered runnable gets triggered at the wrong time (ESCAN00039073)
    • Out of memory error during SWC template and contract phase generation (ESCAN00039023)
    • MISRA warnings for unsigned integer constants (ESCAN00037939)
    • Missing interrupt locks for macro optimized S/R communication when signal fan-in is used (ESCAN00037947)
    • Missing interrupt locks for inter-runnable variable accesses in unmapped server runnables (ESCAN00039714)

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Runnable debouncing is not supported.

    (top)


    MICROSAR RTE 2.12.1 - DaVinci Tool Suite Version 2.3 (SP7)

    Fixed issues

    • Fixed memory protection issues when receiving S/R data over the network in non-trusted software components (ESCAN00037453)

    (top)


    MICROSAR RTE 2.12.0 - DaVinci Tool Suite Version 2.3 (SP7)

    RTE features

    • Support of Basic Tasks. Automatically selection of the task type (Basic vs. Extended) by the RTE Generator dependent on the configuration.
    • Enhanced error reporting with help messages in verbose generation mode (new command line option -v). The enhanced error reporting also includes some new checks and warning messages.
    • Template update mechanism now also available for compiler and memory abstraction header files Rte_Compiler_Cfg.h and Rte_MemMap.h.
    • Optimization in generated RTE Code:
      • Reduced number of OS Alarms needed for cyclic triggers.
      • Removed unneeded interrupt locks.
      • Removed unneeded Schedule() calls.
      • New macro based C/S call in some additional configuration variants.
    • Initial value of invalidation status now depends on the initial value and the invalid value of the data element.

    Fixed issues

    • Fixed wrong generated RTE code for implicit Inter-Runnable Variables access, where potentially needed interrupt locks were missed (ESCAN00036473)
    • Fixed wrong generated RTE code where Rte_Feedback returned RTE_E_TRANSMIT_ACK although no transmission ack was received (ESCAN00036202)
    • Fixed wrong generated RTE code where Rte_Feedback for Waiting Mode Switch/Transmit Acknowledgement never returned (ESCAN00036160)
    • Fixed wrong generated RTE code for some configurations where memory protection is used together with communication over the network or together with mode handling (ESCAN00034746)
    • Fixed RTE Generator leading to generator warnings about uninitialized variables in some mode management configuration variants (ESCAN00034752)
    • Fixed wrong generated RTE code where mode disablings got ignored if several mode machines disabled the same runnable (ESCAN00034755)
    • Fixed wrong generated RTE code leading to compile error for synchronous server calls in a special configuration variant (ESCAN00035726)
    • Fixed generated RTE code leading to a compile warning "condition always true" in a special mode management configuration variant (ESCAN00036127)
    • Fixed wrong generated RTE code leading to a compile error when different ports using the same port interface have configured different invalidation settings and the indirect API is enabled (ESCAN00036854)
    • Fixed wrong generated RTE code leading to a compile error when 'EnableTakeAddress' and either unconnected sender ports or mode switch APIs in general are used (ESCAN00037125)
    • Fixed non unique OS event names when short names are used which are limited to 32 characters (ESCAN00037187)

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Runnable debouncing is not supported.

    (top)


    MICROSAR RTE 2.11.0 - DaVinci Tool Suite Version 2.3 (SP6)

    RTE features

    • Support of unconnected P-Ports. (Sender-Ports, Mode-Ports and Server-Ports)
    • Support of signal Fan-In.
    • Generation of all data types irrespective of their actual usage.
    • COM return codes are evaluated and passed to the application SWCs.
    • Generation of more compact RTE code (reduction of number of lines especially for calibration parameters with init values).

    Fixed issues

    • Fixed wrong generated RTE code leading to compile errors for some specific Memory Protection configurations (ESCAN00033767)
    • Fixed wrong generated RTE code leading to compile warnings in some ModeManagement configurations (ESCAN00033590)
    • Fixed wrong generated RTE code leading to compile errors in specific configurations using unconnected server ports (ESCAN00031826)
    • Fixed RTE generation or compilation error for mode provide ports without configured port access for at least one runnable entity (ESCAN00034420)
    • Fixed wrong generated RTE code leading to wrong mode handling if one task handles more than one mode machine instance (ESCAN00034473)
    • Fixed wrong generated RTE code leading to compile errors in Rte_Mode API if only some port prototypes of the same component type have configured indirect API (ESCAN00034480)

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Runnable debouncing is not supported.

    (top)


    MICROSAR RTE 2.10.3 - DaVinci Tool Suite Version 2.3 (SP5)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.10.2 - DaVinci Tool Suite Version 2.3 (SP5)

    Fixed issues

    • Fixed twice triggered runnable entity after mode switch during initialization for mode machines with queue size > 1 (ESCAN00033174)
    • Fixed missing runnable trigger for internal implicit communication with invalidation (Replace) and data reception triggered runnable (ESCAN00033176)
    • Fixed generation error if mode disabling dependencies exist but no mode switch triggered runnable is configured for a mode machine (ESCAN00033177)

    (top)


    MICROSAR RTE 2.10.1 - DaVinci Tool Suite Version 2.3 (SP5)

    Fixed issues

    • Fixed wrong macro optimization for complex data types (ESCAN00032981)
    • Fixed wrong invalidation handling for data elements with both internal and external connectivity (ESCAN00032982)

    (top)


    MICROSAR RTE 2.10.0 - DaVinci Tool Suite Version 2.3 (SP5)

    RTE features

    • Support of Mode Management including mode switch triggered runnable entities and mode dependent execution of runnable entities. (Rte_Switch, Rte_Mode and Rte_Feedback for mode switch acknowledge).
    • Support of Data Element Invalidation (Rte_Invalidate and Rte_IInvalidate).
    • Support of data reception error triggered runnable entities for invalidated and outdated data elements.
    • Support of multiple cyclic triggers per runnable entity.
    • Support of multiple 'On Operation Invocation trigger' for the same runnable entity with compatible operations.
    • Extended A2L file generation for Calibration Parameters and Per-Instance Memory for user defined Attributes (A2L-ANNOTATION).

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Online Calibration is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Unconnected Ports are not supported.
    • Runnable debouncing is not supported.
    • N:1 S/R communication is not supported.

    (top)


    MICROSAR RTE 2.9.4 - DaVinci Tool Suite Version 2.3 (SP4)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.9.3 - DaVinci Tool Suite Version 2.3 (SP4)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.9.2 - DaVinci Tool Suite Version 2.3 (SP4)

    Fixed issues

    • Fixed wrong RTE COM callback generation name when using signal groups (ESCAN00031405)

    (top)


    MICROSAR RTE 2.9.1 - DaVinci Tool Suite Version 2.3 (SP4)

    Fixed issues

    • Fixed wrong aliveTimeout handling for internal communication (ESCAN00031196)
    • Fixed optimized string data type handling (ESCAN00031212)

    (top)


    MICROSAR RTE 2.9.0 - DaVinci Tool Suite Version 2.3 (SP4)

    RTE features

    • Support of Memory Protection (OS with scalability class SC3/SC4)

    RTE changes

    • Removed direction qualifier IN, OUT, INOUT in RTE API prototypes. This requires re-generation of the component templates.
    • Rte_Start no longer initializes the reception buffers for COM signals. This has to be done by the COM module itself and is synchronized in the configuration.
    • Support of characters '\' and '"' in constants of data type String.

    Fixed issues

    • Fixed duplicated names in Port Defined Arguments (ESCAN00030255)
    • Fixed insufficient protection of inter-runnable variables and exclusive areas (ESCAN00030127)
    • Fixed wrong component data structure entries for direct inter-runnable variables for those components, which do not support multiple instantiation (ESCAN00030348)
    • Fixed wrong handling of exclusive area if component data structure is used (ESCAN00030462)
    • Fixed wrong handling of "EnableTakeAddress" (ESCAN00030542)

    (top)


    MICROSAR RTE 2.8.1 - DaVinci Tool Suite Version 2.3 (SP3)

    Fixed issues

    • Fixed duplicated typedef for Exclusive Areas in Compatibility Mode (ESCAN00029664)
    • Fixed wrong transmission acknowledgment handling (ESCAN00029809)

    (top)


    MICROSAR RTE 2.8.0 - DaVinci Tool Suite Version 2.3 (SP3)

    RTE features

    • Support of Indirect APIs (Rte_Ports, Rte_NPorts and Rte_Port).
    • Support of Port API Option 'EnableTakeAddress'.
    • Support of platform dependent resource calculation.

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Data Element invalidation (Rte_Invalidate, Rte_IInvalidate) is not supported.
    • Online Calibration is not supported.
    • Mode-Handling (Rte_Mode, Rte_Switch) is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Unconnected S/R Ports and unconnected Calibration Ports are not supported.
    • DataReceiveErrorEvent as runnable trigger condition is not supported. Limited to polling mode via Rte_Read/Rte_IStatus API.
    • Runnable debouncing is not supported.
    • N:1 S/R communication is not supported.

    Fixed issues

    • Sorting in component data structure changed to camel case (ESCAN00029215)
    • Fixed generation error when range enumeration values are used (ESCAN00029358)

    (top)


    MICROSAR RTE 2.7.1 - DaVinci Tool Suite Version 2.3 (SP2)

    Fixed issues

    • Fixed wrong initialization of transmission acknowledgment (ESCAN00029115)

    (top)


    MICROSAR RTE 2.7.0 - DaVinci Tool Suite Version 2.3 (SP2)

    RTE features

    • Support of Multiple Instantiation of SW Components.
    • Support of Compatibility Mode.
    • Support of Object Code SW Components.

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Indirect API (Rte_Port, Rte_Ports, Rte_NPorts) is not supported.
    • Data Element invalidation (Rte_Invalidate, Rte_IInvalidate) is not supported.
    • Online Calibration is not supported.
    • Mode-Handling (Rte_Mode, Rte_Switch) is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Unconnected S/R Ports and unconnected Calibration Ports are not supported.
    • DataReceiveErrorEvent as runnable trigger condition is not supported. Limited to polling mode via Rte_Read/Rte_IStatus API.
    • Runnable debouncing is not supported.
    • N:1 S/R communication is not supported.

    Fixed issues

    • Fixed check for recursion of asynchronous C/S (ESCAN00027469)
    • Fixed RAM usage calculation for some C/S variants (ESCAN00028769)
    • Fixed wrong RTE generation for C/S operations with access mode set to 'none' (ESCAN00028838)

    (top)


    MICROSAR RTE 2.6.5 - DaVinci Tool Suite Version 2.3 (SP1)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.6.4 - DaVinci Tool Suite Version 2.3 (SP1)

    Fixed issues

    • Fixed wrong prototype for compatible C/S ports (ESCAN00026419)
    • Fixed Perl warning (concatenation error) for unused service ports (ESCAN00027639)
    • Removed typecast in application error definition (ESCAN00027799)

    (top)


    MICROSAR RTE 2.6.3 - DaVinci Tool Suite Version 2.3 (SP1)

    Fixed issues

    • Fixed issue in time conversion macro resulting in compiler warnings on some compilers due to wrong detected 'division by zero' messages (ESCAN00027538)

    (top)


    MICROSAR RTE 2.6.2 - DaVinci Tool Suite Version 2.3 (SP1)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.6.1 - DaVinci Tool Suite Version 2.3 (SP1)

    • No RTE Generator changes (DaVinci DLL update only).

    (top)


    MICROSAR RTE 2.6.0 - DaVinci Tool Suite Version 2.3 (SP1)

    RTE features

    • Support of Intra-ECU Timeout-Handling for synchronous C/S communication.
    • Support of parallel access of synchronous and asynchronous server calls to an operation of one server port.
    • Generation of an ASAM MCD 2MC / ASAP2 compatible A2L file fragment for Calibration Parameters and Per-Instance Memory

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Multiple instantiation of SW Components is not supported.
    • Indirect API (Rte_Port, Rte_Ports, Rte_NPorts) is not supported.
    • Data Element invalidation (Rte_Invalidate, Rte_IInvalidate) is not supported.
    • Online Calibration is not supported.
    • Mode-Handling (Rte_Mode, Rte_Switch) is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Compatibility Mode is not supported.
    • Contract Phase Generation limited to Source Code SW-C compatibility.
    • Unconnected S/R Ports and unconnected Calibration Ports are not supported.
    • DataReceiveErrorEvent as runnable trigger condition is not supported. Limited to polling mode via Rte_Read/Rte_IStatus API.
    • Runnable debouncing is not supported.
    • N:1 S/R communication is not supported.

    (top)


    MICROSAR RTE 2.5.0 - DaVinci Tool Suite Version 2.3

    RTE features

    • Support of AUTOSAR 3.0 (see Limitations of unsupported features)
    • New API supported: Rte_Calprm (Access to Calibration Element Prototypes of Calibration Components)
    • New API supported: Rte_Pim (Access to Per-Instance Memory)
    • Support of SW-C Implementation Template generation (command line option -g i) and Contract Phase generation (command line option -g c) for a complete ECU Project.

    Fixed issues

    • Fixed wrong handling of Array data types which contain elements of data type String (ESCAN00025491)

    Limitations of AUTOSAR 3.0 support

    • Inter-ECU C/S communication is not supported.
    • Intra-ECU Timeout-Handling for synchronous C/S communication is not supported.
    • Parallel access of synchronous and asynchronous server calls to an operation of one server port for Intra-Ecu C/S is not supported.
    • Multiple instantiation of SW Components is not supported.
    • Indirect API (Rte_Port, Rte_Ports, Rte_NPorts) is not supported.
    • Data Element invalidation (Rte_Invalidate, Rte_IInvalidate) is not supported.
    • Online Calibration is not supported.
    • Mode-Handling (Rte_Mode, Rte_Switch) is not supported.
    • COM Filters for Intra-ECU S/R communication are not supported.
    • Compatibility Mode is not supported.
    • Contract Phase Generation limited to Source Code SW-C compatibility.
    • Unconnected S/R Ports and unconnected Calibration Ports are not supported.
    • DataReceiveErrorEvent as runnable trigger condition is not supported. Limited to polling mode via Rte_Read/Rte_IStatus API.
    • Runnable debouncing is not supported.
    • N:1 S/R communication is not supported.

    (top)


    MICROSAR RTE 2.4.2 Beta - DaVinci Tool Suite Version 2.3 Beta

    RTE features

    • New API supported in RTE Generation Phase: Rte_Result (asynchronous Client/Server communication)

    Fixed issues

    • Changed return code of synchronous C/S call to mapped runnable from RTE_E_LIMIT to RTE_E_TIMEOUT on queue overflow (ESCAN00024800)

    Limitations of the Beta Version

    • The RTE generator does not support Timeout-Handling for synchronous C/S communication.
    • The RTE generator does not support parallel access of synchronous and asynchronous server calls to an operation of one server port.
    • The RTE generator does not support Calibration Parameters of Calibration Components, which is already described in the Technical Reference (Rte_Calprm API).
    • The RTE generator does not support Per-Instance Memory, which is already described in the Technical Reference (Rte_Pim API).

    (top)


    MICROSAR RTE 2.4.1 Beta - DaVinci Tool Suite Version 2.3 Beta

    RTE features

    • New API supported in RTE Contract Phase: Rte_Result (asynchronous Client/Server communication)
    • Added new checks for illegal configurations

    Fixed issues

    • Fixed issue resulting in compiler warnings/errors because a const pointer is provided to the COM API, which expects a non-const pointer (ESCAN00024706)
    • Fixed issue of un-matching parameters in VFB trace hook prototypes, if port defined arguments are used (ESCAN00024707)
    • Fixed issue with configurations containing mapped server runnables (ESCAN00024535, ESCAN00024469)
    • Fixed issue with missing exclusive area warnings and bad results or illegal memory access for C/S calls to mapped runnables (ESCAN00024562)
    • Fixed issue resulting in compile errors for renamed network signals in gateway use cases (ESCAN00024713)
    • Fixed issue of undefined VFB trace hooks (ESCAN00024776)

    Limitations of the Beta Version

    • The RTE generator does not support asynchronous C/S communication in the RTE Generation Phase, which is already described in the Technical Reference (Rte_Result API).
    • The RTE generator does not support Timeout-Handling for synchronous C/S communication, which is already described in the Technical Reference.
    • The RTE generator does not support Calibration Parameters of Calibration Components, which is already described in the Technical Reference (Rte_Calprm API).
    • The RTE generator does not support Per-Instance Memory, which is already described in the Technical Reference (Rte_Pim API).

    (top)


    MICROSAR RTE 2.4.0 Beta - DaVinci Tool Suite Version 2.3 Beta

    RTE features

    • Support of String data type (Encoding ISO-8859-1)
    • New API supported: Rte_CData (SW-C local Calibration Parameters)
    • Optimization: Depending on the configuration the Rte_Write API is generated as macro if possible
    • Generation of unmapped client runnables enabled

    Fixed issues

    • Fixed handling of unused server runnables for unconnected server ports (ESCAN00023783)
    • Fixed event handling for blocking Rte_Receive and Rte_Feedback in unmapped servers (ESCAN00023820)
    • Fixed IrvIWrite overwriting IrvIRead data (ESCAN00023669)
    • Fixed memory abstraction (ESCAN00023675)
    • Fixed generation of wrong OS Alarm settings if the cycle time for periodically runnables is a multiple of 1000 seconds (ESCAN00024400)
    • Fixed generation of wrong C/S handling in case of non-preemptive client tasks and mapped server runnables (ESCAN00024278)

    Limitations of the Beta Version

    • The RTE generator does not support asynchronous C/S communication, which is already described in the Technical Reference (Rte_Result API).
    • The RTE generator does not support Timeout-Handling for synchronous C/S communication, which is already described in the Technical Reference.
    • The RTE generator does not support Calibration Parameters of Calibration Components, which is already described in the Technical Reference (Rte_Calprm API).
    • The RTE generator does not support Per-Instance Memory, which is already described in the Technical Reference (Rte_Pim API).

    (top)


    MICROSAR RTE 2.3.0 - DaVinci Tool Suite Version 2.2 (SP3)

    RTE features

    • Support of complex hierarchical data types like arrays-of-records
    • Optimization: Depending on the configuration the Rte_Read API is generated as macro if possible

    (top)


    MICROSAR RTE 2.2.4 - DaVinci Tool Suite Version 2.2 (SP2)

    RTE features

    • Support of AUTOSAR release 2.1
    • Generation of RTE memory usage report
    • Adaptation of object properties according to AUTOSAR 2.1
    • Support of activation offset for cyclic runnable entities
    • Support of AUTOSAR compiler abstraction and memory abstraction mechanism
    • Support of AUTOSAR makefile mechanism for the RTE
    • Additional APIs supported: Rte_InitMemory, Rte_IWriteRef
    • Smart template generator: Update of component implementation files after changing component description
    • Summary of generated files displayed in output window

    Fixed issues

    • Rte_Feedback returns illegal error codes in some conditions
    • Generation of multiple internal S/R buffers (un-queued communication) with identical name
    • Multiple buffers generated for buffered Inter-Runnable Variables

    (top)


    MICROSAR RTE 2.2.2 - DaVinci Tool Suite Version 2.2 (SP1)

    RTE features

    • Support of Port Defined Arguments

    Fixed issues

    • Record constants missing in contract phase header

    (top)


    MICROSAR RTE 2.2.1 - DaVinci Tool Suite Version 2.2

    RTE features

    • Support of array types and enumeration types
    • Support of exclusive areas and inter-runnable variables
    • Definition of data-send-completed trigger
    • State request API for data send points
    • Detailed configuration of VFB tracing
    • Support of symbol attribute of runnable entities

    Fixed issues

    • Missing read-modify-write protection for queue overflow flags

    (top)


    Additional Information

    Copyright

    Vector Informatik GmbH

    Certified Quality Management System

    The Quality/Process Management of Vector Informatik GmbH is being certified according to DIN EN ISO 9001:2000-12 (formerly DIN EN ISO 9001:1994-08) throughout since 1998-08-19.

    Vector Informatik GmbH - Addresses

    Vector Informatik GmbH
    Ingersheimer Str. 24
    D-70499 Stuttgart, Germany
    Tel.: +49 (711) 80670-0
    Fax: +49 (711) 80670-100
    info@vector-informatik.de
    http://www.vector-informatik.com

    Subsidiaries

    Vector France SAS
    168, Boulevard Camlinat
    92240 Malakoff
    France
    Tel.: +33 1 4231 4000
    Fax: +33 1 4231 4009
    information@vector-france.com
    http://www.vector-france.com

    Vector Japan Co., Ltd.
    Seafort Square Center Bld.
    18F, 2-3-12,
    Higashi-shinagawa, Shinagawa-ku
    Tokyo 140-0002
    Japan
    Tel.: +81 3 5769 6970
    Fax: +81 3 5769 6975
    info@vector-japan.co.jp
    http://www.vector-japan.co.jp

    VecScan AB
    Theres Svenssons Gata 9
    417 55 Gothenburg
    Sweden
    Tel.: +46 (31) 76476 00
    Fax: +46 (31) 76476 19
    info@vecscan.com
    http://www.vecscan.com

    Vector CANtech, Inc.
    39500 Orchard Hill Place
    Suite 550
    Novi, Michigan 48375
    USA
    Tel.: +1 (248) 449-9290
    Fax: +1 (248) 449-9704
    info@vector-cantech.com
    http://www.vector-cantech.com

    Vector Korea IT Inc.
    Daerung Post Tower III, 508
    182-4 Guro-dong, Guro-gu
    Seoul 152-790
    Republic of Korea
    Tel.: +82(0)2 2028 0600
    Fax: +82(0)2 2028 0604
    info@vector-korea.com
    http://www.vector-korea.com

    Vector GB Ltd.
    Rhodium
    Central Boulevard
    Blythe Valley Park
    Solihull, Birmingham
    West Midlands B90 8AS
    United Kingdom
    Tel.: +44 (0) 7530 264701
    info@vector-gb.co.uk
    http://www.vector-gb.co.uk

    Vector Informatik India Prv. Ltd.
    Lokesh Madan
    4/1/1/1 Sutar Icon
    Sus Road
    Pashan
    Pune 411021
    India
    Tel.: +91 20 2587 2023
    Fax: +91 20 2587 2025
    lokesh.madan@vector-india.com
    http://www.vector-india.com

    Vector Informatik GmbH Representative Office Shanghai
    Suite 605, Tower C, Everbright
    Convention Center
    No. 70 Caobao Road
    Xuhui District
    Shanghai 20035
    China
    Tel.: +86 21 6432 53530
    Fax: +86 21 6432 5308
    info@vector-china.com
    http://www.vector.com/vi_index_cn.html

    (top)


    1.4 - Generators

    Generators

    1.5.1 - CANdelaStudio_Ford_contact

    Microsoft Word - CANdelaStudio_Ford_contact.docx

    1.5.2 - CANdelaStudio_Ford_contact_ind

    Page 1

    1.5.3 - CANdelaStudio_Ford_contacts

     
     
     
     
    Vector Informatik GmbH 
    Ingersheimer Str. 24 
    D-70499 Stuttgart 
    www.vector.com 
     
    Vector Informatik GmbH - Ingersheimer Str. 24 – D-70499 Stuttgart 
     
      
     
     
     
     
     
     
    CANdelaStudio Option FORD 
     
    Um neue Dokumente mit CANdelaStudio erzeugen zu können, wird eine Dokumentvorlage 
    benötigt. Eine Dokumentvorlage enthält die formale Beschreibung des verwendeten 
    Diagnoseprotokolls und ist daher herstellerspezifisch. Die Weiterentwicklung und 
    Pflege der Dokumentvorlagen liegt in der Verantwortung des Fahrzeugherstellers. Aus 
    diesem Grund werden Dokumentvorlagen nicht von Vector Informatik bereitgestellt, 
    sondern vom jeweiligen Fahrzeughersteller. 
    To create new documents with CANdelaStudio, a document template is needed. A document 
    template contains the formal specification of the used diagnostic protocol, thus it is 
    manufacturer specific. The car manufacturer is in charge of development and 
    maintenance of the document templates. On this account the document templates are not 
    provided by Vector Informatik, but by the respective car manufacturer. 
     
    Die Vorlagen für die Option „FORD“ sind erhältlich bei: 
    The templates for the option “FORD” are available from: 
     
    Europa / Europe  
    Nordamerika / North America 
    Peter Geffers  
    Kontaktieren Sie den / Please contact the 
    Diagnostics Supervisor  
    ‘Ford eRoom’ 
    EESE Europe  
     
    D-MC 3/A7c  
    <https://f1.ford.com/eRoom/EESE/NetCom/> 
    Ford Werke GmbH  
     
    Spessart Strasse  
    Gehen Sie im eRoom zu / Please go in the eRoom to: 
    50725  Cologne  
     
    Germany  
    Core Diagnostics -> 
    Phone: + 49-221-9034498  
    Forms and Templates -> 
    pgeffers@ford.com  
    Diagnostics 
     
    Bei Rückfragen wenden Sie sich bitte an: 
    For any questions please contact: 
     
    support@vector.com 
    Phone: +49 (0)711/80670-200 
     

    1.6 - SWC

    SWC

    1.7 - ThirdParty

    ThirdParty

    2 -

    Documentation Guide (MSR4)

    4 -










    Documentation Guide (MSR4) 
    Installation and Update 
    Tool Online Help 
    Installation Guide 
    Online Help CHM 
    Easy installation description to install tools and SIP properly 
    Every tool provides an online help document to learn how 
    to handle the tool 
     Vector Knowledge Base 

      
    First Steps 
    Technical Details 
    Startup_<OEM>_<SLPx>.chm 
    Technical References 
    User Manual to get the delivery basically running step by 
    From developers for developers - detailed information about 
    step and description to start with Vector AUTOSAR. Get 
    the BSW module or module-spanning topics, API tables, 
    familiar with MICROSAR BSW modules and Tools like 
    restrictions and limitations 
    DaVinci Developer and DaVinci Configurator. 
     TechnicalReferences 
     chm 
    User Manuals 
    Application Notes 
    Basic introduction to BSW modules. Includes step-by-step 
    Application Notes describe specific topics or use cases 
    introduction to get the module running basically 
    important for your software. They are named like  
    AN-ISC-x-xxxx_<name> 
     UserManuals 
     ApplicationNotes 
    Information 
    Release Notes Basic Software (BSW) 
    Release Notes (OS, RTE, DaVinci Tools) 
    Information about what is new and what is changed within 
    Information about what is new and what is changed within 
    Basic Software 
    OS, RTE, DaVinci Tools  
     chm 
     ReleaseNotes 
    Document Folders after SIP Installation 
    Windows 
    Programme | Vector MICROSAR SIP | CBD xxxxxx | Doc | Us
       erManuals UserManuals 
    Start Menu 
    | TechnicalReferences | TechnicalReference 
    | ApplicationNotes ApplicationNotes